aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EULA185
-rw-r--r--SCR/SCR-4.1.15-2.0.0.txt404
-rw-r--r--SCR/SCR-5.4.24_2.1.0.txt1311
-rw-r--r--classes/fsl-eula-unpack.bbclass11
-rw-r--r--classes/fsl-kernel-localversion.bbclass6
-rw-r--r--classes/imx-boot-container.bbclass107
-rw-r--r--classes/use-imx-security-controller-firmware.bbclass37
-rw-r--r--conf/layer.conf9
-rw-r--r--conf/machine/imx23evk.conf7
-rw-r--r--conf/machine/imx25pdk.conf7
-rw-r--r--conf/machine/imx28evk.conf7
-rw-r--r--conf/machine/imx51evk.conf10
-rw-r--r--conf/machine/imx53ard.conf9
-rw-r--r--conf/machine/imx53qsb.conf7
-rw-r--r--conf/machine/imx6qdlsabreauto.conf24
-rw-r--r--conf/machine/imx6qdlsabresd.conf24
-rw-r--r--conf/machine/imx6slevk.conf31
-rw-r--r--conf/machine/imx6sllevk.conf25
-rw-r--r--conf/machine/imx6sxsabreauto.conf22
-rw-r--r--conf/machine/imx6sxsabresd.conf43
-rw-r--r--conf/machine/imx6ulevk.conf41
-rw-r--r--conf/machine/imx6ullevk.conf22
-rw-r--r--conf/machine/imx6ulz-14x14-evk.conf36
-rw-r--r--conf/machine/imx7dsabresd.conf31
-rw-r--r--conf/machine/imx7ulpevk.conf30
-rw-r--r--conf/machine/imx8dx-mek.conf12
-rw-r--r--conf/machine/imx8dxl-evk.conf64
-rw-r--r--conf/machine/imx8mm-ddr4-evk.conf25
-rw-r--r--conf/machine/imx8mm-lpddr4-evk.conf36
-rw-r--r--conf/machine/imx8mmevk.conf60
-rw-r--r--conf/machine/imx8mn-ddr4-evk.conf22
-rw-r--r--conf/machine/imx8mn-lpddr4-evk.conf21
-rw-r--r--conf/machine/imx8mnevk.conf61
-rw-r--r--conf/machine/imx8mp-ddr4-evk.conf27
-rw-r--r--conf/machine/imx8mp-lpddr4-evk.conf47
-rw-r--r--conf/machine/imx8mq-evk.conf (renamed from conf/machine/imx8mqevk.conf)46
-rw-r--r--conf/machine/imx8qm-mek.conf89
-rw-r--r--conf/machine/imx8qmmek.conf64
-rw-r--r--conf/machine/imx8qxp-mek.conf26
-rw-r--r--conf/machine/imx8qxpmek.conf64
-rw-r--r--conf/machine/include/imx-base.inc242
-rw-r--r--conf/machine/include/imx8mm-evk.inc57
-rw-r--r--conf/machine/include/imx8mn-evk.inc63
-rw-r--r--conf/machine/include/imx8mp-evk.inc55
-rw-r--r--conf/machine/include/imx8x-mek.inc79
-rw-r--r--conf/machine/include/qoriq-base.inc9
-rw-r--r--conf/machine/ls1012afrwy.conf2
-rw-r--r--conf/machine/ls1012ardb.conf2
-rw-r--r--conf/machine/ls1028ardb.conf2
-rw-r--r--conf/machine/ls1043ardb.conf2
-rw-r--r--conf/machine/ls1046afrwy.conf2
-rw-r--r--conf/machine/ls1046ardb.conf2
-rw-r--r--conf/machine/ls1088ardb-pb.conf2
-rw-r--r--conf/machine/ls1088ardb.conf2
-rw-r--r--conf/machine/ls2088ardb.conf2
-rw-r--r--conf/machine/lx2160ardb.conf2
-rw-r--r--conf/machine/lx2162aqds.conf36
-rw-r--r--dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-imx.inc (renamed from dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc)0
-rw-r--r--dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium/chromium.patch (renamed from dynamic-layers/browser-layer/recipes-browser/chromium/chromium/chromium.patch)0
-rw-r--r--dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini6
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README77
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel32
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel31
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey4
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left29
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right28
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left3
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right8
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left39
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right34
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv42
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem25
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem27
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh19
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh19
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt2
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel41
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel41
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport23
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv42
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup47
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left13
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right13
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf19
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem22
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left10
-rwxr-xr-xdynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right10
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem25
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem27
-rw-r--r--dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb26
-rw-r--r--dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb2
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend3
-rw-r--r--dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend3
-rwxr-xr-xrecipes-bsp/alsa-state/alsa-state/imx/asound.state2758
-rw-r--r--recipes-bsp/atf/qoriq-atf-2.3.inc13
-rw-r--r--recipes-bsp/atf/qoriq-atf-tools_2.3.bb (renamed from recipes-bsp/atf/atf-tools_git.bb)9
-rw-r--r--recipes-bsp/atf/qoriq-atf_1.5.bb (renamed from recipes-bsp/atf/atf_git.bb)6
-rw-r--r--recipes-bsp/atf/qoriq-atf_2.3.bb175
-rw-r--r--recipes-bsp/ddr-phy/ddr-phy_git.bb6
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx-8.10.inc (renamed from recipes-bsp/firmware-imx/firmware-imx-8.5.inc)9
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx-8_8.10.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.10.bb (renamed from recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb)4
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx_8.10.bb129
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx_8.5.bb76
-rw-r--r--recipes-bsp/firmware-imx/firmware-nxp-wifi_1.0.bb46
-rw-r--r--recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-3.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/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch29
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.2.bb (renamed from recipes-bsp/imx-atf/imx-atf_2.0.bb)22
-rw-r--r--recipes-bsp/imx-kobs/imx-kobs_git.bb2
-rw-r--r--recipes-bsp/imx-lib/imx-lib_git.bb1
-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.bb15
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.inc6
-rw-r--r--recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.7.1.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/0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch34
-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.7.5.bb26
-rw-r--r--recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch39
-rw-r--r--recipes-bsp/imx-test/imx-test_git.bb10
-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.3.0.bb35
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-decoder_sw-resolve-compilation-error-with-fcommon.patch54
-rw-r--r--recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.20.0.bb (renamed from recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb)11
-rw-r--r--recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb31
-rw-r--r--recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb32
-rw-r--r--recipes-bsp/isp-imx/basler-camera_4.2.2.6.0.bb27
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch27
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-imx8-isp.service-do-not-prevent-restart-of-service.patch26
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-run.sh-fix-bashism.patch23
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch46
-rw-r--r--recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb84
-rw-r--r--recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb12
-rw-r--r--recipes-bsp/mc-utils/mc-utils_git.bb4
-rw-r--r--recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb2
-rw-r--r--recipes-bsp/rcw/rcw_git.bb2
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-common_2020.10.inc (renamed from recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc)8
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.10.bb8
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.10.bb (renamed from recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb)0
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc_2020.04.bb23
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc_2020.10.bb73
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-common.inc4
-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)9
-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)7
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch29
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch79
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Move-to-use-Python-3.patch30
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch928
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch228
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch105
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch42
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch117
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb (renamed from recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb)13
-rw-r--r--recipes-bsp/uefi/uefi_git.bb2
-rw-r--r--recipes-daemons/ptpd/ptpd-qoriq.bb67
-rw-r--r--recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch35
-rw-r--r--recipes-devtools/cst/cst_git.bb2
-rw-r--r--recipes-devtools/qemu/qemu-qoriq_4.1.0.bb16
-rw-r--r--recipes-dpaa2/dce/dce_git.bb4
-rw-r--r--recipes-dpaa2/gpp-aioptool/gpp-aioptool/0001-add-fcommon-to-fix-gcc-10-build-issue.patch36
-rw-r--r--recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb2
-rw-r--r--recipes-dpaa2/management-complex/management-complex_10.24.0.bb41
-rw-r--r--recipes-dpaa2/restool/restool/0001-restool-fix-build-error-with-gcc7.patch24
-rw-r--r--recipes-dpaa2/restool/restool_git.bb8
-rw-r--r--recipes-extended/crconf/crconf_git.bb5
-rw-r--r--recipes-extended/dpdk/dpdk.inc2
-rw-r--r--recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch53
-rw-r--r--recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch39
-rw-r--r--recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch100
-rw-r--r--recipes-extended/dpdk/dpdk_19.11-20.04.bb19
-rw-r--r--recipes-extended/dpdk/dpdk_19.11-20.12.bb20
-rw-r--r--recipes-extended/jailhouse/jailhouse_0.12.bb (renamed from recipes-extended/jailhouse/jailhouse_0.11.bb)6
-rw-r--r--recipes-extended/libpkcs11/libpkcs11/0001-fix-multiple-definition-error.patch90
-rw-r--r--recipes-extended/libpkcs11/libpkcs11_git.bb4
-rw-r--r--recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch34
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb6
-rw-r--r--recipes-extended/secure-obj/secure-obj.inc4
-rw-r--r--recipes-extended/tsntool/tsntool_git.bb2
-rw-r--r--recipes-fsl/packagegroups/packagegroup-fsl-isp.bb14
-rw-r--r--recipes-fsl/packagegroups/packagegroup-fsl-opencv-imx.bb12
-rw-r--r--recipes-graphics/drm/libdrm/musl-ioctl.patch35
-rw-r--r--recipes-graphics/drm/libdrm_2.4.102.imx.bb (renamed from recipes-graphics/drm/libdrm_2.4.99.imx.bb)6
-rw-r--r--recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.12.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.bb24
-rw-r--r--recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.3.p1.0.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.inc91
-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.3.p1.0-aarch32.bb (renamed from recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb)6
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p1.0-aarch64.bb6
-rw-r--r--recipes-graphics/mesa/mesa_%.bbappend31
-rw-r--r--recipes-graphics/vulkan/vulkan-loader_%.bbappend3
-rw-r--r--recipes-graphics/wayland/wayland-protocols_1.20.imx.bb (renamed from recipes-graphics/wayland/wayland-protocols_1.18.imx.bb)4
-rw-r--r--recipes-graphics/wayland/weston-init.bbappend15
-rw-r--r--recipes-graphics/wayland/weston-init/imx/weston.ini (renamed from recipes-graphics/wayland/weston-init/weston.ini)9
-rw-r--r--recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch27
-rw-r--r--recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch23
-rw-r--r--recipes-graphics/wayland/weston_9.0.0.imx.bb (renamed from recipes-graphics/wayland/weston_8.0.0.imx.bb)42
-rw-r--r--recipes-graphics/xorg-driver/xf86-video-armada_git.bb2
-rw-r--r--recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb2
-rw-r--r--recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc21
-rw-r--r--recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb5
-rw-r--r--recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb10
-rw-r--r--recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb8
-rw-r--r--recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch66
-rw-r--r--recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch24
-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.2.4.p1.2+fslc.bb)2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.3.p1.0.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-isp-vvcam_4.2.2.6.0.bb19
-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/linux/linux-fslc-imx/imx/defconfig42
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/mx8/defconfig110
-rw-r--r--recipes-kernel/linux/linux-fslc-imx_5.4.bb52
-rw-r--r--recipes-kernel/linux/linux-fslc-lts-4.19.bb2
-rw-r--r--recipes-kernel/linux/linux-fslc-mfgtool_5.10.bb15
-rw-r--r--recipes-kernel/linux/linux-fslc-qoriq_5.4.bb4
-rw-r--r--recipes-kernel/linux/linux-fslc.inc2
-rw-r--r--recipes-kernel/linux/linux-fslc/armv8a/defconfig1097
-rw-r--r--recipes-kernel/linux/linux-fslc/defconfig50
-rw-r--r--recipes-kernel/linux/linux-fslc/mx25/defconfig12
-rw-r--r--recipes-kernel/linux/linux-fslc/mxs/defconfig8
-rw-r--r--recipes-kernel/linux/linux-fslc_5.10.bb (renamed from recipes-kernel/linux/linux-fslc_5.4.bb)8
-rw-r--r--recipes-kernel/linux/linux-imx-headers_5.4.bb (renamed from recipes-kernel/linux/linux-imx-headers_5.4.3.bb)7
-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/defconfig42
-rw-r--r--recipes-kernel/linux/linux-imx/mx8/defconfig108
-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-qoriq/0001-libtraceevent-Fix-build-with-binutils-2.35.patch38
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch63
-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.bb9
-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/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.3.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb)18
-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.2.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb)8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb)4
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb (renamed from recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb)4
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb (renamed from recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb)11
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.5.7.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.7.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.7.bb29
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.1.0.bb (renamed from recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb)3
-rw-r--r--recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch22
-rw-r--r--recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch54
-rw-r--r--recipes-security/optee-imx/optee-client_3.10.0.imx.bb (renamed from recipes-security/optee-imx/optee-client_3.2.0.imx.bb)30
-rw-r--r--recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch158
-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.10.0.imx.bb94
-rw-r--r--recipes-security/optee-imx/optee-os_3.2.0.imx.bb96
-rw-r--r--recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch48
-rw-r--r--recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch41
-rw-r--r--recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch62
-rw-r--r--recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch57
-rw-r--r--recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch88
-rw-r--r--recipes-security/optee-imx/optee-test_3.10.0.imx.bb63
-rw-r--r--recipes-security/optee-imx/optee-test_3.2.0.imx.bb58
-rw-r--r--recipes-security/optee/optee-client-qoriq.bb29
-rw-r--r--recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch35
-rw-r--r--recipes-security/optee/optee-client-qoriq/0001-flags-CFLAGS-add-Wno-cpp.patch28
-rw-r--r--recipes-security/optee/optee-client-qoriq_3.8.0.bb28
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch148
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch41
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch80
-rw-r--r--recipes-security/optee/optee-os-qoriq_3.8.0.bb (renamed from recipes-security/optee/optee-os-qoriq_git.bb)14
-rw-r--r--recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch28
-rw-r--r--recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch48
-rw-r--r--recipes-security/optee/optee-test-qoriq_3.8.0.bb (renamed from recipes-security/optee/optee-test-qoriq_git.bb)13
-rw-r--r--recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch36
-rw-r--r--recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch179
-rw-r--r--recipes-support/opencv/opencv/0001-Dont-use-isystem.patch28
-rw-r--r--recipes-support/opencv/opencv/0001-Make-ts-module-external.patch42
-rw-r--r--recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch31
-rw-r--r--recipes-support/opencv/opencv/0001-Use-Os-to-compile-tinyxml2.cpp.patch31
-rw-r--r--recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch70
-rw-r--r--recipes-support/opencv/opencv/OpenCV_DNN_examples.patch148
-rw-r--r--recipes-support/opencv/opencv/download.patch41
-rw-r--r--recipes-support/opencv/opencv_4.4.0.imx.bb295
329 files changed, 10482 insertions, 17555 deletions
diff --git a/EULA b/EULA
index 402c87ca..b3e99041 100644
--- a/EULA
+++ b/EULA
@@ -1,4 +1,4 @@
-LA_OPT_NXP_Software_License v10 December 2019
+LA_OPT_NXP_Software_License v15 August 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
@@ -72,13 +72,13 @@ and to which different license terms may apply.
2. LICENSE GRANT.
-2.1. If you are not expressly granted the production use license in
+2.1. If you are not expressly granted the distribution license in
Section 2.3 in the Software Content Register, then you are only granted the
rights in Section 2.2 and not in 2.3. If you are expressly granted the
-production use license in Section 2.3 in the Software Content Register, then
-you are granted the rights in both Section 2.2 and 2.3.
+distribution license in Section 2.3 in the Software Content Register, then you
+are granted the rights in both Section 2.2 and 2.3.
-2.2. Internal Use License. Subject to the terms and conditions of this
+2.2. Standard License. Subject to the terms and conditions of this
Agreement, NXP grants you a worldwide, personal, non-transferable,
non-exclusive, non-sublicensable license, solely for the development of an
Authorized System:
@@ -92,11 +92,11 @@ readable), to prepare Derivative Works of the Licensed Software.
You may not distribute or sublicense the Licensed Software to others under the
license granted in this Section 2.2.
-2.3. Production Use License. If expressly authorized in the Software
-Content Register, subject to the terms and conditions of this Agreement, NXP
-grants you a worldwide, personal, non-transferable, non-exclusive,
-non-sublicensable license solely in connection with your manufacturing and
-distribution of an Authorized System:
+2.3. Additional Distribution License. If expressly authorized in the
+Software Content Register, subject to the terms and conditions of this
+Agreement, NXP grants you a worldwide, personal, non-transferable,
+non-exclusive, non-sublicensable license solely in connection with your
+manufacturing and distribution of an Authorized System:
(a) to manufacture (or have manufactured), distribute, and market
the Licensed Software (and its Derivative Works prepared under the license in
@@ -168,11 +168,11 @@ combined and/or distributed with the software be (i) disclosed or distributed
in source code form; (ii) licensed for the purpose of making Derivative Works;
or (iii) redistributable at no charge.
-3.8. You may not publish or distribute information, results or data
-associated with the use of the Licensed Software to anyone other than NXP;
-however, you must advise NXP of any results obtained including any problems or
-suggested improvements thereof. NXP retains the right to use such results and
-related information in any manner it deems appropriate
+3.8. You may not publish or distribute reports associated with the use
+of the Licensed Software to anyone other than NXP. You may advise NXP of any
+results obtained from your use of the Licensed Software, including any problems
+or suggested improvements thereof, and NXP retains the right to use such
+results and related information in any manner it deems appropriate.
4. OPEN SOURCE. Open source software included in the Licensed
Software is not licensed under the terms of this Agreement but is instead
@@ -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,23 +266,25 @@ 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
-international embargoes. Each party further agrees that it will not knowingly
-transfer, divert, export or re-export, directly or indirectly, any product,
-software, including software source code, or technology restricted by such
-regulations or by other applicable national regulations, received from the
-other party under this Agreement, or any direct product of such software or
-technical data to any person, firm, entity, country or destination to which
-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
-
-14.1. If you sell Authorized Systems directly to any government or public
+US Export Administration Regulation (including restrictions on certain military
+end uses and military end users as specified in Section 15 C.F.R. § 744.21 and
+prohibited party lists issued by other federal governments), Catch-all
+regulations and all national and international embargoes. Each party further
+agrees that it will not knowingly transfer, divert, export or re-export,
+directly or indirectly, any product, software, including software source code,
+or technology restricted by such regulations or by other applicable national
+regulations, received from the other party under this Agreement, or any direct
+product of such software or technical data to any person, firm, entity, country
+or destination to which 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.
+
+13. GOVERNMENT CONTRACT COMPLIANCE
+
+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 +292,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 +303,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 +329,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 +346,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 +364,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 +378,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
@@ -562,29 +562,6 @@ commercial use and distribution of products containing the GStreamer Optimized
Real Format Client Code implementation or OpenMax Optimized Real Format Client
Code
-Real Time Engineers Ltd.: Any FreeRTOS source code, whether modified or in its
-original release form, or whether in whole or in part, can only be distributed
-by you under the terms of version 2 of the GNU General Public License plus this
-exception. An independent module is a module which is not derived from or
-based on FreeRTOS.
-
-Clause 1: Linking FreeRTOS with other modules is making a combined work based
-on FreeRTOS. Thus, the terms and conditions of the GNU General Public License
-V2 cover the whole combination.
-
-As a special exception, the copyright holders of FreeRTOS give you permission
-to link FreeRTOS with independent modules to produce a statically linked
-executable, regardless of the license terms of these independent modules, and
-to copy and distribute the resulting executable under terms of your choice,
-provided that you also meet, for each linked independent module, the terms and
-conditions of the license of that module. An independent module is a module
-which is not derived from or based on FreeRTOS.
-
-Clause 2: FreeRTOS may not be used for any competitive or comparative purpose,
-including the publication of any form of run time or compile time metric,
-without the express permission of Real Time Engineers Ltd. (this is the norm
-within the industry and is intended to ensure information accuracy).
-
RivieraWaves SAS (a member of the CEVA, Inc. family of companies): You may not
use the RivieraWaves intellectual property licensed under this Agreement if you
develop, market, and/or license products similar to such RivieraWaves
diff --git a/SCR/SCR-4.1.15-2.0.0.txt b/SCR/SCR-4.1.15-2.0.0.txt
deleted file mode 100644
index ec0274c6..00000000
--- a/SCR/SCR-4.1.15-2.0.0.txt
+++ /dev/null
@@ -1,404 +0,0 @@
-NXP Software Content Register
-
-Release - Linux 4.1.15
-
-Date Created: 2016-Sep-14
-
---------------------------------------------
-BSP PACKAGES
---------------------------------------------
-
-Package: linux-2.6-imx
-
-Outgoing License: GPL-2.0+
-
-License Files: COPYING: GPL-2.0
-
-Package Category: BSP
-
-Type of content: Source code
-
-Description and comments: The Linux kernel with i.MX-specific drivers
-
-Release Location: git.freescale.com branch imx_4.1.15_2.0.0_ga
-
-Origin: Freescale Semiconductor, Inc. (GPL-2.0+)
- kernel.org (GPL-2.0+) - https://www.kernel.org/
-
---------------------------------------------
-
-Package: uboot-imx
-
-Outgoing License: GPL-2.0+
-
-License Files: COPYING: GPL-2.0
-
-Package Category: Bootloader
-
-Type of content: Source code
-
-Description and comments: Bootloader with i.MX-specific capabilities
-
-Release Location: git.freescale.com branch imx_v2016.03_4.1.15_2.0.0_ga
-
-Origin: Freescale Semiconductor, Inc. (GPL-2.0+)
- Das U-Boot - Universal Bootloader (LGPL-2.0+) - http://www.denx.de/wiki/U-Boot/WebHome
- Android Open Source Project (BSD-2-Clause) - https://source.android.com/
- zlib (zlib license) - http://www.zlib.net/
-
---------------------------------------------
-
-Package: firmware-imx-5.4.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v12 March 2016
-
-License Files: COPYING
-
-Package Category: BSP
-
-Type of content: Binaries
-
-Description and comments: BSP firmware - EPDC, SDMA, VPU
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- Chips & Media, Inc. (proprietary)
-
---------------------------------------------
-
-Package: imx-lib-5.5.tar.gz
-
-Outgoing License: LGPL-2.1+
-
-License Files: COPYING-LGPL-2.1
-
-Package Category: BSP
-
-Type of content: Source code
-
-Description and comments: BSP libraries
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (LGPL-2.1+)
-
---------------------------------------------
-
-Package: imx-test-5.7.tar.gz
-
-Outgoing License: Each test has its own license
-
-License Files: See source code.
-
-Package Category: BSP
-
-Type of content: Source code
-
-Description and comments: Linux unit test applications
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- Linux Test Project (GPL-2.0+) - https://github.com/linux-test-project/ltp
- Chips and Media Resource (GPL2+) - none
- RTC Test in Linux Kernel (GPL-2.0+) - http://kernel.org
- BlueZ (GPL-2.0+) - http://www.bluez.org/
- Embedded Alley v4l2 test (GPL-2.0+)
- Android Open Source Project (BSD-2-Clause) - https://source.android.com/
- Hantro Memalloc in Linux (GPL-2.0+)
- Linux driver for Atheros AR5210 802.11a (GPL-2.0+) - http://sourceforge.net/projects/ar5k/
- Hannu Savolainen's soundcard.h (BSD-2-clause)
-
---------------------------------------------
-
-Package: imx-vpu-5.4.35.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v12 March 2016
-
-License Files: COPYING
-
-Package Category: BSP
-
-Type of content: Source code
-
-Description and comments: VPU library
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- Chips & Media, Inc. (proprietary)
-
---------------------------------------------
-GRAPHICS PACKAGES
---------------------------------------------
-
-Package: imx-gpu-viv-5.0.11.p8.6.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Graphics
-
-Type of content: Binaries, scripts and header files
-
-Description and comments: GPU Core IP in binary and test application source
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- Vivante Corp. (proprietary)
- apitrace (MIT) - https://github.com/apitrace/apitrace
- opengleskul (MIT) - https://code.google.com/archive/p/opengleskul/
- Khronos Group (MIT) - http://www.khronos.org/
- Mesa3D - Mesa Lib [GL3ext header] (SGI-B-2.0) - http://mesa3d.sourceforge.net/
- libdri (MIT) - http://dri.freedesktop.org/wiki/
- The Android Open Source Project (Apache 2.0) - https://source.android.com/
- LLVM Compiler (BSD-3-clause) - https://github.com/prof123/llvm/
-
---------------------------------------------
-
-Package: kernel-module-imx-gpu-viv-5.0.11.p8.6.tar.gz
-
-Outgoing License: GPL-2.0+
-
-License Files: See source code.
-
-Package Category: Graphics
-
-Type of content: Source code
-
-Description and comments: GPU kernel source provided for kernel loadable modules
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (GPL-2.0+)
- Vivante Corp. (proprietary)
-
---------------------------------------------
-
-Package: xserver-xorg-video-imx-viv-5.0.11.p8.6.tar.gz
-
-Outgoing License: MIT
-
-License Files: COPYING-MIT
-
-Package Category: Graphics
-
-Type of content: Source code
-
-Description and comments: Xserver Library extensions
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (MIT)
- Vivante Corp. (MIT)
- xorg-server (MIT) - http://xorg.freedesktop.org/
- XFree86 Project (XFree86-1.0) - http://sourceforge.net/projects/xfree86/
- xf86-video-freedreno (MIT) - http://github.com/freedreno/xf86-video-freedreno/
-
---------------------------------------------
-
-Package: imx-gpu-sdk-2.3.2.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Graphics
-
-Type of content: Source code
-
-Description and comments: Graphics sample applications
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- DevIL (LGPL-2.1+) - https://sourceforge.net/projects/openil/ [separate binary]
- Templatized C++ Command Line Parser [tclap] (MIT) - http://sourceforge.net/projects/tclap/
- The Android Open Source Project (Apache-2.0) - https://source.android.com/
- Mesa 3D - Graphics Library (MIT) - http://mesa3d.sourceforge.net/
- "OpenGL(R) ES 3.0 Programming Guide" book samples (MIT) - http://github.com/zemanel/opengles-book-samples/
- The Khronos Group Inc. (MIT) - http://www.khronos.org/
- Wayland (Seetex License) - http://cgit.freedesktop.org/~krh/wayland/
- GetTimeOfDay (MIT) - unknown
- XFree86 (XFree86-1.0) - http://www.xfree86.org/
- Chromium (BSD) - https://github.com/bloomberg/chromium.bb/
-
---------------------------------------------
-
-Package: VivanteVTK-v5.0.11.p8.1.6.7.tgz
-
-Outgoing License: Vivante Licenses in each msi install
-
-License Files: included in msi install
-
-Package Category: Graphics
-
-Type of content: Setup MSI installations
-
-Description and comments: Vivante Tools
-
-Release Location: mx8_downloads
-
-Origin: VeriSilicon
-
---------------------------------------------
-MULTIMEDIA PACKAGES
---------------------------------------------
-
-Package: imx-gst1.0-plugin-4.1.4.tar.gz
-
-Outgoing License: LGPL-2.1+
-
-License Files: COPYING (GPL-2.0)
- COPYING-LGPL-2
- COPYING-LGPL-2.1
-
-Package Category: Multimedia
-
-Type of content: Source code
-
-Description and comments: i.MX Gstreamer 1.0 plugins
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (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/
- Gstreamer plugins-Bad (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-bad/
-
---------------------------------------------
-
-Package: imx-codec-4.1.4.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Multimedia
-
-Type of content: Binaries and header files
-
-Description and comments: i.MX multimedia codec libraries
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- ISO/IEC 13818-7 and ISO/IEC 14496-3 standards
- 3GPP 26.173 standard
- FLAC (BSD-3-clause) - https://sourceforge.net/projects/flac/
- libjpeg (IJG) - http://www.ijg.org/
- OggVorbis Tremor (BSD-3-Clause) - http://xiph.org/vorbis/
-
---------------------------------------------
-
-Package: imx-parser-4.1.4.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Multimedia
-
-Type of content: Binaries and header files
-
-Description and comments: i.MX multimedia parser libraries
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
-
---------------------------------------------
-
-Package: imx-vpuwrap-1.0.68.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Multimedia
-
-Type of content: Source code
-
-Description and comments: i.MX VPU wrapper library
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
- sqlite (Public Domain) - http://www.hwaci.com/sw/sqlite/index.html
-
---------------------------------------------
-
-Package: imx-qtapplications-1.0.9.bin
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-License Files: COPYING
-
-Package Category: Multimedia
-
-Type of content: Binaries
-
-Description and comments: i.MX QT multimedia player application
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (proprietary)
-
---------------------------------------------
-
-Package: simg2img-1.0.0.tar.gz
-
-Outgoing License: Apache-2.0
-
-License Files: COPYING
-
-Package Category: Multimedia
-
-Type of content: Source
-
-Description and comments: Tool to convert Android sparse images to raw images
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (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
---------------------------------------------
-
-Package: imx-alsa-plugins-1.0.26
-
-Outgoing License: GPL-2.0+
-
-License Files: COPYING-GPL: GPL-2.0
-
-Package Category: Multimedia
-
-Type of content: Source
-
-Description and comments: Audio
-
-Release Location: i.MX Yocto Project mirror
-
-Origin: Freescale Semiconductor, Inc. (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/
-
---------------------------------------------
-M4 PACKAGES
---------------------------------------------
-Package: imx7d_sabresd_m4_freertos_1.0.1
-
-Outgoing License: LA_OPT_BASE_LICENSE v14 June 2016
-
-Description and comments: See the SW-Content-Register-FreeRTOS-BSP-1.0.1 for details
- on the contents and origins.
-
-Release Location: i.MX Yocto Project mirror
-
-Origin overview: Freescale Semiconductor, Inc. (BSD-3-clause)
- ARM (BSD-3-clause) - http://silver.arm.com
- Real Time Engineers, Ltd. (GPL-2.0-WITHfreertos-exception-2.0) - http://www.freertos.org
- Mentor Graphics, Ltd. (BSD-3-Clause) - https://github.com/OpenAMP/open-amp
diff --git a/SCR/SCR-5.4.24_2.1.0.txt b/SCR/SCR-5.4.24_2.1.0.txt
new file mode 100644
index 00000000..e01b9cb3
--- /dev/null
+++ b/SCR/SCR-5.4.24_2.1.0.txt
@@ -0,0 +1,1311 @@
+NXP Software Content Register
+
+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.24_2.1.0.xml
+
+Release tag: rel_imx_5.4.24_2.1.0
+
+--------------------------------------------
+BSP Packages
+--------------------------------------------
+
+Package: linux-imx.git
+Outgoing License: GPL-2.0
+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.24_2.1.0
+Origin: NXP (GPL-2.0)
+ kernel.org (GPL-2.0) - https://www.kernel.org/
+
+--------------------------------------------
+
+Package: uboot-imx.git
+Outgoing License: GPL-2.0
+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.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/
+ zlib (zlib license) - http://www.zlib.net/
+
+--------------------------------------------
+
+Package: imx-atf.git
+Outgoing License: BSD-3-Clause
+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.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.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
+Type of Content: binary
+Description and comments: System Controller Firmware
+Release Location: Mirror
+Origin: NXP (proprietary)
+ ARM CMSIS Library (BSD-3-clause) - https://silver.arm.com/
+
+--------------------------------------------
+
+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 - 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)
+
+ vpu_fw_imx8_dec.bin
+ vpu_fw_imx8_enc.bin
+ origin: Amphion Semiconductor Ltd (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.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
+
+--------------------------------------------
+
+Package: imx-lib.git
+Outgoing License: LGPL-2.1
+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
+Origin: NXP (LGPL-2.1)
+
+--------------------------------------------
+
+Package: imx-test.git
+Outgoing License: Each test has its own license. It is one of GPL-2.0 LGPL-2.1 or Apache-2.0
+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.24_2.1.0
+Origin: NXP (GPL-2.0)
+ module_test: NXP (GPL-2.0+)
+ Hantro Products Oy. (GPL-2.0+)
+ test/caam: NXP [instructions]
+ test/can: NXP [instructions]
+ test/etm: The Android Open Source Project (Apache-2.0) - unpublished
+ test/gpu: NXP [instructions]
+ test/memtool: NXP (GPL-2.0+)
+ test/misc: NXP [instructions]
+ test/mmdc: NXP (GPL-2.0+)
+ test/mxc_als_test: NXP (GPL-2.0+)
+ test/mxc_alsa_dsd_player: NXP (GPL-2.0+)
+ alsa-dsd-player by Daniel Mack (GPL-2.0+) - https://github.com/zonque/alsa-dsd-player
+ The Music Player Daemon Project (GPL-2.0+) - http://www.musicpd.org
+ test/mxc_alsa_hw_params: NXP (GPL-2.0+)
+ test/mxc_amix_test: NXP (GPL-2.0+)
+ test/mxc_asrc_test: NXP (GPL-2.0+)
+ test/mxc_cec_test: NXP (GPL-2.0+)
+ test/mxc_clock_test: NXP [scripts and instructions]
+ test/mxc_dcic_test: NXP (GPL-2.0+)
+ test/mxc_dcp_test: NXP [instructions]
+ test/mxc_dryice_test: NXP [scripts and instructions]
+ test/mxc_dsp_test: NXP [MP3 file]
+ test/mxc_esai_test: NXP [instructions]
+ test/mxc_fb_test: NXP (GPL-2.0+)
+ test/mxc_firi_test: NXP [scripts and instructions]
+ test/mxc_hdd_test: NXP [scripts and instructions]
+ test/mxc_i2c_slave_test: NXP (GPL-2.0+)
+ test/mxc_iim_test: NXP (GPL-2.0+)
+ test/mxc_ipudev_test: NXP (LGPL-2.1+)
+ test/mxc_jpeg_test: NXP (GPL-2.0+)
+ test/mxc_keyb_test: NXP [scripts and instructions]
+ test/mxc_mcc_tty_test: NXP (GPL-2.0+)
+ test/mxc_mlb_test: NXP (GPL-2.0+)
+ test/mxc_mmc_test: NXP [scripts and instructions]
+ test/mxc_oprofile_test: NXP [scripts and instructions]
+ test/mxc_owire_test: NXP [scripts and instructions]
+ test/mxc_pdm_test: NXP (GPL-2.0+)
+ test/mxc_rtc: NXP (GPL-2.0+)
+ Paul Gortmaker (GPL-2.0+) - https://github.com/torvalds/linux/blob/master/tools/testing/selftests/timers/rtctest.c
+ test/mxc_sdma_test: NXP (GPL-2.0+)
+ test/mxc_secureboot: NXP [scripts and instructions]
+ test/mxc_sensor_test: Vojtech Pavlik (GPL-2.0+)
+ test/mxc_sim_test: NXP (GPL-2.0+)
+ test/mxc_spdif_test: NXP [instructions]
+ test/mxc_spi_test: NXP (GPL-2.0+)
+ test/mxc_ssi_test: NXP [instructions]
+ test/mxc_tuner_test: NXP (GPL-2.0+)
+ test/mxc_uart_test: NXP (GPL-2.0+)
+ test/mxc_usb_test: NXP [scripts and instructions]
+ test/mxc_v4l2_test: NXP (GPL-2.0+)
+ test/mxc_v4l2_vpu_test: NXP (GPL-2.0+)
+ test/mxc_vpu_test: NXP (GPL-2.0+)
+ Chips & Media (GPL-2.0+)
+ test/pm: NXP [Instructions]
+ test/pxp_lib_test: NXP (GPL-2.0+)
+ test/pxp_v4l2_test: NXP (GPL-2.0+)
+ Embedded Alley Solutions (GPL-2.0+)
+ test/rpmsg: NXP (GPL-2.0+)
+ test/wdog: NXP (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: QCA9377 WLAN linux driver
+Release Location: https://source.codeaurora.org/external/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: 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: NXP Wi-Fi linux SDK
+Release Location: https://source.codeaurora.org/external/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
+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
+
+--------------------------------------------
+
+Package: imx-kobs.git
+Outgoing License: GPL-2.0
+License File: COPYING
+Package Category: BSP
+Type of Content: source
+Description and comments: NAND boot writer
+Release Location: https://github.com/NXPmicro/imx-kobs -b master
+Origin: NXP (GPL-2.0)
+ AES (BSD-3-Clause) - http://brgladman.org/oldsite/AES/
+ Secure Hash Algorithm Implementation (Public Domain) - http://www.nic.funet.fi/pub/crypt/hash/sha/
+ IGEP Linux Kernel (GPL-2.0+) - http://www.igep.es/
+
+--------------------------------------------
+
+Package: imx-uuc.git
+Outgoing License: GPL-2.0
+License File: COPYING
+Package Category: BSP
+Type of Content: source
+Description and comments: A daemon for mfgtools.
+Release Location: https://github.com/NXPmicro/imx-uuc -b master
+Origin: NXP (GPL-2.0)
+
+--------------------------------------------
+
+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.24_2.1.0
+Origin: NXP (BSD-2-Clause)
+ optee_client (BSD-2-Clause) - https://github.com/OP-TEE/optee_client
+
+--------------------------------------------
+
+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.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://source.codeaurora.org/external/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: 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.24_2.1.0
+Origin: NXP (GPL-2.0)
+ Siemens AG (GPL-2.0) - https://github.com/siemens/jailhouse
+
+--------------------------------------------
+
+Package: imx-xen.git
+Outgoing License: GPL-2.0
+License File: COPYING
+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.24_2.1.0
+Origin: NXP (GPL-2.0)
+
+--------------------------------------------
+
+Package: ml-security-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: BSP
+Type of Content: binary
+Description and comments: Machine Learning Security
+Release Location: Mirror
+Origin: NXP (NXP Proprietary)
+
+--------------------------------------------
+
+Package: imx-smw.git
+Outgoing License: BSD-3-Clause
+License File: COPYING
+Package Category: BSP
+Type of Content: source
+Description and comments: NXP i.MX Security Middleware Library
+Release Location: https://source.codeaurora.org/external/imx/imx-smw -b rel_imx_5.4.24_2.1.0
+Origin: NXP (BSD-3-Clause)
+
+--------------------------------------------
+Graphics Packages
+--------------------------------------------
+
+Package: isp-vvcam.git
+Outgoing License: GPL-2.0
+License File: vvcam/LICENSE
+Package Category: Graphics
+Type of Content: ISP Kernel Module source
+Description and comments: Kernel Loadable Module for ISP
+Release Location: https://source.codeaurora.org/external/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)
+
+--------------------------------------------
+
+Package: apitrace-imx.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+ apitrace (MIT) - https://github.com/apitrace/apitrace
+
+--------------------------------------------
+
+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
+Type of Content: binary and source
+Description and comments: GPU Core IP in binary and test application source
+Release Location: Mirror
+Origin: NXP (proprietary)
+ Verisilicon (formerly Vivante Corp.) (proprietary)
+ opengleskul (MIT) - https://code.google.com/archive/p/opengleskul/
+ The Khronos Group Inc. (MIT) - http://www.khronos.org/opencl/
+ Mesa3D - Mesa Lib [GL3ext header] (SGI-B-2.0) - http://mesa3d.sourceforge.net/
+ libdri (MIT) - http://dri.freedesktop.org/wiki/
+ The Android Open Source Project (Apache-2.0) - https://source.android.com/
+ LLVM Compiler (BSD-3-clause) - https://github.com/prof123/llvm/
+
+--------------------------------------------
+
+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
+Type of Content: binary and source
+Description and comments: GPU Core IP in binary and test application source
+Release Location: Mirror
+Origin: NXP (proprietary)
+ Verisilicon (formerly Vivante Corp.) (proprietary)
+ opengleskul (MIT) - https://code.google.com/archive/p/opengleskul/
+ The Khronos Group Inc. (MIT) - http://www.khronos.org/opencl/
+ Mesa3D - Mesa Lib [GL3ext header] (SGI-B-2.0) - http://mesa3d.sourceforge.net/
+ libdri (MIT) - http://dri.freedesktop.org/wiki/
+ The Android Open Source Project (Apache-2.0) - https://source.android.com/
+ LLVM Compiler (BSD-3-clause) - https://github.com/prof123/llvm/
+
+--------------------------------------------
+
+Package: xf86-video-imx-vivante.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+ Vivante Corp. (MIT)
+ xorg-server (MIT) - http://xorg.freedesktop.org/
+ XFree86 Project (XFree86-1.0) - http://sourceforge.net/projects/xfree86/
+
+ autohdmi utility (GPL-2.0) (source code for separate binary tool)
+ NXP (GPL-2.0)
+ X Consortium (MIT) - https://www.x.org/wiki/XConsortium/
+
+--------------------------------------------
+
+Package: gtec-demo-framework.git
+Outgoing License: BSD-3-Clause
+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.3
+Origin: NXP (BSD-3-clause)
+ Demo Framework
+ The Android Open Source Project (Apache-2.0) - https://source.android.com/
+ Mono Xna (MIT) - https://code.google.com/archive/p/monoxna/
+ Wayland (Seetex License) - http://cgit.freedesktop.org/~krh/wayland/
+ Demo Apps
+ "OpenGL(R) ES 3.0 Programming Guide" book samples (MIT) - http://github.com/zemanel/opengles-book-samples/
+ Norbert Nopper VKTS Examples (MIT) - https://github.com/McNopper/Vulkan
+ Sascha Willems Vulkan Demo (MIT) - www.saschawillems.de
+ Imagery Sources in Demo Apps:
+ Emil Persson (CC-BY-3.0) - http://www.humus.name
+ CDmir (CC0-1.0) - http://opengameart.org/content/old-deer-male
+ Questquest Game icons - Justin Nichol (CC-BY-SA-4.0) - http://freeforall.cc/works/questquest-game-icons/
+ piacenti (CC-BY-3.0) - http://opengameart.org/content/knight-2
+ Third Party Apps Included:
+ DevIL (LGPL-2.1+) - https://sourceforge.net/projects/openil/
+ G-Truc Creation [GLI] (MIT) - https://www.g-truc.net/
+ Khronos Group OpenVG (MIT) - https://www.khronos.org/openvg/
+ libpng (libpng) - https://sourceforge.net/projects/libpng/
+ libjpeg (IJG) - http://www.ijg.org/
+ Open Asset Import Library [assimp] (BSD-3-Clause) - https://sourceforge.net/projects/assimp/
+ OpenGL Mathematics [GLM] (MIT) - https://sourceforge.net/projects/ogl-math/
+ RapidJSON (MIT) - https://github.com/miloyip/rapidjson/
+ SRA/SKC gettimeofday (MIT) - https://doxygen.postgresql.org/gettimeofday_8c_source.htm
+ Templatized C++ Command Line Parser [tclap] (MIT) - http://sourceforge.net/projects/tclap/
+ zlib (zlib) - http://www.zlib.net/
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: G2D implementation using DPU
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: libdrm-imx.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+
+--------------------------------------------
+
+Package: wayland-protocols-imx.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+ Weston (MIT) - https://anongit.freedesktop.org/git/wayland/wayland-protocols.git
+
+--------------------------------------------
+
+Package: weston-imx.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+ Weston (MIT) - http://github.com/wayland-project/weston/
+
+--------------------------------------------
+
+Package: imx-gputop.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: Graphics 2D
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: Graphics 2D
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+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
+Description and comments: Library to retrieve i.MX GPU performance data
+Release Location: Mirror
+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://source.codeaurora.org/external/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.24_2.1.0
+Origin: NXP (BSD-3-Cluse)
+ OpenCV Foundation (BSD-3-Clause) - https://github.com/opencv/opencv
+ Intel Corporation (BSD-3-Clause)
+ Willow Garage Inc. (BSD-3-Clause)
+ NVIDIA Corporation (BSD-3-Clause)
+ Advanced Micro Devices, Inc. (BSD-3-Clause)
+ Itseez Inc. (BSD-3-Clause)
+
+--------------------------------------------
+
+Package: arm-computelibrary-imx.git
+Outgoing License: MIT
+License File: 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.24_2.1.0
+Origin: NXP (MIT)
+ ARM Software (MIT) - https://github.com/ARM-software/ComputeLibrary
+
+--------------------------------------------
+Multimedia Packages
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: i.MX multimedia codec libraries: Codecs and wrappers for: AAC AACD BMP BSAC DeInterlace FLAC GIF JPEG MP3 MP3d NB_AMR OGG PEQ PNG SBC SRC WB_AMR WBAMRD G.711 G.723 G.726 G.729ab
+Release Location: Mirror
+Origin: NXP (proprietary)
+ ISO/IEC 13818-7 and ISO/IEC 14496-3 standards
+ 3GPP 26.173 standard
+ FLAC (BSD-3-clause) - https://sourceforge.net/projects/flac/
+ libjpeg (IJG) - http://www.ijg.org/
+ OggVorbis Tremor (BSD-3-Clause) - http://xiph.org/vorbis/
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: i.MX multimedia parser libraries: Parsers for: APE AVI FLV MKV MP3 MP4 MPG2 OGG
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: imx-gst1.0-plugin.git
+Outgoing License: LGPL-2.1
+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.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/
+ Gstreamer plugins-Bad (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-bad/
+
+--------------------------------------------
+
+Package: gstreamer.git
+Outgoing License: LGPL-2.0
+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.24_2.1.0
+Origin: NXP (LGPL-2.1)
+ GStreamer (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gstreamer/
+
+--------------------------------------------
+
+Package: gst-plugins-good.git
+Outgoing License: LGPL-2.1
+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.24_2.1.0
+Origin: NXP (LGPL-2.1)
+ Gstreamer plugins-Good (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-good/
+
+--------------------------------------------
+
+Package: gst-plugins-base.git
+Outgoing License: LGPL-2.0
+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.24_2.1.0
+Origin: NXP (LGPL-2.1)
+ Gstreamer plugins-Base (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-base/
+
+--------------------------------------------
+
+Package: gst-plugins-bad.git
+Outgoing License: LGPL-2.0
+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.24_2.1.0
+Origin: NXP (LGPL-2.1)
+ Gstreamer plugins-Bad (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-bad/
+
+--------------------------------------------
+
+Package: imx-dspc-asrc-1.0.1.bin
+Outgoing License: LA_OPT_NXP_Software_License v8 June 2019 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: Multimedia
+Type of Content: binary
+Description and comments: NXP Asynchronous Sample Rate Converter
+Release Location: Mirror
+Origin: NXP (proprietary)
+ DSP Concepts, Inc. (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.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.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
+Description and comments: VPU library
+Release Location: Mirror
+Origin: NXP (proprietary)
+ Chips & Media, Inc. (proprietary)
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: VPU library
+Release Location: Mirror
+Origin: VeriSilicon Inc. (proprietary)
+ The WebM project by Google Inc. (BSD-3-clause) https://bugs.chromium.org/p/webm/issues/list -- decoder_sw/software/source/vp9/; decoder_sw/software/test/common/vpxfilereader.c; decoder_sw/software/test/vp8/vp8filereader.c
+ MD5 - Command Line Mesage Digest Utility by Colin Plumb (Public Domain) http://www.fourmilab.ch/md5/ -- decoder_sw/software/test/common/swhw/md5.c&h
+ Khronos Group - OpenMAX (version?) (MIT) https://www.khronos.org/openmax/ -- openmax_il/headers/
+
+--------------------------------------------
+
+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
+Type of Content: binary
+Description and comments: VPU vc8000e encoder library
+Release Location: Mirror
+Origin: VeriSilicon Inc. (proprietary)
+ Alliance for Open Media (BSD-2-clause, AFOM Patent License) - http://www.aomedia.org/
+ The WebM project by Google Inc. (BSD-3-clause) https://bugs.chromium.org/p/webm/issues/list
+
+--------------------------------------------
+
+Package: imx-qtapplications-1.2.2-aarch32.bin
+Outgoing License: LA_OPT_BASE_LICENSE v26 June 2018
+License File: COPYING
+Package Category: Multimedia
+Type of Content: binary
+Description and comments: i.MX QT multimedia player application
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: imx-qtapplications-1.2.2-aarch64.bin
+Outgoing License: LA_OPT_BASE_LICENSE v26 June 2018
+License File: COPYING
+Package Category: Multimedia
+Type of Content: binary
+Description and comments: i.MX QT multimedia player application
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: imx-alsa-plugins.git
+Outgoing License: GPL-2.0
+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
+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/
+
+--------------------------------------------
+M4 Processor Packages
+--------------------------------------------
+
+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
+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: 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
+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: 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
+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: 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
+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: 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
+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
+
+--------------------------------------------
+M7 Processor Packages
+--------------------------------------------
+
+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
+Description and comments: i.MX MCUXpresso SDK demo image on Cortex-M7 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: 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
+Description and comments: i.MX MCUXpresso SDK demo image on Cortex-M7 core
+Release Location: Mirror
+Origin: NXP (proprietary)
+ ARM LIMITED (BSD-3-Clause)
+ Real Time Engineers, Ltd (MIT) - https://aws.amazon.com/freertos/
+ Mentor Graphics, Ltd. (BSD-3-Clause) - https://github.com/OpenAMP/open-amp/
+
+--------------------------------------------
+MachineLearning Packages
+--------------------------------------------
+
+Package: armnn.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+ armnn (MIT) - https://github.com/ARM-software/armnn
+
+--------------------------------------------
+
+Package: onnxruntime-imx.git
+Outgoing License: MIT
+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.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
+ gRPC (Apache-2.0) - https://github.com/grpc/grpc
+
+--------------------------------------------
+
+Package: pyarmnn-release.git
+Outgoing License: MIT
+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.24_2.1.0
+Origin: NXP (MIT)
+
+--------------------------------------------
+
+Package: tensorflow-imx.git
+Outgoing License: Apache-2.0
+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.24_2.1.0
+Origin: NXP (Apache-2.0)
+ TensorFlow (Apache-2.0) - https://github.com/tensorflow/tensorflow/
+
+--------------------------------------------
+Tools Packages
+--------------------------------------------
+
+Package: VeriSiliconTool-6.4.0.p2.2.tgz
+Outgoing License: VeriSilicon License
+License File:
+Package Category: Tools
+Type of Content: binary
+Description and comments: VeriSilicon Tools
+Release Location: nxp.com
+Origin: VeriSilicon (proprietary)
+
+--------------------------------------------
+
+Package: mfgtools.git
+Outgoing License: BSD-3-Clause
+License File: LICENSE
+Package Category: Tools
+Type of Content: source
+Description and comments: NXP I.MX Chip image deploy tools. Use uuu.
+Release Location: https://github.com/NXPmicro/mfgtools -b master
+Origin: NXP (BSD-3-clause)
+ zlib (zlib) - https://github.com/madler/zlib
+ libusb (LGPL-2.1) [libusb-1.0.dll] [dynamic link] - https://github.com/libusb/libusb
+ bzip2 (BSD-4-clause) - https://github.com/enthought/bzip2-1.0.6/tree/288acf97a15d558f96c24c89f578b724d6e06b0c
+ Android Open Source Project (Apache-2.0) [sparse_format.h] - https://developer.android.com/
+
+--------------------------------------------
+PATCHES IN META_FSL_BSP_RELEASE
+--------------------------------------------
+
+Patches for: systemd
+Source Location: https://github.com/systemd/systemd-bootchart.git
+Patch Location: meta-bsp/recipes-core/systemd/systemd
+Outgoing License: GPL-2.0
+License File: LICENSE.GPL2
+Package Category: BSP
+Description and comments: System and Service Manager
+Origin of patches: NXP (GPL-2.0)
+
+--------------------------------------------
+
+Patches for: bluez5
+Source Location: http://www.kernel.org/pub/linux/bluetooth/bluez-5.48.tar.xz
+Patch Location: meta-bsp/recipes-connectivity/bluez5
+Outgoing License: GPL-2.0+
+License File: COPYING
+Package Category: Connectivity
+Description and comments: Bluetooth protocol stack for Linux
+Origin of patches: NXP (GPL-2.0+)
+
+--------------------------------------------
+
+Patches for: connman
+Source Location: https://git.kernel.org/pub/scm/network/connman/connman.git/
+Patch Location: meta-bsp/recipes-connectivity/connman/connman
+Outgoing License: GPL-2.0
+License File: COPYING
+Package Category: Connectivity
+Description and comments: Connection Manager
+Origin of patches: NXP (GPL-2.0)
+ WindRiver (GPL-2.0) - https://www.windriver.com/
+
+--------------------------------------------
+
+Patches for: gstreamer1.0-libav
+Source Location: http://gstreamer.freedesktop.org/src/gst-libav
+Patch Location: meta-bsp/recipes-multimedia/gstreamer/
+Outgoing License: LGPL-2.0
+License File: COPYING
+Package Category: Multimedia
+Description and comments: A plugin with a set of elements using the Libav library codecs
+Origin of patches: Mathieu Duponchelle (LGPL-2.0)
+
+--------------------------------------------
+
+Patches for: alsa-libs
+Source Location: ftp://ftp.alsa-project.org/pub/libs
+Patch Location: meta-bsp/recipes-multimedia/alsa
+Outgoing License: LGPL-2.0
+License File: COPYING
+Package Category: Multimedia
+Description and comments: User space library to simplify application programming and provide higher level functionality
+Origin of patches: NXP (LGPL-2.0)
+
+--------------------------------------------
+
+Patches for: alsa-utils
+Source Location: ftp://ftp.alsa-project.org/pub/utils
+Patch Location: meta-bsp/recipes-multimedia/alsa
+Outgoing License: GPL-2.0
+License File: COPYING
+Package Category: Multimedia
+Description and comments: Utilities to control sound cards
+Origin of patches: alsa-utils contributors (GPL-2.0)
+
+--------------------------------------------
+
+Patches for: pulseaudio
+Source Location: http://freedesktop.org/software/pulseaudio/releases/
+Patch Location: meta-bsp/recipes-multimedia/pulaeaudio/pulaeaudio
+Outgoing License: LGPL-2.1
+License File: LICENSE
+Package Category: Multimedia
+Description and comments: Sound server
+Origin of patches: NXP (LGPL-2.1)
+
+--------------------------------------------
+
+Patches for: opencv
+Source Location: http://github.com/opencv/opencv.git
+Patch Location: meta-bsp/recipes-graphics/opencv/opencv
+Outgoing License: BSD-3-Clause
+License File: LICENSE
+Package Category: Graphics
+Description and comments: The Open Computer Vision Library
+Origin of patches: NXP (BSD-3-Clause)
+
+--------------------------------------------
+
+Patches for: mesa-demos
+Source Location: https://mesa.freedesktop.org/archive/demos/
+Patch Location: meta-bsp/recipes-graphics/mesa/mesa-demos
+Outgoing License: MIT
+License File:
+Package Category: Graphics
+Description and comments: 3-D Graphics
+Origin of patches: NXP (MIT)
+ Otavio Salvador (MIT)
+
+--------------------------------------------
+
+Patches for: xserver-xorg
+Source Location: https://www.x.org/releases/individual/xserver/
+Patch Location: meta-bsp/recipes-graphics/xorg-xserver/xserver-xorg
+Outgoing License: MIT.X
+License File: COPYING
+Package Category: Linux
+Description and comments: X11
+Origin of patches: NXP (MIT.X)
+
+--------------------------------------------
+
+Patches for: glslang
+Source Location: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler
+Patch Location: meta-sdk/recipes-graphics/vulkan/glslang
+Outgoing License: BSD-3-Clause
+License File: LICENSE
+Package Category: Graphics
+Description and comments: Official reference compiler front end for the OpenGL ES and OpenGL shading languages.
+Origin of patches: NXP (BSD-3-Clause)
+
+--------------------------------------------
+
+Patches for: matchbox-wm 1.2.1
+Source Location: git://git.yoctoproject.org/matchbox-window-manager
+Patch Location: meta-bsp/recipes-graphics/matchbox-wm/matchbox-wm
+Outgoing License: GPL-2.0
+License File: COPYING
+Package Category: Graphics
+Description and comments: Window manager
+Origin of patches: NXP (GPL-2.0)
+
+--------------------------------------------
+
+Patches for: vulkan
+Source Location: git://github.com/vulkan
+Patch Location: meta-sdk/recipes-graphics/vulkan/
+Outgoing License: MIT
+License File: LICENSE.md
+Package Category: Graphics
+Description and comments: cross-platform 3D graphics and compute AP
+Origin of patches: NXP (MIT)
+
+--------------------------------------------
+
+Patches for: vulkan/vulkan-tools
+Source Location: git://github.com/KhronosGroup/SPIRV-Tools
+Patch Location: meta-sdk/recipes-graphics/vulkan/
+Outgoing License: Apache-2.0
+License File: LICENSE.txt
+Package Category: Graphics
+Description and comments: provides an API and commands for processing SPIR-V modules.
+Origin of patches: NXP (Apache-2.0)
+
+--------------------------------------------
+
+Patches for: vulkan/vkmark
+Source Location: git://github.com/vkmark/vkmark
+Patch Location: meta-sdk/recipes-graphics/vulkan/
+Outgoing License: LGPL-2.1
+License File: COPYING-LGPL2.1
+Package Category: Graphics
+Description and comments: vkmark is an extensible Vulkan benchmarking suite with targeted, configurable scenes.
+Origin of patches: NXP (LGPL-2.1)
+
+--------------------------------------------
+
+Patches for: qtbase
+Source Location: https://github.com/qt/qtbase
+Patch Location: recipes-qt5/qt5/qtbase
+Outgoing License: LGPL-3.0+Qt Exception 1.1
+License File: LGPL_EXCEPTION.txt
+Package Category: Qt
+Description and comments: Qt Base
+Origin of patches: NXP (LGPL-2.1+Qt Exception 1.1)
+
+--------------------------------------------
+
+Patches for: qtwayland
+Source Location: https://github.com/qt/qtwayland
+Patch Location: meta-sdk/recipes-qt5/qt5/qtwayland
+Outgoing License: LGPL-3.0+Qt Exception 1.1
+License File: LGPL_EXCEPTION.txt
+Package Category: Qt
+Description and comments: A toolbox for making Qt based Wayland compositors.
+Origin of patches: NXP (LGPL-2.1+Qt Exception 1.1)
+
+--------------------------------------------
+
+Patches for: gstreamer1.0-plugins-good-qt
+Source Location: https://github.com/qt/gstreamer1.0-plugins-good-qt
+Patch Location: meta-sdk/recipes-qt5/qt5/gstreamer1.0-plugins-good-qt
+Outgoing License: LGPL-3.0+Qt Exception 1.1
+License File: LGPL_EXCEPTION.txt
+Package Category: Qt
+Description and comments:
+Origin of patches: NXP (LGPL-2.1+Qt Exception 1.1)
+
+--------------------------------------------
diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass
index 0671da91..ec793b88 100644
--- a/classes/fsl-eula-unpack.bbclass
+++ b/classes/fsl-eula-unpack.bbclass
@@ -27,6 +27,10 @@ FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V8 = "72c0f70181bb6e83eee6aab8
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V9 = "6c12031a11b81db21cdfe0be88cac4b3"
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10 = "fd4b227530cd88a82af6a5982cfb724d"
FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11 = "228c72f2a91452b8a03c4cab30f30ef9"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V13 = "1b4db4b25c3a1e422c0c0ed64feb65d2"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V15 = "983e4c77621568488dd902b27e0c2143"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V16 = "e9e880185bda059c90c541d40ceca922"
+FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V17 = "cf3f9b8d09bc3926b1004ea71f7a248a"
FSL_EULA_FILE_MD5SUMS = " \
${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V8} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V10} \
@@ -49,13 +53,18 @@ FSL_EULA_FILE_MD5SUMS = " \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V9} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10} \
${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V13} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V15} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V16} \
+ ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V17} \
"
# 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_V15}"
LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}"
+LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE"
LIC_FILES_CHKSUM_append = " ${LIC_FILES_CHKSUM_LAYER}"
LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
diff --git a/classes/fsl-kernel-localversion.bbclass b/classes/fsl-kernel-localversion.bbclass
index ff1075e5..c73b60a6 100644
--- a/classes/fsl-kernel-localversion.bbclass
+++ b/classes/fsl-kernel-localversion.bbclass
@@ -22,7 +22,8 @@ kernel_conf_variable() {
fi
}
-do_preconfigure() {
+do_kernel_localversion[dirs] += "${S} ${B}"
+do_kernel_localversion() {
mkdir -p ${B}
echo "" > ${B}/.config
CONF_SED_SCRIPT=""
@@ -40,4 +41,5 @@ do_preconfigure() {
printf "%s%s" +g $head > ${S}/.scmversion
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/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass
new file mode 100644
index 00000000..003f997a
--- /dev/null
+++ b/classes/imx-boot-container.bbclass
@@ -0,0 +1,107 @@
+#
+# This class provides a support to build the boot container for
+# i.MX8M derivatives
+#
+# imx8m machines require a separate build target to be executed
+# due to the fact that final boot image is constructed using flash.bin
+# taget. It produces a boot binary image, which is constructed from
+# various binary components (u-boot with separate dtb, atf, DDR
+# firmware and optional op-tee) into a single image using FIT format.
+# This flash.bin file is then parsed and loaded either via
+# SPL directly (imx8mm), or using bootrom code (imx8mn and imx8mp).
+#
+# In order to use flash.bin binary boot image, it is required that
+# the U-Boot build is to be invoked for an additional build target.
+# This class extendes the U-Boot build targets with the "flash.bin",
+# which effectively serves as a boot container. It replaces the boot
+# container `imx-boot` provided by NXP.
+#
+# Class inheritance is performed in u-boot-fslc recipe, and is controlled
+# by variable UBOOT_PROVIDES_BOOT_CONTAINER, which is defined in the
+# base machine include file (imx-base.inc), and is set to "1" when the
+# 'imx-boot-container' is present in MACHINEOVERRIDES.
+
+# Extend the UBOOT_MAKE_TARGET with additional target for U-Boot build
+# system to produce the boot container
+UBOOT_MAKE_TARGET += "flash.bin"
+
+# Define ATF binary file to be deployed to the U-Boot build folder
+ATF_MACHINE_NAME = "bl31-${ATF_PLATFORM}.bin"
+ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}"
+
+# This package aggregates output deployed by other packages, so set the
+# appropriate dependencies for populate binaries task
+do_resolve_and_populate_binaries[depends] += " \
+ ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \
+ imx-atf:do_deploy \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \
+"
+
+# Append make flags to include ATF load address
+EXTRA_OEMAKE += "ATF_LOAD_ADDR=${ATF_LOAD_ADDR}"
+
+# Define an additional task that collects binary output from dependent packages
+# and deploys them into the U-Boot build folder
+do_resolve_and_populate_binaries() {
+ if [ ! -n "${ATF_LOAD_ADDR}" ]; then
+ bberror "ATF_LOAD_ADDR is undefined, result binary would be unusable!"
+ fi
+
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]; then
+ for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
+ # Sanitize the FW name as U-Boot expects it to be without version
+ if [ -n "${DDR_FIRMWARE_VERSION}" ]; then
+ ddr_firmware_name=$(echo $ddr_firmware | sed s/_${DDR_FIRMWARE_VERSION}//)
+ else
+ ddr_firmware_name="$ddr_firmware"
+ fi
+ bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${B}/${config}/${ddr_firmware_name}"
+ cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/${ddr_firmware_name}
+ done
+ if [ -n "${ATF_MACHINE_NAME}" ]; then
+ cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${B}/${config}/bl31.bin
+ else
+ bberror "ATF binary is undefined, result binary would be unusable!"
+ fi
+ fi
+ done
+ unset j
+ done
+ unset i
+ fi
+}
+addtask do_resolve_and_populate_binaries before do_compile after do_configure
+
+# Append the u-boot do_deploy task to deploy also the result flash.bin
+# boot container as a replacement for the one provided by NXP BSP.
+#
+# Deploy task renames the target file from flash.bin to imx-boot to match
+# the name WKS file requires.
+#
+# This effectively would allow the usage of the same WKS file for those
+# derivatives that are using the boot container from U-Boot and those
+# that are not yet have support for it enabled.
+do_deploy_append() {
+ # Deploy the resulted flash.bin for WIC to pick it up
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]
+ then
+ install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${UBOOT_CONFIG}
+ ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} imx-boot
+ ln -sf flash.bin-${MACHINE}-${UBOOT_CONFIG} flash.bin
+ fi
+ done
+ unset j
+ done
+ unset i
+ fi
+}
diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass
new file mode 100644
index 00000000..55a2cc47
--- /dev/null
+++ b/classes/use-imx-security-controller-firmware.bbclass
@@ -0,0 +1,37 @@
+#
+# 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 = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', 'mx8qxb0-ahab-container.img', \
+ 'mx8qxc0-ahab-container.img', d)}"
+SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxc0-ahab-container.img"
+SECO_FIRMWARE_NAME_mx8dxl = "mx8dxla1-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/layer.conf b/conf/layer.conf
index 1a22e024..df898924 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -8,7 +8,7 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
BBFILE_COLLECTIONS += "freescale-layer"
BBFILE_PATTERN_freescale-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_freescale-layer = "5"
-LAYERSERIES_COMPAT_freescale-layer = "zeus dunfell"
+LAYERSERIES_COMPAT_freescale-layer = "gatesgarth hardknott"
# Add the Freescale-specific licenses into the metadata
LICENSE_PATH += "${LAYERDIR}/custom-licenses"
@@ -28,8 +28,8 @@ BBFILES_DYNAMIC += " \
aglprofilegraphical:${LAYERDIR}/dynamic-layers/aglprofilegraphical/*/*/*.bb \
aglprofilegraphical:${LAYERDIR}/dynamic-layers/aglprofilegraphical/*/*/*.bbappend \
\
- browser-layer:${LAYERDIR}/dynamic-layers/browser-layer/*/*/*.bb \
- browser-layer:${LAYERDIR}/dynamic-layers/browser-layer/*/*/*.bbappend \
+ chromium-browser-layer:${LAYERDIR}/dynamic-layers/chromium-browser-layer/*/*/*.bb \
+ chromium-browser-layer:${LAYERDIR}/dynamic-layers/chromium-browser-layer/*/*/*.bbappend \
\
filesystem-layer:${LAYERDIR}/dynamic-layers/filesystem-layer/*/*/*.bb \
filesystem-layer:${LAYERDIR}/dynamic-layers/filesystem-layer/*/*/*.bbappend \
@@ -37,9 +37,6 @@ BBFILES_DYNAMIC += " \
ivi:${LAYERDIR}/dynamic-layers/ivi/*/*/*.bb \
ivi:${LAYERDIR}/dynamic-layers/ivi/*/*/*.bbappend \
\
- networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \
- networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \
- \
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
\
diff --git a/conf/machine/imx23evk.conf b/conf/machine/imx23evk.conf
index 009aff79..8abc5a95 100644
--- a/conf/machine/imx23evk.conf
+++ b/conf/machine/imx23evk.conf
@@ -9,6 +9,13 @@ MACHINEOVERRIDES =. "mxs:mx23:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-arm926ejs.inc
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.sb"
+UBOOT_SUFFIX = "sb"
+
UBOOT_MACHINE = "mx23evk_config"
KERNEL_DEVICETREE = "imx23-evk.dtb"
diff --git a/conf/machine/imx25pdk.conf b/conf/machine/imx25pdk.conf
index 9e8ad003..5721e845 100644
--- a/conf/machine/imx25pdk.conf
+++ b/conf/machine/imx25pdk.conf
@@ -9,6 +9,13 @@ MACHINEOVERRIDES =. "mx25:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-arm926ejs.inc
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
UBOOT_MACHINE ?= "mx25pdk_defconfig"
KERNEL_DEVICETREE = "imx25-pdk.dtb"
diff --git a/conf/machine/imx28evk.conf b/conf/machine/imx28evk.conf
index 7c359e54..4f69dae4 100644
--- a/conf/machine/imx28evk.conf
+++ b/conf/machine/imx28evk.conf
@@ -9,7 +9,12 @@ MACHINEOVERRIDES =. "mxs:mx28:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-arm926ejs.inc
-IMXBOOTLETS_MACHINE = "iMX28_EVK"
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.sb"
+UBOOT_SUFFIX = "sb"
UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "mx28evk_config,sdcard"
diff --git a/conf/machine/imx51evk.conf b/conf/machine/imx51evk.conf
index a32b4e00..80d7b386 100644
--- a/conf/machine/imx51evk.conf
+++ b/conf/machine/imx51evk.conf
@@ -9,9 +9,13 @@ MACHINEOVERRIDES =. "mx5:mx51:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa8.inc
-# Disable perf features as 2.6.35.3 fails to build otherwise
-PERF_FEATURES_ENABLE = ""
-
KERNEL_DEVICETREE = "imx51-babbage.dtb"
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
UBOOT_MACHINE = "mx51evk_config"
diff --git a/conf/machine/imx53ard.conf b/conf/machine/imx53ard.conf
index c6d7f0d9..af5aeb3b 100644
--- a/conf/machine/imx53ard.conf
+++ b/conf/machine/imx53ard.conf
@@ -13,9 +13,16 @@ include conf/machine/include/tune-cortexa8.inc
PERF_FEATURES_ENABLE = ""
KERNEL_DEVICETREE = "imx53-ard.dtb"
+KERNEL_IMAGETYPE = "uImage"
+
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
UBOOT_MACHINE = "mx53ard_config"
-KERNEL_IMAGETYPE = "uImage"
MACHINE_FIRMWARE += "linux-firmware-ar3k \
linux-firmware-ath6k"
diff --git a/conf/machine/imx53qsb.conf b/conf/machine/imx53qsb.conf
index 24cbfac6..06d4a756 100644
--- a/conf/machine/imx53qsb.conf
+++ b/conf/machine/imx53qsb.conf
@@ -11,6 +11,13 @@ include conf/machine/include/tune-cortexa8.inc
KERNEL_DEVICETREE = "imx53-qsb.dtb imx53-qsrb.dtb"
+# This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# board. So we force it to use u-boot-fslc which is based on mainline here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
UBOOT_MACHINE = "mx53loco_config"
MACHINE_FIRMWARE = "linux-firmware-ar3k \
diff --git a/conf/machine/imx6qdlsabreauto.conf b/conf/machine/imx6qdlsabreauto.conf
index 16c1dcb6..b7aec8c2 100644
--- a/conf/machine/imx6qdlsabreauto.conf
+++ b/conf/machine/imx6qdlsabreauto.conf
@@ -32,13 +32,25 @@ KERNEL_DEVICETREE_use-mainline-bsp = " \
imx6dl-sabreauto.dtb \
"
-UBOOT_MACHINE ?= "mx6sabreauto_defconfig"
+### u-boot-fslc settings ###
-# Use fslc u-boot by default. See also imx-base.inc.
-UBOOT_MAKE_TARGET = "all"
-UBOOT_SUFFIX = "img"
-SPL_BINARY = "SPL"
-WKS_FILE = "imx-uboot-spl-bootpart.wks.in"
+SPL_BINARY_pn-u-boot-fslc = "SPL"
+UBOOT_MACHINE_pn-u-boot-fslc ?= "mx6sabreauto_defconfig"
+UBOOT_SUFFIX_pn-u-boot-fslc = "img"
+
+### u-boot-imx settings ###
+
+# The u-boot-imx does not provide unified functionality for DL/Q/QP SoC
+# variants. Change the defconfig to the targeted SoC variant.
+SPL_BINARY_pn-u-boot-imx = ""
+UBOOT_MACHINE_pn-u-boot-imx = "mx6qsabreauto_defconfig"
+UBOOT_MAKE_TARGET_pn-u-boot-imx = "u-boot.imx"
+UBOOT_SUFFIX_pn-u-boot-imx = "imx"
+
+WKS_FILE = " \
+ ${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', \
+ 'u-boot-fslc', 'imx-uboot-spl-bootpart.wks.in', \
+ 'imx-uboot-bootpart.wks.in', d)}"
SERIAL_CONSOLES = "115200;ttymxc3"
diff --git a/conf/machine/imx6qdlsabresd.conf b/conf/machine/imx6qdlsabresd.conf
index 2fe95dc6..b3d09e93 100644
--- a/conf/machine/imx6qdlsabresd.conf
+++ b/conf/machine/imx6qdlsabresd.conf
@@ -41,13 +41,25 @@ KERNEL_DEVICETREE_use-mainline-bsp = " \
imx6dl-sabresd.dtb \
"
-UBOOT_MACHINE ?= "mx6sabresd_defconfig"
+### u-boot-fslc settings ###
-# Use fslc u-boot by default. See also imx-base.inc.
-UBOOT_MAKE_TARGET = "all"
-UBOOT_SUFFIX = "img"
-SPL_BINARY = "SPL"
-WKS_FILE = "imx-uboot-spl-bootpart.wks.in"
+SPL_BINARY_pn-u-boot-fslc = "SPL"
+UBOOT_MACHINE_pn-u-boot-fslc ?= "mx6sabresd_defconfig"
+UBOOT_SUFFIX_pn-u-boot-fslc = "img"
+
+### u-boot-imx settings ###
+
+# The u-boot-imx does not provide unified functionality for DL/Q/QP SoC
+# variants. Change the defconfig to the targeted SoC variant.
+SPL_BINARY_pn-u-boot-imx = ""
+UBOOT_MACHINE_pn-u-boot-imx ?= "mx6qsabresd_defconfig"
+UBOOT_MAKE_TARGET_pn-u-boot-imx = "u-boot.imx"
+UBOOT_SUFFIX_pn-u-boot-imx = "imx"
+
+WKS_FILE = " \
+ ${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', \
+ 'u-boot-fslc', 'imx-uboot-spl-bootpart.wks.in', \
+ 'imx-uboot-bootpart.wks.in', d)}"
SERIAL_CONSOLES = "115200;ttymxc0"
diff --git a/conf/machine/imx6slevk.conf b/conf/machine/imx6slevk.conf
index 5d81272f..1e8c403b 100644
--- a/conf/machine/imx6slevk.conf
+++ b/conf/machine/imx6slevk.conf
@@ -9,18 +9,31 @@ MACHINEOVERRIDES =. "mx6:mx6sl:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa9.inc
-KERNEL_DEVICETREE = "imx6sl-evk.dtb imx6sl-evk-csi.dtb imx6sl-evk-ldo.dtb \
- imx6sl-evk-uart.dtb imx6sl-evk-btwifi.dtb"
-KERNEL_DEVICETREE_use-mainline-bsp = "imx6sl-evk.dtb"
+KERNEL_DEVICETREE = "imx6sl-evk.dtb"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ imx6sl-evk-btwifi.dtb \
+ imx6sl-evk-csi.dtb \
+ imx6sl-evk-ldo.dtb \
+ imx6sl-evk-uart.dtb \
+"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6slevk_config,sdcard"
-UBOOT_CONFIG[epdc] = "mx6slevk_epdc_config"
-UBOOT_CONFIG[spinor] = "mx6slevk_spinor_config"
-UBOOT_CONFIG[mfgtool] = "mx6slevk_config"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6slevk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6slevk_optee_config,sdcard"
+UBOOT_CONFIG[epdc] = "mx6slevk_epdc_config"
+UBOOT_CONFIG[spinor] = "mx6slevk_spinor_config"
+UBOOT_CONFIG[mfgtool] = "mx6slevk_config"
+
+OPTEE_BIN_EXT = "6slevk"
SERIAL_CONSOLES = "115200;ttymxc0"
-MACHINE_FEATURES += " pci wifi bluetooth"
+MACHINE_FEATURES += "pci wifi bluetooth bcm4339 bcm43455"
MACHINE_FIRMWARE += "linux-firmware-ath6k firmware-imx-epdc"
diff --git a/conf/machine/imx6sllevk.conf b/conf/machine/imx6sllevk.conf
index 478d1bbd..30b537f1 100644
--- a/conf/machine/imx6sllevk.conf
+++ b/conf/machine/imx6sllevk.conf
@@ -9,19 +9,28 @@ MACHINEOVERRIDES =. "mx6:mx6sll:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa9.inc
-KERNEL_DEVICETREE = "imx6sll-evk.dtb imx6sll-evk-btwifi.dtb imx6sll-evk-reva.dtb"
+KERNEL_DEVICETREE = "imx6sll-evk.dtb"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6sllevk_config,sdcard"
-UBOOT_CONFIG[epdc] = "mx6sllevk_epdc_config"
-UBOOT_CONFIG[mfgtool] = "mx6sllevk_config"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6sllevk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6sllevk_optee_config,sdcard"
+UBOOT_CONFIG[epdc] = "mx6sllevk_epdc_config"
+UBOOT_CONFIG[mfgtool] = "mx6sllevk_config"
+
+OPTEE_BIN_EXT_imx6sllevk = "6sllevk"
SERIAL_CONSOLES = "115200;ttymxc0"
-MACHINE_FEATURES += " pci wifi bluetooth"
+MACHINE_FEATURES += "wifi bluetooth bcm4339 bcm43455"
# MESA DRI library
XSERVER += "mesa-driver-swrast"
-PREFERRED_PROVIDER_u-boot = "u-boot-imx"
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
+PREFERRED_PROVIDER_u-boot = "u-boot-fslc"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-fslc"
diff --git a/conf/machine/imx6sxsabreauto.conf b/conf/machine/imx6sxsabreauto.conf
index 1bdb1080..f7031ccb 100644
--- a/conf/machine/imx6sxsabreauto.conf
+++ b/conf/machine/imx6sxsabreauto.conf
@@ -12,14 +12,20 @@ require conf/machine/include/tune-cortexa9.inc
KERNEL_DEVICETREE = "imx6sx-sabreauto.dtb"
KERNEL_DEVICETREE_use-mainline-bsp = "imx6sx-sabreauto.dtb"
-PREFERRED_PROVIDER_u-boot = "u-boot-imx"
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
-
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6sxsabreauto_config,sdcard"
-UBOOT_CONFIG[qspi1] = "mx6sxsabreauto_qspi1_config"
-UBOOT_CONFIG[nand] = "mx6sxsabreauto_nand_config,ubifs"
-UBOOT_CONFIG[mfgtool] = "mx6sxsabreauto_config"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6sxsabreauto_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6sxsabreauto_optee_config,sdcard"
+UBOOT_CONFIG[qspi1] = "mx6sxsabreauto_qspi1_config"
+UBOOT_CONFIG[nand] = "mx6sxsabreauto_nand_config,ubifs"
+UBOOT_CONFIG[mfgtool] = "mx6sxsabreauto_config"
+
+OPTEE_BIN_EXT = "6sxauto"
SERIAL_CONSOLES = "115200;ttymxc3"
diff --git a/conf/machine/imx6sxsabresd.conf b/conf/machine/imx6sxsabresd.conf
index 5793a0b0..ff7d6ae6 100644
--- a/conf/machine/imx6sxsabresd.conf
+++ b/conf/machine/imx6sxsabresd.conf
@@ -9,21 +9,40 @@ MACHINEOVERRIDES =. "mx6:mx6sx:"
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa9.inc
-KERNEL_DEVICETREE = "imx6sx-sdb.dtb imx6sx-sdb-emmc.dtb imx6sx-sdb-m4.dtb \
- imx6sx-sdb-sai.dtb imx6sx-sdb-lcdif1.dtb imx6sx-sdb-ldo.dtb \
- imx6sx-sdb-reva-ldo.dtb imx6sx-sdb-reva.dtb \
- imx6sx-sdb-btwifi.dtb imx6sx-sdb-mqs.dtb"
-KERNEL_DEVICETREE_use-mainline-bsp = "imx6sx-sdb.dtb imx6sx-sdb-sai.dtb imx6sx-sdb-reva.dtb"
-
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6sxsabresd_config,sdcard"
-UBOOT_CONFIG[emmc] = "mx6sxsabresd_emmc_config,sdcard"
-UBOOT_CONFIG[qspi2] = "mx6sxsabresd_qspi2_config"
+KERNEL_DEVICETREE = " \
+ imx6sx-sdb.dtb \
+ imx6sx-sdb-reva.dtb \
+ imx6sx-sdb-sai.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ imx6sx-sdb-btwifi.dtb \
+ imx6sx-sdb-emmc.dtb \
+ imx6sx-sdb-lcdif1.dtb \
+ imx6sx-sdb-ldo.dtb \
+ imx6sx-sdb-m4.dtb \
+ imx6sx-sdb-mqs.dtb \
+ imx6sx-sdb-pcie-ep.dtb \
+ imx6sx-sdb-reva-ldo.dtb \
+"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6sxsabresd_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6sxsabresd_optee_config,sdcard"
+UBOOT_CONFIG[emmc] = "mx6sxsabresd_emmc_config,sdcard"
+UBOOT_CONFIG[qspi2] = "mx6sxsabresd_qspi2_config"
UBOOT_CONFIG[m4fastup] = "mx6sxsabresd_m4fastup_config"
-UBOOT_CONFIG[mfgtool] = "mx6sxsabresd_config"
+UBOOT_CONFIG[mfgtool] = "mx6sxsabresd_config"
+
+OPTEE_BIN_EXT = "6sxsdb"
SERIAL_CONSOLES = "115200;ttymxc0"
MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k"
-MACHINE_FEATURES += " pci wifi bluetooth"
+MACHINE_FEATURES += "pci wifi bluetooth bcm4339 bcm43455"
diff --git a/conf/machine/imx6ulevk.conf b/conf/machine/imx6ulevk.conf
index 18b6b04b..f7c5d8ae 100644
--- a/conf/machine/imx6ulevk.conf
+++ b/conf/machine/imx6ulevk.conf
@@ -9,7 +9,7 @@ MACHINEOVERRIDES =. "mx6:mx6ul:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa7.inc
-MACHINE_FEATURES += " pci wifi bluetooth"
+MACHINE_FEATURES += "wifi bluetooth bcm4339 bcm43455"
KERNEL_DEVICETREE = " \
imx6ul-14x14-evk-btwifi.dtb \
@@ -23,14 +23,31 @@ KERNEL_DEVICETREE = " \
"
KERNEL_DEVICETREE_use-mainline-bsp = "imx6ul-14x14-evk.dtb"
-# Use fslc u-boot by default. See also imx-base.inc.
-UBOOT_MAKE_TARGET = ""
-UBOOT_SUFFIX = "img"
-SPL_BINARY = "SPL"
-WKS_FILE = "imx-uboot-spl-bootpart.wks.in"
-
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6ul_14x14_evk_config,sdcard"
-UBOOT_CONFIG[emmc] = "mx6ul_14x14_evk_emmc_config,sdcard"
-UBOOT_CONFIG[qspi1] = "mx6ul_14x14_evk_qspi1_config"
-UBOOT_CONFIG[mfgtool] = "mx6ul_14x14_evk_config"
+### u-boot-fslc settings ###
+
+SPL_BINARY_pn-u-boot-fslc = "SPL"
+UBOOT_SUFFIX_pn-u-boot-fslc = "img"
+
+### u-boot-imx settings ###
+
+# The u-boot-imx does not provide SPL support
+SPL_BINARY_pn-u-boot-imx = ""
+UBOOT_MAKE_TARGET_pn-u-boot-imx = "u-boot.imx"
+UBOOT_SUFFIX_pn-u-boot-imx = "imx"
+
+WKS_FILE = " \
+ ${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', \
+ 'u-boot-fslc', 'imx-uboot-spl-bootpart.wks.in', \
+ 'imx-uboot-bootpart.wks.in', d)}"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6ul_14x14_evk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6ul_14x14_evk_optee_config,sdcard"
+UBOOT_CONFIG[emmc] = "mx6ul_14x14_evk_emmc_config,sdcard"
+UBOOT_CONFIG[qspi1] = "mx6ul_14x14_evk_qspi1_config"
+UBOOT_CONFIG[mfgtool] = "mx6ul_14x14_evk_config"
+
+OPTEE_BIN_EXT = "6ulevk"
diff --git a/conf/machine/imx6ullevk.conf b/conf/machine/imx6ullevk.conf
index 1b31c2f7..bd592a20 100644
--- a/conf/machine/imx6ullevk.conf
+++ b/conf/machine/imx6ullevk.conf
@@ -2,13 +2,15 @@
#@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:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa7.inc
+MACHINE_FEATURES += "wifi bluetooth bcm4339 bcm43455"
+
KERNEL_DEVICETREE = " \
imx6ull-14x14-evk.dtb \
"
@@ -20,10 +22,18 @@ KERNEL_DEVICETREE_append_use-nxp-bsp = " \
imx6ull-14x14-evk-gpmi-weim.dtb \
"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx6ull_14x14_evk_config,sdcard"
-UBOOT_CONFIG[mfgtool] = "mx6ull_14x14_evk_config"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
-SERIAL_CONSOLES = "115200;ttymxc0"
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6ull_14x14_evk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6ull_14x14_evk_optee_config,sdcard"
+UBOOT_CONFIG[emmc] = "mx6ull_14x14_evk_emmc_config,sdcard"
+UBOOT_CONFIG[nand] = "mx6ull_14x14_evk_nand_config,ubifs"
+UBOOT_CONFIG[qspi1] = "mx6ull_14x14_evk_qspi1_config"
+UBOOT_CONFIG[mfgtool] = "mx6ull_14x14_evk_config"
-MACHINE_FEATURES += "wifi bluetooth"
+OPTEE_BIN_EXT = "6ullevk"
diff --git a/conf/machine/imx6ulz-14x14-evk.conf b/conf/machine/imx6ulz-14x14-evk.conf
new file mode 100644
index 00000000..7b794e7c
--- /dev/null
+++ b/conf/machine/imx6ulz-14x14-evk.conf
@@ -0,0 +1,36 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX6ULZ 14x14 Evaluation Kit
+#@SOC: i.MX6ULZ
+#@DESCRIPTION: Machine configuration for NXP i.MX6ULZ 14x14 EVK
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+MACHINEOVERRIDES =. "mx6:mx6ul:mx6ull:mx6ulz:"
+
+include conf/machine/include/imx-base.inc
+include conf/machine/include/tune-cortexa7.inc
+
+MACHINE_FEATURES += "wifi bluetooth bcm4339 bcm43455"
+
+KERNEL_DEVICETREE = " \
+ imx6ulz-14x14-evk.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ imx6ulz-14x14-evk-btwifi.dtb \
+ imx6ulz-14x14-evk-emmc.dtb \
+ imx6ulz-14x14-evk-gpmi-weim.dtb \
+"
+
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx6ulz_14x14_evk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx6ulz_14x14_evk_optee_config,sdcard"
+UBOOT_CONFIG[emmc] = "mx6ulz_14x14_evk_emmc_config,sdcard"
+UBOOT_CONFIG[nand] = "mx6ulz_14x14_evk_nand_config,ubifs"
+UBOOT_CONFIG[qspi1] = "mx6ulz_14x14_evk_qspi1_config"
+
+OPTEE_BIN_EXT = "6ulzevk"
diff --git a/conf/machine/imx7dsabresd.conf b/conf/machine/imx7dsabresd.conf
index 84de3862..e848f294 100644
--- a/conf/machine/imx7dsabresd.conf
+++ b/conf/machine/imx7dsabresd.conf
@@ -9,25 +9,36 @@ MACHINEOVERRIDES =. "mx7:mx7d:"
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa7.inc
-MACHINE_FEATURES += " pci wifi bluetooth"
+MACHINE_FEATURES += "pci wifi bluetooth bcm4339 bcm43455"
-KERNEL_DEVICETREE = " \
- imx7d-sdb.dtb \
+KERNEL_DEVICETREE = "imx7d-sdb.dtb"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
imx7d-sdb-epdc.dtb \
imx7d-sdb-gpmi-weim.dtb \
imx7d-sdb-m4.dtb \
imx7d-sdb-mipi-dsi.dtb \
+ imx7d-sdb-pcie-ep.dtb \
imx7d-sdb-qspi.dtb \
imx7d-sdb-reva.dtb \
imx7d-sdb-sht11.dtb \
+ imx7d-sdb-usd-wifi.dtb \
"
-KERNEL_DEVICETREE_use-mainline-bsp = "imx7d-sdb.dtb"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx7dsabresd_config,sdcard"
-UBOOT_CONFIG[qspi1] = "mx7dsabresd_qspi1_config"
-UBOOT_CONFIG[nand] = "mx7dsabresd_nand_config,ubifs"
-UBOOT_CONFIG[epdc] = "mx7dsabresd_epdc_config"
-UBOOT_CONFIG[mfgtool] = "mx7dsabresd_config"
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx7dsabresd_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx7dsabresd_optee_config,sdcard"
+UBOOT_CONFIG[nonsec] = "mx7dsabresd_nonsec_config,sdcard"
+UBOOT_CONFIG[qspi1] = "mx7dsabresd_qspi1_config"
+UBOOT_CONFIG[nand] = "mx7dsabresd_nand_config,ubifs"
+UBOOT_CONFIG[epdc] = "mx7dsabresd_epdc_config"
+UBOOT_CONFIG[mfgtool] = "mx7dsabresd_config"
+
+OPTEE_BIN_EXT = "7dsdb"
+XSERVER += "mesa-driver-swrast"
diff --git a/conf/machine/imx7ulpevk.conf b/conf/machine/imx7ulpevk.conf
index d9d2a559..a587f44b 100644
--- a/conf/machine/imx7ulpevk.conf
+++ b/conf/machine/imx7ulpevk.conf
@@ -9,9 +9,17 @@ MACHINEOVERRIDES =. "mx7:mx7ulp:"
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa7.inc
-MACHINE_FEATURES += " pci wifi bluetooth qca9377"
+MACHINE_FEATURES += "pci wifi bluetooth bcm43430"
KERNEL_DEVICETREE = " \
+ imx7ulp-evk.dtb \
+"
+KERNEL_DEVICETREE_append_use-mainline-bsp = " \
+ imx7ulp-com.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ imx7ulp-evk-ft5416.dtb \
+ imx7ulp-evk-mipi.dtb \
imx7ulp-evkb.dtb \
imx7ulp-evkb-emmc.dtb \
imx7ulp-evkb-lpuart.dtb \
@@ -21,15 +29,21 @@ KERNEL_DEVICETREE = " \
imx7ulp-evkb-sd1.dtb \
imx7ulp-evkb-sensors-to-i2c5.dtb \
imx7ulp-evkb-spi-slave.dtb \
- imx7ulp-evk.dtb \
- imx7ulp-evk-ft5416.dtb \
- imx7ulp-evk-mipi.dtb \
"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "mx7ulp_evk_config,sdcard"
-UBOOT_CONFIG[emmc] = "mx7ulp_evk_emmc_config,sdcard"
-UBOOT_CONFIG[mfgtool] = "mx7ulp_evk_config"
+UBOOT_MAKE_TARGET = "u-boot.imx"
+UBOOT_SUFFIX = "imx"
+
+UBOOT_CONFIG ??= " \
+ sd \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \
+"
+UBOOT_CONFIG[sd] = "mx7ulp_evk_config,sdcard"
+UBOOT_CONFIG[sd-optee] = "mx7ulp_evk_optee_config,sdcard"
+UBOOT_CONFIG[emmc] = "mx7ulp_evk_emmc_config,sdcard"
+UBOOT_CONFIG[mfgtool] = "mx7ulp_evk_config"
+
+OPTEE_BIN_EXT = "7ulp"
# Set Serial console
SERIAL_CONSOLES = "115200;ttyLP0"
diff --git a/conf/machine/imx8dx-mek.conf b/conf/machine/imx8dx-mek.conf
new file mode 100644
index 00000000..842ba1fa
--- /dev/null
+++ b/conf/machine/imx8dx-mek.conf
@@ -0,0 +1,12 @@
+#@TYPE: Machine
+#@NAME: i.MX 8DXP MEK
+#@DESCRIPTION: i.MX 8DualXPlus Multisensory Enablement Kit board
+#@MAINTAINER: Lauren Post <lauren.post@nxp.com>
+
+MACHINEOVERRIDES =. "mx8qxp:mx8dx:"
+
+require include/imx8x-mek.inc
+
+KERNEL_DEVICETREE_BASENAME = "${MACHINE}"
+
+UBOOT_CONFIG_BASENAME = "imx8dx_mek"
diff --git a/conf/machine/imx8dxl-evk.conf b/conf/machine/imx8dxl-evk.conf
new file mode 100644
index 00000000..5d177aa3
--- /dev/null
+++ b/conf/machine/imx8dxl-evk.conf
@@ -0,0 +1,64 @@
+#@TYPE: Machine
+#@NAME: i.MX 8DXL EVK
+#@DESCRIPTION: i.MX 8DXLite Evaluation Kit (EVK) board
+#@MAINTAINER: Lauren Post <lauren.post@nxp.com>
+
+MACHINEOVERRIDES =. "mx8:mx8x:mx8dxl:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa35.inc
+
+MACHINE_FEATURES += "pci bcm43455 bcm4356"
+MACHINE_FEATURES_append_use-nxp-bsp = " bcm4359"
+
+# Don't include kernels in standard images
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
+
+LOADADDR = ""
+
+# Disable the serial console due to auto-serial-console
+SERIAL_CONSOLES = "115200;ttyLP0"
+
+# we do not want to have getty running on tty1 as we run
+# auto-serial-console there
+USE_VT = "0"
+
+KERNEL_DEVICETREE = "freescale/imx8dxl-evk.dtb"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/imx8dxl-evk-enet0.dtb \
+ freescale/imx8dxl-evk-enet0-tja1100.dtb \
+ freescale/imx8dxl-evk-inmate.dtb \
+ freescale/imx8dxl-evk-lpspi-slave.dtb \
+ freescale/imx8dxl-evk-pcie-ep.dtb \
+ freescale/imx8dxl-evk-root.dtb \
+ freescale/imx8dxl-evk-rpmsg.dtb \
+"
+
+ATF_PLATFORM = "imx8dxl"
+IMX_BOOT_SOC_TARGET = "iMX8DXL"
+
+# This machine is not supported by u-boot-fslc, so we force it to use
+# u-boot-imx here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-imx"
+
+UBOOT_MAKE_TARGET = "all"
+SPL_BINARY = "spl/u-boot-spl.bin"
+UBOOT_SUFFIX = "bin"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "imx8dxl_evk_defconfig,sdcard"
+UBOOT_CONFIG[fspi] = "imx8dxl_evk_fspi_defconfig"
+
+IMX_BOOT_SEEK = "32"
+
+IMXBOOT_TARGETS_SD = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl', \
+ 'flash', d)}"
+IMXBOOT_TARGETS_FSPI = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl_flexspi', \
+ 'flash_flexspi', d)}"
+IMXBOOT_TARGETS = \
+ "${@bb.utils.contains('UBOOT_CONFIG', 'sd', '${IMXBOOT_TARGETS_SD}', \
+ '${IMXBOOT_TARGETS_FSPI}', d)}"
+
+BOARD_TYPE = "evk"
diff --git a/conf/machine/imx8mm-ddr4-evk.conf b/conf/machine/imx8mm-ddr4-evk.conf
new file mode 100644
index 00000000..3901bb92
--- /dev/null
+++ b/conf/machine/imx8mm-ddr4-evk.conf
@@ -0,0 +1,25 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Mini EVK with DDR4
+#@SOC: i.MX8MM
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Mini Evaluation Kit with DDR4
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+require include/imx8mm-evk.inc
+
+KERNEL_DEVICETREE_BASENAME = "${MACHINE}"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-revb-rm67191.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-revb.dtb \
+"
+
+UBOOT_CONFIG_BASENAME = "imx8mm_ddr4_evk"
+UBOOT_CONFIG[nand] = "${UBOOT_CONFIG_BASENAME}_nand_defconfig,ubifs"
+
+DDR_FIRMWARE_NAME = " \
+ ddr4_imem_1d.bin \
+ ddr4_dmem_1d.bin \
+ ddr4_imem_2d.bin \
+ ddr4_dmem_2d.bin \
+"
+
+IMXBOOT_TARGETS_BASENAME = "flash_ddr4_evk"
diff --git a/conf/machine/imx8mm-lpddr4-evk.conf b/conf/machine/imx8mm-lpddr4-evk.conf
new file mode 100644
index 00000000..6007c540
--- /dev/null
+++ b/conf/machine/imx8mm-lpddr4-evk.conf
@@ -0,0 +1,36 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Mini EVK with LPDDR4
+#@SOC: i.MX8MM
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Mini Evaluation Kit with LPDDR4
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+require include/imx8mm-evk.inc
+
+# The device tree name is implicit for LPDDR4, so can't use MACHINE here
+KERNEL_DEVICETREE_BASENAME = "imx8mm-evk"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-8mic-revE.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-8mic-swpdm.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-ak4497.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-ak5558.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-audio-tdm.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-inmate.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-qca-wifi.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-revb-qca-wifi.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-root.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-usd-wifi.dtb \
+"
+
+
+UBOOT_CONFIG_BASENAME = "imx8mm_evk"
+UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_fspi_defconfig"
+
+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 \
+"
+
+IMXBOOT_TARGETS_BASENAME = "flash_evk"
diff --git a/conf/machine/imx8mmevk.conf b/conf/machine/imx8mmevk.conf
deleted file mode 100644
index 2a2893e6..00000000
--- a/conf/machine/imx8mmevk.conf
+++ /dev/null
@@ -1,60 +0,0 @@
-#@TYPE: Machine
-#@NAME: NXP i.MX8MM LPDDR4 Evaluation Kit and i.MX8MM DDR4 Evaluation Kit
-#@SOC: i.MX8MM
-#@DESCRIPTION: Machine configuration for NXP i.MX8MMini LPDDR4 EVK and i.MX8MMini DDR4 EVK
-#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
-
-MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
-
-require conf/machine/include/imx-base.inc
-require conf/machine/include/tune-cortexa53.inc
-
-IMX_DEFAULT_BSP = "nxp"
-
-MACHINE_FEATURES += " pci wifi bluetooth optee qca9377"
-
-KERNEL_DEVICETREE = " \
- freescale/imx8mm-ddr4-evk.dtb \
- freescale/imx8mm-ddr4-evk-revb.dtb \
- freescale/imx8mm-ddr4-evk-revb-rm67191.dtb \
- freescale/imx8mm-ddr4-evk-rm67191.dtb \
- freescale/imx8mm-evk-ak4497.dtb \
- freescale/imx8mm-evk-ak5558.dtb \
- freescale/imx8mm-evk-audio-tdm.dtb \
- freescale/imx8mm-evk.dtb \
- freescale/imx8mm-evk-inmate.dtb \
- freescale/imx8mm-evk-revb.dtb \
- freescale/imx8mm-evk-rm67191.dtb \
- freescale/imx8mm-evk-root.dtb \
- freescale/imx8mm-evk-rpmsg.dtb \
-"
-
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "imx8mm_evk_config,sdcard"
-UBOOT_CONFIG[fspi] = "imx8mm_evk_fspi_defconfig"
-UBOOT_CONFIG[mfgtool] = "imx8mm_evk_config"
-SPL_BINARY = "spl/u-boot-spl.bin"
-
-# Set DDR FIRMWARE
-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"
-
-# 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 = "33"
-
-OPTEE_BIN_EXT = "8mm"
-
-# Add additional firmware
-MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/imx8mn-ddr4-evk.conf b/conf/machine/imx8mn-ddr4-evk.conf
new file mode 100644
index 00000000..442afdbd
--- /dev/null
+++ b/conf/machine/imx8mn-ddr4-evk.conf
@@ -0,0 +1,22 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Nano Evaluation Kit with DDR4
+#@SOC: i.MX8MM
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Nano EVK with DDR4
+#@MAINTAINER: Andrey Zhizhikin <andrey.z@gmail.com>
+
+require include/imx8mn-evk.inc
+
+KERNEL_DEVICETREE_BASENAME = "${MACHINE}"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-usd-wifi.dtb \
+"
+UBOOT_CONFIG_BASENAME = "imx8mn_ddr4_evk"
+
+DDR_FIRMWARE_VERSION = "201810"
+DDR_FIRMWARE_NAME = " \
+ ddr4_imem_1d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_dmem_1d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_imem_2d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_dmem_2d_${DDR_FIRMWARE_VERSION}.bin \
+"
+IMXBOOT_TARGETS_BASENAME = "flash_ddr4_evk"
diff --git a/conf/machine/imx8mn-lpddr4-evk.conf b/conf/machine/imx8mn-lpddr4-evk.conf
new file mode 100644
index 00000000..7c58bc19
--- /dev/null
+++ b/conf/machine/imx8mn-lpddr4-evk.conf
@@ -0,0 +1,21 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Nano Evaluation Kit with LPDDR4
+#@SOC: i.MX8MN
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Nano EVK with LPDDR4
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+require include/imx8mn-evk.inc
+
+# The device tree name is implicit for LPDDR4, so can't use MACHINE here
+KERNEL_DEVICETREE_BASENAME = "imx8mn-evk"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-8mic-revE.dtb \
+"
+UBOOT_CONFIG_BASENAME = "imx8mn_evk"
+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 \
+"
+IMXBOOT_TARGETS_BASENAME = "flash_evk"
diff --git a/conf/machine/imx8mnevk.conf b/conf/machine/imx8mnevk.conf
deleted file mode 100644
index adf80ea8..00000000
--- a/conf/machine/imx8mnevk.conf
+++ /dev/null
@@ -1,61 +0,0 @@
-#@TYPE: Machine
-#@NAME: NXP i.MX8M Nano DDR4 Evaluation Kit
-#@SOC: i.MX8MM
-#@DESCRIPTION: Machine configuration for NXP i.MX8M Nano DDR4 EVK
-#@MAINTAINER: Andrey Zhizhikin <andrey.z@gmail.com>
-
-MACHINEOVERRIDES =. "mx8:mx8m:mx8mn:"
-
-require conf/machine/include/imx-base.inc
-require conf/machine/include/tune-cortexa53.inc
-
-IMX_DEFAULT_BSP = "nxp"
-
-MACHINE_FEATURES += "wifi bluetooth optee bcm43455"
-
-KERNEL_DEVICETREE = " \
- freescale/imx8mn-ddr4-evk-ak5558.dtb \
- freescale/imx8mn-ddr4-evk.dtb \
- freescale/imx8mn-ddr4-evk-inmate.dtb \
- freescale/imx8mn-ddr4-evk-rm67191.dtb \
- freescale/imx8mn-ddr4-evk-root.dtb \
- freescale/imx8mn-ddr4-evk-rpmsg.dtb \
- freescale/imx8mn-evk.dtb \
- freescale/imx8mn-evk-rm67191.dtb \
-"
-
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "imx8mn_ddr4_evk_defconfig,sdcard"
-UBOOT_CONFIG[mfgtool] = "imx8mn_ddr4_evk_defconfig"
-SPL_BINARY = "spl/u-boot-spl.bin"
-
-# Set DDR FIRMWARE
-DDR_FIRMWARE_NAME = "ddr4_imem_1d_201810.bin \
- ddr4_dmem_1d_201810.bin \
- ddr4_imem_2d_201810.bin \
- ddr4_dmem_2d_201810.bin"
-
-# Set u-boot DTB
-UBOOT_DTB_NAME = "fsl-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)}"
-
-# Set Serial console
-SERIAL_CONSOLES = "115200;ttymxc1"
-
-IMAGE_BOOTLOADER = "imx-boot"
-BOOT_SPACE = "65536"
-LOADADDR = ""
-UBOOT_SUFFIX = "bin"
-UBOOT_MAKE_TARGET = ""
-
-# Image boot offset as defined in section 6.1.6.1 "Primary image offset and IVT offset" of
-# i.MX 8M Nano Applications Processor Reference Manual, Rev. 0, 12/2019
-# Doc ID: IMX8MNRM
-IMX_BOOT_SEEK = "32"
-
-OPTEE_BIN_EXT = "8mn"
-
-# Add additional firmware
-MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/imx8mp-ddr4-evk.conf b/conf/machine/imx8mp-ddr4-evk.conf
new file mode 100644
index 00000000..09517769
--- /dev/null
+++ b/conf/machine/imx8mp-ddr4-evk.conf
@@ -0,0 +1,27 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Plus EVK with DDR4
+#@SOC: i.MX8MP
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Plus Evaluation Kit with DDR4
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+require include/imx8mp-evk.inc
+
+# FIXME: This machine is not yet supported by u-boot-fslc, so for now
+# use u-boot-imx for mainline.
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-imx"
+
+KERNEL_DEVICETREE_BASENAME = "${MACHINE}"
+
+UBOOT_CONFIG_BASENAME = "imx8mp_ddr4_evk"
+UBOOT_CONFIG[nand] = "${UBOOT_CONFIG_BASENAME}_nand_defconfig"
+
+# Set DDR FIRMWARE
+DDR_FIRMWARE_VERSION = "202006"
+DDR_FIRMWARE_NAME = " \
+ ddr4_dmem_1d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_imem_1d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_dmem_2d_${DDR_FIRMWARE_VERSION}.bin \
+ ddr4_imem_2d_${DDR_FIRMWARE_VERSION}.bin \
+"
+
+IMXBOOT_TARGETS_BASENAME = "flash_ddr4_evk"
diff --git a/conf/machine/imx8mp-lpddr4-evk.conf b/conf/machine/imx8mp-lpddr4-evk.conf
new file mode 100644
index 00000000..6484da7c
--- /dev/null
+++ b/conf/machine/imx8mp-lpddr4-evk.conf
@@ -0,0 +1,47 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX 8M Plus EVK with LPDDR4
+#@SOC: i.MX8MP
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Plus Evaluation Kit with LPDDR4
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
+
+require include/imx8mp-evk.inc
+
+# The device tree name is implicit for LPDDR4, so can't use MACHINE here
+KERNEL_DEVICETREE_BASENAME = "imx8mp-evk"
+
+# NXP kernel has additional DTB files for various board configuration and
+# derivates. Include them here for NXP BSP only
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/imx8mp-ab2.dtb \
+ freescale/imx8mp-evk-basler.dtb \
+ freescale/imx8mp-evk-basler-ov5640.dtb \
+ freescale/imx8mp-evk-dsp.dtb \
+ freescale/imx8mp-evk-dsp-lpa.dtb \
+ freescale/imx8mp-evk-dual-ov2775.dtb \
+ freescale/imx8mp-evk-flexcan2.dtb \
+ freescale/imx8mp-evk-inmate.dtb \
+ freescale/imx8mp-evk-it6263-lvds-dual-channel.dtb \
+ freescale/imx8mp-evk-jdi-wuxga-lvds-panel.dtb \
+ freescale/imx8mp-evk-ov2775.dtb \
+ freescale/imx8mp-evk-ov2775-ov5640.dtb \
+ freescale/imx8mp-evk-pcie-ep.dtb \
+ freescale/imx8mp-evk-rm67191.dtb \
+ freescale/imx8mp-evk-root.dtb \
+ freescale/imx8mp-evk-rpmsg.dtb \
+ freescale/imx8mp-evk-sof-wm8960.dtb \
+ freescale/imx8mp-evk-spdif-lb.dtb \
+"
+
+UBOOT_CONFIG_BASENAME = "imx8mp_evk"
+UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_defconfig"
+
+# Set DDR FIRMWARE
+DDR_FIRMWARE_VERSION = "202006"
+DDR_FIRMWARE_NAME = " \
+ lpddr4_pmu_train_1d_dmem_${DDR_FIRMWARE_VERSION}.bin \
+ lpddr4_pmu_train_1d_imem_${DDR_FIRMWARE_VERSION}.bin \
+ lpddr4_pmu_train_2d_dmem_${DDR_FIRMWARE_VERSION}.bin \
+ lpddr4_pmu_train_2d_imem_${DDR_FIRMWARE_VERSION}.bin \
+"
+
+IMXBOOT_TARGETS_BASENAME = "flash_evk"
diff --git a/conf/machine/imx8mqevk.conf b/conf/machine/imx8mq-evk.conf
index 40794c35..9907ef4b 100644
--- a/conf/machine/imx8mqevk.conf
+++ b/conf/machine/imx8mq-evk.conf
@@ -1,8 +1,8 @@
#@TYPE: Machine
-#@NAME: NXP i.MX8MQ Evaluation Kit
+#@NAME: NXP i.MX 8M Quad EVK
#@SOC: i.MX8MQ
-#@DESCRIPTION: Machine configuration for NXP i.MX8MQ EVK
-#@MAINTAINER: Alexandru Palalau <ioan-alexandru.palalau@nxp.com>
+#@DESCRIPTION: Machine configuration for NXP i.MX 8M Quad Evaluation Kit
+#@MAINTAINER: Jun Zhu <junzhu@nxp.com>
MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:"
@@ -11,45 +11,63 @@ require conf/machine/include/tune-cortexa53.inc
IMX_DEFAULT_BSP = "nxp"
-MACHINE_FEATURES += "pci wifi bluetooth optee qca6174"
+MACHINE_FEATURES += "pci wifi bluetooth optee bcm43455 bcm4356"
+MACHINE_FEATURES_append_use-nxp-bsp = " bcm4359"
MACHINE_SOCARCH_FILTER_append_mx8mq = " virtual/libopenvg virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa virtual/libgl virtual/libg2d"
KERNEL_DEVICETREE = " \
+ freescale/imx8mq-evk.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
freescale/imx8mq-evk-ak4497.dtb \
freescale/imx8mq-evk-audio-tdm.dtb \
freescale/imx8mq-evk-dcss-adv7535.dtb \
freescale/imx8mq-evk-dcss-rm67191.dtb \
+ freescale/imx8mq-evk-dcss-rm67199.dtb \
freescale/imx8mq-evk-dp.dtb \
- freescale/imx8mq-evk.dtb \
freescale/imx8mq-evk-dual-display.dtb \
freescale/imx8mq-evk-inmate.dtb \
freescale/imx8mq-evk-lcdif-adv7535.dtb \
freescale/imx8mq-evk-lcdif-rm67191.dtb \
+ freescale/imx8mq-evk-lcdif-rm67199.dtb \
+ freescale/imx8mq-evk-pcie-ep.dtb \
freescale/imx8mq-evk-pcie1-m2.dtb \
freescale/imx8mq-evk-pdm.dtb \
freescale/imx8mq-evk-root.dtb \
freescale/imx8mq-evk-rpmsg.dtb \
+ freescale/imx8mq-evk-usd-wifi.dtb \
+ freescale/imx8mq-evk-usdhc2-m2.dtb \
"
+IMX_DEFAULT_BOOTLOADER_use-nxp-bsp = "u-boot-imx"
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-fslc"
+
+UBOOT_SUFFIX = "bin"
+
UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "imx8mq_evk_config,sdcard"
-UBOOT_CONFIG[mfgtool] = "imx8mq_evk_config"
+UBOOT_CONFIG[sd] = "imx8mq_evk_config,sdcard"
+UBOOT_CONFIG[mfgtool] = "imx8mq_evk_config"
+
SPL_BINARY = "spl/u-boot-spl.bin"
# Set DDR FIRMWARE
-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"
+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 ATF platform name
+ATF_PLATFORM = "imx8mq"
# Set imx-mkimage boot target
IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
-
-# Set Serial console
-SERIAL_CONSOLES = "115200;ttymxc0"
-
-IMAGE_BOOTLOADER = "imx-boot"
+IMX_BOOT_SOC_TARGET = "iMX8M"
LOADADDR = ""
UBOOT_SUFFIX = "bin"
diff --git a/conf/machine/imx8qm-mek.conf b/conf/machine/imx8qm-mek.conf
new file mode 100644
index 00000000..5ceb6b8b
--- /dev/null
+++ b/conf/machine/imx8qm-mek.conf
@@ -0,0 +1,89 @@
+#@TYPE: Machine
+#@NAME: i.MX 8QM MEK
+#@DESCRIPTION: i.MX 8QuadMax Multisensory Enablement Kit board, rev B0
+#@MAINTAINER: Lauren Post <lauren.post@nxp.com>
+
+MACHINEOVERRIDES =. "mx8:mx8qm:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa72-cortexa53.inc
+
+IMX_DEFAULT_BSP = "nxp"
+
+MACHINE_FEATURES += "pci optee bcm43455 bcm4356"
+MACHINE_FEATURES_append_use-nxp-bsp = " bcm4359"
+
+# Don't include kernels in standard images
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
+
+LOADADDR = ""
+
+# We have to disable SERIAL_CONSOLE due to auto-serial-console
+SERIAL_CONSOLES = "115200;ttyAMA0"
+
+# we do not want to have getty running on tty1 as we run
+# auto-serial-console there
+USE_VT = "0"
+
+KERNEL_DEVICETREE = " \
+ freescale/imx8qm-mek.dtb \
+ freescale/imx8qm-mek-ca53.dtb \
+ freescale/imx8qm-mek-ca72.dtb \
+ freescale/imx8qm-mek-dom0.dtb \
+ freescale/imx8qm-mek-domu.dtb \
+ freescale/imx8qm-mek-dsi-rm67191.dtb \
+ freescale/imx8qm-mek-dsp.dtb \
+ freescale/imx8qm-mek-enet2-tja1100.dtb \
+ freescale/imx8qm-mek-esai.dtb \
+ freescale/imx8qm-mek-hdmi.dtb \
+ freescale/imx8qm-mek-inmate.dtb \
+ freescale/imx8qm-mek-jdi-wuxga-lvds1-panel.dtb \
+ freescale/imx8qm-mek-jdi-wuxga-lvds1-panel-rpmsg.dtb \
+ freescale/imx8qm-mek-ov5640.dtb \
+ freescale/imx8qm-mek-pcie-ep.dtb \
+ freescale/imx8qm-mek-root.dtb \
+ freescale/imx8qm-mek-rpmsg.dtb \
+ freescale/imx8qm-mek-sof-cs42888.dtb \
+ freescale/imx8qm-mek-sof-wm8960.dtb \
+ freescale/imx8qm-mek-usd-wifi.dtb \
+ freescale/imx8qm-mek-usdhc3-m2.dtb \
+"
+
+UBOOT_MAKE_TARGET = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '', \
+ 'u-boot.bin', d)}"
+SPL_BINARY = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'spl/u-boot-spl.bin', \
+ '', d)}"
+IMX_DEFAULT_BOOTLOADER_use-nxp-bsp = "u-boot-imx"
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-fslc"
+
+UBOOT_SUFFIX = "bin"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "imx8qm_mek_defconfig,sdcard"
+UBOOT_CONFIG[fspi] = "imx8qm_mek_fspi_defconfig"
+UBOOT_CONFIG[mfgtool] = "imx8qm_mek_defconfig"
+
+IMX_BOOT_SEEK = "32"
+
+IMAGE_BOOT_FILES += "hdmitxfw.bin hdmirxfw.bin dpfw.bin"
+
+# Set ATF platform name
+ATF_PLATFORM = "imx8qm"
+
+IMXBOOT_TARGETS_SD = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl', \
+ 'flash flash_ca72', d)}"
+IMXBOOT_TARGETS_FSPI = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl_flexspi', \
+ 'flash_flexspi', d)}"
+IMXBOOT_TARGETS = \
+ "${@bb.utils.contains('UBOOT_CONFIG', 'sd', '${IMXBOOT_TARGETS_SD}', \
+ '${IMXBOOT_TARGETS_FSPI}', d)}"
+IMX_BOOT_SOC_TARGET = "iMX8QM"
+
+BOARD_TYPE = "mek"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/imx8qmmek.conf b/conf/machine/imx8qmmek.conf
deleted file mode 100644
index c92e5fd2..00000000
--- a/conf/machine/imx8qmmek.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-#@TYPE: Machine
-#@NAME: i.MX 8QM MEK
-#@DESCRIPTION: i.MX 8QuadMax MEK board
-#@MAINTAINER: Alexandru Palalau <ioan-alexandru.palalau@nxp.com>
-
-MACHINEOVERRIDES =. "mx8:mx8qm:"
-
-require conf/machine/include/imx-base.inc
-require conf/machine/include/tune-cortexa72-cortexa53.inc
-
-IMX_DEFAULT_BSP = "nxp"
-
-MACHINE_FEATURES_append = " qca6174"
-
-# Don't include kernels in standard images
-RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
-
-LOADADDR = ""
-
-# We have to disable SERIAL_CONSOLE due to auto-serial-console
-SERIAL_CONSOLES = "115200;ttyAMA0"
-
-# we do not want to have getty running on tty1 as we run
-# auto-serial-console there
-USE_VT = "0"
-
-KERNEL_DEVICETREE = " \
- freescale/imx8qm-mek-ca53.dtb \
- freescale/imx8qm-mek-ca72.dtb \
- freescale/imx8qm-mek-dom0.dtb \
- freescale/imx8qm-mek-domu.dtb \
- freescale/imx8qm-mek-dsi-rm67191.dtb \
- freescale/imx8qm-mek-dsp.dtb \
- freescale/imx8qm-mek.dtb \
- freescale/imx8qm-mek-enet2-tja1100.dtb \
- freescale/imx8qm-mek-hdmi.dtb \
- freescale/imx8qm-mek-inmate.dtb \
- freescale/imx8qm-mek-jdi-wuxga-lvds1-panel.dtb \
- freescale/imx8qm-mek-ov5640.dtb \
- freescale/imx8qm-mek-root.dtb \
- freescale/imx8qm-mek-rpmsg.dtb \
-"
-
-UBOOT_MAKE_TARGET = "u-boot.bin"
-UBOOT_SUFFIX = "bin"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "imx8qm_mek_defconfig,sdcard"
-UBOOT_CONFIG[fspi] = "imx8qm_mek_fspi_defconfig"
-UBOOT_CONFIG[mfgtool] = "imx8qm_mek_defconfig"
-
-IMAGE_BOOTLOADER = "imx-boot"
-IMX_BOOT_SEEK = "33"
-
-WKS_FILE_DEPENDS_append = " firmware-imx-8"
-IMAGE_BOOT_FILES += "hdmitxfw.bin hdmirxfw.bin dpfw.bin"
-
-IMXBOOT_TARGETS = \
- "${@bb.utils.contains('UBOOT_CONFIG', 'sd', 'flash', \
- 'flash_flexspi', d)}"
-
-BOARD_TYPE = "mek"
-
-# Add additional firmware
-MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/imx8qxp-mek.conf b/conf/machine/imx8qxp-mek.conf
new file mode 100644
index 00000000..fe0f6727
--- /dev/null
+++ b/conf/machine/imx8qxp-mek.conf
@@ -0,0 +1,26 @@
+#@TYPE: Machine
+#@NAME: i.MX 8QXP MEK
+#@DESCRIPTION: i.MX 8QuadXPlus Multisensory Enablement Kit board
+#@MAINTAINER: Lauren Post <lauren.post@nxp.com>
+
+MACHINEOVERRIDES =. "mx8qxp:"
+
+require include/imx8x-mek.inc
+
+KERNEL_DEVICETREE_BASENAME = "${MACHINE}"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-a0.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dom0.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dpu-lcdif.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dpu-lcdif-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-enet2.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-inmate.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-lcdif.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-lcdif-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-pcie-ep.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-root.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-sof-cs42888.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-sof-wm8960.dtb \
+"
+
+UBOOT_CONFIG_BASENAME = "imx8qxp_mek"
diff --git a/conf/machine/imx8qxpmek.conf b/conf/machine/imx8qxpmek.conf
deleted file mode 100644
index bdce4b68..00000000
--- a/conf/machine/imx8qxpmek.conf
+++ /dev/null
@@ -1,64 +0,0 @@
-#@TYPE: Machine
-#@NAME: i.MX 8QXP MEK
-#@DESCRIPTION: i.MX 8QXP Multisensory Enablement Kit (MEK) board
-#@MAINTAINER: Cristinel Panfir <cristinel.panfir@nxp.com>
-
-MACHINEOVERRIDES =. "mx8:mx8x:mx8qxp:"
-
-require conf/machine/include/imx-base.inc
-require conf/machine/include/tune-cortexa35.inc
-
-IMX_DEFAULT_BSP = "nxp"
-
-MACHINE_FEATURES_append = " qca6174"
-
-# Don't include kernels in standard images
-RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
-
-LOADADDR = ""
-
-# We have to disable SERIAL_CONSOLE due to auto-serial-console
-SERIAL_CONSOLES = "115200;ttyAMA0"
-
-# we do not want to have getty running on tty1 as we run
-# auto-serial-console there
-USE_VT = "0"
-
-KERNEL_DEVICETREE = " \
- freescale/imx8qxp-mek-a0.dtb \
- freescale/imx8qxp-mek-dom0.dtb \
- freescale/imx8qxp-mek-dsi-rm67191.dtb \
- freescale/imx8qxp-mek-dsp.dtb \
- freescale/imx8qxp-mek.dtb \
- freescale/imx8qxp-mek-enet2.dtb \
- freescale/imx8qxp-mek-enet2-tja1100.dtb \
- freescale/imx8qxp-mek-inmate.dtb \
- freescale/imx8qxp-mek-it6263-lvds0-dual-channel.dtb \
- freescale/imx8qxp-mek-it6263-lvds1-dual-channel.dtb \
- freescale/imx8qxp-mek-jdi-wuxga-lvds0-panel.dtb \
- freescale/imx8qxp-mek-jdi-wuxga-lvds1-panel.dtb \
- freescale/imx8qxp-mek-ov5640.dtb \
- freescale/imx8qxp-mek-root.dtb \
- freescale/imx8qxp-mek-rpmsg.dtb \
- freescale/imx8qxp-mek-sof-cs42888.dtb \
- freescale/imx8qxp-mek-sof-wm8960.dtb \
-"
-
-UBOOT_MAKE_TARGET = "u-boot.bin"
-UBOOT_SUFFIX = "bin"
-UBOOT_CONFIG ??= "sd"
-UBOOT_CONFIG[sd] = "imx8qxp_mek_config,sdcard"
-UBOOT_CONFIG[fspi] = "imx8qxp_mek_fspi_defconfig"
-
-IMAGE_BOOTLOADER = "imx-boot"
-IMX_BOOT_SEEK = "32"
-
-IMXBOOT_TARGETS = \
- "${@bb.utils.contains('UBOOT_CONFIG', 'sd', 'flash', \
- bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
- 'UNKNOWN', d), d)}"
-
-BOARD_TYPE = "mek"
-
-# Add additional firmware
-MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 4be14fb1..d52123e2 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -5,10 +5,6 @@ include conf/machine/include/fsl-default-versions.inc
require conf/machine/include/utilities.inc
-# Set specific make target and binary suffix
-IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
-IMX_DEFAULT_BOOTLOADER_mx8 = "u-boot-imx"
-
# Machines or distros can define which BSP it should use by default. We are
# intending to default for mainline BSP by default and specific machines or
# DISTROs might change it if need.
@@ -22,40 +18,84 @@ IMX_DEFAULT_BSP_mx5 ?= "mainline"
MACHINEOVERRIDES =. "use-${IMX_DEFAULT_BSP}-bsp:"
+# UBOOT_BINARY is used inside the wks files to dynamically find the required
+# U-Boot file.
+UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
+
+# Using the 'IMX_DEFAULT_BOOTLOADER' the machine can support multiple bootloader
+# versions. This is done for NXP reference board where we support 'u-boot-fslc'
+# and 'u-boot-imx'.
+#
+# So, for example in imx6qdlsabresd, we support both flavor and for this we
+# define:
+#
+# ,----[ imx6qdlsabresd.conf ]
+# | ### u-boot-fslc settings ###
+# |
+# | SPL_BINARY_pn-u-boot-fslc = "SPL"
+# | UBOOT_MACHINE_pn-u-boot-fslc ?= "mx6sabresd_defconfig"
+# | UBOOT_SUFFIX_pn-u-boot-fslc = "img"
+# |
+# | ### u-boot-imx settings ###
+# |
+# | # The u-boot-imx does not provide unified functionality for DL/Q/QP SoC
+# | # variants. Change the defconfig to the targeted SoC variant.
+# | UBOOT_MACHINE_pn-u-boot-imx ?= "mx6qsabresd_defconfig"
+# | UBOOT_SUFFIX_pn-u-boot-imx = "imx"
+# `----
+#
+# As result, the 'UBOOT_SUFFIX' is dynamically set based on the preferred U-Boot
+# flavor to use.
+#
+# For machines where one of the flavors is required, we can force it. An example
+# is the imx53qsb, which we define:
+#
+# ,----[ imx53qsb.conf ]
+# | # This machine is not supported by u-boot-imx as it is not tested by NXP on this
+# | # board. So we force it to use u-boot-fslc which is based on mainline here.
+# | IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"
+# |
+# | UBOOT_MAKE_TARGET = "u-boot.imx"
+# | UBOOT_SUFFIX = "imx"
+# |
+# | UBOOT_MACHINE = "mx53loco_config"
+# `----
+IMX_DEFAULT_BOOTLOADER ??= "u-boot-fslc"
+UBOOT_SUFFIX ?= "${UBOOT_SUFFIX_pn-${IMX_DEFAULT_BOOTLOADER}}"
+
+IMX_DEFAULT_UBOOTTOOLS = "${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', 'u-boot-imx','u-boot-imx-tools', 'u-boot-tools', d)}"
+
PREFERRED_PROVIDER_u-boot ??= "${IMX_DEFAULT_BOOTLOADER}"
-PREFERRED_PROVIDER_u-boot-tools-native ??= "${IMX_DEFAULT_BOOTLOADER}-tools-native"
-PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-${IMX_DEFAULT_BOOTLOADER}-tools"
-PREFERRED_PROVIDER_u-boot-mkimage-native ??= "${IMX_DEFAULT_BOOTLOADER}-tools-native"
-PREFERRED_PROVIDER_nativesdk-u-boot-mkimage ??= "nativesdk-${IMX_DEFAULT_BOOTLOADER}-tools"
+PREFERRED_PROVIDER_u-boot-mfgtool ??= "${IMX_DEFAULT_BOOTLOADER}-mfgtool"
+PREFERRED_PROVIDER_u-boot-tools-native ??= "${IMX_DEFAULT_UBOOTTOOLS}-native"
+PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-${IMX_DEFAULT_UBOOTTOOLS}"
+PREFERRED_PROVIDER_u-boot-mkimage-native ??= "${IMX_DEFAULT_UBOOTTOOLS}-native"
+PREFERRED_PROVIDER_nativesdk-u-boot-mkimage ??= "nativesdk-${IMX_DEFAULT_UBOOTTOOLS}"
PREFERRED_PROVIDER_virtual/bootloader ??= "${IMX_DEFAULT_BOOTLOADER}"
PREFERRED_PROVIDER_u-boot-mxsboot-native ??= "u-boot-fslc-mxsboot-native"
-UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
-UBOOT_MAKE_TARGET ?= "u-boot.${UBOOT_SUFFIX}"
-UBOOT_MAKE_TARGET_mxs ?= "u-boot.sb"
-UBOOT_MAKE_TARGET_mx8 ?= ""
-
-UBOOT_SUFFIX ?= "imx"
-UBOOT_SUFFIX_mxs ?= "sb"
-UBOOT_SUFFIX_mx8 ?= "bin"
-
-UBOOT_ENTRYPOINT_mxs = "0x40008000"
-UBOOT_ENTRYPOINT_mx51 = "0x90008000"
-UBOOT_ENTRYPOINT_mx53 = "0x70008000"
-UBOOT_ENTRYPOINT_mx6 = "0x10008000"
-UBOOT_ENTRYPOINT_mx6sl = "0x80008000"
+UBOOT_ENTRYPOINT_mxs = "0x40008000"
+UBOOT_ENTRYPOINT_mx51 = "0x90008000"
+UBOOT_ENTRYPOINT_mx53 = "0x70008000"
+UBOOT_ENTRYPOINT_mx6 = "0x10008000"
+UBOOT_ENTRYPOINT_mx6sl = "0x80008000"
UBOOT_ENTRYPOINT_mx6sll = "0x80008000"
-UBOOT_ENTRYPOINT_mx6sx = "0x80008000"
+UBOOT_ENTRYPOINT_mx6sx = "0x80008000"
UBOOT_ENTRYPOINT_mx6ul = "0x10008000"
-UBOOT_ENTRYPOINT_mx6ull = "0x10008000"
-UBOOT_ENTRYPOINT_mx7 = "0x80008000"
+UBOOT_ENTRYPOINT_mx6ull = "0x10008000"
+UBOOT_ENTRYPOINT_mx6ulz = "0x10008000"
+UBOOT_ENTRYPOINT_mx7 = "0x80008000"
UBOOT_ENTRYPOINT_mx7ulp = "0x60008000"
-UBOOT_ENTRYPOINT_mx8mm = "0x40480000"
-UBOOT_ENTRYPOINT_mx8mn = "0x40480000"
-UBOOT_ENTRYPOINT_mx8mq = "0x40480000"
+UBOOT_ENTRYPOINT_mx8m = "0x40480000"
UBOOT_ENTRYPOINT_vf = "0x80008000"
+# Some derivates can utilize the boot container provided by U-Boot,
+# below variable sets that those machines which have a imx-boot-container
+# in their MACHINEOVERRIDES can inherit a imx-boot-container class
+UBOOT_PROVIDES_BOOT_CONTAINER = "0"
+UBOOT_PROVIDES_BOOT_CONTAINER_imx-boot-container = "1"
+
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER_DRIVER = "xf86-video-fbdev"
XSERVER_DRIVER_imxgpu2d = "xf86-video-imx-vivante"
@@ -79,12 +119,11 @@ MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
DEFAULTTUNE_mx6 ?= "cortexa9thf-neon"
DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon"
DEFAULTTUNE_mx6ull ?= "cortexa7thf-neon"
+DEFAULTTUNE_mx6ulz ?= "cortexa7thf-neon"
DEFAULTTUNE_mx7 ?= "cortexa7thf-neon"
DEFAULTTUNE_vf ?= "cortexa5thf-neon"
-DEFAULTTUNE_mx8mm ?= "cortexa53-crypto"
-DEFAULTTUNE_mx8mn ?= "cortexa53-crypto"
-DEFAULTTUNE_mx8mq ?= "cortexa53-crypto"
+DEFAULTTUNE_mx8m ?= "cortexa53-crypto"
DEFAULTTUNE_mx8qm ?= "cortexa72-cortexa53-crypto"
DEFAULTTUNE_mx8qxp ?= "cortexa35-crypto"
@@ -98,13 +137,16 @@ MACHINEOVERRIDES_EXTENDER_mx6sl = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6sll = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx6ul = "imxfbdev:imxpxp"
MACHINEOVERRIDES_EXTENDER_mx6ull = "imxfbdev:imxpxp:imxepdc"
+MACHINEOVERRIDES_EXTENDER_mx6ulz = "imxfbdev:imxpxp:imxepdc"
MACHINEOVERRIDES_EXTENDER_mx7d = "imxfbdev:imxpxp:imxepdc"
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"
+MACHINEOVERRIDES_EXTENDER_mx8dxl = "imxfbdev"
MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp = " \
imx \
@@ -117,17 +159,21 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp = " \
mx6sll \
mx6ul \
mx6ull \
+ mx6ulz \
\
mx7 \
mx7d \
mx7ulp \
\
mx8 \
+ mx8m \
mx8qm \
mx8mm \
mx8mn \
+ mx8mp \
mx8mq \
mx8qxp \
+ mx8dxl \
"
# Sub-architecture support
@@ -143,11 +189,14 @@ MACHINE_SOCARCH_SUFFIX_vf60 = "-vf60"
MACHINE_SOCARCH_SUFFIX_vf50 = "-vf50"
MACHINE_SOCARCH_SUFFIX_mx6ul = "-mx6ul"
MACHINE_SOCARCH_SUFFIX_mx6ull = "-mx6ul"
+MACHINE_SOCARCH_SUFFIX_mx6ulz = "-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_mx8dxl = "-mx8dxl"
MACHINE_SOCARCH_SUFFIX_use-mainline-bsp = "-imx"
MACHINE_ARCH_FILTER = "virtual/kernel"
@@ -158,7 +207,6 @@ MACHINE_SOCARCH_FILTER_append_imx = " \
"
MACHINE_SOCARCH_FILTER_append_imxvpu = " \
imx-codec \
- imx-parser \
imx-vpuwrap \
libimxvpuapi \
virtual/imxvpu \
@@ -170,6 +218,7 @@ MACHINE_SOCARCH_FILTER_append_imxgpu = " \
libdrm \
cairo \
libgal-imx \
+ opencv \
pango \
"
MACHINE_SOCARCH_FILTER_append_imxgpu2d = " \
@@ -193,11 +242,13 @@ MACHINE_SOCARCH_FILTER_append_use-mainline-bsp = " \
qtbase \
"
MACHINE_SOCARCH_FILTER_append_mx6q = " \
- virtual/opencl-icd \
+ opencl-icd-loader \
+ opencl-clhpp \
opencl-headers \
"
MACHINE_SOCARCH_FILTER_append_mx8 = " \
- virtual/opencl-icd \
+ opencl-icd-loader \
+ opencl-clhpp \
opencl-headers \
"
MACHINE_SOCARCH_FILTER_append_mx8qm = " \
@@ -217,6 +268,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 +278,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 +315,26 @@ 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"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8mq ?= "imx-gst1.0-plugin"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8qm ?= "imx-gst1.0-plugin"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8qxp ?= "imx-gst1.0-plugin"
+
+PREFERRED_VERSION_gstreamer1.0_mx8 ?= "1.16.2.imx"
+PREFERRED_VERSION_gstreamer1.0-plugins-base_mx8 ?= "1.16.2.imx"
+PREFERRED_VERSION_gstreamer1.0-plugins-good_mx8 ?= "1.16.3.imx"
+PREFERRED_VERSION_gstreamer1.0-plugins-bad_mx8 ?= "1.16.3.imx"
+PREFERRED_VERSION_gstreamer1.0-libav_mx8 ?= "1.16.0"
# Determines if the SoC has support for Vivante kernel driver
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0"
@@ -291,35 +357,41 @@ PREFERRED_PROVIDER_virtual/libgles1_imxgpu3d ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libgles2_imxgpu3d ?= "imx-gpu-viv"
PREFERRED_PROVIDER_virtual/libg2d ?= "imx-gpu-g2d"
PREFERRED_PROVIDER_virtual/libg2d_imxdpu ?= "imx-dpu-g2d"
+PREFERRED_PROVIDER_opencl-clhpp_imxgpu ?= "imx-gpu-viv"
+PREFERRED_PROVIDER_opencl-headers_imxgpu ?= "imx-gpu-viv"
+PREFERRED_PROVIDER_opencl-icd-loader_imxgpu ?= "imx-gpu-viv"
-PREFERRED_VERSION_weston_imx ?= "8.0.0.imx"
+PREFERRED_VERSION_weston_imx ?= "9.0.0.imx"
PREFERRED_VERSION_weston_use-mainline-bsp = ""
-PREFERRED_VERSION_wayland-protocols_mx6 ?= "1.18.imx"
-PREFERRED_VERSION_wayland-protocols_mx7 ?= "1.18.imx"
-PREFERRED_VERSION_wayland-protocols_mx8 ?= "1.18.imx"
+PREFERRED_VERSION_wayland-protocols_mx6 ?= "1.20.imx"
+PREFERRED_VERSION_wayland-protocols_mx7 ?= "1.20.imx"
+PREFERRED_VERSION_wayland-protocols_mx8 ?= "1.20.imx"
# Use i.MX libdrm Version
-PREFERRED_VERSION_libdrm_mx6 ?= "2.4.99.imx"
-PREFERRED_VERSION_libdrm_mx7 ?= "2.4.99.imx"
-PREFERRED_VERSION_libdrm_mx8 ?= "2.4.99.imx"
+PREFERRED_VERSION_libdrm_mx6 ?= "2.4.102.imx"
+PREFERRED_VERSION_libdrm_mx7 ?= "2.4.102.imx"
+PREFERRED_VERSION_libdrm_mx8 ?= "2.4.102.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.10.0.imx"
+PREFERRED_VERSION_optee-client_mx8 ?= "3.10.0.imx"
+PREFERRED_VERSION_optee-test_mx8 ?= "3.10.0.imx"
+
+#Use i.MX opencv Version for mx8
+PREFERRED_VERSION_opencv_mx8 ?= "4.4.0.imx"
# Handle default kernel
-IMX_DEFAULT_KERNEL = "linux-imx"
+IMX_DEFAULT_KERNEL = "linux-fslc-imx"
IMX_DEFAULT_KERNEL_mxs = "linux-fslc"
IMX_DEFAULT_KERNEL_mx5 = "linux-fslc"
-IMX_DEFAULT_KERNEL_mx6 = "linux-imx"
-IMX_DEFAULT_KERNEL_mx7 = "linux-imx"
-IMX_DEFAULT_KERNEL_mx8 = "linux-imx"
-IMX_DEFAULT_KERNEL_mx7ulp = "linux-imx"
-IMX_DEFAULT_KERNEL_mx6sll = "linux-imx"
-IMX_DEFAULT_KERNEL_mx6ul = "linux-imx"
-IMX_DEFAULT_KERNEL_mx6ull = "linux-imx"
+IMX_DEFAULT_KERNEL_mx6 = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx7 = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx8 = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx7ulp = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx6sll = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx6ul = "linux-fslc-imx"
+IMX_DEFAULT_KERNEL_mx6ull = "linux-fslc-imx"
IMX_DEFAULT_KERNEL_use-mainline-bsp = "linux-fslc"
PREFERRED_PROVIDER_virtual/kernel ??= "${IMX_DEFAULT_KERNEL}"
@@ -353,25 +425,43 @@ WKS_FILE_DEPENDS ?= " \
${@bb.utils.contains('MACHINE_FEATURES', 'optee', '${OPTEE_WKS_FILE_DEPENDS}', '', d)} \
"
-WKS_FILE_DEPENDS_append_mx8 = " imx-boot "
+WKS_FILE_DEPENDS_append_mx8 = " imx-boot"
+WKS_FILE_DEPENDS_append_mx8m = " imx-boot"
+
+# We need to restrict the append so we don't add this for other i.MX SoC's.
+# Derivatives that are not yet adopted the usage of boot container provided
+# by U-Boot build are still targeted to use 'imx-boot' package provided by
+# NXP. Moving those derivatives to mainline BSP would require to define an
+# 'imx-boot-container' override, and test if the U-Boot built 'flash.bin'
+# binary is used a replacement.
+# Note, that the results binary name of the boot container is set to 'imx-boot'
+# for both NXP and Mainline BSP.
+# For Mainline BSP: the 'flash.bin' boot container is renamed during the
+# deployment task extesion execution defined in imx-boot-container class.
+# For NXP BSP: rename is done in 'imx-boot' recipe at the execution of compile
+# task.
+WKS_FILE_DEPENDS_append_use-mainline-bsp_aarch64 = " \
+ ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0', 'imx-boot', '')} \
+"
SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks.in"
+SOC_DEFAULT_WKS_FILE_mx8m ?= "imx-imx-boot-bootpart.wks.in"
+
SOC_DEFAULT_WKS_FILE_mx8 ?= "imx-imx-boot-bootpart.wks.in"
SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
-WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
+# Boot container built as a part of mainline U-Boot uses the same WKS
+# file as the entire mx8m series, as it renames flash.bin binary to
+# imx-boot before it is packed into the boot partition.
+# This operation is performed in imx-boot-container class as a part of
+# delopyment task.
+# flash.bin binary is produced by U-Boot build itself, and is serves as a
+# direct replacement of imx-boot from NXP.
+# Creation of the flash.bin is controlled by UBOOT_PROVIDES_BOOT_CONTAINER
+# variable defined above
+SOC_DEFAULT_WKS_FILE_imx-boot-container ?= "imx-imx-boot-bootpart.wks.in"
-# 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"
+WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
SERIAL_CONSOLES = "115200;ttymxc0"
SERIAL_CONSOLES_mxs = "115200;ttyAMA0"
diff --git a/conf/machine/include/imx8mm-evk.inc b/conf/machine/include/imx8mm-evk.inc
new file mode 100644
index 00000000..9b590fe0
--- /dev/null
+++ b/conf/machine/include/imx8mm-evk.inc
@@ -0,0 +1,57 @@
+MACHINEOVERRIDES =. "imx-boot-container:mx8:mx8m:mx8mm:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa53.inc
+
+MACHINE_FEATURES += "pci wifi bluetooth bcm43455 bcm4356"
+
+# NXP BSP can consume BCM4359 and QCA9377 driver and firmware
+# Since the firmware is not available publicly, and rather distributed
+# under "Proprietary" license - we opt-out from using it in all BSPs
+# and pin it to NXP BSP only
+# OP-TEE is also applicable to NXP BSP, mainline BSP seems not to have
+# a full support for it yet.
+MACHINE_FEATURES_append_use-nxp-bsp = " optee bcm4359 qca9377"
+
+KERNEL_DEVICETREE = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-pcie-ep.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-rm67191.dtb \
+"
+UBOOT_DTB_NAME = "${KERNEL_DEVICETREE_BASENAME}.dtb"
+
+IMX_DEFAULT_BOOTLOADER_use-nxp-bsp = "u-boot-imx"
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-fslc"
+
+UBOOT_SUFFIX = "bin"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
+UBOOT_CONFIG[mfgtool] = "${UBOOT_CONFIG_BASENAME}_defconfig"
+
+SPL_BINARY = "spl/u-boot-spl.bin"
+
+ATF_PLATFORM = "imx8mm"
+ATF_LOAD_ADDR = "0x920000"
+
+# Extra firmware package name, that is required to build boot container for fslc bsp
+IMX_EXTRA_FIRMWARE = "firmware-imx-8m"
+
+IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_BASENAME}_flexspi', '${IMXBOOT_TARGETS_BASENAME}', d)}"
+
+IMX_BOOT_SOC_TARGET = "iMX8MM"
+
+SERIAL_CONSOLES = "115200;ttymxc1"
+
+LOADADDR = ""
+UBOOT_SUFFIX = "bin"
+UBOOT_MAKE_TARGET = "all"
+IMX_BOOT_SEEK = "33"
+
+OPTEE_BIN_EXT = "8mm"
+TEE_LOAD_ADDR = "0xbe000000"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/include/imx8mn-evk.inc b/conf/machine/include/imx8mn-evk.inc
new file mode 100644
index 00000000..6a5b31f7
--- /dev/null
+++ b/conf/machine/include/imx8mn-evk.inc
@@ -0,0 +1,63 @@
+MACHINEOVERRIDES =. "imx-boot-container:mx8:mx8m:mx8mn:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa53.inc
+
+MACHINE_FEATURES += "wifi bluetooth bcm43455 bcm4356"
+
+# NXP BSP can consume proprietary jailhouse and Broadcom drivers
+# OP-TEE is also applicable to NXP BSP, mainline BSP seems not to have
+# a full support for it yet.
+MACHINE_FEATURES_append_use-nxp-bsp = " optee jailhouse bcm4359"
+
+KERNEL_DEVICETREE = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-ak5558.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-inmate.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-rm67191.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-root.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-rpmsg.dtb \
+"
+UBOOT_DTB_NAME = "${KERNEL_DEVICETREE_BASENAME}.dtb"
+
+IMX_DEFAULT_BOOTLOADER_use-nxp-bsp = "u-boot-imx"
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-fslc"
+
+UBOOT_SUFFIX = "bin"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
+UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_defconfig"
+UBOOT_CONFIG[mfgtool] = "${UBOOT_CONFIG_BASENAME}_defconfig"
+
+SPL_BINARY = "spl/u-boot-spl.bin"
+
+ATF_PLATFORM = "imx8mn"
+ATF_LOAD_ADDR = "0x960000"
+
+# Extra firmware package name, that is required to build boot container for fslc bsp
+IMX_EXTRA_FIRMWARE = "firmware-imx-8m"
+
+IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_BASENAME}_flexspi', '${IMXBOOT_TARGETS_BASENAME}', d)}"
+
+IMX_BOOT_SOC_TARGET = "iMX8MN"
+
+SERIAL_CONSOLES = "115200;ttymxc1"
+
+BOOT_SPACE = "65536"
+LOADADDR = ""
+UBOOT_SUFFIX = "bin"
+UBOOT_MAKE_TARGET = "all"
+
+# Image boot offset as defined in section 6.1.6.1 "Primary image offset and IVT offset" of
+# i.MX 8M Nano Applications Processor Reference Manual, Rev. 0, 12/2019
+# Doc ID: IMX8MNRM
+IMX_BOOT_SEEK = "32"
+
+OPTEE_BIN_EXT = "8mn"
+TEE_LOAD_ADDR = "0x56000000"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/include/imx8mp-evk.inc b/conf/machine/include/imx8mp-evk.inc
new file mode 100644
index 00000000..872d07a0
--- /dev/null
+++ b/conf/machine/include/imx8mp-evk.inc
@@ -0,0 +1,55 @@
+MACHINEOVERRIDES =. "imx-boot-container:mx8:mx8m:mx8mp:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa53.inc
+
+MACHINE_FEATURES += "pci wifi bluetooth jailhouse"
+
+# OP-TEE is also applicable to NXP BSP, mainline BSP seems not to have
+# a full support for it yet.
+MACHINE_FEATURES_append_use-nxp-bsp = " optee mrvl8997"
+
+# Mainline kernel contains only one DTB file for
+# imx8mpevk machine
+KERNEL_DEVICETREE = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}.dtb \
+"
+
+UBOOT_DTB_NAME = "${KERNEL_DEVICETREE_BASENAME}.dtb"
+
+IMX_DEFAULT_BOOTLOADER_use-nxp-bsp = "u-boot-imx"
+IMX_DEFAULT_BOOTLOADER_use-mainline-bsp = "u-boot-fslc"
+
+UBOOT_SUFFIX = "bin"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
+UBOOT_CONFIG[ecc] = "${UBOOT_CONFIG_BASENAME}_inline_ecc_defconfig"
+UBOOT_CONFIG[mfgtool] = "${UBOOT_CONFIG_BASENAME}_defconfig"
+
+SPL_BINARY = "spl/u-boot-spl.bin"
+
+ATF_PLATFORM = "imx8mp"
+ATF_LOAD_ADDR = "0x970000"
+
+# Extra firmware package name, that is required to build boot container for fslc bsp
+IMX_EXTRA_FIRMWARE = "firmware-imx-8m"
+
+IMXBOOT_TARGETS = \
+ "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_BASENAME}_flexspi', \
+ '${IMXBOOT_TARGETS_BASENAME}', d)}"
+
+IMX_BOOT_SOC_TARGET = "iMX8MP"
+
+SERIAL_CONSOLES = "115200;ttymxc1"
+
+LOADADDR = ""
+UBOOT_SUFFIX = "bin"
+UBOOT_MAKE_TARGET = "all"
+IMX_BOOT_SEEK = "32"
+
+OPTEE_BIN_EXT = "8mp"
+TEE_LOAD_ADDR = "0x56000000"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/include/imx8x-mek.inc b/conf/machine/include/imx8x-mek.inc
new file mode 100644
index 00000000..814a34c1
--- /dev/null
+++ b/conf/machine/include/imx8x-mek.inc
@@ -0,0 +1,79 @@
+MACHINEOVERRIDES =. "mx8:mx8x:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa35.inc
+
+IMX_DEFAULT_BSP = "nxp"
+
+MACHINE_FEATURES += "pci optee bcm43455 bcm4356"
+MACHINE_FEATURES_append_use-nxp-bsp = " bcm4359"
+
+# Don't include kernels in standard images
+RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
+
+LOADADDR = ""
+
+# We have to disable SERIAL_CONSOLE due to auto-serial-console
+SERIAL_CONSOLES = "115200;ttyAMA0"
+
+# we do not want to have getty running on tty1 as we run
+# auto-serial-console there
+USE_VT = "0"
+
+KERNEL_DEVICETREE = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}.dtb \
+"
+KERNEL_DEVICETREE_append_use-nxp-bsp = " \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dsi-rm67191.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dsi-rm67191-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-dsp.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-enet2-tja1100.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-it6263-lvds0-dual-channel.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-it6263-lvds0-dual-channel-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-it6263-lvds1-dual-channel.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-it6263-lvds1-dual-channel-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-jdi-wuxga-lvds0-panel.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-jdi-wuxga-lvds0-panel-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-jdi-wuxga-lvds1-panel.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-jdi-wuxga-lvds1-panel-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-ov5640.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-ov5640-rpmsg.dtb \
+ freescale/${KERNEL_DEVICETREE_BASENAME}-rpmsg.dtb \
+"
+
+UBOOT_MAKE_TARGET = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '', \
+ 'u-boot.bin', d)}"
+SPL_BINARY = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'spl/u-boot-spl.bin', \
+ '', d)}"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
+UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_fspi_defconfig"
+
+IMX_BOOT_SEEK = "32"
+
+# This machine is not supported by u-boot-fslc, so we force it to use
+# u-boot-imx here.
+IMX_DEFAULT_BOOTLOADER = "u-boot-imx"
+UBOOT_SUFFIX = "bin"
+
+# Set ATF platform name
+ATF_PLATFORM = "imx8qx"
+
+IMXBOOT_TARGETS_SD = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl', \
+ 'flash', d)}"
+IMXBOOT_TARGETS_FSPI = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'flash_spl_flexspi', \
+ 'flash_flexspi', d)}"
+IMXBOOT_TARGETS = \
+ "${@bb.utils.contains('UBOOT_CONFIG', 'sd', '${IMXBOOT_TARGETS_SD}', \
+ '${IMXBOOT_TARGETS_FSPI}', d)}"
+IMX_BOOT_SOC_TARGET = "iMX8QX"
+
+BOARD_TYPE = "mek"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/include/qoriq-base.inc b/conf/machine/include/qoriq-base.inc
index 93e48505..e482b857 100644
--- a/conf/machine/include/qoriq-base.inc
+++ b/conf/machine/include/qoriq-base.inc
@@ -1,12 +1,12 @@
# common providers of QorIQ targets
-PREFERRED_PROVIDER_cryptodev-linux = "cryptodev-qoriq-linux"
-PREFERRED_PROVIDER_cryptodev-module = "cryptodev-qoriq-module"
-PREFERRED_PROVIDER_cryptodev-tests = "cryptodev-qoriq-tests"
PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq"
PREFERRED_PROVIDER_virtual/bootloader ?= "${PREFERRED_PROVIDER_u-boot}"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq"
+PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-native"
+PREFERRED_PROVIDER_u-boot-mkimage-native ??= "u-boot-tools-native"
+PREFERRED_PROVIDER_u-boot-mkimage ??= "u-boot-tools"
+PREFERRED_PROVIDER_nativesdk-u-boot-mkimage ??= "nativesdk-u-boot-tools"
PREFERRED_VERSION_testfloat = "2a"
-PREFERRED_PROVIDER_ptpd = "ptpd-qoriq"
SOC_DEFAULT_IMAGE_FSTYPES = "tar.gz ext2.gz.u-boot ext2.gz"
IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}"
@@ -32,6 +32,5 @@ MACHINE_SOCARCH_SUFFIX ?= ""
MACHINE_SOCARCH_SUFFIX_qoriq = "-qoriq"
MACHINE_ARCH_FILTER = "virtual/kernel"
-MACHINE_SOCARCH_FILTER_append_qoriq = " cryptodev-qoriq-linux cryptodev-qoriq-module cryptodev-qoriq-test"
INHERIT += "fsl-dynamic-packagearch"
diff --git a/conf/machine/ls1012afrwy.conf b/conf/machine/ls1012afrwy.conf
index 449e518c..72605cc1 100644
--- a/conf/machine/ls1012afrwy.conf
+++ b/conf/machine/ls1012afrwy.conf
@@ -27,5 +27,5 @@ RCWQSPI ?= "N_SSNP_3305/rcw_1000"
KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-frwy.dtb"
KERNEL_DEFCONFIG ?= "defconfig"
-EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw atf"
+EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw qoriq-atf"
USE_VT = "0"
diff --git a/conf/machine/ls1012ardb.conf b/conf/machine/ls1012ardb.conf
index 6efd6b3d..b4bfc571 100644
--- a/conf/machine/ls1012ardb.conf
+++ b/conf/machine/ls1012ardb.conf
@@ -28,5 +28,5 @@ RCWQSPISEC ?= "R_SPNH_3508/rcw_1000"
KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-rdb.dtb freescale/fsl-ls1012a-qds.dtb"
KERNEL_DEFCONFIG ?= "defconfig"
-EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw atf"
+EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw qoriq-atf"
USE_VT = "0"
diff --git a/conf/machine/ls1028ardb.conf b/conf/machine/ls1028ardb.conf
index b0bbc5b8..7647bf41 100644
--- a/conf/machine/ls1028ardb.conf
+++ b/conf/machine/ls1028ardb.conf
@@ -34,5 +34,5 @@ RCWSD ?= "R_SQPP_0x85bb/rcw_1500_gpu600"
RCWXSPI ?= "R_SQPP_0x85bb/rcw_1500_gpu600"
RCWEMMC ?= "R_SQPP_0x85bb/rcw_1500_gpu600"
-EXTRA_IMAGEDEPENDS += "rcw atf dp-firmware-cadence"
+EXTRA_IMAGEDEPENDS += "rcw qoriq-atf dp-firmware-cadence"
USE_VT = "0"
diff --git a/conf/machine/ls1043ardb.conf b/conf/machine/ls1043ardb.conf
index 6f1f7ea4..369abdcf 100644
--- a/conf/machine/ls1043ardb.conf
+++ b/conf/machine/ls1043ardb.conf
@@ -40,5 +40,5 @@ RCWSD ?= "RR_FQPP_1455/rcw_1600_sdboot"
RCWNAND ?= "RR_FQPP_1455/rcw_1600_nandboot"
QE_UCODE = "iram_Type_A_LS1021a_r1.0.bin"
-EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode uefi atf ls2-phy"
+EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode uefi qoriq-atf ls2-phy"
USE_VT = "0"
diff --git a/conf/machine/ls1046afrwy.conf b/conf/machine/ls1046afrwy.conf
index 884f7666..f6854a0c 100644
--- a/conf/machine/ls1046afrwy.conf
+++ b/conf/machine/ls1046afrwy.conf
@@ -37,5 +37,5 @@ SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
RCWQSPI ?= "NN_NNQNNPNP_3040_0506/rcw_1600_qspiboot"
RCWSD ?= "NN_NNQNNPNP_3040_0506/rcw_1600_sdboot"
-EXTRA_IMAGEDEPENDS += "fm-ucode rcw atf ls2-phy qe-ucode"
+EXTRA_IMAGEDEPENDS += "fm-ucode rcw qoriq-atf ls2-phy qe-ucode"
USE_VT = "0"
diff --git a/conf/machine/ls1046ardb.conf b/conf/machine/ls1046ardb.conf
index e8773366..64f26792 100644
--- a/conf/machine/ls1046ardb.conf
+++ b/conf/machine/ls1046ardb.conf
@@ -40,5 +40,5 @@ UEFI_QSPIBOOT ?= "LS1046ARDB_EFI_QSPIBOOT.fd"
RCWQSPI ?= "RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot"
RCWSD ?= "RR_FFSSPPPH_1133_5559/rcw_1800_sdboot"
-EXTRA_IMAGEDEPENDS += "fm-ucode rcw uefi atf qe-ucode ls2-phy"
+EXTRA_IMAGEDEPENDS += "fm-ucode rcw uefi qoriq-atf qe-ucode ls2-phy"
USE_VT = "0"
diff --git a/conf/machine/ls1088ardb-pb.conf b/conf/machine/ls1088ardb-pb.conf
index 2e456f1b..1ae5693b 100644
--- a/conf/machine/ls1088ardb-pb.conf
+++ b/conf/machine/ls1088ardb-pb.conf
@@ -31,5 +31,5 @@ RCWSD ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_sd"
RCWQSPI ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_qspi"
-EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex atf"
+EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex qoriq-atf"
USE_VT = "0"
diff --git a/conf/machine/ls1088ardb.conf b/conf/machine/ls1088ardb.conf
index 8f47f284..9922248f 100644
--- a/conf/machine/ls1088ardb.conf
+++ b/conf/machine/ls1088ardb.conf
@@ -30,5 +30,5 @@ SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
RCWSD ?= "FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_sd"
RCWQSPI ?= "FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_qspi"
-EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex atf"
+EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex qoriq-atf"
USE_VT = "0"
diff --git a/conf/machine/ls2088ardb.conf b/conf/machine/ls2088ardb.conf
index f920d601..92c99326 100644
--- a/conf/machine/ls2088ardb.conf
+++ b/conf/machine/ls2088ardb.conf
@@ -31,5 +31,5 @@ KERNEL_DEFCONFIG ?= "defconfig"
SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0"
SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
-EXTRA_IMAGEDEPENDS += "mc-utils ls2-phy rcw management-complex uefi atf"
+EXTRA_IMAGEDEPENDS += "mc-utils ls2-phy rcw management-complex uefi qoriq-atf"
USE_VT = "0"
diff --git a/conf/machine/lx2160ardb.conf b/conf/machine/lx2160ardb.conf
index a8bbdbda..5e68a9fd 100644
--- a/conf/machine/lx2160ardb.conf
+++ b/conf/machine/lx2160ardb.conf
@@ -32,5 +32,5 @@ RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2"
RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2"
RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2"
-EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi atf inphi"
+EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi"
USE_VT = "0"
diff --git a/conf/machine/lx2162aqds.conf b/conf/machine/lx2162aqds.conf
new file mode 100644
index 00000000..c7ab95fb
--- /dev/null
+++ b/conf/machine/lx2162aqds.conf
@@ -0,0 +1,36 @@
+#@TYPE: Machine
+#@NAME: NXP LX2162AQDS
+#@SOC: LSCH3
+#@DESCRIPTION: Machine configuration for running LX2162AQDS in 64-bit mode
+#@MAINTAINER: Zongchun Yu <Zongchun.Yu@nxp.com>
+
+require conf/machine/include/qoriq-arm64.inc
+require conf/machine/include/arm/arch-arm64.inc
+
+MACHINEOVERRIDES =. "fsl-lsch3:lx2162a:"
+
+MACHINE_FEATURES += "optee"
+
+KERNEL_CLASSES = " kernel-fitimage "
+KERNEL_IMAGETYPES = "fitImage"
+
+DTB_LOAD = "0x90000000"
+UBOOT_ENTRYPOINT = "0x80080000"
+
+UBOOT_CONFIG ??= "tfa-verified-boot tfa-secure-boot tfa"
+UBOOT_CONFIG[tfa] = "lx2162aqds_tfa_defconfig,,u-boot-dtb.bin"
+UBOOT_CONFIG[tfa-secure-boot] = "lx2162aqds_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin"
+UBOOT_CONFIG[tfa-verified-boot] = "lx2162aqds_tfa_verified_boot_defconfig,,u-boot-nodtb.bin"
+
+KERNEL_DEVICETREE ?= "freescale/fsl-lx2162a-qds.dtb"
+KERNEL_DEFCONFIG ?= "defconfig"
+
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0"
+SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
+
+RCWXSPI ?= "GGGG_NNNN_PPPP_PPPP_RR_17_2/rcw_2000_650_2900_17_2"
+RCWSD ?= "GGGG_NNNN_PPPP_PPPP_RR_17_2/rcw_2000_650_2900_17_2"
+RCWEMMC ?= "GGGG_NNNN_PPPP_PPPP_RR_17_2/rcw_2000_650_2900_17_2"
+
+EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy qoriq-atf inphi"
+USE_VT = "0"
diff --git a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-imx.inc
index cdd0f08f..cdd0f08f 100644
--- a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc
+++ b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-imx.inc
diff --git a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium/chromium.patch b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium/chromium.patch
index 0329d42e..0329d42e 100644
--- a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium/chromium.patch
+++ b/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium/chromium.patch
diff --git a/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini b/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini
index 6e8e0140..707a4078 100644
--- a/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini
+++ b/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini
@@ -2,12 +2,18 @@
shell=ivi-shell.so
modules=hmi-controller.so
#gbm-format=argb8888
+idle-time=0
#use-g2d=1
#xwayland=true
+#repaint-window=16
+#enable-overlay-view=1
#[shell]
#size=1920x1080
+[libinput]
+touchscreen_calibrator=true
+
[ivi-shell]
ivi-shell-user-interface=weston-ivi-shell-user-interface
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README
deleted file mode 100644
index 9578982d..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/README
+++ /dev/null
@@ -1,77 +0,0 @@
-test_setkey script usage
-
-The scripts in this directory may be used for testing
-native Linux IPsec with the talitos driver as a loadable module.
-
-It's assumed that these scripts have been placed in the directory
-named /test_setkey.
-
-The scripts setup_left and setup_right configure the ip addresses
-for two boards named 'left' and 'right', which are two gateways for
-an IPsec tunnel. Connect the eth1 interfaces of left and right boards together.
-For smartbits testing, connect eth0 on each board to a smartbits port.
-For other testing (ping, netperf, iperf), connect eth0 on each board to another system.
-
-The scripts named left.conf-* and right.conf-* are setkey scripts
-which configure the IPsec SA and SPD entries.
-The scripts ending in -tunnel use tunnel mode IPsec, and the scripts
-ending in -transport used transport mode IPsec.
-Transport mode is useful for quickly testing security functionality
-using ping or netperf between two boards.
-Tunnel mode can be used for testing throughput using smartbits or other
-performance test equipment.
-
-There is a top level script called 'setup' which
-is used for a one-step setup on the left and right boards.
-'setup' uses two or three parameters. The first parameter is the side, left or right.
-The second parameter is the setkey suffix for the left.conf- and right.conf- files.
-If the third parameter is supplied, the setup will modprobe that name, so
-typically you should provide talitos as the third parameter if you want to load the driver.
-If you have built the talitos driver into the kernel, omit the third parameter to setup.
-You may test software encryption if talitos is built as a module and you omit the third parameter.
-
-Below are example uses of the 'setup' script.
-
-1) One-step setup for smartbits
- Use a tunnel mode setup on each side.
- AES-HMAC-SHA1:
- Left side:
- /test_setkey/setup left aes-sha1-tunnel talitos
- Right side:
- /test_setkey/setup right aes-sha1-tunnel talitos
-
- 3DES-HMAC-SHA1:
- Left side:
- /test_setkey/setup left 3des-sha1-tunnel talitos
- Right side:
- /test_setkey/setup right 3des-sha1-tunnel talitos
-
-2) One-step setup for testing ping, netperf, or iperf between two boards.
- Use a transport mode setup on each side.
- AES-HMAC-SHA1:
- Left side:
- /test_setkey/setup left aes-sha1-transport talitos
- Right side:
- /test_setkey/setup right aes-sha1-transport talitos
-
- 3DES-HMAC-SHA1:
- Left side:
- /test_setkey/setup left 3des-sha1-transport talitos
- Right side:
- /test_setkey/setup right 3des-sha1-transport talitos
-
-3) Testing ipv4
- To test ipv4 (with no security) over the two gateways, use steps below.
- Testing ipv4 is helpful to get your smartbits configuration verified
- and also establish a baseline performance for throughput.
-
- On the left board:
- cd /test_setkey
- ./setup_left
- ./left.ipv4
-
- On the right board:
- cd /test_setkey
- ./setup_right
- ./right.ipv4
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel
deleted file mode 100755
index 6bd6c5d8..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_left.conf-3des-sha1-tunnel
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel
deleted file mode 100755
index eebf307a..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/auto_right.conf-3des-sha1-tunnel
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey
deleted file mode 100755
index 0be30562..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/flush-setkey
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/sbin/setkey -f
-
-flush;
-spdflush;
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left
deleted file mode 100644
index d9d6c0c6..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.left
+++ /dev/null
@@ -1,29 +0,0 @@
-# /etc/ipsec.conf - strongSwan IPsec configuration file
-
-config setup
- charondebug="chd 2, knl 2"
- crlcheckinterval=180
- strictcrlpolicy=no
- plutostart=no
-
-conn %default
- ikelifetime=60m
- keylife=20m
- rekeymargin=3m
- keyingtries=1
- keyexchange=ikev2
- type=tunnel
- auth=esp
- compress=no
- mobike=no
-
-conn net-net
- left=200.200.200.10
- leftsubnet=192.168.1.0/24
- leftcert=moonCert.pem
- leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
- leftfirewall=yes
- right=200.200.200.20
- rightsubnet=192.168.2.0/24
- rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
- auto=add
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right
deleted file mode 100644
index c14dee2b..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.conf.right
+++ /dev/null
@@ -1,28 +0,0 @@
-# /etc/ipsec.conf - strongSwan IPsec configuration file
-
-config setup
- charondebug="chd 2, knl 2"
- crlcheckinterval=180
- strictcrlpolicy=no
- plutostart=no
-
-conn %default
- ikelifetime=60m
- keylife=20m
- rekeymargin=3m
- keyingtries=1
- keyexchange=ikev2
- auth=esp
- compress=no
- mobike=no
-
-conn net-net
- left=200.200.200.20
- leftcert=sunCert.pem
- leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
- leftsubnet=192.168.2.0/24
- leftfirewall=yes
- right=200.200.200.10
- rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
- rightsubnet=192.168.1.0/24
- auto=add
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left
deleted file mode 100644
index e86d6aa5..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.left
+++ /dev/null
@@ -1,3 +0,0 @@
-# /etc/ipsec.secrets - strongSwan IPsec secrets file
-
-: RSA moonKey.pem
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right
deleted file mode 100644
index 1095b74c..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec.secrets.right
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/ipsec.secrets - strongSwan IPsec secrets file
-
-: RSA sunKey.pem
-
-
-
-
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left
deleted file mode 100644
index 55025dbc..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.left
+++ /dev/null
@@ -1,39 +0,0 @@
-# /etc/ipsec.conf - strongSwan IPsec configuration file
-
-config setup
- plutodebug=control
- crlcheckinterval=180
- strictcrlpolicy=no
- charonstart=no
-
-conn %default
- ikelifetime=60m
- keylife=20m
- rekeymargin=3m
- keyingtries=1
- keyexchange=ikev1
- left=200.200.200.10
- leftcert=moonCert.pem
- leftid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
- leftfirewall=yes
-
-conn net-net
- left=%defaultroute
- leftsubnet=192.168.1.0/24
- leftcert=moonCert.pem
- right=200.200.200.20
- rightsubnet=192.168.2.0/24
- rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
- auto=add
-
-conn host-host
- left=%defaultroute
- leftcert=moonCert.pem
- right=200.200.200.20
- rightid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
- auto=add
-
-conn rw
- leftsubnet=192.168.1.0/24
- right=%any
- auto=add
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right
deleted file mode 100644
index 479791ea..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/ipsec_ikev1.conf.right
+++ /dev/null
@@ -1,34 +0,0 @@
-# /etc/ipsec.conf - strongSwan IPsec configuration file
-
-config setup
- plutodebug=control
- crlcheckinterval=180
- strictcrlpolicy=no
- charonstart=no
-
-conn %default
- ikelifetime=60m
- keylife=20m
- rekeymargin=3m
- keyingtries=1
- keyexchange=ikev1
- left=200.200.200.20
- leftcert=sunCert.pem
- leftid="C=CH, O=Linux strongSwan, CN=sun.strongswan.org"
- leftfirewall=yes
-
-conn net-net
- left=%defaultroute
- leftsubnet=192.168.2.0/24
- leftcert=sunCert.pem
- right=200.200.200.10
- rightsubnet=192.168.1.0/24
- rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
- auto=add
-
-conn host-host
- left=%defaultroute
- leftcert=sunCert.pem
- right=200.200.200.10
- rightid="C=CH, O=Linux strongSwan, CN=moon.strongswan.org"
- auto=add
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport
deleted file mode 100755
index 5422771b..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel
deleted file mode 100755
index 52bf9c3f..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-md5-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport
deleted file mode 100755
index e5ee0054..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-transport
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel
deleted file mode 100755
index eb2881db..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha1-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport
deleted file mode 100755
index b5286320..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel
deleted file mode 100755
index e7726f08..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-3des-sha256-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport
deleted file mode 100755
index 96f57837..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel
deleted file mode 100755
index b2cf84bf..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-md5-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport
deleted file mode 100755
index f3ffaf5c..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-transport
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel
deleted file mode 100755
index 1ab7874f..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha1-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport
deleted file mode 100755
index d2645d6f..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel
deleted file mode 100755
index 8ed697d1..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-aes-sha256-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport
deleted file mode 100755
index 84275d07..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.10
-
-flush;
-spdflush;
-
-# ESP SAs doing null encryption
-# and null authentication
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E null
- -A null;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E null
- -A null;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P in ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P out ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel
deleted file mode 100755
index 478d14a8..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.conf-null-null-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway A (eth0:192.168.1.130, eth1:200.200.200.10)
-#
-# Security policies
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P out ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P in ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-
-# ESP SAs doing null encryption
-# and null authentication
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E null
- -A null;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E null
- -A null;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4 b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4
deleted file mode 100755
index e219f2ad..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/left.ipv4
+++ /dev/null
@@ -1,2 +0,0 @@
-set -v
-route add -net 192.168.2.0 netmask 255.255.255.0 gw 200.200.200.20
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem
deleted file mode 100644
index d5c970f4..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonCert.pem
+++ /dev/null
@@ -1,25 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEIjCCAwqgAwIBAgIBFzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
-MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
-b290IENBMB4XDTA5MDgyNzEwMDMzMloXDTE0MDgyNjEwMDMzMlowRjELMAkGA1UE
-BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xHDAaBgNVBAMTE21vb24u
-c3Ryb25nc3dhbi5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDK
-L2M91Lu6BYYhWxWgMS9z9TMSTwszm5rhO7ZIsCtMRo4PAeYw+++SGXt3CPXb/+p+
-SWKGlm11rPE71eQ3ehgh2C3hAurfmWO0iQQaCw+fdreeIVCqOQIOP6UqZ327h5yY
-YpHk8VQv4vBJTpxclU1PqnWheqe1ZlLxsW773LRml/fQt/UgvJkCBTZZONLNMfK+
-7TDnYaVsAtncgvDN78nUNEe2qY92KK7SrBJ6SpUEg49m51F+XgsGcsgWVHS85on3
-Om/G48crLEVJjdu8CxewSRVgb+lPJWzHd8QsU0Vg/7vlqs3ZRMyNtNKrr4opSvVb
-A6agGlTXhDCreDiXU8KHAgMBAAGjggEaMIIBFjAJBgNVHRMEAjAAMAsGA1UdDwQE
-AwIDqDAdBgNVHQ4EFgQUapx00fiJeYn2WpTpifH6w2SdKS4wbQYDVR0jBGYwZIAU
-XafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkwFwYDVQQK
-ExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJvb3QgQ0GC
-AQAwHgYDVR0RBBcwFYITbW9vbi5zdHJvbmdzd2FuLm9yZzATBgNVHSUEDDAKBggr
-BgEFBQcDATA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vY3JsLnN0cm9uZ3N3YW4u
-b3JnL3N0cm9uZ3N3YW4uY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCctXg2xeMozaTV
-jiBL1P8MY9uEH5JtU0EceQ1RbI5/2vGRdnECND9oADY5vamaaE2Mdq2Qh/vlXnML
-o3ii5ELjsQlYdTYZOcMOdcUUXYvbbFX1cwpkBhyBl1H25KptHcgQ/HnceKp3kOuq
-wYOYjgwePXulcpWXx0E2QtQCFQQZFPyEWeNJxH0oglg53QPXfHY9I2/Gukj5V0bz
-p7ME0Gs8KdnYdmbbDqzQgPsta96/m+HoJlsrVF+4Gqihj6BWMBQ2ybjPWZdG3oH9
-25cE8v60Ry98D0Z/tygbAUFnh5oOvaf642paVgc3aoA77I8U+UZjECxISoiHultY
-7QTufOwP
------END CERTIFICATE-----
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem
deleted file mode 100644
index 4d99866f..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/moonKey.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAyi9jPdS7ugWGIVsVoDEvc/UzEk8LM5ua4Tu2SLArTEaODwHm
-MPvvkhl7dwj12//qfklihpZtdazxO9XkN3oYIdgt4QLq35ljtIkEGgsPn3a3niFQ
-qjkCDj+lKmd9u4ecmGKR5PFUL+LwSU6cXJVNT6p1oXqntWZS8bFu+9y0Zpf30Lf1
-ILyZAgU2WTjSzTHyvu0w52GlbALZ3ILwze/J1DRHtqmPdiiu0qwSekqVBIOPZudR
-fl4LBnLIFlR0vOaJ9zpvxuPHKyxFSY3bvAsXsEkVYG/pTyVsx3fELFNFYP+75arN
-2UTMjbTSq6+KKUr1WwOmoBpU14Qwq3g4l1PChwIDAQABAoIBACBFB/Xqajv6fbn9
-K6pxrz02uXwGmacXAtVIDoPzejWmXS4QA4l17HrJDmelSnhelDKry8nnYHkTrTz7
-mn0wQ4HDWy86o/okJUG/TKRLd6bf79aRQqqohqd3iQkHk43GyzuXH+oGioVKF0fc
-ACDWw4wfjL7FMNdHCZ4Bz9DrHO/ysHe9B6rvSYm3VZRhSxaneIkaLkkDadKpVx3f
-XNFlMxY4qKPJYYSoJZ61iMqrO7+rnA93tmyDDs8PKU3BtnpfNrdePgleJHhk8Zqy
-Ev2/NOCSUxbKE8NCtLpGTs+T0qjjnu4k3WPd3ZOBAan0uPDekHZeHB/aXGLhYcxx
-J5SurqECgYEA+F1gppkER5Jtoaudt/CUpdQ1sR9wxf75VBqJ4FiYABGQz9xlG4oj
-zL/o572s0iV3bwFpnQa+WuWrxGkP6ZuB/Z82npc0N/vLou/b4dxvg4n7K+eOOEf0
-8FMjsse2tqTIXKCqcmQnR0NPQ1jwuvEKsXP5w/JOlnRXAXnd4jxsJI0CgYEA0GaT
-61ySttUW9jC3mxuY6jkQy8TEQqR3nOFvWwmCXIWOpN/MTTPus+Telxp/pdKhU+mo
-PmX3Unyne5PvwleWDq3YzltX5ZDZGJ5UJlKuNnfGIzQ6OcHRbb7zBpQG6qSRPuug
-bgo688hTnb1L59nK88zWVK45euf6pyuoI+SwIGMCgYEA7yvE8knyhBXvezuv0z1b
-eGHmHp5/VDwY0DQKSEAoiBBiWrkLqLybgwXf/KJ8dZZc8En08aFX2GLJyYe/KiB1
-ys3ypEBJqgvRayP+o/9KZ+qNNRd0rqAksPXvL7ABNNt0kzapTSVDae3Yu6s/j1am
-DIL5qAeERIDedG5uDPpQzdUCgYB7MtjpP63ABhLv8XbpbBQnCxtByw3W89F+Xcrt
-v55gQdhE4cSuMzA/CuMH4vNpPS6AI9aBJNhj3CtKo/cOJachAGb1/wvkO5ALvLW0
-fhZdPstUTnDJain7vfF/hwzbs/PlhXgu9T9KlLfRvXFdG+Sd4g8mumRiozcLkoRw
-y6XPTwKBgDJP+s9wXmdG90HST/aqC7FKrVXLpB63dY5swNUfQP6sa0pFnON0r0JC
-h/YCsGFFIAebQ2uOkM3g3f9nkwTp7910ov+/5uThvRI2w2BBPy0mVuALPjyyF1Z2
-cb9zpyKiIuXoXRCf4sd8r1lR9bn0Fxx0Svpxf+fpMGSI5quHNBKY
------END RSA PRIVATE KEY-----
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh
deleted file mode 100755
index faefb245..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-#
-# Usage: ./pingsizes.sh 1440 20 (or greater)
-#
-
-PINGDEST=${PINGDEST:-200.200.200.10}
-k=$1
-lim="$((k+$2))"
-((k-=1))
-while [ "$k" != "$lim" ] ; do
- echo -n "ping -s $((k+=1)) : "
- ping -i 1000 -c 1 -s $k $PINGDEST | grep packets &
- sleep 1
- PID=`ps -eaf | grep 'ping -i' | grep -v grep | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
- if [ -n "$PID" ] ; then
- echo "****************** killing $PID"
- kill $PID > /dev/null
- fi
-done
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
deleted file mode 100755
index d5ff0f7d..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizest.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-#
-# Usage: ./pingsizes.sh 1440 20 (or greater)
-#
-
-PINGDEST=${PINGDEST:-200.200.200.10}
-k=$1
-lim="$((k+$2))"
-((k-=1))
-while [ "$k" != "$lim" ] ; do
- echo ping -s $((k+=1))
- ping -i 1000 -c 1 -s $k $PINGDEST &
- sleep 1
- PID=`ps -eaf | grep 'ping -i' | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
- if [ -n "$PID" ] ; then
- echo "****************** killing $PID"
- kill $PID
- fi
-done
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt
deleted file mode 100644
index 46c1ff41..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/psk.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-200.200.200.20 secretkeyracoon
-200.200.200.10 secretkeyracoon
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf
deleted file mode 100644
index cf561f51..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/racoon.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-path pre_shared_key "/test_setkey/psk.txt" ;
-
- remote anonymous
- {
- exchange_mode main ;
- lifetime time 1 hour ;
- proposal {
- encryption_algorithm 3des;
- hash_algorithm sha1;
- authentication_method pre_shared_key ;
- dh_group 2 ;
- }
- }
-
- sainfo anonymous
- {
- pfs_group 2;
- lifetime time 1 hour ;
- encryption_algorithm 3des ;
- authentication_algorithm hmac_sha1 ;
- compression_algorithm deflate ;
- }
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport
deleted file mode 100755
index 7f82fb46..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel
deleted file mode 100755
index 5a752579..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-md5-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport
deleted file mode 100755
index 6ef885d4..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-transport
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
-# Security policies
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel
deleted file mode 100755
index 16c31578..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha1-tunnel
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport
deleted file mode 100755
index b9772092..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel
deleted file mode 100755
index e7c5b4e6..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-3des-sha256-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
- -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
- -E 3des-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport
deleted file mode 100755
index 5d55d001..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel
deleted file mode 100755
index f49bd54a..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-md5-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-md5 authentication using 128 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-md5 0xd5f603abc8cd9d19319ca32fb955b10f;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-md5 0x1dd90b4c32dcbe9d37b555a23df5170e;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport
deleted file mode 100755
index d9c65a45..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-transport
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
-# Security policies
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel
deleted file mode 100755
index 1f10136a..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha1-tunnel
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha1 authentication using 160 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha1 0xe9c43acd5e8d779b6e09c87347852708ab49bdd3;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha1 0xea6856479330dc9c17b8f6c37e2a895363d83f21;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport
deleted file mode 100755
index 817a8bd4..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel
deleted file mode 100755
index 9bca18fb..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-aes-sha256-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board A setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-
-# ESP SAs doing encryption using 192 bit long keys (168 + 24 parity)
-# and hmac-sha2-256 authentication using 256 bit long keys
-add 200.200.200.10 200.200.200.20 esp 0x10513 -m tunnel
- -E aes-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831
- -A hmac-sha2-256 0x4de03bebf6beb4fdef5a67d349a09580466cc4e54503333b2a5fd34538c91198;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514 -m tunnel
- -E aes-cbc 0xf6ddb555acfd9d77b03ea3843f2653255afe8eb5573965df
- -A hmac-sha2-256 0x5e01eb780b7ecc074ca2ca4fa4a5ea2ff841c977da0ce61c49d1fe767ea5452c;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport
deleted file mode 100755
index 26dfe2e1..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-transport
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/sbin/setkey -f
-#I am 200.200.200.20
-
-flush;
-spdflush;
-
-# ESP SAs doing null encryption
-# and null authentication
-add 200.200.200.10 200.200.200.20 esp 0x10513
- -E null
- -A null;
-
-add 200.200.200.20 200.200.200.10 esp 0x10514
- -E null
- -A null;
-
-
-spdadd 200.200.200.20 200.200.200.10 any -P out ipsec
- esp/transport//require;
-
-spdadd 200.200.200.10 200.200.200.20 any -P in ipsec
- esp/transport//require;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel
deleted file mode 100755
index bc4f38eb..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.conf-null-null-tunnel
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/sbin/setkey -f
-#
-#
-# Example ESP Tunnel for VPN.
-#
-# ========= ESP =========
-# | |
-# Network-A Gateway-A Gateway-B Network-B
-# 192.168.1.0/24 ---- 200.200.200.10 ------ 200.200.200.20 ---- 192.168.2.0/24
-#
-# ====== 83xx board A ====== ===== 83xx board B =====
-# | | | |
-# eth0 eth1 eth1 eth0
-# 192.168.1.130 200.200.200.10 200.200.200.20 192.168.2.130
-#
-#
-# Board B setup
-#
-# Flush the SAD and SPD
-flush;
-spdflush;
-
-# I am gateway B (eth0:192.168.2.130, eth1:200.200.200.20)
-#
-# Security policies
-spdadd 192.168.2.0/24 192.168.1.0/24 any -P out ipsec
- esp/tunnel/200.200.200.20-200.200.200.10/require;
-
-spdadd 192.168.1.0/24 192.168.2.0/24 any -P in ipsec
- esp/tunnel/200.200.200.10-200.200.200.20/require;
-
-
-# ESP SAs doing null encryption
-# and null authentication
-add 200.200.200.10 200.200.200.20 esp 0x201 -m tunnel
- -E null
- -A null;
-
-add 200.200.200.20 200.200.200.10 esp 0x301 -m tunnel
- -E null
- -A null;
-
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4 b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4
deleted file mode 100755
index 67cd1b2c..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/right.ipv4
+++ /dev/null
@@ -1,2 +0,0 @@
-set -v
-route add -net 192.168.1.0 netmask 255.255.255.0 gw 200.200.200.10
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup
deleted file mode 100755
index 9e6fa7fa..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup
+++ /dev/null
@@ -1,47 +0,0 @@
-# setup - quick setup for left or right side of ipsec test
-# see README for example use.
-
-SCRIPT_HOME=/test_setkey/
-cd $SCRIPT_HOME
-
-export PATH=$SCRIPT_HOME:$PATH
-
-if [ "$1" != "left" -a "$1" != "right" ] ; then
- echo "Usage: $0 side [config] [driver]"
- echo " where side is either left or right."
- echo " where config is either"
- echo " aes-sha1-tunnel (default)"
- echo " or 3des-sha1-tunnel"
- echo " if driver is supplied, script does 'modprobe driver'"
- exit 1
-fi
-
-SIDE=$1
-POLICY_CFG=$SIDE.conf
-DEFAULT_POLICY=aes-sha1-tunnel
-
-if [ -n "$2" ] ; then
- POLICY=$2
-else
- POLICY=$DEFAULT_POLICY
-fi
-
-SETKEY_FILE=$POLICY_CFG-$POLICY
-
-if [ ! -f $SETKEY_FILE ] ; then
- echo "Missing setkey command file: $SETKEY_FILE"
- exit 1
-fi
-
-# modprobe any driver name given as last parameter
-if [ -n "$3" ] ; then
- modprobe $3
-fi
-
-SETUP_CMD_FILE=./setup_$SIDE
-. $SETUP_CMD_FILE
-
-$SETKEY_FILE
-
-setkey -D
-setkey -D -P
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left
deleted file mode 100755
index da769099..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_left
+++ /dev/null
@@ -1,13 +0,0 @@
-# board on left setup
-set -v
-ifconfig eth0 down
-ifconfig eth0 hw ether 00:04:9F:11:22:33
-ifconfig eth0 192.168.1.130 netmask 255.255.255.0
-ifconfig eth0 up
-ifconfig eth1 down
-ifconfig eth1 hw ether 00:E0:0C:00:7D:FD
-ifconfig eth1 200.200.200.10 netmask 255.255.255.0
-ifconfig eth1 up
-arp -s 192.168.1.21 00:00:00:00:00:01
-route add default dev eth1
-echo 1 > /proc/sys/net/ipv4/ip_forward
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right
deleted file mode 100755
index f0e333ee..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/setup_right
+++ /dev/null
@@ -1,13 +0,0 @@
-# board on right setup
-set -v
-ifconfig eth0 down
-ifconfig eth0 hw ether 00:E0:0C:00:01:FD
-ifconfig eth0 192.168.2.130 netmask 255.255.255.0
-ifconfig eth0 up
-ifconfig eth1 down
-ifconfig eth1 hw ether 00:E0:0C:00:00:FD
-ifconfig eth1 200.200.200.20 netmask 255.255.255.0
-ifconfig eth1 up
-arp -s 192.168.2.21 00:00:00:00:00:02
-route add default dev eth1
-echo 1 > /proc/sys/net/ipv4/ip_forward
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf
deleted file mode 100644
index 1701f4ab..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# strongswan.conf - strongSwan configuration file
-
-charon {
- load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-raw updown
- multiple_authentication = no
-}
-
-pluto {
-
- # plugins to load in pluto
- #load = aes des sha1 md5 sha2 hmac gmp random pubkey
-
-}
-
-libstrongswan {
-
- # set to no, the DH exponent size is optimized
- # dh_exponent_ansi_x9_42 = no
-}
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem
deleted file mode 100644
index 0865ad22..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswanCert.pem
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIDuDCCAqCgAwIBAgIBADANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
-MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
-b290IENBMB4XDTA0MDkxMDEwMDExOFoXDTE5MDkwNzEwMDExOFowRTELMAkGA1UE
-BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9u
-Z1N3YW4gUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL/y
-X2LqPVZuWLPIeknK86xhz6ljd3NNhC2z+P1uoCP3sBMuZiZQEjFzhnKcbXxCeo2f
-FnvhOOjrrisSuVkzuu82oxXD3fIkzuS7m9V4E10EZzgmKWIf+WuNRfbgAuUINmLc
-4YGAXBQLPyzpP4Ou48hhz/YQo58Bics6PHy5v34qCVROIXDvqhj91P8g+pS+F21/
-7P+CH2jRcVIEHZtG8M/PweTPQ95dPzpYd2Ov6SZ/U7EWmbMmT8VcUYn1aChxFmy5
-gweVBWlkH6MP+1DeE0/tL5c87xo5KCeGK8Tdqpe7sBRC4pPEEHDQciTUvkeuJ1Pr
-K+1LwdqRxo7HgMRiDw8CAwEAAaOBsjCBrzASBgNVHRMBAf8ECDAGAQH/AgEBMAsG
-A1UdDwQEAwIBBjAdBgNVHQ4EFgQUXafdcAZRMn7ntm2zteXgYOouTe8wbQYDVR0j
-BGYwZIAUXafdcAZRMn7ntm2zteXgYOouTe+hSaRHMEUxCzAJBgNVBAYTAkNIMRkw
-FwYDVQQKExBMaW51eCBzdHJvbmdTd2FuMRswGQYDVQQDExJzdHJvbmdTd2FuIFJv
-b3QgQ0GCAQAwDQYJKoZIhvcNAQELBQADggEBACOSmqEBtBLR9aV3UyCI8gmzR5in
-Lte9aUXXS+qis6F2h2Stf4sN+Nl6Gj7REC6SpfEH4wWdwiUL5J0CJhyoOjQuDl3n
-1Dw3dE4/zqMZdyDKEYTU75TmvusNJBdGsLkrf7EATAjoi/nrTOYPPhSUZvPp/D+Y
-vORJ9Ej51GXlK1nwEB5iA8+tDYniNQn6BD1MEgIejzK+fbiy7braZB1kqhoEr2Si
-7luBSnU912sw494E88a2EWbmMvg2TVHPNzCpVkpNk7kifCiwmw9VldkqYy9y/lCa
-Epyp7lTfKw7cbD04Vk8QJW782L6Csuxkl346b17wmOqn8AZips3tFsuAY3w=
------END CERTIFICATE-----
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left
deleted file mode 100755
index e55c3e42..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_left
+++ /dev/null
@@ -1,10 +0,0 @@
-#strongswan on left board
-set -v
-cp -rf ipsec.conf.left /etc/ipsec.conf
-cp -rf ipsec.secrets.left /etc/ipsec.secrets
-cp -rf strongswan.conf /etc/
-cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/
-cp -rf moonCert.pem /etc/ipsec.d/certs/
-mkdir /etc/ipsec.d/private
-cp -rf sunKey.pem /etc/ipsec.d/private/
-cp -rf moonKey.pem /etc/ipsec.d/private/
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right
deleted file mode 100755
index bcdbb731..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/strongswan_right
+++ /dev/null
@@ -1,10 +0,0 @@
-#strongswan on left board
-set -v
-cp -rf ipsec.conf.right /etc/ipsec.conf
-cp -rf ipsec.secrets.right /etc/ipsec.secrets
-cp -rf strongswan.conf /etc/
-cp -rf strongswanCert.pem /etc/ipsec.d/cacerts/
-cp -rf sunCert.pem /etc/ipsec.d/certs/
-mkdir /etc/ipsec.d/private
-cp -rf sunKey.pem /etc/ipsec.d/private/
-cp -rf moonKey.pem /etc/ipsec.d/private/
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem
deleted file mode 100644
index d0937bab..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunCert.pem
+++ /dev/null
@@ -1,25 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEIDCCAwigAwIBAgIBFjANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ
-MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS
-b290IENBMB4XDTA5MDgyNzA5NTkwNFoXDTE0MDgyNjA5NTkwNFowRTELMAkGA1UE
-BhMCQ0gxGTAXBgNVBAoTEExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN1bi5z
-dHJvbmdzd2FuLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN+V
-VIpn6Q5jaU//EN6p6A5cSfUfhBK0mFa2laFFZh/Y0h66AXqqrQ3X917h7YNsSk68
-oowY9h9I3gOx7hNVBsJr2VjdYC+b0q5NTha09/A5mimv/prYj6o0yawxoPjoDs9Y
-h7D7Kf+F8fkgk0stlHJZX66J7dNrFXbg1xBld+Ep5Or2FbEZ9QWUpRQTuhdpNt/4
-9YuxQ59DemY9IRbwsrKCHH0mGrJsDdqeb0ap+8QvSXHjCt1fr9MNKWaAFAQLKQI4
-e0da1ntPCEQLeE833+NNRBgGufk0KqGT3eAXqrxa9AEIUJnVcPexQdqUMjcUpXFb
-8WNzRWB8Egh3BDK6FsECAwEAAaOCARkwggEVMAkGA1UdEwQCMAAwCwYDVR0PBAQD
-AgOoMB0GA1UdDgQWBBRW1p4v2qihzRlcI1PnxbZwluML+zBtBgNVHSMEZjBkgBRd
-p91wBlEyfue2bbO15eBg6i5N76FJpEcwRTELMAkGA1UEBhMCQ0gxGTAXBgNVBAoT
-EExpbnV4IHN0cm9uZ1N3YW4xGzAZBgNVBAMTEnN0cm9uZ1N3YW4gUm9vdCBDQYIB
-ADAdBgNVHREEFjAUghJzdW4uc3Ryb25nc3dhbi5vcmcwEwYDVR0lBAwwCgYIKwYB
-BQUHAwEwOQYDVR0fBDIwMDAuoCygKoYoaHR0cDovL2NybC5zdHJvbmdzd2FuLm9y
-Zy9zdHJvbmdzd2FuLmNybDANBgkqhkiG9w0BAQsFAAOCAQEAo37LYT9Awx0MK/nA
-FZpPJqUr0Ey+O5Ukcsdx7nd00SlmpiQRY8KmuRXCBQnDEgdLstd3slQjT0pJEgWF
-0pzxybnI6eOzYAhLfhart+X1hURiNGbXjggm2s4I5+K32bVIkNEqlsYnd/6F9oo5
-ZNO0/eTTruLZfkNe/zchBGKe/Z7MacVwlYWWCbMtBV4K1d5dGcRRgpQ9WivDlmat
-Nh9wlscDSgSGk3HJkbxnq695VN7zUbDWAUvWWhV5bIDjlAR/xyT9ApqIxiyVVRul
-fYrE7U05Hbt6GgAroAKLp6qJup9+TxQAKSjKIwJ0hf7OuYyQ8TZtVHS7AOhm+T/5
-G/jGGA==
------END CERTIFICATE-----
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem
deleted file mode 100644
index d8fad9aa..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/sunKey.pem
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEpAIBAAKCAQEA35VUimfpDmNpT/8Q3qnoDlxJ9R+EErSYVraVoUVmH9jSHroB
-eqqtDdf3XuHtg2xKTryijBj2H0jeA7HuE1UGwmvZWN1gL5vSrk1OFrT38DmaKa/+
-mtiPqjTJrDGg+OgOz1iHsPsp/4Xx+SCTSy2Ucllfront02sVduDXEGV34Snk6vYV
-sRn1BZSlFBO6F2k23/j1i7FDn0N6Zj0hFvCysoIcfSYasmwN2p5vRqn7xC9JceMK
-3V+v0w0pZoAUBAspAjh7R1rWe08IRAt4Tzff401EGAa5+TQqoZPd4BeqvFr0AQhQ
-mdVw97FB2pQyNxSlcVvxY3NFYHwSCHcEMroWwQIDAQABAoIBADH51hjN2zk9HVgl
-QmcTAWzcUie5cLMhrP+M9mtC8O3jcCwwFY6OwfnbMU8DHy0GMqHg5lB8b99UUVPw
-HLAzjDw/ESkc6pgZs4EEhJTsxJLsvTnePgHssEgyXnXf7gRVEqJkPohfy+Zy0UCH
-eIUQXiMlOQ7xg7iDMhwNa+UdWSt539DztSKilQn2xdPZjFnMT0/prvl4NA/8Zn54
-/SdWDq5yRdLWb6EK1V7yJ3687GXR1jzGtgy7TXuncUJVTYgX7RdP1Tn6gWD8YAQ/
-RfT0DdWYm4WHSgSb9/NW8lBZH2yy3hg+lNgofXEvTfBkO5QyW31LIr0tCV6zhJIc
-Y9MxaKUCgYEA9sktaXfhPLe0ECjdeQEOq5EKuDrCviSKCOuAV4BDSOsdw6+5LWfY
-Vb/oke8N70lL3RCblcj1pOKWUi2O/SpEJdDRduiw2gM9cXt3/bChSTHC4TsIxxN/
-Db9OGg72kZ4sRY5Au+zyAAQYBwXhFWux194Jk5qK0JblNG9J5QMqZDcCgYEA5+5h
-BgHUMEO+pdME5lAiSc5PcNTejpA6j+OikCh4/HFXy3C/dLx+Cs1+egw64c8iVaIv
-NEo7n7E9I0e3XqanPRXhMnBRrP+39OVsWPmZ18Li2Hi84KwJyi8Y11l3XJOqaYpF
-wMVUuZpxR0dfG5k/5GwT/tEkmQBglOgG3m2zUMcCgYEA4m3Vd9ahV5dp5AXKpzKc
-JjiPMFfhxJo7+FEz0ZUCp03qYljBu/Jy4MKS/grrqyiCLdQGHNlk4SNxLvdUId78
-5gGBnuuDEJU2dAAIKUE9yq2YlBUZSacOxStI2snt28/X6P3LUWHm7LLU5OS1D3Vf
-mKPF/6MlSJuas5CEqVZNN+MCgYBH9Qh7IaQgmVQUBKVXg3Mv7OduvUyTdKIGtHxi
-N3xZ7hxsDP4JjNWaKmlcGmFGX8pqQRheI83d3NJ4GK8GmbP3Wst0p65fezMqsudr
-r30QmPFicgs/tYCQDw6o+aPzwAi2F+VOSqrfrtAIaldSq7hL+VA21dKB+cD9UgOX
-jPd+TwKBgQCbKeg2QNS2qhPIG9eaqJDROuxmxb/07d7OBctgMgxVvKhqW9hW42Sy
-gJ59fyz5QjFBaSfcOdf4gkKyEawVo45/q6ymIQU37R4vF4CW9Z3CfaIbwJp7LcHV
-zH07so/HNsZua6GWCSCLJU5MeCRiZzk2RFiS9KIaLP4gZndv4lXOiQ==
------END RSA PRIVATE KEY-----
diff --git a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb b/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb
deleted file mode 100644
index 1a4ae6dd..00000000
--- a/dynamic-layers/networking-layer/recipes-connectivity/ipsec-demo/ipsec-demo_0.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Scripts and configuration files for ipsec demo"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-RDEPENDS_${PN} = "ipsec-tools bash"
-
-inherit allarch
-
-SRC_URI = "file://test_setkey"
-
-S = "${WORKDIR}"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install(){
- install -d ${D}${datadir}
- cp -a ${WORKDIR}/test_setkey ${D}${datadir}/
- chown -R root:root ${D}${datadir}/test_setkey
-}
-
-FILES_${PN} = "${datadir}/*"
-
-COMPATIBLE_MACHINE = "(qoriq)"
-PACKAGE_ARCH = "${MACHINE_SOCARCH}"
-
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..1793ec06 100644
--- a/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
+++ b/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
@@ -7,7 +7,7 @@ PR = "r2"
DEPENDS = "libxml2 fmlib tclap"
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/fmc;nobranch=1"
-SRCREV = "c7576ab7fb6fb09b68ebc40531e5452fc89e5cd5"
+SRCREV = "c2ed7c269e86ac6a0aac361f5876c96e700443f4"
S = "${WORKDIR}/git"
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend b/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend
deleted file mode 100644
index 2bae6470..00000000
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-PACKAGECONFIG_remove_imxgpu2d = "v4l"
diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend
index afc728c1..168db095 100644
--- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend
+++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend
@@ -1,5 +1,8 @@
# etnaviv mesa does not have glx
PACKAGECONFIG_remove_use-mainline-bsp = "xcomposite-glx"
+PACKAGECONFIG_remove_mx6 = "xcomposite-egl xcomposite-glx"
+PACKAGECONFIG_remove_mx7 = "xcomposite-egl xcomposite-glx"
+
# i.MX8 does never provide native x11, so required dependencies are not met
PACKAGECONFIG_remove_mx8 = "xcomposite-egl xcomposite-glx"
diff --git a/recipes-bsp/alsa-state/alsa-state/imx/asound.state b/recipes-bsp/alsa-state/alsa-state/imx/asound.state
index 87f44994..ace734df 100755
--- a/recipes-bsp/alsa-state/alsa-state/imx/asound.state
+++ b/recipes-bsp/alsa-state/alsa-state/imx/asound.state
@@ -5215,7 +5215,7 @@ state.wm8958audio {
}
}
}
-state.cs42888audio {
+state.imxcs42888 {
control.1 {
iface MIXER
name 'DAC1 Playback Volume'
@@ -7090,3 +7090,2759 @@ 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
+ }
+ }
+}
+state.wm8960audio4 {
+ 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/qoriq-atf-2.3.inc b/recipes-bsp/atf/qoriq-atf-2.3.inc
new file mode 100644
index 00000000..bc8b912a
--- /dev/null
+++ b/recipes-bsp/atf/qoriq-atf-2.3.inc
@@ -0,0 +1,13 @@
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
+
+PV = "2.3+git${SRCPV}"
+
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1 \
+ git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls \
+"
+SRCREV = "4e40e24590ab908773ef842cd0e17faf233767d4"
+SRCREV_mbedtls = "85da85555e5b086b0250780693c3ee584f63e79f"
+SRCREV_FORMAT = "atf"
+
+S = "${WORKDIR}/git"
diff --git a/recipes-bsp/atf/atf-tools_git.bb b/recipes-bsp/atf/qoriq-atf-tools_2.3.bb
index 33ec51c2..d4be32be 100644
--- a/recipes-bsp/atf/atf-tools_git.bb
+++ b/recipes-bsp/atf/qoriq-atf-tools_2.3.bb
@@ -1,11 +1,6 @@
-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"
-SRCREV = "7d748e6f0ec652ba7c43733dc67a3d0b0217390a"
+require qoriq-atf-${PV}.inc
-S = "${WORKDIR}/git"
+SUMMARY = "Tools for ARM Trusted Firmware, e.g. FIP image creation tool"
DEPENDS += "openssl"
diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/qoriq-atf_1.5.bb
index a93cb804..650acc3b 100644
--- a/recipes-bsp/atf/atf_git.bb
+++ b/recipes-bsp/atf/qoriq-atf_1.5.bb
@@ -3,16 +3,18 @@ DESCRIPTION = "ARM Trusted Firmware"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443"
+PV = "1.5+git${SRCPV}"
+
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"
-SRCREV = "7d748e6f0ec652ba7c43733dc67a3d0b0217390a"
+SRCREV = "9225ad51f026975fa6b86db800f43c55db11fa4d"
COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-bsp/atf/qoriq-atf_2.3.bb b/recipes-bsp/atf/qoriq-atf_2.3.bb
new file mode 100644
index 00000000..aed32851
--- /dev/null
+++ b/recipes-bsp/atf/qoriq-atf_2.3.bb
@@ -0,0 +1,175 @@
+require qoriq-atf-${PV}.inc
+
+DESCRIPTION = "ARM Trusted Firmware"
+
+inherit deploy
+
+DEPENDS += "cst-native"
+do_compile[depends] += "u-boot:do_deploy rcw:do_deploy ddr-phy:do_deploy"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PLATFORM = "${MACHINE}"
+MBEDTLS_FOLDER ?= "${S}/mbedtls"
+RCW_FOLDER ?= "${MACHINE}"
+
+# requires CROSS_COMPILE set by hand as there is no configure script
+export CROSS_COMPILE="${TARGET_PREFIX}"
+export ARCH="arm64"
+
+# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is
+# a standalone application
+CFLAGS[unexport] = "1"
+LDFLAGS[unexport] = "1"
+AS[unexport] = "1"
+LD[unexport] = "1"
+
+EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'"
+
+BOOTTYPE ?= "flexspi_nor sd emmc"
+ARM_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'true', 'false', d)}"
+NXP_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}"
+BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
+
+PACKAGECONFIG ??= " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'optee', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'optee', '', d)} \
+ ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \
+"
+PACKAGECONFIG[optee] = ",,optee-os-qoriq"
+
+uboot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot"
+uboot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+ if [ "${NXP_COT}" = "true" -a "${ARM_COT}" = "true" ]; then
+ bbfatal " \
+ Error!, Both ARM CoT and NXP CoT are enabled. Only one CoT is built in a yocto build, \
+ Don't add nxp-cot and arm-cot into DISTRO_FEATURES_append at the same time."
+ fi
+
+ if [ "${NXP_COT}" = "true" ]; then
+ rm -fr ${S}/nxp-cot
+ mkdir -p ${S}/nxp-cot
+ outputdir="${S}/nxp-cot"
+ elif [ "${ARM_COT}" = "true" ]; then
+ rm -fr ${S}/arm-cot
+ mkdir -p ${S}/arm-cot
+ outputdir="${S}/arm-cot"
+ else
+ outputdir="${S}"
+ fi
+
+ if [ "${NXP_COT}" = "true" -o "${ARM_COT}" = "true" ]; then
+ if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then
+ ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024
+ else
+ cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ${S}
+ cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub ${S}
+ fi
+
+ bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin"
+ bl33="${uboot_sec}"
+ secext="_sec"
+ else
+ bl33="${uboot}"
+ fi
+
+ for d in ${BOOTTYPE}; do
+ case $d in
+ sd)
+ rcwimg="${RCWSD}.bin"
+ ;;
+ emmc)
+ rcwimg="${RCWEMMC}.bin"
+ ;;
+ flexspi_nor)
+ rcwimg="${RCWXSPI}.bin"
+ ;;
+ esac
+
+ if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then
+ oe_runmake V=1 -C ${S} realclean
+ if [ "${ARM_COT}" = "true" ]; then
+ mkdir -p ${S}/build/${PLATFORM}/release
+ if [ -f ${outputdir}/rot_key.pem ]; then
+ cp -fr ${outputdir}/*.pem ${S}/build/${PLATFORM}/release
+ fi
+ oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \
+ BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \
+ GENERATE_COT=1 MBEDTLS_DIR=${MBEDTLS_FOLDER} CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst
+
+ if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then
+ oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 \
+ MBEDTLS_DIR=${MBEDTLS_FOLDER} DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy
+ cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir}
+ cp -r ${S}/build/${PLATFORM}/release/*.pem ${outputdir}
+ fi
+ elif [ "${NXP_COT}" = "true" ]; then
+ oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \
+ BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \
+ CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst
+
+ if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then
+ oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 \
+ CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy
+ cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir}
+ fi
+ elif [ "${BUILD_OPTEE}" = "true" ]; then
+ bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin"
+ oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \
+ RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33}
+ else
+ oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} \
+ RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33}
+ fi
+
+ cp -r ${S}/build/${PLATFORM}/release/bl2_${d}${secext}.pbl ${outputdir}
+ cp -r ${S}/build/${PLATFORM}/release/fip.bin ${outputdir}
+ fi
+ rcwimg=""
+ done
+}
+
+do_install() {
+ install -d ${D}/boot/atf
+ if [ "${ARM_COT}" = "true" ]; then
+ outputdir="${S}/arm-cot"
+ secext="_sec"
+ elif [ "${NXP_COT}" = "true" ]; then
+ outputdir="${S}/nxp-cot"
+ secext="_sec"
+ else
+ outputdir="${S}"
+ fi
+ if [ -f "${outputdir}/fip.bin" ]; then
+ cp -r ${outputdir}/fip.bin ${D}/boot/atf/fip_uboot${secext}.bin
+ fi
+ if [ -f "${outputdir}/ddr_fip_sec.bin" ]; then
+ cp -r ${outputdir}/ddr_fip_sec.bin ${D}/boot/atf/
+ fi
+ for d in ${BOOTTYPE}; do
+ if [ -e ${outputdir}/bl2_${d}${secext}.pbl ]; then
+ cp -r ${outputdir}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl
+ fi
+ done
+ chown -R root:root ${D}
+}
+
+do_deploy() {
+ if [ "${ARM_COT}" = "true" ]; then
+ outputdir="atf_arm-cot"
+ elif [ "${NXP_COT}" = "true" ]; then
+ outputdir="atf_nxp-cot"
+ else
+ outputdir="atf"
+ fi
+
+ install -d ${DEPLOYDIR}/${outputdir}
+ cp -fr ${D}/boot/atf/* ${DEPLOYDIR}/${outputdir}/
+}
+addtask deploy after do_install
+FILES_${PN} += "/boot"
+COMPATIBLE_MACHINE = "(lx2160a|lx2162a)"
diff --git a/recipes-bsp/ddr-phy/ddr-phy_git.bb b/recipes-bsp/ddr-phy/ddr-phy_git.bb
index 31f6c101..fa8833fd 100644
--- a/recipes-bsp/ddr-phy/ddr-phy_git.bb
+++ b/recipes-bsp/ddr-phy/ddr-phy_git.bb
@@ -9,9 +9,9 @@ SRCREV = "fbc036b88acb6c06ffed02c898cbae9856ec75ba"
S = "${WORKDIR}/git"
-REGLEX_lx2160a = "lx2160a"
+REGLEX = "lx2160a"
-DEPENDS += "atf-tools-native"
+DEPENDS += "qoriq-atf-tools-native"
do_compile() {
cd ${S}/${REGLEX}
@@ -40,5 +40,5 @@ addtask deploy before do_populate_sysroot after do_install
PACKAGES += "${PN}-image"
FILES_${PN}-image += "/boot"
-COMPATIBLE_MACHINE = "(lx2160a)"
+COMPATIBLE_MACHINE = "(lx2160a|lx2162a)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-bsp/firmware-imx/firmware-imx-8.5.inc b/recipes-bsp/firmware-imx/firmware-imx-8.10.inc
index ae6b1d78..6f1222aa 100644
--- a/recipes-bsp/firmware-imx/firmware-imx-8.5.inc
+++ b/recipes-bsp/firmware-imx/firmware-imx-8.10.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=cf3f9b8d09bc3926b1004ea71f7a248a"
-SRCBRANCH ?= "master"
SRC_URI = " \
${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
"
-SRC_URI[md5sum] = "a6b926d087e1e642580da8a6d982abe6"
-SRC_URI[sha256sum] = "45b0a7392e7a4b2e6c7e1cb988dd660ff3f8cd465afdf796ff840a00db08389d"
+SRC_URI[md5sum] = "3f8c4661ca0f64ca30fd239f66b6a471"
+SRC_URI[sha256sum] = "2b70f169d4065b2a7ac7a676afe24636128bd2dacc9f5230346758c3b146b2be"
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.10.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.10.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.10.bb
index a605d226..a48356ed 100644
--- a/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb
+++ b/recipes-bsp/firmware-imx/firmware-imx-8m_8.10.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"
@@ -21,4 +21,4 @@ addtask deploy after do_install before do_build
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
-COMPATIBLE_MACHINE = "(mx8m)"
+COMPATIBLE_MACHINE = "(mx8m|imx-boot-container)"
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.10.bb b/recipes-bsp/firmware-imx/firmware-imx_8.10.bb
new file mode 100644
index 00000000..8ff4a321
--- /dev/null
+++ b/recipes-bsp/firmware-imx/firmware-imx_8.10.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-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-nxp-wifi_1.0.bb b/recipes-bsp/firmware-imx/firmware-nxp-wifi_1.0.bb
new file mode 100644
index 00000000..0f0a2af0
--- /dev/null
+++ b/recipes-bsp/firmware-imx/firmware-nxp-wifi_1.0.bb
@@ -0,0 +1,46 @@
+# Copyright 2020-2021 NXP
+
+SUMMARY = "Wi-Fi firmware redistributed by NXP"
+DESCRIPTION = "Additional Wi-Fi firmware redistributed by NXP, \
+which is not covered by linux-firmware package. Once package becomes \
+available as a part of linux-firmware - it can be dropped from this \
+recipe in favor of upstream."
+
+SECTION = "kernel"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://cyw-wifi-bt/EULA.txt;md5=80c0478f4339af024519b3723023fe28"
+
+SRC_URI = "git://github.com/NXP/imx-firmware.git;protocol=https"
+SRCREV = "484d38224fa2c26b8859a7bf20b7c4d49100f5bc"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+CLEANBROKEN = "1"
+ALLOW_EMPTY_${PN} = "1"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${sysconfdir}/firmware
+ install -d ${D}${nonarch_base_libdir}/firmware/brcm
+
+ # Install various flavors of Broadcom firmware provided by Murata:
+ # - bcm4359-pcie
+ install -m 0644 cyw-wifi-bt/*_CYW*/brcmfmac4359-pcie* ${D}${nonarch_base_libdir}/firmware/brcm
+ install -m 0644 cyw-wifi-bt/*_CYW*/BCM4349B1*.hcd ${D}${sysconfdir}/firmware
+}
+
+PACKAGES =+ " \
+ ${PN}-bcm4359-pcie \
+"
+
+FILES_${PN}-bcm4359-pcie = " \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac4359-pcie.* \
+ ${sysconfdir}/firmware/BCM4349B1_*.hcd \
+"
+
+RPROVIDES_${PN}-bcm4359-pcie = "linux-firmware-bcm4359-pcie"
diff --git a/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-3.bb b/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-3.bb
new file mode 100644
index 00000000..22f4c25f
--- /dev/null
+++ b/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-3.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] = "4deaf1bc81238ef57be29cec3cf5f636"
+SRC_URI[sha256sum] = "14394ffcf145536569bcc20910cda7c8b58a99fdb3a04b125453146739541da9"
+
+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/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_2.0.bb b/recipes-bsp/imx-atf/imx-atf_2.2.bb
index 33ed6c62..6be81e59 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,11 +7,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m
PV .= "+git${SRCPV}"
-SRCBRANCH = "lf-5.4.y"
+SRCBRANCH = "imx_5.4.70_2.3.0"
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 \
"
-SRCREV = "7b3389d49815f1e3f7942bd312a27ee665bd2e33"
+SRCREV = "f1d7187f261ebf4b8a2a70d638d4bfc0a9b26c29"
S = "${WORKDIR}/git"
@@ -19,16 +18,11 @@ inherit deploy
BOOT_TOOLS = "imx-boot-tools"
-PLATFORM ?= "INVALID"
-PLATFORM_mx8qm = "imx8qm"
-PLATFORM_mx8qxp = "imx8qx"
-PLATFORM_mx8mq = "imx8mq"
-PLATFORM_mx8mm = "imx8mm"
-PLATFORM_mx8mn = "imx8mn"
+ATF_PLATFORM ??= "INVALID"
EXTRA_OEMAKE += " \
CROSS_COMPILE="${TARGET_PREFIX}" \
- PLAT=${PLATFORM} \
+ PLAT=${ATF_PLATFORM} \
"
BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
@@ -46,12 +40,12 @@ do_compile() {
do_install[noexec] = "1"
do_deploy() {
- install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin
+ install -Dm 0644 ${S}/build/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin
if ${BUILD_OPTEE}; then
- install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee
+ install -m 0644 ${S}/build-optee/${ATF_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${ATF_PLATFORM}.bin-optee
fi
}
addtask deploy after do_compile
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
-COMPATIBLE_MACHINE = "(mx8)"
+COMPATIBLE_MACHINE = "(mx8|imx-boot-container)"
diff --git a/recipes-bsp/imx-kobs/imx-kobs_git.bb b/recipes-bsp/imx-kobs/imx-kobs_git.bb
index b104fafd..d93a3f25 100644
--- a/recipes-bsp/imx-kobs/imx-kobs_git.bb
+++ b/recipes-bsp/imx-kobs/imx-kobs_git.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
PV = "5.5+git${SRCPV}"
SRC_URI = "git://github.com/NXPmicro/imx-kobs.git;protocol=https \
"
-SRCREV = "cee66d0e956a64d03cc866fa8819da5b798c7f1b"
+SRCREV = "269fdffcf97238684de9f28977a73677282e061f"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
diff --git a/recipes-bsp/imx-lib/imx-lib_git.bb b/recipes-bsp/imx-lib/imx-lib_git.bb
index d94b2daa..c5619070 100644
--- a/recipes-bsp/imx-lib/imx-lib_git.bb
+++ b/recipes-bsp/imx-lib/imx-lib_git.bb
@@ -26,6 +26,7 @@ PLATFORM_mx6sl = "IMX6S"
PLATFORM_mx6sll = "IMX6UL"
PLATFORM_mx6sx = "IMX6S"
PLATFORM_mx6ul = "IMX6UL"
+PLATFORM_mx6ull = "IMX6UL"
PLATFORM_mx7d = "IMX7"
PLATFORM_mx7ulp = "IMX7"
diff --git a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index 0f13a08b..ba1507eb 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -1,23 +1,24 @@
-# Copyright 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
require imx-mkimage_git.inc
DESCRIPTION = "Generate Boot Loader for i.MX 8 device"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
+inherit use-imx-security-controller-firmware
+
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"
+DEPENDS_append_mx8m = " u-boot-mkimage-native dtc-native"
BOOT_NAME = "imx-boot"
PROVIDES = "${BOOT_NAME}"
@@ -37,12 +38,7 @@ do_compile[depends] += " \
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_mx8mq = "bl31-imx8mq.bin"
-ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
-ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin"
+ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin"
ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}"
UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
@@ -50,31 +46,31 @@ BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin"
TOOLS_NAME ?= "mkimage_imx8"
-SOC_TARGET ?= "INVALID"
-SOC_TARGET_mx8qm = "iMX8QM"
-SOC_TARGET_mx8qxp = "iMX8QX"
-SOC_TARGET_mx8mq = "iMX8M"
-SOC_TARGET_mx8mm = "iMX8MM"
-SOC_TARGET_mx8mn = "iMX8MN"
+IMX_BOOT_SOC_TARGET ?= "INVALID"
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 = "${S}/${IMX_BOOT_SOC_TARGET}"
+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_mx8qxp = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \
+ 'REV=C0', d)}"
+
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}
@@ -95,26 +91,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 ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
+ make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
+ else
+ bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}"
+ make SOC=${IMX_BOOT_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
@@ -139,16 +149,25 @@ deploy_mx8m() {
install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
+ install -m 0755 ${BOOT_STAGING}/mkimage_uboot ${DEPLOYDIR}/${BOOT_TOOLS}
}
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}
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
index 5304ebf9..4e154f6d 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
@@ -1,24 +1,29 @@
# Copyright (C) 2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
require imx-mkimage_git.inc
DESCRIPTION = "i.MX make image"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
-inherit native deploy
+inherit deploy native
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
+REV_CHIP ?= "B0"
+REV_CHIP_mx8qxp = \
+ "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', 'B0', \
+ 'C0', d)}"
+
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..1eba5109 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
@@ -1,10 +1,10 @@
-# Copyright 2017-2019 NXP
+# Copyright 2017-2020 NXP
DEPENDS = "zlib-native openssl-native"
-SRCBRANCH = "lf-5.4.y"
+SRCBRANCH = "imx_5.4.70_2.3.0"
SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "1c2277b95ce59f5d0265f26fec522e2ac2581e59"
+SRCREV = "8947fea369ab3932259630232cfb9f87b8f9dda1"
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.7.1.bb
index 3bf7024c..ade228d0 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.7.1.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=cf3f9b8d09bc3926b1004ea71f7a248a"
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] = "962aebbb0100cc0e049fa88cea594a00"
+SRC_URI[sha256sum] = "9a37353c07c187078be02d76ac55f615cd0c60ea9a1c4233c1929e4b2c43aebc"
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/0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch b/recipes-bsp/imx-seco/imx-seco-libs/0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch
new file mode 100644
index 00000000..757b9a6a
--- /dev/null
+++ b/recipes-bsp/imx-seco/imx-seco-libs/0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch
@@ -0,0 +1,34 @@
+From 59608dcb0f0a6f6d8154b1d331c2403d7c1143eb Mon Sep 17 00:00:00 2001
+From: Cristinel Panfir <cristinel.panfir@nxp.com>
+Date: Fri, 5 Feb 2021 19:27:00 +0200
+Subject: [PATCH] Makefile: Fix install to clear host-user-contaminated
+ warnings [HSM-483]
+
+WARNING: imx-seco-libs-git-r0 do_package_qa: QA Issue:
+imx-seco-libs: /usr/lib/hsm_lib.a is owned by uid 26292, which is the same as the user running bitbake. This may be due to host contamination
+imx-seco-libs: /usr/lib/she_lib.a is owned by uid 26292, which is the same as the user running bitbake. This may be due to host contamination
+imx-seco-libs: /usr/lib/seco_nvm_manager.a is owned by uid 26292, which is the same as the user running bitbake.
+This may be due to host contamination [host-user-contaminated]
+
+Upstream-Status: Pending
+
+Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 492d700..25ad333 100644
+--- a/Makefile
++++ b/Makefile
+@@ -63,7 +63,7 @@ hsm_doc: include/hsm/hsm_api.h
+
+ install: hsm_test she_test she_lib.a seco_nvm_manager.a hsm_lib.a
+ mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
+- cp -a seco_nvm_manager.a hsm_lib.a she_lib.a $(DESTDIR)$(LIBDIR)
++ cp seco_nvm_manager.a hsm_lib.a she_lib.a $(DESTDIR)$(LIBDIR)
+ cp hsm_test she_test $(DESTDIR)$(BINDIR)
+ cp -a include/* $(DESTDIR)$(INCLUDEDIR)
+
+--
+2.25.1
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..dc37cdfc
--- /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.70_2.3.1"
+SRC_URI = "git://github.com/NXP/imx-seco-libs.git;protocol=https;branch=${SRCBRANCH} \
+ file://0002-Makefile-Fix-install-to-clear-host-user-contaminated.patch"
+SRCREV = "79e5fb5d096c61b1c3163c9fa8e42719509d95a0"
+
+S = "${WORKDIR}/git"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install
+}
+
+COMPATIBLE_MACHINE = "(mx8qm|mx8qxp|mx8phantomdxl|mx8dxl)"
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.7.5.bb b/recipes-bsp/imx-seco/imx-seco_3.7.5.bb
new file mode 100644
index 00000000..0539b887
--- /dev/null
+++ b/recipes-bsp/imx-seco/imx-seco_3.7.5.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=cf3f9b8d09bc3926b1004ea71f7a248a"
+
+inherit fsl-eula-unpack use-imx-security-controller-firmware deploy
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+SRC_URI[md5sum] = "d4faca131abfc51a1dd0278d7d201159"
+SRC_URI[sha256sum] = "08cf25a4be6841ca7264a50b29c311b386eae1c02fced8a3b55fd04213acb4bc"
+
+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|mx8phantomdxl|mx8dxl)"
diff --git a/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch b/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch
deleted file mode 100644
index 3fb9d4ef..00000000
--- a/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From d2e35983281a811b38e540ab82e7643322e84aab Mon Sep 17 00:00:00 2001
-From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-Date: Wed, 4 Dec 2019 14:17:50 +0000
-Subject: [PATCH] mxc_v4l2_test: fix compilation error produced by gcc9
-
-Fix trivial compilation error when GCC9 is used:
-
-error: call to '__open_missing_mode' declared with attribute error: open
-with O_CREAT or O_TMPFILE in second argument needs 3 arguments
-
-This is now caused by not explicitly supplying the mode when O_CREAT is
-used as disposition.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- test/mxc_v4l2_test/mx8_v4l2_cap_drm.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c b/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c
-index 6e10744..d63b2db 100644
---- a/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c
-+++ b/test/mxc_v4l2_test/mx8_v4l2_cap_drm.c
-@@ -561,11 +561,7 @@ static int open_save_file(struct video_channel *video_ch)
-
- for (i = 0; i < NUM_SENSORS; i++) {
- if ((g_cam >> i) & 0x01) {
--#ifdef BUILD_FOR_ANDROID
- fd = open(video_ch[i].save_file_name, O_RDWR | O_CREAT, 0660);
--#else
-- fd = open(video_ch[i].save_file_name, O_RDWR | O_CREAT);
--#endif
- if (fd < 0) {
- v4l2_err("Channel[%d] unable to create recording file\n", i);
- while (i)
---
-2.17.1
-
diff --git a/recipes-bsp/imx-test/imx-test_git.bb b/recipes-bsp/imx-test/imx-test_git.bb
index 81bbd3a3..4e139cc4 100644
--- a/recipes-bsp/imx-test/imx-test_git.bb
+++ b/recipes-bsp/imx-test/imx-test_git.bb
@@ -5,8 +5,8 @@
SUMMARY = "Test programs for i.MX BSP"
DESCRIPTION = "Unit tests for the i.MX BSP"
SECTION = "base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
DEPENDS = "alsa-lib libdrm"
DEPENDS_append_mx6 = " imx-lib"
@@ -16,13 +16,12 @@ DEPENDS_append_imxvpu = " virtual/imxvpu"
PE = "1"
PV = "7.0+${SRCPV}"
-SRCBRANCH = "lf-5.4.y"
+SRCBRANCH = "imx_5.4.70_2.3.0"
SRC_URI = " \
git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \
- file://0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch \
file://memtool_profile \
"
-SRCREV = "6d20e84f2dbe5940fe6d629c2839e1390994ee1f"
+SRCREV = "90fd7168fe5f15de9b2b1992a719024fc73a185a"
S = "${WORKDIR}/git"
inherit module-base use-imx-headers
@@ -48,6 +47,7 @@ PACKAGECONFIG_append_imxvpu = " vpu"
PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu"
+PACKAGECONFIG[swpdm] = "HAS_IMX_SW_PDM=true,HAS_IMX_SW_PDM=false,imx-sw-pdm"
do_compile() {
CFLAGS="${TOOLCHAIN_OPTIONS}"
diff --git a/recipes-bsp/imx-uuc/imx-uuc_git.bb b/recipes-bsp/imx-uuc/imx-uuc_git.bb
index 9fe9614a..bfa6607b 100644
--- a/recipes-bsp/imx-uuc/imx-uuc_git.bb
+++ b/recipes-bsp/imx-uuc/imx-uuc_git.bb
@@ -12,7 +12,7 @@ PR = "r1"
PV = "0.5.1+git${SRCPV}"
SRC_URI = "git://github.com/NXPmicro/imx-uuc.git;protocol=https"
-SRCREV = "ebb7d34853133d92eff9766e370ea21e6d6d8f2b"
+SRCREV = "d6afb27e55d73d7ad08cd2dd51c784d8ec9694dc"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.3.0.bb b/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.3.0.bb
new file mode 100644
index 00000000..bd087898
--- /dev/null
+++ b/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.3.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=cf3f9b8d09bc3926b1004ea71f7a248a"
+
+inherit fsl-eula-unpack
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+SRC_URI[md5sum] = "37c61718602ff08041b81319cfd6a8d9"
+SRC_URI[sha256sum] = "8425796fc63d7107f2f57c51497281c4d54c883b2670817347fbe55f39dc2b8c"
+
+# 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/imx-vpu-hantro/imx-vpu-hantro/0001-decoder_sw-resolve-compilation-error-with-fcommon.patch b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-decoder_sw-resolve-compilation-error-with-fcommon.patch
new file mode 100644
index 00000000..8d9610d5
--- /dev/null
+++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-decoder_sw-resolve-compilation-error-with-fcommon.patch
@@ -0,0 +1,54 @@
+From 5bfb24738c47003fd04a86bfd5a49f8c6354ed23 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+Date: Fri, 28 Aug 2020 07:46:35 +0000
+Subject: [PATCH] decoder_sw: resolve compilation error with -fcommon
+
+-fcommon is enabled by default in gcc10 compiler, which results in
+following build errors:
+
+decoder_sw/software/source/inc/decapicommon.h:272: multiple definition
+of `DecPicCodingType'; decoder_sw/software/linux/dwl/dwl_linux.o:
+decoder_sw/software/source/inc/decapicommon.h:272: first defined here
+
+decoder_sw/software/source/inc/dwl.h:94: multiple definition of
+`DWLInitParam'; decoder_sw/software/linux/dwl/dwl_linux.o:
+decoder_sw/software/source/inc/dwl.h:94: first defined here
+
+Drop multiple enum name definitions, which solves above compilation
+issues.
+
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ decoder_sw/software/source/inc/decapicommon.h | 2 +-
+ decoder_sw/software/source/inc/dwl.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/decoder_sw/software/source/inc/decapicommon.h b/decoder_sw/software/source/inc/decapicommon.h
+index 0f02092..fc8cccf 100755
+--- a/decoder_sw/software/source/inc/decapicommon.h
++++ b/decoder_sw/software/source/inc/decapicommon.h
+@@ -269,7 +269,7 @@ enum DecPicCodingType {
+ DEC_PIC_TYPE_D = 3,
+ DEC_PIC_TYPE_FI = 4,
+ DEC_PIC_TYPE_BI = 5
+-} DecPicCodingType;
++};
+
+ /* Output picture pixel format types for raster scan or down scale output */
+ enum DecPicturePixelFormat {
+diff --git a/decoder_sw/software/source/inc/dwl.h b/decoder_sw/software/source/inc/dwl.h
+index 6991f03..fd357b3 100755
+--- a/decoder_sw/software/source/inc/dwl.h
++++ b/decoder_sw/software/source/inc/dwl.h
+@@ -91,7 +91,7 @@ struct DWLLinearMem {
+ /* DWLInitParam is used to pass parameters when initializing the DWL */
+ struct DWLInitParam {
+ u32 client_type;
+-} DWLInitParam;
++};
+
+ /* Hardware configuration description, same as in top API */
+ typedef struct DecHwConfig DWLHwConfig;
+--
+2.17.1
+
diff --git a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.20.0.bb
index 67dbc8da..b7c64cbb 100644
--- a/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb
+++ b/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.20.0.bb
@@ -1,16 +1,16 @@
-# Copyright 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
DESCRIPTION = "i.MX Hantro VPU library"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a"
PROVIDES = "virtual/imxvpu"
SRC_URI = " \
${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true \
"
-SRC_URI[md5sum] = "79ca586c67ea9b007fa772df8959c852"
-SRC_URI[sha256sum] = "1f373f5d9a37754f7936f9bf4b134b65afe98459c0383b63c50c1f6ecba49e25"
+SRC_URI[md5sum] = "682b3a73bf5aa22a37d56a433d11fc91"
+SRC_URI[sha256sum] = "e6cdd5b4c628604906466fc9620e2b048cf1b2c863f9ee49616dd5212b9261b0"
inherit fsl-eula-unpack use-imx-headers
@@ -18,6 +18,7 @@ PARALLEL_MAKE="-j 1"
PLATFORM_mx8mm = "IMX8MM"
PLATFORM_mx8mq = "IMX8MQ"
+PLATFORM_mx8mp = "IMX8MP"
do_compile () {
oe_runmake CROSS_COMPILE="${HOST_PREFIX}" \
@@ -31,4 +32,4 @@ do_install () {
FILES_${PN} += "/unit_tests"
-COMPATIBLE_MACHINE = "(mx8m)"
+COMPATIBLE_MACHINE = "(mx8mq|mx8mm|mx8mp)"
diff --git a/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb b/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb
deleted file mode 100644
index 43377b1e..00000000
--- a/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (C) 2013-2018 O.S. Systems Software LTDA.
-# Copyright (C) 2013-2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
-
-DESCRIPTION = "Freescale Chips&Media VPU library"
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
-
-PROVIDES = "virtual/imxvpu"
-
-PE = "1"
-
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-
-SRC_URI[md5sum] = "fb11619e07dafbc46a335c7db4c9b9a2"
-SRC_URI[sha256sum] = "604885463ca7d292ddf376795ee95ae32abcc60512a3378e016b173222362900"
-
-inherit fsl-eula-unpack use-imx-headers
-
-PLATFORM_mx6 = "IMX6Q"
-
-do_compile () {
- INCLUDE_DIR="-I${STAGING_INCDIR_IMX}"
- oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all
-}
-
-do_install () {
- oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
-}
-
-COMPATIBLE_MACHINE = "(mx6q|mx6dl)"
diff --git a/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb b/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb
new file mode 100644
index 00000000..8c6492c5
--- /dev/null
+++ b/recipes-bsp/imx-vpu/imx-vpu_5.4.39.3.bb
@@ -0,0 +1,32 @@
+# Copyright (C) 2013-2018 O.S. Systems Software LTDA.
+# Copyright (C) 2013-2016 Freescale Semiconductor
+# Copyright (C) 2017-2020 NXP
+
+DESCRIPTION = "Freescale VPU library"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
+
+PROVIDES = "virtual/imxvpu"
+RPROVIDES_${PN} = "virtual/imxvpu"
+
+PE = "1"
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+SRC_URI[md5sum] = "6d6302189a6704874375afe62a65def0"
+SRC_URI[sha256sum] = "87cb799a57df654db29403cb74a75ca5185a1517022d3a4a16b8d69056c36127"
+
+inherit fsl-eula-unpack use-imx-headers
+
+PLATFORM = "IMX6Q"
+
+do_compile() {
+ INCLUDE_DIR="-I${STAGING_INCDIR_IMX}"
+ oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all
+}
+
+do_install() {
+ oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
+}
+
+# Compatible only for i.MX with Chips&Media VPU
+COMPATIBLE_MACHINE = "(mx6q|mx6dl)"
diff --git a/recipes-bsp/isp-imx/basler-camera_4.2.2.6.0.bb b/recipes-bsp/isp-imx/basler-camera_4.2.2.6.0.bb
new file mode 100644
index 00000000..369ca5ce
--- /dev/null
+++ b/recipes-bsp/isp-imx/basler-camera_4.2.2.6.0.bb
@@ -0,0 +1,27 @@
+# Copyright 2020 NXP
+
+DESCRIPTION = "Basler camera binary drivers"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a"
+
+inherit fsl-eula-unpack
+
+SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
+
+SRC_URI[md5sum] = "8c94839802598853f7b91f6386b4643e"
+SRC_URI[sha256sum] = "6456dbb0095d988cce65f94e92a3ea80d796e02fd410987c937cfc0a09ca2e4a"
+
+do_install() {
+ dest_dir=${D}/opt/imx8-isp/bin
+ install -d ${D}/${libdir}
+ install -d $dest_dir
+ cp -r ${S}/opt/imx8-isp/bin/* $dest_dir
+ cp -r ${S}/usr/lib/* ${D}/${libdir}
+}
+
+SYSTEMD_AUTO_ENABLE = "enable"
+
+FILES_${PN} = "${libdir} /opt"
+INSANE_SKIP_${PN} = "file-rdeps already-stripped"
+
+COMPATIBLE_MACHINE = "(imx|use-nxp-bsp)"
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch b/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch
new file mode 100644
index 00000000..725a9907
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx/0001-BufferManager.h-add-missing-header-file.patch
@@ -0,0 +1,27 @@
+From 325b4bf687ead6598de702df9829a4dad0b6458c Mon Sep 17 00:00:00 2001
+From: Chris Dimich <Chris.Dimich@boundarydevices.com>
+Date: Mon, 15 Feb 2021 22:51:01 -0800
+Subject: [PATCH 1/1] BufferManager.h: add missing header file
+
+Needed to compile with Yocto Gatesgarth.
+
+Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com>
+---
+ mediacontrol/buffer/BufferManager.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mediacontrol/buffer/BufferManager.h b/mediacontrol/buffer/BufferManager.h
+index f5691e111..4d5ce6965 100755
+--- a/mediacontrol/buffer/BufferManager.h
++++ b/mediacontrol/buffer/BufferManager.h
+@@ -16,6 +16,7 @@
+ #include <deque>
+ #include <map>
+ #include <EAutoLock.h>
++#include <stdint.h>
+
+ enum {
+ BUFFER_TYPE_INPUT_FREE = 0,
+--
+2.29.0
+
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-imx8-isp.service-do-not-prevent-restart-of-service.patch b/recipes-bsp/isp-imx/isp-imx/0001-imx8-isp.service-do-not-prevent-restart-of-service.patch
new file mode 100644
index 00000000..86391d4b
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx/0001-imx8-isp.service-do-not-prevent-restart-of-service.patch
@@ -0,0 +1,26 @@
+From ce8dd8db37de85952419a5b28a48ec20d1310cf7 Mon Sep 17 00:00:00 2001
+From: Chris Dimich <Chris.Dimich@boundarydevices.com>
+Date: Wed, 17 Feb 2021 14:09:39 -0800
+Subject: [PATCH 1/1] imx8-isp.service: do not prevent restart of service
+
+Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com>
+---
+ imx/imx8-isp.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/imx/imx8-isp.service b/imx/imx8-isp.service
+index 93d2e9b3a..4f0cd88ca 100644
+--- a/imx/imx8-isp.service
++++ b/imx/imx8-isp.service
+@@ -10,7 +10,7 @@ StartLimitBurst=5
+ Restart=on-failure
+ RestartSec=5s
+ # ENXIO
+-RestartPreventExitStatus=6
++#RestartPreventExitStatus=6
+ ExecStart=/opt/imx8-isp/bin/start_isp.sh
+
+ [Install]
+--
+2.29.0
+
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-run.sh-fix-bashism.patch b/recipes-bsp/isp-imx/isp-imx/0001-run.sh-fix-bashism.patch
new file mode 100644
index 00000000..715bed2a
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx/0001-run.sh-fix-bashism.patch
@@ -0,0 +1,23 @@
+From 7070abd558e753b89955a966bb83e11f5a7b8462 Mon Sep 17 00:00:00 2001
+From: Chris Dimich <Chris.Dimich@boundarydevices.com>
+Date: Wed, 17 Feb 2021 14:06:26 -0800
+Subject: [PATCH 1/1] run.sh: fix bashism
+
+Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com>
+---
+ imx/run.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/imx/run.sh b/imx/run.sh
+index c0d676ae7..ebeb7a6e7 100755
+--- a/imx/run.sh
++++ b/imx/run.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Start the isp_media_server in the configuration from user
+ # (c) NXP 2020
+--
+2.29.0
+
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch b/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch
new file mode 100644
index 00000000..cb93223e
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx/0001-start_isp.sh-fix-test-to-be-generic.patch
@@ -0,0 +1,46 @@
+From 708f25cfe522df162c3e2c7c56cbe2f7000cb5e4 Mon Sep 17 00:00:00 2001
+From: Gary Bisson <gary.bisson@boundarydevices.com>
+Date: Mon, 14 Dec 2020 14:26:01 +0100
+Subject: [PATCH] start_isp.sh: fix test to be generic
+
+So that it works on EVK and any other i.MX 8M Plus platform.
+
+Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
+---
+ imx/start_isp.sh | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/imx/start_isp.sh b/imx/start_isp.sh
+index 02ee7d3b5..fee0492ad 100755
+--- a/imx/start_isp.sh
++++ b/imx/start_isp.sh
+@@ -7,21 +7,18 @@
+ #
+
+ RUNTIME_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
+-DEVICE_TREE_BASLER=$(grep basler-camera-vvcam /sys/firmware/devicetree/base/soc@0/*/i2c@*/*/compatible -l 2> /dev/null)
+-
++BASLER=`dmesg | grep Basler`
+
+ # check if the basler device has been enabled in the device tree
+-if [ -f "$DEVICE_TREE_BASLER" ]; then
+-
++if [ ! -z "$BASLER" ]; then
+ echo "Starting isp_media_server for Basler daA3840-30mc"
+-
+ cd $RUNTIME_DIR
+ # Default configuration for Basler daA3840-30mc: basler_4k
+ # Available configurations: basler_4k, basler_1080p60, basler_4khdr, basler_1080p60hdr
+- exec ./run.sh -c basler_4k -lm
+-
++ #exec ./run.sh -c basler_4k
++ exec ./run.sh -c basler_1080p60
+ else
+ # no device tree found exit with code no device or address
+- echo "No device tree found for Basler, check dtb file!" >&2
++ echo "Basler camera not found!" >&2
+ exit 6
+ fi
+--
+2.29.2
+
diff --git a/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb b/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb
new file mode 100644
index 00000000..363089f0
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx_4.2.2.6.0.bb
@@ -0,0 +1,84 @@
+# Copyright 2020 NXP
+
+DESCRIPTION = "i.MX Verisilicon Software ISP"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=cf3f9b8d09bc3926b1004ea71f7a248a"
+
+
+inherit fsl-eula-unpack cmake systemd
+
+SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true \
+ file://0001-BufferManager.h-add-missing-header-file.patch;patchdir=.. \
+ file://0001-imx8-isp.service-do-not-prevent-restart-of-service.patch;patchdir=.. \
+ file://0001-run.sh-fix-bashism.patch;patchdir=.. \
+ file://0001-start_isp.sh-fix-test-to-be-generic.patch;patchdir=.. \
+"
+
+SRC_URI[md5sum] = "2246009411af32b1e02fbb0b242a0fc0"
+SRC_URI[sha256sum] = "7a245abb5fee23319f59b970db0bb014a2932fd6d5bd44f16f7dd31bbe25003a"
+
+S = "${WORKDIR}/${PN}-${PV}/appshell"
+
+DEPENDS = "python3 libdrm"
+
+OECMAKE_GENERATOR = "Unix Makefiles"
+
+SYSTEMD_SERVICE_${PN} = "imx8-isp.service"
+
+EXTRA_OECMAKE += " \
+ -DCMAKE_BUILD_TYPE=release \
+ -DISP_VERSION=ISP8000NANO_V1802 \
+ -DPLATFORM=ARM64 \
+ -DAPPMODE=V4L2 \
+ -DQTLESS=1 \
+ -DFULL_SRC_COMPILE=1 \
+ -DWITH_DRM=1 \
+ -DWITH_DWE=1 \
+ -DSERVER_LESS=1 \
+ -DSUBDEV_V4L2=1 \
+ -DENABLE_IRQ=1 \
+ -DPARTITION_BUILD=0 \
+ -D3A_SRC_BUILD=0 \
+ -Wno-dev \
+"
+
+do_configure_prepend() {
+ export SDKTARGETSYSROOT=${STAGING_DIR_HOST}
+}
+
+do_install() {
+ install -d ${D}/${libdir}
+ install -d ${D}/${includedir}
+ install -d ${D}/opt/imx8-isp/bin
+
+ cp -r ${WORKDIR}/build/generated/release/bin/*_test ${D}/opt/imx8-isp/bin
+ cp -r ${WORKDIR}/build/generated/release/bin/*2775* ${D}/opt/imx8-isp/bin
+ cp -r ${WORKDIR}/build/generated/release/bin/isp_media_server ${D}/opt/imx8-isp/bin
+ cp -r ${WORKDIR}/build/generated/release/bin/vvext ${D}/opt/imx8-isp/bin
+ cp -r ${WORKDIR}/${PN}-${PV}/mediacontrol/case/ ${D}/opt/imx8-isp/bin
+ cp -r ${WORKDIR}/build/generated/release/lib/*.so* ${D}/${libdir}
+ cp -r ${WORKDIR}/build/generated/release/include/* ${D}/${includedir}
+
+ cp ${WORKDIR}/${PN}-${PV}/imx/run.sh ${D}/opt/imx8-isp/bin
+ cp ${WORKDIR}/${PN}-${PV}/imx/start_isp.sh ${D}/opt/imx8-isp/bin
+
+ chmod +x ${D}/opt/imx8-isp/bin/run.sh
+ chmod +x ${D}/opt/imx8-isp/bin/start_isp.sh
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/${PN}-${PV}/imx/imx8-isp.service ${D}${systemd_system_unitdir}
+ fi
+}
+
+RDEPENDS_${PN} = "libdrm libpython3"
+
+PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"
+
+FILES_${PN} = "${libdir} /opt ${systemd_system_unitdir}/imx8-isp.service"
+FILES_${PN}-dbg += "${libdir}/.debug"
+
+INSANE_SKIP_${PN} += "rpaths dev-deps dev-so"
+INSANE_SKIP_${PN}-dev += "rpaths dev-elf"
+
+COMPATIBLE_MACHINE = "(imx|use-nxp-bsp)"
diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
index 9b918f2c..726b1e16 100644
--- a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
+++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
@@ -22,11 +22,19 @@ EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \
--libdir=${libdir} \
${PACKAGECONFIG_CONFARGS}"
+# 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 ?= " "
-PACKAGECONFIG_append_imxgpu2d = " g2d"
+PACKAGECONFIG_append_imxgpu2d = " ${LIBG2D_PACKAGECONFIG}"
PACKAGECONFIG_append_imxipu = " ipu"
PACKAGECONFIG_append_imxpxp = " pxp"
-PACKAGECONFIG_append_mx8m = " dwl ion"
+PACKAGECONFIG_append_mx8m = " ion dwl"
+PACKAGECONFIG_append_mx8qm = " ion"
+PACKAGECONFIG_append_mx8qxp = " ion"
HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2"
diff --git a/recipes-bsp/mc-utils/mc-utils_git.bb b/recipes-bsp/mc-utils/mc-utils_git.bb
index 31645061..b3c79b99 100644
--- a/recipes-bsp/mc-utils/mc-utils_git.bb
+++ b/recipes-bsp/mc-utils/mc-utils_git.bb
@@ -10,7 +10,7 @@ DEPENDS += "dtc-native"
inherit deploy
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1"
-SRCREV = "8672a5f5abcd3a354dcab07e03f2a8a69b2e962d"
+SRCREV = "8e0b863693fc2ccbc62a62c79b4e3db6da88c16e"
S = "${WORKDIR}/git"
@@ -18,8 +18,10 @@ MC_CFG ?= ""
MC_CFG_ls1088a = "ls1088a"
MC_CFG_ls2088a = "ls2088a"
MC_CFG_lx2160a = "lx2160a"
+MC_CFG_lx2162aqds = "lx2162aqds"
MC_FLAVOUR ?= "RDB"
+MC_FLAVOUR_lx2162a = ""
do_compile () {
oe_runmake -C config
diff --git a/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb b/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
index fd53807f..24bb8d9f 100644
--- a/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
+++ b/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
@@ -8,7 +8,7 @@ INHIBIT_DEFAULT_DEPS = "1"
inherit deploy
SRC_URI = "git://github.com/NXP/qoriq-engine-pfe-bin.git;nobranch=1"
-SRCREV = "d3a8ef0760c54ddc243039c86389497e37be90ab"
+SRCREV = "f55ee9f72090309bbb7ab71f48a498fc02909234"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
index e1e63cce..b09a158e 100644
--- a/recipes-bsp/rcw/rcw_git.bb
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -8,7 +8,7 @@ DEPENDS += "tcl-native"
inherit deploy siteinfo
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1"
-SRCREV = "e0fab6d9b61003caef577f7474c2fac61e6ba2ff"
+SRCREV = "bd6675518e6cb22f731c53407cc0631aa240f49f"
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.10.inc
index 1ccd0d17..b0e665e0 100644
--- a/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc
+++ b/recipes-bsp/u-boot/u-boot-fslc-common_2020.10.inc
@@ -4,16 +4,16 @@
inherit fsl-u-boot-localversion
LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"
DEPENDS += "bison-native"
SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH}"
-SRCREV = "a266838009e02b369b51f4139c6ac64facb12d34"
-SRCBRANCH = "2020.04+fslc"
+SRCREV = "80c23498b425447a4a04d2a85ca4c2aec6ec349a"
+SRCBRANCH = "2020.10+fslc"
-PV = "v2020.04+git${SRCPV}"
+PV = "v2020.10+git${SRCPV}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
diff --git a/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.10.bb b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.10.bb
new file mode 100644
index 00000000..7f02746b
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.10.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-fslc-mxsboot_2020.04.bb b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.10.bb
index 2492f450..2492f450 100644
--- a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb
+++ b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.10.bb
diff --git a/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb b/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb
deleted file mode 100644
index 64588efc..00000000
--- a/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require recipes-bsp/u-boot/u-boot.inc
-require u-boot-fslc-common_${PV}.inc
-
-DESCRIPTION = "U-Boot based on mainline U-Boot used by FSL Community BSP in \
-order to provide support for some backported features and fixes, or because it \
-was submitted for revision and it takes some time to become part of a stable \
-version, or because it is not applicable for upstreaming."
-
-DEPENDS_append = " bc-native dtc-native lzop-native"
-
-PROVIDES += "u-boot"
-
-B = "${WORKDIR}/build"
-
-# FIXME: Allow linking of 'tools' binaries with native libraries
-# used for generating the boot logo and other tools used
-# during the build process.
-EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \
- HOSTLDFLAGS="${BUILD_LDFLAGS}" \
- HOSTSTRIP=true'
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)"
diff --git a/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb b/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb
new file mode 100644
index 00000000..86620c44
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-fslc_2020.10.bb
@@ -0,0 +1,73 @@
+require recipes-bsp/u-boot/u-boot.inc
+require u-boot-fslc-common_${PV}.inc
+
+DESCRIPTION = "U-Boot based on mainline U-Boot used by FSL Community BSP in \
+order to provide support for some backported features and fixes, or because it \
+was submitted for revision and it takes some time to become part of a stable \
+version, or because it is not applicable for upstreaming."
+
+inherit ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '1', 'imx-boot-container', '')}
+
+DEPENDS += "bc-native dtc-native lzop-native"
+
+# Location known to imx-boot component, where U-Boot artifacts
+# should be additionally deployed.
+# See below note above do_deploy_append_mx8m for the purpose of
+# this delopyment location
+BOOT_TOOLS = "imx-boot-tools"
+
+PROVIDES += "u-boot"
+
+B = "${WORKDIR}/build"
+
+# FIXME: Allow linking of 'tools' binaries with native libraries
+# used for generating the boot logo and other tools used
+# during the build process.
+EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \
+ HOSTLDFLAGS="${BUILD_LDFLAGS}" \
+ HOSTSTRIP=true'
+
+#
+# imx8m machines require additional deployment tasks to be
+# carried out due to the fact that final boot image is constructed
+# using imx-boot recipe. It produces a boot binary image, which is
+# constructed from various binary components (u-boot with separate
+# dtb, atf, DDR firmware and optional op-tee) into a single image
+# using FIT format. This image is then parsed and loaded either via
+# SPL directly (imx8mm), or using bootrom code (imx8mn and imx8mp).
+#
+# In order for imx-boot to construct the final binary boot image,
+# it is required that the U-Boot dtb files are to be deployed into
+# a location known by imx-boot so they could be picked up and
+# inserted into the boot container.
+#
+# NOTE: This is only applicable to those derivatives of mx8m family,
+# which did not adopt the boot container mechanism provided by U-Boot
+# build system itself. U-Boot is capable of producing a result binary,
+# which includes all those deployed pieces below, hence once derivative
+# starts to use it - below append would not be necessary.
+# Once all mx8m derivatives are migrated to use the 'flash.bin' boot
+# container - this append can be dropped completely.
+do_deploy_append_mx8m() {
+ # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary
+ if [ -n "${UBOOT_CONFIG}" ]; then
+ for config in ${UBOOT_MACHINE}; do
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
+ if [ $j -eq $i ]
+ 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}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
+ fi
+ done
+ unset j
+ done
+ unset i
+ fi
+}
+
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)"
diff --git a/recipes-bsp/u-boot/u-boot-imx-common.inc b/recipes-bsp/u-boot/u-boot-imx-common.inc
index a2d2ed01..2a08aa8a 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"
+SRCBRANCH = "imx_v2020.04_5.4.70_2.3.0"
SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "228843cdf5435d4bd69f42a6015f78761ff4cc0d"
+SRCREV = "e42dee801ec55bc40347cbb98f13bfb5899f0368"
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..d1e9512c 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
@@ -6,5 +6,10 @@ PROVIDES_append_class-native = " u-boot-tools-native"
PROVIDES_append_class-nativesdk = " nativesdk-u-boot-tools"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
-COMPATIBLE_MACHINE_class-target = "(mx6|mx7|mx8)"
+
+# Set recipe as incompatible by default
+COMPATIBLE_MACHINE = "(^$)"
+
+# Whitelist its use for i.MX based machines
+COMPATIBLE_MACHINE_use-mainline-bsp = "(.)"
+COMPATIBLE_MACHINE_use-nxp-bsp = "(.)"
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..55d3e7c5 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
@@ -32,4 +29,4 @@ do_deploy_append_mx8m() {
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
+COMPATIBLE_MACHINE = "(mx6|mx7|mx8|use-mainline-bsp)"
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch
deleted file mode 100644
index 2609760c..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001
-From: Peter Robinson <pbrobinson@gmail.com>
-Date: Thu, 30 Jan 2020 09:37:15 +0000
-Subject: [PATCH] Remove redundant YYLOC global declaration
-
-Same as the upstream fix for building dtc with gcc 10.
-
-Upstream-Status: Backport
-
-Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
----
- scripts/dtc/dtc-lexer.l | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
-index fd825ebba69c..24af54997758 100644
---- a/scripts/dtc/dtc-lexer.l
-+++ b/scripts/dtc/dtc-lexer.l
-@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
- #include "srcpos.h"
- #include "dtc-parser.tab.h"
-
--YYLTYPE yylloc;
- extern bool treesource_error;
-
- /* CAUTION: this will stop working if we ever use yyless() or yyunput() */
---
-2.26.2
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch
deleted file mode 100644
index e530b7ca..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From b6ee0cf89f9405094cbb6047076a13e14ebc030b Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Thu, 31 Oct 2019 07:43:03 -0600
-Subject: [PATCH] binman: Convert a few tests to Python 3
-
-Some tests have crept in with Python 2 strings and constructs. Convert
-then.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/binman/ftest.py | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
-index 93507993a0..80df0e3ca9 100644
---- a/tools/binman/ftest.py
-+++ b/tools/binman/ftest.py
-@@ -2113,7 +2113,7 @@ class TestFunctional(unittest.TestCase):
- data = self.data = self._DoReadFileRealDtb('115_fdtmap.dts')
- fdtmap_data = data[len(U_BOOT_DATA):]
- magic = fdtmap_data[:8]
-- self.assertEqual('_FDTMAP_', magic)
-+ self.assertEqual(b'_FDTMAP_', magic)
- self.assertEqual(tools.GetBytes(0, 8), fdtmap_data[8:16])
-
- fdt_data = fdtmap_data[16:]
-@@ -2156,7 +2156,7 @@ class TestFunctional(unittest.TestCase):
- dtb = fdt.Fdt.FromData(fdt_data)
- fdt_size = dtb.GetFdtObj().totalsize()
- hdr_data = data[-8:]
-- self.assertEqual('BinM', hdr_data[:4])
-+ self.assertEqual(b'BinM', hdr_data[:4])
- offset = struct.unpack('<I', hdr_data[4:])[0] & 0xffffffff
- self.assertEqual(fdtmap_pos - 0x400, offset - (1 << 32))
-
-@@ -2165,7 +2165,7 @@ class TestFunctional(unittest.TestCase):
- data = self.data = self._DoReadFileRealDtb('117_fdtmap_hdr_start.dts')
- fdtmap_pos = 0x100 + len(U_BOOT_DATA)
- hdr_data = data[:8]
-- self.assertEqual('BinM', hdr_data[:4])
-+ self.assertEqual(b'BinM', hdr_data[:4])
- offset = struct.unpack('<I', hdr_data[4:])[0]
- self.assertEqual(fdtmap_pos, offset)
-
-@@ -2174,7 +2174,7 @@ class TestFunctional(unittest.TestCase):
- data = self.data = self._DoReadFileRealDtb('118_fdtmap_hdr_pos.dts')
- fdtmap_pos = 0x100 + len(U_BOOT_DATA)
- hdr_data = data[0x80:0x88]
-- self.assertEqual('BinM', hdr_data[:4])
-+ self.assertEqual(b'BinM', hdr_data[:4])
- offset = struct.unpack('<I', hdr_data[4:])[0]
- self.assertEqual(fdtmap_pos, offset)
-
-@@ -2435,9 +2435,9 @@ class TestFunctional(unittest.TestCase):
- ' section 100 %x section 100' % section_size,
- ' cbfs 100 400 cbfs 0',
- ' u-boot 138 4 u-boot 38',
--' u-boot-dtb 180 10f u-boot-dtb 80 3c9',
-+' u-boot-dtb 180 105 u-boot-dtb 80 3c9',
- ' u-boot-dtb 500 %x u-boot-dtb 400 3c9' % fdt_size,
--' fdtmap %x 3b4 fdtmap %x' %
-+' fdtmap %x 3bd fdtmap %x' %
- (fdtmap_offset, fdtmap_offset),
- ' image-header bf8 8 image-header bf8',
- ]
-@@ -2522,7 +2522,7 @@ class TestFunctional(unittest.TestCase):
- data = self._RunExtractCmd('section')
- cbfs_data = data[:0x400]
- cbfs = cbfs_util.CbfsReader(cbfs_data)
-- self.assertEqual(['u-boot', 'u-boot-dtb', ''], cbfs.files.keys())
-+ self.assertEqual(['u-boot', 'u-boot-dtb', ''], list(cbfs.files.keys()))
- dtb_data = data[0x400:]
- dtb = self._decompress(dtb_data)
- self.assertEqual(EXTRACT_DTB_SIZE, len(dtb))
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Move-to-use-Python-3.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Move-to-use-Python-3.patch
deleted file mode 100644
index c1a05b32..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Move-to-use-Python-3.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 388560134b99dc4cc752627d3a7e9f8c8c2a89a7 Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Thu, 31 Oct 2019 07:43:05 -0600
-Subject: [PATCH] binman: Move to use Python 3
-
-Update this tool to use Python 3 to meet the 2020 deadline.
-
-Unfortunately this introduces a test failure due to a problem in pylibfdt
-on Python 3. I will investigate.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/binman/binman.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/binman/binman.py b/tools/binman/binman.py
-index 8bd5868df2..9e6fd72117 100755
---- a/tools/binman/binman.py
-+++ b/tools/binman/binman.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: GPL-2.0+
-
- # Copyright (c) 2016 Google, Inc
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch
deleted file mode 100644
index 5d7ec42f..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch
+++ /dev/null
@@ -1,928 +0,0 @@
-From c05aa0364280803d8274e260a739553d588ea052 Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Thu, 31 Oct 2019 07:42:53 -0600
-Subject: [PATCH] buildman: Convert to Python 3
-
-Convert buildman to Python 3 and make it use that, to meet the 2020
-deadline.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/buildman/board.py | 9 +--
- tools/buildman/bsettings.py | 20 +++----
- tools/buildman/builder.py | 47 ++++++++--------
- tools/buildman/builderthread.py | 24 ++++----
- tools/buildman/buildman.py | 10 ++--
- tools/buildman/control.py | 44 +++++++--------
- tools/buildman/func_test.py | 16 +++---
- tools/buildman/test.py | 22 ++++----
- tools/buildman/toolchain.py | 99 +++++++++++++++++----------------
- 9 files changed, 146 insertions(+), 145 deletions(-)
-
-diff --git a/tools/buildman/board.py b/tools/buildman/board.py
-index 2a1d021574..447aaabea8 100644
---- a/tools/buildman/board.py
-+++ b/tools/buildman/board.py
-@@ -1,6 +1,7 @@
- # SPDX-License-Identifier: GPL-2.0+
- # Copyright (c) 2012 The Chromium OS Authors.
-
-+from collections import OrderedDict
- import re
-
- class Expr:
-@@ -120,7 +121,7 @@ class Boards:
- Args:
- fname: Filename of boards.cfg file
- """
-- with open(fname, 'r') as fd:
-+ with open(fname, 'r', encoding='utf-8') as fd:
- for line in fd:
- if line[0] == '#':
- continue
-@@ -155,7 +156,7 @@ class Boards:
- key is board.target
- value is board
- """
-- board_dict = {}
-+ board_dict = OrderedDict()
- for board in self._boards:
- board_dict[board.target] = board
- return board_dict
-@@ -166,7 +167,7 @@ class Boards:
- Returns:
- List of Board objects that are marked selected
- """
-- board_dict = {}
-+ board_dict = OrderedDict()
- for board in self._boards:
- if board.build_it:
- board_dict[board.target] = board
-@@ -259,7 +260,7 @@ class Boards:
- due to each argument, arranged by argument.
- List of errors found
- """
-- result = {}
-+ result = OrderedDict()
- warnings = []
- terms = self._BuildTerms(args)
-
-diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
-index 03d7439aa5..0b7208da37 100644
---- a/tools/buildman/bsettings.py
-+++ b/tools/buildman/bsettings.py
-@@ -1,9 +1,9 @@
- # SPDX-License-Identifier: GPL-2.0+
- # Copyright (c) 2012 The Chromium OS Authors.
-
--import ConfigParser
-+import configparser
- import os
--import StringIO
-+import io
-
-
- def Setup(fname=''):
-@@ -15,20 +15,20 @@ def Setup(fname=''):
- global settings
- global config_fname
-
-- settings = ConfigParser.SafeConfigParser()
-+ settings = configparser.SafeConfigParser()
- if fname is not None:
- config_fname = fname
- if config_fname == '':
- config_fname = '%s/.buildman' % os.getenv('HOME')
- if not os.path.exists(config_fname):
-- print 'No config file found ~/.buildman\nCreating one...\n'
-+ print('No config file found ~/.buildman\nCreating one...\n')
- CreateBuildmanConfigFile(config_fname)
-- print 'To install tool chains, please use the --fetch-arch option'
-+ print('To install tool chains, please use the --fetch-arch option')
- if config_fname:
- settings.read(config_fname)
-
- def AddFile(data):
-- settings.readfp(StringIO.StringIO(data))
-+ settings.readfp(io.StringIO(data))
-
- def GetItems(section):
- """Get the items from a section of the config.
-@@ -41,7 +41,7 @@ def GetItems(section):
- """
- try:
- return settings.items(section)
-- except ConfigParser.NoSectionError as e:
-+ except configparser.NoSectionError as e:
- return []
- except:
- raise
-@@ -68,10 +68,10 @@ def CreateBuildmanConfigFile(config_fname):
- try:
- f = open(config_fname, 'w')
- except IOError:
-- print "Couldn't create buildman config file '%s'\n" % config_fname
-+ print("Couldn't create buildman config file '%s'\n" % config_fname)
- raise
-
-- print >>f, '''[toolchain]
-+ print('''[toolchain]
- # name = path
- # e.g. x86 = /opt/gcc-4.6.3-nolibc/x86_64-linux
-
-@@ -93,5 +93,5 @@ openrisc = or1k
- # snapper-boards=ENABLE_AT91_TEST=1
- # snapper9260=${snapper-boards} BUILD_TAG=442
- # snapper9g45=${snapper-boards} BUILD_TAG=443
--'''
-+''', file=f)
- f.close();
-diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
-index fbb236676c..cfbe4c26b1 100644
---- a/tools/buildman/builder.py
-+++ b/tools/buildman/builder.py
-@@ -9,7 +9,7 @@ from datetime import datetime, timedelta
- import glob
- import os
- import re
--import Queue
-+import queue
- import shutil
- import signal
- import string
-@@ -92,11 +92,10 @@ u-boot/ source directory
- """
-
- # Possible build outcomes
--OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, OUTCOME_UNKNOWN = range(4)
-+OUTCOME_OK, OUTCOME_WARNING, OUTCOME_ERROR, OUTCOME_UNKNOWN = list(range(4))
-
- # Translate a commit subject into a valid filename (and handle unicode)
--trans_valid_chars = string.maketrans('/: ', '---')
--trans_valid_chars = trans_valid_chars.decode('latin-1')
-+trans_valid_chars = str.maketrans('/: ', '---')
-
- BASE_CONFIG_FILENAMES = [
- 'u-boot.cfg', 'u-boot-spl.cfg', 'u-boot-tpl.cfg'
-@@ -122,8 +121,8 @@ class Config:
- def __hash__(self):
- val = 0
- for fname in self.config:
-- for key, value in self.config[fname].iteritems():
-- print key, value
-+ for key, value in self.config[fname].items():
-+ print(key, value)
- val = val ^ hash(key) & hash(value)
- return val
-
-@@ -293,8 +292,8 @@ class Builder:
- self._re_dtb_warning = re.compile('(.*): Warning .*')
- self._re_note = re.compile('(.*):(\d*):(\d*): note: this is the location of the previous.*')
-
-- self.queue = Queue.Queue()
-- self.out_queue = Queue.Queue()
-+ self.queue = queue.Queue()
-+ self.out_queue = queue.Queue()
- for i in range(self.num_threads):
- t = builderthread.BuilderThread(self, i, incremental,
- per_board_out_dir)
-@@ -781,7 +780,7 @@ class Builder:
- config = {}
- environment = {}
-
-- for board in boards_selected.itervalues():
-+ for board in boards_selected.values():
- outcome = self.GetBuildOutcome(commit_upto, board.target,
- read_func_sizes, read_config,
- read_environment)
-@@ -814,13 +813,13 @@ class Builder:
- tconfig = Config(self.config_filenames, board.target)
- for fname in self.config_filenames:
- if outcome.config:
-- for key, value in outcome.config[fname].iteritems():
-+ for key, value in outcome.config[fname].items():
- tconfig.Add(fname, key, value)
- config[board.target] = tconfig
-
- tenvironment = Environment(board.target)
- if outcome.environment:
-- for key, value in outcome.environment.iteritems():
-+ for key, value in outcome.environment.items():
- tenvironment.Add(key, value)
- environment[board.target] = tenvironment
-
-@@ -1040,12 +1039,12 @@ class Builder:
-
- # We now have a list of image size changes sorted by arch
- # Print out a summary of these
-- for arch, target_list in arch_list.iteritems():
-+ for arch, target_list in arch_list.items():
- # Get total difference for each type
- totals = {}
- for result in target_list:
- total = 0
-- for name, diff in result.iteritems():
-+ for name, diff in result.items():
- if name.startswith('_'):
- continue
- total += diff
-@@ -1250,7 +1249,7 @@ class Builder:
- if self._show_unknown:
- self.AddOutcome(board_selected, arch_list, unknown_boards, '?',
- self.col.MAGENTA)
-- for arch, target_list in arch_list.iteritems():
-+ for arch, target_list in arch_list.items():
- Print('%10s: %s' % (arch, target_list))
- self._error_lines += 1
- if better_err:
-@@ -1283,13 +1282,13 @@ class Builder:
- environment_minus = {}
- environment_change = {}
- base = tbase.environment
-- for key, value in tenvironment.environment.iteritems():
-+ for key, value in tenvironment.environment.items():
- if key not in base:
- environment_plus[key] = value
-- for key, value in base.iteritems():
-+ for key, value in base.items():
- if key not in tenvironment.environment:
- environment_minus[key] = value
-- for key, value in base.iteritems():
-+ for key, value in base.items():
- new_value = tenvironment.environment.get(key)
- if new_value and value != new_value:
- desc = '%s -> %s' % (value, new_value)
-@@ -1342,15 +1341,15 @@ class Builder:
- config_minus = {}
- config_change = {}
- base = tbase.config[name]
-- for key, value in tconfig.config[name].iteritems():
-+ for key, value in tconfig.config[name].items():
- if key not in base:
- config_plus[key] = value
- all_config_plus[key] = value
-- for key, value in base.iteritems():
-+ for key, value in base.items():
- if key not in tconfig.config[name]:
- config_minus[key] = value
- all_config_minus[key] = value
-- for key, value in base.iteritems():
-+ for key, value in base.items():
- new_value = tconfig.config.get(key)
- if new_value and value != new_value:
- desc = '%s -> %s' % (value, new_value)
-@@ -1368,7 +1367,7 @@ class Builder:
- summary[target] = '\n'.join(lines)
-
- lines_by_target = {}
-- for target, lines in summary.iteritems():
-+ for target, lines in summary.items():
- if lines in lines_by_target:
- lines_by_target[lines].append(target)
- else:
-@@ -1392,7 +1391,7 @@ class Builder:
- Print('%s:' % arch)
- _OutputConfigInfo(lines)
-
-- for lines, targets in lines_by_target.iteritems():
-+ for lines, targets in lines_by_target.items():
- if not lines:
- continue
- Print('%s :' % ' '.join(sorted(targets)))
-@@ -1463,7 +1462,7 @@ class Builder:
- commits: Selected commits to build
- """
- # First work out how many commits we will build
-- count = (self.commit_count + self._step - 1) / self._step
-+ count = (self.commit_count + self._step - 1) // self._step
- self.count = len(board_selected) * count
- self.upto = self.warned = self.fail = 0
- self._timestamps = collections.deque()
-@@ -1566,7 +1565,7 @@ class Builder:
- self.ProcessResult(None)
-
- # Create jobs to build all commits for each board
-- for brd in board_selected.itervalues():
-+ for brd in board_selected.values():
- job = builderthread.BuilderJob()
- job.board = brd
- job.commits = commits
-diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
-index 8a9d47cd5e..570c1f6595 100644
---- a/tools/buildman/builderthread.py
-+++ b/tools/buildman/builderthread.py
-@@ -28,7 +28,7 @@ def Mkdir(dirname, parents = False):
- except OSError as err:
- if err.errno == errno.EEXIST:
- if os.path.realpath('.') == os.path.realpath(dirname):
-- print "Cannot create the current working directory '%s'!" % dirname
-+ print("Cannot create the current working directory '%s'!" % dirname)
- sys.exit(1)
- pass
- else:
-@@ -291,15 +291,13 @@ class BuilderThread(threading.Thread):
- outfile = os.path.join(build_dir, 'log')
- with open(outfile, 'w') as fd:
- if result.stdout:
-- # We don't want unicode characters in log files
-- fd.write(result.stdout.decode('UTF-8').encode('ASCII', 'replace'))
-+ fd.write(result.stdout)
-
- errfile = self.builder.GetErrFile(result.commit_upto,
- result.brd.target)
- if result.stderr:
- with open(errfile, 'w') as fd:
-- # We don't want unicode characters in log files
-- fd.write(result.stderr.decode('UTF-8').encode('ASCII', 'replace'))
-+ fd.write(result.stderr)
- elif os.path.exists(errfile):
- os.remove(errfile)
-
-@@ -314,17 +312,17 @@ class BuilderThread(threading.Thread):
- else:
- fd.write('%s' % result.return_code)
- with open(os.path.join(build_dir, 'toolchain'), 'w') as fd:
-- print >>fd, 'gcc', result.toolchain.gcc
-- print >>fd, 'path', result.toolchain.path
-- print >>fd, 'cross', result.toolchain.cross
-- print >>fd, 'arch', result.toolchain.arch
-+ print('gcc', result.toolchain.gcc, file=fd)
-+ print('path', result.toolchain.path, file=fd)
-+ print('cross', result.toolchain.cross, file=fd)
-+ print('arch', result.toolchain.arch, file=fd)
- fd.write('%s' % result.return_code)
-
- # Write out the image and function size information and an objdump
- env = result.toolchain.MakeEnvironment(self.builder.full_path)
- with open(os.path.join(build_dir, 'env'), 'w') as fd:
- for var in sorted(env.keys()):
-- print >>fd, '%s="%s"' % (var, env[var])
-+ print('%s="%s"' % (var, env[var]), file=fd)
- lines = []
- for fname in ['u-boot', 'spl/u-boot-spl']:
- cmd = ['%snm' % self.toolchain.cross, '--size-sort', fname]
-@@ -335,7 +333,7 @@ class BuilderThread(threading.Thread):
- nm = self.builder.GetFuncSizesFile(result.commit_upto,
- result.brd.target, fname)
- with open(nm, 'w') as fd:
-- print >>fd, nm_result.stdout,
-+ print(nm_result.stdout, end=' ', file=fd)
-
- cmd = ['%sobjdump' % self.toolchain.cross, '-h', fname]
- dump_result = command.RunPipe([cmd], capture=True,
-@@ -346,7 +344,7 @@ class BuilderThread(threading.Thread):
- objdump = self.builder.GetObjdumpFile(result.commit_upto,
- result.brd.target, fname)
- with open(objdump, 'w') as fd:
-- print >>fd, dump_result.stdout,
-+ print(dump_result.stdout, end=' ', file=fd)
- for line in dump_result.stdout.splitlines():
- fields = line.split()
- if len(fields) > 5 and fields[1] == '.rodata':
-@@ -378,7 +376,7 @@ class BuilderThread(threading.Thread):
- sizes = self.builder.GetSizesFile(result.commit_upto,
- result.brd.target)
- with open(sizes, 'w') as fd:
-- print >>fd, '\n'.join(lines)
-+ print('\n'.join(lines), file=fd)
-
- # Write out the configuration files, with a special case for SPL
- for dirname in ['', 'spl', 'tpl']:
-diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
-index f17aa15e7c..30a8690f93 100755
---- a/tools/buildman/buildman.py
-+++ b/tools/buildman/buildman.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: GPL-2.0+
- #
- # Copyright (c) 2012 The Chromium OS Authors.
-@@ -6,6 +6,8 @@
-
- """See README for more information"""
-
-+from __future__ import print_function
-+
- import multiprocessing
- import os
- import re
-@@ -46,11 +48,11 @@ def RunTests(skip_net_tests):
- suite = unittest.TestLoader().loadTestsFromTestCase(module)
- suite.run(result)
-
-- print result
-+ print(result)
- for test, err in result.errors:
-- print err
-+ print(err)
- for test, err in result.failures:
-- print err
-+ print(err)
-
-
- options, args = cmdline.ParseArgs()
-diff --git a/tools/buildman/control.py b/tools/buildman/control.py
-index 9787b86747..216012d001 100644
---- a/tools/buildman/control.py
-+++ b/tools/buildman/control.py
-@@ -30,7 +30,7 @@ def GetActionSummary(is_summary, commits, selected, options):
- """
- if commits:
- count = len(commits)
-- count = (count + options.step - 1) / options.step
-+ count = (count + options.step - 1) // options.step
- commit_str = '%d commit%s' % (count, GetPlural(count))
- else:
- commit_str = 'current source'
-@@ -59,31 +59,31 @@ def ShowActions(series, why_selected, boards_selected, builder, options,
- board_warnings: List of warnings obtained from board selected
- """
- col = terminal.Color()
-- print 'Dry run, so not doing much. But I would do this:'
-- print
-+ print('Dry run, so not doing much. But I would do this:')
-+ print()
- if series:
- commits = series.commits
- else:
- commits = None
-- print GetActionSummary(False, commits, boards_selected,
-- options)
-- print 'Build directory: %s' % builder.base_dir
-+ print(GetActionSummary(False, commits, boards_selected,
-+ options))
-+ print('Build directory: %s' % builder.base_dir)
- if commits:
- for upto in range(0, len(series.commits), options.step):
- commit = series.commits[upto]
-- print ' ', col.Color(col.YELLOW, commit.hash[:8], bright=False),
-- print commit.subject
-- print
-+ print(' ', col.Color(col.YELLOW, commit.hash[:8], bright=False), end=' ')
-+ print(commit.subject)
-+ print()
- for arg in why_selected:
- if arg != 'all':
-- print arg, ': %d boards' % len(why_selected[arg])
-+ print(arg, ': %d boards' % len(why_selected[arg]))
- if options.verbose:
-- print ' %s' % ' '.join(why_selected[arg])
-- print ('Total boards to build for each commit: %d\n' %
-- len(why_selected['all']))
-+ print(' %s' % ' '.join(why_selected[arg]))
-+ print(('Total boards to build for each commit: %d\n' %
-+ len(why_selected['all'])))
- if board_warnings:
- for warning in board_warnings:
-- print col.Color(col.YELLOW, warning)
-+ print(col.Color(col.YELLOW, warning))
-
- def CheckOutputDir(output_dir):
- """Make sure that the output directory is not within the current directory
-@@ -146,17 +146,17 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
- if options.fetch_arch:
- if options.fetch_arch == 'list':
- sorted_list = toolchains.ListArchs()
-- print col.Color(col.BLUE, 'Available architectures: %s\n' %
-- ' '.join(sorted_list))
-+ print(col.Color(col.BLUE, 'Available architectures: %s\n' %
-+ ' '.join(sorted_list)))
- return 0
- else:
- fetch_arch = options.fetch_arch
- if fetch_arch == 'all':
- fetch_arch = ','.join(toolchains.ListArchs())
-- print col.Color(col.CYAN, '\nDownloading toolchains: %s' %
-- fetch_arch)
-+ print(col.Color(col.CYAN, '\nDownloading toolchains: %s' %
-+ fetch_arch))
- for arch in fetch_arch.split(','):
-- print
-+ print()
- ret = toolchains.FetchAndInstall(arch)
- if ret:
- return ret
-@@ -167,7 +167,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
- toolchains.Scan(options.list_tool_chains and options.verbose)
- if options.list_tool_chains:
- toolchains.List()
-- print
-+ print()
- return 0
-
- # Work out how many commits to build. We want to build everything on the
-@@ -191,7 +191,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
- sys.exit(col.Color(col.RED, "Range '%s' has no commits" %
- options.branch))
- if msg:
-- print col.Color(col.YELLOW, msg)
-+ print(col.Color(col.YELLOW, msg))
- count += 1 # Build upstream commit also
-
- if not count:
-@@ -268,7 +268,7 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
- options.threads = min(multiprocessing.cpu_count(), len(selected))
- if not options.jobs:
- options.jobs = max(1, (multiprocessing.cpu_count() +
-- len(selected) - 1) / len(selected))
-+ len(selected) - 1) // len(selected))
-
- if not options.step:
- options.step = len(series.commits) - 1
-diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
-index f90b8ea7f5..4c3d497294 100644
---- a/tools/buildman/func_test.py
-+++ b/tools/buildman/func_test.py
-@@ -270,7 +270,7 @@ class TestFunctional(unittest.TestCase):
- stdout=''.join(commit_log[:count]))
-
- # Not handled, so abort
-- print 'git log', args
-+ print('git log', args)
- sys.exit(1)
-
- def _HandleCommandGitConfig(self, args):
-@@ -286,7 +286,7 @@ class TestFunctional(unittest.TestCase):
- stdout='refs/heads/master\n')
-
- # Not handled, so abort
-- print 'git config', args
-+ print('git config', args)
- sys.exit(1)
-
- def _HandleCommandGit(self, in_args):
-@@ -320,7 +320,7 @@ class TestFunctional(unittest.TestCase):
- return command.CommandResult(return_code=0)
-
- # Not handled, so abort
-- print 'git', git_args, sub_cmd, args
-+ print('git', git_args, sub_cmd, args)
- sys.exit(1)
-
- def _HandleCommandNm(self, args):
-@@ -351,7 +351,7 @@ class TestFunctional(unittest.TestCase):
- if pipe_list[1] == ['wc', '-l']:
- wc = True
- else:
-- print 'invalid pipe', kwargs
-+ print('invalid pipe', kwargs)
- sys.exit(1)
- cmd = pipe_list[0][0]
- args = pipe_list[0][1:]
-@@ -371,7 +371,7 @@ class TestFunctional(unittest.TestCase):
-
- if not result:
- # Not handled, so abort
-- print 'unknown command', kwargs
-+ print('unknown command', kwargs)
- sys.exit(1)
-
- if wc:
-@@ -404,14 +404,14 @@ class TestFunctional(unittest.TestCase):
- return command.CommandResult(return_code=0)
-
- # Not handled, so abort
-- print 'make', stage
-+ print('make', stage)
- sys.exit(1)
-
- # Example function to print output lines
- def print_lines(self, lines):
-- print len(lines)
-+ print(len(lines))
- for line in lines:
-- print line
-+ print(line)
- #self.print_lines(terminal.GetPrintTestLines())
-
- def testNoBoards(self):
-diff --git a/tools/buildman/test.py b/tools/buildman/test.py
-index ed99b9375c..b4e28d6867 100644
---- a/tools/buildman/test.py
-+++ b/tools/buildman/test.py
-@@ -212,11 +212,11 @@ class TestBuild(unittest.TestCase):
- self.assertEqual(lines[1].text, '02: %s' % commits[1][1])
-
- col = terminal.Color()
-- self.assertSummary(lines[2].text, 'sandbox', 'w+', ['board4'],
-+ self.assertSummary(lines[2].text, 'arm', 'w+', ['board1'],
- outcome=OUTCOME_WARN)
-- self.assertSummary(lines[3].text, 'arm', 'w+', ['board1'],
-+ self.assertSummary(lines[3].text, 'powerpc', 'w+', ['board2', 'board3'],
- outcome=OUTCOME_WARN)
-- self.assertSummary(lines[4].text, 'powerpc', 'w+', ['board2', 'board3'],
-+ self.assertSummary(lines[4].text, 'sandbox', 'w+', ['board4'],
- outcome=OUTCOME_WARN)
-
- # Second commit: The warnings should be listed
-@@ -226,10 +226,10 @@ class TestBuild(unittest.TestCase):
-
- # Third commit: Still fails
- self.assertEqual(lines[6].text, '03: %s' % commits[2][1])
-- self.assertSummary(lines[7].text, 'sandbox', '+', ['board4'])
-- self.assertSummary(lines[8].text, 'arm', '', ['board1'],
-+ self.assertSummary(lines[7].text, 'arm', '', ['board1'],
- outcome=OUTCOME_OK)
-- self.assertSummary(lines[9].text, 'powerpc', '+', ['board2', 'board3'])
-+ self.assertSummary(lines[8].text, 'powerpc', '+', ['board2', 'board3'])
-+ self.assertSummary(lines[9].text, 'sandbox', '+', ['board4'])
-
- # Expect a compiler error
- self.assertEqual(lines[10].text, '+%s' %
-@@ -237,8 +237,6 @@ class TestBuild(unittest.TestCase):
-
- # Fourth commit: Compile errors are fixed, just have warning for board3
- self.assertEqual(lines[11].text, '04: %s' % commits[3][1])
-- self.assertSummary(lines[12].text, 'sandbox', 'w+', ['board4'],
-- outcome=OUTCOME_WARN)
- expect = '%10s: ' % 'powerpc'
- expect += ' ' + col.Color(col.GREEN, '')
- expect += ' '
-@@ -246,7 +244,9 @@ class TestBuild(unittest.TestCase):
- expect += ' ' + col.Color(col.YELLOW, 'w+')
- expect += ' '
- expect += col.Color(col.YELLOW, ' %s' % 'board3')
-- self.assertEqual(lines[13].text, expect)
-+ self.assertEqual(lines[12].text, expect)
-+ self.assertSummary(lines[13].text, 'sandbox', 'w+', ['board4'],
-+ outcome=OUTCOME_WARN)
-
- # Compile error fixed
- self.assertEqual(lines[14].text, '-%s' %
-@@ -259,9 +259,9 @@ class TestBuild(unittest.TestCase):
-
- # Fifth commit
- self.assertEqual(lines[16].text, '05: %s' % commits[4][1])
-- self.assertSummary(lines[17].text, 'sandbox', '+', ['board4'])
-- self.assertSummary(lines[18].text, 'powerpc', '', ['board3'],
-+ self.assertSummary(lines[17].text, 'powerpc', '', ['board3'],
- outcome=OUTCOME_OK)
-+ self.assertSummary(lines[18].text, 'sandbox', '+', ['board4'])
-
- # The second line of errors[3] is a duplicate, so buildman will drop it
- expect = errors[3].rstrip().split('\n')
-diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
-index a65737fdf8..cc26e2ede5 100644
---- a/tools/buildman/toolchain.py
-+++ b/tools/buildman/toolchain.py
-@@ -4,18 +4,19 @@
-
- import re
- import glob
--from HTMLParser import HTMLParser
-+from html.parser import HTMLParser
- import os
- import sys
- import tempfile
--import urllib2
-+import urllib.request, urllib.error, urllib.parse
-
- import bsettings
- import command
- import terminal
-+import tools
-
- (PRIORITY_FULL_PREFIX, PRIORITY_PREFIX_GCC, PRIORITY_PREFIX_GCC_PATH,
-- PRIORITY_CALC) = range(4)
-+ PRIORITY_CALC) = list(range(4))
-
- # Simple class to collect links from a page
- class MyHTMLParser(HTMLParser):
-@@ -100,15 +101,15 @@ class Toolchain:
- raise_on_error=False)
- self.ok = result.return_code == 0
- if verbose:
-- print 'Tool chain test: ',
-+ print('Tool chain test: ', end=' ')
- if self.ok:
-- print "OK, arch='%s', priority %d" % (self.arch,
-- self.priority)
-+ print("OK, arch='%s', priority %d" % (self.arch,
-+ self.priority))
- else:
-- print 'BAD'
-- print 'Command: ', cmd
-- print result.stdout
-- print result.stderr
-+ print('BAD')
-+ print('Command: ', cmd)
-+ print(result.stdout)
-+ print(result.stderr)
- else:
- self.ok = True
-
-@@ -138,7 +139,7 @@ class Toolchain:
- value = ''
- for name, value in bsettings.GetItems('toolchain-wrapper'):
- if not value:
-- print "Warning: Wrapper not found"
-+ print("Warning: Wrapper not found")
- if value:
- value = value + ' '
-
-@@ -227,11 +228,11 @@ class Toolchains:
- """
- toolchains = bsettings.GetItems('toolchain')
- if show_warning and not toolchains:
-- print ("Warning: No tool chains. Please run 'buildman "
-+ print(("Warning: No tool chains. Please run 'buildman "
- "--fetch-arch all' to download all available toolchains, or "
- "add a [toolchain] section to your buildman config file "
- "%s. See README for details" %
-- bsettings.config_fname)
-+ bsettings.config_fname))
-
- paths = []
- for name, value in toolchains:
-@@ -272,10 +273,10 @@ class Toolchains:
- if add_it:
- self.toolchains[toolchain.arch] = toolchain
- elif verbose:
-- print ("Toolchain '%s' at priority %d will be ignored because "
-+ print(("Toolchain '%s' at priority %d will be ignored because "
- "another toolchain for arch '%s' has priority %d" %
- (toolchain.gcc, toolchain.priority, toolchain.arch,
-- self.toolchains[toolchain.arch].priority))
-+ self.toolchains[toolchain.arch].priority)))
-
- def ScanPath(self, path, verbose):
- """Scan a path for a valid toolchain
-@@ -289,9 +290,9 @@ class Toolchains:
- fnames = []
- for subdir in ['.', 'bin', 'usr/bin']:
- dirname = os.path.join(path, subdir)
-- if verbose: print " - looking in '%s'" % dirname
-+ if verbose: print(" - looking in '%s'" % dirname)
- for fname in glob.glob(dirname + '/*gcc'):
-- if verbose: print " - found '%s'" % fname
-+ if verbose: print(" - found '%s'" % fname)
- fnames.append(fname)
- return fnames
-
-@@ -321,9 +322,9 @@ class Toolchains:
- Args:
- verbose: True to print out progress information
- """
-- if verbose: print 'Scanning for tool chains'
-+ if verbose: print('Scanning for tool chains')
- for name, value in self.prefixes:
-- if verbose: print " - scanning prefix '%s'" % value
-+ if verbose: print(" - scanning prefix '%s'" % value)
- if os.path.exists(value):
- self.Add(value, True, verbose, PRIORITY_FULL_PREFIX, name)
- continue
-@@ -335,10 +336,10 @@ class Toolchains:
- for f in fname_list:
- self.Add(f, True, verbose, PRIORITY_PREFIX_GCC_PATH, name)
- if not fname_list:
-- raise ValueError, ("No tool chain found for prefix '%s'" %
-+ raise ValueError("No tool chain found for prefix '%s'" %
- value)
- for path in self.paths:
-- if verbose: print " - scanning path '%s'" % path
-+ if verbose: print(" - scanning path '%s'" % path)
- fnames = self.ScanPath(path, verbose)
- for fname in fnames:
- self.Add(fname, True, verbose)
-@@ -346,13 +347,13 @@ class Toolchains:
- def List(self):
- """List out the selected toolchains for each architecture"""
- col = terminal.Color()
-- print col.Color(col.BLUE, 'List of available toolchains (%d):' %
-- len(self.toolchains))
-+ print(col.Color(col.BLUE, 'List of available toolchains (%d):' %
-+ len(self.toolchains)))
- if len(self.toolchains):
-- for key, value in sorted(self.toolchains.iteritems()):
-- print '%-10s: %s' % (key, value.gcc)
-+ for key, value in sorted(self.toolchains.items()):
-+ print('%-10s: %s' % (key, value.gcc))
- else:
-- print 'None'
-+ print('None')
-
- def Select(self, arch):
- """Returns the toolchain for a given architecture
-@@ -370,7 +371,7 @@ class Toolchains:
- return self.toolchains[alias]
-
- if not arch in self.toolchains:
-- raise ValueError, ("No tool chain found for arch '%s'" % arch)
-+ raise ValueError("No tool chain found for arch '%s'" % arch)
- return self.toolchains[arch]
-
- def ResolveReferences(self, var_dict, args):
-@@ -464,9 +465,9 @@ class Toolchains:
- links = []
- for version in versions:
- url = '%s/%s/%s/' % (base, arch, version)
-- print 'Checking: %s' % url
-- response = urllib2.urlopen(url)
-- html = response.read()
-+ print('Checking: %s' % url)
-+ response = urllib.request.urlopen(url)
-+ html = tools.ToString(response.read())
- parser = MyHTMLParser(fetch_arch)
- parser.feed(html)
- if fetch_arch == 'list':
-@@ -488,14 +489,14 @@ class Toolchains:
- Full path to the downloaded archive file in that directory,
- or None if there was an error while downloading
- """
-- print 'Downloading: %s' % url
-+ print('Downloading: %s' % url)
- leaf = url.split('/')[-1]
- tmpdir = tempfile.mkdtemp('.buildman')
-- response = urllib2.urlopen(url)
-+ response = urllib.request.urlopen(url)
- fname = os.path.join(tmpdir, leaf)
- fd = open(fname, 'wb')
- meta = response.info()
-- size = int(meta.getheaders('Content-Length')[0])
-+ size = int(meta.get('Content-Length'))
- done = 0
- block_size = 1 << 16
- status = ''
-@@ -504,19 +505,19 @@ class Toolchains:
- while True:
- buffer = response.read(block_size)
- if not buffer:
-- print chr(8) * (len(status) + 1), '\r',
-+ print(chr(8) * (len(status) + 1), '\r', end=' ')
- break
-
- done += len(buffer)
- fd.write(buffer)
-- status = r'%10d MiB [%3d%%]' % (done / 1024 / 1024,
-- done * 100 / size)
-+ status = r'%10d MiB [%3d%%]' % (done // 1024 // 1024,
-+ done * 100 // size)
- status = status + chr(8) * (len(status) + 1)
-- print status,
-+ print(status, end=' ')
- sys.stdout.flush()
- fd.close()
- if done != size:
-- print 'Error, failed to download'
-+ print('Error, failed to download')
- os.remove(fname)
- fname = None
- return tmpdir, fname
-@@ -565,11 +566,11 @@ class Toolchains:
- """
- # Fist get the URL for this architecture
- col = terminal.Color()
-- print col.Color(col.BLUE, "Downloading toolchain for arch '%s'" % arch)
-+ print(col.Color(col.BLUE, "Downloading toolchain for arch '%s'" % arch))
- url = self.LocateArchUrl(arch)
- if not url:
-- print ("Cannot find toolchain for arch '%s' - use 'list' to list" %
-- arch)
-+ print(("Cannot find toolchain for arch '%s' - use 'list' to list" %
-+ arch))
- return 2
- home = os.environ['HOME']
- dest = os.path.join(home, '.buildman-toolchains')
-@@ -580,28 +581,28 @@ class Toolchains:
- tmpdir, tarfile = self.Download(url)
- if not tarfile:
- return 1
-- print col.Color(col.GREEN, 'Unpacking to: %s' % dest),
-+ print(col.Color(col.GREEN, 'Unpacking to: %s' % dest), end=' ')
- sys.stdout.flush()
- path = self.Unpack(tarfile, dest)
- os.remove(tarfile)
- os.rmdir(tmpdir)
-- print
-+ print()
-
- # Check that the toolchain works
-- print col.Color(col.GREEN, 'Testing')
-+ print(col.Color(col.GREEN, 'Testing'))
- dirpath = os.path.join(dest, path)
- compiler_fname_list = self.ScanPath(dirpath, True)
- if not compiler_fname_list:
-- print 'Could not locate C compiler - fetch failed.'
-+ print('Could not locate C compiler - fetch failed.')
- return 1
- if len(compiler_fname_list) != 1:
-- print col.Color(col.RED, 'Warning, ambiguous toolchains: %s' %
-- ', '.join(compiler_fname_list))
-+ print(col.Color(col.RED, 'Warning, ambiguous toolchains: %s' %
-+ ', '.join(compiler_fname_list)))
- toolchain = Toolchain(compiler_fname_list[0], True, True)
-
- # Make sure that it will be found by buildman
- if not self.TestSettingsHasPath(dirpath):
-- print ("Adding 'download' to config file '%s'" %
-- bsettings.config_fname)
-+ print(("Adding 'download' to config file '%s'" %
-+ bsettings.config_fname))
- bsettings.SetItem('toolchain', 'download', '%s/*/*' % dest)
- return 0
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch
deleted file mode 100644
index 4c4f7acb..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-From 3b3e3c0f6c261a8c9f989d437dc261ba84467d4f Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Thu, 31 Oct 2019 07:42:50 -0600
-Subject: [PATCH] patman: Adjust 'command' to return strings instead of bytes
-
-At present all the 'command' methods return bytes. Most of the time we
-actually want strings, so change this. We still need to keep the internal
-representation as bytes since otherwise unicode strings might break over
-a read() boundary (e.g. 4KB), causing errors. But we can convert the end
-result to strings.
-
-Add a 'binary' parameter to cover the few cases where bytes are needed.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/binman/cbfs_util_test.py | 2 +-
- tools/binman/ftest.py | 2 +-
- tools/patman/command.py | 31 +++++++++++++++++++++++--------
- tools/patman/tools.py | 29 +++++++++++++++++++++--------
- 4 files changed, 46 insertions(+), 18 deletions(-)
-
-diff --git a/tools/binman/cbfs_util_test.py b/tools/binman/cbfs_util_test.py
-index 772c794ece..ddc2e09e35 100755
---- a/tools/binman/cbfs_util_test.py
-+++ b/tools/binman/cbfs_util_test.py
-@@ -56,7 +56,7 @@ class TestCbfs(unittest.TestCase):
- cls.have_lz4 = True
- try:
- tools.Run('lz4', '--no-frame-crc', '-c',
-- tools.GetInputFilename('u-boot.bin'))
-+ tools.GetInputFilename('u-boot.bin'), binary=True)
- except:
- cls.have_lz4 = False
-
---- a/tools/binman/ftest.py
-+++ b/tools/binman/ftest.py
-@@ -151,7 +151,7 @@ class TestFunctional(unittest.TestCase):
- self.have_lz4 = True
- try:
- tools.Run('lz4', '--no-frame-crc', '-c',
-- os.path.join(self._indir, 'u-boot.bin'))
-+ os.path.join(self._indir, 'u-boot.bin'), binary=True)
- except:
- self.have_lz4 = False
-
-diff --git a/tools/patman/command.py b/tools/patman/command.py
-index 16299f3f5b..5fbd2c4a3e 100644
---- a/tools/patman/command.py
-+++ b/tools/patman/command.py
-@@ -4,6 +4,7 @@
-
- import os
- import cros_subprocess
-+import tools
-
- """Shell command ease-ups for Python."""
-
-@@ -31,6 +32,13 @@ class CommandResult:
- self.return_code = return_code
- self.exception = exception
-
-+ def ToOutput(self, binary):
-+ if not binary:
-+ self.stdout = tools.ToString(self.stdout)
-+ self.stderr = tools.ToString(self.stderr)
-+ self.combined = tools.ToString(self.combined)
-+ return self
-+
-
- # This permits interception of RunPipe for test purposes. If it is set to
- # a function, then that function is called with the pipe list being
-@@ -41,7 +49,7 @@ test_result = None
-
- def RunPipe(pipe_list, infile=None, outfile=None,
- capture=False, capture_stderr=False, oneline=False,
-- raise_on_error=True, cwd=None, **kwargs):
-+ raise_on_error=True, cwd=None, binary=False, **kwargs):
- """
- Perform a command pipeline, with optional input/output filenames.
-
-@@ -67,7 +75,7 @@ def RunPipe(pipe_list, infile=None, outfile=None,
- else:
- return test_result
- # No result: fall through to normal processing
-- result = CommandResult()
-+ result = CommandResult(b'', b'', b'')
- last_pipe = None
- pipeline = list(pipe_list)
- user_pipestr = '|'.join([' '.join(pipe) for pipe in pipe_list])
-@@ -93,29 +101,36 @@ def RunPipe(pipe_list, infile=None, outfile=None,
- if raise_on_error:
- raise Exception("Error running '%s': %s" % (user_pipestr, str))
- result.return_code = 255
-- return result
-+ return result.ToOutput(binary)
-
- if capture:
- result.stdout, result.stderr, result.combined = (
- last_pipe.CommunicateFilter(None))
- if result.stdout and oneline:
-- result.output = result.stdout.rstrip('\r\n')
-+ result.output = result.stdout.rstrip(b'\r\n')
- result.return_code = last_pipe.wait()
- else:
- result.return_code = os.waitpid(last_pipe.pid, 0)[1]
- if raise_on_error and result.return_code:
- raise Exception("Error running '%s'" % user_pipestr)
-- return result
-+ return result.ToOutput(binary)
-
- def Output(*cmd, **kwargs):
- kwargs['raise_on_error'] = kwargs.get('raise_on_error', True)
- return RunPipe([cmd], capture=True, **kwargs).stdout
-
- def OutputOneLine(*cmd, **kwargs):
-+ """Run a command and output it as a single-line string
-+
-+ The command us expected to produce a single line of output
-+
-+ Returns:
-+ String containing output of command
-+ """
- raise_on_error = kwargs.pop('raise_on_error', True)
-- return (RunPipe([cmd], capture=True, oneline=True,
-- raise_on_error=raise_on_error,
-- **kwargs).stdout.strip())
-+ result = RunPipe([cmd], capture=True, oneline=True,
-+ raise_on_error=raise_on_error, **kwargs).stdout.strip()
-+ return result
-
- def Run(*cmd, **kwargs):
- return RunPipe([cmd], **kwargs).stdout
-diff --git a/tools/patman/tools.py b/tools/patman/tools.py
-index 4a7fcdad21..3feddb292f 100644
---- a/tools/patman/tools.py
-+++ b/tools/patman/tools.py
-@@ -186,7 +186,7 @@ def PathHasFile(path_spec, fname):
- return True
- return False
-
--def Run(name, *args):
-+def Run(name, *args, **kwargs):
- """Run a tool with some arguments
-
- This runs a 'tool', which is a program used by binman to process files and
-@@ -201,13 +201,14 @@ def Run(name, *args):
- CommandResult object
- """
- try:
-+ binary = kwargs.get('binary')
- env = None
- if tool_search_paths:
- env = dict(os.environ)
- env['PATH'] = ':'.join(tool_search_paths) + ':' + env['PATH']
- all_args = (name,) + args
- result = command.RunPipe([all_args], capture=True, capture_stderr=True,
-- env=env, raise_on_error=False)
-+ env=env, raise_on_error=False, binary=binary)
- if result.return_code:
- raise Exception("Error %d running '%s': %s" %
- (result.return_code,' '.join(all_args),
-@@ -375,7 +376,7 @@ def ToBytes(string):
- """Convert a str type into a bytes type
-
- Args:
-- string: string to convert value
-+ string: string to convert
-
- Returns:
- Python 3: A bytes type
-@@ -385,6 +386,18 @@ def ToBytes(string):
- return string.encode('utf-8')
- return string
-
-+def ToString(bval):
-+ """Convert a bytes type into a str type
-+
-+ Args:
-+ bval: bytes value to convert
-+
-+ Returns:
-+ Python 3: A bytes type
-+ Python 2: A string type
-+ """
-+ return bval.decode('utf-8')
-+
- def Compress(indata, algo, with_header=True):
- """Compress some data using a given algorithm
-
-@@ -406,14 +419,14 @@ def Compress(indata, algo, with_header=True):
- fname = GetOutputFilename('%s.comp.tmp' % algo)
- WriteFile(fname, indata)
- if algo == 'lz4':
-- data = Run('lz4', '--no-frame-crc', '-c', fname)
-+ data = Run('lz4', '--no-frame-crc', '-c', fname, binary=True)
- # cbfstool uses a very old version of lzma
- elif algo == 'lzma':
- outfname = GetOutputFilename('%s.comp.otmp' % algo)
- Run('lzma_alone', 'e', fname, outfname, '-lc1', '-lp0', '-pb0', '-d8')
- data = ReadFile(outfname)
- elif algo == 'gzip':
-- data = Run('gzip', '-c', fname)
-+ data = Run('gzip', '-c', fname, binary=True)
- else:
- raise ValueError("Unknown algorithm '%s'" % algo)
- if with_header:
-@@ -446,13 +459,13 @@ def Decompress(indata, algo, with_header=True):
- with open(fname, 'wb') as fd:
- fd.write(indata)
- if algo == 'lz4':
-- data = Run('lz4', '-dc', fname)
-+ data = Run('lz4', '-dc', fname, binary=True)
- elif algo == 'lzma':
- outfname = GetOutputFilename('%s.decomp.otmp' % algo)
- Run('lzma_alone', 'd', fname, outfname)
-- data = ReadFile(outfname)
-+ data = ReadFile(outfname, binary=True)
- elif algo == 'gzip':
-- data = Run('gzip', '-cd', fname)
-+ data = Run('gzip', '-cd', fname, binary=True)
- else:
- raise ValueError("Unknown algorithm '%s'" % algo)
- return data
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch
deleted file mode 100644
index cee88472..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 3b1c0b09c99bfd30355a6ba87a15e9d408a51109 Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Sat, 24 Aug 2019 07:22:41 -0600
-Subject: [PATCH] patman: Drop binary parameter
-
-Since cros_subprocess use bytestrings now, this feature not needed. Drop
-it.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/patman/cros_subprocess.py | 3 +--
- tools/patman/tools.py | 15 +++++++--------
- 2 files changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/tools/patman/cros_subprocess.py b/tools/patman/cros_subprocess.py
-index 06be64cc2c..0f0d60dfb7 100644
---- a/tools/patman/cros_subprocess.py
-+++ b/tools/patman/cros_subprocess.py
-@@ -54,7 +54,7 @@ class Popen(subprocess.Popen):
- """
-
- def __init__(self, args, stdin=None, stdout=PIPE_PTY, stderr=PIPE_PTY,
-- shell=False, cwd=None, env=None, binary=False, **kwargs):
-+ shell=False, cwd=None, env=None, **kwargs):
- """Cut-down constructor
-
- Args:
-@@ -72,7 +72,6 @@ class Popen(subprocess.Popen):
- """
- stdout_pty = None
- stderr_pty = None
-- self.binary = binary
-
- if stdout == PIPE_PTY:
- stdout_pty = pty.openpty()
-diff --git a/tools/patman/tools.py b/tools/patman/tools.py
-index 0d4705db76..97441ca796 100644
---- a/tools/patman/tools.py
-+++ b/tools/patman/tools.py
-@@ -186,7 +186,7 @@ def PathHasFile(path_spec, fname):
- return True
- return False
-
--def Run(name, *args, **kwargs):
-+def Run(name, *args):
- """Run a tool with some arguments
-
- This runs a 'tool', which is a program used by binman to process files and
-@@ -196,7 +196,6 @@ def Run(name, *args, **kwargs):
- Args:
- name: Command name to run
- args: Arguments to the tool
-- kwargs: Options to pass to command.run()
-
- Returns:
- CommandResult object
-@@ -206,8 +205,8 @@ def Run(name, *args, **kwargs):
- if tool_search_paths:
- env = dict(os.environ)
- env['PATH'] = ':'.join(tool_search_paths) + ':' + env['PATH']
-- return command.Run(name, *args, capture=True,
-- capture_stderr=True, env=env, **kwargs)
-+ return command.Run(name, *args, capture=True, capture_stderr=True,
-+ env=env)
- except:
- if env and not PathHasFile(env['PATH'], name):
- msg = "Please install tool '%s'" % name
-@@ -401,14 +400,14 @@ def Compress(indata, algo, with_header=True):
- fname = GetOutputFilename('%s.comp.tmp' % algo)
- WriteFile(fname, indata)
- if algo == 'lz4':
-- data = Run('lz4', '--no-frame-crc', '-c', fname, binary=True)
-+ data = Run('lz4', '--no-frame-crc', '-c', fname)
- # cbfstool uses a very old version of lzma
- elif algo == 'lzma':
- outfname = GetOutputFilename('%s.comp.otmp' % algo)
- Run('lzma_alone', 'e', fname, outfname, '-lc1', '-lp0', '-pb0', '-d8')
- data = ReadFile(outfname)
- elif algo == 'gzip':
-- data = Run('gzip', '-c', fname, binary=True)
-+ data = Run('gzip', '-c', fname)
- else:
- raise ValueError("Unknown algorithm '%s'" % algo)
- if with_header:
-@@ -441,13 +440,13 @@ def Decompress(indata, algo, with_header=True):
- with open(fname, 'wb') as fd:
- fd.write(indata)
- if algo == 'lz4':
-- data = Run('lz4', '-dc', fname, binary=True)
-+ data = Run('lz4', '-dc', fname)
- elif algo == 'lzma':
- outfname = GetOutputFilename('%s.decomp.otmp' % algo)
- Run('lzma_alone', 'd', fname, outfname)
- data = ReadFile(outfname)
- elif algo == 'gzip':
-- data = Run('gzip', '-cd', fname, binary=True)
-+ data = Run('gzip', '-cd', fname)
- else:
- raise ValueError("Unknown algorithm '%s'" % algo)
- return data
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch
deleted file mode 100644
index bd23c458..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6eace398072a62e74f10f412ffadfe51b7402395 Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Sat, 24 Aug 2019 07:22:42 -0600
-Subject: [PATCH] patman: Update command.Run() to handle failure better
-
-At present tools are not expected to fail. If they do an exception is
-raised but there is no detail about what went wrong. This makes it hard
-to debug if something does actually go wrong.
-
-Fix this by outputting both stderr and stdout on failure.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- tools/patman/tools.py | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/tools/patman/tools.py b/tools/patman/tools.py
-index 97441ca796..0952681579 100644
---- a/tools/patman/tools.py
-+++ b/tools/patman/tools.py
-@@ -205,8 +205,14 @@ def Run(name, *args):
- if tool_search_paths:
- env = dict(os.environ)
- env['PATH'] = ':'.join(tool_search_paths) + ':' + env['PATH']
-- return command.Run(name, *args, capture=True, capture_stderr=True,
-- env=env)
-+ all_args = (name,) + args
-+ result = command.RunPipe([all_args], capture=True, capture_stderr=True,
-+ env=env, raise_on_error=False)
-+ if result.return_code:
-+ raise Exception("Error %d running '%s': %s" %
-+ (result.return_code,' '.join(all_args),
-+ result.stderr))
-+ return result.stdout
- except:
- if env and not PathHasFile(env['PATH'], name):
- msg = "Please install tool '%s'" % name
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch b/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch
deleted file mode 100644
index e74609de..00000000
--- a/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From b4cf5f1df741e8781bed6149291823cd1a4b8baa Mon Sep 17 00:00:00 2001
-From: Simon Glass <sjg@chromium.org>
-Date: Thu, 31 Oct 2019 07:42:59 -0600
-Subject: [PATCH] pylibfdt: Convert to Python 3
-
-Build this swig module with Python 3.
-
-Upstream-Status: Backport
-
-Signed-off-by: Simon Glass <sjg@chromium.org>
----
- scripts/dtc/pylibfdt/Makefile | 2 +-
- scripts/dtc/pylibfdt/libfdt.i_shipped | 2 +-
- scripts/dtc/pylibfdt/setup.py | 2 +-
- tools/binman/entry.py | 16 ++--------------
- tools/binman/entry_test.py | 15 ---------------
- 5 files changed, 5 insertions(+), 32 deletions(-)
-
-diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile
-index 15e66ad44d..42342c75bb 100644
---- a/scripts/dtc/pylibfdt/Makefile
-+++ b/scripts/dtc/pylibfdt/Makefile
-@@ -21,7 +21,7 @@ quiet_cmd_pymod = PYMOD $@
- CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
- SOURCES="$(PYLIBFDT_srcs)" \
- SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
-- $(PYTHON2) $< --quiet build_ext --inplace
-+ $(PYTHON3) $< --quiet build_ext --inplace
-
- $(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE
- $(call if_changed,pymod)
-diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
-index 76e61e98bd..53b70f8f5e 100644
---- a/scripts/dtc/pylibfdt/libfdt.i_shipped
-+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
-@@ -624,7 +624,7 @@ class Fdt(FdtRo):
- Raises:
- FdtException if no parent found or other error occurs
- """
-- val = val.encode('utf-8') + '\0'
-+ val = val.encode('utf-8') + b'\0'
- return check_err(fdt_setprop(self._fdt, nodeoffset, prop_name,
- val, len(val)), quiet)
-
-diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py
-index 4f7cf042bf..992cdec30f 100755
---- a/scripts/dtc/pylibfdt/setup.py
-+++ b/scripts/dtc/pylibfdt/setup.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python2
-+#!/usr/bin/env python3
-
- """
- setup.py file for SWIG libfdt
-diff --git a/tools/binman/entry.py b/tools/binman/entry.py
-index 409c0dca93..5bf5be4794 100644
---- a/tools/binman/entry.py
-+++ b/tools/binman/entry.py
-@@ -7,16 +7,7 @@
- from __future__ import print_function
-
- from collections import namedtuple
--
--# importlib was introduced in Python 2.7 but there was a report of it not
--# working in 2.7.12, so we work around this:
--# http://lists.denx.de/pipermail/u-boot/2016-October/269729.html
--try:
-- import importlib
-- have_importlib = True
--except:
-- have_importlib = False
--
-+import importlib
- import os
- import sys
-
-@@ -119,10 +110,7 @@ class Entry(object):
- old_path = sys.path
- sys.path.insert(0, os.path.join(our_path, 'etype'))
- try:
-- if have_importlib:
-- module = importlib.import_module(module_name)
-- else:
-- module = __import__(module_name)
-+ module = importlib.import_module(module_name)
- except ImportError as e:
- raise ValueError("Unknown entry type '%s' in node '%s' (expected etype/%s.py, error '%s'" %
- (etype, node_path, module_name, e))
-diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
-index 13f5864516..277e10b585 100644
---- a/tools/binman/entry_test.py
-+++ b/tools/binman/entry_test.py
-@@ -39,21 +39,6 @@ class TestEntry(unittest.TestCase):
- else:
- import entry
-
-- def test1EntryNoImportLib(self):
-- """Test that we can import Entry subclassess successfully"""
-- sys.modules['importlib'] = None
-- global entry
-- self._ReloadEntry()
-- entry.Entry.Create(None, self.GetNode(), 'u-boot')
-- self.assertFalse(entry.have_importlib)
--
-- def test2EntryImportLib(self):
-- del sys.modules['importlib']
-- global entry
-- self._ReloadEntry()
-- entry.Entry.Create(None, self.GetNode(), 'u-boot-spl')
-- self.assertTrue(entry.have_importlib)
--
- def testEntryContents(self):
- """Test the Entry bass class"""
- import entry
---
-2.24.0
-
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb b/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb
index 571fadb7..57f27803 100644
--- a/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb
@@ -14,17 +14,8 @@ 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 \
- 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 \
- file://0001-pylibfdt-Convert-to-Python-3.patch \
- file://0001-binman-Convert-a-few-tests-to-Python-3.patch \
- file://0001-binman-Move-to-use-Python-3.patch \
- file://0001-buildman-Convert-to-Python-3.patch \
- file://0001-Remove-redundant-YYLOC-global-declaration.patch \
-"
-SRCREV= "1e55b2f9e7f56b76569089b9e950f49c1579580e"
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1"
+SRCREV= "f46a944f715f284aff1d42c009680ffe0be4058f"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb
index f94a67e2..780208d9 100644
--- a/recipes-bsp/uefi/uefi_git.bb
+++ b/recipes-bsp/uefi/uefi_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=343ec8f06efc37467a6de53686fa6315"
inherit deploy
SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1"
-SRCREV= "e95ed52322f15437f98dee2b27de45a7495d648c"
+SRCREV= "83a97bf09bb8880933416bc358112503c64ddae4"
S = "${WORKDIR}/git"
diff --git a/recipes-daemons/ptpd/ptpd-qoriq.bb b/recipes-daemons/ptpd/ptpd-qoriq.bb
deleted file mode 100644
index 569deed5..00000000
--- a/recipes-daemons/ptpd/ptpd-qoriq.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "The PTP daemon (PTPd)"
-DESCRIPTION = "The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as \
-defined by the relevant IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, \
-and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise \
-time coordination of LAN connected computers."
-HOMEPAGE = "http://sourceforge.net/projects/ptpd"
-SECTION = "net"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://README;md5=0733e1b3788ab2ebbc63bf33a020da1d"
-
-COMPATIBLE_MACHINE = "(qoriq)"
-
-DEPENDS = "libpcap"
-
-PROVIDES = "ptpd"
-
-inherit autotools pkgconfig systemd
-
-python() {
- pkgs = d.getVar('PACKAGES').split()
- for p in pkgs:
- if 'ptpd-qoriq' in p:
- d.appendVar("RPROVIDES_%s" % p, p.replace('ptpd-qoriq', 'ptpd'))
- d.appendVar("RCONFLICTS_%s" % p, p.replace('ptpd-qoriq', 'ptpd'))
- d.appendVar("RREPLACES_%s" % p, p.replace('ptpd-qoriq', 'ptpd'))
-}
-
-# return something like '1.2.3' or '1.2.3/rc1'
-#
-def get_sub(d):
- parts = d.getVar('PV').split('-')
- try:
- return parts[0] + '/' + parts[1]
- except:
- return parts[0]
-
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ptpd;nobranch=1 \
- file://ptpd-use-pkgconfig.patch \
-"
-SRCREV = "ec34cdd10446619d036ac8d6a86b8276f0d4a81c"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = ""
-
-EXTRA_OECONF += "--disable-snmp --with-pcap-config=pkg-config"
-
-do_install() {
- install -d ${D}${bindir} ${D}${mandir}/man8
- install -m 0755 ${B}/src/ptpd2 ${D}${bindir}
- install -m 0644 ${B}/src/ptpd2.8 ${D}${mandir}/man8
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/ptpd.service ${D}${systemd_unitdir}/system
-
- sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/ptpd.service
- sed -i -e 's#@BINDIR@#${bindir}#g' ${D}${systemd_unitdir}/system/ptpd.service
-
- install -d ${D}${sysconfdir}/default/
- install -m 0644 ${WORKDIR}/ptpd.conf ${D}${sysconfdir}/default/ptpd
- fi
-}
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "ptpd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch b/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch
deleted file mode 100644
index e4578dda..00000000
--- a/recipes-daemons/ptpd/ptpd-qoriq/ptpd-use-pkgconfig.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4c850b92a1cf8cfa19677c66bcde2edfab1a4490 Mon Sep 17 00:00:00 2001
-From: Joe MacDonald <joe_macdonald@mentor.com>
-Date: Tue, 24 Feb 2015 23:02:14 -0500
-Subject: [PATCH] ptpd: use pkgconfig
-
-Yocto uses pkg-config for libpcap, rather than pcap-config, so use that
-instead as the source for libs and cflags.
-
-Upstream-status: Inappropriate [ embedded specific ]
-
-Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index dc9541f..288f547 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -112,10 +112,10 @@ case "$try_pcap" in
- yes)
- case "$PATH_PCAP_CONFIG" in
- /*)
-- PCAP_LIBS=`$PATH_PCAP_CONFIG --libs`
-+ PCAP_LIBS=`$PATH_PCAP_CONFIG --libs libpcap`
- AC_SUBST([PCAP_LIBS])
- # Separate CPPFLAGS and CFLAGS
-- foo=`$PATH_PCAP_CONFIG --cflags`
-+ foo=`$PATH_PCAP_CONFIG --cflags libpcap`
- PCAP_CPPFLAGS=
- PCAP_CFLAGS=
- for i in $foo; do
---
-1.9.1
-
diff --git a/recipes-devtools/cst/cst_git.bb b/recipes-devtools/cst/cst_git.bb
index fef0fbcf..9091350b 100644
--- a/recipes-devtools/cst/cst_git.bb
+++ b/recipes-devtools/cst/cst_git.bb
@@ -19,7 +19,7 @@ inherit kernel-arch
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cst;nobranch=1 \
file://0001-tools-Mark-struct-input_field-file_field-extern.patch \
"
-SRCREV = "9aafbdf2441858ceca2779279b6876c6bdc2d3ed"
+SRCREV = "dfe30d3f05cfe281896482839e57ed49c52f2088"
S = "${WORKDIR}/git"
diff --git a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb b/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
index a281170c..2c5a5fd4 100644
--- a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
+++ b/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
@@ -16,7 +16,7 @@ SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;no
file://0001-linux-user-remove-host-stime-syscall.patch \
"
-SRCREV = "521a0dcf59f1ca11e7d9e2f4e1ef3d2dfaebc0e4"
+SRCREV = "0b88a503e43ca629d6e8165638ac6b312e5c66bd"
S = "${WORKDIR}/git"
@@ -40,8 +40,20 @@ do_install_append_class-nativesdk() {
${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
}
+do_install_ptest() {
+ cp -rL ${B}/tests ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
+
+ cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+ # Don't check the file genreated by configure
+ sed -i -e '/wildcard config-host.mak/d' \
+ -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include
+ sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \
+ ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env
+}
+
PACKAGECONFIG ??= " \
- fdt sdl kvm aio libusb \
+ fdt sdl kvm aio libusb vhost \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
"
PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
diff --git a/recipes-dpaa2/dce/dce_git.bb b/recipes-dpaa2/dce/dce_git.bb
index 0e31a3c4..9984f080 100644
--- a/recipes-dpaa2/dce/dce_git.bb
+++ b/recipes-dpaa2/dce/dce_git.bb
@@ -6,8 +6,8 @@ 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 \
"
-SRCREV = "0ec35ad12ad04b5dadfa9f8c8a718c715bde41db"
-SRCREV_qbman = "a1af1e1528fe2e1ce0df1e6d9170b6c239c8ab4f"
+SRCREV = "9db9c08379aa89f45f514f4f3f0a8e8212198758"
+SRCREV_qbman = "2f92993a9f34e5221d6b36c63b9e30ef703e9ac3"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa2/gpp-aioptool/gpp-aioptool/0001-add-fcommon-to-fix-gcc-10-build-issue.patch b/recipes-dpaa2/gpp-aioptool/gpp-aioptool/0001-add-fcommon-to-fix-gcc-10-build-issue.patch
new file mode 100644
index 00000000..6b69e7fd
--- /dev/null
+++ b/recipes-dpaa2/gpp-aioptool/gpp-aioptool/0001-add-fcommon-to-fix-gcc-10-build-issue.patch
@@ -0,0 +1,36 @@
+From e506c4ea7e576e713fa64569b6784bdc22b3205f Mon Sep 17 00:00:00 2001
+From: Ting Liu <ting.liu@nxp.com>
+Date: Fri, 9 Oct 2020 13:13:13 +0530
+Subject: [PATCH] add -fcommon to fix gcc 10 build issue
+
+Fix:
+| ...ld: src/aiop_logger.o:(.bss+0x0): multiple definition of `_debug_flag'; src/aiop_tool.o:(.bss+0x0): first defined here
+| ...ld: src/aiop_logger.o:(.bss+0x2): multiple definition of `_verbose_flag'; src/aiop_tool.o:(.bss+0x2): first defined here
+
+Reference: https://gcc.gnu.org/gcc-10/porting_to.html
+As a workaround, legacy C code where all tentative definitions should be
+placed into a common block can be compiled with -fcommon.
+
+Upstream-Status: Pending
+
+Signed-off-by: Ting Liu <ting.liu@nxp.com>
+---
+ Makefile | 2 +-
+ 1 files changed, 1 insertion(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index f10dda2..f568788 100644
+--- a/Makefile
++++ b/Makefile
+@@ -23,7 +23,7 @@ BINDIR = bin
+
+
+ # FLAGS
+-CFLAGS = -Wall
++CFLAGS = -Wall -fcommon
+ #CFLAGS += -g -O0 # Enable for Debugging
+ CFLAGS += -I$(top_builddir)/include
+ CFLAGS += -I$(top_builddir)/src
+--
+2.17.1
+
diff --git a/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb b/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
index a9c3180f..a96913e8 100644
--- a/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
+++ b/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987"
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/gpp-aioptool;nobranch=1 \
file://0001-remove-libio.h.patch \
+ file://0001-add-fcommon-to-fix-gcc-10-build-issue.patch \
"
SRCREV = "6ead470dde043f3ca67f1ba19b313dd64ec199e1"
@@ -21,6 +22,7 @@ do_configure[depends] += "virtual/kernel:do_shared_workdir"
do_install () {
oe_runmake install DESTDIR=${D}
+ chown -R root:root ${D}${bindir}/aiop_tool
}
COMPATIBLE_MACHINE = "(ls2088a|ls1088a)"
diff --git a/recipes-dpaa2/management-complex/management-complex_10.24.0.bb b/recipes-dpaa2/management-complex/management-complex_10.24.0.bb
new file mode 100644
index 00000000..17049a15
--- /dev/null
+++ b/recipes-dpaa2/management-complex/management-complex_10.24.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "DPAA2 Management Complex Firmware"
+LICENSE = "NXP-Binary-EULA"
+LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=481d6288552113961a835bbabceb0c33"
+
+inherit deploy
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1"
+SRCREV = "324817697a4c89a9a940fb7dba1b18909913ee20"
+
+S = "${WORKDIR}/git"
+
+REGLEX_ls2088a = "ls2088a"
+REGLEX_ls2080a = "ls2080a"
+REGLEX_ls1088a = "ls1088a"
+REGLEX_lx2160a = "lx216xa"
+REGLEX_lx2162a = "lx216xa"
+
+do_install () {
+ install -d ${D}/boot
+ install -m 755 ${S}/${REGLEX}/*.itb ${D}/boot
+}
+
+do_deploy () {
+ install -d ${DEPLOYDIR}/mc_app
+ install -m 755 ${S}/${REGLEX}/*.itb ${DEPLOYDIR}/mc_app
+ # make a symlink to the latest binary
+ for mc_binary in `find ${DEPLOYDIR}/mc_app -type f -printf "%f\n" |sort`;do
+ ln -sfT ${mc_binary} ${DEPLOYDIR}/mc_app/mc.itb
+ done
+}
+addtask deploy before do_build after do_install
+
+PACKAGES += "${PN}-image"
+FILES_${PN}-image += "/boot"
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+COMPATIBLE_MACHINE = "(qoriq-arm64)"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-dpaa2/restool/restool/0001-restool-fix-build-error-with-gcc7.patch b/recipes-dpaa2/restool/restool/0001-restool-fix-build-error-with-gcc7.patch
deleted file mode 100644
index 82ade02b..00000000
--- a/recipes-dpaa2/restool/restool/0001-restool-fix-build-error-with-gcc7.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 895db76654c796a0edc6b2d329addde108b1755c Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Wed, 19 Jul 2017 14:31:23 +0800
-Subject: [PATCH] restool: fix build error with gcc7
-
----
- Makefile | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 3976b66..df1e791 100644
---- a/Makefile
-+++ b/Makefile
-@@ -64,7 +64,6 @@ CFLAGS = ${EXTRA_CFLAGS} \
- -Wmissing-prototypes \
- -Wpointer-arith \
- -Winline \
-- -Werror \
- -Wundef \
- -Icommon/
-
---
-2.7.4
-
diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb
index 0211c779..66cea7ef 100644
--- a/recipes-dpaa2/restool/restool_git.bb
+++ b/recipes-dpaa2/restool/restool_git.bb
@@ -4,14 +4,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0"
RDEPENDS_${PN} += "bash dtc"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1 \
- file://0001-restool-fix-build-error-with-gcc7.patch"
-
-SRCREV = "f0cec094e4c6d1c975b377203a3bf994ba9325a9"
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1"
+SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4"
S = "${WORKDIR}/git"
-EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-Wno-missing-field-initializers -Wno-missing-braces"'
+EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces"'
do_install () {
oe_runmake install DESTDIR=${D}
diff --git a/recipes-extended/crconf/crconf_git.bb b/recipes-extended/crconf/crconf_git.bb
index 7dc92776..f8f88d20 100644
--- a/recipes-extended/crconf/crconf_git.bb
+++ b/recipes-extended/crconf/crconf_git.bb
@@ -3,11 +3,10 @@ SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=5;md5=0f77fc44eb5911007ae4ac9f6736e111"
-SRC_URI = "git://github.com/Thermi/crconf.git;protocol=https;nobranch=1"
-
EXTRA_OEMAKE = "'CC=${CC}' 'HOSTCC=${CC}'"
-SRCREV = "7b5819e7638e471d41dd2dca71f012d5a022f014"
+SRC_URI = "git://git.code.sf.net/p/crconf/code;protocol=https;nobranch=1"
+SRCREV = "c2b9595d739a9515a86ff3b1980b5cfdfcc42d68"
S = "${WORKDIR}/git"
diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
index f5793a19..61c02ae7 100644
--- a/recipes-extended/dpdk/dpdk.inc
+++ b/recipes-extended/dpdk/dpdk.inc
@@ -1,7 +1,7 @@
DESCRIPTION = "Data Plane Development Kit"
HOMEPAGE = "http://dpdk.org"
-LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2"
+RDEPENDS_${PN} += "python3-core"
DEPENDS = "virtual/kernel openssl"
DEPENDS_append_x86-64 = " numactl"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
diff --git a/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch b/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch
deleted file mode 100644
index 3b5a2b3a..00000000
--- a/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 6fe3e96ab6e92f8faca9784a46bc33d92790c2b8 Mon Sep 17 00:00:00 2001
-From: Kevin Traynor <ktraynor@redhat.com>
-Date: Wed, 11 Mar 2020 11:33:00 +0000
-Subject: [PATCH] examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gcc 10.0.1 reports:
-
-../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
-../examples/ipsec-secgw/ipsec_process.c:132:34:
-error: ‘grp.m’ may be used uninitialized in this function
- [-Werror=maybe-uninitialized]
- 132 | grp[n].cnt = pkts + i - grp[n].m;
- | ~~~~~~^~
-
-This is a correct warning for the initial execution of the statement.
-However, it is the design of the loop that grp[0].cnt will later be
-written with the correct value using an initialized grp[0].m before it
-is used.
-
-In order to remove the warning, initialize grp[0].m for the initial and
-unused calculation of grp[0].cnt.
-
-Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec library")
-Cc: stable@dpdk.org
-
-Upstream-Status: Backport
-
-Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
-Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
-Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
-Signed-off-by: Jens Rehsack <jens.rehsack.ext@safrangroup.com>
----
- examples/ipsec-secgw/ipsec_process.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
-index 2eb5c8b34..37f406d46 100644
---- a/examples/ipsec-secgw/ipsec_process.c
-+++ b/examples/ipsec-secgw/ipsec_process.c
-@@ -125,6 +125,7 @@ sa_group(void *sa_ptr[], struct rte_mbuf *pkts[],
- void * const nosa = &spi;
-
- sa = nosa;
-+ grp[0].m = pkts;
- for (i = 0, n = 0; i != num; i++) {
-
- if (sa != sa_ptr[i]) {
---
-2.17.1
-
diff --git a/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch b/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
deleted file mode 100644
index 61467377..00000000
--- a/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From aa97b9162b68780ca912a226b5045a3ddab41d3c Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Thu, 4 Jul 2019 08:03:56 +0200
-Subject: [PATCH] update WERROR_FLAGS
-
-Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
----
- kernel/linux/kni/Makefile | 2 +-
- mk/toolchain/gcc/rte.vars.mk | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
-index 595bac261..a17939996 100644
---- a/kernel/linux/kni/Makefile
-+++ b/kernel/linux/kni/Makefile
-@@ -14,7 +14,7 @@ MODULE = rte_kni
- MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50
- MODULE_CFLAGS += -I$(RTE_OUTPUT)/include
- MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
--MODULE_CFLAGS += -Wall -Werror
-+MODULE_CFLAGS += -Wall -Werror -Wno-missing-attributes
-
- -include /etc/lsb-release
-
-diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
-index de5e0d24d..ca2cb5fcd 100644
---- a/mk/toolchain/gcc/rte.vars.mk
-+++ b/mk/toolchain/gcc/rte.vars.mk
-@@ -49,6 +49,7 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
- WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
- WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated
- WERROR_FLAGS += -Wno-error=pedantic
-+WERROR_FLAGS += -Wno-address-of-packed-member
-
- ifeq ($(RTE_DEVEL_BUILD),y)
- WERROR_FLAGS += -Werror
---
-2.17.1
-
diff --git a/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch b/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch
new file mode 100644
index 00000000..81ca1244
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch
@@ -0,0 +1,100 @@
+diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
+index 0194be046..86fe3a89d 100755
+--- a/app/test-bbdev/test-bbdev.py
++++ b/app/test-bbdev/test-bbdev.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2017 Intel Corporation
+diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py
+index 3a8fac426..231fe6032 100755
+--- a/app/test-cmdline/cmdline_test.py
++++ b/app/test-cmdline/cmdline_test.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2010-2014 Intel Corporation
+
+diff --git a/app/test/autotest.py b/app/test/autotest.py
+index b42f48879..30541d102 100644
+--- a/app/test/autotest.py
++++ b/app/test/autotest.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2010-2014 Intel Corporation
+
+diff --git a/buildtools/map_to_def.py b/buildtools/map_to_def.py
+index 6775b54a9..ff67f0a35 100644
+--- a/buildtools/map_to_def.py
++++ b/buildtools/map_to_def.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2019 Intel Corporation
+
+diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py
+index 404866d2f..1f689d9a8 100755
+--- a/config/arm/armv8_machine.py
++++ b/config/arm/armv8_machine.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2017 Cavium, Inc
+
+diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py
+index 616412a1c..3244b0984 100755
+--- a/devtools/update_version_map_abi.py
++++ b/devtools/update_version_map_abi.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2019 Intel Corporation
+
+diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
+index 6f129b1db..e86bf6b92 100755
+--- a/usertools/cpu_layout.py
++++ b/usertools/cpu_layout.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2010-2014 Intel Corporation
+ # Copyright(c) 2017 Cavium, Inc. All rights reserved.
+diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
+index b1d149876..3f8175338 100755
+--- a/usertools/dpdk-devbind.py
++++ b/usertools/dpdk-devbind.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2010-2014 Intel Corporation
+ #
+diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
+index 069a3bf12..1d5c99c2a 100755
+--- a/usertools/dpdk-pmdinfo.py
++++ b/usertools/dpdk-pmdinfo.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>
+
+diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
+index 290345dcc..279067450 100755
+--- a/usertools/dpdk-telemetry-client.py
++++ b/usertools/dpdk-telemetry-client.py
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python3
+ # SPDX-License-Identifier: BSD-3-Clause
+ # Copyright(c) 2018 Intel Corporation
+
diff --git a/recipes-extended/dpdk/dpdk_19.11-20.04.bb b/recipes-extended/dpdk/dpdk_19.11-20.04.bb
deleted file mode 100644
index 398d2ec4..00000000
--- a/recipes-extended/dpdk/dpdk_19.11-20.04.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492"
-
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;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 \
- file://0004-update-WERROR_FLAGS.patch \
- file://0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch \
-"
-SRCREV = "4110a5fed09fa034963cfc246a6285911ecbd540"
-
-include dpdk.inc
-
-
-do_install_append () {
- # Remove the unneeded dir
- rm -rf ${D}/${datadir}/${RTE_TARGET}/app
-}
-
diff --git a/recipes-extended/dpdk/dpdk_19.11-20.12.bb b/recipes-extended/dpdk/dpdk_19.11-20.12.bb
new file mode 100644
index 00000000..426713c2
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk_19.11-20.12.bb
@@ -0,0 +1,20 @@
+LICENSE = "BSD-3-Clause & LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
+ file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
+
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;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 \
+ file://0005-use-python3-instead-of-python.patch \
+"
+SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b"
+
+include dpdk.inc
+
+do_install_append () {
+ # Remove the unneeded dir
+ rm -rf ${D}/${datadir}/${RTE_TARGET}/app
+}
+
diff --git a/recipes-extended/jailhouse/jailhouse_0.11.bb b/recipes-extended/jailhouse/jailhouse_0.12.bb
index 32a4f92f..a15bec6c 100644
--- a/recipes-extended/jailhouse/jailhouse_0.11.bb
+++ b/recipes-extended/jailhouse/jailhouse_0.12.bb
@@ -13,8 +13,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \
file://driver/jailhouse.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
"
-SRCBRANCH = "lf-5.4.y"
-SRCREV = "82d5698945eafaffa58bab3b4d6da320bf56289c"
+SRCBRANCH = "imx_5.4.47_2.2.0"
+SRCREV = "8bbe203ee7c1fc16198ce1bf964e54c90606c3c2"
SRC_URI = "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \
file://0001-tools-scripts-update-shebang-to-python3.patch \
@@ -102,7 +102,7 @@ do_install() {
PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse"
FILES_${PN} += "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}"
-FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}/pyjailhouse"
RDEPENDS_${PN} += " \
python3-curses \
diff --git a/recipes-extended/libpkcs11/libpkcs11/0001-fix-multiple-definition-error.patch b/recipes-extended/libpkcs11/libpkcs11/0001-fix-multiple-definition-error.patch
new file mode 100644
index 00000000..a1680a8b
--- /dev/null
+++ b/recipes-extended/libpkcs11/libpkcs11/0001-fix-multiple-definition-error.patch
@@ -0,0 +1,90 @@
+From e8e566a4b4d589cbdf2613c78cac75ecbea86d3b Mon Sep 17 00:00:00 2001
+From: Ting Liu <ting.liu@nxp.com>
+Date: Wed, 30 Sep 2020 10:24:14 +0530
+Subject: [PATCH] fix multiple definition error
+
+gcc10 default to -fno-common, which results in error:
+| ../aarch64-fsl-linux/10.2.0/ld: /tmp/ccaL5AXA.o:.../libpkcs11/git-r0/git/app/pkcs11_app.c:23: multiple definition of `funcs'; /tmp/ccvGV0xB.o:.../app/utils.c:18: first defined here
+| collect2: error: ld returned 1 exit status
+| Makefile:66: recipe for target 'app' failed
+| make: *** [app] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Ting Liu <ting.liu@nxp.com>
+---
+ app/gen_test.c | 2 +-
+ app/pkcs11_app.c | 2 +-
+ app/sign_digest_update_final.c | 2 +-
+ app/thread_test.c | 2 +-
+ app/utils.c | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/app/gen_test.c b/app/gen_test.c
+index fbd3429..2476e18 100644
+--- a/app/gen_test.c
++++ b/app/gen_test.c
+@@ -17,7 +17,7 @@
+ #include <openssl/pem.h>
+ #include <openssl/md5.h>
+
+-CK_FUNCTION_LIST *funcs;
++static CK_FUNCTION_LIST *funcs;
+
+ #define err2str(X) case X: return #X
+
+diff --git a/app/pkcs11_app.c b/app/pkcs11_app.c
+index 2b4a70d..3883dab 100644
+--- a/app/pkcs11_app.c
++++ b/app/pkcs11_app.c
+@@ -20,7 +20,7 @@
+ #include <openssl/pem.h>
+ #include "utils.h"
+
+-CK_FUNCTION_LIST *funcs;
++static CK_FUNCTION_LIST *funcs;
+
+ struct getOptValue_t {
+ uint32_t main_option;
+diff --git a/app/sign_digest_update_final.c b/app/sign_digest_update_final.c
+index b3367ed..49fee20 100644
+--- a/app/sign_digest_update_final.c
++++ b/app/sign_digest_update_final.c
+@@ -20,7 +20,7 @@
+ #include <openssl/pem.h>
+ #include "utils.h"
+
+-CK_FUNCTION_LIST *funcs;
++static CK_FUNCTION_LIST *funcs;
+
+ struct getOptValue_t {
+ uint32_t main_option;
+diff --git a/app/thread_test.c b/app/thread_test.c
+index 19d03ee..a574074 100644
+--- a/app/thread_test.c
++++ b/app/thread_test.c
+@@ -20,7 +20,7 @@
+ #include <sched.h>
+ #include <pthread.h>
+
+-CK_FUNCTION_LIST *funcs;
++static CK_FUNCTION_LIST *funcs;
+
+ #define err2str(X) case X: return #X
+ #define MAX_THREADS 10
+diff --git a/app/utils.c b/app/utils.c
+index 7afad95..9f9e143 100644
+--- a/app/utils.c
++++ b/app/utils.c
+@@ -15,7 +15,7 @@
+ #include <tee_slot.h>
+ #include "utils.h"
+
+-CK_FUNCTION_LIST *funcs;
++static CK_FUNCTION_LIST *funcs;
+
+ #define err2str(X) case X: return #X
+
+--
+2.17.1
+
diff --git a/recipes-extended/libpkcs11/libpkcs11_git.bb b/recipes-extended/libpkcs11/libpkcs11_git.bb
index 33c27ecd..30f33a20 100644
--- a/recipes-extended/libpkcs11/libpkcs11_git.bb
+++ b/recipes-extended/libpkcs11/libpkcs11_git.bb
@@ -2,7 +2,9 @@ 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://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1 \
+ file://0001-fix-multiple-definition-error.patch \
+"
SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb"
DEPENDS = "openssl secure-obj"
diff --git a/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch b/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch
deleted file mode 100644
index 71b2b58c..00000000
--- a/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 95c5c42b9581f595881df11ca8393dc6925f7d7d Mon Sep 17 00:00:00 2001
-From: Nipun Gupta <nipun.gupta@nxp.com>
-Date: Thu, 14 Feb 2019 17:57:14 +0530
-Subject: [PATCH] netdev-dpdk: have env based configurable number of packet
- buffers
-
-use $export DPDK_NUM_MBUF=number
-
-Upstream-Status: Pending
-
-Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
----
- lib/netdev-dpdk.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
-index 6187129c0..1f456a63f 100644
---- a/lib/netdev-dpdk.c
-+++ b/lib/netdev-dpdk.c
-@@ -656,6 +656,11 @@ dpdk_calculate_mbufs(struct netdev_dpdk *dev, int mtu, bool per_port_mp)
- {
- uint32_t n_mbufs;
-
-+ if (getenv("DPDK_NUM_MBUF")) {
-+ n_mbufs = atoi(getenv("DPDK_NUM_MBUF"));
-+ return n_mbufs;
-+ }
-+
- if (!per_port_mp) {
- /* Shared memory are being used.
- * XXX: this is a really rough method of provisioning memory.
---
-2.17.1
-
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..9e817579 100644
--- a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
+++ b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
@@ -7,10 +7,8 @@ RDEPENDS_${PN} = "bash libcrypto libssl python3"
inherit python3native
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1 \
- file://0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch \
-"
-SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3"
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1"
+SRCREV = "072130412196029bcc284e353023d81019a8daa7"
S = "${WORKDIR}/git"
diff --git a/recipes-extended/secure-obj/secure-obj.inc b/recipes-extended/secure-obj/secure-obj.inc
index 617601ac..8a62d9cb 100644
--- a/recipes-extended/secure-obj/secure-obj.inc
+++ b/recipes-extended/secure-obj/secure-obj.inc
@@ -4,7 +4,7 @@ LICENSE = "BSD"
DEPENDS = "openssl optee-os-qoriq optee-client-qoriq"
RDEPENDS_${PN} = "bash libcrypto libssl"
-DEPENDS += "python3-pycrypto-native"
+DEPENDS += "python3-pycryptodomex-native"
inherit python3native
@@ -12,7 +12,7 @@ LDFLAGS += "${TOOLCHAIN_OPTIONS}"
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \
"
-SRCREV = "fb179a861e8e9bfed85ac5ef8387bdd30de48db9"
+SRCREV = "71a6eb33b58a8578a60995da3896f8f2d638c916"
WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/"
diff --git a/recipes-extended/tsntool/tsntool_git.bb b/recipes-extended/tsntool/tsntool_git.bb
index 5694e91c..94091db8 100644
--- a/recipes-extended/tsntool/tsntool_git.bb
+++ b/recipes-extended/tsntool/tsntool_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "cjson libnl readline"
inherit pkgconfig
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1"
-SRCREV = "ca2d8fb348bb54960d706177108c43ae213e0063"
+SRCREV = "1d1686e83c8f83472055189c278b837434990dcc"
S = "${WORKDIR}/git"
diff --git a/recipes-fsl/packagegroups/packagegroup-fsl-isp.bb b/recipes-fsl/packagegroups/packagegroup-fsl-isp.bb
new file mode 100644
index 00000000..4ad257ee
--- /dev/null
+++ b/recipes-fsl/packagegroups/packagegroup-fsl-isp.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Add packages for ISP build"
+
+inherit packagegroup
+
+ISP_PKGS ?= ""
+ISP_PKGS_mx8mp = " \
+ isp-imx \
+ basler-camera \
+ basler-camera-dev \
+ kernel-module-isp-vvcam \
+"
+RDEPENDS_${PN} = " \
+ ${ISP_PKGS} \
+"
diff --git a/recipes-fsl/packagegroups/packagegroup-fsl-opencv-imx.bb b/recipes-fsl/packagegroups/packagegroup-fsl-opencv-imx.bb
new file mode 100644
index 00000000..8eb5b89a
--- /dev/null
+++ b/recipes-fsl/packagegroups/packagegroup-fsl-opencv-imx.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Add packages for opencv i.MX build"
+
+inherit packagegroup
+
+OPENCV_PKGS = " \
+ opencv-apps \
+ opencv-samples \
+ python3-opencv \
+"
+RDEPENDS_${PN} = " \
+ ${OPENCV_PKGS} \
+"
diff --git a/recipes-graphics/drm/libdrm/musl-ioctl.patch b/recipes-graphics/drm/libdrm/musl-ioctl.patch
deleted file mode 100644
index e3d6c5b8..00000000
--- a/recipes-graphics/drm/libdrm/musl-ioctl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 18 Jun 2018 15:07:03 +0100
-Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature
-
-POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
-use (int, unsigned long int, ...) instead.
-
-Use a #ifdef to adapt the replacement function as appropriate.
----
- tests/nouveau/threaded.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c
-index 3669bcd3..e1c27c01 100644
---- a/tests/nouveau/threaded.c
-+++ b/tests/nouveau/threaded.c
-@@ -36,7 +36,11 @@ static int failed;
-
- static int import_fd;
-
-+#ifdef __GLIBC__
- int ioctl(int fd, unsigned long request, ...)
-+#else
-+int ioctl(int fd, int request, ...)
-+#endif
- {
- va_list va;
- int ret;
---
-2.11.0
-
diff --git a/recipes-graphics/drm/libdrm_2.4.99.imx.bb b/recipes-graphics/drm/libdrm_2.4.102.imx.bb
index dc2aa8a9..b8c38554 100644
--- a/recipes-graphics/drm/libdrm_2.4.99.imx.bb
+++ b/recipes-graphics/drm/libdrm_2.4.102.imx.bb
@@ -11,14 +11,14 @@ PROVIDES = "drm"
DEPENDS = "libpthread-stubs"
IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1"
-IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.99"
+IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.102"
SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \
- file://musl-ioctl.patch \
file://0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch "
-SRCREV = "f421c9c8c4b8fe48d9e6ef43910e98569c94a4b2"
+SRCREV = "f525ae649cd6e81e5d4e459799b0f7a120c4e174"
S = "${WORKDIR}/git"
DEFAULT_PREFERENCE = "-1"
+COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
inherit meson pkgconfig manpages
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.12.bb
index 4465ee7e..c407fb4a 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.12.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=cf3f9b8d09bc3926b1004ea71f7a248a"
PROVIDES += "virtual/libg2d"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "57a0a0a7d20e4ea1a0d2dcd162abfa79"
-SRC_URI[sha256sum] = "f8bc83e23263e179bd66492dafaeb104a3967337d76325d0ec97993ae846fb13"
+SRC_URI[md5sum] = "18a4119f1f7b83a09f60381e5403bbab"
+SRC_URI[sha256sum] = "ba7e219b3cee32e0ac305685de21c67f30e0e5a1a89b5ec441ae6b8484b3f964"
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..65ce9cd5 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
@@ -5,18 +5,28 @@ 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"
+SRCREV = "c50e6a954e44998f2e3793a8de863e961f8008c6"
S = "${WORKDIR}/git"
inherit cmake pkgconfig perlnative python3native
-PACKAGECONFIG ??= "egl waffle"
-PACKAGECONFIG_append = \
- "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
- bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', \
- '', d), d)}"
-PACKAGECONFIG_append_imxgpu2d = " vivante"
+PACKAGECONFIG_BACKEND_mx6 = " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'waffle', \
+ bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
+ '', d), d)} \
+"
+PACKAGECONFIG_BACKEND_mx7 = "${PACKAGECONFIG_BACKEND_mx6}"
+PACKAGECONFIG_BACKEND_mx8 = "waffle"
+
+PACKAGECONFIG_GPU2D = ""
+PACKAGECONFIG_GPU2D_imxgpu2d = "vivante"
+
+PACKAGECONFIG ??= " \
+ egl \
+ ${PACKAGECONFIG_BACKEND} \
+ ${PACKAGECONFIG_GPU2D} \
+"
PACKAGECONFIG[egl] = "-DENABLE_EGL=ON,-DENABLE_EGL=OFF,virtual/egl"
PACKAGECONFIG[gui] = "-DENABLE_GUI=ON,-DENABLE_GUI=OFF"
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.3.p1.0.bb
index 8de2c35f..ed11a54b 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.3.p1.0.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=cf3f9b8d09bc3926b1004ea71f7a248a"
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] = "2c17220ff2c28701b5feca45b341961f"
+SRC_URI[aarch64.sha256sum] = "47a39b171d83bced378b1b4f408be6304850fe2f25bf4577dd1ea78e22473f3d"
+SRC_URI[arm.md5sum] = "968a7d324016376930579a0f904d6e69"
+SRC_URI[arm.sha256sum] = "8d3b024151d4bdcc4f68cdbba9c4e5d126d55c9258de5821c43b393ae3f840b4"
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..5acf6352 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=cf3f9b8d09bc3926b1004ea71f7a248a"
DEPENDS += " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
@@ -43,9 +43,10 @@ PROVIDES += " \
imx-gpu-viv \
libgal-imx \
opencl-headers \
+ opencl-clhpp \
+ opencl-icd-loader \
virtual/egl \
virtual/libopenvg \
- virtual/opencl-headers \
virtual/opencl-icd \
${PROVIDES_OPENVX} \
${EXTRA_PROVIDES} \
@@ -61,6 +62,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"
@@ -116,7 +122,7 @@ python __anonymous() {
# they don't get Debian-renamed (which would remove the -imx suffix).
for p in (("libegl", "libegl1"), ("libgl", "libgl1"),
("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"),
- ("libgles3",) , ("libvulkan",), ("libgbm",)):
+ ("libgles3",), ("libgbm",)):
fullp = p[0] + "-imx"
pkgs = "".join(' %s' % i for i in p)
d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
@@ -171,7 +177,7 @@ do_install () {
# The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb
if [ "${USE_WL}" = "yes" ]; then
- backend=wl
+ backend=wayland
install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc
install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
@@ -212,41 +218,24 @@ do_install () {
install -d ${D}${sysconfdir}/OpenCL/vendors/
install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd
- # We'll only have one backend here so we rename it to generic name
- # and avoid rework in other packages, when possible
- 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
- ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so.1
- ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so
- mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so
+ # Handle backend specific drivers
+ cp -r ${S}/gpu-core/usr/lib/${backend}/* ${D}${libdir}
if [ "${USE_WL}" = "yes" ]; then
# Special case for libVDK on Wayland backend, deliver fb library as well.
- # Need to rename the libraries to avoid the code below that will remove
- # *-fb.so and *-wl.so
- mv ${D}${libdir}/libVDK-fb.so ${D}${libdir}/libVDK-framebuffer.so
- mv ${D}${libdir}/libVDK-wl.so ${D}${libdir}/libVDK-wayland.so
- ln -sf libVDK-wayland.so ${D}${libdir}/libVDK.so
- else
- mv ${D}${libdir}/libVDK-${backend}.so ${D}${libdir}/libVDK.so
+ cp ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 ${D}${libdir}/libVDK-fb.so.1.2.0
fi
-
- # update libglesv2 as backend dependent
- rm -rf ${D}${libdir}/libGLESv2*
- cp ${S}/gpu-core/usr/lib/libGLESv2-${backend}.so ${D}${libdir}/libGLESv2.so.2.0.0
- ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so.2
- 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.6
+ mv ${D}${libdir}/libvulkan.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
@@ -257,11 +246,6 @@ do_install () {
find ${D}${libdir} -name "libwayland-viv.*" -exec rm '{}' ';'
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 '{}' ';'
- done
-
# FIXME: MX6SL does not have 3D support; hack it for now
if [ "${IS_MX6SL}" = "1" ]; then
rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
@@ -301,25 +285,28 @@ 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"
FILES_libvsc-imx = "${libdir}/libVSC${SOLIBS}"
-FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${SOLIBS}"
-FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}"
+FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBSDEV} ${libdir}/libgbm_viv${SOLIBSDEV}"
+FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
RDEPENDS_libgbm-imx_append_mx8 = " libdrm"
+INSANE_SKIP_libgbm-imx += "dev-so"
-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}/libOvx*${SOLIBS} \
- ${libdir}/libovx*${SOLIBS} \
- "
-FILES_libopenvx-imx-dev = "${includedir}/VX ${includedir}/OVXLIB"
+ ${libdir}/libOpenVX${REALSOLIBS} \
+ ${libdir}/libOpenVXC${SOLIBS} \
+ ${libdir}/libOpenVXU${SOLIBS} \
+ ${libdir}/libOvx*${SOLIBS} \
+ ${libdir}/libArchModelSw${SOLIBS} \
+"
+FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libOpenVX${SOLIBSDEV}"
RDEPENDS_libopenvx-imx = "libnn-imx"
FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}"
@@ -346,20 +333,18 @@ 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"
FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}"
RDEPENDS_libopencl-imx= "libclc-imx"
-INSANE_SKIP_libopenvg-imx += "dev-so"
-FILES_libopenvg-imx = "${libdir}/libOpenVG*${SOLIBS}"
+FILES_libopenvg-imx = "${libdir}/libOpenVG*${REALSOLIBS}"
FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc"
-FILES_libvdk-imx = "${libdir}/libVDK*${SOLIBS}"
+FILES_libvdk-imx = "${libdir}/libVDK*${REALSOLIBS}"
FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}"
-INSANE_SKIP_libvdk-imx += "dev-so"
FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so"
RDEPENDS_libvivante-dri-imx = "libdrm"
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.3.p1.0-aarch32.bb
index d1b82f6e..39eb1a1d 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.3.p1.0-aarch32.bb
@@ -2,9 +2,9 @@
# Copyright 2017-2020 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
-require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
+require imx-gpu-viv-6.inc
-SRC_URI[md5sum] = "4544b0c874914dfbc47ec93855bd04a7"
-SRC_URI[sha256sum] = "bae4099119259a303a265eb02d9f0d63348bbf3f8637de6cb892e209171b4c97"
+SRC_URI[md5sum] = "3ab06c5aa485c79c14e6c856ccfd8d82"
+SRC_URI[sha256sum] = "9960fadbc1ea919f8b1b5c1e2e38a52b7293b70c906518d7fff2ada4140c59ea"
COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p1.0-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p1.0-aarch64.bb
new file mode 100644
index 00000000..4db54790
--- /dev/null
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p1.0-aarch64.bb
@@ -0,0 +1,6 @@
+require imx-gpu-viv-6.inc
+
+SRC_URI[md5sum] = "72a212a1bd8102718f8b03d935f1dcbc"
+SRC_URI[sha256sum] = "0505620c3851a980d2e08fee4b4fcd06eff92efac02d1646924bea86e4384ad4"
+
+COMPATIBLE_MACHINE = "(mx8)"
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
index 8d429abf..fce3802e 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_imxdrm = "gallium"
+PACKAGECONFIG_APPEND_NXPBSP_imxgpu_imxdrm = "osmesa"
+DRIDRIVERS_NXPBSP_imxgpu_imxdrm = "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/vulkan/vulkan-loader_%.bbappend b/recipes-graphics/vulkan/vulkan-loader_%.bbappend
new file mode 100644
index 00000000..28e1dc32
--- /dev/null
+++ b/recipes-graphics/vulkan/vulkan-loader_%.bbappend
@@ -0,0 +1,3 @@
+# The i.MX implementation is dynamically loaded, so it requires an
+# explicit runtime dependency.
+RRECOMMENDS_${PN}_append_imxgpu = " libvulkan-imx"
diff --git a/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb b/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb
index 7f15bdb3..852b3160 100644
--- a/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb
+++ b/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb
@@ -9,8 +9,8 @@ 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"
-SRCREV = "ee18c1f66877f7fb652467c349108395c20d4f9a"
+SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.20"
+SRCREV = "9cacf108d0ee5863c7a656da5d2271bc2396e43d"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
index 2cfae346..8e590965 100644
--- a/recipes-graphics/wayland/weston-init.bbappend
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -15,20 +15,29 @@ SRC_URI_append_mx6sl = " file://weston.config"
INI_UNCOMMENT_ASSIGNMENTS_append_imx = " \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland=true', '', d)} \
"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx6dl = " \
+ use-g2d=1 \
+"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx6q = " \
+ use-g2d=1 \
+"
INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \
use-g2d=1 \
"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx8 = " \
+ repaint-window=16 \
+"
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\\] \
size=1920x1080 \
"
-INI_UNCOMMENT_ASSIGNMENTS_append_mx8mn = " \
- use-g2d=1 \
-"
uncomment() {
if ! (grep "^#$1" $2); then
diff --git a/recipes-graphics/wayland/weston-init/weston.ini b/recipes-graphics/wayland/weston-init/imx/weston.ini
index d9094b1f..916e621a 100644
--- a/recipes-graphics/wayland/weston-init/weston.ini
+++ b/recipes-graphics/wayland/weston-init/imx/weston.ini
@@ -3,14 +3,19 @@
idle-time=0
#use-g2d=1
#xwayland=true
+#repaint-window=16
+#enable-overlay-view=1
#[shell]
#size=1920x1080
+[libinput]
+touchscreen_calibrator=true
+
#[output]
#name=HDMI-A-1
#mode=1920x1080@60
-#transform=90
+#transform=rotate-90
#[output]
#name=HDMI-A-2
@@ -19,7 +24,7 @@ idle-time=0
# off Disables the output
# preferred Uses the preferred mode
# current Uses the current crt controller mode
-#transform=90
+#transform=rotate-90
[screen-share]
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index 62b864c1..3279a728 100644
--- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,7 +1,8 @@
-From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001
+From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Feb 2017 15:53:30 +0200
Subject: [PATCH] weston-launch: Provide a default version that doesn't require
+
PAM
weston-launch requires PAM for starting weston as a non-root user.
@@ -57,7 +58,7 @@ index 08d23ec..cb9fd3f 100644
install: true
)
diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
-index 8a711b4..54c567a 100644
+index 521cb2c..2d42d33 100644
--- a/libweston/weston-launch.c
+++ b/libweston/weston-launch.c
@@ -51,7 +51,9 @@
@@ -97,7 +98,7 @@ index 8a711b4..54c567a 100644
static int
setup_launcher_socket(struct weston_launch *wl)
-@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status)
+@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status)
close(wl->signalfd);
close(wl->sock[0]);
@@ -105,15 +106,15 @@ index 8a711b4..54c567a 100644
if (wl->new_user) {
err = pam_close_session(wl->ph, 0);
if (err)
-@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status)
+@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status)
err, pam_strerror(wl->ph, err));
pam_end(wl->ph, err);
}
+#endif
- if (ioctl(wl->tty, KDSKBMUTE, 0) &&
- ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
+ /*
+ * Get a fresh handle to the tty as the previous one is in
+@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
setenv("HOME", wl->pw->pw_dir, 1);
setenv("SHELL", wl->pw->pw_shell, 1);
@@ -121,7 +122,7 @@ index 8a711b4..54c567a 100644
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
-@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
+@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
}
free(env);
}
@@ -129,7 +130,7 @@ index 8a711b4..54c567a 100644
/*
* We open a new session, so it makes sense
-@@ -745,8 +755,10 @@ static void
+@@ -789,8 +799,10 @@ static void
help(const char *name)
{
fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -140,7 +141,7 @@ index 8a711b4..54c567a 100644
fprintf(stderr, " -t, --tty Start session on alternative tty,\n"
" e.g. -t /dev/tty4, requires -u option.\n");
fprintf(stderr, " -v, --verbose Be verbose\n");
-@@ -760,7 +772,9 @@ main(int argc, char *argv[])
+@@ -804,7 +816,9 @@ main(int argc, char *argv[])
int i, c;
char *tty = NULL;
struct option opts[] = {
@@ -150,7 +151,7 @@ index 8a711b4..54c567a 100644
{ "tty", required_argument, NULL, 't' },
{ "verbose", no_argument, NULL, 'v' },
{ "help", no_argument, NULL, 'h' },
-@@ -772,11 +786,16 @@ main(int argc, char *argv[])
+@@ -816,11 +830,16 @@ main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) {
switch (c) {
case 'u':
@@ -167,7 +168,7 @@ index 8a711b4..54c567a 100644
break;
case 't':
tty = optarg;
-@@ -828,8 +847,10 @@ main(int argc, char *argv[])
+@@ -872,8 +891,10 @@ main(int argc, char *argv[])
if (setup_tty(&wl, tty) < 0)
exit(EXIT_FAILURE);
@@ -179,7 +180,7 @@ index 8a711b4..54c567a 100644
if (setup_launcher_socket(&wl) < 0)
exit(EXIT_FAILURE);
diff --git a/meson_options.txt b/meson_options.txt
-index c862ecc..73ef2c3 100644
+index 239bd2d..99e4ec3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -73,6 +73,13 @@ option(
diff --git a/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch
new file mode 100644
index 00000000..a4444e5d
--- /dev/null
+++ b/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch
@@ -0,0 +1,23 @@
+Fix atomic modesetting with musl
+
+atomic modesetting seems to fail with drm weston backend and this patch fixes
+it, below errors are seen before weston exits
+
+atomic: couldn't commit new state: Invalid argument
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/libweston/backend-drm/kms.c
++++ b/libweston/backend-drm/kms.c
+@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr
+ wl_list_for_each(plane, &b->plane_list, link) {
+ drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n",
+ (unsigned long) plane->plane_id);
+- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0);
+- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0);
++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0);
++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0);
+ }
+
+ flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
diff --git a/recipes-graphics/wayland/weston_8.0.0.imx.bb b/recipes-graphics/wayland/weston_9.0.0.imx.bb
index a021a54d..825a1b1c 100644
--- a/recipes-graphics/wayland/weston_8.0.0.imx.bb
+++ b/recipes-graphics/wayland/weston_9.0.0.imx.bb
@@ -3,7 +3,7 @@
# recipe. The second section customizes the recipe for i.MX.
########### OE-core copy ##################
-# Upstream hash: 9b1d30810eeecb46b977c8eed68be69aef891312
+# Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0
SUMMARY = "Weston, a Wayland compositor"
DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
@@ -17,19 +17,25 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
file://weston.desktop \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+ file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
"
-SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3"
-SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848"
+
+SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch "
+
+SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe"
UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
inherit meson pkgconfig useradd features_check
# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
+# weston-init requires pam enabled if started via systemd
+REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
+
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
@@ -38,7 +44,13 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
- launch"
+ launch \
+ image-jpeg \
+ screenshare \
+ shell-desktop \
+ shell-fullscreen \
+ shell-ivi"
+
#
# Compositor choices
#
@@ -71,9 +83,19 @@ PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-color
# Clients support
PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
# Virtual remote output with GStreamer on DRM backend
-PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0"
+PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0"
# Weston with PAM support
PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
+# Weston with screen-share support
+PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false"
+# Traditional desktop shell
+PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false"
+# Fullscreen shell
+PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false"
+# In-Vehicle Infotainment (IVI) shell
+PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false"
+# JPEG image loading support
+PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
do_install_append() {
# Weston doesn't need the .la files to load modules, so wipe them
@@ -126,14 +148,14 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork"
DEFAULT_PREFERENCE = "-1"
-SRCBRANCH = "weston-imx-8.0"
+SRCBRANCH = "weston-imx-9.0"
SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
"
-SRCREV = "f6a7d35650121fbe7c20d4cbe0eaac730fab3b2a"
+SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567"
S = "${WORKDIR}/git"
# Disable OpenGL for parts with GPU support for 2D but not 3D
@@ -144,6 +166,7 @@ PACKAGECONFIG_OPENGL = "opengl"
PACKAGECONFIG_OPENGL_imxgpu2d = ""
PACKAGECONFIG_OPENGL_imxgpu3d = "opengl"
+PACKAGECONFIG_remove = "wayland x11"
PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}"
PACKAGECONFIG_remove_imxfbdev = "kms"
@@ -154,6 +177,7 @@ PACKAGECONFIG_append_imxgpu2d = " imxg2d"
# Clients support
SIMPLE_CLIENTS = "all"
SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
# Weston with i.MX GPU support
PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl"
diff --git a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
index 0aba8e5a..cc68a518 100644
--- a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
@@ -28,7 +28,7 @@ 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://git.armlinux.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 \
"
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..069008c0 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
@@ -18,7 +18,7 @@ SRCBRANCH = "imx_exa_viv6_g2d"
SRC_URI = "git://source.codeaurora.org/external/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/cryptodev/cryptodev-qoriq-1.10.inc b/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc
deleted file mode 100644
index bb785831..00000000
--- a/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-HOMEPAGE = "http://cryptodev-linux.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-python() {
- d.appendVar('PROVIDES', ' ' + d.getVar('BPN').replace('-qoriq', ''))
- pkgs = d.getVar('PACKAGES').split()
- for p in pkgs:
- if '-qoriq' in p:
- d.appendVar("RPROVIDES_" + p, ' ' + p.replace('-qoriq', ''))
- d.appendVar("RCONFLICTS_" + p, ' ' + p.replace('-qoriq', ''))
- d.appendVar("RREPLACES_" + p, ' ' + p.replace('-qoriq', ''))
-}
-
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux;protocol=https;nobranch=1"
-SRCREV = "f3007431120a1b4ae983c2b9ea09051311aa5e2f"
-
-S = "${WORKDIR}/git"
-
-CLEANBROKEN = "1"
diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb
deleted file mode 100644
index c2cbc71b..00000000
--- a/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-kernel/cryptodev/cryptodev-linux_${PV}.bb
-require cryptodev-qoriq-${PV}.inc
-
-BBCLASSEXTEND = ""
-COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb
deleted file mode 100644
index 86078c57..00000000
--- a/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require recipes-kernel/cryptodev/cryptodev-module_${PV}.bb
-require cryptodev-qoriq-${PV}.inc
-
-inherit qoriq_build_64bit_kernel
-
-SRC_URI += " \
-file://0001-Disable-installing-header-file-provided-by-another-p.patch \
-"
-
-COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb
deleted file mode 100644
index 784c38b7..00000000
--- a/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require recipes-kernel/cryptodev/cryptodev-tests_${PV}.bb
-require cryptodev-qoriq-${PV}.inc
-
-SRC_URI += " \
-file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
-"
-
-COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
deleted file mode 100644
index 84fd27e6..00000000
--- a/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001
-From: Yu Zongchun <b40527@freescale.com>
-Date: Sun, 28 Apr 2013 14:39:22 +0800
-Subject: [PATCH] Add the compile and install rules for cryptodev tests folder
-
-This is required to install the cryptodev tests folder to rootfs
-
-Signed-off-by: Yu Zongchun <b40527@freescale.com>
-
-Upstream-Status: Pending
-
----
- Makefile | 6 ++++++
- tests/Makefile | 8 ++++++++
- 2 files changed, 14 insertions(+), 0 deletions(-)
-
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile
-+++ git/Makefile
-@@ -35,6 +35,9 @@ modules_install:
- $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
- install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
-
-+install_tests:
-+ make -C tests install DESTDIR=$(PREFIX)
-+
- clean:
- $(MAKE) $(KERNEL_MAKE_OPTS) clean
- rm -f $(hostprogs) *~
-@@ -43,6 +46,9 @@ clean:
- check:
- CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check
-
-+testprogs:
-+ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
-+
- CPOPTS =
- ifneq ($(SHOW_TYPES),)
- CPOPTS += --show-types
-Index: git/tests/Makefile
-===================================================================
---- git.orig/tests/Makefile
-+++ git/tests/Makefile
-@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin
-
- all: $(hostprogs)
-
-+install:
-+ install -d $(DESTDIR)/usr/bin/tests_cryptodev
-+ for bin in $(hostprogs); do \
-+ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \
-+ done
-+
- check: $(hostprogs)
- ./cipher
- ./hmac
-@@ -38,6 +44,8 @@ install:
- install -m 755 $$prog $(DESTDIR)/$(bindir); \
- done
-
-+testprogs: $(hostprogs)
-+
- clean:
- rm -f *.o *~ $(hostprogs)
-
diff --git a/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
deleted file mode 100644
index 885b5823..00000000
--- a/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys@ti.com>
-Date: Sun, 6 Apr 2014 19:51:39 -0400
-Subject: [PATCH] Disable installing header file provided by another package
-
-Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-
-Upstream-Status: Inappropriate [ OE specific ]
----
- Makefile | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 5a080e0..bf02396 100644
---- a/Makefile
-+++ b/Makefile
-@@ -33,7 +33,6 @@ install: modules_install
-
- modules_install:
- $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
-- install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h
-
- clean:
- $(MAKE) $(KERNEL_MAKE_OPTS) clean
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4+fslc.bb
index f9307fb4..af0b2d60 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.2+fslc.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4+fslc.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
PV .= "+git${SRCPV}"
-SRCREV = "86354002bea77acd9ce1812712e9d8485b377ec8"
+SRCREV = "f2e8483fbda59bf2482f77efb0804c014848f749"
SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https"
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.3.p1.0.bb
index 4c9015e9..556ec12d 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.3.p1.0.bb
@@ -1,20 +1,20 @@
# 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, \
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"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
-SRCBRANCH = "lf-5.4.y"
+SRCBRANCH = "imx_5.4.70_2.3.0"
LOCALVERSION = "-${SRCBRANCH}"
KERNEL_SRC ?= "git://source.codeaurora.org/external/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 = "13b3c469663da0c79d385ce15887f6b5805f060d"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.6.0.bb b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.6.0.bb
new file mode 100644
index 00000000..5cb7f764
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.6.0.bb
@@ -0,0 +1,19 @@
+# Copyright 2020 NXP
+
+DESCRIPTION = "Kernel loadable module for ISP"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/vvcam/LICENSE;md5=64381a6ea83b48c39fe524c85f65fb44"
+
+SRCBRANCH = "imx_5.4.70_2.3.0"
+ISP_KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/isp-vvcam.git;protocol=https"
+
+SRC_URI = " \
+ ${ISP_KERNEL_SRC};branch=${SRCBRANCH} \
+"
+SRCREV = "9824e601d336bcef2dc6284ff3605e0b1d32d63d"
+
+S = "${WORKDIR}/git/vvcam/v4l2"
+
+inherit module
+
+COMPATIBLE_MACHINE = "(imx|use-nxp-bsp)"
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/linux/linux-fslc-imx/imx/defconfig b/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
index 622e5430..3029043b 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
@@ -91,7 +99,11 @@ CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=y
CONFIG_PCI=y
CONFIG_PCI_MSI=y
-CONFIG_PCI_IMX6=y
+CONFIG_PCI_IMX6_HOST=y
+CONFIG_PCI_IMX6_EP=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
@@ -120,11 +132,13 @@ 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
CONFIG_SENSORS_FXOS8700=y
CONFIG_SENSORS_FXAS2100X=y
+CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
# CONFIG_SCSI_PROC_FS is not set
@@ -137,12 +151,16 @@ CONFIG_ATA=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_IMX=y
CONFIG_PATA_IMX=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
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 +183,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 +465,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 +504,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 +533,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 +557,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
diff --git a/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig b/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
index 469ee0ef..dbe4597f 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
@@ -170,11 +179,16 @@ CONFIG_PCIE_ALTERA=y
CONFIG_PCIE_ALTERA_MSI=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
-CONFIG_PCI_IMX6=y
+CONFIG_PCI_IMX6_HOST=y
+CONFIG_PCI_IMX6_EP=y
CONFIG_PCI_LAYERSCAPE=y
CONFIG_PCI_HISI=y
CONFIG_PCIE_KIRIN=y
CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=y
+CONFIG_IMX_MIC_EPF=m
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_FW_LOADER_USER_HELPER=y
@@ -211,8 +225,16 @@ CONFIG_BLK_DEV_NVME=y
CONFIG_SENSORS_FXOS8700=y
CONFIG_SENSORS_FXAS2100X=y
CONFIG_SRAM=y
+CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=m
+CONFIG_SCIF_BUS=m
+CONFIG_VOP_BUS=m
+CONFIG_IMX_MIC_HOST=m
+CONFIG_IMX_MIC_CARD=m
+CONFIG_SCIF=m
+CONFIG_MIC_COSM=m
+CONFIG_VOP=m
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_SAS_ATA=y
@@ -234,6 +256,7 @@ CONFIG_PATA_OF_PLATFORM=y
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_NETDEVICES=y
@@ -252,7 +275,6 @@ CONFIG_FSL_SDK_DPAA_ETH=y
CONFIG_FSL_DPAA2_ETH=y
CONFIG_FSL_ENETC=y
CONFIG_FSL_ENETC_VF=y
-CONFIG_FSL_ENETC_MDIO=y
CONFIG_HIX5HD2_GMAC=y
CONFIG_HNS_DSAF=y
CONFIG_HNS_ENET=y
@@ -272,7 +294,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 +322,11 @@ 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_XEN_NETDEV_BACKEND=m
+CONFIG_IVSHMEM_NET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_ADC=m
CONFIG_KEYBOARD_GPIO=y
@@ -311,6 +335,7 @@ CONFIG_KEYBOARD_IMX_SC_PWRKEY=y
CONFIG_KEYBOARD_CROS_EC=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ATMEL_MXT=m
+CONFIG_TOUCHSCREEN_GOODIX=m
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_MPL3115=y
@@ -351,6 +376,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 +395,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 +439,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
@@ -438,7 +468,19 @@ CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_VCTRL=m
CONFIG_RC_CORE=m
CONFIG_RC_DECODERS=y
+CONFIG_IR_NEC_DECODER=m
+CONFIG_IR_RC5_DECODER=m
+CONFIG_IR_RC6_DECODER=m
+CONFIG_IR_JVC_DECODER=m
+CONFIG_IR_SONY_DECODER=m
+CONFIG_IR_SANYO_DECODER=m
+CONFIG_IR_SHARP_DECODER=m
+CONFIG_IR_MCE_KBD_DECODER=m
+CONFIG_IR_XMP_DECODER=m
+CONFIG_IR_IMON_DECODER=m
+CONFIG_IR_RCMM_DECODER=m
CONFIG_RC_DEVICES=y
+CONFIG_IR_GPIO_CIR=m
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
@@ -458,6 +500,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,20 +508,30 @@ 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_PANEL_WKS_101WX001=y
+CONFIG_DRM_FSL_IMX_LVDS_BRIDGE=y
+CONFIG_DRM_NXP_SEIKO_43WVFIG=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
CONFIG_DRM_IMX_DCSS=y
+CONFIG_DRM_IMX_CDNS_MHDP=y
CONFIG_DRM_ETNAVIV=m
CONFIG_DRM_HISI_HIBMC=m
CONFIG_DRM_HISI_KIRIN=m
@@ -499,7 +552,6 @@ CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=y
-CONFIG_SND_SOC_FSL_DAI=m
CONFIG_SND_SOC_FSL_EASRC=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_IMX_AK4458=y
@@ -516,12 +568,15 @@ 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_IMX_PCM512X=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
@@ -544,6 +599,7 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_HCD_TEST_MODE=y
CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=y
+CONFIG_USB_UAS=y
CONFIG_USB_CDNS3=y
CONFIG_USB_CDNS3_GADGET=y
CONFIG_USB_CDNS3_HOST=y
@@ -554,8 +610,13 @@ 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_EHSET_TEST_FIXTURE=y
CONFIG_USB_HSIC_USB3503=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_MXS_PHY=y
@@ -619,6 +680,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 +708,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
@@ -657,6 +720,7 @@ CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_STAGING=y
CONFIG_STAGING_MEDIA=y
CONFIG_VIDEO_IMX_CAPTURE=y
+CONFIG_IMX8_MEDIA_DEVICE=m
CONFIG_ION=y
CONFIG_ION_SYSTEM_HEAP=y
CONFIG_ION_CMA_HEAP=y
@@ -680,6 +744,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 +754,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 +774,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
@@ -757,12 +828,14 @@ CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_TLS=m
-CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_CFB=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_OFB=m
-CONFIG_CRYPTO_XTS=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XTS=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_RMD128=m
@@ -770,19 +843,27 @@ CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_RMD256=m
CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_STREEBOG=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
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_INDIRECT_PIO=y
CONFIG_CMA_SIZE_MBYTES=320
@@ -795,3 +876,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 ef3a7d52..beeeeadc 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.2.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,34 +28,36 @@ Latest stable Kernel patchlevel is applied and maintained by Community."
# ------------------------------------------------------------------------------
# 1. Stable (tag or SHA(s))
# ------------------------------------------------------------------------------
-# tag: v5.4.51
+# tag: v5.4.110
#
# ------------------------------------------------------------------------------
# 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.70_2.3.0
#
# ------------------------------------------------------------------------------
# 3. Critical patches (SHA(s))
# ------------------------------------------------------------------------------
-# 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'
-# d4b105f930e2 ARM: dts: Add support for two more Kontron evalkit boards 'N6311 S' and 'N6411 S'
-# e778467f65d0 ARM: dts: imx6ul-kontron-n6310-s: Move common nodes to a separate file
-# 8b39f5e53831 ARM: dts: Add support for two more Kontron SoMs N6311 and N6411
-# 3bee262233eb ARM: dts: imx6ul-kontron-n6310: Move common SoM nodes to a separate file
-# 40a6a98b3f38 ARM: imx: Fix boot crash if ocotp is not found
-# 8aad5031be00 ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs
-# 564409aa3b33 soc: imx-scu: Using existing serial_number instead of UID
-# 0ee8e005bbfc soc: imx8: Using existing serial_number instead of UID
-# 134cbb845fc7 ARM: imx: Add serial number support for i.MX6/7 SoCs
+# b598b85172f7 irq-imx-irqsteer: fix compile error if CONFIG_PM_SLEEP is not set
+# 845099bfd0b8 fbdev: fix fbinfo flag dropped upstream
+# 847bfb09bb3b arm64: dts: imx8m: change ocotp node name on i.MX8M SoCs
+# d7ca6973c6d4 arm64: dts: imx8mm: Remove incorrect fallback compatible for ocotp
+# 539d19f12066 arm: imx: include i.MX6SX DDR freq implementation for i.MX6UL
+# 169b71ce3f8a arm: imx: do not include smp_wfe_imx6.S for i.MX6SX
+# 60be4c625594 arm: imx: enable HAVE_IMX_BUSFREQ for i.MX6
+# f393781fa575 arm: imx: do not build busfreq without HAVE_IMX_BUSFREQ
+# e0e74faf6af4 ARM: dts: imx6ul-kontron-n6x1x-s: Remove an obsolete comment and fix indentation
+# ad24781aecc3 ARM: dts: imx6ul-kontron-n6x1x-s: Add vbus-supply and overcurrent polarity to usb nodes
+# d56aa09ed0e0 ARM: dts: imx6ul-kontron-n6x1x: Add 'chosen' node with 'stdout-path'
+# 923bc9e57b24 ARM: dts: Add support for two more Kontron evalkit boards 'N6311 S' and 'N6411 S'
+# f952a6404d10 ARM: dts: imx6ul-kontron-n6310-s: Move common nodes to a separate file
+# 1fdb6565a632 ARM: dts: Add support for two more Kontron SoMs N6311 and N6411
+# 4fb833f01c30 ARM: dts: imx6ul-kontron-n6310: Move common SoM nodes to a separate file
+# 54c975dabcde ARM: imx: Fix boot crash if ocotp is not found
+# 1041cd02b33c ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs
+# 974b100d789c soc: imx-scu: Using existing serial_number instead of UID
+# 6fbfed9afe99 soc: imx8: Using existing serial_number instead of UID
+# 64d8ea803af5 ARM: imx: Add serial number support for i.MX6/7 SoCs
#
# NOTE to upgraders:
# This recipe should NOT collect individual patches, they should be applied to
@@ -68,18 +70,18 @@ include linux-fslc.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-SRCBRANCH = "5.4-1.0.0-imx"
-SRCREV = "9fb52fae75909b9ca83b2a04e824f97d2df85302"
+KBRANCH = "5.4-2.3.x-imx"
+SRCREV = "0b75fb32ce4bed3f44bd0e2e78c4f08521fac3c8"
# 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.51"
+LINUX_VERSION = "5.4.110"
# 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.70-2.3.0"
DEFAULT_PREFERENCE = "1"
diff --git a/recipes-kernel/linux/linux-fslc-lts-4.19.bb b/recipes-kernel/linux/linux-fslc-lts-4.19.bb
index 41b09347..b38e8216 100644
--- a/recipes-kernel/linux/linux-fslc-lts-4.19.bb
+++ b/recipes-kernel/linux/linux-fslc-lts-4.19.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
PV = "4.19.125+git${SRCPV}"
-SRCBRANCH = "4.19.x+fslc"
+KBRANCH = "4.19.x+fslc"
SRCREV = "d839dc0169b3c568813f2ee2abc30720f5244b89"
COMPATIBLE_MACHINE = "(mxs|mx5|mx6|vf|use-mainline-bsp)"
diff --git a/recipes-kernel/linux/linux-fslc-mfgtool_5.10.bb b/recipes-kernel/linux/linux-fslc-mfgtool_5.10.bb
new file mode 100644
index 00000000..c155ebb9
--- /dev/null
+++ b/recipes-kernel/linux/linux-fslc-mfgtool_5.10.bb
@@ -0,0 +1,15 @@
+# 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 3ce5c1b6..db972ba7 100644
--- a/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb
+++ b/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb
@@ -10,8 +10,8 @@ require recipes-kernel/linux/linux-qoriq.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION = "5.4.51"
+LINUX_VERSION = "5.4.92"
SRCBRANCH = "5.4.y+qoriq+fslc"
-SRCREV = "c34b53c0927fcefcdea3be16cc1fb9fdcbedbe40"
+SRCREV = "11d4722c637a77c6e1c9a8eeec091f1588f6b3f3"
SRC_URI := "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH}"
diff --git a/recipes-kernel/linux/linux-fslc.inc b/recipes-kernel/linux/linux-fslc.inc
index f6d04d59..566dd194 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=${KBRANCH} \
file://defconfig"
LOCALVERSION = "-fslc"
diff --git a/recipes-kernel/linux/linux-fslc/armv8a/defconfig b/recipes-kernel/linux/linux-fslc/armv8a/defconfig
new file mode 100644
index 00000000..df595480
--- /dev/null
+++ b/recipes-kernel/linux/linux-fslc/armv8a/defconfig
@@ -0,0 +1,1097 @@
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_AUDIT=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_NUMA_BALANCING=y
+CONFIG_MEMCG=y
+CONFIG_MEMCG_SWAP=y
+CONFIG_BLK_CGROUP=y
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_HUGETLB=y
+CONFIG_CPUSETS=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_CGROUP_PERF=y
+CONFIG_USER_NS=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_PROFILING=y
+CONFIG_ARCH_ACTIONS=y
+CONFIG_ARCH_AGILEX=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_ARCH_ALPINE=y
+CONFIG_ARCH_BCM2835=y
+CONFIG_ARCH_BCM_IPROC=y
+CONFIG_ARCH_BERLIN=y
+CONFIG_ARCH_BRCMSTB=y
+CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_K3=y
+CONFIG_ARCH_LAYERSCAPE=y
+CONFIG_ARCH_LG1K=y
+CONFIG_ARCH_HISI=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_ARCH_MESON=y
+CONFIG_ARCH_MVEBU=y
+CONFIG_ARCH_MXC=y
+CONFIG_ARCH_QCOM=y
+CONFIG_ARCH_RENESAS=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_S32=y
+CONFIG_ARCH_SEATTLE=y
+CONFIG_ARCH_STRATIX10=y
+CONFIG_ARCH_SYNQUACER=y
+CONFIG_ARCH_TEGRA=y
+CONFIG_ARCH_SPRD=y
+CONFIG_ARCH_THUNDER=y
+CONFIG_ARCH_THUNDER2=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_VISCONTI=y
+CONFIG_ARCH_XGENE=y
+CONFIG_ARCH_ZX=y
+CONFIG_ARCH_ZYNQMP=y
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_NUMA=y
+CONFIG_SECCOMP=y
+CONFIG_KEXEC=y
+CONFIG_KEXEC_FILE=y
+CONFIG_CRASH_DUMP=y
+CONFIG_XEN=y
+CONFIG_COMPAT=y
+CONFIG_RANDOMIZE_BASE=y
+CONFIG_HIBERNATION=y
+CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
+CONFIG_ENERGY_MODEL=y
+CONFIG_ARM_CPUIDLE=y
+CONFIG_ARM_PSCI_CPUIDLE=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_ACPI_CPPC_CPUFREQ=m
+CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=m
+CONFIG_ARM_ARMADA_37XX_CPUFREQ=y
+CONFIG_ARM_SCPI_CPUFREQ=y
+CONFIG_ARM_IMX_CPUFREQ_DT=m
+CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y
+CONFIG_ARM_QCOM_CPUFREQ_HW=y
+CONFIG_ARM_RASPBERRYPI_CPUFREQ=m
+CONFIG_ARM_TEGRA186_CPUFREQ=y
+CONFIG_QORIQ_CPUFREQ=y
+CONFIG_ARM_SCPI_PROTOCOL=y
+CONFIG_RASPBERRYPI_FIRMWARE=y
+CONFIG_INTEL_STRATIX10_SERVICE=y
+CONFIG_INTEL_STRATIX10_RSU=m
+CONFIG_EFI_CAPSULE_LOADER=y
+CONFIG_IMX_SCU=y
+CONFIG_IMX_SCU_PD=y
+CONFIG_ACPI=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=y
+CONFIG_VIRTUALIZATION=y
+CONFIG_KVM=y
+CONFIG_ARM64_CRYPTO=y
+CONFIG_CRYPTO_SHA1_ARM64_CE=y
+CONFIG_CRYPTO_SHA2_ARM64_CE=y
+CONFIG_CRYPTO_SHA512_ARM64_CE=m
+CONFIG_CRYPTO_SHA3_ARM64=m
+CONFIG_CRYPTO_SM3_ARM64_CE=m
+CONFIG_CRYPTO_GHASH_ARM64_CE=y
+CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_CHACHA20_NEON=m
+CONFIG_CRYPTO_AES_ARM64_BS=m
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_KSM=y
+CONFIG_MEMORY_FAILURE=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IPV6=m
+CONFIG_NETFILTER=y
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
+CONFIG_NETFILTER_XT_TARGET_LOG=m
+CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_NAT=m
+CONFIG_IP6_NF_TARGET_MASQUERADE=m
+CONFIG_BRIDGE=m
+CONFIG_BRIDGE_VLAN_FILTERING=y
+CONFIG_NET_DSA=m
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+CONFIG_VLAN_8021Q_MVRP=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBS=m
+CONFIG_NET_SCH_ETF=m
+CONFIG_NET_SCH_TAPRIO=m
+CONFIG_NET_SCH_MQPRIO=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_FLOWER=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_GACT=m
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_GATE=m
+CONFIG_QRTR=m
+CONFIG_QRTR_SMD=m
+CONFIG_QRTR_TUN=m
+CONFIG_BPF_JIT=y
+CONFIG_CAN=m
+CONFIG_CAN_RCAR=m
+CONFIG_CAN_RCAR_CANFD=m
+CONFIG_CAN_FLEXCAN=m
+CONFIG_BT=m
+CONFIG_BT_HIDP=m
+# CONFIG_BT_HS is not set
+# CONFIG_BT_LE is not set
+CONFIG_BT_LEDS=y
+# CONFIG_BT_DEBUGFS is not set
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_LL=y
+CONFIG_BT_HCIUART_BCM=y
+CONFIG_BT_HCIUART_QCA=y
+CONFIG_CFG80211=m
+CONFIG_MAC80211=m
+CONFIG_MAC80211_LEDS=y
+CONFIG_RFKILL=m
+CONFIG_NET_9P=y
+CONFIG_NET_9P_VIRTIO=y
+CONFIG_NFC=m
+CONFIG_NFC_NCI=m
+CONFIG_NFC_S3FWRN5_I2C=m
+CONFIG_PCI=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_PASID=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+CONFIG_PCI_AARDVARK=y
+CONFIG_PCI_TEGRA=y
+CONFIG_PCIE_RCAR_HOST=y
+CONFIG_PCIE_RCAR_EP=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCI_XGENE=y
+CONFIG_PCIE_ALTERA=y
+CONFIG_PCIE_ALTERA_MSI=y
+CONFIG_PCI_HOST_THUNDER_PEM=y
+CONFIG_PCI_HOST_THUNDER_ECAM=y
+CONFIG_PCIE_ROCKCHIP_HOST=m
+CONFIG_PCIE_BRCMSTB=m
+CONFIG_PCI_LAYERSCAPE=y
+CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCI_HISI=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCIE_ARMADA_8K=y
+CONFIG_PCIE_KIRIN=y
+CONFIG_PCIE_HISI_STB=y
+CONFIG_PCIE_TEGRA194_HOST=m
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=m
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_FW_LOADER_USER_HELPER=y
+CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
+CONFIG_HISILICON_LPC=y
+CONFIG_SIMPLE_PM_BUS=y
+CONFIG_FSL_MC_BUS=y
+CONFIG_TEGRA_ACONNECT=m
+CONFIG_MTD=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_DATAFLASH=y
+CONFIG_MTD_SST25L=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_NAND_DENALI_DT=y
+CONFIG_MTD_NAND_MARVELL=y
+CONFIG_MTD_NAND_FSL_IFC=y
+CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_SPI_CADENCE_QUADSPI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NBD=m
+CONFIG_VIRTIO_BLK=y
+CONFIG_BLK_DEV_NVME=m
+CONFIG_SRAM=y
+CONFIG_PCI_ENDPOINT_TEST=m
+CONFIG_EEPROM_AT24=m
+CONFIG_EEPROM_AT25=m
+CONFIG_UACCE=m
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_SAS_ATA=y
+CONFIG_SCSI_HISI_SAS=y
+CONFIG_SCSI_HISI_SAS_PCI=y
+CONFIG_MEGARAID_SAS=y
+CONFIG_SCSI_MPT3SAS=m
+CONFIG_SCSI_UFSHCD=y
+CONFIG_SCSI_UFSHCD_PLATFORM=y
+CONFIG_SCSI_UFS_QCOM=m
+CONFIG_SCSI_UFS_HISI=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_AHCI_CEVA=y
+CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_XGENE=y
+CONFIG_AHCI_QORIQ=y
+CONFIG_SATA_SIL24=y
+CONFIG_SATA_RCAR=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_OF_PLATFORM=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_NETDEVICES=y
+CONFIG_MACVLAN=m
+CONFIG_MACVTAP=m
+CONFIG_TUN=y
+CONFIG_VETH=m
+CONFIG_VIRTIO_NET=y
+CONFIG_NET_DSA_MSCC_FELIX=m
+CONFIG_AMD_XGBE=y
+CONFIG_NET_XGENE=y
+CONFIG_ATL1C=m
+CONFIG_BCMGENET=m
+CONFIG_BNX2X=m
+CONFIG_MACB=y
+CONFIG_THUNDER_NIC_PF=y
+CONFIG_FEC=y
+CONFIG_FSL_FMAN=y
+CONFIG_FSL_DPAA_ETH=y
+CONFIG_FSL_DPAA2_ETH=y
+CONFIG_FSL_ENETC=y
+CONFIG_FSL_ENETC_VF=y
+CONFIG_FSL_ENETC_QOS=y
+CONFIG_HIX5HD2_GMAC=y
+CONFIG_HNS_DSAF=y
+CONFIG_HNS_ENET=y
+CONFIG_HNS3=y
+CONFIG_HNS3_HCLGE=y
+CONFIG_HNS3_ENET=y
+CONFIG_E1000=y
+CONFIG_E1000E=y
+CONFIG_IGB=y
+CONFIG_IGBVF=y
+CONFIG_MVNETA=y
+CONFIG_MVPP2=y
+CONFIG_SKY2=y
+CONFIG_MLX4_EN=m
+CONFIG_MLX5_CORE=m
+CONFIG_MLX5_CORE_EN=y
+CONFIG_QCOM_EMAC=m
+CONFIG_RMNET=m
+CONFIG_SH_ETH=y
+CONFIG_RAVB=y
+CONFIG_SMC91X=y
+CONFIG_SMSC911X=y
+CONFIG_SNI_AVE=y
+CONFIG_SNI_NETSEC=y
+CONFIG_STMMAC_ETH=m
+CONFIG_TI_K3_AM65_CPSW_NUSS=y
+CONFIG_QCOM_IPA=m
+CONFIG_MDIO_BUS_MUX_MMIOREG=y
+CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
+CONFIG_AQUANTIA_PHY=y
+CONFIG_MARVELL_PHY=m
+CONFIG_MARVELL_10G_PHY=m
+CONFIG_MESON_GXL_PHY=m
+CONFIG_MICREL_PHY=y
+CONFIG_MICROSEMI_PHY=y
+CONFIG_AT803X_PHY=y
+CONFIG_REALTEK_PHY=m
+CONFIG_ROCKCHIP_PHY=y
+CONFIG_VITESSE_PHY=y
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_RTL8152=m
+CONFIG_USB_LAN78XX=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_SR9800=m
+CONFIG_USB_NET_SMSC75XX=m
+CONFIG_USB_NET_SMSC95XX=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_ATH10K=m
+CONFIG_ATH10K_PCI=m
+CONFIG_ATH10K_SNOC=m
+CONFIG_BRCMFMAC=m
+CONFIG_MWIFIEX=m
+CONFIG_MWIFIEX_PCIE=m
+CONFIG_WL18XX=m
+CONFIG_WLCORE_SDIO=m
+CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_ADC=m
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_SNVS_PWRKEY=m
+CONFIG_KEYBOARD_IMX_SC_KEY=m
+CONFIG_KEYBOARD_CROS_EC=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=m
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PM8941_PWRKEY=y
+CONFIG_INPUT_PM8XXX_VIBRATOR=m
+CONFIG_INPUT_HISI_POWERKEY=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_AMBAKMI=y
+CONFIG_LEGACY_PTY_COUNT=16
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_BCM2835AUX=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_8250_OMAP=y
+CONFIG_SERIAL_8250_MT6577=y
+CONFIG_SERIAL_8250_UNIPHIER=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_MESON=y
+CONFIG_SERIAL_MESON_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_TEGRA=y
+CONFIG_SERIAL_TEGRA_TCU=y
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=y
+CONFIG_SERIAL_QCOM_GENI=y
+CONFIG_SERIAL_QCOM_GENI_CONSOLE=y
+CONFIG_SERIAL_XILINX_PS_UART=y
+CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+CONFIG_SERIAL_FSL_LINFLEXUART=y
+CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
+CONFIG_SERIAL_MVEBU_UART=y
+CONFIG_SERIAL_OWL=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_IPMI_HANDLER=m
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_TCG_TPM=y
+CONFIG_TCG_TIS_I2C_INFINEON=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
+CONFIG_I2C_BCM2835=m
+CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_IMX=y
+CONFIG_I2C_IMX_LPI2C=y
+CONFIG_I2C_MESON=y
+CONFIG_I2C_MV64XXX=y
+CONFIG_I2C_OWL=y
+CONFIG_I2C_PXA=y
+CONFIG_I2C_QCOM_CCI=m
+CONFIG_I2C_QCOM_GENI=m
+CONFIG_I2C_QUP=y
+CONFIG_I2C_RK3X=y
+CONFIG_I2C_SH_MOBILE=y
+CONFIG_I2C_TEGRA=y
+CONFIG_I2C_UNIPHIER_F=y
+CONFIG_I2C_RCAR=y
+CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_SPI=y
+CONFIG_SPI_ARMADA_3700=y
+CONFIG_SPI_BCM2835=m
+CONFIG_SPI_BCM2835AUX=m
+CONFIG_SPI_FSL_LPSPI=y
+CONFIG_SPI_FSL_QUADSPI=y
+CONFIG_SPI_NXP_FLEXSPI=y
+CONFIG_SPI_IMX=m
+CONFIG_SPI_FSL_DSPI=y
+CONFIG_SPI_MESON_SPICC=m
+CONFIG_SPI_MESON_SPIFC=m
+CONFIG_SPI_ORION=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_ROCKCHIP=y
+CONFIG_SPI_RPCIF=m
+CONFIG_SPI_QCOM_QSPI=m
+CONFIG_SPI_QUP=y
+CONFIG_SPI_QCOM_GENI=m
+CONFIG_SPI_S3C64XX=y
+CONFIG_SPI_SH_MSIOF=m
+CONFIG_SPI_SUN6I=y
+CONFIG_SPI_SPIDEV=m
+CONFIG_SPMI=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_OWL=y
+CONFIG_PINCTRL_S700=y
+CONFIG_PINCTRL_S900=y
+CONFIG_PINCTRL_IMX8MM=y
+CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
+CONFIG_PINCTRL_IMX8MQ=y
+CONFIG_PINCTRL_IMX8QXP=y
+CONFIG_PINCTRL_IMX8DXL=y
+CONFIG_PINCTRL_IPQ8074=y
+CONFIG_PINCTRL_IPQ6018=y
+CONFIG_PINCTRL_MSM8916=y
+CONFIG_PINCTRL_MSM8994=y
+CONFIG_PINCTRL_MSM8996=y
+CONFIG_PINCTRL_MSM8998=y
+CONFIG_PINCTRL_QCS404=y
+CONFIG_PINCTRL_QDF2XXX=y
+CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
+CONFIG_PINCTRL_SC7180=y
+CONFIG_PINCTRL_SDM845=y
+CONFIG_PINCTRL_SM8150=y
+CONFIG_PINCTRL_SM8250=y
+CONFIG_GPIO_ALTERA=m
+CONFIG_GPIO_DWAPB=y
+CONFIG_GPIO_MB86S7X=y
+CONFIG_GPIO_MPC8XXX=y
+CONFIG_GPIO_MXC=y
+CONFIG_GPIO_PL061=y
+CONFIG_GPIO_RCAR=y
+CONFIG_GPIO_UNIPHIER=y
+CONFIG_GPIO_WCD934X=m
+CONFIG_GPIO_XGENE=y
+CONFIG_GPIO_XGENE_SB=y
+CONFIG_GPIO_MAX732X=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_PCA953X_IRQ=y
+CONFIG_GPIO_BD9571MWV=m
+CONFIG_GPIO_MAX77620=y
+CONFIG_GPIO_SL28CPLD=m
+CONFIG_QCOM_CPR=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_POWER_RESET_MSM=y
+CONFIG_POWER_RESET_XGENE=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_BATTERY_SBS=m
+CONFIG_BATTERY_BQ27XXX=y
+CONFIG_SENSORS_ARM_SCPI=y
+CONFIG_SENSORS_LM90=m
+CONFIG_SENSORS_PWM_FAN=m
+CONFIG_SENSORS_RASPBERRYPI_HWMON=m
+CONFIG_SENSORS_SL28CPLD=m
+CONFIG_SENSORS_INA2XX=m
+CONFIG_SENSORS_INA3221=m
+CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
+CONFIG_CPU_THERMAL=y
+CONFIG_THERMAL_EMULATION=y
+CONFIG_QORIQ_THERMAL=m
+CONFIG_SUN8I_THERMAL=y
+CONFIG_IMX_SC_THERMAL=m
+CONFIG_IMX8MM_THERMAL=m
+CONFIG_ROCKCHIP_THERMAL=m
+CONFIG_RCAR_THERMAL=y
+CONFIG_RCAR_GEN3_THERMAL=y
+CONFIG_ARMADA_THERMAL=y
+CONFIG_BCM2711_THERMAL=m
+CONFIG_BCM2835_THERMAL=m
+CONFIG_BRCMSTB_THERMAL=m
+CONFIG_EXYNOS_THERMAL=y
+CONFIG_TEGRA_BPMP_THERMAL=m
+CONFIG_QCOM_TSENS=y
+CONFIG_QCOM_SPMI_TEMP_ALARM=m
+CONFIG_UNIPHIER_THERMAL=y
+CONFIG_WATCHDOG=y
+CONFIG_SL28CPLD_WATCHDOG=m
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_ARM_SBSA_WATCHDOG=y
+CONFIG_ARM_SMC_WATCHDOG=y
+CONFIG_S3C2410_WATCHDOG=y
+CONFIG_DW_WATCHDOG=y
+CONFIG_SUNXI_WATCHDOG=m
+CONFIG_IMX2_WDT=y
+CONFIG_IMX_SC_WDT=m
+CONFIG_QCOM_WDT=m
+CONFIG_MESON_GXBB_WATCHDOG=m
+CONFIG_MESON_WATCHDOG=m
+CONFIG_RENESAS_WDT=y
+CONFIG_UNIPHIER_WATCHDOG=y
+CONFIG_BCM2835_WDT=y
+CONFIG_MFD_ALTERA_SYSMGR=y
+CONFIG_MFD_BD9571MWV=y
+CONFIG_MFD_AXP20X_I2C=y
+CONFIG_MFD_AXP20X_RSB=y
+CONFIG_MFD_EXYNOS_LPASS=m
+CONFIG_MFD_HI6421_PMIC=y
+CONFIG_MFD_HI655X_PMIC=y
+CONFIG_MFD_MAX77620=y
+CONFIG_MFD_SPMI_PMIC=y
+CONFIG_MFD_RK808=y
+CONFIG_MFD_SEC_CORE=y
+CONFIG_MFD_SL28CPLD=y
+CONFIG_MFD_ROHM_BD718XX=y
+CONFIG_MFD_WCD934X=m
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_AXP20X=y
+CONFIG_REGULATOR_BD718XX=y
+CONFIG_REGULATOR_BD9571MWV=y
+CONFIG_REGULATOR_FAN53555=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_REGULATOR_HI6421V530=y
+CONFIG_REGULATOR_HI655X=y
+CONFIG_REGULATOR_MAX77620=y
+CONFIG_REGULATOR_MAX8973=y
+CONFIG_REGULATOR_PCA9450=y
+CONFIG_REGULATOR_PFUZE100=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_REGULATOR_QCOM_RPMH=y
+CONFIG_REGULATOR_QCOM_SMD_RPM=y
+CONFIG_REGULATOR_QCOM_SPMI=y
+CONFIG_REGULATOR_RK808=y
+CONFIG_REGULATOR_S2MPS11=y
+CONFIG_REGULATOR_VCTRL=m
+CONFIG_RC_CORE=m
+CONFIG_RC_DECODERS=y
+CONFIG_RC_DEVICES=y
+CONFIG_IR_MESON=m
+CONFIG_IR_SUNXI=m
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_SDR_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+# CONFIG_DVB_NET is not set
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_RCAR_CSI2=m
+CONFIG_VIDEO_RCAR_VIN=m
+CONFIG_VIDEO_SUN6I_CSI=m
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
+CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
+CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
+CONFIG_VIDEO_RENESAS_FDP1=m
+CONFIG_VIDEO_RENESAS_FCP=m
+CONFIG_VIDEO_RENESAS_VSP1=m
+CONFIG_SDR_PLATFORM_DRIVERS=y
+CONFIG_VIDEO_RCAR_DRIF=m
+CONFIG_VIDEO_IMX219=m
+CONFIG_VIDEO_OV5645=m
+CONFIG_VIDEO_QCOM_CAMSS=m
+CONFIG_DRM=m
+CONFIG_DRM_I2C_NXP_TDA998X=m
+CONFIG_DRM_MALI_DISPLAY=m
+CONFIG_DRM_NOUVEAU=m
+CONFIG_DRM_EXYNOS=m
+CONFIG_DRM_EXYNOS5433_DECON=y
+CONFIG_DRM_EXYNOS7_DECON=y
+CONFIG_DRM_EXYNOS_DSI=y
+# CONFIG_DRM_EXYNOS_DP is not set
+CONFIG_DRM_EXYNOS_HDMI=y
+CONFIG_DRM_EXYNOS_MIC=y
+CONFIG_DRM_ROCKCHIP=m
+CONFIG_ROCKCHIP_ANALOGIX_DP=y
+CONFIG_ROCKCHIP_CDN_DP=y
+CONFIG_ROCKCHIP_DW_HDMI=y
+CONFIG_ROCKCHIP_DW_MIPI_DSI=y
+CONFIG_ROCKCHIP_INNO_HDMI=y
+CONFIG_DRM_RCAR_DU=m
+CONFIG_DRM_RCAR_DW_HDMI=m
+CONFIG_DRM_SUN4I=m
+CONFIG_DRM_SUN6I_DSI=m
+CONFIG_DRM_SUN8I_DW_HDMI=m
+CONFIG_DRM_SUN8I_MIXER=m
+CONFIG_DRM_MSM=m
+CONFIG_DRM_TEGRA=m
+CONFIG_DRM_PANEL_LVDS=m
+CONFIG_DRM_PANEL_SIMPLE=m
+CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
+CONFIG_DRM_PANEL_SITRONIX_ST7703=m
+CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
+CONFIG_DRM_DISPLAY_CONNECTOR=m
+CONFIG_DRM_NWL_MIPI_DSI=m
+CONFIG_DRM_LONTIUM_LT9611=m
+CONFIG_DRM_SII902X=m
+CONFIG_DRM_SIMPLE_BRIDGE=m
+CONFIG_DRM_THINE_THC63LVD1024=m
+CONFIG_DRM_TI_SN65DSI86=m
+CONFIG_DRM_I2C_ADV7511=m
+CONFIG_DRM_I2C_ADV7511_AUDIO=y
+CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
+CONFIG_DRM_DW_HDMI_CEC=m
+CONFIG_DRM_VC4=m
+CONFIG_DRM_ETNAVIV=m
+CONFIG_DRM_HISI_HIBMC=m
+CONFIG_DRM_HISI_KIRIN=m
+CONFIG_DRM_MXSFB=m
+CONFIG_DRM_MESON=m
+CONFIG_DRM_PL111=m
+CONFIG_DRM_LIMA=m
+CONFIG_DRM_PANFROST=m
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_EFI=y
+CONFIG_BACKLIGHT_PWM=m
+CONFIG_BACKLIGHT_LP855X=m
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_HDA_TEGRA=m
+CONFIG_SND_HDA_CODEC_HDMI=m
+CONFIG_SND_SOC=y
+CONFIG_SND_BCM2835_SOC_I2S=m
+CONFIG_SND_SOC_FSL_SAI=m
+CONFIG_SND_MESON_AXG_SOUND_CARD=m
+CONFIG_SND_MESON_GX_SOUND_CARD=m
+CONFIG_SND_SOC_QCOM=m
+CONFIG_SND_SOC_APQ8016_SBC=m
+CONFIG_SND_SOC_MSM8996=m
+CONFIG_SND_SOC_SDM845=m
+CONFIG_SND_SOC_ROCKCHIP=m
+CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
+CONFIG_SND_SOC_ROCKCHIP_RT5645=m
+CONFIG_SND_SOC_RK3399_GRU_SOUND=m
+CONFIG_SND_SOC_SAMSUNG=y
+CONFIG_SND_SOC_RCAR=m
+CONFIG_SND_SUN4I_SPDIF=m
+CONFIG_SND_SOC_TEGRA=m
+CONFIG_SND_SOC_TEGRA210_AHUB=m
+CONFIG_SND_SOC_TEGRA210_DMIC=m
+CONFIG_SND_SOC_TEGRA210_I2S=m
+CONFIG_SND_SOC_TEGRA186_DSPK=m
+CONFIG_SND_SOC_TEGRA210_ADMAIF=m
+CONFIG_SND_SOC_AK4613=m
+CONFIG_SND_SOC_ES7134=m
+CONFIG_SND_SOC_ES7241=m
+CONFIG_SND_SOC_PCM3168A_I2C=m
+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
+CONFIG_SND_SOC_TAS571X=m
+CONFIG_SND_SOC_WCD934X=m
+CONFIG_SND_SOC_WM8904=m
+CONFIG_SND_SOC_WSA881X=m
+CONFIG_SND_SIMPLE_CARD=m
+CONFIG_SND_AUDIO_GRAPH_CARD=m
+CONFIG_I2C_HID=m
+CONFIG_USB_CONN_GPIO=y
+CONFIG_USB=y
+CONFIG_USB_OTG=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_TEGRA=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_EXYNOS=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_EXYNOS=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_RENESAS_USBHS_HCD=m
+CONFIG_USB_RENESAS_USBHS=m
+CONFIG_USB_ACM=m
+CONFIG_USB_STORAGE=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_ISP1760=y
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_HSIC_USB3503=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_RENESAS_USBHS_UDC=m
+CONFIG_USB_RENESAS_USB3=m
+CONFIG_USB_TEGRA_XUDC=m
+CONFIG_USB_CONFIGFS=m
+CONFIG_USB_CONFIGFS_SERIAL=y
+CONFIG_USB_CONFIGFS_ACM=y
+CONFIG_USB_CONFIGFS_OBEX=y
+CONFIG_USB_CONFIGFS_NCM=y
+CONFIG_USB_CONFIGFS_ECM=y
+CONFIG_USB_CONFIGFS_ECM_SUBSET=y
+CONFIG_USB_CONFIGFS_RNDIS=y
+CONFIG_USB_CONFIGFS_EEM=y
+CONFIG_USB_CONFIGFS_MASS_STORAGE=y
+CONFIG_USB_CONFIGFS_F_FS=y
+CONFIG_TYPEC=m
+CONFIG_TYPEC_TCPM=m
+CONFIG_TYPEC_FUSB302=m
+CONFIG_TYPEC_HD3SS3220=m
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK_MINORS=32
+CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+CONFIG_MMC_SDHCI_CADENCE=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MMC_SDHCI_TEGRA=y
+CONFIG_MMC_SDHCI_F_SDH30=y
+CONFIG_MMC_MESON_GX=y
+CONFIG_MMC_SDHCI_MSM=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC_SDHI=y
+CONFIG_MMC_UNIPHIER=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_EXYNOS=y
+CONFIG_MMC_DW_HI3798CV200=y
+CONFIG_MMC_DW_K3=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SUNXI=y
+CONFIG_MMC_BCM2835=y
+CONFIG_MMC_SDHCI_XENON=y
+CONFIG_MMC_SDHCI_AM654=y
+CONFIG_MMC_OWL=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_LEDS_TRIGGER_PANIC=y
+CONFIG_EDAC=y
+CONFIG_EDAC_GHES=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_MAX77686=y
+CONFIG_RTC_DRV_RK808=m
+CONFIG_RTC_DRV_PCF85363=m
+CONFIG_RTC_DRV_RX8581=m
+CONFIG_RTC_DRV_RV8803=m
+CONFIG_RTC_DRV_S5M=y
+CONFIG_RTC_DRV_DS3232=y
+CONFIG_RTC_DRV_PCF2127=m
+CONFIG_RTC_DRV_EFI=y
+CONFIG_RTC_DRV_CROS_EC=y
+CONFIG_RTC_DRV_S3C=y
+CONFIG_RTC_DRV_PL031=y
+CONFIG_RTC_DRV_SUN6I=y
+CONFIG_RTC_DRV_ARMADA38X=y
+CONFIG_RTC_DRV_PM8XXX=m
+CONFIG_RTC_DRV_TEGRA=y
+CONFIG_RTC_DRV_SNVS=m
+CONFIG_RTC_DRV_IMX_SC=m
+CONFIG_RTC_DRV_XGENE=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_BCM2835=y
+CONFIG_DMA_SUN6I=m
+CONFIG_FSL_EDMA=y
+CONFIG_IMX_SDMA=y
+CONFIG_K3_DMA=y
+CONFIG_MV_XOR=y
+CONFIG_MV_XOR_V2=y
+CONFIG_OWL_DMA=y
+CONFIG_PL330_DMA=y
+CONFIG_TEGRA20_APB_DMA=y
+CONFIG_TEGRA210_ADMA=m
+CONFIG_QCOM_BAM_DMA=y
+CONFIG_QCOM_HIDMA_MGMT=y
+CONFIG_QCOM_HIDMA=y
+CONFIG_RCAR_DMAC=y
+CONFIG_RENESAS_USB_DMAC=m
+CONFIG_TI_K3_UDMA=y
+CONFIG_TI_K3_UDMA_GLUE_LAYER=y
+CONFIG_VFIO=y
+CONFIG_VFIO_PCI=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_MFD_CROS_EC_DEV=y
+CONFIG_CHROME_PLATFORMS=y
+CONFIG_CROS_EC=y
+CONFIG_CROS_EC_I2C=y
+CONFIG_CROS_EC_SPI=y
+CONFIG_CROS_EC_CHARDEV=m
+CONFIG_COMMON_CLK_RK808=y
+CONFIG_COMMON_CLK_SCPI=y
+CONFIG_COMMON_CLK_CS2000_CP=y
+CONFIG_COMMON_CLK_FSL_SAI=y
+CONFIG_COMMON_CLK_S2MPS11=y
+CONFIG_COMMON_CLK_PWM=y
+CONFIG_COMMON_CLK_VC5=y
+CONFIG_COMMON_CLK_BD718XX=m
+CONFIG_CLK_RASPBERRYPI=m
+CONFIG_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
+CONFIG_CLK_IMX8MQ=y
+CONFIG_CLK_IMX8QXP=y
+CONFIG_TI_SCI_CLK=y
+CONFIG_COMMON_CLK_QCOM=y
+CONFIG_QCOM_A53PLL=y
+CONFIG_QCOM_CLK_APCS_MSM8916=y
+CONFIG_QCOM_CLK_SMD_RPM=y
+CONFIG_QCOM_CLK_RPMH=y
+CONFIG_IPQ_GCC_8074=y
+CONFIG_IPQ_GCC_6018=y
+CONFIG_MSM_GCC_8916=y
+CONFIG_MSM_GCC_8994=y
+CONFIG_MSM_MMCC_8996=y
+CONFIG_MSM_GCC_8998=y
+CONFIG_QCS_GCC_404=y
+CONFIG_SC_GCC_7180=y
+CONFIG_SDM_CAMCC_845=m
+CONFIG_SDM_GCC_845=y
+CONFIG_SDM_GPUCC_845=y
+CONFIG_SDM_VIDEOCC_845=y
+CONFIG_SDM_DISPCC_845=y
+CONFIG_SM_GCC_8150=y
+CONFIG_SM_GCC_8250=y
+CONFIG_SM_GPUCC_8150=y
+CONFIG_SM_GPUCC_8250=y
+CONFIG_QCOM_HFPLL=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
+CONFIG_ARM_MHU=y
+CONFIG_IMX_MBOX=y
+CONFIG_PLATFORM_MHU=y
+CONFIG_BCM2835_MBOX=y
+CONFIG_QCOM_APCS_IPC=y
+CONFIG_QCOM_IPCC=y
+CONFIG_ROCKCHIP_IOMMU=y
+CONFIG_TEGRA_IOMMU_SMMU=y
+CONFIG_ARM_SMMU=y
+CONFIG_ARM_SMMU_V3=y
+CONFIG_QCOM_IOMMU=y
+CONFIG_REMOTEPROC=y
+CONFIG_QCOM_Q6V5_MSS=m
+CONFIG_QCOM_Q6V5_PAS=m
+CONFIG_QCOM_SYSMON=m
+CONFIG_RPMSG_QCOM_GLINK_RPM=y
+CONFIG_RPMSG_QCOM_GLINK_SMEM=m
+CONFIG_RPMSG_QCOM_SMD=y
+CONFIG_SOUNDWIRE=m
+CONFIG_SOUNDWIRE_QCOM=m
+CONFIG_OWL_PM_DOMAINS=y
+CONFIG_RASPBERRYPI_POWER=y
+CONFIG_FSL_DPAA=y
+CONFIG_FSL_MC_DPIO=y
+CONFIG_QCOM_AOSS_QMP=y
+CONFIG_QCOM_GENI_SE=y
+CONFIG_QCOM_RMTFS_MEM=m
+CONFIG_QCOM_RPMH=y
+CONFIG_QCOM_RPMHPD=y
+CONFIG_QCOM_RPMPD=y
+CONFIG_QCOM_SMEM=y
+CONFIG_QCOM_SMD_RPM=y
+CONFIG_QCOM_SMP2P=y
+CONFIG_QCOM_SMSM=y
+CONFIG_QCOM_SOCINFO=m
+CONFIG_QCOM_APR=m
+CONFIG_ARCH_R8A774A1=y
+CONFIG_ARCH_R8A774B1=y
+CONFIG_ARCH_R8A774C0=y
+CONFIG_ARCH_R8A774E1=y
+CONFIG_ARCH_R8A77950=y
+CONFIG_ARCH_R8A77951=y
+CONFIG_ARCH_R8A77960=y
+CONFIG_ARCH_R8A77961=y
+CONFIG_ARCH_R8A77965=y
+CONFIG_ARCH_R8A77970=y
+CONFIG_ARCH_R8A77980=y
+CONFIG_ARCH_R8A77990=y
+CONFIG_ARCH_R8A77995=y
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+CONFIG_ARCH_TEGRA_132_SOC=y
+CONFIG_ARCH_TEGRA_210_SOC=y
+CONFIG_ARCH_TEGRA_186_SOC=y
+CONFIG_ARCH_TEGRA_194_SOC=y
+CONFIG_ARCH_K3_AM6_SOC=y
+CONFIG_ARCH_K3_J721E_SOC=y
+CONFIG_TI_SCI_PM_DOMAINS=y
+CONFIG_EXTCON_PTN5150=m
+CONFIG_EXTCON_USB_GPIO=y
+CONFIG_EXTCON_USBC_CROS_EC=y
+CONFIG_RENESAS_RPCIF=m
+CONFIG_IIO=y
+CONFIG_EXYNOS_ADC=y
+CONFIG_MAX9611=m
+CONFIG_QCOM_SPMI_ADC5=m
+CONFIG_ROCKCHIP_SARADC=m
+CONFIG_IIO_CROS_EC_SENSORS_CORE=m
+CONFIG_IIO_CROS_EC_SENSORS=m
+CONFIG_IIO_CROS_EC_LIGHT_PROX=m
+CONFIG_SENSORS_ISL29018=m
+CONFIG_IIO_CROS_EC_BARO=m
+CONFIG_MPL3115=m
+CONFIG_PWM=y
+CONFIG_PWM_BCM2835=m
+CONFIG_PWM_CROS_EC=m
+CONFIG_PWM_MESON=m
+CONFIG_PWM_RCAR=m
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_PWM_SAMSUNG=y
+CONFIG_PWM_SL28CPLD=m
+CONFIG_PWM_SUN4I=m
+CONFIG_PWM_TEGRA=m
+CONFIG_SL28CPLD_INTC=y
+CONFIG_QCOM_PDC=y
+CONFIG_RESET_IMX7=y
+CONFIG_RESET_QCOM_AOSS=y
+CONFIG_RESET_QCOM_PDC=m
+CONFIG_RESET_TI_SCI=y
+CONFIG_PHY_XGENE=y
+CONFIG_PHY_SUN4I_USB=y
+CONFIG_PHY_MIXEL_MIPI_DPHY=m
+CONFIG_PHY_HI6220_USB=y
+CONFIG_PHY_HISTB_COMBPHY=y
+CONFIG_PHY_HISI_INNO_USB2=y
+CONFIG_PHY_MVEBU_CP110_COMPHY=y
+CONFIG_PHY_QCOM_QMP=m
+CONFIG_PHY_QCOM_QUSB2=m
+CONFIG_PHY_QCOM_USB_HS=y
+CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y
+CONFIG_PHY_RCAR_GEN3_PCIE=y
+CONFIG_PHY_RCAR_GEN3_USB2=y
+CONFIG_PHY_RCAR_GEN3_USB3=m
+CONFIG_PHY_ROCKCHIP_EMMC=y
+CONFIG_PHY_ROCKCHIP_INNO_HDMI=m
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_PCIE=m
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+CONFIG_PHY_UNIPHIER_USB2=y
+CONFIG_PHY_UNIPHIER_USB3=y
+CONFIG_PHY_TEGRA_XUSB=y
+CONFIG_ARM_SMMU_V3_PMU=m
+CONFIG_FSL_IMX8_DDR_PMU=m
+CONFIG_HISI_PMU=y
+CONFIG_QCOM_L2_PMU=y
+CONFIG_QCOM_L3_PMU=y
+CONFIG_NVMEM_IMX_OCOTP=y
+CONFIG_NVMEM_IMX_OCOTP_SCU=y
+CONFIG_QCOM_QFPROM=y
+CONFIG_ROCKCHIP_EFUSE=y
+CONFIG_NVMEM_SUNXI_SID=y
+CONFIG_UNIPHIER_EFUSE=y
+CONFIG_MESON_EFUSE=m
+CONFIG_FPGA=y
+CONFIG_FPGA_MGR_STRATIX10_SOC=m
+CONFIG_FPGA_BRIDGE=m
+CONFIG_ALTERA_FREEZE_BRIDGE=m
+CONFIG_FPGA_REGION=m
+CONFIG_OF_FPGA_REGION=m
+CONFIG_TEE=y
+CONFIG_OPTEE=y
+CONFIG_SLIMBUS=m
+CONFIG_SLIM_QCOM_CTRL=m
+CONFIG_SLIM_QCOM_NGD_CTRL=m
+CONFIG_MUX_MMIO=y
+CONFIG_INTERCONNECT=y
+CONFIG_INTERCONNECT_QCOM=y
+CONFIG_INTERCONNECT_QCOM_MSM8916=m
+CONFIG_INTERCONNECT_QCOM_SDM845=m
+CONFIG_INTERCONNECT_QCOM_SM8150=m
+CONFIG_INTERCONNECT_QCOM_SM8250=m
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_BTRFS_FS=m
+CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_FANOTIFY=y
+CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
+CONFIG_QUOTA=y
+CONFIG_AUTOFS4_FS=y
+CONFIG_FUSE_FS=m
+CONFIG_CUSE=m
+CONFIG_OVERLAY_FS=m
+CONFIG_VFAT_FS=y
+CONFIG_HUGETLBFS=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_EFIVAR_FS=y
+CONFIG_SQUASHFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFS_V4_2=y
+CONFIG_ROOT_NFS=y
+CONFIG_9P_FS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_SECURITY=y
+CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_USER_API_RNG=m
+CONFIG_CRYPTO_DEV_SUN8I_CE=m
+CONFIG_CRYPTO_DEV_FSL_CAAM=m
+CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=m
+CONFIG_CRYPTO_DEV_QCOM_RNG=m
+CONFIG_CRYPTO_DEV_CCREE=m
+CONFIG_CRYPTO_DEV_HISI_SEC2=m
+CONFIG_CRYPTO_DEV_HISI_ZIP=m
+CONFIG_CRYPTO_DEV_HISI_HPRE=m
+CONFIG_CMA_SIZE_MBYTES=32
+CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_INFO=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_FTRACE is not set
+CONFIG_MEMTEST=y
+CONFIG_KPROBES=y
+CONFIG_KRETPROBES=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
+# CONFIG_KPROBES_SANITY_TEST is not set
+
diff --git a/recipes-kernel/linux/linux-fslc/defconfig b/recipes-kernel/linux/linux-fslc/defconfig
index dbb2387c..127e38f2 100644
--- a/recipes-kernel/linux/linux-fslc/defconfig
+++ b/recipes-kernel/linux/linux-fslc/defconfig
@@ -15,20 +15,8 @@ CONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not set
CONFIG_ARCH_MULTI_V6=y
CONFIG_ARCH_MXC=y
-CONFIG_MACH_MX31LILLY=y
-CONFIG_MACH_MX31LITE=y
-CONFIG_MACH_PCM037=y
-CONFIG_MACH_PCM037_EET=y
-CONFIG_MACH_MX31_3DS=y
-CONFIG_MACH_MX31MOBOARD=y
-CONFIG_MACH_QONG=y
-CONFIG_MACH_ARMADILLO5X0=y
-CONFIG_MACH_KZM_ARM11_01=y
-CONFIG_MACH_IMX31_DT=y
-CONFIG_MACH_IMX35_DT=y
-CONFIG_MACH_PCM043=y
-CONFIG_MACH_MX35_3DS=y
-CONFIG_MACH_VPR200=y
+CONFIG_SOC_IMX31=y
+CONFIG_SOC_IMX35=y
CONFIG_SOC_IMX50=y
CONFIG_SOC_IMX51=y
CONFIG_SOC_IMX53=y
@@ -178,8 +166,13 @@ CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ADS7846=y
+CONFIG_TOUCHSCREEN_AD7879=y
+CONFIG_TOUCHSCREEN_AD7879_I2C=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=y
+CONFIG_TOUCHSCREEN_DA9052=y
CONFIG_TOUCHSCREEN_EGALAX=y
CONFIG_TOUCHSCREEN_GOODIX=y
+CONFIG_TOUCHSCREEN_ILI210X=y
CONFIG_TOUCHSCREEN_MAX11801=y
CONFIG_TOUCHSCREEN_IMX6UL_TSC=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
@@ -211,6 +204,10 @@ CONFIG_SPI=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_IMX=y
CONFIG_SPI_FSL_DSPI=y
+CONFIG_PINCTRL_IMX8MM=y
+CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
+CONFIG_PINCTRL_IMX8MQ=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_SIOX=m
CONFIG_GPIO_MAX732X=y
@@ -219,6 +216,7 @@ CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCF857X=y
CONFIG_GPIO_STMPE=y
CONFIG_GPIO_74X164=y
+CONFIG_GPIO_MXC=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_POWER_RESET_SYSCON_POWEROFF=y
@@ -235,6 +233,7 @@ CONFIG_DA9062_WATCHDOG=y
CONFIG_DA9063_WATCHDOG=m
CONFIG_RN5T618_WATCHDOG=y
CONFIG_IMX2_WDT=y
+CONFIG_IMX7ULP_WDT=y
CONFIG_MFD_DA9052_I2C=y
CONFIG_MFD_DA9062=y
CONFIG_MFD_DA9063=y
@@ -264,7 +263,6 @@ CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_MUX=y
-CONFIG_SOC_CAMERA=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CODA=m
CONFIG_VIDEO_IMX_PXP=y
@@ -279,6 +277,7 @@ CONFIG_DRM_MSM=y
CONFIG_DRM_PANEL_LVDS=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
+CONFIG_DRM_TI_TFP410=y
CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_IMX=y
@@ -320,6 +319,7 @@ CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=y
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
@@ -334,7 +334,7 @@ CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_MXS_PHY=y
CONFIG_USB_GADGET=y
CONFIG_USB_FSL_USB2=y
-CONFIG_USB_CONFIGFS=m
+CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_SERIAL=y
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_OBEX=y
@@ -386,6 +386,7 @@ CONFIG_RTC_DRV_DA9063=y
CONFIG_RTC_DRV_MC13XXX=y
CONFIG_RTC_DRV_MXC=y
CONFIG_RTC_DRV_MXC_V2=y
+CONFIG_RTC_DRV_RC5T619=y
CONFIG_RTC_DRV_SNVS=y
CONFIG_DMADEVICES=y
CONFIG_FSL_EDMA=y
@@ -396,9 +397,15 @@ CONFIG_STAGING=y
CONFIG_STAGING_MEDIA=y
CONFIG_VIDEO_IMX_MEDIA=y
CONFIG_COMMON_CLK_PWM=y
+CONFIG_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
+CONFIG_CLK_IMX8MQ=y
+CONFIG_SOC_IMX8M=y
CONFIG_IIO=y
CONFIG_MMA8452=y
CONFIG_IMX7D_ADC=y
+CONFIG_RN5T618_ADC=y
CONFIG_VF610_ADC=y
CONFIG_SENSORS_ISL29018=y
CONFIG_MAG3110=y
@@ -439,6 +446,8 @@ CONFIG_UBIFS_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFS_V4_2=y
CONFIG_ROOT_NFS=y
CONFIG_NLS_DEFAULT="cp437"
CONFIG_NLS_CODEPAGE_437=y
@@ -464,6 +473,9 @@ CONFIG_DEBUG_FS=y
CONFIG_PROVE_LOCKING=y
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FTRACE is not set
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FQ_CODEL=y
-CONFIG_NET_SCH_FIFO=y
+CONFIG_KPROBES=y
+CONFIG_OPTPROBES=y
+CONFIG_KRETPROBES=y
+# CONFIG_ARM_KPROBES_TEST is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
+
diff --git a/recipes-kernel/linux/linux-fslc/mx25/defconfig b/recipes-kernel/linux/linux-fslc/mx25/defconfig
index 2b2d617e..21672504 100644
--- a/recipes-kernel/linux/linux-fslc/mx25/defconfig
+++ b/recipes-kernel/linux/linux-fslc/mx25/defconfig
@@ -20,9 +20,9 @@ CONFIG_MACH_MX27ADS=y
CONFIG_MACH_MX27_3DS=y
CONFIG_MACH_IMX27_VISSTRIM_M10=y
CONFIG_MACH_PCA100=y
-CONFIG_MACH_IMX27_DT=y
CONFIG_SOC_IMX1=y
CONFIG_SOC_IMX25=y
+CONFIG_SOC_IMX27=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
@@ -32,8 +32,6 @@ CONFIG_KPROBES=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -95,6 +93,7 @@ CONFIG_SPI=y
CONFIG_SPI_IMX=y
CONFIG_SPI_SPIDEV=y
CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_MXC=y
CONFIG_W1=y
CONFIG_W1_MASTER_MXC=y
CONFIG_W1_SLAVE_THERM=y
@@ -112,7 +111,6 @@ CONFIG_REGULATOR_MC13892=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_SOC_CAMERA=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_CODA=y
CONFIG_FB=y
@@ -187,3 +185,9 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=m
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
+CONFIG_KPROBES=y
+CONFIG_OPTPROBES=y
+CONFIG_KRETPROBES=y
+# CONFIG_ARM_KPROBES_TEST is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
+
diff --git a/recipes-kernel/linux/linux-fslc/mxs/defconfig b/recipes-kernel/linux/linux-fslc/mxs/defconfig
index 2773899c..a913c0dd 100644
--- a/recipes-kernel/linux/linux-fslc/mxs/defconfig
+++ b/recipes-kernel/linux/linux-fslc/mxs/defconfig
@@ -25,8 +25,6 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_BLK_DEV_INTEGRITY=y
-# CONFIG_IOSCHED_DEADLINE is not set
-# CONFIG_IOSCHED_CFQ is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -174,3 +172,9 @@ CONFIG_PROVE_LOCKING=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_STRICT_DEVMEM=y
CONFIG_DEBUG_USER=y
+CONFIG_KPROBES=y
+CONFIG_OPTPROBES=y
+CONFIG_KRETPROBES=y
+# CONFIG_ARM_KPROBES_TEST is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
+
diff --git a/recipes-kernel/linux/linux-fslc_5.4.bb b/recipes-kernel/linux/linux-fslc_5.10.bb
index bc64263b..c3874feb 100644
--- a/recipes-kernel/linux/linux-fslc_5.4.bb
+++ b/recipes-kernel/linux/linux-fslc_5.10.bb
@@ -12,16 +12,16 @@ upstreaming."
include linux-fslc.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
# 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.46"
+LINUX_VERSION = "5.10.28"
-SRCBRANCH = "5.4.x+fslc"
-SRCREV = "38d6c3525e4f77a842ef2ce4196a4e2ce3a2ff69"
+KBRANCH = "5.10.x+fslc"
+SRCREV = "5261f1216599f5fe8d8d464b4be2bd832f8eca16"
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..4644295d 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"
+SRCBRANCH = "imx_5.4.70_2.3.0"
+LOCALVERSION = "-2.3.0"
SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466"
+SRCREV = "dea2fede7e024ee7029b13e8d82a00ec14427777"
S = "${WORKDIR}/git"
@@ -33,7 +33,6 @@ IMX_UAPI_HEADERS = " \
mxcfb.h \
pxp_device.h \
pxp_dma.h \
- version.h \
videodev2.h \
"
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..96d4df90 100644
--- a/recipes-kernel/linux/linux-imx.inc
+++ b/recipes-kernel/linux/linux-imx.inc
@@ -15,7 +15,7 @@ SRCBRANCH ?= ""
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx;protocol=https;branch=${SRCBRANCH} \
- file://defconfig \
+ file://defconfig \
"
S = "${WORKDIR}/git"
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..c6d83c3b 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
@@ -91,7 +99,11 @@ CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=y
CONFIG_PCI=y
CONFIG_PCI_MSI=y
-CONFIG_PCI_IMX6=y
+CONFIG_PCI_IMX6_HOST=y
+CONFIG_PCI_IMX6_EP=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
@@ -120,11 +132,13 @@ 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
CONFIG_SENSORS_FXOS8700=y
CONFIG_SENSORS_FXAS2100X=y
+CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=y
# CONFIG_SCSI_PROC_FS is not set
@@ -137,12 +151,16 @@ CONFIG_ATA=y
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_AHCI_IMX=y
CONFIG_PATA_IMX=y
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_BROADCOM is not set
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 +183,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 +465,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 +504,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 +557,22 @@ 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
+# meta-freescale change: Set CRYPTO_SHA1 to y to prevent kernel_configcheck warning
+#CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA1=y
CONFIG_CRC_CCITT=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC7=m
diff --git a/recipes-kernel/linux/linux-imx/mx8/defconfig b/recipes-kernel/linux/linux-imx/mx8/defconfig
index 469ee0ef..1de0c724 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
@@ -170,11 +179,16 @@ CONFIG_PCIE_ALTERA=y
CONFIG_PCIE_ALTERA_MSI=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
-CONFIG_PCI_IMX6=y
+CONFIG_PCI_IMX6_HOST=y
+CONFIG_PCI_IMX6_EP=y
CONFIG_PCI_LAYERSCAPE=y
CONFIG_PCI_HISI=y
CONFIG_PCIE_KIRIN=y
CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCI_ENDPOINT=y
+CONFIG_PCI_ENDPOINT_CONFIGFS=y
+CONFIG_PCI_EPF_TEST=y
+CONFIG_IMX_MIC_EPF=m
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_FW_LOADER_USER_HELPER=y
@@ -211,8 +225,16 @@ CONFIG_BLK_DEV_NVME=y
CONFIG_SENSORS_FXOS8700=y
CONFIG_SENSORS_FXAS2100X=y
CONFIG_SRAM=y
+CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_EEPROM_AT24=y
CONFIG_EEPROM_AT25=m
+CONFIG_SCIF_BUS=m
+CONFIG_VOP_BUS=m
+CONFIG_IMX_MIC_HOST=m
+CONFIG_IMX_MIC_CARD=m
+CONFIG_SCIF=m
+CONFIG_MIC_COSM=m
+CONFIG_VOP=m
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_SAS_ATA=y
@@ -234,6 +256,7 @@ CONFIG_PATA_OF_PLATFORM=y
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_BLK_DEV_DM=m
+CONFIG_DM_CRYPT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_NETDEVICES=y
@@ -252,7 +275,6 @@ CONFIG_FSL_SDK_DPAA_ETH=y
CONFIG_FSL_DPAA2_ETH=y
CONFIG_FSL_ENETC=y
CONFIG_FSL_ENETC_VF=y
-CONFIG_FSL_ENETC_MDIO=y
CONFIG_HIX5HD2_GMAC=y
CONFIG_HNS_DSAF=y
CONFIG_HNS_ENET=y
@@ -272,7 +294,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 +322,11 @@ 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_XEN_NETDEV_BACKEND=m
+CONFIG_IVSHMEM_NET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_ADC=m
CONFIG_KEYBOARD_GPIO=y
@@ -311,6 +335,7 @@ CONFIG_KEYBOARD_IMX_SC_PWRKEY=y
CONFIG_KEYBOARD_CROS_EC=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ATMEL_MXT=m
+CONFIG_TOUCHSCREEN_GOODIX=m
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_MPL3115=y
@@ -351,6 +376,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 +395,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 +439,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
@@ -438,7 +468,19 @@ CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_VCTRL=m
CONFIG_RC_CORE=m
CONFIG_RC_DECODERS=y
+CONFIG_IR_NEC_DECODER=m
+CONFIG_IR_RC5_DECODER=m
+CONFIG_IR_RC6_DECODER=m
+CONFIG_IR_JVC_DECODER=m
+CONFIG_IR_SONY_DECODER=m
+CONFIG_IR_SANYO_DECODER=m
+CONFIG_IR_SHARP_DECODER=m
+CONFIG_IR_MCE_KBD_DECODER=m
+CONFIG_IR_XMP_DECODER=m
+CONFIG_IR_IMON_DECODER=m
+CONFIG_IR_RCMM_DECODER=m
CONFIG_RC_DEVICES=y
+CONFIG_IR_GPIO_CIR=m
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
@@ -458,6 +500,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,20 +508,30 @@ 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_PANEL_WKS_101WX001=y
+CONFIG_DRM_FSL_IMX_LVDS_BRIDGE=y
+CONFIG_DRM_NXP_SEIKO_43WVFIG=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
CONFIG_DRM_IMX_DCSS=y
+CONFIG_DRM_IMX_CDNS_MHDP=y
CONFIG_DRM_ETNAVIV=m
CONFIG_DRM_HISI_HIBMC=m
CONFIG_DRM_HISI_KIRIN=m
@@ -499,7 +552,6 @@ CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=y
-CONFIG_SND_SOC_FSL_DAI=m
CONFIG_SND_SOC_FSL_EASRC=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_IMX_AK4458=y
@@ -516,12 +568,15 @@ 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_IMX_PCM512X=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
@@ -544,6 +599,7 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_HCD_TEST_MODE=y
CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=y
+CONFIG_USB_UAS=y
CONFIG_USB_CDNS3=y
CONFIG_USB_CDNS3_GADGET=y
CONFIG_USB_CDNS3_HOST=y
@@ -554,8 +610,13 @@ 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_EHSET_TEST_FIXTURE=y
CONFIG_USB_HSIC_USB3503=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_MXS_PHY=y
@@ -619,6 +680,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 +708,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
@@ -657,6 +720,7 @@ CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_STAGING=y
CONFIG_STAGING_MEDIA=y
CONFIG_VIDEO_IMX_CAPTURE=y
+CONFIG_IMX8_MEDIA_DEVICE=m
CONFIG_ION=y
CONFIG_ION_SYSTEM_HEAP=y
CONFIG_ION_CMA_HEAP=y
@@ -680,6 +744,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 +754,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 +774,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
@@ -757,12 +828,14 @@ CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_CHACHA20POLY1305=m
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_TLS=m
-CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_CFB=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_OFB=m
+CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_XTS=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_RMD128=m
@@ -770,19 +843,27 @@ CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_RMD256=m
CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_STREEBOG=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_ANSI_CPRNG=y
+CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
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_INDIRECT_PIO=y
CONFIG_CMA_SIZE_MBYTES=320
@@ -795,3 +876,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..1997388c 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.70_2.3.0"
+LOCALVERSION = "-2.3.0"
+SRCREV = "4f2631b022d843c1f2a5d34eae2fd98927a1a6c7"
# 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.70"
DEFAULT_PREFERENCE = "1"
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-Make-perf-able-to-build-with-latest-libbfd.patch b/recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch
deleted file mode 100644
index e3df8084..00000000
--- a/recipes-kernel/linux/linux-qoriq/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-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..54fd700c 100644
--- a/recipes-kernel/linux/linux-qoriq_5.4.bb
+++ b/recipes-kernel/linux/linux-qoriq_5.4.bb
@@ -1,11 +1,14 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-LINUX_VERSION = "5.4.3"
+LINUX_VERSION = "5.4.47"
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;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"
+SRCREV = "6bff40d413b394c2d742e7a42089bfc62aef0a9b"
require recipes-kernel/linux/linux-qoriq.inc
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/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.3.imx.bb
index 59aeca11..6925611a 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.imx.bb
@@ -3,9 +3,7 @@ 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"
@@ -13,20 +11,20 @@ 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"
+SRCBRANCH = "MM_04.05.07_2011_L5.4.70"
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 = "cf7f2d0125424ce0d63ddc7f1eadc9ef71d10db1"
S = "${WORKDIR}/git"
@@ -38,12 +36,15 @@ DEPENDS += "gstreamer1.0-plugins-base"
inherit gobject-introspection
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}"
+PACKAGECONFIG_GL_imxpxp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
+
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
+ ${PACKAGECONFIG_GL} \
bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \
ttml uvch264 webp \
"
@@ -65,6 +66,7 @@ PACKAGECONFIG[hls] = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabl
# to -base yet. They depend on the gstgl library in -base, so we do
# not add GL dependencies here, since these are taken care of in -base.
PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled,"
+PACKAGECONFIG[gles2] = ",,virtual/libgles2"
PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm"
PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms"
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.2.imx.bb
index ae372729..db0b740f 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bb
@@ -5,8 +5,8 @@ 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"
+SRCBRANCH = "MM_04.05.06_2008_L5.4.47"
+SRCREV = "3c4aa2a58576d68f6e684efa58609665679c9969"
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,7 @@ 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-meson-viv-fb-code-must-link-against-libg2d.patch \
"
S = "${WORKDIR}/git"
@@ -41,7 +42,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 +71,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.3.imx.bb
index 6134789d..8413bf10 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.3.imx.bb
@@ -2,12 +2,12 @@ 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"
+SRCBRANCH = "MM_04.05.07_2011_L5.4.70"
SRC_URI = " \
${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \
"
-SRCREV = "3bcc85705695ee629ac3fb687411bb196d231918"
+SRCREV = "6005e8199ea19878f269b058ffbbbcaa314472d8"
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb
index f344db2d..8bbc16c8 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
# 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"
+SRCBRANCH = "MM_04.05.06_2008_L5.4.47"
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 = "8514bc61ccab208a65e387eab9347276a8e770e7"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb
index 4e244715..c8bb6cd8 100644
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.7.bb
@@ -1,5 +1,5 @@
# Copyright (C) 2014,2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
+# Copyright 2017-2019 NXP
# Copyright (C) 2012-2015 O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)
@@ -20,11 +20,12 @@ 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.07_2011_L5.4.70"
-SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}"
-SRCREV = "190b80c50aa06d2fe32423f6e36d76374bb530b2"
+SRC_URI = " \
+ git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \
+"
+SRCREV = "659ec4947d6b1903d26e4ec9e40ae251a659935d"
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.7.bb
index e41469f3..76a52f26 100644
--- a/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb
+++ b/recipes-multimedia/imx-codec/imx-codec_4.5.7.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=cf3f9b8d09bc3926b1004ea71f7a248a"
# 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] = "4d6ab45675c4010502a9bf2c16ee4705"
+SRC_URI[sha256sum] = "637d6109e6d6105f36f0fbb4f1d2267d487e1326591f7a26cd078c35b8373e55"
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.7.bb
index ee0243dd..0a3bb6a2 100644
--- a/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb
+++ b/recipes-multimedia/imx-parser/imx-parser_4.5.7.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=cf3f9b8d09bc3926b1004ea71f7a248a"
# 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] = "dd34e4e2d1384af27d370964ebbd05fd"
+SRC_URI[sha256sum] = "033bdfdd4b611a4e9993519637c9b0f195daca9e12f614daff5d4dec90478fcf"
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.7.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.7.bb
new file mode 100644
index 00000000..2b028235
--- /dev/null
+++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.7.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.07_2011_L5.4.70"
+SRCREV = "ccaf10a0dae7c0d7d204bd64282598bc0e3bd661"
+
+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.1.0.bb
index 9a4497d8..f6b4baae 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.1.0.bb
@@ -8,7 +8,7 @@ DEPENDS = "virtual/imxvpu libimxdmabuffer"
PV .= "+git${SRCPV}"
SRCBRANCH ?= "master"
-SRCREV = "9a5e84af53e6765c4f0ea299df264a4e32a13ea7"
+SRCREV = "49cb1b34d759aa7a51269ca0f58fcc1f9647da5b"
SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
@@ -18,6 +18,7 @@ inherit waf pkgconfig use-imx-headers
IMX_PLATFORM_mx6 = "imx6"
IMX_PLATFORM_mx8mq = "imx8m"
IMX_PLATFORM_mx8mm = "imx8mm"
+IMX_PLATFORM_mx8mp = "imx8mm"
EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}"
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
index 019f9ba4..57c28741 100644
--- a/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
+++ b/recipes-multimedia/pulseaudio/pulseaudio/imx/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
@@ -1,4 +1,4 @@
-From 015e048d3662b9f82e9aa5cd04d7c9de4eadb68d Mon Sep 17 00:00:00 2001
+From 33022867d76c91fe4e60699c1b7ebbc8feb4ee93 Mon Sep 17 00:00:00 2001
From: Shengjiu Wang <shengjiu.wang@freescale.com>
Date: Mon, 30 Mar 2015 10:26:14 +0800
Subject: [PATCH] pulseaudio: remove the control for speaker/headphone widget
@@ -12,15 +12,15 @@ Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
---
- .../alsa/mixer/paths/analog-output-headphones.conf | 8 ++++----
- .../alsa/mixer/paths/analog-output-speaker.conf | 8 ++++----
+ .../alsa/mixer/paths/analog-output-headphones.conf | 8 ++++----
+ src/modules/alsa/mixer/paths/analog-output-speaker.conf | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
-index b6ee70b..a617976 100644
+index 88907f0..7598d2f 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
-@@ -81,8 +81,8 @@ override-map.2 = all-left,all-right
+@@ -88,8 +88,8 @@ override-map.2 = all-left,all-right
[Element Headphone]
required-any = any
@@ -31,7 +31,7 @@ index b6ee70b..a617976 100644
override-map.1 = all
override-map.2 = all-left,all-right
-@@ -105,8 +105,8 @@ switch = mute
+@@ -119,8 +119,8 @@ switch = mute
volume = zero
[Element Speaker]
@@ -43,10 +43,10 @@ index b6ee70b..a617976 100644
[Element Desktop Speaker]
switch = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
-index 39193dd..34bbb85 100644
+index fcf2f5c..6f6f898 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
-@@ -73,8 +73,8 @@ volume = off
+@@ -91,8 +91,8 @@ volume = off
; This profile path is intended to control the speaker, let's mute headphones
; else there will be a spike when plugging in headphones
[Element Headphone]
@@ -55,9 +55,9 @@ index 39193dd..34bbb85 100644
+switch = on
+volume = ignore
- [Element Headphone2]
+ [Element Headphone,1]
switch = off
-@@ -93,8 +93,8 @@ override-map.2 = all-left,all-right
+@@ -115,8 +115,8 @@ override-map.2 = all-left,all-right
[Element Speaker]
required-any = any
@@ -69,5 +69,5 @@ index 39193dd..34bbb85 100644
override-map.2 = all-left,all-right
--
-1.7.9.5
+2.20.1
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
deleted file mode 100644
index 86c360f2..00000000
--- a/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6a600c5637c5446ab3d11eb4304a1dd473ec503e 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
-
-Some build systems set CFLAGS in environment before the build, but they
-got overridden by CFLAGS immediate assignment operator.
-
-Replace immediate assignment with append directive and use override
-directive, so the former definition of CFLAGS gets passed either from
-command line or via environment is completely expanded (see [1] for
-detailed explanation of override directive and variable append).
-
-Link: [1] https://www.gnu.org/software/make/manual/html_node/Override-Directive.html
-
-Upstream-Status: Backport [https://github.com/OP-TEE/optee_client/pull/211]
-
-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(-)
-
-diff --git a/flags.mk b/flags.mk
-index 71f3d18..faabef9 100644
---- a/flags.mk
-+++ b/flags.mk
-@@ -6,7 +6,7 @@ CROSS_COMPILE ?= arm-linux-gnueabihf-
- CC ?= $(CROSS_COMPILE)gcc
- AR ?= $(CROSS_COMPILE)ar
-
--CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
-+override CFLAGS += -Wall -Wbad-function-cast -Wcast-align \
- -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 \
- -Wswitch-default -Wunsafe-loop-optimizations \
- -Wwrite-strings -Werror
--CFLAGS += -c -fPIC
-+override CFLAGS += -c -fPIC
-
- DEBUG ?= 0
- ifeq ($(DEBUG), 1)
--CFLAGS += -DDEBUG -O0 -g
-+override CFLAGS += -DDEBUG -O0 -g
- endif
-
- RM := rm -f
---
-2.17.1
-
diff --git a/recipes-security/optee-imx/optee-client_3.2.0.imx.bb b/recipes-security/optee-imx/optee-client_3.10.0.imx.bb
index 19770849..58b6b8a4 100644
--- a/recipes-security/optee-imx/optee-client_3.2.0.imx.bb
+++ b/recipes-security/optee-imx/optee-client_3.10.0.imx.bb
@@ -1,41 +1,41 @@
-# Copyright (C) 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
SUMMARY = "OPTEE Client libs"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
-inherit python3native systemd
+SRCBRANCH = "imx_5.4.70_2.3.0"
+SRC_URI = " \
+ git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \
+ file://tee-supplicant.service \
+"
-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}"
+SRCREV = "2a77cf88d956c34cb4a1c191bea6113e327f5fe0"
-SRCREV = "71a9bef78fff2d5d4db8a2307d3b91e2aa671dc9"
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
-SRC_URI += "file://tee-supplicant.service \
- file://0001-flags-do-not-override-CFLAGS-from-host.patch \
-"
+inherit python3native systemd
-S = "${WORKDIR}/git"
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
deleted file mode 100644
index 509c7fb6..00000000
--- a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-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 aa101be8..4123d85d 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.
-@@ -88,7 +101,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
-@@ -117,14 +130,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)
-@@ -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_
- 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)))))
-diff --git a/core/core.mk b/core/core.mk
-index c05815f3..68f45552 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 1f2c5990..c53a23b1 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)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \
-+libgcc$(sm) := $(shell $(CC$(sm)) $(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 fa0bddfe..ae70ef87 100644
---- a/ta/mk/ta_dev_kit.mk
-+++ b/ta/mk/ta_dev_kit.mk
-@@ -78,6 +78,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)/mk/subdir.mk
-
-diff --git a/ta/ta.mk b/ta/ta.mk
-index 32353de3..9c64319d 100644
---- a/ta/ta.mk
-+++ b/ta/ta.mk
-@@ -98,6 +98,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-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.10.0.imx.bb b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
new file mode 100644
index 00000000..712b1aa6
--- /dev/null
+++ b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
@@ -0,0 +1,94 @@
+# Copyright (C) 2017-2020 NXP
+
+SUMMARY = "OPTEE OS"
+DESCRIPTION = "OPTEE OS"
+HOMEPAGE = "http://www.optee.org/"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
+
+DEPENDS = "python3-pycryptodomex-native python3-pyelftools-native u-boot-mkimage-native"
+
+SRCBRANCH = "imx_5.4.70_2.3.0"
+
+SRC_URI = "\
+ git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \
+"
+
+SRCREV = "a991c90475bb1c715651e5fe27f7f32cbe61aef9"
+
+S = "${WORKDIR}/git"
+
+inherit deploy python3native autotools
+
+# The platform flavor corresponds to the Yocto machine without the leading 'i'.
+PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
+PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd"
+PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk"
+PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk"
+PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk"
+PLATFORM_FLAVOR_imx6ulz-14x14-evk = "mx6ulzevk"
+PLATFORM_FLAVOR_mx8mq = "mx8mqevk"
+PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
+PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
+PLATFORM_FLAVOR_mx8mp = "mx8mpevk"
+PLATFORM_FLAVOR_mx8qm = "mx8qmmek"
+PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
+PLATFORM_FLAVOR_mx8dx = "mx8dxmek"
+PLATFORM_FLAVOR_mx8dxl = "mx8dxlevk"
+
+OPTEE_ARCH ?= "arm32"
+OPTEE_ARCH_armv7a = "arm32"
+OPTEE_ARCH_aarch64 = "arm64"
+
+# Optee-os can be built for 32 bits and 64 bits at the same time
+# as long as the compilers are correctly defined.
+# 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} \
+ CFG_TEE_TA_LOG_LEVEL=0 \
+ CFG_TEE_CORE_LOG_LEVEL=0 \
+ -C ${S} O=${B}\
+"
+
+LDFLAGS = ""
+CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
+CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
+
+do_deploy () {
+ install -d ${DEPLOYDIR}
+ ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
+ ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
+
+ if [ "${OPTEE_ARCH}" != "arm64" ]; then
+ IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'`
+ uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
+ -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
+ fi
+}
+
+do_install () {
+ install -d ${D}${nonarch_base_libdir}/firmware/
+ install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
+
+ # Install the TA devkit
+ install -d ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
+
+ for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
+ cp -aR $f ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
+ done
+}
+
+addtask deploy after do_compile before do_install
+
+
+FILES_${PN} = "${nonarch_base_libdir}/firmware/"
+FILES_${PN}-staticdev = "/usr/include/optee/"
+RDEPENDS_${PN}-dev += "${PN}-staticdev"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(imx|imx-boot-container)"
diff --git a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb b/recipes-security/optee-imx/optee-os_3.2.0.imx.bb
deleted file mode 100644
index d2c82940..00000000
--- a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright (C) 2017-2018 NXP
-
-SUMMARY = "OPTEE OS"
-DESCRIPTION = "OPTEE OS"
-HOMEPAGE = "http://www.optee.org/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
-
-inherit deploy python3native autotools
-DEPENDS = "python3-pycrypto-native u-boot-mkimage-native"
-
-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 \
- file://0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch \
-"
-
-SRCREV = "6d99b525af752ecdaabdca6098b2564b2665f2b2"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
-
-# The platform flavor corresponds to the Yocto machine without the leading 'i'.
-PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
-PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd"
-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"
-
-OPTEE_ARCH ?= "arm32"
-OPTEE_ARCH_armv7a = "arm32"
-OPTEE_ARCH_aarch64 = "arm64"
-
-# Optee-os can be built for 32 bits and 64 bits at the same time
-# as long as the compilers are correctly defined.
-# 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} \
- "
-
-
-do_compile () {
- unset LDFLAGS
- export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
- oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0
-}
-
-
-do_deploy () {
- install -d ${DEPLOYDIR}
- ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
-
- if [ "${OPTEE_ARCH}" != "arm64" ]; then
- IMX_LOAD_ADDR=`cat ${B}/core/tee-init_load_addr.txt` && \
- uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
- -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
- fi
-
- cd ${DEPLOYDIR}
- ln -sf tee.${PLATFORM_FLAVOR}.bin tee.bin
- cd -
-}
-
-do_install () {
- install -d ${D}${nonarch_base_libdir}/firmware/
- install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
-
- # Install the TA devkit
- install -d ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
-
- for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
- cp -aR $f ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
- done
-}
-
-addtask deploy after do_compile before do_install
-
-
-FILES_${PN} = "${nonarch_base_libdir}/firmware/"
-FILES_${PN}-staticdev = "/usr/include/optee/"
-RDEPENDS_${PN}-dev += "${PN}-staticdev"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(imx)"
diff --git a/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch b/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch
deleted file mode 100644
index 20f190af..00000000
--- a/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001
-From: Scott Branden <scott.branden@broadcom.com>
-Date: Fri, 27 Dec 2019 12:54:28 -0800
-Subject: [PATCH] use python3 instead of python
-
-use python3 instead of python as python2 is EOL January 2020.
-
-Signed-off-by: Scott Branden <scott.branden@broadcom.com>
-Reviewed-by: Jerome Forissier <jerome@forissier.org>
-Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, CFG_GCM_NIST_VECTORS=y)
-Upstream-Status: Backport from v3.8.0
----
- scripts/file_to_c.py | 4 ++--
- scripts/rsp_to_gcm_test.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py
-index ae16f52..b4ce2a2 100755
---- a/scripts/file_to_c.py
-+++ b/scripts/file_to_c.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2018, Linaro Limited
-@@ -29,7 +29,7 @@ def main():
-
- f.write("const uint8_t " + args.name + "[] = {\n")
- i = 0
-- for x in array.array("B", inf.read()):
-+ for x in array.array("B", map(ord, (inf.read()))):
- f.write("0x" + '{0:02x}'.format(x) + ",")
- i = i + 1
- if i % 8 == 0:
-diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py
-index 0543541..e4418be 100755
---- a/scripts/rsp_to_gcm_test.py
-+++ b/scripts/rsp_to_gcm_test.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- modes = {'encrypt': 0, 'decrypt': 1}
-
---
-2.7.4
-
diff --git a/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch b/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch
deleted file mode 100644
index d32a8eb7..00000000
--- a/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dc8cd1c43edeedb9f7335020537c4ffdddd683f8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
-Date: Thu, 7 Feb 2019 01:26:53 +0000
-Subject: [PATCH 1/3] sock_server: fix compilation against musl (sys/errno.h)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Compiling against musl-libc fails with the following error:
-
-| In file included from .../host/xtest/sock_server.c:24:
-| .../usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Werror=cpp]
-| #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
-| ^~~~~~~
-
-Just remove the needless include.
-
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
----
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Upstream-Status: Backport [3.5.0]
- host/xtest/sock_server.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/host/xtest/sock_server.c b/host/xtest/sock_server.c
-index 0d2ff06..1ba73d6 100644
---- a/host/xtest/sock_server.c
-+++ b/host/xtest/sock_server.c
-@@ -21,7 +21,6 @@
- #include <netdb.h>
- #include <netinet/in.h>
- #include <poll.h>
--#include <sys/errno.h>
- #include <sys/socket.h>
- #include <unistd.h>
-
---
-2.23.0.rc1
-
diff --git a/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch b/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch
deleted file mode 100644
index ed45df60..00000000
--- a/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 1401b89684ee81bf0b3d3dea06e2926b24ba3f97 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
-Date: Thu, 7 Feb 2019 01:29:08 +0000
-Subject: [PATCH 2/3] build: ignore declaration-after-statement warnings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-| Makefile:37: recipe for target 'xtest' failed
-| make: *** [xtest] Error 2
-| make: *** Waiting for unfinished jobs....
-| arith_taf.c: In function 'get_handle':
-| arith_taf.c:56:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| int h = handle_get(&hdb, ptr);
-| ^~~
-| arith_taf.c: In function 'ta_entry_arith_new_var':
-| arith_taf.c:82:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| size_t len = TEE_BigIntSizeInU32(params[0].value.a);
-| ^~~~~~
-| arith_taf.c: In function 'ta_entry_arith_new_fmm_var':
-| arith_taf.c:129:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| size_t len = TEE_BigIntFMMSizeInU32(params[0].value.a);
-| ^~~~~~
-| arith_taf.c: In function 'ta_entry_arith_free_handle':
-| arith_taf.c:150:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| void *ptr = put_handle(params[0].value.a & ~HT_MASK);
-| ^~~~
-| arith_taf.c: In function 'ta_entry_arith_from_octet_string':
-| arith_taf.c:165:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| TEE_BigInt *big_int = lookup_handle(HT_BIGINT, params[0].value.a);
-| ^~~~~~~~~~
-| arith_taf.c: In function 'ta_entry_arith_from_s32':
-| arith_taf.c:181:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
-| TEE_BigInt *big_int = lookup_handle(HT_BIGINT, params[0].value.a);
-| ^~~~~~~~~~
-
-etc.
-
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
----
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Upstream-Status: Backport [3.5.0]
- host/xtest/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/host/xtest/Makefile b/host/xtest/Makefile
-index f4291e0..e97e555 100644
---- a/host/xtest/Makefile
-+++ b/host/xtest/Makefile
-@@ -154,6 +154,7 @@ CFLAGS += -Wall -Wcast-align -Werror \
- -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
- -Wshadow -Wstrict-prototypes -Wswitch-default \
- -Wwrite-strings \
-+ -Wno-declaration-after-statement \
- -Wno-missing-field-initializers -Wno-format-zero-length
- endif
-
---
-2.23.0.rc1
-
diff --git a/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch b/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch
deleted file mode 100644
index 58734aa4..00000000
--- a/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From f74e9f339a8e8cb97fc8ea03bef51d7e3862a60a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
-Date: Thu, 7 Feb 2019 01:31:27 +0000
-Subject: [PATCH 3/3] benchmark_1000: fix compilation against musl (uint)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Compiling against musl-libc fails with the following error:
-
-| .../host/xtest/benchmark_1000.c: In function 'show_test_result':
-| .../host/xtest/benchmark_1000.c:102:2: error: unknown type name 'uint'; did you mean 'int'?
-| uint i;
-| ^~~~
-| int
-| ...host/xtest/benchmark_1000.c:108:16: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'unsigned int'} [-Werror=sign-compare]
-| for (i = 0; i < size; i++) {
-| ^
-
-etc.
-
-Convert to using more standard size_t
-
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
----
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Upstream-Status: Backport [3.5.0]
- host/xtest/benchmark_1000.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/host/xtest/benchmark_1000.c b/host/xtest/benchmark_1000.c
-index bf92fa0..1caf420 100644
---- a/host/xtest/benchmark_1000.c
-+++ b/host/xtest/benchmark_1000.c
-@@ -99,7 +99,7 @@ static TEEC_Result run_chunk_access_test(enum storage_benchmark_cmd cmd,
-
- static void show_test_result(struct test_record records[], size_t size)
- {
-- uint i;
-+ size_t i;
-
- printf("-----------------+---------------+----------------\n");
- printf(" Data Size (B) \t | Time (s)\t | Speed (kB/s)\t \n");
-@@ -119,7 +119,7 @@ static void chunk_test(ADBG_Case_t *c, enum storage_benchmark_cmd cmd)
- {
- uint32_t chunk_size = DEFAULT_CHUNK_SIZE;
- struct test_record records[ARRAY_SIZE(data_size_table) - 1];
-- uint i;
-+ size_t i;
-
- for (i = 0; data_size_table[i]; i++) {
- ADBG_EXPECT_TEEC_SUCCESS(c,
---
-2.23.0.rc1
-
diff --git a/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch b/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch
deleted file mode 100644
index 1a5c4044..00000000
--- a/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 7d566ed585d1e13f444d48fde5705b5be54de4af Mon Sep 17 00:00:00 2001
-From: Ricardo Salveti <ricardo@foundries.io>
-Date: Wed, 26 Jun 2019 17:32:11 -0300
-Subject: [PATCH] regression_8100: use null terminated strings with file_to_c
-
-GCC 9 is more strict with string manipulation, causing the build to
-fail as the string data converted via file_to_c is not null terminated,
-as described by the following build error:
-
-regression_8100.c:100:29: error: '%*s' directive argument is not a
-nul-terminated string [-Werror=format-overflow=]
-tlen = myasprintf(&trust, "%*s", (int)sizeof(regression_8100_ca_crt),
- ^~~
- regression_8100_ca_crt);
- ~~~~~~~~~~~~~~~~~~~~~~
-
-Change file_to_c to terminate the string after conversion and update the
-string size to remove the null terminated byte. Also update
-regression_8100 to use the size variable defined via file_to_c instead
-of manually calling sizeof.
-
-Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
-Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
----
-Signed-off-by: André Draszik <andre.draszik@jci.com>
-Upstream-Status: Backport [3.6.0]
- host/xtest/regression_8100.c | 10 +++++-----
- scripts/file_to_c.py | 4 ++--
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/host/xtest/regression_8100.c b/host/xtest/regression_8100.c
-index 04d62d9..13780e1 100644
---- a/host/xtest/regression_8100.c
-+++ b/host/xtest/regression_8100.c
-@@ -91,13 +91,13 @@ static void test_8102(ADBG_Case_t *c)
- return;
-
- clen = myasprintf(&chain, "%*s\n%*s",
-- (int)sizeof(regression_8100_my_crt),
-+ (int)regression_8100_my_crt_size,
- regression_8100_my_crt,
-- (int)sizeof(regression_8100_mid_crt),
-+ (int)regression_8100_mid_crt_size,
- regression_8100_mid_crt);
- if (!ADBG_EXPECT_COMPARE_SIGNED(c, clen, !=, -1))
- goto out;
-- tlen = myasprintf(&trust, "%*s", (int)sizeof(regression_8100_ca_crt),
-+ tlen = myasprintf(&trust, "%*s", (int)regression_8100_ca_crt_size,
- regression_8100_ca_crt);
- if (!ADBG_EXPECT_COMPARE_SIGNED(c, tlen, !=, -1))
- goto out;
-@@ -282,7 +282,7 @@ static void test_8103(ADBG_Case_t *c)
- NULL, &ret_orig)))
- return;
-
-- clen = myasprintf(&csr, "%*s", (int)sizeof(regression_8100_my_csr),
-+ clen = myasprintf(&csr, "%*s", (int)regression_8100_my_csr_size,
- regression_8100_my_csr);
- if (!ADBG_EXPECT_COMPARE_SIGNED(c, clen, >=, 0))
- goto out;
-@@ -300,7 +300,7 @@ static void test_8103(ADBG_Case_t *c)
- if (!ADBG_EXPECT_TEEC_SUCCESS(c, res))
- goto out;
-
-- myasprintf(&ca, "%*s", (int)sizeof(regression_8100_ca_crt),
-+ myasprintf(&ca, "%*s", (int)regression_8100_ca_crt_size,
- regression_8100_ca_crt);
- if (!ADBG_EXPECT_NOT_NULL(c, ca))
- goto out;
-diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py
-index 83a9832..ae16f52 100755
---- a/scripts/file_to_c.py
-+++ b/scripts/file_to_c.py
-@@ -37,9 +37,9 @@ def main():
- else:
- f.write(" ")
-
-- f.write("};\n")
-+ f.write("'\\0'};\n")
- f.write("const size_t " + args.name + "_size = sizeof(" +
-- args.name + ");\n")
-+ args.name + ") - 1;\n")
-
- f.close()
- inf.close()
---
-2.23.0.rc1
-
diff --git a/recipes-security/optee-imx/optee-test_3.10.0.imx.bb b/recipes-security/optee-imx/optee-test_3.10.0.imx.bb
new file mode 100644
index 00000000..a8a1b245
--- /dev/null
+++ b/recipes-security/optee-imx/optee-test_3.10.0.imx.bb
@@ -0,0 +1,63 @@
+# Copyright (C) 2017-2020 NXP
+
+SUMMARY = "OPTEE test"
+HOMEPAGE = "http://www.optee.org/"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
+
+DEPENDS = "python3-pycrypto-native python3-pycryptodomex-native optee-os optee-client openssl"
+
+SRCBRANCH = "imx_5.4.70_2.3.0"
+
+SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+SRCREV = "0c998f42a3fb87b9f2929955cf4b0116cc515091"
+
+inherit python3native
+
+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/"
+
+CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
+CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
+
+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-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/optee-client-qoriq.bb b/recipes-security/optee/optee-client-qoriq.bb
deleted file mode 100644
index af5fc095..00000000
--- a/recipes-security/optee/optee-client-qoriq.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "OPTEE Client"
-HOMEPAGE = "https://github.com/qoriq-open-source/optee_client"
-
-LICENSE = "BSD"
-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 \
-"
-S = "${WORKDIR}/git"
-
-SRCREV = "08428734c67fb559e420d87fa52fd74a955ea1bd"
-
-EXTRA_OEMAKE = "ARCH=arm64"
-
-do_install() {
- oe_runmake install
-
- install -D -p -m0755 ${S}/out/export/bin/tee-supplicant ${D}${bindir}/tee-supplicant
-
- install -D -p -m0644 ${S}/out/export/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
-
- cp -a ${S}/out/export/include ${D}/usr/
-}
-
-COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch b/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch
deleted file mode 100644
index f58590c3..00000000
--- a/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 05f741c1e6263bec2977901abe61463b7f8175ad Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Fri, 22 Jun 2018 11:58:09 +0800
-Subject: [PATCH] GCC 8 format-truncation error
-
-Signed-off-by: BJ DevOps Team <bjdevops@NXP1.onmicrosoft.com>
----
- libteec/src/teec_trace.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libteec/src/teec_trace.c b/libteec/src/teec_trace.c
-index 78b79d6..7901deb 100644
---- a/libteec/src/teec_trace.c
-+++ b/libteec/src/teec_trace.c
-@@ -73,7 +73,7 @@ int _dprintf(const char *function, int flen, int line, int level,
- const char *prefix, const char *fmt, ...)
- {
- char raw[MAX_PRINT_SIZE];
-- char prefixed[MAX_PRINT_SIZE];
-+ char prefixed[MAX_PRINT_SIZE + 10];
- char *to_print = NULL;
- const char *func;
- int err;
-@@ -106,7 +106,7 @@ int _dprintf(const char *function, int flen, int line, int level,
- */
- int thread_id = syscall(SYS_gettid); /* perf issue ? */
-
-- snprintf(prefixed, MAX_PRINT_SIZE,
-+ snprintf(prefixed, MAX_PRINT_SIZE + 10,
- "%s [%d] %s:%s:%d: %s",
- trace_level_strings[level], thread_id, prefix, func,
- line, raw);
---
-1.8.3.1
-
diff --git a/recipes-security/optee/optee-client-qoriq/0001-flags-CFLAGS-add-Wno-cpp.patch b/recipes-security/optee/optee-client-qoriq/0001-flags-CFLAGS-add-Wno-cpp.patch
deleted file mode 100644
index 09e4490d..00000000
--- a/recipes-security/optee/optee-client-qoriq/0001-flags-CFLAGS-add-Wno-cpp.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f2ebda1d85b10fd008c21974a0f7aa4e805d0e5c Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Tue, 11 Sep 2018 11:40:55 +0800
-Subject: [PATCH] flags: CFLAGS add -Wno-cpp
-
-*fix build with FORTIFY_SOURCES
-
-Signed-off-by: BJ DevOps Team <bjdevops@NXP1.onmicrosoft.com>
----
- flags.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/flags.mk b/flags.mk
-index 71f3d18..43c18f0 100644
---- a/flags.mk
-+++ b/flags.mk
-@@ -14,7 +14,7 @@ CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
- -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs \
- -Wpointer-arith -Wshadow -Wstrict-prototypes \
- -Wswitch-default -Wunsafe-loop-optimizations \
-- -Wwrite-strings -Werror
-+ -Wwrite-strings -Werror -Wno-cpp
- CFLAGS += -c -fPIC
-
- DEBUG ?= 0
---
-2.7.4
-
diff --git a/recipes-security/optee/optee-client-qoriq_3.8.0.bb b/recipes-security/optee/optee-client-qoriq_3.8.0.bb
new file mode 100644
index 00000000..0cd9eeab
--- /dev/null
+++ b/recipes-security/optee/optee-client-qoriq_3.8.0.bb
@@ -0,0 +1,28 @@
+SUMMARY = "OPTEE Client"
+HOMEPAGE = "https://github.com/OP-TEE/optee_client"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+
+inherit python3native systemd
+
+SRC_URI = "git://github.com/OP-TEE/optee_client;nobranch=1"
+SRCREV = "be4fa2e36f717f03ca46e574aa66f697a897d090"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "ARCH=arm64"
+
+do_install() {
+ oe_runmake install
+
+ install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant
+ install -D -p -m0755 ${S}/out/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0
+ ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0
+ ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1
+ ln -sf libteec.so.1 ${D}${libdir}/libteec.so
+
+ cp -a ${S}/out/export/usr/include ${D}/usr/
+}
+
+COMPATIBLE_MACHINE = "(qoriq-arm64)"
diff --git a/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch b/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch
deleted file mode 100644
index e22bd6c0..00000000
--- a/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From b2dd8747125be413f9b8b7fd7e52f457cabd709c Mon Sep 17 00:00:00 2001
-From: Jens Wiklander <jens.wiklander@linaro.org>
-Date: Tue, 5 Feb 2019 13:05:29 +0100
-Subject: [PATCH] Fix alignment of data for mempool_alloc_pool()
-
-Upstream-Status: Submitted
-
-Prior to this patch was _TEE_MathAPI_Init() in
-lib/libutee/tee_api_arith_mpi.c supplying a data buffer which was only 4
-byte aligned while mempool_alloc_pool() requires the alignment of long.
-This will work in 32-bit mode, but could lead to alignment problem in
-64-bit mode. The same problem can happen with
-lib/libutee/tee_api_arith_mpa.c, but so far it has remained hidden.
-
-Incorrect alignment can result in errors like:
-E/TA: assertion '!((vaddr_t)data & (POOL_ALIGN - 1))' failed at lib/libutils/ext/mempool.c:134 in mempool_alloc_pool()
-
-This fix introduces MEMPOOL_ALIGN which specifies required alignment of
-data supplied to mempool_alloc_pool().
-
-Fixes: 062e3d01c039 ("ta: switch to to mbedtls for bignum")
-Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
-Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU v8)
-Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
-Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
----
- core/lib/libtomcrypt/src/mpa_desc.c | 2 +-
- core/lib/libtomcrypt/src/mpi_desc.c | 2 +-
- lib/libutee/tee_api_arith_mpa.c | 3 ++-
- lib/libutee/tee_api_arith_mpi.c | 3 +--
- lib/libutils/ext/include/mempool.h | 5 ++++-
- lib/libutils/ext/mempool.c | 9 ++++-----
- 6 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/core/lib/libtomcrypt/src/mpa_desc.c b/core/lib/libtomcrypt/src/mpa_desc.c
-index b407f54..58aa242 100644
---- a/core/lib/libtomcrypt/src/mpa_desc.c
-+++ b/core/lib/libtomcrypt/src/mpa_desc.c
-@@ -40,7 +40,7 @@ static struct mempool *get_mpa_scratch_memory_pool(void)
- #else /* CFG_WITH_PAGER */
- static struct mempool *get_mpa_scratch_memory_pool(void)
- {
-- static uint32_t data[LTC_MEMPOOL_U32_SIZE] __aligned(__alignof__(long));
-+ static uint32_t data[LTC_MEMPOOL_U32_SIZE] __aligned(MEMPOOL_ALIGN);
-
- return mempool_alloc_pool(data, sizeof(data), NULL);
- }
-diff --git a/core/lib/libtomcrypt/src/mpi_desc.c b/core/lib/libtomcrypt/src/mpi_desc.c
-index a43fbb4..67bc3a7 100644
---- a/core/lib/libtomcrypt/src/mpi_desc.c
-+++ b/core/lib/libtomcrypt/src/mpi_desc.c
-@@ -38,7 +38,7 @@ static struct mempool *get_mp_scratch_memory_pool(void)
- #else /* CFG_WITH_PAGER */
- static struct mempool *get_mp_scratch_memory_pool(void)
- {
-- static uint8_t data[MPI_MEMPOOL_SIZE] __aligned(__alignof__(long));
-+ static uint8_t data[MPI_MEMPOOL_SIZE] __aligned(MEMPOOL_ALIGN);
-
- return mempool_alloc_pool(data, sizeof(data), NULL);
- }
-diff --git a/lib/libutee/tee_api_arith_mpa.c b/lib/libutee/tee_api_arith_mpa.c
-index 0f6c7f1..a8ca6aa 100644
---- a/lib/libutee/tee_api_arith_mpa.c
-+++ b/lib/libutee/tee_api_arith_mpa.c
-@@ -19,7 +19,8 @@
-
- static uint32_t mempool_u32[mpa_scratch_mem_size_in_U32(
- MPA_INTERNAL_MEM_POOL_SIZE,
-- CFG_TA_BIGNUM_MAX_BITS)];
-+ CFG_TA_BIGNUM_MAX_BITS)]
-+ __aligned(MEMPOOL_ALIGN);
- static mpa_scratch_mem mempool;
-
- /*************************************************************
-diff --git a/lib/libutee/tee_api_arith_mpi.c b/lib/libutee/tee_api_arith_mpi.c
-index 8e2751b..6b074e1 100644
---- a/lib/libutee/tee_api_arith_mpi.c
-+++ b/lib/libutee/tee_api_arith_mpi.c
-@@ -42,8 +42,7 @@ static void __noreturn mpi_panic(const char *func, int line, int rc)
-
- void _TEE_MathAPI_Init(void)
- {
-- static uint8_t data[MPI_MEMPOOL_SIZE]
-- __aligned(__alignof__(mbedtls_mpi_uint));
-+ static uint8_t data[MPI_MEMPOOL_SIZE] __aligned(MEMPOOL_ALIGN);
-
- mbedtls_mpi_mempool = mempool_alloc_pool(data, sizeof(data), NULL);
- if (!mbedtls_mpi_mempool)
-diff --git a/lib/libutils/ext/include/mempool.h b/lib/libutils/ext/include/mempool.h
-index 62377df..2a60800 100644
---- a/lib/libutils/ext/include/mempool.h
-+++ b/lib/libutils/ext/include/mempool.h
-@@ -19,9 +19,12 @@ struct mempool_item {
-
- struct mempool;
-
-+#define MEMPOOL_ALIGN __alignof__(long)
-+
- /*
- * mempool_alloc_pool() - Allocate a new memory pool
-- * @data: a block of memory to carve out items from
-+ * @data: a block of memory to carve out items from, must
-+ * have an alignment of MEMPOOL_ALIGN.
- * @size: size fo the block of memory
- * @release_mem: function to call when the pool has been emptied,
- * ignored if NULL.
-diff --git a/lib/libutils/ext/mempool.c b/lib/libutils/ext/mempool.c
-index f977699..6d38590 100644
---- a/lib/libutils/ext/mempool.c
-+++ b/lib/libutils/ext/mempool.c
-@@ -53,7 +53,6 @@
- * So the potential fragmentation is mitigated.
- */
-
--#define POOL_ALIGN __alignof__(long)
-
- struct mempool {
- size_t size; /* size of the memory pool, in bytes */
-@@ -130,8 +129,8 @@ mempool_alloc_pool(void *data, size_t size,
- {
- struct mempool *pool = calloc(1, sizeof(*pool));
-
-- COMPILE_TIME_ASSERT(POOL_ALIGN >= __alignof__(struct mempool_item));
-- assert(!((vaddr_t)data & (POOL_ALIGN - 1)));
-+ COMPILE_TIME_ASSERT(MEMPOOL_ALIGN >= __alignof__(struct mempool_item));
-+ assert(!((vaddr_t)data & (MEMPOOL_ALIGN - 1)));
-
- if (pool) {
- pool->size = size;
-@@ -163,13 +162,13 @@ void *mempool_alloc(struct mempool *pool, size_t size)
- pool->last_offset);
- offset = pool->last_offset + last_item->size;
-
-- offset = ROUNDUP(offset, POOL_ALIGN);
-+ offset = ROUNDUP(offset, MEMPOOL_ALIGN);
- if (offset > pool->size)
- goto error;
- }
-
- size = sizeof(struct mempool_item) + size;
-- size = ROUNDUP(size, POOL_ALIGN);
-+ size = ROUNDUP(size, MEMPOOL_ALIGN);
- if (offset + size > pool->size)
- goto error;
-
---
-2.7.4
-
diff --git a/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch b/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch
new file mode 100644
index 00000000..086d4333
--- /dev/null
+++ b/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch
@@ -0,0 +1,41 @@
+From f94d9558d9eae48e92ce8d651539b6cf69eb4394 Mon Sep 17 00:00:00 2001
+From: Joshua Watt <JPEWhacker@gmail.com>
+Date: Mon, 18 May 2020 20:00:00 -0500
+Subject: [PATCH] arm64: Disable outline-atomics when compiling
+
+Disables the automatic detection of LSE (Large System Extension)
+instructions when compiling AArch64 code. GCC 10 implements this
+detection in libgcc using __getauxval(), which optee doesn't implement.
+This requires that the proper -mcpu is passed to GCC so that the code
+can be correctly compiled to use either LSE or load-store-exclusive.
+
+Fixes linker errors like the following when compiling with GCC 10:
+
+ aarch64-linux-ld.bfd: libgcc.a(lse-init.o):
+ in function `init_have_lse_atomics':
+ lse-init.c:44: undefined reference to `__getauxval'
+ core/arch/arm/kernel/link.mk:38:
+ recipe for target 'build/core/all_objs.o' failed
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/3874]
+---
+ core/arch/arm/arm.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk
+index a18eda3b..07069c66 100644
+--- a/core/arch/arm/arm.mk
++++ b/core/arch/arm/arm.mk
+@@ -115,7 +115,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
+--
+2.17.1
+
diff --git a/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch b/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch
deleted file mode 100644
index 6ecc6152..00000000
--- a/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/scripts/arm32_sysreg.py b/scripts/arm32_sysreg.py
-index bd0c619e..530b0f44 100755
---- a/scripts/arm32_sysreg.py
-+++ b/scripts/arm32_sysreg.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2018, Linaro Limited
-diff --git a/scripts/gen_hashed_bin.py b/scripts/gen_hashed_bin.py
-index 67b2b049..619cf26e 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
-diff --git a/scripts/gen_ld_sects.py b/scripts/gen_ld_sects.py
-index 43e812b5..bc82dd8b 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
-diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py
-index ddc17c18..69a4355c 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 84fd7714..f6e6b667 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 99a48c70..cbd9884a 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 1496f816..a01e7f9b 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 8356ad5d..4409074b 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
diff --git a/recipes-security/optee/optee-os-qoriq_git.bb b/recipes-security/optee/optee-os-qoriq_3.8.0.bb
index 6ffe8298..b8d764ff 100644
--- a/recipes-security/optee/optee-os-qoriq_git.bb
+++ b/recipes-security/optee/optee-os-qoriq_3.8.0.bb
@@ -2,23 +2,26 @@ SUMMARY = "OP-TEE Trusted OS"
DESCRIPTION = "OPTEE OS"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
-DEPENDS = "python3-pycrypto-native"
+PV = "3.8+git${SRCPV}"
+
+DEPENDS += "python3-pyelftools-native python3-pycryptodome-native python3-pycryptodomex-native dtc-native"
inherit deploy python3native
-SRCREV = "4e8d2e5307b99a91a0cac3ea3560ecb7d62898d6"
SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os;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-arm64-Disable-outline-atomics-when-compiling.patch \
"
+SRCREV = "0cb01f7f6aee552ead49990c06f69f73f459cc65"
+
S = "${WORKDIR}/git"
OPTEEMACHINE ?= "${MACHINE}"
OPTEEMACHINE_ls1088ardb-pb = "ls1088ardb"
OPTEEMACHINE_ls1046afrwy = "ls1046ardb"
+OPTEEMACHINE_lx2162aqds = "lx2160aqds"
EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \
ARCH=arm \
@@ -28,6 +31,7 @@ EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \
LDFLAGS= \
LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
"
+EXTRA_OEMAKE_append_lx2162aqds = " CFG_EMBED_DTB_SOURCE_FILE=fsl-lx2160a-qds.dts CFG_EMBED_DT=y"
OPTEE_ARCH_armv7a = "arm32"
OPTEE_ARCH_aarch64 = "arm64"
diff --git a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch b/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch
deleted file mode 100644
index 9b912777..00000000
--- a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 79330c8383e02e91a355964a3cc7b932d03c2517 Mon Sep 17 00:00:00 2001
-From: Chunrong Guo <chunrong.guo@nxp.com>
-Date: Wed, 10 Jul 2019 11:09:01 +0200
-Subject: [PATCH] fix build failure with GCC 9
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
----
- host/xtest/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/host/xtest/Makefile b/host/xtest/Makefile
-index e4e2881..e86e056 100644
---- a/host/xtest/Makefile
-+++ b/host/xtest/Makefile
-@@ -152,7 +152,7 @@ CFLAGS += -Wall -Wcast-align -Werror \
- -Wmissing-include-dirs -Wmissing-noreturn \
- -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
- -Wshadow -Wstrict-prototypes -Wswitch-default \
-- -Wwrite-strings \
-+ -Wwrite-strings -Wno-format-overflow \
- -Wno-missing-field-initializers -Wno-format-zero-length
- endif
-
---
-2.7.4
-
diff --git a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch
deleted file mode 100644
index 20f190af..00000000
--- a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001
-From: Scott Branden <scott.branden@broadcom.com>
-Date: Fri, 27 Dec 2019 12:54:28 -0800
-Subject: [PATCH] use python3 instead of python
-
-use python3 instead of python as python2 is EOL January 2020.
-
-Signed-off-by: Scott Branden <scott.branden@broadcom.com>
-Reviewed-by: Jerome Forissier <jerome@forissier.org>
-Tested-by: Jerome Forissier <jerome@forissier.org> (QEMU, CFG_GCM_NIST_VECTORS=y)
-Upstream-Status: Backport from v3.8.0
----
- scripts/file_to_c.py | 4 ++--
- scripts/rsp_to_gcm_test.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py
-index ae16f52..b4ce2a2 100755
---- a/scripts/file_to_c.py
-+++ b/scripts/file_to_c.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2018, Linaro Limited
-@@ -29,7 +29,7 @@ def main():
-
- f.write("const uint8_t " + args.name + "[] = {\n")
- i = 0
-- for x in array.array("B", inf.read()):
-+ for x in array.array("B", map(ord, (inf.read()))):
- f.write("0x" + '{0:02x}'.format(x) + ",")
- i = i + 1
- if i % 8 == 0:
-diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py
-index 0543541..e4418be 100755
---- a/scripts/rsp_to_gcm_test.py
-+++ b/scripts/rsp_to_gcm_test.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- modes = {'encrypt': 0, 'decrypt': 1}
-
---
-2.7.4
-
diff --git a/recipes-security/optee/optee-test-qoriq_git.bb b/recipes-security/optee/optee-test-qoriq_3.8.0.bb
index b66725c7..94cd00c2 100644
--- a/recipes-security/optee/optee-test-qoriq_git.bb
+++ b/recipes-security/optee/optee-test-qoriq_3.8.0.bb
@@ -1,20 +1,17 @@
SUMMARY = "OP-TEE sanity testsuite"
-HOMEPAGE = "https://github.com/qoriq-open-source/optee_test"
+HOMEPAGE = "https://github.com/OP-TEE/optee_test"
LICENSE = "BSD & GPLv2"
LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
-DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycrypto-native"
+DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycryptodome-native python3-pycryptodomex-native"
inherit python3native
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \
- file://0001-fix-build-failure-with-GCC-9.patch \
- file://0001-use-python3-instead-of-python.patch \
-"
-S = "${WORKDIR}/git"
+SRC_URI = "git://github.com/OP-TEE/optee_test;nobranch=1"
+SRCREV = "30481e381cb4285706e7516853495a7699c93b2c"
-SRCREV = "669058459e4a544be12f37dab103ee4c2b32e31d"
+S = "${WORKDIR}/git"
OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
diff --git a/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
new file mode 100644
index 00000000..9e6a6137
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
@@ -0,0 +1,36 @@
+From 9b4959b97d2e95d4b49cf6ca2a3fce3cdb484f2d Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Thu, 31 Mar 2016 00:20:15 +0200
+Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
+
+---
+ 3rdparty/ippicv/ippicv.cmake | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
+index 257af6fcc6..f88460450f 100644
+--- a/3rdparty/ippicv/ippicv.cmake
++++ b/3rdparty/ippicv/ippicv.cmake
+@@ -34,18 +34,5 @@ function(download_ippicv root_var)
+ endif()
+
+ set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
+- ocv_download(FILENAME ${OPENCV_ICV_NAME}
+- HASH ${OPENCV_ICV_HASH}
+- URL
+- "${OPENCV_IPPICV_URL}"
+- "$ENV{OPENCV_IPPICV_URL}"
+- "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
+- DESTINATION_DIR "${THE_ROOT}"
+- ID IPPICV
+- STATUS res
+- UNPACK RELATIVE_URL)
+-
+- if(res)
+- set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
+- endif()
++ set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
+ endfunction()
diff --git a/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch b/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch
new file mode 100644
index 00000000..0aabee29
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch
@@ -0,0 +1,179 @@
+From fca4d9eec289f22c081daa2c61a1110e3f268f92 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Tue, 1 Sep 2020 14:57:07 -0500
+Subject: [PATCH] Add smaller version of download_models.py
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ testdata/dnn/download_models_basic.py | 159 ++++++++++++++++++++++++++
+ 1 file changed, 159 insertions(+)
+ create mode 100644 testdata/dnn/download_models_basic.py
+
+diff --git a/testdata/dnn/download_models_basic.py b/testdata/dnn/download_models_basic.py
+new file mode 100644
+index 0000000..5c8a616
+--- /dev/null
++++ b/testdata/dnn/download_models_basic.py
+@@ -0,0 +1,159 @@
++#!/usr/bin/env python
++
++from __future__ import print_function
++import hashlib
++import sys
++import tarfile
++if sys.version_info[0] < 3:
++ from urllib2 import urlopen
++else:
++ from urllib.request import urlopen
++
++
++class Model:
++ MB = 1024*1024
++ BUFSIZE = 10*MB
++
++ def __init__(self, **kwargs):
++ self.name = kwargs.pop('name')
++ self.url = kwargs.pop('url', None)
++ self.filename = kwargs.pop('filename')
++ self.sha = kwargs.pop('sha', None)
++ self.archive = kwargs.pop('archive', None)
++ self.member = kwargs.pop('member', None)
++
++ def __str__(self):
++ return 'Model <{}>'.format(self.name)
++
++ def printRequest(self, r):
++ def getMB(r):
++ d = dict(r.info())
++ for c in ['content-length', 'Content-Length']:
++ if c in d:
++ return int(d[c]) / self.MB
++ return '<unknown>'
++ print(' {} {} [{} Mb]'.format(r.getcode(), r.msg, getMB(r)))
++
++ def verify(self):
++ if not self.sha:
++ return False
++ print(' expect {}'.format(self.sha))
++ sha = hashlib.sha1()
++ try:
++ with open(self.filename, 'rb') as f:
++ while True:
++ buf = f.read(self.BUFSIZE)
++ if not buf:
++ break
++ sha.update(buf)
++ print(' actual {}'.format(sha.hexdigest()))
++ return self.sha == sha.hexdigest()
++ except Exception as e:
++ print(' catch {}'.format(e))
++
++ def get(self):
++ if self.verify():
++ print(' hash match - skipping')
++ return True
++
++ if self.archive or self.member:
++ assert(self.archive and self.member)
++ print(' hash check failed - extracting')
++ print(' get {}'.format(self.member))
++ self.extract()
++ else:
++ assert(self.url)
++ print(' hash check failed - downloading')
++ print(' get {}'.format(self.url))
++ self.download()
++
++ print(' done')
++ print(' file {}'.format(self.filename))
++ return self.verify()
++
++ def download(self):
++ try:
++ r = urlopen(self.url, timeout=60)
++ self.printRequest(r)
++ self.save(r)
++ except Exception as e:
++ print(' catch {}'.format(e))
++
++ def extract(self):
++ try:
++ with tarfile.open(self.archive) as f:
++ assert self.member in f.getnames()
++ self.save(f.extractfile(self.member))
++ except Exception as e:
++ print(' catch {}'.format(e))
++
++ def save(self, r):
++ with open(self.filename, 'wb') as f:
++ print(' progress ', end='')
++ sys.stdout.flush()
++ while True:
++ buf = r.read(self.BUFSIZE)
++ if not buf:
++ break
++ f.write(buf)
++ print('>', end='')
++ sys.stdout.flush()
++
++models = [
++ Model(
++ name='Fcn',
++ url='http://dl.caffe.berkeleyvision.org/fcn8s-heavy-pascal.caffemodel',
++ sha='c449ea74dd7d83751d1357d6a8c323fcf4038962',
++ filename='fcn8s-heavy-pascal.caffemodel'),
++ Model(
++ name='SqueezeNet_v1.1',
++ url='https://raw.githubusercontent.com/DeepScale/SqueezeNet/b5c3f1a23713c8b3fd7b801d229f6b04c64374a5/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel',
++ sha='3397f026368a45ae236403ccc81cfcbe8ebe1bd0',
++ filename='squeezenet_v1.1.caffemodel'),
++ Model(
++ name='Colorization',
++ url='https://raw.githubusercontent.com/richzhang/colorization/master/models/colorization_deploy_v2.prototxt',
++ sha='f528334e386a69cbaaf237a7611d833bef8e5219',
++ filename='colorization_deploy_v2.prototxt'),
++ Model(
++ name='Colorization',
++ url='http://eecs.berkeley.edu/~rich.zhang/projects/2016_colorization/files/demo_v2/colorization_release_v2.caffemodel',
++ sha='21e61293a3fa6747308171c11b6dd18a68a26e7f',
++ filename='colorization_release_v2.caffemodel'),
++ Model(
++ name='OpenPose/pose/coco', # https://github.com/CMU-Perceptual-Computing-Lab/openpose
++ url='http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/coco/pose_iter_440000.caffemodel',
++ sha='ac7e97da66f3ab8169af2e601384c144e23a95c1',
++ filename='openpose_pose_coco.caffemodel'),
++ Model(
++ name='YOLOv3', # https://pjreddie.com/darknet/yolo/
++ url='https://pjreddie.com/media/files/yolov3.weights',
++ sha='520878f12e97cf820529daea502acca380f1cb8e',
++ filename='yolov3.weights'),
++ Model(
++ name='EAST', # https://github.com/argman/EAST (a TensorFlow model), https://arxiv.org/abs/1704.03155v2 (a paper)
++ url='https://www.dropbox.com/s/r2ingd0l3zt8hxs/frozen_east_text_detection.tar.gz?dl=1',
++ sha='3ca8233d6edd748f7ed23246c8ca24cbf696bb94',
++ filename='frozen_east_text_detection.tar.gz'),
++ Model(
++ name='EAST',
++ archive='frozen_east_text_detection.tar.gz',
++ member='frozen_east_text_detection.pb',
++ sha='fffabf5ac36f37bddf68e34e84b45f5c4247ed06',
++ filename='frozen_east_text_detection.pb'),
++]
++
++# Note: models will be downloaded to current working directory
++# expected working directory is opencv_extra/testdata/dnn
++if __name__ == '__main__':
++ failedModels = []
++ for m in models:
++ print(m)
++ if not m.get():
++ failedModels.append(m.filename)
++
++ if failedModels:
++ print("Following models have not been downloaded:")
++ for f in failedModels:
++ print("* {}".format(f))
++ exit(15)
+--
+2.17.1
+
diff --git a/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch b/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch
new file mode 100644
index 00000000..948a80fa
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch
@@ -0,0 +1,28 @@
+From 66e50ee69fa9ee2469d349100e70d8b296c4b4dc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 11 Sep 2018 00:21:18 -0700
+Subject: [PATCH] Dont use isystem
+
+clang really does not like it
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ cmake/OpenCVPCHSupport.cmake | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
+index 08cd06def4..46c9c02da3 100644
+--- a/cmake/OpenCVPCHSupport.cmake
++++ b/cmake/OpenCVPCHSupport.cmake
+@@ -18,6 +18,8 @@ IF(CV_GCC)
+ SET(PCHSupport_FOUND TRUE)
+ ENDIF()
+
++ SET(CMAKE_INCLUDE_SYSTEM_FLAG_C "-I")
++ SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-I")
+ SET(_PCH_include_prefix "-I")
+ SET(_PCH_isystem_prefix "-isystem")
+ SET(_PCH_define_prefix "-D")
diff --git a/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch b/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch
new file mode 100644
index 00000000..d56b8ae6
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Make-ts-module-external.patch
@@ -0,0 +1,42 @@
+From 11bbf909e08594628bd757d989ae34cf1bfe200b Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 18 Jun 2020 05:51:38 +0000
+Subject: [PATCH] Make ts module external
+
+Make ts module external
+
+Reference: https://github.com/qbonnard/opencv/commit/6b229c5834cb9a0930425e762a6c7b03244d7abb
+
+Upstream-Status: Submitted [https://github.com/opencv/opencv/issues/8408]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ modules/ts/CMakeLists.txt | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt
+index f95bed0793..66f315bcca 100644
+--- a/modules/ts/CMakeLists.txt
++++ b/modules/ts/CMakeLists.txt
+@@ -4,9 +4,6 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS)
+ ocv_module_disable(ts)
+ endif()
+
+-set(OPENCV_MODULE_TYPE STATIC)
+-set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
+-
+ if(WINRT)
+ # WINRT doesn't have access to environment variables
+ # so adding corresponding macros during CMake run
+@@ -16,7 +13,7 @@ endif()
+
+ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
+
+-ocv_add_module(ts INTERNAL opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui)
++ocv_add_module(ts opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui)
+
+ ocv_glob_module_sources()
+ ocv_module_include_directories()
+--
+2.24.1
+
diff --git a/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
new file mode 100644
index 00000000..1e47f8b1
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
@@ -0,0 +1,31 @@
+From e4ec6cea72da9e9ae5ba57140fa2f5c63f1f8295 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Wed, 9 May 2018 13:33:59 -0700
+Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function
+ compile failure until next uprev
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+
+---
+ modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
+index 6dca724a89..ae55dd4555 100644
+--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
+@@ -774,6 +774,14 @@ struct ImplMutex::Impl
+
+ #endif
+
++/* NOTE This is deprecated in ffmpeg and the code should be removed */
++#ifndef AVFMT_RAWPICTURE
++#define AVFMT_RAWPICTURE 0x0020
++#endif /* AVFMT_RAWPICTURE */
++#ifndef CODEC_FLAG_GLOBAL_HEADER
++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++#endif
++
+ void ImplMutex::init()
+ {
+ impl = new Impl();
diff --git a/recipes-support/opencv/opencv/0001-Use-Os-to-compile-tinyxml2.cpp.patch b/recipes-support/opencv/opencv/0001-Use-Os-to-compile-tinyxml2.cpp.patch
new file mode 100644
index 00000000..c5a64387
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Use-Os-to-compile-tinyxml2.cpp.patch
@@ -0,0 +1,31 @@
+From 59fafe6e39759e193b5764b36b4c5a93da352123 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Aug 2020 00:36:49 -0700
+Subject: [PATCH] Use -Os to compile tinyxml2.cpp
+
+This workarounds issue [1] seen on riscv with gcc
+
+[1] https://github.com/riscv/riscv-gnu-toolchain/issues/624
+
+Upstream-Status: Inappropriate [ OE-Specific ]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ modules/datasets/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/datasets/CMakeLists.txt b/modules/datasets/CMakeLists.txt
+index 56ca9e310..99b7a33f6 100644
+--- a/modules/datasets/CMakeLists.txt
++++ b/modules/datasets/CMakeLists.txt
+@@ -2,7 +2,7 @@ set(the_description "datasets framework")
+
+ set(filter_srcs "${CMAKE_CURRENT_LIST_DIR}/src/tinyxml2/tinyxml2.cpp")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+- ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-suggest-override") # GCC
++ ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-suggest-override -Os") # GCC
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-inconsistent-missing-override") # Clang
+ endif()
+--
+2.28.0
+
diff --git a/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch
new file mode 100644
index 00000000..bb47ef2b
--- /dev/null
+++ b/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch
@@ -0,0 +1,70 @@
+From f42c9b8c7bafcadc7e95fb25a391707f970eb426 Mon Sep 17 00:00:00 2001
+From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+Date: Fri, 19 May 2017 04:27:50 +0900
+Subject: [PATCH] To fix errors as following:
+
+"test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'"
+"perf_abs.cpp:13: undefined reference to `cvtest::param_seed'"
+"test_superres.cpp:270: undefined reference to `checkIppStatus()'"
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+
+Also add the visibility changes for certain OpenCL-related functions in
+ts module.
+
+Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
+
+---
+ modules/ts/include/opencv2/ts.hpp | 4 ++--
+ modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +-
+ modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp
+index ed7491a89a..80919d13ee 100644
+--- a/modules/ts/include/opencv2/ts.hpp
++++ b/modules/ts/include/opencv2/ts.hpp
+@@ -728,7 +728,7 @@ protected:
+ }
+ };
+
+-extern uint64 param_seed;
++CV_EXPORTS extern uint64 param_seed;
+
+ struct DefaultRngAuto
+ {
+@@ -791,7 +791,7 @@ private:
+ #endif
+ #endif
+
+-void parseCustomOptions(int argc, char **argv);
++CV_EXPORTS void parseCustomOptions(int argc, char **argv);
+
+ #define CV_TEST_INIT0_NOOP (void)0
+
+diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp
+index 11572e9f48..438112e2aa 100644
+--- a/modules/ts/include/opencv2/ts/ocl_test.hpp
++++ b/modules/ts/include/opencv2/ts/ocl_test.hpp
+@@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src)
+ return dst;
+ }
+
+-extern int test_loop_times;
++CV_EXPORTS extern int test_loop_times;
+
+ #define MAX_VALUE 357
+
+diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp
+index b2a4cac241..b94c681c0c 100644
+--- a/modules/ts/include/opencv2/ts/ts_ext.hpp
++++ b/modules/ts/include/opencv2/ts/ts_ext.hpp
+@@ -9,7 +9,7 @@
+ #define OPENCV_TS_EXT_HPP
+
+ namespace cvtest {
+-void checkIppStatus();
++CV_EXPORTS void checkIppStatus();
+ extern bool skipUnstableTests;
+ extern bool runBigDataTests;
+ extern int testThreads;
diff --git a/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch b/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch
new file mode 100644
index 00000000..569d5b02
--- /dev/null
+++ b/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch
@@ -0,0 +1,148 @@
+From 3c4daafb54f961e376104a461ca7ec114ff0331a Mon Sep 17 00:00:00 2001
+From: Ludek Slosarcik <ludek.slosarcik@nxp.com>
+Date: Fri, 14 Feb 2020 15:46:50 +0100
+Subject: [PATCH] opencv_dnn: added video device for 2 examples, and change text labels
+
+Signed-off-by: Ludek Slosarcik <ludek.slosarcik@nxp.com>
+
+Upstream-Status: Pending
+---
+ samples/cpp/logistic_regression.cpp | 2 +-
+ samples/dnn/classification.cpp | 7 ++++---
+ samples/dnn/object_detection.cpp | 10 +++++-----
+ samples/dnn/segmentation.cpp | 2 +-
+ samples/dnn/text_detection.cpp | 5 +++--
+ 5 files changed, 14 insertions(+), 12 deletions(-)
+
+Index: git/samples/cpp/logistic_regression.cpp
+===================================================================
+--- git.orig/samples/cpp/logistic_regression.cpp
++++ git/samples/cpp/logistic_regression.cpp
+@@ -83,7 +83,7 @@ static float calculateAccuracyPercent(co
+
+ int main()
+ {
+- const String filename = samples::findFile("data01.xml");
++ const String filename = samples::findFile("../data/data01.xml");
+ cout << "**********************************************************************" << endl;
+ cout << filename
+ << " contains digits 0 and 1 of 20 samples each, collected on an Android device" << endl;
+Index: git/samples/dnn/classification.cpp
+===================================================================
+--- git.orig/samples/dnn/classification.cpp
++++ git/samples/dnn/classification.cpp
+@@ -11,6 +11,7 @@ std::string keys =
+ "{ help h | | Print help message. }"
+ "{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }"
+ "{ zoo | models.yml | An optional path to file with preprocessing parameters }"
++ "{ device | 0 | camera device number. }"
+ "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
+ "{ framework f | | Optional name of an origin framework of the model. Detect it automatically if it does not set. }"
+ "{ classes | | Optional path to a text file with names of classes. }"
+@@ -94,7 +95,7 @@ int main(int argc, char** argv)
+ if (parser.has("input"))
+ cap.open(parser.get<String>("input"));
+ else
+- cap.open(0);
++ cap.open(parser.get<int>("device"));
+ //! [Open a video file or an image file or a camera stream]
+
+ // Process frames.
+@@ -131,13 +132,13 @@ int main(int argc, char** argv)
+ double freq = getTickFrequency() / 1000;
+ double t = net.getPerfProfile(layersTimes) / freq;
+ std::string label = format("Inference time: %.2f ms", t);
+- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ // Print predicted class.
+ label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() :
+ classes[classId].c_str()),
+ confidence);
+- putText(frame, label, Point(0, 40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ imshow(kWinName, frame);
+ }
+Index: git/samples/dnn/object_detection.cpp
+===================================================================
+--- git.orig/samples/dnn/object_detection.cpp
++++ git/samples/dnn/object_detection.cpp
+@@ -251,13 +251,13 @@ int main(int argc, char** argv)
+ if (predictionsQueue.counter > 1)
+ {
+ std::string label = format("Camera: %.2f FPS", framesQueue.getFPS());
+- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ label = format("Network: %.2f FPS", predictionsQueue.getFPS());
+- putText(frame, label, Point(0, 30), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ label = format("Skipped frames: %d", framesQueue.counter - predictionsQueue.counter);
+- putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 70), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+ }
+ imshow(kWinName, frame);
+ }
+@@ -293,7 +293,7 @@ int main(int argc, char** argv)
+ double freq = getTickFrequency() / 1000;
+ double t = net.getPerfProfile(layersTimes) / freq;
+ std::string label = format("Inference time: %.2f ms", t);
+- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ imshow(kWinName, frame);
+ }
+@@ -462,7 +462,7 @@ void drawPred(int classId, float conf, i
+ top = max(top, labelSize.height);
+ rectangle(frame, Point(left, top - labelSize.height),
+ Point(left + labelSize.width, top + baseLine), Scalar::all(255), FILLED);
+- putText(frame, label, Point(left, top), FONT_HERSHEY_SIMPLEX, 0.5, Scalar());
++ putText(frame, label, Point(left, top), FONT_HERSHEY_SIMPLEX, 0.8, Scalar());
+ }
+
+ void callback(int pos, void*)
+Index: git/samples/dnn/segmentation.cpp
+===================================================================
+--- git.orig/samples/dnn/segmentation.cpp
++++ git/samples/dnn/segmentation.cpp
+@@ -157,7 +157,7 @@ int main(int argc, char** argv)
+ double freq = getTickFrequency() / 1000;
+ double t = net.getPerfProfile(layersTimes) / freq;
+ std::string label = format("Inference time: %.2f ms", t);
+- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ imshow(kWinName, frame);
+ if (!classes.empty())
+Index: git/samples/dnn/text_detection.cpp
+===================================================================
+--- git.orig/samples/dnn/text_detection.cpp
++++ git/samples/dnn/text_detection.cpp
+@@ -25,6 +25,7 @@ using namespace cv::dnn;
+ const char* keys =
+ "{ help h | | Print help message. }"
+ "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
++ "{ device | 0 | camera device number. }"
+ "{ model m | | Path to a binary .pb file contains trained detector network.}"
+ "{ ocr | | Path to a binary .pb or .onnx file contains trained recognition network.}"
+ "{ width | 320 | Preprocess input image by resizing to a specific width. It should be multiple by 32. }"
+@@ -75,7 +76,7 @@ int main(int argc, char** argv)
+
+ // Open a video file or an image file or a camera stream.
+ VideoCapture cap;
+- bool openSuccess = parser.has("input") ? cap.open(parser.get<String>("input")) : cap.open(0);
++ bool openSuccess = parser.has("input") ? cap.open(parser.get<String>("input")) : cap.open(parser.get<int>("device"));
+ CV_Assert(openSuccess);
+
+ static const std::string kWinName = "EAST: An Efficient and Accurate Scene Text Detector";
+@@ -156,7 +157,7 @@ int main(int argc, char** argv)
+
+ // Put efficiency information.
+ std::string label = format("Inference time: %.2f ms", tickMeter.getTimeMilli());
+- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+
+ imshow(kWinName, frame);
+
diff --git a/recipes-support/opencv/opencv/download.patch b/recipes-support/opencv/opencv/download.patch
new file mode 100644
index 00000000..33ac4831
--- /dev/null
+++ b/recipes-support/opencv/opencv/download.patch
@@ -0,0 +1,41 @@
+From b18a280fab06a680d9f831bf8b462647f3cb6214 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Thu, 9 Jan 2020 16:24:24 +0000
+Subject: [PATCH] opencv: abort configure if we need to download
+
+This CMake module will download files during do_configure. This is bad as it
+means we can't do offline builds.
+
+Add an option to disallow downloads by emitting a fatal error.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ cmake/OpenCVDownload.cmake | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake
+index 63cf6d3238..4acf477f70 100644
+--- a/cmake/OpenCVDownload.cmake
++++ b/cmake/OpenCVDownload.cmake
+@@ -14,6 +14,7 @@
+ # RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it
+ # Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache
+
++set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads")
+ set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files")
+ if(DEFINED ENV{OPENCV_DOWNLOAD_PATH})
+ set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
+@@ -156,6 +157,11 @@ function(ocv_download)
+
+ # Download
+ if(NOT EXISTS "${CACHE_CANDIDATE}")
++ if(NOT OPENCV_ALLOW_DOWNLOADS)
++ message(FATAL_ERROR "Not going to download ${DL_FILENAME}")
++ return()
++ endif()
++
+ ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"")
+ foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST})
+ ocv_download_log("#try ${try}")
diff --git a/recipes-support/opencv/opencv_4.4.0.imx.bb b/recipes-support/opencv/opencv_4.4.0.imx.bb
new file mode 100644
index 00000000..f50cca8a
--- /dev/null
+++ b/recipes-support/opencv/opencv_4.4.0.imx.bb
@@ -0,0 +1,295 @@
+# This recipe is for the i.MX fork of opencv. For ease of
+# maintenance, the top section is a verbatim copy of an OE-core
+# recipe. The second section customizes the recipe for i.MX.
+
+########## meta-openembedded copy ###########
+
+SUMMARY = "Opencv : The Open Computer Vision Library"
+HOMEPAGE = "http://opencv.org/"
+SECTION = "libs"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
+
+SRCREV_opencv = "c3bb57afeaf030f10939204d48d7c2a3842f4293"
+SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b"
+SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
+SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
+SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
+SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12"
+
+def ipp_filename(d):
+ import re
+ arch = d.getVar('TARGET_ARCH')
+ if re.match("i.86$", arch):
+ return "ippicv_2020_lnx_ia32_20191018_general.tgz"
+ else:
+ return "ippicv_2020_lnx_intel64_20191018_general.tgz"
+
+def ipp_md5sum(d):
+ import re
+ arch = d.getVar('TARGET_ARCH')
+ if re.match("i.86$", arch):
+ return "ad189a940fb60eb71f291321322fe3e8"
+ else:
+ return "7421de0095c7a39162ae13a6098782f9"
+
+IPP_FILENAME = "${@ipp_filename(d)}"
+IPP_MD5 = "${@ipp_md5sum(d)}"
+
+SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
+SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
+ git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
+ git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \
+ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
+ file://0003-To-fix-errors-as-following.patch \
+ file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
+ file://0001-Dont-use-isystem.patch \
+ file://download.patch \
+ file://0001-Make-ts-module-external.patch \
+ "
+SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
+
+S = "${WORKDIR}/git"
+
+# OpenCV wants to download more files during configure. We download these in
+# do_fetch and construct a source cache in the format it expects
+OPENCV_DLDIR = "${WORKDIR}/downloads"
+
+do_unpack_extra() {
+ tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
+
+ md5() {
+ # Return the MD5 of $1
+ echo $(md5sum $1 | cut -d' ' -f1)
+ }
+ cache() {
+ TAG=$1
+ shift
+ mkdir --parents ${OPENCV_DLDIR}/$TAG
+ for F in $*; do
+ DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F)
+ test -e $DEST || ln -s $F $DEST
+ done
+ }
+ cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i
+ cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i
+ cache data ${WORKDIR}/face/*.dat
+}
+addtask unpack_extra after do_unpack before do_patch
+
+CMAKE_VERBOSE = "VERBOSE=1"
+
+EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
+ -DWITH_1394=OFF \
+ -DENABLE_PRECOMPILED_HEADERS=OFF \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DOPENCV_ICV_HASH=${IPP_MD5} \
+ -DIPPROOT=${WORKDIR}/ippicv_lnx \
+ -DOPENCV_GENERATE_PKGCONFIG=ON \
+ -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \
+ -DOPENCV_ALLOW_DOWNLOADS=OFF \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
+"
+EXTRA_OECMAKE_append_x86 = " -DX86=ON"
+
+PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
+ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}"
+
+PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade"
+PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas,"
+PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft,"
+PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native,"
+PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog,"
+PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype,"
+PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2,"
+PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base,"
+PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3,"
+PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
+PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native,"
+PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
+PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
+PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
+PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd,"
+PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native,"
+PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
+PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"
+PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
+PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
+PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
+PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
+PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
+PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
+
+inherit pkgconfig cmake
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)}
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
+
+export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
+export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}"
+export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java"
+export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native"
+export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/"
+
+TARGET_CC_ARCH += "-I${S}/include "
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \
+ ${PN}-apps"
+
+python populate_packages_prepend () {
+ cv_libdir = d.expand('${libdir}')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
+
+ pn = d.getVar('PN')
+ metapkg = pn + '-dev'
+ d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+ blacklist = [ metapkg ]
+ metapkg_rdepends = [ ]
+ packages = d.getVar('PACKAGES').split()
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
+ metapkg_rdepends.append(pkg)
+ d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
+
+ metapkg = pn
+ d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+ blacklist = [ metapkg, "libopencv-ts" ]
+ metapkg_rdepends = [ ]
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'):
+ metapkg_rdepends.append(pkg)
+ d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
+}
+
+PACKAGES_DYNAMIC += "^libopencv-.*"
+
+FILES_${PN} = ""
+FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*"
+FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake"
+FILES_${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a"
+FILES_${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses"
+FILES_${PN}-java = "${datadir}/OpenCV/java"
+FILES_${PN}-samples = "${datadir}/opencv4/samples/"
+
+INSANE_SKIP_${PN}-java = "libdir"
+INSANE_SKIP_${PN}-dbg = "libdir"
+
+ALLOW_EMPTY_${PN} = "1"
+
+SUMMARY_python-opencv = "Python bindings to opencv"
+FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python-opencv = "python-core python-numpy"
+
+SUMMARY_python3-opencv = "Python bindings to opencv"
+FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python3-opencv = "python3-core python3-numpy"
+
+RDEPENDS_${PN}-apps = "bash"
+
+do_compile_prepend() {
+ # remove the build host info to improve reproducibility
+ if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then
+ sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc
+ fi
+}
+
+do_install_append() {
+ # Move Python files into correct library folder (for multilib build)
+ if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then
+ mv ${D}/usr/lib/* ${D}/${libdir}/
+ rm -rf ${D}/usr/lib
+ fi
+}
+
+TOOLCHAIN = "gcc"
+
+########## End of meta-openembedded copy ##########
+
+########## i.MX overrides ##########
+
+SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7"
+
+SRCREV_opencv = "e39e6eded2d365a5dc370e1a72717e132166cf07"
+SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b"
+SRCREV_extra = "65796edadce27ed013e3deeedb3c081ff527e4ec"
+SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
+SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
+SRCREV_FORMAT_append = "_extra"
+
+OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https"
+SRCBRANCH = "4.4.0_imx"
+SRC_URI = "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv \
+ git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra \
+ git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
+ git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \
+ https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \
+ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
+ file://0003-To-fix-errors-as-following.patch \
+ file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
+ file://0001-Dont-use-isystem.patch \
+ file://download.patch \
+ file://0001-Make-ts-module-external.patch \
+ file://OpenCV_DNN_examples.patch \
+ file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \
+ "
+PV = "4.4.0.imx"
+
+PACKAGECONFIG_remove = "eigen"
+PACKAGECONFIG_append_mx8 = " dnn text"
+PACKAGECONFIG_OPENCL = ""
+PACKAGECONFIG_OPENCL_mx8 = "opencl"
+PACKAGECONFIG_OPENCL_mx8dxl = ""
+PACKAGECONFIG_OPENCL_mx8phantomdxl = ""
+PACKAGECONFIG_OPENCL_mx8mm = ""
+PACKAGECONFIG_OPENCL_mx8mnlite = ""
+PACKAGECONFIG_append = " ${PACKAGECONFIG_OPENCL}"
+
+PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
+PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native,"
+PACKAGECONFIG[test] = "-DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF,"
+
+do_unpack_extra_append() {
+ mkdir -p ${S}/3rdparty/tinydnn/
+ tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
+}
+
+do_install_append() {
+ ln -sf opencv4/opencv2 ${D}${includedir}/opencv2
+ install -d ${D}${datadir}/OpenCV/samples/data
+ cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data
+ install -d ${D}${datadir}/OpenCV/samples/bin/
+ cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/
+ if ${@bb.utils.contains('PACKAGECONFIG', 'test', 'true', 'false', d)}; then
+ cp -r share/opencv4/testdata/cv/face/* ${D}${datadir}/opencv4/testdata/cv/face/
+ fi
+}
+
+FILES_${PN}-samples += "${datadir}/OpenCV/samples"
+
+COMPATIBLE_MACHINE = "(mx8)"
+
+########## End of i.MX overrides ##########