From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- bsp/meta-altera/README.md | 33 +- bsp/meta-altera/conf/layer.conf | 2 +- bsp/meta-altera/conf/machine/10m50.conf | 2 + bsp/meta-altera/conf/machine/agilex.conf | 25 + bsp/meta-altera/conf/machine/arria10.conf | 14 +- bsp/meta-altera/conf/machine/arria5.conf | 4 - bsp/meta-altera/conf/machine/cyclone5.conf | 11 +- bsp/meta-altera/conf/machine/include/socfpga.inc | 3 + .../conf/machine/include/socfpga_armv8a.inc | 9 +- bsp/meta-altera/conf/machine/stratix10.conf | 5 +- bsp/meta-altera/conf/machine/stratix10swvp.conf | 39 - .../recipes-bsp/u-boot/u-boot-socfpga-common.inc | 18 +- .../recipes-bsp/u-boot/u-boot-socfpga_v2019.04.bb | 2 +- .../recipes-bsp/u-boot/u-boot-socfpga_v2019.10.bb | 2 +- .../recipes-bsp/u-boot/u-boot-socfpga_v2020.04.bb | 7 + .../linux/config/config_gpio_sys.cfg | 1 + .../recipes-kernel/linux/config/config_jffs2.cfg | 2 + .../recipes-kernel/linux/config/gpio_sys.scc | 1 + .../recipes-kernel/linux/config/jffs2.scc | 1 + .../linux/linux-altera-lts_5.4.13.bb | 15 - .../recipes-kernel/linux/linux-altera-lts_5.4.3.bb | 15 - .../recipes-kernel/linux/linux-altera-lts_5.4.bb | 16 + .../recipes-kernel/linux/linux-altera_5.2.bb | 13 - .../recipes-kernel/linux/linux-altera_5.5.bb | 13 + bsp/meta-altera/wic/sdimage-stratix10-agilex.wks | 6 + bsp/meta-altera/wic/sdimage-stratix10.wks | 6 - bsp/meta-arm/COPYING.MIT | 17 + bsp/meta-arm/README.md | 38 + bsp/meta-arm/meta-arm-autonomy/README.md | 92 + .../classes/arm-autonomy-features.bbclass | 5 + .../classes/image_types_xenguest.bbclass | 108 + .../classes/kernel-xenguest.bbclass | 34 + .../classes/xenguest-image-extra.bbclass | 102 + .../classes/xenguest-image.bbclass | 195 + .../conf/distro/include/arm-autonomy-guest.inc | 11 + .../conf/distro/include/arm-autonomy-host.inc | 9 + bsp/meta-arm/meta-arm-autonomy/conf/layer.conf | 34 + .../conf/machine/arm64-autonomy-guest.conf | 17 + .../documentation/arm-autonomy-quickstart.md | 225 + .../documentation/xen-devicetree.md | 104 + .../documentation/xenguest-manager.md | 67 + .../documentation/xenguest-mkimage.md | 119 + .../documentation/xenguest-network-bridge.md | 49 + .../boot-wrapper-aarch64_%.bbappend | 32 + .../images/firmware-image-juno.bbappend | 21 + .../images/firmware-image-juno/images-r0.txt | 78 + .../images/firmware-image-juno/images-r1.txt | 78 + .../images/firmware-image-juno/images-r2.txt | 78 + .../images/firmware-image-juno/uEnv.txt | 15 + .../xen-devicetree/files/xen-juno.dtsi | 11 + .../xen-devicetree/files/xen-n1sdp.dtsi | 39 + .../xen-devicetree/xen-devicetree.bbappend | 25 + ...ap-the-number-of-interrupt-lines-for-dom0.patch | 44 + .../recipes-extended/xen/files/fvp/defconfig | 73 + .../recipes-extended/xen/files/juno/defconfig | 73 + .../recipes-extended/xen/files/n1sdp/defconfig | 100 + .../recipes-extended/xen/xen_%.bbappend | 32 + .../xenguest/xenguest-manager.bbappend | 6 + .../xenguest/xenguest-network-bridge.bbappend | 2 + .../features/arm-autonomy/disable-arm64-sve.cfg | 4 + .../features/arm-autonomy/disable-arm64-sve.scc | 3 + .../recipes-kernel/linux/linux-%.bbappend | 17 + .../images/arm-autonomy-host-image-minimal.bb | 120 + .../init-ifupdown/init-ifupdown_1.0.bbappend | 18 + .../sysvinit/sysvinit-inittab_2.%.bbappend | 16 + .../recipes-devtools/qemu/qemu_%.bbappend | 18 + .../xen-devicetree/files/xen.dtsi.in | 17 + .../xen-devicetree/xen-devicetree.bb | 72 + .../recipes-extended/xen/xen_%.bbappend | 14 + .../xenguest/files/network-bridge.sh.in | 15 + .../recipes-extended/xenguest/files/xenguest-init | 85 + .../xenguest/files/xenguest-manager | 665 ++ .../xenguest/files/xenguest-mkimage | 772 ++ .../files/xenguest-network-bridge-dhcp.cfg.in | 3 + .../xenguest/files/xenguest-network-bridge.in | 44 + .../xenguest/xenguest-base-image.bb | 119 + .../recipes-extended/xenguest/xenguest-manager.bb | 52 + .../recipes-extended/xenguest/xenguest-mkimage.bb | 31 + .../xenguest/xenguest-network-bridge.bb | 52 + .../xenguest/xenguest-nodisk-image.bb | 38 + .../arm-autonomy/arm64-autonomy-guest-standard.scc | 5 + .../bsp/arm-autonomy/arm64-autonomy-guest.cfg | 2 + .../bsp/arm-autonomy/arm64-autonomy-guest.scc | 6 + .../features/arm-autonomy/xen-guest.cfg | 54 + .../features/arm-autonomy/xen-guest.scc | 4 + .../features/arm-autonomy/xen-host.cfg | 38 + .../features/arm-autonomy/xen-host.scc | 4 + .../recipes-kernel/linux/linux-%.bbappend | 3 + .../recipes-kernel/linux/linux-arm-autonomy.inc | 22 + .../classes/image_types_disk_img.bbclass | 155 + bsp/meta-arm/meta-arm-bsp/conf/layer.conf | 13 + bsp/meta-arm/meta-arm-bsp/conf/machine/a5ds.conf | 25 + .../conf/machine/foundation-armv8.conf | 14 + .../meta-arm-bsp/conf/machine/fvp-base.conf | 14 + .../meta-arm-bsp/conf/machine/fvp-common/fvp.inc | 43 + .../meta-arm-bsp/conf/machine/gem5-arm64.conf | 53 + bsp/meta-arm/meta-arm-bsp/conf/machine/juno.conf | 28 + bsp/meta-arm/meta-arm-bsp/conf/machine/n1sdp.conf | 23 + bsp/meta-arm/meta-arm-bsp/documentation/a5ds.md | 24 + .../meta-arm-bsp/documentation/foundation-armv8.md | 50 + .../meta-arm-bsp/documentation/fvp-base.md | 53 + .../meta-arm-bsp/documentation/gem5-arm64.md | 29 + bsp/meta-arm/meta-arm-bsp/documentation/juno.md | 75 + .../boot-wrapper-aaarch64/boot-wrapper-aarch64.inc | 87 + .../boot-wrapper-aarch64_git.bb | 27 + .../firmware/scp-firmware-juno_19.06.bb | 38 + .../recipes-bsp/images/firmware-image-juno.bb | 75 + .../images/firmware-image-juno/images-r0.txt | 71 + .../images/firmware-image-juno/images-r1.txt | 71 + .../images/firmware-image-juno/images-r2.txt | 71 + .../images/firmware-image-juno/uEnv.txt | 11 + ...1-plat-arm-a5ds-move-dtb-to-a-new-address.patch | 31 + .../trusted-firmware-a/trusted-firmware-a-a5ds.inc | 22 + .../trusted-firmware-a/trusted-firmware-a-fvp.inc | 13 + .../trusted-firmware-a/trusted-firmware-a-juno.inc | 13 + .../trusted-firmware-a_2.%.bbappend | 9 + .../trusted-firmware-a_git.bbappend | 7 + .../files/a5ds/0001-armv7-add-mmio-timer.patch | 105 + ...board-arm-add-designstart-cortex-a5-board.patch | 309 + .../files/fvp-common/u-boot_vexpress_fvp.patch | 13 + .../u-boot/files/juno/u-boot_vexpress_uenv.patch | 37 + .../recipes-bsp/u-boot/u-boot_%.bbappend | 8 + .../recipes-bsp/u-boot/u-boot_2020.%.bbappend | 13 + .../init-ifupdown/files/juno/interfaces | 32 + .../init-ifupdown/init-ifupdown_1.0.bbappend | 7 + .../recipes-devtools/gem5/files/start-gem5.sh | 39 + .../gem5/gem5-aarch64-bootloader.inc | 28 + .../gem5/gem5-aarch64-bootloader_git.bb | 18 + .../recipes-devtools/gem5/gem5-aarch64-dtb.bb | 30 + .../recipes-devtools/gem5/gem5-aarch64-native.inc | 42 + .../gem5/gem5-aarch64-native_git.bb | 26 + .../recipes-devtools/gem5/gem5-native.inc | 61 + .../bsp/arm-platforms/README.md | 4 + .../bsp/arm-platforms/fvp-standard.scc | 11 + .../arm-platforms-kmeta/bsp/arm-platforms/fvp.scc | 14 + .../bsp/arm-platforms/fvp/fvp-board.cfg | 11 + .../bsp/arm-platforms/fvp/fvp-cfi.cfg | 3 + .../bsp/arm-platforms/fvp/fvp-drm.cfg | 5 + .../bsp/arm-platforms/fvp/fvp-net.cfg | 2 + .../bsp/arm-platforms/fvp/fvp-rtc.cfg | 2 + .../bsp/arm-platforms/fvp/fvp-serial.cfg | 2 + .../bsp/arm-platforms/fvp/fvp-timer.cfg | 3 + .../bsp/arm-platforms/fvp/fvp-virtio.cfg | 4 + .../bsp/arm-platforms/fvp/fvp-watchdog.cfg | 3 + .../bsp/arm-platforms/gem5-arm64-standard.scc | 11 + .../bsp/arm-platforms/gem5-arm64.scc | 14 + .../arm-platforms/gem5-arm64/gem5-arm64-board.cfg | 23 + .../arm-platforms/gem5-arm64/gem5-arm64-cfi.cfg | 3 + .../arm-platforms/gem5-arm64/gem5-arm64-drm.cfg | 5 + .../arm-platforms/gem5-arm64/gem5-arm64-net.cfg | 2 + .../arm-platforms/gem5-arm64/gem5-arm64-pata.cfg | 12 + .../arm-platforms/gem5-arm64/gem5-arm64-pci.cfg | 2 + .../arm-platforms/gem5-arm64/gem5-arm64-rtc.cfg | 2 + .../arm-platforms/gem5-arm64/gem5-arm64-serial.cfg | 3 + .../arm-platforms/gem5-arm64/gem5-arm64-virtio.cfg | 9 + .../bsp/arm-platforms/juno-standard.scc | 11 + .../arm-platforms-kmeta/bsp/arm-platforms/juno.scc | 22 + .../bsp/arm-platforms/juno/juno-board.cfg | 43 + .../bsp/arm-platforms/juno/juno-devfreq.cfg | 4 + .../bsp/arm-platforms/juno/juno-dma.cfg | 5 + .../bsp/arm-platforms/juno/juno-drm.cfg | 6 + .../bsp/arm-platforms/juno/juno-fb.cfg | 4 + .../bsp/arm-platforms/juno/juno-i2c.cfg | 2 + .../bsp/arm-platforms/juno/juno-mali-midgard.cfg | 7 + .../bsp/arm-platforms/juno/juno-mmc.cfg | 2 + .../bsp/arm-platforms/juno/juno-net.cfg | 2 + .../bsp/arm-platforms/juno/juno-pci.cfg | 11 + .../bsp/arm-platforms/juno/juno-rtc.cfg | 2 + .../bsp/arm-platforms/juno/juno-sata.cfg | 3 + .../bsp/arm-platforms/juno/juno-serial.cfg | 2 + .../bsp/arm-platforms/juno/juno-sound.cfg | 13 + .../bsp/arm-platforms/juno/juno-thermal.cfg | 5 + .../bsp/arm-platforms/juno/juno-usb.cfg | 7 + ...g-Allow-specification-of-ncurses-location.patch | 52 + .../dts/arm/fvp-base-gicv3-psci-common-custom.dtsi | 264 + .../files/dts/arm/fvp-base-gicv3-psci-custom.dts | 9 + .../files/dts/arm/rtsm_ve-motherboard-nomap.dtsi | 282 + .../files/dts/gem5-arm64/armv8_gem5_v2_1cpu.dts | 95 + .../files/dts/gem5-arm64/armv8_gem5_v2_2cpu.dts | 103 + .../files/dts/gem5-arm64/armv8_gem5_v2_4cpu.dts | 119 + .../files/dts/gem5-arm64/armv8_gem5_v2_8cpu.dts | 151 + .../files/dts/gem5-arm64/vexpress_gem5_v2.dtsi | 46 + .../dts/gem5-arm64/vexpress_gem5_v2_base.dtsi | 202 + ...ommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch | 46 + ...ci_quirk-add-acs-override-for-PCI-devices.patch | 156 + ...quirk-for-the-Arm-Neoverse-N1SDP-platform.patch | 318 + ...update-n1sdp-pci-quirk-for-SR-IOV-support.patch | 51 + .../n1sdp/disable-extra-fw.cfg | 2 + .../recipes-kernel/linux/linux-linaro-arm_4.19.bb | 32 + .../linux/linux-linaro-arm_4.19.bbappend | 3 + .../recipes-kernel/linux/linux-linaro-arm_5.4.bb | 21 + .../linux/linux-linaro-arm_5.4.bbappend | 28 + .../linux/linux-upstream-arm-platforms.inc | 24 + .../recipes-kernel/linux/linux-upstream-arm_5.3.bb | 8 + .../linux/linux-yocto-arm-platforms.inc | 47 + .../recipes-kernel/linux/linux-yocto_5.4.bbappend | 3 + .../include/external-arm-toolchain-versions.inc | 133 + .../conf/distro/include/tcmode-external-arm.inc | 114 + bsp/meta-arm/meta-arm-toolchain/conf/layer.conf | 15 + .../external-arm-toolchain.bb | 666 ++ .../external-arm-toolchain/files/SUPPORTED | 1 + .../recipes-devtools/gcc/gcc-arm-8.2.inc | 115 + .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 + .../0003-gcc-poison-system-directories.patch | 194 + .../0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 + .../gcc-arm-8.2/0006-64-bit-multilib-hack.patch | 85 + .../gcc/gcc-arm-8.2/0007-optional-libstdc.patch | 125 + ...0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 + .../gcc/gcc-arm-8.2/0009-COLLECT_GCC_OPTIONS.patch | 38 + ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 + .../0011-fortran-cross-compile-hack.patch | 46 + .../gcc/gcc-arm-8.2/0012-cpp-honor-sysroot.patch | 54 + .../0013-MIPS64-Default-to-N64-ABI.patch | 57 + ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 248 + ...0015-gcc-Fix-argument-list-too-long-error.patch | 40 + .../gcc/gcc-arm-8.2/0016-Disable-sdt.patch | 113 + .../gcc/gcc-arm-8.2/0017-libtool.patch | 42 + ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 + ...tilib-config-files-from-B-instead-of-usin.patch | 102 + ...-libdir-from-.la-which-usually-points-to-.patch | 31 + .../gcc/gcc-arm-8.2/0021-export-CPP.patch | 53 + ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 + ...Ensure-target-gcc-headers-can-be-included.patch | 62 + ...-t-build-with-disable-dependency-tracking.patch | 54 + ...h-host-directory-during-relink-if-inst_pr.patch | 38 + ...IBS_DIR-replacement-instead-of-hardcoding.patch | 29 + .../0027-aarch64-Add-support-for-musl-ldso.patch | 28 + ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 + ...-handle-sysroot-support-for-nativesdk-gcc.patch | 213 + ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 + ...-various-_FOR_BUILD-and-related-variables.patch | 137 + .../0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 + ...shared-to-link-commandline-for-musl-targe.patch | 87 + ...34-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 465 + ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 + ...e-alias-for-__cpu_indicator_init-instead-.patch | 86 + .../0037-sync-gcc-stddef.h-with-musl.patch | 91 + ...ation-fault-in-precompiled-header-generat.patch | 60 + .../0039-Fix-for-testsuite-failure.patch | 258 + ...0040-Re-introduce-spe-commandline-options.patch | 41 + .../gcc/gcc-arm-8.2/0041-ARC-fix-spec-gen.patch | 44 + ...werpc-powerpc64-Add-support-for-musl-ldso.patch | 31 + .../0043-riscv-Disable-multilib-for-OE.patch | 27 + .../recipes-devtools/gcc/gcc-arm-8.3.inc | 114 + .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 + .../0002-gcc-poison-system-directories.patch | 203 + .../0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 + .../gcc-arm-8.3/0004-64-bit-multilib-hack.patch | 85 + .../gcc/gcc-arm-8.3/0005-optional-libstdc.patch | 125 + ...0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 + .../gcc/gcc-arm-8.3/0007-COLLECT_GCC_OPTIONS.patch | 38 + ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 + .../0009-fortran-cross-compile-hack.patch | 46 + .../gcc/gcc-arm-8.3/0010-cpp-honor-sysroot.patch | 54 + .../0011-MIPS64-Default-to-N64-ABI.patch | 57 + ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 248 + ...0013-gcc-Fix-argument-list-too-long-error.patch | 40 + .../gcc/gcc-arm-8.3/0014-Disable-sdt.patch | 113 + .../gcc/gcc-arm-8.3/0015-libtool.patch | 42 + ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 + ...tilib-config-files-from-B-instead-of-usin.patch | 102 + ...-libdir-from-.la-which-usually-points-to-.patch | 31 + .../gcc/gcc-arm-8.3/0019-export-CPP.patch | 53 + ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 + ...Ensure-target-gcc-headers-can-be-included.patch | 98 + ...-t-build-with-disable-dependency-tracking.patch | 54 + ...h-host-directory-during-relink-if-inst_pr.patch | 38 + ...IBS_DIR-replacement-instead-of-hardcoding.patch | 28 + .../0025-aarch64-Add-support-for-musl-ldso.patch | 28 + ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 + ...-handle-sysroot-support-for-nativesdk-gcc.patch | 213 + ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 + ...-various-_FOR_BUILD-and-related-variables.patch | 137 + .../0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 + ...shared-to-link-commandline-for-musl-targe.patch | 87 + ...32-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 125 + ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 + ...e-alias-for-__cpu_indicator_init-instead-.patch | 85 + .../0035-sync-gcc-stddef.h-with-musl.patch | 91 + ...ation-fault-in-precompiled-header-generat.patch | 60 + .../0037-Fix-for-testsuite-failure.patch | 258 + ...0038-Re-introduce-spe-commandline-options.patch | 41 + .../0039-riscv-Disable-multilib-for-OE.patch | 27 + ...werpc-powerpc64-Add-support-for-musl-ldso.patch | 31 + .../recipes-devtools/gcc/gcc-arm-9.2.inc | 124 + .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 + .../0002-gcc-poison-system-directories.patch | 203 + .../0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 + .../gcc-arm-9.2/0004-64-bit-multilib-hack.patch | 119 + .../gcc/gcc-arm-9.2/0005-optional-libstdc.patch | 125 + .../gcc/gcc-arm-9.2/0006-COLLECT_GCC_OPTIONS.patch | 38 + ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 + .../0008-fortran-cross-compile-hack.patch | 46 + .../gcc/gcc-arm-9.2/0009-cpp-honor-sysroot.patch | 54 + .../0010-MIPS64-Default-to-N64-ABI.patch | 57 + ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 243 + ...0012-gcc-Fix-argument-list-too-long-error.patch | 40 + .../gcc/gcc-arm-9.2/0013-Disable-sdt.patch | 113 + .../gcc/gcc-arm-9.2/0014-libtool.patch | 42 + ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 43 + ...tilib-config-files-from-B-instead-of-usin.patch | 102 + ...-libdir-from-.la-which-usually-points-to-.patch | 31 + .../gcc/gcc-arm-9.2/0018-export-CPP.patch | 53 + ...Ensure-target-gcc-headers-can-be-included.patch | 55 + ...-t-build-with-disable-dependency-tracking.patch | 54 + ...h-host-directory-during-relink-if-inst_pr.patch | 38 + ...IBS_DIR-replacement-instead-of-hardcoding.patch | 29 + .../0023-aarch64-Add-support-for-musl-ldso.patch | 28 + ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 54 + ...-handle-sysroot-support-for-nativesdk-gcc.patch | 346 + ...et-sysroot-gcc-version-specific-dirs-with.patch | 102 + ...-various-_FOR_BUILD-and-related-variables.patch | 137 + .../0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 + ...shared-to-link-commandline-for-musl-targe.patch | 87 + ...30-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 79 + ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 + ...e-alias-for-__cpu_indicator_init-instead-.patch | 86 + .../0033-sync-gcc-stddef.h-with-musl.patch | 91 + ...ation-fault-in-precompiled-header-generat.patch | 60 + .../0035-Fix-for-testsuite-failure.patch | 258 + ...0036-Re-introduce-spe-commandline-options.patch | 41 + ...x-up-libsanitizer-build-with-master-glibc.patch | 70 + .../recipes-devtools/gcc/gcc-arm-common.inc | 27 + .../gcc/gcc-cross-canadian_arm-8.2.bb | 5 + .../gcc/gcc-cross-canadian_arm-8.3.bb | 5 + .../gcc/gcc-cross-canadian_arm-9.2.bb | 5 + .../recipes-devtools/gcc/gcc-cross_arm-8.2.bb | 3 + .../recipes-devtools/gcc/gcc-cross_arm-8.3.bb | 3 + .../recipes-devtools/gcc/gcc-cross_arm-9.2.bb | 3 + .../recipes-devtools/gcc/gcc-crosssdk_arm-8.2.bb | 2 + .../recipes-devtools/gcc/gcc-crosssdk_arm-8.3.bb | 2 + .../recipes-devtools/gcc/gcc-crosssdk_arm-9.2.bb | 2 + .../recipes-devtools/gcc/gcc-runtime_arm-8.2.bb | 7 + .../recipes-devtools/gcc/gcc-runtime_arm-8.3.bb | 7 + .../recipes-devtools/gcc/gcc-runtime_arm-9.2.bb | 2 + .../recipes-devtools/gcc/gcc-sanitizers_arm-8.2.bb | 2 + .../recipes-devtools/gcc/gcc-sanitizers_arm-8.3.bb | 2 + .../recipes-devtools/gcc/gcc-sanitizers_arm-9.2.bb | 7 + .../recipes-devtools/gcc/gcc-source_arm-8.2.bb | 4 + .../recipes-devtools/gcc/gcc-source_arm-8.3.bb | 4 + .../recipes-devtools/gcc/gcc-source_arm-9.2.bb | 4 + .../recipes-devtools/gcc/gcc_arm-8.2.bb | 15 + .../recipes-devtools/gcc/gcc_arm-8.3.bb | 15 + .../recipes-devtools/gcc/gcc_arm-9.2.bb | 15 + .../recipes-devtools/gcc/libgcc-initial_arm-8.2.bb | 2 + .../recipes-devtools/gcc/libgcc-initial_arm-8.3.bb | 2 + .../recipes-devtools/gcc/libgcc-initial_arm-9.2.bb | 5 + .../recipes-devtools/gcc/libgcc_arm-8.2.bb | 2 + .../recipes-devtools/gcc/libgcc_arm-8.3.bb | 2 + .../recipes-devtools/gcc/libgcc_arm-9.2.bb | 5 + .../recipes-devtools/gcc/libgfortran_arm-8.2.bb | 3 + .../recipes-devtools/gcc/libgfortran_arm-8.3.bb | 3 + .../recipes-devtools/gcc/libgfortran_arm-9.2.bb | 3 + bsp/meta-arm/meta-arm/conf/layer.conf | 16 + .../trusted-firmware-a/trusted-firmware-a.inc | 169 + .../trusted-firmware-a/trusted-firmware-a_2.1.bb | 38 + .../trusted-firmware-a/trusted-firmware-a_2.2.bb | 38 + .../trusted-firmware-a/trusted-firmware-a_2.3.bb | 38 + .../trusted-firmware-a/trusted-firmware-a_git.bb | 31 + .../recipes-devtools/opencsd/opencsd_git.bb | 31 + .../optee/optee-client/tee-supplicant.service | 10 + .../recipes-security/optee/optee-client_git.bb | 41 + .../recipes-security/optee/optee-examples_git.bb | 47 + ...1-allow-setting-sysroot-for-libgcc-lookup.patch | 13 + .../recipes-security/optee/optee-os_git.bb | 80 + .../recipes-security/optee/optee-test_git.bb | 50 + .../meta-arm/recipes-security/optee/optee.inc | 2 + .../classes/image_types_boundary.bbclass | 117 - .../conf/distro/boundary-wayland.conf | 16 - bsp/meta-boundary/conf/layer.conf | 22 - bsp/meta-boundary/conf/machine/imx6-acl.conf | 52 - bsp/meta-boundary/conf/machine/nitrogen8mm.conf | 46 - .../qtbrowser-qt5/qtbrowser-qt5_git.bb | 24 - .../images/boundary-eval-image-xfce.bb | 47 - bsp/meta-boundary/licenses/boundary | 2 - .../recipes-boundary/app-startup/app-startup.bb | 27 - .../recipes-boundary/app-startup/files/app | 46 - .../app-startup/files/root.profile | 5 - .../recipes-boundary/daemonize/daemonize.bb | 16 - .../recipes-boundary/devregs/devregs.bb | 22 - .../images/boundary-image-multimedia-full.bb | 17 - .../recipes-boundary/libmdi2300/libmdi2300_git.bb | 30 - .../printer-tools/printer-tools_git.bb | 30 - .../sysklogd-config-remote/files/COPYING | 282 - .../sysklogd-config-remote/files/syslogd | 4 - .../sysklogd-config-remote.bb | 23 - .../video-input-icon/files/COPYING | 12 - .../files/OV5640-MIPI-Test.desktop | 9 - .../video-input-icon/files/OV5642.desktop | 9 - .../video-input-icon/files/hdmi-input | 1 - .../video-input-icon/files/hdmi-input.desktop | 9 - .../video-input-icon/files/ov5640-mipi-test | 1 - .../video-input-icon/files/ov5642-test | 1 - .../video-input-icon/video-input-icon.bb | 60 - .../recipes-bsp/alsa-state/alsa-state.bbappend | 6 - .../alsa-state/alsa-state/mx6/asound.state | 1878 ---- .../alsa-state/alsa-state/mx7/asound.state | 1374 --- .../recipes-bsp/imx-mkimage/imx-boot_%.bbappend | 45 - .../recipes-bsp/imx-mkimage/imx-mkimage%.bbappend | 5 - .../recipes-bsp/u-boot/boundary/fw_env.config | 1 - .../recipes-bsp/u-boot/u-boot-boundary_%.bbappend | 4 - .../recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend | 11 - .../u-boot/u-boot-script-boundary_%.bbappend | 6 - ...01-hciattach-add-QCA9377-Tuffello-support.patch | 2379 ----- .../recipes-connectivity/bluez5/bluez5_%.bbappend | 12 - .../networkmanager/files/NetworkManager.conf | 6 - .../networkmanager/networkmanager_%.bbappend | 12 - .../recipes-core/busybox/busybox/custom-ash.cfg | 3 - .../recipes-core/busybox/busybox_%.bbappend | 8 - .../recipes-core/init-ifupdown/boundary/interfaces | 27 - .../init-ifupdown/init-ifupdown_1.0.bbappend | 3 - .../recipes-core/microcom/microcom_git.bb | 15 - .../recipes-core/psplash/files/boundary-logo-img.h | 1776 ---- .../recipes-core/psplash/psplash_git.bbappend | 3 - .../recipes-graphics/tslib_%.bbappend | 8 - .../wayland/weston/mx8mm/weston.ini | 29 - .../wayland/weston/mx8mq/weston.ini | 25 - .../wayland/weston_4.0.0.imx.bbappend | 11 - .../xinput-calibrator_git.bbappend | 8 - .../0001-v2-xserver-xorg-Fix-X-server-crash.patch | 45 - .../xorg-xserver/xserver-xorg_1.20.1.bbappend | 4 - .../recipes-kernel/kernel-iio/kernel-iio.bb | 51 - .../kernel-modules/kernel-module-qcacld_git.bb | 18 - .../linux-firmware/linux-firmware-bdsdmac_git.bb | 35 - .../linux-firmware/linux-firmware-gslx680_1.0.bb | 29 - .../linux-firmware/linux-firmware_git.bbappend | 16 - .../recipes-kernel/linux/linux-boundary_%.bbappend | 23 - .../recipes-kernel/linux/linux-boundary_4.14.x.bb | 22 - .../linux/linux-imx-headers_4.14.x.bb | 58 - .../recipes-sato/images/boundary-eval-image.bb | 49 - .../packagegroup-core-x11-sato.bbappend | 2 - bsp/meta-freescale-3rdparty/.gitignore | 4 + bsp/meta-freescale-3rdparty/README | 24 +- bsp/meta-freescale-3rdparty/conf/layer.conf | 10 +- .../conf/machine/apalis-imx6.conf | 7 +- .../conf/machine/ccimx6ulsbcexpress.conf | 38 - .../conf/machine/cgtqmx6.conf | 4 +- .../conf/machine/cm-fx6.conf | 21 - .../conf/machine/colibri-imx6.conf | 8 +- .../conf/machine/colibri-imx6ull.conf | 7 +- .../conf/machine/colibri-imx7-emmc.conf | 30 + .../conf/machine/colibri-imx7-nand.conf | 54 + .../conf/machine/colibri-imx7.conf | 42 - .../conf/machine/colibri-vf.conf | 25 +- .../conf/machine/cubox-i.conf | 4 +- .../conf/machine/imx6dl-riotboard.conf | 2 +- .../conf/machine/imx6q-dms-ba16.conf | 4 +- .../conf/machine/imx6qdl-pico.conf | 50 + .../conf/machine/imx6qdl-variscite-som.conf | 6 +- .../conf/machine/imx6qsabrelite.conf | 13 - .../conf/machine/imx6sl-warp.conf | 5 +- .../conf/machine/imx6ul-kontron.conf | 62 + .../conf/machine/imx6ul-pico.conf | 14 +- .../conf/machine/imx7d-pico.conf | 18 +- .../conf/machine/imx7s-warp.conf | 7 +- .../conf/machine/include/ccimx6ulsom.inc | 42 + .../conf/machine/include/tx6-karo-common.inc | 18 - .../conf/machine/lx2160acex7.conf | 49 + .../conf/machine/m28evk.conf | 26 - .../conf/machine/m53evk.conf | 28 - .../conf/machine/nitrogen6sx.conf | 6 +- .../conf/machine/nitrogen6x-lite.conf | 6 +- .../conf/machine/nitrogen6x.conf | 6 +- .../conf/machine/nitrogen7.conf | 6 +- .../conf/machine/nitrogen8m.conf | 27 +- .../conf/machine/nitrogen8mm.conf | 65 + .../conf/machine/nitrogen8mn.conf | 60 + .../conf/machine/pcm052.conf | 25 - .../conf/machine/tx6q-10x0.conf | 13 - .../conf/machine/tx6q-11x0.conf | 13 - .../conf/machine/tx6s-8034.conf | 13 - .../conf/machine/tx6s-8035.conf | 13 - .../conf/machine/tx6u-8033.conf | 13 - .../conf/machine/tx6u-80x0.conf | 13 - .../conf/machine/tx6u-81x0.conf | 13 - .../conf/machine/ventana.conf | 2 +- .../conf/machine/wandboard.conf | 8 +- ...1-plat-nxp-Add-lx2160acex7-module-support.patch | 370 + .../0002-plat-nxp-lx2160a-auto-boot.patch | 194 + .../recipes-bsp/atf/atf_git.bbappend | 6 + .../broadcom-nvram-config/bcm4339-nvram-config.bb | 2 +- .../files/imx6qdl-pico/brcmfmac4339-sdio.txt | 99 + .../files/imx6ul-pico/brcmfmac4339-sdio.txt | 99 + .../recipes-bsp/imx-atf/imx-atf-boundary_2.3.bb | 56 + .../recipes-bsp/libmcc2/libmcc2_2.0.1.bb | 26 - ...-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch | 1912 ++++ .../recipes-bsp/mc-utils/mc-utils_git.bbappend | 7 + .../0001-lx2160acex7-misc-RCW-files.patch | 640 ++ .../rcw-lx2160acex7/0002-Set-io-pads-as-GPIO.patch | 38 + ...2-enable-gen3-xspi-increase-divisor-to-28.patch | 42 + ...0004-refactor-a009531-a008851-and-a011270.patch | 181 + ...-SVR-check-for-a050234-to-apply-only-on-r.patch | 32 + ...acex7-pcie-workarounds-and-fan-full-speed.patch | 95 + .../0008-lx2160a-add-generic-bootloc-section.patch | 113 + ...2160acex7-remove-all-predefined-RCW-files.patch | 301 + .../recipes-bsp/rcw/rcw_git.bbappend | 29 + .../u-boot/u-boot-boundary-common_2018.07.inc | 4 +- .../u-boot-boundary-fw-utils/aarch64/fw_env.config | 1 - .../u-boot-boundary-fw-utils/arm/fw_env.config | 1 - .../u-boot/u-boot-boundary-fw-utils_2018.07.bb | 46 - .../u-boot/u-boot-boundary/aarch64/fw_env.config | 1 + .../u-boot/u-boot-boundary/arm/fw_env.config | 1 + .../recipes-bsp/u-boot/u-boot-boundary_2018.07.bb | 12 +- .../recipes-bsp/u-boot/u-boot-compulab_2014.10.bb | 17 - .../u-boot/u-boot-digi/ccimx6ul/bootscript.txt | 7 - .../recipes-bsp/u-boot/u-boot-digi_2017.03.bb | 40 - .../recipes-bsp/u-boot/u-boot-karo_git.bb | 19 - .../u-boot/u-boot-kontron/fw_env.config | 1 + .../recipes-bsp/u-boot/u-boot-kontron_2020.01.bb | 37 + ...001-armv8-add-lx2160acex7-build-inclusion.patch | 75 + ...0acex-misc-hacks-to-get-the-sources-built.patch | 44 + ...0acex7-defconfig-and-main-platform-includ.patch | 192 + ...60acex7-common-files-for-platform-support.patch | 1720 ++++ ...-armv8-lx2160acex7-lx2160acex-device-tree.patch | 91 + ...006-armv8-lx2160acex7-board-support-files.patch | 519 + ...d-dpl-into-0x80001000-instead-of-0x80d000.patch | 47 + ...boot-add-nvme-commands-and-for-distroboot.patch | 41 + ...-lx2160acex7-Fix-booting-from-NVMe-drives.patch | 33 + ...me-add-accessor-to-namespace-id-and-eui64.patch | 90 + ...flush-dcache-on-both-r-w-and-the-prp-list.patch | 51 + ...-page-aligned-buffer-for-identify-command.patch | 94 + ...a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch | 923 ++ ...acex7-pcie-fixup-and-boot-from-eMMC-print.patch | 128 + ...7-set-mmc-dev-to-0-when-attempting-sd_boo.patch | 32 + ...160acex7-Misc-fixes-to-support-LSDK-20.04.patch | 127 + ...-misc-fixes-to-get-booting-from-eMMC-func.patch | 70 + .../u-boot/u-boot-qoriq_2019.10.bbappend | 22 + .../u-boot/u-boot-script-boundary_2018.07.bb | 2 +- .../u-boot/u-boot-script-qoriq/boot.cmd.in | 12 + .../u-boot/u-boot-script-qoriq_2019.10.bb | 54 + .../u-boot/u-boot-script-toradex/boot.cmd.in | 30 + .../u-boot/u-boot-script-toradex_2019.07.bb | 45 + .../recipes-bsp/u-boot/u-boot-toradex-common.inc | 22 + ...ross-compiling-tools-when-HOSTCC-is-overr.patch | 54 - .../colibri-imx6ull/fw_env.config | 10 - .../colibri-imx7/fw_env.config | 10 - .../u-boot/u-boot-toradex-fw-utils/fw_env.config | 22 - .../u-boot-toradex-fw-utils/mx6/fw_env.config | 17 - .../u-boot-toradex-fw-utils/vf/fw_env.config | 10 - .../u-boot/u-boot-toradex-fw-utils_2016.11.bb | 42 - .../u-boot-toradex/colibri-imx6ull/fw_env.config | 10 + .../u-boot-toradex/colibri-imx7-emmc/fw_env.config | 17 + .../u-boot-toradex/colibri-imx7/fw_env.config | 10 + .../u-boot/u-boot-toradex/fw_env.config | 22 + .../u-boot/u-boot-toradex/mx6/fw_env.config | 17 + .../u-boot/u-boot-toradex/vf/fw_env.config | 10 + .../recipes-bsp/u-boot/u-boot-toradex_2016.11.bb | 8 - .../recipes-bsp/u-boot/u-boot-toradex_2016.11.inc | 20 - .../recipes-bsp/u-boot/u-boot-toradex_2019.07.bb | 31 + .../0001-Fix-build-with-recent-layers.patch | 34 + .../recipes-bsp/u-boot/u-boot-variscite_2017.03.bb | 6 +- .../init-ifupdown/ccimx6ulsbcexpress/interfaces | 39 + .../init-ifupdown/ccimx6ulsbcpro/interfaces | 40 + .../recipes-core/udev/udev-rules-digi.bb | 25 + .../udev/udev-rules-digi/ccimx6ul/81-qcom-bt.rules | 2 + .../udev-rules-digi/ccimx6ul/81-qcom-wifi.rules | 2 + .../udev-rules-digi/ccimx6ul/qca6564-attach.sh | 97 + .../udev-rules-digi/ccimx6ul/qca6564-init-wifi.sh | 121 + .../kernel-modules/kernel-module-mcc_2.1.01.bb | 20 - .../kernel-module-qca6564/modprobe-qca6564.conf | 4 + .../kernel-modules/kernel-module-qca6564_git.bb | 57 + .../linux-firmware-qca6564_2.4-r2.2.bb | 31 + .../linux-firmware/linux-firmware_%.bbappend | 15 + .../linux-firmware/linux-firmware_git.bbappend | 15 - .../recipes-kernel/linux/linux-advantech_4.9.bb | 18 - .../recipes-kernel/linux/linux-advantech_5.4.bb | 18 + .../linux/linux-boundary-4.9.x/arm/defconfig | 507 - .../linux/linux-boundary-4.9.x/arm64/defconfig | 583 -- .../recipes-kernel/linux/linux-boundary_4.9.x.bb | 20 - .../recipes-kernel/linux/linux-boundary_5.4.bb | 24 + ...-i.MX6-dts-Add-initial-support-for-cm-fx6.patch | 399 - .../0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch | 456 - .../0003-igb-Enable-random-mac-address.patch | 32 - .../0004-ARM-i.MX6-cm-fx6-update-defconfig.patch | 27 - ...05-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch | 101 - ...0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch | 40 - .../0007-ARM-i.MX6-dts-add-SPDIF-support.patch | 69 - .../0008-ARM-i.MX6-dts-add-Power-Button.patch | 36 - ....MX6-dts-Enable-uart2-as-a-serial-console.patch | 50 - ...-dts-add-pcie-power-reset-gpio-definition.patch | 44 - ...MX6-dts-add-onboard-SSD-pin-configuration.patch | 46 - ...MX6-dts-add-onboard-SSD-power-up-sequence.patch | 92 - ...X6-dts-add-audio-mux-pinmux-configuration.patch | 47 - ...14-ARM-i.MX6-dts-add-analog-audio-support.patch | 67 - ...-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch | 573 -- ...6-ASoC-add-imx-wm8731-master-mode-support.patch | 335 - .../0017-ARM-i.MX6-dts-enable-v4l2-output.patch | 31 - ...X6-dts-some-small-changes-in-the-dts-file.patch | 52 - ...ine-the-device-mac-address-in-device-tree.patch | 79 - .../0020-ARM-i.MX6-cm-fx6-update-defconfig.patch | 87 - ...ts-refactoring-the-cm-fx6-device-tree-fil.patch | 1112 --- ...ts-refactoring-of-the-cm-fx6-device-tree-.patch | 1422 --- ...ts-pcie-power-on-gpio-to-a-fixed-regulato.patch | 46 - .../0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch | 45 - ...6-dts-add-local-mac-address-field-for-fec.patch | 28 - ...-ARM-mxs-change-usb-phy-test-clock-gating.patch | 36 - ...i.MX6-dts-fix-the-cm-fx6-operation-points.patch | 51 - ...SoC-fix-build-warnings-and-update-include.patch | 71 - ...0029-ARM-i.MX6-dts-change-issd-gpio-order.patch | 67 - ...RM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch | 30 - ...M-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch | 29 - ...X6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch | 53 - ...dts-add-i2cmux-support-for-SBC-FX6-boards.patch | 172 - .../0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch | 46 - ...0035-video-mxc-IPUv3-fb-restore-sync-bits.patch | 114 - ...ts-add-backlight-support-for-SBC-FX6-boar.patch | 48 - ...ts-rearrangement-of-the-frame-buffers-def.patch | 70 - ...i.MX6-iomux-raise-DSE-for-display-signals.patch | 73 - ...MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch | 46 - ...RM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch | 54 - ...i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch | 37 - .../0042-ARM-dts-cm-fx6-enable-can-bus.patch | 29 - ...ts-cm-fx6-add-tsc2046-touchscreen-support.patch | 85 - ...b-fx6x-refactoring-of-the-usdhc3-definiti.patch | 84 - ...6-cm-fx6-fix-up-incorrect-compatibilities.patch | 47 - ...0046-ARM-i.MX6-dts-fix-include-file-order.patch | 129 - ...M-i.MX6-dts-rename-the-sb-fx6-board-files.patch | 570 -- ...MX6-dts-refactor-the-sbc-fx6-target-files.patch | 243 - ...M-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch | 1182 --- ...6-dts-add-initial-support-for-cm-fx6-DL-S.patch | 53 - ....MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch | 78 - ...fx6-add-build-targets-for-cm-fx6-flavour-.patch | 55 - ...m-fx6-change-the-hdmi_core-ipu-connection.patch | 47 - ...X6-dts-add-ldb-support-for-SBC-FX6-boards.patch | 90 - ...fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch | 47 - .../0056-i2c-fix-i2c_of-include.patch | 30 - .../0057-ARM-dts-cm-fx6-fix-missing-defines.patch | 66 - .../0058-imx6-hdmi-add-missing-definition.patch | 27 - .../0059-ARM-i.MX6-cm-fx6-update-defconfig.patch | 211 - .../linux/linux-compulab-3.14.28/defconfig | 443 - .../recipes-kernel/linux/linux-compulab_3.14.28.bb | 74 - .../recipes-kernel/linux/linux-denx.inc | 21 - .../linux/linux-denx/m53evk/defconfig | 290 - .../recipes-kernel/linux/linux-denx_3.9.bb | 10 - .../linux/linux-fslc-lts-4.19.bbappend | 19 + ...-mtd-gpmi-change-the-BCH-layout-setting-f.patch | 552 + ...6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch | 113 + ...6ul-use-nvmem-cells-for-cpu-speed-grading.patch | 38 + .../linux-fslc-lts-4.19/imx6q-var-som-vsc.dts | 144 + .../linux/linux-fslc-lts-4.19/imx6qdl-var-som.dtsi | 626 ++ ...lx2160a-add-lx2160acex7-device-tree-build.patch | 27 + ...4-dts-lx2160a-add-lx2160acex7-device-tree.patch | 225 + ...rm64-dts-lx2160a-cex7-add-ltc3882-support.patch | 39 + ...64-dts-lx2160a-cex7-add-on-module-eeproms.patch | 54 + ...-declare-IDT-bridge-as-hotpluggabl-bridge.patch | 27 + .../0008-pci-spr2803-quirk-to-fix-class-ID.patch | 41 + .../linux/linux-fslc-qoriq_5.4.bbappend | 1 + ...6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch | 32 + ...-net-wireless-Export-regulatory_hint_user.patch | 77 + ...wireless-Allow-for-firmware-to-handle-DFS.patch | 62 + ...s-Add-cfg80211_is_gratuitous_arp_unsolici.patch | 95 + .../0006-linux-crypto-caam-set-hwrng-quality.patch | 26 + .../recipes-kernel/linux/linux-fslc_%.bbappend | 17 + .../recipes-kernel/linux/linux-karo-3.16/defconfig | 397 - .../recipes-kernel/linux/linux-karo_3.16.bb | 17 - .../recipes-kernel/linux/linux-kontron/defconfig | 431 + .../recipes-kernel/linux/linux-kontron_5.4.bb | 29 + .../recipes-kernel/linux/linux-lx2160acex7.inc | 10 + .../recipes-kernel/linux/linux-qoriq_5.4.bbappend | 1 + ...10-phycore-rdk.dts-rename-to-vf610-pcm052.patch | 20 - .../linux/linux-timesys-3.13/pcm052/defconfig | 175 - .../recipes-kernel/linux/linux-timesys_3.13.bb | 17 - .../linux-toradex-4.14-2.0.x/apalis-imx6/defconfig | 380 + .../colibri-imx6/defconfig | 372 + .../colibri-imx6ull/defconfig | 384 + .../linux/linux-toradex-4.14-2.0.x/mx7/defconfig | 386 + .../linux/linux-toradex-4.9-1.0.x/defconfig | 481 - .../linux/linux-toradex_4.14-2.0.x.bb | 22 + .../recipes-kernel/linux/linux-toradex_4.4.bb | 6 +- .../linux/linux-toradex_4.9-1.0.x.bb | 19 - bsp/meta-freescale-3rdparty/wic/lx2160acex7.wks.in | 65 + bsp/meta-freescale/.gitignore | 4 + bsp/meta-freescale/EULA | 1050 +- bsp/meta-freescale/README | 22 +- bsp/meta-freescale/classes/dtc-145.bbclass | 7 - .../classes/fsl-dynamic-packagearch.bbclass | 28 +- bsp/meta-freescale/classes/fsl-eula-unpack.bbclass | 123 +- .../fsl-vivante-kernel-driver-handler.bbclass | 6 +- bsp/meta-freescale/classes/kernel-itbimage.bbclass | 6 +- .../classes/machine-overrides-extender.bbclass | 6 +- .../classes/qoriq_build_64bit_kernel.bbclass | 4 +- bsp/meta-freescale/classes/use-imx-headers.bbclass | 18 + bsp/meta-freescale/conf/layer.conf | 10 +- bsp/meta-freescale/conf/machine/imx25pdk.conf | 2 +- bsp/meta-freescale/conf/machine/imx28evk.conf | 2 +- .../conf/machine/imx6qdlsabreauto.conf | 4 +- .../conf/machine/imx6qdlsabresd.conf | 29 +- bsp/meta-freescale/conf/machine/imx6slevk.conf | 2 +- bsp/meta-freescale/conf/machine/imx6sllevk.conf | 12 +- .../conf/machine/imx6sxsabreauto.conf | 4 +- bsp/meta-freescale/conf/machine/imx6sxsabresd.conf | 2 +- bsp/meta-freescale/conf/machine/imx6ulevk.conf | 17 +- bsp/meta-freescale/conf/machine/imx6ullevk.conf | 23 +- bsp/meta-freescale/conf/machine/imx7dsabresd.conf | 17 +- bsp/meta-freescale/conf/machine/imx7ulpevk.conf | 30 +- bsp/meta-freescale/conf/machine/imx8mmevk.conf | 44 +- bsp/meta-freescale/conf/machine/imx8mnevk.conf | 61 + bsp/meta-freescale/conf/machine/imx8mqevk.conf | 44 +- bsp/meta-freescale/conf/machine/imx8qmmek.conf | 42 +- bsp/meta-freescale/conf/machine/imx8qxpmek.conf | 39 +- .../conf/machine/include/imx-base.inc | 131 +- .../conf/machine/include/qoriq-base.inc | 14 +- .../conf/machine/include/utilities.inc | 12 +- .../conf/machine/ls1012afrwy-32b.conf | 33 - bsp/meta-freescale/conf/machine/ls1012afrwy.conf | 4 +- .../conf/machine/ls1012ardb-32b.conf | 34 - bsp/meta-freescale/conf/machine/ls1012ardb.conf | 7 +- bsp/meta-freescale/conf/machine/ls1021atwr.conf | 14 +- bsp/meta-freescale/conf/machine/ls1028ardb.conf | 38 + .../conf/machine/ls1043ardb-32b.conf | 39 - bsp/meta-freescale/conf/machine/ls1043ardb-be.conf | 40 - bsp/meta-freescale/conf/machine/ls1043ardb.conf | 21 +- bsp/meta-freescale/conf/machine/ls1046afrwy.conf | 41 + .../conf/machine/ls1046ardb-32b.conf | 40 - bsp/meta-freescale/conf/machine/ls1046ardb-be.conf | 37 - bsp/meta-freescale/conf/machine/ls1046ardb.conf | 16 +- bsp/meta-freescale/conf/machine/ls1088ardb-be.conf | 34 - bsp/meta-freescale/conf/machine/ls1088ardb-pb.conf | 6 +- bsp/meta-freescale/conf/machine/ls1088ardb.conf | 6 +- bsp/meta-freescale/conf/machine/ls2080ardb.conf | 2 +- bsp/meta-freescale/conf/machine/ls2088ardb-be.conf | 35 - bsp/meta-freescale/conf/machine/ls2088ardb.conf | 8 +- bsp/meta-freescale/conf/machine/lx2160ardb.conf | 9 +- bsp/meta-freescale/conf/machine/mpc8548cds.conf | 4 +- bsp/meta-freescale/conf/machine/p1020rdb.conf | 12 +- bsp/meta-freescale/conf/machine/p2020rdb.conf | 18 +- bsp/meta-freescale/conf/machine/p2041rdb.conf | 9 +- bsp/meta-freescale/conf/machine/p3041ds.conf | 9 +- bsp/meta-freescale/conf/machine/p4080ds.conf | 9 +- bsp/meta-freescale/conf/machine/p5040ds-64b.conf | 7 +- bsp/meta-freescale/conf/machine/p5040ds.conf | 9 +- bsp/meta-freescale/conf/machine/t1024rdb-64b.conf | 7 +- bsp/meta-freescale/conf/machine/t1024rdb.conf | 9 +- .../conf/machine/t1042d4rdb-64b.conf | 7 +- bsp/meta-freescale/conf/machine/t1042d4rdb.conf | 7 +- bsp/meta-freescale/conf/machine/t2080rdb-64b.conf | 8 +- bsp/meta-freescale/conf/machine/t2080rdb.conf | 10 +- bsp/meta-freescale/conf/machine/t4240rdb-64b.conf | 4 +- bsp/meta-freescale/conf/machine/t4240rdb.conf | 6 +- .../recipes-graphics/wayland/weston-init.bbappend | 3 + .../recipes-graphics/wayland/weston-init.bbappend | 1 + .../wayland/weston-init/weston.ini | 104 + .../recipes-benchmark/glmark2/glmark2_%.bbappend | 8 +- .../openembedded-layer/recipes-dpaa/fmc/fmc_git.bb | 2 +- ...c-Opencv-app-can-t-run-on-imx6sx-with-cam.patch | 46 - .../recipes-support/opencv/opencv_3.4.%.bbappend | 5 - .../recipes-support/opencv/opencv_4.%.bbappend | 3 + .../qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc | 2 +- .../qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch | 13 - .../0016-Configure-eglfs-with-egl-pkg-config.patch | 13 - .../qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 27 +- .../qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend | 3 + .../recipes-bsp/atf/atf-tools_git.bb | 19 + bsp/meta-freescale/recipes-bsp/atf/atf_git.bb | 247 + .../change-file-endianess/change-file-endianess.bb | 19 - .../change-file-endianess/byte_swap.tcl | 40 - .../recipes-bsp/ddr-phy/ddr-phy_git.bb | 25 +- .../dp-firmware-cadence_20.04.bb | 30 + .../recipes-bsp/firmware-imx/firmware-imx-7.8.inc | 18 - .../recipes-bsp/firmware-imx/firmware-imx-8.5.inc | 18 + .../recipes-bsp/firmware-imx/firmware-imx-8_7.8.bb | 25 - .../recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb | 23 + .../firmware-imx/firmware-imx-8m_7.8.bb | 24 - .../firmware-imx/firmware-imx-8m_8.5.bb | 24 + .../firmware-imx/firmware-imx-8x_7.8.bb | 20 - .../recipes-bsp/firmware-imx/firmware-imx_7.8.bb | 106 - .../recipes-bsp/firmware-imx/firmware-imx_8.5.bb | 76 + .../recipes-bsp/firmware-qca/firmware-qca.inc | 15 + .../firmware-qca/firmware-qca6174_3.0.1.bb | 27 + .../firmware-qca/firmware-qca9377_3.0.1.bb | 27 + .../recipes-bsp/firmware-qca/qca-tools_3.0.1.bb | 20 + .../recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb | 2 +- .../recipes-bsp/imx-atf/imx-atf_1.5.0.bb | 47 - .../recipes-bsp/imx-atf/imx-atf_2.0.bb | 57 + .../recipes-bsp/imx-kobs/imx-kobs_git.bb | 7 +- .../recipes-bsp/imx-mkimage/imx-boot_0.2.bb | 69 +- .../recipes-bsp/imx-mkimage/imx-mkimage_git.inc | 6 +- .../imx-sc-firmware/imx-sc-firmware_0.9.bb | 38 - .../imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb | 38 + .../recipes-bsp/imx-seco/imx-seco_2.3.1.bb | 30 + ...st-fix-compilation-error-produced-by-gcc9.patch | 39 + ...t-Makefile-Add-include-path-to-CC-command.patch | 27 - .../recipes-bsp/imx-test/imx-test_git.bb | 29 +- .../recipes-bsp/imx-uuc/imx-uuc_git.bb | 11 +- ...-i.MX-custom-headers-from-usr-include-imx.patch | 49 - .../imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb | 34 + .../imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb | 35 - .../recipes-bsp/imx-vpu/imx-vpu_5.4.38.bb | 31 - .../recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb | 31 + bsp/meta-freescale/recipes-bsp/inphi/inphi_git.bb | 4 +- .../recipes-bsp/libimxdmabuffer/files/run-ptest | 10 + .../libimxdmabuffer/libimxdmabuffer_1.0.1.bb | 46 + .../recipes-bsp/ls2-phy/ls2-phy_git.bb | 6 +- .../recipes-bsp/mc-utils/mc-utils_git.bb | 28 +- .../recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb | 6 +- .../recipes-bsp/qe-ucode/qe-ucode_git.bb | 19 +- bsp/meta-freescale/recipes-bsp/rcw/rcw_git.bb | 28 +- .../u-boot/u-boot-fslc-common_2018.11.inc | 18 - .../u-boot/u-boot-fslc-common_2020.04.inc | 19 + .../u-boot/u-boot-fslc-fw-utils_2018.11.bb | 45 - .../u-boot/u-boot-fslc-mxsboot_2018.11.bb | 32 - .../u-boot/u-boot-fslc-mxsboot_2020.04.bb | 32 + .../recipes-bsp/u-boot/u-boot-fslc_2018.11.bb | 21 - .../recipes-bsp/u-boot/u-boot-fslc_2020.04.bb | 23 + .../recipes-bsp/u-boot/u-boot-imx-common.inc | 20 + .../u-boot/u-boot-imx-mfgtool_2017.03.bb | 8 - .../u-boot/u-boot-imx-mfgtool_2019.04.bb | 8 + .../recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb | 10 + ...dd-target-to-generate-initial-environment.patch | 49 + .../0001-tools-allow-to-override-python.patch | 46 - .../recipes-bsp/u-boot/u-boot-imx_2017.03.bb | 50 - .../recipes-bsp/u-boot/u-boot-imx_2019.04.bb | 35 + .../u-boot/u-boot-qoriq-common_2018.03.inc | 19 - .../u-boot/u-boot-qoriq-common_2018.09.inc | 19 - .../u-boot/u-boot-qoriq-fw-utils_2018.03.bb | 45 - ...Remove-redundant-YYLOC-global-declaration.patch | 29 + ...01-binman-Convert-a-few-tests-to-Python-3.patch | 79 + .../0001-binman-Move-to-use-Python-3.patch | 30 + .../0001-buildman-Convert-to-Python-3.patch | 928 ++ ...st-command-to-return-strings-instead-of-b.patch | 228 + .../0001-patman-Drop-binary-parameter.patch | 105 + ...date-command.Run-to-handle-failure-better.patch | 42 + .../0001-pylibfdt-Convert-to-Python-3.patch | 117 + .../recipes-bsp/u-boot/u-boot-qoriq_2018.09.bb | 79 - .../recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb | 107 + bsp/meta-freescale/recipes-bsp/uefi/uefi_git.bb | 6 +- ...ve-test-that-requires-running-as-non-root.patch | 49 - ...1-Take-linking-flags-from-LDFLAGS-env-var.patch | 43 - ...-armv4-bsaes-armv7-.pl-make-it-work-with-.patch | 88 - ...to-add-support-for-TLS-algorithms-offload.patch | 389 + ...to-add-support-for-TLS1.2-algorithms-offl.patch | 285 + .../openssl/openssl-qoriq/openssl-c_rehash.sh | 222 - .../openssl/openssl-qoriq/run-ptest | 14 +- .../openssl/openssl-qoriq_1.1.0g.bb | 186 - .../openssl/openssl_%.bbappend | 6 + .../recipes-core/udev/udev-rules-qoriq.bb | 5 +- .../udev-rules-qoriq/73-fsl-enetc-networking.rules | 16 + .../recipes-daemons/ptpd/ptpd-qoriq.bb | 2 +- ...Mark-struct-input_field-file_field-extern.patch | 43 + bsp/meta-freescale/recipes-devtools/cst/cst_git.bb | 19 +- .../recipes-devtools/devregs/devregs_git.bb | 2 +- .../imx-usb-loader/imx-usb-loader_git.bb | 2 +- ...0001-linux-user-remove-host-stime-syscall.patch | 67 + ...age-ptest-which-runs-all-unit-test-cases-.patch | 33 + .../recipes-devtools/qemu/qemu-qoriq/memfd.patch | 41 - .../recipes-devtools/qemu/qemu-qoriq/run-ptest | 2 +- .../recipes-devtools/qemu/qemu-qoriq_4.1.0.bb | 53 + .../recipes-devtools/qemu/qemu-qoriq_git.bb | 72 - .../recipes-dpaa/eth-config/eth-config_git.bb | 2 +- .../recipes-dpaa/fm-ucode/fm-ucode_git.bb | 4 +- bsp/meta-freescale/recipes-dpaa/fmlib/fmlib_git.bb | 2 +- .../recipes-dpaa2/aiopsl/aiopsl_git.bb | 11 +- bsp/meta-freescale/recipes-dpaa2/dce/dce_git.bb | 6 +- .../recipes-dpaa2/dpl-examples/dpl-examples_git.bb | 35 - .../management-complex_10.12.0.bb | 40 - .../management-complex_10.14.1.bb | 41 + .../management-complex_10.20.4.bb | 41 + .../recipes-dpaa2/restool/restool_git.bb | 4 +- bsp/meta-freescale/recipes-dpaa2/spc/spc_git.bb | 2 +- ...001-Modify-the-Makefile-for-cross-compile.patch | 30 + .../recipes-extended/crconf/crconf_git.bb | 18 + bsp/meta-freescale/recipes-extended/dpdk/dpdk.inc | 119 + .../dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch | 26 + .../dpdk/0001-add-Wno-cast-function-type.patch | 26 + ...sec-gw-fix-gcc-10-maybe-uninitialized-war.patch | 53 + .../dpdk/dpdk/0001-fix-gcc-8-build-error.patch | 51 - .../dpdk/dpdk/0004-update-WERROR_FLAGS.patch | 39 + .../recipes-extended/dpdk/dpdk_17.11.bb | 104 - .../recipes-extended/dpdk/dpdk_19.11-20.04.bb | 19 + .../recipes-extended/hyperrelay/hyperrelay_git.bb | 36 - ...1-tools-scripts-update-shebang-to-python3.patch | 69 + .../recipes-extended/jailhouse/jailhouse_0.11.bb | 122 + .../recipes-extended/libpkcs11/libpkcs11_git.bb | 4 +- ...-have-env-based-configurable-number-of-pa.patch | 34 + .../recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb | 50 + .../recipes-extended/ovs-dpdk/ovs-dpdk_2.9.bb | 48 - .../pktgen-dpdk/pktgen-dpdk_19.12.0.bb | 33 + .../pktgen-dpdk/pktgen-dpdk_git.bb | 33 - .../recipes-extended/secure-obj/secure-obj.inc | 8 +- .../recipes-extended/secure-obj/secure-obj_git.bb | 4 +- .../recipes-extended/skmm-ep/skmm-ep_git.bb | 2 +- .../recipes-extended/tsntool/tsntool_git.bb | 31 + ....4-fails-when-we-specify-arch-funattribut.patch | 26 - ...pi-with-shared-libs-if-static-is-disabled.patch | 28 - .../recipes-extended/vpp-core/files/config.h | 1 - .../recipes-extended/vpp-core/vpp-core.bb | 65 - .../recipes-extended/vpp-core/vpp-pkgs.inc | 227 - .../packagegroups/packagegroup-fsl-mfgtool.bb | 2 +- .../packagegroups/packagegroup-fsl-qca6174.bb | 13 + .../packagegroups/packagegroup-fsl-qca9377.bb | 12 + .../recipes-graphics/drm/libdrm-armada_git.bb | 2 +- ...ac-Allow-explicit-enabling-of-cunit-tests.patch | 54 - ...add-libdrm-vivante-to-the-meson-meta-data.patch | 140 + .../drm/libdrm/fix_O_CLOEXEC_undeclared.patch | 24 - .../recipes-graphics/drm/libdrm/installtests.patch | 25 - .../recipes-graphics/drm/libdrm/musl-ioctl.patch | 35 + .../drm/libdrm/mx6/drm-update-arm.patch | 35 - .../drm/libdrm/mx7/drm-update-arm.patch | 35 - .../recipes-graphics/drm/libdrm_%.bbappend | 5 - .../recipes-graphics/drm/libdrm_2.4.91.imx.bb | 65 - .../recipes-graphics/drm/libdrm_2.4.99.imx.bb | 73 + ...place-vendor-specific-header-with-generic.patch | 28 - .../recipes-graphics/eglinfo/eglinfo-fb_%.bbappend | 8 - .../eglinfo/eglinfo-x11_%.bbappend | 2 - .../imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb | 37 - .../imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb | 30 + .../0001-switch-from-python2-to-python3.patch | 10004 +++++++++++++++++++ ...pecs-Tie-Python-2-3-conversion-loose-ends.patch | 169 + ...ipts-Tie-Python-2-3-conversion-loose-ends.patch | 276 + ...-a-few-more-Python-2-to-3-conversion-loos.patch | 62 + ...-a-few-more-Python-2-to-3-conversion-loos.patch | 60 + .../imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb | 37 - .../imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb | 36 + .../imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb | 41 - .../imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb | 39 + .../recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | 78 +- .../imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb | 11 - .../imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb | 6 - .../imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb | 10 + .../imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb | 6 + ...eglSwapBuffer-calling-makes-wrong-throttl.patch | 28 - .../recipes-graphics/mesa/mesa-demos_%.bbappend | 24 +- .../recipes-graphics/mesa/mesa-gl_%.bbappend | 2 +- .../recipes-graphics/mesa/mesa_%.bbappend | 20 +- ...son-Add-missing-wayland-dependency-on-EGL.patch | 47 + ...eson-Separate-surfaceless-option-from-x11.patch | 44 + .../recipes-graphics/waffle/waffle_%.bbappend | 21 +- ...1-unstable-Add-alpha-compositing-protocol.patch | 195 - ...0002-unstable-Add-hdr10-metadata-protocol.patch | 134 - .../wayland/wayland-protocols_1.13.imx.bb | 26 - .../wayland/wayland-protocols_1.18.imx.bb | 22 + .../recipes-graphics/wayland/weston-init.bbappend | 43 +- .../wayland/weston-init/imxdrm/weston.config | 3 - .../wayland/weston-init/mx6sl/weston.config | 1 + .../wayland/weston-init/mx8mm/weston.config | 3 - .../wayland/weston-init/weston.config | 2 - .../wayland/weston-init/weston.ini | 25 + .../wayland/weston-init/weston.service | 38 - ...2d-renderer-Fix-open-function-build-break.patch | 33 - .../wayland/weston/0001-make-error-portable.patch | 78 - ...ch-Provide-a-default-version-that-doesn-t.patch | 129 +- .../recipes-graphics/wayland/weston/imx/weston.ini | 20 - .../wayland/weston/mx8mq/weston.ini | 24 - .../recipes-graphics/wayland/weston_4.0.0.imx.bb | 144 - .../recipes-graphics/wayland/weston_8.0.0.imx.bb | 168 + .../xorg-driver/xf86-video-armada_git.bb | 2 +- .../xorg-driver/xf86-video-fbdev_0.4.2.bb | 11 - .../xf86-video-imx-vivante_6.2.4.p1.8.bb | 65 - .../xf86-video-imx-vivante_6.4.0.p0.0.bb | 65 + .../xserver-xf86-config/mx6ull/xorg.conf | 12 + .../0003-Remove-check-for-useSIGIO-option.patch | 47 + .../xorg-xserver/xserver-xorg_%.bbappend | 3 + .../ceetm/ceetm/0001-Makefile-update-CFLAGS.patch | 31 + .../recipes-kernel/ceetm/ceetm_git.bb | 9 +- .../cryptodev/cryptodev-qoriq-1.10.inc | 21 + .../cryptodev/cryptodev-qoriq-linux_1.10.bb | 5 + .../cryptodev/cryptodev-qoriq-linux_1.9.bb | 16 - .../cryptodev/cryptodev-qoriq-module_1.10.bb | 10 + .../cryptodev/cryptodev-qoriq-module_1.9.bb | 21 - .../cryptodev/cryptodev-qoriq-tests_1.10.bb | 8 + .../cryptodev/cryptodev-qoriq-tests_1.9.bb | 26 - .../cryptodev/cryptodev-qoriq_1.9.inc | 26 - ...pile-and-install-rules-for-cryptodev-test.patch | 66 + ...talling-header-file-provided-by-another-p.patch | 24 + ...pile-and-install-rules-for-cryptodev-test.patch | 50 - ...talling-header-file-provided-by-another-p.patch | 22 - ...date-the-install-path-for-cryptodev-tests.patch | 28 - .../recipes-kernel/dtc/dtc-145_git.bb | 20 - ...0001-Fix-compiler-warnings-seen-with-musl.patch | 55 - .../recipes-kernel/dtc/files/make_install.patch | 17 - .../kernel-module-imx-gpu-viv_6.2.4.p1.8.bb | 26 - .../kernel-module-imx-gpu-viv_6.4.0.p2.0.bb | 26 + .../kernel-modules/kernel-module-ipc.inc | 2 +- .../kernel-modules/kernel-module-qca6174_3.0.bb | 14 + .../kernel-modules/kernel-module-qca9377_3.0.bb | 17 + .../kernel-modules/kernel-module-qcacld-lea.inc | 23 + .../linux/linux-fslc-imx-rt/0001-fix-build.patch | 71 - .../linux-fslc-imx-rt/0002-no-split-ptlocks.patch | 85 - ...-around-CPU-stalls-in-the-imx-sdma-driver.patch | 126 - .../0004-export-swait-locked-functions.patch | 31 - .../linux/linux-fslc-imx-rt/defconfig | 439 - .../linux/linux-fslc-imx-rt_4.1-2.0.x.bb | 26 - .../recipes-kernel/linux/linux-fslc-imx/defconfig | 426 - .../linux/linux-fslc-imx/imx/defconfig | 552 + .../linux/linux-fslc-imx/mx8/defconfig | 797 ++ .../linux/linux-fslc-imx_4.9-1.0.x.bb | 16 - .../recipes-kernel/linux/linux-fslc-imx_5.4.bb | 86 + .../recipes-kernel/linux/linux-fslc-lts-4.19.bb | 19 + .../linux/linux-fslc-lts-4.19/defconfig | 451 + .../linux/linux-fslc-lts-4.19/mx25/defconfig | 189 + .../linux/linux-fslc-lts-4.19/mxs/defconfig | 180 + .../recipes-kernel/linux/linux-fslc-qoriq_5.4.bb | 17 + .../recipes-kernel/linux/linux-fslc/defconfig | 29 +- .../recipes-kernel/linux/linux-fslc/mx25/defconfig | 6 +- .../recipes-kernel/linux/linux-fslc/mxs/defconfig | 3 +- .../recipes-kernel/linux/linux-fslc_4.20.bb | 19 - .../recipes-kernel/linux/linux-fslc_5.4.bb | 27 + .../linux/linux-imx-4.9.123/imx/defconfig | 466 - .../linux/linux-imx-4.9.123/mx8/defconfig | 679 -- .../0001-uapi-Install-custom-headers.patch | 40 - .../linux/linux-imx-headers_4.9.123.bb | 59 - .../linux/linux-imx-headers_5.4.3.bb | 78 + .../linux/linux-imx-mfgtool-4.9.123/defconfig | 466 - .../linux/linux-imx-mfgtool_4.9.123.bb | 13 - .../linux/linux-imx-mfgtool_5.4.3.bb | 14 + .../recipes-kernel/linux/linux-imx.inc | 19 +- ...ake-perf-able-to-build-with-latest-libbfd.patch | 63 + .../recipes-kernel/linux/linux-imx/imx/defconfig | 552 + .../recipes-kernel/linux/linux-imx/mx8/defconfig | 797 ++ .../recipes-kernel/linux/linux-imx_4.9.123.bb | 20 - .../recipes-kernel/linux/linux-imx_5.4.3.bb | 35 + .../recipes-kernel/linux/linux-qoriq.inc | 68 + .../0001-Makefile-fix-gcc-8-build-error.patch | 25 - ...inux-5.4-add-warning-cflags-on-LSDK-20.04.patch | 26 + .../linux-qoriq/0001-fix-gcc8-build-error.patch | 25 - ...ake-perf-able-to-build-with-latest-libbfd.patch | 63 + .../recipes-kernel/linux/linux-qoriq_4.14.bb | 70 - .../recipes-kernel/linux/linux-qoriq_4.9.bb | 71 - .../recipes-kernel/linux/linux-qoriq_5.4.bb | 11 + .../recipes-kernel/skmm-host/skmm-host_git.bb | 2 +- .../alsa/imx-alsa-plugins_1.0.26.bb | 4 +- ...inloader.c-when-env-var-is-set-do-not-fal.patch | 35 - ...on.m4-prefix-pkgconfig-paths-with-PKG_CON.patch | 42 - .../gstreamer/files/gtk-doc-tweaks.patch | 47 - ...-Disable-yasm-for-libav-when-disable-yasm.patch | 33 + .../0001-configure-check-for-armv7ve-variant.patch | 35 + .../0001-fix-host-contamination.patch | 36 + .../gstreamer1.0-libav/mips64_cpu_detection.patch | 32 + ...ound-to-build-gst-libav-for-i586-with-gcc.patch | 26 + .../gstreamer/gstreamer1.0-libav_1.16.0.bb | 70 + ...-don-t-hardcode-libtool-name-when-running.patch | 45 - .../configure-allow-to-disable-libssh2.patch | 61 - ...1-ext-wayland-fix-meson-build-in-nxp-fork.patch | 60 + ...-gir-even-when-cross-compiling-if-introsp.patch | 36 + ...uild-with-opencv-enabled-and-opencv4.-Fix.patch | 45 + ...01-opencv-allow-compilation-against-4.3.x.patch | 34 + .../0001-opencv-fix-build-for-opencv-3-4-2.patch | 63 - .../avoid-including-sys-poll.h-directly.patch | 30 + ...valid-sentinels-for-gst_structure_get-etc.patch | 85 + ...itialized-warnings-when-compiling-with-Os.patch | 28 + ...lve-missing-opencv-data-dir-in-yocto-buil.patch | 49 + .../gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb | 174 - .../gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb | 173 + ...-don-t-hardcode-libtool-name-when-running.patch | 171 - ...0-plugins-base-Fix-ion.h-header-inclusion.patch | 45 - ...-prefix-calls-to-pkg-config-with-PKG_CONF.patch | 289 - ...ssing-include-directories-when-calling-in.patch | 28 - ...ncorrect-reference-to-gstreamer-sdp-in-Ma.patch | 27 - ...make-gio_unix_2_0-dependency-configurable.patch | 45 - ...1-gst-libs-gst-gl-wayland-fix-meson-build.patch | 36 + ...-plugins-base-fix-meson-build-in-nxp-fork.patch | 220 + ...-gir-even-when-cross-compiling-if-introsp.patch | 34 + .../0002-meson-Add-variables-for-gir-files.patch | 233 + ...005-viv-fb-Make-sure-config.h-is-included.patch | 30 + .../0009-glimagesink-Downrank-to-marginal.patch | 30 + .../gstreamer1.0-plugins-base_1.14.%.bbappend | 3 - .../gstreamer1.0-plugins-base_1.14.imx.bb | 76 - .../gstreamer1.0-plugins-base_1.16.%.bbappend | 5 + .../gstreamer1.0-plugins-base_1.16.imx.bb | 100 + .../gstreamer1.0-plugins-good_1.14.%.bbappend | 3 - .../gstreamer1.0-plugins-good_1.14.imx.bb | 71 - .../gstreamer1.0-plugins-good_1.16.%.bbappend | 3 + .../gstreamer1.0-plugins-good_1.16.imx.bb | 79 + .../gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb | 71 + .../gstreamer/gstreamer1.0-plugins-imx_git.bb | 71 - .../gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb | 39 + ...-gir-even-when-cross-compiling-if-introsp.patch | 36 + .../gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb | 32 + ...inloader.c-when-env-var-is-set-do-not-fal.patch | 35 + ...-gir-even-when-cross-compiling-if-introsp.patch | 36 + .../0003-meson-Add-valgrind-feature.patch | 74 + ...0004-meson-Add-option-for-installed-tests.patch | 257 + .../gstreamer/gstreamer1.0/capfix.patch | 37 + .../gstreamer/gstreamer1.0_1.14.imx.bb | 76 - .../gstreamer/gstreamer1.0_1.16.imx.bb | 84 + ...plugin-Fix-ion.h-header-inclusion-to-be-s.patch | 44 - .../gstreamer/imx-gst1.0-plugin_4.4.2.bb | 83 - .../gstreamer/imx-gst1.0-plugin_4.5.3.bb | 83 + .../imx-codec/imx-codec_4.4.2.bb | 119 - .../imx-codec/imx-codec_4.5.3.bb | 119 + .../imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb | 22 + .../imx-parser/imx-parser_4.4.2.bb | 46 - .../imx-parser/imx-parser_4.5.3.bb | 46 + .../imx-vpuwrap/imx-vpuwrap_4.4.2.bb | 32 - .../imx-vpuwrap/imx-vpuwrap_4.5.3.bb | 32 + .../libimxvpuapi/libimxvpuapi2_2.0.1.bb | 25 + .../libimxvpuapi/libimxvpuapi_git.bb | 4 +- ...01-flags-do-not-override-CFLAGS-from-host.patch | 54 + .../optee-imx/optee-client/tee-supplicant.service | 11 + .../optee-imx/optee-client_3.2.0.imx.bb | 52 + ...x-gcc10-compilation-issue-and-missing-cc-.patch | 158 + ...001-scripts-update-scripts-to-use-python3.patch | 427 + .../optee-imx/optee-os_3.2.0.imx.bb | 96 + .../0001-use-python3-instead-of-python.patch | 48 + ...-fix-compilation-against-musl-sys-errno.h.patch | 41 + ...nore-declaration-after-statement-warnings.patch | 62 + ...rk_1000-fix-compilation-against-musl-uint.patch | 57 + ...8100-use-null-terminated-strings-with-fil.patch | 88 + .../optee-imx/optee-test_3.2.0.imx.bb | 58 + .../recipes-security/optee/optee-client-qoriq.bb | 6 +- ...-alignment-of-data-for-mempool_alloc_pool.patch | 148 + .../0001-use-python3-instead-of-python.patch | 80 + .../recipes-security/optee/optee-os-qoriq_git.bb | 10 +- .../0001-fix-build-failure-with-GCC-8.patch | 40 - .../0001-fix-build-failure-with-GCC-9.patch | 28 + .../0001-use-python3-instead-of-python.patch | 48 + .../recipes-security/optee/optee-test-qoriq_git.bb | 9 +- .../wic/imx-imx-boot-bootpart.wks.in | 13 +- bsp/meta-freescale/wic/imx-uboot-bootpart.wks | 19 - bsp/meta-freescale/wic/imx-uboot-bootpart.wks.in | 19 + bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks | 20 - .../wic/imx-uboot-spl-bootpart.wks.in | 20 + bsp/meta-freescale/wic/imx-uboot-spl.wks | 19 - bsp/meta-freescale/wic/imx-uboot-spl.wks.in | 19 + bsp/meta-intel/.gitignore | 6 - bsp/meta-intel/CHANGELOG | 87 - bsp/meta-intel/COPYING.MIT | 17 - bsp/meta-intel/LICENSE | 5 - bsp/meta-intel/MAINTAINERS | 38 - bsp/meta-intel/README | 432 - bsp/meta-intel/README.sources | 17 - bsp/meta-intel/classes/uefi-comboapp.bbclass | 151 - bsp/meta-intel/classes/uefi-sign.bbclass | 50 - bsp/meta-intel/conf/include/maintainers.inc | 16 - bsp/meta-intel/conf/layer.conf | 24 - .../conf/machine/include/intel-common-pkgarch.inc | 15 - .../conf/machine/include/intel-core2-32-common.inc | 7 - .../machine/include/intel-corei7-64-common.inc | 7 - bsp/meta-intel/conf/machine/include/meta-intel.inc | 39 - bsp/meta-intel/conf/machine/include/qemu-intel.inc | 19 - .../conf/machine/include/qemuboot-intel.inc | 15 - bsp/meta-intel/conf/machine/intel-core2-32.conf | 37 - bsp/meta-intel/conf/machine/intel-corei7-64.conf | 41 - bsp/meta-intel/custom-licenses/BSD_LMS | 30 - .../custom-licenses/Intel-Microcode-License | 37 - bsp/meta-intel/documentation/secureboot/README | 38 - .../lib/oeqa/selftest/cases/secureboot.py | 176 - .../recipes-bsp/formfactor/formfactor/machconfig | 39 - .../recipes-bsp/formfactor/formfactor_0.0.bbappend | 1 - .../gma500-gfx-check/gma500-gfx-check.conf | 2 - .../gma500-gfx-check/gma500-gfx-check.sh | 15 - .../gma500-gfx-check/gma500-gfx-check_1.0.bb | 18 - ...efi-boot.c-workaround-for-Joule-BIOS-hang.patch | 31 - .../systemd-boot/systemd-boot_%.bbappend | 15 - ...1-Use-correct-format-specifier-for-size_t.patch | 37 - .../recipes-bsp/thermald/thermald_1.8.bb | 35 - .../images/core-image-minimal-initramfs.bbappend | 2 - .../recipes-core/images/core-image-tiny.bb | 36 - .../microcode/intel-microcode_20190514a.bb | 66 - ...am-Add-arg-parse-library-for-MUSL-support.patch | 29 - .../recipes-core/microcode/iucode-tool_2.3.1.bb | 33 - ...01-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch | 105 - .../ovmf/ovmf-shell-image-enrollkeys.bb | 13 - bsp/meta-intel/recipes-core/ovmf/ovmf_%.bbappend | 6 - .../igt-gpu-tools/igt-gpu-tools_1.23.bb | 42 - .../xorg-driver/xf86-video-ast_1.1.5.bb | 12 - ...1-zc-Force-4.10-get_user_pages_remote-API.patch | 26 - .../cryptodev/cryptodev-module_%.bbappend | 9 - .../ixgbe/0001-ixgbe-skip-host-depmod.patch | 31 - .../recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb | 37 - ...Makefile-check-for-CONFIG_IXGBEVF-instead.patch | 27 - .../ixgbevf/0001-ixgbevf-skip-host-depmod.patch | 31 - .../recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb | 41 - ...1-Makefile.real-skip-host-install-scripts.patch | 36 - ...-version-numbers-because-production-kerne.patch | 87 - .../iwlwifi/backport-iwlwifi/iwlwifi.conf | 12 - .../recipes-kernel/iwlwifi/backport-iwlwifi_git.bb | 56 - .../recipes-kernel/linux/linux-intel-rt_4.14.bb | 24 - .../recipes-kernel/linux/linux-intel-rt_4.19.bb | 24 - .../recipes-kernel/linux/linux-intel-rt_4.9.bb | 20 - .../recipes-kernel/linux/linux-intel.inc | 25 - ...check-lxdiaglog.sh-Allow-specification-of.patch | 62 - ...mconf-cfg-Allow-specification-of-ncurses-.patch | 48 - ...01-perf-x86-32-explicitly-include-errno.h.patch | 41 - .../linux/linux-intel/disable_skylake_sound.cfg | 12 - .../recipes-kernel/linux/linux-intel_4.14.bb | 22 - .../recipes-kernel/linux/linux-intel_4.19.bb | 21 - .../recipes-kernel/linux/linux-intel_4.9.bb | 20 - .../recipes-kernel/linux/linux-yocto-dev.bbappend | 21 - .../linux/linux-yocto-rt_4.14.bbappend | 1 - .../linux/linux-yocto-rt_4.18.bbappend | 1 - .../recipes-kernel/linux/linux-yocto_%.bbappend | 4 - .../recipes-kernel/linux/linux-yocto_4.14.bbappend | 1 - .../recipes-kernel/linux/linux-yocto_4.18.bbappend | 1 - .../linux/meta-intel-compat-kernel.inc | 13 - ...-lttng-modules-PKT-4.9-yocto-build-failed.patch | 38 - .../recipes-kernel/lttng/lttng-modules_%.bbappend | 7 - .../libva/intel-vaapi-driver_2.2.0.bb | 33 - .../libyami-utils/0001-Fix-build-with-clang.patch | 96 - .../libyami/libyami-utils_1.3.1.bb | 26 - ...01-bitWriter.cpp-Delete-unused-CACHEBYTES.patch | 27 - .../0002-typecast-index-from-size_t-to-int.patch | 42 - ...-invalid-offsetof-to-compiler-commandline.patch | 29 - .../0004-Typecast-POWER32SUB2-to-uint8_t.patch | 33 - ...pace-conflicts-by-adding-explicit-using-n.patch | 41 - .../libyami/0007-Delete-unused-variables.patch | 36 - ...alUnit-is-declared-in-different-namespace.patch | 31 - .../libyami/libyami/0009-Fix-clang-warnings.patch | 37 - .../recipes-multimedia/libyami/libyami_1.3.1.bb | 30 - .../recipes-rt/images/core-image-rt-sdk.bb | 20 - bsp/meta-intel/recipes-rt/images/core-image-rt.bb | 17 - .../recipes-selftest/images/files/incorrect.crt | 19 - .../recipes-selftest/images/files/incorrect.key | 27 - .../recipes-selftest/images/files/refkit-db.crt | 18 - .../recipes-selftest/images/files/refkit-db.key | 28 - .../images/secureboot-selftest-image-signed.bb | 6 - .../images/secureboot-selftest-image-unsigned.bb | 20 - .../sbsigntool/sbsigntool-native_git.bb | 77 - bsp/meta-intel/wic/core-image-tiny.wks.in | 14 - bsp/meta-intel/wic/generic-bootdisk.wks.in | 6 - bsp/meta-intel/wic/grub-bootdisk-microcode.wks | 12 - bsp/meta-intel/wic/systemd-bootdisk-microcode.wks | 13 - bsp/meta-qcom/conf/layer.conf | 4 +- .../conf/machine/dragonboard-410c-32.conf | 1 - bsp/meta-qcom/conf/machine/dragonboard-410c.conf | 8 +- bsp/meta-qcom/conf/machine/dragonboard-820c.conf | 3 +- bsp/meta-qcom/conf/machine/dragonboard-845c.conf | 12 +- bsp/meta-qcom/conf/machine/evb4k-qcs404.conf | 19 + .../conf/machine/include/qcom-apq8016.inc | 9 +- .../conf/machine/include/qcom-apq8096.inc | 8 +- bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc | 16 + bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc | 10 +- bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc | 41 + bsp/meta-qcom/conf/machine/qrb5165-rb5.conf | 25 + bsp/meta-qcom/conf/machine/sd-600eval.conf | 1 - bsp/meta-qcom/conf/machine/sm8250-mtp.conf | 25 + .../images/initramfs-test-image.bbappend | 5 + .../recipes-graphics/images/qcom-x11-image.bb | 30 + ...01-Introduce-Qualcomm-PDS-service-support.patch | 197 +- .../images/initramfs-test-image.bbappend | 3 + .../firmware-qcom-dragonboard410c_1034.2.1.bb | 27 +- .../firmware-qcom-dragonboard820c_01700.1.bb | 14 +- .../generate_board-2_json.sh | 23 + ...mware-qcom-dragonboard845c_20190529180356-v4.bb | 55 + .../recipes-bsp/wcnss-config/wcnss-config_1.13.bb | 32 - ...file-Use-pkg-config-for-libxml2-detection.patch | 35 + bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb | 25 + .../skales/files/0002-mkbootimg-use-python3.patch | 23 + .../recipes-devtools/skales/skales_git.bb | 7 +- .../recipes-graphics/images/qcom-x11-image.bb | 30 - ...-freedreno-add-query-for-dmabuf-modifiers.patch | 101 - ...-clear-last_fence-after-resource-tracking.patch | 94 + .../recipes-graphics/mesa/mesa_%.bbappend | 17 +- .../xorg-xserver/xserver-xorg_%.bbappend | 1 + .../linux-firmware/linux-firmware_%.bbappend | 7 + .../linux-firmware/linux-firmware_git.bbappend | 7 - ...-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch | 207 + ...rm64-dts-qcom-sm8250-Add-support-for-SDC2.patch | 45 + ...s-qcom-sm8250-Rename-UART2-node-to-UART12.patch | 74 + ...m64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch | 1202 +++ ...64-dts-qcom-sm8250-change-spmi-node-label.patch | 29 + .../qrb5165-rb5-enable.patch | 9 + .../linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts | 760 ++ .../linux/linux-linaro-qcomlt-dev.bb | 24 + .../linux/linux-linaro-qcomlt_4.14.bb | 2 - .../linux/linux-linaro-qcomlt_5.1.bb | 19 - .../linux/linux-linaro-qcomlt_5.2.bb | 17 + .../linux/linux-linaro-qcomlt_5.4.bb | 17 + .../linux/linux-linaro-qcomlt_5.7.bb | 29 + .../recipes-kernel/linux/linux-qcom-bootimg.inc | 16 +- ...1-ucm2-codecs-wcd934x-Add-Codec-sequences.patch | 123 + ...2-ucm2-codecs-wsa881x-add-codec-sequences.patch | 64 + ...0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch | 129 + ...Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch | 135 + ...-YOGA-C630-remove-cdev-which-is-already-p.patch | 61 + ...-remove-cdev-which-is-already-present-in-.patch | 66 + ...-DB845c-HDMI-update-cdev-to-correct-value.patch | 33 + .../alsa/alsa-ucm-conf_1.2.%.bbappend | 11 + .../pulseaudio/pulseaudio_%.bbappend | 3 + .../recipes-support/fastrpc/fastrpc_git.bb | 15 + ...1-pd-mapper-Include-limits.h-for-PATH_MAX.patch | 29 + .../recipes-support/pd-mapper/pd-mapper_git.bb | 28 + .../recipes-support/qrtr/files/qrtr.service | 11 - bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb | 14 +- .../recipes-support/rmtfs/files/rmtfs.service | 15 - bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb | 11 +- .../0001-include-limits.h-for-PATH_MAX.patch | 25 + .../recipes-support/tqftpserv/tqftpserv_git.bb | 28 + bsp/meta-qcom/recipes-test/diag/diag_git.bb | 2 +- .../recipes-test/images/initramfs-test-image.bb | 18 +- bsp/meta-raspberrypi/README.md | 30 +- .../classes/sdcard_image-rpi.bbclass | 57 +- bsp/meta-raspberrypi/conf/layer.conf | 7 +- .../conf/machine/include/rpi-base.inc | 31 +- .../conf/machine/include/rpi-default-providers.inc | 5 + .../conf/machine/include/rpi-default-versions.inc | 2 +- .../conf/machine/raspberrypi-cm.conf | 2 + .../conf/machine/raspberrypi-cm3.conf | 3 +- bsp/meta-raspberrypi/conf/machine/raspberrypi.conf | 2 + .../conf/machine/raspberrypi0-wifi.conf | 2 + .../conf/machine/raspberrypi2.conf | 2 + .../conf/machine/raspberrypi3-64.conf | 6 +- .../conf/machine/raspberrypi3.conf | 7 +- .../conf/machine/raspberrypi4-64.conf | 36 + .../conf/machine/raspberrypi4.conf | 21 + bsp/meta-raspberrypi/docs/extra-build-config.md | 35 +- bsp/meta-raspberrypi/docs/layer-contents.md | 2 + .../recipes-support/drbd/drbd_%.bbappend | 3 + .../recipes-kernel/linux/bpftool.bbappend | 3 - .../qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 8 +- .../files/custom-licenses/Broadcom | 25 - .../files/custom-licenses/Broadcom-RPi | 29 + bsp/meta-raspberrypi/kas-poky-rpi.yml | 58 + .../lib/oeqa/runtime/cases/parselogs_rpi.py | 15 + .../recipes-bsp/armstubs/armstubs.bb | 36 + .../recipes-bsp/bootfiles/bcm2835-bootfiles.bb | 41 - .../recipes-bsp/bootfiles/bootfiles.bb | 43 + .../recipes-bsp/bootfiles/rpi-config_git.bb | 162 +- .../recipes-bsp/common/firmware.inc | 11 - .../recipes-bsp/common/raspberrypi-firmware.inc | 10 + .../recipes-bsp/common/raspberrypi-tools.inc | 9 + .../recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in | 1 + .../recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb | 2 + .../recipes-bsp/u-boot/files/fw_env.config | 1 + .../recipes-bsp/u-boot/libubootenv_%.bbappend | 12 + ...core-Move-ofdata_to_platdata-call-earlier.patch | 51 + .../recipes-bsp/u-boot/u-boot_%.bbappend | 6 +- .../recipes-connectivity/bluez5/bluez5_%.bbappend | 12 +- ...er-correct-path-for-hciconfig-under-Yocto.patch | 13 +- .../pi-bluetooth/pi-bluetooth_0.1.12.bb | 47 + .../pi-bluetooth/pi-bluetooth_git.bb | 46 - .../packagegroups/packagegroup-rpi-test.bb | 13 +- .../recipes-core/psplash/psplash_%.bbappend | 3 +- .../recipes-core/udev/udev-rules-rpi.bb | 6 +- .../recipes-core/udev/udev-rules-rpi/can.rules | 1 + ...aster-Include-sys-sysmacros.h-for-makedev.patch | 32 - .../recipes-devtools/pi-blaster/pi-blaster_git.bb | 5 +- ...0001-include-asm-ioctl.h-for-ioctl-define.patch | 33 - .../recipes-devtools/python/python-rtimu_git.bb | 15 - .../python/python-sense-hat_2.2.0.bb | 24 - ...0001-include-asm-ioctl.h-for-ioctl-define.patch | 33 + .../recipes-devtools/python/python3-rtimu_git.bb | 15 + .../python/python3-sense-hat_2.2.0.bb | 24 + .../rpi-gpio/0001-Remove-nested-functions.patch | 33 +- .../recipes-devtools/python/rpi-gpio_0.6.3.bb | 14 - .../recipes-devtools/python/rpi-gpio_0.7.0.bb | 14 + .../recipes-devtools/python/rpio_0.10.0.bb | 6 +- .../recipes-devtools/raspi-gpio/raspi-gpio_git.bb | 2 +- .../0001-Add-initial-cross-compile-support.patch | 415 - .../recipes-devtools/wiringpi/wiringpi_git.bb | 35 - .../recipes-graphics/cairo/cairo_%.bbappend | 3 + .../recipes-graphics/eglinfo/eglinfo-fb_%.bbappend | 2 - .../eglinfo/eglinfo-x11_%.bbappend | 2 - .../files/0001-dri2-query-dma-buf-modifiers.patch | 43 + .../recipes-graphics/mesa/mesa-gl_%.bbappend | 5 + .../recipes-graphics/mesa/mesa_%.bbappend | 9 +- ...-applications-to-set-next-resource-handle.patch | 6 +- ...ayland-Add-support-for-the-Wayland-winsys.patch | 54 +- .../files/0003-wayland-Add-Wayland-example.patch | 50 +- ...-wayland-egl-Add-bcm_host-to-dependencies.patch | 6 +- ...emove-faulty-assert-to-make-weston-happy-.patch | 6 +- ...6-zero-out-wl-buffers-in-egl_surface_free.patch | 6 +- ...007-initialize-front-back-wayland-buffers.patch | 6 +- .../userland/files/0008-Remove-RPC_FLUSH.patch | 6 +- .../files/0009-fix-cmake-dependency-race.patch | 10 +- ...Fix-for-framerate-with-nested-composition.patch | 6 +- .../0011-build-shared-library-for-vchostif.patch | 12 +- ...nt-buffer-wrapping-interface-for-dispmanx.patch | 6 +- ...13-Implement-triple-buffering-for-wayland.patch | 6 +- ...-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch | 6 +- .../0015-EGL-glplatform.h-define-EGL_CAST.patch | 6 +- ...ple-wayland-compositor-state-data-per-pro.patch | 6 +- ...kport-typedef-for-EGL_EXT_image_dma_buf_i.patch | 6 +- ...-EGL_IMG_context_priority-related-defines.patch | 6 +- ...dt-Undefine-__wordsize-if-already-defined.patch | 31 + .../files/0020-openmaxil-add-pkg-config-file.patch | 43 + ...-Disable-format-overflow-warning-as-error.patch | 37 + .../recipes-graphics/userland/userland_git.bb | 15 +- .../recipes-graphics/vc-graphics/vc-graphics.inc | 8 +- .../xorg-xserver/xserver-xorg_%.bbappend | 10 +- .../linux-firmware-rpidistro_git.bb | 7 +- ...tests-bpf-Skip-perf-hw-events-test-if-the.patch | 35 + ...ake-perf-able-to-build-with-latest-libbfd.patch | 57 + ...est-bpf-Use-CHECK-macro-instead-of-RET_IF.patch | 40 + ...tests-bpf-Fix-perf_buffer-test-on-systems.patch | 94 + .../recipes-kernel/linux/files/powersave.cfg | 13 + .../files/raspberrypi4-64/rpi4-64-kernel-misc.cfg | 2 + .../recipes-kernel/linux/linux-raspberrypi-dev.bb | 9 +- .../linux/linux-raspberrypi-rt_4.14.bb | 4 +- .../linux/linux-raspberrypi-rt_4.19.bb | 6 + .../recipes-kernel/linux/linux-raspberrypi.inc | 20 +- .../recipes-kernel/linux/linux-raspberrypi_4.14.bb | 4 +- .../recipes-kernel/linux/linux-raspberrypi_4.19.bb | 10 + .../linux/linux-raspberrypi_4.19.inc | 12 + .../recipes-kernel/linux/linux-raspberrypi_4.9.bb | 11 - .../recipes-kernel/linux/linux-raspberrypi_5.4.bb | 11 + .../recipes-kernel/linux/linux-raspberrypi_5.4.inc | 12 + ...o-acquire-buffer-when-src-pad-isn-t-activ.patch | 46 - .../0001-config-files-path.patch | 150 - .../0003-no-timeout-on-get-state.patch | 24 - ...erly-handle-drain-requests-while-flushing.patch | 30 - ...-gst_omx_video_dec_set_format-if-there-s-.patch | 24 - ...o-acquire-buffer-when-src-pad-isn-t-activ.patch | 48 + .../0001-config-files-path.patch | 150 + .../0003-no-timeout-on-get-state.patch | 24 + ...erly-handle-drain-requests-while-flushing.patch | 30 + ...-gst_omx_video_dec_set_format-if-there-s-.patch | 36 + .../gstreamer/gstreamer1.0-omx_%.bbappend | 13 +- .../gstreamer/gstreamer1.0-omx_1.14%.bbappend | 12 - .../gstreamer/gstreamer1.0-omx_1.16%.bbappend | 12 + .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 3 +- .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 7 +- ...PEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch | 4 +- .../0007-Remove-Makefile-hardcoded-arch-tune.patch | 8 + .../recipes-multimedia/omxplayer/omxplayer_git.bb | 10 +- .../recipes-sato/webkitgtk/webkitgtk_%.bbappend | 1 - bsp/meta-rcar/meta-rcar-gen3-adas/conf/layer.conf | 2 +- ...3-plat-renesas-rcar-Add-R-Car-V3M-support.patch | 2 +- ...4-plat-renesas-rcar-Add-R-Car-V3H-support.patch | 4 +- .../linux-firmware_20200122.bbappend | 15 + .../linux-firmware/linux-firmware_git.bbappend | 15 - .../recipes-bsp/most-tools/files/most-tools.tar.gz | Bin 65178 -> 65128 bytes ...77970-Disable-RPC-on-all-R-Car-V3M-boards.patch | 58 + ...77980-Disable-RPC-on-all-R-Car-V3H-boards.patch | 59 + ...Set-clock-when-reverting-to-safe-bus-mode.patch | 29 + ...dd-an-accessor-to-know-if-waiting-for-ARP.patch | 66 + ...verwrite-waiting-packets-with-asynchronou.patch | 158 + .../u-boot/0027-net-sh_eth-Keep-phy-running.patch | 126 + .../0028-net-sh_eth-Fix-compilation-warnings.patch | 135 + .../0029-net-sh_eth-Workaround-cache-issues.patch | 74 + .../0030-net-sh_eth-Fix-RX-error-handling.patch | 73 + .../recipes-bsp/u-boot/u-boot_2018.09.bbappend | 20 +- .../recipes-bsp/utest-apps/utest-cam-imr-drm.bb | 2 +- .../recipes-core/systemd/systemd/70-dummy0.network | 6 + .../recipes-core/systemd/systemd/70-eth0.network | 8 + .../recipes-core/systemd/systemd/dummy0.network | 6 - .../recipes-core/systemd/systemd/eth0.network | 8 - .../recipes-core/systemd/systemd_%.bbappend | 9 +- .../recipes-devtools/gcc/gcc-sanitizers_%.bbappend | 1 + .../recipes-devtools/yaml-cpp/yaml-cpp_0.5.3.bb | 11 +- .../recipes-devtools/yaml-cpp/yaml-cpp_0.6.2.bb | 9 +- .../recipes-graphics/cairo/cairo_1.14.12.bbappend | 4 - .../recipes-graphics/cairo/cairo_1.16.0.bbappend | 2 + ...rge-pull-request-10011-from-jviney-master.patch | 112 - .../recipes-graphics/opencv/opencv_2.4.bb | 4 +- .../recipes-graphics/opencv/opencv_3.2.bb | 1 - .../0001-Allow-to-boot-without-input-device.patch | 24 - .../weston-5.0.0/0002-Share-toytoolkit-lib.patch | 1577 --- .../0003-add-window-set-fullscreen-at-output.patch | 96 - .../0004-Add-display_poll-function.patch | 90 - ...Add-wl-ivi-shell-surface-creating-support.patch | 56 - ...06-Add-widget_set_surface_allocation-func.patch | 50 - ...-Add-call-for-setting-fullscreen-with-IVI.patch | 44 - .../0001-Allow-to-boot-without-input-device.patch | 24 + .../weston-8.0.0/0002-Share-toytoolkit-lib.patch | 1512 +++ .../0003-add-window_set_fullscreen_at_output.patch | 96 + .../0004-Add-display_poll-function.patch | 90 + ...Add-wl-ivi-shell-surface-creating-support.patch | 56 + ...06-Add-widget_set_surface_allocation-func.patch | 50 + ...-Add-call-for-setting-fullscreen-with-IVI.patch | 44 + .../recipes-graphics/wayland/weston_5.0.0.bbappend | 13 - .../recipes-graphics/wayland/weston_8.0.0.bbappend | 13 + ...0104-media-vsp1-extend-DRM-VSP1-interface.patch | 2 +- ...mmu-ipmmu-vmsa-Add-r8a779-7-8-0-whitelist.patch | 4 +- ...gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch | 49 +- .../0420-media-i2c-ov2311-fix-otp-id-read.patch | 51 + ...mx390-add-user-defined-size-for-register-.patch | 197 + ...c-Try-other-timings-if-the-higher-one-fai.patch | 45 + ...3-media-i2c-ap0101_ar014x-add-AP0102-chip.patch | 77 + ...ts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch | 304 + ...8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch | 44 + .../0426-media-i2c-ov106xx-change-order.patch | 90 + .../0427-media-i2c-gw5200-fix-imager-hang.patch | 60 + ...ts-renesas-r8a77970-Fix-IPMMU-probe-order.patch | 53 + ...ts-renesas-r8a77980-Fix-IPMMU-probe-order.patch | 53 + ...r0140-update-driver-to-use-rGPIO-and-dyna.patch | 162 + ...dia-i2c-ti9x4-update-remote-gpio-function.patch | 53 + .../0432-media-i2c-soc_camera-add-AR0220.patch | 1689 ++++ .../0433-media-i2c-ar0220-add-rev2-rev3.patch | 1021 ++ ...-i2c-max9286-parse-crossbard-from-cmdline.patch | 154 + ...k-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch | 51 + ...k-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch | 51 + ...-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch | 51 + ...-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch | 30 + .../0439-mtd-Consolidate-Renesas-RPC-drivers.patch | 4450 +++++++++ ...-renesas-r8a77970-Update-RPC-device-nodes.patch | 72 + ...-renesas-r8a77980-Update-RPC-device-nodes.patch | 58 + ...4-dts-renesas-r8a7795-Add-RPC-device-node.patch | 39 + ...4-dts-renesas-r8a7796-Add-RPC-device-node.patch | 39 + ...-dts-renesas-r8a77965-Add-RPC-device-node.patch | 39 + ...enesas-ulcb-Add-RPC-HyperFlash-device-nod.patch | 77 + ...enesas-salvator-common-Add-RPC-HyperFlash.patch | 77 + ...amera-rcar_vin-Fix-crash-when-the-module-.patch | 75 + ...xxx-append-embedded-data-stats-into-frame.patch | 252 + ...oc_camera-ov495_ov2775-Remove-early_param.patch | 55 + ...enesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch | 33 + ...enesas-salvator-common-Add-tee-MTD-RPC-Hy.patch | 33 + ...enesas-ulcb-Increase-U-Boot-partition-siz.patch | 54 + ...enesas-salvator-common-Increase-U-Boot-pa.patch | 55 + .../0454-media-i2c-imx390-fix-refclk.patch | 47 + ...0455-media-i2c-ox01d10-add-imager-support.patch | 1162 +++ ...456-media-i2c-max9286-fix-resetb-handling.patch | 36 + ...-i2c-ov10640-fix-dvp-order-and-soft-reset.patch | 67 + ...renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch | 866 ++ ...a-i2c-ov10640-support-different-revisions.patch | 6345 ++++++++++++ ...media-ar0xxx-add-embedded-line-into-frame.patch | 534 + ...d-separate-dts-for-dummy-camera-1920x1080.patch | 132 + ...ia-i2c-ov10640-add-embedded-data-fix-crop.patch | 289 + ...r_can-fix-possible-IRQ-storm-on-high-load.patch | 62 + ...dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch | 48 + ...m64-dts-renesas-add-cn12-support-on-VB2-1.patch | 481 + ...-media-i2c-max9286-parse-crossbar-from-dt.patch | 58 + .../0467-media-i2c-isx016-add-fixed-sensor.patch | 94 + ...8-imx390-Read-1-byte-registers-by-default.patch | 37 + ...canfd-fix-one-more-interrupt-storm-window.patch | 67 + .../0470-media-i2c-add-fps-setup.patch | 429 + .../0471-media-i2c-ov10640-add-fps-setup.patch | 104 + ...a-i2c-soc_camera-fix-compilation-warnings.patch | 70 + ...2c-ov10640-add-different-imager-addresses.patch | 96 + ...oc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch | 82 + .../0475-media-i2c-ar0233-add-fps-setup.patch | 127 + .../0476-media-i2c-imx390-add-fps-setup.patch | 158 + .../0477-media-i2c-ar0231-fix-FSIN-pin-input.patch | 54 + .../0478-media-i2c-ti9x4-fix-framesync.patch | 40 + ...media-soc_camera-rcar_csi2-add-interrupts.patch | 150 + ...c-soc_camera-ov10640-fix-emb-lines-number.patch | 29 + ...779-78-sysc-don-t-poweroff-Cortex-R7-core.patch | 42 + ...c-max9286-ti9x4-power-down-POCs-on-reboot.patch | 139 + ...orm-soc_camera-disable-mutex-locking-for-.patch | 34 + ...dia-i2c-ov10640-compensate-disabled-mutex.patch | 85 + ...0487-i2c-busses-i2c-rcar-block-pm_runtime.patch | 80 + ...88-arm64-dts-renesas-block-i2c-pm-runtime.patch | 68 + ...ax9286-increase-i2c-freq-inside-GMSL-cahn.patch | 36 + ...i2c-ti9x4-increase-i2c-freq-on-master-bus.patch | 48 + ...soc_camera-switch-to-u64-adv_debug-access.patch | 690 ++ ...ove-gmsl-fpdlink-drivers-to-separate-fold.patch | 6794 +++++++++++++ .../0493-media-i2c-add-max96712-and-max9296.patch | 4855 +++++++++ ...dia-i2c-max9286-max9288-use-common.h-file.patch | 218 + ...-ti9x4-fix-rebot_notify-and-gpiod_request.patch | 62 + ...media-i2c-add-interim-LVDS-imager-drivers.patch | 5202 ++++++++++ ...i2c-soc_camera-rcar_csi2-adjust-debugging.patch | 165 + ...orm-soc_camera-rcar_vin-add-max96712-max9.patch | 135 + ...9-regulator-add-MAX2008X-camera-protector.patch | 579 ++ ...rm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch | 1445 +++ .../0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch | 52 + ...media-i2c-max96712-add-MIPI-GMSL2-support.patch | 189 + .../0503-media-i2c-ov2311-add-GMSL2-support.patch | 83 + ...-media-i2c-max9296-add-MIPI-GMSL2-support.patch | 169 + ...2c-gmsl-parse-gmsl_mode-from-deserializer.patch | 118 + ...c-imagers-add-AR0231-for-new-LVDS-support.patch | 1843 ++++ ...p0101-ap0201-fix-vendor-name-fsin-fix-on-.patch | 97 + .../0508-media-i2c-fix-indentation.patch | 46 + ...509-media-i2c-fix-broken-old-LVDS-imagers.patch | 33 + ...10-arm64-dts-renesas-add-camera-dtsi-file.patch | 120 + ...511-media-i2c-ap0201-detect-AP0200-AP0202.patch | 85 + ...2-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch | 1949 ++++ .../0513-MTD-renesas-rpc-fix-dummy-cycles.patch | 30 + .../0514-media-i2c-gmsl2-add-fsync-support.patch | 102 + .../0515-media-i2c-ap020x-add-fsync-support.patch | 74 + .../0516-media-i2c-ar0231-fix-translator.patch | 37 + ...-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch | 43 + .../0518-media-i2c-imagers-ar0231-fix-GMSL2.patch | 55 + ...c-imagers-add-IMX390-for-new-LVDS-support.patch | 4377 ++++++++ ...edia-i2c-soc_camera-add-dummy-lvds-sensor.patch | 620 ++ ...64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch | 1014 ++ ...0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch | 106 + ...a-i2c-isx019-do-not-disable-embedded-line.patch | 32 + .../0524-media-i2c-dummy-fix-DT-parse.patch | 28 + ...ts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch | 74 + .../recipes-kernel/linux/linux-renesas/enable.cfg | 2 + .../linux/linux-renesas/hyperflash.cfg | 3 +- .../recipes-kernel/linux/linux-renesas/qspi.cfg | 2 +- .../recipes-kernel/linux/linux-renesas/renesas.scc | 103 +- .../recipes-kernel/linux/linux-renesas/ulcb.cfg | 4 + .../recipes-kernel/linux/linux-renesas/v3hsk.cfg | 3 + .../linux/linux-renesas_4.14.bbappend | 16 +- ...nvalid-file-size-check-for-non-regular-fi.patch | 36 - .../alsa/alsa-utils_1.1.6.bbappend | 5 - .../gstreamer/gstreamer1.0-omx_%.bbappend | 10 + .../gstvspfilter-m3nulcb_r8a77965.conf | 2 - .../gstreamer1.0-plugin-vspfilter_1.0.1.bbappend | 2 - .../0001-install-wayland.h-header.patch | 33 - .../0002-pkgconfig-libgstwayland.patch | 32 - ...003-gstkmssink-add-rcar-du-to-driver-list.patch | 25 - .../0001-install-wayland.h-header.patch | 33 + .../0002-pkgconfig-libgstwayland.patch | 32 + ...003-gstkmssink-add-rcar-du-to-driver-list.patch | 25 + .../gstreamer1.0-plugins-bad_1.14.%.bbappend | 13 - .../gstreamer1.0-plugins-bad_1.16.2.bbappend | 13 + .../pulseaudio/pulseaudio_12.2.bbappend | 42 - .../pulseaudio/pulseaudio_13.0.bbappend | 42 + .../recipes-support/glm/glm_0.9.7.6.bb | 13 +- .../recipes-support/libiio/libiio.inc | 11 - .../recipes-support/libiio/libiio_0.5.bb | 9 - .../recipes-support/libiio/libiio_git.bb | 8 - .../recipes-support/libusbg/libusbg_0.1.0.bb | 9 +- .../recipes-support/nlopt/nlopt_2.4.2.bb | 9 +- ...01-3rdparty-ippicv-Use-pre-downloaded-ipp.patch | 38 + .../0001-Add-missing-multi-line-separator.patch | 36 + ...0001-Check-for-clang-before-using-isystem.patch | 32 + .../opencv/opencv/0001-Dont-use-isystem.patch | 30 + ...-work-around-deprecated-ffmpeg-RAW-functi.patch | 33 + ...-ts-create-share-library-intead-of-static.patch | 26 + .../opencv/0003-To-fix-errors-as-following.patch | 69 + .../opencv/opencv/fixpkgconfig.patch | 30 + .../opencv/opencv/uselocalxfeatures.patch | 20 + .../recipes-support/opencv/opencv_3.4.3.bb | 194 + bsp/meta-renesas-rcar-gen3/.gitignore | 2 - bsp/meta-renesas-rcar-gen3/.gitreview | 5 - bsp/meta-renesas-rcar-gen3/COPYING.MIT | 17 - bsp/meta-renesas-rcar-gen3/MAINTAINERS | 28 - bsp/meta-renesas-rcar-gen3/README.md | 28 - .../meta-rcar-gen3/COPYING.MIT | 17 - .../meta-rcar-gen3/README.evaproprietary.md | 121 - .../meta-rcar-gen3/README.md | 243 - .../meta-rcar-gen3/README.proprietary.md | 219 - .../meta-rcar-gen3/conf/layer.conf | 12 - .../meta-rcar-gen3/conf/machine/ebisu.conf | 55 - .../meta-rcar-gen3/conf/machine/h3ulcb.conf | 55 - .../conf/machine/include/r8a7795.inc | 3 - .../conf/machine/include/r8a7796.inc | 3 - .../conf/machine/include/r8a77965.inc | 3 - .../conf/machine/include/r8a77990.inc | 3 - .../conf/machine/include/tune-cortexa53.inc | 18 - .../machine/include/tune-cortexa57-cortexa53.inc | 18 - .../conf/machine/include/tune-cortexa57.inc | 18 - .../meta-rcar-gen3/conf/machine/m3nulcb.conf | 45 - .../meta-rcar-gen3/conf/machine/m3ulcb.conf | 48 - .../meta-rcar-gen3/conf/machine/salvator-x.conf | 84 - .../meta-rcar-gen3/docs-book.yml | 18 - .../sample/conf/ebisu/linaro-gcc/bsp/bblayers.conf | 16 - .../conf/ebisu/linaro-gcc/bsp/local-wayland.conf | 271 - .../sample/conf/ebisu/linaro-gcc/bsp/local.conf | 264 - .../conf/ebisu/linaro-gcc/gfx-only/bblayers.conf | 16 - .../ebisu/linaro-gcc/gfx-only/local-wayland.conf | 277 - .../sample/conf/ebisu/linaro-gcc/mmp/bblayers.conf | 16 - .../conf/ebisu/linaro-gcc/mmp/local-wayland.conf | 383 - .../sample/conf/ebisu/poky-gcc/bsp/bblayers.conf | 15 - .../conf/ebisu/poky-gcc/bsp/local-wayland.conf | 279 - .../docs/sample/conf/ebisu/poky-gcc/bsp/local.conf | 272 - .../conf/ebisu/poky-gcc/gfx-only/bblayers.conf | 15 - .../ebisu/poky-gcc/gfx-only/local-wayland.conf | 285 - .../sample/conf/ebisu/poky-gcc/mmp/bblayers.conf | 15 - .../conf/ebisu/poky-gcc/mmp/local-wayland.conf | 391 - .../conf/h3ulcb/linaro-gcc/bsp/bblayers.conf | 16 - .../conf/h3ulcb/linaro-gcc/bsp/local-wayland.conf | 271 - .../sample/conf/h3ulcb/linaro-gcc/bsp/local.conf | 264 - .../conf/h3ulcb/linaro-gcc/gfx-only/bblayers.conf | 16 - .../h3ulcb/linaro-gcc/gfx-only/local-wayland.conf | 277 - .../conf/h3ulcb/linaro-gcc/mmp/bblayers.conf | 16 - .../conf/h3ulcb/linaro-gcc/mmp/local-wayland.conf | 383 - .../sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf | 15 - .../conf/h3ulcb/poky-gcc/bsp/local-wayland.conf | 279 - .../sample/conf/h3ulcb/poky-gcc/bsp/local.conf | 272 - .../conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf | 15 - .../h3ulcb/poky-gcc/gfx-only/local-wayland.conf | 285 - .../sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf | 15 - .../conf/h3ulcb/poky-gcc/mmp/local-wayland.conf | 391 - .../conf/m3nulcb/linaro-gcc/bsp/bblayers.conf | 16 - .../conf/m3nulcb/linaro-gcc/bsp/local-wayland.conf | 268 - .../sample/conf/m3nulcb/linaro-gcc/bsp/local.conf | 261 - .../conf/m3nulcb/linaro-gcc/gfx-only/bblayers.conf | 16 - .../m3nulcb/linaro-gcc/gfx-only/local-wayland.conf | 274 - .../conf/m3nulcb/linaro-gcc/mmp/bblayers.conf | 16 - .../conf/m3nulcb/linaro-gcc/mmp/local-wayland.conf | 380 - .../sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf | 15 - .../conf/m3nulcb/poky-gcc/bsp/local-wayland.conf | 265 - .../sample/conf/m3nulcb/poky-gcc/bsp/local.conf | 258 - .../conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf | 15 - .../m3nulcb/poky-gcc/gfx-only/local-wayland.conf | 271 - .../sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf | 15 - .../conf/m3nulcb/poky-gcc/mmp/local-wayland.conf | 377 - .../conf/m3ulcb/linaro-gcc/bsp/bblayers.conf | 16 - .../conf/m3ulcb/linaro-gcc/bsp/local-wayland.conf | 271 - .../sample/conf/m3ulcb/linaro-gcc/bsp/local.conf | 264 - .../conf/m3ulcb/linaro-gcc/gfx-only/bblayers.conf | 16 - .../m3ulcb/linaro-gcc/gfx-only/local-wayland.conf | 277 - .../conf/m3ulcb/linaro-gcc/mmp/bblayers.conf | 16 - .../conf/m3ulcb/linaro-gcc/mmp/local-wayland.conf | 383 - .../sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf | 15 - .../conf/m3ulcb/poky-gcc/bsp/local-wayland.conf | 279 - .../sample/conf/m3ulcb/poky-gcc/bsp/local.conf | 272 - .../conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf | 15 - .../m3ulcb/poky-gcc/gfx-only/local-wayland.conf | 285 - .../sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf | 15 - .../conf/m3ulcb/poky-gcc/mmp/local-wayland.conf | 391 - .../conf/salvator-x/linaro-gcc/bsp/bblayers.conf | 16 - .../conf/salvator-x/linaro-gcc/bsp/local-ltp.conf | 274 - .../salvator-x/linaro-gcc/bsp/local-wayland.conf | 280 - .../conf/salvator-x/linaro-gcc/bsp/local.conf | 273 - .../salvator-x/linaro-gcc/gfx-only/bblayers.conf | 16 - .../linaro-gcc/gfx-only/local-wayland.conf | 286 - .../conf/salvator-x/linaro-gcc/mmp/bblayers.conf | 16 - .../salvator-x/linaro-gcc/mmp/local-wayland.conf | 395 - .../conf/salvator-x/poky-gcc/bsp/bblayers.conf | 15 - .../conf/salvator-x/poky-gcc/bsp/local-ltp.conf | 284 - .../salvator-x/poky-gcc/bsp/local-wayland.conf | 288 - .../sample/conf/salvator-x/poky-gcc/bsp/local.conf | 281 - .../salvator-x/poky-gcc/gfx-only/bblayers.conf | 15 - .../poky-gcc/gfx-only/local-wayland.conf | 294 - .../conf/salvator-x/poky-gcc/mmp/bblayers.conf | 15 - .../salvator-x/poky-gcc/mmp/local-wayland.conf | 403 - .../copyscript/copy_evaproprietary_softwares.sh | 1032 -- .../copyscript/copy_proprietary_softwares.sh | 1329 --- .../docs/sample/copyscript/md5list.txt | 64 - ...3-add-readme-for-building-with-Linaro-Gcc.patch | 186 - .../meta-rcar-gen3/include/adsp-control.inc | 2 - .../include/arm-trusted-firmware-control.inc | 58 - .../meta-rcar-gen3/include/avb-control.inc | 2 - .../meta-rcar-gen3/include/cas-control.inc | 17 - .../meta-rcar-gen3/include/checksum_control.inc | 25 - .../include/checksum_control_files.inc | 15 - .../meta-rcar-gen3/include/cms-control.inc | 18 - .../meta-rcar-gen3/include/dtv-dvd-control.inc | 19 - .../meta-rcar-gen3/include/gles-control.inc | 6 - .../meta-rcar-gen3/include/iccom-control.inc | 2 - .../meta-rcar-gen3/include/multimedia-control.inc | 9 - .../meta-rcar-gen3/include/omx-control.inc | 156 - .../include/rcar-gen3-modules-common.inc | 9 - .../include/rcar-gen3-path-common.inc | 1 - .../recipes-benchmark/glmark2/glmark2_git.bbappend | 2 - .../arm-trusted-firmware_git.bb | 60 - ...c_trace.c-snprintf-Werror-format-truncati.patch | 28 - ...ant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch | 208 - .../recipes-bsp/optee/optee-client/optee.service | 9 - .../recipes-bsp/optee/optee-client_git.bb | 63 - ...ure_storage-ta-Add-a-missing-include-file.patch | 29 - .../recipes-bsp/optee/optee-examples_git.bb | 61 - .../0001-core-define-syscall_t-as-void-void.patch | 75 - .../recipes-bsp/optee/optee-os_git.bb | 70 - .../optee/optee-test/optee_xtest_fix.diff | 13 - .../recipes-bsp/optee/optee-test_git.bb | 55 - .../optee/optee-user-app-template_git.bb | 57 - .../recipes-bsp/qos/qosif-tp-user-module.bb | 36 - .../recipes-bsp/qos/qosif-user-module.bb | 48 - .../meta-rcar-gen3/recipes-bsp/qos/qosif.inc | 15 - .../recipes-bsp/u-boot/u-boot-common_2018.09.inc | 9 - .../meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc | 310 - .../recipes-bsp/u-boot/u-boot_2018.09.bb | 43 - .../iccom-module/iccom-tp-user-module.bb | 58 - .../iccom-module/iccom-user-module.bb | 43 - .../iccom-module/iccom-user-module.inc | 8 - .../recipes-core/base-files/base-files_%.bbappend | 5 - .../images/core-image-minimal.bbappend | 1 - .../recipes-core/ncurses/ncurses_%.bbappend | 2 - .../nativesdk-packagegroup-sdk-host.bbappend | 6 - .../recipes-core/systemd/systemd_%.bbappend | 1 - .../recipes-graphics/cogl/cogl-1.0_1.%.bbappend | 4 - ...ac-Allow-explicit-enabling-of-cunit-tests.patch | 56 - .../drm/libdrm/fix_O_CLOEXEC_undeclared.patch | 24 - .../recipes-graphics/drm/libdrm/installtests.patch | 25 - .../recipes-graphics/drm/libdrm_2.4.85.bb | 51 - .../gles-module/gles-user-module.bb | 132 - .../gles-user-module/change-shell.patch | 10 - .../gles-module/gles-user-module/rc.pvr.service | 13 - .../images/core-image-renesas-base.inc | 67 - .../images/core-image-renesas-mmp-base.inc | 102 - .../images/core-image-weston-sdk.bb | 15 - .../images/core-image-weston.bbappend | 2 - .../recipes-graphics/images/core-image-weston.inc | 15 - .../recipes-graphics/mesa/mesa-dummy.inc | 0 .../recipes-graphics/mesa/mesa-wayland.inc | 24 - .../recipes-graphics/mesa/mesa_%.bbappend | 10 - .../packagegroups/packagegroup-graphic-renesas.bb | 37 - .../recipes-graphics/wayland/libegl.bb | 19 - .../recipes-graphics/wayland/libgbm.bb | 36 - .../recipes-graphics/wayland/wayland-kms_1.6.0.bb | 25 - .../recipes-graphics/wayland/weston-conf.bbappend | 34 - .../wayland/weston-conf/weston.ini | 2 - .../recipes-graphics/wayland/weston-conf/weston.sh | 5 - .../recipes-graphics/wayland/weston-init.bbappend | 9 - .../recipes-graphics/wayland/weston.inc | 16 - .../recipes-graphics/wayland/weston_%.bbappend | 4 - .../recipes-graphics/xorg-xserver/xserver-xorg.inc | 180 - ...NULL-value-detection-for-ID_INPUT-being-u.patch | 40 - ...onfigure.ac-Fix-check-for-CLOCK_MONOTONIC.patch | 61 - ...c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch | 53 - .../0003-Remove-check-for-useSIGIO-option.patch | 47 - ...003-modesetting-Fix-16-bit-depth-bpp-mode.patch | 46 - .../xorg-xserver/xserver-xorg/macro_tweak.patch | 25 - .../xserver-xorg/musl-arm-inb-outb.patch | 18 - .../xorg-xserver/xserver-xorg_%.bbappend | 3 - .../xorg-xserver/xserver-xorg_1.19.6.bb | 33 - .../kernel-module-xtensa-hifi.bb | 41 - .../kernel-module-avb/kernel-module-avb-mch.bb | 39 - .../kernel-module-avb/kernel-module-avb-mse.bb | 41 - .../kernel-module-avb-streaming.bb | 39 - .../kernel-module-dtv/kernel-module-scu-src.bb | 59 - .../kernel-module-dtv/kernel-module-ssp.bb | 59 - .../kernel-module-dtv/kernel-module-tddmac.bb | 59 - .../kernel-module-dtv/kernel-module-tsif.bb | 58 - .../kernel-module-gles/kernel-module-gles.bb | 78 - ...ast-function-type-Wsizeof-pointer-div-and.patch | 60 - .../kernel-module-iccom-hwspinlock-sample.bb | 34 - .../kernel-module-iccom-mfis.bb | 37 - .../kernel-module-mmngr/kernel-module-mmngr.bb | 75 - .../kernel-module-mmngr/kernel-module-mmngrbuf.bb | 60 - ...mngrbuf-Take-care-of-any-migration-of-sca.patch | 35 - .../kernel-module-mmngr/mmngr_drv.inc | 13 - .../kernel-module-qos/kernel-module-qos.bb | 62 - .../kernel-module-uvcs/kernel-module-uvcs-drv.bb | 70 - .../kernel-module-vsp2driver.bb | 65 - ...-Handle-data_offset-setting-from-V4L2-API.patch | 29 - .../kernel-module-vspm/kernel-module-vspm.bb | 102 - ...-Set-UDS-horizontal-scaling-phase-to-auto.patch | 40 - .../kernel-module-vspmif/kernel-module-vspmif.bb | 67 - ...cument-for-compatible-string-renesas-rcar.patch | 32 - ...orrect-broken-uapi-for-BPF_PROG_TYPE_PERF.patch | 61 - ...essage-to-be-able-to-configure-RPMSG_VIRT.patch | 27 - .../0002-ADSP-add-ADSP-sound-driver-source.patch | 7204 ------------- ...0003-ADSP-add-build-for-ADSP-sound-driver.patch | 35 - ...-integrate-ADSP-sound-for-H3-M3-M3N-board.patch | 185 - ...05-ADSP-integrate-ADSP-sound-for-E3-board.patch | 272 - ...-ADSP-remove-HDMI-support-from-rcar-sound.patch | 101 - .../linux-libc-headers/linux-libc-headers_4.14.bb | 38 - ...cument-for-compatible-string-renesas-rcar.patch | 32 - ...-rsnd-ssi-wait-maximum-5ms-for-status-che.patch | 34 - ...orrect-broken-uapi-for-BPF_PROG_TYPE_PERF.patch | 61 - ...essage-to-be-able-to-configure-RPMSG_VIRT.patch | 27 - .../0002-ADSP-add-ADSP-sound-driver-source.patch | 7204 ------------- ...0003-ADSP-add-build-for-ADSP-sound-driver.patch | 35 - ...-integrate-ADSP-sound-for-H3-M3-M3N-board.patch | 185 - ...05-ADSP-integrate-ADSP-sound-for-E3-board.patch | 272 - ...-ADSP-remove-HDMI-support-from-rcar-sound.patch | 101 - .../recipes-kernel/linux/linux-renesas/adsp.cfg | 3 - .../capacity_aware_migration_strategy.cfg | 1 - .../recipes-kernel/linux/linux-renesas/defconfig | 6423 ------------ .../recipes-kernel/linux/linux-renesas/iccom.cfg | 1 - .../recipes-kernel/linux/linux-renesas/touch.cfg | 1 - .../linux/linux-renesas/usb-video-class.cfg | 68 - .../recipes-kernel/linux/linux-renesas/usb3.cfg | 4 - .../recipes-kernel/linux/linux-renesas_4.14.bb | 85 - .../adsp-module/adsp-fw-module.bb | 31 - .../adsp-module/adsp-if-module.bb | 61 - .../avb-applications/avb-applications.inc | 8 - .../avb-applications/avb-demoapps.bb | 121 - .../recipes-multimedia/avb-applications/avbtool.bb | 17 - .../cms-module/cms-user-module.bb | 74 - .../dtv-module/dtv-user-module.bb | 74 - .../dvd-module/dvd-encryption-module.bb | 53 - .../dvd-module/dvd-user-module.bb | 64 - .../gstreamer/gstreamer1.0-omx/gstomx.conf | 131 - .../gstreamer/gstreamer1.0-omx_1.14.4.bbappend | 38 - .../gstvspfilter-ebisu_r8a77990.conf | 2 - .../gstvspfilter-h3ulcb_r8a7795.conf | 2 - .../gstvspfilter-m3nulcb_r8a77965.conf | 2 - .../gstvspfilter-m3ulcb_r8a7796.conf | 2 - .../gstvspfilter-salvator-x_r8a7795.conf | 2 - .../gstvspfilter-salvator-x_r8a7796.conf | 2 - .../gstvspfilter-salvator-x_r8a77965.conf | 2 - .../gstreamer1.0-plugin-vspfilter_1.0.1.bb | 52 - .../gstreamer1.0-plugins-bad_1.14.4.bbappend | 27 - .../gstreamer1.0-plugins-good_1.14.4.bbappend | 32 - .../mmngr-module/mmngr-user-module.bb | 25 - .../recipes-multimedia/mmngr-module/mmngr_lib.inc | 18 - .../mmngr-module/mmngrbuf-user-module.bb | 25 - .../omx-module/deltask-omx-user-module.inc | 2 - .../recipes-multimedia/omx-module/libalacdla-l.bb | 61 - .../recipes-multimedia/omx-module/libflacdla-l.bb | 50 - .../omx-module/omx-user-module.bb | 489 - .../0001-Fix-QA-issue-when-build-with-Yocto.patch | 34 - .../recipes-multimedia/openavnu/openavnu_git.bb | 74 - .../packagegroup-gstreamer1.0-plugins.bb | 85 - .../packagegroup-multimedia-kernel.bb | 31 - .../packagegroups/packagegroup-multimedia-libs.bb | 20 - .../vspmif-module/vspmif-tp-user-module.bb | 46 - .../vspmif-module/vspmif-user-module.bb | 49 - .../recipes-multimedia/vspmif-module/vspmif.inc | 15 - bsp/meta-renesas/.gitignore | 2 + bsp/meta-renesas/COPYING.MIT | 17 + bsp/meta-renesas/MAINTAINERS | 28 + bsp/meta-renesas/README.md | 28 + bsp/meta-renesas/meta-rcar-gen3/COPYING.MIT | 17 + .../meta-rcar-gen3/README.evaproprietary.md | 121 + bsp/meta-renesas/meta-rcar-gen3/README.md | 233 + .../meta-rcar-gen3/README.proprietary.md | 219 + bsp/meta-renesas/meta-rcar-gen3/conf/layer.conf | 11 + .../meta-rcar-gen3/conf/machine/ebisu.conf | 22 + .../meta-rcar-gen3/conf/machine/h3ulcb.conf | 21 + .../conf/machine/include/r8a7795.inc | 3 + .../conf/machine/include/r8a7796.inc | 3 + .../conf/machine/include/r8a77965.inc | 3 + .../conf/machine/include/r8a77990.inc | 3 + .../conf/machine/include/rcar_common.inc | 33 + .../conf/machine/include/rcar_ulcb.inc | 3 + .../conf/machine/include/tune-cortexa57.inc | 20 + .../meta-rcar-gen3/conf/machine/m3nulcb.conf | 15 + .../meta-rcar-gen3/conf/machine/m3ulcb.conf | 20 + .../meta-rcar-gen3/conf/machine/salvator-x.conf | 52 + .../sample/conf/ebisu/poky-gcc/bsp/bblayers.conf | 15 + .../conf/ebisu/poky-gcc/bsp/local-wayland.conf | 305 + .../docs/sample/conf/ebisu/poky-gcc/bsp/local.conf | 298 + .../conf/ebisu/poky-gcc/gfx-only/bblayers.conf | 15 + .../ebisu/poky-gcc/gfx-only/local-wayland.conf | 311 + .../sample/conf/ebisu/poky-gcc/mmp/bblayers.conf | 15 + .../conf/ebisu/poky-gcc/mmp/local-wayland.conf | 417 + .../sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf | 15 + .../conf/h3ulcb/poky-gcc/bsp/local-wayland.conf | 305 + .../sample/conf/h3ulcb/poky-gcc/bsp/local.conf | 298 + .../conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf | 15 + .../h3ulcb/poky-gcc/gfx-only/local-wayland.conf | 311 + .../sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf | 15 + .../conf/h3ulcb/poky-gcc/mmp/local-wayland.conf | 417 + .../sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf | 15 + .../conf/m3nulcb/poky-gcc/bsp/local-wayland.conf | 302 + .../sample/conf/m3nulcb/poky-gcc/bsp/local.conf | 295 + .../conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf | 15 + .../m3nulcb/poky-gcc/gfx-only/local-wayland.conf | 308 + .../sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf | 15 + .../conf/m3nulcb/poky-gcc/mmp/local-wayland.conf | 414 + .../sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf | 15 + .../conf/m3ulcb/poky-gcc/bsp/local-wayland.conf | 305 + .../sample/conf/m3ulcb/poky-gcc/bsp/local.conf | 298 + .../conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf | 15 + .../m3ulcb/poky-gcc/gfx-only/local-wayland.conf | 311 + .../sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf | 15 + .../conf/m3ulcb/poky-gcc/mmp/local-wayland.conf | 417 + .../conf/salvator-x/poky-gcc/bsp/bblayers.conf | 15 + .../conf/salvator-x/poky-gcc/bsp/local-ltp.conf | 309 + .../salvator-x/poky-gcc/bsp/local-wayland.conf | 314 + .../sample/conf/salvator-x/poky-gcc/bsp/local.conf | 307 + .../salvator-x/poky-gcc/gfx-only/bblayers.conf | 15 + .../poky-gcc/gfx-only/local-wayland.conf | 320 + .../conf/salvator-x/poky-gcc/mmp/bblayers.conf | 15 + .../salvator-x/poky-gcc/mmp/local-wayland.conf | 429 + .../copyscript/copy_evaproprietary_softwares.sh | 1032 ++ .../copyscript/copy_proprietary_softwares.sh | 1329 +++ .../docs/sample/copyscript/md5list.txt | 64 + .../meta-rcar-gen3/include/adsp-control.inc | 2 + .../include/arm-trusted-firmware-control.inc | 58 + .../meta-rcar-gen3/include/avb-control.inc | 2 + .../meta-rcar-gen3/include/cas-control.inc | 17 + .../meta-rcar-gen3/include/cms-control.inc | 18 + .../meta-rcar-gen3/include/dtv-dvd-control.inc | 19 + .../meta-rcar-gen3/include/gles-control.inc | 6 + .../meta-rcar-gen3/include/iccom-control.inc | 2 + .../meta-rcar-gen3/include/multimedia-control.inc | 9 + .../meta-rcar-gen3/include/omx-control.inc | 156 + .../include/rcar-gen3-modules-common.inc | 11 + .../include/rcar-gen3-path-common.inc | 1 + .../recipes-benchmark/glmark2/glmark2.inc | 3 + .../recipes-benchmark/glmark2/glmark2_git.bbappend | 2 + .../arm-trusted-firmware_git.bb | 60 + ...c_trace.c-snprintf-Werror-format-truncati.patch | 28 + ...ant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch | 208 + .../recipes-bsp/optee/optee-client/optee.service | 9 + .../recipes-bsp/optee/optee-client_git.bb | 63 + .../0001-core-define-syscall_t-as-void-void.patch | 75 + ...001-scripts-update-scripts-to-use-python3.patch | 427 + .../recipes-bsp/optee/optee-os_git.bb | 69 + .../recipes-bsp/qos/qosif-tp-user-module.bb | 36 + .../recipes-bsp/qos/qosif-user-module.bb | 48 + .../meta-rcar-gen3/recipes-bsp/qos/qosif.inc | 15 + .../recipes-bsp/u-boot/u-boot-common_2018.09.inc | 9 + .../meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc | 310 + .../recipes-bsp/u-boot/u-boot_2018.09.bb | 43 + .../iccom-module/iccom-tp-user-module.bb | 58 + .../iccom-module/iccom-user-module.bb | 43 + .../iccom-module/iccom-user-module.inc | 8 + .../recipes-core/base-files/base-files/fstab | 11 + .../recipes-core/base-files/base-files_%.bbappend | 11 + .../images/core-image-minimal.bbappend | 1 + .../recipes-core/ncurses/ncurses_%.bbappend | 2 + .../nativesdk-packagegroup-sdk-host.bbappend | 6 + ...add-non-owned-item-for-safe-transitioning.patch | 14 + .../recipes-core/systemd/systemd_%.bbappend | 3 + .../recipes-graphics/cairo/cairo_%.bbappend | 3 + .../recipes-graphics/cogl/cogl-1.0_1.%.bbappend | 4 + .../gles-module/gles-user-module.bb | 136 + .../gles-user-module/change-shell.patch | 10 + .../gles-module/gles-user-module/rc.pvr.service | 13 + .../images/core-image-renesas-base.inc | 68 + .../images/core-image-renesas-mmp-base.inc | 102 + .../images/core-image-weston-sdk.bb | 15 + .../images/core-image-weston.bbappend | 2 + .../recipes-graphics/images/core-image-weston.inc | 16 + .../recipes-graphics/mesa/mesa-dummy.inc | 0 .../recipes-graphics/mesa/mesa-wayland.inc | 24 + .../recipes-graphics/mesa/mesa_%.bbappend | 10 + .../packagegroups/packagegroup-graphic-renesas.bb | 39 + .../recipes-graphics/wayland/libegl.bb | 21 + .../recipes-graphics/wayland/libgbm.bb | 36 + .../recipes-graphics/wayland/wayland-kms_1.6.0.bb | 25 + .../recipes-graphics/wayland/weston-init.bbappend | 48 + .../wayland/weston-init/weston.ini | 2 + .../recipes-graphics/wayland/weston-init/weston.sh | 5 + ...timing-to-set-color-format-for-primary-pl.patch | 49 + .../recipes-graphics/wayland/weston_%.bbappend | 23 + .../recipes-graphics/xorg-xserver/xserver-xorg.inc | 180 + ...NULL-value-detection-for-ID_INPUT-being-u.patch | 40 + ...onfigure.ac-Fix-check-for-CLOCK_MONOTONIC.patch | 61 + ...c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch | 53 + .../0003-Remove-check-for-useSIGIO-option.patch | 47 + ...003-modesetting-Fix-16-bit-depth-bpp-mode.patch | 46 + .../xorg-xserver/xserver-xorg/macro_tweak.patch | 25 + .../xserver-xorg/musl-arm-inb-outb.patch | 18 + .../xorg-xserver/xserver-xorg_%.bbappend | 3 + .../xorg-xserver/xserver-xorg_1.19.6.bb | 35 + .../kernel-module-xtensa-hifi.bb | 41 + .../kernel-module-avb/kernel-module-avb-mch.bb | 39 + .../kernel-module-avb/kernel-module-avb-mse.bb | 41 + .../kernel-module-avb-streaming.bb | 39 + .../kernel-module-dtv/kernel-module-scu-src.bb | 59 + .../kernel-module-dtv/kernel-module-ssp.bb | 59 + .../kernel-module-dtv/kernel-module-tddmac.bb | 59 + .../kernel-module-dtv/kernel-module-tsif.bb | 58 + .../kernel-module-gles/kernel-module-gles.bb | 76 + ...-Silence-warnings-being-treated-as-errors.patch | 25 + .../kernel-module-iccom-hwspinlock-sample.bb | 34 + .../kernel-module-iccom-mfis.bb | 37 + .../kernel-module-mmngr/kernel-module-mmngr.bb | 75 + .../kernel-module-mmngr/kernel-module-mmngrbuf.bb | 60 + ...mngrbuf-Take-care-of-any-migration-of-sca.patch | 35 + .../kernel-module-mmngr/mmngr_drv.inc | 13 + .../kernel-module-qos/kernel-module-qos.bb | 62 + .../kernel-module-uvcs/kernel-module-uvcs-drv.bb | 70 + .../kernel-module-vsp2driver.bb | 65 + ...-Handle-data_offset-setting-from-V4L2-API.patch | 29 + .../kernel-module-vspm/kernel-module-vspm.bb | 102 + ...-Set-UDS-horizontal-scaling-phase-to-auto.patch | 40 + .../kernel-module-vspmif/kernel-module-vspmif.bb | 67 + ...cument-for-compatible-string-renesas-rcar.patch | 32 + ...orrect-broken-uapi-for-BPF_PROG_TYPE_PERF.patch | 61 + ...-Set-primary-plane-zpos-immutably-at-init.patch | 89 + .../0001-perf-tools-Add-Python-3-support.patch | 917 ++ ...essage-to-be-able-to-configure-RPMSG_VIRT.patch | 27 + .../0002-ADSP-add-ADSP-sound-driver-source.patch | 7204 +++++++++++++ ...0003-ADSP-add-build-for-ADSP-sound-driver.patch | 35 + ...-integrate-ADSP-sound-for-H3-M3-M3N-board.patch | 185 + ...05-ADSP-integrate-ADSP-sound-for-E3-board.patch | 272 + ...-ADSP-remove-HDMI-support-from-rcar-sound.patch | 101 + .../linux-libc-headers/linux-libc-headers_4.14.bb | 48 + ...cument-for-compatible-string-renesas-rcar.patch | 32 + ...orrect-broken-uapi-for-BPF_PROG_TYPE_PERF.patch | 61 + ...-Set-primary-plane-zpos-immutably-at-init.patch | 89 + .../0001-perf-tools-Add-Python-3-support.patch | 917 ++ ...essage-to-be-able-to-configure-RPMSG_VIRT.patch | 27 + .../0002-ADSP-add-ADSP-sound-driver-source.patch | 7204 +++++++++++++ ...0003-ADSP-add-build-for-ADSP-sound-driver.patch | 35 + ...-integrate-ADSP-sound-for-H3-M3-M3N-board.patch | 185 + ...05-ADSP-integrate-ADSP-sound-for-E3-board.patch | 272 + ...-ADSP-remove-HDMI-support-from-rcar-sound.patch | 101 + ...ake-perf-able-to-build-with-latest-libbfd.patch | 36 + .../recipes-kernel/linux/linux-renesas/adsp.cfg | 3 + .../capacity_aware_migration_strategy.cfg | 1 + .../recipes-kernel/linux/linux-renesas/iccom.cfg | 1 + .../recipes-kernel/linux/linux-renesas/touch.cfg | 1 + .../linux/linux-renesas/usb-video-class.cfg | 68 + .../recipes-kernel/linux/linux-renesas/usb3.cfg | 4 + .../recipes-kernel/linux/linux-renesas_4.14.bb | 93 + .../adsp-module/adsp-fw-module.bb | 32 + .../adsp-module/adsp-if-module.bb | 61 + .../avb-applications/avb-applications.inc | 8 + .../avb-applications/avb-demoapps.bb | 108 + .../recipes-multimedia/avb-applications/avbtool.bb | 17 + .../cms-module/cms-user-module.bb | 75 + .../dtv-module/dtv-user-module.bb | 74 + .../dvd-module/dvd-encryption-module.bb | 54 + .../dvd-module/dvd-user-module.bb | 64 + .../gstreamer/gstreamer1.0-omx/gstomx.conf | 131 + .../gstreamer/gstreamer1.0-omx_1.16.2.bbappend | 33 + .../gstvspfilter-ebisu_r8a77990.conf | 2 + .../gstvspfilter-h3ulcb_r8a7795.conf | 2 + .../gstvspfilter-m3nulcb_r8a77965.conf | 2 + .../gstvspfilter-m3ulcb_r8a7796.conf | 2 + .../gstvspfilter-salvator-x_r8a7795.conf | 2 + .../gstvspfilter-salvator-x_r8a7796.conf | 2 + .../gstvspfilter-salvator-x_r8a77965.conf | 2 + .../gstreamer1.0-plugin-vspfilter-config_1.0.1.bb | 25 + .../gstreamer1.0-plugin-vspfilter_1.0.1.bb | 35 + .../gstreamer1.0-plugins-bad_1.16.2.bbappend | 8 + .../gstreamer1.0-plugins-good_1.16.2.bbappend | 13 + .../mmngr-module/mmngr-user-module.bb | 25 + .../recipes-multimedia/mmngr-module/mmngr_lib.inc | 19 + .../mmngr-module/mmngrbuf-user-module.bb | 25 + .../omx-module/deltask-omx-user-module.inc | 2 + .../recipes-multimedia/omx-module/libalacdla-l.bb | 63 + .../recipes-multimedia/omx-module/libflacdla-l.bb | 51 + .../omx-module/omx-user-module.bb | 490 + .../0001-Fix-QA-issue-when-build-with-Yocto.patch | 34 + .../recipes-multimedia/openavnu/openavnu_git.bb | 75 + .../packagegroup-gstreamer1.0-plugins.bb | 87 + .../packagegroup-multimedia-kernel.bb | 33 + .../packagegroups/packagegroup-multimedia-libs.bb | 22 + .../vspmif-module/vspmif-tp-user-module.bb | 46 + .../vspmif-module/vspmif-user-module.bb | 49 + .../recipes-multimedia/vspmif-module/vspmif.inc | 15 + bsp/meta-rtlwifi/recipes-bsp/drivers/rtl8821cu.bb | 6 +- bsp/meta-sancloud/.gitignore | 2 + bsp/meta-sancloud/.gitlab-ci.yml | 49 + bsp/meta-sancloud/COPYING | 2 +- bsp/meta-sancloud/ChangeLog.md | 14 + bsp/meta-sancloud/README.md | 86 +- .../conf/include/sancloud-enable-archiver.inc | 8 + .../conf/include/sancloud-mirrors.inc | 14 + .../conf/include/sancloud-sstate-arago.inc | 2 + .../conf/include/sancloud-sstate-poky.inc | 2 + bsp/meta-sancloud/conf/layer.conf | 7 +- bsp/meta-sancloud/conf/machine/bbe.conf | 44 +- .../conf/machine/include/bbe-kernel-lts.inc | 2 + .../conf/machine/include/bbe-kernel-mainline.inc | 3 + .../conf/machine/include/bbe-kernel-stable.inc | 7 + .../conf/machine/include/bbe-kernel-ti-rt.inc | 5 + .../conf/machine/include/bbe-kernel-ti.inc | 5 + .../recipes-graphics/wayland/weston-init.bbappend | 3 + .../0001-arm-dts-Update-SanCloud-DTS-files.patch | 609 ++ .../recipes-kernel/linux/linux-stable_%.bbappend | 3 + bsp/meta-sancloud/kas/bbe-arago.yml | 20 + bsp/meta-sancloud/kas/bbe-poky.yml | 16 + bsp/meta-sancloud/kas/dev/bbe-arago.yml | 42 + bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml | 8 + .../kas/dev/bbe-poky-kernel-mainline.yml | 8 + .../kas/dev/bbe-poky-kernel-stable.yml | 14 + bsp/meta-sancloud/kas/dev/bbe-poky.yml | 68 + ...defconfig-Only-move-do_create_srcipk-task.patch | 32 + ...p-arago-sysvinit-boot-Skip-recipe-if-sysv.patch | 35 + .../meta-sancloud-arago/conf/layer.conf | 17 - .../wayland/weston-conf_%.bbappend | 3 - .../recipes-bsp/u-boot/files/boot.cmd | 17 + bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb | 16 - .../recipes-bsp/u-boot/u-boot-script-bbe.bb | 20 + .../recipes-kernel/linux/linux-bbe-4.19.inc | 24 - .../linux/linux-bbe-4.19/am335x-pru-uio.dtsi | 192 - .../recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi | 38 - .../recipes-kernel/linux/linux-bbe-5.4.inc | 32 + .../linux/linux-bbe-5.4/am335x-pru-uio.dtsi | 192 + .../recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi | 38 + .../recipes-kernel/linux/linux-bbe-rt_4.19.bb | 5 - .../recipes-kernel/linux/linux-bbe-rt_5.4.bb | 5 + .../recipes-kernel/linux/linux-bbe_4.19.bb | 5 - .../recipes-kernel/linux/linux-bbe_5.4.bb | 5 + bsp/meta-sancloud/scripts/ci-build.sh | 12 + bsp/meta-sancloud/scripts/release-build.sh | 33 + bsp/meta-sancloud/scripts/release-tag.sh | 15 + bsp/meta-synopsys/conf/layer.conf | 2 +- bsp/meta-synopsys/conf/machine/hsdk.conf | 2 +- .../conf/machine/include/arch-arc.inc | 4 +- .../recipes-core/expat/expat_2.2.6.bbappend | 1 - .../glibc/files/0031-Add-ARC-architecture.patch | 8475 ---------------- ...with-nonshared-cflags-option-to-configure.patch | 162 - .../recipes-core/glibc/glibc-initial_2.28.bbappend | 4 - .../recipes-core/glibc/glibc_2.28.bbappend | 4 - .../recipes-core/glibc/glibc_2.31.bbappend | 33 + ...fix-static-assertion-on-IPPROTO_MAX-range.patch | 74 + .../recipes-core/systemd/systemd-conf.bbappend | 6 - ...ADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch | 27 - .../recipes-core/systemd/systemd_244.3.bbappend | 4 + .../recipes-core/util-linux/util-linux_%.bbappend | 1 - .../recipes-devtools/binutils/binutils-arc.inc | 6 +- ...nutils-crosssdk-Generate-relocatable-SDKs.patch | 29 +- ...es-of-system-directories-when-cross-linki.patch | 26 +- .../recipes-devtools/binutils/binutils_arc.bb | 2 + bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc | 11 +- .../0003-gcc-poison-system-directories.patch | 65 +- .../gcc/gcc-arc/0007-optional-libstdc.patch | 38 +- .../gcc/gcc-arc/0012-cpp-honor-sysroot.patch | 22 +- ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 63 +- .../gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch | 32 +- .../recipes-devtools/gcc/gcc-cross-initial_arc.bb | 2 +- .../gcc/gcc-crosssdk-initial_arc.bb | 2 +- .../recipes-devtools/gcc/libgcc_arc.bb | 7 - bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh | 1 + ...001-mesonbuild-Recognise-ARC-architecture.patch | 39 - .../recipes-devtools/meson/meson_0.47.2.bbappend | 2 - .../mozjs/mozjs/0001-Add-ARC-CPU-support.patch | 48 +- .../mozjs/0001-arc-Disable-atomic-operations.patch | 42 + .../recipes-extended/mozjs/mozjs_52.9.1.bbappend | 5 - .../recipes-extended/mozjs/mozjs_60.9.0.bbappend | 6 + .../recipes-graphics/mesa/mesa_%.bbappend | 2 +- .../wayland/agl-compositor_git.bbappend | 6 + .../wayland/files/0001-Fix-build-with-GCC9.patch | 26 + ...ility-define-CLOCK_BOOTTIME-when-not-avai.patch | 41 - .../1005-protocol-add-weston-debug.xml.patch | 242 - ...n-add-weston_debug-API-and-implementation.patch | 958 -- ...positor-add-option-to-enable-weston_debug.patch | 87 - ...-xwm-dump_property-to-use-FILE-internally.patch | 141 - ...move-FILE-to-the-callers-of-dump_property.patch | 267 - ...onvert-WM_DEBUG-into-a-weston-debug-scope.patch | 423 - ...positor-Add-weston_layer_mask_is_infinite.patch | 52 - ...15-compositor-Add-scene-graph-debug-scope.patch | 297 - ...tor-drm-Add-backend-pointer-to-drm_output.patch | 37 - ...sitor-drm-Add-drm-backend-log-debug-scope.patch | 632 -- ...positor-drm-Read-FB2_MODIFIERS-capability.patch | 89 - .../recipes-graphics/wayland/weston_5.0.0.bbappend | 16 - .../linux-firmware/linux-firmware_%.bbappend | 4 + .../linux-firmware/linux-firmware_git.bbappend | 4 - .../recipes-kernel/linux/linux-arc.inc | 24 +- ...-add-pseudo-deferred-io-for-modeset-drive.patch | 79 + ...UDL-defio-add-fb-lock-and-required-checks.patch | 54 + .../0011-ARC-hsdk-Enable-U-Boot-support.patch | 28 + .../0012-ARC-hsdk-Enable-cgroups-support.patch | 27 + .../recipes-kernel/linux/linux-arc_4.19.9.bb | 4 - .../recipes-kernel/linux/linux-arc_5.3.15.bb | 6 + .../recipes-kernel/linux/linux-yocto_%.bbappend | 9 + .../pulseaudio/pulseaudio_12.2.bbappend | 5 - .../pulseaudio/pulseaudio_13.0.bbappend | 5 + .../recipes-navigation/gpsd/gpsd_%.bbappend | 2 + .../images/agl-demo-platform-crosssdk.bbappend | 1 + ...0001-Add-ARC-support-in-double-conversion.patch | 22 +- .../recipes-qt/qt5/qtbase_git.bbappend | 7 +- .../recipes-support/gnupg/gnupg_2.2.%.bbappend | 1 + .../libgpg-error/libgpg-error_1.32.bbappend | 4 - .../libgpg-error/libgpg-error_1.37.bbappend | 4 + .../liburcu/liburcu_0.10.%.bbappend | 5 - .../liburcu/liburcu_0.11.%.bbappend | 5 + bsp/meta-ti/README | 8 +- bsp/meta-ti/classes/ti-pdk-fetch.bbclass | 5 +- bsp/meta-ti/classes/ti-pdk.bbclass | 6 +- bsp/meta-ti/conf/layer.conf | 9 +- bsp/meta-ti/conf/machine/am335x-evm.conf | 4 +- bsp/meta-ti/conf/machine/am3517-evm.conf | 2 +- bsp/meta-ti/conf/machine/am37x-evm.conf | 2 +- bsp/meta-ti/conf/machine/am437x-evm.conf | 4 +- bsp/meta-ti/conf/machine/am57xx-evm.conf | 23 +- bsp/meta-ti/conf/machine/am65xx-evm-k3r5-sr2.conf | 11 + bsp/meta-ti/conf/machine/am65xx-evm-k3r5.conf | 12 + bsp/meta-ti/conf/machine/am65xx-evm.conf | 31 +- bsp/meta-ti/conf/machine/am65xx-hs-evm-k3r5.conf | 13 + bsp/meta-ti/conf/machine/am65xx-hs-evm.conf | 6 +- bsp/meta-ti/conf/machine/beagle-x15.conf | 25 - bsp/meta-ti/conf/machine/beagleboard.conf | 2 +- bsp/meta-ti/conf/machine/beaglebone.conf | 6 - bsp/meta-ti/conf/machine/dra7xx-evm.conf | 22 +- bsp/meta-ti/conf/machine/include/am65xx.inc | 24 + bsp/meta-ti/conf/machine/include/davinci.inc | 2 +- bsp/meta-ti/conf/machine/include/j7.inc | 11 + bsp/meta-ti/conf/machine/include/k3.inc | 17 +- bsp/meta-ti/conf/machine/include/k3r5.inc | 23 + bsp/meta-ti/conf/machine/include/keystone.inc | 2 +- bsp/meta-ti/conf/machine/include/omap-a15.inc | 9 +- bsp/meta-ti/conf/machine/include/omap3.inc | 2 +- bsp/meta-ti/conf/machine/include/omap4.inc | 2 +- bsp/meta-ti/conf/machine/include/ti33x.inc | 12 +- bsp/meta-ti/conf/machine/include/ti43x.inc | 7 +- bsp/meta-ti/conf/machine/j7-evm-k3r5.conf | 11 + bsp/meta-ti/conf/machine/j7-evm.conf | 25 +- bsp/meta-ti/conf/machine/j7-hs-evm-k3r5.conf | 13 + bsp/meta-ti/conf/machine/j7-hs-evm.conf | 22 + bsp/meta-ti/conf/machine/omap3evm.conf | 2 +- bsp/meta-ti/conf/machine/omap5-evm.conf | 2 +- bsp/meta-ti/conf/machine/omapl137-evm.conf | 2 +- bsp/meta-ti/conf/machine/pandaboard.conf | 2 +- bsp/meta-ti/conf/multiconfig/k3r5-sr2.conf | 3 + bsp/meta-ti/conf/multiconfig/k3r5.conf | 5 + bsp/meta-ti/licenses/Hewlett-Packard | 13 + bsp/meta-ti/licenses/Patrick-Powell | 4 + bsp/meta-ti/recipes-bsp/aif2-lld/aif2-lld_git.bb | 2 + .../arm-trusted-firmware_2.2.bb | 71 - .../recipes-bsp/board-rtos/board-rtos_git.bb | 3 +- .../cadence-mhdp-fw/cadence-mhdp-fw_git.bb | 2 +- .../recipes-bsp/cmb-addon/cmb-addon-rtos_git.bb | 6 +- .../recipes-bsp/common-csl-ip/common-csl-ip.inc | 6 +- bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld.inc | 2 +- bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld_git.bb | 6 + .../recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb | 2 +- bsp/meta-ti/recipes-bsp/dfe-lld/dfe-lld_git.bb | 2 + bsp/meta-ti/recipes-bsp/dspdce-fw/dspdce-fw_git.bb | 6 +- bsp/meta-ti/recipes-bsp/dsptop/libulm_git.bb | 6 +- bsp/meta-ti/recipes-bsp/edma3-lld/edma3-lld.inc | 3 +- bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb | 5 +- .../gc320-drivers/ti-gc320-driver_5.0.11.p7.bb | 10 +- .../recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb | 3 + .../recipes-bsp/i2c-lld/i2c-lld-rtos_git.bb | 2 +- .../recipes-bsp/icss-emac-lld/icss-emac-lld.inc | 1 + .../ipc-lld/ipc-lld-examples-rtos_git.bb | 39 +- bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-fw_git.bb | 26 +- bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld.inc | 2 +- ...01-HACK-ipumm-Workaround-for-linker-error.patch | 48 + bsp/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb | 24 +- bsp/meta-ti/recipes-bsp/iqn2-lld/iqn2-lld_git.bb | 2 + .../ivshmem-uio/ivshmem-uio-tests_git.bb | 23 + bsp/meta-ti/recipes-bsp/osal/osal.inc | 1 + bsp/meta-ti/recipes-bsp/pa-lld/pa-lld.inc | 2 +- bsp/meta-ti/recipes-bsp/pa-lld/pa-lld_git.bb | 3 + bsp/meta-ti/recipes-bsp/pm-lld/pm-lld-rtos_git.bb | 6 +- .../ti-img-rogue-driver_1.10.5371573.bb | 14 +- .../powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb | 18 +- bsp/meta-ti/recipes-bsp/pru/pru-icss_git.bb | 33 +- .../prueth-fw/prueth-fw-am65x-sr2_git.bb | 39 + bsp/meta-ti/recipes-bsp/pruss-lld/pruss-lld.inc | 1 + bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld.inc | 2 +- bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld_git.bb | 6 + bsp/meta-ti/recipes-bsp/rm-lld/rm-lld_git.bb | 2 + bsp/meta-ti/recipes-bsp/rwmem/rwmem_1.2.bb | 27 - bsp/meta-ti/recipes-bsp/sa-lld/sa-lld.inc | 8 +- bsp/meta-ti/recipes-bsp/sa-lld/sa-lld_git.bb | 2 + .../recipes-bsp/sciclient/sciclient-rtos_git.bb | 20 +- .../recipes-bsp/starterware/starterware.inc | 6 +- .../ti-img-encode-decode_1.0.0.bb | 31 - .../ti-img-encode-decode/viddec-test-app_1.0.0.bb | 18 - .../ti-img-encode-decode/videnc-test-app_1.0.0.bb | 18 - .../ti-img-encode-decode/vxd-dec-fw_git.bb | 34 - .../ti-sci-fw/ti-sci-fw-source_2020.04a.bb | 45 + .../recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.bb | 79 + .../recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.inc | 16 + .../traceframework/traceframework_git.bb | 2 + .../trusted-firmware-a_%.bbappend | 23 + .../u-boot/u-boot-ti-staging_2019.01.bb | 7 - .../u-boot/u-boot-ti-staging_2020.01.bb | 7 + bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti.inc | 16 +- bsp/meta-ti/recipes-bsp/vis-fw/vis_01.50.07.15.bb | 4 +- bsp/meta-ti/recipes-bsp/x-load/signgp.bb | 2 +- ...bbfd.h-suppress-GCC9-Wstringop-truncation.patch | 28 + bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x_git.bb | 1 + ...-CMakeLists.txt-disable-phys-addr-for-now.patch | 34 - ...eplace-PAGE_SIZE-with-local-variable-name.patch | 69 - bsp/meta-ti/recipes-devtools/ion/ion-tests_git.bb | 19 - bsp/meta-ti/recipes-devtools/k3conf/k3conf_git.bb | 24 + .../libgal/ti-gc320-libs_5.0.11.p7.bb | 8 +- .../libgles/ti-img-rogue-umlibs_1.10.5371573.bb | 17 +- .../libgles/ti-sgx-ddk-um_1.17.4948957.bb | 25 +- ...switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch | 26 - .../files/omapfbplay-errorhandling.patch | 34 - .../omapfbplay/omapfbplay-cmem_git.bb | 16 - .../omapfbplay/omapfbplay-dce_git.bb | 7 - .../omapfbplay/omapfbplay-xv_git.bb | 3 - .../recipes-graphics/omapfbplay/omapfbplay.inc | 37 - .../recipes-graphics/omapfbplay/omapfbplay_git.bb | 3 - .../xserver-xf86-config/omap3/xorg.conf | 29 - .../xserver-xf86-config/omap4/xorg.conf | 15 - .../xserver-xf86-config/omapl138/xorg.conf | 29 - .../xserver-xf86-config/ti33x/xorg.conf | 29 - .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 1 - ...ate-shebang-in-helper-scripts-for-python3.patch | 56 + .../recipes-kernel/jailhouse/jailhouse_git.bb | 45 +- .../recipes-kernel/kselftests/kselftests_4.10.bb | 3 + .../linux/linux-ti-staging-4.19/defconfig | 1 - .../linux/linux-ti-staging-4.19/dra7xx/defconfig | 1 - .../linux/linux-ti-staging-4.19/k2g/defconfig | 1 - .../linux/linux-ti-staging-4.19/k3/defconfig | 1 - .../linux/linux-ti-staging-4.19/keystone/defconfig | 1 - .../linux/linux-ti-staging-4.19/omapl138/defconfig | 1 - .../linux/linux-ti-staging-4.19/ti33x/defconfig | 1 - .../linux/linux-ti-staging-4.19/ti43x/defconfig | 1 - .../linux/linux-ti-staging-5.4/defconfig | 1 + .../linux/linux-ti-staging-5.4/dra7xx/defconfig | 1 + .../linux/linux-ti-staging-5.4/k2g/defconfig | 1 + .../linux/linux-ti-staging-5.4/k3/defconfig | 1 + .../linux/linux-ti-staging-5.4/keystone/defconfig | 1 + .../linux/linux-ti-staging-5.4/omapl138/defconfig | 1 + .../linux/linux-ti-staging-5.4/ti33x/defconfig | 1 + .../linux/linux-ti-staging-5.4/ti43x/defconfig | 1 + .../linux/linux-ti-staging-rt-4.19/defconfig | 1 - .../linux-ti-staging-rt-4.19/dra7xx/defconfig | 1 - .../linux/linux-ti-staging-rt-4.19/k2g/defconfig | 1 - .../linux/linux-ti-staging-rt-4.19/k3/defconfig | 1 - .../linux-ti-staging-rt-4.19/keystone/defconfig | 1 - .../linux/linux-ti-staging-rt-4.19/ti33x/defconfig | 1 - .../linux/linux-ti-staging-rt-4.19/ti43x/defconfig | 1 - .../linux/linux-ti-staging-rt-5.4/defconfig | 1 + .../linux/linux-ti-staging-rt-5.4/dra7xx/defconfig | 1 + .../linux/linux-ti-staging-rt-5.4/k2g/defconfig | 1 + .../linux/linux-ti-staging-rt-5.4/k3/defconfig | 1 + .../linux-ti-staging-rt-5.4/keystone/defconfig | 1 + .../linux/linux-ti-staging-rt-5.4/ti33x/defconfig | 1 + .../linux/linux-ti-staging-rt-5.4/ti43x/defconfig | 1 + .../linux/linux-ti-staging-rt_4.19.bb | 10 - .../linux/linux-ti-staging-rt_5.4.bb | 10 + .../linux/linux-ti-staging-systest-4.19/defconfig | 1 - .../linux-ti-staging-systest-4.19/dra7xx/defconfig | 1 - .../linux-ti-staging-systest-4.19/k2g/defconfig | 1 - .../linux-ti-staging-systest-4.19/k3/defconfig | 1 - .../keystone/defconfig | 1 - .../omapl138/defconfig | 1 - .../linux-ti-staging-systest-4.19/ti33x/defconfig | 1 - .../linux-ti-staging-systest-4.19/ti43x/defconfig | 1 - .../linux/linux-ti-staging-systest-5.4/defconfig | 1 + .../linux-ti-staging-systest-5.4/dra7xx/defconfig | 1 + .../linux-ti-staging-systest-5.4/k2g/defconfig | 1 + .../linux-ti-staging-systest-5.4/k3/defconfig | 1 + .../keystone/defconfig | 1 + .../omapl138/defconfig | 1 + .../linux-ti-staging-systest-5.4/ti33x/defconfig | 1 + .../linux-ti-staging-systest-5.4/ti43x/defconfig | 1 + .../linux/linux-ti-staging-systest_4.19.bb | 5 - .../linux/linux-ti-staging-systest_5.4.bb | 5 + .../recipes-kernel/linux/linux-ti-staging_4.19.bb | 81 - .../recipes-kernel/linux/linux-ti-staging_5.4.bb | 83 + .../recipes-multimedia/libdce/libdce_3.00.14.00.bb | 2 +- .../recipes-security/optee/optee-%.bbappend | 1 + .../recipes-ti/beagleboard/beaglebone-capes.bb | 2 +- .../beagleboard/beaglebone-getting-started.bb | 11 +- bsp/meta-ti/recipes-ti/beagleboard/gadget-init.bb | 2 +- .../recipes-ti/bios/ti-sysbios_6.76.03.01.bb | 15 - .../recipes-ti/bios/ti-sysbios_6.82.01.19.bb | 13 + .../devtools/gcc-aarch64-none-elf_9.2-2019.12.bb | 38 + .../gcc-arm-none-eabi-native_4.9.2015q3.bb | 23 - .../devtools/gcc-arm-none-eabi_7-2018-q2-update.bb | 29 - .../devtools/gcc-arm-none-eabi_9-2019-q4-major.bb | 39 + .../gcc-linaro-baremetal-aarch64-native.bb | 23 - .../devtools/gcc-linaro-baremetal-native.bb | 23 - .../recipes-ti/devtools/ti-cgt-arm_18.12.5.bb | 43 - .../recipes-ti/devtools/ti-cgt-arm_20.2.0.bb | 42 + bsp/meta-ti/recipes-ti/devtools/ti-cgt6x.inc | 24 - bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_6.1.20.bb | 11 - bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_7.2.7.bb | 13 - bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_8.3.2.bb | 3 + bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.2.0.bb | 47 - bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.3.0.bb | 45 + .../recipes-ti/devtools/ti-xdctools-common.inc | 2 + .../devtools/ti-xdctools/arm-linker-hack.diff | 19 - .../devtools/ti-xdctools/fix-hardcoded-paths.diff | 21 - .../recipes-ti/devtools/ti-xdctools_3.55.02.22.bb | 9 - .../recipes-ti/devtools/ti-xdctools_3.61.00.16.bb | 7 + .../recipes-ti/engine-pkcs11/engine-pkcs11_git.bb | 22 - bsp/meta-ti/recipes-ti/includes/ti-paths.inc | 6 +- .../recipes-ti/ipc/ipc-transport-qmss_git.bb | 2 + .../recipes-ti/ipc/ipc-transport-srio_git.bb | 2 + bsp/meta-ti/recipes-ti/ipc/ti-ipc-common.inc | 3 +- bsp/meta-ti/recipes-ti/ipc/ti-ipc-examples_git.bb | 2 - bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos.inc | 17 +- bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos_git.bb | 17 - bsp/meta-ti/recipes-ti/ipc/ti-ipc.inc | 6 +- .../ipc/ti-ipc/0001-Add-kernel-build-dir.patch | 12 +- bsp/meta-ti/recipes-ti/ipc/ti-ipc_git.bb | 1 - bsp/meta-ti/recipes-ti/libp11/libp11_git.bb | 19 - .../multiprocmgr/multiprocmgr-test_git.bb | 7 +- .../recipes-ti/multiprocmgr/multiprocmgr.inc | 4 +- ...on-t-hardcode-kernel-s-uapi-location-keys.patch | 27 - .../recipes-ti/multiprocmgr/multiprocmgr_git.bb | 7 +- bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.61.01.01.bb | 16 - bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.75.01.01.bb | 14 + bsp/meta-ti/recipes-ti/ns/ti-ns_2.60.01.06.bb | 14 - bsp/meta-ti/recipes-ti/ns/ti-ns_2.75.00.17.bb | 13 + .../recipes-ti/openmp-rtos/openmp-rtos_git.bb | 5 + .../recipes-ti/ti-softhsmv2/ti-softhsmv2_git.bb | 48 - bsp/meta-ti/wic/sdimage-2part.wks | 6 + 2417 files changed, 161128 insertions(+), 99466 deletions(-) create mode 100644 bsp/meta-altera/conf/machine/agilex.conf delete mode 100644 bsp/meta-altera/conf/machine/stratix10swvp.conf create mode 100644 bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2020.04.bb create mode 100644 bsp/meta-altera/recipes-kernel/linux/config/config_gpio_sys.cfg create mode 100644 bsp/meta-altera/recipes-kernel/linux/config/config_jffs2.cfg create mode 100644 bsp/meta-altera/recipes-kernel/linux/config/gpio_sys.scc create mode 100644 bsp/meta-altera/recipes-kernel/linux/config/jffs2.scc delete mode 100644 bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.13.bb delete mode 100644 bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.3.bb create mode 100644 bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.bb delete mode 100644 bsp/meta-altera/recipes-kernel/linux/linux-altera_5.2.bb create mode 100644 bsp/meta-altera/recipes-kernel/linux/linux-altera_5.5.bb create mode 100644 bsp/meta-altera/wic/sdimage-stratix10-agilex.wks delete mode 100644 bsp/meta-altera/wic/sdimage-stratix10.wks create mode 100644 bsp/meta-arm/COPYING.MIT create mode 100644 bsp/meta-arm/README.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/README.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/classes/arm-autonomy-features.bbclass create mode 100644 bsp/meta-arm/meta-arm-autonomy/classes/image_types_xenguest.bbclass create mode 100644 bsp/meta-arm/meta-arm-autonomy/classes/kernel-xenguest.bbclass create mode 100644 bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image-extra.bbclass create mode 100644 bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image.bbclass create mode 100644 bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-guest.inc create mode 100644 bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-host.inc create mode 100644 bsp/meta-arm/meta-arm-autonomy/conf/layer.conf create mode 100644 bsp/meta-arm/meta-arm-autonomy/conf/machine/arm64-autonomy-guest.conf create mode 100644 bsp/meta-arm/meta-arm-autonomy/documentation/arm-autonomy-quickstart.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/documentation/xen-devicetree.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-manager.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-mkimage.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-network-bridge.md create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-juno.dtsi create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-n1sdp.dtsi create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/xen-devicetree.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/fvp/defconfig create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/juno/defconfig create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/n1sdp/defconfig create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/xen_%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-manager.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-network-bridge.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.cfg create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.scc create mode 100644 bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/linux-%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-devtools/qemu/qemu_%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/files/xen.dtsi.in create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/xen-devicetree.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen/xen_%.bbappend create mode 100755 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in create mode 100755 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-init create mode 100755 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager create mode 100755 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-mkimage create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in create mode 100755 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge.in create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-base-image.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-mkimage.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-network-bridge.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-nodisk-image.bb create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest-standard.scc create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.cfg create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.scc create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.cfg create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.scc create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.scc create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-%.bbappend create mode 100644 bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/classes/image_types_disk_img.bbclass create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/layer.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/a5ds.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/foundation-armv8.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-common/fvp.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/gem5-arm64.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/juno.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/conf/machine/n1sdp.conf create mode 100644 bsp/meta-arm/meta-arm-bsp/documentation/a5ds.md create mode 100644 bsp/meta-arm/meta-arm-bsp/documentation/foundation-armv8.md create mode 100644 bsp/meta-arm/meta-arm-bsp/documentation/fvp-base.md create mode 100644 bsp/meta-arm/meta-arm-bsp/documentation/gem5-arm64.md create mode 100644 bsp/meta-arm/meta-arm-bsp/documentation/juno.md create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_git.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/a5ds/0001-plat-arm-a5ds-move-dtb-to-a-new-address.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-a5ds.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0001-armv7-add-mmio-timer.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0002-board-arm-add-designstart-cortex-a5-board.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/fvp-common/u-boot_vexpress_fvp.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/juno/u-boot_vexpress_uenv.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.%.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/files/juno/interfaces create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/files/start-gem5.sh create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/README.md create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-standard.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-board.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-cfi.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-drm.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-net.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-rtc.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-serial.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-timer.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-virtio.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-watchdog.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64-standard.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-board.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-cfi.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-drm.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-net.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pata.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pci.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-rtc.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-serial.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-virtio.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno-standard.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno.scc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-board.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-devfreq.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-dma.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-drm.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-fb.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-i2c.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mali-midgard.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mmc.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-net.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-pci.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-rtc.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sata.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-serial.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sound.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-thermal.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-usb.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-common-custom.dtsi create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-custom.dts create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/rtsm_ve-motherboard-nomap.dtsi create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_1cpu.dts create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_2cpu.dts create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_4cpu.dts create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_8cpu.dts create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2.dtsi create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2_base.dtsi create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0001-TMP-iommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0002-pci_quirk-add-acs-override-for-PCI-devices.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/disable-extra-fw.cfg create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bbappend create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm-platforms.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm_5.3.bb create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc create mode 100644 bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend create mode 100644 bsp/meta-arm/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/conf/layer.conf create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0003-gcc-poison-system-directories.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0006-64-bit-multilib-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0007-optional-libstdc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0009-COLLECT_GCC_OPTIONS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0011-fortran-cross-compile-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0012-cpp-honor-sysroot.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0013-MIPS64-Default-to-N64-ABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0015-gcc-Fix-argument-list-too-long-error.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0016-Disable-sdt.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0017-libtool.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0021-export-CPP.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0023-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0027-aarch64-Add-support-for-musl-ldso.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0029-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0031-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0037-sync-gcc-stddef.h-with-musl.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0038-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0039-Fix-for-testsuite-failure.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0040-Re-introduce-spe-commandline-options.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0041-ARC-fix-spec-gen.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0043-riscv-Disable-multilib-for-OE.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0002-gcc-poison-system-directories.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0004-64-bit-multilib-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0005-optional-libstdc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0007-COLLECT_GCC_OPTIONS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0009-fortran-cross-compile-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0010-cpp-honor-sysroot.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0011-MIPS64-Default-to-N64-ABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0013-gcc-Fix-argument-list-too-long-error.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0014-Disable-sdt.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0015-libtool.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0019-export-CPP.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0020-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0021-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0022-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0023-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0024-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0025-aarch64-Add-support-for-musl-ldso.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0026-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0027-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0029-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0031-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0032-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0033-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0035-sync-gcc-stddef.h-with-musl.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0036-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0037-Fix-for-testsuite-failure.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0038-Re-introduce-spe-commandline-options.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0039-riscv-Disable-multilib-for-OE.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0002-gcc-poison-system-directories.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0004-64-bit-multilib-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0005-optional-libstdc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0006-COLLECT_GCC_OPTIONS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0008-fortran-cross-compile-hack.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0009-cpp-honor-sysroot.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0010-MIPS64-Default-to-N64-ABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0012-gcc-Fix-argument-list-too-long-error.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0013-Disable-sdt.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0014-libtool.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0018-export-CPP.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0023-aarch64-Add-support-for-musl-ldso.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0033-sync-gcc-stddef.h-with-musl.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0035-Fix-for-testsuite-failure.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0036-Re-introduce-spe-commandline-options.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.2.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.3.bb create mode 100644 bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-9.2.bb create mode 100644 bsp/meta-arm/meta-arm/conf/layer.conf create mode 100644 bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc create mode 100644 bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.1.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.2.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-devtools/opencsd/opencsd_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-client_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-examples_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee-test_git.bb create mode 100644 bsp/meta-arm/meta-arm/recipes-security/optee/optee.inc delete mode 100644 bsp/meta-boundary/classes/image_types_boundary.bbclass delete mode 100644 bsp/meta-boundary/conf/distro/boundary-wayland.conf delete mode 100644 bsp/meta-boundary/conf/layer.conf delete mode 100644 bsp/meta-boundary/conf/machine/imx6-acl.conf delete mode 100644 bsp/meta-boundary/conf/machine/nitrogen8mm.conf delete mode 100644 bsp/meta-boundary/dynamic-layers/qt5-layer/recipes-qtbrowser/qtbrowser-qt5/qtbrowser-qt5_git.bb delete mode 100644 bsp/meta-boundary/dynamic-layers/xfce-layer/recipes-xfce/images/boundary-eval-image-xfce.bb delete mode 100644 bsp/meta-boundary/licenses/boundary delete mode 100644 bsp/meta-boundary/recipes-boundary/app-startup/app-startup.bb delete mode 100755 bsp/meta-boundary/recipes-boundary/app-startup/files/app delete mode 100644 bsp/meta-boundary/recipes-boundary/app-startup/files/root.profile delete mode 100644 bsp/meta-boundary/recipes-boundary/daemonize/daemonize.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/devregs/devregs.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/images/boundary-image-multimedia-full.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/libmdi2300/libmdi2300_git.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/printer-tools/printer-tools_git.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/COPYING delete mode 100644 bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/syslogd delete mode 100644 bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/sysklogd-config-remote.bb delete mode 100644 bsp/meta-boundary/recipes-boundary/video-input-icon/files/COPYING delete mode 100644 bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5640-MIPI-Test.desktop delete mode 100644 bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5642.desktop delete mode 100755 bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input delete mode 100644 bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input.desktop delete mode 100755 bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5640-mipi-test delete mode 100755 bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5642-test delete mode 100644 bsp/meta-boundary/recipes-boundary/video-input-icon/video-input-icon.bb delete mode 100644 bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state.bbappend delete mode 100644 bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx6/asound.state delete mode 100644 bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx7/asound.state delete mode 100644 bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-boot_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-mkimage%.bbappend delete mode 100644 bsp/meta-boundary/recipes-bsp/u-boot/boundary/fw_env.config delete mode 100644 bsp/meta-boundary/recipes-bsp/u-boot/u-boot-boundary_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-connectivity/bluez5/bluez5/0001-hciattach-add-QCA9377-Tuffello-support.patch delete mode 100644 bsp/meta-boundary/recipes-connectivity/bluez5/bluez5_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-connectivity/networkmanager/files/NetworkManager.conf delete mode 100644 bsp/meta-boundary/recipes-connectivity/networkmanager/networkmanager_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-core/busybox/busybox/custom-ash.cfg delete mode 100644 bsp/meta-boundary/recipes-core/busybox/busybox_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-core/init-ifupdown/boundary/interfaces delete mode 100644 bsp/meta-boundary/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend delete mode 100644 bsp/meta-boundary/recipes-core/microcom/microcom_git.bb delete mode 100644 bsp/meta-boundary/recipes-core/psplash/files/boundary-logo-img.h delete mode 100644 bsp/meta-boundary/recipes-core/psplash/psplash_git.bbappend delete mode 100644 bsp/meta-boundary/recipes-graphics/tslib_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mm/weston.ini delete mode 100644 bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mq/weston.ini delete mode 100644 bsp/meta-boundary/recipes-graphics/wayland/weston_4.0.0.imx.bbappend delete mode 100644 bsp/meta-boundary/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend delete mode 100644 bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg/0001-v2-xserver-xorg-Fix-X-server-crash.patch delete mode 100644 bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg_1.20.1.bbappend delete mode 100644 bsp/meta-boundary/recipes-kernel/kernel-iio/kernel-iio.bb delete mode 100644 bsp/meta-boundary/recipes-kernel/kernel-modules/kernel-module-qcacld_git.bb delete mode 100644 bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-bdsdmac_git.bb delete mode 100644 bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-gslx680_1.0.bb delete mode 100644 bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware_git.bbappend delete mode 100644 bsp/meta-boundary/recipes-kernel/linux/linux-boundary_%.bbappend delete mode 100644 bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.14.x.bb delete mode 100644 bsp/meta-boundary/recipes-kernel/linux/linux-imx-headers_4.14.x.bb delete mode 100644 bsp/meta-boundary/recipes-sato/images/boundary-eval-image.bb delete mode 100644 bsp/meta-boundary/recipes-sato/packagegroups/packagegroup-core-x11-sato.bbappend delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/ccimx6ulsbcexpress.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/cm-fx6.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-emmc.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-nand.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-pico.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/imx6qsabrelite.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/imx6ul-kontron.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/include/ccimx6ulsom.inc delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/include/tx6-karo-common.inc create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/lx2160acex7.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/m28evk.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/m53evk.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mm.conf create mode 100644 bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mn.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/pcm052.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6q-10x0.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6q-11x0.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6s-8034.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6s-8035.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6u-8033.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6u-80x0.conf delete mode 100644 bsp/meta-freescale-3rdparty/conf/machine/tx6u-81x0.conf create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0001-plat-nxp-Add-lx2160acex7-module-support.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0002-plat-nxp-lx2160a-auto-boot.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf_git.bbappend create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6qdl-pico/brcmfmac4339-sdio.txt create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6ul-pico/brcmfmac4339-sdio.txt create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/imx-atf/imx-atf-boundary_2.3.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/libmcc2/libmcc2_2.0.1.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils-lx2160acex7/0001-lx2160acex7-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils_git.bbappend create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0001-lx2160acex7-misc-RCW-files.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0002-Set-io-pads-as-GPIO.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0003-S2-enable-gen3-xspi-increase-divisor-to-28.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0004-refactor-a009531-a008851-and-a011270.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0006-lx2160a-add-SVR-check-for-a050234-to-apply-only-on-r.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0007-lx2160acex7-pcie-workarounds-and-fan-full-speed.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0008-lx2160a-add-generic-bootloc-section.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0009-lx2160acex7-remove-all-predefined-RCW-files.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw_git.bbappend delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/aarch64/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/arm/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils_2018.07.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi_2017.03.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-karo_git.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron_2020.01.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0001-armv8-add-lx2160acex7-build-inclusion.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0002-armv8-lx2160acex-misc-hacks-to-get-the-sources-built.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0003-armv8-lx2160acex7-defconfig-and-main-platform-includ.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0004-armv8-lx2160acex7-common-files-for-platform-support.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0005-armv8-lx2160acex7-lx2160acex-device-tree.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0006-armv8-lx2160acex7-board-support-files.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0007-lx2160a-load-dpl-into-0x80001000-instead-of-0x80d000.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0008-uboot-add-nvme-commands-and-for-distroboot.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0009-armv8-lx2160acex7-Fix-booting-from-NVMe-drives.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0010-nvme-add-accessor-to-namespace-id-and-eui64.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0011-nvme-flush-dcache-on-both-r-w-and-the-prp-list.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0012-nvme-use-page-aligned-buffer-for-identify-command.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0013-lx2160a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0014-lx2160acex7-pcie-fixup-and-boot-from-eMMC-print.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0015-lx2160a-cex7-set-mmc-dev-to-0-when-attempting-sd_boo.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0016-lx2160acex7-Misc-fixes-to-support-LSDK-20.04.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0017-lx2160acex7-misc-fixes-to-get-booting-from-eMMC-func.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bbappend create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq/boot.cmd.in create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq_2019.10.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex/boot.cmd.in create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex_2019.07.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-common.inc delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/0001-tools-fix-cross-compiling-tools-when-HOSTCC-is-overr.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx6ull/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx7/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/mx6/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/vf/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils_2016.11.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.inc create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2019.07.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite/0001-Fix-build-with-recent-layers.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcexpress/interfaces create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcpro/interfaces create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-bt.rules create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-wifi.rules create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-attach.sh create mode 100644 bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-init-wifi.sh delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-mcc_2.1.01.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564/modprobe-qca6564.conf create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564_git.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware-qca6564/linux-firmware-qca6564_2.4-r2.2.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_%.bbappend delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_git.bbappend delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_4.9.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_5.4.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm64/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_4.9.x.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_5.4.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0003-igb-Enable-random-mac-address.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0007-ARM-i.MX6-dts-add-SPDIF-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0008-ARM-i.MX6-dts-add-Power-Button.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0014-ARM-i.MX6-dts-add-analog-audio-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0017-ARM-i.MX6-dts-enable-v4l2-output.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0019-igb-Define-the-device-mac-address-in-device-tree.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0022-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0023-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0025-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0026-ARM-mxs-change-usb-phy-test-clock-gating.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0027-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0028-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0029-ARM-i.MX6-dts-change-issd-gpio-order.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0030-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0031-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0032-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0033-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0035-video-mxc-IPUv3-fb-restore-sync-bits.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0036-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0037-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0038-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0039-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0040-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0041-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0042-ARM-dts-cm-fx6-enable-can-bus.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0043-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0044-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0045-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0046-ARM-i.MX6-dts-fix-include-file-order.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0047-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0048-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0049-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0050-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0051-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0052-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0053-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0054-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0055-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0056-i2c-fix-i2c_of-include.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0057-ARM-dts-cm-fx6-fix-missing-defines.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0058-imx6-hdmi-add-missing-definition.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0059-ARM-i.MX6-cm-fx6-update-defconfig.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab_3.14.28.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx.inc delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx/m53evk/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx_3.9.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19.bbappend create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0002-cpufreq-imx6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0003-ARM-dts-imx6ul-use-nvmem-cells-for-cpu-speed-grading.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6q-var-som-vsc.dts create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6qdl-var-som.dtsi create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0001-arm64-dts-lx2160a-add-lx2160acex7-device-tree-build.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0002-arm64-dts-lx2160a-add-lx2160acex7-device-tree.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0005-arm64-dts-lx2160a-cex7-add-ltc3882-support.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0006-arm64-dts-lx2160a-cex7-add-on-module-eeproms.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0007-pci-hotplug-declare-IDT-bridge-as-hotpluggabl-bridge.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0008-pci-spr2803-quirk-to-fix-class-ID.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq_5.4.bbappend create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0002-ARM-dts-imx6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0003-net-wireless-Export-regulatory_hint_user.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0004-net-wireless-Allow-for-firmware-to-handle-DFS.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0005-net-wireless-Add-cfg80211_is_gratuitous_arp_unsolici.patch create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0006-linux-crypto-caam-set-hwrng-quality.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo-3.16/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo_3.16.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron/defconfig create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron_5.4.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-lx2160acex7.inc create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-qoriq_5.4.bbappend delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/0001-arm-dts-vf610-phycore-rdk.dts-rename-to-vf610-pcm052.patch delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys_3.13.bb create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/apalis-imx6/defconfig create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6/defconfig create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6ull/defconfig create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/mx7/defconfig delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.9-1.0.x/defconfig create mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.14-2.0.x.bb delete mode 100644 bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.9-1.0.x.bb create mode 100644 bsp/meta-freescale-3rdparty/wic/lx2160acex7.wks.in delete mode 100644 bsp/meta-freescale/classes/dtc-145.bbclass create mode 100644 bsp/meta-freescale/conf/machine/imx8mnevk.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1012afrwy-32b.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1012ardb-32b.conf create mode 100644 bsp/meta-freescale/conf/machine/ls1028ardb.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1043ardb-32b.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1043ardb-be.conf create mode 100644 bsp/meta-freescale/conf/machine/ls1046afrwy.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1046ardb-32b.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1046ardb-be.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls1088ardb-be.conf delete mode 100644 bsp/meta-freescale/conf/machine/ls2088ardb-be.conf create mode 100644 bsp/meta-freescale/dynamic-layers/aglprofilegraphical/recipes-graphics/wayland/weston-init.bbappend create mode 100644 bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init.bbappend create mode 100644 bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini delete mode 100644 bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv/0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch delete mode 100644 bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_3.4.%.bbappend create mode 100644 bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend delete mode 100644 bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch delete mode 100644 bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch create mode 100644 bsp/meta-freescale/recipes-bsp/atf/atf-tools_git.bb create mode 100644 bsp/meta-freescale/recipes-bsp/atf/atf_git.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb delete mode 100755 bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl create mode 100644 bsp/meta-freescale/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_20.04.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-7.8.inc create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8.5.inc delete mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_7.8.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_7.8.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8x_7.8.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_7.8.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_8.5.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca.inc create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb create mode 100644 bsp/meta-freescale/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_1.5.0.bb create mode 100644 bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_2.0.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.9.bb create mode 100644 bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb create mode 100644 bsp/meta-freescale/recipes-bsp/imx-seco/imx-seco_2.3.1.bb create mode 100644 bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch create mode 100644 bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.38.bb create mode 100644 bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb create mode 100644 bsp/meta-freescale/recipes-bsp/libimxdmabuffer/files/run-ptest create mode 100644 bsp/meta-freescale/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2018.11.inc create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-fw-utils_2018.11.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2018.11.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2018.11.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-common.inc delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2017.03.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch delete mode 100755 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2019.04.bb delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.03.inc delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.09.inc delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-fw-utils_2018.03.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Move-to-use-Python-3.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch delete mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2018.09.bb create mode 100644 bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb delete mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Remove-test-that-requires-running-as-non-root.patch delete mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Take-linking-flags-from-LDFLAGS-env-var.patch delete mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch create mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-eng_devcrypto-add-support-for-TLS-algorithms-offload.patch create mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0002-eng_devcrypto-add-support-for-TLS1.2-algorithms-offl.patch delete mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh delete mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb create mode 100644 bsp/meta-freescale/recipes-connectivity/openssl/openssl_%.bbappend create mode 100644 bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq/73-fsl-enetc-networking.rules create mode 100644 bsp/meta-freescale/recipes-devtools/cst/cst/0001-tools-Mark-struct-input_field-file_field-extern.patch create mode 100644 bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch create mode 100644 bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch delete mode 100644 bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/memfd.patch create mode 100644 bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb delete mode 100644 bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_git.bb delete mode 100644 bsp/meta-freescale/recipes-dpaa2/dpl-examples/dpl-examples_git.bb delete mode 100644 bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.12.0.bb create mode 100644 bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.14.1.bb create mode 100644 bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.20.4.bb create mode 100644 bsp/meta-freescale/recipes-extended/crconf/crconf/0001-Modify-the-Makefile-for-cross-compile.patch create mode 100644 bsp/meta-freescale/recipes-extended/crconf/crconf_git.bb create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk.inc create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch delete mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch delete mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk_17.11.bb create mode 100644 bsp/meta-freescale/recipes-extended/dpdk/dpdk_19.11-20.04.bb delete mode 100644 bsp/meta-freescale/recipes-extended/hyperrelay/hyperrelay_git.bb create mode 100644 bsp/meta-freescale/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch create mode 100644 bsp/meta-freescale/recipes-extended/jailhouse/jailhouse_0.11.bb create mode 100644 bsp/meta-freescale/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch create mode 100644 bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb delete mode 100644 bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.9.bb create mode 100644 bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb delete mode 100644 bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_git.bb create mode 100644 bsp/meta-freescale/recipes-extended/tsntool/tsntool_git.bb delete mode 100644 bsp/meta-freescale/recipes-extended/vpp-core/files/0001-GCC-above-5.4-fails-when-we-specify-arch-funattribut.patch delete mode 100644 bsp/meta-freescale/recipes-extended/vpp-core/files/0001-Link-vpp-api-with-shared-libs-if-static-is-disabled.patch delete mode 100644 bsp/meta-freescale/recipes-extended/vpp-core/files/config.h delete mode 100644 bsp/meta-freescale/recipes-extended/vpp-core/vpp-core.bb delete mode 100644 bsp/meta-freescale/recipes-extended/vpp-core/vpp-pkgs.inc create mode 100644 bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca6174.bb create mode 100644 bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca9377.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch create mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/installtests.patch create mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/musl-ioctl.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm_%.bbappend delete mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.91.imx.bb create mode 100644 bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.99.imx.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend delete mode 100644 bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend delete mode 100644 bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb create mode 100644 bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch create mode 100644 bsp/meta-freescale/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch create mode 100644 bsp/meta-freescale/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb create mode 100644 bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config create mode 100755 bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config create mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini delete mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb create mode 100644 bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb delete mode 100644 bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb create mode 100644 bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb create mode 100644 bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf create mode 100644 bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch create mode 100644 bsp/meta-freescale/recipes-kernel/ceetm/ceetm/0001-Makefile-update-CFLAGS.patch create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.9.bb create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.9.bb create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.9.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq_1.9.inc create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch create mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Disable-installing-header-file-provided-by-another-p.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0003-update-the-install-path-for-cryptodev-tests.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/dtc/dtc-145_git.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/dtc/files/make_install.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.8.bb create mode 100644 bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb create mode 100644 bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca6174_3.0.bb create mode 100644 bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb create mode 100644 bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0001-fix-build.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0002-no-split-ptlocks.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0004-export-swait-locked-functions.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt_4.1-2.0.x.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mx25/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mxs/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc_4.20.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-fslc_5.4.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/imx/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/mx8/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_4.9.123.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_5.4.3.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool-4.9.123/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_4.9.123.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx_4.9.123.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq.inc delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makefile-fix-gcc-8-build-error.patch create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-fix-gcc8-build-error.patch create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.14.bb delete mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.9.bb create mode 100644 bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/configure-allow-to-disable-libssh2.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-gstreamer1.0-plugins-base-Fix-ion.h-header-inclusion.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0003-riff-add-missing-include-directories-when-calling-in.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/make-gio_unix_2_0-dependency-configurable.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.%.bbappend delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.%.bbappend delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Fix-ion.h-header-inclusion-to-be-s.patch delete mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.2.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.4.2.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.4.2.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb delete mode 100644 bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.4.2.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb create mode 100644 bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-client_3.2.0.imx.bb create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch create mode 100644 bsp/meta-freescale/recipes-security/optee-imx/optee-test_3.2.0.imx.bb create mode 100644 bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch create mode 100644 bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch delete mode 100644 bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch create mode 100644 bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch create mode 100644 bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch delete mode 100644 bsp/meta-freescale/wic/imx-uboot-bootpart.wks create mode 100644 bsp/meta-freescale/wic/imx-uboot-bootpart.wks.in delete mode 100644 bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks create mode 100644 bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks.in delete mode 100644 bsp/meta-freescale/wic/imx-uboot-spl.wks create mode 100644 bsp/meta-freescale/wic/imx-uboot-spl.wks.in delete mode 100644 bsp/meta-intel/.gitignore delete mode 100644 bsp/meta-intel/CHANGELOG delete mode 100644 bsp/meta-intel/COPYING.MIT delete mode 100644 bsp/meta-intel/LICENSE delete mode 100644 bsp/meta-intel/MAINTAINERS delete mode 100644 bsp/meta-intel/README delete mode 100644 bsp/meta-intel/README.sources delete mode 100644 bsp/meta-intel/classes/uefi-comboapp.bbclass delete mode 100644 bsp/meta-intel/classes/uefi-sign.bbclass delete mode 100644 bsp/meta-intel/conf/include/maintainers.inc delete mode 100644 bsp/meta-intel/conf/layer.conf delete mode 100644 bsp/meta-intel/conf/machine/include/intel-common-pkgarch.inc delete mode 100644 bsp/meta-intel/conf/machine/include/intel-core2-32-common.inc delete mode 100644 bsp/meta-intel/conf/machine/include/intel-corei7-64-common.inc delete mode 100644 bsp/meta-intel/conf/machine/include/meta-intel.inc delete mode 100644 bsp/meta-intel/conf/machine/include/qemu-intel.inc delete mode 100644 bsp/meta-intel/conf/machine/include/qemuboot-intel.inc delete mode 100644 bsp/meta-intel/conf/machine/intel-core2-32.conf delete mode 100644 bsp/meta-intel/conf/machine/intel-corei7-64.conf delete mode 100755 bsp/meta-intel/custom-licenses/BSD_LMS delete mode 100644 bsp/meta-intel/custom-licenses/Intel-Microcode-License delete mode 100644 bsp/meta-intel/documentation/secureboot/README delete mode 100644 bsp/meta-intel/lib/oeqa/selftest/cases/secureboot.py delete mode 100644 bsp/meta-intel/recipes-bsp/formfactor/formfactor/machconfig delete mode 100644 bsp/meta-intel/recipes-bsp/formfactor/formfactor_0.0.bbappend delete mode 100644 bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf delete mode 100644 bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh delete mode 100644 bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb delete mode 100644 bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch delete mode 100644 bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot_%.bbappend delete mode 100644 bsp/meta-intel/recipes-bsp/thermald/thermald/0001-Use-correct-format-specifier-for-size_t.patch delete mode 100644 bsp/meta-intel/recipes-bsp/thermald/thermald_1.8.bb delete mode 100644 bsp/meta-intel/recipes-core/images/core-image-minimal-initramfs.bbappend delete mode 100644 bsp/meta-intel/recipes-core/images/core-image-tiny.bb delete mode 100644 bsp/meta-intel/recipes-core/microcode/intel-microcode_20190514a.bb delete mode 100644 bsp/meta-intel/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch delete mode 100644 bsp/meta-intel/recipes-core/microcode/iucode-tool_2.3.1.bb delete mode 100644 bsp/meta-intel/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch delete mode 100644 bsp/meta-intel/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb delete mode 100644 bsp/meta-intel/recipes-core/ovmf/ovmf_%.bbappend delete mode 100644 bsp/meta-intel/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb delete mode 100644 bsp/meta-intel/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb delete mode 100644 bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch delete mode 100644 bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch delete mode 100644 bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb delete mode 100644 bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch delete mode 100644 bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch delete mode 100644 bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb delete mode 100644 bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch delete mode 100644 bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch delete mode 100644 bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf delete mode 100644 bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel.inc delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend delete mode 100644 bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc delete mode 100644 bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch delete mode 100644 bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend delete mode 100644 bsp/meta-intel/recipes-multimedia/libva/intel-vaapi-driver_2.2.0.bb delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami-utils_1.3.1.bb delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch delete mode 100644 bsp/meta-intel/recipes-multimedia/libyami/libyami_1.3.1.bb delete mode 100644 bsp/meta-intel/recipes-rt/images/core-image-rt-sdk.bb delete mode 100644 bsp/meta-intel/recipes-rt/images/core-image-rt.bb delete mode 100644 bsp/meta-intel/recipes-selftest/images/files/incorrect.crt delete mode 100644 bsp/meta-intel/recipes-selftest/images/files/incorrect.key delete mode 100644 bsp/meta-intel/recipes-selftest/images/files/refkit-db.crt delete mode 100644 bsp/meta-intel/recipes-selftest/images/files/refkit-db.key delete mode 100644 bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-signed.bb delete mode 100644 bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-unsigned.bb delete mode 100644 bsp/meta-intel/recipes-support/sbsigntool/sbsigntool-native_git.bb delete mode 100644 bsp/meta-intel/wic/core-image-tiny.wks.in delete mode 100644 bsp/meta-intel/wic/generic-bootdisk.wks.in delete mode 100644 bsp/meta-intel/wic/grub-bootdisk-microcode.wks delete mode 100644 bsp/meta-intel/wic/systemd-bootdisk-microcode.wks create mode 100644 bsp/meta-qcom/conf/machine/evb4k-qcs404.conf create mode 100644 bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc create mode 100644 bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc create mode 100644 bsp/meta-qcom/conf/machine/qrb5165-rb5.conf create mode 100644 bsp/meta-qcom/conf/machine/sm8250-mtp.conf create mode 100644 bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend create mode 100644 bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb create mode 100644 bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend create mode 100644 bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh create mode 100644 bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb delete mode 100644 bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb create mode 100644 bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch create mode 100644 bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb create mode 100644 bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch delete mode 100644 bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb delete mode 100644 bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch create mode 100644 bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend delete mode 100644 bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb delete mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb create mode 100644 bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch create mode 100644 bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend create mode 100644 bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend create mode 100644 bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb create mode 100644 bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch create mode 100644 bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb delete mode 100644 bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service delete mode 100644 bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service create mode 100644 bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch create mode 100644 bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb create mode 100644 bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf create mode 100644 bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf create mode 100644 bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend delete mode 100644 bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-kernel/linux/bpftool.bbappend delete mode 100644 bsp/meta-raspberrypi/files/custom-licenses/Broadcom create mode 100644 bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi create mode 100644 bsp/meta-raspberrypi/kas-poky-rpi.yml create mode 100644 bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py create mode 100644 bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb delete mode 100644 bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb create mode 100644 bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb delete mode 100644 bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc create mode 100644 bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc create mode 100644 bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc create mode 100644 bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config create mode 100644 bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend create mode 100644 bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch create mode 100644 bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb delete mode 100644 bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb create mode 100644 bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb create mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch create mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb create mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/python3-sense-hat_2.2.0.bb delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb create mode 100644 bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.7.0.bb delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch delete mode 100644 bsp/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb create mode 100644 bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend delete mode 100644 bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend delete mode 100644 bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend create mode 100644 bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch create mode 100644 bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch create mode 100644 bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch create mode 100644 bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.inc delete mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb create mode 100644 bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.inc delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-config-files-path.patch delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0003-no-timeout-on-get-state.patch delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0004-Properly-handle-drain-requests-while-flushing.patch delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch delete mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14%.bbappend create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16%.bbappend create mode 100644 bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch delete mode 100644 bsp/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_20200122.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0022-arm-dts-r8a77970-Disable-RPC-on-all-R-Car-V3M-boards.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0023-arm-dts-r8a77980-Disable-RPC-on-all-R-Car-V3H-boards.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0024-mmc-mmc-Set-clock-when-reverting-to-safe-bus-mode.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0025-net-Add-an-accessor-to-know-if-waiting-for-ARP.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0026-net-Don-t-overwrite-waiting-packets-with-asynchronou.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0027-net-sh_eth-Keep-phy-running.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0028-net-sh_eth-Fix-compilation-warnings.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0029-net-sh_eth-Workaround-cache-issues.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0030-net-sh_eth-Fix-RX-error-handling.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-dummy0.network create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-eth0.network delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/dummy0.network delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/eth0.network create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/gcc/gcc-sanitizers_%.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.16.0.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0001-Allow-to-boot-without-input-device.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0002-Share-toytoolkit-lib.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0003-add-window_set_fullscreen_at_output.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0004-Add-display_poll-function.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0006-Add-widget_set_surface_allocation-func.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_8.0.0.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0420-media-i2c-ov2311-fix-otp-id-read.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0421-media-i2c-imx390-add-user-defined-size-for-register-.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0422-mmc-core-mmc-Try-other-timings-if-the-higher-one-fai.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0423-media-i2c-ap0101_ar014x-add-AP0102-chip.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0424-arm64-dts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0425-arm64-dts-r8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0426-media-i2c-ov106xx-change-order.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0427-media-i2c-gw5200-fix-imager-hang.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0428-arch64-dts-renesas-r8a77970-Fix-IPMMU-probe-order.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0429-arch64-dts-renesas-r8a77980-Fix-IPMMU-probe-order.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0430-media-i2c-ar0140-update-driver-to-use-rGPIO-and-dyna.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0431-media-i2c-ti9x4-update-remote-gpio-function.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0432-media-i2c-soc_camera-add-AR0220.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0433-media-i2c-ar0220-add-rev2-rev3.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0434-media-i2c-max9286-parse-crossbard-from-cmdline.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0435-clk-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0436-clk-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0437-clk-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0438-clk-renesas-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0439-mtd-Consolidate-Renesas-RPC-drivers.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0440-arm64-dts-renesas-r8a77970-Update-RPC-device-nodes.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0441-arm64-dts-renesas-r8a77980-Update-RPC-device-nodes.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0442-arm64-dts-renesas-r8a7795-Add-RPC-device-node.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0443-arm64-dts-renesas-r8a7796-Add-RPC-device-node.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0444-arm64-dts-renesas-r8a77965-Add-RPC-device-node.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0445-arm64-dts-renesas-ulcb-Add-RPC-HyperFlash-device-nod.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0446-arm64-dts-renesas-salvator-common-Add-RPC-HyperFlash.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0447-media-soc_camera-rcar_vin-Fix-crash-when-the-module-.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0448-media-i2c-ar0xxx-append-embedded-data-stats-into-frame.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0449-media-i2c-soc_camera-ov495_ov2775-Remove-early_param.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0450-arm64-dts-renesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0451-arm64-dts-renesas-salvator-common-Add-tee-MTD-RPC-Hy.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0452-arm64-dts-renesas-ulcb-Increase-U-Boot-partition-siz.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0453-arm64-dts-renesas-salvator-common-Increase-U-Boot-pa.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0454-media-i2c-imx390-fix-refclk.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0455-media-i2c-ox01d10-add-imager-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0456-media-i2c-max9286-fix-resetb-handling.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0457-media-i2c-ov10640-fix-dvp-order-and-soft-reset.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0458-arm64-dts-renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0459-media-i2c-ov10640-support-different-revisions.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0460-media-ar0xxx-add-embedded-line-into-frame.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0461-v3hsk-Add-separate-dts-for-dummy-camera-1920x1080.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0462-media-i2c-ov10640-add-embedded-data-fix-crop.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0463-net-can-rcar_can-fix-possible-IRQ-storm-on-high-load.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0464-arm64-dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0465-arm64-dts-renesas-add-cn12-support-on-VB2-1.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0466-media-i2c-max9286-parse-crossbar-from-dt.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0467-media-i2c-isx016-add-fixed-sensor.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0468-imx390-Read-1-byte-registers-by-default.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0469-rcar_canfd-fix-one-more-interrupt-storm-window.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0470-media-i2c-add-fps-setup.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0471-media-i2c-ov10640-add-fps-setup.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0472-media-i2c-soc_camera-fix-compilation-warnings.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0473-media-i2c-ov10640-add-different-imager-addresses.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0474-media-i2c-soc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0475-media-i2c-ar0233-add-fps-setup.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0476-media-i2c-imx390-add-fps-setup.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0477-media-i2c-ar0231-fix-FSIN-pin-input.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0478-media-i2c-ti9x4-fix-framesync.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0479-media-soc_camera-rcar_csi2-add-interrupts.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0480-media-i2c-soc_camera-ov10640-fix-emb-lines-number.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0481-r8a779-78-sysc-don-t-poweroff-Cortex-R7-core.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0482-media-i2c-max9286-ti9x4-power-down-POCs-on-reboot.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0484-media-platform-soc_camera-disable-mutex-locking-for-.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0485-media-i2c-ov10640-compensate-disabled-mutex.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0487-i2c-busses-i2c-rcar-block-pm_runtime.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0488-arm64-dts-renesas-block-i2c-pm-runtime.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0489-media-i2c-max9286-increase-i2c-freq-inside-GMSL-cahn.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0490-media-i2c-ti9x4-increase-i2c-freq-on-master-bus.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0491-media-i2c-soc_camera-switch-to-u64-adv_debug-access.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0492-media-i2c-move-gmsl-fpdlink-drivers-to-separate-fold.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0493-media-i2c-add-max96712-and-max9296.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0494-media-i2c-max9286-max9288-use-common.h-file.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0495-media-i2c-ti9x4-fix-rebot_notify-and-gpiod_request.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0496-media-i2c-add-interim-LVDS-imager-drivers.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0497-media-i2c-soc_camera-rcar_csi2-adjust-debugging.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0498-media-platform-soc_camera-rcar_vin-add-max96712-max9.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0499-regulator-add-MAX2008X-camera-protector.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0500-arm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0502-media-i2c-max96712-add-MIPI-GMSL2-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0503-media-i2c-ov2311-add-GMSL2-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0504-media-i2c-max9296-add-MIPI-GMSL2-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0505-media-i2c-gmsl-parse-gmsl_mode-from-deserializer.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0506-media-i2c-imagers-add-AR0231-for-new-LVDS-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0507-media-i2c-ap0101-ap0201-fix-vendor-name-fsin-fix-on-.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0508-media-i2c-fix-indentation.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0509-media-i2c-fix-broken-old-LVDS-imagers.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0510-arm64-dts-renesas-add-camera-dtsi-file.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0511-media-i2c-ap0201-detect-AP0200-AP0202.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0512-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0513-MTD-renesas-rpc-fix-dummy-cycles.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0514-media-i2c-gmsl2-add-fsync-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0515-media-i2c-ap020x-add-fsync-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0516-media-i2c-ar0231-fix-translator.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0517-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0518-media-i2c-imagers-ar0231-fix-GMSL2.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0519-media-i2c-imagers-add-IMX390-for-new-LVDS-support.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0520-media-i2c-soc_camera-add-dummy-lvds-sensor.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0521-arm64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0523-media-i2c-isx019-do-not-disable-embedded-line.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0524-media-i2c-dummy-fix-DT-parse.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0525-arm64-dts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/enable.cfg delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils/0001-aplay-Fix-invalid-file-size-check-for-non-regular-fi.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils_1.1.6.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0001-install-wayland.h-header.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0002-pkgconfig-libgstwayland.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0003-gstkmssink-add-rcar-du-to-driver-list.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0001-install-wayland.h-header.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0002-pkgconfig-libgstwayland.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0003-gstkmssink-add-rcar-du-to-driver-list.patch delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.%.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio.inc delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_0.5.bb delete mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_git.bb create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/fixpkgconfig.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/uselocalxfeatures.patch create mode 100644 bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv_3.4.3.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/.gitignore delete mode 100644 bsp/meta-renesas-rcar-gen3/.gitreview delete mode 100644 bsp/meta-renesas-rcar-gen3/COPYING.MIT delete mode 100644 bsp/meta-renesas-rcar-gen3/MAINTAINERS delete mode 100644 bsp/meta-renesas-rcar-gen3/README.md delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/COPYING.MIT delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.evaproprietary.md delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.md delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.proprietary.md delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/layer.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/ebisu.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/h3ulcb.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7795.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7796.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77965.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77990.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa53.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57-cortexa53.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3nulcb.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3ulcb.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/salvator-x.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs-book.yml delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-ltp.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf delete mode 100755 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh delete mode 100755 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/md5list.txt delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/adsp-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/arm-trusted-firmware-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/avb-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cas-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control_files.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cms-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/dtv-dvd-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/gles-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/iccom-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/multimedia-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/omx-control.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-modules-common.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-path-common.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples/0001-secure_storage-ta-Add-a-missing-include-file.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test/optee_xtest_fix.diff delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/installtests.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm_2.4.85.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini delete mode 100755 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/defconfig delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-ebisu_r8a77990.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7795.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7796.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a77965.conf delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb delete mode 100644 bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc create mode 100644 bsp/meta-renesas/.gitignore create mode 100644 bsp/meta-renesas/COPYING.MIT create mode 100644 bsp/meta-renesas/MAINTAINERS create mode 100644 bsp/meta-renesas/README.md create mode 100644 bsp/meta-renesas/meta-rcar-gen3/COPYING.MIT create mode 100644 bsp/meta-renesas/meta-rcar-gen3/README.evaproprietary.md create mode 100644 bsp/meta-renesas/meta-rcar-gen3/README.md create mode 100644 bsp/meta-renesas/meta-rcar-gen3/README.proprietary.md create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/layer.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/ebisu.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/h3ulcb.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7795.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7796.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77965.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77990.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_common.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_ulcb.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3nulcb.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3ulcb.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/conf/machine/salvator-x.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf create mode 100755 bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh create mode 100755 bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh create mode 100644 bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/md5list.txt create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/adsp-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/arm-trusted-firmware-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/avb-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/cas-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/cms-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/dtv-dvd-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/gles-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/iccom-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/multimedia-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/omx-control.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-modules-common.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-path-common.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-scripts-update-scripts-to-use-python3.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files/fstab create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd/add-non-owned-item-for-safe-transitioning.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cairo/cairo_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini create mode 100755 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-perf-tools-Add-Python-3-support.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-perf-tools-Add-Python-3-support.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/Make-perf-able-to-build-with-latest-libbfd.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-ebisu_r8a77990.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-h3ulcb_r8a7795.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3nulcb_r8a77965.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3ulcb_r8a7796.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7795.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7796.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a77965.conf create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config_1.0.1.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bbappend create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb create mode 100644 bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc create mode 100644 bsp/meta-sancloud/.gitignore create mode 100644 bsp/meta-sancloud/.gitlab-ci.yml create mode 100644 bsp/meta-sancloud/ChangeLog.md create mode 100644 bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc create mode 100644 bsp/meta-sancloud/conf/include/sancloud-mirrors.inc create mode 100644 bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc create mode 100644 bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc create mode 100644 bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc create mode 100644 bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc create mode 100644 bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc create mode 100644 bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc create mode 100644 bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc create mode 100644 bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend create mode 100644 bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch create mode 100644 bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend create mode 100644 bsp/meta-sancloud/kas/bbe-arago.yml create mode 100644 bsp/meta-sancloud/kas/bbe-poky.yml create mode 100644 bsp/meta-sancloud/kas/dev/bbe-arago.yml create mode 100644 bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml create mode 100644 bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml create mode 100644 bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml create mode 100644 bsp/meta-sancloud/kas/dev/bbe-poky.yml create mode 100644 bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch create mode 100644 bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch delete mode 100644 bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf delete mode 100644 bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend create mode 100644 bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd delete mode 100644 bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb create mode 100644 bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb delete mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc delete mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi delete mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi create mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc create mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi create mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi delete mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb create mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb delete mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb create mode 100644 bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb create mode 100755 bsp/meta-sancloud/scripts/ci-build.sh create mode 100755 bsp/meta-sancloud/scripts/release-build.sh create mode 100755 bsp/meta-sancloud/scripts/release-tag.sh delete mode 100644 bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend delete mode 100644 bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch delete mode 100644 bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch delete mode 100644 bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend delete mode 100644 bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend create mode 100644 bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend create mode 100644 bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch delete mode 100644 bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend delete mode 100644 bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch create mode 100644 bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend delete mode 100644 bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend create mode 120000 bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh delete mode 100644 bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch delete mode 100644 bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend create mode 100644 bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch delete mode 100644 bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend create mode 100644 bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend create mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend create mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch delete mode 100644 bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend create mode 100644 bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend delete mode 100644 bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch delete mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb create mode 100644 bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend delete mode 100644 bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend create mode 100644 bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend create mode 100644 bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend create mode 100644 bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend create mode 100644 bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend delete mode 100644 bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend create mode 100644 bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend delete mode 100644 bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend create mode 100644 bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend create mode 100644 bsp/meta-ti/conf/machine/am65xx-evm-k3r5-sr2.conf create mode 100644 bsp/meta-ti/conf/machine/am65xx-evm-k3r5.conf create mode 100644 bsp/meta-ti/conf/machine/am65xx-hs-evm-k3r5.conf create mode 100644 bsp/meta-ti/conf/machine/include/j7.inc create mode 100644 bsp/meta-ti/conf/machine/include/k3r5.inc create mode 100644 bsp/meta-ti/conf/machine/j7-evm-k3r5.conf create mode 100644 bsp/meta-ti/conf/machine/j7-hs-evm-k3r5.conf create mode 100644 bsp/meta-ti/conf/machine/j7-hs-evm.conf create mode 100644 bsp/meta-ti/conf/multiconfig/k3r5-sr2.conf create mode 100644 bsp/meta-ti/conf/multiconfig/k3r5.conf create mode 100644 bsp/meta-ti/licenses/Hewlett-Packard create mode 100644 bsp/meta-ti/licenses/Patrick-Powell delete mode 100644 bsp/meta-ti/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb mode change 100644 => 100755 bsp/meta-ti/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb mode change 100755 => 100644 bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb create mode 100644 bsp/meta-ti/recipes-bsp/ipumm-fw/files/0001-HACK-ipumm-Workaround-for-linker-error.patch create mode 100644 bsp/meta-ti/recipes-bsp/ivshmem-uio/ivshmem-uio-tests_git.bb create mode 100644 bsp/meta-ti/recipes-bsp/prueth-fw/prueth-fw-am65x-sr2_git.bb delete mode 100644 bsp/meta-ti/recipes-bsp/rwmem/rwmem_1.2.bb delete mode 100644 bsp/meta-ti/recipes-bsp/ti-img-encode-decode/ti-img-encode-decode_1.0.0.bb delete mode 100644 bsp/meta-ti/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb delete mode 100644 bsp/meta-ti/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb delete mode 100644 bsp/meta-ti/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb create mode 100644 bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw-source_2020.04a.bb create mode 100644 bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.bb create mode 100644 bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.inc create mode 100644 bsp/meta-ti/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend delete mode 100644 bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2019.01.bb create mode 100644 bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2020.01.bb create mode 100644 bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x/0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch delete mode 100644 bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-CMakeLists.txt-disable-phys-addr-for-now.patch delete mode 100644 bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-map_test-Replace-PAGE_SIZE-with-local-variable-name.patch delete mode 100644 bsp/meta-ti/recipes-devtools/ion/ion-tests_git.bb create mode 100644 bsp/meta-ti/recipes-devtools/k3conf/k3conf_git.bb delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/files/0001-omapfbplay-switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/files/omapfbplay-errorhandling.patch delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-cmem_git.bb delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-dce_git.bb delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-xv_git.bb delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay.inc delete mode 100644 bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay_git.bb delete mode 100644 bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap3/xorg.conf delete mode 100644 bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap4/xorg.conf delete mode 100644 bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omapl138/xorg.conf delete mode 100644 bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/ti33x/xorg.conf delete mode 100644 bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend create mode 100644 bsp/meta-ti/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/dra7xx/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k2g/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k3/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/keystone/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/omapl138/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti33x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti43x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/dra7xx/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k2g/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k3/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/keystone/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti33x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti43x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_5.4.bb delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/dra7xx/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k2g/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k3/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/keystone/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/omapl138/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti33x/defconfig create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti43x/defconfig delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_5.4.bb delete mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb create mode 100644 bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_5.4.bb create mode 100644 bsp/meta-ti/recipes-security/optee/optee-%.bbappend delete mode 100644 bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.76.03.01.bb create mode 100644 bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.82.01.19.bb create mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-aarch64-none-elf_9.2-2019.12.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi-native_4.9.2015q3.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb create mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_9-2019-q4-major.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-aarch64-native.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-native.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_18.12.5.bb create mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_20.2.0.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt6x.inc delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_6.1.20.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_7.2.7.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.2.0.bb create mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.3.0.bb delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff delete mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.55.02.22.bb create mode 100644 bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.61.00.16.bb delete mode 100644 bsp/meta-ti/recipes-ti/engine-pkcs11/engine-pkcs11_git.bb delete mode 100644 bsp/meta-ti/recipes-ti/libp11/libp11_git.bb delete mode 100644 bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch delete mode 100644 bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.61.01.01.bb create mode 100644 bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.75.01.01.bb delete mode 100644 bsp/meta-ti/recipes-ti/ns/ti-ns_2.60.01.06.bb create mode 100644 bsp/meta-ti/recipes-ti/ns/ti-ns_2.75.00.17.bb delete mode 100644 bsp/meta-ti/recipes-ti/ti-softhsmv2/ti-softhsmv2_git.bb create mode 100644 bsp/meta-ti/wic/sdimage-2part.wks (limited to 'bsp') diff --git a/bsp/meta-altera/README.md b/bsp/meta-altera/README.md index cea1dbf6..532333bc 100644 --- a/bsp/meta-altera/README.md +++ b/bsp/meta-altera/README.md @@ -4,6 +4,18 @@ This layer works with poky and Angstrom Please follow the recommended setup procedures of your OE distribution. +Supported u-boot and linux kernels +=== +It is important to understand the support and release of u-boot-socfpga +and linux-socfpga in the github.com/altera-opensource repositories. Only +currently supported and maintained releases/branches are available in the +repository. As such, supported kernel and u-boot releases are updated regularly +in currently supported meta-altera branches. Kernel and u-boot releases +which are no longer supported are removed. + +Supported branches +================== +Only branches listed appropriately in https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance are maintained. Choosing Kernel Versions ========================== @@ -25,6 +37,21 @@ or for the linux-altera-ltsi kernel Please note that older kernels will not compile with GCC 5+ and you will need to specify in your conf/local.conf to revert to older 4.9 toolchain. +Specifying Devicetrees and U-Boot Configurations +================================================== +All of the supported machines select default uboot configurations and devicetrees. These +selections can be overridden in the local.conf or by defining your own machine in your +own layer. + +An example of the is the DE0-Nano-SoC board, which is a supported configuration in the Cyclone5 +machine definition. + + UBOOT_CONFIG = "de0-nano-soc" + UBOOT_EXTLINUX_FDT_default = "../socfpga_cyclone5_de0_nano_soc.dtb" + +The above overrides the uboot configuration, "de0-nano-soc" is a target in u-boot, and configures +distroboot to indicate the de0-nano-soc devicetree. Please keep in mind that not all targets are +using distroboot in u-boot and may require u-boot environment changes. Choosing Toolchain Versions ============================= @@ -48,8 +75,6 @@ For Angstrom: -Send pull requests, patches, comments or questions to yvanderv@opensource.altera.com -and raj.khem@gmail.com +Submit patches via github pull requests, Use github issues to report problems or to send comments -Maintainers: Khem Raj - Yves Vandervennet +Maintainer(s): Khem Raj diff --git a/bsp/meta-altera/conf/layer.conf b/bsp/meta-altera/conf/layer.conf index 1ce4d2d5..a9885b2f 100644 --- a/bsp/meta-altera/conf/layer.conf +++ b/bsp/meta-altera/conf/layer.conf @@ -8,7 +8,7 @@ BBFILE_COLLECTIONS += "meta-altera" BBFILE_PATTERN_meta-altera := "^${LAYERDIR}/" # increase the number BBFILE_PRIORITY_meta-altera = "6" -LAYERSERIES_COMPAT_meta-altera = "thud" +LAYERSERIES_COMPAT_meta-altera = "warrior zeus dunfell" # yves BBDEBUG = "yes" diff --git a/bsp/meta-altera/conf/machine/10m50.conf b/bsp/meta-altera/conf/machine/10m50.conf index dadcbbd4..36dcf771 100644 --- a/bsp/meta-altera/conf/machine/10m50.conf +++ b/bsp/meta-altera/conf/machine/10m50.conf @@ -18,6 +18,8 @@ KERNEL_DEVICETREE = "10m50_devboard.dtb" MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" MACHINE_FEATURES = "kernel26 serial" +KBUILD_DEFCONFIG ?= "10m50_defconfig" + SERIAL_CONSOLE = "115200 ttyS0" PREFERRED_PROVIDER_virtual/kernel ??= "linux-altera-ltsi" diff --git a/bsp/meta-altera/conf/machine/agilex.conf b/bsp/meta-altera/conf/machine/agilex.conf new file mode 100644 index 00000000..d9061534 --- /dev/null +++ b/bsp/meta-altera/conf/machine/agilex.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@NAME: Altera Agilex +#@DESCRIPTION: Layer for the Intel PSG Agilex + +KBUILD_DEFCONFIG ?= "defconfig" + +require conf/machine/include/socfpga_armv8a.inc + +UBOOT_CONFIG ??= "agilex-socdk" + +KERNEL_DEVICETREE ?= "intel/socfpga_agilex_socdk.dtb" + +SERIAL_CONSOLES ?= "115200;ttyS0" + +EXTRA_IMAGECMD_jffs2 ?= "-n -q -e 0x10000" + +# Add variables for wic creation of sdcard image +IMAGE_BOOT_FILES ?= " \ + ${UBOOT_BINARY} \ + ${KERNEL_IMAGETYPE} \ + socfpga_agilex_socdk.dtb \ + " +WKS_FILE ?= "sdimage-stratix10-agilex.wks" +IMAGE_FSTYPES += "wic" + diff --git a/bsp/meta-altera/conf/machine/arria10.conf b/bsp/meta-altera/conf/machine/arria10.conf index 249edcc6..eb1367b9 100644 --- a/bsp/meta-altera/conf/machine/arria10.conf +++ b/bsp/meta-altera/conf/machine/arria10.conf @@ -4,17 +4,11 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "v2019.07%" - SPL_BINARY = "u-boot-with-spl.sfp" -UBOOT_BINARY = "u-boot-dtb.img" +UBOOT_BINARY = "u-boot.img" UBOOT_CONFIG ??= "arria10-socdk" -UBOOT_CONFIG[arria10-socdk] = "socfpga_arria10_defconfig" -UBOOT_CONFIG[arria10-socdk-nand] = "socfpga_arria10_nand_defconfig" -UBOOT_CONFIG[arria10-socdk-qspi] = "socfpga_arria10_qspi_defconfig" - KMACHINE = "arria10" # Default kernel devicetrees @@ -23,7 +17,11 @@ KERNEL_DEVICETREE ?= "\ socfpga_arria10_socdk_qspi.dtb \ socfpga_arria10_socdk_nand.dtb \ " -EXTRA_IMAGECMD_jffs2 = "--squash -s 256 -e 64KiB" + +EXTRA_IMAGECMD_jffs2 ?= "-n -q \ + ${@bb.utils.contains("A10_IMAGE_TYPE", "NAND", "-e 0x20000 -s 0x200", "", d)} \ + ${@bb.utils.contains("A10_IMAGE_TYPE", "QSPI", "-e 0x10000", "", d)} \ + " SERIAL_CONSOLES ?= "115200;ttyS0" diff --git a/bsp/meta-altera/conf/machine/arria5.conf b/bsp/meta-altera/conf/machine/arria5.conf index 01cc58b4..bf0b3156 100644 --- a/bsp/meta-altera/conf/machine/arria5.conf +++ b/bsp/meta-altera/conf/machine/arria5.conf @@ -4,12 +4,8 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "v2019.01%" - UBOOT_CONFIG ??= "arria5-socdk" -UBOOT_CONFIG[arria5-socdk] = "socfpga_arria5_defconfig" - KMACHINE = "arria5" # Default kernel devicetrees diff --git a/bsp/meta-altera/conf/machine/cyclone5.conf b/bsp/meta-altera/conf/machine/cyclone5.conf index bee250bf..13f5c8da 100644 --- a/bsp/meta-altera/conf/machine/cyclone5.conf +++ b/bsp/meta-altera/conf/machine/cyclone5.conf @@ -4,17 +4,8 @@ require conf/machine/include/socfpga.inc -PREFERRED_VERSION_u-boot-socfpga ?= "v2019.01%" - UBOOT_CONFIG ??= "cyclone5-socdk" -UBOOT_CONFIG[cyclone5-socdk] = "socfpga_cyclone5_defconfig" -UBOOT_CONFIG[de0-nano-soc] = "socfpga_de0_nano_soc_defconfig" -UBOOT_CONFIG[mcvevk] = "socfpga_mcvevk_defconfig" -UBOOT_CONFIG[sockit] = "socfpga_sockit_defconfig" -UBOOT_CONFIG[socrates] = "socfpga_socrates_defconfig" -UBOOT_CONFIG[sr1500] = "socfpga_sr1500_defconfig" - KMACHINE = "cyclone5" # Default kernel devicetrees @@ -47,6 +38,8 @@ IMAGE_BOOT_FILES ?= " \ extlinux.conf;extlinux/extlinux.conf \ " +EXTRA_IMAGECMD_jffs2 ?= "-e 0x10000" + WKS_FILE ?= "sdimage-cyclone5-arria5.wks" IMAGE_FSTYPES +="wic" diff --git a/bsp/meta-altera/conf/machine/include/socfpga.inc b/bsp/meta-altera/conf/machine/include/socfpga.inc index 256c0084..3b36bbcb 100644 --- a/bsp/meta-altera/conf/machine/include/socfpga.inc +++ b/bsp/meta-altera/conf/machine/include/socfpga.inc @@ -9,6 +9,7 @@ KERNEL_PROVIDER ?= "linux-altera" PREFERRED_PROVIDER_virtual/kernel ?= "${KERNEL_PROVIDER}" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-socfpga" +PREFERRED_PROVIDER_u-boot ?= "u-boot-socfpga" # Increase this everytime you change something in the kernel MACHINE_KERNEL_PR = "r1" @@ -20,6 +21,8 @@ KERNEL_IMAGETYPE ?= "zImage" MACHINE_EXTRA_RRECOMMENDS = " kernel-modules" MACHINE_FEATURES = "kernel26" +KBUILD_DEFCONFIG ?= "socfpga_defconfig" + # file system images required IMAGE_FSTYPES ?= "cpio ext3 tar.gz jffs2" diff --git a/bsp/meta-altera/conf/machine/include/socfpga_armv8a.inc b/bsp/meta-altera/conf/machine/include/socfpga_armv8a.inc index 766b7293..40f93536 100644 --- a/bsp/meta-altera/conf/machine/include/socfpga_armv8a.inc +++ b/bsp/meta-altera/conf/machine/include/socfpga_armv8a.inc @@ -1,16 +1,19 @@ -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/arm/arch-armv8a.inc KERNEL_PROVIDER ?= "linux-altera" PREFERRED_PROVIDER_virtual/kernel ?= "${KERNEL_PROVIDER}" KERNEL_IMAGETYPE = "Image" MACHINE_EXTRA_RRECOMMENDS += "kernel-modules" +KBUILD_DEFCONFIG ?= "defconfig" + PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-socfpga" +PREFERRED_PROVIDER_u-boot ?= "u-boot-socfpga" SPL_BINARY = "spl/u-boot-spl-dtb.hex" UBOOT_SUFFIX = "img" -UBOOT_BINARY = "u-boot-dtb.img" -UBOOT_IMAGE = "u-boot-dtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_BINARY = "u-boot.img" +UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" IMAGE_FSTYPES ?= "cpio ext3 tar.gz" do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot virtual/bootloader:do_deploy virtual/kernel:do_deploy" diff --git a/bsp/meta-altera/conf/machine/stratix10.conf b/bsp/meta-altera/conf/machine/stratix10.conf index a3ca1f77..4b4ad3a0 100644 --- a/bsp/meta-altera/conf/machine/stratix10.conf +++ b/bsp/meta-altera/conf/machine/stratix10.conf @@ -5,18 +5,19 @@ require conf/machine/include/socfpga_armv8a.inc UBOOT_CONFIG ??= "stratix10-socdk" -UBOOT_CONFIG[stratix10-socdk] = "socfpga_stratix10_defconfig" KERNEL_DEVICETREE ?= "altera/socfpga_stratix10_socdk.dtb" SERIAL_CONSOLES ?= "115200;ttyS0" +EXTRA_IMAGECMD_jffs2 ?= "-n -q -e 0x10000" + # Add variables for wic creation of sdcard image IMAGE_BOOT_FILES ?= " \ ${UBOOT_BINARY} \ ${KERNEL_IMAGETYPE} \ socfpga_stratix10_socdk.dtb \ " -WKS_FILE ?= "sdimage-stratix10.wks" +WKS_FILE ?= "sdimage-stratix10-agilex.wks" IMAGE_FSTYPES += "wic" diff --git a/bsp/meta-altera/conf/machine/stratix10swvp.conf b/bsp/meta-altera/conf/machine/stratix10swvp.conf deleted file mode 100644 index c7b664fa..00000000 --- a/bsp/meta-altera/conf/machine/stratix10swvp.conf +++ /dev/null @@ -1,39 +0,0 @@ -#@TYPE: Machine -#@NAME: Altera Stratix10 SWVP -#@DESCRIPTION: Layer for the Altera Stratix10 Software Virtual Platform - -require conf/machine/include/arm/arch-armv8.inc - -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" - -XSERVER ?= "xserver-xorg \ - mesa-driver-swrast \ - xf86-input-evdev \ - xf86-input-mouse \ - xf86-video-fbdev \ - xf86-input-keyboard" - -MACHINE_FEATURES = "" - -# Don't include kernels in standard images -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" - -KERNEL_PROVIDER ?= "linux-altera" -PREFERRED_PROVIDER_virtual/kernel ?= "${KERNEL_PROVIDER}" - -KERNEL_IMAGETYPE = "Image" - -# We have to disable SERIAL_CONSOLE due to auto-serial-console -#SERIAL_CONSOLE = "115200 ttyAMA0" - -# Force auto-serial-console to be used by all image types -# Ideally this would be part of core oe or as a bbclassappend, -# but as we don't have an easy way to append a class, defining -# it here -EXTRA_IMAGE_FEATURES += "autoserial" -FEATURE_PACKAGES_autoserial = "auto-serial-console" - -# we do not want to have getty running on tty1 as we run -# auto-serial-console there -#USE_VT = "0" -IMAGE_FSTYPES ?= "cpio ext3 tar.gz" diff --git a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga-common.inc b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga-common.inc index 2038545e..def29fa7 100644 --- a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga-common.inc +++ b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga-common.inc @@ -10,4 +10,20 @@ PV_append = "+git${SRCPV}" S = "${WORKDIR}/git" -RPROVIDES_${PN} += "u-boot" +RPROVIDES_${PN} += "u-boot" + +UBOOT_CONFIG[agilex-socdk] = "socfpga_agilex_defconfig" +UBOOT_CONFIG[agilex-socdk-qspi] = "socfpga_agilex_qspi_defconfig" +UBOOT_CONFIG[stratix10-socdk] = "socfpga_stratix10_defconfig" +UBOOT_CONFIG[stratix10-socdk-qspi] = "socfpga_stratix10_qspi_defconfig" +UBOOT_CONFIG[arria10-socdk] = "socfpga_arria10_defconfig" +UBOOT_CONFIG[arria10-socdk-nand] = "socfpga_arria10_nand_defconfig" +UBOOT_CONFIG[arria10-socdk-qspi] = "socfpga_arria10_qspi_defconfig" +UBOOT_CONFIG[cyclone5-socdk] = "socfpga_cyclone5_defconfig" +UBOOT_CONFIG[de0-nano-soc] = "socfpga_de0_nano_soc_defconfig" +UBOOT_CONFIG[de10-nano-soc] = "socfpga_de10_nano_defconfig" +UBOOT_CONFIG[mcvevk] = "socfpga_mcvevk_defconfig" +UBOOT_CONFIG[sockit] = "socfpga_sockit_defconfig" +UBOOT_CONFIG[socrates] = "socfpga_socrates_defconfig" +UBOOT_CONFIG[sr1500] = "socfpga_sr1500_defconfig" +UBOOT_CONFIG[arria5-socdk] = "socfpga_arria5_defconfig" diff --git a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.04.bb b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.04.bb index 8c7ec331..790eca13 100644 --- a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.04.bb +++ b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.04.bb @@ -2,6 +2,6 @@ require u-boot-socfpga-common.inc require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc SRC_URI = "git://github.com/altera-opensource/u-boot-socfpga.git;branch=socfpga_v2019.04" -SRCREV = "83e929c739beecff17529a0cf0fdd5c74fbe3c72" +SRCREV = "6296fdb7da9e205bc34416f38631715fb6d74e71" DEPENDS += "dtc-native bc-native u-boot-mkimage-native" diff --git a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.10.bb b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.10.bb index 9176f9ac..a42659a0 100644 --- a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.10.bb +++ b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2019.10.bb @@ -2,6 +2,6 @@ require u-boot-socfpga-common.inc require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc SRC_URI = "git://github.com/altera-opensource/u-boot-socfpga.git;branch=socfpga_v2019.10" -SRCREV = "7298985146c70ca8af8d43dd963b3e8aa3900d87" +SRCREV = "34638cc921269665e43340a50552302bd358f793" DEPENDS += "dtc-native bc-native u-boot-mkimage-native" diff --git a/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2020.04.bb b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2020.04.bb new file mode 100644 index 00000000..5e3d99b1 --- /dev/null +++ b/bsp/meta-altera/recipes-bsp/u-boot/u-boot-socfpga_v2020.04.bb @@ -0,0 +1,7 @@ +require u-boot-socfpga-common.inc +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc + +SRC_URI = "git://github.com/altera-opensource/u-boot-socfpga.git;branch=socfpga_v2020.04" +SRCREV = "2cbc36afbb31bee6e245291c51c283dbde0e3b89" + +DEPENDS += "dtc-native bc-native u-boot-mkimage-native" diff --git a/bsp/meta-altera/recipes-kernel/linux/config/config_gpio_sys.cfg b/bsp/meta-altera/recipes-kernel/linux/config/config_gpio_sys.cfg new file mode 100644 index 00000000..52708d18 --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/config/config_gpio_sys.cfg @@ -0,0 +1 @@ +CONFIG_GPIO_SYSFS=y diff --git a/bsp/meta-altera/recipes-kernel/linux/config/config_jffs2.cfg b/bsp/meta-altera/recipes-kernel/linux/config/config_jffs2.cfg new file mode 100644 index 00000000..b820ba7b --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/config/config_jffs2.cfg @@ -0,0 +1,2 @@ +CONFIG_JFFS2_FS=y +CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=n diff --git a/bsp/meta-altera/recipes-kernel/linux/config/gpio_sys.scc b/bsp/meta-altera/recipes-kernel/linux/config/gpio_sys.scc new file mode 100644 index 00000000..816cf611 --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/config/gpio_sys.scc @@ -0,0 +1 @@ +kconf non-hardware config_gpio_sys.cfg diff --git a/bsp/meta-altera/recipes-kernel/linux/config/jffs2.scc b/bsp/meta-altera/recipes-kernel/linux/config/jffs2.scc new file mode 100644 index 00000000..563ac172 --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/config/jffs2.scc @@ -0,0 +1 @@ +kconf non-hardware config_jffs2.cfg diff --git a/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.13.bb b/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.13.bb deleted file mode 100644 index 1ddccee0..00000000 --- a/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.13.bb +++ /dev/null @@ -1,15 +0,0 @@ -LINUX_VERSION = "5.4.13" -LINUX_VERSION_SUFFIX = "-lts" - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -SRCREV = "44239fc38eaefd29c66ec3bb4a547b1a4541bb13" - -include linux-altera.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/config:" - -SRC_URI_append_cyclone5 = " file://lbdaf.scc " -SRC_URI_append_arria5 = " file://lbdaf.scc " -SRC_URI_append_arria10 = " file://lbdaf.scc " - diff --git a/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.3.bb b/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.3.bb deleted file mode 100644 index 65b522b9..00000000 --- a/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.3.bb +++ /dev/null @@ -1,15 +0,0 @@ -LINUX_VERSION = "5.4.3" -LINUX_VERSION_SUFFIX = "-lts" - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -SRCREV = "d2466b12e55dda297f3b1a4787b5ea3160994ee9" - -include linux-altera.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/config:" - -SRC_URI_append_cyclone5 = " file://lbdaf.scc " -SRC_URI_append_arria5 = " file://lbdaf.scc " -SRC_URI_append_arria10 = " file://lbdaf.scc " - diff --git a/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.bb b/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.bb new file mode 100644 index 00000000..3376bc65 --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/linux-altera-lts_5.4.bb @@ -0,0 +1,16 @@ +LINUX_VERSION = "5.4.44" +LINUX_VERSION_SUFFIX = "-lts" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +SRCREV = "bafc8df26aa0b0b11927ac3649a86c5c3dabf90d" + +include linux-altera.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/config:" + +SRC_URI_append_cyclone5 = " file://lbdaf.scc " +SRC_URI_append_arria5 = " file://lbdaf.scc " +SRC_URI_append_arria10 = " file://lbdaf.scc " +SRC_URI_append_stratix10 = " file://jffs2.scc file://gpio_sys.scc " +SRC_URI_append_agilex = " file://jffs2.scc file://gpio_sys.scc " diff --git a/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.2.bb b/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.2.bb deleted file mode 100644 index 254dc896..00000000 --- a/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.2.bb +++ /dev/null @@ -1,13 +0,0 @@ -LINUX_VERSION = "5.2" - -SRCREV = "969da0f16f5b914bd1e53e8c5051ef9df4f561f2" - -include linux-altera.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -FILESEXTRAPATHS_prepend := "${THISDIR}/config:" - -SRC_URI_append_cyclone5 = " file://lbdaf.scc " -SRC_URI_append_arria5 = " file://lbdaf.scc " -SRC_URI_append_arria10 = " file://lbdaf.scc " diff --git a/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.5.bb b/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.5.bb new file mode 100644 index 00000000..b72210e4 --- /dev/null +++ b/bsp/meta-altera/recipes-kernel/linux/linux-altera_5.5.bb @@ -0,0 +1,13 @@ +LINUX_VERSION = "5.5" + +SRCREV = "d5aa6a79dc020e8bcfffb9b6ca6904b35c202501" + +include linux-altera.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +FILESEXTRAPATHS_prepend := "${THISDIR}/config:" + +SRC_URI_append_cyclone5 = " file://lbdaf.scc " +SRC_URI_append_arria5 = " file://lbdaf.scc " +SRC_URI_append_arria10 = " file://lbdaf.scc " diff --git a/bsp/meta-altera/wic/sdimage-stratix10-agilex.wks b/bsp/meta-altera/wic/sdimage-stratix10-agilex.wks new file mode 100644 index 00000000..3e04dac8 --- /dev/null +++ b/bsp/meta-altera/wic/sdimage-stratix10-agilex.wks @@ -0,0 +1,6 @@ +# short-description: Create SD card image for the Intel Stratix 10 SoC +# long-description: Creates a partitioned SD card image for the Intel +# Stratix 10 SoC. Boot files are located in the first vfat partition. + +part --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 diff --git a/bsp/meta-altera/wic/sdimage-stratix10.wks b/bsp/meta-altera/wic/sdimage-stratix10.wks deleted file mode 100644 index 3e04dac8..00000000 --- a/bsp/meta-altera/wic/sdimage-stratix10.wks +++ /dev/null @@ -1,6 +0,0 @@ -# short-description: Create SD card image for the Intel Stratix 10 SoC -# long-description: Creates a partitioned SD card image for the Intel -# Stratix 10 SoC. Boot files are located in the first vfat partition. - -part --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 diff --git a/bsp/meta-arm/COPYING.MIT b/bsp/meta-arm/COPYING.MIT new file mode 100644 index 00000000..89de3547 --- /dev/null +++ b/bsp/meta-arm/COPYING.MIT @@ -0,0 +1,17 @@ +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. diff --git a/bsp/meta-arm/README.md b/bsp/meta-arm/README.md new file mode 100644 index 00000000..04c641d2 --- /dev/null +++ b/bsp/meta-arm/README.md @@ -0,0 +1,38 @@ +Introduction +------------ +This repository contains Arm layers for OpenEmbedded + +meta-arm: + This layer provides support for general recipes for the Arm + architecture. Anything that's not needed explicitly for BSPs, the IOTA + distribution, or destined to be upstreamed belongs here. + +meta-arm-bsp: + This layer provides support for Arm reference platforms + +meta-arm-iota: + This layer provides support for Arm's IOTA Linux Distribution + +meta-arm-toolchain: + This layer provides support for Arm's GNU-A toolset releases + +meta-arm-autonomy: + This layer provides a reference stack for autonomous systems. + +Contributing +------------ +Currently, we only accept patches from the meta-arm mailing list. For general +information on how to submit a patch, please read +https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded + +E-mail meta-arm@lists.yoctoproject.org with patches created using this process + +Reporting bugs +-------------- +E-mail meta-arm@lists.yoctoproject.org with the error encountered and the steps +to reproduce the issue + + +Maintainer(s) +------------- +* Jon Mason diff --git a/bsp/meta-arm/meta-arm-autonomy/README.md b/bsp/meta-arm/meta-arm-autonomy/README.md new file mode 100644 index 00000000..785f278b --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/README.md @@ -0,0 +1,92 @@ +meta-arm-autonomy Yocto Layer +============================= + +Introduction +------------ +This layer provides an hypervisor based solution (currently based on Xen) for +autonomous system. It contains recipes and classes to build host and guests +systems. + +To start using this layer, please check the +[Quick Start Guide](documentation/arm-autonomy-quickstart.md). + +Dependencies +------------ +This layer depends on several other Yocto layers: +* meta-openembedded (https://git.openembedded.org/meta-openembedded) +* poky (https://git.yoctoproject.org/poky) +* meta-virtualization (https://git.yoctoproject.org/meta-virtualization) + +Distribution Features +--------------------- +This layer is adding the following Yocto DISTRO_FEATURES: + +* arm-autonomy-host: this feature activates functionalities required to build + an autonomy host system. It is doing the following: + - add 'xen' and 'ipv4' to DISTRO_FEATURES. + - add xen backend drivers to linux kernel configuration. + - To reduce the root filesystem image size the kernel image is not installed. + +* arm-autonomy-guest: this feature activates functionalities to run as guest + of an autonomy system. It is doing the following: + - add 'ipv4' to DISTRO_FEATURES. + - add xen frontend drivers to linux kernel configuration. + - add console on hvc0 during init. + +Bitbake variables +----------------- +Some recipes and classes in this layer are introducing variables which can be +modified by the user in local.conf. +Each recipe introducing such variables has a chapter "Bitbake parameters" in +its documentation. + +Those documentation files should be checked for variables: +- [xen-devicetree](documentation/xen-devicetree.md) +- [xenguest-manager](documentation/xenguest-manager.md) +- [xenguest-network-bridge](documentation/xenguest-network-bridge.md) + +BSPs +---- +This layer is adding the following machines: + +* arm64-autonomy-guest: this machines creates a minimal BSP suitable to be used + as an autonomy guest. It is in fact only activating ARM64 architecture and + SMP in the linux kernel and is enabling the DISTRO_FEATURE + arm-autonomy-guest. + +Images +------ +This layer is adding the following images: + +* arm-autonomy-host-image-minimal: this image includes all elements required + to create a minimal arm-autonomy-host system. This includes xen and tools to + manage xen guests. This image depends on 'arm-autonomy-host' distribution + feature. + +Recipes and classes +------------------- +This layer is adding the following recipes and classes: + +* [xen-devicetree](documentation/xen-devicetree.md): this is a recipe to modify + a device tree blob to add information required to boot xen and a Dom0 linux. + +* [xenguest-mkimage](documentation/xenguest-mkimage.md): this is a tool to + create and modify images to be used as Xen guests. + +* [xenguest-manager](documentation/xenguest-manager.md): this is a tool to + create/remove/start/stop xen guest generated using xenguest-mkimage. + +* [xenguest-network-bridge](documentation/xenguest-network-bridge.md): this + recipe add tools and init scripts to create a bridge connected to the + external network on the host and allow guests to be connected to it. + +Contributing +------------ +This project has not put in place a process for contributions currently. If you +would like to contribute, please contact the maintainers + + +Maintainer(s) +------------- +* Bertrand Marquis +* Filipe Rinaldi diff --git a/bsp/meta-arm/meta-arm-autonomy/classes/arm-autonomy-features.bbclass b/bsp/meta-arm/meta-arm-autonomy/classes/arm-autonomy-features.bbclass new file mode 100644 index 00000000..15549d89 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/classes/arm-autonomy-features.bbclass @@ -0,0 +1,5 @@ +# Include arm-autonomy distro config files if the distro features are set + +require ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', '${ARM_AUTONOMY_DISTRO_CFGDIR}/arm-autonomy-host.inc', '', d)} +require ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-guest', '${ARM_AUTONOMY_DISTRO_CFGDIR}/arm-autonomy-guest.inc', '', d)} + diff --git a/bsp/meta-arm/meta-arm-autonomy/classes/image_types_xenguest.bbclass b/bsp/meta-arm/meta-arm-autonomy/classes/image_types_xenguest.bbclass new file mode 100644 index 00000000..195d6ed2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/classes/image_types_xenguest.bbclass @@ -0,0 +1,108 @@ +# Create a xenguest image with kernel and filesystem produced by Yocto +# This will create a .xenguest file that the xenguest-manager can use. + +inherit xenguest-image + +# We are creating our guest in a local subdirectory +# force the value so that we are not impacted if the user is changing it +XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest" + +# Name of deployed file (keep standard image name and add .xenguest) +XENGUEST_IMAGE_DEPLOY ??= "${IMAGE_NAME}" + +# Add kernel XENGUEST_IMAGE_KERNEL from DEPLOY_DIR_IMAGE to image +xenguest_image_add_kernel() { + srcfile="${1:-}" + if [ -z "${srcfile}" ]; then + srcfile="${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_KERNEL}" + fi + call_xenguest_mkimage partial --xen-kernel=$srcfile +} + +# Add rootfs file to the image +xenguest_image_add_rootfs() { + call_xenguest_mkimage partial \ + --disk-add-file=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_TYPEDEP_xenguest}:rootfs.${IMAGE_TYPEDEP_xenguest} +} + +# Pack xenguest image +xenguest_image_pack() { + mkdir -p ${IMGDEPLOYDIR} + rm -f ${IMGDEPLOYDIR}/${XENGUEST_IMAGE_DEPLOY}.xenguest + call_xenguest_mkimage pack \ + ${IMGDEPLOYDIR}/${XENGUEST_IMAGE_DEPLOY}.xenguest +} + +# +# Task finishing the bootimg +# We need this task to actually create the symlinks +# +python do_bootimg_xenguest() { + subtasks = d.getVarFlag('do_bootimg_xenguest', 'subtasks') + + bb.build.exec_func('xenguest_image_clone', d) + if subtasks: + for tk in subtasks.split(): + bb.build.exec_func(tk, d) + bb.build.exec_func('xenguest_image_pack', d) + bb.build.exec_func('create_symlinks', d) +} +# This is used to add sub-tasks to do_bootimg_xenguest +do_bootimg_xenguest[subtasks] = "" +# Those are required by create_symlinks to find our image +do_bootimg_xenguest[subimages] = "xenguest" +do_bootimg_xenguest[imgsuffix] = "." +do_bootimg_xenguest[depends] += "xenguest-base-image:do_deploy" +# Need to have rootfs so all recipes have deployed their content +do_bootimg_xenguest[depends] += "${PN}:do_rootfs" + +# This set in python anonymous after, just set a default value here +IMAGE_TYPEDEP_xenguest ?= "tar" + +# We must not be built at rootfs build time because we need the kernel +IMAGE_TYPES_MASKED += "xenguest" +IMAGE_TYPES += "xenguest" + +python __anonymous() { + # Do not do anything if we are not in the want FSTYPES + if bb.utils.contains_any('IMAGE_FSTYPES', 'xenguest', '1', '0', d): + + # Check the coherency of the configuration + rootfs_needed = False + rootfs_file = '' + kernel_needed = False + + rootfs_file = xenguest_image_rootfs_file(d) + if rootfs_file: + rootfs_needed = True + + if d.getVar('XENGUEST_IMAGE_KERNEL') and not d.getVar('INITRAMFS_IMAGE'): + # If INITRAMFS_IMAGE is set, even if INITRAMFS_IMAGE_BUNDLE is not + # set to 1 to bundle the initramfs with the kernel, kernel.bbclass + # is setting a dependency on ${PN}:do_image_complete. We cannot + # in this case depend on do_deploy as it would create a circular + # dependency: + # do_image_complete would depend on kernel:do_deploy which would + # depend on ${PN}:do_image_complete + # In the case INITRAMFS_IMAGE_BUNDLE = 1, the kernel-xenguest class + # will handle the creation of a xenguest image with the kernel. + # In the other case the kernel can be added manually to the image. + kernel_needed = True + + bb.build.addtask('do_bootimg_xenguest', 'do_image_complete', None, d) + + if rootfs_needed: + # tell do_bootimg_xenguest to call add_rootfs + d.appendVarFlag('do_bootimg_xenguest', 'subtasks', ' xenguest_image_add_rootfs') + # do_bootimg_xenguest will need the tar file + d.appendVarFlag('do_bootimg_xenguest', 'depends', ' %s:do_image_tar' % (d.getVar('PN'))) + # set our TYPEDEP to the proper compression + d.setVar('IMAGE_TYPEDEP_xenguest', 'tar' + (rootfs_file.split('.tar', 1)[1] or '')) + + if kernel_needed: + # Tell do_bootimg_xenguest to call xenguest_image_add_kernel + d.appendVarFlag('do_bootimg_xenguest', 'subtasks', ' xenguest_image_add_kernel') + # we will need kernel do_deploy + d.appendVarFlag('do_bootimg_xenguest', 'depends', ' virtual/kernel:do_deploy') +} + diff --git a/bsp/meta-arm/meta-arm-autonomy/classes/kernel-xenguest.bbclass b/bsp/meta-arm/meta-arm-autonomy/classes/kernel-xenguest.bbclass new file mode 100644 index 00000000..a4954aaa --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/classes/kernel-xenguest.bbclass @@ -0,0 +1,34 @@ +# Create a xenguest image containing the kernel with initramfs when +# initramfs is activated +# This is done using kernel-fitimage as model +# To activate this, kernel-xenguest must be added to KERNEL_CLASSES + +inherit xenguest-image + +# use a local copy to pack all together +XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest" + +python __anonymous () { + # only if xenguest image type is present + if bb.utils.contains('IMAGE_FSTYPES', 'xenguest', '1', '0', d): + # only if initramfs bundle is activated + if d.getVar('INITRAMFS_IMAGE') and d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1": + if not bb.utils.contains('KERNEL_IMAGETYPES', 'Image', '1', '0', d): + bb.fatal("xenguest image type with initramfs require Image kernel image type") + bb.build.addtask('do_assemble_xenguest_initramfs', 'do_deploy', 'do_bundle_initramfs', d) +} + +do_assemble_xenguest_initramfs() { + xenguest_image_clone + call_xenguest_mkimage partial --xen-kernel=${B}/${KERNEL_OUTPUT_DIR}/Image.initramfs + rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest + call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest +} +do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete" + +kernel_do_deploy_append() { + if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest "$deployDir/Image-${INITRAMFS_NAME}.xenguest" + ln -snf Image-${INITRAMFS_NAME}.xenguest $deployDir/Image-${INITRAMFS_LINK_NAME}.xenguest + fi +} diff --git a/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image-extra.bbclass b/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image-extra.bbclass new file mode 100644 index 00000000..502a083f --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image-extra.bbclass @@ -0,0 +1,102 @@ +# This class must be used to extend the xenguest image +# It provides variables to add init scripts, a dtb, xen files or disk files. +# +# The class is extending deploy function so you recipe must inherit deploy and +# have a do_deploy function (even if it is empty) + +# Use standard xenguest-image +inherit xenguest-image + +# Add a DTB file for the guest +# Only one file should be added, if this is set multiple times or in several +# recipes, the last recipe setting it will prevail. +XENGUEST_EXTRA_DTB ??= "" + +# Append something to the guest xen configuration +# All files here will be merged together in the final xen configuration +# This can contain several files or be used in several recipes +XENGUEST_EXTRA_XENCONFIG ??= "" + +# Add a xenguest init, init-pre or init-post script +XENGUEST_EXTRA_INIT_PRE ??= "" +XENGUEST_EXTRA_INIT ??= "" +XENGUEST_EXTRA_INIT_POST ??= "" + +# Add xenguest files, (to be used in extra xen config for example) +# several files may be added, space separated, the path will be kept on the +# generated xenguest image (if dir1/file1 is added, it can be used as +# dir1/file1 file in the xen configuration). +XENGUEST_EXTRA_FILES ??= "" + +# Add xenguest disk files (to be used as disk partition content) +# several files may be added, space separated, the path will be kept on the +# generated xenguest image (if dir1/file1 is added, it can be used as +# dir1/file1 file in the disk content parameters). +XENGUEST_EXTRA_DISK_FILES ??= "" + +do_deploy_append() { + if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \ + -z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then + die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty" + fi + rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} + mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} + + if [ -n "${XENGUEST_EXTRA_DTB}" ]; then + if [ ! -f ${XENGUEST_EXTRA_DTB} ]; then + die "xenguest-image: DTB file ${XENGUEST_EXTRA_DTB} does not exist" + fi + call_xenguest_mkimage partial --xen-device-tree=${XENGUEST_EXTRA_DTB} + fi + + if [ -n "${XENGUEST_EXTRA_XENCONFIG}" ]; then + for f in ${XENGUEST_EXTRA_XENCONFIG}; do + if [ ! -f $f ]; then + die "xenguest-image: Xen config $f does not exist" + fi + call_xenguest_mkimage partial --xen-append=$f + done + fi + + if [ -n "${XENGUEST_EXTRA_INIT_PRE}" ]; then + if [ ! -f ${XENGUEST_EXTRA_INIT_PRE} ]; then + die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_PRE} does not exist" + fi + call_xenguest_mkimage partial --init-pre=${XENGUEST_EXTRA_INIT_PRE} + fi + + if [ -n "${XENGUEST_EXTRA_INIT}" ]; then + if [ ! -f ${XENGUEST_EXTRA_INIT} ]; then + die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT} does not exist" + fi + call_xenguest_mkimage partial --init-script=${XENGUEST_EXTRA_INIT} + fi + + if [ -n "${XENGUEST_EXTRA_INIT_POST}" ]; then + if [ ! -f ${XENGUEST_EXTRA_INIT_POST} ]; then + die "xenguest-image: Init script ${XENGUEST_EXTRA_INIT_POST} does not exist" + fi + call_xenguest_mkimage partial --init-post=${XENGUEST_EXTRA_INIT_POST} + fi + + if [ -n "${XENGUEST_EXTRA_FILES}" ]; then + for f in ${XENGUEST_EXTRA_FILES}; do + if [ ! -f $f ]; then + die "xenguest-image: Xen file $f does not exist" + fi + call_xenguest_mkimage partial --xen-add-file=$f + done + fi + + if [ -n "${XENGUEST_EXTRA_DISK_FILES}" ]; then + for f in ${XENGUEST_EXTRA_DISK_FILES}; do + if [ ! -f $f ]; then + die "xenguest-image: Disk file $f does not exist" + fi + call_xenguest_mkimage partial --disk-add-file=$f + done + fi +} +# Need to have xenguest-image tool +do_deploy[depends] += "xenguest-base-image:do_deploy" + diff --git a/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image.bbclass b/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image.bbclass new file mode 100644 index 00000000..e8880f3f --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/classes/xenguest-image.bbclass @@ -0,0 +1,195 @@ +# This class must be used to create, extend or pack a xenguest image. +# It is using xenguest-mkimage tool to do operations + +DEPENDS += "xenguest-mkimage-native" + +# +# Xenguest image parameters +# All the following parameters can be modified in local.conf or on recipes +# inheriting this class +# + +# Guest memory size in MB +XENGUEST_IMAGE_MEMORY_SIZE ??= "512" + +# Guest number of vcpus +XENGUEST_IMAGE_NUM_VCPUS ??= "1" + +# Guest auto boot during init, set to 1 to have guest started during init or +# to 0 if the guest should not be auto started +XENGUEST_IMAGE_AUTOBOOT ??= "1" + +# Partition containing the root file system +# Xen will actually add root=${XENGUEST_IMAGE_ROOT} to your guest kernel +# command line +# You can let this empty if the root filesystem is specified in an other way +# and have root= option added to the command line for example or if you don't +# need a root filesystem mounted for your guest (initrd for example) +XENGUEST_IMAGE_ROOT ??= "/dev/xvda1" + +# Guest kernel command line arguments +XENGUEST_IMAGE_CMDLINE ??= "earlyprintk=xenboot console=hvc0 rw" + +# Extra commands to add to xenguest-image when creating the image +XENGUEST_IMAGE_EXTRA_CMD ??= "" + +# Kernel binary +# This value is used by the xenguest image type but is declared here to have +# all variables in the same place +# If this value is empty no kernel will be added to the image +XENGUEST_IMAGE_KERNEL ??= "Image" + +# Size of the disk to create (if 0 no disk will be created and rootfs will not +# be included in the xenguest image) +XENGUEST_IMAGE_DISK_SIZE ??= "${@ '4' if not d.getVar('INITRAMFS_IMAGE') else '0'}" + +# +# XENGUEST_IMAGE_DISK PARTITIONS is used to describe the partitions to setup +# and their content. +# It must be set to a space separated list of entries with each entry having +# the format num:sz:fs:[file] where: +# - num is a partition number +# - sz is the partition size in Gigabit +# - fs is the filesystem to use for the partition +# - file is optionally pointing to a file to use as content of the partition +# Please check image_types_xenguest.bbclass for rootfs handling of files +# +# Default value creates a partition 1 using the full disk, formated with ext4 +# and containing the root filesystem produced by Yocto +XENGUEST_IMAGE_DISK_PARTITIONS ??= "1:${XENGUEST_IMAGE_DISK_SIZE}:ext4:rootfs.tar.gz" + +# XENGUEST_IMAGE_NETWORK_BRIDGE can be set to 1 to have a network interface +# on the guest connected to host bridged network. This will provide the guest +# with a network interface connected directly to the external network +XENGUEST_IMAGE_NETWORK_BRIDGE ??= "1" + +# Sub-directory in wich the guest is created. This is create in deploy as a +# subdirectory and must be coherent between all components using this class so +# it must only be modified from local.conf if needed +XENGUEST_IMAGE_DEPLOY_SUBDIR ?= "xenguest" + +# Directory in which the xenguest should be deployed +# a sub-directory named ${XENGUEST_IMAGE_DEPLOY_SUBDIR} will be created there. +# This should be set to: +# - ${DEPLOYDIR} (default) if creating or extending the xenguest for a normal +# recipe. +# - something in ${WORKDIR} if you need to clone and manipulate an image +XENGUEST_IMAGE_DEPLOY_DIR ??= "${DEPLOYDIR}" + +# +# Wrapper to call xenguest-mkimage +# It is using XENGUEST_IMAGE_DEPLOY_DIR and XENGUEST_IMAGE_DEPLOY_SUBDIR +# to find the image to operate on +# +# Usage: call_xenguest_mkimage [operation] [args] +call_xenguest_mkimage() { + local cmd="${1}" + local img="${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}" + shift + + echo "xenguest-mkimage $cmd $img $@" + xenguest-mkimage $cmd $img $@ +} + +# +# Create an initial xenguest image. +# This is a task which must be added in a recipe inheriting deploy +# It is using XENGUEST_IMAGE_MEMORY_SIZE, XENGUEST_IMAGE_NUM_VCPUS, +# XENGUEST_IMAGE_AUTOBOOT, XENGUEST_IMAGE_ROOT, XENGUEST_IMAGE_EXTRA_CMD, +# XENGUEST_IMAGE_CMDLINE, XENGUEST_IMAGE_DISK_SIZE and +# XENGUEST_IMAGE_DISK_PARTITIONS to customize the initial guest +# +xenguest_image_create() { + if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \ + -z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then + die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty" + fi + + rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} + + mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} + + # Create the image + call_xenguest_mkimage create --xen-memory=${XENGUEST_IMAGE_MEMORY_SIZE} \ + --xen-vcpus=${XENGUEST_IMAGE_NUM_VCPUS} \ + --xen-root=${XENGUEST_IMAGE_ROOT} \ + ${XENGUEST_IMAGE_EXTRA_CMD} + + # add command line + if [ -n "${XENGUEST_IMAGE_CMDLINE}" ]; then + call_xenguest_mkimage update --xen-clean-extra + for arg in ${XENGUEST_IMAGE_CMDLINE}; do + call_xenguest_mkimage update --xen-extra=$arg + done + fi + + # create disk if needed + disksize="${XENGUEST_IMAGE_DISK_SIZE}" + if [ -z "$disksize" ]; then + disksize="0" + fi + if [ $disksize -gt 0 ]; then + # setup disk size + call_xenguest_mkimage update --disk-reset-config --disk-size=$disksize + + diskparts="${XENGUEST_IMAGE_DISK_PARTITIONS}" + if [ -n "$diskparts" ]; then + for arg in $diskparts; do + call_xenguest_mkimage update --disk-add-part=$arg + partnum="$(expr $partnum + 1)" + done + fi + fi + + if [ "${XENGUEST_IMAGE_AUTOBOOT}" = "1" ]; then + call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=1 + else + call_xenguest_mkimage update --set-param=GUEST_AUTOBOOT=0 + fi + + if [ "${XENGUEST_IMAGE_NETWORK_BRIDGE}" = "1" ]; then + call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=1 + else + call_xenguest_mkimage update --set-param=NETWORK_BRIDGE=0 + fi +} + +# +# Clone the current xenguest from deploy to manipulate it locally +# This is required if you need to change things before packing an image +# To set the local directory where to clone you must set +# XENGUEST_IMAGE_DEPLOY_DIR if you don't want to use do_deploy to modify the +# image +# +xenguest_image_clone() { + if [ -z "${XENGUEST_IMAGE_DEPLOY_DIR}" -o \ + -z "${XENGUEST_IMAGE_DEPLOY_SUBDIR}" ]; then + die "Configuration error: XENGUEST_IMAGE_DEPLOY_DIR or XENGUEST_IMAGE_DEPLOY_SUBDIR is empty" + fi + + if [ ! -f ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR}/guest.cfg ]; then + die "xenguest-image: ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} does not contain a valid guest" + fi + + rm -rf ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} + mkdir -p ${XENGUEST_IMAGE_DEPLOY_DIR} + cp -rf ${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} \ + ${XENGUEST_IMAGE_DEPLOY_DIR}/${XENGUEST_IMAGE_DEPLOY_SUBDIR} +} + +# Helper function to retrieve rootfs file if present in one partition +# This can return an empty string or rootfs.tar[.COMP] +def xenguest_image_rootfs_file(d): + disksize = d.getVar('XENGUEST_IMAGE_DISK_SIZE') + # if disksize is 0, we don't create anything + if not disksize or disksize == '0': + return "" + # Find first partition with file=rootfs.tar* + partlist = d.getVar('XENGUEST_IMAGE_DISK_PARTITIONS') + if partlist: + for partdesc in partlist.split(): + partelems = partdesc.split(':', 3) + if partelems[3]: + if partelems[3].startswith('rootfs.tar'): + return partelems[3] + return "" diff --git a/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-guest.inc b/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-guest.inc new file mode 100644 index 00000000..16b9f7ea --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-guest.inc @@ -0,0 +1,11 @@ +# This files is added when DISTRO_FEATURES contains arm-autonomy-guest + +# We need to have ipv4 activated +DISTRO_FEATURES_append = " ipv4" + +# Build a xenguest type image +IMAGE_CLASSES += "image_types_xenguest" +IMAGE_FSTYPES += "xenguest" + +# xenguest kernel extension to handle initramfs +KERNEL_CLASSES += "kernel-xenguest" diff --git a/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-host.inc b/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-host.inc new file mode 100644 index 00000000..bd98ae21 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/conf/distro/include/arm-autonomy-host.inc @@ -0,0 +1,9 @@ +# This files is added when DISTRO_FEATURES contains arm-autonomy-host + +# We need to have xen and ipv4 activated +DISTRO_FEATURES_append = " xen ipv4" + +# Don't include kernels in standard images when building arm-autonomy-host +# If the kernel image is needed in the rootfs the following should be set from +# a bbappend: RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-image" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base ?= "" diff --git a/bsp/meta-arm/meta-arm-autonomy/conf/layer.conf b/bsp/meta-arm/meta-arm-autonomy/conf/layer.conf new file mode 100644 index 00000000..739dc811 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/conf/layer.conf @@ -0,0 +1,34 @@ +# Add layer to BBPATH +BBPATH .= ":${LAYERDIR}" + +# Add recipes-* directories to BBFILES +BBFILES += " \ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "meta-arm-autonomy" +BBFILE_PATTERN_meta-arm-autonomy = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-arm-autonomy = "6" +LAYERDEPENDS_meta-arm-autonomy = " \ + core \ + yocto \ + openembedded-layer \ + virtualization-layer \ +" +LAYERSERIES_COMPAT_meta-arm-autonomy = "dunfell" + +# We don't activate virtualization feature from meta-virtualization as it +# brings in lots of stuff we don't need. We need to disable the sanity check +# otherwise the user will see a warning on each build. +SKIP_META_VIRT_SANITY_CHECK = "1" + +# Directory of our distro config files +ARM_AUTONOMY_DISTRO_CFGDIR = "${LAYERDIR}/conf/distro/include/" + +# Add class to handle arm-autonomy distro extensions +USER_CLASSES_append = " arm-autonomy-features" + +BBFILES_DYNAMIC += " \ + meta-arm-bsp:${LAYERDIR}/dynamic-layers/meta-arm-bsp/*/*/*.bbappend \ +" diff --git a/bsp/meta-arm/meta-arm-autonomy/conf/machine/arm64-autonomy-guest.conf b/bsp/meta-arm/meta-arm-autonomy/conf/machine/arm64-autonomy-guest.conf new file mode 100644 index 00000000..8b32fa7a --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/conf/machine/arm64-autonomy-guest.conf @@ -0,0 +1,17 @@ +#@TYPE: Machine +#@NAME: Autonomy Guest ARM64 machine +#@DESCRIPTION: Machine configuration for ARM64 Autonomy Guest + +TUNE_FEATURES = "aarch64" + +require conf/machine/include/arm/arch-armv8a.inc + +KERNEL_IMAGETYPE = "Image" + +IMAGE_FSTYPES += "tar.bz2" + +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "5.4%" + +DISTRO_FEATURES += "arm-autonomy-guest" + diff --git a/bsp/meta-arm/meta-arm-autonomy/documentation/arm-autonomy-quickstart.md b/bsp/meta-arm/meta-arm-autonomy/documentation/arm-autonomy-quickstart.md new file mode 100644 index 00000000..2a457c16 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/documentation/arm-autonomy-quickstart.md @@ -0,0 +1,225 @@ +arm-autonomy Quick Start +================== + +This documentation is explaining how to quickly start with arm-autonomy layer +and the main features provided. +You will find in the documentation directory some more detailed documentation +for each of the functionalites provided by this layer. + +What to use this layer for? +--------------------------- +Using this layer, you can easily and rapidly create a system based on Xen with +one or more guests created using Yocto. + +For this you will need to create at least 2 Yocto projects: +- a host project: This one will compile Xen and create a Linux system to be + used as Xen Dom0. The Linux system will contain all functionalities required + to start and manage guests. +- one or several guest projects: Those will create Linux systems with the + required Linux kernel configuration to run as Xen DomU. + +Prepare your system +------------------- + +First you must download the Yocto layers needed: + - [meta-openembedded](https://git.openembedded.org/meta-openembedded) + - [poky](https://git.yoctoproject.org/poky) + - [meta-virtualization](https://git.yoctoproject.org/meta-virtualization) + - [meta-arm](https://git.yoctoproject.org/meta-arm) + - all other layers you might want to use + +For each of the downloaded layer make sure you checkout the release of Yocto +you want to use (for example zeus using `git checkout zeus`). + +Please follow [Yocto documentation](https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html) +in order to have the required dependencies. + + +Create a project +---------------- + +Here are the main steps to create an arm-autonomy project: + +1. create a new Yocto project using `oe-init-build-env` in a new directory: + ``` + oe-init-build-env my-project + ``` + +2. Add `meta-arm/meta-arm-autonomy` layer to the list of layers of your + project in the `conf/bblayers.conf`. Also add any other layers you + might need (for example `meta-arm/meta-arm-bsp` and `meta-arm/meta-arm` to + use Arm boards like Juno or FVP emulator). You can achieve this by using + the `bitbake-layers add-layer layerdir [layerdir ...]` command. + For example: + ``` + export LAYERDIR_BASE="/home/user/arm-autonomy/" + bitbake-layers add-layer $LAYERDIR_BASE/meta-poky $LAYERDIR_BASE/meta-yocto-bsp \ + $LAYERDIR_BASE/meta-openembedded/meta-oe $LAYERDIR_BASE/meta-openembedded/meta-python \ + $LAYERDIR_BASE/meta-openembedded/meta-filesystems $LAYERDIR_BASE/meta-openembedded/meta-networking \ + $LAYERDIR_BASE/meta-virtualization $LAYERDIR_BASE/meta-arm/meta-arm-autonomy \ + $LAYERDIR_BASE/meta-arm/meta-arm $LAYERDIR_BASE/meta-arm/meta-arm-bsp + ``` + + Example of a `conf/bblayers.conf`: + ``` + BBLAYERS ?= " \ + /home/user/arm-autonomy/poky/meta \ + /home/user/arm-autonomy/poky/meta-poky \ + /home/user/arm-autonomy/poky/meta-yocto-bsp \ + /home/user/arm-autonomy/meta-openembedded/meta-oe \ + /home/user/arm-autonomy/meta-openembedded/meta-python \ + /home/user/arm-autonomy/meta-openembedded/meta-filesystems \ + /home/user/arm-autonomy/meta-openembedded/meta-networking \ + /home/user/arm-autonomy/meta-virtualization \ + /home/user/arm-autonomy/meta-arm/meta-arm-autonomy \ + /home/user/arm-autonomy/meta-arm/meta-arm \ + /home/user/arm-autonomy/meta-arm/meta-arm-bsp \ + " + ``` + +Those steps will have to be done for each project you will have to create. + +Host project +------------ +The host project will build Xen and the Dom0 Linux. It will be the only project +that will be specific to the board (MACHINE) you will be running on. + +To create a host project: +1. Follow the steps of "Create a project" + +2. Add the layers in `bblayers.conf` required to build a Yocto project for the + board you want to use. + For example to use Arm FVP Base emulator, add `meta-arm/meta-arm` and + `meta-arm/meta-arm-bsp`. + +3. edit conf/local.conf to add `arm-autonomy-host` to the DISTRO_FEATURES and + set MACHINE to the board you want to use. + For example, add the following lines: + ``` + MACHINE = "fvp-base" + DISTRO_FEATURES += "arm-autonomy-host" + ``` + +4. build the image using `bitbake arm-autonomy-host-image-minimal` + +The project will generate a Linux kernel, a root filesystem, a Xen binary and +a DTB modified to include the required entries to boot Xen and Linux as Dom0 +(this DTB has the extension `-xen.dtb`). + +To boot the system using an u-boot base board you will need to: +- Load the kernel (by default at 0x80080000 unless you modify + XEN_DEVICETREE_DOM0_ADDR value) +- Load the xen device tree (for example at 0x83000000) +- Load the xen-efi binary (for example at 0x84000000) +- run using `booti 0x84000000 - 0x83000000` + +In this example the addresses might need to be adapted depending on your board. + +Guest project +------------- +The guest projects are not target specific and will use a Yocto MACHINE defined +in meta-arm-autonomy to include only the Linux configuration required to run +a xen guest. + +To create a guest project: + +1. Follow the steps of "Create a project" + +2. Optionaly add layers required to build the image and features you need. + +3. edit conf/local.conf to add `arm-autonomy-guest` to the DISTRO_FEATURES and + set MACHINE to `arm64-autonomy-guest`: + ``` + MACHINE = "arm64-autonomy-guest" + DISTRO_FEATURES += "arm-autonomy-guest" + ``` + +4. build the image you want. + For example `bitbake core-image-minimal` + +The build will create a ".xenguest" image that can be use on an host project +with the xenguest-manager. + +Include guests directly in the host image +----------------------------------------- +The layer provides a way to directly include in the host project one or several +images generated by guest projects. + +To use this feature, you must edit your host project `local.conf` file and +add set ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS to the list of xenguest images +you want to include in your host. Each xenguest image must be given using a +full path to it. +For example: +``` +ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS = "/home/user/guest-project/tmp/deploy/images/arm64-autonomy-guest/core-image-minimal-arm64-autonomy-guest.xenguest;guestname=myguest" +``` +This will add the guest and name it `myguest` on the host project image and +the xenguest-manager will automatically boot it during startup. + +Add support for your board +-------------------------- +Most of arm-autonomy layer is board independent but some functionalities +might need to be customized for your board: + +### Add the kernel configuration for the host +The layer is using KERNEL_FEATURES to add drivers required to be a Xen Dom0 +system. +Depending on the kernel used by your BSP and how it is configured you might +need to add the required drivers to your kernel configuration: +- if KERNEL_FEATURES system is supported by your kernel, make sure that the +file `recipes-kernel/linux/linux-arm-autonomy.inc` from the layer is included +by your kernel recipe. +- if it is not supported, you must add the proper drivers inside your kernel +(modules are possible but they must be loaded before xenguest-manager is +started). You can find the complete list of the kernel configuration elements +required in `recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg`. + +### Define the drive and partition to use for the LVM volume +The xenguest-manager is creating disk hard drive using LVM on an empty +partition. The default value is set to use /dev/sda2. +You can change this for your board by setting XENGUEST_MANAGER_VOLUME_DEVICE. + +Check `recipes-extended/xenguest/xenguest-manager.bbappend` for examples. + +Please also read xenguest-manager.md. + +### Define the interface to add to xenguest network bridge +xenguest-network bridge is creating a bridge on the host and adds network +interfaces to it so that guest connected to it have access to external network. +By default `eth0` is set as the list of interfaces to be added to the bridge. +Depending on your board or use case you might want to use an other interface +or use multiple interfaces. +You can change this for your board by setting XENGUEST_NETWORK_BRIDGE_MEMBERS. + +Check `recipes-extended/xenguest/xenguest-network-bridge.bbappend` for +exmaples. + +Please also read xenguest-network-bridge.md. + +### Define the network configuration of the xenguest network bridge +xenguest network bridge is putting the host network interfaces in a bridge +and is configuring it by default to use dhcp. +If you need a different type of configuration you can set +XENGUEST_NETWORK_BRIDGE_CONFIG in a xenguest-network-bridge.bbappend to use +a different file. +The recipe will look for the file in ${WORKDIR} so you will need to add it to +SRC_URI in your bbappend. +The recipe will also substitute `###BRIDGE_NAME###` with the bridge name +configured in ${XENGUEST_NETWORK_BRIDGE_NAME}. + +You can find an example configuration file in +`recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in`. + +Please also read xenguest-network-bridge.md. + +### Customize Dom0 and Xen boot arguments for you board +xen-devicetree is writting inside the generated DTB Xen and Linux boot +arguments as long as the address where Dom0 Linux kernel can be found. +You might need to have different values for your board or depending on your +use case. + +You can find examples to customize this in +`recipes-extended/xen-devicetree/xen-devicetree.bbappend`. + +Please also read xen-devicetree.md. + diff --git a/bsp/meta-arm/meta-arm-autonomy/documentation/xen-devicetree.md b/bsp/meta-arm/meta-arm-autonomy/documentation/xen-devicetree.md new file mode 100644 index 00000000..a44dca78 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/documentation/xen-devicetree.md @@ -0,0 +1,104 @@ +Xen device tree +=============== + +Introduction +------------ + +xen-devicetree recipe can be used to modify an existing Device Tree Blob, +produced by Linux kernel or another recipe, to include in it entries required +to start Xen and a Dom0 Linux on top of it. + +The recipe will do the following processing: +- generate a xen.dtsi file with entries required for xen based on parameters +- turn DTBs in ${XEN_DEVICETREE_DTBS} back to dts +- include in xen.dtsi and all other dtsi from + ${XEN_DEVICETREE_DTSI_MERGE} (check Bitbake parameters for more information + on this). +- use dtc to create a new DTB file + +The recipe will generate new files in deploy/images and name them with the +extension "-xen.dtb". +For example **machine.dtb** will generate **machine-xen.dtb**. + +Entries added to the DTBs +------------------------- + +When a DTB is processed by the recipe, the following block is added: +``` + chosen { + xen,dom0-bootargs = "VAL"; + xen,xen-bootargs = "VAL"; + + modules { + #size-cells = <0x00000001>; + #address-cells = <0x00000001>; + + module@0 { + reg = ; + compatible = "multiboot,module"; + }; + }; + }; +``` +Each occurence of **VAL** is replaced by the content of the variables listed in +this documentation. + +Bitbake parameters +------------------ + +Several parameters are available to configure the xen-devicetree during Yocto +project compilation (those can be set in your project local.conf, for exmple). + +The following parameters are available: + +- XEN_DEVICETREE_DEPEND: This variable can be used to indicate which recipe + task is generating the DTBs that xen-devicetree will modify. This makes sure + the xen devicetrees are properly regenerated if the source DTBs are changed. + This variable is set by default to "virtual/kernel:do_deploy" to use DTBs + generated during the compilation of the Linux kernel. This must be changed + if the machine your are using is not using a DTB listed in KERNEL_DEVICETREE. + +- XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be + modified by xen-devicetree. Those must be files that xen-devicetree can find + in the ${DEPLOY_DIR_IMAGE} directory using only the basename of the entries. + For example "mydir/board.dtb" will make the recipe look for + ${DEPLOY_DIR_IMAGE}/board.dtb. + This variable is set by default to "${KERNEL_DEVICETREE}" to process the DTBs + generated by the Linux kernel. + +- XEN_DEVICETREE_DOM0_MEM: Memory size to allocate to Dom0. + This variable is only used if XEN_DEVICETREE_XEN_BOOTARGS has a value + containing "dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" as the memory assigned to + dom0 is defined using Xen boot arguments. + This variable is set by default to "1024M". + +- XEN_DEVICETREE_DOM0_BOOTARGS: Boot arguments to pass to Dom0 Linux when + booting it. + This variable is set by default to "console=hvc0 earlycon=xen". + +- XEN_DEVICETREE_XEN_BOOTARGS: this variable should be set with the boot + arguments to be passed to Xen on boot. + This variable is set by default to + "noreboot dom0_mem=${XEN_DEVICETREE_DOM0_MEM}". + +- XEN_DEVICETREE_DOM0_ADDR: This is the address from which the Linux kernel to + be used for Dom0 will be copied. When using u-boot, this is the address at + which you will load the kernel Image before starting Xen. + This variable is set by default to "0x80080000". + +- XEN_DEVICETREE_DOM0_SIZE: This is the size of the kernel loaded at + ${XEN_DEVICETREE_DOM0_ADDR}. Xen will copy this amount of data inside the + guest before starting it so the size must be at least equal to the kernel + size but can be bigger. You must be careful not to have a value too big as it + could slow down boot or copy other parts with it (like the DTB). + You might need to increase this if you use a kernel with a bundled initramfs. + This variable is set by default to "0x01000000". + +- XEN_DEVICETREE_DTSI_MERGE: This variable contains the list of dtsi files that + must be included inside the generated DTB file. By default the only one + include is the "xen.dtsi" generated by the recipe. + If your board or project needs to include more fixes or entries in the DTB, + this variable can be appended from a bbappend file to include other dtsi. The + files must be inside the recipe workspace during Yocto compilation. + You can check xen-devicetree.bbappend for an example. + diff --git a/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-manager.md b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-manager.md new file mode 100644 index 00000000..387af944 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-manager.md @@ -0,0 +1,67 @@ +Xenguest Manager +================ + +Introduction +------------ + +xenguest-manager is a tool to manage Xenguest images generated by +[xenguest-mkimage](xenguest-mkimage.md). + +On a Xen Dom0 system it will: +- create a xen guest from a xenguest image: extract its components, create a + disk for the guest using LVM volumes. +- start/stop a xen guest (during init or using xenguest-manager directly). +- check guest status + +xenguest-manager is composed of 2 shell scripts: +- xenguest-manager which can be used from command line to start/stop/check +guests and create or remove guest using xenguest images. +- xenguest-init which is called during init to automatically create and start +some guests as part of the host init process. + +Usage +----- + +xenguest-manager must be called like this: +`xenguest-manager OPERATION [OPTIONS]` +The following operations are available: +- create XENGUEST_IMAGE [GUESTNAME]: create a guest from a xenguest image file + as guest GUESTNAME. If GUESTNAME is not given the image file name is used + without the xenguest extension. +- remove GUESTNAME: remove the guest GUESTNAME. +- start GUESTNAME: start the guest GUESTNAME. +- stop GUESTNAME: stop the guest GUESTNAME (this is using `xl stop` which is + sending a stop signal to the running guest). +- kill GUESTNAME: force stopping the guest GUESTNAME. +- list: list the available guests. +- status [GUESTNAME]: print the current status of GUESTNAME. If GUESTNAME is + not given, print the status of all guests. + +For a detailed help on available options please use: +`xenguest-manager --help` + +Bitbake parameters +------------------ + +Several parameters are available to configure the xenguest manager during Yocto +project compilation (those can be set in your project local.conf, for example). + +The following parameters are available: + +- XENGUEST_MANAGER_VOLUME_DEVICE: This is the device path used by the + xenguest-manager on the device to create LVM disks when guests have a disk + configuration. + This is set by default to "/dev/sda2". + +- XENGUEST_MANAGER_VOLUME_NAME: This is the LVM volume name that the + xenguest-manager will create and use to create guest LVM disks. + This is set by default to "vg-xen". + +- XENGUEST_MANAGER_GUEST_DIR: This is the directory on Dom0 where the + xenguest-manager will look for xenguest images to create during init. That's + the place where xenguest images can be added to have them automatically + created during next Dom0 boot. The xenguests found there will only be created + if they were not already before (the basename of the files is used as guest + name). + This is set by default to "/usr/share/guests". + diff --git a/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-mkimage.md b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-mkimage.md new file mode 100644 index 00000000..3dcc28b4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-mkimage.md @@ -0,0 +1,119 @@ +Xenguest mkimage +================ + +Introduction +------------ + +xenguest-mkimage is a tool to create and modify images to be used as Guest with +Xen. It defines a format to store completely defined guests as a file or as +a directory and provides options to create and modify those images. + +A xenguest image contains all elements required to create a xen guest. +This is the base elements like a Xen configuration and a Linux kernel binary +but also some more advanced elements like init scripts or a disk definition. + +The format is made to be deployable easily by storing everything in a single +file and provide tools to easily manipulate the images. It can also easily be +extended to have features like encryption or signature of images, updates or +complex configurations by providing features to have init script that will be +executed on the host embedded inside the image. + +Xenguest images content +----------------------- + +### params.cfg + +This file contains parameters that can be used by tools to configure some +functionalities on the host. This can be used by init scripts to have +configurable parameters as it is sourced before calling init scripts. + +### guest.cfg and guest.d + +guest.cfg is the main xen configuration and guest.d contains optional +configuration parts. All those will be merged into one final xen configuration +before starting the guest. + +### files +This directory contains files that can be used by the xen configuration, for +example the binary of the kernel referenced in xen configuration). +This is where the kernel binary, the dtb or a ramdisk will be stored. + +### init.pre, init.d and init.post +These directories contain init scripts that will be executed on the host +during the guest startup. Those must be shell scripts and each directory +contains scripts called at a different time: + - init.pre: scripts executed before the guest is created. This can be used + to prepare some features required to create the guest in xen or to + generate part of the xen configuration dynamically. + - init.d: scripts executed when the guest has been created but before it is + started. This can be used to do some xenstore operations or configure the + guest behaviour using xl, for example. + - init.post: scripts executed just after starting the guest. This can be + used to configure things created by xen for the guest like network + network interfaces. + +When a directory contains several scripts, those will be called in alphabetical +order. + +### disk.cfg and disk-files +disk.cfg contains the guest disk description (disk size and disk partitions). +The file contains the following entries: +- `DISK_SIZE=X`: size of the disk to create in GB +- `DISK_PARTX=SIZE:FS:CONTENT`: create a partition number X (1 to 4) with a + size of SIZE GB, format it with filesystem FS (can be ext2, ext3, ext4, vfat + or swap) and extract CONTENT as initial partition content + (.tar[.gz|.xz|.bz2] file or img[.gz|.bz2] file to be dumped in the partition). FS and + CONTENT can be empty. + +The disk-files contain files to be used for initializing the disk partitions +content. Those should be used to create a LVM or a physical disk and initialize +it (create partitions, format them and put the initial content). + +Usage +----- + +xenguest-mkimage is a shell script which must be called like this: +`xenguest-mkimage OPERATION XENGUEST [OPTIONS]` + +### Operations +- create: create a xenguest image. If XENGUEST is an existing empty directory, + the image is created as a directory otherwise it will be created as a file. +- check: verify that XENGUEST is a valid xenguest image. +- update: modify a xenguest image (see --help for a list of operations). +- pack: pack a xenguest image directory into a xenguest image file. The file to + be created must be given as 3rd argument. +- extract: extract a xenguest image file into a directory. The destination + directory must be given as 3rd argument. +- dump-xenconfig: dump xenguest image xen configuration. +- dump-diskconfig: dump xenguest image disk configuration. +- dump-paramsconfig: dump xenguest image parameters configuration. + +For a detailed help on available operations, please use: +`xenguest-mkimage --help` + +### Options +- --kernel=FILE: add kernel FILE as guest kernel. This is both adding the file + to the image and modifying the xen configuration to use it. +- --xen-memory=SIZE: set the guest memory size in MB. +- --xen-extra: add a kernel command line argument. This can be called several + times to add several command line options. +- --xen-device-tree=FILE: add dtb FILE as device tree. This both adding the + file to the image and modifying the xen configuration to use it. +- --init-script=FILE: add guest init script. The script is embedded inside the + image file. Several script can be added and the basename of FILE is used to + distinguish them (calling the option twice with the same file will update the + script in the image with the second one). + --disk-size=SIZE: set the guest disk size to SIZE in GB. Calling this with 0 + disable the guest disk. +- --disk-add-part=NUM:SIZE:FS:CONTENT: This is adding a partition to the + xenguest image disk. The partition is described with the arguments: + - NUM: partition number. + - SIZE: partition size in GB. + - FS: filesystem to format the partition with. This can be ext2, ext3, ext4, + vfat of swap. If empty the partition is not formated. + - CONTENT: tar of img file to use to initialize the partition. The file must + be added to the image using --disk-add-file=FILE:CONTENT. + +For a detailed help on available options, please use: +`xenguest-mkimage OPERATION --help` + diff --git a/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-network-bridge.md b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-network-bridge.md new file mode 100644 index 00000000..6653fe81 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/documentation/xenguest-network-bridge.md @@ -0,0 +1,49 @@ +xenguest network bridge +======================= + +Introduction +------------ + +xenguest-network-bridge is creating a network bridge to allow some guests to +have a direct connection to the external network. +To do this, a bridge is created on the host using brctl with the network +interfaces added to it so that the bridge is connected to the external network. +It is also adding a guest init script which will, for guests configured to use +it, create a virtual network interface for the guest and connect it to the +network bridge on the host. + +Usage +----- + +On the host the package xenguest-network-bridge must be included in your image. + +On the xenguest image of your guest, the parameter NETWORK_BRIDGE must be set +to 1 (using xenguest-mkimage --set-param=NETWORK_BRIDGE=1). + +Bitbake parameters +------------------ +Several parameters are available to configure the xenguest network bridge +during Yocto project compilation (those can be set in your project local.conf, +for example). + +The following parameters are available: + +- XENGUEST_NETWORK_BRIDGE_NAME: This variable defines the name of the network + bridge that is created on the host during init. + This is set by default to "xenbr0". + +- XENGUEST_NETWORK_BRIDGE_MEMBERS: This variable defines the list of network + interfaces that are added to the bridge when it is created on the host during + init. + This is set by default to "eth0". + +- XENGUEST_NETWORK_BRIDGE_CONFIG: This variable defines the configuration file + to use to configure the bridge network. By default it points to have file + configuring the network using dhcp. + You can provide a different file using a bbappend and make this variable + point to it if you want to customize your network configuration. + +- XENGUEST_IMAGE_NETWORK_BRIDGE: This variable can be set to 0 or 1 on guest + projects to enable or not the connection of the guest to the host bridge. + This is set by default to "1". + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend new file mode 100644 index 00000000..3b93b3b7 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_%.bbappend @@ -0,0 +1,32 @@ +# Use OVERRIDES to minimize the usage of +# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ... +OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}" + +# Xen image to put in the image +# This should point to a file in the deploy image directory +BOOT_WRAPPER_AARCH64_XEN ??= "xen-${MACHINE}" + +# Xen command line for the image +BOOT_WRAPPER_AARCH64_XEN_CMDLINE ??= "noreboot dom0_mem=256M" + +BOOT_WRAPPER_AARCH64_XEN_CMDLINE_gem5-arm64 = "noreboot dom0_mem=256M console=dtuart \ + dtuart=/uart@1c090000 bootscrub=0" + +# Fix command line in the axf file for gem5-arm64 when Xen is present +BOOT_WRAPPER_AARCH64_CMDLINE_xen_gem5-arm64 = "console=hvc0 root=/dev/vda rw" + +# Image generated by boot wrapper when Xen is present +BOOT_WRAPPER_AARCH64_IMAGE_xen ?= "xen-system.axf" + +EXTRA_OECONF_append_xen = " \ +--with-xen=${WORKDIR}/kernel/arch/arm64/boot/Image \ +--with-xen-cmdline="" \ +" + +EXTRA_OEMAKE_append_xen = " \ +XEN_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_XEN} \ +XEN_CMDLINE="${BOOT_WRAPPER_AARCH64_XEN_CMDLINE}" \ +" + +# We need xen if it is activated +do_deploy[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen:do_deploy', '', d)}" diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend new file mode 100644 index 00000000..b0aae695 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend @@ -0,0 +1,21 @@ +# Use OVERRIDES to minimize the usage of +# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ... +OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}" + +FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:" + +DEPLOY_EXTRA_DEPS ??= "" +DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy" + +do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}" + +do_deploy_prepend_xen() { + # To avoid dependency loop between firmware-image-juno:do_install, + # xen:do_deploy and xen-devicetree:do_deploy when + # INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and + # xen-devicetree binaries copying in the do_deploy task. + cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \ + ${D}/${UNPACK_DIR}/SOFTWARE/xen + cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \ + ${D}/${UNPACK_DIR}/SOFTWARE/ +} diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt new file mode 100644 index 00000000..ec32ca29 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt @@ -0,0 +1,78 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 11 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-xen.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x01D00000 ;Image Flash Address +NOR4FILE: \SOFTWARE\xen ;Image File Name +NOR4NAME: xen +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x025C0000 ;Image Flash Address +NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x03E40000 ;Image Flash Address +NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BF00000 ;Image Flash Address +NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR7NAME: startup.nsh +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR8FILE: \SOFTWARE\blank.img ;Image File Name +NOR8NAME: BOOTENV +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02600000 ;Image Flash Address +NOR9FILE: \SOFTWARE\selftest ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + +NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR10ADDRESS: 0x02780000 ;Image Flash Address +NOR10NAME: uEnv.txt +NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR10LOAD: 00000000 ;Image Load Address +NOR10ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt new file mode 100644 index 00000000..1372bc30 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt @@ -0,0 +1,78 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 11 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r1-xen.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x01D00000 ;Image Flash Address +NOR4FILE: \SOFTWARE\xen ;Image File Name +NOR4NAME: xen +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x025C0000 ;Image Flash Address +NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x03E40000 ;Image Flash Address +NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BF00000 ;Image Flash Address +NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR7NAME: startup.nsh +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR8FILE: \SOFTWARE\blank.img ;Image File Name +NOR8NAME: BOOTENV +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02600000 ;Image Flash Address +NOR9FILE: \SOFTWARE\selftest ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + +NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR10ADDRESS: 0x02780000 ;Image Flash Address +NOR10NAME: uEnv.txt +NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR10LOAD: 00000000 ;Image Load Address +NOR10ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt new file mode 100644 index 00000000..def465e1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt @@ -0,0 +1,78 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 11 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r2-xen.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x01D00000 ;Image Flash Address +NOR4FILE: \SOFTWARE\xen ;Image File Name +NOR4NAME: xen +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x025C0000 ;Image Flash Address +NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x03E40000 ;Image Flash Address +NOR6FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BF00000 ;Image Flash Address +NOR7FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR7NAME: startup.nsh +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR8FILE: \SOFTWARE\blank.img ;Image File Name +NOR8NAME: BOOTENV +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02600000 ;Image Flash Address +NOR9FILE: \SOFTWARE\selftest ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + +NOR10UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR10ADDRESS: 0x02780000 ;Image Flash Address +NOR10NAME: uEnv.txt +NOR10FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR10LOAD: 00000000 ;Image Load Address +NOR10ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt new file mode 100644 index 00000000..4307b696 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt @@ -0,0 +1,15 @@ +xen_name=xen +xen_addr=0x84000000 +uenvcmd=run mybootcmd +mybootcmd=echo Loading custom boot command; \ +echo Loading kernel; \ +afs load ${kernel_name} ${kernel_addr} ; \ +if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr}; fi; \ +echo Loading device tree; \ +afs load ${fdtfile} ${fdt_addr}; \ +if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \ +afs load ${fdt_alt_name} ${fdt_addr}; fi; fdt addr ${fdt_addr}; fdt resize; \ +echo Loading Xen; \ +afs load ${xen_name} ${xen_addr}; \ +if test $? -eq 0; then echo Booting Xen; bootefi ${xen_addr} ${fdt_addr}; fi; + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-juno.dtsi b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-juno.dtsi new file mode 100644 index 00000000..0f9af21f --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-juno.dtsi @@ -0,0 +1,11 @@ +/* + * Disable IOMMU on juno board when Xen is used + */ + +/ { + + /* turn off iommu */ + iommu@2b600000 { + status = "disabled"; + }; +}; diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-n1sdp.dtsi b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-n1sdp.dtsi new file mode 100644 index 00000000..01ec14a8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/files/xen-n1sdp.dtsi @@ -0,0 +1,39 @@ +/* + * Modify N1SDP DTB to work properly when Xen is used + */ + +/ { + + /* + * pmu is using PPI interrupts which are reserved by xen + * remove pm nodes + */ + /delete-node/ pmu; + /delete-node/ spe-pmu; + + /* + * disable IOMMU until we have a proper support in xen + */ + /delete-node/ iommu@4f000000; + /delete-node/ iommu@4f400000; + + /* + * Set extra registers required for PCI quirks to communicate with SCP + * and remove invalid properties due to removal + */ + pcie@68000000 { + reg = <0 0x68000000 0 0x1200000>, + <0 0x06000000 0 0x80000>, + <0 0x62000000 0 0x80000>; + /delete-property/ msi-map; + /delete-property/ iommu-map; + }; + + pcie@70000000 { + reg = <0 0x70000000 0 0x1200000>, + <0 0x06000000 0 0x80000>, + <0 0x60000000 0 0x80000>; + /delete-property/ msi-map; + /delete-property/ iommu-map; + }; +}; diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/xen-devicetree.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/xen-devicetree.bbappend new file mode 100644 index 00000000..006d0b78 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen-devicetree/xen-devicetree.bbappend @@ -0,0 +1,25 @@ +# Platform dependent parameters + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +# Add a dtb snippet to turn off iommu in dom0 on Juno board +SRC_URI_append_juno = " file://xen-juno.dtsi" +XEN_DEVICETREE_DTSI_MERGE_append_juno = " xen-juno.dtsi" + +# Add a dtb snippet to remove pmu and iommu in dom0 on N1SDP +SRC_URI_append_n1sdp = " file://xen-n1sdp.dtsi" +XEN_DEVICETREE_DTSI_MERGE_append_n1sdp = " xen-n1sdp.dtsi" + +# Board specific configs +XEN_DEVICETREE_DOM0_BOOTARGS_append_juno = " root=/dev/sda1 rootwait" +XEN_DEVICETREE_XEN_BOOTARGS_append_juno = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no" + +XEN_DEVICETREE_DOM0_BOOTARGS_append_n1sdp = " root=/dev/sda1 rootwait" +XEN_DEVICETREE_XEN_BOOTARGS_append_n1sdp = " console=dtuart dtuart=serial0 bootscrub=0 iommu=no" + +XEN_DEVICETREE_DOM0_BOOTARGS_append_fvp-base = " root=/dev/vda2" +XEN_DEVICETREE_XEN_BOOTARGS_append_fvp-base = " console=dtuart dtuart=serial0 bootscrub=0" + +XEN_DEVICETREE_DOM0_BOOTARGS_append_foundation-armv8 = " root=/dev/vda2" +XEN_DEVICETREE_XEN_BOOTARGS_append_foundation-armv8 = " console=dtuart dtuart=serial0 bootscrub=0" + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch new file mode 100644 index 00000000..792bc9ea --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch @@ -0,0 +1,44 @@ +From a41feccdb6c03f12bddb4fb650a0465f0ed6eeca Mon Sep 17 00:00:00 2001 +From: Lukas Juenger +Date: Fri, 5 Apr 2019 15:54:04 +0200 +Subject: [PATCH] xen/arm: Cap the number of interrupt lines for dom0 + +Dom0 vGIC will use the same number of interrupt lines as the hardware GIC. +While the hardware GIC can support up to 1020 interrupt lines, +the vGIC is only supporting up to 992 interrupt lines. +This means that Xen will not be able to boot on platforms where the hardware +GIC supports more than 992 interrupt lines. +While it would make sense to increase the limits in the vGICs, this is not +trivial because of the design choices. +At the moment, only models seem to report the maximum of interrupt lines. +They also do not have any interrupt wired above the 992 limit. +So it should be fine to cap the number of interrupt lines for dom0 to 992 lines. + +Signed-off-by: Lukas Juenger +Acked-by: Julien Grall +--- + xen/arch/arm/setup.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c +index 444857a967..ccb0f181ea 100644 +--- a/xen/arch/arm/setup.c ++++ b/xen/arch/arm/setup.c +@@ -888,7 +888,13 @@ void __init start_xen(unsigned long boot_phys_offset, + /* Create initial domain 0. */ + /* The vGIC for DOM0 is exactly emulating the hardware GIC */ + dom0_cfg.arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE; +- dom0_cfg.arch.nr_spis = gic_number_lines() - 32; ++ /* ++ * Xen vGIC supports a maximum of 992 interrupt lines. ++ * 32 are substracted to cover local IRQs. ++ */ ++ dom0_cfg.arch.nr_spis = min(gic_number_lines(), (unsigned int) 992) - 32; ++ if ( gic_number_lines() > 992 ) ++ printk(XENLOG_WARNING "Maximum number of vGIC IRQs exceeded.\n"); + dom0_cfg.max_vcpus = dom0_max_vcpus(); + + dom0 = domain_create(0, &dom0_cfg, true); +-- +2.17.1 + diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/fvp/defconfig b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/fvp/defconfig new file mode 100644 index 00000000..f13327c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/fvp/defconfig @@ -0,0 +1,73 @@ +# +# Automatically generated file; DO NOT EDIT. +# Xen/arm 4.12.0 Configuration +# +CONFIG_64BIT=y +CONFIG_ARM_64=y +CONFIG_ARM=y +CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig" + +# +# Architecture Features +# +CONFIG_NR_CPUS=128 +CONFIG_GICV3=y +CONFIG_HVM=y +# CONFIG_NEW_VGIC is not set +CONFIG_SBSA_VUART_CONSOLE=y +CONFIG_ARM_SSBD=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y + +# +# ARM errata workaround via the alternative framework +# +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_834220=y +CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y +CONFIG_ALL_PLAT=y +# CONFIG_QEMU is not set +# CONFIG_RCAR3 is not set +# CONFIG_MPSOC is not set +# CONFIG_NO_PLAT is not set +CONFIG_ALL64_PLAT=y +# CONFIG_ALL32_PLAT is not set +CONFIG_MPSOC_PLATFORM=y + +# +# Common Features +# +CONFIG_HAS_ALTERNATIVE=y +CONFIG_HAS_DEVICE_TREE=y +CONFIG_MEM_ACCESS=y +CONFIG_HAS_PDX=y +# CONFIG_XSM is not set +CONFIG_SCHED_CREDIT=y +CONFIG_SCHED_CREDIT2=y +CONFIG_SCHED_RTDS=y +# CONFIG_SCHED_ARINC653 is not set +CONFIG_SCHED_NULL=y +CONFIG_SCHED_DEFAULT="credit2" +# CONFIG_LIVEPATCH is not set +CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y +CONFIG_CMDLINE="" +CONFIG_DOM0_MEM="" + +# +# Device Drivers +# +CONFIG_HAS_NS16550=y +CONFIG_HAS_CADENCE_UART=y +CONFIG_HAS_MVEBU=y +CONFIG_HAS_PL011=y +CONFIG_HAS_SCIF=y +CONFIG_HAS_PASSTHROUGH=y +CONFIG_ARM_SMMU=y +CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/juno/defconfig b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/juno/defconfig new file mode 100644 index 00000000..f13327c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/juno/defconfig @@ -0,0 +1,73 @@ +# +# Automatically generated file; DO NOT EDIT. +# Xen/arm 4.12.0 Configuration +# +CONFIG_64BIT=y +CONFIG_ARM_64=y +CONFIG_ARM=y +CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig" + +# +# Architecture Features +# +CONFIG_NR_CPUS=128 +CONFIG_GICV3=y +CONFIG_HVM=y +# CONFIG_NEW_VGIC is not set +CONFIG_SBSA_VUART_CONSOLE=y +CONFIG_ARM_SSBD=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y + +# +# ARM errata workaround via the alternative framework +# +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_834220=y +CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y +CONFIG_ALL_PLAT=y +# CONFIG_QEMU is not set +# CONFIG_RCAR3 is not set +# CONFIG_MPSOC is not set +# CONFIG_NO_PLAT is not set +CONFIG_ALL64_PLAT=y +# CONFIG_ALL32_PLAT is not set +CONFIG_MPSOC_PLATFORM=y + +# +# Common Features +# +CONFIG_HAS_ALTERNATIVE=y +CONFIG_HAS_DEVICE_TREE=y +CONFIG_MEM_ACCESS=y +CONFIG_HAS_PDX=y +# CONFIG_XSM is not set +CONFIG_SCHED_CREDIT=y +CONFIG_SCHED_CREDIT2=y +CONFIG_SCHED_RTDS=y +# CONFIG_SCHED_ARINC653 is not set +CONFIG_SCHED_NULL=y +CONFIG_SCHED_DEFAULT="credit2" +# CONFIG_LIVEPATCH is not set +CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y +CONFIG_CMDLINE="" +CONFIG_DOM0_MEM="" + +# +# Device Drivers +# +CONFIG_HAS_NS16550=y +CONFIG_HAS_CADENCE_UART=y +CONFIG_HAS_MVEBU=y +CONFIG_HAS_PL011=y +CONFIG_HAS_SCIF=y +CONFIG_HAS_PASSTHROUGH=y +CONFIG_ARM_SMMU=y +CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/n1sdp/defconfig b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/n1sdp/defconfig new file mode 100644 index 00000000..e8a88c1b --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/files/n1sdp/defconfig @@ -0,0 +1,100 @@ +# +# Automatically generated file; DO NOT EDIT. +# Xen/arm 4.12.2 Configuration +# +CONFIG_64BIT=y +CONFIG_ARM_64=y +CONFIG_ARM=y +CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig" + +# +# Architecture Features +# +CONFIG_NR_CPUS=128 +CONFIG_ACPI=y +CONFIG_GICV3=y +CONFIG_HAS_ITS=y +CONFIG_HVM=y +# CONFIG_NEW_VGIC is not set +CONFIG_SBSA_VUART_CONSOLE=y +CONFIG_ARM_SSBD=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y + +# +# ARM errata workaround via the alternative framework +# +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_834220=y +CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y +CONFIG_ALL_PLAT=y +# CONFIG_QEMU is not set +# CONFIG_RCAR3 is not set +# CONFIG_MPSOC is not set +# CONFIG_NO_PLAT is not set +CONFIG_ALL64_PLAT=y +# CONFIG_ALL32_PLAT is not set +CONFIG_MPSOC_PLATFORM=y + +# +# Common Features +# +CONFIG_HAS_ALTERNATIVE=y +CONFIG_HAS_DEVICE_TREE=y +# CONFIG_MEM_ACCESS is not set +CONFIG_HAS_PDX=y +# CONFIG_TMEM is not set +CONFIG_XSM=y +CONFIG_XSM_FLASK=y +CONFIG_XSM_FLASK_AVC_STATS=y +# CONFIG_XSM_FLASK_POLICY is not set +CONFIG_XSM_SILO=y +# CONFIG_XSM_DUMMY_DEFAULT is not set +# CONFIG_XSM_FLASK_DEFAULT is not set +CONFIG_XSM_SILO_DEFAULT=y +# CONFIG_ARGO is not set + +# +# Schedulers +# +CONFIG_SCHED_CREDIT=y +CONFIG_SCHED_CREDIT2=y +CONFIG_SCHED_RTDS=y +# CONFIG_SCHED_ARINC653 is not set +CONFIG_SCHED_NULL=y +# CONFIG_SCHED_CREDIT_DEFAULT is not set +CONFIG_SCHED_CREDIT2_DEFAULT=y +# CONFIG_SCHED_RTDS_DEFAULT is not set +# CONFIG_SCHED_NULL_DEFAULT is not set +CONFIG_SCHED_DEFAULT="credit2" +# CONFIG_LIVEPATCH is not set +CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS=y +CONFIG_CMDLINE="" +CONFIG_DOM0_MEM="" + +# +# Device Drivers +# +CONFIG_HAS_NS16550=y +CONFIG_HAS_CADENCE_UART=y +CONFIG_HAS_MVEBU=y +CONFIG_HAS_PL011=y +CONFIG_HAS_SCIF=y +CONFIG_HAS_PASSTHROUGH=y +CONFIG_ARM_SMMU=y +CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +CONFIG_DEBUG_INFO=y +# CONFIG_FRAME_POINTER is not set +# CONFIG_COVERAGE is not set +# CONFIG_LOCK_PROFILE is not set +# CONFIG_PERF_COUNTERS is not set +CONFIG_VERBOSE_DEBUG=y +# CONFIG_DEVICE_TREE_DEBUG is not set +# CONFIG_SCRUB_DEBUG is not set diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/xen_%.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/xen_%.bbappend new file mode 100644 index 00000000..bdcb75f9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xen/xen_%.bbappend @@ -0,0 +1,32 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +# Machine specific settings +XEN_CONFIG_EARLY_PRINTK_juno = "juno" +XEN_CONFIG_EARLY_PRINTK_gem5-arm64 = "vexpress" +XEN_CONFIG_EARLY_PRINTK_fvp-base = "fastmodel" +XEN_CONFIG_EARLY_PRINTK_foundation-armv8 = "fastmodel" +XEN_CONFIG_EARLY_PRINTK_n1sdp = "pl011,0x2a400000" + +# Foundation-armv8 support +COMPATIBLE_MACHINE_foundation-armv8 = "foundation-armv8" + +SRC_URI_append_foundation-armv8 = " file://fvp/defconfig" + +# FVP Base support +COMPATIBLE_MACHINE_fvp-base = "fvp-base" + +SRC_URI_append_fvp-base = " file://fvp/defconfig" + +# Juno support +COMPATIBLE_MACHINE_juno = "juno" + +SRC_URI_append_juno = " file://juno/defconfig" + +# Gem5 support +# Fix problem with number of interrupts on gem5 +SRC_URI_append_gem5-arm64 = " file://4.12.0/0001-xen-arm-Cap-the-number-of-interrupt-lines-for-dom0.patch" + +# N1SDP support +COMPATIBLE_MACHINE_n1sdp = "n1sdp" + +SRC_URI_append_n1sdp = " file://n1sdp/defconfig" diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-manager.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-manager.bbappend new file mode 100644 index 00000000..874cfede --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-manager.bbappend @@ -0,0 +1,6 @@ +# Board specific configuration for the manager + +# FVP and Foundation are using vda as hard drive and partition 2 is the +# default rootfs, so use vda3 for guest lvm +XENGUEST_MANAGER_VOLUME_DEVICE_foundation-armv8 ?= "/dev/vda3" +XENGUEST_MANAGER_VOLUME_DEVICE_fvp-base ?= "/dev/vda3" diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-network-bridge.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-network-bridge.bbappend new file mode 100644 index 00000000..dc849210 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-extended/xenguest/xenguest-network-bridge.bbappend @@ -0,0 +1,2 @@ +# Juno board has 2 network interfaces, add both of them to the bridge +XENGUEST_NETWORK_BRIDGE_MEMBERS_juno ?= "eth0 eth1" diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.cfg b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.cfg new file mode 100644 index 00000000..7e87cab4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.cfg @@ -0,0 +1,4 @@ +# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping +# Linux kernel with a coredump while trying to access ZEN bit of CPACR1 core +# register. +# CONFIG_ARM64_SVE is not set diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.scc b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.scc new file mode 100644 index 00000000..6bc769cc --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/arm-autonomy-kmeta-extra/features/arm-autonomy/disable-arm64-sve.scc @@ -0,0 +1,3 @@ +define KFEATURE_DESCRIPTION "Disable SVE support" + +kconf non-hardware disable-arm64-sve.cfg diff --git a/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/linux-%.bbappend b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/linux-%.bbappend new file mode 100644 index 00000000..189645af --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-kernel/linux/linux-%.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}:" + +# +# arm-autonomy kmeta extra +# +SRC_URI_append = " file://arm-autonomy-kmeta-extra;type=kmeta;name=arm-autonomy-kmeta-extra;destsuffix=arm-autonomy-kmeta-extra" + +# We need to turn off SVE support in the Linux kernel otherwise Xen is stopping +# Linux kernel with a coredump while trying to access XEN bit of CPACR1 core +# register. +LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE = "${@bb.utils.contains_any('DISTRO_FEATURES', \ + 'arm-autonomy-host arm-autonomy-guest', \ + ' features/arm-autonomy/disable-arm64-sve.scc','',d)}" + +KERNEL_FEATURES_append_gem5-arm64 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}" +KERNEL_FEATURES_append_fvp-base = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}" +KERNEL_FEATURES_append_foundation-armv8 = "${LINUX_ARM_AUTONOMY_DISABLE_ARM64_SVE}" diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb new file mode 100644 index 00000000..5b20fa09 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb @@ -0,0 +1,120 @@ +# Recipe to create a minimal Arm Autonomy stack host image + +DESCRIPTION = "Arm Autonomy stack host minimal image" + +inherit core-image + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +# The ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS variable can be used to include in the +# image one or several xenguest images. +# The list must be space separated and each entry must have the following +# format: URL[;guestname=NAME] +# - URL can be the full path to a file or a Yocto compatible SRC_URI url +# - guestname=NAME can be used to specify the name of the guest. If not +# specified the basename of the file (without .xenguest extension) is used. +# Here are examples of values: +# /home/mydir/myguest.xenguest;guestname=guest1 +# http://www.url.com/testguest.xenguest +# +# If you are using the output of an other Yocto project, you should use the +# full path syntax instead of the Yocto SRC_URI to be able to use the +# symlink version of your image (as the real file has a new name on each +# build as it includes the date). You must not use SRC_URI type file:// as +# it will try to include the symlink and not the destination file which will +# be detected by the recipe and output an error 'Guest file is a symlink'. +# +# Guests can also be added using a bbapend to this recipe by adding entries +# to SRC_URI with parameter ;guestname=NAME to specify the destination +# guestname. The parameter guestname must be present as it is used to detect +# guests to be added +ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS ??= "" + +# Includes minimal set required to start and manage guest. The xen specific +# modules are not explicitly included as they are built as part of the kernel +# image for performance reasons. It doesn't include all kernel modules to +# reduce the image size. If the kernel-modules packages are needed they can +# be appended to IMAGE_INSTALL in a bbappend. +IMAGE_INSTALL += " \ + packagegroup-core-boot \ + packagegroup-core-ssh-openssh \ + qemu-xen \ + xenguest-manager \ + xenguest-network-bridge \ + " + +# Build xen binary +EXTRA_IMAGEDEPENDS += "xen" + +# Build xen-devicetree to produce a xen ready devicetree +EXTRA_IMAGEDEPENDS += "xen-devicetree" + +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', False, True, d): + raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'arm-autonomy-host'") + + if bb.utils.contains('DISTRO_FEATURES', 'xen', False, True, d): + raise bb.parse.SkipRecipe("DISTRO_FEATURES does not contain 'xen'") + + # Check in ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS for extra guests and add them + # to SRC_URI with xenguest parameter if not set + guestlist = d.getVar('ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS') + if guestlist: + for guest in guestlist.split(): + # If the user just specified a file instead of file://FILE, add + # the file:// prefix + if guest.startswith('/'): + guestfile = '' + guestname = '' + if ';guestname=' in guest: + # user specified a guestname + guestname = guest.split(';guestname=')[1] + guestfile = guest.split(';guestname=')[0] + else: + # no guestname so use the basename + guestname = os.path.basename(guest) + guestfile = guest + # in case we have a link we need the destination + guestfile = os.path.realpath(guestfile) + + # make sure the file exist to give a meaningfull error + if not os.path.exists(guestfile): + raise bb.parse.SkipRecipe("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS entry does not exist: " + guest) + + # In case the file is a symlink make sure we use the destination + d.appendVar('SRC_URI', ' file://' + guestfile + ';guestname=' + guestname) + else: + # we have a Yocto URL + try: + _, _, path, _, _, parm = bb.fetch.decodeurl(guest) + # force guestname param in if not already there + if not 'guestname' in parm: + guest += ';guestname=' + os.path.basename(path) + d.appendVar('SRC_URI', ' ' + guest) + except: + raise bb.parse.SkipRecipe("ARM_AUTONOMY_HOST_IMAGE_EXTERN_GUESTS contains an invalid entry: " + guest) +} + +python add_extern_guests () { + # Destination directory on the rootfs + guestdir = d.getVar('IMAGE_ROOTFS') + d.getVar('datadir') + '/guests' + + # Parse SRC_URI for files with ;guestname= parameter + src_uri = d.getVar('SRC_URI') + for entry in src_uri.split(): + _, _, path, _, _, parm = bb.fetch.decodeurl(entry) + if 'guestname' in parm: + if os.path.islink(path): + bb.fatal("Guest file is a symlink: " + path) + bb.utils.mkdirhier(guestdir) + dstname = parm['guestname'] + # Add file extension if not there + if not dstname.endswith('.xenguest'): + dstname += '.xenguest' + if not bb.utils.copyfile(path, guestdir + '/' + dstname): + bb.fatal("Fail to copy Guest file " + path) +} + +IMAGE_PREPROCESS_COMMAND += "add_extern_guests; " + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/bsp/meta-arm/meta-arm-autonomy/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend new file mode 100644 index 00000000..1d97e50c --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend @@ -0,0 +1,18 @@ +# Add support for interface configuration via interfaces.d directory. This +# feature can be used by other packages to add network interface +# configuration by adding network network interface configuration file under +# interfaces.d directory. + +do_install_append() { + # Add scan of interfaces.d to interfaces file + cp -f ${WORKDIR}/interfaces ${WORKDIR}/interfaces.subdir + echo "source-directory ${sysconfdir}/network/interfaces.d/" \ + >> ${WORKDIR}/interfaces.subdir + + # Create interfaces.d script in case nobody is adding a script + # so that there is no error about non existing directory + install -d -m 755 ${D}${sysconfdir}/network/interfaces.d + + # Install our file instead of the original one + install -m 644 interfaces.subdir ${D}${sysconfdir}/network/interfaces +} diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend b/bsp/meta-arm/meta-arm-autonomy/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend new file mode 100644 index 00000000..7b0c6472 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-core/sysvinit/sysvinit-inittab_2.%.bbappend @@ -0,0 +1,16 @@ +# if arm-autonomy-guest is activated, we are running as a xen guest so we must +# have a console on hvc0 +# This is normally done in meta-virtualization if xen is activated but here +# we don't have xen activated. +# + +SYSVINIT_ADDHVC0 = "${@bb.utils.contains('DISTRO_FEATURES', \ + 'arm-autonomy-guest', 'true', 'false', d)}" + +do_install_append() { + if ${SYSVINIT_ADDHVC0}; then + echo "" >> ${D}${sysconfdir}/inittab + echo "X0:12345:respawn:/sbin/getty 115200 hvc0" >> \ + ${D}${sysconfdir}/inittab + fi +} diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-devtools/qemu/qemu_%.bbappend b/bsp/meta-arm/meta-arm-autonomy/recipes-devtools/qemu/qemu_%.bbappend new file mode 100644 index 00000000..ed63a4e9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-devtools/qemu/qemu_%.bbappend @@ -0,0 +1,18 @@ +# Use OVERRIDES to minimize the usage of +# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ... +OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}" + +# For Xen we only need the i386 binaries +QEMU_TARGETS_xen = "i386" + +PACKAGECONFIG[noaudio] = "--audio-drv-list='',," +PACKAGECONFIG_append_xen = " virtfs noaudio" +PACKAGECONFIG_remove_xen = "sdl" + +# Reduce the qemu package size by splitting it into +# qemu and qemu-xen packages +PACKAGES_prepend_xen := "${PN}-xen" +RDEPENDS_${PN}_xen += "${PN}-xen" +FILES_${PN}-xen_xen = "${bindir}/qemu-system-i386" +RDEPENDS_${PN}-xen_xen += "xen-tools-libxenstore xen-tools-libxenctrl \ + xen-tools-libxenguest" diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/files/xen.dtsi.in b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/files/xen.dtsi.in new file mode 100644 index 00000000..42d12fae --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/files/xen.dtsi.in @@ -0,0 +1,17 @@ +/ { + chosen { + xen,dom0-bootargs = "###XEN_DOM0_BOOTARGS###"; + xen,xen-bootargs = "###XEN_XEN_BOOTARGS###"; + + modules { + #size-cells = <0x00000001>; + #address-cells = <0x00000001>; + + module@0 { + reg = <###XEN_DOM0_ADDR### ###XEN_DOM0_SIZE###>; + compatible = "multiboot,module"; + }; + }; + }; +}; + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/xen-devicetree.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/xen-devicetree.bb new file mode 100644 index 00000000..cef5f79e --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen-devicetree/xen-devicetree.bb @@ -0,0 +1,72 @@ +# This recipe can be used to modify one or several DTBS to add +# entries required to declare and boot Linux as Dom0 from Xen + +SRC_URI = "file://xen.dtsi.in" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "\ + file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ + " + +S = "${WORKDIR}" + +DESCRIPTION = "Add entries in DTB for Xen and Dom0" + +# Please refer to documentation/xen-devicetree.md for documentation on those +# parameters +XEN_DEVICETREE_DEPEND ?= "virtual/kernel:do_deploy" +XEN_DEVICETREE_DTBS ?= "${KERNEL_DEVICETREE}" +XEN_DEVICETREE_XEN_BOOTARGS ?= "noreboot dom0_mem=${XEN_DEVICETREE_DOM0_MEM}" +XEN_DEVICETREE_DOM0_MEM ?= "1024M" +XEN_DEVICETREE_DOM0_BOOTARGS ?= "console=hvc0 earlycon=xen" +XEN_DEVICETREE_DOM0_ADDR ?= "0x80080000" +XEN_DEVICETREE_DOM0_SIZE ?= "0x01000000" +XEN_DEVICETREE_DTSI_MERGE ?= "xen.dtsi" + +# Our package does not generate any package for the rootfs but contributes to +# deploy +inherit nopackages deploy + +DEPENDS += "dtc-native" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" + +do_deploy() { + if [ ! -f ${WORKDIR}/xen.dtsi.in ]; then + die "xen.dtsi.in does not exist" + fi + cat ${WORKDIR}/xen.dtsi.in \ + | sed -e "s,###XEN_DOM0_BOOTARGS###,${XEN_DEVICETREE_DOM0_BOOTARGS}," \ + | sed -e "s,###XEN_XEN_BOOTARGS###,${XEN_DEVICETREE_XEN_BOOTARGS}," \ + | sed -e "s,###XEN_DOM0_ADDR###,${XEN_DEVICETREE_DOM0_ADDR}," \ + | sed -e "s,###XEN_DOM0_SIZE###,${XEN_DEVICETREE_DOM0_SIZE}," \ + > ${WORKDIR}/xen.dtsi + + # Generate final dtbs + for dtbf in ${XEN_DEVICETREE_DTBS}; do + rdtb=`basename $dtbf` + if [ ! -f ${DEPLOY_DIR_IMAGE}/$rdtb ]; then + die "Wrong file in XEN_DEVICETREE_DTBS: ${DEPLOY_DIR_IMAGE}/$rdtb does not exist" + fi + dtc -I dtb -O dts -o ${WORKDIR}/dom0-linux.dts ${DEPLOY_DIR_IMAGE}/$rdtb + + # Add external includes + for inc in ${XEN_DEVICETREE_DTSI_MERGE}; do + if [ ! -f ${WORKDIR}/${inc} ]; then + die "Wrong file in XEN_DEVICETREE_DTSI_MERGE: ${WORKDIR}/${inc} does not exist" + fi + echo "/include/ \"$inc\"" >> ${WORKDIR}/dom0-linux.dts + done + + rdtbnoextn=`basename $dtbf ".dtb"` + dtc -I dts -O dtb \ + -o ${WORKDIR}/${rdtbnoextn}-xen.dtb ${WORKDIR}/dom0-linux.dts + install -m 644 ${rdtbnoextn}-xen.dtb ${DEPLOYDIR}/. + done +} +do_deploy[depends] += "${XEN_DEVICETREE_DEPEND}" + +addtask deploy after do_install + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen/xen_%.bbappend b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen/xen_%.bbappend new file mode 100644 index 00000000..846d2442 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xen/xen_%.bbappend @@ -0,0 +1,14 @@ +# +# Define early console based on board parameters +# + +XEN_CONFIG_EARLY_PRINTK ??= "disable" + +EXTRA_OEMAKE += "${@bb.utils.contains('XEN_CONFIG_EARLY_PRINTK', 'disable', \ + '', ' CONFIG_DEBUG=y CONFIG_EARLY_PRINTK=${XEN_CONFIG_EARLY_PRINTK}',d)}" + +# Make Xen machine specific +# This ensures that sstate is properly handled and that each machine can have +# its own configuration +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in new file mode 100755 index 00000000..2a360964 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/network-bridge.sh.in @@ -0,0 +1,15 @@ +#!/bin/sh +# This script is setting up a virtual network interface connected to the +# xenguest-network-bridge if NETWORK_BRIDGE is set to 1 in the guest params + +guestname="${1}" + +BRIDGE_NAME="###BRIDGE_NAME###" + +# get guest parameters +. ./params.cfg + +if [ "${NETWORK_BRIDGE:-}" = "1" ]; then + echo "vif = ['${BRIDGE_NAME}']" >> ${guestname}.cfg +fi + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-init b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-init new file mode 100755 index 00000000..9563d2fc --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-init @@ -0,0 +1,85 @@ +#!/bin/bash +# +# xenguest Init Script to start and stop xenguests during boot +# + +XENGUEST_CONF_BASE="/etc/xenguest" + +if [ ! -f ${XENGUEST_CONF_BASE}/xenguest-manager.conf ]; then + echo "No xenguest manager configuration !!" + exit 1 +fi + +source ${XENGUEST_CONF_BASE}/xenguest-manager.conf + +# Create guest list +guestlist=$(/usr/bin/xenguest-manager list) + +# Unconfigured guests + +case "$1" in + start) + echo "Starting xenguest" + + # Create unconfigured guests + if [ -d ${XENGUEST_GUEST_DIR} ]; then + for f in $(find ${XENGUEST_GUEST_DIR} -name "*.xenguest" \ + -exec basename {} .xenguest \;); do + if [ ! -f ${XENGUEST_CONF_BASE}/guests/${f}/guest.cfg ]; then + # Check if this guest should be auto booted + autoboot=$(/usr/bin/xenguest-mkimage dump-paramsconfig \ + ${XENGUEST_GUEST_DIR}/${f}.xenguest | \ + grep GUEST_AUTOBOOT | sed -e "s,.*=,," | tr -d '"') + if [ "$autoboot" = "0" ]; then + echo "Do not create $f, autoboot disabled" + else + /usr/bin/xenguest-manager create \ + ${XENGUEST_GUEST_DIR}/${f}.xenguest + # Update guestlist + if [ $? -eq 0 ]; then + guestlist="${guestlist} ${f}" + fi + fi + fi + done + fi + if [ -n "${guestlist}" ]; then + for f in ${guestlist}; do + GUEST_AUTOBOOT="1" + if [ -f ${XENGUEST_CONF_BASE}/guests/${f}/params.cfg ]; then + source ${XENGUEST_CONF_BASE}/guests/${f}/params.cfg + fi + if [ "${GUEST_AUTOBOOT}" = "1" ]; then + /usr/bin/xenguest-manager start ${f} + fi + done + else + echo "No guest configured" + fi + ;; + status) + true + ;; + stop) + echo "Stopping xenguest" + for f in ${guestlist}; do + /usr/bin/xenguest-manager stop ${f} + done + ;; + reload) + echo >&2 'Reload not available; use force-reload'; exit 1 + ;; + force-reload|restart) + echo "Restarting xenguest" + $0 stop + $0 start + ;; + *) + # do not advertise unreasonable commands that there is no reason + # to use with this device + echo $"Usage: $0 {start|stop|status|restart|force-reload}" + exit 1 +esac + +exit $? + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager new file mode 100755 index 00000000..99975a24 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager @@ -0,0 +1,665 @@ +#!/bin/bash +# This script manages xenguest +# +set -u +this="$0" + +XENGUEST_CONF_BASE="/etc/xenguest" +LOGFILE="/var/log/xenguest" + +if [ ! -f ${XENGUEST_CONF_BASE}/xenguest-manager.conf ]; then + echo "Cannot find xenguest manager configuration" + exit 1 +fi + +# Following variables must be set in configuration: +# XENGUEST_VOLUME_DEVICE: device to use for lvm +# XENGUEST_VOLUME_NAME: lvm volume name to create on device +source ${XENGUEST_CONF_BASE}/xenguest-manager.conf + +PREF="xenguest:" + +function usage() { + cat < /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Initialize lvm on ${XENGUEST_VOLUME_DEVICE}" + echo "pvcreate -f ${XENGUEST_VOLUME_DEVICE}" >> ${LOGFILE} 2>&1 + pvcreate -f ${XENGUEST_VOLUME_DEVICE} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error" + exit 1 + fi + fi + vgs ${XENGUEST_VOLUME_NAME} > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Create ${XENGUEST_VOLUME_NAME} volume" + echo "vgcreate ${XENGUEST_VOLUME_NAME} ${XENGUEST_VOLUME_DEVICE}" \ + >> ${LOGFILE} 2>&1 + vgcreate ${XENGUEST_VOLUME_NAME} ${XENGUEST_VOLUME_DEVICE} \ + >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error" + exit 1 + fi + fi +} + +# Detach a disk we attached to xen +function xenguest_detach_disk() +{ + echo "xl block-detach 0 \$\(xl block-list 0 | " \ + "grep \"domain/0\" | awk '{print \$1}'\)" \ + >> ${LOGFILE} 2>&1 + xl block-detach 0 $(xl block-list 0 | \ + grep "domain/0" | awk '{print $1}') \ + >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error detaching partition ${part}" + exit 1 + fi +} + +function xenguest_disk_init() +{ + guestname="$1" + guestfile="$2" + devname="/dev/${XENGUEST_VOLUME_NAME}/${guestname}" + + source ${XENGUEST_CONF_BASE}/guests/${guestname}/disk.cfg + + if [ ${DISK_SIZE:-0} -eq 0 ]; then + echo "${PREF} No disk for ${guestname}" + return + fi + + echo "${PREF} Create ${guestname} disk" + + # Init our volume + xenguest_volume_init + + echo "${PREF} Create hard drive for ${guestname}" + + + # Remove volume if it already exist + echo "lvs ${XENGUEST_VOLUME_NAME}/${guestname}" >> ${LOGFILE} 2>&1 + lvs ${XENGUEST_VOLUME_NAME}/${guestname} >> ${LOGFILE} 2>&1 + if [ $? -eq 0 ]; then + echo "lvremove -y ${devname}" >> ${LOGFILE} 2>&1 + lvremove -y ${devname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error removing volume ${guestname}" + exit 1 + fi + fi + + # Create volume + echo "lvcreate -y -L ${DISK_SIZE}G -n ${guestname} ${XENGUEST_VOLUME_NAME}" \ + >> ${LOGFILE} 2>&1 + lvcreate -y -L ${DISK_SIZE}G -n ${guestname} ${XENGUEST_VOLUME_NAME} \ + >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error creating volume ${guestname}" + exit 1 + fi + + # Add partition table + echo "parted -s ${devname} mklabel msdos" >> ${LOGFILE} 2>&1 + parted -s ${devname} mklabel msdos >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error creating partition table on ${guestname}" + exit 1 + fi + + # Setup disk name in xen configuration + echo "xenguest-mkimage update ${XENGUEST_CONF_BASE}/guests/${guestname}" \ + "--xen-disk=${devname}" >> ${LOGFILE} 2>&1 + xenguest-mkimage update ${XENGUEST_CONF_BASE}/guests/${guestname} \ + --xen-disk=${devname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error setting disk in xen configuration" + exit 1 + fi + + # Create partitions + partstart="0" + + # For each partition X the disk.cfg file should set a variable DISK_PARTX + # with a : separated list defining the partition: + # DISK_PART3="4:ext4:disk.tgz" means that partition 3 should be 4G formated + # with ext4 and initialized with the content of disk.tgz + for part in $(seq 1 4); do + eval partdesc="\${DISK_PART${part}:-0}" + size=$(echo ${partdesc} | sed -e "s/\(.*\):.*:.*/\1/") + fstype=$(echo ${partdesc} | sed -e "s/.*:\(.*\):.*/\1/") + content=$(echo ${partdesc} | sed -e "s/.*:.*:\(.*\)/\1/") + + if [ "${size}" -ne 0 ]; then + # Size is expressed in GB, pass it in MB + size=$(expr ${size} \* 1024) + partend=$(expr ${partstart} + ${size}) + + # Let first MB of disk free for partition table + if [ ${partstart} -eq 0 ]; then + partstart="1" + fi + + # Create partition + echo "parted -s ${devname} unit MB mkpart primary ${partstart}" \ + "${partend}" >> ${LOGFILE} 2>&1 + parted -s ${devname} unit MB mkpart primary ${partstart} \ + ${partend} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error adding partition ${part}" + exit 1 + fi + + # Set next partition start to current partition end + partstart="${partend}" + + # Sync to see the created partition + echo "sync" >> ${LOGFILE} 2>&1 + sync >> ${LOGFILE} 2>&1 + + # Prepare format command + if [ -n "${fstype}" ]; then + case ${fstype} in + vfat|ext2|ext3|ext4) + formatcmd="mkfs.${fstype} -F" + ;; + swap) + formatcmd="mkswap" + ;; + *) + echo "${PREF} partition ${part} of ${guestname}" \ + "fstype is invalid: ${fstype}" + exit 1 + ;; + esac + else + formatcmd="" + fi + + # Attach disk to xen + echo "xl block-attach 0 phy:${devname} xvda w" >> ${LOGFILE} 2>&1 + xl block-attach 0 phy:${devname} xvda w >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error attaching partition ${part}" + exit 1 + fi + + + # Loop for 20s to wait until /dev/xvdaX appears + i=0 + while [ ! -b /dev/xvda${part} ]; do + ((i++)) + if [[ "$i" == '40' ]]; then + break; + fi + sleep 0.5 + done + + if [ ! -b /dev/xvda${part} ]; then + echo "${PREF} Partition ${part} creation error" + xenguest_detach_disk + exit 1 + fi + + if [ -n "${formatcmd}" ]; then + echo "${formatcmd} /dev/xvda${part}" >> ${LOGFILE} 2>&1 + ${formatcmd} /dev/xvda${part} + if [ $? -ne 0 ]; then + echo "${PREF} Cannot create partition ${part} FS" + xenguest_detach_disk + exit 1 + fi + fi + + case ${content} in + *.img*) + decompress="" + case ${content} in + *.img.gz) + decompress='zcat' + ;; + *.img.bz2) + decompress='bzcat' + ;; + *.img) + decompress='cat' + ;; + *) + # invalid/unknown compression type + echo "${PREF} Invalid file format in disk ${content}" + xenguest_detach_disk + exit 1 + ;; + esac + # dd into partition + echo "xenguest-mkimage extract-disk-file ${guestfile} " \ + "${content} | ${decompress} | dd of=/dev/xvda${part} " >> ${LOGFILE} 2>&1 + xenguest-mkimage extract-disk-file ${guestfile} ${content} \ + | ${decompress} | dd of=/dev/xvda${part} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Cannot populate partition ${part}" + xenguest_detach_disk + exit 1 + fi + ;; + *.tar*) + tararg="" + case ${content} in + *.tar.gz) + tararg="z" + ;; + *.tar.bz2) + tararg="j" + ;; + *.tar.xz) + tararg="J" + ;; + *.tar) + tararg="" + ;; + *) + # invalid/unknown tar type + echo "${PREF} Invalid file format in disk ${content}" + xenguest_detach_disk + exit 1 + ;; + esac + + # must mount the partition and extract + mntdir=$(mktemp -d) + echo "mount /dev/xvda${part} ${mntdir}" >> ${LOGFILE} 2>&1 + mount /dev/xvda${part} ${mntdir} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Cannot mount partition ${part}" + xenguest_detach_disk + rm -rf ${mntdir} + exit 1 + fi + + # tar and unmount + echo "xenguest-mkimage extract-disk-file ${guestfile}" \ + "${content} | tar -C ${mntdir} -x${tararg}f - " \ + >> ${LOGFILE} 2>&1 + xenguest-mkimage extract-disk-file ${guestfile} ${content} \ + | tar -C ${mntdir} -x${tararg}f - >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Cannot populate partition ${part}" + umount ${mntdir} + rm -rf ${mntdir} + xenguest_detach_disk + exit 1 + fi + echo "umount ${mntdir}" >> ${LOGFILE} 2>&1 + umount ${mntdir} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error unmounting ${part}" + xenguest_detach_disk + rm -rf ${mntdir} + exit 1 + fi + rm -rf ${mntdir} + ;; + *) + #invalid content type + ;; + esac + + # Detach disk + xenguest_detach_disk + fi + done + +} + +function xenguest_guest_create() +{ + guestfile="$1" + guestname="$2" + + # extract xenguest tar + # put xen config in etc ? + # if disk config file: + # disk init + # add partititions + + echo "${PREF} Create ${guestname} using ${guestfile}" + rm -rf ${XENGUEST_CONF_BASE}/guests/${guestname} + mkdir -p ${XENGUEST_CONF_BASE}/guests/${guestname} + + echo "xenguest-mkimage extract-config ${guestfile}" \ + "${XENGUEST_CONF_BASE}/guests/${guestname}" >> ${LOGFILE} 2>&1 + xenguest-mkimage extract-config ${guestfile} \ + ${XENGUEST_CONF_BASE}/guests/${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error extracting guest image" + exit 1 + fi + + # Set guest name inside config + echo "xenguest-mkimage update ${XENGUEST_CONF_BASE}/guests/${guestname}" \ + "--xen-name=${guestname}" >> ${LOGFILE} 2>&1 + xenguest-mkimage update ${XENGUEST_CONF_BASE}/guests/${guestname} \ + --xen-name=${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error setting guest name" + exit 1 + fi + + xenguest_disk_init ${guestname} ${guestfile} +} + +function xenguest_guest_remove() +{ + guestname="$1" + devname="/dev/${XENGUEST_VOLUME_NAME}/${guestname}" + + # check if guest had a volume + echo "lvs ${XENGUEST_VOLUME_NAME}/${guestname}" >> ${LOGFILE} 2>&1 + lvs ${XENGUEST_VOLUME_NAME}/${guestname} >> ${LOGFILE} 2>&1 + if [ $? -eq 0 ]; then + # Remove guest volume + echo "lvremove -y ${devname}" >> ${LOGFILE} 2>&1 + lvremove -y ${devname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error removing volume ${guestname}" + exit 1 + fi + fi + + # remove guest files + rm -rf ${XENGUEST_CONF_BASE}/guests/${guestname} +} + +function xenguest_guest_start() +{ + guestname="${1}" + guestdir=${XENGUEST_CONF_BASE}/guests/${guestname} + + # Get guest configuration + source ${guestdir}/params.cfg + + pushd ${guestdir} > /dev/null 2>&1 + + # create config by merging all configurations together + cat guest.cfg $(find guest.d -type f 2> /dev/null) > ${guestname}.cfg + + # Build init script lists (ignore non existing dirs errors, + # sort alphabetically and run global scripts first) + init_pre="$(find ${XENGUEST_CONF_BASE}/init.pre -type f 2> /dev/null | \ + sort) $(find ${guestdir}/init.pre -type f 2> /dev/null | sort)" + init_d="$(find ${XENGUEST_CONF_BASE}/init.d -type f 2> /dev/null | \ + sort) $(find ${guestdir}/init.d -type f 2> /dev/null | sort)" + init_post="$(find ${XENGUEST_CONF_BASE}/init.post -type f 2> /dev/null | \ + sort) $(find ${guestdir}/init.post -type f 2> /dev/null | sort)" + + # call pre init scripts + for f in ${init_pre}; do + echo "$f ${guestname}" >> ${LOGFILE} 2>&1 + $f ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + rm -f ${guestname}.cfg + popd > /dev/null 2>&1 + echo "${PREF} Error during pre init script of ${guestname}" + exit 1 + fi + done + + # Create non started guest + echo "xl create -p ${guestname}.cfg" >> ${LOGFILE} 2>&1 + xl create -p ${guestname}.cfg >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + rm -f ${guestname}.cfg + popd > /dev/null 2>&1 + echo "${PREF} Error starting ${guestname}" + exit 1 + fi + + # call init scripts + for f in ${init_d}; do + echo "$f ${guestname}" >> ${LOGFILE} 2>&1 + $f ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + rm -f ${guestname}.cfg + echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1 + xl destroy ${guestname} >> ${LOGFILE} 2>&1 + popd > /dev/null 2>&1 + echo "${PREF} Error during init script of ${guestname}" + exit 1 + fi + done + + # Start guest + echo "xl unpause ${guestname}" >> ${LOGFILE} 2>&1 + xl unpause ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + rm -f ${guestname}.cfg + popd > /dev/null 2>&1 + echo "${PREF} Error starting ${guestname}" + exit 1 + fi + + # call post init scripts + for f in ${init_post}; do + echo "$f ${guestname}" >> ${LOGFILE} 2>&1 + $f ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + rm -f ${guestname}.cfg + echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1 + xl destroy ${guestname} >> ${LOGFILE} 2>&1 + popd > /dev/null 2>&1 + echo "${PREF} Error during post init script of ${guestname}" + exit 1 + fi + done + + rm -f ${guestname}.cfg + popd > /dev/null 2>&1 +} + +function xenguest_guest_stop() +{ + guestname="${1}" + echo "xl shutdown ${guestname}" >> ${LOGFILE} 2>&1 + xl shutdown ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error stopping ${guestname}" + exit 1 + fi +} + +function check_guest_arg() +{ + cmd="${1}" + guestname="${2:-}" + if [ -z "${guestname:-}" ]; then + echo "${PREF} Usage ${this} ${cmd} GUESTNAME" + exit 1 + fi +} + +function check_guest_exist() +{ + guestname="${1}" + if [ ! -f ${XENGUEST_CONF_BASE}/guests/${guestname}/guest.cfg -o \ + ! -f ${XENGUEST_CONF_BASE}/guests/${guestname}/params.cfg ]; then + echo "${PREF} Invalid guest name: ${guestname}" + exit 1 + fi +} + +function check_guest_running() +{ + guestname="${1}" + running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" || echo) + if [ ! "${running}" = "${guestname}" ]; then + echo "${PREF} Guest ${guestname} is not running" + exit 1 + fi +} + +function check_guest_not_running() +{ + guestname="${1}" + running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" || echo) + if [ "${running}" = "${guestname}" ]; then + echo "${PREF} Guest ${guestname} is running" + exit 1 + fi +} + +cmd="${1:-help}" +arg1="${2:-}" +arg2="${3:-}" + +case ${cmd} in + help|--help|-h|-?) + usage + exit 0 + ;; + create) + guestfile="${arg1}" + guestname="${arg2}" + if [ -z "${guestfile}" -o ! -f "${guestfile}" ]; then + echo "${PREF} Usage ${this} create XENGUEST_FILE [NAME]" + exit 1 + fi + if [ -z "${guestname}" ]; then + guestname=$(basename ${guestfile} .xenguest) + fi + + if [ -f ${XENGUEST_CONF_BASE}/guests/${guestname}/guest.cfg ]; then + # Guest already exist + echo "${PREF} A guest ${guestname} already exist" + exit 1 + fi + + xenguest_guest_create ${guestfile} ${guestname} + ;; + remove) + guestname="${arg1:-}" + check_guest_arg ${cmd} ${guestname} + check_guest_exist ${guestname} + # We need to stop the guest first + running=$(xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" \ + || echo) + if [ "${running}" = "${guestname}" ]; then + echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1 + xl destroy ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error killing ${guestname}" + exit 1 + fi + fi + xenguest_guest_remove ${guestname} + ;; + start) + guestname="${arg1:-}" + check_guest_arg ${cmd} ${guestname} + check_guest_exist ${guestname} + check_guest_not_running ${guestname} + xenguest_guest_start ${guestname} + ;; + stop|shutdown) + guestname="${arg1:-}" + check_guest_arg ${cmd} ${guestname} + check_guest_exist ${guestname} + check_guest_running ${guestname} + xenguest_guest_stop ${guestname} + ;; + kill|destroy) + guestname="${arg1:-}" + check_guest_arg ${cmd} ${guestname} + check_guest_exist ${guestname} + check_guest_running ${guestname} + echo "xl destroy ${guestname}" >> ${LOGFILE} 2>&1 + xl destroy ${guestname} >> ${LOGFILE} 2>&1 + if [ $? -ne 0 ]; then + echo "${PREF} Error killing ${guestname}" + exit 1 + fi + ;; + list) + if [ -d ${XENGUEST_CONF_BASE}/guests ]; then + for f in $(find ${XENGUEST_CONF_BASE}/guests -mindepth 1 \ + -maxdepth 1 -type d -exec basename {} \;); do + if [ -f ${XENGUEST_CONF_BASE}/guests/$f/guest.cfg ]; then + echo "$f" + fi + done + fi + ;; + status) + guestname="${arg1}" + if [ -n "${guestname}" ]; then + check_guest_exist ${guestname} + if xl list | awk 'NR > 1 {print $1}' | grep "${guestname}" > \ + /dev/null 2>&1; then + echo "${guestname}: Running" + else + echo "${guestname}: Stopped" + fi + else + guestlist=$($this list) + if [ -n "${guestlist}" ]; then + for f in ${guestlist}; do + $this status $f + done + fi + fi + ;; + *) + echo "${PREF} Invalid argument ${cmd}" + exit 1 + ;; +esac + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-mkimage b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-mkimage new file mode 100755 index 00000000..4c1b4a87 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-mkimage @@ -0,0 +1,772 @@ +#!/bin/bash +# This script must be used to manipulate xenguest images +# +# xenguest image topology: +# params.cfg: guest global configuration file. Only edited using this script. +# guest.cfg: xen main configuration file. Only edited using this script. +# guest.d: directory contains files with custom xen configuration entries +# which are appended to guest.cfg before starting the guest +# files: directory where files used by xen configuration are stored +# disk.cfg: guest disk configuration file. Only edited using this script. +# (dtb, kernel image, etc) +# disk: directory where files for disk creation are stored +# init.[pre,d,post]: directories containing init pre, base and post scripts +set -u +set -e + +this="$0" + +IMAGE_TMPDIR="" + +usage() { + cat < /dev/null 2>&1 || echo "error") + if [ -n "${res}" ]; then + echo "Error: File ${tstfile} is not a valid xenguest" + exit 1 + fi + elif [ -d ${tstfile} ]; then + if [ ! -f ${tstfile}/guest.cfg -o ! -f ${tstfile}/disk.cfg -o \ + ! ${tstfile}/params.cfg ]; then + echo "Error: Directory ${tstfile} is not a valid xenguest" + exit 1 + fi + fi +} + +params_config_reset() { + cat < ${IMAGE_TMPDIR}/params.cfg +# Xenguest-image guest global configuration +# +# !! This file must not be modified manually !! +# +# You can use xenguest-image to modify parameters. +# + +# Guest auto boot during Dom0 init +GUEST_AUTOBOOT="1" +EOF +} + +params_config_setparam() { + param="${1}" + shift + value="$@" + + if [ -z "$value" ]; then + sed -i "/.*${param}=.*/d" ${IMAGE_TMPDIR}/params.cfg + elif grep -e "^${param}=" ${IMAGE_TMPDIR}/params.cfg > /dev/null; then + sed -i "s/${param}=\".*\"/${param}=\"${value}\"/" \ + ${IMAGE_TMPDIR}/params.cfg + else + echo "${param}=\"${value}\"" >> ${IMAGE_TMPDIR}/params.cfg + fi +} + +xen_config_reset() { + cat < ${IMAGE_TMPDIR}/guest.cfg +# Xenguest-image main configuraiton +# +# !! This file must not be modified manually !! +# +# You can use xenguest-image to modify parameters. +# +# You can add custom entries to configuration in the guest.d directory. + +# Guest name (set by manager when guest is created) +# name = "" + +# Guest memory size in MB +memory = 1024 + +# Number of VCPUS +vcpus = 1 + +# Guest command line +extra = "earlyprintk=xenboot console=hvc0 rw" + +# Guest root filesystem device (from guest point of view) +# root = "/dev/xvda2" + +# Disk that will be used by the guest (set by manager when guest is created) +# disk = ['phy:/dev/vg-xen/guestname,xvda,w'] + +EOF +} + +get_param_file() { + param="${1}" + + if grep ${param} ${IMAGE_TMPDIR}/guest.cfg > /dev/null 2>&1; then + echo "${IMAGE_TMPDIR}/guest.cfg" + else + if [ ! -f ${IMAGE_TMPDIR}/guest.d/${param}.cfg ]; then + mkdir -p ${IMAGE_TMPDIR}/guest.d + echo "# ${param} = \"\"" > ${IMAGE_TMPDIR}/guest.d/${param}.cfg + fi + echo "${IMAGE_TMPDIR}/guest.d/${param}.cfg" + fi +} + +xen_config_disable_param() { + param="${1}" + dst=$(get_param_file ${param}) + + sed -i "s@.*\(${param} = .*\)\$@# \1@" ${dst} +} + +xen_config_set_number() { + param="${1}" + shift + value="$@" + dst=$(get_param_file ${param}) + + sed -i "s@.*${param} = .*@${param} = ${value}@" ${dst} +} + +xen_config_set_string() { + param="${1}" + shift + value="$@" + dst=$(get_param_file ${param}) + + sed -i "s@.*${param} = .*@${param} = \"${value}\"@" ${dst} +} + +xen_config_append_string() { + param="${1}" + shift + value="$@" + dst=$(get_param_file ${param}) + + sed -i "s@.*${param} = \"\([^\"]*\)\"@${param} = \"\1 ${value}\"@" ${dst} +} + +xen_config_set_list() { + param="${1}" + shift + value=$(echo $@ | tr " " ",") + dst=$(get_param_file ${param}) + + sed -i "s@.*${param} = .*@${param} = ['${value}']@" ${dst} +} + +disk_config_reset() { + echo "DISK_SIZE=\"0\"" > ${IMAGE_TMPDIR}/disk.cfg + echo "DISK_DEVICE=\"\"" >> ${IMAGE_TMPDIR}/disk.cfg +} + +disk_config_rm_part() { + partid=$1 + sed -i "/DISK_PART${partid}=.*/d" ${IMAGE_TMPDIR}/disk.cfg +} + +disk_config_add_part() { + partconf="${1}" + partid=$(echo ${partconf} | sed -e "s/:.*//") + partinfo=$(echo ${partconf} | sed -e "s/[^:]*://") + + # Make sure we don't add the same partition twice + disk_config_rm_part ${partid} + echo "DISK_PART${partid}=\"${partinfo}\"" >> \ + ${IMAGE_TMPDIR}/disk.cfg +} + +# We need an action as first argument +action="${1:-}" + +if [ -z "${action}" ]; then + echo "Error: No ACTION provided" + usage + exit 1 +fi + +# Only help does not require a xenguest argument so treat this first +# while there we also check that user is asking for a supported action +case $action in + help|--help|-h|-?) + usage + exit 0 + ;; + check|create|update|pack|partial) + ;; + dump-xenconfig|dump-diskconfig|dump-init|dump-paramsconfig) + ;; + extract|extract-config|extract-disk-file) + ;; + *) + echo "Error: Invalid action $action" + exit 1 + ;; +esac + +# Second argument should be the file name or directory +guestfile="${2:-}" + +# Handle user asking for help on a specific action +case $guestfile in + help|--help|-h|-?) + usage-${action} + exit 0 + ;; +esac + +if [ -z "${guestfile}" ]; then + echo "Error: no GUESTFILE provided" + usage + exit 1 +fi + +shift 2 + +case ${action} in + check) + check_image ${guestfile} + echo "Image is OK" + exit 0 + ;; + dump-paramsconfig) + check_image ${guestfile} + echo "Guest configuration:" + if [ -f ${guestfile} ]; then + tar -xOf ${guestfile} ./params.cfg + else + cat ${guestfile}/params.cfg + fi + exit 0 + ;; + dump-xenconfig) + check_image ${guestfile} + echo "Xen configuration:" + if [ -f ${guestfile} ]; then + tar -xOf ${guestfile} ./guest.cfg + tar -xOf ${guestfile} ./guest.d 2> /dev/null || true + else + cat ${guestfile}/guest.cfg + cat ${guestfile}/guest.d/* 2> /dev/null || true + fi + echo + exit 0 + ;; + dump-diskconfig) + check_image ${guestfile} + echo "Disk configuration:" + if [ -f ${guestfile} ]; then + tar -xOf ${guestfile} ./disk.cfg + else + cat ${guestfile}/disk.cfg + fi + echo + exit 0 + ;; + dump-init) + check_image ${guestfile} + for init in init.d init-pre init-post; do + echo "=== ${init} ===" + if [ -f ${guestfile} ]; then + tar -xOf ${guestfile} ./${init} 2> /dev/null || \ + echo "No ${init} scripts." + else + cat ${guestfile}/${init}/* 2> /dev/null || \ + echo "No ${init} scripts." + fi + echo "===============" + echo + done + exit 0 + ;; + pack) + check_image ${guestfile} + if [ ! -d ${guestfile} ]; then + echo "Error: Pack can only be done on a xenguest directory" + exit 1 + fi + + if [ -z "${1:-}" ] || [ -f ${1} ]; then + echo "Error: No destination file or already existing file" + exit 1 + fi + + tar -C ${guestfile} -cf ${1} . + exit 0 + ;; + extract) + check_image ${guestfile} + if [ -d ${guestfile} ]; then + echo "Error: Cannot extract config from xenguest directory" + exit 1 + fi + + if [ -z "${1:-}" ] || [ ! -d ${1} ]; then + echo "Error: No destination directory for image extract" + exit 1 + fi + + tar -C ${1} -xf ${guestfile} + exit 0 + ;; + extract-config) + check_image ${guestfile} + if [ -d ${guestfile} ]; then + echo "Error: Cannot extract config from xenguest directory" + exit 1 + fi + + if [ -z "${1:-}" ] || [ ! -d ${1} ]; then + echo "Error: No destination directory for config extract" + exit 1 + fi + + #extract all but disk files + tar -C ${1} --exclude='./disk' -xf ${guestfile} + exit 0 + ;; + extract-disk-file) + check_image ${guestfile} + + if [ -d ${guestfile} ]; then + echo "Error: Cannot extract disk file from xenguest directory" >&2 + exit 1 + fi + + if [ -z "${1:-}" ]; then + echo "Error: No file to extract" >&2 + exit 1 + fi + + tar -xOf ${guestfile} ./disk/${1} + exit 0 + ;; + create) + if [ -f ${guestfile} ]; then + echo "Error: File ${guestfile} already exist" + exit 1 + elif [ -d ${guestfile} ]; then + if [ -n "$(ls -A ${guestfile})" ]; then + echo "Error: Directory ${guestfile} is not empty" + exit 1 + fi + IMAGE_TMPDIR=$(realpath -m ${guestfile}) + else + IMAGE_TMPDIR=$(mktemp -d) + fi + + # Create initial content + params_config_reset + xen_config_reset + disk_config_reset + ;; + update) + check_image ${guestfile} + + if [ -f ${guestfile} ]; then + # Extract the image to update it + IMAGE_TMPDIR=$(mktemp -d) + tar -C ${IMAGE_TMPDIR} -xf ${guestfile} + else + IMAGE_TMPDIR=$(realpath -m ${guestfile}) + fi + ;; + partial) + if [ -e ${guestfile} -a ! -d ${guestfile} ]; then + echo "Error: Invalid partial output directory" + exit 1 + fi + mkdir -p ${guestfile} + IMAGE_TMPDIR=$(realpath -m ${guestfile}) + ;; + *) + echo "Invalid action ${action}" + usage + exit 1 + ;; +esac + +# Process command line arguments +for arg in "${@}"; do + case ${arg} in + --*=*) + optarg=$(echo ${arg} | sed -e "s/[^=]*=//") + ;; + *) + optarg="" + ;; + esac + + case ${arg} in + --guest-reset-config) + params_config_reset + ;; + --set-param=*=*) + param_name=$(echo $optarg | sed -e "s/=.*//") + param_value=$(echo $optarg | sed -e "s/[^=]*=//") + params_config_setparam "$param_name" "$param_value" + ;; + --set-param=*) + params_config_setparam "$optarg" + ;; + --xen-reset-config) + xen_config_create + ;; + --xen-name=*) + if [ -z "${optarg}" ]; then + xen_config_disable_param "name" + else + xen_config_set_string "name" "${optarg}" + fi + ;; + --xen-kernel=*) + if [ -z "${optarg}" ]; then + xen_config_disable_param "kernel" + rm -f ${IMAGE_TMPDIR}/files/kernel + else + if [ ! -f ${optarg} ]; then + echo "Error: invalid kernel file ${optarg}" + exit 1 + fi + xen_config_set_string "kernel" "files/kernel" + mkdir -p ${IMAGE_TMPDIR}/files + install -m 644 ${optarg} ${IMAGE_TMPDIR}/files/kernel + fi + ;; + --xen-memory=*) + xen_config_set_number "memory" ${optarg} + ;; + --xen-vcpus=*) + xen_config_set_number "vcpus" ${optarg} + ;; + --xen-clean-extra) + xen_config_set_string "extra" "" + ;; + --xen-extra=*) + xen_config_append_string "extra" ${optarg} + ;; + --xen-root=*) + if [ -z "${optarg}" ]; then + xen_config_disable_param "root" + else + xen_config_set_string "root" "${optarg}" + fi + ;; + --xen-device-tree=*) + if [ -z "${optarg}" ]; then + xen_config_disable_param "device_tree" + rm -f ${IMAGE_TMPDIR}/files/guest.dtb + else + if [ ! -f ${optarg} ]; then + echo "Error: invalid dtb file ${optarg}" + exit 1 + fi + xen_config_set_string "device_tree" "files/guest.dtb" + mkdir -p ${IMAGE_TMPDIR}/files + install -m 644 ${optarg} ${IMAGE_TMPDIR}/files/guest.dtb + fi + ;; + --xen-disk=*) + if [ -z "${optarg}" ]; then + xen_config_disable_param "disk" + else + xen_config_set_list "disk" "phy:${optarg}" "xvda" "w" + fi + ;; + --xen-append=*) + if [ ! -f ${optarg} ]; then + echo "Error: invalid xen append file ${optarg}" + exit 1 + fi + mkdir -p ${IMAGE_TMPDIR}/guest.d + install -m 755 ${optarg} ${IMAGE_TMPDIR}/guest.d/. + ;; + --xen-add-file=*) + src=$(echo "${optarg}" | sed -e "s/:.*//") + dst=$(echo "${optarg}" | sed -e "s/.*://") + if [ ! -f ${src} ]; then + echo "Error: Invalid file: ${src}" + rm -rf ${IMAGE_TMPDIR} + exit 1 + fi + if [ -z "${dst}" ]; then + dst=$(basename ${src}) + fi + mkdir -p ${IMAGE_TMPDIR}/files/$(dirname ${dst}) + cp -f ${src} ${IMAGE_TMPDIR}/files/${dst} + ;; + --xen-rm-file=*) + rm -f ${IMAGE_TMPDIR}/files/${optarg} + ;; + --init-script=*|--init-pre=*|--init-post=*) + dst="" + case $arg in + --init-script=*) + dst="init.d" + ;; + --init-pre=*) + dst="init.pre" + ;; + --init-post=*) + dst="init.post" + ;; + esac + if [ ! -f ${optarg} ]; then + echo "${optarg} does not point to a valid file" + exit 1 + else + mkdir -p ${IMAGE_TMPDIR}/${dst} + install -m 755 ${optarg} ${IMAGE_TMPDIR}/${dst}/. + fi + ;; + --disk-reset-config) + disk_config_reset + ;; + --disk-size=*) + sed -i "s/DISK_SIZE=.*/DISK_SIZE=\"${optarg}\"/" \ + ${IMAGE_TMPDIR}/disk.cfg + ;; + --disk-device=*) + sed -i "s/DISK_DEVICE=.*/DISK_SIZE=\"${optarg}\"/" \ + ${IMAGE_TMPDIR}/disk.cfg + ;; + --disk-add-part=*) + disk_config_add_part ${optarg} + ;; + --disk-rm-part=*) + disk_config_rm_part ${optarg} + ;; + --disk-add-file=*) + src=$(echo "${optarg}" | sed -e "s/:.*//") + dst=$(echo "${optarg}" | sed -e "s/.*://") + if [ ! -f ${src} ]; then + echo "Error: Invalid disk file: ${src}" + rm -rf ${IMAGE_TMPDIR} + exit 1 + fi + if [ -z "${dst}" ]; then + dst=$(basename ${src}) + fi + mkdir -p ${IMAGE_TMPDIR}/disk/$(dirname ${dst}) + cp -f ${src} ${IMAGE_TMPDIR}/disk/${dst} + ;; + --disk-rm-file=*) + rm -f ${IMAGE_TMPDIR}/disk/${optarg} + ;; + *) + echo "Unsupported command: ${arg}" + exit 1 + ;; + esac +done + +if [ ! -d ${guestfile} ]; then + # If the original guest was in a file we need to repack the file + # with the changes we did on it in the IMAGE_TMPDIR + rm -f ${guestfile} + tar -C ${IMAGE_TMPDIR} -cf ${guestfile} . + rm -rf ${IMAGE_TMPDIR} +fi + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in new file mode 100644 index 00000000..6e063793 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge-dhcp.cfg.in @@ -0,0 +1,3 @@ +# Xenguest Network Bridge interface configuration +auto ###BRIDGE_NAME### +iface ###BRIDGE_NAME### inet dhcp diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge.in b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge.in new file mode 100755 index 00000000..2278b80c --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-network-bridge.in @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Xenguest Network Bridge init +# This script creates a network bridge and add host interfaces to it +# It will then be used by xen guests to connect to the external nework +# + +INTFS="###BRIDGE_MEMBERS###" +BR_INTF="###BRIDGE_NAME###" + +case "$1" in + start) + echo "Starting $BR_INTF" + brctl addbr $BR_INTF + for intf in $INTFS; do + echo "Adding $intf to $BR_INTF" + brctl addif $BR_INTF $intf + done + ;; + status) + true + ;; + stop) + echo "Stopping $BR_INTF" + ifdown $BR_INTF + brctl delbr $BR_INTF + ;; + reload) + echo >&2 'Reload not available; use force-reload'; exit 1 + ;; + force-reload|restart) + echo "Restarting host-bridge" + $0 stop + $0 start + ;; + *) + # do not advertise unreasonable commands that there is no reason + # to use with this device + echo $"Usage: $0 {start|stop|status|restart|force-reload}" + exit 1 +esac + +exit $? + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-base-image.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-base-image.bb new file mode 100644 index 00000000..fb665666 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-base-image.bb @@ -0,0 +1,119 @@ +# Create a xenguest base image +# +# This recipe creates a base image that is then extended by other recipes +# through xenguest-image class. +# xenguest image type is using this as base to add a kernel and a disk image +# to create a guest +# +# The recipe is also adding files in those directories to the xenguest image: +# - ${WORKDIR}/extend/disk-files: all files in this directory will be added to +# the guest disk files (using --disk-add-file) +# - ${WORKDIR}/extend/files: all files in this directory will be added to the +# guest xen files (using --xen-add-file) +# - ${WORKDIR}/extend/guest.d: all files in this directory will be added to +# the xen append configuration files (using --xen-append) +# - ${WORKDIR}/extend/init.[pre|post|d]: all files in those directories will +# be added to the corresponding init scripts (using --init-[pre|post|script]) +# You can bbappend this recipe and put files in ${WORKDIR}/extend to add +# elements to the image. +# + +DESCRIPTION = "Xenguest Base Image" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +# +# The following variables can contain SRC_URI compatible entries to add +# files to the xenguest image. +# You can set those variable in local.conf to add one or several files +# For example to add a boot.tar.gz file that has to be downloaded to the file +# useable for disk partition initialisation: +# XENGUEST_IMAGE_SRC_URI_DISK_FILES += "https://www.test.com/files/boot.tar.gz" + +# Add disk files +XENGUEST_IMAGE_SRC_URI_DISK_FILES ??= "" + +# Add xen files +XENGUEST_IMAGE_SRC_URI_XEN_FILES ??= "" + +# Add xen configuration elements +XENGUEST_IMAGE_SRC_URI_XEN_CONFIG ??= "" + +# Add pre init script +XENGUEST_IMAGE_SRC_URI_INIT_PRE ??= "" + +# Add init script +XENGUEST_IMAGE_SRC_URI_INIT ??= "" + +# Add post init script +XENGUEST_IMAGE_SRC_URI_INIT_POST ??= "" + +S = "${WORKDIR}" + +inherit deploy xenguest-image + +# parse XENGUEST_IMAGE_SRC_URI_ variables and add them to SRC_URI +python __anonymous() { + def parse_extend_variable(d, varname, destdir): + list = d.getVar(varname) + if list: + for entry in list.split(): + #Check the URL + try: + decode = bb.fetch.decodeurl(entry) + d.appendVar('SRC_URI', ' ' + entry + ';unpack=0;subdir=extend/' + destdir) + except: + bb.fatal("%s: %s contains an invalid URL: %s" \ + % (d.getVar('PF'), varname, entry)) + + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_DISK_FILES', 'disk-files') + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_XEN_FILES', 'files') + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_XEN_CONFIG', 'guest.d') + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT_PRE', 'init.pre') + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT', 'init.d') + parse_extend_variable(d, 'XENGUEST_IMAGE_SRC_URI_INIT_POST', 'init.post') +} + +# Make sure we are removing old files before redoing a fetch +do_fetch[cleandirs] += "${WORKDIR}/extend" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" + +add_extend_files() { + local subdir="$1" + local cmd="$2" + local stripdest="${3:-n}" + + if [ -d ${WORKDIR}/extend/$subdir ]; then + filelist=$(find ${WORKDIR}/extend/$subdir -type f) + + if [ -n "$filelist" ]; then + for f in $filelist; do + if [ "$stripdest" = "y" ]; then + call_xenguest_mkimage update --$cmd=$f:$(basename $f) + else + call_xenguest_mkimage update --$cmd=$f + fi + done + fi + fi +} + +do_deploy() { + # Create a new image + xenguest_image_create + + # Add our extra files if any + add_extend_files "disk-files" "disk-add-file" "y" + add_extend_files "files" "xen-add-file" "y" + add_extend_files "guest.d" "xen-append" + add_extend_files "init.pre" "init-pre" + add_extend_files "init.d" "init-script" + add_extend_files "init.post" "init-post" +} + +addtask deploy after do_install before do_build + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb new file mode 100644 index 00000000..65925d2a --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb @@ -0,0 +1,52 @@ +# Xenguest manager recipe +# +# xenguest-manager is a tool to control xen guest (e.g. create, start, stop) +# + +DESCRIPTION = "Xen Guest Manager" +LICENSE = "MIT" + +SRC_URI = " \ + file://xenguest-manager \ + file://xenguest-init \ + " +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +S = "${WORKDIR}" + +# Please refer to documentation/xenguest-manager.md for documentation on those +# parameters +XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda2" +XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen" +XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/" + +# We add an init script to create and start guests automatically +INITSCRIPT_NAME = "xenguest" +INITSCRIPT_PARAMS = "defaults 90" + +inherit update-rc.d + +do_compile() { + echo "XENGUEST_VOLUME_DEVICE=\"${XENGUEST_MANAGER_VOLUME_DEVICE}\"" > \ + xenguest-manager.conf + echo "XENGUEST_VOLUME_NAME=\"${XENGUEST_MANAGER_VOLUME_NAME}\"" >> \ + xenguest-manager.conf + echo "XENGUEST_GUEST_DIR=\"${XENGUEST_MANAGER_GUEST_DIR}\"" >> \ + xenguest-manager.conf +} + +do_install() { + install -d -m 755 ${D}${bindir} + install -m 755 xenguest-manager ${D}${bindir}/. + install -d -m 755 ${D}${sysconfdir}/xenguest + install -m 644 xenguest-manager.conf ${D}${sysconfdir}/xenguest/. + install -d -m 755 ${D}${sysconfdir}/init.d + install -m 755 xenguest-init ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + install -d -m 755 ${D}${XENGUEST_GUEST_DIR} +} + +# Things that we need on the target +RDEPENDS_${PN} += "bash tar xenguest-mkimage lvm2 xen-tools parted e2fsprogs" + +FILES_${PN} += "${bindir}/xenguest-manager \ + ${sysconfdir}/xenguest" diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-mkimage.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-mkimage.bb new file mode 100644 index 00000000..6ea5fb10 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-mkimage.bb @@ -0,0 +1,31 @@ +# Xenguest mkimage recipe +# +# xenguest-mkimage is a tool to create/modify images to be used as xen guests +# Produced images contains a xen configuration and several optional components +# (kernel, device-tree, disk definition and files, init scripts) which all +# together fully define a full xen guest + +DESCRIPTION = "Xenguest mkimage tool" +LICENSE = "MIT" + +SRC_URI = "file://xenguest-mkimage" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +S = "${WORKDIR}" + +# Can be built native also to produce xenguest images during Yocto build +BBCLASSEXTEND = "native" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d -m 755 ${D}${bindir} + install -m 755 xenguest-mkimage ${D}${bindir}/. +} + +# We need bash and tar +RDEPENDS_${PN} = "bash tar" +FILES_${PN} = "${bindir}/xenguest-mkimage" + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-network-bridge.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-network-bridge.bb new file mode 100644 index 00000000..babd694d --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-network-bridge.bb @@ -0,0 +1,52 @@ +# Recipe to handle xenguest network configuration +DESCRIPTION = "XenGuest Network Bridge" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +S = "${WORKDIR}" + +# Please refer to documentation/xenguest-network-bridge.md for documentation on +# those parameters +XENGUEST_NETWORK_BRIDGE_NAME ?= "xenbr0" +XENGUEST_NETWORK_BRIDGE_MEMBERS ?= "eth0" +XENGUEST_NETWORK_BRIDGE_CONFIG ?= "xenguest-network-bridge-dhcp.cfg.in" + +SRC_URI = " \ + file://xenguest-network-bridge.in \ + file://xenguest-network-bridge-dhcp.cfg.in \ + file://network-bridge.sh.in \ + " + +# Bridge configurator needs to run before S01networking init script +# Prefix with a_ to make sure it is executed in runlevel 01 before others +INITSCRIPT_NAME = "a_xenguest-network-bridge" +INITSCRIPT_PARAMS = "defaults 01" + +inherit update-rc.d + +do_install() { + cat ${WORKDIR}/xenguest-network-bridge.in \ + | sed -e "s,###BRIDGE_MEMBERS###,${XENGUEST_NETWORK_BRIDGE_MEMBERS}," \ + | sed -e "s,###BRIDGE_NAME###,${XENGUEST_NETWORK_BRIDGE_NAME}," \ + > ${WORKDIR}/xenguest-network-bridge + cat ${WORKDIR}/${XENGUEST_NETWORK_BRIDGE_CONFIG} \ + | sed -e "s,###BRIDGE_NAME###,${XENGUEST_NETWORK_BRIDGE_NAME}," \ + > ${WORKDIR}/xenguest-network-bridge.cfg + cat ${WORKDIR}/network-bridge.sh.in \ + | sed -e "s,###BRIDGE_NAME###,${XENGUEST_NETWORK_BRIDGE_NAME}," \ + > ${WORKDIR}/network-bridge.sh + install -d -m 755 ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/xenguest-network-bridge \ + ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + install -d -m 755 ${D}${sysconfdir}/network/interfaces.d + install -m 755 ${WORKDIR}/xenguest-network-bridge.cfg \ + ${D}${sysconfdir}/network/interfaces.d/. + install -d -m 755 ${D}${sysconfdir}/xenguest/init.pre + install -m 755 ${WORKDIR}/network-bridge.sh \ + ${D}${sysconfdir}/xenguest/init.pre/. +} + +RDEPENDS_${PN} += "bridge-utils" +FILES_${PN} += "${sysconfdir}/network/interfaces.d/xenguest-network-bridge.cfg" +FILES_${PN} += "${sysconfdir}/xenguest/init.pre/network-bridge.sh" diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-nodisk-image.bb b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-nodisk-image.bb new file mode 100644 index 00000000..b2dbbe99 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-extended/xenguest/xenguest-nodisk-image.bb @@ -0,0 +1,38 @@ +# Create a xenguest image with kernel but no rootfs or an external rootfs +DESCRIPTION = "Xenguest No Disk Image" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +S = "${WORKDIR}" + +inherit deploy xenguest-image + +# Name of the file we create in deploy +XENGUEST_IMAGE_NODISK_DEPLOY = "xenguest-nodisk-image.xenguest" + +# use a local copy to pack all together +XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" + +do_deploy() { + xenguest_image_clone + + # Add kernel to the image + if [ -n "${XENGUEST_IMAGE_KERNEL}" ]; then + call_xenguest_mkimage partial \ + --xen-kernel=${DEPLOY_DIR_IMAGE}/${XENGUEST_IMAGE_KERNEL} + fi + + # Pack and deploy the final image + rm -f ${DEPLOYDIR}/${XENGUEST_IMAGE_NODISK_DEPLOY} + call_xenguest_mkimage pack ${DEPLOYDIR}/${XENGUEST_IMAGE_NODISK_DEPLOY} +} +do_deploy[depends] += "virtual/kernel:do_deploy" +do_deploy[depends] += "xenguest-base-image:do_deploy" + +addtask deploy before do_build after do_install + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest-standard.scc b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest-standard.scc new file mode 100644 index 00000000..7c75d99f --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest-standard.scc @@ -0,0 +1,5 @@ +define KMACHINE arm64-autonomy-guest +define KTYPE standard +define KARCH arm64 + +include arm64-autonomy-guest.scc diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.cfg b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.cfg new file mode 100644 index 00000000..fcdad985 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.cfg @@ -0,0 +1,2 @@ +CONFIG_ARM64=y +CONFIG_SMP=y diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.scc b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.scc new file mode 100644 index 00000000..e887b4e5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/bsp/arm-autonomy/arm64-autonomy-guest.scc @@ -0,0 +1,6 @@ +include ktypes/standard/standard.scc +include features/input/input.scc +include features/net/net.scc +include cfg/timer/no_hz.scc + +kconf hardware arm64-autonomy-guest.cfg diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.cfg b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.cfg new file mode 100644 index 00000000..e4e44a9c --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.cfg @@ -0,0 +1,54 @@ +CONFIG_PARAVIRT=y +CONFIG_XEN=y + +CONFIG_BLOCK=y +CONFIG_XEN_BLKDEV_FRONTEND=y + +CONFIG_SCSI=y +CONFIG_XEN_SCSI_FRONTEND=y + +CONFIG_NET=y +CONFIG_XEN_NETDEV_FRONTEND=y + +CONFIG_INPUT=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y + +CONFIG_HVC_IRQ=y + +CONFIG_HVC_XEN=y +CONFIG_HVC_XEN_FRONTEND=y + +CONFIG_WATCHDOG=y +CONFIG_XEN_WDT=y + +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_FB_DEFERRED_IO=y +CONFIG_XEN_FBDEV_FRONTEND=y + +CONFIG_XEN_BALLOON=y + +CONFIG_XEN_DEV_EVTCHN=y + +CONFIG_XENFS=y +CONFIG_XEN_COMPAT_XENFS=y + +CONFIG_XEN_SYS_HYPERVISOR=y +CONFIG_XEN_XENBUS_FRONTEND=y +CONFIG_XEN_GNTDEV=y +CONFIG_XEN_GRANT_DEV_ALLOC=y +CONFIG_SWIOTLB_XEN=y + +CONFIG_XEN_EFI=y +CONFIG_XEN_AUTO_XLATE=y + +CONFIG_DRM=y +CONFIG_DRM_XEN=y +CONFIG_DRM_XEN_FRONTEND=y + +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_XEN_FRONTEND=y diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.scc b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.scc new file mode 100644 index 00000000..935e78f8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-guest.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable XEN Guest Frontend Drivers" + +kconf non-hardware xen-guest.cfg + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg new file mode 100644 index 00000000..d457cb84 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.cfg @@ -0,0 +1,38 @@ +CONFIG_PARAVIRT=y +CONFIG_XEN=y + +CONFIG_BLOCK=y +CONFIG_XEN_BLKDEV_BACKEND=y + +CONFIG_SCSI=y +CONFIG_TARGET_CORE=y +CONFIG_XEN_SCSI_BACKEND=y + +CONFIG_NET=y +CONFIG_XEN_NETDEV_BACKEND=y + +CONFIG_HVC_IRQ=y + +CONFIG_HVC_XEN=y + +CONFIG_WATCHDOG=y +CONFIG_XEN_WDT=y + +CONFIG_XEN_BALLOON=y + +CONFIG_XEN_DEV_EVTCHN=y + +CONFIG_XENFS=y +CONFIG_XEN_COMPAT_XENFS=y + +CONFIG_XEN_SYS_HYPERVISOR=y +CONFIG_XEN_GNTDEV=y +CONFIG_XEN_GRANT_DEV_ALLOC=y +CONFIG_SWIOTLB_XEN=y + +CONFIG_XEN_EFI=y +CONFIG_XEN_AUTO_XLATE=y + +# For LVM2 we need Multiple Devices and Device Mapper support +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.scc b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.scc new file mode 100644 index 00000000..6fdbabc4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-host.scc @@ -0,0 +1,4 @@ +define KFEATURE_DESCRIPTION "Enable XEN Host Drivers on autonomy systems" + +kconf non-hardware xen-host.cfg + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-%.bbappend b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-%.bbappend new file mode 100644 index 00000000..add70425 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-%.bbappend @@ -0,0 +1,3 @@ +# Add arm-autonomy kernel support +require linux-arm-autonomy.inc + diff --git a/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc new file mode 100644 index 00000000..27634447 --- /dev/null +++ b/bsp/meta-arm/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc @@ -0,0 +1,22 @@ +# Add arm-autonomy specific features to the kernel + +FILESEXTRAPATHS_prepend := "${THISDIR}:" + +# +# arm-autonomy kmeta +# +SRC_URI_append = " file://arm-autonomy-kmeta;type=kmeta;name=arm-autonomy-kmeta;destsuffix=arm-autonomy-kmeta" + + +# Add xen host drivers to kernel if arm-autonomy-host is activated +KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \ + 'arm-autonomy-host', 'features/arm-autonomy/xen-host.scc', '', d)}" + +# Add xen guest drivers to kernel if arm-autonomy-guest is activated +KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \ + 'arm-autonomy-guest', 'features/arm-autonomy/xen-guest.scc', '', d)}" + +# Add support for arm64-autonomy-guest machine +COMPATIBLE_MACHINE_arm64-autonomy-guest = "arm64-autonomy-guest" +KMACHINE_arm64-autonomy-guest = "arm64-autonomy-guest" + diff --git a/bsp/meta-arm/meta-arm-bsp/classes/image_types_disk_img.bbclass b/bsp/meta-arm/meta-arm-bsp/classes/image_types_disk_img.bbclass new file mode 100644 index 00000000..ea7ba86c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/classes/image_types_disk_img.bbclass @@ -0,0 +1,155 @@ +# Defines the disk.img image type + +# +# Add an image type 'disk.img' which creates a disk image +# with up to 4 partitions +# +# For partition 1 (replace 1 by 2 for partition 2, and so on for 3 and 4): +# +# * DISK_IMG_PARTITION1_SIZE is the partition size in MB (1024 is 1 GB) +# +# * DISK_IMG_PARTITION1_FSTYPE is the file system to format the partition with. +# We support only ext files systems (ext2, ext3 and ext4) +# If this is empty, the partition will not be formated. +# +# * DISK_IMG_PARTITION1_CONTENT is the content to put in the filesystem. +# Only 'rootfs' is supported and will create a partition with the Yocto +# root filesystem. +# + +# Default values for partition 1 +DISK_IMG_PARTITION1_SIZE ??= "2048" +DISK_IMG_PARTITION1_FSTYPE ??= "ext4" +DISK_IMG_PARTITION1_CONTENT ??= "rootfs" + +# Default values for partition 2 +DISK_IMG_PARTITION2_SIZE ??= "0" +DISK_IMG_PARTITION2_FSTYPE ??= "ext2" +DISK_IMG_PARTITION2_CONTENT ??= "" + +# Default values for partition 3 +DISK_IMG_PARTITION3_SIZE ??= "0" +DISK_IMG_PARTITION3_FSTYPE ??= "ext4" +DISK_IMG_PARTITION3_CONTENT ??= "" + +# Default values for partition 4 +DISK_IMG_PARTITION4_SIZE ??= "0" +DISK_IMG_PARTITION4_FSTYPE ??= "ext4" +DISK_IMG_PARTITION4_CONTENT ??= "" + +# Default disk sector size +DISK_IMG_SECTOR_SIZE ??= "512" + +# We need mkfs.ext and parted tools to create our image (dd is always there) +do_image_disk_img[depends] += "e2fsprogs-native:do_populate_sysroot \ + parted-native:do_populate_sysroot" + +DISK_IMG_FILE = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.disk.img" + +# Create one disk partition +disk_img_createpart() { + local imagefile="$1" + local start="$2" + local size="$3" + local fstype="${4:-ext4}" + local content="${5:-}" + local formatargs="" + + set -x + + rm -f $imagefile + + # Create the partition image + dd if=/dev/zero of=$imagefile bs=${DISK_IMG_SECTOR_SIZE} count=0 \ + seek=$(expr $size / ${DISK_IMG_SECTOR_SIZE}) + + if [ -n "$fstype" ]; then + case $content in + rootfs) + formatargs=" -d ${IMAGE_ROOTFS}" + ;; + boot) + echo "Unsupported" + exit 1 + ;; + *) + esac + + # Create the file system (with content if needed) + mkfs.$fstype -F $imagefile $formatargs + fi + + cat $imagefile >> ${DISK_IMG_FILE} + + # Add the partition to the partition table + parted -s ${DISK_IMG_FILE} unit B mkpart primary $start \ + $(expr $start + $realsize - 1) +} + +disk_img_create () { + local currpos + local realsize + + set -x + + currpos=${DISK_IMG_SECTOR_SIZE} + + # Create reserved part for partition table (1MB) + dd if=/dev/zero of=${DISK_IMG_FILE} bs=${DISK_IMG_SECTOR_SIZE} count=0 \ + seek=1 + + parted -s ${DISK_IMG_FILE} mklabel msdos + + if [ ${DISK_IMG_PARTITION1_SIZE} -ne 0 ]; then + + # Reduce the first block size of one sector to make space + # for the partition table + realsize=$(expr ${DISK_IMG_PARTITION1_SIZE} \* 1024 \* 1024 \ + - ${DISK_IMG_SECTOR_SIZE}) + + # Create the partition + disk_img_createpart ${WORKDIR}/part1.img $currpos $realsize \ + "${DISK_IMG_PARTITION1_FSTYPE}" "${DISK_IMG_PARTITION1_CONTENT}" + + currpos=$(expr $currpos + $realsize) + fi + + if [ ${DISK_IMG_PARTITION2_SIZE} -ne 0 ]; then + # Partition size + realsize=$(expr ${DISK_IMG_PARTITION2_SIZE} \* 1024 \* 1024) + + # Create the partition + disk_img_createpart ${WORKDIR}/part2.img $currpos $realsize \ + "${DISK_IMG_PARTITION2_FSTYPE}" "${DISK_IMG_PARTITION2_CONTENT}" + + currpos=$(expr $currpos + $realsize) + + fi + + if [ ${DISK_IMG_PARTITION3_SIZE} -ne 0 ]; then + # Partition size + realsize=$(expr ${DISK_IMG_PARTITION3_SIZE} \* 1024 \* 1024) + + # Create the partition + disk_img_createpart ${WORKDIR}/part3.img $currpos $realsize \ + "${DISK_IMG_PARTITION3_FSTYPE}" "${DISK_IMG_PARTITION3_CONTENT}" + + currpos=$(expr $currpos + $realsize) + + fi + if [ ${DISK_IMG_PARTITION4_SIZE} -ne 0 ]; then + # Partition size + realsize=$(expr ${DISK_IMG_PARTITION4_SIZE} \* 1024 \* 1024) + + # Create the partition + disk_img_createpart ${WORKDIR}/part4.img $currpos $realsize \ + "${DISK_IMG_PARTITION4_FSTYPE}" "${DISK_IMG_PARTITION4_CONTENT}" + + currpos=$(expr $currpos + $realsize) + + fi +} + +IMAGE_CMD_disk.img = "disk_img_create" +IMAGE_TYPES += "disk.img" + diff --git a/bsp/meta-arm/meta-arm-bsp/conf/layer.conf b/bsp/meta-arm/meta-arm-bsp/conf/layer.conf new file mode 100644 index 00000000..1a54ddcf --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/layer.conf @@ -0,0 +1,13 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-arm-bsp" +BBFILE_PATTERN_meta-arm-bsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-arm-bsp = "6" + +LAYERDEPENDS_meta-arm-bsp = "core openembedded-layer meta-arm" +LAYERSERIES_COMPAT_meta-arm-bsp = "warrior zeus dunfell" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/a5ds.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/a5ds.conf new file mode 100644 index 00000000..fa7d88e2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/a5ds.conf @@ -0,0 +1,25 @@ +# Configuration for Cortex-A5 DesignStart development board + +#@TYPE: Machine +#@NAME: a5ds machine +#@DESCRIPTION: Machine configuration for Cortex-A5 DesignStart + +require conf/machine/include/tune-cortexa5.inc + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-upstream-arm" +PREFERRED_VERSION_linux-upstream-arm ?= "5.3%" +KBUILD_DEFCONFIG = "multi_v7_defconfig" + +EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +IMAGE_FSTYPES += "tar.bz2 cpio.gz" + +EXTRA_IMAGEDEPENDS += "u-boot" + +# Cortex-a5 u-boot configuration +UBOOT_MACHINE = "designstart_ca5_defconfig" +UBOOT_IMAGE_ENTRYPOINT = "0x84000000" +UBOOT_IMAGE_LOADADDRESS = "0x84000000" + diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/foundation-armv8.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/foundation-armv8.conf new file mode 100644 index 00000000..73d2798c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/foundation-armv8.conf @@ -0,0 +1,14 @@ +# Configuration for Armv8-A Foundation + +#@TYPE: Machine +#@NAME: Armv8-A Foundation Platform machine +#@DESCRIPTION: Machine configuration for Armv8-A Foundation Platform model + +require conf/machine/fvp-common/fvp.inc + +KERNEL_DEVICETREE = "arm/foundation-v8-gicv3-psci.dtb" + +# Use haveged as a source of entropy instead of rng-tools (Needed for ssh). +# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time. +PACKAGE_EXCLUDE_append = " rng-tools" +IMAGE_INSTALL_append = " haveged" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf new file mode 100644 index 00000000..30396442 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-base.conf @@ -0,0 +1,14 @@ +# Configuration for Armv8-A Base Platform FVP + +#@TYPE: Machine +#@NAME: Armv8-A Base Platform FVP machine +#@DESCRIPTION: Machine configuration for Armv8-A Base Platform FVP model + +require conf/machine/fvp-common/fvp.inc + +KERNEL_DEVICETREE = "arm/fvp-base-gicv3-psci-custom.dtb" + +# Use haveged as a source of entropy instead of rng-tools (Needed for ssh). +# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time. +PACKAGE_EXCLUDE_append = " rng-tools" +IMAGE_INSTALL_append = " haveged" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-common/fvp.inc b/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-common/fvp.inc new file mode 100644 index 00000000..08f8b15a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/fvp-common/fvp.inc @@ -0,0 +1,43 @@ +# FVP common parameters + +# +# Capturing FVP common configurations (Armv8-A Base Platform FVP and +# Armv8-A Foundation Platform). +# + +TUNE_FEATURES = "aarch64" + +require conf/machine/include/arm/arch-armv8a.inc + +MACHINE_FEATURES = "optee" + +KERNEL_IMAGETYPE = "Image" + +IMAGE_CLASSES += "image_types_disk_img" +IMAGE_FSTYPES += "disk.img" + +# Disk image configuration +# We don't use the first partition +DISK_IMG_PARTITION1_SIZE = "128" +DISK_IMG_PARTITION1_FSTYPE = "" +DISK_IMG_PARTITION1_CONTENT = "" + +# Second partition is used for rootfs +DISK_IMG_PARTITION2_SIZE = "2048" +DISK_IMG_PARTITION2_FSTYPE = "ext4" +DISK_IMG_PARTITION2_CONTENT = "rootfs" + +# Empty third partition (8G - 2048M - 128M) +DISK_IMG_PARTITION3_SIZE = "6016" +DISK_IMG_PARTITION3_FSTYPE = "" +DISK_IMG_PARTITION3_CONTENT = "" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "5.4%" + +EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot" + +# FVP u-boot configuration +UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/gem5-arm64.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/gem5-arm64.conf new file mode 100644 index 00000000..4db86c97 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/gem5-arm64.conf @@ -0,0 +1,53 @@ +# Configuration for gem5 running on ARM64 + +#@TYPE: Machine +#@NAME: Gem5 arm64 machine +#@DESCRIPTION: Machine configuration for Gem5 arm64 + +TUNE_FEATURES = "aarch64" + +require conf/machine/include/arm/arch-armv8a.inc + +MACHINE_FEATURES = "optee pci" + +KERNEL_IMAGETYPES = "Image vmlinux" +KERNEL_IMAGETYPE = "Image" + +IMAGE_FSTYPES += "tar.bz2 ext4" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +EXTRA_IMAGEDEPENDS += "virtual/gem5-bootloader" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "5.4%" + + +# Uncomment the following if you need to build gem5 provided bootloader, else +# using standard bootloader by Linux aarch64 +# Use gem5 provided bootloader +# PREFERRED_PROVIDER_virtual/gem5-bootloader = "gem5-aarch64-bootloader" + +# use the dtb stored in the kernel recipe +# KERNEL_DEVICETREE ?= "gem5-arm64/armv8_gem5_v2_4cpu.dtb" + +# Use Linux aarch64 boot wrapper with FDT support and generated +# dtb (gem5-aarch64-dtb.bb) +PREFERRED_PROVIDER_virtual/gem5-bootloader = "boot-wrapper-aarch64" + +BOOT_WRAPPER_AARCH64_CMDLINE ?= "\ + earlyprintk=pl011,0x1c090000 console=ttyAMA0 root=/dev/vda rw mem=1G \ + " +# Use baremetal profile and axf file so dtb is in axf file +GEM5_RUN_PROFILE = "configs/example/arm/baremetal.py" +GEM5_RUN_KERNEL = "linux-system.axf" +GEM5_RUN_EXTRA = "" +GEM5_RUN_DTB = "" +GEM5_RUN_CMDLINE = "" + +EXTRA_IMAGEDEPENDS += "gem5-aarch64-native" + +# Use haveged as a source of entropy instead of rng-tools (Needed for ssh). +# rngd (Part of rng-tools) takes ~7 mins to init resulting in a slow boot time. +PACKAGE_EXCLUDE_append = " rng-tools" +IMAGE_INSTALL_append = " haveged" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/juno.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/juno.conf new file mode 100644 index 00000000..898a863d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/juno.conf @@ -0,0 +1,28 @@ +# Configuration for juno development board + +#@TYPE: Machine +#@NAME: Juno machine +#@DESCRIPTION: Machine configuration for Juno + +TUNE_FEATURES = "aarch64" + +require conf/machine/include/arm/arch-armv8a.inc + +MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth optee pci" + +KERNEL_IMAGETYPE = "Image" +KERNEL_DEVICETREE = "arm/juno.dtb arm/juno-r1.dtb arm/juno-r2.dtb" + +IMAGE_FSTYPES += "tar.bz2 ext4" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +# Use kernel provided by linaro (Contains support for SCMi or HDMI) +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-arm" +PREFERRED_VERSION_linux-linaro-arm ?= "4.19%" +PREFERRED_VERSION_trusted-firmware-a ?= "2.1%" + +EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot firmware-image-juno" + +# Juno u-boot configuration +UBOOT_MACHINE = "vexpress_aemv8a_juno_defconfig" diff --git a/bsp/meta-arm/meta-arm-bsp/conf/machine/n1sdp.conf b/bsp/meta-arm/meta-arm-bsp/conf/machine/n1sdp.conf new file mode 100644 index 00000000..5fddcada --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/conf/machine/n1sdp.conf @@ -0,0 +1,23 @@ +# Configuration for Arm N1SDP development board + +#@TYPE: Machine +#@NAME: N1SDP machine +#@DESCRIPTION: Machine configuration for N1SDP + +TUNE_FEATURES = "aarch64" + +require conf/machine/include/arm/arch-armv8a.inc + +KERNEL_IMAGETYPE = "Image" +KERNEL_DEVICETREE = "n1sdp/n1sdp.dtb" + +IMAGE_FSTYPES += "tar.bz2 ext4" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +# Use kernel provided by linaro (Contains support for SCMi or HDMI) +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-arm" +PREFERRED_VERSION_linux-linaro-arm ?= "5.4%" + +# RTL8168E Gigabit Ethernet Controller is attached to the PCIe interface +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-firmware-rtl8168" diff --git a/bsp/meta-arm/meta-arm-bsp/documentation/a5ds.md b/bsp/meta-arm/meta-arm-bsp/documentation/a5ds.md new file mode 100644 index 00000000..9f88abc1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/documentation/a5ds.md @@ -0,0 +1,24 @@ +# Cortex-A5 DesignStart A5DS Platform Support in meta-arm-platforms + +## Howto Build and Run + +### Configuration: +In the local.conf file, MACHINE should be set as follow: +MACHINE ?= "a5ds" +DISTRO ?= "iota-tiny" + +Or set environment variables with that values: + +MACHINE "a5ds" +DISTRO "iota-tiny" + +### Build: +``bash$ bitbake iota-tiny-image``` + +### Run: +To run the result in a Fixed Virtual Platform please get: +https://git.linaro.org/landing-teams/working/arm/model-scripts + +and follow the instructions in the readme.txt file in that +repository. + diff --git a/bsp/meta-arm/meta-arm-bsp/documentation/foundation-armv8.md b/bsp/meta-arm/meta-arm-bsp/documentation/foundation-armv8.md new file mode 100644 index 00000000..10975503 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/documentation/foundation-armv8.md @@ -0,0 +1,50 @@ +# Armv8-A Base Platform Support in meta-arm-platforms + +## Howto Build and Run + +### Configuration: +In the local.conf file, MACHINE should be set as follow: +MACHINE ?= "foundation-v8" + +### Build: +```bash$ bitbake core-image-minimal``` + +### Run: +To Run the Fixed Virtual Platform simulation tool you must download "Armv8-A +Foundation Platform" from Arm developer (This might require the user to +register) from this address: +https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms +and install it on your host PC. + +Fast Models Fixed Virtual Platforms (FVP) Reference Guide: +https://developer.arm.com/docs/100966/latest + +Armv8‑A Foundation Platform User Guide: +https://developer.arm.com/docs/100961/latest/ + + +Once done, do the following to build and run an image: +```bash$ bitbake core-image-minimal``` +```bash$ export YOCTO_DEPLOY_IMGS_DIR=""``` +```bash$ cd ``` +``` +bash$ ./Foundation_Platform --cores=4 --no-sve --gicv3 \ + --data=${YOCTO_DEPLOY_IMGS_DIR}/bl1-fvp.bin@0x0 \ + --data=${YOCTO_DEPLOY_IMGS_DIR}/Image@0x80080000 \ + --data=${YOCTO_DEPLOY_IMGS_DIR}/foundation-v8-gicv3-psci.dtb@0x83000000 \ + --block-device=${YOCTO_DEPLOY_IMGS_DIR}/core-image-minimal-foundation-armv8.disk.img \ +``` + +If you have built a configuration without a ramdisk, you can use the following +command in U-boot to start Linux: +```VExpress64# booti 0x80080000 - 0x83000000``` + +## Devices supported in the kernel +- serial +- virtio disk +- network +- watchdog +- rtc + +## Devices not supported or not functional +None diff --git a/bsp/meta-arm/meta-arm-bsp/documentation/fvp-base.md b/bsp/meta-arm/meta-arm-bsp/documentation/fvp-base.md new file mode 100644 index 00000000..0936c199 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/documentation/fvp-base.md @@ -0,0 +1,53 @@ +# Armv8-A Base Platform FVP Support in meta-arm-platforms + +## Howto Build and Run + +### Configuration: +In the local.conf file, MACHINE should be set as follow: +MACHINE ?= "fvp-base" + +### Build: +```bash$ bitbake core-image-minimal``` + +### Run: +To Run the Fixed Virtual Platform simulation tool you must download "Armv8-A +Base Platform FVP" from Arm developer (This might require the user to +register) from this address: +https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms +and install it on your host PC. + +Fast Models Fixed Virtual Platforms (FVP) Reference Guide: +https://developer.arm.com/docs/100966/latest + +Armv8‑A Foundation Platform User Guide: +https://developer.arm.com/docs/100961/latest/ + + +Once done, do the following to build and run an image: +```bash$ bitbake core-image-minimal``` +```bash$ export YOCTO_DEPLOY_IMGS_DIR=""``` +```bash$ cd ``` +``` +bash$ ./FVP_Base_RevC-2xAEMv8A -C bp.virtio_net.enabled=1 \ + -C cache_state_modelled=0 \ + -C bp.secureflashloader.fname=${YOCTO_DEPLOY_IMGS_DIR}/bl1-fvp.bin \ + -C bp.flashloader0.fname=${YOCTO_DEPLOY_IMGS_DIR}/fip-fvp.bin \ + --data cluster0.cpu0=${YOCTO_DEPLOY_IMGS_DIR}/Image@0x80080000 \ + --data cluster0.cpu0=${YOCTO_DEPLOY_IMGS_DIR}/fvp-base-gicv3-psci-custom.dtb@0x83000000 \ + -C bp.virtioblockdevice.image_path=${YOCTO_DEPLOY_IMGS_DIR}/core-image-minimal-foundation-armv8.disk.img \ +``` + + +If you have built a configuration without a ramdisk, you can use the following +command in U-boot to start Linux: +```VExpress64# booti 0x80080000 - 0x83000000``` + +## Devices supported in the kernel +- serial +- virtio disk +- network +- watchdog +- rtc + +## Devices not supported or not functional +None diff --git a/bsp/meta-arm/meta-arm-bsp/documentation/gem5-arm64.md b/bsp/meta-arm/meta-arm-bsp/documentation/gem5-arm64.md new file mode 100644 index 00000000..dc305e8d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/documentation/gem5-arm64.md @@ -0,0 +1,29 @@ +# Gem5 Arm64 Platform Support in meta-arm-platforms + +## Howto Build and Run + +### Configuration: +In the local.conf file, MACHINE should be set as follow: +MACHINE ?= "gem5-arm64" + +### Build: +```bash$ bitbake core-image-minimal``` + + +### Run: +After compilation of an image, you can execute it using the compiled gem5 +with the followin command: +```./tmp/deploy/tools/start-gem5.sh``` + +You can modify the script to change the command line options of gem5. + +## Devices supported in the kernel +- serial + +### Untested: +- pci +- sata +- ide + + +## Devices not supported or not functional diff --git a/bsp/meta-arm/meta-arm-bsp/documentation/juno.md b/bsp/meta-arm/meta-arm-bsp/documentation/juno.md new file mode 100644 index 00000000..cc5a2720 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/documentation/juno.md @@ -0,0 +1,75 @@ +# Juno Development Platform Support in meta-arm-platforms + +## Howto Build and Run + +### Configuration: +In the local.conf file, MACHINE should be set as follow: +MACHINE ?= "juno" + +Juno is using a USB hard drive for root filesystem by default. The distribution +used must have ```usbhost``` and ```usbgadget``` in DISTRO_FEATURES (this is +the case in poky distribution). + +### Build: +```bash$ bitbake core-image-minimal``` + +### Update Juno SD card: + +The SD card content is generated during the build here: +tmp/deploy/images/juno/firmware-image-juno.tar.gz + +Its content must be written on the Juno firmware SD card. +To do this: +- insert the sdcard of the Juno in an SD card reader and mount it: +```bash$ sudo mount /dev/sdx1 /mnt``` +(replace sdx by the device of the SD card) + +- erase its content and put the new one: +```bash$ sudo rm -rf /mnt/*``` +```bash$ sudo tar --no-same-owner -xzf tmp/deploy/images/juno/firmware-image-juno.tar.gz -C /mnt/``` +```bash$ sudo umount /mnt``` + +- reinsert the SD card in the Juno board + +### Create an USB hard drive: + +Linux root file system should be stored on the second partition of an USB +drive that must be plugged on the Juno Platform. + +This partition should be initialized with the content of the filesystem +generated by yocto that you can find here: +tmp/deploy/images/juno/core-image-minimal-juno.tar.bz2 + +To do this +- Format a USB disk, create two primary partitions (ext4). +- mount the secondary partition +- untar tmp/deploy/images/juno/core-image-minimal-juno.tar.bz2 on to the + secondary partition. + +### Run: +You must insert the SD card and the USB drive and power-on the Juno board. +The console should be available on the second serial line: +screen -L /dev/tty.usbserial 115200 + +On the first boot the images will be flashed which can take some time. + +## Devices supported in the kernel +- serial +- usb +- network +- watchdog +- rtc +- mmc + +### Untested: +- i2c +- dma +- pci +- sata +- sound + +## Devices not supported or not functional +- framebuffer: not functional + The HDMI is not properly detected. +- GPU (no user land libraries). + The mali-midgard-kernel can be used to have a kernel driver diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc new file mode 100644 index 00000000..3cd39177 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64.inc @@ -0,0 +1,87 @@ + +SUMMARY = "Linux aarch64 boot wrapper with FDT support" +LICENSE = "BSD" + +inherit autotools deploy + +PROVIDES = "virtual/gem5-bootloader boot-wrapper-aarch64" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE ?= "" + +# Device tree to put in the image +# by default use the standard kernel devicetree +# This should be overwritten if the devicetree is not generated +# by the kernel. +# This should point to a file in the deploy image directory +BOOT_WRAPPER_AARCH64_DEVICETREE ??= "${KERNEL_DEVICETREE}" + +# Kernel image to put in the image +# This should point to a file in the deploy image directory +BOOT_WRAPPER_AARCH64_KERNEL ??= "Image" + +# Kernel command line for the image +BOOT_WRAPPER_AARCH64_CMDLINE ??= "rw" + +# Image generated by boot wrapper +BOOT_WRAPPER_AARCH64_IMAGE ??= "linux-system.axf" + +DEPENDS += "virtual/kernel dtc-native" + +EXTRA_OECONF += "--with-kernel-dir=${WORKDIR}/kernel" +EXTRA_OECONF += "--with-dtb=${WORKDIR}/kernel/dummy.dtb" +EXTRA_OECONF += "--with-cmdline=\"\"" +EXTRA_OECONF += "--enable-psci --enable-gicv3" + +# unset LDFLAGS solves this error when compiling kernel modules: +# aarch64-poky-linux-ld: unrecognized option '-Wl,-O1' +EXTRA_OEMAKE += "'LDFLAGS= --gc-sections '" + +# Strip prefix if any +REAL_DTB = "${@os.path.basename(d.getVar('BOOT_WRAPPER_AARCH64_DEVICETREE'))}" + +EXTRA_OEMAKE += "'KERNEL_DTB=${DEPLOY_DIR_IMAGE}/${REAL_DTB}'" +EXTRA_OEMAKE += "'KERNEL_IMAGE=${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_KERNEL}'" +EXTRA_OEMAKE += "'CMDLINE=${BOOT_WRAPPER_AARCH64_CMDLINE}'" + + +do_configure_prepend() { + # Create dummy files to make configure happy. + # We will pass the generated ones directly to make. + mkdir -p ${WORKDIR}/kernel/arch/arm64/boot + echo "dummy" > ${WORKDIR}/kernel/arch/arm64/boot/Image + echo "dummy" > ${WORKDIR}/kernel/dummy.dtb + + # Generate configure + (cd ${S} && autoreconf -i || exit 1) +} + +do_compile[noexec] = "1" +do_install[noexec] = "1" + +# We need the kernel to create an image +do_deploy[depends] += "virtual/kernel:do_deploy" + +do_deploy() { + if [ ! -f ${DEPLOY_DIR_IMAGE}/${REAL_DTB} ]; then + echo "ERROR: cannot find ${REAL_DTB} in ${DEPLOY_DIR_IMAGE}" >&2 + echo "Please check your BOOT_WRAPPER_AARCH64_DEVICETREE settings" >&2 + exit 1 + fi + + if [ ! -f ${DEPLOY_DIR_IMAGE}/${BOOT_WRAPPER_AARCH64_KERNEL} ]; then + echo "ERROR: cannot find ${BOOT_WRAPPER_AARCH64_KERNEL}" \ + " in ${DEPLOY_DIR_IMAGE}" >&2 + echo "Please check your BOOT_WRAPPER_AARCH64_KERNEL settings" >&2 + exit 1 + fi + + oe_runmake clean + oe_runmake all + + install -D -p -m 644 ${BOOT_WRAPPER_AARCH64_IMAGE} \ + ${DEPLOYDIR}/linux-system.axf +} +addtask deploy before do_build after do_compile + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_git.bb b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_git.bb new file mode 100644 index 00000000..a071f609 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/boot-wrapper-aaarch64/boot-wrapper-aarch64_git.bb @@ -0,0 +1,27 @@ + +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bb63326febfb5fb909226c8e7ebcef5c" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git" + +PV = "git${SRCPV}" + +S = "${WORKDIR}/git" + +SRCREV = "fd74c8cbd0e17483d2299208cad9742bee605ca7" + +BPN = "boot-wrapper-aarch64" + +require boot-wrapper-aarch64.inc + +# Gem5 aarch64 support +COMPATIBLE_MACHINE_gem5_arm64 = "gem5-arm64" + +# For gem5 we use the dtb generated by gem5 directly +DEPENDS_append_gem5-arm64 = " gem5-aarch64-dtb" +BOOT_WRAPPER_AARCH64_DEVICETREE_gem5-arm64 = "gem5-aarch64.dtb" + +# The dtb must be generated for us to generate the axf +DEPLOY_DEPEND_LIST ?= "" +DEPLOY_DEPEND_LIST_gem5-arm64 = " gem5-aarch64-dtb:do_deploy" +do_deploy[depends] += "${DEPLOY_DEPEND_LIST}" + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb new file mode 100644 index 00000000..a6ac9caa --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "System Control Processor (SCP) firmware for Juno" +HOMEPAGE = "https://github.com/ARM-software/SCP-firmware" +LICENSE = "BSD-3-Clause" +SECTION = "firmware" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "juno" + +PROVIDES += "virtual/scp-firmware" + +# For now, for juno we retrieve the SCP firmware in binary format +# from Linaro Releases. +SRC_URI = "http://releases.linaro.org/members/arm/platforms/${PV}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR}" + +SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003" +SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82" + +UNPACK_DIR = "juno-firmware" + +S = "${WORKDIR}/${UNPACK_DIR}" + +SCP_FIRMWARE_BINARIES = "scp_bl1.bin scp_bl2.bin" + +inherit nopackages + +do_configure[noexec] = "1" +do_configure[compile] = "1" + +do_install() { + install -d ${D}/firmware + for file in ${SCP_FIRMWARE_BINARIES}; do + install -m 644 ${S}/SOFTWARE/${file} ${D}/firmware + done +} + +SYSROOT_DIRS += "/firmware" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb new file mode 100644 index 00000000..b0ad14f1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb @@ -0,0 +1,75 @@ +DESCRIPTION = "Firmware Image for Juno to be copied to the Configuration \ +microSD card" + +LICENSE = "BSD-3-Clause" +SECTION = "firmware" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +DEPENDS = "virtual/trusted-firmware-a virtual/kernel" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "juno" + +LINARO_RELEASE = "19.06" + +SRC_URI = "http://releases.linaro.org/members/arm/platforms/${LINARO_RELEASE}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR} \ + file://images-r0.txt \ + file://images-r1.txt \ + file://images-r2.txt \ + file://uEnv.txt \ +" +SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003" +SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82" + +UNPACK_DIR = "juno-firmware-${LINARO_RELEASE}" + +inherit deploy nopackages + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +# The ${D} is used as a temporary directory and we don't generate any +# packages for this recipe. +do_install() { + cp -a ${WORKDIR}/${UNPACK_DIR} ${D} + cp -f ${RECIPE_SYSROOT}/firmware/bl1-juno.bin \ + ${D}/${UNPACK_DIR}/SOFTWARE/bl1.bin + + cp -f ${RECIPE_SYSROOT}/firmware/fip-juno.bin \ + ${D}/${UNPACK_DIR}/SOFTWARE/fip.bin + + # u-boot environment file + cp -f ${WORKDIR}/uEnv.txt ${D}/${UNPACK_DIR}/SOFTWARE/ + + # Juno images list file + cp -f ${WORKDIR}/images-r0.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262B/images.txt + cp -f ${WORKDIR}/images-r1.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262C/images.txt + cp -f ${WORKDIR}/images-r2.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262D/images.txt +} + +do_deploy() { + # To avoid dependency loop between firmware-image-juno:do_install + # and virtual/kernel:do_deploy when INITRAMFS_IMAGE_BUNDLE = "1", + # we need to handle the kernel binaries copying in the do_deploy + # task. + for f in ${KERNEL_DEVICETREE}; do + install -m 755 -c ${DEPLOY_DIR_IMAGE}/$(basename $f) \ + ${D}/${UNPACK_DIR}/SOFTWARE/. + done + + if [ "${INITRAMFS_IMAGE_BUNDLE}" -eq 1 ]; then + cp -L -f ${DEPLOY_DIR_IMAGE}/Image-initramfs-juno.bin \ + ${D}/${UNPACK_DIR}/SOFTWARE/Image + else + cp -L -f ${DEPLOY_DIR_IMAGE}/Image ${D}/${UNPACK_DIR}/SOFTWARE/ + fi + + # Compress the files + tar -C ${D}/${UNPACK_DIR} -zcvf ${WORKDIR}/${PN}.tar.gz ./ + + # Deploy the compressed archive to the deploy folder + install -D -p -m0644 ${WORKDIR}/${PN}.tar.gz ${DEPLOYDIR}/${PN}.tar.gz +} +do_deploy[depends] += "virtual/kernel:do_deploy" +addtask deploy after do_install diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt new file mode 100644 index 00000000..286dac74 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt @@ -0,0 +1,71 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 10 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x025C0000 ;Image Flash Address +NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x03E40000 ;Image Flash Address +NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x0BF00000 ;Image Flash Address +NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR6NAME: startup.nsh +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR7FILE: \SOFTWARE\blank.img ;Image File Name +NOR7NAME: BOOTENV +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x02600000 ;Image Flash Address +NOR8FILE: \SOFTWARE\selftest ;Image File Name +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02780000 ;Image Flash Address +NOR9NAME: uEnv.txt +NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt new file mode 100644 index 00000000..f84caaf9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt @@ -0,0 +1,71 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 10 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r1.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x025C0000 ;Image Flash Address +NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x03E40000 ;Image Flash Address +NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x0BF00000 ;Image Flash Address +NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR6NAME: startup.nsh +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR7FILE: \SOFTWARE\blank.img ;Image File Name +NOR7NAME: BOOTENV +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x02600000 ;Image Flash Address +NOR8FILE: \SOFTWARE\selftest ;Image File Name +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02780000 ;Image Flash Address +NOR9NAME: uEnv.txt +NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt new file mode 100644 index 00000000..149e0c4c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt @@ -0,0 +1,71 @@ +TITLE: Versatile Express Images Configuration File + +[IMAGES] +TOTALIMAGES: 10 ;Number of Images (Max: 32) + +NOR0UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR0ADDRESS: 0x00000000 ;Image Flash Address +NOR0FILE: \SOFTWARE\fip.bin ;Image File Name +NOR0LOAD: 00000000 ;Image Load Address +NOR0ENTRY: 00000000 ;Image Entry Point + +NOR1UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR1ADDRESS: 0x03EC0000 ;Image Flash Address +NOR1FILE: \SOFTWARE\bl1.bin ;Image File Name +NOR1LOAD: 00000000 ;Image Load Address +NOR1ENTRY: 00000000 ;Image Entry Point + +NOR2UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR2ADDRESS: 0x00500000 ;Image Flash Address +NOR2FILE: \SOFTWARE\Image ;Image File Name +NOR2NAME: norkern ;Rename kernel to norkern +NOR2LOAD: 00000000 ;Image Load Address +NOR2ENTRY: 00000000 ;Image Entry Point + +NOR3UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR3ADDRESS: 0x02700000 ;Image Flash Address +NOR3FILE: \SOFTWARE\juno-r2.dtb ;Image File Name +NOR3NAME: board.dtb ;Specify target filename to preserve file extension +NOR3LOAD: 00000000 ;Image Load Address +NOR3ENTRY: 00000000 ;Image Entry Point + +NOR4UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR4ADDRESS: 0x025C0000 ;Image Flash Address +NOR4FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name +NOR4LOAD: 00000000 ;Image Load Address +NOR4ENTRY: 00000000 ;Image Entry Point + +NOR5UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR5ADDRESS: 0x03E40000 ;Image Flash Address +NOR5FILE: \SOFTWARE\scp_bl1.bin ;Image File Name +NOR5LOAD: 00000000 ;Image Load Address +NOR5ENTRY: 00000000 ;Image Entry Point + +NOR6UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR6ADDRESS: 0x0BF00000 ;Image Flash Address +NOR6FILE: \SOFTWARE\startup.nsh ;Image File Name +NOR6NAME: startup.nsh +NOR6LOAD: 00000000 ;Image Load Address +NOR6ENTRY: 00000000 ;Image Entry Point + +NOR7UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR7ADDRESS: 0x0BFC0000 ;Image Flash Address +NOR7FILE: \SOFTWARE\blank.img ;Image File Name +NOR7NAME: BOOTENV +NOR7LOAD: 00000000 ;Image Load Address +NOR7ENTRY: 00000000 ;Image Entry Point + +NOR8UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR8ADDRESS: 0x02600000 ;Image Flash Address +NOR8FILE: \SOFTWARE\selftest ;Image File Name +NOR8LOAD: 00000000 ;Image Load Address +NOR8ENTRY: 00000000 ;Image Entry Point + +NOR9UPDATE: AUTO ;Image Update:NONE/AUTO/FORCE +NOR9ADDRESS: 0x02780000 ;Image Flash Address +NOR9NAME: uEnv.txt +NOR9FILE: \SOFTWARE\uEnv.txt ;Image File Name +NOR9LOAD: 00000000 ;Image Load Address +NOR9ENTRY: 00000000 ;Image Entry Point + + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt new file mode 100644 index 00000000..93eb5fb0 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt @@ -0,0 +1,11 @@ +uenvcmd=run mybootcmd +mybootcmd=echo Loading custom boot command; \ +echo Loading kernel; \ +afs load ${kernel_name} ${kernel_addr} ; \ +if test $? -eq 1; then echo Loading ${kernel_alt_name} instead of ${kernel_name}; afs load ${kernel_alt_name} ${kernel_addr}; fi; \ +echo Loading device tree; \ +afs load ${fdtfile} ${fdt_addr}; \ +if test $? -eq 1; then echo Loading ${fdt_alt_name} instead of ${fdtfile}; \ +afs load ${fdt_alt_name} ${fdt_addr}; fi; fdt addr ${fdt_addr}; fdt resize; \ +booti ${kernel_addr} - ${fdt_addr}; + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/a5ds/0001-plat-arm-a5ds-move-dtb-to-a-new-address.patch b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/a5ds/0001-plat-arm-a5ds-move-dtb-to-a-new-address.patch new file mode 100644 index 00000000..8d848ec9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/a5ds/0001-plat-arm-a5ds-move-dtb-to-a-new-address.patch @@ -0,0 +1,31 @@ +From d3cadbc6f1060020960dc05af0465db919bbbe2b Mon Sep 17 00:00:00 2001 +From: Rui Miguel Silva +Date: Fri, 30 Aug 2019 13:38:44 +0100 +Subject: [PATCH] plat/arm: a5ds: move dtb to a new address + +When Using bigger kernel images (>8.4MB compressed zImage) and at +decompress and final location init stage of kernel start makes it +override dtb at this address, to avoid this move the dtb a little +higher in address related. + +Signed-off-by: Rui Miguel Silva +--- + plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts b/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts +index 9ab2d9656600..c616ff772237 100644 +--- a/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts ++++ b/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts +@@ -10,7 +10,7 @@ + /* Platform Config */ + plat_arm_bl2 { + compatible = "arm,tb_fw"; +- hw_config_addr = <0x0 0x82000000>; ++ hw_config_addr = <0x0 0x83000000>; + hw_config_max_size = <0x01000000>; + /* Disable authentication for development */ + disable_auth = <0x0>; +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-a5ds.inc b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-a5ds.inc new file mode 100644 index 00000000..aa21b743 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-a5ds.inc @@ -0,0 +1,22 @@ +# Cortex-A5 Designstart specific TFA support + +COMPATIBLE_MACHINE = "a5ds" +TFA_PLATFORM = "a5ds" +TFA_DEBUG = "1" +TFA_UBOOT = "1" +TFA_BUILD_TARGET = "all fip" +TFA_INSTALL_TARGET = "bl1.bin fip.bin" + +SRCREV = "5d3ee0764b03567bf3501edf47d67d72daff0cb3" +LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" + +EXTRA_OEMAKE_append = " \ + ARCH=aarch32 \ + FVP_HW_CONFIG_DTS=fdts/a5ds.dts \ + ARM_ARCH_MAJOR=7 \ + AARCH32_SP=sp_min \ + ARM_CORTEX_A5=yes \ + ARM_XLAT_TABLES_LIB_V1=1 \ + " + + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc new file mode 100644 index 00000000..27031ebc --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc @@ -0,0 +1,13 @@ +# FVP specific TFA parameters + +# +# Armv8-A Base Platform FVP and Armv8-A Foundation Platform uses the same +# TFAs. +# + +COMPATIBLE_MACHINE = "fvp-base|foundation-armv8" +TFA_PLATFORM = "fvp" +TFA_DEBUG = "1" +TFA_MBEDTLS = "1" +TFA_UBOOT = "1" +TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fip" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc new file mode 100644 index 00000000..2f1559cb --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc @@ -0,0 +1,13 @@ +# Juno specific TFA support + +COMPATIBLE_MACHINE = "juno" +TFA_PLATFORM = "juno" +TFA_DEBUG = "1" +TFA_MBEDTLS = "1" +TFA_UBOOT = "1" +TFA_BUILD_TARGET = "bl1 fip" + +# Juno needs the System Control Processor Firmware +DEPENDS += "virtual/scp-firmware" + +EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_bl2.bin" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend new file mode 100644 index 00000000..47915387 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend @@ -0,0 +1,9 @@ +# Machine specific TFAs + +MACHINE_TFA_REQUIRE ?= "" + +MACHINE_TFA_REQUIRE_foundation-armv8 = "trusted-firmware-a-fvp.inc" +MACHINE_TFA_REQUIRE_fvp-base = "trusted-firmware-a-fvp.inc" +MACHINE_TFA_REQUIRE_juno = "trusted-firmware-a-juno.inc" + +require ${MACHINE_TFA_REQUIRE} diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bbappend new file mode 100644 index 00000000..772f65a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bbappend @@ -0,0 +1,7 @@ +# Machine specific TFAs + +MACHINE_TFA_REQUIRE ?= "" + +MACHINE_TFA_REQUIRE_a5ds = "trusted-firmware-a-a5ds.inc" + +require ${MACHINE_TFA_REQUIRE} diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0001-armv7-add-mmio-timer.patch b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0001-armv7-add-mmio-timer.patch new file mode 100644 index 00000000..fbf8a14f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0001-armv7-add-mmio-timer.patch @@ -0,0 +1,105 @@ +From 8525c72c438b0aa66f1f38db37bd7aacf7e3ce34 Mon Sep 17 00:00:00 2001 +From: Rui Miguel Silva +Date: Wed, 18 Dec 2019 21:52:34 +0000 +Subject: [PATCH 1/2] armv7: add mmio timer + +This timer can be used by u-boot when arch-timer is not available in +core, for example, Cortex-A5. + +Signed-off-by: Rui Miguel Silva +--- + arch/arm/cpu/armv7/Makefile | 1 + + arch/arm/cpu/armv7/mmio_timer.c | 56 +++++++++++++++++++++++++++++++++ + scripts/config_whitelist.txt | 1 + + 3 files changed, 58 insertions(+) + create mode 100644 arch/arm/cpu/armv7/mmio_timer.c + +diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile +index 8c955d0d5284..82af9c031277 100644 +--- a/arch/arm/cpu/armv7/Makefile ++++ b/arch/arm/cpu/armv7/Makefile +@@ -28,6 +28,7 @@ obj-$(CONFIG_ARMV7_PSCI) += psci.o psci-common.o + obj-$(CONFIG_IPROC) += iproc-common/ + obj-$(CONFIG_KONA) += kona-common/ + obj-$(CONFIG_SYS_ARCH_TIMER) += arch_timer.o ++obj-$(CONFIG_SYS_MMIO_TIMER) += mmio_timer.o + + ifneq (,$(filter s5pc1xx exynos,$(SOC))) + obj-y += s5p-common/ +diff --git a/arch/arm/cpu/armv7/mmio_timer.c b/arch/arm/cpu/armv7/mmio_timer.c +new file mode 100644 +index 000000000000..1b905db8bb19 +--- /dev/null ++++ b/arch/arm/cpu/armv7/mmio_timer.c +@@ -0,0 +1,56 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (c) 2019, Arm Limited. All rights reserved. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++#define CNTCTLBASE 0x1a020000UL ++#define CNTREADBASE 0x1a030000UL ++ ++static inline uint32_t mmio_read32(uintptr_t addr) ++{ ++ return *(volatile uint32_t*)addr; ++} ++ ++int timer_init(void) ++{ ++ gd->arch.timer_rate_hz = mmio_read32(CNTCTLBASE); ++ ++ return 0; ++} ++ ++unsigned long long get_ticks(void) ++{ ++ return ((mmio_read32(CNTCTLBASE + 0x4) << 32) | ++ mmio_read32(CNTREADBASE)); ++} ++ ++ulong get_timer(ulong base) ++{ ++ return lldiv(get_ticks(), gd->arch.timer_rate_hz) - base; ++} ++ ++void __udelay(unsigned long usec) ++{ ++ unsigned long endtime; ++ ++ endtime = lldiv((unsigned long long)usec * gd->arch.timer_rate_hz, ++ 1000UL); ++ ++ endtime += get_ticks(); ++ ++ while (get_ticks() < endtime) ++ ; ++} ++ ++ulong get_tbclk(void) ++{ ++ return gd->arch.timer_rate_hz; ++} +diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt +index cf1808e051c8..8624714ae7a6 100644 +--- a/scripts/config_whitelist.txt ++++ b/scripts/config_whitelist.txt +@@ -3138,6 +3138,7 @@ CONFIG_SYS_MMC_U_BOOT_DST + CONFIG_SYS_MMC_U_BOOT_OFFS + CONFIG_SYS_MMC_U_BOOT_SIZE + CONFIG_SYS_MMC_U_BOOT_START ++CONFIG_SYS_MMIO_TIMER + CONFIG_SYS_MONITOR_ + CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_BASE_EARLY +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0002-board-arm-add-designstart-cortex-a5-board.patch b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0002-board-arm-add-designstart-cortex-a5-board.patch new file mode 100644 index 00000000..3c527ae2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/a5ds/0002-board-arm-add-designstart-cortex-a5-board.patch @@ -0,0 +1,309 @@ +From 2417d0991f73ee2c83946fcac208a7d6894f4530 Mon Sep 17 00:00:00 2001 +From: Rui Miguel Silva +Date: Wed, 8 Jan 2020 09:48:11 +0000 +Subject: [PATCH 2/2] board: arm: add designstart cortex-a5 board + +Arm added a new board, designstart, with a cortex-a5 chip, add the +default configuration, initialization and makefile for this system. + +Signed-off-by: Rui Miguel Silva +--- + arch/arm/Kconfig | 7 ++ + board/armltd/designstart/Kconfig | 12 +++ + board/armltd/designstart/Makefile | 8 ++ + board/armltd/designstart/designstart.c | 49 ++++++++++ + configs/designstart_ca5_defconfig | 37 ++++++++ + include/configs/designstart_ca5.h | 122 +++++++++++++++++++++++++ + 6 files changed, 235 insertions(+) + create mode 100644 board/armltd/designstart/Kconfig + create mode 100644 board/armltd/designstart/Makefile + create mode 100644 board/armltd/designstart/designstart.c + create mode 100644 configs/designstart_ca5_defconfig + create mode 100644 include/configs/designstart_ca5.h + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index f9dab073ea14..2cc9413114de 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -628,6 +628,12 @@ config ARCH_BCM6858 + select OF_CONTROL + imply CMD_DM + ++config TARGET_DESIGNSTART_CA5 ++ bool "Support Designstart Cortex-A5" ++ select CPU_V7A ++ select SEMIHOSTING ++ select PL01X_SERIAL ++ + config TARGET_VEXPRESS_CA15_TC2 + bool "Support vexpress_ca15_tc2" + select CPU_V7A +@@ -1782,6 +1788,7 @@ source "board/Marvell/gplugd/Kconfig" + source "board/armadeus/apf27/Kconfig" + source "board/armltd/vexpress/Kconfig" + source "board/armltd/vexpress64/Kconfig" ++source "board/armltd/designstart/Kconfig" + source "board/broadcom/bcm23550_w1d/Kconfig" + source "board/broadcom/bcm28155_ap/Kconfig" + source "board/broadcom/bcm963158/Kconfig" +diff --git a/board/armltd/designstart/Kconfig b/board/armltd/designstart/Kconfig +new file mode 100644 +index 000000000000..6446fe3f4492 +--- /dev/null ++++ b/board/armltd/designstart/Kconfig +@@ -0,0 +1,12 @@ ++if TARGET_DESIGNSTART_CA5 ++ ++config SYS_BOARD ++ default "designstart" ++ ++config SYS_VENDOR ++ default "armltd" ++ ++config SYS_CONFIG_NAME ++ default "designstart_ca5" ++ ++endif +diff --git a/board/armltd/designstart/Makefile b/board/armltd/designstart/Makefile +new file mode 100644 +index 000000000000..b64c905c7021 +--- /dev/null ++++ b/board/armltd/designstart/Makefile +@@ -0,0 +1,8 @@ ++# SPDX-License-Identifier: GPL-2.0+ ++# ++# (C) Copyright 2020 ARM Limited ++# (C) Copyright 2020 Linaro ++# Rui Miguel Silva ++# ++ ++obj-y := designstart.o +diff --git a/board/armltd/designstart/designstart.c b/board/armltd/designstart/designstart.c +new file mode 100644 +index 000000000000..b0400f110ce2 +--- /dev/null ++++ b/board/armltd/designstart/designstart.c +@@ -0,0 +1,49 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * (C) Copyright 2020 ARM Limited ++ * (C) Copyright 2020 Linaro ++ * Rui Miguel Silva ++ */ ++ ++#include ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++static const struct pl01x_serial_platdata serial_platdata = { ++ .base = V2M_UART0, ++ .type = TYPE_PL011, ++ .clock = CONFIG_PL011_CLOCK, ++}; ++ ++U_BOOT_DEVICE(designstart_serials) = { ++ .name = "serial_pl01x", ++ .platdata = &serial_platdata, ++}; ++ ++int board_init(void) ++{ ++ return 0; ++} ++ ++int dram_init(void) ++{ ++ gd->ram_size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++int dram_init_banksize(void) ++{ ++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; ++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; ++ ++ return 0; ++} ++ ++void reset_cpu(ulong addr) ++{ ++} ++ +diff --git a/configs/designstart_ca5_defconfig b/configs/designstart_ca5_defconfig +new file mode 100644 +index 000000000000..a2a756740295 +--- /dev/null ++++ b/configs/designstart_ca5_defconfig +@@ -0,0 +1,37 @@ ++CONFIG_ARM=y ++CONFIG_TARGET_DESIGNSTART_CA5=y ++CONFIG_SYS_TEXT_BASE=0x88000000 ++CONFIG_SYS_MALLOC_F_LEN=0x2000 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_IDENT_STRING=" ca5ds aarch32" ++CONFIG_BOOTDELAY=1 ++CONFIG_USE_BOOTARGS=y ++CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1a200000 root=/dev/ram0 rw loglevel=9" ++# CONFIG_DISPLAY_CPUINFO is not set ++# CONFIG_DISPLAY_BOARDINFO is not set ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_PROMPT="ca5ds32# " ++CONFIG_CMD_BOOTZ=y ++# CONFIG_CMD_CONSOLE is not set ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_XIMG is not set ++# CONFIG_CMD_EDITENV is not set ++# CONFIG_CMD_ENV_EXISTS is not set ++CONFIG_CMD_MEMTEST=y ++CONFIG_MTD_NOR_FLASH=y ++# CONFIG_CMD_LOADS is not set ++CONFIG_CMD_ARMFLASH=y ++# CONFIG_CMD_FPGA is not set ++# CONFIG_CMD_ITEST is not set ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_DHCP=y ++# CONFIG_CMD_NFS is not set ++CONFIG_CMD_MII=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_CACHE=y ++# CONFIG_CMD_MISC is not set ++CONFIG_CMD_FAT=y ++CONFIG_DM=y ++CONFIG_DM_SERIAL=y ++CONFIG_OF_LIBFDT=y ++ +diff --git a/include/configs/designstart_ca5.h b/include/configs/designstart_ca5.h +new file mode 100644 +index 000000000000..79c4b36060d2 +--- /dev/null ++++ b/include/configs/designstart_ca5.h +@@ -0,0 +1,122 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * (C) Copyright 2020 ARM Limited ++ * (C) Copyright 2020 Linaro ++ * Rui Miguel Silva ++ * ++ * Configuration for Cortex-A5 Designstart. Parts were derived from other ARM ++ * configurations. ++ */ ++ ++#ifndef __DESISGNSTART_CA5_H ++#define __DESISGNSTART_CA5_H ++ ++#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x03f00000) ++#define CONFIG_SKIP_LOWLEVEL_INIT ++ ++/* Generic Timer Definitions */ ++#define CONFIG_SYS_HZ_CLOCK 7500000 ++#define CONFIG_SYS_HZ 1000 ++#define COUNTER_FREQUENCY CONFIG_SYS_HZ_CLOCK ++ ++#ifdef CONFIG_DESIGNSTART_MEMORY_MAP_EXTENDED ++#define V2M_SRAM0 0x00010000 ++#define V2M_SRAM1 0x02200000 ++#define V2M_QSPI 0x0A800000 ++#else ++#define V2M_SRAM0 0x00000000 ++#define V2M_SRAM1 0x02000000 ++#define V2M_QSPI 0x08000000 ++#endif ++ ++#define V2M_DEBUG 0x10000000 ++#define V2M_BASE_PERIPH 0x1A000000 ++#define V2M_A5_PERIPH 0x1C000000 ++#define V2M_L2CC_PERIPH 0x1C010000 ++ ++#define V2M_MASTER_EXPANSION0 0x40000000 ++#define V2M_MASTER_EXPANSION1 0x60000000 ++ ++#define V2M_BASE 0x80000000 ++ ++#define V2M_PERIPH_OFFSET(x) (x << 16) ++ ++#define V2M_SYSID (V2M_BASE_PERIPH) ++#define V2M_SYCTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(1)) ++#define V2M_COUNTER_CTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(2)) ++#define V2M_COUNTER_READ (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(3)) ++#define V2M_TIMER_CTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(4)) ++#define V2M_TIMER0 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(5)) ++ ++#define V2M_WATCHDOG_CTL (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(16)) ++#define V2M_WATCHDOG_REFRESH (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(17)) ++ ++#define V2M_UART0 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(32)) ++#define V2M_UART1 (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(33)) ++ ++#define V2M_RTC (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(34)) ++#define V2M_TRNG (V2M_BASE_PERIPH + V2M_PERIPH_OFFSET(35)) ++ ++/* PL011 Serial Configuration */ ++#define CONFIG_CONS_INDEX 0 ++#define CONFIG_PL011_CLOCK 7500000 ++ ++/* Physical Memory Map */ ++#define PHYS_SDRAM_1 (V2M_BASE) ++ ++/* Top 16MB reserved for secure world use */ ++#define DRAM_SEC_SIZE 0x01000000 ++#define PHYS_SDRAM_1_SIZE 0x80000000 - DRAM_SEC_SIZE ++ ++/* Size of malloc() pool */ ++#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20)) ++ ++/* Miscellaneous configurable options */ ++#define CONFIG_SYS_LOAD_ADDR (V2M_BASE + 0x10000000) ++ ++#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 ++ ++#define CONFIG_SYS_MMIO_TIMER ++ ++/* Enable memtest */ ++#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM_1 ++#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE) ++ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ "kernel_name=Image\0" \ ++ "kernel_addr=0x80F00000\0" \ ++ "initrd_name=ramdisk.img\0" \ ++ "initrd_addr=0x84000000\0" \ ++ "fdt_name=devtree.dtb\0" \ ++ "fdt_addr=0x83000000\0" \ ++ "fdt_high=0xffffffff\0" \ ++ "initrd_high=0xffffffff\0" ++ ++#define CONFIG_BOOTCOMMAND "echo copy to RAM...; " \ ++ "cp.b 0x80100000 $kernel_addr 0xB00000; " \ ++ "cp.b 0x80D00000 $initrd_addr 0x800000; " \ ++ "bootz $kernel_addr $initrd_addr $fdt_addr" ++ ++/* Monitor Command Prompt */ ++#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ ++#define CONFIG_SYS_MAXARGS 64 /* max command args */ ++ ++#define CONFIG_SYS_FLASH_BASE 0x80000000 ++/* 256 x 256KiB sectors */ ++#define CONFIG_SYS_MAX_FLASH_SECT 256 ++/* Store environment at top of flash */ ++#define CONFIG_ENV_ADDR 0x0A7C0000 ++#define CONFIG_ENV_SECT_SIZE 0x00040000 ++ ++#define CONFIG_SYS_FLASH_CFI 1 ++#define CONFIG_FLASH_CFI_DRIVER 1 ++#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT ++#define CONFIG_SYS_MAX_FLASH_BANKS 1 ++ ++#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes */ ++#define CONFIG_SYS_FLASH_PROTECTION /* The devices have real protection */ ++#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */ ++#define FLASH_MAX_SECTOR_SIZE 0x00040000 ++#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE ++#define CONFIG_ENV_IS_IN_FLASH 1 ++#endif +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/fvp-common/u-boot_vexpress_fvp.patch b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/fvp-common/u-boot_vexpress_fvp.patch new file mode 100644 index 00000000..bdca202c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/fvp-common/u-boot_vexpress_fvp.patch @@ -0,0 +1,13 @@ +diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig +index c9cec8322c..3a339be6a2 100644 +--- a/configs/vexpress_aemv8a_semi_defconfig ++++ b/configs/vexpress_aemv8a_semi_defconfig +@@ -9,7 +9,7 @@ CONFIG_IDENT_STRING=" vexpress_aemv8a" + CONFIG_DISTRO_DEFAULTS=y + CONFIG_BOOTDELAY=1 + CONFIG_USE_BOOTARGS=y +-CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9" ++CONFIG_BOOTARGS="console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 androidboot.hardware=fvpbase root=/dev/vda2 rw rootwait loglevel=9" + # CONFIG_USE_BOOTCOMMAND is not set + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/juno/u-boot_vexpress_uenv.patch b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/juno/u-boot_vexpress_uenv.patch new file mode 100644 index 00000000..bb90c176 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/files/juno/u-boot_vexpress_uenv.patch @@ -0,0 +1,37 @@ +diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h +index 2354f4e958..3e01f477dc 100644 +--- a/include/configs/vexpress_aemv8a.h ++++ b/include/configs/vexpress_aemv8a.h +@@ -151,6 +151,32 @@ + "fdt_addr=0x83000000\0" \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ ++ "bootenvfile=uEnv.txt\0" \ ++ "bootcmd=run envboot\0" \ ++ "envboot=if run loadbootenv; then echo Loading env from ${bootenvfile}; run importbootenv; else run default_bootcmd; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd;fi;\0" \ ++ "importbootenv=echo Importing environment from memory, size ${filesize}; env import -t ${loadaddr} ${filesize}\0" \ ++ "loadaddr=0x82000000\0" \ ++ "filesize=0x4000\0" \ ++ "loadbootenv=mw.l ${loadaddr} 0 0x1000; afs load ${bootenvfile} ${loadaddr}\0" \ ++ "default_bootcmd=echo running default boot command; afs load ${kernel_name} ${kernel_addr} ; " \ ++ "if test $? -eq 1; then "\ ++ " echo Loading ${kernel_alt_name} instead of "\ ++ "${kernel_name}; "\ ++ " afs load ${kernel_alt_name} ${kernel_addr};"\ ++ "fi ; "\ ++ "afs load ${fdtfile} ${fdt_addr} ; " \ ++ "if test $? -eq 1; then "\ ++ " echo Loading ${fdt_alt_name} instead of "\ ++ "${fdtfile}; "\ ++ " afs load ${fdt_alt_name} ${fdt_addr}; "\ ++ "fi ; "\ ++ "fdt addr ${fdt_addr}; fdt resize; " \ ++ "if afs load ${initrd_name} ${initrd_addr} ; "\ ++ "then "\ ++ " setenv initrd_param ${initrd_addr}; "\ ++ " else setenv initrd_param -; "\ ++ "fi ; " \ ++ "booti ${kernel_addr} ${initrd_param} ${fdt_addr}\0" + + /* Copy the kernel and FDT to DRAM memory and boot */ + #define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr} ; " \ diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend new file mode 100644 index 00000000..20133a4d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend @@ -0,0 +1,8 @@ +# Machine specific u-boot + +FILESEXTRAPATHS_prepend := "${THISDIR}/files/${MACHINE}:" + +SRC_URI_append_a5ds = " file://0001-armv7-add-mmio-timer.patch \ + file://0002-board-arm-add-designstart-cortex-a5-board.patch" + + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.%.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.%.bbappend new file mode 100644 index 00000000..a46e36f0 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.%.bbappend @@ -0,0 +1,13 @@ +# u-boot_2020 patch for fvp machinesboard + +# +# Patch u-boot to change kernel command line +# + +FILESEXTRAPATHS_prepend_fvp-base := "${THISDIR}/files/fvp-common:" +FILESEXTRAPATHS_prepend_foundation-armv8 := "${THISDIR}/files/fvp-common:" +FILESEXTRAPATHS_prepend_juno := "${THISDIR}/files:" + +SRC_URI_append_fvp-base = " file://u-boot_vexpress_fvp.patch" +SRC_URI_append_foundation-armv8 = " file://u-boot_vexpress_fvp.patch" +SRC_URI_append_juno = " file://u-boot_vexpress_uenv.patch" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/files/juno/interfaces b/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/files/juno/interfaces new file mode 100644 index 00000000..8c323c2a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/files/juno/interfaces @@ -0,0 +1,32 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wireless interfaces +iface wlan0 inet dhcp + wireless_mode managed + wireless_essid any + wpa-driver wext + wpa-conf /etc/wpa_supplicant.conf + + +# Wired or wireless interfaces +auto eth0 +# Juno has 2 ethernet (front and back) +auto eth1 +iface eth0 inet dhcp +iface eth1 inet dhcp + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +iface usb0 inet static + address 192.168.7.2 + netmask 255.255.255.0 + network 192.168.7.0 + gateway 192.168.7.1 + +# Bluetooth networking +iface bnep0 inet dhcp + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend new file mode 100644 index 00000000..8b5120fe --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend @@ -0,0 +1,7 @@ +# Use custom interface file for Juno + +# +# Enable second network interface on startup +# + +FILESEXTRAPATHS_prepend_juno := "${THISDIR}/files/juno:" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/files/start-gem5.sh b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/files/start-gem5.sh new file mode 100644 index 00000000..4edc0e51 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/files/start-gem5.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Get parameters from bitbake configuration + +source <(bitbake -e gem5-aarch64-native | grep \ + -e "^STAGING_.*_NATIVE=" \ + -e "^DEPLOY_DIR.*=" \ + -e "^GEM5_RUN.*=") + +export M5_PATH="${DEPLOY_DIR_IMAGE}" + +args="" + +if [ -n "${GEM5_RUN_KERNEL}" ]; then + kernfile=$(readlink -f ${DEPLOY_DIR_IMAGE}/${GEM5_RUN_KERNEL}) + args="$args --kernel=$kernfile" +fi + +if [ -n "${GEM5_RUN_DISK}" ]; then + diskfile=$(readlink -f ${DEPLOY_DIR_IMAGE}/${GEM5_RUN_DISK}) + args="$args --disk-image=$diskfile" +fi + +if [ -n "${GEM5_RUN_DTB}" ]; then + dtbfile=$(readlink -f ${DEPLOY_DIR_IMAGE}/${GEM5_RUN_DTB}) + args="$args --dtb=$dtbfile" +fi + +if [ -n "${GEM5_RUN_CMDLINE}" ]; then + args="$args --command-line='${GEM5_RUN_CMDLINE}'" +fi + +if [ -n "${GEM5_RUN_EXTRA}" ]; then + args="$args ${GEM5_RUN_EXTRA}" +fi + +${STAGING_BINDIR_NATIVE}/${GEM5_RUN_CONFIG} \ + ${STAGING_DATADIR_NATIVE}/gem5/${GEM5_RUN_PROFILE} ${args} "$@" + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc new file mode 100644 index 00000000..4c479f5d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader.inc @@ -0,0 +1,28 @@ +# Build instructions for gem5 custom bootloader + +SUMMARY = "Gem5 AARCH64 boot loader" +LICENSE = "BSD" + +inherit deploy + +PROVIDES = "virtual/gem5-bootloader" + +COMPATIBLE_MACHINE = "gem5-arm64" + +# no configure step +do_configure[noexec] = "1" + +# no install +do_install[noexec] = "1" + +do_compile() { + oe_runmake -C system/arm/aarch64_bootloader all CROSS_COMPILE=${TARGET_PREFIX} +} + +do_deploy() { + oe_runmake -C system/arm/aarch64_bootloader install \ + CROSS_COMPILE=${TARGET_PREFIX} DESTDIR=${DEPLOYDIR}/binaries +} + +addtask deploy before do_build after do_compile + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb new file mode 100644 index 00000000..a3ab5aa7 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-bootloader_git.bb @@ -0,0 +1,18 @@ +# gem5 custom bootloader + +LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \ + file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec" + +# The recipe is currently using a version in the release staging branch of gem5 +# until version 20 is released +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=release-staging-v20.0.0.0" + +PV = "git${SRCPV}" + +S = "${WORKDIR}/git" + +SRCREV = "0bc5d77ed27e0765953d93c2376a4b4aea675a01" + +BPN = "gem5-aarch64-bootloader" + +require gem5-aarch64-bootloader.inc diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb new file mode 100644 index 00000000..b97a1b28 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-dtb.bb @@ -0,0 +1,30 @@ +# Use gem5 executable to produce a dtb + +LICENSE = "MIT" + +inherit deploy + +DEPENDS = "gem5-aarch64-native" + +do_configure[noexec] = "1" + +do_compile() { + # generate a dtb using gem5 + gem5.opt \ + ${STAGING_DATADIR_NATIVE}/gem5/configs/example/arm/baremetal.py \ + --dtb-gen + + if [ ! -f m5out/system.dtb ]; then + echo "No dtb generated !!!" + exit 1 + fi +} + +do_install[noexec] = "1" + +do_deploy() { + install --d ${DEPLOYDIR} + cp m5out/system.dtb ${DEPLOYDIR}/gem5-aarch64.dtb +} +addtask deploy before do_build after do_compile + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc new file mode 100644 index 00000000..898fa23c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native.inc @@ -0,0 +1,42 @@ +# gem5 aarch64 specific configuration + +# Build arm64 gem5 +GEM5_BUILD_CONFIGS ?= "build/ARM/gem5.opt build/ARM/gem5.fast \ + build/ARM/gem5.debug" + +SRC_URI += "file://start-gem5.sh" + +inherit deploy + +# Parameters for the start script + +GEM5_RUN_CONFIG ?= "gem5.fast" + +# Linux kernel file to boot +GEM5_RUN_KERNEL ?= "vmlinux" + +# Disk Image to use +GEM5_RUN_DISK ?= "*-${MACHINE}.ext4" + +# DTB to use +GEM5_RUN_DTB ?= "${@os.path.basename(d.getVar('KERNEL_DEVICETREE'))}" + +# Linux command line to pass +GEM5_RUN_CMDLINE ?= "--command-line='earlyprintk=pl011,0x1c090000 \ + console=ttyAMA0 rw mem=512MB root=/dev/sda rootwait'" + +# Extra arguments to pass to gem5 +GEM5_RUN_EXTRA ?= "--mem-size=512MB -n 4 --machine-type=VExpress_GEM5_V2" + +#This is required so that our binaries are in the sysroot. We need this +# to have both gem5 required libraries and gem5 in the same sysroot. +addtask addto_recipe_sysroot after do_populate_sysroot before do_build + +do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_TOOLS}" +do_deploy() { + install -d ${DEPLOYDIR} + + install -m 755 ${WORKDIR}/start-gem5.sh ${DEPLOYDIR}/. +} +addtask deploy before do_build after do_compile + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb new file mode 100644 index 00000000..d36f24fe --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-aarch64-native_git.bb @@ -0,0 +1,26 @@ +# gem5 simulator source and checksum information + +LIC_FILES_CHKSUM = "file://COPYING;md5=2d9514d69d8abf88b6e9125e759bf0ab \ + file://LICENSE;md5=a585e2893cee63d16a1d8bc16c6297ec" + +# The recipe is currently using a version in the release staging branch of gem5 +# until version 20 is released +SRC_URI = "git://gem5.googlesource.com/public/gem5;protocol=https;branch=release-staging-v20.0.0.0" + +PV = "git${SRCPV}" + +S = "${WORKDIR}/git" + +SRCREV = "0bc5d77ed27e0765953d93c2376a4b4aea675a01" + +BPN = "gem5-aarch64-native" + +require gem5-aarch64-native.inc +require gem5-native.inc + +do_compile_prepend() { + # Gem5 expect to have python in the path (can be python2 or 3) + # Create a link named python to python3 + real=$(which ${PYTHON}) + ln -snf $real $(dirname $real)/python +} diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc new file mode 100644 index 00000000..429e18ce --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-devtools/gem5/gem5-native.inc @@ -0,0 +1,61 @@ +# gem5 platform independent build information + +SUMMARY = "A modular platform for computer-system architecture research" +HOMEPAGE = "http://gem5.org" +LICENSE = "BSD & MIT & LGPLv2.1" + +# Gem5 build and run parameter + +# What gem5 binary are we building +GEM5_BUILD_CONFIGS ?= "build/X86/gem5.opt" + +# Scons build arguments +GEM5_SCONS_ARGS ?= "-j ${BB_NUMBER_THREADS} CC=${BUILD_CC} CXX=${BUILD_CXX} \ + AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \ + PYTHON_CONFIG=python3-config" + +# Default profile to run +GEM5_RUN_PROFILE ?= "configs/example/fs.py" + +# We are building a native package and we need to use scons +inherit native scons + +# the build is using several tools: +# python3: scons and six +# google protobuf +# pkgconfig +# hdf5 +DEPENDS += "python3-six-native protobuf-native hdf5-native pkgconfig-native \ + boost-native libpng-native" + +EXTRA_OESCONS = "${GEM5_SCONS_ARGS}" + +do_compile_prepend() { + # We need to use the proper native libraries when executing + # compiled applications + export LD_LIBRARY_PATH="${STAGING_LIBDIR_NATIVE}" +} + +do_install() { + + install -d ${D}${datadir}/gem5 + cp -a --no-preserve=ownership -rf configs ${D}${datadir}/gem5/. + + for f in ${GEM5_BUILD_CONFIGS}; do + destname=$(basename $f) + install -d ${D}${bindir} + install -m 755 $f ${D}${bindir}/$destname.real + cat < ${D}${bindir}/$destname +#!/bin/bash +basedir=\$(cd \$(dirname \$0)/../../; pwd) +export LD_LIBRARY_PATH="\$basedir/lib:\$basedir/usr/lib" +\$basedir/usr/bin/$destname.real "\$@" +EOF + chmod a+x ${D}${bindir}/$destname + done +} + +FILES_${PN} = "${datadir}/gem5/* ${bindir}/*" +INSANE_SKIP_${PN} += "already-stripped" +RDEPENDS_${PN} += "python3-native hdf5-native protobuf-native libpng-native" + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/README.md b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/README.md new file mode 100644 index 00000000..ba61ca32 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/README.md @@ -0,0 +1,4 @@ +Arm platforms BSPs +================== + +This directory contains Arm platforms definitions and configuration for Linux. diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-standard.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-standard.scc new file mode 100644 index 00000000..d29e0b81 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp-standard.scc @@ -0,0 +1,11 @@ +define KMACHINE fvp +define KTYPE standard +define KARCH arm64 + +include ktypes/standard/standard.scc + +include fvp.scc + +# default policy for standard kernels +#include features/latencytop/latencytop.scc +#include features/profiling/profiling.scc diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp.scc new file mode 100644 index 00000000..79e3a69a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp.scc @@ -0,0 +1,14 @@ +include features/input/input.scc +include features/net/net.scc +include cfg/timer/no_hz.scc + +kconf hardware fvp/fvp-board.cfg +kconf hardware fvp/fvp-net.cfg +kconf hardware fvp/fvp-rtc.cfg +kconf hardware fvp/fvp-serial.cfg +kconf hardware fvp/fvp-virtio.cfg +kconf hardware fvp/fvp-cfi.cfg +kconf hardware fvp/fvp-drm.cfg +kconf hardware fvp/fvp-timer.cfg +kconf hardware fvp/fvp-virtio.cfg +kconf hardware fvp/fvp-watchdog.cfg diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-board.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-board.cfg new file mode 100644 index 00000000..2fd0264a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-board.cfg @@ -0,0 +1,11 @@ +CONFIG_ARM64=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y + +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-cfi.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-cfi.cfg new file mode 100644 index 00000000..f28e0d92 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-cfi.cfg @@ -0,0 +1,3 @@ +# CFI Flash +CONFIG_MTD=y +CONFIG_MTD_CFI=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-drm.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-drm.cfg new file mode 100644 index 00000000..77133a9d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-drm.cfg @@ -0,0 +1,5 @@ +# DRM CLCD +CONFIG_DRM=y +CONFIG_DRM_PL111=y +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-net.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-net.cfg new file mode 100644 index 00000000..54e3686d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-net.cfg @@ -0,0 +1,2 @@ +CONFIG_SMSC911X=y +CONFIG_SMC91X=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-rtc.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-rtc.cfg new file mode 100644 index 00000000..5d377b39 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-rtc.cfg @@ -0,0 +1,2 @@ +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-serial.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-serial.cfg new file mode 100644 index 00000000..44571640 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-serial.cfg @@ -0,0 +1,2 @@ +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-timer.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-timer.cfg new file mode 100644 index 00000000..144977f2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-timer.cfg @@ -0,0 +1,3 @@ +# Dual timer module +CONFIG_ARM_TIMER_SP804=y +CONFIG_CLK_SP810=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-virtio.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-virtio.cfg new file mode 100644 index 00000000..afc76a09 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-virtio.cfg @@ -0,0 +1,4 @@ +CONFIG_VIRTIO=y +CONFIG_VIRTIO_MMIO=y +CONFIG_BLOCK=y +CONFIG_VIRTIO_BLK=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-watchdog.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-watchdog.cfg new file mode 100644 index 00000000..977f317c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/fvp/fvp-watchdog.cfg @@ -0,0 +1,3 @@ +# Watchdog +CONFIG_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64-standard.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64-standard.scc new file mode 100644 index 00000000..0fb69e40 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64-standard.scc @@ -0,0 +1,11 @@ +define KMACHINE gem5-arm64 +define KTYPE standard +define KARCH arm64 + +include ktypes/standard/standard.scc + +include gem5-arm64.scc + +# default policy for standard kernels +#include features/latencytop/latencytop.scc +#include features/profiling/profiling.scc diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64.scc new file mode 100644 index 00000000..a24a3af2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64.scc @@ -0,0 +1,14 @@ +include features/input/input.scc +include features/net/net.scc +include cfg/timer/no_hz.scc + +kconf hardware gem5-arm64/gem5-arm64-board.cfg +kconf hardware gem5-arm64/gem5-arm64-drm.cfg +kconf hardware gem5-arm64/gem5-arm64-net.cfg +kconf hardware gem5-arm64/gem5-arm64-rtc.cfg +kconf hardware gem5-arm64/gem5-arm64-serial.cfg +kconf hardware gem5-arm64/gem5-arm64-virtio.cfg +kconf hardware gem5-arm64/gem5-arm64-cfi.cfg +kconf hardware gem5-arm64/gem5-arm64-virtio.cfg +kconf hardware gem5-arm64/gem5-arm64-pci.cfg +kconf hardware gem5-arm64/gem5-arm64-pata.cfg diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-board.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-board.cfg new file mode 100644 index 00000000..56bb9e6d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-board.cfg @@ -0,0 +1,23 @@ +CONFIG_ARM64=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_SMP=y +CONFIG_NR_CPUS=256 +CONFIG_HOTPLUG_CPU=y + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y + +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y + +CONFIG_VEXPRESS_CONFIG=y + +# Keyboard over AMBA +CONFIG_SERIO=y +CONFIG_SERIO_AMBAKMI=y + +CONFIG_MFD_VEXPRESS_SYSREG=y + +# Turn off RAID to speed up boot +CONFIG_MD=n +CONFIG_BTRFS_FS=n diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-cfi.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-cfi.cfg new file mode 100644 index 00000000..f28e0d92 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-cfi.cfg @@ -0,0 +1,3 @@ +# CFI Flash +CONFIG_MTD=y +CONFIG_MTD_CFI=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-drm.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-drm.cfg new file mode 100644 index 00000000..7c97020f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-drm.cfg @@ -0,0 +1,5 @@ +CONFIG_DRM=y +CONFIG_DRM_ARM=y +CONFIG_DRM_HDLCD=y +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-net.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-net.cfg new file mode 100644 index 00000000..54e3686d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-net.cfg @@ -0,0 +1,2 @@ +CONFIG_SMSC911X=y +CONFIG_SMC91X=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pata.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pata.cfg new file mode 100644 index 00000000..62722880 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pata.cfg @@ -0,0 +1,12 @@ +CONFIG_ATA=y +CONFIG_ATA_GENERIC=y +CONFIG_PATA_PLATFORM=y +CONFIG_PATA_OF_PLATFORM=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_ATA_PIIX=y +CONFIG_PATA_OLDPIIX=y +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_SG=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pci.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pci.cfg new file mode 100644 index 00000000..c8ae9d48 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-pci.cfg @@ -0,0 +1,2 @@ +CONFIG_PCI=y +CONFIG_PCI_HOST_GENERIC=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-rtc.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-rtc.cfg new file mode 100644 index 00000000..5d377b39 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-rtc.cfg @@ -0,0 +1,2 @@ +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-serial.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-serial.cfg new file mode 100644 index 00000000..f58e3c2e --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-serial.cfg @@ -0,0 +1,3 @@ +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-virtio.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-virtio.cfg new file mode 100644 index 00000000..b4a53da1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/gem5-arm64/gem5-arm64-virtio.cfg @@ -0,0 +1,9 @@ +CONFIG_VIRTIO=y +CONFIG_VIRTIO_MMIO=y +CONFIG_BLOCK=y +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_MQ_VIRTIO=y +CONFIG_SCSI_VIRTIO=y +CONFIG_VIRTIO_BLK_SCSI=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_PCI_LEGACY=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno-standard.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno-standard.scc new file mode 100644 index 00000000..c9d2405a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno-standard.scc @@ -0,0 +1,11 @@ +define KMACHINE juno +define KTYPE standard +define KARCH arm64 + +include ktypes/standard/standard.scc + +include juno.scc + +# default policy for standard kernels +#include features/latencytop/latencytop.scc +#include features/profiling/profiling.scc diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno.scc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno.scc new file mode 100644 index 00000000..2980b393 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno.scc @@ -0,0 +1,22 @@ +include features/input/input.scc +include features/net/net.scc +include cfg/timer/no_hz.scc +include cfg/usb-mass-storage.scc + +kconf hardware juno/juno-board.cfg +kconf hardware juno/juno-devfreq.cfg +kconf hardware juno/juno-dma.cfg +kconf hardware juno/juno-drm.cfg +kconf hardware juno/juno-fb.cfg +kconf hardware juno/juno-i2c.cfg +# kconf hardware juno/juno-mali-midgard.cfg +kconf hardware juno/juno-mmc.cfg +kconf hardware juno/juno-net.cfg +kconf hardware juno/juno-pci.cfg +kconf hardware juno/juno-rtc.cfg +kconf hardware juno/juno-sata.cfg +kconf hardware juno/juno-serial.cfg +kconf hardware juno/juno-sound.cfg +kconf hardware juno/juno-thermal.cfg +kconf hardware juno/juno-usb.cfg + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-board.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-board.cfg new file mode 100644 index 00000000..73ea0765 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-board.cfg @@ -0,0 +1,43 @@ +CONFIG_ARM64=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y + +# Keyboard over AMBA +CONFIG_SERIO=y +CONFIG_SERIO_AMBAKMI=y + +# Hardware mailbox +CONFIG_MAILBOX=y +CONFIG_ARM_MHU=y + +# SCMI support +CONFIG_ARM_SCMI_PROTOCOL=y +CONFIG_ARM_SCMI_POWER_DOMAIN=y +CONFIG_SENSORS_ARM_SCMI=y +CONFIG_COMMON_CLK_SCMI=y + +# Power Interface and system control +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_ARM_SCPI_POWER_DOMAIN=y +CONFIG_SENSORS_ARM_SCPI=y +CONFIG_COMMON_CLK_SCPI=y + +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y + +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y + +CONFIG_CPU_FREQ=y +CONFIG_ARM_BIG_LITTLE_CPUFREQ=y +CONFIG_ARM_DT_BL_CPUFREQ=y +CONFIG_ARM_SCPI_CPUFREQ=y + +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y + +CONFIG_CONNECTOR=y +CONFIG_ARM_TIMER_SP804=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-devfreq.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-devfreq.cfg new file mode 100644 index 00000000..474e0105 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-devfreq.cfg @@ -0,0 +1,4 @@ +CONFIG_PM_DEVFREQ=y +CONFIG_DEVFREQ_THERMAL=y +CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y +CONFIG_DEVFREQ_GOV_PERFORMANCE=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-dma.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-dma.cfg new file mode 100644 index 00000000..cbdffa3e --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-dma.cfg @@ -0,0 +1,5 @@ +CONFIG_DMADEVICES=y +CONFIG_PL330_DMA=y +CONFIG_CMA=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=96 diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-drm.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-drm.cfg new file mode 100644 index 00000000..fb5e855a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-drm.cfg @@ -0,0 +1,6 @@ +CONFIG_DRM=y +CONFIG_DRM_ARM=y +CONFIG_DRM_HDLCD=y +CONFIG_DRM_I2C_NXP_TDA998X=y +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-fb.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-fb.cfg new file mode 100644 index 00000000..59499fa6 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-fb.cfg @@ -0,0 +1,4 @@ +CONFIG_FB=y +CONFIG_FB_ARMCLCD=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_VGA_CONSOLE is not set diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-i2c.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-i2c.cfg new file mode 100644 index 00000000..97f80c43 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-i2c.cfg @@ -0,0 +1,2 @@ +CONFIG_I2C=y +CONFIG_I2C_DESIGNWARE_PLATFORM=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mali-midgard.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mali-midgard.cfg new file mode 100644 index 00000000..adf02b7f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mali-midgard.cfg @@ -0,0 +1,7 @@ +CONFIG_MALI_MIDGARD=y +CONFIG_MALI_EXPERT=y +CONFIG_MALI_PLATFORM_FAKE=y +CONFIG_MALI_PLATFORM_THIRDPARTY=y +CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="juno_soc" +CONFIG_MALI_PLATFORM_DEVICETREE=y +CONFIG_MALI_DEVFREQ=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mmc.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mmc.cfg new file mode 100644 index 00000000..41af527c --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-mmc.cfg @@ -0,0 +1,2 @@ +CONFIG_MMC=y +CONFIG_MMC_ARMMMCI=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-net.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-net.cfg new file mode 100644 index 00000000..54e3686d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-net.cfg @@ -0,0 +1,2 @@ +CONFIG_SMSC911X=y +CONFIG_SMC91X=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-pci.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-pci.cfg new file mode 100644 index 00000000..295d190d --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-pci.cfg @@ -0,0 +1,11 @@ +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_REALLOC_ENABLE_AUTO=y +CONFIG_PCI_PRI=y +CONFIG_PCI_PASID=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCIEPORTBUS=y +CONFIG_HOTPLUG_PCI=y +CONFIG_HOTPLUG_PCI_PCIE=y +CONFIG_PCIEAER=y +CONFIG_PCIE_ECRC=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-rtc.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-rtc.cfg new file mode 100644 index 00000000..5d377b39 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-rtc.cfg @@ -0,0 +1,2 @@ +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sata.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sata.cfg new file mode 100644 index 00000000..a159af8f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sata.cfg @@ -0,0 +1,3 @@ +CONFIG_ATA=y +CONFIG_SATA_SIL24=y +CONFIG_SKY2=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-serial.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-serial.cfg new file mode 100644 index 00000000..44571640 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-serial.cfg @@ -0,0 +1,2 @@ +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sound.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sound.cfg new file mode 100644 index 00000000..399c77dd --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-sound.cfg @@ -0,0 +1,13 @@ +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SEQUENCER=y +CONFIG_SND_SEQ_DUMMY=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_USB is not set +CONFIG_SND_SOC=y +CONFIG_SND_DESIGNWARE_I2S=y +CONFIG_SND_SOC_HDMI_CODEC=y +CONFIG_SND_SOC_SPDIF=y +CONFIG_SND_SIMPLE_CARD=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-thermal.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-thermal.cfg new file mode 100644 index 00000000..6241374a --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-thermal.cfg @@ -0,0 +1,5 @@ +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_CPU_THERMAL=y +CONFIG_THERMAL_WRITABLE_TRIPS=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-usb.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-usb.cfg new file mode 100644 index 00000000..9159de15 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/arm-platforms-kmeta/bsp/arm-platforms/juno/juno-usb.cfg @@ -0,0 +1,7 @@ +CONFIG_USB_STORAGE=y +CONFIG_USB=y +CONFIG_USB_ULPI=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_OHCI_HCD=y diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch new file mode 100644 index 00000000..372d0afb --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch @@ -0,0 +1,52 @@ +rom d078e29aa31ac3fa4c041bf89c46bc6372c1a02a Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Mon, 2 Jul 2018 23:10:28 -0400 +Subject: menuconfig,mconf-cfg: Allow specification of ncurses location + +In some cross build environments such as the Yocto Project build +environment it provides an ncurses library that is compiled +differently than the host's version. This causes display corruption +problems when the host's curses includes are used instead of the +includes from the provided compiler are overridden. There is a second +case where there is no curses libraries at all on the host system and +menuconfig will just fail entirely. + +The solution is simply to allow an override variable in +check-lxdialog.sh for environments such as the Yocto Project. Adding +a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing +compiling and linking against the right headers and libraries. + +Signed-off-by: Jason Wessel +cc: Michal Marek +cc: linux-kbuild@vger.kernel.org +Signed-off-by: Bruce Ashfield +--- + scripts/kconfig/mconf-cfg.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + mode change 100755 => 100644 scripts/kconfig/mconf-cfg.sh + +(limited to 'scripts/kconfig/mconf-cfg.sh') + +diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh +old mode 100755 +new mode 100644 +index c812872d7f9d..65a9b9e5b8a6 +--- a/scripts/kconfig/mconf-cfg.sh ++++ b/scripts/kconfig/mconf-cfg.sh +@@ -4,6 +4,14 @@ + PKG="ncursesw" + PKG2="ncurses" + ++if [ "$CROSS_CURSES_LIB" != "" ]; then ++ echo libs=\'$CROSS_CURSES_LIB\' ++ if [ x"$CROSS_CURSES_INC" != x ]; then ++ echo cflags=\'$CROSS_CURSES_INC\' ++ fi ++ exit 0 ++fi ++ + if [ -n "$(command -v pkg-config)" ]; then + if pkg-config --exists $PKG; then + echo cflags=\"$(pkg-config --cflags $PKG)\" +-- +cgit v1.2.2-1-g5e49 diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-common-custom.dtsi b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-common-custom.dtsi new file mode 100644 index 00000000..1e056be3 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-common-custom.dtsi @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/memreserve/ 0x80000000 0x00010000; + +/include/ "rtsm_ve-motherboard-nomap.dtsi" + +/ { + model = "FVP Base"; + compatible = "arm,vfp-base", "arm,vexpress"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + serial0 = &v2m_serial0; + serial1 = &v2m_serial1; + serial2 = &v2m_serial2; + serial3 = &v2m_serial3; + }; + + psci { + compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + cpus { + #address-cells = <2>; + #size-cells = <0>; + + cpu-map { + cluster0 { + core0 { + cpu = <&CPU0>; + }; + core1 { + cpu = <&CPU1>; + }; + core2 { + cpu = <&CPU2>; + }; + core3 { + cpu = <&CPU3>; + }; + }; + + cluster1 { + core0 { + cpu = <&CPU4>; + }; + core1 { + cpu = <&CPU5>; + }; + core2 { + cpu = <&CPU6>; + }; + core3 { + cpu = <&CPU7>; + }; + }; + }; + + idle-states { + entry-method = "arm,psci"; + + CPU_SLEEP_0: cpu-sleep-0 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <40>; + exit-latency-us = <100>; + min-residency-us = <150>; + }; + + CLUSTER_SLEEP_0: cluster-sleep-0 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x1010000>; + entry-latency-us = <500>; + exit-latency-us = <1000>; + min-residency-us = <2500>; + }; + }; + + CPU0:cpu@0 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x0>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU1:cpu@1 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x1>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU2:cpu@2 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x2>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU3:cpu@3 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x3>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU4:cpu@100 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x100>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU5:cpu@101 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x101>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU6:cpu@102 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x102>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + CPU7:cpu@103 { + device_type = "cpu"; + compatible = "arm,armv8"; + reg = <0x0 0x103>; + enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + next-level-cache = <&L2_0>; + }; + + L2_0: l2-cache0 { + compatible = "cache"; + }; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x00000000 0x80000000 0 0x7F000000>, + <0x00000008 0x80000000 0 0x80000000>; + }; + + gic: interrupt-controller@2f000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + interrupt-controller; + reg = <0x0 0x2f000000 0 0x10000>, // GICD + <0x0 0x2f100000 0 0x200000>, // GICR + <0x0 0x2c000000 0 0x2000>, // GICC + <0x0 0x2c010000 0 0x2000>, // GICH + <0x0 0x2c02f000 0 0x2000>; // GICV + interrupts = <1 9 4>; + + its: its@2f020000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x0 0x2f020000 0x0 0x20000>; // GITS + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <1 13 0xff01>, + <1 14 0xff01>, + <1 11 0xff01>, + <1 10 0xff01>; + clock-frequency = <100000000>; + }; + + timer@2a810000 { + compatible = "arm,armv7-timer-mem"; + reg = <0x0 0x2a810000 0x0 0x10000>; + clock-frequency = <100000000>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + frame@2a830000 { + frame-number = <1>; + interrupts = <0 26 4>; + reg = <0x0 0x2a830000 0x0 0x10000>; + }; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0 60 4>, + <0 61 4>, + <0 62 4>, + <0 63 4>; + }; + + smb@8000000 { + compatible = "simple-bus"; + + #address-cells = <2>; + #size-cells = <1>; + ranges = <0 0 0 0x08000000 0x04000000>, + <1 0 0 0x14000000 0x04000000>, + <2 0 0 0x18000000 0x04000000>, + <3 0 0 0x1c000000 0x04000000>, + <4 0 0 0x0c000000 0x04000000>, + <5 0 0 0x10000000 0x04000000>; + }; + + panels { + panel { + compatible = "panel"; + mode = "XVGA"; + refresh = <60>; + xres = <1024>; + yres = <768>; + pixclock = <15748>; + left_margin = <152>; + right_margin = <48>; + upper_margin = <23>; + lower_margin = <3>; + hsync_len = <104>; + vsync_len = <4>; + sync = <0>; + vmode = "FB_VMODE_NONINTERLACED"; + tim2 = "TIM2_BCD", "TIM2_IPC"; + cntl = "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)"; + caps = "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888"; + bpp = <16>; + }; + }; + +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-custom.dts b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-custom.dts new file mode 100644 index 00000000..984dbca9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/fvp-base-gicv3-psci-custom.dts @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/dts-v1/; + +/include/ "fvp-base-gicv3-psci-common-custom.dtsi" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/rtsm_ve-motherboard-nomap.dtsi b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/rtsm_ve-motherboard-nomap.dtsi new file mode 100644 index 00000000..739af574 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/arm/rtsm_ve-motherboard-nomap.dtsi @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ARM Ltd. Fast Models + * + * Versatile Express (VE) system model + * Motherboard component + * + * VEMotherBoard.lisa + * + * This is a duplicate of rtsm_ve-motherboard.dtsi but not + * using interrupt-map as this is not properly supported in + * xen right now + */ +/ { + smb@8000000 { + motherboard { + arm,v2m-memory-map = "rs1"; + compatible = "arm,vexpress,v2m-p1", "simple-bus"; + #address-cells = <2>; /* SMB chipselect number and offset */ + #size-cells = <1>; + ranges; + + flash@0,00000000 { + compatible = "arm,vexpress-flash", "cfi-flash"; + reg = <0 0x00000000 0x04000000>, + <4 0x00000000 0x04000000>; + bank-width = <4>; + }; + + v2m_video_ram: vram@2,00000000 { + compatible = "arm,vexpress-vram"; + reg = <2 0x00000000 0x00800000>; + }; + + ethernet@2,02000000 { + compatible = "smsc,lan91c111"; + reg = <2 0x02000000 0x10000>; + interrupts = <0 15 4>; + }; + + v2m_clk24mhz: clk24mhz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "v2m:clk24mhz"; + }; + + v2m_refclk1mhz: refclk1mhz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <1000000>; + clock-output-names = "v2m:refclk1mhz"; + }; + + v2m_refclk32khz: refclk32khz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "v2m:refclk32khz"; + }; + + iofpga@3,00000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 3 0 0x200000>; + + v2m_sysreg: sysreg@10000 { + compatible = "arm,vexpress-sysreg"; + reg = <0x010000 0x1000>; + gpio-controller; + #gpio-cells = <2>; + }; + + v2m_sysctl: sysctl@20000 { + compatible = "arm,sp810", "arm,primecell"; + reg = <0x020000 0x1000>; + clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&v2m_clk24mhz>; + clock-names = "refclk", "timclk", "apb_pclk"; + #clock-cells = <1>; + clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; + assigned-clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&v2m_sysctl 3>, <&v2m_sysctl 3>; + assigned-clock-parents = <&v2m_refclk1mhz>, <&v2m_refclk1mhz>, <&v2m_refclk1mhz>, <&v2m_refclk1mhz>; + }; + + aaci@40000 { + compatible = "arm,pl041", "arm,primecell"; + reg = <0x040000 0x1000>; + interrupts = <0 11 4>; + clocks = <&v2m_clk24mhz>; + clock-names = "apb_pclk"; + }; + + mmci@50000 { + compatible = "arm,pl180", "arm,primecell"; + reg = <0x050000 0x1000>; + interrupts = <0 9 4 0 10 4>; + cd-gpios = <&v2m_sysreg 0 0>; + wp-gpios = <&v2m_sysreg 1 0>; + max-frequency = <12000000>; + vmmc-supply = <&v2m_fixed_3v3>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "mclk", "apb_pclk"; + }; + + kmi@60000 { + compatible = "arm,pl050", "arm,primecell"; + reg = <0x060000 0x1000>; + interrupts = <0 12 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "KMIREFCLK", "apb_pclk"; + }; + + kmi@70000 { + compatible = "arm,pl050", "arm,primecell"; + reg = <0x070000 0x1000>; + interrupts = <0 13 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "KMIREFCLK", "apb_pclk"; + }; + + v2m_serial0: uart@90000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x090000 0x1000>; + interrupts = <0 5 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "uartclk", "apb_pclk"; + }; + + v2m_serial1: uart@a0000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0a0000 0x1000>; + interrupts = <0 6 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "uartclk", "apb_pclk"; + }; + + v2m_serial2: uart@b0000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0b0000 0x1000>; + interrupts = <0 7 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "uartclk", "apb_pclk"; + }; + + v2m_serial3: uart@c0000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0c0000 0x1000>; + interrupts = <0 8 4>; + clocks = <&v2m_clk24mhz>, <&v2m_clk24mhz>; + clock-names = "uartclk", "apb_pclk"; + }; + + wdt@f0000 { + compatible = "arm,sp805", "arm,primecell"; + reg = <0x0f0000 0x1000>; + interrupts = <0 0 4>; + clocks = <&v2m_refclk32khz>, <&v2m_clk24mhz>; + clock-names = "wdogclk", "apb_pclk"; + }; + + v2m_timer01: timer@110000 { + compatible = "arm,sp804", "arm,primecell"; + reg = <0x110000 0x1000>; + interrupts = <0 2 4>; + clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&v2m_clk24mhz>; + clock-names = "timclken1", "timclken2", "apb_pclk"; + }; + + v2m_timer23: timer@120000 { + compatible = "arm,sp804", "arm,primecell"; + reg = <0x120000 0x1000>; + interrupts = <0 3 4>; + clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&v2m_clk24mhz>; + clock-names = "timclken1", "timclken2", "apb_pclk"; + }; + + rtc@170000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x170000 0x1000>; + interrupts = <0 4 4>; + clocks = <&v2m_clk24mhz>; + clock-names = "apb_pclk"; + }; + + clcd@1f0000 { + compatible = "arm,pl111", "arm,primecell"; + reg = <0x1f0000 0x1000>; + interrupt-names = "combined"; + interrupts = <0 14 4>; + clocks = <&v2m_oscclk1>, <&v2m_clk24mhz>; + clock-names = "clcdclk", "apb_pclk"; + arm,pl11x,framebuffer = <0x18000000 0x00180000>; + memory-region = <&v2m_video_ram>; + max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */ + + port { + v2m_clcd_pads: endpoint { + remote-endpoint = <&v2m_clcd_panel>; + arm,pl11x,tft-r0g0b0-pads = <0 8 16>; + }; + }; + + panel { + compatible = "panel-dpi"; + + port { + v2m_clcd_panel: endpoint { + remote-endpoint = <&v2m_clcd_pads>; + }; + }; + + panel-timing { + clock-frequency = <63500127>; + hactive = <1024>; + hback-porch = <152>; + hfront-porch = <48>; + hsync-len = <104>; + vactive = <768>; + vback-porch = <23>; + vfront-porch = <3>; + vsync-len = <4>; + }; + }; + }; + + virtio-block@130000 { + compatible = "virtio,mmio"; + reg = <0x130000 0x200>; + interrupts = <0 42 4>; + }; + }; + + v2m_fixed_3v3: v2m-3v3 { + compatible = "regulator-fixed"; + regulator-name = "3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + mcc { + compatible = "arm,vexpress,config-bus"; + arm,vexpress,config-bridge = <&v2m_sysreg>; + + v2m_oscclk1: oscclk1 { + /* CLCD clock */ + compatible = "arm,vexpress-osc"; + arm,vexpress-sysreg,func = <1 1>; + freq-range = <23750000 63500000>; + #clock-cells = <0>; + clock-output-names = "v2m:oscclk1"; + }; + + reset { + compatible = "arm,vexpress-reset"; + arm,vexpress-sysreg,func = <5 0>; + }; + + muxfpga { + compatible = "arm,vexpress-muxfpga"; + arm,vexpress-sysreg,func = <7 0>; + }; + + shutdown { + compatible = "arm,vexpress-shutdown"; + arm,vexpress-sysreg,func = <8 0>; + }; + + reboot { + compatible = "arm,vexpress-reboot"; + arm,vexpress-sysreg,func = <9 0>; + }; + + dvimode { + compatible = "arm,vexpress-dvimode"; + arm,vexpress-sysreg,func = <11 0>; + }; + }; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_1cpu.dts b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_1cpu.dts new file mode 100644 index 00000000..0e59fdf8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_1cpu.dts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2015-2016 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/dts-v1/; + +/memreserve/ 0x80000000 0x00010000; + +/include/ "vexpress_gem5_v2.dtsi" + +/ { + model = "V2P-AARCH64"; + compatible = "arm,vexpress,v2p-aarch64", "arm,vexpress"; + + memory@80000000 { + device_type = "memory"; + reg = <0 0x80000000 0x4 0x00000000>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 0 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + }; + + virt-encoder { + compatible = "drm,virtual-encoder"; + port { + dp0_virt_input: endpoint@0 { + remote-endpoint = <&dp0_output>; + }; + }; + + display-timings { + native-mode = <&timing0>; + + timing0: timing_1080p60 { + /* 1920x1080-60 */ + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <148>; + hback-porch = <88>; + hsync-len = <44>; + vfront-porch = <36>; + vback-porch = <4>; + vsync-len = <5>; + }; + }; + }; +}; + +&dp0 { + status = "ok"; + + port { + dp0_output: endpoint@0 { + remote-endpoint = <&dp0_virt_input>; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_2cpu.dts b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_2cpu.dts new file mode 100644 index 00000000..441d3df2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_2cpu.dts @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015-2016 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/dts-v1/; + +/memreserve/ 0x80000000 0x00010000; + +/include/ "vexpress_gem5_v2.dtsi" + +/ { + model = "V2P-AARCH64"; + compatible = "arm,vexpress,v2p-aarch64", "arm,vexpress"; + + memory@80000000 { + device_type = "memory"; + reg = <0 0x80000000 0x4 0x00000000>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 0 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 1 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + }; + + virt-encoder { + compatible = "drm,virtual-encoder"; + port { + dp0_virt_input: endpoint@0 { + remote-endpoint = <&dp0_output>; + }; + }; + + display-timings { + native-mode = <&timing0>; + + timing0: timing_1080p60 { + /* 1920x1080-60 */ + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <148>; + hback-porch = <88>; + hsync-len = <44>; + vfront-porch = <36>; + vback-porch = <4>; + vsync-len = <5>; + }; + }; + }; +}; + +&dp0 { + status = "ok"; + + port { + dp0_output: endpoint@0 { + remote-endpoint = <&dp0_virt_input>; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_4cpu.dts b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_4cpu.dts new file mode 100644 index 00000000..2d0311a5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_4cpu.dts @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2015-2016 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/dts-v1/; + +/memreserve/ 0x80000000 0x00010000; + +/include/ "vexpress_gem5_v2.dtsi" + +/ { + model = "V2P-AARCH64"; + compatible = "arm,vexpress,v2p-aarch64", "arm,vexpress"; + + memory@80000000 { + device_type = "memory"; + reg = <0 0x80000000 0x4 0x00000000>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 0 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 1 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@2 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 2 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@3 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 3 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + }; + + virt-encoder { + compatible = "drm,virtual-encoder"; + port { + dp0_virt_input: endpoint@0 { + remote-endpoint = <&dp0_output>; + }; + }; + + display-timings { + native-mode = <&timing0>; + + timing0: timing_1080p60 { + /* 1920x1080-60 */ + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <148>; + hback-porch = <88>; + hsync-len = <44>; + vfront-porch = <36>; + vback-porch = <4>; + vsync-len = <5>; + }; + }; + }; +}; + +&dp0 { + status = "ok"; + + port { + dp0_output: endpoint@0 { + remote-endpoint = <&dp0_virt_input>; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_8cpu.dts b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_8cpu.dts new file mode 100644 index 00000000..ba94d074 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/armv8_gem5_v2_8cpu.dts @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2015-2016 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/dts-v1/; + +/memreserve/ 0x80000000 0x00010000; + +/include/ "vexpress_gem5_v2.dtsi" + +/ { + model = "V2P-AARCH64"; + compatible = "arm,vexpress,v2p-aarch64", "arm,vexpress"; + + memory@80000000 { + device_type = "memory"; + reg = <0 0x80000000 0x4 0x00000000>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 0 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 1 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@2 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 2 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@3 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 3 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@4 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 4 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@5 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 5 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@6 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 6 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + cpu@7 { + device_type = "cpu"; + compatible = "gem5,armv8", "arm,armv8"; + reg = < 7 >; + enable-method = "spin-table"; + cpu-release-addr = <0 0x8000fff8>; + }; + + }; + + virt-encoder { + compatible = "drm,virtual-encoder"; + port { + dp0_virt_input: endpoint@0 { + remote-endpoint = <&dp0_output>; + }; + }; + + display-timings { + native-mode = <&timing0>; + + timing0: timing_1080p60 { + /* 1920x1080-60 */ + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hfront-porch = <148>; + hback-porch = <88>; + hsync-len = <44>; + vfront-porch = <36>; + vback-porch = <4>; + vsync-len = <5>; + }; + }; + }; +}; + +&dp0 { + status = "ok"; + + port { + dp0_output: endpoint@0 { + remote-endpoint = <&dp0_virt_input>; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2.dtsi b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2.dtsi new file mode 100644 index 00000000..e53e6e84 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2.dtsi @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2018 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/include/ "vexpress_gem5_v2_base.dtsi" + +/ { + /* The display processor needs custom configuration to setup its + * output ports. Disable it by default in the platform until the + * DT bindings have stabilize. + */ + dp0: hdlcd@2b000000 { + compatible = "arm,hdlcd"; + reg = <0x0 0x2b000000 0x0 0x1000>; + interrupts = <0 63 4>; + clocks = <&osc_pxl>; + clock-names = "pxlclk"; + status = "disabled"; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2_base.dtsi b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2_base.dtsi new file mode 100644 index 00000000..eba0db25 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/files/dts/gem5-arm64/vexpress_gem5_v2_base.dtsi @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2015-2017, 2019 ARM Limited + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Authors: Andreas Sandberg + */ + +/ { + arm,hbi = <0x0>; + arm,vexpress,site = <0xf>; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + gic: interrupt-controller@2c000000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x3>; + #address-cells = <0x2>; + ranges; + interrupt-controller; + redistributor-stride = <0x0 0x40000>; // 256kB stride + reg = <0x0 0x2c000000 0x0 0x10000 + 0x0 0x2c010000 0x0 0x2000000 // room for 128 redistributors using 128K each (256K strided...) + 0x0 0x0 0x0 0x0>; + interrupts = <1 9 0xf04>; + #size-cells = <0x2>; + linux,phandle = <0x1>; + phandle = <0x1>; + + gic-its@2e010000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <1>; + reg = <0x0 0x2e010000 0 0x20000>; + }; + }; + + timer { + compatible = "arm,cortex-a15-timer", + "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + clocks = <&osc_sys>; + clock-names="apb_pclk"; + }; + + pci { + compatible = "pci-host-ecam-generic"; + device_type = "pci"; + #address-cells = <0x3>; + #size-cells = <0x2>; + #interrupt-cells = <0x1>; + + reg = <0x0 0x30000000 0x0 0x10000000>; + + ranges = <0x01000000 0x0 0x00000000 0x0 0x2f000000 0x0 0x00010000>, + <0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>; + + /* + child unit address, #cells = #address-cells + child interrupt specifier, #cells = #interrupt-cells (INTA = 1, INTB = 2, INTC = 3 and INTD = 4) + interrupt-parent, phandle + parent unit address, #cells = #address-cells@gic + parent interrupt specifier, #cells = #interrupt-cells@gic + */ + interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x44 0x1 + 0x800 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x45 0x1 + 0x1000 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x46 0x1 + 0x1800 0x0 0x0 0x1 &gic 0x0 0x0 0x0 0x47 0x1>; + + interrupt-map-mask = <0x001800 0x0 0x0 0x0>; + dma-coherent; + }; + + kmi@1c060000 { + compatible = "arm,pl050", "arm,primecell"; + reg = <0x0 0x1c060000 0x0 0x1000>; + interrupts = <0 12 4>; + clocks = <&v2m_clk24mhz>, <&osc_smb>; + clock-names = "KMIREFCLK", "apb_pclk"; + }; + + kmi@1c070000 { + compatible = "arm,pl050", "arm,primecell"; + reg = <0x0 0x1c070000 0x0 0x1000>; + interrupts = <0 13 4>; + clocks = <&v2m_clk24mhz>, <&osc_smb>; + clock-names = "KMIREFCLK", "apb_pclk"; + }; + + uart0: uart@1c090000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0x0 0x1c090000 0x0 0x1000>; + interrupts = <0 5 4>; + clocks = <&osc_peripheral>, <&osc_smb>; + clock-names = "uartclk", "apb_pclk"; + }; + + rtc@1c170000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x0 0x1c170000 0x0 0x1000>; + interrupts = <0 4 4>; + clocks = <&osc_smb>; + clock-names = "apb_pclk"; + }; + + v2m_clk24mhz: clk24mhz { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "v2m:clk24mhz"; + }; + + + v2m_sysreg: sysreg@1c010000 { + compatible = "arm,vexpress-sysreg"; + reg = <0 0x1c010000 0x0 0x1000>; + gpio-controller; + #gpio-cells = <2>; + }; + + vio@1c130000 { + compatible = "virtio,mmio"; + reg = <0 0x1c130000 0x0 0x1000>; + interrupts = <0 42 4>; + }; + + vio@1c140000 { + compatible = "virtio,mmio"; + reg = <0 0x1c140000 0x0 0x1000>; + interrupts = <0 43 4>; + }; + + dcc { + compatible = "arm,vexpress,config-bus"; + arm,vexpress,config-bridge = <&v2m_sysreg>; + + osc_pxl: osc@5 { + compatible = "arm,vexpress-osc"; + arm,vexpress-sysreg,func = <1 5>; + freq-range = <23750000 1000000000>; + #clock-cells = <0>; + clock-output-names = "oscclk5"; + }; + + osc_smb: osc@6 { + compatible = "arm,vexpress-osc"; + arm,vexpress-sysreg,func = <1 6>; + freq-range = <20000000 50000000>; + #clock-cells = <0>; + clock-output-names = "oscclk6"; + }; + + osc_sys: osc@7 { + compatible = "arm,vexpress-osc"; + arm,vexpress-sysreg,func = <1 7>; + freq-range = <20000000 60000000>; + #clock-cells = <0>; + clock-output-names = "oscclk7"; + }; + }; + + + mcc { + compatible = "arm,vexpress,config-bus"; + arm,vexpress,config-bridge = <&v2m_sysreg>; + arm,vexpress,site = <0>; + + osc_peripheral: osc@2 { + compatible = "arm,vexpress-osc"; + arm,vexpress-sysreg,func = <1 2>; + freq-range = <24000000 24000000>; + #clock-cells = <0>; + clock-output-names = "v2m:oscclk2"; + }; + }; +}; diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0001-TMP-iommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0001-TMP-iommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch new file mode 100644 index 00000000..e1ff4a55 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0001-TMP-iommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch @@ -0,0 +1,46 @@ +From 4ebcbe09471d6b6b18fce42993489bed3801f10c Mon Sep 17 00:00:00 2001 +From: Jean-Philippe Brucker +Date: Fri, 24 Jan 2020 10:17:14 +0100 +Subject: [PATCH 1/4] TMP: iommu/arm-smmu-v3: Ignore IOPF capabilities + +Don't mandate PRI or stall to enable SVA. Some devices have their own +method for managing I/O page faults when they notice a translation +request that fails. + +Signed-off-by: Jean-Philippe Brucker +--- + drivers/iommu/arm-smmu-v3.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c +index fed6a9d5867e..a8d7d6ccbb21 100644 +--- a/drivers/iommu/arm-smmu-v3.c ++++ b/drivers/iommu/arm-smmu-v3.c +@@ -3276,7 +3276,23 @@ static bool arm_smmu_ats_supported(struct arm_smmu_master *master) + + static bool arm_smmu_iopf_supported(struct arm_smmu_master *master) + { +- return master->stall_enabled || master->pri_supported; ++ /* return master->stall_enabled || master->pri_supported; */ ++ ++ /* ++ * FIXME: this temporary hack allows enabling SVA for any endpoint even ++ * when they don't have PRI/stall. ++ * ++ * To implement this more cleanly, we need a third method, complementing ++ * stall_enabled and pri_supported, to enable IOPF. A bit that says ++ * "this device's page faults are handled out of band", called for ++ * example master->oob_iopf. How to set it? It can easily be a firmware ++ * quirk, but that does not suffice in my opinion. We need to know that ++ * there is software ready to handle these page faults. The device ++ * driver owning this endpoint could for example call ++ * iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_OOB_IOPF), before ++ * enabling IOMMU_DEV_FEAT_SVA. ++ */ ++ return true; + } + + static void arm_smmu_enable_ats(struct arm_smmu_master *master) +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0002-pci_quirk-add-acs-override-for-PCI-devices.patch b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0002-pci_quirk-add-acs-override-for-PCI-devices.patch new file mode 100644 index 00000000..a66083a8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0002-pci_quirk-add-acs-override-for-PCI-devices.patch @@ -0,0 +1,156 @@ +From 224e4adc6bc6a23f5deb3e1ebea03a85e3cad606 Mon Sep 17 00:00:00 2001 +From: Manoj Kumar +Date: Mon, 3 Feb 2020 10:11:19 +0000 +Subject: [PATCH 2/4] pci_quirk: add acs override for PCI devices + +Patch taken from: +https://gitlab.com/Queuecumber/linux-acs-override/raw/master/workspaces/5.4/acso.patch + +Signed-off-by: Manoj Kumar +--- + .../admin-guide/kernel-parameters.txt | 9 ++ + drivers/pci/quirks.c | 101 ++++++++++++++++++ + 2 files changed, 110 insertions(+) + +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index 8d7932502edc..f2be8337e98c 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -3423,6 +3423,15 @@ + nomsi [MSI] If the PCI_MSI kernel config parameter is + enabled, this kernel boot option can be used to + disable the use of MSI interrupts system-wide. ++ pcie_acs_override = ++ [PCIE] Override missing PCIe ACS support for: ++ downstream ++ All downstream ports - full ACS capabilities ++ multfunction ++ All multifunction devices - multifunction ACS subset ++ id:nnnn:nnnn ++ Specfic device - full ACS capabilities ++ Specified as vid:did (vendor/device ID) in hex + noioapicquirk [APIC] Disable all boot interrupt quirks. + Safety option to keep boot IRQs enabled. This + should never be necessary. +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index d134e12aab9d..9067bc7833be 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -3494,6 +3494,106 @@ static void quirk_no_bus_reset(struct pci_dev *dev) + dev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET; + } + ++static bool acs_on_downstream; ++static bool acs_on_multifunction; ++ ++#define NUM_ACS_IDS 16 ++struct acs_on_id { ++ unsigned short vendor; ++ unsigned short device; ++}; ++static struct acs_on_id acs_on_ids[NUM_ACS_IDS]; ++static u8 max_acs_id; ++ ++static __init int pcie_acs_override_setup(char *p) ++{ ++ if (!p) ++ return -EINVAL; ++ ++ while (*p) { ++ if (!strncmp(p, "downstream", 10)) ++ acs_on_downstream = true; ++ if (!strncmp(p, "multifunction", 13)) ++ acs_on_multifunction = true; ++ if (!strncmp(p, "id:", 3)) { ++ char opt[5]; ++ int ret; ++ long val; ++ ++ if (max_acs_id >= NUM_ACS_IDS - 1) { ++ pr_warn("Out of PCIe ACS override slots (%d)\n", ++ NUM_ACS_IDS); ++ goto next; ++ } ++ ++ p += 3; ++ snprintf(opt, 5, "%s", p); ++ ret = kstrtol(opt, 16, &val); ++ if (ret) { ++ pr_warn("PCIe ACS ID parse error %d\n", ret); ++ goto next; ++ } ++ acs_on_ids[max_acs_id].vendor = val; ++ ++ p += strcspn(p, ":"); ++ if (*p != ':') { ++ pr_warn("PCIe ACS invalid ID\n"); ++ goto next; ++ } ++ ++ p++; ++ snprintf(opt, 5, "%s", p); ++ ret = kstrtol(opt, 16, &val); ++ if (ret) { ++ pr_warn("PCIe ACS ID parse error %d\n", ret); ++ goto next; ++ } ++ acs_on_ids[max_acs_id].device = val; ++ max_acs_id++; ++ } ++next: ++ p += strcspn(p, ","); ++ if (*p == ',') ++ p++; ++ } ++ ++ if (acs_on_downstream || acs_on_multifunction || max_acs_id) ++ pr_warn("Warning: PCIe ACS overrides enabled; This may allow non-IOMMU protected peer-to-peer DMA\n"); ++ ++ return 0; ++} ++early_param("pcie_acs_override", pcie_acs_override_setup); ++ ++static int pcie_acs_overrides(struct pci_dev *dev, u16 acs_flags) ++{ ++ int i; ++ ++ /* Never override ACS for legacy devices or devices with ACS caps */ ++ if (!pci_is_pcie(dev) || ++ pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS)) ++ return -ENOTTY; ++ ++ for (i = 0; i < max_acs_id; i++) ++ if (acs_on_ids[i].vendor == dev->vendor && ++ acs_on_ids[i].device == dev->device) ++ return 1; ++ ++ switch (pci_pcie_type(dev)) { ++ case PCI_EXP_TYPE_DOWNSTREAM: ++ case PCI_EXP_TYPE_ROOT_PORT: ++ if (acs_on_downstream) ++ return 1; ++ break; ++ case PCI_EXP_TYPE_ENDPOINT: ++ case PCI_EXP_TYPE_UPSTREAM: ++ case PCI_EXP_TYPE_LEG_END: ++ case PCI_EXP_TYPE_RC_END: ++ if (acs_on_multifunction && dev->multifunction) ++ return 1; ++ } ++ ++ return -ENOTTY; ++} + /* + * Some Atheros AR9xxx and QCA988x chips do not behave after a bus reset. + * The device will throw a Link Down error on AER-capable systems and +@@ -4674,6 +4774,7 @@ static const struct pci_dev_acs_enabled { + { PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs }, + /* Amazon Annapurna Labs */ + { PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs }, ++ { PCI_ANY_ID, PCI_ANY_ID, pcie_acs_overrides }, + { 0 } + }; + +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch new file mode 100644 index 00000000..d827e9d0 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch @@ -0,0 +1,318 @@ +From 813f6c6015c75caf25553cd2e36361bac9151145 Mon Sep 17 00:00:00 2001 +From: Deepak Pandey +Date: Mon, 9 Dec 2019 16:06:38 +0000 +Subject: [PATCH 3/4] pcie: Add quirk for the Arm Neoverse N1SDP platform + +The Arm N1SDP SoC suffers from some PCIe integration issues, most +prominently config space accesses to not existing BDFs being answered +with a bus abort, resulting in an SError. +To mitigate this, the firmware scans the bus before boot (catching the +SErrors) and creates a table with valid BDFs, which acts as a filter for +Linux' config space accesses. + +Add code consulting the table as an ACPI PCIe quirk, also register the +corresponding device tree based description of the host controller. +Also fix the other two minor issues on the way, namely not being fully +ECAM compliant and config space accesses being restricted to 32-bit +accesses only. + +This allows the Arm Neoverse N1SDP board to boot Linux without crashing +and to access *any* devices (there are no platform devices except UART). + +Signed-off-by: Deepak Pandey +[Sudipto: extend to cover the CCIX root port as well] +Signed-off-by: Sudipto Paul +[Andre: fix coding style issues, rewrite some parts, add DT support] +Signed-off-by: Andre Przywara +--- + arch/arm64/configs/defconfig | 1 + + drivers/acpi/pci_mcfg.c | 7 + + drivers/pci/controller/Kconfig | 11 ++ + drivers/pci/controller/Makefile | 1 + + drivers/pci/controller/pcie-n1sdp.c | 196 ++++++++++++++++++++++++++++ + include/linux/pci-ecam.h | 2 + + 6 files changed, 218 insertions(+) + create mode 100644 drivers/pci/controller/pcie-n1sdp.c + +diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig +index 619a892148fb..56f00e82a4c4 100644 +--- a/arch/arm64/configs/defconfig ++++ b/arch/arm64/configs/defconfig +@@ -177,6 +177,7 @@ CONFIG_NET_9P=y + CONFIG_NET_9P_VIRTIO=y + CONFIG_PCI=y + CONFIG_PCIEPORTBUS=y ++CONFIG_PCI_QUIRKS=y + CONFIG_PCI_IOV=y + CONFIG_HOTPLUG_PCI=y + CONFIG_HOTPLUG_PCI_ACPI=y +diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c +index 6b347d9920cc..7a2b41b9ab57 100644 +--- a/drivers/acpi/pci_mcfg.c ++++ b/drivers/acpi/pci_mcfg.c +@@ -142,6 +142,13 @@ static struct mcfg_fixup mcfg_quirks[] = { + XGENE_V2_ECAM_MCFG(4, 0), + XGENE_V2_ECAM_MCFG(4, 1), + XGENE_V2_ECAM_MCFG(4, 2), ++ ++#define N1SDP_ECAM_MCFG(rev, seg, ops) \ ++ {"ARMLTD", "ARMN1SDP", rev, seg, MCFG_BUS_ANY, ops } ++ ++ /* N1SDP SoC with v1 PCIe controller */ ++ N1SDP_ECAM_MCFG(0x20181101, 0, &pci_n1sdp_pcie_ecam_ops), ++ N1SDP_ECAM_MCFG(0x20181101, 1, &pci_n1sdp_ccix_ecam_ops), + }; + + static char mcfg_oem_id[ACPI_OEM_ID_SIZE]; +diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig +index 70e078238899..03860176e339 100644 +--- a/drivers/pci/controller/Kconfig ++++ b/drivers/pci/controller/Kconfig +@@ -65,6 +65,17 @@ config PCI_FTPCI100 + depends on OF + default ARCH_GEMINI + ++config PCIE_HOST_N1SDP_ECAM ++ bool "ARM N1SDP PCIe Controller" ++ depends on ARM64 ++ depends on OF || (ACPI && PCI_QUIRKS) ++ select PCI_HOST_COMMON ++ default y if ARCH_VEXPRESS ++ help ++ Say Y here if you want PCIe support for the Arm N1SDP platform. ++ The controller is ECAM compliant, but needs a quirk to workaround ++ an integration issue. ++ + config PCI_TEGRA + bool "NVIDIA Tegra PCIe controller" + depends on ARCH_TEGRA || COMPILE_TEST +diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile +index a2a22c9d91af..7ea98c5a04ec 100644 +--- a/drivers/pci/controller/Makefile ++++ b/drivers/pci/controller/Makefile +@@ -30,6 +30,7 @@ obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o + obj-$(CONFIG_PCIE_MOBIVEIL) += pcie-mobiveil.o + obj-$(CONFIG_PCIE_TANGO_SMP8759) += pcie-tango.o + obj-$(CONFIG_VMD) += vmd.o ++obj-$(CONFIG_PCIE_HOST_N1SDP_ECAM) += pcie-n1sdp.o + # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW + obj-y += dwc/ + +diff --git a/drivers/pci/controller/pcie-n1sdp.c b/drivers/pci/controller/pcie-n1sdp.c +new file mode 100644 +index 000000000000..620ab221466c +--- /dev/null ++++ b/drivers/pci/controller/pcie-n1sdp.c +@@ -0,0 +1,196 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2018/2019 ARM Ltd. ++ * ++ * This quirk is to mask the following issues: ++ * - PCIE SLVERR: config space accesses to invalid PCIe BDFs cause a bus ++ * error (signalled as an asynchronous SError) ++ * - MCFG BDF mapping: the root complex is mapped separately from the device ++ * config space ++ * - Non 32-bit accesses to config space are not supported. ++ * ++ * At boot time the SCP board firmware creates a discovery table with ++ * the root complex' base address and the valid BDF values, discovered while ++ * scanning the config space and catching the SErrors. ++ * Linux responds only to the EPs listed in this table, returning NULL ++ * for the rest. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Platform specific values as hardcoded in the firmware. */ ++#define AP_NS_SHARED_MEM_BASE 0x06000000 ++#define MAX_SEGMENTS 2 /* Two PCIe root complexes. */ ++#define BDF_TABLE_SIZE SZ_16K ++ ++/* ++ * Shared memory layout as written by the SCP upon boot time: ++ * ---- ++ * Discover data header --> RC base address ++ * \-> BDF Count ++ * Discover data --> BDF 0...n ++ * ---- ++ */ ++struct pcie_discovery_data { ++ u32 rc_base_addr; ++ u32 nr_bdfs; ++ u32 valid_bdfs[0]; ++} *pcie_discovery_data[MAX_SEGMENTS]; ++ ++void __iomem *rc_remapped_addr[MAX_SEGMENTS]; ++ ++/* ++ * map_bus() is called before we do a config space access for a certain ++ * device. We use this to check whether this device is valid, avoiding ++ * config space accesses which would result in an SError otherwise. ++ */ ++static void __iomem *pci_n1sdp_map_bus(struct pci_bus *bus, unsigned int devfn, ++ int where) ++{ ++ struct pci_config_window *cfg = bus->sysdata; ++ unsigned int devfn_shift = cfg->ops->bus_shift - 8; ++ unsigned int busn = bus->number; ++ unsigned int segment = bus->domain_nr; ++ unsigned int bdf_addr; ++ unsigned int table_count, i; ++ ++ if (segment >= MAX_SEGMENTS || ++ busn < cfg->busr.start || busn > cfg->busr.end) ++ return NULL; ++ ++ /* The PCIe root complex has a separate config space mapping. */ ++ if (busn == 0 && devfn == 0) ++ return rc_remapped_addr[segment] + where; ++ ++ busn -= cfg->busr.start; ++ bdf_addr = (busn << cfg->ops->bus_shift) + (devfn << devfn_shift); ++ table_count = pcie_discovery_data[segment]->nr_bdfs; ++ for (i = 0; i < table_count; i++) { ++ if (bdf_addr == pcie_discovery_data[segment]->valid_bdfs[i]) ++ return pci_ecam_map_bus(bus, devfn, where); ++ } ++ ++ return NULL; ++} ++ ++static int pci_n1sdp_init(struct pci_config_window *cfg, unsigned int segment) ++{ ++ phys_addr_t table_base; ++ struct device *dev = cfg->parent; ++ struct pcie_discovery_data *shared_data; ++ size_t bdfs_size; ++ ++ if (segment >= MAX_SEGMENTS) ++ return -ENODEV; ++ ++ table_base = AP_NS_SHARED_MEM_BASE + segment * BDF_TABLE_SIZE; ++ ++ if (!request_mem_region(table_base, BDF_TABLE_SIZE, ++ "PCIe valid BDFs")) { ++ dev_err(dev, "PCIe BDF shared region request failed\n"); ++ return -ENOMEM; ++ } ++ ++ shared_data = devm_ioremap(dev, ++ table_base, BDF_TABLE_SIZE); ++ if (!shared_data) ++ return -ENOMEM; ++ ++ /* Copy the valid BDFs structure to allocated normal memory. */ ++ bdfs_size = sizeof(struct pcie_discovery_data) + ++ sizeof(u32) * shared_data->nr_bdfs; ++ pcie_discovery_data[segment] = devm_kmalloc(dev, bdfs_size, GFP_KERNEL); ++ if (!pcie_discovery_data[segment]) ++ return -ENOMEM; ++ ++ memcpy_fromio(pcie_discovery_data[segment], shared_data, bdfs_size); ++ ++ rc_remapped_addr[segment] = devm_ioremap_nocache(dev, ++ shared_data->rc_base_addr, ++ PCI_CFG_SPACE_EXP_SIZE); ++ if (!rc_remapped_addr[segment]) { ++ dev_err(dev, "Cannot remap root port base\n"); ++ return -ENOMEM; ++ } ++ ++ devm_iounmap(dev, shared_data); ++ ++ return 0; ++} ++ ++static int pci_n1sdp_pcie_init(struct pci_config_window *cfg) ++{ ++ return pci_n1sdp_init(cfg, 0); ++} ++ ++static int pci_n1sdp_ccix_init(struct pci_config_window *cfg) ++{ ++ return pci_n1sdp_init(cfg, 1); ++} ++ ++struct pci_ecam_ops pci_n1sdp_pcie_ecam_ops = { ++ .bus_shift = 20, ++ .init = pci_n1sdp_pcie_init, ++ .pci_ops = { ++ .map_bus = pci_n1sdp_map_bus, ++ .read = pci_generic_config_read32, ++ .write = pci_generic_config_write32, ++ } ++}; ++ ++struct pci_ecam_ops pci_n1sdp_ccix_ecam_ops = { ++ .bus_shift = 20, ++ .init = pci_n1sdp_ccix_init, ++ .pci_ops = { ++ .map_bus = pci_n1sdp_map_bus, ++ .read = pci_generic_config_read32, ++ .write = pci_generic_config_write32, ++ } ++}; ++ ++static const struct of_device_id n1sdp_pcie_of_match[] = { ++ { .compatible = "arm,n1sdp-pcie" }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(of, n1sdp_pcie_of_match); ++ ++static int n1sdp_pcie_probe(struct platform_device *pdev) ++{ ++ const struct device_node *of_node = pdev->dev.of_node; ++ u32 segment; ++ ++ if (of_property_read_u32(of_node, "linux,pci-domain", &segment)) { ++ dev_err(&pdev->dev, "N1SDP PCI controllers require linux,pci-domain property\n"); ++ return -EINVAL; ++ } ++ ++ switch (segment) { ++ case 0: ++ return pci_host_common_probe(pdev, &pci_n1sdp_pcie_ecam_ops); ++ case 1: ++ return pci_host_common_probe(pdev, &pci_n1sdp_ccix_ecam_ops); ++ } ++ ++ dev_err(&pdev->dev, "Invalid segment number, must be smaller than %d\n", ++ MAX_SEGMENTS); ++ ++ return -EINVAL; ++} ++ ++static struct platform_driver n1sdp_pcie_driver = { ++ .driver = { ++ .name = KBUILD_MODNAME, ++ .of_match_table = n1sdp_pcie_of_match, ++ .suppress_bind_attrs = true, ++ }, ++ .probe = n1sdp_pcie_probe, ++}; ++builtin_platform_driver(n1sdp_pcie_driver); +diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h +index a73164c85e78..03cdea69f4e8 100644 +--- a/include/linux/pci-ecam.h ++++ b/include/linux/pci-ecam.h +@@ -57,6 +57,8 @@ extern struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */ + extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */ + extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */ + extern struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */ ++extern struct pci_ecam_ops pci_n1sdp_pcie_ecam_ops; /* Arm N1SDP PCIe */ ++extern struct pci_ecam_ops pci_n1sdp_ccix_ecam_ops; /* Arm N1SDP PCIe */ + #endif + + #ifdef CONFIG_PCI_HOST_COMMON +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch new file mode 100644 index 00000000..6fb2dacd --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch @@ -0,0 +1,51 @@ +From 7bcc0412428050b0ab1fd70cbb4aaead5ac3c0e5 Mon Sep 17 00:00:00 2001 +From: Manoj Kumar +Date: Wed, 29 Jan 2020 17:21:39 +0000 +Subject: [PATCH 4/4] n1sdp: update n1sdp pci quirk for SR-IOV support + +VFs are not probing the vendor ID first, which is otherwise +the gate keeper for undiscovered devices. So any accesses using +a config space offset greater than 0 must be coming for an +already discovered device or from a VF that has just been created. + +Also if Linux already has a struct pci_dev* for a given BDF, +this device is safe to access. + +Skip the firmware table in these cases and allow accesses to +those devices. That enables SR-IOV support on the N1SDP board. + +Signed-off-by: Andre Przywara +--- + drivers/pci/controller/pcie-n1sdp.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/pci/controller/pcie-n1sdp.c b/drivers/pci/controller/pcie-n1sdp.c +index 620ab221466c..04c0de043817 100644 +--- a/drivers/pci/controller/pcie-n1sdp.c ++++ b/drivers/pci/controller/pcie-n1sdp.c +@@ -61,6 +61,7 @@ static void __iomem *pci_n1sdp_map_bus(struct pci_bus *bus, unsigned int devfn, + unsigned int segment = bus->domain_nr; + unsigned int bdf_addr; + unsigned int table_count, i; ++ struct pci_dev *dev; + + if (segment >= MAX_SEGMENTS || + busn < cfg->busr.start || busn > cfg->busr.end) +@@ -70,6 +71,14 @@ static void __iomem *pci_n1sdp_map_bus(struct pci_bus *bus, unsigned int devfn, + if (busn == 0 && devfn == 0) + return rc_remapped_addr[segment] + where; + ++ dev = pci_get_domain_bus_and_slot(segment, busn, devfn); ++ if (dev && dev->is_virtfn) ++ return pci_ecam_map_bus(bus, devfn, where); ++ ++ /* Accesses beyond the vendor ID always go to existing devices. */ ++ if (where > 0) ++ return pci_ecam_map_bus(bus, devfn, where); ++ + busn -= cfg->busr.start; + bdf_addr = (busn << cfg->ops->bus_shift) + (devfn << devfn_shift); + table_count = pcie_discovery_data[segment]->nr_bdfs; +-- +2.25.0 + diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/disable-extra-fw.cfg b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/disable-extra-fw.cfg new file mode 100644 index 00000000..35afdddf --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm-5.4/n1sdp/disable-extra-fw.cfg @@ -0,0 +1,2 @@ +# We don't want to build firmware blobs into the kernel binary +CONFIG_EXTRA_FIRMWARE="" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bb b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bb new file mode 100644 index 00000000..089f6cba --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bb @@ -0,0 +1,32 @@ +# Recipe for building linaro provided kernel + +KBRANCH ?= "latest-4.19-armlt-19.01" + +require recipes-kernel/linux/linux-yocto.inc + + +SRCREV_machine ?= "e97e8d868aba53467039dbef3b7436c857433ae3" + +SRCREV_meta ?= "ad6f8b357720ca8167a090713b7746230cf4b314" + +SRC_URI = "git://git.linaro.org/landing-teams/working/arm/kernel-release.git;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.19;destsuffix=${KMETA} \ + file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +LINUX_VERSION ?= "4.19.0" + +DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}" +DEPENDS += "openssl-native util-linux-native" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" +KERNEL_FEATURES_append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "" ,d)}" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bbappend new file mode 100644 index 00000000..ed6fbc3f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_4.19.bbappend @@ -0,0 +1,3 @@ +# Add support for Arm Platforms (boards or simulators) + +require linux-yocto-arm-platforms.inc diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bb b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bb new file mode 100644 index 00000000..d2cd1270 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bb @@ -0,0 +1,21 @@ +# Add support for Arm Linaro Kernel 5.4 for Arm Platforms (boards or simulators) + +SUMMARY = "Linux Kernel Upstream, supported by Arm/Linaro" +LICENSE = "GPLv2" +SECTION = "kernel" + +require recipes-kernel/linux/linux-yocto.inc + +COMPATIBLE_MACHINE ?= "invalid" + +# KBRANCH is set to n1sdp by default as there is no master branch on the repository +KBRANCH = "n1sdp" + +SRC_URI = "git://git.linaro.org/landing-teams/working/arm/kernel-release.git;nobranch=1 \ + file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ + " +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +# Refer to commit TAG N1SDP-2020.03.26 since it will not get force pushed +SRCREV = "137cccb0843e63b031acf67d1ca4f6447b8c417c" +LINUX_VERSION ?= "${PV}" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bbappend new file mode 100644 index 00000000..0f516c78 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-linaro-arm_5.4.bbappend @@ -0,0 +1,28 @@ +# +# N1SDP MACHINE specific configurations +# + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.4:" + +# Apply N1SDP specific patches +SRC_URI_append_n1sdp = " \ + git://git.linaro.org/landing-teams/working/arm/device-tree.git;name=dts;nobranch=1;destsuffix=git/arch/arm64/boot/dts \ + file://0001-TMP-iommu-arm-smmu-v3-Ignore-IOPF-capabilities.patch \ + file://0002-pci_quirk-add-acs-override-for-PCI-devices.patch \ + file://0003-pcie-Add-quirk-for-the-Arm-Neoverse-N1SDP-platform.patch \ + file://0004-n1sdp-update-n1sdp-pci-quirk-for-SR-IOV-support.patch \ + file://disable-extra-fw.cfg \ + " + +# Referring to commit TAG N1SDP-2020.03.26 +SRCREV_n1sdp = "137cccb0843e63b031acf67d1ca4f6447b8c417c" +SRCREV_dts_n1sdp = "3209a868152f348194cc1f20fd87c759d3a97d45" + +# Use intree defconfig +KBUILD_DEFCONFIG_n1sdp = "defconfig" + +# Since the intree defconfig in n1sdp kernel repository is not setting all the configs, +# KCONFIG_MODE is set to "alldefconfig" to properly expand the defconfig. +KCONFIG_MODE_n1sdp = "--alldefconfig" + +COMPATIBLE_MACHINE_n1sdp = "n1sdp" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm-platforms.inc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm-platforms.inc new file mode 100644 index 00000000..7b73e753 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm-platforms.inc @@ -0,0 +1,24 @@ +DESCRIPTION = "Linux Kernel based on upstream tree" +SECTION = "kernel" +LICENSE = "GPLv2" +SRCREV_FORMAT = "kernel" + +require recipes-kernel/linux/linux-yocto.inc + +KERNEL_VERSION_SANITY_SKIP = "1" + +S = "${WORKDIR}/git" + +# Override do_kernel_configme to avoid kernel being assembled into a linux-yocto +# style kernel +# https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#ref-tasks-kernel_configme +do_kernel_configme[noexec] = "1" + +# Make sure no branch is defined since here we track a specific version +KBRANCH = "" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +SRC_URI = "\ + git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux;protocol=https;nobranch=1 \ + " diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm_5.3.bb b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm_5.3.bb new file mode 100644 index 00000000..88a06c4b --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-upstream-arm_5.3.bb @@ -0,0 +1,8 @@ +# Add support for Upstream Kernel for Arm Platforms (boards or simulators) + +SUMMARY = "Linux Kernel Upstream, supported by Arm/Linaro" + +require recipes-kernel/linux/linux-upstream-arm-platforms.inc + +SRCREV = "v${PV}" +LINUX_VERSION ?= "${PV}" diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc new file mode 100644 index 00000000..eeb05713 --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto-arm-platforms.inc @@ -0,0 +1,47 @@ +# Kernel configuration and dts specific information + +# +# Kernel configurations and dts (If not using Linux provided ones) are captured +# in this file. Update SRC_URI and do_patch for building images with custom dts +# + +FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/files:" + +# Arm platforms kmeta +SRC_URI += "file://arm-platforms-kmeta;type=kmeta;name=arm-platforms-kmeta;destsuffix=arm-platforms-kmeta" + +# +# FVP FOUNDATION KMACHINE +# +COMPATIBLE_MACHINE_foundation-armv8 = "foundation-armv8" +KMACHINE_foundation-armv8 = "fvp" + +# +# FVP BASE KMACHINE +# +COMPATIBLE_MACHINE_fvp-base = "fvp-base" +KMACHINE_fvp-base = "fvp" +SRC_URI_append_fvp-base = " file://dts/arm;subdir=add-files" + +do_patch_append_fvp-base() { + tar -C ${WORKDIR}/add-files/dts -cf - arm | \ + tar -C arch/arm64/boot/dts -xf - +} + +# +# Juno KMACHINE +# +COMPATIBLE_MACHINE_juno = "juno" +KMACHINE_juno = "juno" + +# +# Gem5 arm64 KMACHINE +# +COMPATIBLE_MACHINE_gem5-arm64 = "gem5-arm64" +KMACHINE_gem5-arm64 = "gem5-arm64" +SRC_URI_append_gem5-arm64 = " file://dts/gem5-arm64;subdir=add-files" + +do_patch_append_gem5-arm64() { + tar -C ${WORKDIR}/add-files/dts -cf - gem5-arm64 | \ + tar -C arch/arm64/boot/dts -xf - +} diff --git a/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend new file mode 100644 index 00000000..ed6fbc3f --- /dev/null +++ b/bsp/meta-arm/meta-arm-bsp/recipes-kernel/linux/linux-yocto_5.4.bbappend @@ -0,0 +1,3 @@ +# Add support for Arm Platforms (boards or simulators) + +require linux-yocto-arm-platforms.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc b/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc new file mode 100644 index 00000000..5c40af20 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/external-arm-toolchain-versions.inc @@ -0,0 +1,133 @@ +def eat_run(d, cmd, *args): + import bb.process + import subprocess + + topdir = d.getVar('TOPDIR', True) + toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True) + if not toolchain_path: + return 'UNKNOWN', 'UNKNOWN' + + target_prefix = d.getVar('TARGET_PREFIX', True) + path = os.path.join(toolchain_path, 'bin', target_prefix + cmd) + args = [path] + list(args) + + return bb.process.run(args, cwd=topdir, stderr=subprocess.PIPE) + +def eat_get_version(d): + try: + stdout, stderr = eat_run(d, 'gcc', '-v') + except bb.process.CmdError as exc: + bb.error('Failed to obtain external Arm toolchain version: %s' % exc) + return 'UNKNOWN' + else: + last_line = stderr.splitlines()[-1] + return last_line + +# Extract the YYYY.MM version +def eat_get_main_version(d): + version = eat_get_version(d) + bb.debug(2, 'Trying for parse version info from: %s' % version) + if version != 'UNKNOWN': + if version.split()[4] == '(GNU': + # gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) + # gcc version 8.2.1 20180802 (GNU Toolchain for the A-profile Architecture 8.2-2018.11 (arm-rel-8.26)) + return version.split()[10].split('-')[1] + elif version.split()[3] == '(GNU': + # gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) + return version.split()[9].split('-')[1] + else: + bb.error('Failed to parse external Arm toolchain version from: %s' % version) + else: + return version + +# Extract the x.y.z version from 'gcc version 4.9.1' +def eat_get_gcc_version(d): + version = eat_get_version(d) + if version != 'UNKNOWN': + return version.split()[2] + else: + return version + +def eat_get_libc_version(d): + import os,bb + syspath = bb.data.expand('${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}', d) + if not syspath: + return 'UNKNOWN' + + libpath = syspath + '/libc/' + bb.data.expand('${EAT_LIBDIR}/${EAT_TARGET_SYS}/', d) + + if os.path.exists(libpath): + for file in os.listdir(libpath): + if file.find('libc-') == 0: + return file[5:-3] + + libpath = syspath + '/libc/' + bb.data.expand('${EAT_LIBDIR}/', d) + + if os.path.exists(libpath): + for file in os.listdir(libpath): + if file.find('libc-') == 0: + return file[5:-3] + + libpath = syspath + '/libc/usr/' + bb.data.expand('${EAT_LIBDIR}/${EAT_TARGET_SYS}/', d) + + if os.path.exists(libpath): + for file in os.listdir(libpath): + if file.find('libc-') == 0: + return file[5:-3] + + libpath = syspath + '/libc/usr/' + bb.data.expand('${EAT_LIBDIR}/', d) + + if os.path.exists(libpath): + for file in os.listdir(libpath): + if file.find('libc-') == 0: + return file[5:-3] + return 'UNKNOWN' + +def eat_get_kernel_version(d): + import os,bb + syspath = bb.data.expand('${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}', d) + if not syspath: + return 'UNKNOWN' + + vf = syspath + '/libc/usr/include/linux/version.h' + + try: + f = open(vf, 'r') + except (OSError, IOError): + return 'UNKNOWN' + + l = f.readlines(); + f.close(); + for s in l: + if s.find('LINUX_VERSION_CODE') > 0: + ver = int(s.split()[2]) + maj = ver / 65536 + ver = ver % 65536 + min = ver / 256 + ver = ver % 256 + return str(maj)+'.'+str(min)+'.'+str(ver) + return 'UNKNOWN' + +def eat_get_gdb_version(d): + try: + stdout, stderr = eat_run(d, 'gdb', '-v') + except bb.process.CmdError: + return 'UNKNOWN' + else: + first_line = stdout.splitlines()[0] + return first_line.split()[-1] + +python external_arm_toolchain_version_handler () { + if not isinstance(e, bb.event.ConfigParsed): + return + d = e.data + ld = d.createCopy() + ld.finalize() + + d.setVar('EAT_VER_MAIN', eat_get_main_version(ld)) + d.setVar('EAT_VER_GCC', eat_get_gcc_version(ld)) + d.setVar('EAT_VER_LIBC', eat_get_libc_version(ld)) + d.setVar('EAT_VER_KERNEL', eat_get_kernel_version(ld)) + d.setVar('EAT_VER_GDB', eat_get_gdb_version(ld)) +} +addhandler external_arm_toolchain_version_handler diff --git a/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc new file mode 100644 index 00000000..9171380c --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc @@ -0,0 +1,114 @@ +# +# Configuration to use an external Arm binary toolchain +# + +EXTERNAL_TOOLCHAIN ?= "/usr/local/arm-binary-toolchain/${TARGET_ARCH}" + +TOOLCHAIN_PATH_ADD = "${EXTERNAL_TOOLCHAIN}/bin:" +PATH =. "${TOOLCHAIN_PATH_ADD}" + +EAT_TARGET_SYS_arm ?= "${@ 'arm-none-linux-gnueabihf' if os.path.exists('${EXTERNAL_TOOLCHAIN}/bin/arm-none-linux-gnueabihf-gcc') else 'arm-linux-gnueabihf'}" +EAT_TARGET_SYS_aarch64 ?= "${@ 'aarch64-none-linux-gnu' if os.path.exists('${EXTERNAL_TOOLCHAIN}/bin/aarch64-none-linux-gnu-gcc') else 'aarch64-linux-gnu'}" +EAT_TARGET_SYS = "${TARGET_SYS}" +TARGET_PREFIX = "${EAT_TARGET_SYS}-" + +EAT_LIBDIR_arm = "lib" +EAT_LIBDIR_aarch64 = "lib64" + +GCCMULTILIB_forcevariable = "--disable-multilib" +IMAGE_LINGUAS_forcevariable = "" + +# Blacklist toolchain recipes as a belt-and-suspenders way to use the external toolchain +PNBLACKLIST[glibc] = "Using external toolchain" +PNBLACKLIST[libgcc] = "Using external toolchain" +PNBLACKLIST[gcc-cross] = "Using external toolchain" +PNBLACKLIST[gcc-runtime] = "Using external toolchain" +PNBLACKLIST[gcc-sanitizers] = "Using external toolchain" + +PREFERRED_PROVIDER_linux-libc-headers = "external-arm-toolchain" +PREFERRED_PROVIDER_linux-libc-headers-dev = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "external-arm-toolchain" +PREFERRED_PROVIDER_glibc = "external-arm-toolchain" +PREFERRED_PROVIDER_libgcc = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/libc = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/libc-locale = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/libintl = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/libiconv = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/crypt = "external-arm-toolchain" +PREFERRED_PROVIDER_glibc-thread-db = "external-arm-toolchain" +PREFERRED_PROVIDER_glibc-mtrace = "external-arm-toolchain" +PREFERRED_PROVIDER_libc-mtrace = "external-arm-toolchain" +PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-arm-toolchain" + +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}" + +DISTRO_FEATURES_LIBC = "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-crypt \ + libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \ + libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big \ + libc-locales libc-locale-code libc-charsets \ + libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \ + libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \ + libc-posix-wchar-io" + +ENABLE_BINARY_LOCALE_GENERATION = "0" +GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled" +LIBCOVERRIDE = ":libc-glibc" + +ERROR_QA[type] ?= "list" +python toolchain_metadata_setup () { + import subprocess + if not isinstance(e, bb.event.ConfigParsed): + return + + d = e.data + l = d.createCopy() + l.finalize() + oe_import(l) + + external_toolchain = l.getVar('EXTERNAL_TOOLCHAIN', True) + if not external_toolchain or external_toolchain == 'UNDEFINED': + bb.fatal("Error: EXTERNAL_TOOLCHAIN must be set to the path to your arm toolchain") + + if not os.path.exists(external_toolchain): + bb.fatal("Error: EXTERNAL_TOOLCHAIN path '%s' does not exist" % external_toolchain) + + # The external toolchain may not have been built with the oe-core preferred + # gnu hash setting, so ensure that the corresponding sanity check is not an error. + error_qa = oe.data.typed_value('ERROR_QA', l) + if 'ldflags' in error_qa: + error_qa.remove('ldflags') + d.setVar('ERROR_QA', ' '.join(error_qa)) +} +addhandler toolchain_metadata_setup + +def populate_toolchain_links(d): + import errno + import os + from glob import glob + + d = d.createCopy() + d.finalize() + + pattern = bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*', d) + files = glob(pattern) + if not files: + bb.fatal("Unable to populate toolchain binary symlinks") + + bindir = d.getVar('STAGING_BINDIR_TOOLCHAIN', True) + bb.mkdirhier(bindir) + for f in files: + base = os.path.basename(f) + newpath = os.path.join(bindir, base) + try: + os.symlink(f, newpath) + except OSError as exc: + if exc.errno == errno.EEXIST: + break + bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc)) + +require conf/distro/include/external-arm-toolchain-versions.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/conf/layer.conf b/bsp/meta-arm/meta-arm-toolchain/conf/layer.conf new file mode 100644 index 00000000..76eac9df --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/conf/layer.conf @@ -0,0 +1,15 @@ +BBPATH .= ":${LAYERDIR}" +BBFILES += "\ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "arm-toolchain" +BBFILE_PATTERN_arm-toolchain := "^${LAYERDIR}/" +BBFILE_PRIORITY_arm-toolchain = "30" + +LAYERDEPENDS_arm-toolchain = "core" +LAYERSERIES_COMPAT_arm-toolchain = "zeus dunfell" + +# do not error out on bbappends for missing recipes +BB_DANGLINGAPPENDS_WARNONLY = "true" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb new file mode 100644 index 00000000..04d8923b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -0,0 +1,666 @@ +require recipes-core/glibc/glibc-package.inc + +INHIBIT_DEFAULT_DEPS = "1" + +# License applies to this recipe code, not the toolchain itself +LICENSE = "MIT" +LIC_FILES_CHKSUM = "\ + file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ +" + +PROVIDES += "\ + linux-libc-headers \ + virtual/${TARGET_PREFIX}gcc \ + virtual/${TARGET_PREFIX}g++ \ + virtual/${TARGET_PREFIX}gcc-initial \ + virtual/${TARGET_PREFIX}binutils \ + virtual/${TARGET_PREFIX}libc-for-gcc \ + virtual/${TARGET_PREFIX}compilerlibs \ + virtual/libc \ + virtual/libintl \ + virtual/libiconv \ + virtual/crypt \ + glibc-mtrace \ + glibc-thread-db \ + glibc \ + libc-mtrace \ + gcc-runtime \ + libgcc \ + libg2c \ + libg2c-dev \ + libssp \ + libssp-dev \ + libssp-staticdev \ + libgfortran \ + libgfortran-dev \ + libgfortran-staticdev \ + libmudflap \ + libmudflap-dev \ + libgomp \ + libgomp-dev \ + libgomp-staticdev \ + libitm \ + libitm-dev \ + libitm-staticdev \ + libquadmath \ + libquadmath-dev \ + libquadmath-staticdev \ + virtual/linux-libc-headers \ + libgcov-staticdev \ + virtual/libc-locale \ +" + +PV = "${EAT_VER_MAIN}" + +BINV = "${EAT_VER_GCC}" +TARGET_SYS = "${EAT_TARGET_SYS}" + +SRC_URI = "file://SUPPORTED" + +do_install() { + # Add stubs for files OE-core expects + install -d ${S}/nscd/ + touch ${S}/nscd/nscd.init + touch ${S}/nscd/nscd.conf + touch ${S}/nscd/nscd.service + touch ${S}/../makedbs.sh + + install -d ${D}${base_libdir} + install -d ${D}${base_sbindir} + install -d ${D}${bindir} + install -d ${D}${sbindir} + install -d ${D}${libdir} + install -d ${D}${libexecdir} + install -d ${D}${datadir} + install -d ${D}${includedir} + install -d ${D}/include + install -d ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC} + install -d ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC} + + CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir} + if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS}/* ${D}${base_libdir} + else + if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/* ${D}${base_libdir} + else + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*.so* ${D}${base_libdir} + fi + fi + if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}/* ${D}${libdir} + else + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/* ${D}${libdir} + if [ ! -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then + rm -rf ${D}${libdir}/*.so* + fi + fi + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/share/* ${D}${datadir} + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/* ${D}${includedir} + if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS} ]; then + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/${EAT_TARGET_SYS}/* ${D}${includedir} + rm -r ${D}${includedir}/${EAT_TARGET_SYS} + fi + + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir} + ln -sf ../usr/include/c++ ${D}/include/c++ + + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir} + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/sbin/* ${D}${sbindir} + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/sbin/* ${D}${base_sbindir} + rm -rf ${D}${bindir}/gdbserver + sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect + sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd + sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect + sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/ldd + + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/ + + # fix up the copied symlinks (they are still pointing to the multiarch directory) + linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}" + ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name} + ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so + ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so + ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so + ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so + ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so + ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so + ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so + ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so + ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so + ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so + ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so + ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so + ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so + ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so + ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so + + # remove potential .so duplicates from base_libdir + # for all symlinks created above in libdir + rm -f ${D}${base_libdir}/librt.so + rm -f ${D}${base_libdir}/libcrypt.so + rm -f ${D}${base_libdir}/libresolv.so + rm -f ${D}${base_libdir}/libnss_hesiod.so + rm -f ${D}${base_libdir}/libutil.so + rm -f ${D}${base_libdir}/libBrokenLocale.so + rm -f ${D}${base_libdir}/libpthread.so + rm -f ${D}${base_libdir}/libthread_db.so + rm -f ${D}${base_libdir}/libanl.so + rm -f ${D}${base_libdir}/libdl.so + rm -f ${D}${base_libdir}/libnss_db.so + rm -f ${D}${base_libdir}/libnss_dns.so + rm -f ${D}${base_libdir}/libnss_files.so + rm -f ${D}${base_libdir}/libnss_compat.so + rm -f ${D}${base_libdir}/libm.so + + # Move these completely to ${libdir} and delete duplicates in ${base_libdir} + for lib in asan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do + if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then + mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir} + fi + if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then + mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir} + fi + rm -f ${D}${base_libdir}/lib${lib}* + done + + # Clean up duplicate libs that are both in base_libdir and libdir + rm -f ${D}${libdir}/libgcc* + + # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so + # Only remove them if both are regular files and are identical + for i in ${D}${base_libdir}/lib*-${EAT_VER_LIBC}.so; do + f=$(echo $i | sed 's/-${EAT_VER_LIBC}//') + l=$(ls $f.*) + if [ $(readlink -f $i ) = $l ]; then + echo "$i is a symlink of $l, keep it" + elif [ $(readlink -f $l ) = $i ]; then + echo "$l is a symlink of $i, keep it" + else + cmp -s $i $l + if [ $? -eq 0 ]; then + echo "$i is a duplicate of $l, remove it" + rm $i + else + echo "$i and $l are different files, keep them both" + fi + fi + done + + if [ -d ${D}${base_libdir}/arm-linux-gnueabi ]; then + rm -rf ${D}${base_libdir}/arm-linux-gnueabi + fi + + if [ -d ${D}${base_libdir}/ldscripts ]; then + rm -rf ${D}${base_libdir}/ldscripts + fi + + # Provided by libnsl2 + rm -rf ${D}${includedir}/rpcsvc/yppasswd.* + # Provided by quota + rm -rf ${D}${includedir}/rpcsvc/rquota.* + + if [ -f ${D}${libdir}/libc.so ];then + sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so + sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so + sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so + fi + + if [ -f ${D}${base_libdir}/libc.so ];then + sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so + if [ -f ${D}${base_libdir}/libc.so.6 ]; then + sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6 + fi + fi + + # Remove if empty + rmdir ${D}${bindir} || true + rmdir ${D}${sbindir} || true + rmdir ${D}${base_sbindir} || true + rmdir ${D}${libexecdir} || true + + # Remove unused /usr/share/info/dir + rm -f ${D}${infodir}/dir +} + +# External toolchain doesn't provide multilib support so make corresponding +# install API as an empty API to avoid an unnecessary errors. +oe_multilib_header () { + return +} + +PACKAGES_DYNAMIC = "^locale-base-.* \ + ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \ + ^${MLPREFIX}glibc-gconv$" + +# PACKAGES is split up according to the 'source' recipes/includes in OE-core +# Stylistic differences are kept to make copy/pasting easier. + +# From gcc-runtime.inc + +PACKAGES += "\ + gcc-runtime-dbg \ + libstdc++ \ + libstdc++-precompile-dev \ + libstdc++-dev \ + libstdc++-staticdev \ + libg2c \ + libg2c-dev \ + libssp \ + libssp-dev \ + libssp-staticdev \ + libmudflap \ + libmudflap-dev \ + libmudflap-staticdev \ + libquadmath \ + libquadmath-dev \ + libquadmath-staticdev \ + libgomp \ + libgomp-dev \ + libgomp-staticdev \ + libatomic \ + libatomic-dev \ + libatomic-staticdev \ + libitm \ + libitm-dev \ + libitm-staticdev \ +" + +# From gcc-sanitizers.inc + +PACKAGES += "gcc-sanitizers gcc-sanitizers-dbg" +PACKAGES += "libasan libubsan liblsan libtsan" +PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev" +PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev" + +# From libgfortran.inc: + +PACKAGES += "\ + libgfortran-dbg \ + libgfortran \ + libgfortran-dev \ + libgfortran-staticdev \ +" + +# libgcc.inc uses ${PN}, so replace that + +PACKAGES += "\ + libgcc \ + libgcc-dev \ + libgcc-dbg \ +" + +# ... and the leftovers + +PACKAGES =+ "\ + ${PN}-mtrace \ + libgcov-staticdev \ + linux-libc-headers \ + linux-libc-headers-dev \ +" + +INSANE_SKIP_${PN}-dbg = "staticdev" +INSANE_SKIP_${PN}-utils += "ldflags" +INSANE_SKIP_libstdc++ += "ldflags" +INSANE_SKIP_libgfortran += "ldflags" +INSANE_SKIP_libgcc += "ldflags dev-deps" +INSANE_SKIP_libgfortran += "ldflags dev-deps" +INSANE_SKIP_libstdc++ += "ldflags dev-deps" +INSANE_SKIP_libatomic += "ldflags" +INSANE_SKIP_libasan += "ldflags" +INSANE_SKIP_libubsan += "ldflags" +INSANE_SKIP_libssp += "ldflags" +INSANE_SKIP_libgomp += "ldflags" +INSANE_SKIP_libitm += "ldflags" +INSANE_SKIP_gdbserver += "ldflags" + +# OE-core has literally listed 'glibc' in LIBC_DEPENDENCIES :/ +RPROVIDES_${PN} = "glibc rtld(GNU_HASH)" +# Add runtime provides for the other libc* packages as well +RPROVIDES_${PN}-dev = "glibc-dev" +RPROVIDES_${PN}-doc = "glibc-doc" +RPROVIDES_${PN}-dbg = "glibc-dbg" +RPROVIDES_${PN}-pic = "glibc-pic" +RPROVIDES_${PN}-utils = "glibc-utils" +RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace" + +PKG_${PN} = "glibc" +PKG_${PN}-dev = "glibc-dev" +PKG_${PN}-doc = "glibc-doc" +PKG_${PN}-dbg = "glibc-dbg" +PKG_${PN}-pic = "glibc-pic" +PKG_${PN}-utils = "glibc-utils" +PKG_${PN}-mtrace = "glibc-mtrace" +PKG_${PN}-gconv = "glibc-gconv" +PKG_${PN}-extra-nss = "glibc-extra-nss" +PKG_${PN}-thread-db = "glibc-thread-db" +PKG_${PN}-pcprofile = "glibc-pcprofile" +PKG_${PN}-staticdev = "glibc-staticdev" + +PKGV = "${EAT_VER_LIBC}" +PKGV_${PN} = "${EAT_VER_LIBC}" +PKGV_${PN}-dev = "${EAT_VER_LIBC}" +PKGV_${PN}-doc = "${EAT_VER_LIBC}" +PKGV_${PN}-dbg = "${EAT_VER_LIBC}" +PKGV_${PN}-pic = "${EAT_VER_LIBC}" +PKGV_${PN}-utils = "${EAT_VER_LIBC}" +PKGV_${PN}-mtrace = "${EAT_VER_LIBC}" +PKGV_${PN}-gconv = "${EAT_VER_LIBC}" +PKGV_${PN}-extra-nss = "${EAT_VER_LIBC}" +PKGV_${PN}-thread-db = "${EAT_VER_LIBC}" +PKGV_${PN}-pcprofile = "${EAT_VER_LIBC}" +PKGV_${PN}-staticdev = "${EAT_VER_LIBC}" +PKGV_catchsegv = "${EAT_VER_LIBC}" +PKGV_glibc-extra-nss = "${EAT_VER_LIBC}" +PKGV_glibc-thread-db = "${EAT_VER_LIBC}" + +PKGV_libmemusage = "${EAT_VER_LIBC}" +PKGV_libsegfault = "${EAT_VER_LIBC}" +PKGV_libsotruss = "${EAT_VER_LIBC}" +PKGV_sln = "${EAT_VER_LIBC}" +PKGV_nscd = "${EAT_VER_LIBC}" +PKGV_ldd = "${EAT_VER_LIBC}" + +PKGV_libasan-dev = "${EAT_VER_GCC}" +PKGV_libasan = "${EAT_VER_GCC}" +PKGV_libasan-staticdev = "${EAT_VER_GCC}" +PKGV_libatomic-dev = "${EAT_VER_GCC}" +PKGV_libatomic = "${EAT_VER_GCC}" +PKGV_libatomic-staticdev = "${EAT_VER_GCC}" +PKGV_libg2c-dev = "${EAT_VER_GCC}" +PKGV_libg2c = "${EAT_VER_GCC}" +PKGV_libgcc-dev = "${EAT_VER_GCC}" +PKGV_libgcc = "${EAT_VER_GCC}" +PKGV_libgfortran-dbg = "${EAT_VER_GCC}" +PKGV_libgfortran-dev = "${EAT_VER_GCC}" +PKGV_libgfortran = "${EAT_VER_GCC}" +PKGV_libgfortran-staticdev = "${EAT_VER_GCC}" +PKGV_libgomp-dev = "${EAT_VER_GCC}" +PKGV_libgomp = "${EAT_VER_GCC}" +PKGV_libgomp-staticdev = "${EAT_VER_GCC}" +PKGV_libitm-dev = "${EAT_VER_GCC}" +PKGV_libitm = "${EAT_VER_GCC}" +PKGV_libitm-staticdev = "${EAT_VER_GCC}" +PKGV_liblsan-dev = "${EAT_VER_GCC}" +PKGV_liblsan = "${EAT_VER_GCC}" +PKGV_liblsan-staticdev = "${EAT_VER_GCC}" +PKGV_libmudflap-dev = "${EAT_VER_GCC}" +PKGV_libmudflap = "${EAT_VER_GCC}" +PKGV_libmudflap-staticdev = "${EAT_VER_GCC}" +PKGV_libquadmath-dev = "${EAT_VER_GCC}" +PKGV_libquadmath = "${EAT_VER_GCC}" +PKGV_libquadmath-staticdev = "${EAT_VER_GCC}" +PKGV_libssp-dev = "${EAT_VER_GCC}" +PKGV_libssp = "${EAT_VER_GCC}" +PKGV_libssp-staticdev = "${EAT_VER_GCC}" +PKGV_libstdc++-dbg = "${EAT_VER_GCC}" +PKGV_libstdc++-dev = "${EAT_VER_GCC}" +PKGV_libstdc++ = "${EAT_VER_GCC}" +PKGV_libstdc++-precompile-dev = "${EAT_VER_GCC}" +PKGV_libstdc++-staticdev = "${EAT_VER_GCC}" +PKGV_libtsan-dev = "${EAT_VER_GCC}" +PKGV_libtsan = "${EAT_VER_GCC}" +PKGV_libtsan-staticdev = "${EAT_VER_GCC}" +PKGV_libubsan-dev = "${EAT_VER_GCC}" +PKGV_libubsan = "${EAT_VER_GCC}" +PKGV_libubsan-staticdev = "${EAT_VER_GCC}" + +PKGV_linux-libc-headers-dev = "${EAT_VER_KERNEL}" +PKGV_linux-libc-headers = "${EAT_VER_KERNEL}" + +PKGV_gdbserver = "${EAT_VER_GDBSERVER}" + +ALLOW_EMPTY_${PN}-mtrace = "1" +FILES_${PN}-mtrace = "${bindir}/mtrace" + +FILES_libgcov-staticdev = "${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcov.a" + +FILES_libsegfault = "${base_libdir}/libSegFault*" + +FILES_catchsegv = "${bindir}/catchsegv" +RDEPENDS_catchsegv = "libsegfault" + +# From libgfortran.inc: + +FILES_libgfortran = "${libdir}/libgfortran.so.*" +FILES_libgfortran-dev = "\ + ${libdir}/libgfortran*.so \ + ${libdir}/libgfortran.spec \ + ${libdir}/libgfortran.la \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \ +" +FILES_libgfortran-staticdev = "${libdir}/libgfortran.a" + + +# From gcc-sanitizers.inc: + +FILES_libasan += "${libdir}/libasan.so.*" +FILES_libasan-dev += "\ + ${libdir}/libasan_preinit.o \ + ${libdir}/libasan.so \ + ${libdir}/libasan.la \ +" +FILES_libasan-staticdev += "${libdir}/libasan.a" + +FILES_libubsan += "${libdir}/libubsan.so.*" +FILES_libubsan-dev += "\ + ${libdir}/libubsan.so \ + ${libdir}/libubsan.la \ +" +FILES_libubsan-staticdev += "${libdir}/libubsan.a" + +FILES_liblsan += "${libdir}/liblsan.so.*" +FILES_liblsan-dev += "\ + ${libdir}/liblsan.so \ + ${libdir}/liblsan.la \ + ${libdir}/liblsan_preinit.o \ +" +FILES_liblsan-staticdev += "${libdir}/liblsan.a" + +FILES_libtsan += "${libdir}/libtsan.so.*" +FILES_libtsan-dev += "\ + ${libdir}/libtsan.so \ + ${libdir}/libtsan.la \ + ${libdir}/libtsan_*.o \ +" +FILES_libtsan-staticdev += "${libdir}/libtsan.a" + +FILES_gcc-sanitizers = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h" + +# From libgcc.inc: + +FILES_libgcc = "${base_libdir}/libgcc_s.so.1" + +FILES_libgcc-dev = "\ + ${base_libdir}/libgcc*.so \ + ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \ + ${libdir}/${TARGET_SYS}/${BINV}* \ + ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include \ +" + +FILES_linux-libc-headers = "" +FILES_linux-libc-headers-dev = "\ + ${includedir}/asm* \ + ${includedir}/linux \ + ${includedir}/mtd \ + ${includedir}/rdma \ + ${includedir}/scsi \ + ${includedir}/sound \ + ${includedir}/video \ +" +FILES_${PN} += "\ + ${libdir}/bin \ + ${libdir}/locale \ + ${libdir}/gconv/gconv-modules \ + ${datadir}/zoneinfo \ + ${base_libdir}/libcrypt*.so.* \ + ${base_libdir}/libcrypt-*.so \ + ${base_libdir}/libc.so.* \ + ${base_libdir}/libc-*.so \ + ${base_libdir}/libm.so.* \ + ${base_libdir}/libmemusage.so \ + ${base_libdir}/libm-*.so \ + ${base_libdir}/ld*.so.* \ + ${base_libdir}/ld-*.so \ + ${base_libdir}/libpthread*.so.* \ + ${base_libdir}/libpthread*.so \ + ${base_libdir}/libpthread-*.so \ + ${base_libdir}/libresolv*.so.* \ + ${base_libdir}/libresolv-*.so \ + ${base_libdir}/librt*.so.* \ + ${base_libdir}/librt-*.so \ + ${base_libdir}/libutil*.so.* \ + ${base_libdir}/libutil-*.so \ + ${base_libdir}/libnss_files*.so.* \ + ${base_libdir}/libnss_files-*.so \ + ${base_libdir}/libnss_compat*.so.* \ + ${base_libdir}/libnss_compat-*.so \ + ${base_libdir}/libnss_dns*.so.* \ + ${base_libdir}/libnss_dns-*.so \ + ${base_libdir}/libnss_nis*.so.* \ + ${base_libdir}/libnss_nisplus-*.so \ + ${base_libdir}/libnss_nisplus*.so.* \ + ${base_libdir}/libnss_nis-*.so \ + ${base_libdir}/libnss_hesiod*.so.* \ + ${base_libdir}/libnss_hesiod-*.so \ + ${base_libdir}/libdl*.so.* \ + ${base_libdir}/libdl-*.so \ + ${base_libdir}/libanl*.so.* \ + ${base_libdir}/libanl-*.so \ + ${base_libdir}/libBrokenLocale*.so.* \ + ${base_libdir}/libBrokenLocale-*.so \ + ${base_libdir}/libthread_db*.so.* \ + ${base_libdir}/libthread_db-*.so \ + ${base_libdir}/libmemusage.so \ + ${base_libdir}/libSegFault.so \ + ${base_libdir}/libpcprofile.so \ + " + +FILES_${PN}-dbg += "${base_libdir}/debug" + +# From gcc-runtime.inc + +# include python debugging scripts +FILES_gcc-runtime-dbg += "\ + ${libdir}/libstdc++.so.*-gdb.py \ + ${datadir}/gcc-${BINV}/python/libstdcxx \ +" + +FILES_libg2c = "${target_libdir}/libg2c.so.*" +SUMMARY_libg2c = "Companion runtime library for g77" +FILES_libg2c-dev = "\ + ${libdir}/libg2c.so \ + ${libdir}/libg2c.a \ + ${libdir}/libfrtbegin.a \ +" +SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files" + +FILES_libstdc++ = "${libdir}/libstdc++.so.*" +SUMMARY_libstdc++ = "GNU standard C++ library" +FILES_libstdc++-dev = "\ + /include/c++ \ + ${includedir}/c++/ \ + ${libdir}/libstdc++.so \ + ${libdir}/libstdc++*.la \ + ${libdir}/libsupc++.la \ +" +SUMMARY_libstdc++-dev = "GNU standard C++ library - development files" + +FILES_libstdc++-staticdev = "\ + ${libdir}/libstdc++*.a \ + ${libdir}/libsupc++.a \ +" +SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files" + +FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" +SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" + +FILES_libssp = "${libdir}/libssp.so.*" +SUMMARY_libssp = "GNU stack smashing protection library" +FILES_libssp-dev = "\ + ${libdir}/libssp*.so \ + ${libdir}/libssp*_nonshared.a \ + ${libdir}/libssp*.la \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \ +" +SUMMARY_libssp-dev = "GNU stack smashing protection library - development files" +FILES_libssp-staticdev = "${libdir}/libssp*.a" +SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files" + +FILES_libquadmath = "${libdir}/libquadmath*.so.*" +SUMMARY_libquadmath = "GNU quad-precision math library" +FILES_libquadmath-dev = "\ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \ + ${libdir}/libquadmath*.so \ + ${libdir}/libquadmath.la \ +" +SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files" +FILES_libquadmath-staticdev = "${libdir}/libquadmath.a" +SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files" + +# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser +FILES_libmudflap = "${libdir}/libmudflap*.so.*" +SUMMARY_libmudflap = "Pointer debugging library for gcc" +FILES_libmudflap-dev = "\ + ${libdir}/libmudflap*.so \ + ${libdir}/libmudflap.la \ +" +SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files" +FILES_libmudflap-staticdev = "${libdir}/libmudflap.a" +SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files" + +FILES_libgomp = "${libdir}/libgomp*${SOLIBS}" +SUMMARY_libgomp = "GNU OpenMP parallel programming library" +FILES_libgomp-dev = "\ + ${libdir}/libgomp*${SOLIBSDEV} \ + ${libdir}/libgomp*.la \ + ${libdir}/libgomp.spec \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ +" +SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files" +FILES_libgomp-staticdev = "${libdir}/libgomp*.a" +SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" + +FILES_libatomic = "${libdir}/libatomic.so.*" +SUMMARY_libatomic = "GNU C++11 atomics support library" +FILES_libatomic-dev = "\ + ${libdir}/libatomic.so \ + ${libdir}/libatomic.la \ +" +SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files" +FILES_libatomic-staticdev = "${libdir}/libatomic.a" +SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files" + +FILES_libitm = "${libdir}/libitm.so.*" +SUMMARY_libitm = "GNU transactional memory support library" +FILES_libitm-dev = "\ + ${libdir}/libitm.so \ + ${libdir}/libitm.la \ + ${libdir}/libitm.spec \ +" +SUMMARY_libitm-dev = "GNU transactional memory support library - development files" +FILES_libitm-staticdev = "${libdir}/libitm.a" +SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files" + +EAT_VER_MAIN ??= "" + + +python () { + if not d.getVar("EAT_VER_MAIN", False): + raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).") + import re + notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None) + if notglibc: + raise bb.parse.SkipPackage("incompatible with target %s" % + d.getVar('TARGET_OS', True)) +} diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED new file mode 100644 index 00000000..9615075e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED @@ -0,0 +1 @@ +POSIX diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2.inc b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2.inc new file mode 100644 index 00000000..65fbeffb --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2.inc @@ -0,0 +1,115 @@ +require recipes-devtools/gcc/gcc-common.inc + +BASEPV = "8.2" +PV = "arm-${BASEPV}" +CVE_VERSION = "${BASEPV}" + +MMYY = "19.01" +RELEASE = "20${MMYY}" +PR = "r${RELEASE}" +BINV = "${BASEPV}.1" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-${BASEPV}:${FILE_DIRNAME}/gcc-${BASEPV}/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib flex-native" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +#BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" +SRCREV = "1a721bce9532193e63acdcdb56fc16e8ac70b20a" +BASEURI ?= "git://git.linaro.org/toolchain/gcc.git;protocol=https;branch=linaro-local/ARM/arm-8-branch" + +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0003-gcc-poison-system-directories.patch \ + file://0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0006-64-bit-multilib-hack.patch \ + file://0007-optional-libstdc.patch \ + file://0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ + file://0009-COLLECT_GCC_OPTIONS.patch \ + file://0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0011-fortran-cross-compile-hack.patch \ + file://0012-cpp-honor-sysroot.patch \ + file://0013-MIPS64-Default-to-N64-ABI.patch \ + file://0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0015-gcc-Fix-argument-list-too-long-error.patch \ + file://0016-Disable-sdt.patch \ + file://0017-libtool.patch \ + file://0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0021-export-CPP.patch \ + file://0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ + file://0023-Ensure-target-gcc-headers-can-be-included.patch \ + file://0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0027-aarch64-Add-support-for-musl-ldso.patch \ + file://0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0029-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0031-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + file://0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ + file://0037-sync-gcc-stddef.h-with-musl.patch \ + file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ + file://0039-Fix-for-testsuite-failure.patch \ + file://0040-Re-introduce-spe-commandline-options.patch \ + file://0041-ARC-fix-spec-gen.patch \ + file://0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch \ + file://0043-riscv-Disable-multilib-for-OE.patch \ + ${BACKPORTS} \ +" +BACKPORTS = "\ +" + +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" +SSP ?= "--disable-libssp" +SSP_mingw32 = "--enable-libssp" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + ${SSP} \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_append_aarchilp32 = " --with-abi=ilp32" + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..423fe28e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,42 @@ +From b752fb2b6d6f6da68da5386b96abf0d74cd4bbe6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:37:11 +0400 +Subject: [PATCH 01/39] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 69c99e99cca..517fb70192e 100755 +--- a/configure ++++ b/configure +@@ -7511,7 +7511,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +diff --git a/configure.ac b/configure.ac +index a1edc369a27..f8c254f1fac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3100,7 +3100,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0003-gcc-poison-system-directories.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0003-gcc-poison-system-directories.patch new file mode 100644 index 00000000..05138976 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0003-gcc-poison-system-directories.patch @@ -0,0 +1,194 @@ +From 48c670d2678e0323d88eb72205e039f393cabe05 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 03/39] gcc: poison-system-directories + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [distribution: codesourcery] +--- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 16 ++++++++++++++++ + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 19 +++++++++++++++++++ + 7 files changed, 66 insertions(+) + +diff --git a/gcc/common.opt b/gcc/common.opt +index d6ef85928f3..7b29efe3882 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -679,6 +679,10 @@ Wreturn-local-addr + Common Var(warn_return_local_addr) Init(1) Warning + Warn about returning a pointer/reference to a local or temporary variable. + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one variable shadows another. Same as -Wshadow=global. +diff --git a/gcc/config.in b/gcc/config.in +index 5bccb408016..1c784a8276b 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -194,6 +194,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +diff --git a/gcc/configure b/gcc/configure +index 5c345ce0fd7..cafd05fd150 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -953,6 +953,7 @@ with_system_zlib + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1696,6 +1697,8 @@ Optional Features: + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -29715,6 +29718,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 65dbf1f2f80..dd5b38195ce 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6341,6 +6341,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 255149fcfb8..cb71b60fe3c 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -303,6 +303,7 @@ Objective-C and Objective-C++ Dialects}. + -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol + -Wparentheses -Wno-pedantic-ms-format @gol + -Wplacement-new -Wplacement-new=@var{n} @gol ++-Wno-poison-system-directories @gol + -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol + -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol +@@ -5712,6 +5713,14 @@ made up of data only and thus requires no special treatment. But, for + most targets, it is made up of code and thus requires the stack to be + made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +diff --git a/gcc/gcc.c b/gcc/gcc.c +index a716f708259..02b3cd39fc2 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1037,6 +1037,8 @@ proper position among the other output files. */ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ ++ %{Wno-poison-system-directories:--no-poison-system-directories} \ ++ %{Werror=poison-system-directories:--error-poison-system-directories} \ + %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ +diff --git a/gcc/incpath.c b/gcc/incpath.c +index b11c6a57939..e3b7a21966f 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -26,6 +26,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[INC_QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..8b1b9769 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch @@ -0,0 +1,73 @@ +From ae3fe6e5e50937de6e4223ca90810187372a8cf5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:08:31 +0400 +Subject: [PATCH 05/39] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET + +Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. + +This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. + +Other changes I had to do include: + +- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. + +- passing the right CFLAGS to configure scripts as exported environment variables + +I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. + +Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? + +Signed-off-by: Paolo Bonzini +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + configure | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/configure b/configure +index 517fb70192e..acd2b97df40 100755 +--- a/configure ++++ b/configure +@@ -6772,6 +6772,38 @@ fi + + + ++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS ++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS ++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). ++# We want to ensure that TARGET libraries (which we know are built with ++# gcc) are built with "-O2 -g", so include those options when setting ++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. ++if test "x$CFLAGS_FOR_TARGET" = x; then ++ CFLAGS_FOR_TARGET=$CFLAGS ++ case " $CFLAGS " in ++ *" -O2 "*) ;; ++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; ++ esac ++ case " $CFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; ++ esac ++fi ++ ++ ++if test "x$CXXFLAGS_FOR_TARGET" = x; then ++ CXXFLAGS_FOR_TARGET=$CXXFLAGS ++ case " $CXXFLAGS " in ++ *" -O2 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; ++ esac ++ case " $CXXFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; ++ esac ++fi ++ ++ + # Handle --with-headers=XXX. If the value is not "yes", the contents of + # the named directory are copied to $(tooldir)/sys-include. + if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0006-64-bit-multilib-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0006-64-bit-multilib-hack.patch new file mode 100644 index 00000000..0dce95c8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0006-64-bit-multilib-hack.patch @@ -0,0 +1,85 @@ +From 89af3b7399313b337f06c19cc2d787aa16d27711 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:10:06 +0400 +Subject: [PATCH 06/39] 64-bit multilib hack. + +GCC has internal multilib handling code but it assumes a very specific rigid directory +layout. The build system implementation of multilib layout is very generic and allows +complete customisation of the library directories. + +This patch is a partial solution to allow any custom directories to be passed into gcc +and handled correctly. It forces gcc to use the base_libdir (which is the current +directory, "."). We need to do this for each multilib that is configured as we don't +know which compiler options may be being passed into the compiler. Since we have a compiler +per mulitlib at this point that isn't an issue. + +The one problem is the target compiler is only going to work for the default multlilib at +this point. Ideally we'd figure out which multilibs were being enabled with which paths +and be able to patch these entries with a complete set of correct paths but this we +don't have such code at this point. This is something the target gcc recipe should do +and override these platform defaults in its build config. + +RP 15/8/11 + +Signed-off-by: Khem Raj +Signed-off-by: Elvis Dowson + +Upstream-Status: Pending +--- + gcc/config/i386/t-linux64 | 6 ++---- + gcc/config/mips/t-linux64 | 10 +++------- + gcc/config/rs6000/t-linux64 | 5 ++--- + 3 files changed, 7 insertions(+), 14 deletions(-) + +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index 8ea0faff369..266c6008004 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -32,7 +32,5 @@ + # + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) +-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_DIRNAMES = . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 +index c017b7d04c5..126892cf40b 100644 +--- a/gcc/config/mips/t-linux64 ++++ b/gcc/config/mips/t-linux64 +@@ -17,10 +17,6 @@ + # . + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 +-MULTILIB_DIRNAMES = n32 32 64 +-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) +-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) +-MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++MULTILIB_DIRNAMES = . . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ++ +diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +index 0faa2a02df4..13fd8ca971e 100644 +--- a/gcc/config/rs6000/t-linux64 ++++ b/gcc/config/rs6000/t-linux64 +@@ -26,10 +26,9 @@ + # MULTILIB_OSDIRNAMES according to what is found on the target. + + MULTILIB_OPTIONS := m64/m32 +-MULTILIB_DIRNAMES := 64 32 ++MULTILIB_DIRNAMES := . . + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0007-optional-libstdc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0007-optional-libstdc.patch new file mode 100644 index 00000000..721ea03f --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0007-optional-libstdc.patch @@ -0,0 +1,125 @@ +From fb7df63e9548c29b70601d642a1850fc455f8565 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:12:56 +0400 +Subject: [PATCH 07/39] optional libstdc + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + gcc/c-family/c.opt | 4 ++++ + gcc/cp/g++spec.c | 1 + + gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++- + gcc/gcc.c | 1 + + 4 files changed, 37 insertions(+), 1 deletion(-) + +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 5013501b232..6312f2c8f90 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1900,6 +1900,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++. + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c +index 443a1746da3..e9b51be62ef 100644 +--- a/gcc/cp/g++spec.c ++++ b/gcc/cp/g++spec.c +@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index cb71b60fe3c..b0d481e3a30 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -211,6 +211,9 @@ in the following sections. + -fno-weak -nostdinc++ @gol + -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol ++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol ++-fvtv-counts -fvtv-debug @gol ++-nostdlib++ @gol + -fext-numeric-literals @gol + -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol + -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol +@@ -509,7 +512,7 @@ Objective-C and Objective-C++ Dialects}. + -s -static -static-pie -static-libgcc -static-libstdc++ @gol + -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol + -static-libmpx -static-libmpxwrappers @gol +--shared -shared-libgcc -symbolic @gol ++-shared -shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol} -z @var{keyword}} + +@@ -12331,6 +12334,33 @@ library subroutines. + constructors are called; @pxref{Collect2,,@code{collect2}, gccint, + GNU Compiler Collection (GCC) Internals}.) + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ ++@cindex @option{-lgcc}, use with @option{-nostdlib} ++@cindex @option{-nostdlib} and unresolved references ++@cindex unresolved references and @option{-nostdlib} ++@cindex @option{-lgcc}, use with @option{-nodefaultlibs} ++@cindex @option{-nodefaultlibs} and unresolved references ++@cindex unresolved references and @option{-nodefaultlibs} ++One of the standard libraries bypassed by @option{-nostdlib} and ++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines ++which GCC uses to overcome shortcomings of particular machines, or special ++needs for some languages. ++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++Collection (GCC) Internals}, ++for more discussion of @file{libgcc.a}.) ++In most cases, you need @file{libgcc.a} even when you want to avoid ++other standard libraries. In other words, when you specify @option{-nostdlib} ++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well. ++This ensures that you have no unresolved references to internal GCC ++library subroutines. ++(An example of such an internal subroutine is @code{__main}, used to ensure C++ ++constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++GNU Compiler Collection (GCC) Internals}.) ++ + @item -pie + @opindex pie + Produce a dynamically linked position independent executable on targets +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 02b3cd39fc2..8cd27a5dad5 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1047,6 +1047,7 @@ proper position among the other output files. */ + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}" + #endif + +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file mode 100644 index 00000000..a76b7f73 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch @@ -0,0 +1,59 @@ +From 11eb97efccb90b830c84ed077a25b1a15ad3335b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:14:20 +0400 +Subject: [PATCH 08/39] gcc: disable MASK_RELAX_PIC_CALLS bit + +The new feature added after 4.3.3 +"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" +will cause cc1plus eat up all the system memory when build webkit-gtk. +The function mips_get_pic_call_symbol keeps on recursively calling itself. +Disable this feature to walk aside the bug. + +Signed-off-by: Dongxiao Xu +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 7 ------- + gcc/configure.ac | 7 ------- + 2 files changed, 14 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index cafd05fd150..19ba051d673 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -27553,13 +27553,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 + $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index dd5b38195ce..066dfe19bb6 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4798,13 +4798,6 @@ x: + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) + + AC_CACHE_CHECK([linker for .eh_frame personality relaxation], +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0009-COLLECT_GCC_OPTIONS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0009-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 00000000..3abece0d --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0009-COLLECT_GCC_OPTIONS.patch @@ -0,0 +1,38 @@ +From e19d25847f08eeb5ef26a031fa5eff732bfd0d43 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:16:28 +0400 +Subject: [PATCH 09/39] COLLECT_GCC_OPTIONS + +This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to +invoke collect2. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/gcc.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 8cd27a5dad5..d355d65583a 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4677,6 +4677,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 00000000..5785b589 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch @@ -0,0 +1,96 @@ +From 265cb883c310f3bb7e49fd13b81362476fbeb6c1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:17:25 +0400 +Subject: [PATCH 10/39] Use the defaults.h in ${B} instead of ${S}, and t-oe in + ${B} + +Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that +the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +While compiling gcc-crosssdk-initial-x86_64 on some host, there is +occasionally failure that test the existance of default.h doesn't +work, the reason is tm_include_list='** defaults.h' rather than +tm_include_list='** ./defaults.h' + +So we add the test condition for this situation. +Signed-off-by: Hongxu Jia +--- + gcc/Makefile.in | 2 +- + gcc/configure | 4 ++-- + gcc/configure.ac | 4 ++-- + gcc/mkconfig.sh | 4 ++-- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 20bee0494b1..1367136bfac 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -538,7 +538,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ + TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + + xmake_file=@xmake_file@ +-tmake_file=@tmake_file@ ++tmake_file=@tmake_file@ ./t-oe + TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ + TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ + TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ +diff --git a/gcc/configure b/gcc/configure +index 19ba051d673..a575839c1b2 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12158,8 +12158,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 066dfe19bb6..676116a6d96 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1922,8 +1922,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh +index 0f75c863c0b..68d8d6613cf 100644 +--- a/gcc/mkconfig.sh ++++ b/gcc/mkconfig.sh +@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then + if [ $# -ge 1 ]; then + echo '#ifdef IN_GCC' >> ${output}T + for file in "$@"; do +- if test x"$file" = x"defaults.h"; then ++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then + postpone_defaults_h="yes" + else + echo "# include \"$file\"" >> ${output}T +@@ -106,7 +106,7 @@ esac + + # If we postponed including defaults.h, add the #include now. + if test x"$postpone_defaults_h" = x"yes"; then +- echo "# include \"defaults.h\"" >> ${output}T ++ echo "# include \"./defaults.h\"" >> ${output}T + fi + + # Add multiple inclusion protection guard, part two. +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0011-fortran-cross-compile-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0011-fortran-cross-compile-hack.patch new file mode 100644 index 00000000..fe0fb7d5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0011-fortran-cross-compile-hack.patch @@ -0,0 +1,46 @@ +From 71cba188d47b6ae9d9b87261eb4bc9eb68ae355d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:20:01 +0400 +Subject: [PATCH 11/39] fortran cross-compile hack. + +* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used +used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross +directory. + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + libgfortran/configure | 2 +- + libgfortran/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgfortran/configure b/libgfortran/configure +index 91fce8fecd0..6747f86eb98 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -12883,7 +12883,7 @@ esac + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + ac_ext=${ac_fc_srcext-f} + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index bf6d3634dda..9dbe43cc616 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -250,7 +250,7 @@ AC_SUBST(enable_static) + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0012-cpp-honor-sysroot.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0012-cpp-honor-sysroot.patch new file mode 100644 index 00000000..961f96f1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0012-cpp-honor-sysroot.patch @@ -0,0 +1,54 @@ +From b3e8e7e8ae106e3207e9edc3d23dcce1464b755f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:22:00 +0400 +Subject: [PATCH 12/39] cpp: honor sysroot. + +Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile +preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location +rather than the --sysroot option specified on the commandline. If access to that directory is +permission denied (unreadable), gcc will error. + +This happens when ccache is in use due to the fact it uses preprocessed source files. + +The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, +-isystem, -isysroot happen and the correct sysroot is used. + +[YOCTO #2074] + +RP 2012/04/13 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/cp/lang-specs.h | 2 +- + gcc/gcc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h +index f0802b8915c..f324d299849 100644 +--- a/gcc/cp/lang-specs.h ++++ b/gcc/cp/lang-specs.h +@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see + {".ii", "@c++-cpp-output", 0, 0, 0}, + {"@c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1plus -fpreprocessed %i %(cc1_options) %2\ ++ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff --git a/gcc/gcc.c b/gcc/gcc.c +index d355d65583a..570cdc00034 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1343,7 +1343,7 @@ static const struct compiler default_compilers[] = + %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0013-MIPS64-Default-to-N64-ABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0013-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 00000000..8ef8806b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0013-MIPS64-Default-to-N64-ABI.patch @@ -0,0 +1,57 @@ +From 0f3629978cd7c98614e87d4fd190b89864221631 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:23:08 +0400 +Subject: [PATCH 13/39] MIPS64: Default to N64 ABI + +MIPS64 defaults to n32 ABI, this patch makes it +so that it defaults to N64 ABI + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE config specific] +--- + gcc/config.gcc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 8741dd1e3b2..2ffcb39d85f 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2137,29 +2137,29 @@ mips*-*-linux*) # Linux MIPS, either endian. + default_mips_arch=mips32 + ;; + mips64el-st-linux-gnu) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_file="${tm_file} mips/st.h" + tmake_file="${tmake_file} mips/t-st" + enable_mips_multilibs="yes" + ;; + mips64octeon*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" + target_cpu_default=MASK_SOFT_FLOAT_ABI + enable_mips_multilibs="yes" + ;; + mipsisa64r6*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r6 + enable_mips_multilibs="yes" + ;; + mipsisa64r2*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r2 + enable_mips_multilibs="yes" + ;; + mips64*-*-linux* | mipsisa64*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + enable_mips_multilibs="yes" + ;; + esac +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 00000000..043bb9dd --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch @@ -0,0 +1,248 @@ +From 53f1c382b1366c5621c8edead9c766950c290fd9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:24:50 +0400 +Subject: [PATCH 14/39] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER + relative to SYSTEMLIBS_DIR + +This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER +relative to SYSTEMLIBS_DIR which can be set in generated headers +This breaks the assumption of hardcoded multilib in gcc +Change is only for the supported architectures in OE including +SH, sparc, alpha for possible future support (if any) + +Removes the do_headerfix task in metadata + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE configuration] +--- + gcc/config/alpha/linux-elf.h | 4 ++-- + gcc/config/arm/linux-eabi.h | 4 ++-- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 6 +++--- + gcc/config/linux.h | 8 ++++---- + gcc/config/mips/linux.h | 12 ++++++------ + gcc/config/riscv/linux.h | 2 +- + gcc/config/rs6000/linux64.h | 16 ++++++---------- + gcc/config/sh/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + gcc/config/sparc/linux64.h | 4 ++-- + 12 files changed, 30 insertions(+), 34 deletions(-) + +diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h +index 36b74dc1993..02373578af8 100644 +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see + #define EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" + #elif DEFAULT_LIBC == LIBC_GLIBC +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index 8585fde3d41..b3af68cac57 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -62,8 +62,8 @@ + GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ + + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" ++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" + #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT + + #define GLIBC_DYNAMIC_LINKER \ +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index cfcd9cb1a5c..a798e987ecb 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + + #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + %{static:-Bstatic} \ +diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h +index 69f97f15b0d..71bc31d9231 100644 +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #define GNU_USER_LINK_EMULATION "elf_i386" +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index f2d913e30ac..8725f33d8a5 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 2ea4ff92c1d..487b0c0923b 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + GLIBC_DYNAMIC_LINKER must be defined for each target using them, or + GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets + supporting both 32-bit and 64-bit compilation. */ +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" +diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h +index 2dfd0c18b90..12057c51b5e 100644 +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" + + #define GLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + + #undef UCLIBC_DYNAMIC_LINKER32 + #define UCLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + #undef UCLIBC_DYNAMIC_LINKER64 + #define UCLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" + #define UCLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 \ +diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h +index aa8a28d5d..ebf9551c9 100644 +--- a/gcc/config/riscv/linux.h ++++ b/gcc/config/riscv/linux.h +@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. + GNU_USER_TARGET_OS_CPP_BUILTINS(); \ + } while (0) + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" + + #define MUSL_ABI_SUFFIX \ + "%{mabi=ilp32:-sf}" \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 90fe6566255..55695dadd91 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -420,16 +420,11 @@ extern int dot_symbols; + #undef LINK_OS_DEFAULT_SPEC + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" + +-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" +- ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" + #ifdef LINUX64_DEFAULT_ABI_ELFv2 +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.2}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" + #else +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.1}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +@@ -437,8 +432,9 @@ extern int dot_symbols; + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++ + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h +index 6d2ccd012ba..ec78a89ce15 100644 +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ + "%{mfdpic:-fdpic}.so.1" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" +diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h +index 9fb03af0fe9..401fddbbb22 100644 +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ +diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h +index c1fe42165b7..26a79bfa2e3 100644 +--- a/gcc/config/sparc/linux64.h ++++ b/gcc/config/sparc/linux64.h +@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" + + #ifdef SPARC_BI_ARCH + +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0015-gcc-Fix-argument-list-too-long-error.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0015-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 00000000..4bff8428 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0015-gcc-Fix-argument-list-too-long-error.patch @@ -0,0 +1,40 @@ +From 2e75a14cd60227e036790184f0eb400abc3c870b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:26:37 +0400 +Subject: [PATCH 15/39] gcc: Fix argument list too long error. + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 1367136bfac..71a8275c39f 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3538,7 +3538,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0016-Disable-sdt.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0016-Disable-sdt.patch new file mode 100644 index 00000000..81975462 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0016-Disable-sdt.patch @@ -0,0 +1,113 @@ +From 423d87ac47d21e399d759d7ff3b638f0c721a7df Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:28:10 +0400 +Subject: [PATCH 16/39] Disable sdt. + +We don't list dtrace in DEPENDS so we shouldn't be depending on this header. +It may or may not exist from preivous builds though. To be determinstic, disable +sdt.h usage always. This avoids build failures if the header is removed after configure +but before libgcc is compiled for example. + +RP 2012/8/7 + +Signed-off-by: Khem Raj + +Disable sdt for libstdc++-v3. + +Signed-off-by: Robert Yang + +Upstream-Status: Inappropriate [hack] +--- + gcc/configure | 12 ++++++------ + gcc/configure.ac | 18 +++++++++--------- + libstdc++-v3/configure | 6 +++--- + libstdc++-v3/configure.ac | 2 +- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index a575839c1b2..872338f29b6 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29296,12 +29296,12 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 + $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } + have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h +- +-fi ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++# ++#fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 + $as_echo "$have_sys_sdt_h" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 676116a6d96..55046e68926 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5957,15 +5957,15 @@ fi + AC_SUBST([enable_default_ssp]) + + # Test for on the target. +-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) +-AC_MSG_CHECKING(sys/sdt.h in the target C library) +-have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- AC_DEFINE(HAVE_SYS_SDT_H, 1, +- [Define if your target C library provides sys/sdt.h]) +-fi +-AC_MSG_RESULT($have_sys_sdt_h) ++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) ++#AC_MSG_CHECKING(sys/sdt.h in the target C library) ++#have_sys_sdt_h=no ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# AC_DEFINE(HAVE_SYS_SDT_H, 1, ++# [Define if your target C library provides sys/sdt.h]) ++#fi ++#AC_MSG_RESULT($have_sys_sdt_h) + + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index c9dbaa139d5..c64a77d152b 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -21786,11 +21786,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test $glibcxx_cv_sys_sdt_h = yes; then ++# if test $glibcxx_cv_sys_sdt_h = yes; then + +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h + +- fi ++# fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 + $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } + +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 0ef96270c9c..afe55a1b215 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN + GLIBCXX_CHECK_SC_NPROC_ONLN + GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP + GLIBCXX_CHECK_SYSCTL_HW_NCPU +-GLIBCXX_CHECK_SDT_H ++#GLIBCXX_CHECK_SDT_H + + # Check for available headers. + AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0017-libtool.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0017-libtool.patch new file mode 100644 index 00000000..0caa1ce1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0017-libtool.patch @@ -0,0 +1,42 @@ +From c8b11e96b11910b2d4df6ae8104466e3303d933f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:29:11 +0400 +Subject: [PATCH 17/39] libtool + +libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 +when running on am x86_64 build host. + +This patch stops this speading to libdir in the libstdc++.la file within libtool. +Arguably, it shouldn't be passing this into libtool in the first place but +for now this resolves the nastiest problems this causes. + +func_normal_abspath would resolve an empty path to `pwd` so we need +to filter the zero case. + +RP 2012/8/24 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + ltmain.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec85d70..0121fba707f 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6359,6 +6359,10 @@ func_mode_link () + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" ++ if test -n "$install_libdir"; then ++ func_normal_abspath "$install_libdir" ++ install_libdir=$func_normal_abspath_result ++ fi + + oldlibs= + if test -z "$rpath"; then +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 00000000..643cc671 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch @@ -0,0 +1,43 @@ +From 7dbba844a59bdf6e7d724f8bfa7927246cb7af8f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:30:32 +0400 +Subject: [PATCH 18/39] gcc: armv4: pass fix-v4bx to linker to support EABI. + +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/config/arm/linux-eabi.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index b3af68cac57..330b6e13c5f 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -88,10 +88,14 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 00000000..08491865 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch @@ -0,0 +1,102 @@ +From 117140acd3c383f620ff75894276001c7405dcce Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:33:04 +0400 +Subject: [PATCH 19/39] Use the multilib config files from ${B} instead of + using the ones from ${S} + +Use the multilib config files from ${B} instead of using the ones from ${S} +so that the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 22 ++++++++++++++++++---- + gcc/configure.ac | 22 ++++++++++++++++++---- + 2 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 872338f29b6..cfcadc93a01 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12138,10 +12138,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -12152,6 +12162,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 55046e68926..44b90478f55 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1902,10 +1902,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -1916,6 +1926,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch new file mode 100644 index 00000000..911fe852 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch @@ -0,0 +1,31 @@ +From a7266111a5ba2d146c979e86ff84f6b807ca5fdc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:39:38 +0000 +Subject: [PATCH 20/39] Avoid using libdir from .la which usually points to a + host path + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jonathan Liu +Signed-off-by: Khem Raj +--- + ltmain.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 0121fba707f..52bdbdb5f9c 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5628,6 +5628,9 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else ++ # Instead of using libdir from .la which usually points to a host path, ++ # use the path the .la is contained in. ++ libdir="$abs_ladir" + dir="$libdir" + absdir="$libdir" + fi +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0021-export-CPP.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0021-export-CPP.patch new file mode 100644 index 00000000..2e6b4110 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0021-export-CPP.patch @@ -0,0 +1,53 @@ +From c8599fc3b5781b319707c9c0f1b0a1ef7cddb027 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:40:59 +0000 +Subject: [PATCH 21/39] export CPP + +The OE environment sets and exports CPP as being the target gcc. When +building gcc-cross-canadian for a mingw targetted sdk, the following can be found +in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: + +configure:3641: checking for _FILE_OFFSET_BITS value needed for large files +configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 +configure:3666: $? = 0 +configure:3698: result: no +configure:3786: checking how to run the C preprocessor +configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 +configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c +configure:3876: $? = 0 + +Note this is a *build* target (in build-x86_64-linux) so it should be +using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 +headers are very different, using the wrong cpp is a real problem. It is leaking +into configure through the CPP variable. Ultimately this leads to build +failures related to not being able to include a process.h file for pem-unix.c. + +The fix is to ensure we export a sane CPP value into the build +environment when using build targets. We could define a CPP_FOR_BUILD value which may be +the version which needs to be upstreamed but for now, this fix is good enough to +avoid the problem. + +RP 22/08/2013 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 2bf83b72265..1af45580086 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -149,6 +149,7 @@ BUILD_EXPORTS = \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ ++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch new file mode 100644 index 00000000..17c581f1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch @@ -0,0 +1,42 @@ +From 5e2ee46c720b6ce03a18da70dd4e0917c258ab0b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:21:55 +0000 +Subject: [PATCH 22/39] Disable the MULTILIB_OSDIRNAMES and other multilib + options. + +Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on +systems where the libdir is NOT set to /lib64. This is allowed by the +ABI, as +long as the dynamic loader is present in /lib. + +We simply want to use the default rules in gcc to find and configure the +normal libdir. + +Upstream-Status: Inappropriate[OE-Specific] + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/t-aarch64-linux | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +index b9897785a89..7d06f0d0edb 100644 +--- a/gcc/config/aarch64/t-aarch64-linux ++++ b/gcc/config/aarch64/t-aarch64-linux +@@ -21,8 +21,8 @@ + LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + +-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) +-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) ++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) ++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + +-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) ++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0023-Ensure-target-gcc-headers-can-be-included.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0023-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 00000000..73db3e69 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0023-Ensure-target-gcc-headers-can-be-included.patch @@ -0,0 +1,62 @@ +From 73766424a2f71b1810fb8afdd863028855d87e5a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:25:11 +0000 +Subject: [PATCH 23/39] Ensure target gcc headers can be included + +There are a few headers installed as part of the OpenEmbedded +gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe +built for the target architecture, these are within the target +sysroot and not cross/nativesdk; thus they weren't able to be +found by gcc with the existing search paths. Add support for +picking up these headers under the sysroot supplied on the gcc +command line in order to resolve this. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton +Signed-off-by: Khem Raj +--- + gcc/Makefile.in | 2 ++ + gcc/cppdefault.c | 4 ++++ + gcc/defaults.h | 9 +++++++++ + gcc/gcc.c | 7 ------- + 4 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 71a8275c39f..5ae693fb06c 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -614,6 +614,7 @@ libexecdir = @libexecdir@ + + # Directory in which the compiler finds libraries etc. + libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libsubdir_target = gcc/$(target_noncanonical)/$(version) + # Directory in which the compiler finds executables + libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which all plugin resources are installed +@@ -2870,6 +2871,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" + + PREPROCESSOR_DEFINES = \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ + -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ + -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index b36a979d5ba..e2e187dedaf 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] + /* This is the dir for gcc's private headers. */ + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, + #endif ++#ifdef GCC_INCLUDE_SUBDIR_TARGET ++ /* This is the dir for gcc's private headers under the specified sysroot. */ ++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++#endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch new file mode 100644 index 00000000..67b47f4e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch @@ -0,0 +1,54 @@ +From 57beef69396f6c187014b8e61cdc966218479d07 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 11:17:19 +0000 +Subject: [PATCH 24/39] gcc 4.8+ won't build with --disable-dependency-tracking + +since the *.Ppo files don't get created unless --enable-dependency-tracking is true. + +This patch ensures we only use those compiler options when its enabled. + +Upstream-Status: Submitted + +(Problem was already reported upstream, attached this patch there +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) + +RP +2012/09/22 + +Signed-off-by: Khem Raj +--- + libatomic/Makefile.am | 3 ++- + libatomic/Makefile.in | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index 803b292cce5..b47842eb590 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) + +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index c8f38be5835..4fab7cec3ea 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -335,7 +335,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch new file mode 100644 index 00000000..d8b35bbb --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch @@ -0,0 +1,38 @@ +From fd96c9b35c592f1bdd32bc5ae669157473e44063 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 3 Mar 2015 08:21:19 +0000 +Subject: [PATCH 25/39] Don't search host directory during "relink" if + $inst_prefix is provided + +http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj +--- + ltmain.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 52bdbdb5f9c..82bcec39f05 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6004,12 +6004,13 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. ++ # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" +- # Try looking first in the location we're being installed to. ++ + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ add_dir="-L$inst_prefix_dir$libdir" + ;; + esac + fi +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch new file mode 100644 index 00000000..d3ab5aa9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch @@ -0,0 +1,29 @@ +From c2e400afe8c514357859fca88af4d3e1fcbfe2ff Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:15:27 -0700 +Subject: [PATCH 26/39] Use SYSTEMLIBS_DIR replacement instead of hardcoding + base_libdir + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index bf1327e98cc..64436183bc8 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,7 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0027-aarch64-Add-support-for-musl-ldso.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0027-aarch64-Add-support-for-musl-ldso.patch new file mode 100644 index 00000000..9e5ce8a6 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0027-aarch64-Add-support-for-musl-ldso.patch @@ -0,0 +1,28 @@ +From a2cc175769fd8255750eaecae64e3d1f9c38d48f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:18:39 -0700 +Subject: [PATCH 27/39] aarch64: Add support for musl ldso + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index 64436183bc8..ba156676026 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -24,7 +24,7 @@ + #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file mode 100644 index 00000000..2673f4e3 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch @@ -0,0 +1,54 @@ +From a8a8a02788ff98f253ce0b33adcb0e661d24b1e3 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sun, 5 Jul 2015 20:25:18 -0700 +Subject: [PATCH 28/39] libcc1: fix libcc1's install path and rpath + +* Install libcc1.so and libcc1plugin.so into + $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we + had done to lto-plugin. +* Fix bad RPATH iussue: + gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file + /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 + [rpaths] + +Upstream-Status: Inappropriate [OE configuration] + +Signed-off-by: Robert Yang +--- + libcc1/Makefile.am | 4 ++-- + libcc1/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am +index 6ecb66b4365..634cce3c2a9 100644 +--- a/libcc1/Makefile.am ++++ b/libcc1/Makefile.am +@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + + if ENABLE_PLUGIN + plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la +diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in +index 47be10025ad..8d5481d87bd 100644 +--- a/libcc1/Makefile.in ++++ b/libcc1/Makefile.in +@@ -303,8 +303,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la + shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0029-handle-sysroot-support-for-nativesdk-gcc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0029-handle-sysroot-support-for-nativesdk-gcc.patch new file mode 100644 index 00000000..727bb0da --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0029-handle-sysroot-support-for-nativesdk-gcc.patch @@ -0,0 +1,213 @@ +From 3bb74495e45e0e798daae5556497e688b8fc4eef Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:39:54 +0000 +Subject: [PATCH 29/39] handle sysroot support for nativesdk-gcc + +Being able to build a nativesdk gcc is useful, particularly in cases +where the host compiler may be of an incompatible version (or a 32 +bit compiler is needed). + +Sadly, building nativesdk-gcc is not straight forward. We install +nativesdk-gcc into a relocatable location and this means that its +library locations can change. "Normal" sysroot support doesn't help +in this case since the values of paths like "libdir" change, not just +base root directory of the system. + +In order to handle this we do two things: + +a) Add %r into spec file markup which can be used for injected paths + such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). +b) Add other paths which need relocation into a .gccrelocprefix section + which the relocation code will notice and adjust automatically. + +Upstream-Status: Inappropriate +RP 2015/7/28 + +Signed-off-by: Khem Raj +--- + gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++------------- + gcc/cppdefault.h | 3 ++- + gcc/gcc.c | 20 +++++++++++++------ + 3 files changed, 53 insertions(+), 20 deletions(-) + +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index e2e187dedaf..2faba2b1d63 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -35,6 +35,30 @@ + # undef CROSS_INCLUDE_DIR + #endif + ++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; ++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; ++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; ++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; ++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; ++#ifdef LOCAL_INCLUDE_DIR ++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; ++#endif ++#ifdef PREFIX_INCLUDE_DIR ++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; ++#endif ++#ifdef FIXED_INCLUDE_DIR ++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; ++#endif ++#ifdef CROSS_INCLUDE_DIR ++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; ++#endif ++#ifdef TOOL_INCLUDE_DIR ++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; ++#endif ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; ++#endif ++ + const struct default_include cpp_include_defaults[] + #ifdef INCLUDE_DEFAULTS + = INCLUDE_DEFAULTS; +@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[] + = { + #ifdef GPLUSPLUS_INCLUDE_DIR + /* Pick up GNU C++ generic include files. */ +- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR + /* Pick up GNU C++ target-dependent include files. */ +- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, + #endif + #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR + /* Pick up GNU C++ backward and deprecated include files. */ +- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GCC_INCLUDE_DIR + /* This is the dir for gcc's private headers. */ +- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef GCC_INCLUDE_SUBDIR_TARGET + /* This is the dir for gcc's private headers under the specified sysroot. */ +- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, + #endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, + #endif + #ifdef PREFIX_INCLUDE_DIR +- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, ++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, + #endif + #ifdef FIXED_INCLUDE_DIR + /* This is the dir for fixincludes. */ +- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, ++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, + /* A multilib suffix needs adding if different multilibs use + different headers. */ + #ifdef SYSROOT_HEADERS_SUFFIX_SPEC +@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[] + #endif + #ifdef CROSS_INCLUDE_DIR + /* One place the target system's headers might be. */ +- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef TOOL_INCLUDE_DIR + /* Another place the target system's headers might be. */ +- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, ++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, + #endif + #ifdef NATIVE_SYSTEM_HEADER_DIR + /* /usr/include comes dead last. */ +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, + #endif + { 0, 0, 0, 0, 0, 0 } + }; +diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h +index 4a0186d1cf2..29e5d9da0dc 100644 +--- a/gcc/cppdefault.h ++++ b/gcc/cppdefault.h +@@ -33,7 +33,8 @@ + + struct default_include + { +- const char *const fname; /* The name of the directory. */ ++ const char *fname; /* The name of the directory. */ ++ + const char *const component; /* The component containing the directory + (see update_path in prefix.c) */ + const char cplusplus; /* Only look here if we're compiling C++. */ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 3fb64d453f1..cd0c7fbe961 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -248,6 +248,8 @@ FILE *report_times_to_file = NULL; + #endif + static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; + ++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; ++ + /* Nonzero means pass the updated target_system_root to the compiler. */ + + static int target_system_root_changed; +@@ -519,6 +521,7 @@ or with constant text in a single argument. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. ++ %r Output the base path target_relocatable_prefix + %S process STARTFILE_SPEC as a spec. A capital S is actually used here. + %E process ENDFILE_SPEC as a spec. A capital E is actually used here. + %C process CPP_SPEC as a spec. +@@ -1487,10 +1490,10 @@ static const char *gcc_libexec_prefix; + gcc_exec_prefix is set because, in that case, we know where the + compiler has been installed, and use paths relative to that + location instead. */ +-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; +-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; +-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; ++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; ++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; ++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + + /* For native compilers, these are well-known paths containing + components that may be provided by the system. For cross +@@ -1498,9 +1501,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + static const char *md_exec_prefix = MD_EXEC_PREFIX; + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; + static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_1 ++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_2 ++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_2; + + /* A relative path to be used in finding the location of tools +@@ -5849,6 +5852,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + } + break; + ++ case 'r': ++ obstack_grow (&obstack, target_relocatable_prefix, ++ strlen (target_relocatable_prefix)); ++ break; ++ + case 'S': + value = do_spec_1 (startfile_spec, 0, NULL); + if (value != 0) +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file mode 100644 index 00000000..33566dff --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch @@ -0,0 +1,102 @@ +From f5cc8cd0c44092dc487106ade27e011c1f584ada Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:41:45 +0000 +Subject: [PATCH 30/39] Search target sysroot gcc version specific dirs with + multilib. + +We install the gcc libraries (such as crtbegin.p) into +//5.2.0/ +which is a default search path for GCC (aka multi_suffix in the +code below). is 'machine' in gcc's terminology. We use +these directories so that multiple gcc versions could in theory +co-exist on target. + +We only want to build one gcc-cross-canadian per arch and have this work +for all multilibs. can be handled by mapping the multilib + to the one used by gcc-cross-canadian, e.g. +mips64-polkmllib32-linux +is symlinked to by mips64-poky-linux. + +The default gcc search path in the target sysroot for a "lib64" mutlilib +is: + +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +which means that the lib32 crtbegin.o will be found and the lib64 ones +will not which leads to compiler failures. + +This patch injects a multilib version of that path first so the lib64 +binaries can be found first. With this change the search path becomes: + +/lib32/../lib64/mips64-poky-linux/5.2.0/ +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +Upstream-Status: Pending +RP 2015/7/31 + +Signed-off-by: Khem Raj +--- + gcc/gcc.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index cd0c7fbe961..f6f3aa077c8 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -2527,7 +2527,7 @@ for_each_path (const struct path_prefix *paths, + if (path == NULL) + { + len = paths->max_len + extra_space + 1; +- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); + path = XNEWVEC (char, len); + } + +@@ -2539,6 +2539,33 @@ for_each_path (const struct path_prefix *paths, + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { ++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) ++ { ++ const char *this_multi; ++ size_t this_multi_len; ++ ++ if (pl->os_multilib) ++ { ++ this_multi = multi_os_dir; ++ this_multi_len = multi_os_dir_len; ++ } ++ else ++ { ++ this_multi = multi_dir; ++ this_multi_len = multi_dir_len; ++ } ++ ++ /* Look in multilib MACHINE/VERSION subdirectory first */ ++ if (this_multi_len) ++ { ++ memcpy (path + len, this_multi, this_multi_len + 1); ++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); ++ ret = callback (path, callback_info); ++ if (ret) ++ break; ++ } ++ } ++ + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0031-Fix-various-_FOR_BUILD-and-related-variables.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0031-Fix-various-_FOR_BUILD-and-related-variables.patch new file mode 100644 index 00000000..dabc0059 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0031-Fix-various-_FOR_BUILD-and-related-variables.patch @@ -0,0 +1,137 @@ +From 93b4e1d3a0f8417118d1c48fcd1ce51996e1420b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:42:45 +0000 +Subject: [PATCH 31/39] Fix various _FOR_BUILD and related variables + +When doing a FOR_BUILD thing, you have to override CFLAGS with +CFLAGS_FOR_BUILD. And if you use C++, you also have to override +CXXFLAGS with CXXFLAGS_FOR_BUILD. +Without this, when building for mingw, you end up trying to use +the mingw headers for a host build. + +The same goes for other variables as well, such as CPPFLAGS, +CPP, and GMPINC. + +Upstream-Status: Pending + +Signed-off-by: Peter Seebach +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + Makefile.in | 6 ++++++ + Makefile.tpl | 5 +++++ + gcc/Makefile.in | 2 +- + gcc/configure | 2 +- + gcc/configure.ac | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 1af45580086..8966453c32c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -152,6 +152,7 @@ BUILD_EXPORTS = \ + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -169,6 +170,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -186,6 +190,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +@@ -753,6 +758,7 @@ BASE_FLAGS_TO_PASS = \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ ++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ + "INSTALL=$(INSTALL)" \ +diff --git a/Makefile.tpl b/Makefile.tpl +index abd2bc2fb89..5822b260404 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -154,6 +154,7 @@ BUILD_EXPORTS = \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -171,6 +172,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 5ae693fb06c..02ee0aa72f4 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -801,7 +801,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ + BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) + BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ +- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) ++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) + + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') +diff --git a/gcc/configure b/gcc/configure +index cfcadc93a01..2f6b4f72ef3 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -11797,7 +11797,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 44b90478f55..9f8a51fc9bd 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1708,7 +1708,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch new file mode 100644 index 00000000..6dd9d542 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch @@ -0,0 +1,28 @@ +From 99f3e3b427996ac579d95e68440a0bd7af7ef0fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Feb 2016 10:26:10 -0800 +Subject: [PATCH 32/39] nios2: Define MUSL_DYNAMIC_LINKER + +Signed-off-by: Marek Vasut +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gcc/config/nios2/linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h +index 4729105626d..36181eb7b85 100644 +--- a/gcc/config/nios2/linux.h ++++ b/gcc/config/nios2/linux.h +@@ -30,6 +30,7 @@ + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" + + #undef LINK_SPEC + #define LINK_SPEC LINK_SPEC_ENDIAN \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch new file mode 100644 index 00000000..05a6b0a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch @@ -0,0 +1,87 @@ +From 84b55ab2f68710a583d4ec810ea8b3b68576f8aa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 18:10:54 -0700 +Subject: [PATCH 33/39] Add ssp_nonshared to link commandline for musl targets + +when -fstack-protector options are enabled we need to +link with ssp_shared on musl since it does not provide +the __stack_chk_fail_local() so essentially it provides +libssp but not libssp_nonshared something like +TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED + where-as for glibc the needed symbols +are already present in libc_nonshared library therefore +we do not need any library helper on glibc based systems +but musl needs the libssp_noshared from gcc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/linux.h | 7 +++++++ + gcc/config/rs6000/linux.h | 10 ++++++++++ + gcc/config/rs6000/linux64.h | 10 ++++++++++ + 3 files changed, 27 insertions(+) + +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 487b0c0923b..4769d089538 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ + { 0, 0, 0, 0, 0, 0 } \ + } ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++ + #endif + + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ +diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h +index 01b40c762f6..e7c5e92215c 100644 +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -92,6 +92,16 @@ + " -m elf32ppclinux") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #undef LINK_OS_LINUX_SPEC + #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ + %{!static-pie: \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 55695dadd91..60f1ee24985 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -473,6 +473,16 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch new file mode 100644 index 00000000..391cda71 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch @@ -0,0 +1,465 @@ +From faf35e26740461fe1a1da5433d5a0169a663e3b5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Apr 2016 20:03:28 +0000 +Subject: [PATCH 34/39] libgcc: Add knob to use ldbl-128 on ppc + +musl does not support ldbl 128 so we can not assume +that linux as a whole supports ldbl-128 bits, instead +act upon configure option passed to gcc and assume no +on musl and yes otherwise if no option is passed since +default behaviour is to assume ldbl128 it does not +change the defaults + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + libgcc/Makefile.in | 1 + + libgcc/config/rs6000/t-linux | 5 ++++- + libgcc/configure | 18 ++++++++++++++++++ + libgcc/configure.ac | 12 ++++++++++++ + 4 files changed, 35 insertions(+), 1 deletion(-) + mode change 100644 => 100755 libgcc/configure + +diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in +index dd8cee99fd3..b5f478af382 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -48,6 +48,7 @@ unwind_header = @unwind_header@ + md_unwind_header = @md_unwind_header@ + sfp_machine_header = @sfp_machine_header@ + thread_header = @thread_header@ ++with_ldbl128 = @with_ldbl128@ + + host_noncanonical = @host_noncanonical@ + real_host_noncanonical = @real_host_noncanonical@ +diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux +index 4f6d4c4a4d2..c50dd94a2da 100644 +--- a/libgcc/config/rs6000/t-linux ++++ b/libgcc/config/rs6000/t-linux +@@ -1,3 +1,9 @@ + SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc ++ifeq ($(with_ldbl128),yes) ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 ++else ++# We do not want to build ibm-ldouble.c. ++LIB2ADD := $(filter-out %ibm-ldouble.c, $(LIB2ADD)) ++endif ++HOST_LIBGCC2_CFLAGS += -mno-minimal-toc +diff --git a/libgcc/config/rs6000/fixtfdi.c b/libgcc/config/rs6000/fixtfdi.c +--- a/libgcc/config/rs6000/fixtfdi.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/libgcc/config/rs6000/fixtfdi.c 2018-12-12 17:54:50.110755540 -0500 +@@ -0,0 +1,42 @@ ++/* Software floating-point emulation. ++ Convert a to 64bit signed integer ++ Copyright (C) 1997-2016 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Richard Henderson (rth@cygnus.com) and ++ Jakub Jelinek (jj@ultra.linux.cz). ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ In addition to the permissions in the GNU Lesser General Public ++ License, the Free Software Foundation gives you unlimited ++ permission to link the compiled version of this file into ++ combinations with other programs, and to distribute those ++ combinations without any restriction coming from the use of this ++ file. (The Lesser General Public License restrictions do apply in ++ other respects; for example, they cover modification of the file, ++ and distribution when not linked into a combine executable.) ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifdef _ARCH_PPC64 ++#include "soft-fp.h" ++#include "quad-float128.h" ++ ++DItype ++__fixtfdi (TFtype a) ++{ ++ if (a < 0) ++ return - __fixunstfdi (-a); ++ return __fixunstfdi (a); ++} ++#endif +diff --git a/libgcc/config/rs6000/fixunstfdi.c b/libgcc/config/rs6000/fixunstfdi.c +--- a/libgcc/config/rs6000/fixunstfdi.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/libgcc/config/rs6000/fixunstfdi.c 2018-12-12 17:56:06.141654537 -0500 +@@ -0,0 +1,58 @@ ++/* Software floating-point emulation. ++ Convert a to 64bit unsigned integer ++ Copyright (C) 1997-2016 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Richard Henderson (rth@cygnus.com) and ++ Jakub Jelinek (jj@ultra.linux.cz). ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ In addition to the permissions in the GNU Lesser General Public ++ License, the Free Software Foundation gives you unlimited ++ permission to link the compiled version of this file into ++ combinations with other programs, and to distribute those ++ combinations without any restriction coming from the use of this ++ file. (The Lesser General Public License restrictions do apply in ++ other respects; for example, they cover modification of the file, ++ and distribution when not linked into a combine executable.) ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifdef _ARCH_PPC64 ++#include "soft-fp.h" ++#include "quad-float128.h" ++ ++DItype ++__fixunstfdi (TFtype a) ++{ ++ if (a < 0) ++ return 0; ++ ++ /* Compute high word of result, as a flonum. */ ++ const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8))); ++ /* Convert that to fixed (but not to DItype!), ++ and shift it into the high word. */ ++ UDItype v = (USItype) b; ++ v <<= (sizeof (SItype) * 8); ++ /* Remove high part from the TFtype, leaving the low part as flonum. */ ++ a -= (TFtype) v; ++ /* Convert that to fixed (but not to DItype!) and add it in. ++ Sometimes A comes out negative. This is significant, since ++ A has more bits than a long int does. */ ++ if (a < 0) ++ v -= (USItype) (-a); ++ else ++ v += (USItype) a; ++ return v; ++} ++#endif +diff --git a/libgcc/config/rs6000/floatditf.c b/libgcc/config/rs6000/floatditf.c +--- a/libgcc/config/rs6000/floatditf.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/libgcc/config/rs6000/floatditf.c 2018-12-12 17:57:55.852953553 -0500 +@@ -0,0 +1,47 @@ ++/* Software floating-point emulation. ++ Convert a 64bit signed integer to IEEE quad ++ Copyright (C) 1997-2016 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Richard Henderson (rth@cygnus.com) and ++ Jakub Jelinek (jj@ultra.linux.cz). ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ In addition to the permissions in the GNU Lesser General Public ++ License, the Free Software Foundation gives you unlimited ++ permission to link the compiled version of this file into ++ combinations with other programs, and to distribute those ++ combinations without any restriction coming from the use of this ++ file. (The Lesser General Public License restrictions do apply in ++ other respects; for example, they cover modification of the file, ++ and distribution when not linked into a combine executable.) ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifdef _ARCH_PPC64 ++#include "soft-fp.h" ++#include "double.h" ++#include "quad-float128.h" ++ ++TFtype ++__floatditf (DItype u) ++{ ++ DFtype dh, dl; ++ ++ dh = (SItype) (u >> (sizeof (SItype) * 8)); ++ dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); ++ dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); ++ ++ return (TFtype) dh + (TFtype) dl; ++} ++#endif +diff --git a/libgcc/config/rs6000/floatunditf.c b/libgcc/config/rs6000/floatunditf.c +--- a/libgcc/config/rs6000/floatunditf.c 1969-12-31 19:00:00.000000000 -0500 ++++ b/libgcc/config/rs6000/floatunditf.c 2018-12-12 17:57:15.262473574 -0500 +@@ -0,0 +1,47 @@ ++/* Software floating-point emulation. ++ Convert a 64bit unsigned integer to IEEE quad ++ Copyright (C) 1997-2016 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by Richard Henderson (rth@cygnus.com) and ++ Jakub Jelinek (jj@ultra.linux.cz). ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ In addition to the permissions in the GNU Lesser General Public ++ License, the Free Software Foundation gives you unlimited ++ permission to link the compiled version of this file into ++ combinations with other programs, and to distribute those ++ combinations without any restriction coming from the use of this ++ file. (The Lesser General Public License restrictions do apply in ++ other respects; for example, they cover modification of the file, ++ and distribution when not linked into a combine executable.) ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifdef _ARCH_PPC64 ++#include "soft-fp.h" ++#include "double.h" ++#include "quad-float128.h" ++ ++TFtype ++__floatunditf (UDItype u) ++{ ++ DFtype dh, dl; ++ ++ dh = (USItype) (u >> (sizeof (SItype) * 8)); ++ dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); ++ dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); ++ ++ return (TFtype) dh + (TFtype) dl; ++} ++#endif +diff --git a/libgcc/config/rs6000/ppc64-fp.c b/libgcc/config/rs6000/ppc64-fp.c +--- a/libgcc/config/rs6000/ppc64-fp.c 2018-12-12 17:53:49.540038500 -0500 ++++ b/libgcc/config/rs6000/ppc64-fp.c 2018-12-12 17:49:51.897235314 -0500 +@@ -25,34 +25,21 @@ + . */ + + #if defined(__powerpc64__) || defined (__64BIT__) || defined(__ppc64__) +-#define TMODES + #include "fp-bit.h" + +-extern DItype __fixtfdi (TFtype); + extern DItype __fixdfdi (DFtype); + extern DItype __fixsfdi (SFtype); + extern USItype __fixunsdfsi (DFtype); + extern USItype __fixunssfsi (SFtype); +-extern TFtype __floatditf (DItype); +-extern TFtype __floatunditf (UDItype); + extern DFtype __floatdidf (DItype); + extern DFtype __floatundidf (UDItype); + extern SFtype __floatdisf (DItype); + extern SFtype __floatundisf (UDItype); +-extern DItype __fixunstfdi (TFtype); + + static DItype local_fixunssfdi (SFtype); + static DItype local_fixunsdfdi (DFtype); + + DItype +-__fixtfdi (TFtype a) +-{ +- if (a < 0) +- return - __fixunstfdi (-a); +- return __fixunstfdi (a); +-} +- +-DItype + __fixdfdi (DFtype a) + { + if (a < 0) +@@ -86,30 +73,6 @@ + return (SItype) a; + } + +-TFtype +-__floatditf (DItype u) +-{ +- DFtype dh, dl; +- +- dh = (SItype) (u >> (sizeof (SItype) * 8)); +- dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); +- dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); +- +- return (TFtype) dh + (TFtype) dl; +-} +- +-TFtype +-__floatunditf (UDItype u) +-{ +- DFtype dh, dl; +- +- dh = (USItype) (u >> (sizeof (SItype) * 8)); +- dh *= 2.0 * (((UDItype) 1) << ((sizeof (SItype) * 8) - 1)); +- dl = (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1)); +- +- return (TFtype) dh + (TFtype) dl; +-} +- + DFtype + __floatdidf (DItype u) + { +@@ -183,30 +146,6 @@ + return (SFtype) f; + } + +-DItype +-__fixunstfdi (TFtype a) +-{ +- if (a < 0) +- return 0; +- +- /* Compute high word of result, as a flonum. */ +- const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8))); +- /* Convert that to fixed (but not to DItype!), +- and shift it into the high word. */ +- UDItype v = (USItype) b; +- v <<= (sizeof (SItype) * 8); +- /* Remove high part from the TFtype, leaving the low part as flonum. */ +- a -= (TFtype) v; +- /* Convert that to fixed (but not to DItype!) and add it in. +- Sometimes A comes out negative. This is significant, since +- A has more bits than a long int does. */ +- if (a < 0) +- v -= (USItype) (-a); +- else +- v += (USItype) a; +- return v; +-} +- + /* This version is needed to prevent recursion; fixunsdfdi in libgcc + calls fixdfdi, which in turn calls calls fixunsdfdi. */ + +diff --git a/libgcc/config/rs6000/quad-float128.h b/libgcc/config/rs6000/quad-float128.h +--- a/libgcc/config/rs6000/quad-float128.h 2018-12-12 17:53:49.540038500 -0500 ++++ b/libgcc/config/rs6000/quad-float128.h 2018-12-12 17:30:19.423468244 -0500 +@@ -104,6 +104,11 @@ + extern UTItype_ppc __fixunskfti (TFtype); + extern TFtype __floattikf (TItype_ppc); + extern TFtype __floatuntikf (UTItype_ppc); ++ ++extern DItype_ppc __fixtfdi (TFtype); ++extern DItype_ppc __fixunstfdi (TFtype); ++extern TFtype __floatditf (DItype_ppc); ++extern TFtype __floatunditf (UDItype_ppc); + #endif + + /* Functions using the ISA 3.0 hardware support. If the code is compiled with +diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128 +--- a/libgcc/config/rs6000/t-float128 2018-12-12 17:53:49.540038500 -0500 ++++ b/libgcc/config/rs6000/t-float128 2018-12-12 17:45:12.233937136 -0500 +@@ -24,6 +24,7 @@ + + # New functions for software emulation + fp128_ppc_funcs = floattikf floatuntikf fixkfti fixunskfti \ ++ floatditf floatunditf fixtfdi fixunstfdi \ + extendkftf2-sw trunctfkf2-sw \ + sfp-exceptions _mulkc3 _divkc3 _powikf2 + + +diff --git a/libgcc/configure b/libgcc/configure +old mode 100644 +new mode 100755 +index b2f3f870844..ed806587c17 +--- a/libgcc/configure ++++ b/libgcc/configure +@@ -619,6 +619,7 @@ build_vendor + build_cpu + build + with_aix_soname ++with_ldbl128 + enable_vtable_verify + enable_shared + libgcc_topdir +@@ -668,6 +669,7 @@ with_cross_host + with_ld + enable_shared + enable_vtable_verify ++with_long_double_128 + with_aix_soname + enable_version_specific_runtime_libs + with_slibdir +@@ -1329,6 +1331,7 @@ Optional Packages: + --with-target-subdir=SUBDIR Configuring in a subdirectory for target + --with-cross-host=HOST Configuring with a cross compiler + --with-ld arrange to use the specified ld (full pathname) ++ --with-long-double-128 use 128-bit long double by default + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX +@@ -2213,6 +2216,21 @@ fi + + + ++# Check whether --with-long-double-128 was given. ++if test "${with_long_double_128+set}" = set; then : ++ withval=$with_long_double_128; with_ldbl128="$with_long_double_128" ++else ++ case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++ ++fi ++ ++ ++ ++ + # Check whether --with-aix-soname was given. + if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case "${host}:${enable_shared}" in +diff --git a/libgcc/configure.ac b/libgcc/configure.ac +index b59aa746afc..42220a263c5 100644 +--- a/libgcc/configure.ac ++++ b/libgcc/configure.ac +@@ -78,6 +78,18 @@ AC_ARG_ENABLE(vtable-verify, + [enable_vtable_verify=no]) + AC_SUBST(enable_vtable_verify) + ++AC_ARG_WITH(long-double-128, ++[AS_HELP_STRING([--with-long-double-128], ++ [use 128-bit long double by default])], ++ with_ldbl128="$with_long_double_128", ++[case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++]) ++AC_SUBST(with_ldbl128) ++ + AC_ARG_WITH(aix-soname, + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX])], +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch new file mode 100644 index 00000000..5e416e01 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch @@ -0,0 +1,29 @@ +From 775c7fafcbfebed2d4bd8a6a011f18f70f3b59d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 May 2016 21:11:34 -0700 +Subject: [PATCH 35/39] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson +Signed-off-by: Khem Raj +--- + libgcc/config/t-slibgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +index 7e60b621a2d..ea22ede3361 100644 +--- a/libgcc/config/t-slibgcc ++++ b/libgcc/config/t-slibgcc +@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ +- $(SHLIB_LDFLAGS) \ ++ $(LDFLAGS) $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ + $(SHLIB_OBJS) $(SHLIB_LC) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch new file mode 100644 index 00000000..8def33a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch @@ -0,0 +1,86 @@ +From b7faeed60261d7b75f2db3823926de1650ef64bc Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 24 Oct 2015 20:09:53 +0000 +Subject: [PATCH 36/39] libgcc_s: Use alias for __cpu_indicator_init instead of + symver + +Adapter from + +https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html + +This fix was debated but hasnt been applied gcc upstream since +they expect musl to support '@' in symbol versioning which is +a sun/gnu versioning extention. This patch however avoids the +need for the '@' symbols at all + +libgcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add. + (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove. + + * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER. + +gcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init + call __cpu_indicator_init_local instead of __cpu_indicator_init. + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gcc/config/i386/i386.c | 4 ++-- + libgcc/config/i386/cpuinfo.c | 6 +++--- + libgcc/config/i386/t-linux | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 6a2141e48db..455fccbdd50 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -36490,10 +36490,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, + { + case IX86_BUILTIN_CPU_INIT: + { +- /* Make it call __cpu_indicator_init in libgcc. */ ++ /* Make it call __cpu_indicator_init_local in libgcc.a. */ + tree call_expr, fndecl, type; + type = build_function_type_list (integer_type_node, NULL_TREE); +- fndecl = build_fn_decl ("__cpu_indicator_init", type); ++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); + call_expr = build_call_expr (fndecl, 0); + return expand_expr (call_expr, target, mode, EXPAND_NORMAL); + } +diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c +index 86953db2743..e0476272810 100644 +--- a/libgcc/config/i386/cpuinfo.c ++++ b/libgcc/config/i386/cpuinfo.c +@@ -482,7 +482,7 @@ __cpu_indicator_init (void) + return 0; + } + +-#if defined SHARED && defined USE_ELF_SYMVER +-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); +-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); ++#ifndef SHARED ++int __cpu_indicator_init_local (void) ++ __attribute__ ((weak, alias ("__cpu_indicator_init"))); + #endif +diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux +index 8506a635790..564296f788e 100644 +--- a/libgcc/config/i386/t-linux ++++ b/libgcc/config/i386/t-linux +@@ -3,5 +3,5 @@ + # t-slibgcc-elf-ver and t-linux + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS) ++HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) + CRTSTUFF_T_CFLAGS += $(CET_FLAGS) +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0037-sync-gcc-stddef.h-with-musl.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0037-sync-gcc-stddef.h-with-musl.patch new file mode 100644 index 00000000..f8a7f41a --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0037-sync-gcc-stddef.h-with-musl.patch @@ -0,0 +1,91 @@ +From 602abaab15ffb60bf1797187a71b485042c56360 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 3 Feb 2017 12:56:00 -0800 +Subject: [PATCH 37/39] sync gcc stddef.h with musl + +musl defines ptrdiff_t size_t and wchar_t +so dont define them here if musl is definining them + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gcc/ginclude/stddef.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 31b96a7e5e1..438a3ce7c56 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -134,6 +134,7 @@ _TYPE_wchar_t; + #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T + #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ ++#ifndef __DEFINED_ptrdiff_t /* musl */ + #define _PTRDIFF_T + #define _T_PTRDIFF_ + #define _T_PTRDIFF +@@ -143,10 +144,12 @@ _TYPE_wchar_t; + #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T + #define _PTRDIFF_T_DECLARED ++#define __DEFINED_ptrdiff_t /* musl */ + #ifndef __PTRDIFF_TYPE__ + #define __PTRDIFF_TYPE__ long int + #endif + typedef __PTRDIFF_TYPE__ ptrdiff_t; ++#endif /* __DEFINED_ptrdiff_t */ + #endif /* _PTRDIFF_T_DECLARED */ + #endif /* _GCC_PTRDIFF_T */ + #endif /* ___int_ptrdiff_t_h */ +@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__DragonFly__) \ + || defined(__FreeBSD_kernel__) +@@ -235,6 +240,7 @@ typedef long ssize_t; + #endif /* _SIZE_T */ + #endif /* __SIZE_T__ */ + #endif /* __size_t__ */ ++#endif /* __DEFINED_size_t */ + #undef __need_size_t + #endif /* _STDDEF_H or __need_size_t. */ + +@@ -264,6 +270,7 @@ typedef long ssize_t; + #ifndef ___int_wchar_t_h + #ifndef __INT_WCHAR_T_H + #ifndef _GCC_WCHAR_T ++#ifndef __DEFINED_wchar_t /* musl */ + #define __wchar_t__ /* BeOS */ + #define __WCHAR_T__ /* Cray Unicos/Mk */ + #define _WCHAR_T +@@ -279,6 +286,7 @@ typedef long ssize_t; + #define __INT_WCHAR_T_H + #define _GCC_WCHAR_T + #define _WCHAR_T_DECLARED ++#define __DEFINED_wchar_t /* musl */ + + /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ + instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other +@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t; + #endif + #endif /* __WCHAR_T__ */ + #endif /* __wchar_t__ */ ++#endif /* __DEFINED_wchar_t musl */ + #undef __need_wchar_t + #endif /* _STDDEF_H or __need_wchar_t. */ + +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0038-fix-segmentation-fault-in-precompiled-header-generat.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0038-fix-segmentation-fault-in-precompiled-header-generat.patch new file mode 100644 index 00000000..224d2ae6 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0038-fix-segmentation-fault-in-precompiled-header-generat.patch @@ -0,0 +1,60 @@ +From 00694849632dee23741925c6104df134f6bff747 Mon Sep 17 00:00:00 2001 +From: Juro Bystricky +Date: Mon, 19 Mar 2018 22:31:20 -0700 +Subject: [PATCH 38/39] fix segmentation fault in precompiled header generation + +Prevent a segmentation fault which occurs when using incorrect +structure trying to access name of some named operators, such as +CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in +those cases, as is may not be initialized at all. + +[YOCTO #11738] + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky +Signed-off-by: Khem Raj +--- + libcpp/lex.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 37c365a3560..63480048db6 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -3279,11 +3279,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token, + spell_ident: + case SPELL_IDENT: + if (forstring) +- { +- memcpy (buffer, NODE_NAME (token->val.node.spelling), +- NODE_LEN (token->val.node.spelling)); +- buffer += NODE_LEN (token->val.node.spelling); +- } ++ { ++ if (token->type == CPP_NAME) ++ { ++ memcpy (buffer, NODE_NAME (token->val.node.spelling), ++ NODE_LEN (token->val.node.spelling)); ++ buffer += NODE_LEN (token->val.node.spelling); ++ break; ++ } ++ /* NAMED_OP, cannot use node.spelling */ ++ if (token->flags & NAMED_OP) ++ { ++ const char *str = cpp_named_operator2name (token->type); ++ if (str) ++ { ++ size_t len = strlen(str); ++ memcpy(buffer, str, len); ++ buffer += len; ++ } ++ break; ++ } ++ } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0039-Fix-for-testsuite-failure.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0039-Fix-for-testsuite-failure.patch new file mode 100644 index 00000000..f3516309 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0039-Fix-for-testsuite-failure.patch @@ -0,0 +1,258 @@ +From d151a62c252749643c850a08d1335321e5b75d42 Mon Sep 17 00:00:00 2001 +From: RAGHUNATH LOLUR +Date: Wed, 6 Dec 2017 22:52:26 -0800 +Subject: [PATCH 39/39] Fix for testsuite failure + +2017-11-16 Raghunath Lolur + + * gcc.dg/pr56275.c: If SSE is disabled, ensure that + "-mfpmath" is not set to use SSE. Set "-mfpmath=387". + * gcc.dg/pr68306.c: Likewise + * gcc.dg/pr68306-2.c: Likewise + * gcc.dg/pr68306-3.c: Likewise + * gcc.dg/pr69634.c: Likewise + * gcc.target/i386/amd64-abi-1.c: Likewise + * gcc.target/i386/funcspec-6.c: Likewise + * gcc.target/i386/interrupt-387-err-1.c: Likewise + * gcc.target/i386/isa-14.c: Likewise + * gcc.target/i386/pr44948-2b.c: Likewise + * gcc.target/i386/pr53425-1.c: Likewise + * gcc.target/i386/pr53425-2.c: Likewise + * gcc.target/i386/pr55247.c: Likewise + * gcc.target/i386/pr59644.c: Likewise + * gcc.target/i386/pr62120.c: Likewise + * gcc.target/i386/pr70467-1.c: Likewise + * gcc.target/i386/warn-vect-op-1.c: Likewise + +If -Wall, -Werror are used during compilation various test cases fail +to compile. + +If SSE is disabled, be sure to -mfpmath=387 to resolve this. + +This patch removes the changes to Changelog from the original patch. +This will help us avoid conflicts. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle +--- + gcc/testsuite/gcc.dg/pr56275.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-2.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-3.c | 2 +- + gcc/testsuite/gcc.dg/pr68306.c | 2 +- + gcc/testsuite/gcc.dg/pr69634.c | 2 +- + gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +- + gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 + + gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +- + gcc/testsuite/gcc.target/i386/isa-14.c | 2 +- + gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +- + gcc/testsuite/gcc.target/i386/pr55247.c | 2 +- + gcc/testsuite/gcc.target/i386/pr59644.c | 2 +- + gcc/testsuite/gcc.target/i386/pr62120.c | 2 +- + gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +- + gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +- + 17 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c +index b901bb2b199..a4f6c95e1a1 100644 +--- a/gcc/testsuite/gcc.dg/pr56275.c ++++ b/gcc/testsuite/gcc.dg/pr56275.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ +-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */ + + typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long)))); + +diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c +index 4672ebe7987..2a368c484b6 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-2.c ++++ b/gcc/testsuite/gcc.dg/pr68306-2.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + struct { + int tz_minuteswest; +diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c +index f5a8c102cf8..df3390c64c2 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-3.c ++++ b/gcc/testsuite/gcc.dg/pr68306-3.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */ + + extern void fn2(); +diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c +index 54e5b40f221..0813389e2c1 100644 +--- a/gcc/testsuite/gcc.dg/pr68306.c ++++ b/gcc/testsuite/gcc.dg/pr68306.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + enum powerpc_pmc_type { PPC_PMC_IBM }; + struct { +diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c +index 60a56149463..bcc23f9ccd6 100644 +--- a/gcc/testsuite/gcc.dg/pr69634.c ++++ b/gcc/testsuite/gcc.dg/pr69634.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */ +-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-require-effective-target scheduling } */ + + typedef unsigned short u16; +diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +index 69fde57bf06..7f1f1c03edf 100644 +--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c ++++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */ + + double foo(void) { return 0; } /* { dg-error "SSE disabled" } */ +diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c +index ea896b7ebfd..bf15569b826 100644 +--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c ++++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c +@@ -1,6 +1,7 @@ + /* Test whether all of the 64-bit function specific options are accepted + without error. */ + /* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-additional-options "-mfpmath=387" } */ + + #include "funcspec-56.inc" + +diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +index 3fbdc881dda..6b4d9d1252a 100644 +--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c ++++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */ ++/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */ + + typedef unsigned int uword_t __attribute__ ((mode (__word__))); + +diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c +index 5d49e6e77fe..1de2db92bdd 100644 +--- a/gcc/testsuite/gcc.target/i386/isa-14.c ++++ b/gcc/testsuite/gcc.target/i386/isa-14.c +@@ -1,5 +1,5 @@ + /* { dg-do run } */ +-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */ ++/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */ + + extern void abort (void); + +diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +index fa1769b62fb..f79fb12726f 100644 +--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c ++++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */ ++/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */ + + struct A + { +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c +index 2e89ff7d81d..6339bf6b736 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef double __v2df __attribute__ ((__vector_size__ (16))); +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c +index 61f6283dbe9..2c5a55f0ac3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef float __v2sf __attribute__ ((__vector_size__ (8))); +diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c +index 23366d0909d..9810e3abb76 100644 +--- a/gcc/testsuite/gcc.target/i386/pr55247.c ++++ b/gcc/testsuite/gcc.target/i386/pr55247.c +@@ -1,6 +1,6 @@ + /* { dg-do compile { target { ! ia32 } } } */ + /* { dg-require-effective-target maybe_x32 } */ +-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */ ++/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */ + + typedef unsigned int uint32_t; + typedef uint32_t Elf32_Word; +diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c +index 96006b3e338..4287e4538bf 100644 +--- a/gcc/testsuite/gcc.target/i386/pr59644.c ++++ b/gcc/testsuite/gcc.target/i386/pr59644.c +@@ -1,6 +1,6 @@ + /* PR target/59644 */ + /* { dg-do run { target lp64 } } */ +-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */ ++/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */ + + /* This test uses __builtin_trap () instead of e.g. abort, + because due to -mpreferred-stack-boundary=3 it should not call +diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c +index bfb8c4703eb..ed04cf181f3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr62120.c ++++ b/gcc/testsuite/gcc.target/i386/pr62120.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + + void foo () + { +diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c +index 4e112c88d07..bcfb396a68d 100644 +--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c +@@ -1,6 +1,6 @@ + /* PR rtl-optimization/70467 */ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + + void foo (unsigned long long *); + +diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +index 6cda1534311..26e37f5b8ba 100644 +--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c ++++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse -Wvector-operation-performance" } */ ++/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */ + #define vector(elcount, type) \ + __attribute__((vector_size((elcount)*sizeof(type)))) type + +-- +2.17.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0040-Re-introduce-spe-commandline-options.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0040-Re-introduce-spe-commandline-options.patch new file mode 100644 index 00000000..8afa0102 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0040-Re-introduce-spe-commandline-options.patch @@ -0,0 +1,41 @@ +From 8fb8f773e117ee70be00bb0da5f343fe110da5c4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 6 Jun 2018 12:10:22 -0700 +Subject: [PATCH 40/40] Re-introduce spe commandline options + +This should ensure that we keep accepting +spe options + +Upstream-Status: Inappropriate [SPE port is removed from rs600 port] + +Signed-off-by: Khem Raj +--- + gcc/config/rs6000/rs6000.opt | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt +index ace8a477550..d6a8f825d88 100644 +--- a/gcc/config/rs6000/rs6000.opt ++++ b/gcc/config/rs6000/rs6000.opt +@@ -365,6 +365,18 @@ mdebug= + Target RejectNegative Joined + -mdebug= Enable debug output. + ++mspe ++Target Var(rs6000_spe) Save ++Generate SPE SIMD instructions on E500. ++ ++mabi=spe ++Target RejectNegative Var(rs6000_spe_abi) Save ++Use the SPE ABI extensions. ++ ++mabi=no-spe ++Target RejectNegative Var(rs6000_spe_abi, 0) ++Do not use the SPE ABI extensions. ++ + mabi=altivec + Target RejectNegative Var(rs6000_altivec_abi) Save + Use the AltiVec ABI extensions. +-- +2.17.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0041-ARC-fix-spec-gen.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0041-ARC-fix-spec-gen.patch new file mode 100644 index 00000000..cbd5e41a --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0041-ARC-fix-spec-gen.patch @@ -0,0 +1,44 @@ +From 892142379c6b99fe8c3ebdfe0b79e2a435228c1d Mon Sep 17 00:00:00 2001 +From: claziss +Date: Mon, 17 Sep 2018 08:52:10 +0000 +Subject: [PATCH] [ARC] Update LINK_EH_SPEC linker spec. + +With no trailing space in LINK_EH_SPEC linker spec gets generated as: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr%{h*} ... +------------------------>8--------------------- + +or even worse if hash style is added: +------------------------>8--------------------- +%{!r:--build-id} --eh-frame-hdr--hash-style=sysv %{h*} ... +------------------------>8--------------------- + +Now if that spec is really used by LD then it fails inevitably +saying that it doesn't know option "--eh-frame-hdr--hash-style=sysv". + +2018-09-17 Alexey Brodkin + + * config/arc/linux.h (LINK_EH_SPEC): Add missing space. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264361 138bc75d-0d04-0410-961f-82ee72b054a4 + +Signed-off-by: Alexey Brodkin + +Upstream-Status: Backport[https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=892142379c6b] +--- + gcc/config/arc/linux.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h +index 96d548eae341..62ebe4de0fc7 100644 +--- a/gcc/config/arc/linux.h ++++ b/gcc/config/arc/linux.h +@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see + Signalize that because we have fde-glibc, we don't need all C shared libs + linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "--eh-frame-hdr" ++#define LINK_EH_SPEC "--eh-frame-hdr " + #endif + + #undef SUBTARGET_CPP_SPEC diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch new file mode 100644 index 00000000..b0c735bb --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0042-powerpc-powerpc64-Add-support-for-musl-ldso.patch @@ -0,0 +1,31 @@ +From 3f5f5da776be86b408a15f38c9782f2185f97073 Mon Sep 17 00:00:00 2001 +From: Serhey Popovych +Date: Tue, 11 Dec 2018 02:30:50 -0500 +Subject: [PATCH] powerpc/powerpc64: Add support for musl ldso + +Signed-off-by: Serhey Popovych +--- +Upstream-Status: Inappropriate [OE-Specific] + + gcc/config/rs6000/linux64.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 619e113..ee8b44f 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -421,9 +421,9 @@ extern int dot_symbols; + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ +- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + + #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" +-- +2.7.4 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0043-riscv-Disable-multilib-for-OE.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0043-riscv-Disable-multilib-for-OE.patch new file mode 100644 index 00000000..dc28d1bf --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.2/0043-riscv-Disable-multilib-for-OE.patch @@ -0,0 +1,27 @@ +From ca0a6e035eef0cdbd0ef3a222c75d4b9f873c512 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 28 Dec 2018 09:59:53 -0800 +Subject: [PATCH 39/39] riscv: Disable multilib for OE + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +--- + gcc/config/riscv/t-linux | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a18..e4d817621fc 100644 +--- a/gcc/config/riscv/t-linux ++++ b/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ +-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) +-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) ++MULTILIB_DIRNAMES := . . ++#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +-- +2.20.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3.inc b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3.inc new file mode 100644 index 00000000..3fb87bb5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3.inc @@ -0,0 +1,114 @@ +require recipes-devtools/gcc/gcc-common.inc + +BASEPV = "8.3" +PV = "arm-${BASEPV}" +CVE_VERSION = "${BASEPV}" + +MMYY = "19.03" +RELEASE = "20${MMYY}" +PR = "r${RELEASE}" +BINV = "${BASEPV}.0" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-${BASEPV}:${FILE_DIRNAME}/gcc-${BASEPV}/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib flex-native" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +#BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" +SRCREV = "47335befa47297ab810945cece69c466417a95c1" +BASEURI ?= "git://git.linaro.org/toolchain/gcc.git;protocol=https;branch=linaro-local/ARM/arm-8-branch" + +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0002-gcc-poison-system-directories.patch \ + file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0004-64-bit-multilib-hack.patch \ + file://0005-optional-libstdc.patch \ + file://0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ + file://0007-COLLECT_GCC_OPTIONS.patch \ + file://0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0009-fortran-cross-compile-hack.patch \ + file://0010-cpp-honor-sysroot.patch \ + file://0011-MIPS64-Default-to-N64-ABI.patch \ + file://0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0013-gcc-Fix-argument-list-too-long-error.patch \ + file://0014-Disable-sdt.patch \ + file://0015-libtool.patch \ + file://0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0019-export-CPP.patch \ + file://0020-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ + file://0021-Ensure-target-gcc-headers-can-be-included.patch \ + file://0022-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0023-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0024-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0025-aarch64-Add-support-for-musl-ldso.patch \ + file://0026-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0027-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0029-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0031-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0032-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0033-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + file://0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ + file://0035-sync-gcc-stddef.h-with-musl.patch \ + file://0036-fix-segmentation-fault-in-precompiled-header-generat.patch \ + file://0037-Fix-for-testsuite-failure.patch \ + file://0038-Re-introduce-spe-commandline-options.patch \ + file://0039-riscv-Disable-multilib-for-OE.patch \ + file://0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch \ + ${BACKPORTS} \ +" +BACKPORTS = "\ +" + +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" +SSP ?= "--disable-libssp" +SSP_mingw32 = "--enable-libssp" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + ${SSP} \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_append_aarchilp32 = " --with-abi=ilp32" + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..4ad79e44 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,42 @@ +From d7b284a9bede9d5059ad7e95a867254bf913c638 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:37:11 +0400 +Subject: [PATCH 01/40] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 0601395512f..8c5b1e9d561 100755 +--- a/configure ++++ b/configure +@@ -7507,7 +7507,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +diff --git a/configure.ac b/configure.ac +index c3433336523..69c31c65ad7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3096,7 +3096,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0002-gcc-poison-system-directories.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0002-gcc-poison-system-directories.patch new file mode 100644 index 00000000..e7ff1246 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0002-gcc-poison-system-directories.patch @@ -0,0 +1,203 @@ +From 95ec476dd7726cc9c1bfd6fb23ba3aea8bbf61a4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 02/40] gcc: poison-system-directories + +Add /sw/include and /opt/include based on the original +zecke-no-host-includes.patch patch. The original patch checked for +/usr/include, /sw/include and /opt/include and then triggered a failure and +aborted. + +Instead, we add the two missing items to the current scan. If the user +wants this to be a failure, they can add "-Werror=poison-system-directories". + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 16 ++++++++++++++++ + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 21 +++++++++++++++++++++ + 7 files changed, 68 insertions(+) + +diff --git a/gcc/common.opt b/gcc/common.opt +index b52ef0b38c8..0de3f0924cd 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -679,6 +679,10 @@ Wreturn-local-addr + Common Var(warn_return_local_addr) Init(1) Warning + Warn about returning a pointer/reference to a local or temporary variable. + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one variable shadows another. Same as -Wshadow=global. +diff --git a/gcc/config.in b/gcc/config.in +index 5bccb408016..1c784a8276b 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -194,6 +194,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +diff --git a/gcc/configure b/gcc/configure +index 6121e163259..3901722400c 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -953,6 +953,7 @@ with_system_zlib + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1696,6 +1697,8 @@ Optional Features: + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -29701,6 +29704,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index b066cc609e1..1b1362f70fe 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6327,6 +6327,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index e5c4e8125aa..fb228631a42 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -304,6 +304,7 @@ Objective-C and Objective-C++ Dialects}. + -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol + -Wparentheses -Wno-pedantic-ms-format @gol + -Wplacement-new -Wplacement-new=@var{n} @gol ++-Wno-poison-system-directories @gol + -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol + -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol + -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol +@@ -5743,6 +5744,14 @@ made up of data only and thus requires no special treatment. But, for + most targets, it is made up of code and thus requires the stack to be + made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +diff --git a/gcc/gcc.c b/gcc/gcc.c +index a716f708259..02b3cd39fc2 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1037,6 +1037,8 @@ proper position among the other output files. */ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ ++ %{Wno-poison-system-directories:--no-poison-system-directories} \ ++ %{Werror=poison-system-directories:--error-poison-system-directories} \ + %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ +diff --git a/gcc/incpath.c b/gcc/incpath.c +index b11c6a57939..9a457e02dd3 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -26,6 +26,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[INC_QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..e62deb2e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch @@ -0,0 +1,73 @@ +From 6640d7e39b13d1ef26d249153ab15d510fda3566 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:08:31 +0400 +Subject: [PATCH 03/40] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET + +Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. + +This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. + +Other changes I had to do include: + +- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. + +- passing the right CFLAGS to configure scripts as exported environment variables + +I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. + +Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? + +Signed-off-by: Paolo Bonzini +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + configure | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/configure b/configure +index 8c5b1e9d561..2d1fc6b94d9 100755 +--- a/configure ++++ b/configure +@@ -6768,6 +6768,38 @@ fi + + + ++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS ++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS ++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). ++# We want to ensure that TARGET libraries (which we know are built with ++# gcc) are built with "-O2 -g", so include those options when setting ++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. ++if test "x$CFLAGS_FOR_TARGET" = x; then ++ CFLAGS_FOR_TARGET=$CFLAGS ++ case " $CFLAGS " in ++ *" -O2 "*) ;; ++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; ++ esac ++ case " $CFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; ++ esac ++fi ++ ++ ++if test "x$CXXFLAGS_FOR_TARGET" = x; then ++ CXXFLAGS_FOR_TARGET=$CXXFLAGS ++ case " $CXXFLAGS " in ++ *" -O2 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; ++ esac ++ case " $CXXFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; ++ esac ++fi ++ ++ + # Handle --with-headers=XXX. If the value is not "yes", the contents of + # the named directory are copied to $(tooldir)/sys-include. + if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0004-64-bit-multilib-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0004-64-bit-multilib-hack.patch new file mode 100644 index 00000000..371d8775 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0004-64-bit-multilib-hack.patch @@ -0,0 +1,85 @@ +From 1e649d81ca662c4cdf73882ebb8a11f0f19f5baf Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:10:06 +0400 +Subject: [PATCH 04/40] 64-bit multilib hack. + +GCC has internal multilib handling code but it assumes a very specific rigid directory +layout. The build system implementation of multilib layout is very generic and allows +complete customisation of the library directories. + +This patch is a partial solution to allow any custom directories to be passed into gcc +and handled correctly. It forces gcc to use the base_libdir (which is the current +directory, "."). We need to do this for each multilib that is configured as we don't +know which compiler options may be being passed into the compiler. Since we have a compiler +per mulitlib at this point that isn't an issue. + +The one problem is the target compiler is only going to work for the default multlilib at +this point. Ideally we'd figure out which multilibs were being enabled with which paths +and be able to patch these entries with a complete set of correct paths but this we +don't have such code at this point. This is something the target gcc recipe should do +and override these platform defaults in its build config. + +RP 15/8/11 + +Signed-off-by: Khem Raj +Signed-off-by: Elvis Dowson + +Upstream-Status: Pending +--- + gcc/config/i386/t-linux64 | 6 ++---- + gcc/config/mips/t-linux64 | 10 +++------- + gcc/config/rs6000/t-linux64 | 5 ++--- + 3 files changed, 7 insertions(+), 14 deletions(-) + +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index 8ea0faff369..266c6008004 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -32,7 +32,5 @@ + # + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) +-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_DIRNAMES = . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 +index c017b7d04c5..126892cf40b 100644 +--- a/gcc/config/mips/t-linux64 ++++ b/gcc/config/mips/t-linux64 +@@ -17,10 +17,6 @@ + # . + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 +-MULTILIB_DIRNAMES = n32 32 64 +-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) +-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) +-MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++MULTILIB_DIRNAMES = . . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ++ +diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +index 0faa2a02df4..13fd8ca971e 100644 +--- a/gcc/config/rs6000/t-linux64 ++++ b/gcc/config/rs6000/t-linux64 +@@ -26,10 +26,9 @@ + # MULTILIB_OSDIRNAMES according to what is found on the target. + + MULTILIB_OPTIONS := m64/m32 +-MULTILIB_DIRNAMES := 64 32 ++MULTILIB_DIRNAMES := . . + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0005-optional-libstdc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0005-optional-libstdc.patch new file mode 100644 index 00000000..f9cf6c20 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0005-optional-libstdc.patch @@ -0,0 +1,125 @@ +From b486380dcc4758e856ab6d847eb358d05bd79d64 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:12:56 +0400 +Subject: [PATCH 05/40] optional libstdc + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + gcc/c-family/c.opt | 4 ++++ + gcc/cp/g++spec.c | 1 + + gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++- + gcc/gcc.c | 1 + + 4 files changed, 37 insertions(+), 1 deletion(-) + +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index f591b39be5a..2955fcea867 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1901,6 +1901,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++. + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c +index 443a1746da3..e9b51be62ef 100644 +--- a/gcc/cp/g++spec.c ++++ b/gcc/cp/g++spec.c +@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index fb228631a42..310ba8109ed 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -212,6 +212,9 @@ in the following sections. + -fno-weak -nostdinc++ @gol + -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol ++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol ++-fvtv-counts -fvtv-debug @gol ++-nostdlib++ @gol + -fext-numeric-literals @gol + -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol + -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol +@@ -510,7 +513,7 @@ Objective-C and Objective-C++ Dialects}. + -s -static -static-pie -static-libgcc -static-libstdc++ @gol + -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol + -static-libmpx -static-libmpxwrappers @gol +--shared -shared-libgcc -symbolic @gol ++-shared -shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol} -z @var{keyword}} + +@@ -12359,6 +12362,33 @@ library subroutines. + constructors are called; @pxref{Collect2,,@code{collect2}, gccint, + GNU Compiler Collection (GCC) Internals}.) + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ ++@cindex @option{-lgcc}, use with @option{-nostdlib} ++@cindex @option{-nostdlib} and unresolved references ++@cindex unresolved references and @option{-nostdlib} ++@cindex @option{-lgcc}, use with @option{-nodefaultlibs} ++@cindex @option{-nodefaultlibs} and unresolved references ++@cindex unresolved references and @option{-nodefaultlibs} ++One of the standard libraries bypassed by @option{-nostdlib} and ++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines ++which GCC uses to overcome shortcomings of particular machines, or special ++needs for some languages. ++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++Collection (GCC) Internals}, ++for more discussion of @file{libgcc.a}.) ++In most cases, you need @file{libgcc.a} even when you want to avoid ++other standard libraries. In other words, when you specify @option{-nostdlib} ++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well. ++This ensures that you have no unresolved references to internal GCC ++library subroutines. ++(An example of such an internal subroutine is @code{__main}, used to ensure C++ ++constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++GNU Compiler Collection (GCC) Internals}.) ++ + @item -pie + @opindex pie + Produce a dynamically linked position independent executable on targets +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 02b3cd39fc2..8cd27a5dad5 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1047,6 +1047,7 @@ proper position among the other output files. */ + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ + %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}" + #endif + +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file mode 100644 index 00000000..0cea228c --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0006-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch @@ -0,0 +1,59 @@ +From 1dba090a11c40b0926f9707a543d658c95e1f156 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:14:20 +0400 +Subject: [PATCH 06/40] gcc: disable MASK_RELAX_PIC_CALLS bit + +The new feature added after 4.3.3 +"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html" +will cause cc1plus eat up all the system memory when build webkit-gtk. +The function mips_get_pic_call_symbol keeps on recursively calling itself. +Disable this feature to walk aside the bug. + +Signed-off-by: Dongxiao Xu +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 7 ------- + gcc/configure.ac | 7 ------- + 2 files changed, 14 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 3901722400c..0c9b8ac5f55 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -27553,13 +27553,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5 + $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 1b1362f70fe..53840363115 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4798,13 +4798,6 @@ x: + rm -f conftest.* + fi + fi +- if test $gcc_cv_as_ld_jalr_reloc = yes; then +- if test x$target_cpu_default = x; then +- target_cpu_default=MASK_RELAX_PIC_CALLS +- else +- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS" +- fi +- fi + AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc) + + AC_CACHE_CHECK([linker for .eh_frame personality relaxation], +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0007-COLLECT_GCC_OPTIONS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0007-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 00000000..8c7e72e1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0007-COLLECT_GCC_OPTIONS.patch @@ -0,0 +1,38 @@ +From 209e46f45382088caab54425b92b5dfc43ebb4fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:16:28 +0400 +Subject: [PATCH 07/40] COLLECT_GCC_OPTIONS + +This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to +invoke collect2. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/gcc.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 8cd27a5dad5..d355d65583a 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4677,6 +4677,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 00000000..f9632afe --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0008-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch @@ -0,0 +1,96 @@ +From 3bcbdf5ade54a72820ad7798119d0bbad4baf6ec Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:17:25 +0400 +Subject: [PATCH 08/40] Use the defaults.h in ${B} instead of ${S}, and t-oe in + ${B} + +Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that +the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +While compiling gcc-crosssdk-initial-x86_64 on some host, there is +occasionally failure that test the existance of default.h doesn't +work, the reason is tm_include_list='** defaults.h' rather than +tm_include_list='** ./defaults.h' + +So we add the test condition for this situation. +Signed-off-by: Hongxu Jia +--- + gcc/Makefile.in | 2 +- + gcc/configure | 4 ++-- + gcc/configure.ac | 4 ++-- + gcc/mkconfig.sh | 4 ++-- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 20bee0494b1..1367136bfac 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -538,7 +538,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ + TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + + xmake_file=@xmake_file@ +-tmake_file=@tmake_file@ ++tmake_file=@tmake_file@ ./t-oe + TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ + TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ + TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ +diff --git a/gcc/configure b/gcc/configure +index 0c9b8ac5f55..134c2c2f156 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12158,8 +12158,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 53840363115..0c3c82e4ff7 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1922,8 +1922,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh +index 0f75c863c0b..68d8d6613cf 100644 +--- a/gcc/mkconfig.sh ++++ b/gcc/mkconfig.sh +@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then + if [ $# -ge 1 ]; then + echo '#ifdef IN_GCC' >> ${output}T + for file in "$@"; do +- if test x"$file" = x"defaults.h"; then ++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then + postpone_defaults_h="yes" + else + echo "# include \"$file\"" >> ${output}T +@@ -106,7 +106,7 @@ esac + + # If we postponed including defaults.h, add the #include now. + if test x"$postpone_defaults_h" = x"yes"; then +- echo "# include \"defaults.h\"" >> ${output}T ++ echo "# include \"./defaults.h\"" >> ${output}T + fi + + # Add multiple inclusion protection guard, part two. +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0009-fortran-cross-compile-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0009-fortran-cross-compile-hack.patch new file mode 100644 index 00000000..50d895bf --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0009-fortran-cross-compile-hack.patch @@ -0,0 +1,46 @@ +From e654573352d28f160f379ee77e4067cf108714d0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:20:01 +0400 +Subject: [PATCH 09/40] fortran cross-compile hack. + +* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used +used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross +directory. + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + libgfortran/configure | 2 +- + libgfortran/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgfortran/configure b/libgfortran/configure +index 91fce8fecd0..6747f86eb98 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -12883,7 +12883,7 @@ esac + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + ac_ext=${ac_fc_srcext-f} + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index bf6d3634dda..9dbe43cc616 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -250,7 +250,7 @@ AC_SUBST(enable_static) + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0010-cpp-honor-sysroot.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0010-cpp-honor-sysroot.patch new file mode 100644 index 00000000..037eacf4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0010-cpp-honor-sysroot.patch @@ -0,0 +1,54 @@ +From 2ae7af4eb70eff6aeda1fe96333ff50cfaa9d906 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:22:00 +0400 +Subject: [PATCH 10/40] cpp: honor sysroot. + +Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile +preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location +rather than the --sysroot option specified on the commandline. If access to that directory is +permission denied (unreadable), gcc will error. + +This happens when ccache is in use due to the fact it uses preprocessed source files. + +The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, +-isystem, -isysroot happen and the correct sysroot is used. + +[YOCTO #2074] + +RP 2012/04/13 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/cp/lang-specs.h | 2 +- + gcc/gcc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h +index f0802b8915c..f324d299849 100644 +--- a/gcc/cp/lang-specs.h ++++ b/gcc/cp/lang-specs.h +@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see + {".ii", "@c++-cpp-output", 0, 0, 0}, + {"@c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1plus -fpreprocessed %i %(cc1_options) %2\ ++ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff --git a/gcc/gcc.c b/gcc/gcc.c +index d355d65583a..570cdc00034 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1343,7 +1343,7 @@ static const struct compiler default_compilers[] = + %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0011-MIPS64-Default-to-N64-ABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0011-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 00000000..c863cff9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0011-MIPS64-Default-to-N64-ABI.patch @@ -0,0 +1,57 @@ +From 1e1ea0eb55a594ac4cd7b838f74dec7405aae02b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:23:08 +0400 +Subject: [PATCH 11/40] MIPS64: Default to N64 ABI + +MIPS64 defaults to n32 ABI, this patch makes it +so that it defaults to N64 ABI + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE config specific] +--- + gcc/config.gcc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 7af8e028104..fc7c91246ed 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2143,29 +2143,29 @@ mips*-*-linux*) # Linux MIPS, either endian. + default_mips_arch=mips32 + ;; + mips64el-st-linux-gnu) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_file="${tm_file} mips/st.h" + tmake_file="${tmake_file} mips/t-st" + enable_mips_multilibs="yes" + ;; + mips64octeon*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" + target_cpu_default=MASK_SOFT_FLOAT_ABI + enable_mips_multilibs="yes" + ;; + mipsisa64r6*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r6 + enable_mips_multilibs="yes" + ;; + mipsisa64r2*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r2 + enable_mips_multilibs="yes" + ;; + mips64*-*-linux* | mipsisa64*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + enable_mips_multilibs="yes" + ;; + esac +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 00000000..d3be10f2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0012-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch @@ -0,0 +1,248 @@ +From 6f8649936df3677109b8396f563c716ae8b237fe Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:24:50 +0400 +Subject: [PATCH 12/40] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER + relative to SYSTEMLIBS_DIR + +This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER +relative to SYSTEMLIBS_DIR which can be set in generated headers +This breaks the assumption of hardcoded multilib in gcc +Change is only for the supported architectures in OE including +SH, sparc, alpha for possible future support (if any) + +Removes the do_headerfix task in metadata + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE configuration] +--- + gcc/config/alpha/linux-elf.h | 4 ++-- + gcc/config/arm/linux-eabi.h | 4 ++-- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 6 +++--- + gcc/config/linux.h | 8 ++++---- + gcc/config/mips/linux.h | 12 ++++++------ + gcc/config/riscv/linux.h | 2 +- + gcc/config/rs6000/linux64.h | 16 ++++++---------- + gcc/config/sh/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + gcc/config/sparc/linux64.h | 4 ++-- + 12 files changed, 30 insertions(+), 34 deletions(-) + +diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h +index 36b74dc1993..02373578af8 100644 +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see + #define EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" + #elif DEFAULT_LIBC == LIBC_GLIBC +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index 8585fde3d41..b3af68cac57 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -62,8 +62,8 @@ + GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ + + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" ++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" + #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT + + #define GLIBC_DYNAMIC_LINKER \ +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index cfcd9cb1a5c..a798e987ecb 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + + #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + %{static:-Bstatic} \ +diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h +index 69f97f15b0d..71bc31d9231 100644 +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #define GNU_USER_LINK_EMULATION "elf_i386" +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index f2d913e30ac..8725f33d8a5 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 2ea4ff92c1d..487b0c0923b 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + GLIBC_DYNAMIC_LINKER must be defined for each target using them, or + GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets + supporting both 32-bit and 64-bit compilation. */ +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" +diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h +index 2dfd0c18b90..12057c51b5e 100644 +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" + + #define GLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + + #undef UCLIBC_DYNAMIC_LINKER32 + #define UCLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + #undef UCLIBC_DYNAMIC_LINKER64 + #define UCLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" + #define UCLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 \ +diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h +index aa8a28d5d31..ebf9551c955 100644 +--- a/gcc/config/riscv/linux.h ++++ b/gcc/config/riscv/linux.h +@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see + GNU_USER_TARGET_OS_CPP_BUILTINS(); \ + } while (0) + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" + + #define MUSL_ABI_SUFFIX \ + "%{mabi=ilp32:-sf}" \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 44eab40a234..54aa8d957e7 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -413,16 +413,11 @@ extern int dot_symbols; + #undef LINK_OS_DEFAULT_SPEC + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" + +-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" +- ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" + #ifdef LINUX64_DEFAULT_ABI_ELFv2 +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.2}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" + #else +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.1}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +@@ -430,8 +425,9 @@ extern int dot_symbols; + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++ + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h +index 6d2ccd012ba..ec78a89ce15 100644 +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ + "%{mfdpic:-fdpic}.so.1" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" +diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h +index 9fb03af0fe9..401fddbbb22 100644 +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ +diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h +index c1fe42165b7..26a79bfa2e3 100644 +--- a/gcc/config/sparc/linux64.h ++++ b/gcc/config/sparc/linux64.h +@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" + + #ifdef SPARC_BI_ARCH + +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0013-gcc-Fix-argument-list-too-long-error.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0013-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 00000000..e9d2cac2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0013-gcc-Fix-argument-list-too-long-error.patch @@ -0,0 +1,40 @@ +From 9e815965fbaa90134be0e777cfc2fbcfab16b674 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:26:37 +0400 +Subject: [PATCH 13/40] gcc: Fix argument list too long error. + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 1367136bfac..71a8275c39f 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3538,7 +3538,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0014-Disable-sdt.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0014-Disable-sdt.patch new file mode 100644 index 00000000..2bc44515 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0014-Disable-sdt.patch @@ -0,0 +1,113 @@ +From 00c7a7fdd4b4aad9e57d8b541de17ad209b6cd06 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:28:10 +0400 +Subject: [PATCH 14/40] Disable sdt. + +We don't list dtrace in DEPENDS so we shouldn't be depending on this header. +It may or may not exist from preivous builds though. To be determinstic, disable +sdt.h usage always. This avoids build failures if the header is removed after configure +but before libgcc is compiled for example. + +RP 2012/8/7 + +Signed-off-by: Khem Raj + +Disable sdt for libstdc++-v3. + +Signed-off-by: Robert Yang + +Upstream-Status: Inappropriate [hack] +--- + gcc/configure | 12 ++++++------ + gcc/configure.ac | 18 +++++++++--------- + libstdc++-v3/configure | 6 +++--- + libstdc++-v3/configure.ac | 2 +- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 134c2c2f156..5111ec0aabb 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29282,12 +29282,12 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 + $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } + have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h +- +-fi ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++# ++#fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 + $as_echo "$have_sys_sdt_h" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 0c3c82e4ff7..3e09af916fd 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5943,15 +5943,15 @@ fi + AC_SUBST([enable_default_ssp]) + + # Test for on the target. +-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) +-AC_MSG_CHECKING(sys/sdt.h in the target C library) +-have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- AC_DEFINE(HAVE_SYS_SDT_H, 1, +- [Define if your target C library provides sys/sdt.h]) +-fi +-AC_MSG_RESULT($have_sys_sdt_h) ++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) ++#AC_MSG_CHECKING(sys/sdt.h in the target C library) ++#have_sys_sdt_h=no ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# AC_DEFINE(HAVE_SYS_SDT_H, 1, ++# [Define if your target C library provides sys/sdt.h]) ++#fi ++#AC_MSG_RESULT($have_sys_sdt_h) + + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 5535bfa2b5a..13d793f5059 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -21786,11 +21786,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test $glibcxx_cv_sys_sdt_h = yes; then ++# if test $glibcxx_cv_sys_sdt_h = yes; then + +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h + +- fi ++# fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 + $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } + +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index 0ef96270c9c..afe55a1b215 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN + GLIBCXX_CHECK_SC_NPROC_ONLN + GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP + GLIBCXX_CHECK_SYSCTL_HW_NCPU +-GLIBCXX_CHECK_SDT_H ++#GLIBCXX_CHECK_SDT_H + + # Check for available headers. + AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0015-libtool.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0015-libtool.patch new file mode 100644 index 00000000..750f8a24 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0015-libtool.patch @@ -0,0 +1,42 @@ +From 80f2b01b3f917cea08294328c8bbc51dadece4af Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:29:11 +0400 +Subject: [PATCH 15/40] libtool + +libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 +when running on am x86_64 build host. + +This patch stops this speading to libdir in the libstdc++.la file within libtool. +Arguably, it shouldn't be passing this into libtool in the first place but +for now this resolves the nastiest problems this causes. + +func_normal_abspath would resolve an empty path to `pwd` so we need +to filter the zero case. + +RP 2012/8/24 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + ltmain.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec85d70..0121fba707f 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6359,6 +6359,10 @@ func_mode_link () + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" ++ if test -n "$install_libdir"; then ++ func_normal_abspath "$install_libdir" ++ install_libdir=$func_normal_abspath_result ++ fi + + oldlibs= + if test -z "$rpath"; then +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 00000000..9b1b4d4d --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0016-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch @@ -0,0 +1,43 @@ +From a66ec1e382bf869749588f072a4a7c09039f2b3a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:30:32 +0400 +Subject: [PATCH 16/40] gcc: armv4: pass fix-v4bx to linker to support EABI. + +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/config/arm/linux-eabi.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index b3af68cac57..330b6e13c5f 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -88,10 +88,14 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 00000000..382fecdb --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0017-Use-the-multilib-config-files-from-B-instead-of-usin.patch @@ -0,0 +1,102 @@ +From 624db734f656ad8cdf8b3cf3fc8e860b70c6c251 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:33:04 +0400 +Subject: [PATCH 17/40] Use the multilib config files from ${B} instead of + using the ones from ${S} + +Use the multilib config files from ${B} instead of using the ones from ${S} +so that the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 22 ++++++++++++++++++---- + gcc/configure.ac | 22 ++++++++++++++++++---- + 2 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 5111ec0aabb..3d9dcbdc93d 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12138,10 +12138,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -12152,6 +12162,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 3e09af916fd..e09c840b605 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1902,10 +1902,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -1916,6 +1926,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch new file mode 100644 index 00000000..20e77d6e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0018-Avoid-using-libdir-from-.la-which-usually-points-to-.patch @@ -0,0 +1,31 @@ +From 27cca95dcfeead8c52d292c4824ee96f178d6183 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:39:38 +0000 +Subject: [PATCH 18/40] Avoid using libdir from .la which usually points to a + host path + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jonathan Liu +Signed-off-by: Khem Raj +--- + ltmain.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 0121fba707f..52bdbdb5f9c 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5628,6 +5628,9 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else ++ # Instead of using libdir from .la which usually points to a host path, ++ # use the path the .la is contained in. ++ libdir="$abs_ladir" + dir="$libdir" + absdir="$libdir" + fi +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0019-export-CPP.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0019-export-CPP.patch new file mode 100644 index 00000000..140c67a4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0019-export-CPP.patch @@ -0,0 +1,53 @@ +From a2936382da81aefa9b69c1fc625f6c706b7ea1d8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:40:59 +0000 +Subject: [PATCH 19/40] export CPP + +The OE environment sets and exports CPP as being the target gcc. When +building gcc-cross-canadian for a mingw targetted sdk, the following can be found +in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: + +configure:3641: checking for _FILE_OFFSET_BITS value needed for large files +configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 +configure:3666: $? = 0 +configure:3698: result: no +configure:3786: checking how to run the C preprocessor +configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 +configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c +configure:3876: $? = 0 + +Note this is a *build* target (in build-x86_64-linux) so it should be +using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 +headers are very different, using the wrong cpp is a real problem. It is leaking +into configure through the CPP variable. Ultimately this leads to build +failures related to not being able to include a process.h file for pem-unix.c. + +The fix is to ensure we export a sane CPP value into the build +environment when using build targets. We could define a CPP_FOR_BUILD value which may be +the version which needs to be upstreamed but for now, this fix is good enough to +avoid the problem. + +RP 22/08/2013 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 38774f542a6..b426d4f9350 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -149,6 +149,7 @@ BUILD_EXPORTS = \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ ++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0020-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0020-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch new file mode 100644 index 00000000..b22557ea --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0020-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch @@ -0,0 +1,42 @@ +From d4326ab74a362b0fc83ed866f82c359389a36adc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:21:55 +0000 +Subject: [PATCH 20/40] Disable the MULTILIB_OSDIRNAMES and other multilib + options. + +Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on +systems where the libdir is NOT set to /lib64. This is allowed by the +ABI, as +long as the dynamic loader is present in /lib. + +We simply want to use the default rules in gcc to find and configure the +normal libdir. + +Upstream-Status: Inappropriate[OE-Specific] + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/t-aarch64-linux | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +index b9897785a89..7d06f0d0edb 100644 +--- a/gcc/config/aarch64/t-aarch64-linux ++++ b/gcc/config/aarch64/t-aarch64-linux +@@ -21,8 +21,8 @@ + LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + +-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) +-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) ++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) ++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + +-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) ++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0021-Ensure-target-gcc-headers-can-be-included.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0021-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 00000000..60d72699 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0021-Ensure-target-gcc-headers-can-be-included.patch @@ -0,0 +1,98 @@ +From 476eda9054df443d094273c8b61fce63d940adfc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:25:11 +0000 +Subject: [PATCH 21/40] Ensure target gcc headers can be included + +There are a few headers installed as part of the OpenEmbedded +gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe +built for the target architecture, these are within the target +sysroot and not cross/nativesdk; thus they weren't able to be +found by gcc with the existing search paths. Add support for +picking up these headers under the sysroot supplied on the gcc +command line in order to resolve this. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton +Signed-off-by: Khem Raj +--- + gcc/Makefile.in | 2 ++ + gcc/cppdefault.c | 4 ++++ + gcc/defaults.h | 9 +++++++++ + gcc/gcc.c | 7 ------- + 4 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 71a8275c39f..5ae693fb06c 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -614,6 +614,7 @@ libexecdir = @libexecdir@ + + # Directory in which the compiler finds libraries etc. + libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libsubdir_target = gcc/$(target_noncanonical)/$(version) + # Directory in which the compiler finds executables + libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which all plugin resources are installed +@@ -2870,6 +2871,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" + + PREPROCESSOR_DEFINES = \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ + -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ + -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index b36a979d5ba..e2e187dedaf 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[] + /* This is the dir for gcc's private headers. */ + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, + #endif ++#ifdef GCC_INCLUDE_SUBDIR_TARGET ++ /* This is the dir for gcc's private headers under the specified sysroot. */ ++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++#endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +diff --git a/gcc/defaults.h b/gcc/defaults.h +index 9035b333be8..5982bbda61d 100644 +--- a/gcc/defaults.h ++++ b/gcc/defaults.h +@@ -1455,4 +1455,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB + #endif + ++/* Default prefixes to attach to command names. */ ++ ++#ifndef STANDARD_STARTFILE_PREFIX_1 ++#define STANDARD_STARTFILE_PREFIX_1 "/lib/" ++#endif ++#ifndef STANDARD_STARTFILE_PREFIX_2 ++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" ++#endif ++ + #endif /* ! GCC_DEFAULTS_H */ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 570cdc00034..3fb64d453f1 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1464,13 +1464,6 @@ static const char *gcc_libexec_prefix; + + /* Default prefixes to attach to command names. */ + +-#ifndef STANDARD_STARTFILE_PREFIX_1 +-#define STANDARD_STARTFILE_PREFIX_1 "/lib/" +-#endif +-#ifndef STANDARD_STARTFILE_PREFIX_2 +-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" +-#endif +- + #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ + #undef MD_EXEC_PREFIX + #undef MD_STARTFILE_PREFIX +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0022-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0022-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch new file mode 100644 index 00000000..6f0d3f11 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0022-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch @@ -0,0 +1,54 @@ +From bc192f0a07ad819dee93446c5ef6895d9550d92d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 11:17:19 +0000 +Subject: [PATCH 22/40] gcc 4.8+ won't build with --disable-dependency-tracking + +since the *.Ppo files don't get created unless --enable-dependency-tracking is true. + +This patch ensures we only use those compiler options when its enabled. + +Upstream-Status: Submitted + +(Problem was already reported upstream, attached this patch there +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) + +RP +2012/09/22 + +Signed-off-by: Khem Raj +--- + libatomic/Makefile.am | 3 ++- + libatomic/Makefile.in | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index 803b292cce5..b47842eb590 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) + +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index c8f38be5835..4fab7cec3ea 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -335,7 +335,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0023-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0023-Don-t-search-host-directory-during-relink-if-inst_pr.patch new file mode 100644 index 00000000..fe3f3436 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0023-Don-t-search-host-directory-during-relink-if-inst_pr.patch @@ -0,0 +1,38 @@ +From 0409d2dd7322ecbed731cbe29b034fea43c5dddc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 3 Mar 2015 08:21:19 +0000 +Subject: [PATCH 23/40] Don't search host directory during "relink" if + $inst_prefix is provided + +http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj +--- + ltmain.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 52bdbdb5f9c..82bcec39f05 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6004,12 +6004,13 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. ++ # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" +- # Try looking first in the location we're being installed to. ++ + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ add_dir="-L$inst_prefix_dir$libdir" + ;; + esac + fi +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0024-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0024-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch new file mode 100644 index 00000000..c388a0ad --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0024-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch @@ -0,0 +1,28 @@ +From 56e2e1fc2a27c4a5cc9b471d5d0af90bcb871bfa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:15:27 -0700 +Subject: [PATCH 24/40] Use SYSTEMLIBS_DIR replacement instead of hardcoding base_libdir + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index bf1327e98cc..64436183bc8 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,7 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0025-aarch64-Add-support-for-musl-ldso.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0025-aarch64-Add-support-for-musl-ldso.patch new file mode 100644 index 00000000..03f9725b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0025-aarch64-Add-support-for-musl-ldso.patch @@ -0,0 +1,28 @@ +From b142e77e44e1acece6da54ccdc24c4da89cf4b99 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:18:39 -0700 +Subject: [PATCH 25/40] aarch64: Add support for musl ldso + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index 64436183bc8..ba156676026 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -24,7 +24,7 @@ + #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0026-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0026-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file mode 100644 index 00000000..85917389 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0026-libcc1-fix-libcc1-s-install-path-and-rpath.patch @@ -0,0 +1,54 @@ +From 3d4e53fc7cd71ce1181af8a5e9655398857af741 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sun, 5 Jul 2015 20:25:18 -0700 +Subject: [PATCH 26/40] libcc1: fix libcc1's install path and rpath + +* Install libcc1.so and libcc1plugin.so into + $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we + had done to lto-plugin. +* Fix bad RPATH iussue: + gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file + /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 + [rpaths] + +Upstream-Status: Inappropriate [OE configuration] + +Signed-off-by: Robert Yang +--- + libcc1/Makefile.am | 4 ++-- + libcc1/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am +index 6ecb66b4365..634cce3c2a9 100644 +--- a/libcc1/Makefile.am ++++ b/libcc1/Makefile.am +@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + + if ENABLE_PLUGIN + plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la +diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in +index 47be10025ad..8d5481d87bd 100644 +--- a/libcc1/Makefile.in ++++ b/libcc1/Makefile.in +@@ -303,8 +303,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la + shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0027-handle-sysroot-support-for-nativesdk-gcc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0027-handle-sysroot-support-for-nativesdk-gcc.patch new file mode 100644 index 00000000..4b955de8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0027-handle-sysroot-support-for-nativesdk-gcc.patch @@ -0,0 +1,213 @@ +From c033c1df11b692213d03db91d6cc145b4adedfac Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:39:54 +0000 +Subject: [PATCH 27/40] handle sysroot support for nativesdk-gcc + +Being able to build a nativesdk gcc is useful, particularly in cases +where the host compiler may be of an incompatible version (or a 32 +bit compiler is needed). + +Sadly, building nativesdk-gcc is not straight forward. We install +nativesdk-gcc into a relocatable location and this means that its +library locations can change. "Normal" sysroot support doesn't help +in this case since the values of paths like "libdir" change, not just +base root directory of the system. + +In order to handle this we do two things: + +a) Add %r into spec file markup which can be used for injected paths + such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). +b) Add other paths which need relocation into a .gccrelocprefix section + which the relocation code will notice and adjust automatically. + +Upstream-Status: Inappropriate +RP 2015/7/28 + +Signed-off-by: Khem Raj +--- + gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++------------- + gcc/cppdefault.h | 3 ++- + gcc/gcc.c | 20 +++++++++++++------ + 3 files changed, 53 insertions(+), 20 deletions(-) + +diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c +index e2e187dedaf..2faba2b1d63 100644 +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -35,6 +35,30 @@ + # undef CROSS_INCLUDE_DIR + #endif + ++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; ++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; ++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; ++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; ++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; ++#ifdef LOCAL_INCLUDE_DIR ++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; ++#endif ++#ifdef PREFIX_INCLUDE_DIR ++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; ++#endif ++#ifdef FIXED_INCLUDE_DIR ++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; ++#endif ++#ifdef CROSS_INCLUDE_DIR ++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; ++#endif ++#ifdef TOOL_INCLUDE_DIR ++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; ++#endif ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; ++#endif ++ + const struct default_include cpp_include_defaults[] + #ifdef INCLUDE_DEFAULTS + = INCLUDE_DEFAULTS; +@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[] + = { + #ifdef GPLUSPLUS_INCLUDE_DIR + /* Pick up GNU C++ generic include files. */ +- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR + /* Pick up GNU C++ target-dependent include files. */ +- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, + #endif + #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR + /* Pick up GNU C++ backward and deprecated include files. */ +- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GCC_INCLUDE_DIR + /* This is the dir for gcc's private headers. */ +- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef GCC_INCLUDE_SUBDIR_TARGET + /* This is the dir for gcc's private headers under the specified sysroot. */ +- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, + #endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, + #endif + #ifdef PREFIX_INCLUDE_DIR +- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, ++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, + #endif + #ifdef FIXED_INCLUDE_DIR + /* This is the dir for fixincludes. */ +- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, ++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, + /* A multilib suffix needs adding if different multilibs use + different headers. */ + #ifdef SYSROOT_HEADERS_SUFFIX_SPEC +@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[] + #endif + #ifdef CROSS_INCLUDE_DIR + /* One place the target system's headers might be. */ +- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef TOOL_INCLUDE_DIR + /* Another place the target system's headers might be. */ +- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, ++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, + #endif + #ifdef NATIVE_SYSTEM_HEADER_DIR + /* /usr/include comes dead last. */ +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, + #endif + { 0, 0, 0, 0, 0, 0 } + }; +diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h +index 4a0186d1cf2..29e5d9da0dc 100644 +--- a/gcc/cppdefault.h ++++ b/gcc/cppdefault.h +@@ -33,7 +33,8 @@ + + struct default_include + { +- const char *const fname; /* The name of the directory. */ ++ const char *fname; /* The name of the directory. */ ++ + const char *const component; /* The component containing the directory + (see update_path in prefix.c) */ + const char cplusplus; /* Only look here if we're compiling C++. */ +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 3fb64d453f1..cd0c7fbe961 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -248,6 +248,8 @@ FILE *report_times_to_file = NULL; + #endif + static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; + ++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; ++ + /* Nonzero means pass the updated target_system_root to the compiler. */ + + static int target_system_root_changed; +@@ -519,6 +521,7 @@ or with constant text in a single argument. + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. ++ %r Output the base path target_relocatable_prefix + %S process STARTFILE_SPEC as a spec. A capital S is actually used here. + %E process ENDFILE_SPEC as a spec. A capital E is actually used here. + %C process CPP_SPEC as a spec. +@@ -1487,10 +1490,10 @@ static const char *gcc_libexec_prefix; + gcc_exec_prefix is set because, in that case, we know where the + compiler has been installed, and use paths relative to that + location instead. */ +-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; +-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; +-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; ++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; ++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; ++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + + /* For native compilers, these are well-known paths containing + components that may be provided by the system. For cross +@@ -1498,9 +1501,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + static const char *md_exec_prefix = MD_EXEC_PREFIX; + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; + static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_1 ++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_2 ++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_2; + + /* A relative path to be used in finding the location of tools +@@ -5849,6 +5852,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) + } + break; + ++ case 'r': ++ obstack_grow (&obstack, target_relocatable_prefix, ++ strlen (target_relocatable_prefix)); ++ break; ++ + case 'S': + value = do_spec_1 (startfile_spec, 0, NULL); + if (value != 0) +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file mode 100644 index 00000000..1b25d780 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0028-Search-target-sysroot-gcc-version-specific-dirs-with.patch @@ -0,0 +1,102 @@ +From 62240d4c725ea0b43abfb901ddad90e83e29a25c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:41:45 +0000 +Subject: [PATCH 28/40] Search target sysroot gcc version specific dirs with + multilib. + +We install the gcc libraries (such as crtbegin.p) into +//5.2.0/ +which is a default search path for GCC (aka multi_suffix in the +code below). is 'machine' in gcc's terminology. We use +these directories so that multiple gcc versions could in theory +co-exist on target. + +We only want to build one gcc-cross-canadian per arch and have this work +for all multilibs. can be handled by mapping the multilib + to the one used by gcc-cross-canadian, e.g. +mips64-polkmllib32-linux +is symlinked to by mips64-poky-linux. + +The default gcc search path in the target sysroot for a "lib64" mutlilib +is: + +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +which means that the lib32 crtbegin.o will be found and the lib64 ones +will not which leads to compiler failures. + +This patch injects a multilib version of that path first so the lib64 +binaries can be found first. With this change the search path becomes: + +/lib32/../lib64/mips64-poky-linux/5.2.0/ +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +Upstream-Status: Pending +RP 2015/7/31 + +Signed-off-by: Khem Raj +--- + gcc/gcc.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index cd0c7fbe961..f6f3aa077c8 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -2527,7 +2527,7 @@ for_each_path (const struct path_prefix *paths, + if (path == NULL) + { + len = paths->max_len + extra_space + 1; +- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); + path = XNEWVEC (char, len); + } + +@@ -2539,6 +2539,33 @@ for_each_path (const struct path_prefix *paths, + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { ++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) ++ { ++ const char *this_multi; ++ size_t this_multi_len; ++ ++ if (pl->os_multilib) ++ { ++ this_multi = multi_os_dir; ++ this_multi_len = multi_os_dir_len; ++ } ++ else ++ { ++ this_multi = multi_dir; ++ this_multi_len = multi_dir_len; ++ } ++ ++ /* Look in multilib MACHINE/VERSION subdirectory first */ ++ if (this_multi_len) ++ { ++ memcpy (path + len, this_multi, this_multi_len + 1); ++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); ++ ret = callback (path, callback_info); ++ if (ret) ++ break; ++ } ++ } ++ + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0029-Fix-various-_FOR_BUILD-and-related-variables.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0029-Fix-various-_FOR_BUILD-and-related-variables.patch new file mode 100644 index 00000000..0c8bdb17 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0029-Fix-various-_FOR_BUILD-and-related-variables.patch @@ -0,0 +1,137 @@ +From 1377c738e31a1e1599cfab189485a9459f803e79 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:42:45 +0000 +Subject: [PATCH 29/40] Fix various _FOR_BUILD and related variables + +When doing a FOR_BUILD thing, you have to override CFLAGS with +CFLAGS_FOR_BUILD. And if you use C++, you also have to override +CXXFLAGS with CXXFLAGS_FOR_BUILD. +Without this, when building for mingw, you end up trying to use +the mingw headers for a host build. + +The same goes for other variables as well, such as CPPFLAGS, +CPP, and GMPINC. + +Upstream-Status: Pending + +Signed-off-by: Peter Seebach +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + Makefile.in | 6 ++++++ + Makefile.tpl | 5 +++++ + gcc/Makefile.in | 2 +- + gcc/configure | 2 +- + gcc/configure.ac | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index b426d4f9350..a2af9905cce 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -152,6 +152,7 @@ BUILD_EXPORTS = \ + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -169,6 +170,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -186,6 +190,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +@@ -743,6 +748,7 @@ BASE_FLAGS_TO_PASS = \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ ++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ + "INSTALL=$(INSTALL)" \ +diff --git a/Makefile.tpl b/Makefile.tpl +index 1f23b79b4b2..6c5652e811d 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -154,6 +154,7 @@ BUILD_EXPORTS = \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -171,6 +172,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 5ae693fb06c..02ee0aa72f4 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -801,7 +801,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ + BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) + BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ +- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) ++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) + + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') +diff --git a/gcc/configure b/gcc/configure +index 3d9dcbdc93d..aa127a4f6a4 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -11797,7 +11797,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +diff --git a/gcc/configure.ac b/gcc/configure.ac +index e09c840b605..18bf53c7e0a 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1708,7 +1708,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch new file mode 100644 index 00000000..04e126c5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0030-nios2-Define-MUSL_DYNAMIC_LINKER.patch @@ -0,0 +1,28 @@ +From 75da3cc9ca2d3de8c2062f23bf4f72415741ef83 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Feb 2016 10:26:10 -0800 +Subject: [PATCH 30/40] nios2: Define MUSL_DYNAMIC_LINKER + +Upstream-Status: Pending + +Signed-off-by: Marek Vasut +Signed-off-by: Khem Raj +--- + gcc/config/nios2/linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h +index 4729105626d..36181eb7b85 100644 +--- a/gcc/config/nios2/linux.h ++++ b/gcc/config/nios2/linux.h +@@ -30,6 +30,7 @@ + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" + + #undef LINK_SPEC + #define LINK_SPEC LINK_SPEC_ENDIAN \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0031-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0031-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch new file mode 100644 index 00000000..002cf2be --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0031-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch @@ -0,0 +1,87 @@ +From f715aeef294b85fa593ef69e6d0114cc7b15312b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 18:10:54 -0700 +Subject: [PATCH 31/40] Add ssp_nonshared to link commandline for musl targets + +when -fstack-protector options are enabled we need to +link with ssp_shared on musl since it does not provide +the __stack_chk_fail_local() so essentially it provides +libssp but not libssp_nonshared something like +TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED + where-as for glibc the needed symbols +are already present in libc_nonshared library therefore +we do not need any library helper on glibc based systems +but musl needs the libssp_noshared from gcc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/linux.h | 7 +++++++ + gcc/config/rs6000/linux.h | 10 ++++++++++ + gcc/config/rs6000/linux64.h | 10 ++++++++++ + 3 files changed, 27 insertions(+) + +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 487b0c0923b..4769d089538 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -182,6 +182,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ + { 0, 0, 0, 0, 0, 0 } \ + } ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++ + #endif + + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ +diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h +index 01b40c762f6..e7c5e92215c 100644 +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -92,6 +92,16 @@ + " -m elf32ppclinux") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #undef LINK_OS_LINUX_SPEC + #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ + %{!static-pie: \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 54aa8d957e7..619e113e2b8 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -466,6 +466,16 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0032-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0032-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch new file mode 100644 index 00000000..025caba3 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0032-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch @@ -0,0 +1,125 @@ +From 6dfbca78b8d253aecf9cbb5e68e04b8dd3d6a543 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Apr 2016 20:03:28 +0000 +Subject: [PATCH 32/40] libgcc: Add knob to use ldbl-128 on ppc + +musl does not support ldbl 128 so we can not assume +that linux as a whole supports ldbl-128 bits, instead +act upon configure option passed to gcc and assume no +on musl and yes otherwise if no option is passed since +default behaviour is to assume ldbl128 it does not +change the defaults + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + libgcc/Makefile.in | 1 + + libgcc/config/rs6000/t-linux | 5 ++++- + libgcc/configure | 18 ++++++++++++++++++ + libgcc/configure.ac | 12 ++++++++++++ + 4 files changed, 35 insertions(+), 1 deletion(-) + mode change 100644 => 100755 libgcc/configure + +diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in +index dd8cee99fd3..b5f478af382 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -48,6 +48,7 @@ unwind_header = @unwind_header@ + md_unwind_header = @md_unwind_header@ + sfp_machine_header = @sfp_machine_header@ + thread_header = @thread_header@ ++with_ldbl128 = @with_ldbl128@ + + host_noncanonical = @host_noncanonical@ + real_host_noncanonical = @real_host_noncanonical@ +diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux +index 4f6d4c4a4d2..c50dd94a2da 100644 +--- a/libgcc/config/rs6000/t-linux ++++ b/libgcc/config/rs6000/t-linux +@@ -1,3 +1,6 @@ + SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc ++ifeq ($(with_ldbl128),yes) ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 ++endif ++HOST_LIBGCC2_CFLAGS += -mno-minimal-toc +diff --git a/libgcc/configure b/libgcc/configure +old mode 100644 +new mode 100755 +index b2f3f870844..ed806587c17 +--- a/libgcc/configure ++++ b/libgcc/configure +@@ -619,6 +619,7 @@ build_vendor + build_cpu + build + with_aix_soname ++with_ldbl128 + enable_vtable_verify + enable_shared + libgcc_topdir +@@ -668,6 +669,7 @@ with_cross_host + with_ld + enable_shared + enable_vtable_verify ++with_long_double_128 + with_aix_soname + enable_version_specific_runtime_libs + with_slibdir +@@ -1329,6 +1331,7 @@ Optional Packages: + --with-target-subdir=SUBDIR Configuring in a subdirectory for target + --with-cross-host=HOST Configuring with a cross compiler + --with-ld arrange to use the specified ld (full pathname) ++ --with-long-double-128 use 128-bit long double by default + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX +@@ -2213,6 +2216,21 @@ fi + + + ++# Check whether --with-long-double-128 was given. ++if test "${with_long_double_128+set}" = set; then : ++ withval=$with_long_double_128; with_ldbl128="$with_long_double_128" ++else ++ case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++ ++fi ++ ++ ++ ++ + # Check whether --with-aix-soname was given. + if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case "${host}:${enable_shared}" in +diff --git a/libgcc/configure.ac b/libgcc/configure.ac +index b59aa746afc..42220a263c5 100644 +--- a/libgcc/configure.ac ++++ b/libgcc/configure.ac +@@ -78,6 +78,18 @@ AC_ARG_ENABLE(vtable-verify, + [enable_vtable_verify=no]) + AC_SUBST(enable_vtable_verify) + ++AC_ARG_WITH(long-double-128, ++[AS_HELP_STRING([--with-long-double-128], ++ [use 128-bit long double by default])], ++ with_ldbl128="$with_long_double_128", ++[case "${host}" in ++ power*-*-musl*) ++ with_ldbl128="no";; ++ *) with_ldbl128="yes";; ++ esac ++]) ++AC_SUBST(with_ldbl128) ++ + AC_ARG_WITH(aix-soname, + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX])], +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0033-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0033-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch new file mode 100644 index 00000000..343f7aad --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0033-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch @@ -0,0 +1,29 @@ +From 7e55147e8e609ace6f9eecd86a956636687671f0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 May 2016 21:11:34 -0700 +Subject: [PATCH 33/40] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson +Signed-off-by: Khem Raj +--- + libgcc/config/t-slibgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +index 7e60b621a2d..ea22ede3361 100644 +--- a/libgcc/config/t-slibgcc ++++ b/libgcc/config/t-slibgcc +@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ +- $(SHLIB_LDFLAGS) \ ++ $(LDFLAGS) $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ + $(SHLIB_OBJS) $(SHLIB_LC) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch new file mode 100644 index 00000000..92224cc5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0034-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch @@ -0,0 +1,85 @@ +From 46ca51dd413330bb8425b06283e7667bfb507c3d Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 24 Oct 2015 20:09:53 +0000 +Subject: [PATCH 34/40] libgcc_s: Use alias for __cpu_indicator_init instead of symver + +Adapter from + +https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html + +This fix was debated but hasnt been applied gcc upstream since +they expect musl to support '@' in symbol versioning which is +a sun/gnu versioning extention. This patch however avoids the +need for the '@' symbols at all + +libgcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add. + (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove. + + * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER. + +gcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init + call __cpu_indicator_init_local instead of __cpu_indicator_init. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/i386/i386.c | 4 ++-- + libgcc/config/i386/cpuinfo.c | 6 +++--- + libgcc/config/i386/t-linux | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index a88a29b51e6..6f3f5187970 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -36555,10 +36555,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, + { + case IX86_BUILTIN_CPU_INIT: + { +- /* Make it call __cpu_indicator_init in libgcc. */ ++ /* Make it call __cpu_indicator_init_local in libgcc.a. */ + tree call_expr, fndecl, type; + type = build_function_type_list (integer_type_node, NULL_TREE); +- fndecl = build_fn_decl ("__cpu_indicator_init", type); ++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); + call_expr = build_call_expr (fndecl, 0); + return expand_expr (call_expr, target, mode, EXPAND_NORMAL); + } +diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c +index d1853d5515b..864150c9249 100644 +--- a/libgcc/config/i386/cpuinfo.c ++++ b/libgcc/config/i386/cpuinfo.c +@@ -485,7 +485,7 @@ __cpu_indicator_init (void) + return 0; + } + +-#if defined SHARED && defined USE_ELF_SYMVER +-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); +-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); ++#ifndef SHARED ++int __cpu_indicator_init_local (void) ++ __attribute__ ((weak, alias ("__cpu_indicator_init"))); + #endif +diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux +index 8506a635790..564296f788e 100644 +--- a/libgcc/config/i386/t-linux ++++ b/libgcc/config/i386/t-linux +@@ -3,5 +3,5 @@ + # t-slibgcc-elf-ver and t-linux + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS) ++HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) + CRTSTUFF_T_CFLAGS += $(CET_FLAGS) +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0035-sync-gcc-stddef.h-with-musl.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0035-sync-gcc-stddef.h-with-musl.patch new file mode 100644 index 00000000..6ecd6e97 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0035-sync-gcc-stddef.h-with-musl.patch @@ -0,0 +1,91 @@ +From 38d401fb6ab555d09f4a9a677721dde0743876e1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 3 Feb 2017 12:56:00 -0800 +Subject: [PATCH 35/40] sync gcc stddef.h with musl + +musl defines ptrdiff_t size_t and wchar_t +so dont define them here if musl is definining them + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/ginclude/stddef.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index 31b96a7e5e1..438a3ce7c56 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -134,6 +134,7 @@ _TYPE_wchar_t; + #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T + #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ ++#ifndef __DEFINED_ptrdiff_t /* musl */ + #define _PTRDIFF_T + #define _T_PTRDIFF_ + #define _T_PTRDIFF +@@ -143,10 +144,12 @@ _TYPE_wchar_t; + #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T + #define _PTRDIFF_T_DECLARED ++#define __DEFINED_ptrdiff_t /* musl */ + #ifndef __PTRDIFF_TYPE__ + #define __PTRDIFF_TYPE__ long int + #endif + typedef __PTRDIFF_TYPE__ ptrdiff_t; ++#endif /* __DEFINED_ptrdiff_t */ + #endif /* _PTRDIFF_T_DECLARED */ + #endif /* _GCC_PTRDIFF_T */ + #endif /* ___int_ptrdiff_t_h */ +@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__DragonFly__) \ + || defined(__FreeBSD_kernel__) +@@ -235,6 +240,7 @@ typedef long ssize_t; + #endif /* _SIZE_T */ + #endif /* __SIZE_T__ */ + #endif /* __size_t__ */ ++#endif /* __DEFINED_size_t */ + #undef __need_size_t + #endif /* _STDDEF_H or __need_size_t. */ + +@@ -264,6 +270,7 @@ typedef long ssize_t; + #ifndef ___int_wchar_t_h + #ifndef __INT_WCHAR_T_H + #ifndef _GCC_WCHAR_T ++#ifndef __DEFINED_wchar_t /* musl */ + #define __wchar_t__ /* BeOS */ + #define __WCHAR_T__ /* Cray Unicos/Mk */ + #define _WCHAR_T +@@ -279,6 +286,7 @@ typedef long ssize_t; + #define __INT_WCHAR_T_H + #define _GCC_WCHAR_T + #define _WCHAR_T_DECLARED ++#define __DEFINED_wchar_t /* musl */ + + /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ + instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other +@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t; + #endif + #endif /* __WCHAR_T__ */ + #endif /* __wchar_t__ */ ++#endif /* __DEFINED_wchar_t musl */ + #undef __need_wchar_t + #endif /* _STDDEF_H or __need_wchar_t. */ + +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0036-fix-segmentation-fault-in-precompiled-header-generat.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0036-fix-segmentation-fault-in-precompiled-header-generat.patch new file mode 100644 index 00000000..c4ce5db5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0036-fix-segmentation-fault-in-precompiled-header-generat.patch @@ -0,0 +1,60 @@ +From a9bb29a4e9b478f9b126e483467ce9031c33fe4f Mon Sep 17 00:00:00 2001 +From: Juro Bystricky +Date: Mon, 19 Mar 2018 22:31:20 -0700 +Subject: [PATCH 36/40] fix segmentation fault in precompiled header generation + +Prevent a segmentation fault which occurs when using incorrect +structure trying to access name of some named operators, such as +CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in +those cases, as is may not be initialized at all. + +[YOCTO #11738] + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky +Signed-off-by: Khem Raj +--- + libcpp/lex.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 37c365a3560..63480048db6 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -3279,11 +3279,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token, + spell_ident: + case SPELL_IDENT: + if (forstring) +- { +- memcpy (buffer, NODE_NAME (token->val.node.spelling), +- NODE_LEN (token->val.node.spelling)); +- buffer += NODE_LEN (token->val.node.spelling); +- } ++ { ++ if (token->type == CPP_NAME) ++ { ++ memcpy (buffer, NODE_NAME (token->val.node.spelling), ++ NODE_LEN (token->val.node.spelling)); ++ buffer += NODE_LEN (token->val.node.spelling); ++ break; ++ } ++ /* NAMED_OP, cannot use node.spelling */ ++ if (token->flags & NAMED_OP) ++ { ++ const char *str = cpp_named_operator2name (token->type); ++ if (str) ++ { ++ size_t len = strlen(str); ++ memcpy(buffer, str, len); ++ buffer += len; ++ } ++ break; ++ } ++ } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0037-Fix-for-testsuite-failure.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0037-Fix-for-testsuite-failure.patch new file mode 100644 index 00000000..70999dd4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0037-Fix-for-testsuite-failure.patch @@ -0,0 +1,258 @@ +From 1e5c1ef34d92b4157e1a24ca743d45f3a7375a5e Mon Sep 17 00:00:00 2001 +From: RAGHUNATH LOLUR +Date: Wed, 6 Dec 2017 22:52:26 -0800 +Subject: [PATCH 37/40] Fix for testsuite failure + +2017-11-16 Raghunath Lolur + + * gcc.dg/pr56275.c: If SSE is disabled, ensure that + "-mfpmath" is not set to use SSE. Set "-mfpmath=387". + * gcc.dg/pr68306.c: Likewise + * gcc.dg/pr68306-2.c: Likewise + * gcc.dg/pr68306-3.c: Likewise + * gcc.dg/pr69634.c: Likewise + * gcc.target/i386/amd64-abi-1.c: Likewise + * gcc.target/i386/funcspec-6.c: Likewise + * gcc.target/i386/interrupt-387-err-1.c: Likewise + * gcc.target/i386/isa-14.c: Likewise + * gcc.target/i386/pr44948-2b.c: Likewise + * gcc.target/i386/pr53425-1.c: Likewise + * gcc.target/i386/pr53425-2.c: Likewise + * gcc.target/i386/pr55247.c: Likewise + * gcc.target/i386/pr59644.c: Likewise + * gcc.target/i386/pr62120.c: Likewise + * gcc.target/i386/pr70467-1.c: Likewise + * gcc.target/i386/warn-vect-op-1.c: Likewise + +If -Wall, -Werror are used during compilation various test cases fail +to compile. + +If SSE is disabled, be sure to -mfpmath=387 to resolve this. + +This patch removes the changes to Changelog from the original patch. +This will help us avoid conflicts. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle +--- + gcc/testsuite/gcc.dg/pr56275.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-2.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-3.c | 2 +- + gcc/testsuite/gcc.dg/pr68306.c | 2 +- + gcc/testsuite/gcc.dg/pr69634.c | 2 +- + gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +- + gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 + + gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +- + gcc/testsuite/gcc.target/i386/isa-14.c | 2 +- + gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +- + gcc/testsuite/gcc.target/i386/pr55247.c | 2 +- + gcc/testsuite/gcc.target/i386/pr59644.c | 2 +- + gcc/testsuite/gcc.target/i386/pr62120.c | 2 +- + gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +- + gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +- + 17 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c +index b901bb2b199..a4f6c95e1a1 100644 +--- a/gcc/testsuite/gcc.dg/pr56275.c ++++ b/gcc/testsuite/gcc.dg/pr56275.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ +-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */ + + typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long)))); + +diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c +index 4672ebe7987..2a368c484b6 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-2.c ++++ b/gcc/testsuite/gcc.dg/pr68306-2.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + struct { + int tz_minuteswest; +diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c +index f5a8c102cf8..df3390c64c2 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-3.c ++++ b/gcc/testsuite/gcc.dg/pr68306-3.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */ + + extern void fn2(); +diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c +index 54e5b40f221..0813389e2c1 100644 +--- a/gcc/testsuite/gcc.dg/pr68306.c ++++ b/gcc/testsuite/gcc.dg/pr68306.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + enum powerpc_pmc_type { PPC_PMC_IBM }; + struct { +diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c +index 60a56149463..bcc23f9ccd6 100644 +--- a/gcc/testsuite/gcc.dg/pr69634.c ++++ b/gcc/testsuite/gcc.dg/pr69634.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */ +-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-require-effective-target scheduling } */ + + typedef unsigned short u16; +diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +index 69fde57bf06..7f1f1c03edf 100644 +--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c ++++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */ + + double foo(void) { return 0; } /* { dg-error "SSE disabled" } */ +diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c +index ea896b7ebfd..bf15569b826 100644 +--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c ++++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c +@@ -1,6 +1,7 @@ + /* Test whether all of the 64-bit function specific options are accepted + without error. */ + /* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-additional-options "-mfpmath=387" } */ + + #include "funcspec-56.inc" + +diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +index 3fbdc881dda..6b4d9d1252a 100644 +--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c ++++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */ ++/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */ + + typedef unsigned int uword_t __attribute__ ((mode (__word__))); + +diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c +index 5d49e6e77fe..1de2db92bdd 100644 +--- a/gcc/testsuite/gcc.target/i386/isa-14.c ++++ b/gcc/testsuite/gcc.target/i386/isa-14.c +@@ -1,5 +1,5 @@ + /* { dg-do run } */ +-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */ ++/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */ + + extern void abort (void); + +diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +index fa1769b62fb..f79fb12726f 100644 +--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c ++++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */ ++/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */ + + struct A + { +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c +index 2e89ff7d81d..6339bf6b736 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef double __v2df __attribute__ ((__vector_size__ (16))); +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c +index 61f6283dbe9..2c5a55f0ac3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef float __v2sf __attribute__ ((__vector_size__ (8))); +diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c +index 23366d0909d..9810e3abb76 100644 +--- a/gcc/testsuite/gcc.target/i386/pr55247.c ++++ b/gcc/testsuite/gcc.target/i386/pr55247.c +@@ -1,6 +1,6 @@ + /* { dg-do compile { target { ! ia32 } } } */ + /* { dg-require-effective-target maybe_x32 } */ +-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */ ++/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */ + + typedef unsigned int uint32_t; + typedef uint32_t Elf32_Word; +diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c +index 96006b3e338..4287e4538bf 100644 +--- a/gcc/testsuite/gcc.target/i386/pr59644.c ++++ b/gcc/testsuite/gcc.target/i386/pr59644.c +@@ -1,6 +1,6 @@ + /* PR target/59644 */ + /* { dg-do run { target lp64 } } */ +-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */ ++/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */ + + /* This test uses __builtin_trap () instead of e.g. abort, + because due to -mpreferred-stack-boundary=3 it should not call +diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c +index bfb8c4703eb..ed04cf181f3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr62120.c ++++ b/gcc/testsuite/gcc.target/i386/pr62120.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + + void foo () + { +diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c +index 4e112c88d07..bcfb396a68d 100644 +--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c +@@ -1,6 +1,6 @@ + /* PR rtl-optimization/70467 */ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + + void foo (unsigned long long *); + +diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +index 6cda1534311..26e37f5b8ba 100644 +--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c ++++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse -Wvector-operation-performance" } */ ++/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */ + #define vector(elcount, type) \ + __attribute__((vector_size((elcount)*sizeof(type)))) type + +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0038-Re-introduce-spe-commandline-options.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0038-Re-introduce-spe-commandline-options.patch new file mode 100644 index 00000000..8de8892b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0038-Re-introduce-spe-commandline-options.patch @@ -0,0 +1,41 @@ +From f0bea96434ac478c3cff8c29dd97cccfac5b35e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 6 Jun 2018 12:10:22 -0700 +Subject: [PATCH 38/40] Re-introduce spe commandline options + +This should ensure that we keep accepting +spe options + +Upstream-Status: Inappropriate [SPE port is removed from rs600 port] + +Signed-off-by: Khem Raj +--- + gcc/config/rs6000/rs6000.opt | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt +index ace8a477550..d6a8f825d88 100644 +--- a/gcc/config/rs6000/rs6000.opt ++++ b/gcc/config/rs6000/rs6000.opt +@@ -365,6 +365,18 @@ mdebug= + Target RejectNegative Joined + -mdebug= Enable debug output. + ++mspe ++Target Var(rs6000_spe) Save ++Generate SPE SIMD instructions on E500. ++ ++mabi=spe ++Target RejectNegative Var(rs6000_spe_abi) Save ++Use the SPE ABI extensions. ++ ++mabi=no-spe ++Target RejectNegative Var(rs6000_spe_abi, 0) ++Do not use the SPE ABI extensions. ++ + mabi=altivec + Target RejectNegative Var(rs6000_altivec_abi) Save + Use the AltiVec ABI extensions. +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0039-riscv-Disable-multilib-for-OE.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0039-riscv-Disable-multilib-for-OE.patch new file mode 100644 index 00000000..f7b222e8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0039-riscv-Disable-multilib-for-OE.patch @@ -0,0 +1,27 @@ +From 24f74444c00c6c9bf076fb002614ebf6dec31f1a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 28 Dec 2018 09:59:53 -0800 +Subject: [PATCH 39/40] riscv: Disable multilib for OE + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +--- + gcc/config/riscv/t-linux | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a18..e4d817621fc 100644 +--- a/gcc/config/riscv/t-linux ++++ b/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ +-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) +-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) ++MULTILIB_DIRNAMES := . . ++#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch new file mode 100644 index 00000000..9fba1637 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-8.3/0040-powerpc-powerpc64-Add-support-for-musl-ldso.patch @@ -0,0 +1,31 @@ +From 4bd0a3866f302725cb4eddcaddaeece64900c42f Mon Sep 17 00:00:00 2001 +From: Serhey Popovych +Date: Tue, 11 Dec 2018 02:30:50 -0500 +Subject: [PATCH 40/40] powerpc/powerpc64: Add support for musl ldso + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Serhey Popovych +--- + gcc/config/rs6000/linux64.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 619e113e2b8..ee8b44f9374 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -421,9 +421,9 @@ extern int dot_symbols; + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ +- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + + #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" +-- +2.21.0 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2.inc b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2.inc new file mode 100644 index 00000000..08ad796a --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2.inc @@ -0,0 +1,124 @@ +require recipes-devtools/gcc/gcc-common.inc + +# Third digit in PV should be incremented after a minor release + +PV = "arm-9.2" +CVE_VERSION = "9.2" + +# BINV should be incremented to a revision after a minor gcc release + +BINV = "9.2.1" + +MMYY = "19.12" +RELEASE = "20${MMYY}" +PR = "r${RELEASE}" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-arm-9.2:${FILE_DIRNAME}/gcc-arm-9.2/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib flex-native" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +BASEURI ?= "https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/srcrel/gcc-arm-src-snapshot-9.2-2019.12.tar.xz" +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0002-gcc-poison-system-directories.patch \ + file://0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0004-64-bit-multilib-hack.patch \ + file://0005-optional-libstdc.patch \ + file://0006-COLLECT_GCC_OPTIONS.patch \ + file://0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0008-fortran-cross-compile-hack.patch \ + file://0009-cpp-honor-sysroot.patch \ + file://0010-MIPS64-Default-to-N64-ABI.patch \ + file://0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0012-gcc-Fix-argument-list-too-long-error.patch \ + file://0013-Disable-sdt.patch \ + file://0014-libtool.patch \ + file://0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0018-export-CPP.patch \ + file://0019-Ensure-target-gcc-headers-can-be-included.patch \ + file://0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0023-aarch64-Add-support-for-musl-ldso.patch \ + file://0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0025-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0027-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + file://0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ + file://0033-sync-gcc-stddef.h-with-musl.patch \ + file://0034-fix-segmentation-fault-in-precompiled-header-generat.patch \ + file://0035-Fix-for-testsuite-failure.patch \ + file://0036-Re-introduce-spe-commandline-options.patch \ + file://0037-Fix-up-libsanitizer-build-with-master-glibc.patch \ +" +SRC_URI[md5sum] = "9c570fc4286825b4e6f67b3d34aade23" + +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-arm-src-snapshot-9.2-2019.12" + +# For dev release snapshotting +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/official-gcc-${RELEASE}" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" +SSP ?= "--disable-libssp" +SSP_mingw32 = "--enable-libssp" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + ${SSP} \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_INITIAL = "\ + --disable-libmudflap \ + --disable-libgomp \ + --disable-libitm \ + --disable-libquadmath \ + --with-system-zlib \ + --disable-lto \ + --disable-plugin \ + --enable-linker-build-id \ + --enable-decimal-float=no \ + --without-isl \ + --disable-libssp \ +" + +EXTRA_OECONF_append_aarchilp32 = " --with-abi=ilp32" + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..9065c304 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,42 @@ +From 863325ec3c6eb4987be63509ac407b2d13617342 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:37:11 +0400 +Subject: [PATCH 01/36] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index abd93a990a9..b121088d778 100755 +--- a/configure ++++ b/configure +@@ -7603,7 +7603,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +diff --git a/configure.ac b/configure.ac +index 9db4fd14aa2..aad93c4d183 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3119,7 +3119,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0002-gcc-poison-system-directories.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0002-gcc-poison-system-directories.patch new file mode 100644 index 00000000..a1116e75 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0002-gcc-poison-system-directories.patch @@ -0,0 +1,203 @@ +From 68e78bc15de215fa15c7d8b56bd2e2b0539b34fa Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 02/36] gcc: poison-system-directories + +Add /sw/include and /opt/include based on the original +zecke-no-host-includes.patch patch. The original patch checked for +/usr/include, /sw/include and /opt/include and then triggered a failure and +aborted. + +Instead, we add the two missing items to the current scan. If the user +wants this to be a failure, they can add "-Werror=poison-system-directories". + +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/common.opt | 4 ++++ + gcc/config.in | 6 ++++++ + gcc/configure | 16 ++++++++++++++++ + gcc/configure.ac | 10 ++++++++++ + gcc/doc/invoke.texi | 9 +++++++++ + gcc/gcc.c | 2 ++ + gcc/incpath.c | 21 +++++++++++++++++++++ + 7 files changed, 68 insertions(+) + +diff --git a/gcc/common.opt b/gcc/common.opt +index d342c4f3749..c64fd4a6c50 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -684,6 +684,10 @@ Wreturn-local-addr + Common Var(warn_return_local_addr) Init(1) Warning + Warn about returning a pointer/reference to a local or temporary variable. + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one variable shadows another. Same as -Wshadow=global. +diff --git a/gcc/config.in b/gcc/config.in +index a718ceaf3da..5713342efb1 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -200,6 +200,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +diff --git a/gcc/configure b/gcc/configure +index 481071b4265..a6ea3a8a84c 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -995,6 +995,7 @@ with_system_zlib + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1748,6 +1749,8 @@ Optional Features: + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -29750,6 +29753,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index ce2825580c6..d42bbd4fd1c 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6378,6 +6378,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, + [specify that runtime libraries should be + installed in a compiler-specific directory])]) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system header directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system header directories]) ++fi ++ + # Substitute configuration variables + AC_SUBST(subdirs) + AC_SUBST(srcdir) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 6ef36ce02aa..09414d8cc05 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -332,6 +332,7 @@ Objective-C and Objective-C++ Dialects}. + -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol + -Wparentheses -Wno-pedantic-ms-format @gol + -Wplacement-new -Wplacement-new=@var{n} @gol ++-Wno-poison-system-directories @gol + -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol + -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol + -Wrestrict -Wno-return-local-addr @gol +@@ -6289,6 +6290,14 @@ made up of data only and thus requires no special treatment. But, for + most targets, it is made up of code and thus requires the stack to be + made executable in order for the program to work properly. + ++@item -Wno-poison-system-directories ++@opindex Wno-poison-system-directories ++Do not warn for @option{-I} or @option{-L} options using system ++directories such as @file{/usr/include} when cross compiling. This ++option is intended for use in chroot environments when such ++directories contain the correct headers and libraries for the target ++system rather than the host. ++ + @item -Wfloat-equal + @opindex Wfloat-equal + @opindex Wno-float-equal +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 4f57765b012..a2601a6bb06 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1042,6 +1042,8 @@ proper position among the other output files. */ + "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ + "%X %{o*} %{e*} %{N} %{n} %{r}\ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ ++ %{Wno-poison-system-directories:--no-poison-system-directories} \ ++ %{Werror=poison-system-directories:--error-poison-system-directories} \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ + %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ +diff --git a/gcc/incpath.c b/gcc/incpath.c +index bcbe2082905..5752298bbf2 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -26,6 +26,7 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -393,6 +394,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[INC_QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file mode 100644 index 00000000..23039d21 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0003-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch @@ -0,0 +1,73 @@ +From f8d60c4114acb92361c7b2f4a4561d4661e8da9d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:08:31 +0400 +Subject: [PATCH 03/36] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET + +Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it. + +This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET. + +Other changes I had to do include: + +- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though. + +- passing the right CFLAGS to configure scripts as exported environment variables + +I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do. + +Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3? + +Signed-off-by: Paolo Bonzini +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + configure | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/configure b/configure +index b121088d778..93aae5bb26f 100755 +--- a/configure ++++ b/configure +@@ -6864,6 +6864,38 @@ fi + + + ++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS ++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS ++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path). ++# We want to ensure that TARGET libraries (which we know are built with ++# gcc) are built with "-O2 -g", so include those options when setting ++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. ++if test "x$CFLAGS_FOR_TARGET" = x; then ++ CFLAGS_FOR_TARGET=$CFLAGS ++ case " $CFLAGS " in ++ *" -O2 "*) ;; ++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;; ++ esac ++ case " $CFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;; ++ esac ++fi ++ ++ ++if test "x$CXXFLAGS_FOR_TARGET" = x; then ++ CXXFLAGS_FOR_TARGET=$CXXFLAGS ++ case " $CXXFLAGS " in ++ *" -O2 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;; ++ esac ++ case " $CXXFLAGS " in ++ *" -g "* | *" -g3 "*) ;; ++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;; ++ esac ++fi ++ ++ + # Handle --with-headers=XXX. If the value is not "yes", the contents of + # the named directory are copied to $(tooldir)/sys-include. + if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0004-64-bit-multilib-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0004-64-bit-multilib-hack.patch new file mode 100644 index 00000000..a79c40c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0004-64-bit-multilib-hack.patch @@ -0,0 +1,119 @@ +From c2081c51db589471ea713870c72f13999abda815 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:10:06 +0400 +Subject: [PATCH 04/36] 64-bit multilib hack. + +GCC has internal multilib handling code but it assumes a very specific rigid directory +layout. The build system implementation of multilib layout is very generic and allows +complete customisation of the library directories. + +This patch is a partial solution to allow any custom directories to be passed into gcc +and handled correctly. It forces gcc to use the base_libdir (which is the current +directory, "."). We need to do this for each multilib that is configured as we don't +know which compiler options may be being passed into the compiler. Since we have a compiler +per mulitlib at this point that isn't an issue. + +The one problem is the target compiler is only going to work for the default multlilib at +this point. Ideally we'd figure out which multilibs were being enabled with which paths +and be able to patch these entries with a complete set of correct paths but this we +don't have such code at this point. This is something the target gcc recipe should do +and override these platform defaults in its build config. + +Do same for riscv64 and aarch64 + +RP 15/8/11 + +Upstream-Status: Inappropriate[OE-Specific] + +Signed-off-by: Khem Raj +Signed-off-by: Elvis Dowson +Signed-off-by: Mark Hatle +--- + gcc/config/aarch64/t-aarch64-linux | 8 ++++---- + gcc/config/i386/t-linux64 | 6 ++---- + gcc/config/mips/t-linux64 | 10 +++------- + gcc/config/riscv/t-linux | 6 ++++-- + gcc/config/rs6000/t-linux64 | 5 ++--- + 5 files changed, 15 insertions(+), 20 deletions(-) + +diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +index 5ad670ba2ce..e26019e7157 100644 +--- a/gcc/config/aarch64/t-aarch64-linux ++++ b/gcc/config/aarch64/t-aarch64-linux +@@ -21,8 +21,8 @@ + LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + +-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) +-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) ++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) ++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + +-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) ++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +index c686ab2f0d2..c82b60dadcd 100644 +--- a/gcc/config/i386/t-linux64 ++++ b/gcc/config/i386/t-linux64 +@@ -32,7 +32,5 @@ + # + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) +-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_DIRNAMES = . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 +index 3a2ff700d7d..13ef19576b5 100644 +--- a/gcc/config/mips/t-linux64 ++++ b/gcc/config/mips/t-linux64 +@@ -17,10 +17,6 @@ + # . + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 +-MULTILIB_DIRNAMES = n32 32 64 +-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) +-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) +-MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++MULTILIB_DIRNAMES = . . . ++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ++ +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a18..e4d817621fc 100644 +--- a/gcc/config/riscv/t-linux ++++ b/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ +-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) +-MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) ++MULTILIB_DIRNAMES := . . ++#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) +diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +index f3c6e2be1d9..bd0393155fa 100644 +--- a/gcc/config/rs6000/t-linux64 ++++ b/gcc/config/rs6000/t-linux64 +@@ -26,10 +26,9 @@ + # MULTILIB_OSDIRNAMES according to what is found on the target. + + MULTILIB_OPTIONS := m64/m32 +-MULTILIB_DIRNAMES := 64 32 ++MULTILIB_DIRNAMES := . . + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0005-optional-libstdc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0005-optional-libstdc.patch new file mode 100644 index 00000000..f4fac914 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0005-optional-libstdc.patch @@ -0,0 +1,125 @@ +From e7e504f4a90cfa395e7f8ee779f8c3ed687802ca Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:12:56 +0400 +Subject: [PATCH 05/36] optional libstdc + +gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ +will not run correctly since by default the linker will try to link against libstdc++ +which shouldn't exist yet. We need an option to disable -lstdc++ +option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc +driver. This patch adds such an option which only disables the -lstdc++. + +A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to +do this officially, the likely answer is don't build libstdc++ separately. + +RP 29/6/10 + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + gcc/c-family/c.opt | 4 ++++ + gcc/cp/g++spec.c | 1 + + gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++- + gcc/gcc.c | 1 + + 4 files changed, 37 insertions(+), 1 deletion(-) + +diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt +index 916cc67b453..41619fa591c 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1952,6 +1952,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++. + ++nostdlib++ ++Driver ++Do not link standard C++ runtime library ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c +index 6c4574a837d..0e2657f00ee 100644 +--- a/gcc/cp/g++spec.c ++++ b/gcc/cp/g++spec.c +@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, + switch (decoded_options[i].opt_index) + { + case OPT_nostdlib: ++ case OPT_nostdlib__: + case OPT_nodefaultlibs: + library = -1; + break; +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 09414d8cc05..a43969bc9f0 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -228,6 +228,9 @@ in the following sections. + -fno-weak -nostdinc++ @gol + -fvisibility-inlines-hidden @gol + -fvisibility-ms-compat @gol ++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol ++-fvtv-counts -fvtv-debug @gol ++-nostdlib++ @gol + -fext-numeric-literals @gol + -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol + -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wdeprecated-copy-dtor @gol +@@ -538,7 +541,7 @@ Objective-C and Objective-C++ Dialects}. + -pie -pthread -r -rdynamic @gol + -s -static -static-pie -static-libgcc -static-libstdc++ @gol + -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol +--shared -shared-libgcc -symbolic @gol ++-shared -shared-libgcc -symbolic -nostdlib++ @gol + -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol + -u @var{symbol} -z @var{keyword}} + +@@ -13312,6 +13315,33 @@ Specify that the program entry point is @var{entry}. The argument is + interpreted by the linker; the GNU linker accepts either a symbol name + or an address. + ++@item -nostdlib++ ++@opindex nostdlib++ ++Do not use the standard system C++ runtime libraries when linking. ++Only the libraries you specify will be passed to the linker. ++ ++@cindex @option{-lgcc}, use with @option{-nostdlib} ++@cindex @option{-nostdlib} and unresolved references ++@cindex unresolved references and @option{-nostdlib} ++@cindex @option{-lgcc}, use with @option{-nodefaultlibs} ++@cindex @option{-nodefaultlibs} and unresolved references ++@cindex unresolved references and @option{-nodefaultlibs} ++One of the standard libraries bypassed by @option{-nostdlib} and ++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines ++which GCC uses to overcome shortcomings of particular machines, or special ++needs for some languages. ++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++Collection (GCC) Internals}, ++for more discussion of @file{libgcc.a}.) ++In most cases, you need @file{libgcc.a} even when you want to avoid ++other standard libraries. In other words, when you specify @option{-nostdlib} ++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well. ++This ensures that you have no unresolved references to internal GCC ++library subroutines. ++(An example of such an internal subroutine is @code{__main}, used to ensure C++ ++constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++GNU Compiler Collection (GCC) Internals}.) ++ + @item -pie + @opindex pie + Produce a dynamically linked position independent executable on targets +diff --git a/gcc/gcc.c b/gcc/gcc.c +index a2601a6bb06..cd6c6fc95db 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1052,6 +1052,7 @@ proper position among the other output files. */ + %(mflib) " STACK_SPLIT_SPEC "\ + %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ + %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\ ++ %{!nostdlib++:}\ + %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}" + #endif + +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0006-COLLECT_GCC_OPTIONS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0006-COLLECT_GCC_OPTIONS.patch new file mode 100644 index 00000000..9f7e603f --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0006-COLLECT_GCC_OPTIONS.patch @@ -0,0 +1,38 @@ +From b9260cd3ac26b0302824ed466a548464c864d95f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:16:28 +0400 +Subject: [PATCH 06/36] COLLECT_GCC_OPTIONS + +This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to +invoke collect2. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/gcc.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index cd6c6fc95db..7da9c5d457b 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4804,6 +4804,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file mode 100644 index 00000000..28f8fc26 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0007-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch @@ -0,0 +1,96 @@ +From 88e728dad53d48c4a19f15e19f66fd23f4820b4a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:17:25 +0400 +Subject: [PATCH 07/36] Use the defaults.h in ${B} instead of ${S}, and t-oe in + ${B} + +Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that +the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +While compiling gcc-crosssdk-initial-x86_64 on some host, there is +occasionally failure that test the existance of default.h doesn't +work, the reason is tm_include_list='** defaults.h' rather than +tm_include_list='** ./defaults.h' + +So we add the test condition for this situation. +Signed-off-by: Hongxu Jia +--- + gcc/Makefile.in | 2 +- + gcc/configure | 4 ++-- + gcc/configure.ac | 4 ++-- + gcc/mkconfig.sh | 4 ++-- + 4 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 5f43d9de00e..41f0f592ff4 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -540,7 +540,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ + TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + + xmake_file=@xmake_file@ +-tmake_file=@tmake_file@ ++tmake_file=@tmake_file@ ./t-oe + TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ + TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ + TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ +diff --git a/gcc/configure b/gcc/configure +index a6ea3a8a84c..e3bcf8abe9a 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12341,8 +12341,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index d42bbd4fd1c..2ebc377a74d 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1968,8 +1968,8 @@ for f in $tm_file; do + tm_include_list="${tm_include_list} $f" + ;; + defaults.h ) +- tm_file_list="${tm_file_list} \$(srcdir)/$f" +- tm_include_list="${tm_include_list} $f" ++ tm_file_list="${tm_file_list} ./$f" ++ tm_include_list="${tm_include_list} ./$f" + ;; + * ) + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh +index 308b87d0cc1..19068cbc24a 100644 +--- a/gcc/mkconfig.sh ++++ b/gcc/mkconfig.sh +@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then + if [ $# -ge 1 ]; then + echo '#ifdef IN_GCC' >> ${output}T + for file in "$@"; do +- if test x"$file" = x"defaults.h"; then ++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then + postpone_defaults_h="yes" + else + echo "# include \"$file\"" >> ${output}T +@@ -106,7 +106,7 @@ esac + + # If we postponed including defaults.h, add the #include now. + if test x"$postpone_defaults_h" = x"yes"; then +- echo "# include \"defaults.h\"" >> ${output}T ++ echo "# include \"./defaults.h\"" >> ${output}T + fi + + # Add multiple inclusion protection guard, part two. +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0008-fortran-cross-compile-hack.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0008-fortran-cross-compile-hack.patch new file mode 100644 index 00000000..24e3abe0 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0008-fortran-cross-compile-hack.patch @@ -0,0 +1,46 @@ +From 010f09f2963ede24e85134e5fab2fa627a9afa05 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:20:01 +0400 +Subject: [PATCH 08/36] fortran cross-compile hack. + +* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used +used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross +directory. + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [embedded specific] +--- + libgfortran/configure | 2 +- + libgfortran/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libgfortran/configure b/libgfortran/configure +index 60867b93d0e..3fc9fca5b7b 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -13071,7 +13071,7 @@ esac + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + ac_ext=${ac_fc_srcext-f} + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 7cfce28ab69..6cd515ee1a4 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -250,7 +250,7 @@ AC_SUBST(enable_static) + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0009-cpp-honor-sysroot.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0009-cpp-honor-sysroot.patch new file mode 100644 index 00000000..6af0a012 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0009-cpp-honor-sysroot.patch @@ -0,0 +1,54 @@ +From 45e9cd39d9c62454d46b9e9473a0c1034ceca15d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:22:00 +0400 +Subject: [PATCH 09/36] cpp: honor sysroot. + +Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile +preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location +rather than the --sysroot option specified on the commandline. If access to that directory is +permission denied (unreadable), gcc will error. + +This happens when ccache is in use due to the fact it uses preprocessed source files. + +The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, +-isystem, -isysroot happen and the correct sysroot is used. + +[YOCTO #2074] + +RP 2012/04/13 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/cp/lang-specs.h | 2 +- + gcc/gcc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h +index c6e42eda283..e1ddf066467 100644 +--- a/gcc/cp/lang-specs.h ++++ b/gcc/cp/lang-specs.h +@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3. If not see + {".ii", "@c++-cpp-output", 0, 0, 0}, + {"@c++-cpp-output", + "%{!E:%{!M:%{!MM:" +- " cc1plus -fpreprocessed %i %(cc1_options) %2" ++ " cc1plus -fpreprocessed %i %I %(cc1_options) %2" + " %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 7da9c5d457b..4e7c45b268c 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -1349,7 +1349,7 @@ static const struct compiler default_compilers[] = + %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0010-MIPS64-Default-to-N64-ABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0010-MIPS64-Default-to-N64-ABI.patch new file mode 100644 index 00000000..bc0c6d5b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0010-MIPS64-Default-to-N64-ABI.patch @@ -0,0 +1,57 @@ +From 1ff4108d707b34e399e9dc418ad1ecc42f72676d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:23:08 +0400 +Subject: [PATCH 10/36] MIPS64: Default to N64 ABI + +MIPS64 defaults to n32 ABI, this patch makes it +so that it defaults to N64 ABI + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE config specific] +--- + gcc/config.gcc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index ddd3b8f4d9d..fdfc0bd3e82 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2282,29 +2282,29 @@ mips*-*-linux*) # Linux MIPS, either endian. + default_mips_arch=mips32 + ;; + mips64el-st-linux-gnu) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_file="${tm_file} mips/st.h" + tmake_file="${tmake_file} mips/t-st" + enable_mips_multilibs="yes" + ;; + mips64octeon*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" + target_cpu_default=MASK_SOFT_FLOAT_ABI + enable_mips_multilibs="yes" + ;; + mipsisa64r6*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r6 + enable_mips_multilibs="yes" + ;; + mipsisa64r2*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + default_mips_arch=mips64r2 + enable_mips_multilibs="yes" + ;; + mips64*-*-linux* | mipsisa64*-*-linux*) +- default_mips_abi=n32 ++ default_mips_abi=64 + enable_mips_multilibs="yes" + ;; + esac +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file mode 100644 index 00000000..66fb24d4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch @@ -0,0 +1,243 @@ +From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:24:50 +0400 +Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER + relative to SYSTEMLIBS_DIR + +This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER +relative to SYSTEMLIBS_DIR which can be set in generated headers +This breaks the assumption of hardcoded multilib in gcc +Change is only for the supported architectures in OE including +SH, sparc, alpha for possible future support (if any) + +Removes the do_headerfix task in metadata + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate [OE configuration] +--- + gcc/config/alpha/linux-elf.h | 4 ++-- + gcc/config/arm/linux-eabi.h | 4 ++-- + gcc/config/arm/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 6 +++--- + gcc/config/linux.h | 8 ++++---- + gcc/config/mips/linux.h | 12 ++++++------ + gcc/config/riscv/linux.h | 2 +- + gcc/config/rs6000/linux64.h | 15 +++++---------- + gcc/config/sh/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + gcc/config/sparc/linux64.h | 4 ++-- + 12 files changed, 29 insertions(+), 34 deletions(-) + +diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h +index 824861befec..6afacce3292 100644 +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see + #define EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" + #elif DEFAULT_LIBC == LIBC_GLIBC +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index 66ec0ea3980..e4ade2e2ab0 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -65,8 +65,8 @@ + GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ + + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" ++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" + #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT + + #define GLIBC_DYNAMIC_LINKER \ +diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h +index 9a360defd21..98f6e960b64 100644 +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + + #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + %{static:-Bstatic} \ +diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h +index 9a6e2d99896..31efbb73016 100644 +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #define GNU_USER_LINK_EMULATION "elf_i386" +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index c08221c4210..dbb474d792b 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" +-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index c3c4a219e67..4b05d8e93d1 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + GLIBC_DYNAMIC_LINKER must be defined for each target using them, or + GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets + supporting both 32-bit and 64-bit compilation. */ +-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" +-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" ++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" +diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h +index 6f79ac9c01a..25de96f9561 100644 +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see + #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" + + #define GLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + #define GLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" + + #undef UCLIBC_DYNAMIC_LINKER32 + #define UCLIBC_DYNAMIC_LINKER32 \ +- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + #undef UCLIBC_DYNAMIC_LINKER64 + #define UCLIBC_DYNAMIC_LINKER64 \ +- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" + #define UCLIBC_DYNAMIC_LINKERN32 \ +- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" ++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 \ +diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h +index 58dd18b89f3..112ba9cd764 100644 +--- a/gcc/config/riscv/linux.h ++++ b/gcc/config/riscv/linux.h +@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see + GNU_USER_TARGET_OS_CPP_BUILTINS(); \ + } while (0) + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" + + #define MUSL_ABI_SUFFIX \ + "%{mabi=ilp32:-sf}" \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 9946d3fed94..45a9a7cae59 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -423,24 +423,19 @@ extern int dot_symbols; + #undef LINK_OS_DEFAULT_SPEC + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" + +-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" +- ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" + #ifdef LINUX64_DEFAULT_ABI_ELFv2 +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.2}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" + #else +-#define GLIBC_DYNAMIC_LINKER64 \ +-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ +-":%(dynamic_linker_prefix)/lib64/ld64.so.1}" ++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" + #endif + + #undef MUSL_DYNAMIC_LINKER32 + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #undef MUSL_DYNAMIC_LINKER64 + #define MUSL_DYNAMIC_LINKER64 \ +- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h +index c9897b7aca5..82f275319cc 100644 +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see + "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ + "%{mfdpic:-fdpic}.so.1" + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" +diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h +index 08476f1d94d..80440e712ad 100644 +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ +diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h +index 789d1df4bd5..b920c680fb1 100644 +--- a/gcc/config/sparc/linux64.h ++++ b/gcc/config/sparc/linux64.h +@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" + + #ifdef SPARC_BI_ARCH + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0012-gcc-Fix-argument-list-too-long-error.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0012-gcc-Fix-argument-list-too-long-error.patch new file mode 100644 index 00000000..60539795 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0012-gcc-Fix-argument-list-too-long-error.patch @@ -0,0 +1,40 @@ +From 2cb227cd8069c73242286f64183fb203f8d2618a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:26:37 +0400 +Subject: [PATCH 12/36] gcc: Fix argument list too long error. + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 41f0f592ff4..0064a282488 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3537,7 +3537,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0013-Disable-sdt.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0013-Disable-sdt.patch new file mode 100644 index 00000000..a21a63c6 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0013-Disable-sdt.patch @@ -0,0 +1,113 @@ +From aea5ffa9d704f4eb8fa93366884d3c26a1dbec49 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:28:10 +0400 +Subject: [PATCH 13/36] Disable sdt. + +We don't list dtrace in DEPENDS so we shouldn't be depending on this header. +It may or may not exist from preivous builds though. To be determinstic, disable +sdt.h usage always. This avoids build failures if the header is removed after configure +but before libgcc is compiled for example. + +RP 2012/8/7 + +Signed-off-by: Khem Raj + +Disable sdt for libstdc++-v3. + +Signed-off-by: Robert Yang + +Upstream-Status: Inappropriate [hack] +--- + gcc/configure | 12 ++++++------ + gcc/configure.ac | 18 +++++++++--------- + libstdc++-v3/configure | 6 +++--- + libstdc++-v3/configure.ac | 2 +- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index e3bcf8abe9a..1f1d22ca666 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29332,12 +29332,12 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 + $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } + have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h +- +-fi ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++# ++#fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 + $as_echo "$have_sys_sdt_h" >&6; } + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 2ebc377a74d..ddc85197588 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5995,15 +5995,15 @@ fi + AC_SUBST([enable_default_ssp]) + + # Test for on the target. +-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) +-AC_MSG_CHECKING(sys/sdt.h in the target C library) +-have_sys_sdt_h=no +-if test -f $target_header_dir/sys/sdt.h; then +- have_sys_sdt_h=yes +- AC_DEFINE(HAVE_SYS_SDT_H, 1, +- [Define if your target C library provides sys/sdt.h]) +-fi +-AC_MSG_RESULT($have_sys_sdt_h) ++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) ++#AC_MSG_CHECKING(sys/sdt.h in the target C library) ++#have_sys_sdt_h=no ++#if test -f $target_header_dir/sys/sdt.h; then ++# have_sys_sdt_h=yes ++# AC_DEFINE(HAVE_SYS_SDT_H, 1, ++# [Define if your target C library provides sys/sdt.h]) ++#fi ++#AC_MSG_RESULT($have_sys_sdt_h) + + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index 5acf79cba54..191bc6c5796 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -22085,11 +22085,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + +- if test $glibcxx_cv_sys_sdt_h = yes; then ++# if test $glibcxx_cv_sys_sdt_h = yes; then + +-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h ++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h + +- fi ++# fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5 + $as_echo "$glibcxx_cv_sys_sdt_h" >&6; } + +diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac +index dadd8827b49..6b1ce9957d3 100644 +--- a/libstdc++-v3/configure.ac ++++ b/libstdc++-v3/configure.ac +@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN + GLIBCXX_CHECK_SC_NPROC_ONLN + GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP + GLIBCXX_CHECK_SYSCTL_HW_NCPU +-GLIBCXX_CHECK_SDT_H ++#GLIBCXX_CHECK_SDT_H + + # Check for available headers. + AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0014-libtool.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0014-libtool.patch new file mode 100644 index 00000000..7a8f3afe --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0014-libtool.patch @@ -0,0 +1,42 @@ +From 6c4d0c303ebc3e1c7e554d54a8bb807d77ed41fd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:29:11 +0400 +Subject: [PATCH 14/36] libtool + +libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 +when running on am x86_64 build host. + +This patch stops this speading to libdir in the libstdc++.la file within libtool. +Arguably, it shouldn't be passing this into libtool in the first place but +for now this resolves the nastiest problems this causes. + +func_normal_abspath would resolve an empty path to `pwd` so we need +to filter the zero case. + +RP 2012/8/24 + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + ltmain.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 79f9ba89af5..8e222f7c16b 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6359,6 +6359,10 @@ func_mode_link () + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" ++ if test -n "$install_libdir"; then ++ func_normal_abspath "$install_libdir" ++ install_libdir=$func_normal_abspath_result ++ fi + + oldlibs= + if test -z "$rpath"; then +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file mode 100644 index 00000000..d06ae270 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0015-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch @@ -0,0 +1,43 @@ +From c5662ff1e7dea2291b9cb7a83cfff3001dd31f53 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:30:32 +0400 +Subject: [PATCH 15/36] gcc: armv4: pass fix-v4bx to linker to support EABI. + +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream. + +Signed-off-by: Khem Raj + +Upstream-Status: Pending +--- + gcc/config/arm/linux-eabi.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index e4ade2e2ab0..108863f69d2 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -91,10 +91,14 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" + ++/* For armv4 we pass --fix-v4bx to linker to support EABI */ ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC EABI_LINK_SPEC \ ++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) + +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file mode 100644 index 00000000..310caec4 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch @@ -0,0 +1,102 @@ +From e3b693b9d6dc9496f7c98a13b28182d23084215c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Mar 2013 09:33:04 +0400 +Subject: [PATCH 16/36] Use the multilib config files from ${B} instead of + using the ones from ${S} + +Use the multilib config files from ${B} instead of using the ones from ${S} +so that the source can be shared between gcc-cross-initial, +gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. + +Signed-off-by: Khem Raj +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [configuration] +--- + gcc/configure | 22 ++++++++++++++++++---- + gcc/configure.ac | 22 ++++++++++++++++++---- + 2 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 1f1d22ca666..911de2cf017 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -12321,10 +12321,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -12335,6 +12345,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +diff --git a/gcc/configure.ac b/gcc/configure.ac +index ddc85197588..b413ae9bf25 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1948,10 +1948,20 @@ done + tmake_file_= + for f in ${tmake_file} + do +- if test -f ${srcdir}/config/$f +- then +- tmake_file_="${tmake_file_} \$(srcdir)/config/$f" +- fi ++ case $f in ++ */t-linux64 ) ++ if test -f ./config/$f ++ then ++ tmake_file_="${tmake_file_} ./config/$f" ++ fi ++ ;; ++ * ) ++ if test -f ${srcdir}/config/$f ++ then ++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f" ++ fi ++ ;; ++ esac + done + tmake_file="${tmake_file_}" + +@@ -1962,6 +1972,10 @@ tm_file_list="options.h" + tm_include_list="options.h insn-constants.h" + for f in $tm_file; do + case $f in ++ */linux64.h ) ++ tm_file_list="${tm_file_list} ./config/$f" ++ tm_include_list="${tm_include_list} ./config/$f" ++ ;; + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch new file mode 100644 index 00000000..ad1d1d4e --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0017-Avoid-using-libdir-from-.la-which-usually-points-to-.patch @@ -0,0 +1,31 @@ +From 09d9ccc1d471020949d1285a5276f17504fd60dd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:39:38 +0000 +Subject: [PATCH 17/36] Avoid using libdir from .la which usually points to a + host path + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jonathan Liu +Signed-off-by: Khem Raj +--- + ltmain.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 8e222f7c16b..0a93b4e5c3b 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5628,6 +5628,9 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else ++ # Instead of using libdir from .la which usually points to a host path, ++ # use the path the .la is contained in. ++ libdir="$abs_ladir" + dir="$libdir" + absdir="$libdir" + fi +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0018-export-CPP.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0018-export-CPP.patch new file mode 100644 index 00000000..0f728ec5 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0018-export-CPP.patch @@ -0,0 +1,53 @@ +From 987338cd847a723de533bb317e452a60b1e52165 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 09:40:59 +0000 +Subject: [PATCH 18/36] export CPP + +The OE environment sets and exports CPP as being the target gcc. When +building gcc-cross-canadian for a mingw targetted sdk, the following can be found +in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log: + +configure:3641: checking for _FILE_OFFSET_BITS value needed for large files +configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5 +configure:3666: $? = 0 +configure:3698: result: no +configure:3786: checking how to run the C preprocessor +configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 +configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c +configure:3876: $? = 0 + +Note this is a *build* target (in build-x86_64-linux) so it should be +using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 +headers are very different, using the wrong cpp is a real problem. It is leaking +into configure through the CPP variable. Ultimately this leads to build +failures related to not being able to include a process.h file for pem-unix.c. + +The fix is to ensure we export a sane CPP value into the build +environment when using build targets. We could define a CPP_FOR_BUILD value which may be +the version which needs to be upstreamed but for now, this fix is good enough to +avoid the problem. + +RP 22/08/2013 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 64e091ba71d..255822e3f27 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -149,6 +149,7 @@ BUILD_EXPORTS = \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ ++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch new file mode 100644 index 00000000..53f9e99d --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0019-Ensure-target-gcc-headers-can-be-included.patch @@ -0,0 +1,55 @@ +From d27ba49e2e5c608c43265462d6831363cc7f565b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 10:25:11 +0000 +Subject: [PATCH 19/36] Ensure target gcc headers can be included + +There are a few headers installed as part of the OpenEmbedded +gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe +built for the target architecture, these are within the target +sysroot and not cross/nativesdk; thus they weren't able to be +found by gcc with the existing search paths. Add support for +picking up these headers under the sysroot supplied on the gcc +command line in order to resolve this. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton +Signed-off-by: Khem Raj +--- + gcc/Makefile.in | 2 ++ + gcc/cppdefault.c | 4 ++++ + gcc/defaults.h | 9 +++++++++ + gcc/gcc.c | 7 ------- + 4 files changed, 15 insertions(+), 7 deletions(-) + +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -618,6 +618,7 @@ libexecdir = @libexecdir@ + + # Directory in which the compiler finds libraries etc. + libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libsubdir_target = $(target_noncanonical)/$(version) + # Directory in which the compiler finds executables + libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which all plugin resources are installed +@@ -2866,6 +2867,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localed + + PREPROCESSOR_DEFINES = \ + -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ + -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ + -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ +--- a/gcc/cppdefault.c ++++ b/gcc/cppdefault.c +@@ -59,6 +59,10 @@ const struct default_include cpp_include + /* This is the dir for gcc's private headers. */ + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, + #endif ++#ifdef GCC_INCLUDE_SUBDIR_TARGET ++ /* This is the dir for gcc's private headers under the specified sysroot. */ ++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++#endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch new file mode 100644 index 00000000..b0f96d06 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0020-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch @@ -0,0 +1,54 @@ +From 83bcd4cc47ae63971c888c117abd00dfd506532c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 20 Feb 2015 11:17:19 +0000 +Subject: [PATCH 20/36] gcc 4.8+ won't build with --disable-dependency-tracking + +since the *.Ppo files don't get created unless --enable-dependency-tracking is true. + +This patch ensures we only use those compiler options when its enabled. + +Upstream-Status: Submitted + +(Problem was already reported upstream, attached this patch there +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930) + +RP +2012/09/22 + +Signed-off-by: Khem Raj +--- + libatomic/Makefile.am | 3 ++- + libatomic/Makefile.in | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index c1b7c73934a..ef43d62c07a 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) + +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index 29324e3e0ac..d5cdb4259ef 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -414,7 +414,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch new file mode 100644 index 00000000..f36ca29b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0021-Don-t-search-host-directory-during-relink-if-inst_pr.patch @@ -0,0 +1,38 @@ +From 667cc8d43e8fb4ac09654ee408da482f96b09580 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 3 Mar 2015 08:21:19 +0000 +Subject: [PATCH 21/36] Don't search host directory during "relink" if + $inst_prefix is provided + +http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj +--- + ltmain.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 0a93b4e5c3b..6de6ed2f9a0 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6004,12 +6004,13 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. ++ # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" +- # Try looking first in the location we're being installed to. ++ + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ add_dir="-L$inst_prefix_dir$libdir" + ;; + esac + fi +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch new file mode 100644 index 00000000..d5b91500 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0022-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch @@ -0,0 +1,29 @@ +From 279c4de48e3fd61e2f268787ed3f1d69ed9224f8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:15:27 -0700 +Subject: [PATCH 22/36] Use SYSTEMLIBS_DIR replacement instead of hardcoding + base_libdir + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index 5e8b34ded03..7e628bf661e 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,7 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0023-aarch64-Add-support-for-musl-ldso.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0023-aarch64-Add-support-for-musl-ldso.patch new file mode 100644 index 00000000..f811306c --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0023-aarch64-Add-support-for-musl-ldso.patch @@ -0,0 +1,28 @@ +From 1277d12058334087443828dfd57d44e3b1dfcc9a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 28 Apr 2015 23:18:39 -0700 +Subject: [PATCH 23/36] aarch64: Add support for musl ldso + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index 7e628bf661e..1717cbe5471 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -24,7 +24,7 @@ + #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file mode 100644 index 00000000..298b0962 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0024-libcc1-fix-libcc1-s-install-path-and-rpath.patch @@ -0,0 +1,54 @@ +From 4a0487ad75accd780dd155aa59086cc4b11cfc47 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Sun, 5 Jul 2015 20:25:18 -0700 +Subject: [PATCH 24/36] libcc1: fix libcc1's install path and rpath + +* Install libcc1.so and libcc1plugin.so into + $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we + had done to lto-plugin. +* Fix bad RPATH iussue: + gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file + /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 + [rpaths] + +Upstream-Status: Inappropriate [OE configuration] + +Signed-off-by: Robert Yang +--- + libcc1/Makefile.am | 4 ++-- + libcc1/Makefile.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am +index 72c6aead475..42a87740b31 100644 +--- a/libcc1/Makefile.am ++++ b/libcc1/Makefile.am +@@ -37,8 +37,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + + if ENABLE_PLUGIN + plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la +diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in +index 7104b649026..2103c477468 100644 +--- a/libcc1/Makefile.in ++++ b/libcc1/Makefile.in +@@ -393,8 +393,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin +-cc1libdir = $(libdir)/$(libsuffix) ++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++plugindir = $(cc1libdir) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la + shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch new file mode 100644 index 00000000..2e7a444b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch @@ -0,0 +1,346 @@ +From a183c82ea2af934a8d30055a791dc1d80c9067a9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:39:54 +0000 +Subject: [PATCH 25/36] handle sysroot support for nativesdk-gcc + +Being able to build a nativesdk gcc is useful, particularly in cases +where the host compiler may be of an incompatible version (or a 32 +bit compiler is needed). + +Sadly, building nativesdk-gcc is not straight forward. We install +nativesdk-gcc into a relocatable location and this means that its +library locations can change. "Normal" sysroot support doesn't help +in this case since the values of paths like "libdir" change, not just +base root directory of the system. + +In order to handle this we do two things: + +a) Add %r into spec file markup which can be used for injected paths + such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). +b) Add other paths which need relocation into a .gccrelocprefix section + which the relocation code will notice and adjust automatically. + +Upstream-Status: Inappropriate +RP 2015/7/28 + +Signed-off-by: Khem Raj + +Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without +these as part of the gccrelocprefix the system can't do runtime relocation +if the executable is moved. (These paths were missed in the original +implementation.) + +Signed-off-by: Mark Hatle +--- + c-family/c-opts.c | 4 +-- + cppdefault.c | 63 +++++++++++++++++++++++++++++++++--------------------- + cppdefault.h | 13 ++++------- + gcc.c | 20 ++++++++++++----- + incpath.c | 12 +++++----- + prefix.c | 4 +-- + 6 files changed, 68 insertions(+), 48 deletions(-) + +Index: gcc-9.2.0/gcc/cppdefault.c +=================================================================== +--- gcc-9.2.0.orig/gcc/cppdefault.c ++++ gcc-9.2.0/gcc/cppdefault.c +@@ -35,6 +35,30 @@ + # undef CROSS_INCLUDE_DIR + #endif + ++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; ++char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; ++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; ++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; ++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; ++#ifdef LOCAL_INCLUDE_DIR ++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; ++#endif ++#ifdef PREFIX_INCLUDE_DIR ++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; ++#endif ++#ifdef FIXED_INCLUDE_DIR ++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; ++#endif ++#ifdef CROSS_INCLUDE_DIR ++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; ++#endif ++#ifdef TOOL_INCLUDE_DIR ++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; ++#endif ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; ++#endif ++ + const struct default_include cpp_include_defaults[] + #ifdef INCLUDE_DEFAULTS + = INCLUDE_DEFAULTS; +@@ -42,38 +66,38 @@ const struct default_include cpp_include + = { + #ifdef GPLUSPLUS_INCLUDE_DIR + /* Pick up GNU C++ generic include files. */ +- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR + /* Pick up GNU C++ target-dependent include files. */ +- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, + #endif + #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR + /* Pick up GNU C++ backward and deprecated include files. */ +- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, + #endif + #ifdef GCC_INCLUDE_DIR + /* This is the dir for gcc's private headers. */ +- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef GCC_INCLUDE_SUBDIR_TARGET + /* This is the dir for gcc's private headers under the specified sysroot. */ +- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, ++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, + #endif + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, +- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, ++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, + #endif + #ifdef PREFIX_INCLUDE_DIR +- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, ++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, + #endif + #ifdef FIXED_INCLUDE_DIR + /* This is the dir for fixincludes. */ +- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, ++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, + /* A multilib suffix needs adding if different multilibs use + different headers. */ + #ifdef SYSROOT_HEADERS_SUFFIX_SPEC +@@ -85,33 +109,24 @@ const struct default_include cpp_include + #endif + #ifdef CROSS_INCLUDE_DIR + /* One place the target system's headers might be. */ +- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, ++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, + #endif + #ifdef TOOL_INCLUDE_DIR + /* Another place the target system's headers might be. */ +- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, ++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, + #endif + #ifdef NATIVE_SYSTEM_HEADER_DIR + /* /usr/include comes dead last. */ +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, +- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, ++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, + #endif + { 0, 0, 0, 0, 0, 0 } + }; + #endif /* no INCLUDE_DEFAULTS */ + +-#ifdef GCC_INCLUDE_DIR +-const char cpp_GCC_INCLUDE_DIR[] = GCC_INCLUDE_DIR; +-const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8; +-#else +-const char cpp_GCC_INCLUDE_DIR[] = ""; +-const size_t cpp_GCC_INCLUDE_DIR_len = 0; +-#endif +- + /* The configured prefix. */ +-const char cpp_PREFIX[] = PREFIX; +-const size_t cpp_PREFIX_len = sizeof PREFIX - 1; +-const char cpp_EXEC_PREFIX[] = STANDARD_EXEC_PREFIX; ++char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX; ++char EXEC_PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; + + /* This value is set by cpp_relocated at runtime */ + const char *gcc_exec_prefix; +Index: gcc-9.2.0/gcc/cppdefault.h +=================================================================== +--- gcc-9.2.0.orig/gcc/cppdefault.h ++++ gcc-9.2.0/gcc/cppdefault.h +@@ -33,7 +33,8 @@ + + struct default_include + { +- const char *const fname; /* The name of the directory. */ ++ const char *fname; /* The name of the directory. */ ++ + const char *const component; /* The component containing the directory + (see update_path in prefix.c) */ + const char cplusplus; /* Only look here if we're compiling C++. */ +@@ -50,17 +51,13 @@ struct default_include + }; + + extern const struct default_include cpp_include_defaults[]; +-extern const char cpp_GCC_INCLUDE_DIR[]; +-extern const size_t cpp_GCC_INCLUDE_DIR_len; ++extern char GCC_INCLUDE_DIRVAR[] __attribute__ ((section (".gccrelocprefix"))); + + /* The configure-time prefix, i.e., the value supplied as the argument + to --prefix=. */ +-extern const char cpp_PREFIX[]; ++extern char PREFIXVAR[] __attribute__ ((section (".gccrelocprefix"))); + /* The length of the configure-time prefix. */ +-extern const size_t cpp_PREFIX_len; +-/* The configure-time execution prefix. This is typically the lib/gcc +- subdirectory of cpp_PREFIX. */ +-extern const char cpp_EXEC_PREFIX[]; ++extern char EXEC_PREFIXVAR[] __attribute__ ((section (".gccrelocprefix"))); + /* The run-time execution prefix. This is typically the lib/gcc + subdirectory of the actual installation. */ + extern const char *gcc_exec_prefix; +Index: gcc-9.2.0/gcc/gcc.c +=================================================================== +--- gcc-9.2.0.orig/gcc/gcc.c ++++ gcc-9.2.0/gcc/gcc.c +@@ -253,6 +253,8 @@ FILE *report_times_to_file = NULL; + #endif + static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; + ++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; ++ + /* Nonzero means pass the updated target_system_root to the compiler. */ + + static int target_system_root_changed; +@@ -527,6 +529,7 @@ or with constant text in a single argume + %G process LIBGCC_SPEC as a spec. + %R Output the concatenation of target_system_root and + target_sysroot_suffix. ++ %r Output the base path target_relocatable_prefix + %S process STARTFILE_SPEC as a spec. A capital S is actually used here. + %E process ENDFILE_SPEC as a spec. A capital E is actually used here. + %C process CPP_SPEC as a spec. +@@ -1500,10 +1503,10 @@ static const char *gcc_libexec_prefix; + gcc_exec_prefix is set because, in that case, we know where the + compiler has been installed, and use paths relative to that + location instead. */ +-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; +-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; +-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; +-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; ++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; ++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; ++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; + + /* For native compilers, these are well-known paths containing + components that may be provided by the system. For cross +@@ -1511,9 +1514,9 @@ static const char *const standard_startf + static const char *md_exec_prefix = MD_EXEC_PREFIX; + static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; + static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_1 ++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_1; +-static const char *const standard_startfile_prefix_2 ++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) + = STANDARD_STARTFILE_PREFIX_2; + + /* A relative path to be used in finding the location of tools +@@ -5922,6 +5925,11 @@ do_spec_1 (const char *spec, int inswitc + } + break; + ++ case 'r': ++ obstack_grow (&obstack, target_relocatable_prefix, ++ strlen (target_relocatable_prefix)); ++ break; ++ + case 'S': + value = do_spec_1 (startfile_spec, 0, NULL); + if (value != 0) +Index: gcc-9.2.0/gcc/c-family/c-opts.c +=================================================================== +--- gcc-9.2.0.orig/gcc/c-family/c-opts.c ++++ gcc-9.2.0/gcc/c-family/c-opts.c +@@ -1382,8 +1382,8 @@ add_prefixed_path (const char *suffix, i + size_t prefix_len, suffix_len; + + suffix_len = strlen (suffix); +- prefix = iprefix ? iprefix : cpp_GCC_INCLUDE_DIR; +- prefix_len = iprefix ? strlen (iprefix) : cpp_GCC_INCLUDE_DIR_len; ++ prefix = iprefix ? iprefix : GCC_INCLUDE_DIRVAR; ++ prefix_len = iprefix ? strlen (iprefix) : strlen(GCC_INCLUDE_DIRVAR) - 7; + + path = (char *) xmalloc (prefix_len + suffix_len + 1); + memcpy (path, prefix, prefix_len); +Index: gcc-9.2.0/gcc/incpath.c +=================================================================== +--- gcc-9.2.0.orig/gcc/incpath.c ++++ gcc-9.2.0/gcc/incpath.c +@@ -131,7 +131,7 @@ add_standard_paths (const char *sysroot, + int relocated = cpp_relocated (); + size_t len; + +- if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) ++ if (iprefix && (len = strlen(GCC_INCLUDE_DIRVAR) - 7) != 0) + { + /* Look for directories that start with the standard prefix. + "Translate" them, i.e. replace /usr/local/lib/gcc... with +@@ -145,7 +145,7 @@ add_standard_paths (const char *sysroot, + now. */ + if (sysroot && p->add_sysroot) + continue; +- if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) ++ if (!filename_ncmp (p->fname, GCC_INCLUDE_DIRVAR, len)) + { + char *str = concat (iprefix, p->fname + len, NULL); + if (p->multilib == 1 && imultilib) +@@ -185,7 +185,7 @@ add_standard_paths (const char *sysroot, + free (sysroot_no_trailing_dir_separator); + } + else if (!p->add_sysroot && relocated +- && !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len)) ++ && !filename_ncmp (p->fname, PREFIXVAR, strlen(PREFIXVAR))) + { + static const char *relocated_prefix; + char *ostr; +@@ -202,12 +202,12 @@ add_standard_paths (const char *sysroot, + dummy = concat (gcc_exec_prefix, "dummy", NULL); + relocated_prefix + = make_relative_prefix (dummy, +- cpp_EXEC_PREFIX, +- cpp_PREFIX); ++ EXEC_PREFIXVAR, ++ PREFIXVAR); + free (dummy); + } + ostr = concat (relocated_prefix, +- p->fname + cpp_PREFIX_len, ++ p->fname + strlen(PREFIXVAR), + NULL); + str = update_path (ostr, p->component); + free (ostr); +Index: gcc-9.2.0/gcc/prefix.c +=================================================================== +--- gcc-9.2.0.orig/gcc/prefix.c ++++ gcc-9.2.0/gcc/prefix.c +@@ -72,7 +72,9 @@ License along with GCC; see the file COP + #include "prefix.h" + #include "common/common-target.h" + +-static const char *std_prefix = PREFIX; ++static const char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX; ++ ++static const char *std_prefix = PREFIXVAR; + + static const char *get_key_value (char *); + static char *translate_name (char *); +@@ -212,7 +214,7 @@ translate_name (char *name) + prefix = getenv (key); + + if (prefix == 0) +- prefix = PREFIX; ++ prefix = PREFIXVAR; + + /* We used to strip trailing DIR_SEPARATORs here, but that can + sometimes yield a result with no separator when one was coded diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file mode 100644 index 00000000..fde206eb --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0026-Search-target-sysroot-gcc-version-specific-dirs-with.patch @@ -0,0 +1,102 @@ +From dab4db14e319f3239a2b4c7d1fbf2971936e27ba Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:41:45 +0000 +Subject: [PATCH 26/36] Search target sysroot gcc version specific dirs with + multilib. + +We install the gcc libraries (such as crtbegin.p) into +//5.2.0/ +which is a default search path for GCC (aka multi_suffix in the +code below). is 'machine' in gcc's terminology. We use +these directories so that multiple gcc versions could in theory +co-exist on target. + +We only want to build one gcc-cross-canadian per arch and have this work +for all multilibs. can be handled by mapping the multilib + to the one used by gcc-cross-canadian, e.g. +mips64-polkmllib32-linux +is symlinked to by mips64-poky-linux. + +The default gcc search path in the target sysroot for a "lib64" mutlilib +is: + +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +which means that the lib32 crtbegin.o will be found and the lib64 ones +will not which leads to compiler failures. + +This patch injects a multilib version of that path first so the lib64 +binaries can be found first. With this change the search path becomes: + +/lib32/../lib64/mips64-poky-linux/5.2.0/ +/lib32/mips64-poky-linux/5.2.0/ +/lib32/../lib64/ +/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ +/usr/lib32/mips64-poky-linux/5.2.0/ +/usr/lib32/../lib64/ +/lib32/ +/usr/lib32/ + +Upstream-Status: Pending +RP 2015/7/31 + +Signed-off-by: Khem Raj +--- + gcc/gcc.c | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index db0e2934038..1c21d1b08eb 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -2610,7 +2610,7 @@ for_each_path (const struct path_prefix *paths, + if (path == NULL) + { + len = paths->max_len + extra_space + 1; +- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); + path = XNEWVEC (char, len); + } + +@@ -2622,6 +2622,33 @@ for_each_path (const struct path_prefix *paths, + /* Look first in MACHINE/VERSION subdirectory. */ + if (!skip_multi_dir) + { ++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) ++ { ++ const char *this_multi; ++ size_t this_multi_len; ++ ++ if (pl->os_multilib) ++ { ++ this_multi = multi_os_dir; ++ this_multi_len = multi_os_dir_len; ++ } ++ else ++ { ++ this_multi = multi_dir; ++ this_multi_len = multi_dir_len; ++ } ++ ++ /* Look in multilib MACHINE/VERSION subdirectory first */ ++ if (this_multi_len) ++ { ++ memcpy (path + len, this_multi, this_multi_len + 1); ++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); ++ ret = callback (path, callback_info); ++ if (ret) ++ break; ++ } ++ } ++ + memcpy (path + len, multi_suffix, suffix_len + 1); + ret = callback (path, callback_info); + if (ret) +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch new file mode 100644 index 00000000..5d89e8e7 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0027-Fix-various-_FOR_BUILD-and-related-variables.patch @@ -0,0 +1,137 @@ +From 8e84bb09d2b7a60487a30e438bb109f31c2c254b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 7 Dec 2015 23:42:45 +0000 +Subject: [PATCH 27/36] Fix various _FOR_BUILD and related variables + +When doing a FOR_BUILD thing, you have to override CFLAGS with +CFLAGS_FOR_BUILD. And if you use C++, you also have to override +CXXFLAGS with CXXFLAGS_FOR_BUILD. +Without this, when building for mingw, you end up trying to use +the mingw headers for a host build. + +The same goes for other variables as well, such as CPPFLAGS, +CPP, and GMPINC. + +Upstream-Status: Pending + +Signed-off-by: Peter Seebach +Signed-off-by: Mark Hatle +Signed-off-by: Khem Raj +--- + Makefile.in | 6 ++++++ + Makefile.tpl | 5 +++++ + gcc/Makefile.in | 2 +- + gcc/configure | 2 +- + gcc/configure.ac | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 255822e3f27..9dc0dff0474 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -152,6 +152,7 @@ BUILD_EXPORTS = \ + CPP="$(CC_FOR_BUILD) -E"; export CPP; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -171,6 +172,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -188,6 +192,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +@@ -775,6 +780,7 @@ BASE_FLAGS_TO_PASS = \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ ++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ + "INSTALL=$(INSTALL)" \ +diff --git a/Makefile.tpl b/Makefile.tpl +index 41cae58a267..d3f6b79acdc 100644 +--- a/Makefile.tpl ++++ b/Makefile.tpl +@@ -154,6 +154,7 @@ BUILD_EXPORTS = \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ +@@ -173,6 +174,9 @@ BUILD_EXPORTS = \ + # built for the build system to override those in BASE_FLAGS_TO_PASS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ ++ CPP="$(CC_FOR_BUILD) -E" \ ++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. +@@ -190,6 +194,7 @@ HOST_SUBDIR = @host_subdir@ + HOST_EXPORTS = \ + $(BASE_EXPORTS) \ + CC="$(CC)"; export CC; \ ++ CPP="$(CC) -E"; export CPP; \ + ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 21472745c2c..8c93f03ffdc 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -805,7 +805,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@ + BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG) + BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ +- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) ++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD) + + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') +diff --git a/gcc/configure b/gcc/configure +index 911de2cf017..325ace34cdf 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -11965,7 +11965,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +diff --git a/gcc/configure.ac b/gcc/configure.ac +index b413ae9bf25..72a6c95121b 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -1743,7 +1743,7 @@ else + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch new file mode 100644 index 00000000..84d92a33 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0028-nios2-Define-MUSL_DYNAMIC_LINKER.patch @@ -0,0 +1,28 @@ +From 5647f773e28b528a67800ef06ca44730f9f5dc7e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Feb 2016 10:26:10 -0800 +Subject: [PATCH 28/36] nios2: Define MUSL_DYNAMIC_LINKER + +Upstream-Status: Pending + +Signed-off-by: Marek Vasut +Signed-off-by: Khem Raj +--- + gcc/config/nios2/linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h +index 698734add35..eeee60ecfea 100644 +--- a/gcc/config/nios2/linux.h ++++ b/gcc/config/nios2/linux.h +@@ -30,6 +30,7 @@ + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" + + #undef LINK_SPEC + #define LINK_SPEC LINK_SPEC_ENDIAN \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch new file mode 100644 index 00000000..d19e5a08 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0029-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch @@ -0,0 +1,87 @@ +From 474043ca7a064ca7b0a32308a0ed6f7c546f17b2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 27 Jun 2017 18:10:54 -0700 +Subject: [PATCH 29/36] Add ssp_nonshared to link commandline for musl targets + +when -fstack-protector options are enabled we need to +link with ssp_shared on musl since it does not provide +the __stack_chk_fail_local() so essentially it provides +libssp but not libssp_nonshared something like +TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED + where-as for glibc the needed symbols +are already present in libc_nonshared library therefore +we do not need any library helper on glibc based systems +but musl needs the libssp_noshared from gcc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/linux.h | 7 +++++++ + gcc/config/rs6000/linux.h | 10 ++++++++++ + gcc/config/rs6000/linux64.h | 10 ++++++++++ + 3 files changed, 27 insertions(+) + +diff --git a/gcc/config/linux.h b/gcc/config/linux.h +index 4b05d8e93d1..0ca117e2ed4 100644 +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -195,6 +195,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ + { 0, 0, 0, 0, 0, 0 } \ + } ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++ + #endif + + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ +diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h +index ffceb32bf65..c82cb2ad05b 100644 +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -94,6 +94,16 @@ + " -m elf32ppclinux") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #undef LINK_OS_LINUX_SPEC + #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ + %{!static-pie: \ +diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h +index 45a9a7cae59..d1e88a40e82 100644 +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -456,6 +456,16 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + ++/* link libssp_nonshared.a with musl */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#ifdef TARGET_LIBC_PROVIDES_SSP ++#undef LINK_SSP_SPEC ++#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" ++#endif ++#endif ++ + #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch new file mode 100644 index 00000000..38eab5a0 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0030-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch @@ -0,0 +1,79 @@ +From 47467f3ab0fb2f2fcede81060fe8bb339d0909eb Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Wed, 28 Feb 2018 00:54:05 +0000 +Subject: [PATCH 10/12] ldbl128 config + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/configure | 13 +++++++++++++ + gcc/configure.ac | 16 ++++++++++++++-- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 6121e163259..07ff8597d48 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29309,6 +29309,15 @@ if test "${with_long_double_128+set}" = set; then : + withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" + else + ++ case "$target" in ++ s390*-*-linux-musl*) ++ gcc_cv_target_ldbl128=yes ++ ;; ++ powerpc*-*-linux-musl*) ++ gcc_cv_target_ldbl128=no ++ ;; ++ *) ++ + if test $glibc_version_major -gt 2 \ + || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then : + gcc_cv_target_ldbl128=yes +@@ -29320,6 +29329,10 @@ else + && gcc_cv_target_ldbl128=yes + + fi ++ ++ ;; ++ esac ++ + fi + + ;; +diff --git a/gcc/configure.ac b/gcc/configure.ac +index b066cc609e1..6c15ed898c0 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5971,13 +5971,25 @@ case "$target" in + AC_ARG_WITH(long-double-128, + [AS_HELP_STRING([--with-long-double-128], + [use 128-bit long double by default])], +- gcc_cv_target_ldbl128="$with_long_double_128", ++ gcc_cv_target_ldbl128="$with_long_double_128", [ ++ case "$target" in ++ s390*-*-linux-musl*) ++ gcc_cv_target_ldbl128=yes ++ ;; ++ powerpc*-*-linux-musl*) ++ gcc_cv_target_ldbl128=no ++ ;; ++ *)] + [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [ + [gcc_cv_target_ldbl128=no + grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ + $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \ + && gcc_cv_target_ldbl128=yes +- ]])]) ++ ]])] ++ [ ++ ;; ++ esac ++ ]) + ;; + esac + if test x$gcc_cv_target_ldbl128 = xyes; then +-- +2.17.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch new file mode 100644 index 00000000..dc2141d7 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0031-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch @@ -0,0 +1,29 @@ +From 266dcc78e4d9d38de2809118977d97dc9270cf1f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 4 May 2016 21:11:34 -0700 +Subject: [PATCH 31/36] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson +Signed-off-by: Khem Raj +--- + libgcc/config/t-slibgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +index 099bf23e62f..436b277a79f 100644 +--- a/libgcc/config/t-slibgcc ++++ b/libgcc/config/t-slibgcc +@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ +- $(SHLIB_LDFLAGS) \ ++ $(LDFLAGS) $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ + $(SHLIB_OBJS) $(SHLIB_LC) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch new file mode 100644 index 00000000..8dde016c --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch @@ -0,0 +1,86 @@ +From 9975b6ed3570bbf7c7d2d82f4d5f733d24ccacf5 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 24 Oct 2015 20:09:53 +0000 +Subject: [PATCH 32/36] libgcc_s: Use alias for __cpu_indicator_init instead of + symver + +Adapter from + +https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html + +This fix was debated but hasnt been applied gcc upstream since +they expect musl to support '@' in symbol versioning which is +a sun/gnu versioning extention. This patch however avoids the +need for the '@' symbols at all + +libgcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add. + (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove. + + * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER. + +gcc/Changelog: + +2015-05-11 Szabolcs Nagy + + * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init + call __cpu_indicator_init_local instead of __cpu_indicator_init. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/config/i386/i386.c | 4 ++-- + libgcc/config/i386/cpuinfo.c | 6 +++--- + libgcc/config/i386/t-linux | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 2b37296e537..dd380ddba88 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -36658,10 +36658,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, + { + case IX86_BUILTIN_CPU_INIT: + { +- /* Make it call __cpu_indicator_init in libgcc. */ ++ /* Make it call __cpu_indicator_init_local in libgcc.a. */ + tree call_expr, fndecl, type; + type = build_function_type_list (integer_type_node, NULL_TREE); +- fndecl = build_fn_decl ("__cpu_indicator_init", type); ++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); + call_expr = build_call_expr (fndecl, 0); + return expand_expr (call_expr, target, mode, EXPAND_NORMAL); + } +diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c +index d6cb2de6265..ce04ef78205 100644 +--- a/libgcc/config/i386/cpuinfo.c ++++ b/libgcc/config/i386/cpuinfo.c +@@ -504,7 +504,7 @@ __cpu_indicator_init (void) + return 0; + } + +-#if defined SHARED && defined USE_ELF_SYMVER +-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); +-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); ++#ifndef SHARED ++int __cpu_indicator_init_local (void) ++ __attribute__ ((weak, alias ("__cpu_indicator_init"))); + #endif +diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux +index 8506a635790..564296f788e 100644 +--- a/libgcc/config/i386/t-linux ++++ b/libgcc/config/i386/t-linux +@@ -3,5 +3,5 @@ + # t-slibgcc-elf-ver and t-linux + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS) ++HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) + CRTSTUFF_T_CFLAGS += $(CET_FLAGS) +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0033-sync-gcc-stddef.h-with-musl.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0033-sync-gcc-stddef.h-with-musl.patch new file mode 100644 index 00000000..b99ac429 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0033-sync-gcc-stddef.h-with-musl.patch @@ -0,0 +1,91 @@ +From 39e2f61d262f9f6c7a91068998dea80791ef665e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 3 Feb 2017 12:56:00 -0800 +Subject: [PATCH 33/36] sync gcc stddef.h with musl + +musl defines ptrdiff_t size_t and wchar_t +so dont define them here if musl is definining them + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gcc/ginclude/stddef.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h +index da692e1c01a..9a00c261adb 100644 +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -128,6 +128,7 @@ _TYPE_wchar_t; + #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T + #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ ++#ifndef __DEFINED_ptrdiff_t /* musl */ + #define _PTRDIFF_T + #define _T_PTRDIFF_ + #define _T_PTRDIFF +@@ -137,10 +138,12 @@ _TYPE_wchar_t; + #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T + #define _PTRDIFF_T_DECLARED ++#define __DEFINED_ptrdiff_t /* musl */ + #ifndef __PTRDIFF_TYPE__ + #define __PTRDIFF_TYPE__ long int + #endif + typedef __PTRDIFF_TYPE__ ptrdiff_t; ++#endif /* __DEFINED_ptrdiff_t */ + #endif /* _PTRDIFF_T_DECLARED */ + #endif /* _GCC_PTRDIFF_T */ + #endif /* ___int_ptrdiff_t_h */ +@@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if defined (__FreeBSD__) \ + || defined(__DragonFly__) \ + || defined(__FreeBSD_kernel__) \ +@@ -228,6 +233,7 @@ typedef long ssize_t; + #endif /* _SIZE_T */ + #endif /* __SIZE_T__ */ + #endif /* __size_t__ */ ++#endif /* __DEFINED_size_t */ + #undef __need_size_t + #endif /* _STDDEF_H or __need_size_t. */ + +@@ -257,6 +263,7 @@ typedef long ssize_t; + #ifndef ___int_wchar_t_h + #ifndef __INT_WCHAR_T_H + #ifndef _GCC_WCHAR_T ++#ifndef __DEFINED_wchar_t /* musl */ + #define __wchar_t__ /* BeOS */ + #define __WCHAR_T__ /* Cray Unicos/Mk */ + #define _WCHAR_T +@@ -272,6 +279,7 @@ typedef long ssize_t; + #define __INT_WCHAR_T_H + #define _GCC_WCHAR_T + #define _WCHAR_T_DECLARED ++#define __DEFINED_wchar_t /* musl */ + + /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ + instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other +@@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t; + #endif + #endif /* __WCHAR_T__ */ + #endif /* __wchar_t__ */ ++#endif /* __DEFINED_wchar_t musl */ + #undef __need_wchar_t + #endif /* _STDDEF_H or __need_wchar_t. */ + +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch new file mode 100644 index 00000000..06a3c9f8 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0034-fix-segmentation-fault-in-precompiled-header-generat.patch @@ -0,0 +1,60 @@ +From aaa896a57b0004a74c1d474e74b21f41147a65cb Mon Sep 17 00:00:00 2001 +From: Juro Bystricky +Date: Mon, 19 Mar 2018 22:31:20 -0700 +Subject: [PATCH 34/36] fix segmentation fault in precompiled header generation + +Prevent a segmentation fault which occurs when using incorrect +structure trying to access name of some named operators, such as +CPP_NOT, CPP_AND etc. "token->val.node.spelling" cannot be used in +those cases, as is may not be initialized at all. + +[YOCTO #11738] + +Upstream-Status: Pending + +Signed-off-by: Juro Bystricky +Signed-off-by: Khem Raj +--- + libcpp/lex.c | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index eedfcbb3146..15040a1b1f0 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -3280,11 +3280,27 @@ cpp_spell_token (cpp_reader *pfile, const cpp_token *token, + spell_ident: + case SPELL_IDENT: + if (forstring) +- { +- memcpy (buffer, NODE_NAME (token->val.node.spelling), +- NODE_LEN (token->val.node.spelling)); +- buffer += NODE_LEN (token->val.node.spelling); +- } ++ { ++ if (token->type == CPP_NAME) ++ { ++ memcpy (buffer, NODE_NAME (token->val.node.spelling), ++ NODE_LEN (token->val.node.spelling)); ++ buffer += NODE_LEN (token->val.node.spelling); ++ break; ++ } ++ /* NAMED_OP, cannot use node.spelling */ ++ if (token->flags & NAMED_OP) ++ { ++ const char *str = cpp_named_operator2name (token->type); ++ if (str) ++ { ++ size_t len = strlen(str); ++ memcpy(buffer, str, len); ++ buffer += len; ++ } ++ break; ++ } ++ } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0035-Fix-for-testsuite-failure.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0035-Fix-for-testsuite-failure.patch new file mode 100644 index 00000000..7470cbfc --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0035-Fix-for-testsuite-failure.patch @@ -0,0 +1,258 @@ +From 0f9d449c739df03782ce9d29f6b68d9af976a607 Mon Sep 17 00:00:00 2001 +From: RAGHUNATH LOLUR +Date: Wed, 6 Dec 2017 22:52:26 -0800 +Subject: [PATCH 35/36] Fix for testsuite failure + +2017-11-16 Raghunath Lolur + + * gcc.dg/pr56275.c: If SSE is disabled, ensure that + "-mfpmath" is not set to use SSE. Set "-mfpmath=387". + * gcc.dg/pr68306.c: Likewise + * gcc.dg/pr68306-2.c: Likewise + * gcc.dg/pr68306-3.c: Likewise + * gcc.dg/pr69634.c: Likewise + * gcc.target/i386/amd64-abi-1.c: Likewise + * gcc.target/i386/funcspec-6.c: Likewise + * gcc.target/i386/interrupt-387-err-1.c: Likewise + * gcc.target/i386/isa-14.c: Likewise + * gcc.target/i386/pr44948-2b.c: Likewise + * gcc.target/i386/pr53425-1.c: Likewise + * gcc.target/i386/pr53425-2.c: Likewise + * gcc.target/i386/pr55247.c: Likewise + * gcc.target/i386/pr59644.c: Likewise + * gcc.target/i386/pr62120.c: Likewise + * gcc.target/i386/pr70467-1.c: Likewise + * gcc.target/i386/warn-vect-op-1.c: Likewise + +If -Wall, -Werror are used during compilation various test cases fail +to compile. + +If SSE is disabled, be sure to -mfpmath=387 to resolve this. + +This patch removes the changes to Changelog from the original patch. +This will help us avoid conflicts. + +Upstream-Status: Pending + +Signed-off-by: Mark Hatle +--- + gcc/testsuite/gcc.dg/pr56275.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-2.c | 2 +- + gcc/testsuite/gcc.dg/pr68306-3.c | 2 +- + gcc/testsuite/gcc.dg/pr68306.c | 2 +- + gcc/testsuite/gcc.dg/pr69634.c | 2 +- + gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +- + gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 + + gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +- + gcc/testsuite/gcc.target/i386/isa-14.c | 2 +- + gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +- + gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +- + gcc/testsuite/gcc.target/i386/pr55247.c | 2 +- + gcc/testsuite/gcc.target/i386/pr59644.c | 2 +- + gcc/testsuite/gcc.target/i386/pr62120.c | 2 +- + gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +- + gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +- + 17 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c +index b901bb2b199..a4f6c95e1a1 100644 +--- a/gcc/testsuite/gcc.dg/pr56275.c ++++ b/gcc/testsuite/gcc.dg/pr56275.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2" } */ +-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */ + + typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long)))); + +diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c +index 4672ebe7987..2a368c484b6 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-2.c ++++ b/gcc/testsuite/gcc.dg/pr68306-2.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + struct { + int tz_minuteswest; +diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c +index f5a8c102cf8..df3390c64c2 100644 +--- a/gcc/testsuite/gcc.dg/pr68306-3.c ++++ b/gcc/testsuite/gcc.dg/pr68306-3.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */ + + extern void fn2(); +diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c +index 54e5b40f221..0813389e2c1 100644 +--- a/gcc/testsuite/gcc.dg/pr68306.c ++++ b/gcc/testsuite/gcc.dg/pr68306.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O3" } */ +-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + + enum powerpc_pmc_type { PPC_PMC_IBM }; + struct { +diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c +index 60a56149463..bcc23f9ccd6 100644 +--- a/gcc/testsuite/gcc.dg/pr69634.c ++++ b/gcc/testsuite/gcc.dg/pr69634.c +@@ -1,6 +1,6 @@ + /* { dg-do compile } */ + /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */ +-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */ ++/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */ + /* { dg-require-effective-target scheduling } */ + + typedef unsigned short u16; +diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +index 69fde57bf06..7f1f1c03edf 100644 +--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c ++++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */ + + double foo(void) { return 0; } /* { dg-error "SSE disabled" } */ +diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c +index ea896b7ebfd..bf15569b826 100644 +--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c ++++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c +@@ -1,6 +1,7 @@ + /* Test whether all of the 64-bit function specific options are accepted + without error. */ + /* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-additional-options "-mfpmath=387" } */ + + #include "funcspec-56.inc" + +diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +index 8561a3c26d6..6377f814645 100644 +--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c ++++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */ ++/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */ + + typedef unsigned int uword_t __attribute__ ((mode (__word__))); + +diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c +index 5d49e6e77fe..1de2db92bdd 100644 +--- a/gcc/testsuite/gcc.target/i386/isa-14.c ++++ b/gcc/testsuite/gcc.target/i386/isa-14.c +@@ -1,5 +1,5 @@ + /* { dg-do run } */ +-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */ ++/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */ + + extern void abort (void); + +diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +index fa1769b62fb..f79fb12726f 100644 +--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c ++++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */ ++/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */ + + struct A + { +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c +index 2e89ff7d81d..6339bf6b736 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef double __v2df __attribute__ ((__vector_size__ (16))); +diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c +index 61f6283dbe9..2c5a55f0ac3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c ++++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c +@@ -1,6 +1,6 @@ + /* PR target/53425 */ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */ + + typedef float __v2sf __attribute__ ((__vector_size__ (8))); +diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c +index 23366d0909d..9810e3abb76 100644 +--- a/gcc/testsuite/gcc.target/i386/pr55247.c ++++ b/gcc/testsuite/gcc.target/i386/pr55247.c +@@ -1,6 +1,6 @@ + /* { dg-do compile { target { ! ia32 } } } */ + /* { dg-require-effective-target maybe_x32 } */ +-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */ ++/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */ + + typedef unsigned int uint32_t; + typedef uint32_t Elf32_Word; +diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c +index 96006b3e338..4287e4538bf 100644 +--- a/gcc/testsuite/gcc.target/i386/pr59644.c ++++ b/gcc/testsuite/gcc.target/i386/pr59644.c +@@ -1,6 +1,6 @@ + /* PR target/59644 */ + /* { dg-do run { target lp64 } } */ +-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */ ++/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */ + + /* This test uses __builtin_trap () instead of e.g. abort, + because due to -mpreferred-stack-boundary=3 it should not call +diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c +index bfb8c4703eb..ed04cf181f3 100644 +--- a/gcc/testsuite/gcc.target/i386/pr62120.c ++++ b/gcc/testsuite/gcc.target/i386/pr62120.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-mno-sse" } */ ++/* { dg-options "-mno-sse -mfpmath=387" } */ + + void foo () + { +diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c +index 4e112c88d07..bcfb396a68d 100644 +--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c ++++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c +@@ -1,6 +1,6 @@ + /* PR rtl-optimization/70467 */ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-sse" } */ ++/* { dg-options "-O2 -mno-sse -mfpmath=387" } */ + + void foo (unsigned long long *); + +diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +index 6cda1534311..26e37f5b8ba 100644 +--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c ++++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-mno-sse -Wvector-operation-performance" } */ ++/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */ + #define vector(elcount, type) \ + __attribute__((vector_size((elcount)*sizeof(type)))) type + +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0036-Re-introduce-spe-commandline-options.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0036-Re-introduce-spe-commandline-options.patch new file mode 100644 index 00000000..4dbcd989 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0036-Re-introduce-spe-commandline-options.patch @@ -0,0 +1,41 @@ +From 71e99c2b58a9eb00cdd65a04aeb6fb78227e3297 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 6 Jun 2018 12:10:22 -0700 +Subject: [PATCH 36/36] Re-introduce spe commandline options + +This should ensure that we keep accepting +spe options + +Upstream-Status: Inappropriate [SPE port is removed from rs600 port] + +Signed-off-by: Khem Raj +--- + gcc/config/rs6000/rs6000.opt | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt +index f4b5c91e11f..69869350fce 100644 +--- a/gcc/config/rs6000/rs6000.opt ++++ b/gcc/config/rs6000/rs6000.opt +@@ -345,6 +345,18 @@ mdebug= + Target RejectNegative Joined + -mdebug= Enable debug output. + ++mspe ++Target Var(rs6000_spe) Save ++Generate SPE SIMD instructions on E500. ++ ++mabi=spe ++Target RejectNegative Var(rs6000_spe_abi) Save ++Use the SPE ABI extensions. ++ ++mabi=no-spe ++Target RejectNegative Var(rs6000_spe_abi, 0) ++Do not use the SPE ABI extensions. ++ + mabi=altivec + Target RejectNegative Var(rs6000_altivec_abi) Save + Use the AltiVec ABI extensions. +-- +2.22.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch new file mode 100644 index 00000000..abe074c2 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-9.2/0037-Fix-up-libsanitizer-build-with-master-glibc.patch @@ -0,0 +1,70 @@ +From 7ed24d12664319f34625a12fd8c0f729a0e71f5c Mon Sep 17 00:00:00 2001 +From: Auto Builder +Date: Sun, 22 Dec 2019 02:58:24 +0000 +Subject: [PATCH] Fix up libsanitizer build with master glibc + +2019-11-26 Jakub Jelinek + + PR sanitizer/92154 + * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick + llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce. + * sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise. + +Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b02486e0951bc0ed38310a03be73e479fc6f3e7a;hp=3feeac76ffc38427de2d7d086e2928e63eee2d44] +Signed-off-by: Auto Builder +--- + .../sanitizer_platform_limits_posix.cc | 5 +++-- + .../sanitizer_platform_limits_posix.h | 15 +-------------- + 2 files changed, 4 insertions(+), 16 deletions(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 6cd4a5bac..d823a1219 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1156,8 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 73af92af1..6a673a7c9 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,26 +211,13 @@ namespace __sanitizer { + u64 __unused1; + u64 __unused2; + #elif defined(__sparc__) +-#if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-#else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-#endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) +-- +2.17.1 + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc new file mode 100644 index 00000000..55997439 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-arm-common.inc @@ -0,0 +1,27 @@ +# gcc-target.inc in OE-Core has these 2 lines in do_install(): +# +# | # Add unwind.h, it comes from libgcc which we don't want to build again +# | install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ +# +# When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb +# And while it stages the necessary unwind.h file, it ends up in slightly +# different location. While this is a kludge, be very conservative - only +# copy the file for target build in recipe-specific sysroot, in external-arm +# toolchain mode and if the required file does not exist already. + +do_install_prepend_class-target () { + if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then + install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ + install ${STAGING_LIBDIR}/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/ + fi +} + +# When TCMODE="external-arm" and TARGET_SYS is different from EAT_TARGET_SYS, +# gcc installs additional aliases as ${TARGET_SYS}-${EAT_TARGET_SYS}-gcc, etc. +# Since those are not packaged and not too useful, let's remove them to avoid +# QA issues +do_install_append () { + for f in g++ gcc gcc-ar gcc-ranlib gcc-nm; do + rm -f ${D}${bindir}/${TARGET_SYS}-${EAT_TARGET_SYS}-$f + done +} diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.2.bb new file mode 100644 index 00000000..8987a4c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.2.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross-canadian.inc + + + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.3.bb new file mode 100644 index 00000000..8987a4c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-8.3.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross-canadian.inc + + + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-9.2.bb new file mode 100644 index 00000000..8987a4c1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross-canadian_arm-9.2.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross-canadian.inc + + + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.2.bb new file mode 100644 index 00000000..0a8aa75b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.2.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross.inc + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.3.bb new file mode 100644 index 00000000..0a8aa75b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-8.3.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross.inc + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-9.2.bb new file mode 100644 index 00000000..0a8aa75b --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-cross_arm-9.2.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-cross.inc + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.2.bb new file mode 100644 index 00000000..0a9f98a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-cross_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.3.bb new file mode 100644 index 00000000..0a9f98a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-8.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-cross_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-9.2.bb new file mode 100644 index 00000000..0a9f98a1 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-crosssdk_arm-9.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-cross_${PV}.bb +require recipes-devtools/gcc/gcc-crosssdk.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.2.bb new file mode 100644 index 00000000..8f41c112 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.2.bb @@ -0,0 +1,7 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-runtime.inc + +FILES_libgomp-dev += "\ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ +" + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.3.bb new file mode 100644 index 00000000..8f41c112 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-8.3.bb @@ -0,0 +1,7 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-runtime.inc + +FILES_libgomp-dev += "\ + ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \ +" + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-9.2.bb new file mode 100644 index 00000000..b755f555 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-runtime_arm-9.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-runtime.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.2.bb new file mode 100644 index 00000000..03769bfd --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-sanitizers.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.3.bb new file mode 100644 index 00000000..03769bfd --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-8.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-sanitizers.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-9.2.bb new file mode 100644 index 00000000..9c41e926 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-sanitizers_arm-9.2.bb @@ -0,0 +1,7 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-sanitizers.inc + +# Building with thumb enabled on armv4t armv5t fails with +# sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8' +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.2.bb new file mode 100644 index 00000000..b890fa33 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.2.bb @@ -0,0 +1,4 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-source.inc + +EXCLUDE_FROM_WORLD = "1" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.3.bb new file mode 100644 index 00000000..b890fa33 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-8.3.bb @@ -0,0 +1,4 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-source.inc + +EXCLUDE_FROM_WORLD = "1" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-9.2.bb new file mode 100644 index 00000000..b890fa33 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc-source_arm-9.2.bb @@ -0,0 +1,4 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-source.inc + +EXCLUDE_FROM_WORLD = "1" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb new file mode 100644 index 00000000..51a08772 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.2.bb @@ -0,0 +1,15 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-target.inc +require recipes-devtools/gcc/gcc-arm-common.inc + +# Building with thumb enabled on armv4t armv5t fails with +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" + +BBCLASSEXTEND = "nativesdk" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb new file mode 100644 index 00000000..51a08772 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-8.3.bb @@ -0,0 +1,15 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-target.inc +require recipes-devtools/gcc/gcc-arm-common.inc + +# Building with thumb enabled on armv4t armv5t fails with +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" + +BBCLASSEXTEND = "nativesdk" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb new file mode 100644 index 00000000..51a08772 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/gcc_arm-9.2.bb @@ -0,0 +1,15 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/gcc-target.inc +require recipes-devtools/gcc/gcc-arm-common.inc + +# Building with thumb enabled on armv4t armv5t fails with +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs +# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +ARMFPARCHEXT_armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" +ARMFPARCHEXT_armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" + +BBCLASSEXTEND = "nativesdk" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.2.bb new file mode 100644 index 00000000..3e07c719 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc-initial.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.3.bb new file mode 100644 index 00000000..3e07c719 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-8.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc-initial.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-9.2.bb new file mode 100644 index 00000000..32f3dc09 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc-initial_arm-9.2.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc-initial.inc + +# Building with thumb enabled on armv6t fails +ARM_INSTRUCTION_SET_armv6 = "arm" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.2.bb new file mode 100644 index 00000000..340300cd --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.2.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.3.bb new file mode 100644 index 00000000..340300cd --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-8.3.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc.inc diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-9.2.bb new file mode 100644 index 00000000..572bab18 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgcc_arm-9.2.bb @@ -0,0 +1,5 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgcc.inc + +# Building with thumb enabled on armv6t fails +ARM_INSTRUCTION_SET_armv6 = "arm" diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.2.bb new file mode 100644 index 00000000..4e5688e9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.2.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgfortran.inc + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.3.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.3.bb new file mode 100644 index 00000000..4e5688e9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-8.3.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgfortran.inc + diff --git a/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-9.2.bb b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-9.2.bb new file mode 100644 index 00000000..4e5688e9 --- /dev/null +++ b/bsp/meta-arm/meta-arm-toolchain/recipes-devtools/gcc/libgfortran_arm-9.2.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gcc/gcc-${PV}.inc +require recipes-devtools/gcc/libgfortran.inc + diff --git a/bsp/meta-arm/meta-arm/conf/layer.conf b/bsp/meta-arm/meta-arm/conf/layer.conf new file mode 100644 index 00000000..d96e9f1b --- /dev/null +++ b/bsp/meta-arm/meta-arm/conf/layer.conf @@ -0,0 +1,16 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-arm" +BBFILE_PATTERN_meta-arm = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-arm = "6" + +LAYERDEPENDS_meta-arm = " \ + core \ + meta-python \ +" +LAYERSERIES_COMPAT_meta-arm = "warrior zeus dunfell" diff --git a/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc new file mode 100644 index 00000000..fe9a4e09 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc @@ -0,0 +1,169 @@ +DESCRIPTION = "Trusted Firmware-A" +LICENSE = "BSD & Apache-2.0" + +PROVIDES = "virtual/trusted-firmware-a" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy + +COMPATIBLE_MACHINE ?= "invalid" + +# Platform must be set for each machine +TFA_PLATFORM ?= "invalid" + +# Some platforms can have multiple board configurations +# Leave empty for default behavior +TFA_BOARD ?= "" + +# Some platforms use SPD (Secure Payload Dispatcher) services +# Few options are "opteed", "tlkd", "trusty", "tspd"... +# Leave empty to not use SPD +TFA_SPD ?= "" + +# Build for debug (set TFA_DEBUG to 1 to activate) +TFA_DEBUG ?= "0" + +B = "${WORKDIR}/build" + +# mbed TLS support (set TFA_MBEDTLS to 1 to activate) +TFA_MBEDTLS ?= "0" +# sub-directory in which mbedtls will be downloaded +TFA_MBEDTLS_DIR ?= "mbedtls" +# This should be set to MBEDTLS download URL if MBEDTLS is needed +SRC_URI_MBEDTLS ??= "" +# This should be set to MBEDTLS LIC FILES checksum +LIC_FILES_CHKSUM_MBEDTLS ??= "" +# add MBEDTLS to our sources if activated +SRC_URI += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}" +# add mbed TLS chksum +LIC_FILES_CHKSUM += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${LIC_FILES_CHKSUM_MBEDTLS}', '', d)}" +# add mbed TLS to version +SRCREV_FORMAT_append = "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '', d)}" + +# U-boot support (set TFA_UBOOT to 1 to activate) +# When U-Boot support is activated BL33 is activated with u-boot.bin file +TFA_UBOOT ?= "0" + +# What to build +# By default we only build bl1, do_deploy will copy +# everything listed in this variable (by default bl1.bin) +TFA_BUILD_TARGET ?= "bl1" + +# What to install +# do_install and do_deploy will install everything listed in this +# variable. It is set by default to TFA_BUILD_TARGET +TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}" + +# Requires CROSS_COMPILE set by hand as there is no configure script +export CROSS_COMPILE="${TARGET_PREFIX}" + +# 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" + +# No configure +do_configure[noexec] = "1" + +# We need dtc for dtbs compilation +# We need openssl for fiptool +DEPENDS_append = " dtc-native openssl-native" + +# Add platform parameter +EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}" + +# Handle TFA_BOARD parameter +EXTRA_OEMAKE += "${@'TARGET_BOARD=${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}" +BUILD_DIR = "${TFA_PLATFORM}${@'/${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}" + +# Handle TFA_SPD parameter +EXTRA_OEMAKE += "${@'SPD=${TFA_SPD}' if d.getVar('TFA_SPD') else ''}" + +# Handle TFA_DEBUG parameter +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', 'DEBUG=${TFA_DEBUG}', '', d)}" + +# Handle MBEDTLS +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1', 'MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}" + +# Uboot support +DEPENDS += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot', '', d)}" +do_compile[depends] += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot:do_deploy', '', d)}" +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', 'BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}" + +# The following hack is needed to fit properly in yocto build environment +# TFA is forcing the host compiler and its flags in the Makefile using := +# assignment for GCC and CFLAGS. +do_compile() { + cd ${S} + + # These changes are needed to have the fiptool compiling and executing properly + sed -i '/^LDLIBS/ s,$, \-L${RECIPE_SYSROOT_NATIVE}${libdir},' ${S}/tools/fiptool/Makefile + sed -i '/^INCLUDE_PATHS/ s,$, \-I${RECIPE_SYSROOT_NATIVE}${includedir},' ${S}/tools/fiptool/Makefile + export LD_LIBRARY_PATH=${STAGING_DIR_NATIVE}${libdir}:$LD_LIBRARY_PATH + + oe_runmake ${TFA_BUILD_TARGET} +} +do_compile[cleandirs] = "${B}" + +do_install() { + if ${@"true" if d.getVar('TFA_DEBUG') == '1' else "false"}; then + BUILD_PLAT=${B}/${BUILD_DIR}/debug/ + else + BUILD_PLAT=${B}/${BUILD_DIR}/release/ + fi + + install -d -m 755 ${D}/firmware + for atfbin in ${TFA_INSTALL_TARGET}; do + processes="0" + if [ "$atfbin" = "all" ]; then + # Target all is not handled by default + bberror "all as TFA_INSTALL_TARGET is not handled by do_install" + bberror "Please specify valid targets in TFA_INSTALL_TARGET or" + bberror "rewrite or turn off do_install" + exit 1 + fi + + if [ -f $BUILD_PLAT/$atfbin.bin ]; then + echo "Install $atfbin.bin" + install -m 0644 $BUILD_PLAT/$atfbin.bin \ + ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin + ln -sf $atfbin-${TFA_PLATFORM}.bin ${D}/firmware/$atfbin.bin + processes="1" + fi + if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then + echo "Install $atfbin.elf" + install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \ + ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf + ln -sf $atfbin-${TFA_PLATFORM}.elf ${D}/firmware/$atfbin.elf + processes="1" + fi + if [ -f $BUILD_PLAT/$atfbin ]; then + echo "Install $atfbin" + install -m 0644 $BUILD_PLAT/$atfbin \ + ${D}/firmware/$atfbin-${TFA_PLATFORM} + ln -sf $atfbin-${TFA_PLATFORM} ${D}/firmware/$atfbin + processes="1" + fi + + if [ "$atfbin" = "dtbs" ]; then + echo "dtbs install, skipped" + elif [ -f ${B}/tools/$atfbin/$atfbin ]; then + echo "Tools $atfbin install, skipped" + elif [ "$processed" = "0" ]; then + bberror "Unsupported TFA_INSTALL_TARGET target $atfbin" + exit 1 + fi + done +} + +FILES_${PN} = "/firmware" +SYSROOT_DIRS += "/firmware" +# Skip QA check for relocations in .text of elf binaries +INSANE_SKIP_${PN} = "textrel" + +do_deploy() { + cp -rf ${D}/firmware/* ${DEPLOYDIR}/ +} +addtask deploy after do_install diff --git a/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.1.bb b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.1.bb new file mode 100644 index 00000000..4d412027 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.1.bb @@ -0,0 +1,38 @@ +# +# Trusted firmware-A 2.1 +# + +require trusted-firmware-a.inc + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa" + +# Use TF-A for version +SRCREV_FORMAT = "tfa" + +# TF-A v2.1 +SRCREV_tfa = "e1286bdb968ee74fc52f96cf303a4218e1ae2950" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM = "file://license.rst;md5=c709b197e22b81ede21109dbffd5f363" + +SRC_URI[tfa.md5sum] = "75c8f4958fb493d9bd7a8e5a9636ec18" +SRC_URI[tfa.sha256sum] = "7c4c00a4f28d3cfbb235fd1a1fb28c4d2fc1d657c9301686e7d8824ef575d059" + +# +# mbed TLS source +# Those are used in trusted-firmware-a.inc if TFA_MBEDTLS is set to 1 +# + +SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls" + +# mbed TLS v2.16.2 +SRCREV_mbedtls = "d81c11b8ab61fd5b2da8133aa73c5fe33a0633eb" + +LIC_FILES_CHKSUM_MBEDTLS += " \ + file://mbedtls/apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://mbedtls/LICENSE;md5=302d50a6369f5f22efdb674db908167a \ + " + +SRC_URI[mbedtls.md5sum] = "37cdec398ae9ebdd4640df74af893c95" +SRC_URI[mbedtls.sha256sum] = "a6834fcd7b7e64b83dfaaa6ee695198cb5019a929b2806cb0162e049f98206a4" diff --git a/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.2.bb b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.2.bb new file mode 100644 index 00000000..4d5316ea --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.2.bb @@ -0,0 +1,38 @@ +# +# Trusted firmware-A 2.2 +# + +require trusted-firmware-a.inc + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa" + +# Use TF-A for version +SRCREV_FORMAT = "tfa" + +# TF-A v2.2 +SRCREV_tfa = "7192b956bde11652a835eee0724dca0e403fee90" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" + +SRC_URI[tfa.md5sum] = "75c8f4958fb493d9bd7a8e5a9636ec18" +SRC_URI[tfa.sha256sum] = "7c4c00a4f28d3cfbb235fd1a1fb28c4d2fc1d657c9301686e7d8824ef575d059" + +# +# mbed TLS source +# Those are used in trusted-firmware-a.inc if TFA_MBEDTLS is set to 1 +# + +SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls" + +# mbed TLS v2.16.2 +SRCREV_mbedtls = "d81c11b8ab61fd5b2da8133aa73c5fe33a0633eb" + +LIC_FILES_CHKSUM_MBEDTLS += " \ + file://mbedtls/apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://mbedtls/LICENSE;md5=302d50a6369f5f22efdb674db908167a \ + " + +SRC_URI[mbedtls.md5sum] = "37cdec398ae9ebdd4640df74af893c95" +SRC_URI[mbedtls.sha256sum] = "a6834fcd7b7e64b83dfaaa6ee695198cb5019a929b2806cb0162e049f98206a4" diff --git a/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bb b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bb new file mode 100644 index 00000000..bfda87bc --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bb @@ -0,0 +1,38 @@ +# +# Trusted firmware-A 2.3 +# + +require trusted-firmware-a.inc + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa" + +# Use TF-A for version +SRCREV_FORMAT = "tfa" + +# TF-A v2.3 +SRCREV_tfa = "ecd27ad85f1eba29f6bf92c39dc002c85b07dad5" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" + +SRC_URI[tfa.md5sum] = "75c8f4958fb493d9bd7a8e5a9636ec18" +SRC_URI[tfa.sha256sum] = "7c4c00a4f28d3cfbb235fd1a1fb28c4d2fc1d657c9301686e7d8824ef575d059" + +# +# mbed TLS source +# Those are used in trusted-firmware-a.inc if TFA_MBEDTLS is set to 1 +# + +SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls" + +# mbed TLS v2.18.1 +SRCREV_mbedtls = "ca933c7e0c9e84738b168b6b0feb89af4183a60a" + +LIC_FILES_CHKSUM_MBEDTLS += " \ + file://mbedtls/apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://mbedtls/LICENSE;md5=302d50a6369f5f22efdb674db908167a \ + " + +SRC_URI[mbedtls.md5sum] = "37cdec398ae9ebdd4640df74af893c95" +SRC_URI[mbedtls.sha256sum] = "a6834fcd7b7e64b83dfaaa6ee695198cb5019a929b2806cb0162e049f98206a4" diff --git a/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb new file mode 100644 index 00000000..c443ecd6 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb @@ -0,0 +1,31 @@ +# Trusted firmware-A points a commit rather a tag +# +# This is only a base receipt and should be bbextended with suitable SRCREV_tfa +# and SRCREV_MBEDTLS and target TFA_* variables + +# Never select this if another version is available +DEFAULT_PREFERENCE = "-1" + +require trusted-firmware-a.inc + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa" + +# Use TF-A for version +SRCREV_FORMAT = "tfa" + +S = "${WORKDIR}/git" + +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" + +# +# mbed TLS source +# Those are used in trusted-firmware-a.inc if TFA_MBEDTLS is set to 1 +# + +SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls" + +LIC_FILES_CHKSUM_MBEDTLS += " \ + file://mbedtls/apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://mbedtls/LICENSE;md5=302d50a6369f5f22efdb674db908167a \ + " + diff --git a/bsp/meta-arm/meta-arm/recipes-devtools/opencsd/opencsd_git.bb b/bsp/meta-arm/meta-arm/recipes-devtools/opencsd/opencsd_git.bb new file mode 100644 index 00000000..f1d4cac6 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-devtools/opencsd/opencsd_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "OpenCSD - An open source CoreSight(tm) Trace Decode library" +HOMEPAGE = "https://github.com/Linaro/OpenCSD" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ad8cb685eb324d2fa2530b985a43f3e5" + +SRC_URI = "git://github.com/Linaro/OpenCSD;protocol=http;branch=master" +SRCREV = "03c194117971e4ad0598df29395757ced2e6e9bd" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(x86_64.*|aarch64.*)-linux" + +EXTRA_OEMAKE = "ARCH='${TARGET_ARCH}' \ + CROSS_COMPILE='${TARGET_SYS}-' \ + CC='${CC}' \ + CXX='${CXX}' \ + LIB='${AR}' \ + LINKER='${CXX}' \ + LINUX64=1 \ + DEBUG=1 \ + " + +do_compile() { + oe_runmake -C ${S}/decoder/build/linux ${EXTRA_OEMAKE} +} + +do_install() { + oe_runmake -C ${S}/decoder/build/linux PREFIX=${D}/usr install +} + +BBCLASSEXTEND = "native" diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service new file mode 100644 index 00000000..ffb54d39 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client/tee-supplicant.service @@ -0,0 +1,10 @@ +[Unit] +Description=TEE Supplicant + +[Service] +User=root +EnvironmentFile=-/etc/default/tee-supplicant +ExecStart=/usr/sbin/tee-supplicant $OPTARGS + +[Install] +WantedBy=basic.target diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client_git.bb b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client_git.bb new file mode 100644 index 00000000..bae7b20f --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-client_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "OP-TEE Client API" +DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE" +HOMEPAGE = "https://www.op-tee.org/" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" + +PV = "3.8.0+git${SRCPV}" + +require optee.inc + +inherit python3native systemd + +SRCREV = "be4fa2e36f717f03ca46e574aa66f697a897d090" +SRC_URI = " \ + git://github.com/OP-TEE/optee_client.git \ + file://tee-supplicant.service \ +" + +S = "${WORKDIR}/git" + +SYSTEMD_SERVICE_${PN} = "tee-supplicant.service" + +do_install() { + oe_runmake install + + install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant + + install -D -p -m0644 ${S}/out/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 ${D}${includedir} + install -p -m0644 ${S}/out/export/usr/include/*.h ${D}${includedir} + + 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/bsp/meta-arm/meta-arm/recipes-security/optee/optee-examples_git.bb b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-examples_git.bb new file mode 100644 index 00000000..996e2cd5 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-examples_git.bb @@ -0,0 +1,47 @@ +SUMMARY = "OP-TEE examples" +DESCRIPTION = "Open Portable Trusted Execution Environment - Sample Applications" +HOMEPAGE = "https://github.com/linaro-swg/optee_examples" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30" + +PV = "3.8.0+git${SRCPV}" + +DEPENDS = "optee-client optee-os python3-pycryptodomex-native" + +inherit python3native + +require optee.inc + +SRC_URI = "git://github.com/linaro-swg/optee_examples.git" +SRCREV = "559b2141c16bf0f57ccd72f60e4deb84fc2a05b0" + +S = "${WORKDIR}/git" + +OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" + +EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ + OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ + TEEC_EXPORT=${TEEC_EXPORT} \ + HOST_CROSS_COMPILE=${TARGET_PREFIX} \ + TA_CROSS_COMPILE=${TARGET_PREFIX} \ + V=1 \ + " + +do_compile() { + oe_runmake +} + +do_install () { + mkdir -p ${D}${nonarch_base_libdir}/optee_armtz + mkdir -p ${D}${bindir} + install -D -p -m0755 ${S}/out/ca/* ${D}${bindir} + install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz +} + +FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" + +# Imports machine specific configs from staging to build +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch new file mode 100644 index 00000000..17127d0b --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch @@ -0,0 +1,13 @@ +diff --git a/mk/gcc.mk b/mk/gcc.mk +index fc38c4d..77b8d74 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)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ + -print-libgcc-file-name 2> /dev/null) + + # Define these to something to discover accidental use diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb new file mode 100644 index 00000000..dfff6d10 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-os_git.bb @@ -0,0 +1,80 @@ +SUMMARY = "OP-TEE Trusted OS" +DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE" +HOMEPAGE = "https://www.op-tee.org/" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" + +PV = "3.8.0+git${SRCPV}" + +inherit deploy python3native +require optee.inc + +DEPENDS = "python3-pycrypto-native python3-pyelftools-native python3-pycryptodomex-native" + +SRCREV = "023e33656e2c9557ce50ad63a98b2e2c9b51c118" +SRC_URI = " \ + git://github.com/OP-TEE/optee_os.git \ + file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ +" + +S = "${WORKDIR}/git" + +OPTEEMACHINE ?= "${MACHINE}" +OPTEEOUTPUTMACHINE ?= "${MACHINE}" + +OPTEE_ARCH = "null" +OPTEE_ARCH_armv7a = "arm32" +OPTEE_ARCH_aarch64 = "arm64" +OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}" + +EXTRA_OEMAKE = " \ + PLATFORM=${OPTEEMACHINE} \ + CFG_${OPTEE_CORE}_core=y \ + CROSS_COMPILE_core=${HOST_PREFIX} \ + CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \ + NOWERROR=1 \ + V=1 \ + ta-targets=ta_${OPTEE_ARCH} \ + LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \ +" + +CFLAGS[unexport] = "1" +LDFLAGS[unexport] = "1" +CPPFLAGS[unexport] = "1" +AS[unexport] = "1" +LD[unexport] = "1" + +do_configure[noexec] = "1" + +do_compile() { + oe_runmake all CFG_TEE_TA_LOG_LEVEL=0 +} + +do_install() { + #install core in firmware + install -d ${D}${nonarch_base_libdir}/firmware/ + install -m 644 ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ + + #install TA devkit + install -d ${D}${includedir}/optee/export-user_ta/ + for f in ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/export-ta_${OPTEE_ARCH}/* ; do + cp -aR $f ${D}${includedir}/optee/export-user_ta/ + done +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_deploy() { + install -d ${DEPLOYDIR}/optee + install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ +} + +addtask deploy before do_build after do_install + +FILES_${PN} = "${nonarch_base_libdir}/firmware/" +FILES_${PN}-dev = "${includedir}/optee/" + +INSANE_SKIP_${PN}-dev = "staticdev" + +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee-test_git.bb b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-test_git.bb new file mode 100644 index 00000000..ee73a2c6 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee-test_git.bb @@ -0,0 +1,50 @@ +SUMMARY = "OP-TEE sanity testsuite" +DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" +HOMEPAGE = "https://www.op-tee.org/" + +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" + +inherit python3native +require optee.inc + +DEPENDS = "optee-client optee-os python3-pycryptodomex-native" + +PV = "3.8.0+git${SRCPV}" + +SRCREV = "30481e381cb4285706e7516853495a7699c93b2c" +SRC_URI = "git://github.com/OP-TEE/optee_test.git" + +S = "${WORKDIR}/git" + +OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" + +EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ + OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ + TEEC_EXPORT=${TEEC_EXPORT} \ + CROSS_COMPILE_HOST=${TARGET_PREFIX} \ + CROSS_COMPILE_TA=${TARGET_PREFIX} \ + V=1 \ + " + +do_compile() { + # Top level makefile doesn't seem to handle parallel make gracefully + oe_runmake xtest + oe_runmake ta +} + +do_install () { + install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest + + # install path should match the value set in optee-client/tee-supplicant + # default TEEC_LOAD_PATH is /lib + mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ + install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ +} + +FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" + +# Imports machine specific configs from staging to build +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-arm/meta-arm/recipes-security/optee/optee.inc b/bsp/meta-arm/meta-arm/recipes-security/optee/optee.inc new file mode 100644 index 00000000..b3e52713 --- /dev/null +++ b/bsp/meta-arm/meta-arm/recipes-security/optee/optee.inc @@ -0,0 +1,2 @@ +COMPATIBLE_MACHINE ?= "invalid" +# Please add supported machines below or set it in .bbappend or .conf diff --git a/bsp/meta-boundary/classes/image_types_boundary.bbclass b/bsp/meta-boundary/classes/image_types_boundary.bbclass deleted file mode 100644 index 57916bad..00000000 --- a/bsp/meta-boundary/classes/image_types_boundary.bbclass +++ /dev/null @@ -1,117 +0,0 @@ -inherit image_types - -BOOT_START = "4" -BOOT_SIZE = "32" -BOOT_END = "36" -ROOTFS_START = "36" -ROOTFS_SIZE = "700" -ROOTFS_END = "736" -APPFS_START = "740" -APPFS_SIZE = "2856" -APPFS_END = "3596" -SDCARD_SIZE = "3600" -SDCARD = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.sdcard" -IMAGE_BOOTLOADER = "u-boot" - -IMAGE_DEPENDS_boundary = "parted-native:do_populate_sysroot \ - dosfstools-native:do_populate_sysroot \ - mtools-native:do_populate_sysroot \ - virtual/kernel:do_deploy \ - ${@d.getVar('IMAGE_BOOTLOADER', True) and d.getVar('IMAGE_BOOTLOADER', True) + ':do_deploy' or ''}" - -create_blank_sdcard_file () { - # Initialize a sparse file - dd if=/dev/zero of=${SDCARD} bs=1M count=0 seek=${SDCARD_SIZE} - # Create partition table - parted -s ${SDCARD} mklabel msdos -} - -create_and_burn_boot () { - # create boot partition - parted -s ${SDCARD} unit MiB mkpart primary fat32 ${BOOT_START} ${BOOT_END} - - # Create boot partition image - [ -e ${WORKDIR}/boot.img ] && rm ${WORKDIR}/boot.img - dd if=/dev/zero of=${WORKDIR}/boot.img bs=1M count=0 seek=${BOOT_SIZE} - mkfs.vfat -n "BOOT" -S 512 ${WORKDIR}/boot.img - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} - - # Copy boot scripts - for item in ${BOOT_SCRIPTS}; do - src=`echo $item | awk -F':' '{ print $1 }'` - dst=`echo $item | awk -F':' '{ print $2 }'` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$src ::/$dst - ## FIXME in the class code ---------^ - done - - # Copy device tree file - for DTS_FILE in ${KERNEL_DEVICETREE}; do - DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` - if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then - kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" - kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`" - if [ $kernel_bin = $kernel_bin_for_dtb ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb - fi - fi - done - - # Burn Partition - dd if=${WORKDIR}/boot.img of=${SDCARD} conv=notrunc seek=${BOOT_START} bs=1M -} - -create_and_burn_rootfs () { - # Create Partition - parted -s ${SDCARD} unit MiB mkpart primary ${ROOTFS_START} ${ROOTFS_END} - - # Temporarily move the app&boot folders away and leave empty mount point for partition creation - - [ -d ${IMAGE_ROOTFS}/../app ] && rm -rf ${IMAGE_ROOTFS}/../app - mv ${IMAGE_ROOTFS}/app ${IMAGE_ROOTFS}/../ - mkdir ${IMAGE_ROOTFS}/app - [ -d ${IMAGE_ROOTFS}/../boot ] && rm -rf ${IMAGE_ROOTFS}/../boot - mv ${IMAGE_ROOTFS}/boot ${IMAGE_ROOTFS}/../ - mkdir ${IMAGE_ROOTFS}/boot - # Create rootfs image - rootfs=`mktemp` - dd if=/dev/zero of=$rootfs seek=${ROOTFS_SIZE} count=0 bs=1M - mkfs.ext4 -F -i 4096 -L "rootfs" ${rootfs} -d ${IMAGE_ROOTFS} - dd if=${rootfs} of=${SDCARD} conv=notrunc seek=${ROOTFS_START} bs=1M - rm $rootfs - rm -rf ${IMAGE_ROOTFS}/app - mv ${IMAGE_ROOTFS}/../app ${IMAGE_ROOTFS}/app - rm -rf ${IMAGE_ROOTFS}/boot - mv ${IMAGE_ROOTFS}/../boot ${IMAGE_ROOTFS}/boot -} - -create_and_burn_appfs () { - # Create Partition - parted -s ${SDCARD} unit MiB mkpart primary ${APPFS_START} ${APPFS_END} - - # write the application partition - appfs=`mktemp` - dd if=/dev/zero of=$appfs bs=1M count=0 seek=${APPFS_SIZE} - mkfs.ext4 -L "app" -F -i 4096 ${appfs} -d ${IMAGE_ROOTFS}/app - dd if=${appfs} of=${SDCARD} conv=notrunc seek=${APPFS_START} bs=1M - rm $appfs -} - -create_sdcard_symlink() { - SDCARD_LINK=`echo ${IMAGE_NAME} | awk -F "-${MACHINE}" '{ print $1 }'` - [ -e ${DEPLOY_DIR_IMAGE}/${SDCARD_LINK}.sdcard ] && rm ${DEPLOY_DIR_IMAGE}/${SDCARD_LINK}.sdcard - ln -s ${SDCARD} ${DEPLOY_DIR_IMAGE}/${SDCARD_LINK}.sdcard -} - -IMAGE_CMD_boundary () { - if [ -z "${SDCARD_ROOTFS}" ]; then - bberror "SDCARD_ROOTFS is undefined. To use sdcard image from Freescale's BSP it needs to be defined." - exit 1 - fi - - create_blank_sdcard_file - create_and_burn_boot - create_and_burn_rootfs - create_and_burn_appfs - create_sdcard_symlink -} diff --git a/bsp/meta-boundary/conf/distro/boundary-wayland.conf b/bsp/meta-boundary/conf/distro/boundary-wayland.conf deleted file mode 100644 index 0816b144..00000000 --- a/bsp/meta-boundary/conf/distro/boundary-wayland.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Boundary Distro for Wayland. - -require conf/distro/fslc-wayland.conf - -DISTRO = "boundary-wayland" -DISTRO_NAME = "Boundary Wayland" - -# Use fsl version of GStreamer for now as there's no gstreamer-imx for imx8m yet -MACHINE_GSTREAMER_1_0_PLUGIN_mx8mq = "imx-gst1.0-plugin" -PREFERRED_VERSION_gstreamer1.0_mx8mq = "1.14.imx" -PREFERRED_VERSION_gstreamer1.0-plugins-base_mx8mq = "1.14.imx" -PREFERRED_VERSION_gstreamer1.0-plugins-good_mx8mq = "1.14.imx" -PREFERRED_VERSION_gstreamer1.0-plugins-bad_mx8mq = "1.14.imx" - -# Use i.MX libdrm Version -PREFERRED_VERSION_libdrm = "2.4.84.imx" diff --git a/bsp/meta-boundary/conf/layer.conf b/bsp/meta-boundary/conf/layer.conf deleted file mode 100644 index bbedc134..00000000 --- a/bsp/meta-boundary/conf/layer.conf +++ /dev/null @@ -1,22 +0,0 @@ -# We have a conf and classes directory, append to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have a recipes directory, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "boundary-layer" -BBFILE_PATTERN_boundary-layer := "^${LAYERDIR}/" -BBFILE_PRIORITY_boundary-layer = "8" -LAYERSERIES_COMPAT_boundary-layer = "sumo thud" - -LICENSE_PATH += "${LAYERDIR}/licenses" - -# The dynamic-layers directory hosts the extensions and layer specific -# modifications related to Boundary Devices products. -# -# The .bbappend and .bb files are included (only) if the respective layer -# collection is available. -BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" -BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ - for layer in BBFILE_COLLECTIONS.split())}" diff --git a/bsp/meta-boundary/conf/machine/imx6-acl.conf b/bsp/meta-boundary/conf/machine/imx6-acl.conf deleted file mode 100644 index a1a32a3d..00000000 --- a/bsp/meta-boundary/conf/machine/imx6-acl.conf +++ /dev/null @@ -1,52 +0,0 @@ -#@TYPE: Machine -#@NAME: Boundary Devices ACL -#@SOC: i.MX6 Q/DL -#@DESCRIPTION: Machine configuration for Boundary Devices ACL -#@MAINTAINER: Gary Bisson -# -# By default, this machine will build for the standard Solo, 512M -# option. To build U-Boot for other CPU or memory combinations, -# you can set the UBOOT_MACHINE variable in your local.conf -# according to the following table: -# -# Processor Memory Configuration -# -------------- ------ -------------------- -# i.MX6Quad 2GB acl_q2g_defconfig -# i.MX6Solo 512MB acl_s512m_defconfig -# - -MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-cortexa9.inc - -KERNEL_DEVICETREE = "imx6dl-acl.dtb \ - imx6q-acl.dtb \ -" -KERNEL_IMAGETYPE = "zImage" - -PREFERRED_PROVIDER_u-boot = "u-boot-boundary" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-boundary" - -# Use SPI NOR U-Boot by default -IMAGE_BOOTLOADER ?= "" - -IMAGE_FSTYPES = "sdcard.gz" - -# Shorten boot volume ID (FAT limitation) -BOOTDD_VOLUME_ID = "Boot" - -# Ensure boot scripts will be available at rootfs time -do_rootfs[depends] += "u-boot-script-boundary:do_deploy" - -# Boot scripts to install -BOOT_SCRIPTS = "6x_bootscript-${MACHINE}:6x_bootscript" - -UBOOT_MACHINE ?= "acl_512m_defconfig" - -SERIAL_CONSOLE = "115200 ttymxc1" - -MACHINE_EXTRA_RRECOMMENDS += " linux-firmware-gslx680 \ - libiio libiio-iiod libiio-tests \ - libmdi2300 libmdi2300-examples \ - printer-tools kernel-iio " diff --git a/bsp/meta-boundary/conf/machine/nitrogen8mm.conf b/bsp/meta-boundary/conf/machine/nitrogen8mm.conf deleted file mode 100644 index c8003a3d..00000000 --- a/bsp/meta-boundary/conf/machine/nitrogen8mm.conf +++ /dev/null @@ -1,46 +0,0 @@ -#@TYPE: Machine -#@NAME: Boundary Devices Nitrogen8M -#@SOC: i.MX8 MQ -#@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen8M -#@MAINTAINER: Chris Dimich - -MACHINEOVERRIDES =. "mx8:mx8mm:mx8m:mx8mq:" - -require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc - -# Kernel configuration -PREFERRED_PROVIDER_virtual/kernel ??= "linux-boundary" -PREFERRED_VERSION_linux-boundary = "4.14%" -KERNEL_DEVICETREE = "freescale/imx8mq-nitrogen8m.dtb \ - freescale/imx8mq-nitrogen8m-m4.dtb \ - freescale/imx8mm-nitrogen8mm.dtb \ - freescale/imx8mm-nitrogen8mm_som.dtb \ -" -KERNEL_IMAGETYPE = "Image" -KERNEL_DEFCONFIG = "boundary_defconfig" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" - -# U-Boot configuration -PREFERRED_PROVIDER_u-boot ??= "u-boot-boundary" -PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-boundary" -SPL_BINARY = "spl/u-boot-spl.bin" -UBOOT_DTB_NAME ?= "imx8mm-nitrogen8mm.dtb" -UBOOT_MACHINE ?= "nitrogen8mm_2g_defconfig" -UBOOT_MAKE_TARGET = "" -UBOOT_SUFFIX = "bin" - -# wic support -WKS_FILE = "sdimage-bootpart.wks" -IMAGE_BOOT_FILES_append = " \ - boot.scr-${MACHINE};boot.scr \ -" -WKS_FILE_DEPENDS_mx8 += " \ - u-boot-script-boundary \ - e2fsprogs-native \ - bmap-tools-native \ -" - -SERIAL_CONSOLE ?= "115200 ttymxc0" - -MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-boundary/dynamic-layers/qt5-layer/recipes-qtbrowser/qtbrowser-qt5/qtbrowser-qt5_git.bb b/bsp/meta-boundary/dynamic-layers/qt5-layer/recipes-qtbrowser/qtbrowser-qt5/qtbrowser-qt5_git.bb deleted file mode 100644 index 902aa8e8..00000000 --- a/bsp/meta-boundary/dynamic-layers/qt5-layer/recipes-qtbrowser/qtbrowser-qt5/qtbrowser-qt5_git.bb +++ /dev/null @@ -1,24 +0,0 @@ -require recipes-qt/qt5/qt5.inc - -DESCRIPTION = "QT Browser" -PR = "r0" -LICENSE = "CLOSED" - -DEPENDS = "qtbase qtwebkit" - -SRCREV = "57ac373f948498810c3f276fe712e67f5ec0d4aa" -SRC_URI = "git://github.com/boundarydevices/qtbrowser;branch=qt5" - -S = "${WORKDIR}/git" - -PARALLEL_MAKE = "" - - -do_install() { - export INSTALL_ROOT=${D} - make install -} - -FILES_${PN} = " \ - /usr/bin/* \ -" diff --git a/bsp/meta-boundary/dynamic-layers/xfce-layer/recipes-xfce/images/boundary-eval-image-xfce.bb b/bsp/meta-boundary/dynamic-layers/xfce-layer/recipes-xfce/images/boundary-eval-image-xfce.bb deleted file mode 100644 index af83840a..00000000 --- a/bsp/meta-boundary/dynamic-layers/xfce-layer/recipes-xfce/images/boundary-eval-image-xfce.bb +++ /dev/null @@ -1,47 +0,0 @@ -DESCRIPTION = "A XFCE desktop demo image." - -IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs dev-pkgs" - -LICENSE = "MIT" - -inherit core-image distro_features_check - -REQUIRED_DISTRO_FEATURES = "x11" - -CORE_IMAGE_BASE_INSTALL += "\ - packagegroup-core-boot \ - ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ - packagegroup-core-x11 \ - packagegroup-xfce-base \ - kernel-modules \ - \ - nodejs \ - packagegroup-fsl-gstreamer1.0-full \ - \ - flex \ - gcc \ - git \ - m4 \ - make \ - iperf3 \ - libtool \ - nano \ - python-compiler \ - strace \ - screen \ - minicom \ - openssl \ - cryptodev-module \ -" - -# For silex module support uncomment the line below and register your ssh key on our webserver to get access. -# Silex requires some terms and conditions to be accepted before you can build -# Please fill out the form located here for access: https://boundarydevices.com/private-git-access/ -#CORE_IMAGE_BASE_INSTALL += "kernel-module-silex linux-firmware-silex" - -# Video input demos only on nitrogen6x/sx/7 platform -# Chromium not on nitrogen7 -CORE_IMAGE_BASE_INSTALL_append_nitrogen6x += "video-input-icon chromium firefox qt5everywheredemo cinematicexperience" -CORE_IMAGE_BASE_INSTALL_append_nitrogen6x-lite += "chromium firefox" -CORE_IMAGE_BASE_INSTALL_append_nitrogen6sx += "video-input-icon chromium firefox" -CORE_IMAGE_BASE_INSTALL_append_nitrogen7 += "video-input-icon" diff --git a/bsp/meta-boundary/licenses/boundary b/bsp/meta-boundary/licenses/boundary deleted file mode 100644 index 678c7be5..00000000 --- a/bsp/meta-boundary/licenses/boundary +++ /dev/null @@ -1,2 +0,0 @@ -This file is proprietary to Boundary Devices and should not -be shared, except by authorized customers. diff --git a/bsp/meta-boundary/recipes-boundary/app-startup/app-startup.bb b/bsp/meta-boundary/recipes-boundary/app-startup/app-startup.bb deleted file mode 100644 index 1e2e9c8e..00000000 --- a/bsp/meta-boundary/recipes-boundary/app-startup/app-startup.bb +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2014 Boundary Devices - -SUMMARY = "app-startup" -SECTION = "base" -LICENSE = "LGPLv3" -LIC_FILES_CHKSUM = "file://app;beginline=11;endline=11;md5=1c2ccc7e2f30e48720e36f0c0e5d1b79" - -S = "${WORKDIR}" - -SRC_URI = " \ - file://app \ - file://root.profile \ -" - -do_install_append() { - install -d ${D}${sysconfdir}/init.d/ - install -d ${D}/home/root/ - install -m 755 ${S}/app ${D}${sysconfdir}/init.d/ - install ${S}/root.profile ${D}/home/root/.profile - update-rc.d -r ${D} app start 80 5 . -} - -FILES_${PN} += " \ - ${sysconfdir}/init.d/app \ - /home/root/.profile \ -" - diff --git a/bsp/meta-boundary/recipes-boundary/app-startup/files/app b/bsp/meta-boundary/recipes-boundary/app-startup/files/app deleted file mode 100755 index 32f7ae4a..00000000 --- a/bsp/meta-boundary/recipes-boundary/app-startup/files/app +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: app -# Required-Start: wifi -# Required-Stop: wifi -# Default-Start: S -# Default-Stop: -# -# install with update-rc.d app start 80 5 . -# -# SPDX-License-Identifier: LGPL-3.0+ -# -### END INIT INFO - -case "$1" in - start) - echo -n "Starting application" - daemonize /app/run-app - echo "done" - ;; - stop) - echo -n "Stopping application" - /app/stop-app - echo "done" - ;; - restart) - $0 stop - $0 start - ;; - status) - pid=`pidof -x run-app` - if [ -n "$pid" ]; then - echo "run-app (pid $pid) is running ..." - exit 2 - else - echo "run-app is stopped" - fi - ;; - *) - echo "Usage: app { start | stop | restart | status }" >&2 - exit 1 - ;; -esac - -exit 0 - diff --git a/bsp/meta-boundary/recipes-boundary/app-startup/files/root.profile b/bsp/meta-boundary/recipes-boundary/app-startup/files/root.profile deleted file mode 100644 index aaa98dd0..00000000 --- a/bsp/meta-boundary/recipes-boundary/app-startup/files/root.profile +++ /dev/null @@ -1,5 +0,0 @@ -killem() { /etc/init.d/app stop ; } -startem() { /etc/init.d/app start ; } -if [ -e /app/app.profile ]; then - . /app/app.profile -fi diff --git a/bsp/meta-boundary/recipes-boundary/daemonize/daemonize.bb b/bsp/meta-boundary/recipes-boundary/daemonize/daemonize.bb deleted file mode 100644 index 525fc0e6..00000000 --- a/bsp/meta-boundary/recipes-boundary/daemonize/daemonize.bb +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2014 Boundary Devices - -SUMMARY = "Daemonize" -SECTION = "base" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=5003fa041d799dd5dd5f646b74e36924" - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/boundarydevices/daemonize.git;branch=${SRCBRANCH}" -SRCBRANCH = "master" -SRCREV = "9c08934f6cbf3cf4bfbdeb92d411072e5d2f7ad0" - -inherit autotools-brokensep - - diff --git a/bsp/meta-boundary/recipes-boundary/devregs/devregs.bb b/bsp/meta-boundary/recipes-boundary/devregs/devregs.bb deleted file mode 100644 index f964f3c4..00000000 --- a/bsp/meta-boundary/recipes-boundary/devregs/devregs.bb +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2014 Boundary Devices - -SUMMARY = "Devregs" -SECTION = "base" -LICENSE = "GPL" -LIC_FILES_CHKSUM = "file://COPYING;md5=5003fa041d799dd5dd5f646b74e36924" - -S = "${WORKDIR}/git" - -SRC_URI = "git://github.com/boundarydevices/devregs.git;branch=${SRCBRANCH}" -SRCBRANCH = "master" -SRCREV = "8e2537cec400a4cedd1e37a9cc823cea458732e9" - -inherit autotools-brokensep - -do_install_append() { - cp -fv ${S}/dat/devregs_imx* ${D}${sysconfdir}/ -} - -FILES_${PN} += " \ - ${sysconfdir}/devregs_imx*.dat \ -" diff --git a/bsp/meta-boundary/recipes-boundary/images/boundary-image-multimedia-full.bb b/bsp/meta-boundary/recipes-boundary/images/boundary-image-multimedia-full.bb deleted file mode 100644 index 348f6cce..00000000 --- a/bsp/meta-boundary/recipes-boundary/images/boundary-image-multimedia-full.bb +++ /dev/null @@ -1,17 +0,0 @@ -# This image extends fsl-image-multimedia-full with additional -# Boundary Devices packages - -require recipes-fsl/images/fsl-image-multimedia-full.bb - -CORE_IMAGE_EXTRA_INSTALL += " \ - i2c-tools \ - iperf3 \ - imx-gpu-viv-demos \ - kernel-module-qcacld \ - linux-firmware-bdsdmac \ - mmc-utils \ - openssh \ - spitools \ - networkmanager \ - tslib-tests tslib-calibrate \ -" diff --git a/bsp/meta-boundary/recipes-boundary/libmdi2300/libmdi2300_git.bb b/bsp/meta-boundary/recipes-boundary/libmdi2300/libmdi2300_git.bb deleted file mode 100644 index 31b08c04..00000000 --- a/bsp/meta-boundary/recipes-boundary/libmdi2300/libmdi2300_git.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Library for Opticon MDI-2300 Barcode scanner." -HOMEPAGE = "https://github.com/boundarydevices/libmdi2300" -LICENSE = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e8d8feac5daeb0b39a13e1c1535e1f20" -SECTION = "libs" - -SRCREV = "dce5071fc8e1ac1e87cce0920b975a8cf33cdecc" -SRC_URI = "git://github.com/boundarydevices/libmdi2300.git;protocol=git;" - -S = "${WORKDIR}/git/" - -PACKAGES = "${PN} ${PN}-dbg ${PN}-examples" - -EXTRA_OEMAKE = " 'CC=${CC}' " - -do_compile () { - oe_runmake all - oe_runmake examples -} - -do_install () { - oe_runmake install DESTDIR=${D}/usr/ - oe_runmake install_examples DESTDIR=${D}/usr/ -} - -FILES_${PN} += "/usr/lib/ /usr/include" -FILES_${PN}-dbg += "/usr/src/" -FILES_${PN}-examples += "/usr/bin/" - -BBCLASSEXTEND = "native" diff --git a/bsp/meta-boundary/recipes-boundary/printer-tools/printer-tools_git.bb b/bsp/meta-boundary/recipes-boundary/printer-tools/printer-tools_git.bb deleted file mode 100644 index 661a3fe6..00000000 --- a/bsp/meta-boundary/recipes-boundary/printer-tools/printer-tools_git.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Test/Debug tools for thermal printers." -HOMEPAGE = "https://github.com/boundarydevices/printer-tools" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4bc53cea4911b2abe17c307d0f49a5d8" -SECTION = "base" - -SRCREV = "e219aea844d720e7b03da495862cc1586132e7dd" -SRCBRANCH = "ftp628" -SRC_URI = "git://github.com/boundarydevices/printer-tools.git;protocol=git;branch=${SRCBRANCH}" - -S = "${WORKDIR}/git/" - -DEPENDS += " libpng " - -EXTRA_OEMAKE = " 'CC=${CC}' 'CFLAGS=-I${STAGING_INCDIR}' \ - 'LDFLAGS=-L${STAGING_LIBDIR}' " - -do_compile () { - oe_runmake all -} - -do_install () { - oe_runmake install DESTDIR=${D}/usr/ -} - -FILES_${PN} += "/usr/bin" - -INSANE_SKIP_${PN} = "ldflags" - -BBCLASSEXTEND = "native" diff --git a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/COPYING b/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/COPYING deleted file mode 100644 index 6f195d36..00000000 --- a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/COPYING +++ /dev/null @@ -1,282 +0,0 @@ -======================================================================= - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/syslogd b/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/syslogd deleted file mode 100644 index 6fb0b987..00000000 --- a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/files/syslogd +++ /dev/null @@ -1,4 +0,0 @@ -# -# For remote UDP logging use SYSLOGD="-r" -# -SYSLOGD="-r" diff --git a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/sysklogd-config-remote.bb b/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/sysklogd-config-remote.bb deleted file mode 100644 index 67ea6c0e..00000000 --- a/bsp/meta-boundary/recipes-boundary/sysklogd-config-remote/sysklogd-config-remote.bb +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2015 Boundary Devices - -SUMMARY = "sysklogd-config-remote" -SECTION = "base" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=5003fa041d799dd5dd5f646b74e36924" - -S = "${WORKDIR}" - -SRC_URI = " \ - file://syslogd \ - file://COPYING \ -" - -do_install_append() { - install -d ${D}${sysconfdir}/default - install ${S}/syslogd ${D}${sysconfdir}/default/ -} - -FILES_${PN} += " \ - ${sysconfdir}/default/syslogd \ -" - diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/COPYING b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/COPYING deleted file mode 100644 index 90978d50..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/COPYING +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (C) 2015 by Boundary Devices - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5640-MIPI-Test.desktop b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5640-MIPI-Test.desktop deleted file mode 100644 index 677e9bbc..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5640-MIPI-Test.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=OV5640 MIPI Test -Comment=Launches gst-launch to show ov5640-mipi input on screen. -Exec=/usr/bin/ov5640-mipi-test -Icon=video-player -Terminal=true -Type=Application -StartupNotify=true -Categories=GTK;AudioVideo;Audio;Player; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5642.desktop b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5642.desktop deleted file mode 100644 index 947f8b98..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/OV5642.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=OV5642 Test -Comment=Launches gst-launch to show ov5642 input on screen. -Exec=/usr/bin/ov5642-test -Icon=video-player -Terminal=true -Type=Application -StartupNotify=true -Categories=GTK;AudioVideo;Audio;Player; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input deleted file mode 100755 index f1fc27ea..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input +++ /dev/null @@ -1 +0,0 @@ -gst-launch-1.0 imxv4l2videosrc device=/dev/video3 ! autovideosink; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input.desktop b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input.desktop deleted file mode 100644 index 89ed7565..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/hdmi-input.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=HDMI Input Test -Comment=Launches gst-launch to show hdmi input on screen. -Exec=/usr/bin/hdmi-input -Icon=video-player -Terminal=true -Type=Application -StartupNotify=true -Categories=GTK;AudioVideo;Audio;Player; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5640-mipi-test b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5640-mipi-test deleted file mode 100755 index d1358fed..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5640-mipi-test +++ /dev/null @@ -1 +0,0 @@ -gst-launch-1.0 imxv4l2videosrc device=/dev/video1 ! autovideosink; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5642-test b/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5642-test deleted file mode 100755 index f9ce12c1..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/files/ov5642-test +++ /dev/null @@ -1 +0,0 @@ -gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! autovideosink; diff --git a/bsp/meta-boundary/recipes-boundary/video-input-icon/video-input-icon.bb b/bsp/meta-boundary/recipes-boundary/video-input-icon/video-input-icon.bb deleted file mode 100644 index 98fdf136..00000000 --- a/bsp/meta-boundary/recipes-boundary/video-input-icon/video-input-icon.bb +++ /dev/null @@ -1,60 +0,0 @@ -# Simple recipe to add desktop icon and executable to run gstreamer -# command to display video input on screen in media player. - -DESCRIPTION = "Video Input Desktop Icon/Executable" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=b7a244440f5854ed05acee9962562ba4" - -PR = "r0" - -SRC_URI = " \ - file://hdmi-input \ - file://hdmi-input.desktop \ - file://OV5640-MIPI-Test.desktop \ - file://ov5640-mipi-test \ - file://OV5642.desktop \ - file://ov5642-test \ - file://COPYING \ -" - -S = "${WORKDIR}" - -do_install_nitrogen6x() { - mkdir -p ${D}/usr/bin/ - mkdir -p ${D}/usr/share/applications/ - cp ${S}/hdmi-input ${D}/usr/bin/ - cp ${S}/hdmi-input.desktop ${D}/usr/share/applications/ - cp ${S}/ov5640-mipi-test ${D}/usr/bin/ - cp ${S}/OV5640-MIPI-Test.desktop ${D}/usr/share/applications/ - cp ${S}/OV5642.desktop ${D}/usr/share/applications/ - cp ${S}/ov5642-test ${D}/usr/bin/ -} - -do_install_nitrogen6sx() { - mkdir -p ${D}/usr/bin/ - mkdir -p ${D}/usr/share/applications/ - cp ${S}/OV5642.desktop ${D}/usr/share/applications/ - cp ${S}/ov5642-test ${D}/usr/bin/ -} - -do_install_nitrogen7() { - mkdir -p ${D}/usr/bin/ - mkdir -p ${D}/usr/share/applications/ - cp ${S}/ov5640-mipi-test ${D}/usr/bin/ - cp ${S}/OV5640-MIPI-Test.desktop ${D}/usr/share/applications/ -} - -FILES_${PN}_nitrogen6x = " \ - /usr/bin/* \ - /usr/share/applications/* \ -" - -FILES_${PN}_nitrogen6sx = " \ - /usr/bin/ov5642-test \ - /usr/share/applications/OV5642.desktop \ -" - -FILES_${PN}_nitrogen7 = " \ - /usr/bin/ov5640-mipi-test \ - /usr/share/applications/OV5640-MIPI-Test.desktop \ -" diff --git a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state.bbappend b/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state.bbappend deleted file mode 100644 index 39db7823..00000000 --- a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Append path for boundarydevices layer to include alsa-state -# Includes default 75% volume setting -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PACKAGE_ARCH_mx7 = "${MACHINE_ARCH}" -PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}" diff --git a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx6/asound.state b/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx6/asound.state deleted file mode 100644 index 27c7165a..00000000 --- a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx6/asound.state +++ /dev/null @@ -1,1878 +0,0 @@ -state.wm8962audio { - control.1 { - iface MIXER - name 'Input Mixer Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.2 { - iface MIXER - name 'MIXINL IN2L Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.3 { - iface MIXER - name 'MIXINL PGA Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 3000 - dbvalue.0 0 - } - } - control.4 { - iface MIXER - name 'MIXINL IN3L Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.5 { - iface MIXER - name 'MIXINR IN2R Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.6 { - iface MIXER - name 'MIXINR PGA Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 3000 - dbvalue.0 0 - } - } - control.7 { - iface MIXER - name 'MIXINR IN3R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.8 { - iface MIXER - name 'Digital Capture Volume' - value.0 108 - value.1 108 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 2325 - dbvalue.0 900 - dbvalue.1 900 - } - } - control.9 { - iface MIXER - name 'Capture Volume' - value.0 63 - value.1 63 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 63' - dbmin -2325 - dbmax 2400 - dbvalue.0 2400 - dbvalue.1 2400 - } - } - control.10 { - iface MIXER - name 'Capture Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.11 { - iface MIXER - name 'Capture ZC Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.12 { - iface MIXER - name 'Capture HPF Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.13 { - iface MIXER - name 'Capture HPF Mode' - value Hi-fi - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 Hi-fi - item.1 Application - } - } - control.14 { - iface MIXER - name 'Capture HPF Cutoff' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - } - } - control.15 { - iface MIXER - name 'Capture LHPF Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.16 { - iface MIXER - name 'Capture LHPF Mode' - value LPF - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 LPF - item.1 HPF - } - } - control.17 { - iface MIXER - name 'Sidetone Volume' - value.0 0 - value.1 0 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 12' - dbmin -3600 - dbmax 0 - dbvalue.0 -3600 - dbvalue.1 -3600 - } - } - control.18 { - iface MIXER - name 'Digital Playback Volume' - value.0 96 - value.1 96 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 2325 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.19 { - iface MIXER - name 'DAC High Performance Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.20 { - iface MIXER - name 'DAC L/R Swap Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.21 { - iface MIXER - name 'ADC L/R Swap Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.22 { - iface MIXER - name 'ADC High Performance Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.23 { - iface MIXER - name 'Beep Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 15' - dbmin -9999999 - dbmax -600 - dbvalue.0 -9999999 - } - } - control.24 { - iface MIXER - name 'Headphone Volume' - value.0 93 - value.1 93 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 600 - dbvalue.0 -2800 - dbvalue.1 -2800 - } - } - control.25 { - iface MIXER - name 'Headphone Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.26 { - iface MIXER - name 'Headphone ZC Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.27 { - iface MIXER - name 'Headphone Aux Volume' - value.0 7 - value.1 7 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 7' - dbmin -700 - dbmax 0 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.28 { - iface MIXER - name 'Headphone Mixer Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.29 { - iface MIXER - name 'HPMIXL IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.30 { - iface MIXER - name 'HPMIXL IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.31 { - iface MIXER - name 'HPMIXL MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.32 { - iface MIXER - name 'HPMIXL MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.33 { - iface MIXER - name 'HPMIXR IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.34 { - iface MIXER - name 'HPMIXR IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.35 { - iface MIXER - name 'HPMIXR MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.36 { - iface MIXER - name 'HPMIXR MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.37 { - iface MIXER - name 'Speaker Boost Volume' - value 3 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 1200 - dbvalue.0 450 - } - } - control.38 { - iface MIXER - name 'EQ Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.39 { - iface MIXER - name 'EQ1 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.40 { - iface MIXER - name 'EQ2 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.41 { - iface MIXER - name 'EQ3 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.42 { - iface MIXER - name 'EQ4 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.43 { - iface MIXER - name 'EQ5 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.44 { - iface MIXER - name '3D Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.45 { - iface MIXER - name '3D Coefficients' - value '0040000000000000' - comment { - access 'read write' - type BYTES - count 8 - } - } - control.46 { - iface MIXER - name 'DF1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.47 { - iface MIXER - name 'DF1 Coefficients' - value '0000000000000000000000000000' - comment { - access 'read write' - type BYTES - count 14 - } - } - control.48 { - iface MIXER - name 'DRC Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.49 { - iface MIXER - name 'DRC Coefficients' - value '000c0925000000000000' - comment { - access 'read write' - type BYTES - count 10 - } - } - control.50 { - iface MIXER - name 'VSS Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.51 { - iface MIXER - name 'VSS Coefficients' - value '008c020000350700003a4100008b7d00003a4100008cfee800780000003fb260002d18180020000000f1834000fb830000eeaec000fbac4000f17f8000f43b4000f5fb0000ea10c000fcc58000e275c00004b48000d4f9800004914000d8a48000023dc000cf7a8000dc060000f2dac000baf340000a7940001c068000fd2d00001ce840000ddc4000fc9d000009558000fe7e80000eab4000f99880000987c000fd2c400009480000035f400000870000fae4c000000b400004e18000011f4000f8b00000fbcbc00004f3800007df4000ff070000efd70000fbaf4000108a80001107c000e0080000d276000020cf400030234000fd69c0002835000006330000d9f6c000f33340000f420000040c8000fb3f8000f757c0000354000000c6c0000312c000fd8580' - comment { - access 'read write' - type BYTES - count 296 - } - } - control.52 { - iface MIXER - name 'HPF1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.53 { - iface MIXER - name 'HPF2 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.54 { - iface MIXER - name 'HPF Coefficients' - value '0000' - comment { - access 'read write' - type BYTES - count 2 - } - } - control.55 { - iface MIXER - name 'HD Bass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.56 { - iface MIXER - name 'HD Bass Coefficients' - value '0002bd12007c586c00538121003f8bd80032f52d0065ac8c006be08700721483007214830043352500066a4a0043607900080000000100000059999a' - comment { - access 'read write' - type BYTES - count 60 - } - } - control.57 { - iface MIXER - name 'Speaker Volume' - value.0 114 - value.1 114 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 600 - dbvalue.0 -700 - dbvalue.1 -700 - } - } - control.58 { - iface MIXER - name 'Speaker Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.59 { - iface MIXER - name 'Speaker ZC Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.60 { - iface MIXER - name 'Speaker Mixer Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.61 { - iface MIXER - name 'SPKOUTL Mixer IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.62 { - iface MIXER - name 'SPKOUTL Mixer IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.63 { - iface MIXER - name 'SPKOUTL Mixer MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.64 { - iface MIXER - name 'SPKOUTL Mixer MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.65 { - iface MIXER - name 'SPKOUTL Mixer DACL Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.66 { - iface MIXER - name 'SPKOUTL Mixer DACR Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.67 { - iface MIXER - name 'SPKOUTR Mixer IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.68 { - iface MIXER - name 'SPKOUTR Mixer IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.69 { - iface MIXER - name 'SPKOUTR Mixer MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.70 { - iface MIXER - name 'SPKOUTR Mixer MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.71 { - iface MIXER - name 'SPKOUTR Mixer DACL Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.72 { - iface MIXER - name 'SPKOUTR Mixer DACR Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.73 { - iface MIXER - name 'SPKOUTR PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.74 { - iface MIXER - name 'SPKOUTL PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.75 { - iface MIXER - name 'SPKOUTR Mixer DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.76 { - iface MIXER - name 'SPKOUTR Mixer DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.77 { - iface MIXER - name 'SPKOUTR Mixer MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.78 { - iface MIXER - name 'SPKOUTR Mixer MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.79 { - iface MIXER - name 'SPKOUTR Mixer IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.80 { - iface MIXER - name 'SPKOUTR Mixer IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.81 { - iface MIXER - name 'SPKOUTL Mixer DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.82 { - iface MIXER - name 'SPKOUTL Mixer DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.83 { - iface MIXER - name 'SPKOUTL Mixer MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.84 { - iface MIXER - name 'SPKOUTL Mixer MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.85 { - iface MIXER - name 'SPKOUTL Mixer IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.86 { - iface MIXER - name 'SPKOUTL Mixer IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.87 { - iface MIXER - name 'HPOUTR PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.88 { - iface MIXER - name 'HPOUTL PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.89 { - iface MIXER - name 'HPMIXR DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.90 { - iface MIXER - name 'HPMIXR DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.91 { - iface MIXER - name 'HPMIXR MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.92 { - iface MIXER - name 'HPMIXR MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.93 { - iface MIXER - name 'HPMIXR IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.94 { - iface MIXER - name 'HPMIXR IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.95 { - iface MIXER - name 'HPMIXL DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.96 { - iface MIXER - name 'HPMIXL DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.97 { - iface MIXER - name 'HPMIXL MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.98 { - iface MIXER - name 'HPMIXL MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.99 { - iface MIXER - name 'HPMIXL IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.100 { - iface MIXER - name 'HPMIXL IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.101 { - iface MIXER - name STR - value None - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 None - item.1 Left - item.2 Right - } - } - control.102 { - iface MIXER - name STL - value None - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 None - item.1 Left - item.2 Right - } - } - control.103 { - iface MIXER - name 'MIXINR IN2R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.104 { - iface MIXER - name 'MIXINR IN3R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.105 { - iface MIXER - name 'MIXINR PGA Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.106 { - iface MIXER - name 'MIXINL IN2L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.107 { - iface MIXER - name 'MIXINL IN3L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.108 { - iface MIXER - name 'MIXINL PGA Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.109 { - iface MIXER - name 'INPGAR IN1R Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.110 { - iface MIXER - name 'INPGAR IN2R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.111 { - iface MIXER - name 'INPGAR IN3R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.112 { - iface MIXER - name 'INPGAR IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.113 { - iface MIXER - name 'INPGAL IN1L Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.114 { - iface MIXER - name 'INPGAL IN2L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.115 { - iface MIXER - name 'INPGAL IN3L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.116 { - iface MIXER - name 'INPGAL IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } -} -state.imx6qnitrogen6x { - control.1 { - iface MIXER - name 'PCM Playback Volume' - value.0 144 - value.1 144 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 192' - } - } - control.2 { - iface MIXER - name 'Capture Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 15' - } - } - control.3 { - iface MIXER - name 'Capture Attenuate Switch (-6dB)' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.4 { - iface MIXER - name 'Capture ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.5 { - iface MIXER - name 'Headphone Playback Volume' - value.0 127 - value.1 127 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -5150 - dbmax 1200 - dbvalue.0 1200 - dbvalue.1 1200 - } - } - control.6 { - iface MIXER - name 'Headphone Playback ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.7 { - iface MIXER - name 'Lineout Playback Volume' - value.0 27 - value.1 27 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1250 - dbmax 300 - dbvalue.0 100 - dbvalue.1 100 - } - } - control.8 { - iface MIXER - name 'Mic Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 3' - dbmin 0 - dbmax 4000 - dbvalue.0 0 - } - } - control.9 { - iface MIXER - name 'Headphone Mux' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 LINE_IN - } - } - control.10 { - iface MIXER - name 'Capture Mux' - value MIC_IN - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 MIC_IN - item.1 LINE_IN - } - } -} -state.imx6dlnit6xlite { - control.1 { - iface MIXER - name 'PCM Playback Volume' - value.0 144 - value.1 144 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 192' - } - } - control.2 { - iface MIXER - name 'Capture Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 15' - } - } - control.3 { - iface MIXER - name 'Capture Attenuate Switch (-6dB)' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.4 { - iface MIXER - name 'Capture ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.5 { - iface MIXER - name 'Headphone Playback Volume' - value.0 127 - value.1 127 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -5150 - dbmax 1200 - dbvalue.0 1200 - dbvalue.1 1200 - } - } - control.6 { - iface MIXER - name 'Headphone Playback ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.7 { - iface MIXER - name 'Lineout Playback Volume' - value.0 27 - value.1 27 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1250 - dbmax 300 - dbvalue.0 100 - dbvalue.1 100 - } - } - control.8 { - iface MIXER - name 'Mic Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 3' - dbmin 0 - dbmax 4000 - dbvalue.0 0 - } - } - control.9 { - iface MIXER - name 'Headphone Mux' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 LINE_IN - } - } - control.10 { - iface MIXER - name 'Capture Mux' - value MIC_IN - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 MIC_IN - item.1 LINE_IN - } - } -} -state.imx6qnitrogen6m { - control.1 { - iface MIXER - name 'PCM Playback Volume' - value.0 144 - value.1 144 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 192' - } - } - control.2 { - iface MIXER - name 'Capture Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 15' - } - } - control.3 { - iface MIXER - name 'Capture Attenuate Switch (-6dB)' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.4 { - iface MIXER - name 'Capture ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.5 { - iface MIXER - name 'Headphone Playback Volume' - value.0 127 - value.1 127 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -5150 - dbmax 1200 - dbvalue.0 1200 - dbvalue.1 1200 - } - } - control.6 { - iface MIXER - name 'Headphone Playback ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.7 { - iface MIXER - name 'Lineout Playback Volume' - value.0 27 - value.1 27 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1250 - dbmax 300 - dbvalue.0 100 - dbvalue.1 100 - } - } - control.8 { - iface MIXER - name 'Mic Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 3' - dbmin 0 - dbmax 4000 - dbvalue.0 0 - } - } - control.9 { - iface MIXER - name 'Headphone Mux' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 LINE_IN - } - } - control.10 { - iface MIXER - name 'Capture Mux' - value MIC_IN - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 MIC_IN - item.1 LINE_IN - } - } -} -state.imx6sxnitrogen6 { - control.1 { - iface MIXER - name 'PCM Playback Volume' - value.0 144 - value.1 144 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 192' - } - } - control.2 { - iface MIXER - name 'Capture Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 15' - } - } - control.3 { - iface MIXER - name 'Capture Attenuate Switch (-6dB)' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.4 { - iface MIXER - name 'Capture ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.5 { - iface MIXER - name 'Headphone Playback Volume' - value.0 127 - value.1 127 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -5150 - dbmax 1200 - dbvalue.0 1200 - dbvalue.1 1200 - } - } - control.6 { - iface MIXER - name 'Headphone Playback ZC Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.7 { - iface MIXER - name 'Lineout Playback Volume' - value.0 27 - value.1 27 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1250 - dbmax 300 - dbvalue.0 100 - dbvalue.1 100 - } - } - control.8 { - iface MIXER - name 'Mic Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 3' - dbmin 0 - dbmax 4000 - dbvalue.0 0 - } - } - control.9 { - iface MIXER - name 'Headphone Mux' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 LINE_IN - } - } - control.10 { - iface MIXER - name 'Capture Mux' - value MIC_IN - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 MIC_IN - item.1 LINE_IN - } - } -} diff --git a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx7/asound.state b/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx7/asound.state deleted file mode 100644 index 552f763d..00000000 --- a/bsp/meta-boundary/recipes-bsp/alsa-state/alsa-state/mx7/asound.state +++ /dev/null @@ -1,1374 +0,0 @@ -state.wm8962audio { - control.1 { - iface MIXER - name 'Input Mixer Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.2 { - iface MIXER - name 'MIXINL IN2L Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.3 { - iface MIXER - name 'MIXINL PGA Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 3000 - dbvalue.0 0 - } - } - control.4 { - iface MIXER - name 'MIXINL IN3L Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.5 { - iface MIXER - name 'MIXINR IN2R Volume' - value 5 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 0 - } - } - control.6 { - iface MIXER - name 'MIXINR PGA Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 3000 - dbvalue.0 0 - } - } - control.7 { - iface MIXER - name 'MIXINR IN3R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.8 { - iface MIXER - name 'Digital Capture Volume' - value.0 108 - value.1 108 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 2325 - dbvalue.0 900 - dbvalue.1 900 - } - } - control.9 { - iface MIXER - name 'Capture Volume' - value.0 63 - value.1 63 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 63' - dbmin -2325 - dbmax 2400 - dbvalue.0 2400 - dbvalue.1 2400 - } - } - control.10 { - iface MIXER - name 'Capture Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.11 { - iface MIXER - name 'Capture ZC Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.12 { - iface MIXER - name 'Capture HPF Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.13 { - iface MIXER - name 'Capture HPF Mode' - value Hi-fi - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 Hi-fi - item.1 Application - } - } - control.14 { - iface MIXER - name 'Capture HPF Cutoff' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - } - } - control.15 { - iface MIXER - name 'Capture LHPF Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.16 { - iface MIXER - name 'Capture LHPF Mode' - value LPF - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 LPF - item.1 HPF - } - } - control.17 { - iface MIXER - name 'Sidetone Volume' - value.0 0 - value.1 0 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 12' - dbmin -3600 - dbmax 0 - dbvalue.0 -3600 - dbvalue.1 -3600 - } - } - control.18 { - iface MIXER - name 'Digital Playback Volume' - value.0 96 - value.1 96 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 2325 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.19 { - iface MIXER - name 'DAC High Performance Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.20 { - iface MIXER - name 'DAC L/R Swap Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.21 { - iface MIXER - name 'ADC L/R Swap Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.22 { - iface MIXER - name 'ADC High Performance Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.23 { - iface MIXER - name 'Beep Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 15' - dbmin -9999999 - dbmax -600 - dbvalue.0 -9999999 - } - } - control.24 { - iface MIXER - name 'Headphone Volume' - value.0 93 - value.1 93 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 600 - dbvalue.0 -2800 - dbvalue.1 -2800 - } - } - control.25 { - iface MIXER - name 'Headphone Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.26 { - iface MIXER - name 'Headphone ZC Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.27 { - iface MIXER - name 'Headphone Aux Volume' - value.0 7 - value.1 7 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 7' - dbmin -700 - dbmax 0 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.28 { - iface MIXER - name 'Headphone Mixer Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.29 { - iface MIXER - name 'HPMIXL IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.30 { - iface MIXER - name 'HPMIXL IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.31 { - iface MIXER - name 'HPMIXL MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.32 { - iface MIXER - name 'HPMIXL MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.33 { - iface MIXER - name 'HPMIXR IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.34 { - iface MIXER - name 'HPMIXR IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.35 { - iface MIXER - name 'HPMIXR MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.36 { - iface MIXER - name 'HPMIXR MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.37 { - iface MIXER - name 'Speaker Boost Volume' - value 3 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin 0 - dbmax 1200 - dbvalue.0 450 - } - } - control.38 { - iface MIXER - name 'EQ Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.39 { - iface MIXER - name 'EQ1 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.40 { - iface MIXER - name 'EQ2 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.41 { - iface MIXER - name 'EQ3 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.42 { - iface MIXER - name 'EQ4 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.43 { - iface MIXER - name 'EQ5 Volume' - value.0 12 - value.1 12 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 31' - dbmin -1200 - dbmax 1900 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.44 { - iface MIXER - name '3D Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.45 { - iface MIXER - name '3D Coefficients' - value '0040000000000000' - comment { - access 'read write' - type BYTES - count 8 - } - } - control.46 { - iface MIXER - name 'DF1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.47 { - iface MIXER - name 'DF1 Coefficients' - value '0000000000000000000000000000' - comment { - access 'read write' - type BYTES - count 14 - } - } - control.48 { - iface MIXER - name 'DRC Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.49 { - iface MIXER - name 'DRC Coefficients' - value '000c0925000000000000' - comment { - access 'read write' - type BYTES - count 10 - } - } - control.50 { - iface MIXER - name 'VSS Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.51 { - iface MIXER - name 'VSS Coefficients' - value '008c020000350700003a4100008b7d00003a4100008cfee800780000003fb260002d18180020000000f1834000fb830000eeaec000fbac4000f17f8000f43b4000f5fb0000ea10c000fcc58000e275c00004b48000d4f9800004914000d8a48000023dc000cf7a8000dc060000f2dac000baf340000a7940001c068000fd2d00001ce840000ddc4000fc9d000009558000fe7e80000eab4000f99880000987c000fd2c400009480000035f400000870000fae4c000000b400004e18000011f4000f8b00000fbcbc00004f3800007df4000ff070000efd70000fbaf4000108a80001107c000e0080000d276000020cf400030234000fd69c0002835000006330000d9f6c000f33340000f420000040c8000fb3f8000f757c0000354000000c6c0000312c000fd8580' - comment { - access 'read write' - type BYTES - count 296 - } - } - control.52 { - iface MIXER - name 'HPF1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.53 { - iface MIXER - name 'HPF2 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.54 { - iface MIXER - name 'HPF Coefficients' - value '0000' - comment { - access 'read write' - type BYTES - count 2 - } - } - control.55 { - iface MIXER - name 'HD Bass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.56 { - iface MIXER - name 'HD Bass Coefficients' - value '0002bd12007c586c00538121003f8bd80032f52d0065ac8c006be08700721483007214830043352500066a4a0043607900080000000100000059999a' - comment { - access 'read write' - type BYTES - count 60 - } - } - control.57 { - iface MIXER - name 'Speaker Volume' - value.0 114 - value.1 114 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -9999999 - dbmax 600 - dbvalue.0 -700 - dbvalue.1 -700 - } - } - control.58 { - iface MIXER - name 'Speaker Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.59 { - iface MIXER - name 'Speaker ZC Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.60 { - iface MIXER - name 'Speaker Mixer Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.61 { - iface MIXER - name 'SPKOUTL Mixer IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.62 { - iface MIXER - name 'SPKOUTL Mixer IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.63 { - iface MIXER - name 'SPKOUTL Mixer MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.64 { - iface MIXER - name 'SPKOUTL Mixer MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.65 { - iface MIXER - name 'SPKOUTL Mixer DACL Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.66 { - iface MIXER - name 'SPKOUTL Mixer DACR Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.67 { - iface MIXER - name 'SPKOUTR Mixer IN4L Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.68 { - iface MIXER - name 'SPKOUTR Mixer IN4R Volume' - value 7 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 7' - dbmin -1500 - dbmax 600 - dbvalue.0 600 - } - } - control.69 { - iface MIXER - name 'SPKOUTR Mixer MIXINL Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.70 { - iface MIXER - name 'SPKOUTR Mixer MIXINR Volume' - value 1 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 0 - } - } - control.71 { - iface MIXER - name 'SPKOUTR Mixer DACL Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.72 { - iface MIXER - name 'SPKOUTR Mixer DACR Volume' - value 0 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 1' - dbmin -600 - dbmax 0 - dbvalue.0 -600 - } - } - control.73 { - iface MIXER - name 'SPKOUTR PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.74 { - iface MIXER - name 'SPKOUTL PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.75 { - iface MIXER - name 'SPKOUTR Mixer DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.76 { - iface MIXER - name 'SPKOUTR Mixer DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.77 { - iface MIXER - name 'SPKOUTR Mixer MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.78 { - iface MIXER - name 'SPKOUTR Mixer MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.79 { - iface MIXER - name 'SPKOUTR Mixer IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.80 { - iface MIXER - name 'SPKOUTR Mixer IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.81 { - iface MIXER - name 'SPKOUTL Mixer DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.82 { - iface MIXER - name 'SPKOUTL Mixer DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.83 { - iface MIXER - name 'SPKOUTL Mixer MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.84 { - iface MIXER - name 'SPKOUTL Mixer MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.85 { - iface MIXER - name 'SPKOUTL Mixer IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.86 { - iface MIXER - name 'SPKOUTL Mixer IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.87 { - iface MIXER - name 'HPOUTR PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.88 { - iface MIXER - name 'HPOUTL PGA' - value DAC - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC - item.1 Mixer - } - } - control.89 { - iface MIXER - name 'HPMIXR DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.90 { - iface MIXER - name 'HPMIXR DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.91 { - iface MIXER - name 'HPMIXR MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.92 { - iface MIXER - name 'HPMIXR MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.93 { - iface MIXER - name 'HPMIXR IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.94 { - iface MIXER - name 'HPMIXR IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.95 { - iface MIXER - name 'HPMIXL DACL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.96 { - iface MIXER - name 'HPMIXL DACR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.97 { - iface MIXER - name 'HPMIXL MIXINL Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.98 { - iface MIXER - name 'HPMIXL MIXINR Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.99 { - iface MIXER - name 'HPMIXL IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.100 { - iface MIXER - name 'HPMIXL IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.101 { - iface MIXER - name STR - value None - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 None - item.1 Left - item.2 Right - } - } - control.102 { - iface MIXER - name STL - value None - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 None - item.1 Left - item.2 Right - } - } - control.103 { - iface MIXER - name 'MIXINR IN2R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.104 { - iface MIXER - name 'MIXINR IN3R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.105 { - iface MIXER - name 'MIXINR PGA Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.106 { - iface MIXER - name 'MIXINL IN2L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.107 { - iface MIXER - name 'MIXINL IN3L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.108 { - iface MIXER - name 'MIXINL PGA Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.109 { - iface MIXER - name 'INPGAR IN1R Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.110 { - iface MIXER - name 'INPGAR IN2R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.111 { - iface MIXER - name 'INPGAR IN3R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.112 { - iface MIXER - name 'INPGAR IN4R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.113 { - iface MIXER - name 'INPGAL IN1L Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.114 { - iface MIXER - name 'INPGAL IN2L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.115 { - iface MIXER - name 'INPGAL IN3L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.116 { - iface MIXER - name 'INPGAL IN4L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } -} diff --git a/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-boot_%.bbappend b/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-boot_%.bbappend deleted file mode 100644 index a05fcd7b..00000000 --- a/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-boot_%.bbappend +++ /dev/null @@ -1,45 +0,0 @@ -SRCBRANCH = "boundary-imx_4.9.123_imx8mm_ga" -SRC_URI = "git://github.com/boundarydevices/imx-mkimage.git;branch=${SRCBRANCH}" -SRCREV = "${AUTOREV}" -PV = "1.0+git${SRCPV}" - -IMXBOOT_TARGETS = "${@bb.utils.contains('MACHINE', 'nitrogen8mm', "u-boot-lpddr4-iMX8MM-2g.nohdmibin", "u-boot-lpddr4-iMX8MQ-2g.hdmibin", d)}" -UBOOT_NAME = "u-boot-${MACHINE}.bin" -BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}.bin" - -compile_mx8m() { - bbnote 8MQ/8MM 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} - done - cp ${DEPLOY_DIR_IMAGE}/signed_*_imx8m.bin ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE} ${BOOT_STAGING}/u-boot-spl.bin - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/mkimage_uboot ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin -} - -do_compile() { - compile_${SOC_FAMILY} - # mkimage for i.MX8 - for target in ${IMXBOOT_TARGETS}; do - bbnote "building ${SOC_TARGET} - ${target}" - make SOC=${SOC_TARGET} DTBS=${UBOOT_DTB_NAME} ${target} - if [ -e "${BOOT_STAGING}/${target}" ]; then - cp ${BOOT_STAGING}/${target} ${S}/${BOOT_CONFIG_MACHINE}-${target} - fi - done -} - -deploy_mx8m() { - install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE} ${DEPLOYDIR}/${BOOT_TOOLS} - for ddr_firmware in ${DDR_FIRMWARE_NAME}; do - install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} - done - install -m 0644 ${DEPLOY_DIR_IMAGE}/signed_hdmi*.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} -} diff --git a/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-mkimage%.bbappend b/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-mkimage%.bbappend deleted file mode 100644 index ea406e5e..00000000 --- a/bsp/meta-boundary/recipes-bsp/imx-mkimage/imx-mkimage%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -SRCBRANCH = "boundary-imx_4.9.123_imx8mm_ga" -SRC_URI = "git://github.com/boundarydevices/imx-mkimage.git;branch=${SRCBRANCH}" -SRCREV = "${AUTOREV}" -PV = "1.0+git${SRCPV}" - diff --git a/bsp/meta-boundary/recipes-bsp/u-boot/boundary/fw_env.config b/bsp/meta-boundary/recipes-bsp/u-boot/boundary/fw_env.config deleted file mode 100644 index 571e829c..00000000 --- a/bsp/meta-boundary/recipes-bsp/u-boot/boundary/fw_env.config +++ /dev/null @@ -1 +0,0 @@ -/dev/mtd1 0x00000 0x2000 0x1000 2 diff --git a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-boundary_%.bbappend b/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-boundary_%.bbappend deleted file mode 100644 index c07a54aa..00000000 --- a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-boundary_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -SRCREV = "${AUTOREV}" -SRCBRANCH = "boundary-v2018.07" -PV = "v2018.07+git${SRCPV}" -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm|imx6-acl)" diff --git a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend deleted file mode 100644 index 9f78d65b..00000000 --- a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/boundary:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/boundary:" - -SRC_URI += "\ - file://fw_env.config \ -" - -do_install_append () { - rm ${D}${sysconfdir}/fw_env.config - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config -} diff --git a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_%.bbappend b/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_%.bbappend deleted file mode 100644 index bc2fb062..00000000 --- a/bsp/meta-boundary/recipes-bsp/u-boot/u-boot-script-boundary_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" -SRCREV = "${AUTOREV}" -SRCBRANCH = "boundary-v2018.07" -PV = "v2018.07+git${SRCPV}" -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm|imx6-acl)" diff --git a/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5/0001-hciattach-add-QCA9377-Tuffello-support.patch b/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5/0001-hciattach-add-QCA9377-Tuffello-support.patch deleted file mode 100644 index 92ed1f61..00000000 --- a/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5/0001-hciattach-add-QCA9377-Tuffello-support.patch +++ /dev/null @@ -1,2379 +0,0 @@ -From 97c6fcba2a45533c4a00f85c235fcdccc5e87fb7 Mon Sep 17 00:00:00 2001 -From: Gary Bisson -Date: Wed, 17 Aug 2016 11:36:28 +0200 -Subject: [PATCH] hciattach: add QCA9377 Tuffello support - -From CodeAurora repository: -https://source.codeaurora.org/quic/la/platform/external/bluetooth/bluez/ - -Modifications: -- code indentation -- remove verbose traces -- use H4 protocol instead of IBS - -Also squashed: -hciattach_rome: simplify baudrate setting -hciattach_rome: do not override module internal MAC address -hciattach_rome: force IBS to disabled in NVM -hciattach_rome: display ROM and TLV info by default - -Signed-off-by: Gary Bisson ---- - Makefile.tools | 1 + - android/Android.mk | 1 + - tools/hciattach.c | 12 + - tools/hciattach.h | 1 + - tools/hciattach_rome.c | 1872 ++++++++++++++++++++++++++++++++++++++++++++++++ - tools/hciattach_rome.h | 388 ++++++++++ - 6 files changed, 2275 insertions(+) - create mode 100644 tools/hciattach_rome.c - create mode 100644 tools/hciattach_rome.h - -diff --git a/Makefile.tools b/Makefile.tools -index 0fd6dec87..984d6d212 100644 ---- a/Makefile.tools -+++ b/Makefile.tools -@@ -281,6 +281,7 @@ tools_hciattach_SOURCES = tools/hciattach.c tools/hciattach.h \ - tools/hciattach_ti.c \ - tools/hciattach_tialt.c \ - tools/hciattach_ath3k.c \ -+ tools/hciattach_rome.c \ - tools/hciattach_qualcomm.c \ - tools/hciattach_intel.c \ - tools/hciattach_bcm43xx.c -diff --git a/android/Android.mk b/android/Android.mk -index 38ef4aa97..d5045dacd 100644 ---- a/android/Android.mk -+++ b/android/Android.mk -@@ -695,6 +695,7 @@ LOCAL_SRC_FILES := \ - bluez/tools/hciattach_ti.c \ - bluez/tools/hciattach_tialt.c \ - bluez/tools/hciattach_ath3k.c \ -+ bluez/tools/hciattach_rome.c \ - bluez/tools/hciattach_qualcomm.c \ - bluez/tools/hciattach_intel.c \ - bluez/tools/hciattach_bcm43xx.c \ -diff --git a/tools/hciattach.c b/tools/hciattach.c -index fad176c9b..02a65c692 100644 ---- a/tools/hciattach.c -+++ b/tools/hciattach.c -@@ -263,6 +263,11 @@ static int ath3k_pm(int fd, struct uart_t *u, struct termios *ti) - return ath3k_post(fd, u->pm); - } - -+static int qca(int fd, struct uart_t *u, struct termios *ti) -+{ -+ return qca_soc_init(fd, u->speed, u->bdaddr); -+} -+ - static int qualcomm(int fd, struct uart_t *u, struct termios *ti) - { - return qualcomm_init(fd, u->speed, ti, u->bdaddr); -@@ -1093,6 +1098,10 @@ struct uart_t uart[] = { - { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, - FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, - -+ /* QCA ROME */ -+ { "qca", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, -+ FLOW_CTL, DISABLE_PM, NULL, qca, NULL }, -+ - /* QUALCOMM BTS */ - { "qualcomm", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, - FLOW_CTL, DISABLE_PM, NULL, qualcomm, NULL }, -@@ -1145,6 +1154,9 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) - if (u->flags & AMP_DEV) - flags |= 1 << HCI_UART_CREATE_AMP; - -+ if (!strncmp(u->type, "qca", 3)) -+ flags |= 1 << HCI_UART_RESET_ON_INIT; -+ - fd = open(dev, O_RDWR | O_NOCTTY); - if (fd < 0) { - perror("Can't open serial port"); -diff --git a/tools/hciattach.h b/tools/hciattach.h -index 249aab49e..85c801ccf 100644 ---- a/tools/hciattach.h -+++ b/tools/hciattach.h -@@ -65,6 +65,7 @@ int bgb2xx_init(int dd, bdaddr_t *bdaddr); - int ath3k_init(int fd, int speed, int init_speed, char *bdaddr, - struct termios *ti); - int ath3k_post(int fd, int pm); -+int qca_soc_init(int fd, int speed, char *bdaddr); - int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr); - int intel_init(int fd, int init_speed, int *speed, struct termios *ti); - int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti, -diff --git a/tools/hciattach_rome.c b/tools/hciattach_rome.c -new file mode 100644 -index 000000000..9a7f222c4 ---- /dev/null -+++ b/tools/hciattach_rome.c -@@ -0,0 +1,1872 @@ -+/* -+ * -+ * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. -+ * Not a Contribution. -+ * -+ * Copyright 2012 The Android Open Source Project -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); you -+ * may not use this file except in compliance with the License. You may -+ * obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * permissions and limitations under the License. -+ * -+ */ -+ -+/****************************************************************************** -+ * -+ * Filename: hciattach_rome.c -+ * -+ * Description: Contains controller-specific functions, like -+ * firmware patch download -+ * low power mode operations -+ * -+ ******************************************************************************/ -+ -+#define MODULE_HAS_MAC_ADDR -+#define LOG_TAG "bt_vendor" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "hciattach_rome.h" -+#include "hciattach.h" -+ -+/****************************************************************************** -+ ** Variables -+ ******************************************************************************/ -+FILE *file; -+unsigned char *phdr_buffer; -+unsigned char *pdata_buffer = NULL; -+patch_info rampatch_patch_info; -+int rome_ver = ROME_VER_UNKNOWN; -+unsigned char gTlv_type; -+unsigned char gtlv_dwndcfg; -+char *rampatch_file_path; -+char *nvm_file_path; -+vnd_userial_cb_t vnd_userial; -+unsigned char wait_vsc_evt = TRUE; -+ -+/***************************************************************************** -+ ** Functions -+ *****************************************************************************/ -+ -+/******************************************************************************* -+ ** -+ ** Function userial_to_tcio_baud -+ ** -+ ** Description helper function converts USERIAL baud rates into TCIO -+ ** conforming baud rates -+ ** -+ ** Returns TRUE/FALSE -+ ** -+ *******************************************************************************/ -+unsigned char userial_to_tcio_baud(unsigned char cfg_baud, unsigned int *baud) -+{ -+ if (cfg_baud == USERIAL_BAUD_115200) -+ *baud = B115200; -+ else if (cfg_baud == USERIAL_BAUD_4M) -+ *baud = B4000000; -+ else if (cfg_baud == USERIAL_BAUD_3M) -+ *baud = B3000000; -+ else if (cfg_baud == USERIAL_BAUD_2M) -+ *baud = B2000000; -+ else if (cfg_baud == USERIAL_BAUD_1M) -+ *baud = B1000000; -+ else if (cfg_baud == USERIAL_BAUD_921600) -+ *baud = B921600; -+ else if (cfg_baud == USERIAL_BAUD_460800) -+ *baud = B460800; -+ else if (cfg_baud == USERIAL_BAUD_230400) -+ *baud = B230400; -+ else if (cfg_baud == USERIAL_BAUD_57600) -+ *baud = B57600; -+ else if (cfg_baud == USERIAL_BAUD_19200) -+ *baud = B19200; -+ else if (cfg_baud == USERIAL_BAUD_9600) -+ *baud = B9600; -+ else if (cfg_baud == USERIAL_BAUD_1200) -+ *baud = B1200; -+ else if (cfg_baud == USERIAL_BAUD_600) -+ *baud = B600; -+ else { -+ fprintf(stderr, "userial vendor open: unsupported baud idx %i\n", cfg_baud); -+ *baud = B115200; -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+ -+/******************************************************************************* -+ ** -+ ** Function userial_vendor_set_baud -+ ** -+ ** Description Set new baud rate -+ ** -+ ** Returns None -+ ** -+ *******************************************************************************/ -+void userial_vendor_set_baud(unsigned char userial_baud) -+{ -+ unsigned int tcio_baud; -+ -+ if (tcgetattr(vnd_userial.fd, &vnd_userial.termios) < 0) { -+ perror("Can't get port settings"); -+ return; -+ } -+ cfmakeraw(&vnd_userial.termios); -+ vnd_userial.termios.c_cflag |= CLOCAL; -+ vnd_userial.termios.c_cflag |= CREAD; -+ vnd_userial.termios.c_cflag |= CS8; -+ tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); -+ -+ userial_to_tcio_baud(userial_baud, &tcio_baud); -+ -+ cfsetospeed(&vnd_userial.termios, tcio_baud); -+ cfsetispeed(&vnd_userial.termios, tcio_baud); -+ tcsetattr(vnd_userial.fd, TCSADRAIN, &vnd_userial.termios); /* don't change speed until last write done */ -+ -+} -+ -+ -+/******************************************************************************* -+ ** -+ ** Function userial_vendor_ioctl -+ ** -+ ** Description ioctl inteface -+ ** -+ ** Returns None -+ ** -+ *******************************************************************************/ -+int userial_vendor_ioctl(int fd, userial_vendor_ioctl_op_t op, int *p_data) -+{ -+ int err = -1; -+ struct termios ti; -+ -+ if (tcgetattr(fd, &ti) < 0) { -+ perror("Can't get port settings"); -+ return -1; -+ } -+ cfmakeraw(&ti); -+ ti.c_cflag |= CLOCAL; -+ ti.c_cflag |= CREAD; -+ ti.c_cflag |= CS8; -+ -+ switch(op) { -+#if (BT_WAKE_VIA_USERIAL_IOCTL==TRUE) -+ case USERIAL_OP_ASSERT_BT_WAKE: -+ VNDUSERIALDBG("## userial_vendor_ioctl: Asserting BT_Wake ##"); -+ err = ioctl(fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); -+ break; -+ -+ case USERIAL_OP_DEASSERT_BT_WAKE: -+ VNDUSERIALDBG("## userial_vendor_ioctl: De-asserting BT_Wake ##"); -+ err = ioctl(fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); -+ break; -+ -+ case USERIAL_OP_GET_BT_WAKE_STATE: -+ err = ioctl(fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data); -+ break; -+#endif // (BT_WAKE_VIA_USERIAL_IOCTL==TRUE) -+ case USERIAL_OP_FLOW_ON: -+ ti.c_cflag |= CRTSCTS; -+ if (err = tcsetattr(fd, TCSANOW, &ti) < 0) { -+ perror("Can't set port settings"); -+ return -1; -+ } -+ -+ break; -+ -+ case USERIAL_OP_FLOW_OFF: -+ ti.c_cflag &= ~CRTSCTS; -+ if (err = tcsetattr(fd, TCSANOW, &ti) < 0) { -+ fprintf(stderr, "Can't set port settings"); -+ return -1; -+ } -+ break; -+ -+ default: -+ break; -+ } -+ -+ return err; -+} -+ -+ -+int get_vs_hci_event(unsigned char *rsp) -+{ -+ int err = 0, soc_id =0; -+ unsigned char paramlen = 0; -+ -+ if ( (rsp[EVENTCODE_OFFSET] == VSEVENT_CODE) || (rsp[EVENTCODE_OFFSET] == EVT_CMD_COMPLETE)) -+ PR_DBG("%s: Received HCI-Vendor Specific event\n", __FUNCTION__); -+ else { -+ fprintf(stderr, "%s: Failed to receive HCI-Vendor Specific event\n", __FUNCTION__); -+ err = -EIO; -+ goto failed; -+ } -+ -+ /* Check the status of the operation */ -+ switch ( rsp[CMD_RSP_OFFSET] ) { -+ case EDL_CMD_REQ_RES_EVT: -+ switch(rsp[RSP_TYPE_OFFSET]) { -+ case EDL_PATCH_VER_RES_EVT: -+ case EDL_APP_VER_RES_EVT: -+ PR_INFO("Current Product ID\t\t: 0x%08x\n", -+ (unsigned int)(rsp[PATCH_PROD_ID_OFFSET +3] << 24 | -+ rsp[PATCH_PROD_ID_OFFSET+2] << 16 | -+ rsp[PATCH_PROD_ID_OFFSET+1] << 8 | -+ rsp[PATCH_PROD_ID_OFFSET] )); -+ -+ /* Patch Version indicates FW patch version */ -+ PR_INFO("Current Patch Version\t\t: 0x%04x\n", -+ (unsigned short)(rsp[PATCH_PATCH_VER_OFFSET + 1] << 8 | -+ rsp[PATCH_PATCH_VER_OFFSET] )); -+ -+ /* ROM Build Version indicates ROM build version like 1.0/1.1/2.0 */ -+ rome_ver = (int)(rsp[PATCH_ROM_BUILD_VER_OFFSET + 1] << 8 | -+ rsp[PATCH_ROM_BUILD_VER_OFFSET]); -+ PR_INFO("Current ROM Build Version\t: 0x%04x\n", rome_ver); -+ -+ /* In case rome 1.0/1.1, there is no SOC ID version available */ -+ if (paramlen - 10) { -+ soc_id = (unsigned int)(rsp[PATCH_SOC_VER_OFFSET +3] << 24 | -+ rsp[PATCH_SOC_VER_OFFSET+2] << 16 | -+ rsp[PATCH_SOC_VER_OFFSET+1] << 8 | -+ rsp[PATCH_SOC_VER_OFFSET]); -+ PR_INFO("Current SOC Version\t\t: 0x%08x\n", soc_id); -+ } -+ -+ /* Rome Chipset Version can be decided by Patch version and SOC version, -+ Upper 2 bytes will be used for Patch version and Lower 2 bytes will be -+ used for SOC as combination for BT host driver */ -+ rome_ver = (rome_ver << 16) | (soc_id & 0x0000ffff); -+ break; -+ case EDL_TVL_DNLD_RES_EVT: -+ case EDL_CMD_EXE_STATUS_EVT: -+ switch (err = rsp[CMD_STATUS_OFFSET]) { -+ case HCI_CMD_SUCCESS: -+ PR_DBG("%s: Download Packet successfully!\n", __FUNCTION__); -+ break; -+ case PATCH_LEN_ERROR: -+ fprintf(stderr, "%s: Invalid patch length argument passed for EDL PATCH " -+ "SET REQ cmd\n", __FUNCTION__); -+ break; -+ case PATCH_VER_ERROR: -+ fprintf(stderr, "%s: Invalid patch version argument passed for EDL PATCH " -+ "SET REQ cmd\n", __FUNCTION__); -+ break; -+ case PATCH_CRC_ERROR: -+ fprintf(stderr, "%s: CRC check of patch failed!!!\n", __FUNCTION__); -+ break; -+ case PATCH_NOT_FOUND: -+ fprintf(stderr, "%s: Invalid patch data!!!\n", __FUNCTION__); -+ break; -+ case TLV_TYPE_ERROR: -+ fprintf(stderr, "%s: TLV Type Error !!!\n", __FUNCTION__); -+ break; -+ default: -+ fprintf(stderr, "%s: Undefined error (0x%x)", __FUNCTION__, err); -+ break; -+ } -+ break; -+ } -+ break; -+ -+ case NVM_ACCESS_CODE: -+ PR_DBG("%s: NVM Access Code!!!\n", __FUNCTION__); -+ err = HCI_CMD_SUCCESS; -+ break; -+ case EDL_SET_BAUDRATE_RSP_EVT: -+ /* Rome 1.1 has bug with the response, so it should ignore it. */ -+ if (rsp[BAUDRATE_RSP_STATUS_OFFSET] != BAUDRATE_CHANGE_SUCCESS) { -+ fprintf(stderr, "%s: Set Baudrate request failed - 0x%x\n", __FUNCTION__, -+ rsp[CMD_STATUS_OFFSET]); -+ err = -1; -+ } -+ break; -+ default: -+ fprintf(stderr, "%s: Not a valid status!!!\n", __FUNCTION__); -+ err = -1; -+ break; -+ } -+ -+failed: -+ return err; -+} -+ -+ -+int wait_for_data(int fd, int maxTimeOut) -+{ -+ fd_set infids; -+ struct timeval timeout; -+ -+ if (maxTimeOut <= 0) { -+ fprintf(stderr, "%s: Invalid timeout value specified", __func__); -+ return -EINVAL; -+ } -+ -+ FD_ZERO (&infids); -+ FD_SET (fd, &infids); -+ timeout.tv_sec = maxTimeOut; -+ timeout.tv_usec = 0; -+ -+ /* Check whether data is available in TTY buffer before calling read() */ -+ if (select (fd + 1, &infids, NULL, NULL, &timeout) < 1) { -+ fprintf(stderr, "%s: Timing out on select for %d secs.\n", __FUNCTION__, maxTimeOut); -+ return -1; -+ } -+ -+ return 1; -+} -+ -+/* -+ * Read an VS HCI event from the given file descriptor. -+ */ -+int read_vs_hci_event(int fd, unsigned char* buf, int size) -+{ -+ int remain, r, retry = 0; -+ int count = 0; -+ -+ if (size <= 0) { -+ fprintf(stderr, "Invalid size arguement!\n"); -+ return -1; -+ } -+ -+ /* Check whether data is available in TTY buffer before calling read() */ -+ if (wait_for_data(fd, SELECT_TIMEOUT) < 1) -+ return -1; -+ -+ /* The first byte identifies the packet type. For HCI event packets, it -+ * should be 0x04, so we read until we get to the 0x04. */ -+ /* It will keep reading until find 0x04 byte */ -+ while (1) { -+ /* Read UART Buffer for HCI-DATA */ -+ r = read(fd, buf, 1); -+ if (r <= 0) { -+ fprintf(stderr, "%s: read() failed. error: %d\n", -+ __FUNCTION__, r); -+ return -1; -+ } -+ -+ /* Check if received data is HCI-DATA or not. -+ * If not HCI-DATA, then retry reading the UART Buffer once. -+ * Sometimes there could be corruption on the UART lines and to -+ * avoid that retry once reading the UART Buffer for HCI-DATA. -+ */ -+ if (buf[0] == 0x04) { /* Recvd. HCI DATA */ -+ retry = 0; -+ break; -+ } -+ else if (retry < MAX_RETRY_CNT) { /* Retry mechanism */ -+ retry++; -+ fprintf(stderr, "%s: Not an HCI-VS-Event! buf[0]: %d", -+ __FUNCTION__, buf[0]); -+ if (wait_for_data(fd, SELECT_TIMEOUT) < 1) -+ return -1; -+ else /* Data available in UART Buffer: Continue to read */ -+ continue; -+ } -+ else { /* RETRY failed : Exiting with failure */ -+ fprintf(stderr, "%s: RETRY failed!", __FUNCTION__); -+ return -1; -+ } -+ } -+ count++; -+ -+ /* The next two bytes are the event code and parameter total length. */ -+ while (count < 3) { -+ r = read(fd, buf + count, 3 - count); -+ if ((r <= 0) || (buf[1] != 0xFF )) { -+ fprintf(stderr, "It is not VS event !!\n"); -+ return -1; -+ } -+ count += r; -+ } -+ -+ /* Now we read the parameters. */ -+ if (buf[2] < (size - 3)) -+ remain = buf[2]; -+ else -+ remain = size - 3; -+ -+ while ((count - 3) < remain) { -+ r = read(fd, buf + count, remain - (count - 3)); -+ if (r <= 0) -+ return -1; -+ count += r; -+ } -+ -+ /* Check if the set patch command is successful or not */ -+ if (get_vs_hci_event(buf) != HCI_CMD_SUCCESS) -+ return -1; -+ -+ return count; -+} -+ -+ -+int hci_send_vs_cmd(int fd, unsigned char *cmd, unsigned char *rsp, int size) -+{ -+ int ret = 0; -+ -+ /* Send the HCI command packet to UART for transmission */ -+ ret = write(fd, cmd, size); -+ if (ret != size) { -+ fprintf(stderr, "%s: Send failed with ret value: %d\n", __FUNCTION__, ret); -+ goto failed; -+ } -+ -+ if (wait_vsc_evt) { -+ /* Check for response from the Controller */ -+ if (read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE) < 0) { -+ ret = -ETIMEDOUT; -+ fprintf(stderr, "%s: Failed to get HCI-VS Event from SOC\n", __FUNCTION__); -+ goto failed; -+ } -+ } -+ -+failed: -+ return ret; -+} -+ -+void frame_hci_cmd_pkt( -+ unsigned char *cmd, -+ int edl_cmd, unsigned int p_base_addr, -+ int segtNo, int size -+ ) -+{ -+ int offset = 0; -+ hci_command_hdr *cmd_hdr; -+ -+ memset(cmd, 0x0, HCI_MAX_CMD_SIZE); -+ -+ cmd_hdr = (void *) (cmd + 1); -+ -+ cmd[0] = HCI_COMMAND_PKT; -+ cmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, HCI_PATCH_CMD_OCF); -+ cmd_hdr->plen = size; -+ cmd[4] = edl_cmd; -+ -+ switch (edl_cmd) { -+ case EDL_PATCH_SET_REQ_CMD: -+ /* Copy the patch header info as CMD params */ -+ memcpy(&cmd[5], phdr_buffer, PATCH_HDR_LEN); -+ PR_DBG("%s: Sending EDL_PATCH_SET_REQ_CMD\n", __FUNCTION__); -+ PR_DBG("HCI-CMD %d:\t0x%x \t0x%x \t0x%x \t0x%x \t0x%x\n", -+ segtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]); -+ break; -+ case EDL_PATCH_DLD_REQ_CMD: -+ offset = ((segtNo - 1) * MAX_DATA_PER_SEGMENT); -+ p_base_addr += offset; -+ cmd_hdr->plen = (size + 6); -+ cmd[5] = (size + 4); -+ cmd[6] = EXTRACT_BYTE(p_base_addr, 0); -+ cmd[7] = EXTRACT_BYTE(p_base_addr, 1); -+ cmd[8] = EXTRACT_BYTE(p_base_addr, 2); -+ cmd[9] = EXTRACT_BYTE(p_base_addr, 3); -+ memcpy(&cmd[10], (pdata_buffer + offset), size); -+ -+ PR_DBG("%s: Sending EDL_PATCH_DLD_REQ_CMD: size: %d bytes\n", -+ __FUNCTION__, size); -+ PR_DBG("HCI-CMD %d:\t0x%x\t0x%x\t0x%x\t0x%x\t0x%x\t0x%x\t0x%x\t" -+ "0x%x\t0x%x\t0x%x\t\n", segtNo, cmd[0], cmd[1], cmd[2], -+ cmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8], cmd[9]); -+ break; -+ case EDL_PATCH_ATCH_REQ_CMD: -+ PR_DBG("%s: Sending EDL_PATCH_ATTACH_REQ_CMD\n", __FUNCTION__); -+ PR_DBG("HCI-CMD %d:\t0x%x \t0x%x \t0x%x \t0x%x \t0x%x\n", -+ segtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]); -+ break; -+ case EDL_PATCH_RST_REQ_CMD: -+ PR_DBG("%s: Sending EDL_PATCH_RESET_REQ_CMD\n", __FUNCTION__); -+ PR_DBG("HCI-CMD %d:\t0x%x \t0x%x \t0x%x \t0x%x \t0x%x\n", -+ segtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]); -+ break; -+ case EDL_PATCH_VER_REQ_CMD: -+ PR_DBG("%s: Sending EDL_PATCH_VER_REQ_CMD\n", __FUNCTION__); -+ PR_DBG("HCI-CMD %d:\t0x%x \t0x%x \t0x%x \t0x%x \t0x%x\n", -+ segtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]); -+ break; -+ case EDL_PATCH_TLV_REQ_CMD: -+ PR_DBG("%s: Sending EDL_PATCH_TLV_REQ_CMD\n", __FUNCTION__); -+ /* Parameter Total Length */ -+ cmd[3] = size +2; -+ -+ /* TLV Segment Length */ -+ cmd[5] = size; -+ PR_DBG("HCI-CMD %d:\t0x%x \t0x%x \t0x%x \t0x%x \t0x%x \t0x%x\n", -+ segtNo, cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]); -+ offset = (segtNo * MAX_SIZE_PER_TLV_SEGMENT); -+ memcpy(&cmd[6], (pdata_buffer + offset), size); -+ break; -+ default: -+ fprintf(stderr, "%s: Unknown EDL CMD !!!\n", __FUNCTION__); -+ } -+} -+ -+void rome_extract_patch_header_info(unsigned char *buf) -+{ -+ int index; -+ -+ /* Extract patch id */ -+ for (index = 0; index < 4; index++) -+ rampatch_patch_info.patch_id |= -+ (LSH(buf[index + P_ID_OFFSET], (index * 8))); -+ -+ /* Extract (ROM and BUILD) version information */ -+ for (index = 0; index < 2; index++) -+ rampatch_patch_info.patch_ver.rom_version |= -+ (LSH(buf[index + P_ROME_VER_OFFSET], (index * 8))); -+ -+ for (index = 0; index < 2; index++) -+ rampatch_patch_info.patch_ver.build_version |= -+ (LSH(buf[index + P_BUILD_VER_OFFSET], (index * 8))); -+ -+ /* Extract patch base and entry addresses */ -+ for (index = 0; index < 4; index++) -+ rampatch_patch_info.patch_base_addr |= -+ (LSH(buf[index + P_BASE_ADDR_OFFSET], (index * 8))); -+ -+ /* Patch BASE & ENTRY addresses are same */ -+ rampatch_patch_info.patch_entry_addr = rampatch_patch_info.patch_base_addr; -+ -+ /* Extract total length of the patch payload */ -+ for (index = 0; index < 4; index++) -+ rampatch_patch_info.patch_length |= -+ (LSH(buf[index + P_LEN_OFFSET], (index * 8))); -+ -+ /* Extract the CRC checksum of the patch payload */ -+ for (index = 0; index < 4; index++) -+ rampatch_patch_info.patch_crc |= -+ (LSH(buf[index + P_CRC_OFFSET], (index * 8))); -+ -+ /* Extract patch control value */ -+ for (index = 0; index < 4; index++) -+ rampatch_patch_info.patch_ctrl |= -+ (LSH(buf[index + P_CONTROL_OFFSET], (index * 8))); -+ -+ fprintf(stderr, "PATCH_ID\t : 0x%x\n", rampatch_patch_info.patch_id); -+ fprintf(stderr, "ROM_VERSION\t : 0x%x\n", rampatch_patch_info.patch_ver.rom_version); -+ fprintf(stderr, "BUILD_VERSION\t : 0x%x\n", rampatch_patch_info.patch_ver.build_version); -+ fprintf(stderr, "PATCH_LENGTH\t : 0x%x\n", rampatch_patch_info.patch_length); -+ fprintf(stderr, "PATCH_CRC\t : 0x%x\n", rampatch_patch_info.patch_crc); -+ fprintf(stderr, "PATCH_CONTROL\t : 0x%x\n", rampatch_patch_info.patch_ctrl); -+ fprintf(stderr, "PATCH_BASE_ADDR\t : 0x%x\n", rampatch_patch_info.patch_base_addr); -+ -+} -+ -+int rome_edl_set_patch_request(int fd) -+{ -+ int size, err; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+ /* Frame the HCI CMD to be sent to the Controller */ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_SET_REQ_CMD, 0, -+ -1, PATCH_HDR_LEN + 1); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to set the patch info to the Controller!\n"); -+ goto error; -+ } -+ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to set patch info on Controller\n", __FUNCTION__); -+ goto error; -+ } -+error: -+ return err; -+} -+ -+int rome_edl_patch_download_request(int fd) -+{ -+ int no_of_patch_segment; -+ int index = 1, err = 0, size = 0; -+ unsigned int p_base_addr; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+ no_of_patch_segment = (rampatch_patch_info.patch_length / -+ MAX_DATA_PER_SEGMENT); -+ -+ /* Initialize the patch base address from the one read from bin file */ -+ p_base_addr = rampatch_patch_info.patch_base_addr; -+ -+ /* -+ * Depending upon size of the patch payload, download the patches in -+ * segments with a max. size of 239 bytes -+ */ -+ for (index = 1; index <= no_of_patch_segment; index++) { -+ /* Frame the HCI CMD PKT to be sent to Controller*/ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr, -+ index, MAX_DATA_PER_SEGMENT); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]); -+ -+ /* Initialize the RSP packet everytime to 0 */ -+ memset(rsp, 0x0, HCI_MAX_EVENT_SIZE); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to send the patch payload to the Controller!\n"); -+ goto error; -+ } -+ -+ /* Read Command Complete Event */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to downlaod patch segment: %d!\n", -+ __FUNCTION__, index); -+ goto error; -+ } -+ } -+ -+ /* Check if any pending patch data to be sent */ -+ size = (rampatch_patch_info.patch_length < MAX_DATA_PER_SEGMENT) ? -+ rampatch_patch_info.patch_length : -+ (rampatch_patch_info.patch_length % MAX_DATA_PER_SEGMENT); -+ -+ if (size) { -+ /* Frame the HCI CMD PKT to be sent to Controller*/ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_DLD_REQ_CMD, p_base_addr, index, size); -+ -+ /* Initialize the RSP packet everytime to 0 */ -+ memset(rsp, 0x0, HCI_MAX_EVENT_SIZE); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to send the patch payload to the Controller!\n"); -+ goto error; -+ } -+ -+ /* Read Command Complete Event */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to downlaod patch segment: %d!\n", -+ __FUNCTION__, index); -+ goto error; -+ } -+ } -+ -+error: -+ return err; -+} -+ -+static int rome_download_rampatch(int fd) -+{ -+ int c, size, index, ret = -1; -+ -+ /* Get handle to the RAMPATCH binary file */ -+ fprintf(stderr, "%s: Getting handle to the RAMPATCH binary file from %s\n", __FUNCTION__, ROME_FW_PATH); -+ file = fopen(ROME_FW_PATH, "r"); -+ if (file == NULL) { -+ fprintf(stderr, "%s: Failed to get handle to the RAMPATCH bin file!\n", -+ __FUNCTION__); -+ return -ENFILE; -+ } -+ -+ /* Allocate memory for the patch headder info */ -+ fprintf(stderr, "%s: Allocating memory for the patch header\n", __FUNCTION__); -+ phdr_buffer = (unsigned char *) malloc(PATCH_HDR_LEN + 1); -+ if (phdr_buffer == NULL) { -+ fprintf(stderr, "%s: Failed to allocate memory for patch header\n", -+ __FUNCTION__); -+ goto phdr_alloc_failed; -+ } -+ for (index = 0; index < PATCH_HDR_LEN + 1; index++) -+ phdr_buffer[index] = 0x0; -+ -+ /* Read 28 bytes of patch header information */ -+ fprintf(stderr, "%s: Reading patch header info\n", __FUNCTION__); -+ index = 0; -+ do { -+ c = fgetc (file); -+ phdr_buffer[index++] = (unsigned char)c; -+ } while (index != PATCH_HDR_LEN); -+ -+ /* Save the patch header info into local structure */ -+ fprintf(stderr, "%s: Saving patch hdr. info\n", __FUNCTION__); -+ rome_extract_patch_header_info((unsigned char *)phdr_buffer); -+ -+ /* Set the patch header info onto the Controller */ -+ ret = rome_edl_set_patch_request(fd); -+ if (ret < 0) { -+ fprintf(stderr, "%s: Error setting the patchheader info!\n", __FUNCTION__); -+ goto pdata_alloc_failed; -+ } -+ -+ /* Allocate memory for the patch payload */ -+ fprintf(stderr, "%s: Allocating memory for patch payload\n", __FUNCTION__); -+ size = rampatch_patch_info.patch_length; -+ pdata_buffer = (unsigned char *) malloc(size+1); -+ if (pdata_buffer == NULL) { -+ fprintf(stderr, "%s: Failed to allocate memory for patch payload\n", -+ __FUNCTION__); -+ goto pdata_alloc_failed; -+ } -+ for (index = 0; index < size+1; index++) -+ pdata_buffer[index] = 0x0; -+ -+ /* Read the patch data from Rampatch binary image */ -+ fprintf(stderr, "%s: Reading patch payload from RAMPATCH file\n", __FUNCTION__); -+ index = 0; -+ do { -+ c = fgetc (file); -+ pdata_buffer[index++] = (unsigned char)c; -+ } while (c != EOF); -+ -+ /* Downloading patches in segments to controller */ -+ ret = rome_edl_patch_download_request(fd); -+ if (ret < 0) { -+ fprintf(stderr, "%s: Error downloading patch segments!\n", __FUNCTION__); -+ goto cleanup; -+ } -+cleanup: -+ free(pdata_buffer); -+pdata_alloc_failed: -+ free(phdr_buffer); -+phdr_alloc_failed: -+ fclose(file); -+ -+ return ret; -+} -+ -+int rome_attach_rampatch(int fd) -+{ -+ int size, err; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+ /* Frame the HCI CMD to be sent to the Controller */ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_ATCH_REQ_CMD, 0, -+ -1, EDL_PATCH_CMD_LEN); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to attach the patch payload to the Controller!\n"); -+ goto error; -+ } -+ -+ /* Read Command Complete Event */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to attach the patch segment(s)\n", __FUNCTION__); -+ goto error; -+ } -+error: -+ return err; -+} -+ -+int rome_rampatch_reset(int fd) -+{ -+ int size, err = 0; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ struct timespec tm = { 0, 100*1000*1000 }; /* 100 ms */ -+ -+ /* Frame the HCI CMD to be sent to the Controller */ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_RST_REQ_CMD, 0, -+ -1, EDL_PATCH_CMD_LEN); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN); -+ -+ /* Send HCI Command packet to Controller */ -+ err = write(fd, cmd, size); -+ if (err != size) { -+ fprintf(stderr, "%s: Send failed with ret value: %d\n", __FUNCTION__, err); -+ goto error; -+ } -+ -+ /* -+ * Controller doesn't sends any response for the patch reset -+ * command. HOST has to wait for 100ms before proceeding. -+ */ -+ nanosleep(&tm, NULL); -+ -+error: -+ return err; -+} -+ -+int get_value_from_config(char *file_path,char *param) -+{ -+ FILE *pfile = NULL; -+ char *line = NULL; -+ char *pch = NULL; -+ char param_str[20]; -+ int bytes_read = 0, position; -+ int ret = -1; -+ -+ if (!file_path || !param) { -+ fprintf(stderr,"Invalid arguments\n"); -+ return -EINVAL; -+ } -+ -+ pfile = fopen(file_path, "r" ); -+ if (!pfile) { -+ fprintf(stderr, "Failed to open %s\n", file_path); -+ return ret; -+ } -+ -+ while (getline(&line, &bytes_read, pfile) > 0 ) { -+ if (line[0] != '#' && line[0] != '\n') { -+ pch = memchr(line, '=', strlen(line)); -+ if (pch != NULL) { -+ position = pch - line; -+ strncpy(param_str, line, position); -+ if (strncmp(param_str, param, position) == 0) { -+ ret = atoi(pch + 1); -+ break; -+ } -+ } -+ } -+ } -+ free(line); -+ fclose(pfile); -+ return ret; -+} -+ -+int read_bd_address(unsigned char *bdaddr) -+{ -+ int fd = -1; -+ int readPtr = 0; -+ unsigned char data[BD_ADDR_LEN]; -+ -+ /* Open the persist file for reading device address*/ -+ fd = open("/etc/bluetooth/.bt_nv.bin", O_RDONLY); -+ if (fd < 0) { -+ fprintf(stderr, "%s: Open failed: Programming default BD ADDR\n", __func__); -+ return -1; -+ } -+ -+ /* Read the NVM Header : fp will be advanced by readPtr number of bytes */ -+ readPtr = read(fd, data, PERSIST_HEADER_LEN); -+ if (readPtr > 0) -+ fprintf(stderr, "%s: Persist header data: %02x \t %02x \t %02x\n", __func__, -+ data[NVITEM], data[RDWR_PROT], data[NVITEM_SIZE]); -+ else { -+ fprintf(stderr, "%s: Read from persist memory failed : Programming default" -+ " BD ADDR\n"); -+ close(fd); -+ return -1; -+ } -+ -+ /* Check for BD ADDR length before programming */ -+ if (data[NVITEM_SIZE] != BD_ADDR_LEN) { -+ fprintf(stderr, "Invalid BD ADDR: Programming default BD ADDR!\n"); -+ close(fd); -+ return -1; -+ } -+ -+ /* Read the BD ADDR info */ -+ readPtr = read(fd, data, BD_ADDR_LEN); -+ if (readPtr > 0) -+ fprintf(stderr, "BD-ADDR: ==> %02x:%02x:%02x:%02x:%02x:%02x\n", data[0], -+ data[1], data[2], data[3], data[4], data[5]); -+ else { -+ fprintf(stderr, "%s: Read from persist memory failed : Programming default" -+ " BD ADDR\n"); -+ close(fd); -+ return -1; -+ } -+ memcpy(bdaddr, data, BD_ADDR_LEN); -+ close(fd); -+ return 0; -+} -+ -+int isSpeedValid(int speed, unsigned char *baud_rate) -+{ -+ switch(speed) { -+ case 9600: -+ *baud_rate = BAUDRATE_9600; -+ break; -+ case 19200: -+ *baud_rate = BAUDRATE_19200; -+ break; -+ case 57600: -+ *baud_rate = BAUDRATE_57600; -+ break; -+ case 115200: -+ *baud_rate = BAUDRATE_115200; -+ break; -+ case 230400: -+ *baud_rate = BAUDRATE_230400; -+ break; -+ case 460800: -+ *baud_rate = BAUDRATE_460800; -+ break; -+ case 921600: -+ *baud_rate = BAUDRATE_921600; -+ break; -+ case 1000000: -+ *baud_rate = BAUDRATE_1000000; -+ break; -+ case 2000000: -+ *baud_rate = BAUDRATE_2000000; -+ break; -+ case 3000000: -+ *baud_rate = BAUDRATE_3000000; -+ break; -+ case 4000000: -+ *baud_rate = BAUDRATE_4000000; -+ break; -+ case 300: -+ case 600: -+ case 1200: -+ case 2400: -+ default: -+ fprintf(stderr, "Invalid baudrate, default to 115200!\n"); -+ *baud_rate = BAUDRATE_115200; -+ break; -+ } -+ return -1; -+} -+ -+int rome_get_tlv_file(char *file_path, unsigned char baud_rate) -+{ -+ FILE * pFile; -+ long fileSize; -+ int readSize, nvm_length, nvm_index, i; -+ unsigned short nvm_tag_len; -+ tlv_patch_info *ptlv_header; -+ tlv_nvm_hdr *nvm_ptr; -+ unsigned char data_buf[PRINT_BUF_SIZE]={0,}; -+ unsigned char *nvm_byte_ptr; -+ unsigned char bdaddr[6]; -+ unsigned short pcm_value, ibs_value; -+ unsigned short deep_sleep_value; -+ -+ pFile = fopen ( file_path , "r" ); -+ if (pFile==NULL) { -+ fprintf(stderr, "%s File Open Fail\n", file_path); -+ return -1; -+ } -+ -+ /* Get File Size */ -+ fseek (pFile , 0 , SEEK_END); -+ -+ if ((fileSize = ftell(pFile)) < 0) { -+ fprintf(stderr, "%s: fail to get current file position\n", file_path); -+ fclose(pFile); -+ return -1; -+ } -+ -+ if (fileSize == 0) { -+ fprintf(stderr, "%s: no content in the file\n", file_path); -+ fclose(pFile); -+ return -1; -+ } -+ -+ rewind (pFile); -+ -+ pdata_buffer = (unsigned char*) malloc (sizeof(char)*fileSize); -+ if (pdata_buffer == NULL) { -+ fprintf(stderr, "Allocated Memory failed\n"); -+ fclose (pFile); -+ return -1; -+ } -+ -+ /* Copy file into allocated buffer */ -+ readSize = fread (pdata_buffer,1,fileSize,pFile); -+ -+ /* File Close */ -+ fclose (pFile); -+ -+ if (readSize != fileSize) { -+ fprintf(stderr, "Read file size(%d) not matched with actual file size (%ld bytes)\n",readSize,fileSize); -+ return -1; -+ } -+ -+ ptlv_header = (tlv_patch_info *) pdata_buffer; -+ -+ /* To handle different event between rampatch and NVM */ -+ gTlv_type = ptlv_header->tlv_type; -+ gtlv_dwndcfg = ptlv_header->tlv.patch.dwnd_cfg; -+ -+ if (ptlv_header->tlv_type == TLV_TYPE_PATCH) { -+ PR_INFO("====================================================\n"); -+ PR_INFO("TLV Type : 0x%x\n", ptlv_header->tlv_type); -+ PR_INFO("Length : %d bytes\n", (ptlv_header->tlv_length1) | -+ (ptlv_header->tlv_length2 << 8) | -+ (ptlv_header->tlv_length3 << 16)); -+ PR_INFO("Total Length : %d bytes\n", ptlv_header->tlv.patch.tlv_data_len); -+ PR_INFO("Patch Data Length : %d bytes\n",ptlv_header->tlv.patch.tlv_patch_data_len); -+ PR_INFO("Signing Format Version : 0x%x\n", ptlv_header->tlv.patch.sign_ver); -+ PR_INFO("Signature Algorithm : 0x%x\n", ptlv_header->tlv.patch.sign_algorithm); -+ PR_INFO("Event Handling : 0x%x\n", ptlv_header->tlv.patch.dwnd_cfg); -+ PR_INFO("Reserved : 0x%x\n", ptlv_header->tlv.patch.reserved1); -+ PR_INFO("Product ID : 0x%04x\n", ptlv_header->tlv.patch.prod_id); -+ PR_INFO("Rom Build Version : 0x%04x\n", ptlv_header->tlv.patch.build_ver); -+ PR_INFO("Patch Version : 0x%04x\n", ptlv_header->tlv.patch.patch_ver); -+ PR_INFO("Reserved : 0x%x\n", ptlv_header->tlv.patch.reserved2); -+ PR_INFO("Patch Entry Address : 0x%x\n", (ptlv_header->tlv.patch.patch_entry_addr)); -+ PR_INFO("====================================================\n"); -+ -+ } else if (ptlv_header->tlv_type == TLV_TYPE_NVM) { -+ PR_INFO("====================================================\n"); -+ PR_INFO("TLV Type : 0x%x\n", ptlv_header->tlv_type); -+ PR_INFO("Length : %d bytes\n", nvm_length = -+ (ptlv_header->tlv_length1) | -+ (ptlv_header->tlv_length2 << 8) | -+ (ptlv_header->tlv_length3 << 16)); -+ -+ if (nvm_length <= 0) -+ return readSize; -+ -+ for(nvm_byte_ptr=(unsigned char *)(nvm_ptr = &(ptlv_header->tlv.nvm)), nvm_index=0; -+ nvm_index < nvm_length ; nvm_ptr = (tlv_nvm_hdr *) nvm_byte_ptr) { -+ PR_DBG("TAG ID\t\t\t : %d\n", nvm_ptr->tag_id); -+ PR_DBG("TAG Length\t\t\t : %d\n", nvm_tag_len = nvm_ptr->tag_len); -+ PR_DBG("TAG Pointer\t\t\t : %d\n", nvm_ptr->tag_ptr); -+ PR_DBG("TAG Extended Flag\t\t : %d\n", nvm_ptr->tag_ex_flag); -+ -+ /* Increase nvm_index to NVM data */ -+ nvm_index+=sizeof(tlv_nvm_hdr); -+ nvm_byte_ptr+=sizeof(tlv_nvm_hdr); -+ -+#ifndef MODULE_HAS_MAC_ADDR -+ /* Write BD Address */ -+ if (nvm_ptr->tag_id == TAG_NUM_2 && read_bd_address(bdaddr) == 0) { -+ memcpy(nvm_byte_ptr, bdaddr, 6); -+ PR_INFO("Overriding default BD ADDR with user" -+ " programmed BD Address: %02x:%02x:%02x:%02x:%02x:%02x\n", -+ *nvm_byte_ptr, *(nvm_byte_ptr+1), *(nvm_byte_ptr+2), -+ *(nvm_byte_ptr+3), *(nvm_byte_ptr+4), *(nvm_byte_ptr+5)); -+ } -+#else -+ /* Remove it from NVM data */ -+ if (nvm_ptr->tag_id == TAG_NUM_2) { -+ int nvm_size = nvm_ptr->tag_len + sizeof(tlv_nvm_hdr); -+ PR_INFO("Skip BD Address from NVM\n"); -+ nvm_index += nvm_ptr->tag_len; -+ nvm_byte_ptr += nvm_ptr->tag_len; -+ memmove(nvm_ptr, nvm_byte_ptr, nvm_length - nvm_index); -+ nvm_length -= nvm_size; -+ nvm_byte_ptr -= nvm_size; -+ readSize -= nvm_size; -+ nvm_index -= nvm_size; -+ continue; -+ } -+#endif -+ -+ if (nvm_ptr->tag_id == TAG_NUM_17) { -+ PR_DBG("Forcing IBS to be disabled\n"); -+ nvm_byte_ptr[FWCONF_IBS_VAL_OFFSET] &= -+ (~(FWCONF_IBS_ENABLE << FWCONF_IBS_VAL_BIT)); -+ if (baud_rate != nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET]) { -+ PR_INFO("Change Vendor Baud from 0x%02x to 0x%02x\n", -+ nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET], baud_rate); -+ nvm_byte_ptr[FWCONF_BAUD_VAL_OFFSET] = baud_rate; -+ } -+ } -+ -+ if (nvm_ptr->tag_id == TAG_NUM_27) { -+ if ((deep_sleep_value = -+ get_value_from_config(FW_CONFIG_FILE_PATH, "DEEP_SLEEP")) >= 0) { -+ if (deep_sleep_value == FWCONF_DEEP_SLEEP_DISABLE) { -+ nvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] &= -+ (~(1 << FWCONF_DEEP_SLEEP_BIT_OFFSET)); -+ } else if (deep_sleep_value == FWCONF_DEEP_SLEEP_ENABLE) { -+ nvm_byte_ptr[FWCONF_DEEP_SLEEP_BYTE_OFFSET] |= -+ (1 << FWCONF_DEEP_SLEEP_BIT_OFFSET); -+ } else { -+ fprintf(stderr, "Ignoring invalid deep sleep config value\n"); -+ } -+ } -+ } -+ -+ /* Read from file and check what PCM Configuration is required: -+ * Master = 0 /Slave = 1 */ -+ /* Override PCM configuration */ -+ if (nvm_ptr->tag_id == TAG_NUM_44) { -+ if ((pcm_value = -+ get_value_from_config(FW_CONFIG_FILE_PATH, "PCM")) >= 0) { -+ -+ if (pcm_value == FWCONF_PCM_SLAVE) { -+ nvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] |= -+ (1 << FWCONF_PCM_ROLE_BIT_OFFSET); -+ nvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] |= -+ (1 << FWCONF_PCM_ROLE_BIT_OFFSET); -+ } else if (pcm_value == FWCONF_PCM_MASTER) { -+ nvm_byte_ptr[FWCONF_PCM_MS_OFFSET_1] &= -+ (~(1 << FWCONF_PCM_ROLE_BIT_OFFSET)); -+ nvm_byte_ptr[FWCONF_PCM_MS_OFFSET_2] &= -+ (~(1 << FWCONF_PCM_ROLE_BIT_OFFSET)); -+ } -+ } -+ } -+ -+ for(i =0;(itag_len && (i*3 + 2) < PRINT_BUF_SIZE);i++) -+ snprintf((char *) data_buf, PRINT_BUF_SIZE, "%s%.02x ", -+ (char *)data_buf, *(nvm_byte_ptr + i)); -+ -+ PR_DBG("TAG Data\t\t\t : %s\n", data_buf); -+ -+ /* Clear buffer */ -+ memset(data_buf, 0x0, PRINT_BUF_SIZE); -+ -+ /* increased by tag_len */ -+ nvm_index+=nvm_ptr->tag_len; -+ nvm_byte_ptr +=nvm_ptr->tag_len; -+ } -+ -+ PR_INFO("====================================================\n"); -+ -+ } else { -+ fprintf(stderr, "TLV Header type is unknown (%d) \n", ptlv_header->tlv_type); -+ } -+ -+ return readSize; -+} -+ -+int rome_tlv_dnld_segment(int fd, int index, int seg_size, unsigned char wait_cc_evt) -+{ -+ int size=0, err = -1; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+ /* Frame the HCI CMD PKT to be sent to Controller*/ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_TLV_REQ_CMD, 0, index, seg_size); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + cmd[PLEN]); -+ -+ /* Initialize the RSP packet everytime to 0 */ -+ memset(rsp, 0x0, HCI_MAX_EVENT_SIZE); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to send the patch payload to the Controller! 0x%x\n", err); -+ return err; -+ } -+ -+ if (wait_cc_evt) { -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to downlaod patch segment: %d!\n", __FUNCTION__, index); -+ return err; -+ } -+ } -+ -+ return err; -+} -+ -+int rome_tlv_dnld_req(int fd, int tlv_size) -+{ -+ int total_segment, remain_size, i, err = -1; -+ unsigned char wait_cc_evt = FALSE; -+ unsigned int rom = rome_ver >> 16; -+ -+ total_segment = tlv_size/MAX_SIZE_PER_TLV_SEGMENT; -+ remain_size = (tlv_size < MAX_SIZE_PER_TLV_SEGMENT)?\ -+ tlv_size: (tlv_size%MAX_SIZE_PER_TLV_SEGMENT); -+ -+ if (gTlv_type == TLV_TYPE_PATCH) { -+ /* Prior to Rome version 3.2(including inital few rampatch release of -+ * Rome 3.2), the event handling mechanism is ROME_SKIP_EVT_NONE. After -+ * few release of rampatch for Rome 3.2, the mechamism is changed to -+ * ROME_SKIP_EVT_VSE_CC. Rest of the mechanism is not used for now -+ */ -+ switch (gtlv_dwndcfg) -+ { -+ case ROME_SKIP_EVT_NONE: -+ wait_vsc_evt = TRUE; -+ wait_cc_evt = TRUE; -+ PR_DBG("%s: Event handling type: ROME_SKIP_EVT_NONE", __func__); -+ break; -+ case ROME_SKIP_EVT_VSE_CC: -+ wait_vsc_evt = FALSE; -+ wait_cc_evt = FALSE; -+ PR_DBG("%s: Event handling type: ROME_SKIP_EVT_VSE_CC", __func__); -+ break; -+ /* Not handled for now */ -+ case ROME_SKIP_EVT_VSE: -+ case ROME_SKIP_EVT_CC: -+ default: -+ fprintf(stderr, "%s: Unsupported Event handling: %d", __func__, gtlv_dwndcfg); -+ break; -+ } -+ } else { -+ wait_vsc_evt = TRUE; -+ wait_cc_evt = TRUE; -+ } -+ -+ for(i = 0; i < total_segment; i++) { -+ if ((i+1) == total_segment) { -+ if ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) && -+ (gTlv_type == TLV_TYPE_PATCH)) { -+ /* If the Rome version is from 1.1 to 3.1 -+ * 1. No CCE for the last command segment but all other segment -+ * 2. All the command segments get VSE including the last one -+ */ -+ wait_cc_evt = !remain_size ? FALSE: TRUE; -+ } else if ((rom == ROME_PATCH_VER_0302) && -+ (gTlv_type == TLV_TYPE_PATCH)) { -+ /* If the Rome version is 3.2 -+ * 1. None of the command segments receive CCE -+ * 2. No command segments receive VSE except the last one -+ * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is -+ * same as Rome 2.1, 2.2, 3.0 -+ */ -+ if (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) { -+ wait_cc_evt = !remain_size ? FALSE: TRUE; -+ } else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) { -+ wait_vsc_evt = !remain_size ? TRUE: FALSE; -+ } -+ } -+ } -+ -+ if ((err = rome_tlv_dnld_segment(fd, i, MAX_SIZE_PER_TLV_SEGMENT, wait_cc_evt )) < 0) -+ goto error; -+ } -+ -+ if ((rom >= ROME_PATCH_VER_0100) && (rom < ROME_PATCH_VER_0302) && -+ (gTlv_type == TLV_TYPE_PATCH)) { -+ /* If the Rome version is from 1.1 to 3.1 -+ * 1. No CCE for the last command segment but all other segment -+ * 2. All the command segments get VSE including the last one -+ */ -+ wait_cc_evt = remain_size ? FALSE: TRUE; -+ } else if ((rom == ROME_PATCH_VER_0302) && (gTlv_type == TLV_TYPE_PATCH)) { -+ /* If the Rome version is 3.2 -+ * 1. None of the command segments receive CCE -+ * 2. No command segments receive VSE except the last one -+ * 3. If gtlv_dwndcfg is ROME_SKIP_EVT_NONE then the logic is -+ * same as Rome 2.1, 2.2, 3.0 -+ */ -+ if (gtlv_dwndcfg == ROME_SKIP_EVT_NONE) { -+ wait_cc_evt = remain_size ? FALSE: TRUE; -+ } else if (gtlv_dwndcfg == ROME_SKIP_EVT_VSE_CC) { -+ wait_vsc_evt = remain_size ? TRUE: FALSE; -+ } -+ } -+ -+ if (remain_size) err =rome_tlv_dnld_segment(fd, i, remain_size, wait_cc_evt); -+ -+error: -+ return err; -+} -+ -+int rome_download_tlv_file(int fd, unsigned char baud_rate) -+{ -+ int tlv_size, err = -1; -+ -+ /* Rampatch TLV file Downloading */ -+ pdata_buffer = NULL; -+ -+ if ((tlv_size = rome_get_tlv_file(rampatch_file_path, baud_rate)) < 0) -+ goto error; -+ -+ if ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0) -+ goto error; -+ -+ if (pdata_buffer != NULL) { -+ free (pdata_buffer); -+ pdata_buffer = NULL; -+ } -+ -+ /* NVM TLV file Downloading */ -+ if ((tlv_size = rome_get_tlv_file(nvm_file_path, baud_rate)) < 0) -+ goto error; -+ -+ if ((err = rome_tlv_dnld_req(fd, tlv_size)) < 0) -+ goto error; -+ -+error: -+ if (pdata_buffer != NULL) -+ free (pdata_buffer); -+ -+ return err; -+} -+ -+int rome_1_0_nvm_tag_dnld(int fd) -+{ -+ int i, size, err = 0; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+#if (NVM_VERSION >= ROME_1_0_100019) -+ unsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] = -+ { -+ /* Tag 2 */ /* BD Address */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 9, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 2, -+ /* Tag Len */ 6, -+ /* Tag Value */ 0x77,0x78,0x23,0x01,0x56,0x22 -+ }, -+ /* Tag 6 */ /* Bluetooth Support Features */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 11, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 6, -+ /* Tag Len */ 8, -+ /* Tag Value */ 0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B -+ }, -+ /* Tag 17 */ /* HCI Transport Layer Setting */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 11, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 17, -+ /* Tag Len */ 8, -+ /* Tag Value */ 0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00 -+ }, -+ /* Tag 35 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 58, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 35, -+ /* Tag Len */ 55, -+ /* Tag Value */ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x58, 0x59, -+ 0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F, -+ 0x0E, 0x0E, 0x16, 0x16, 0x16, 0x1E, 0x26, 0x5F, 0x2F, 0x5F, -+ 0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80, -+ 0x0C, 0x18, 0x14, 0x24, 0x40, 0x4C, 0x70, 0x80, 0x80, 0x80, -+ 0x1B, 0x14, 0x01, 0x04, 0x48 -+ }, -+ /* Tag 36 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 15, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 36, -+ /* Tag Len */ 12, -+ /* Tag Value */ 0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00 -+ }, -+ /* Tag 39 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 7, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 39, -+ /* Tag Len */ 4, -+ /* Tag Value */ 0x12,0x00,0x00,0x00 -+ }, -+ /* Tag 41 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 91, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 41, -+ /* Tag Len */ 88, -+ /* Tag Value */ 0x15, 0x00, 0x00, 0x00, 0xF6, 0x02, 0x00, 0x00, 0x76, 0x00, -+ 0x1E, 0x00, 0x29, 0x02, 0x1F, 0x00, 0x61, 0x00, 0x1A, 0x00, -+ 0x76, 0x00, 0x1E, 0x00, 0x7D, 0x00, 0x40, 0x00, 0x91, 0x00, -+ 0x06, 0x00, 0x92, 0x00, 0x03, 0x00, 0xA6, 0x01, 0x50, 0x00, -+ 0xAA, 0x01, 0x15, 0x00, 0xAB, 0x01, 0x0A, 0x00, 0xAC, 0x01, -+ 0x00, 0x00, 0xB0, 0x01, 0xC5, 0x00, 0xB3, 0x01, 0x03, 0x00, -+ 0xB4, 0x01, 0x13, 0x00, 0xB5, 0x01, 0x0C, 0x00, 0xC5, 0x01, -+ 0x0D, 0x00, 0xC6, 0x01, 0x10, 0x00, 0xCA, 0x01, 0x2B, 0x00, -+ 0xCB, 0x01, 0x5F, 0x00, 0xCC, 0x01, 0x48, 0x00 -+ }, -+ /* Tag 42 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 63, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 42, -+ /* Tag Len */ 60, -+ /* Tag Value */ 0xD7, 0xC0, 0x00, 0x00, 0x8F, 0x5C, 0x02, 0x00, 0x80, 0x47, -+ 0x60, 0x0C, 0x70, 0x4C, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x01, -+ 0x42, 0x01, 0x69, 0x01, 0x95, 0x01, 0xC7, 0x01, 0xFE, 0x01, -+ 0x3D, 0x02, 0x83, 0x02, 0xD1, 0x02, 0x29, 0x03, 0x00, 0x0A, -+ 0x10, 0x00, 0x1F, 0x00, 0x3F, 0x00, 0x7F, 0x00, 0xFD, 0x00, -+ 0xF9, 0x01, 0xF1, 0x03, 0xDE, 0x07, 0x00, 0x00, 0x9A, 0x01 -+ }, -+ /* Tag 84 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 153, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 84, -+ /* Tag Len */ 150, -+ /* Tag Value */ 0x7C, 0x6A, 0x59, 0x47, 0x19, 0x36, 0x35, 0x25, 0x25, 0x28, -+ 0x2C, 0x2B, 0x2B, 0x28, 0x2C, 0x28, 0x29, 0x28, 0x29, 0x28, -+ 0x29, 0x29, 0x2C, 0x29, 0x2C, 0x29, 0x2C, 0x28, 0x29, 0x28, -+ 0x29, 0x28, 0x29, 0x2A, 0x00, 0x00, 0x2C, 0x2A, 0x2C, 0x18, -+ 0x98, 0x98, 0x98, 0x98, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, -+ 0x1E, 0x13, 0x1E, 0x1E, 0x1E, 0x1E, 0x13, 0x13, 0x11, 0x13, -+ 0x1E, 0x1E, 0x13, 0x12, 0x12, 0x12, 0x11, 0x12, 0x1F, 0x12, -+ 0x12, 0x12, 0x10, 0x0C, 0x18, 0x0D, 0x01, 0x01, 0x01, 0x01, -+ 0x01, 0x01, 0x01, 0x0C, 0x01, 0x01, 0x01, 0x01, 0x0D, 0x0D, -+ 0x0E, 0x0D, 0x01, 0x01, 0x0D, 0x0D, 0x0D, 0x0D, 0x0F, 0x0D, -+ 0x10, 0x0D, 0x0D, 0x0D, 0x0D, 0x10, 0x05, 0x10, 0x03, 0x00, -+ 0x7E, 0x7B, 0x7B, 0x72, 0x71, 0x50, 0x50, 0x50, 0x00, 0x40, -+ 0x60, 0x60, 0x30, 0x08, 0x02, 0x0F, 0x00, 0x01, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x16, 0x16, 0x08, 0x08, 0x00, -+ 0x00, 0x00, 0x1E, 0x34, 0x2B, 0x1B, 0x23, 0x2B, 0x15, 0x0D -+ }, -+ /* Tag 85 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 119, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 85, -+ /* Tag Len */ 116, -+ /* Tag Value */ 0x03, 0x00, 0x38, 0x00, 0x45, 0x77, 0x00, 0xE8, 0x00, 0x59, -+ 0x01, 0xCA, 0x01, 0x3B, 0x02, 0xAC, 0x02, 0x1D, 0x03, 0x8E, -+ 0x03, 0x00, 0x89, 0x01, 0x0E, 0x02, 0x5C, 0x02, 0xD7, 0x02, -+ 0xF8, 0x08, 0x01, 0x00, 0x1F, 0x00, 0x0A, 0x02, 0x55, 0x02, -+ 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x2A, 0xD7, 0x00, 0x00, -+ 0x00, 0x1E, 0xDE, 0x00, 0x00, 0x00, 0x14, 0x0F, 0x0A, 0x0F, -+ 0x0A, 0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x04, 0x04, 0x0C, 0x0C, -+ 0x0C, 0x0C, 0x06, 0x06, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, -+ 0x01, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, -+ 0x06, 0x0F, 0x14, 0x05, 0x47, 0xCF, 0x77, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0xAC, 0x7C, 0xFF, 0x40, 0x00, 0x00, 0x00, -+ 0x12, 0x04, 0x04, 0x01, 0x04, 0x03 -+ }, -+ {TAG_END} -+ }; -+#elif (NVM_VERSION == ROME_1_0_6002) -+ unsigned char cmds[MAX_TAG_CMD][HCI_MAX_CMD_SIZE] = -+ { -+ /* Tag 2 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 9, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 2, -+ /* Tag Len */ 6, -+ /* Tag Value */ 0x77,0x78,0x23,0x01,0x56,0x22 /* BD Address */ -+ }, -+ /* Tag 6 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 11, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 6, -+ /* Tag Len */ 8, -+ /* Tag Value */ 0xFF,0xFE,0x8B,0xFE,0xD8,0x3F,0x5B,0x8B -+ }, -+ /* Tag 17 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 11, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 17, -+ /* Tag Len */ 8, -+ /* Tag Value */ 0x82,0x01,0x0E,0x08,0x04,0x32,0x0A,0x00 -+ }, -+ /* Tag 36 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 15, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 36, -+ /* Tag Len */ 12, -+ /* Tag Value */ 0x0F,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x03,0x03,0x04,0x00 -+ }, -+ -+ /* Tag 39 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 7, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 39, -+ /* Tag Len */ 4, -+ /* Tag Value */ 0x12,0x00,0x00,0x00 -+ }, -+ -+ /* Tag 41 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 199, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 41, -+ /* Tag Len */ 196, -+ /* Tag Value */ 0x30,0x00,0x00,0x00,0xD5,0x00,0x0E,0x00,0xD6,0x00,0x0E,0x00, -+ 0xD7,0x00,0x16,0x00,0xD8,0x00,0x16,0x00,0xD9,0x00,0x16,0x00, -+ 0xDA,0x00,0x1E,0x00,0xDB,0x00,0x26,0x00,0xDC,0x00,0x5F,0x00, -+ 0xDD,0x00,0x2F,0x00,0xDE,0x00,0x5F,0x00,0xE0,0x00,0x0E,0x00, -+ 0xE1,0x00,0x0E,0x00,0xE2,0x00,0x16,0x00,0xE3,0x00,0x16,0x00, -+ 0xE4,0x00,0x16,0x00,0xE5,0x00,0x1E,0x00,0xE6,0x00,0x26,0x00, -+ 0xE7,0x00,0x5F,0x00,0xE8,0x00,0x2F,0x00,0xE9,0x00,0x5F,0x00, -+ 0xEC,0x00,0x0C,0x00,0xED,0x00,0x08,0x00,0xEE,0x00,0x14,0x00, -+ 0xEF,0x00,0x24,0x00,0xF0,0x00,0x40,0x00,0xF1,0x00,0x4C,0x00, -+ 0xF2,0x00,0x70,0x00,0xF3,0x00,0x80,0x00,0xF4,0x00,0x80,0x00, -+ 0xF5,0x00,0x80,0x00,0xF8,0x00,0x0C,0x00,0xF9,0x00,0x18,0x00, -+ 0xFA,0x00,0x14,0x00,0xFB,0x00,0x24,0x00,0xFC,0x00,0x40,0x00, -+ 0xFD,0x00,0x4C,0x00,0xFE,0x00,0x70,0x00,0xFF,0x00,0x80,0x00, -+ 0x00,0x01,0x80,0x00,0x01,0x01,0x80,0x00,0x04,0x01,0x1B,0x00, -+ 0x05,0x01,0x14,0x00,0x06,0x01,0x01,0x00,0x07,0x01,0x04,0x00, -+ 0x08,0x01,0x00,0x00,0x09,0x01,0x00,0x00,0x0A,0x01,0x03,0x00, -+ 0x0B,0x01,0x03,0x00 -+ }, -+ -+ /* Tag 44 */ -+ { /* Packet Type */HCI_COMMAND_PKT, -+ /* Opcode */ 0x0b,0xfc, -+ /* Total Len */ 44, -+ /* NVM CMD */ NVM_ACCESS_SET, -+ /* Tag Num */ 44, -+ /* Tag Len */ 41, -+ /* Tag Value */ 0x6F,0x0A,0x00,0x00,0x00,0x00,0x00,0x50,0xFF,0x10,0x02,0x02, -+ 0x01,0x00,0x14,0x01,0x06,0x28,0xA0,0x62,0x03,0x64,0x01,0x01, -+ 0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0xFF,0x10,0x02,0x01, -+ 0x00,0x14,0x01,0x02,0x03 -+ }, -+ {TAG_END} -+ }; -+#endif -+ -+ for (i=0; (i < MAX_TAG_CMD) && (cmds[i][0] != TAG_END); i++) { -+ /* Write BD Address */ -+ if (cmds[i][TAG_NUM_OFFSET] == TAG_NUM_2){ -+ memcpy(&cmds[i][TAG_BDADDR_OFFSET], vnd_local_bd_addr, 6); -+ fprintf(stderr, "BD Address: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", -+ cmds[i][TAG_BDADDR_OFFSET ], cmds[i][TAG_BDADDR_OFFSET + 1], -+ cmds[i][TAG_BDADDR_OFFSET + 2], cmds[i][TAG_BDADDR_OFFSET + 3], -+ cmds[i][TAG_BDADDR_OFFSET + 4], cmds[i][TAG_BDADDR_OFFSET + 5]); -+ } -+ size = cmds[i][3] + HCI_COMMAND_HDR_SIZE + 1; -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)&cmds[i][0], rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to attach the patch payload to the Controller!\n"); -+ goto error; -+ } -+ -+ /* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to get patch version(s)\n", __FUNCTION__); -+ goto error; -+ } -+ } -+ -+error: -+ return err; -+} -+ -+ -+ -+int rome_patch_ver_req(int fd) -+{ -+ int size, err = 0; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ -+ /* Frame the HCI CMD to be sent to the Controller */ -+ frame_hci_cmd_pkt(cmd, EDL_PATCH_VER_REQ_CMD, 0, -+ -1, EDL_PATCH_CMD_LEN); -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN); -+ -+ /* Send HCI Command packet to Controller */ -+ err = hci_send_vs_cmd(fd, (unsigned char *)cmd, rsp, size); -+ if (err != size) { -+ fprintf(stderr, "Failed to attach the patch payload to the Controller!\n"); -+ goto error; -+ } -+ -+ /* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to get patch version(s)\n", __FUNCTION__); -+ goto error; -+ } -+error: -+ return err; -+ -+} -+ -+static void flow_control(int fd, int opt) -+{ -+ struct termios c_opt; -+ -+ ioctl(fd, TIOCMGET, &c_opt); -+ c_opt.c_cc[VTIME] = 0; /* inter-character timer unused */ -+ c_opt.c_cc[VMIN] = 0; /* blocking read until 8 chars received */ -+ c_opt.c_cflag &= ~CSIZE; -+ c_opt.c_cflag |= (CS8 | CLOCAL | CREAD); -+ if (opt == MSM_ENABLE_FLOW_CTRL) -+ c_opt.c_cflag |= CRTSCTS; -+ else if (opt == MSM_DISABLE_FLOW_CTRL) -+ c_opt.c_cflag &= ~CRTSCTS; -+ else { -+ fprintf(stderr, "%s: Incorrect option passed for TIOCMSET\n", __func__); -+ return; -+ } -+ c_opt.c_iflag = IGNPAR; -+ c_opt.c_oflag = 0; -+ c_opt.c_lflag = 0; -+ ioctl(fd, TIOCMSET, &c_opt); -+} -+ -+ -+int rome_set_baudrate_req(int fd, unsigned char baud_rate) -+{ -+ int size, err = 0; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ hci_command_hdr *cmd_hdr; -+ int flags; -+ -+ memset(cmd, 0x0, HCI_MAX_CMD_SIZE); -+ -+ cmd_hdr = (void *) (cmd + 1); -+ cmd[0] = HCI_COMMAND_PKT; -+ cmd_hdr->opcode = cmd_opcode_pack(HCI_VENDOR_CMD_OGF, EDL_SET_BAUDRATE_CMD_OCF); -+ cmd_hdr->plen = VSC_SET_BAUDRATE_REQ_LEN; -+ cmd[4] = baud_rate; -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + VSC_SET_BAUDRATE_REQ_LEN); -+ -+ /* Flow off during baudrate change */ -+ flow_control(fd, MSM_DISABLE_FLOW_CTRL); -+ -+ /* Send the HCI command packet to UART for transmission */ -+ err = write(fd, cmd, size); -+ if (err != size) { -+ fprintf(stderr, "%s: Send failed with ret value: %d\n", __FUNCTION__, err); -+ goto error; -+ } -+ /* Change Local UART baudrate to high speed UART */ -+ userial_vendor_set_baud(baud_rate); -+ -+ /* Flow on after changing local uart baudrate */ -+ flow_control(fd, MSM_ENABLE_FLOW_CTRL); -+ -+ /* Check for response from the Controller */ -+ if ((err = read_vs_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE)) < 0) { -+ fprintf(stderr, "%s: Failed to get HCI-VS Event from SOC\n", __FUNCTION__); -+ goto error; -+ } -+ -+ /* Wait for command complete event */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to set patch info on Controller\n", __FUNCTION__); -+ goto error; -+ } -+error: -+ return err; -+ -+} -+ -+ -+int rome_hci_reset_req(int fd, char baud) -+{ -+ int size, err = 0; -+ unsigned char cmd[HCI_MAX_CMD_SIZE]; -+ unsigned char rsp[HCI_MAX_EVENT_SIZE]; -+ hci_command_hdr *cmd_hdr; -+ int flags; -+ -+ memset(cmd, 0x0, HCI_MAX_CMD_SIZE); -+ -+ cmd_hdr = (void *) (cmd + 1); -+ cmd[0] = HCI_COMMAND_PKT; -+ cmd_hdr->opcode = HCI_RESET; -+ cmd_hdr->plen = 0; -+ -+ /* Total length of the packet to be sent to the Controller */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE); -+ -+ /* Flow off during baudrate change */ -+ flow_control(fd, MSM_DISABLE_FLOW_CTRL); -+ -+ /* Send the HCI command packet to UART for transmission */ -+ err = write(fd, cmd, size); -+ if (err != size) { -+ fprintf(stderr, "%s: Send failed with ret value: %d\n", __FUNCTION__, err); -+ goto error; -+ } -+ -+ /* Change Local UART baudrate to high speed UART */ -+ userial_vendor_set_baud(baud); -+ -+ /* Flow on after changing local uart baudrate */ -+ flow_control(fd, MSM_ENABLE_FLOW_CTRL); -+ -+ /* Wait for command complete event */ -+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE); -+ if (err < 0) { -+ fprintf(stderr, "%s: Failed to set patch info on Controller\n", __FUNCTION__); -+ goto error; -+ } -+ -+error: -+ return err; -+ -+} -+ -+int qca_soc_init(int fd, int speed, char *bdaddr) -+{ -+ int err = -1; -+ int ret = 0; -+ int size; -+ unsigned char baud_rate = 0; -+ -+ vnd_userial.fd = fd; -+ -+ /* Get Rome version information */ -+ if ((err = rome_patch_ver_req(fd)) < 0) { -+ fprintf(stderr, "%s: Fail to get Rome Version (0x%x)\n", __FUNCTION__, err); -+ ret = -1; -+ goto error; -+ } -+ -+ fprintf(stderr, "%s: Rome Version (0x%08x)\n", __FUNCTION__, rome_ver); -+ -+ switch (rome_ver){ -+ case ROME_VER_1_0: -+ /* Set and Download the RAMPATCH */ -+ fprintf(stderr, "%s: Setting Patch Header & Downloading Patches\n", __FUNCTION__); -+ err = rome_download_rampatch(fd); -+ if (err < 0) { -+ fprintf(stderr, "%s: DOWNLOAD RAMPATCH failed!\n", __FUNCTION__); -+ ret = -1; -+ goto error; -+ } -+ -+ /* Attach the RAMPATCH */ -+ fprintf(stderr, "%s: Attaching the patches\n", __FUNCTION__); -+ err = rome_attach_rampatch(fd); -+ if (err < 0) { -+ fprintf(stderr, "%s: ATTACH RAMPATCH failed!\n", __FUNCTION__); -+ ret = -1; -+ goto error; -+ } -+ -+ /* Send Reset */ -+ size = (HCI_CMD_IND + HCI_COMMAND_HDR_SIZE + EDL_PATCH_CMD_LEN); -+ err = rome_rampatch_reset(fd); -+ if (err < 0) { -+ fprintf(stderr, "Failed to RESET after RAMPATCH upgrade!\n"); -+ ret = -1; -+ goto error; -+ } -+ -+ /* NVM download */ -+ fprintf(stderr, "%s: Downloading NVM\n", __FUNCTION__); -+ err = rome_1_0_nvm_tag_dnld(fd); -+ if (err < 0) { -+ fprintf(stderr, "Downloading NVM Failed !!\n"); -+ ret = -1; -+ goto error; -+ } -+ -+ /* Change baud rate 115.2 kbps to 3Mbps*/ -+ err = rome_hci_reset_req(fd, baud_rate); -+ if (err < 0) { -+ fprintf(stderr, "HCI Reset Failed !!\n"); -+ ret = -1; -+ goto error; -+ } -+ break; -+ case ROME_VER_1_1: -+ rampatch_file_path = ROME_RAMPATCH_TLV_PATH; -+ nvm_file_path = ROME_NVM_TLV_PATH; -+ goto download; -+ case ROME_VER_1_3: -+ rampatch_file_path = ROME_RAMPATCH_TLV_1_0_3_PATH; -+ nvm_file_path = ROME_NVM_TLV_1_0_3_PATH; -+ goto download; -+ case ROME_VER_2_1: -+ rampatch_file_path = ROME_RAMPATCH_TLV_2_0_1_PATH; -+ nvm_file_path = ROME_NVM_TLV_2_0_1_PATH; -+ goto download; -+ case ROME_VER_3_0: -+ rampatch_file_path = ROME_RAMPATCH_TLV_3_0_0_PATH; -+ nvm_file_path = ROME_NVM_TLV_3_0_0_PATH; -+ goto download; -+ case ROME_VER_3_2: -+ rampatch_file_path = ROME_RAMPATCH_TLV_3_0_2_PATH; -+ nvm_file_path = ROME_NVM_TLV_3_0_2_PATH; -+ goto download; -+ case TUFELLO_VER_1_0: -+ rampatch_file_path = TF_RAMPATCH_TLV_1_0_0_PATH; -+ nvm_file_path = TF_NVM_TLV_1_0_0_PATH; -+ goto download; -+ case TUFELLO_VER_1_1: -+ rampatch_file_path = TF_RAMPATCH_TLV_1_0_1_PATH; -+ nvm_file_path = TF_NVM_TLV_1_0_1_PATH; -+download: -+ isSpeedValid(speed, &baud_rate); -+ if (baud_rate < 0) { -+ ret = -1; -+ goto error; -+ } -+ -+ /* Donwload TLV files (rampatch, NVM) */ -+ err = rome_download_tlv_file(fd, baud_rate); -+ if (err < 0) { -+ fprintf(stderr, "%s: Download TLV file failed!\n", __FUNCTION__); -+ ret = -1; -+ goto error; -+ } -+ -+ /* -+ * Overriding the baud rate value in NVM file with the user -+ * requested baud rate, since default baud rate in NVM file is 3M. -+ */ -+ err = rome_set_baudrate_req(fd, baud_rate); -+ if (err < 0) { -+ fprintf(stderr, "%s: Baud rate change failed!\n", __FUNCTION__); -+ ret = -1; -+ goto error; -+ } -+ -+ /* Perform HCI reset here*/ -+ err = rome_hci_reset_req(fd, baud_rate); -+ if (err < 0) { -+ fprintf(stderr, "HCI Reset Failed !!!\n"); -+ ret = -1; -+ goto error; -+ } -+ -+ break; -+ case ROME_VER_UNKNOWN: -+ default: -+ fprintf(stderr, "%s: Detected unknown ROME version\n", __FUNCTION__); -+ ret = -1; -+ break; -+ } -+ -+error: -+ return ret; -+} -diff --git a/tools/hciattach_rome.h b/tools/hciattach_rome.h -new file mode 100644 -index 000000000..597743e0b ---- /dev/null -+++ b/tools/hciattach_rome.h -@@ -0,0 +1,388 @@ -+/* -+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. -+ * Not a Contribution. -+ * Copyright 2012 The Android Open Source Project -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+#ifndef HW_ROME_H -+#define HW_ROME_H -+ -+/****************************************************************************** -+** Constants & Macros -+******************************************************************************/ -+#define HCI_MAX_CMD_SIZE 260 -+#define HCI_MAX_EVENT_SIZE 260 -+#define PRINT_BUF_SIZE ((HCI_MAX_CMD_SIZE * 3) + 2) -+/* HCI Command/Event Opcode */ -+#define HCI_RESET 0x0C03 -+#define EVT_CMD_COMPLETE 0x0E -+/* HCI Packet types */ -+#define HCI_COMMAND_PKT 0x01 -+#define HCI_ACLDATA_PKT 0x02 -+#define HCI_SCODATA_PKT 0x03 -+#define HCI_EVENT_PKT 0x04 -+#define HCI_VENDOR_PKT 0xff -+#define cmd_opcode_pack(ogf, ocf) (unsigned short)((ocf & 0x03ff)|(ogf << 10)) -+ -+#define NVITEM 0 -+#define RDWR_PROT 1 -+#define NVITEM_SIZE 2 -+#define PERSIST_HEADER_LEN 3 -+#define BD_ADDR_LEN 6 -+#define MSM_DISABLE_FLOW_CTRL 0 -+#define MSM_ENABLE_FLOW_CTRL 1 -+ -+#ifdef _PLATFORM_MDM_ -+#define USERIAL_OP_CLK_ON 0x5441 -+#define USERIAL_OP_CLK_OFF 0x5442 -+#endif -+ -+#define PR_INFO(fmt, arg...) printf(fmt, ## arg) -+#ifdef DEBUG -+ #define PR_DBG(fmt, arg...) printf(fmt, ## arg) -+#else -+ #define PR_DBG(fmt, arg...) -+#endif -+ -+unsigned char vnd_local_bd_addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -+typedef enum { -+ USERIAL_OP_FLOW_ON, -+ USERIAL_OP_FLOW_OFF, -+ USERIAL_OP_NOP, -+} userial_vendor_ioctl_op_t; -+ -+ -+/* vendor serial control block */ -+typedef struct -+{ -+ int fd; /* fd to Bluetooth device */ -+ struct termios termios; /* serial terminal of BT port */ -+ char port_name[256]; -+} vnd_userial_cb_t; -+ -+/**** baud rates ****/ -+#define USERIAL_BAUD_300 0 -+#define USERIAL_BAUD_600 1 -+#define USERIAL_BAUD_1200 2 -+#define USERIAL_BAUD_2400 3 -+#define USERIAL_BAUD_9600 4 -+#define USERIAL_BAUD_19200 5 -+#define USERIAL_BAUD_57600 6 -+#define USERIAL_BAUD_115200 7 -+#define USERIAL_BAUD_230400 8 -+#define USERIAL_BAUD_460800 9 -+#define USERIAL_BAUD_921600 10 -+#define USERIAL_BAUD_1M 11 -+#define USERIAL_BAUD_1_5M 12 -+#define USERIAL_BAUD_2M 13 -+#define USERIAL_BAUD_3M 14 -+#define USERIAL_BAUD_4M 15 -+#define USERIAL_BAUD_AUTO 16 -+ -+#ifndef FALSE -+#define FALSE 0 -+#endif -+ -+#ifndef TRUE -+#define TRUE (!FALSE) -+#endif -+ -+#define HCI_CHG_BAUD_CMD_OCF 0x0C -+#define HCI_VENDOR_CMD_OGF 0x3F -+#define WRITE_BDADDR_CMD_LEN 14 -+#define WRITE_BAUD_CMD_LEN 6 -+#define MAX_CMD_LEN WRITE_BDADDR_CMD_LEN -+#define GET_VERSION_OCF 0x1E -+ -+#define PS_HDR_LEN 4 -+#define HCI_VENDOR_CMD_OGF 0x3F -+#define HCI_PS_CMD_OCF 0x0B -+ -+#define HCI_COMMAND_HDR_SIZE 3 -+#define EVT_CMD_COMPLETE_SIZE 3 -+#define EVT_CMD_STATUS 0x0F -+#define EVT_CMD_STATUS_SIZE 4 -+#define HCI_EVENT_HDR_SIZE 2 -+#define HCI_EV_SUCCESS 0x00 -+/* HCI Socket options */ -+#define HCI_DATA_DIR 1 -+#define HCI_FILTER 2 -+#define HCI_TIME_STAMP 3 -+ -+#define P_ID_OFFSET (0) -+#define HCI_CMD_IND (1) -+#define EVENTCODE_OFFSET (1) -+#define EVT_PLEN (2) -+#define PLEN (3) -+#define CMD_RSP_OFFSET (3) -+#define RSP_TYPE_OFFSET (4) -+#define BAUDRATE_RSP_STATUS_OFFSET (4) -+#define CMD_STATUS_OFFSET (5) -+#define P_ROME_VER_OFFSET (4) -+#define P_BUILD_VER_OFFSET (6) -+#define P_BASE_ADDR_OFFSET (8) -+#define P_ENTRY_ADDR_OFFSET (12) -+#define P_LEN_OFFSET (16) -+#define P_CRC_OFFSET (20) -+#define P_CONTROL_OFFSET (24) -+#define PATCH_HDR_LEN (28) -+#define MAX_DATA_PER_SEGMENT (239) -+#define VSEVENT_CODE (0xFF) -+#define HC_VS_MAX_CMD_EVENT (0xFF) -+#define PATCH_PROD_ID_OFFSET (5) -+#define PATCH_PATCH_VER_OFFSET (9) -+#define PATCH_ROM_BUILD_VER_OFFSET (11) -+#define PATCH_SOC_VER_OFFSET (13) -+#define MAX_SIZE_PER_TLV_SEGMENT (243) -+ -+/* VS Opcode */ -+#define HCI_PATCH_CMD_OCF (0) -+#define EDL_SET_BAUDRATE_CMD_OCF (0x48) -+ -+/* VS Commands */ -+#define VSC_SET_BAUDRATE_REQ_LEN (1) -+#define EDL_PATCH_CMD_LEN (1) -+#define EDL_PATCH_CMD_REQ_LEN (1) -+#define EDL_PATCH_DLD_REQ_CMD (0x01) -+#define EDL_PATCH_RST_REQ_CMD (0x05) -+#define EDL_PATCH_SET_REQ_CMD (0x16) -+#define EDL_PATCH_ATCH_REQ_CMD (0x17) -+#define EDL_PATCH_VER_REQ_CMD (0x19) -+#define EDL_PATCH_TLV_REQ_CMD (0x1E) -+#define VSC_DISABLE_IBS_LEN (0x04) -+ -+/* VS Event */ -+#define EDL_CMD_REQ_RES_EVT (0x00) -+#define EDL_CMD_EXE_STATUS_EVT (0x00) -+#define EDL_SET_BAUDRATE_RSP_EVT (0x92) -+#define EDL_PATCH_VER_RES_EVT (0x19) -+#define EDL_TVL_DNLD_RES_EVT (0x04) -+#define EDL_APP_VER_RES_EVT (0x02) -+ -+/* Status Codes of HCI CMD execution*/ -+#define HCI_CMD_SUCCESS (0x0) -+#define PATCH_LEN_ERROR (0x1) -+#define PATCH_VER_ERROR (0x2) -+#define PATCH_CRC_ERROR (0x3) -+#define PATCH_NOT_FOUND (0x4) -+#define TLV_TYPE_ERROR (0x10) -+#define NVM_ACCESS_CODE (0x0B) -+#define BAUDRATE_CHANGE_SUCCESS (1) -+ -+/* TLV_TYPE */ -+#define TLV_TYPE_PATCH (1) -+#define TLV_TYPE_NVM (2) -+ -+/* NVM */ -+#define MAX_TAG_CMD 30 -+#define TAG_END 0xFF -+#define NVM_ACCESS_SET 0x01 -+#define TAG_NUM_OFFSET 5 -+#define TAG_NUM_2 2 -+#define TAG_NUM_17 (17) -+#define TAG_NUM_27 27 -+#define TAG_NUM_44 44 -+#define TAG_BDADDR_OFFSET 7 -+ -+/* FW PCM Configuration */ -+#define FWCONF_PCM_MS_OFFSET_1 9 -+#define FWCONF_PCM_MS_OFFSET_2 33 -+#define FWCONF_PCM_SLAVE 1 -+#define FWCONF_PCM_MASTER 0 -+#define FWCONF_PCM_ROLE_BIT_OFFSET 4 -+ -+/* FW HCI Transport Layer Configuration */ -+#define FWCONF_IBS_DISABLE (0) -+#define FWCONF_IBS_ENABLE (1) -+#define FWCONF_IBS_VAL_BIT (7) -+#define FWCONF_IBS_VAL_OFFSET (0) -+#define FWCONF_BAUD_VAL_OFFSET (2) -+ -+/* FW DEEP SLEEP Configuration */ -+#define FWCONF_DEEP_SLEEP_DISABLE 0 -+#define FWCONF_DEEP_SLEEP_ENABLE 1 -+#define FWCONF_DEEP_SLEEP_BYTE_OFFSET 0 -+#define FWCONF_DEEP_SLEEP_BIT_OFFSET 0 -+ -+#define MAX_RETRY_CNT 1 -+#define SELECT_TIMEOUT 3 -+ -+/* NVM Tags specifically used for ROME 1.0 */ -+#define ROME_1_0_100022_1 0x101000221 -+#define ROME_1_0_100019 0x101000190 -+#define ROME_1_0_6002 0x100600200 -+ -+/* Default NVM Version setting for ROME 1.0 */ -+#define NVM_VERSION ROME_1_0_100022_1 -+ -+ -+#define LSH(val, n) ((unsigned int)(val) << (n)) -+#define EXTRACT_BYTE(val, pos) (char) (((val) >> (8 * (pos))) & 0xFF) -+#define CALC_SEG_SIZE(len, max) ((plen) % (max))?((plen/max)+1) : ((plen) / (max)) -+ -+#define ROME_FW_PATH "/lib/firmware/rampatch.img" -+#define ROME_RAMPATCH_TLV_PATH "/lib/firmware/rampatch_tlv.img" -+#define ROME_NVM_TLV_PATH "/lib/firmware/nvm_tlv.bin" -+#define ROME_RAMPATCH_TLV_1_0_3_PATH "/lib/firmware/rampatch_tlv_1.3.tlv" -+#define ROME_NVM_TLV_1_0_3_PATH "/lib/firmware/nvm_tlv_1.3.bin" -+#define ROME_RAMPATCH_TLV_2_0_1_PATH "/lib/firmware/rampatch_tlv_2.1.tlv" -+#define ROME_NVM_TLV_2_0_1_PATH "/lib/firmware/nvm_tlv_2.1.bin" -+#define ROME_RAMPATCH_TLV_3_0_0_PATH "/lib/firmware/rampatch_tlv_3.0.tlv" -+#define ROME_NVM_TLV_3_0_0_PATH "/lib/firmware/nvm_tlv_3.0.bin" -+#define ROME_RAMPATCH_TLV_3_0_2_PATH "/lib/firmware/btfw32.tlv" -+#define ROME_NVM_TLV_3_0_2_PATH "/lib/firmware/btnv32.bin" -+#ifdef _PLATFORM_MDM_ -+#define TF_RAMPATCH_TLV_1_0_0_PATH "/lib/firmware/rampatch_tlv_tf_1.0.tlv" -+#define TF_NVM_TLV_1_0_0_PATH "/lib/firmware/nvm_tlv_tf_1.0.bin" -+#define TF_RAMPATCH_TLV_1_0_1_PATH "/lib/firmware/tfbtfw11.tlv" -+#define TF_NVM_TLV_1_0_1_PATH "/lib/firmware/tfbtnv11.bin" -+#else -+#define TF_RAMPATCH_TLV_1_0_0_PATH "/lib/firmware/qca/rampatch_tlv_tf_1.0.tlv" -+#define TF_NVM_TLV_1_0_0_PATH "/lib/firmware/qca/nvm_tlv_tf_1.0.bin" -+#define TF_RAMPATCH_TLV_1_0_1_PATH "/lib/firmware/qca/tfbtfw11.tlv" -+#define TF_NVM_TLV_1_0_1_PATH "/lib/firmware/qca/tfbtnv11.bin" -+#endif -+ -+/* This header value in rampatch file decides event handling mechanism in the HOST */ -+#define ROME_SKIP_EVT_NONE 0x00 -+#define ROME_SKIP_EVT_VSE 0x01 -+#define ROME_SKIP_EVT_CC 0x02 -+#define ROME_SKIP_EVT_VSE_CC 0x03 -+ -+#define FW_CONFIG_FILE_PATH "/etc/bluetooth/firmware.conf" -+/****************************************************************************** -+** Local type definitions -+******************************************************************************/ -+ -+typedef struct { -+ unsigned char ncmd; -+ unsigned short opcode; -+} __attribute__ ((packed)) evt_cmd_complete; -+ -+typedef struct { -+ unsigned char status; -+ unsigned char ncmd; -+ unsigned short opcode; -+} __attribute__ ((packed)) evt_cmd_status; -+ -+typedef struct { -+ unsigned short opcode; -+ unsigned char plen; -+} __attribute__ ((packed)) hci_command_hdr; -+ -+typedef struct { -+ unsigned char evt; -+ unsigned char plen; -+} __attribute__ ((packed)) hci_event_hdr; -+typedef struct { -+ unsigned short rom_version; -+ unsigned short build_version; -+} __attribute__ ((packed)) patch_version; -+ -+typedef struct { -+ unsigned int patch_id; -+ patch_version patch_ver; -+ unsigned int patch_base_addr; -+ unsigned int patch_entry_addr; -+ unsigned short patch_length; -+ int patch_crc; -+ unsigned short patch_ctrl; -+} __attribute__ ((packed)) patch_info; -+ -+typedef struct { -+ unsigned int tlv_data_len; -+ unsigned int tlv_patch_data_len; -+ unsigned char sign_ver; -+ unsigned char sign_algorithm; -+ unsigned char dwnd_cfg; -+ unsigned char reserved1; -+ unsigned short prod_id; -+ unsigned short build_ver; -+ unsigned short patch_ver; -+ unsigned short reserved2; -+ unsigned int patch_entry_addr; -+} __attribute__ ((packed)) tlv_patch_hdr; -+ -+typedef struct { -+ unsigned short tag_id; -+ unsigned short tag_len; -+ unsigned int tag_ptr; -+ unsigned int tag_ex_flag; -+} __attribute__ ((packed)) tlv_nvm_hdr; -+ -+typedef struct { -+ unsigned char tlv_type; -+ unsigned char tlv_length1; -+ unsigned char tlv_length2; -+ unsigned char tlv_length3; -+ -+ union{ -+ tlv_patch_hdr patch; -+ tlv_nvm_hdr nvm; -+ }tlv; -+} __attribute__ ((packed)) tlv_patch_info; -+ -+enum{ -+ BAUDRATE_115200 = 0x00, -+ BAUDRATE_57600 = 0x01, -+ BAUDRATE_38400 = 0x02, -+ BAUDRATE_19200 = 0x03, -+ BAUDRATE_9600 = 0x04, -+ BAUDRATE_230400 = 0x05, -+ BAUDRATE_250000 = 0x06, -+ BAUDRATE_460800 = 0x07, -+ BAUDRATE_500000 = 0x08, -+ BAUDRATE_720000 = 0x09, -+ BAUDRATE_921600 = 0x0A, -+ BAUDRATE_1000000 = 0x0B, -+ BAUDRATE_1250000 = 0x0C, -+ BAUDRATE_2000000 = 0x0D, -+ BAUDRATE_3000000 = 0x0E, -+ BAUDRATE_4000000 = 0x0F, -+ BAUDRATE_1600000 = 0x10, -+ BAUDRATE_3200000 = 0x11, -+ BAUDRATE_3500000 = 0x12, -+ BAUDRATE_AUTO = 0xFE, -+ BAUDRATE_Reserved = 0xFF -+}; -+ -+enum{ -+ ROME_PATCH_VER_0100 = 0x0100, -+ ROME_PATCH_VER_0101 = 0x0101, -+ ROME_PATCH_VER_0200 = 0x0200, -+ ROME_PATCH_VER_0300 = 0x0300, -+ ROME_PATCH_VER_0302 = 0x0302 -+ }; -+ -+enum{ -+ ROME_SOC_ID_00 = 0x00000000, -+ ROME_SOC_ID_11 = 0x00000011, -+ ROME_SOC_ID_13 = 0x00000013, -+ ROME_SOC_ID_22 = 0x00000022, -+ ROME_SOC_ID_23 = 0x00000023, -+ ROME_SOC_ID_44 = 0x00000044 -+}; -+ -+enum{ -+ ROME_VER_UNKNOWN = 0, -+ ROME_VER_1_0 = ((ROME_PATCH_VER_0100 << 16 ) | ROME_SOC_ID_00 ), -+ ROME_VER_1_1 = ((ROME_PATCH_VER_0101 << 16 ) | ROME_SOC_ID_00 ), -+ ROME_VER_1_3 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_00 ), -+ ROME_VER_2_1 = ((ROME_PATCH_VER_0200 << 16 ) | ROME_SOC_ID_11 ), -+ ROME_VER_3_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_22 ), -+ ROME_VER_3_2 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_44 ), -+ TUFELLO_VER_1_0 = ((ROME_PATCH_VER_0300 << 16 ) | ROME_SOC_ID_13 ), -+ TUFELLO_VER_1_1 = ((ROME_PATCH_VER_0302 << 16 ) | ROME_SOC_ID_23 ) -+}; -+#endif /* HW_ROME_H */ --- -2.15.0 - diff --git a/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5_%.bbappend b/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5_%.bbappend deleted file mode 100644 index 9eff7c03..00000000 --- a/bsp/meta-boundary/recipes-connectivity/bluez5/bluez5_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PATCHES = " file://0001-hciattach-add-QCA9377-Tuffello-support.patch \ -" - -SRC_URI_append_mx6 = "${PATCHES}" -SRC_URI_append_mx7 = "${PATCHES}" -SRC_URI_append_mx8 = "${PATCHES}" - -PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}" -PACKAGE_ARCH_mx7 = "${MACHINE_SOCARCH}" -PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" diff --git a/bsp/meta-boundary/recipes-connectivity/networkmanager/files/NetworkManager.conf b/bsp/meta-boundary/recipes-connectivity/networkmanager/files/NetworkManager.conf deleted file mode 100644 index ecd45c6b..00000000 --- a/bsp/meta-boundary/recipes-connectivity/networkmanager/files/NetworkManager.conf +++ /dev/null @@ -1,6 +0,0 @@ -[main] -plugins=ifupdown - -[ifupdown] -managed=true - diff --git a/bsp/meta-boundary/recipes-connectivity/networkmanager/networkmanager_%.bbappend b/bsp/meta-boundary/recipes-connectivity/networkmanager/networkmanager_%.bbappend deleted file mode 100644 index d812c254..00000000 --- a/bsp/meta-boundary/recipes-connectivity/networkmanager/networkmanager_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append = " \ - file://NetworkManager.conf \ -" - -do_install_append() { - - install -m 755 ${WORKDIR}/NetworkManager.conf ${D}/etc/NetworkManager - -} - diff --git a/bsp/meta-boundary/recipes-core/busybox/busybox/custom-ash.cfg b/bsp/meta-boundary/recipes-core/busybox/busybox/custom-ash.cfg deleted file mode 100644 index 8cb6d799..00000000 --- a/bsp/meta-boundary/recipes-core/busybox/busybox/custom-ash.cfg +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_REVERSE_SEARCH=y diff --git a/bsp/meta-boundary/recipes-core/busybox/busybox_%.bbappend b/bsp/meta-boundary/recipes-core/busybox/busybox_%.bbappend deleted file mode 100644 index 984c5a48..00000000 --- a/bsp/meta-boundary/recipes-core/busybox/busybox_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += " \ - file://custom-ash.cfg \ -" - -SRC_URI[custom-ash.cfg.md5sum] = "13d2bc68c91b5c2679ecc652f66832b3" -SRC_URI[custom-ash.cfg.sha256sum] = "7001872f5021b48d010597ce1a614dd35982bdd0045387170408d5946a5c0c7e" diff --git a/bsp/meta-boundary/recipes-core/init-ifupdown/boundary/interfaces b/bsp/meta-boundary/recipes-core/init-ifupdown/boundary/interfaces deleted file mode 100644 index ac9a7da8..00000000 --- a/bsp/meta-boundary/recipes-core/init-ifupdown/boundary/interfaces +++ /dev/null @@ -1,27 +0,0 @@ -# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) - -# The loopback interface -auto lo -iface lo inet loopback - -# Wired or wireless interfaces -auto eth0 -iface eth0 inet dhcp - hostname `/bin/hostname` - -# Ethernet/RNDIS gadget (g_ether) -# ... or on host side, usbnet and random hwaddr -auto usb0 -iface usb0 inet static - pre-up modprobe g_ether - address 10.0.0.2 - netmask 255.255.255.0 - network 10.0.0.0 - -# Wireless interfaces -auto wlan0 -iface wlan0 inet dhcp - wireless_mode managed - wireless_essid any - wpa-driver nl80211 - wpa-conf /etc/wpa_supplicant.conf diff --git a/bsp/meta-boundary/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/bsp/meta-boundary/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend deleted file mode 100644 index 41e996f5..00000000 --- a/bsp/meta-boundary/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/boundary:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/boundary:" -FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/boundary:" diff --git a/bsp/meta-boundary/recipes-core/microcom/microcom_git.bb b/bsp/meta-boundary/recipes-core/microcom/microcom_git.bb deleted file mode 100644 index 68dfa5e1..00000000 --- a/bsp/meta-boundary/recipes-core/microcom/microcom_git.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "microcom is a small minicom-like serial terminal emulator with scripting support." -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -SRCREV = "5ea09fd573a56efeba3c2cc07e41537d52d3de48" -SRC_URI = "git://github.com/Oliviers-OSS/microcom;branch=master" - -S = "${WORKDIR}/git" - -do_install () { - install -d ${D}${bindir} - install -m 0755 microcom ${D}${bindir} -} - -inherit autotools diff --git a/bsp/meta-boundary/recipes-core/psplash/files/boundary-logo-img.h b/bsp/meta-boundary/recipes-core/psplash/files/boundary-logo-img.h deleted file mode 100644 index 02d278a7..00000000 --- a/bsp/meta-boundary/recipes-core/psplash/files/boundary-logo-img.h +++ /dev/null @@ -1,1776 +0,0 @@ -/* Generated with make-image-header script from psplash project */ -/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ - -#define POKY_IMG_ROWSTRIDE (1176) -#define POKY_IMG_WIDTH (294) -#define POKY_IMG_HEIGHT (380) -#define POKY_IMG_BYTES_PER_PIXEL (4) /* 3:RGB, 4:RGBA */ -#define POKY_IMG_RLE_PIXEL_DATA ((uint8*) \ - "\377\377\377\377\0\377\377\377\377\0\377\377\377\377\0\377\377\377\377" \ - "\0\377\377\377\377\0\377\377\377\377\0\377\377\377\377\0\377\377\377" \ - "\377\0\377\377\377\377\0\377\377\377\377\0\377\377\377\377\0\372\377" \ - "\377\377\0\5\375\375\375\210\334\337\345\377\324\330\337\377\316\322" \ - "\333\377\302\310\322\377\377\303\310\322\377\336\303\310\322\377\1\276" \ - "\304\317\377\213\271\277\314\377\1\272\300\314\377\262\377\377\377\0" \ - "\4\323\327\337\377\224\236\261\377Sb\200\377!4[\377\377\26*S\377\360" \ - "\26*S\377\1\31,U\377\255\377\377\377\0\10\347\351\355\377\234\245\266" \ - "\377_m\211\3779Jm\377\30,T\377\15\"L\377\20%O\377\23'Q\377\377\26*S\377" \ - "\361\26*S\377\1\31,U\377\252\377\377\377\0\5\344\347\353\377\242\251" \ - "\272\3773Eh\377\11\36I\377\21&P\377\377\26*S\377\367\26*S\377\1\31,U" \ - "\377\250\377\377\377\0\5\237\247\270\3771Cg\377\34""0W\377\24(R\377\25" \ - ")S\377\377\26*S\377\371\26*S\377\1\31,U\377\245\377\377\377\0\4\343\345" \ - "\352\377\204\217\244\377!3[\377\16#M\377\377\26*S\377\375\26*S\377\1" \ - "\31,U\377\244\377\377\377\0\2ly\223\377\16\"M\377\377\26*S\377\377\26" \ - "*S\377\2\26*S\377\31,U\377\242\377\377\377\0\3o|\225\377\37""2Y\377\22" \ - "&P\377\227\26*S\377\10\23'P\377\17#N\377\13\40K\377\7\34H\377\21&O\377" \ - "$6]\3776Hk\377FVw\377\377IXx\377\260IXx\377\1@Pq\377\2126Hk\377\2""5" \ - "Fj\377\37""2Z\377\211\35""0Y\377\2\36""1Y\377\14!L\377\212\5\32F\377" \ - "\1\6\33G\377\206\7\34H\377\1\17#N\377\210\26*S\377\1\31,U\377\240\377" \ - "\377\377\0\3\264\273\310\377\26*S\377\23'Q\377\223\26*S\377\12\25)S\377" \ - "\23'Q\377\20$O\377\35""0X\3778Il\377L[{\377w\203\233\377\240\250\271" \ - "\377\317\323\333\377\367\370\371\377\377\377\377\377\377\327\377\377" \ - "\377\377\1\366\367\371\377\205\367\370\371\377\1\203\216\244\377\210" \ - "\26*S\377\1\31,U\377\237\377\377\377\0\1;Ln\377\225\26*S\377\6\21&P\377" \ - "\40""3[\377r~\226\377\310\314\326\377\367\370\371\377\373\373\374\377" \ - "\377\377\377\377\377\342\377\377\377\377\1\210\222\247\377\210\26*S\377" \ - "\1\31,U\377\235\377\377\377\0\3\242\252\272\377\27+T\377\24(Q\377\221" \ - "\26*S\377\5\23'Q\377\13\40K\377c\377$7]\377\35""0X\377\25)R\377" \ - "\23(Q\377\24(Q\377\377\24(R\377\260\24(R\377\214\24(Q\377\213\23(Q\377" \ - "\213\23'Q\377\210\377\377\377\377\2\232\242\264\377\25)R\377\207\26*" \ - "S\377\1\31,U\377\224\377\377\377\0\2\340\343\350\377\"5\\\377\216\26" \ - "*S\377\2\14!L\377gt\217\377\220\377\377\377\377\7\365\366\370\377\270" \ - "\276\312\377n{\224\377%7^\377\10\35H\377\17$N\377\25)R\377\377\26*S\377" \ - "\330\26*S\377\210\377\377\377\377\2\231\242\264\377\25)R\377\207\26*" \ - "S\377\1\31,U\377\224\377\377\377\0\1$7]\377\216\26*S\377\2\27+T\377\222" \ - "\233\257\377\216\377\377\377\377\5\376\376\376\377\352\354\360\377fs" \ - "\216\377\24(R\377\25)R\377\377\26*S\377\335\26*S\377\210\377\377\377" \ - "\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\223\377\377\377" \ - "\0\2Sb\177\377\25)R\377\215\26*S\377\2\23'P\377\267\275\312\377\216\377" \ - "\377\377\377\4\275\302\316\377L\\{\377\27+T\377\23'Q\377\377\26*S\377" \ - "\337\26*S\377\210\377\377\377\377\2\231\242\264\377\25)R\377\207\26*" \ - "S\377\1\31,U\377\222\377\377\377\0\2\216\230\254\377\16#N\377\215\26" \ - "*S\377\2\27+T\377\277\304\320\377\215\377\377\377\377\3\324\330\340\377" \ - "AQs\377\13\40K\377\377\26*S\377\342\26*S\377\210\377\377\377\377\2\231" \ - "\242\264\377\25)R\377\207\26*S\377\1\31,U\377\222\377\377\377\0\1\30" \ - ",U\377\215\26*S\377\2\30,U\377\324\327\337\377\214\377\377\377\377\4" \ - "\374\374\374\377Ve\202\377\31,U\377\25*S\377\377\26*S\377\343\26*S\377" \ - "\210\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377" \ - "\221\377\377\377\0\2""5Fj\377\24(R\377\214\26*S\377\2\20%O\377\271\277" \ - "\313\377\214\377\377\377\377\3\241\251\271\377\32.V\377\22'P\377\377" \ - "\26*S\377\345\26*S\377\210\377\377\377\377\2\231\242\264\377\25)R\377" \ - "\207\26*S\377\1\31,U\377\220\377\377\377\0\1\236\247\270\377\216\26*" \ - "S\377\1\267\275\312\377\213\377\377\377\377\3\366\367\371\377Zh\205\377" \ - "\22&P\377\377\26*S\377\347\26*S\377\210\377\377\377\377\2\231\242\264" \ - "\377\25)R\377\207\26*S\377\1\31,U\377\220\377\377\377\0\1\36""2Y\377" \ - "\214\26*S\377\2\15!L\377\230\241\263\377\213\377\377\377\377\3\331\334" \ - "\343\377+=c\377\23'Q\377\377\26*S\377\350\26*S\377\1\375\375\375\377" \ - "\207\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377" \ - "\217\377\377\377\0\2fs\215\377\22&P\377\213\26*S\377\2\24(Q\377Yg\204" \ - "\377\213\377\377\377\377\2\277\305\320\377\22&P\377\377\26*S\377\352" \ - "\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25" \ - ")R\377\207\26*S\377\1\31,U\377\216\377\377\377\0\2\375\375\375\314\40" \ - "3Z\377\214\26*S\377\1\40""3[\377\213\377\377\377\377\2\245\255\274\377" \ - "\25)R\377\377\26*S\377\353\26*S\377\1\375\375\376\377\207\377\377\377" \ - "\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\216\377\377\377" \ - "\0\2\207\221\247\377\24(Q\377\213\26*S\377\2\32-V\377\336\341\346\377" \ - "\212\377\377\377\377\2\226\237\261\377\15\"M\377\377\26*S\377\354\26" \ - "*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377" \ - "\207\26*S\377\1\31,U\377\216\377\377\377\0\1\12\37J\377\213\26*S\377" \ - "\2\21%O\377t\200\230\377\212\377\377\377\377\2\261\267\305\377\12\37" \ - "J\377\377\26*S\377\355\26*S\377\1\375\375\376\377\207\377\377\377\377" \ - "\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\215\377\377\377\0" \ - "\2\220\232\255\377\23'Q\377\213\26*S\377\1=Mo\377\212\377\377\377\377" \ - "\2\277\305\320\377\27+T\377\377\26*S\377\356\26*S\377\1\375\375\376\377" \ - "\207\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377" \ - "\215\377\377\377\0\1EUv\377\213\26*S\377\2\20$N\377\311\316\327\377\211" \ - "\377\377\377\377\2\332\335\343\377\22&P\377\377\26*S\377\357\26*S\377" \ - "\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377\207" \ - "\26*S\377\1\31,U\377\215\377\377\377\0\1\20$N\377\212\26*S\377\2\23'" \ - "Q\377]j\207\377\211\377\377\377\377\2\372\372\373\3772Dh\377\377\26*" \ - "S\377\360\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264" \ - "\377\25)R\377\207\26*S\377\1\31,U\377\214\377\377\377\0\2\203\215\243" \ - "\377\21%O\377\212\26*S\377\2\33/W\377\360\361\364\377\211\377\377\377" \ - "\377\2Q`\177\377\23'P\377\377\26*S\377\360\26*S\377\1\375\375\376\377" \ - "\207\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377" \ - "\214\377\377\377\0\1\37""3Z\377\212\26*S\377\2\24)R\377cq\214\377\211" \ - "\377\377\377\377\2\261\267\305\377\23'Q\377\377\26*S\377\361\26*S\377" \ - "\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377\207" \ - "\26*S\377\1\31,U\377\213\377\377\377\0\2\337\342\350\377\27+T\377\212" \ - "\26*S\377\2\10\36I\377\361\361\364\377\211\377\377\377\377\1!4[\377\377" \ - "\26*S\377\362\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242" \ - "\264\377\25)R\377\207\26*S\377\1\31,U\377\213\377\377\377\0\1\273\301" \ - "\315\377\212\26*S\377\2\25)R\377q~\227\377\211\377\377\377\377\2]k\207" \ - "\377\22&P\377\377\26*S\377\362\26*S\377\1\375\375\376\377\207\377\377" \ - "\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\213\377\377" \ - "\377\0\1\207\222\246\377\212\26*S\377\2\30,U\377\325\331\340\377\210" \ - "\377\377\377\377\2\344\346\353\377\35""1X\377\377\26*S\377\363\26*S\377" \ - "\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377\207" \ - "\26*S\377\1\31,U\377\213\377\377\377\0\1P_~\377\212\26*S\377\2!4[\377" \ - "\373\373\374\377\210\377\377\377\377\2q|\226\377\24)R\377\377\26*S\377" \ - "\363\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377" \ - "\25)R\377\207\26*S\377\1\31,U\377\213\377\377\377\0\1\36""1Y\377\211" \ - "\26*S\377\2\17$N\377\210\222\247\377\210\377\377\377\377\2\342\344\352" \ - "\377\10\35H\377\377\26*S\377\364\26*S\377\1\375\375\376\377\207\377\377" \ - "\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\213\377\377" \ - "\377\0\1\6\34G\377\211\26*S\377\1\22&P\377\211\377\377\377\377\2my\223" \ - "\377\25)R\377\377\26*S\377\364\26*S\377\1\375\375\376\377\207\377\377" \ - "\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\325\330\340\377\12\37J\377\211\26*S\377\1HXx\377\211\377\377" \ - "\377\377\1-\77d\377\377\26*S\377\365\26*S\377\1\375\375\376\377\207\377" \ - "\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\275\303\317\377\14!K\377\211\26*S\377\1\177\212\241\377" \ - "\210\377\377\377\377\2\312\316\327\377\15!L\377\377\26*S\377\365\26*" \ - "S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\234\244\266\377\17#N\377" \ - "\210\26*S\377\2\22&P\377\273\300\315\377\210\377\377\377\377\2@Pr\377" \ - "\24(R\377\377\26*S\377\365\26*S\377\1\375\375\376\377\207\377\377\377" \ - "\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\216\227\253\377\20$N\377\210\26*S\377\2\15\"L\377\365\366\367\377" \ - "\207\377\377\377\377\2\361\362\364\377\24(Q\377\377\26*S\377\366\26*" \ - "S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2\25)R\3771Cg\377\210\377\377\377\377\1\307\313\325\377" \ - "\377\26*S\377\367\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231" \ - "\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2\24(Q\377ht\217\377\210\377\377\377" \ - "\377\1\220\232\255\377\377\26*S\377\367\26*S\377\1\375\375\376\377\207" \ - "\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2\22&P\377\251" \ - "\261\300\377\210\377\377\377\377\1_l\210\377\377\26*S\377\367\26*S\377" \ - "\1\375\375\376\377\207\377\377\377\377\2\231\242\264\377\25)R\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2\20%O\377\335\340\346\377\210\377\377\377\377\1""2Ch\377\377" \ - "\26*S\377\367\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242" \ - "\264\377\25)R\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2\34/W\377\361\362\365\377\210\377\377" \ - "\377\377\1\13\40K\377\377\26*S\377\367\26*S\377\1\375\375\376\377\207" \ - "\377\377\377\377\2\231\242\264\377\25)R\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2\"5\\\377\363" \ - "\364\366\377\207\377\377\377\377\2\337\342\347\377\11\36I\377\377\26" \ - "*S\377\367\26*S\377\1\375\375\376\377\207\377\377\377\377\2\231\242\264" \ - "\377\25)R\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2*c\377\30,U\377" \ - "\25)R\377\327\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\322" \ - "\377\377\377\377\4\376\376\377\377\330\333\342\377JYy\377\15\"L\377\326" \ - "\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301" \ - "\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\325\377\377\377" \ - "\377\3\273\301\314\377=Np\377\16#M\377\324\26*S\377\2\24(Q\377M]|\377" \ - "\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364" \ - "\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\327\377\377\377\377\2\241\251\272\377" \ - "\25)S\377\323\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\330" \ - "\377\377\377\377\3\330\333\342\3779Jm\377\24(Q\377\321\26*S\377\2\24" \ - "(Q\377M]|\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*" \ - "S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\332\377\377\377\377\2IYy\377" \ - "\25)R\377\320\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\333" \ - "\377\377\377\377\2r\177\227\377\16#M\377\317\26*S\377\2\24(Q\377M]|\377" \ - "\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364" \ - "\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\334\377\377\377\377\2y\205\234\377\24" \ - "(Q\377\316\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263\302" \ - "\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253" \ - "\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\335\377" \ - "\377\377\377\2Ud\201\377\23'Q\377\315\26*S\377\2\24(Q\377M]|\377\243" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367" \ - "\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\336\377\377\377\377\1JYy\377\315\26*S\377\2" \ - "\24(Q\377M]|\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26" \ - "*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\336\377\377\377\377\1\346\350" \ - "\354\377\315\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\337" \ - "\377\377\377\377\2\274\302\316\377\24(R\377\313\26*S\377\2\24(Q\377M" \ - "]|\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1" \ - "\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26" \ - "*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26" \ - "*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\221\26*S\377\1\30,U\377\337\377\377\377\377\3\375\375\376\377" \ - ";Lo\377\25)R\377\312\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2" \ - "\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377" \ - "\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\340\377\377\377\377\2\324\330\337\377\14\40K\377\312\26*S\377" \ - "\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221" \ - "\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23" \ - "'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\341\377\377\377\377" \ - "\1\\j\206\377\312\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253" \ - "\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377" \ - "\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377" \ - "\341\377\377\377\377\2\275\303\317\377\25*S\377\311\26*S\377\2\24(Q\377" \ - "M]|\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1" \ - "\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26" \ - "*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26" \ - "*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\221\26*S\377\1\30,U\377\341\377\377\377\377\2\375\375\376\377" \ - "\23'Q\377\311\26*S\377\2\24(Q\377M]|\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\342" \ - "\377\377\377\377\2u\200\231\377\22&P\377\310\26*S\377\2\24(Q\377N]}\377" \ - "\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364" \ - "\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\342\377\377\377\377\2\346\350\354\377" \ - "\16#M\377\310\26*S\377\2\24(R\377>Oq\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\342" \ - "\377\377\377\377\2\376\376\376\377(:`\377\310\26*S\377\2\25)R\377.@e" \ - "\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364" \ - "\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\221\26*S\377\1\30,U\377\342\377\377\377\377\2\376\376\376\377" \ - "JYy\377\310\26*S\377\2\25)R\377);a\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244" \ - "\377\377\377\377\214\376\376\377\377\263\377\377\377\377\2iv\221\377" \ - "\25)S\377\310\26*S\377\1\20$N\377\243\377\377\377\377\2\253\263\302\377" \ - "\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263" \ - "\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377" \ - "\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377" \ - "\377\377\1KZz\377\213O^}\377\6Tc\201\377_m\211\377s\177\227\377\227\240" \ - "\263\377\301\307\321\377\370\371\372\377\255\377\377\377\377\2\224\234" \ - "\260\377\22&P\377\250\26*S\377\5\23'Q\377\20$N\377\14!K\377\11\36J\377" \ - "\7\35H\377\203\7\34H\377\5\7\35H\377\11\36I\377\13\40K\377\16#M\377\22" \ - "&P\377\223\26*S\377\1\20%O\377\243\377\377\377\377\2\253\263\302\377" \ - "\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263" \ - "\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377" \ - "\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377" \ - "\377\377\1\20$N\377\215\26*S\377\7\25)R\377\21&O\377\15\"L\377\7\34H" \ - "\3778Jm\377\235\246\267\377\342\345\352\377\252\377\377\377\377\2\270" \ - "\276\312\377\16#M\377\243\26*S\377\12\25)R\377\22&P\377\31-U\377/Ae\377" \ - ">Np\377gt\217\377\221\233\256\377\275\303\316\377\334\336\345\377\361" \ - "\363\365\377\203\364\366\367\377\12\363\364\366\377\342\344\352\377\306" \ - "\313\325\377\236\246\267\377u\201\231\377EUv\3772Ch\377\35""1X\377\21" \ - "&O\377\24(R\377\216\26*S\377\2\21%O\377\372\373\374\377\242\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377" \ - "\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\244\377\377\377\377\1\20$N\377\222\26*S\377\4\24(R\377\33" \ - ".V\377;Lo\377\353\355\360\377\250\377\377\377\377\2\322\326\336\377\14" \ - "!K\377\241\26*S\377\7\25)R\377\13\40K\377>Op\377\262\272\306\377\356" \ - "\357\362\377\367\370\371\377\376\376\376\377\216\377\377\377\377\6\370" \ - "\371\372\377\361\362\365\377\304\311\323\377O^}\377\11\36I\377\24)R\377" \ - "\214\26*S\377\2\21&O\377\362\362\365\377\242\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244" \ - "\377\377\377\377\1\20$N\377\224\26*S\377\3\25)R\377\22'P\377\230\241" \ - "\263\377\247\377\377\377\377\2\355\356\362\377\11\36I\377\236\26*S\377" \ - "\5\25)S\377\13\40K\377;Lo\377\223\234\257\377\351\353\357\377\227\377" \ - "\377\377\377\4\357\360\363\377\230\240\263\377c\377" \ - "\376\376\376\377\244\377\377\377\377\2\371\372\373\377\10\35I\377\232" \ - "\26*S\377\2\21%O\377`m\211\377\244\377\377\377\377\3\331\333\342\377" \ - "3Dh\377\22'P\377\205\26*S\377\2\24(R\377\270\276\313\377\242\377\377" \ - "\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207" \ - "\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371" \ - "\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S" \ - "\377\1\30,U\377\244\377\377\377\377\1\20$N\377\230\26*S\377\2\17$N\377" \ - "\263\272\310\377\244\377\377\377\377\2\371\372\373\377\10\35I\377\231" \ - "\26*S\377\2\27+T\377\300\305\321\377\247\377\377\377\377\2Uc\201\377" \ - "\25)R\377\204\26*S\377\2\25)R\377\251\261\300\377\242\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377" \ - "\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\244\377\377\377\377\1\20$N\377\230\26*S\377\2\24(R\377;Ln\377" \ - "\244\377\377\377\377\2\356\357\362\377\11\36I\377\230\26*S\377\2-@d\377" \ - "\325\331\340\377\251\377\377\377\377\2p}\226\377\14!L\377\204\26*S\377" \ - "\1\225\236\261\377\242\377\377\377\377\2\253\263\302\377\17#N\377\221" \ - "\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23" \ - "'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377" \ - "\1\20$N\377\231\26*S\377\2\23'Q\377\376\376\377\377\243\377\377\377\377" \ - "\2\332\335\343\377\13\40K\377\226\26*S\377\3\25)R\377':`\377\361\362" \ - "\365\377\253\377\377\377\377\2v\202\232\377\24(Q\377\203\26*S\377\1\201" \ - "\214\242\377\242\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S" \ - "\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N" \ - "\377\231\26*S\377\2\24)R\377\351\353\357\377\243\377\377\377\377\2\277" \ - "\304\317\377\15\"M\377\226\26*S\377\2""8Il\377\362\363\366\377\255\377" \ - "\377\377\377\2my\224\377\21%O\377\202\26*S\377\1iv\221\377\242\377\377" \ - "\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207" \ - "\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371" \ - "\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S" \ - "\377\1\30,U\377\244\377\377\377\377\1\20$N\377\231\26*S\377\2\25)R\377" \ - "\345\347\354\377\243\377\377\377\377\2\233\243\265\377\21%O\377\224\26" \ - "*S\377\3\25)S\3774Ei\377\357\361\363\377\257\377\377\377\377\4L\\{\377" \ - "\23'Q\377\26*S\377M\\|\377\242\377\377\377\377\2\253\263\302\377\17#" \ - "N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301" \ - "\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377" \ - "\377\1\20$N\377\231\26*S\377\2\24)R\377\354\356\361\377\243\377\377\377" \ - "\377\2o|\225\377\25)R\377\224\26*S\377\2\35""1Y\377\347\351\355\377\261" \ - "\377\377\377\377\3(:`\377\26*S\3772Dh\377\242\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377" \ - "\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244" \ - "\377\377\377\377\1\20$N\377\231\26*S\377\2\23'Q\377\375\375\376\377\243" \ - "\377\377\377\377\1R`\177\377\224\26*S\377\2\23(Q\377\322\327\336\377" \ - "\262\377\377\377\377\3\332\336\344\377\22'P\377\24)R\377\242\377\377" \ - "\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207" \ - "\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371" \ - "\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S" \ - "\377\1\30,U\377\244\377\377\377\377\1\20$N\377\230\26*S\377\2\25)R\377" \ - ".@d\377\243\377\377\377\377\2\376\376\376\3773Dh\377\223\26*S\377\2\22" \ - "'P\377\227\241\262\377\264\377\377\377\377\3\241\251\272\377\1\27D\377" \ - "\371\371\373\377\241\377\377\377\377\2\253\263\302\377\17#N\377\221\26" \ - "*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N" \ - "\377\230\26*S\377\2\21%O\377\222\233\256\377\243\377\377\377\377\2\371" \ - "\371\372\377\21%O\377\222\26*S\377\2\24(Q\377R`~\377\266\377\377\377" \ - "\377\2O_}\377\310\314\326\377\241\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301" \ - "\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377" \ - "\377\1\20$N\377\230\26*S\377\2\30,T\377\370\370\372\377\243\377\377\377" \ - "\377\2\235\245\266\377\20$O\377\222\26*S\377\2!4[\377\364\365\367\377" \ - "\266\377\377\377\377\2\363\364\366\377\361\362\365\377\241\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377" \ - "\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\244\377\377\377\377\1\20$N\377\227\26*S\377\2\25)S\377]k" \ - "\207\377\244\377\377\377\377\2+=c\377\25)R\377\221\26*S\377\2\20$N\377" \ - "\226\237\262\377\332\377\377\377\377\2\253\263\302\377\17#N\377\221\26" \ - "*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N" \ - "\377\227\26*S\377\2\22&P\377\361\362\364\377\243\377\377\377\377\2\330" \ - "\333\342\377\24(R\377\222\26*S\377\1FVw\377\333\377\377\377\377\2\253" \ - "\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377" \ - "\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377" \ - "\244\377\377\377\377\1\20$N\377\226\26*S\377\2\30,T\377\322\326\336\377" \ - "\244\377\377\377\377\1\214\225\252\377\223\26*S\377\1\321\325\335\377" \ - "\333\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364" \ - "\367\377\207\377\377\377\377\2\253\263\301\377\23'Q\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377\225\26" \ - "*S\377\2\27*S\377\333\336\345\377\245\377\377\377\377\1\34/W\377\221" \ - "\26*S\377\2\24(R\377@Pr\377\334\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\253\263\301" \ - "\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377" \ - "\377\1\20$N\377\222\26*S\377\4\23'P\377\20$N\377lx\222\377\352\354\360" \ - "\377\245\377\377\377\377\2\204\217\245\377\17$N\377\221\26*S\377\2\23" \ - "'P\377\350\353\356\377\334\377\377\377\377\2\253\263\302\377\17#N\377" \ - "\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\257\265\304\377" \ - "\23'Q\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377" \ - "\1\20$N\377\215\26*S\377\202\25)R\377\5\24(R\377\30,T\377%8^\377`n\211" \ - "\377\344\346\353\377\246\377\377\377\377\2\360\361\364\377$7]\377\222" \ - "\26*S\377\1Ve\203\377\335\377\377\377\377\2\253\263\302\377\17#N\377" \ - "\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\271\277\313\377" \ - "\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377" \ - "\1\0\25B\377\213\6\33G\377\7\12\40J\377\"5\\\377CRt\377r~\227\377\251" \ - "\260\300\377\336\341\347\377\363\364\366\377\250\377\377\377\377\2y\204" \ - "\234\377\24(R\377\221\26*S\377\2\17$N\377\273\301\315\377\335\377\377" \ - "\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377\207" \ - "\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371" \ - "\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S" \ - "\377\1\30,U\377\243\377\377\377\377\1\376\376\376\377\272\377\377\377" \ - "\377\2\307\314\326\377\10\35I\377\221\26*S\377\2\25*S\377'9`\377\336" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367" \ - "\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\336\377\377\377\377\1""1Cg\377\222\26*S\377" \ - "\2\23'Q\377\254\264\302\377\336\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\364\364\367\377\207\377\377\377\377\2\271\277\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\335\377\377\377" \ - "\377\2JZy\377\22&P\377\222\26*S\377\2!4[\377\356\360\363\377\336\377" \ - "\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367\377" \ - "\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26" \ - "*S\377\1\30,U\377\334\377\377\377\377\1\206\220\245\377\223\26*S\377" \ - "\2\25*S\377>Oq\377\337\377\377\377\377\2\253\263\302\377\17#N\377\221" \ - "\26*S\377\1\364\364\367\377\207\377\377\377\377\2\271\277\313\377\22" \ - "&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\333\377\377\377\377" \ - "\2v\202\232\377\22'P\377\223\26*S\377\2\16#M\377\235\245\267\377\337" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\364\364\367" \ - "\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\332\377\377\377\377\2\200\212\241\377\23'Q\377" \ - "\224\26*S\377\1\20$N\377\255\377\377\377\377\6\350\352\356\377\317\323" \ - "\333\377\303\310\322\377\315\322\332\377\330\334\343\377\364\365\367" \ - "\377\255\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\357" \ - "\360\363\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\221\26*S\377\1\30,U\377\330\377\377\377\377\3\375\375\376\377" \ - "^l\210\377\25)R\377\225\26*S\377\1P_~\377\251\377\377\377\377\16\376" \ - "\376\377\377\362\363\365\377{\206\235\377\23'Q\377\21%O\377\23'Q\377" \ - "\23(Q\377\23'Q\377\22&P\377\20%O\377\37""2Z\377u\201\232\377\341\344" \ - "\351\377\374\374\374\377\251\377\377\377\377\2\253\263\302\377\17#N\377" \ - "\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377" \ - "\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\327\377\377\377\377" \ - "\3\324\327\337\3772Cg\377\21&P\377\226\26*S\377\1\226\237\262\377\250" \ - "\377\377\377\377\4\371\372\373\377We\203\377\27+T\377\22&P\377\207\26" \ - "*S\377\5\25)S\377\22'P\377\23'Q\3778Hl\377\250\257\277\377\250\377\377" \ - "\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207" \ - "\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212" \ - "\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371" \ - "\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S" \ - "\377\1\30,U\377\325\377\377\377\377\3\354\355\361\377}\210\236\377\7" \ - "\35H\377\227\26*S\377\2\25)R\377\311\315\327\377\247\377\377\377\377" \ - "\3\332\335\344\377\37""3Z\377\25)R\377\215\26*S\377\3\15\"M\377Uc\201" \ - "\377\356\360\363\377\246\377\377\377\377\2\253\263\302\377\17#N\377\221" \ - "\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22" \ - "&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\324\377\377\377\377" \ - "\2\200\213\241\377\34""0X\377\231\26*S\377\2\24(R\377\357\361\363\377" \ - "\246\377\377\377\377\2\310\314\326\377\30,T\377\220\26*S\377\3\25)R\377" \ - "$7^\377\354\356\361\377\245\377\377\377\377\2\253\263\302\377\17#N\377" \ - "\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377" \ - "\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\320\377\377\377\377" \ - "\5\376\376\376\377\272\300\314\377gt\217\377\34""0W\377\17$N\377\231" \ - "\26*S\377\2\25)R\377-@d\377\246\377\377\377\377\2\360\361\364\377&9_" \ - "\377\222\26*S\377\3\25)R\377+=c\377\364\365\367\377\244\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377" \ - "\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\317\377\377\377\377\3t\177\230\377\12\37J\377\21&O\377\234\26" \ - "*S\377\2\22&P\377{\207\236\377\245\377\377\377\377\3\375\375\376\377" \ - "3Eh\377\25)R\377\224\26*S\377\2N]}\377\376\376\377\377\243\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\317\377\377\377\377\4\321\325\335\377r~\227\377\24)R\377" \ - "\16\"M\377\233\26*S\377\2\16#M\377\307\314\326\377\245\377\377\377\377" \ - "\2\262\271\306\377\25)R\377\225\26*S\377\2\22&P\377\310\314\326\377\243" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355" \ - "\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\322\377\377\377\377\4\276\303\317\377_m\211" \ - "\377(:`\377\17$N\377\230\26*S\377\2\22'P\377\375\375\375\377\245\377" \ - "\377\377\377\1!4[\377\226\26*S\377\2\25)S\377$6\\\377\243\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\325\377\377\377\377\2\255\265\302\377\37""2Z\377\227\26*" \ - "S\377\2(:`\377\375\375\376\377\244\377\377\377\377\2\231\242\263\377" \ - "\21%O\377\227\26*S\377\2\24(R\377\275\302\316\377\242\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377" \ - "\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\326\377\377\377\377\4\376\376\376\377\266\274\311\3775Fj\377\15" \ - "\"L\377\224\26*S\377\2@Qr\377\376\376\376\377\243\377\377\377\377\2\376" \ - "\376\376\377BRs\377\231\26*S\377\1lx\222\377\242\377\377\377\377\2\253" \ - "\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377" \ - "\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377" \ - "\331\377\377\377\377\3\221\233\256\377!4[\377\24)R\377\222\26*S\377\1" \ - "Tb\201\377\244\377\377\377\377\2\366\367\370\377\23'Q\377\231\26*S\377" \ - "\1\37""3Z\377\242\377\377\377\377\2\253\263\302\377\17#N\377\221\26*" \ - "S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\332\377\377\377\377\3\353\355" \ - "\361\377HXx\377\21%O\377\220\26*S\377\2\25)S\377jw\221\377\244\377\377" \ - "\377\377\2\220\232\255\377\21%O\377\231\26*S\377\2\12\37J\377\324\327" \ - "\337\377\241\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\334\377\377\377\377\2\215\227\253" \ - "\377\20%O\377\217\26*S\377\2\22'P\377\214\226\252\377\244\377\377\377" \ - "\377\2)Oq\377\243\377\377\377\377\2\361\363\365\377" \ - "\10\35H\377\234\26*S\377\2\25)R\377o{\224\377\240\377\377\377\377\2\253" \ - "\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377" \ - "\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377" \ - "\244\377\377\377\377\1\20$N\377\232\26*S\377\2\21&O\377t\200\231\377" \ - "\244\377\377\377\377\2\365\366\367\377\11\36J\377\206\26*S\377\1\37""2" \ - "Z\377\244\377\377\377\377\1\6\33G\377\234\26*S\377\2\25)R\377nz\224\377" \ - "\240\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377\233\26" \ - "*S\377\2/Ae\377\370\370\371\377\244\377\377\377\377\1\"5\\\377\206\26" \ - "*S\377\1\33/W\377\244\377\377\377\377\1\16#M\377\234\26*S\377\2\24)R" \ - "\377\204\217\244\377\240\377\377\377\377\2\253\263\302\377\17#N\377\221" \ - "\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22" \ - "&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377" \ - "\1\20$N\377\233\26*S\377\2\36""1Y\377\351\353\357\377\244\377\377\377" \ - "\377\1EUv\377\206\26*S\377\1\4\32F\377\244\377\377\377\377\1!4[\377\234" \ - "\26*S\377\2\24(R\377\224\235\260\377\240\377\377\377\377\2\253\263\302" \ - "\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271" \ - "\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377" \ - "\377\377\377\1\20$N\377\233\26*S\377\2\22&P\377\331\334\343\377\244\377" \ - "\377\377\377\1dq\215\377\206\26*S\377\2\10\35H\377\373\373\374\377\243" \ - "\377\377\377\377\1:Kn\377\234\26*S\377\2\24(Q\377\253\262\301\377\240" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355" \ - "\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377\233\26*S\377" \ - "\2\23'Q\377\261\267\305\377\244\377\377\377\377\1y\205\234\377\206\26" \ - "*S\377\2\11\36I\377\357\360\363\377\243\377\377\377\377\1[i\205\377\234" \ - "\26*S\377\2\23(Q\377\315\321\332\377\240\377\377\377\377\2\253\263\302" \ - "\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271" \ - "\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377" \ - "\377\377\377\1\20$N\377\233\26*S\377\2\23(Q\377\231\242\263\377\244\377" \ - "\377\377\377\1\216\227\253\377\206\26*S\377\2\13\40K\377\333\336\344" \ - "\377\243\377\377\377\377\1~\211\240\377\234\26*S\377\2\27+T\377\334\337" \ - "\345\377\240\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377" \ - "\233\26*S\377\2\24(Q\377\223\234\260\377\244\377\377\377\377\2\237\247" \ - "\270\377\25)R\377\205\26*S\377\2\16\"M\377\273\301\315\377\243\377\377" \ - "\377\377\1\251\261\300\377\234\26*S\377\2\36""1Y\377\346\350\354\377" \ - "\240\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377\233\26" \ - "*S\377\2\23'Q\377\257\266\304\377\244\377\377\377\377\2\244\253\274\377" \ - "\25)R\377\205\26*S\377\2\20%O\377\241\251\272\377\243\377\377\377\377" \ - "\2\310\314\326\377\25)R\377\233\26*S\377\2&9_\377\362\363\366\377\240" \ - "\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355" \ - "\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377\233\26*S\377" \ - "\2\23'P\377\317\323\333\377\244\377\377\377\377\2\244\253\274\377\25" \ - ")R\377\205\26*S\377\2\23'Q\377\210\222\247\377\243\377\377\377\377\2" \ - "\361\362\365\377\24(Q\377\233\26*S\377\1""0Bf\377\241\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377" \ - "\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\244\377\377\377\377\1\20$N\377\233\26*S\377\2\31-U\377\346\350" \ - "\354\377\244\377\377\377\377\2\244\253\274\377\25)R\377\206\26*S\377" \ - "\1cp\214\377\244\377\377\377\377\2""7Hk\377\25)R\377\231\26*S\377\2\22" \ - "'P\377er\214\377\241\377\377\377\377\2\253\263\302\377\17#N\377\221\26" \ - "*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N" \ - "\377\233\26*S\377\2&9_\377\361\363\365\377\244\377\377\377\377\2\244" \ - "\254\274\377\25)R\377\206\26*S\377\2O^}\377\376\376\377\377\243\377\377" \ - "\377\377\2\245\255\275\377\17$N\377\231\26*S\377\2\12\37J\377\306\313" \ - "\325\377\241\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N\377" \ - "\232\26*S\377\2\25)S\377AQs\377\245\377\377\377\377\1\233\244\265\377" \ - "\207\26*S\377\2Nq\377\207\26*S\377" \ - "\2\22'P\377gt\217\377\245\377\377\377\377\2\340\342\350\377\27+T\377" \ - "\225\26*S\377\2\22&P\377\313\317\330\377\243\377\377\377\377\2\253\263" \ - "\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377" \ - "\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244" \ - "\377\377\377\377\1\20$N\377\227\26*S\377\2\27+T\377\230\240\263\377\250" \ - "\377\377\377\377\1\33/W\377\210\26*S\377\1\35""0X\377\246\377\377\377" \ - "\377\2\207\221\247\377\21&O\377\223\26*S\377\3\25)R\377Tc\201\377\376" \ - "\376\376\377\243\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S" \ - "\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\20$N" \ - "\377\225\26*S\377\3\14!L\3778Jl\377\327\332\341\377\250\377\377\377\377" \ - "\2\347\352\355\377\10\36I\377\210\26*S\377\2\24(R\377\345\350\354\377" \ - "\246\377\377\377\377\2t\200\230\377\23'Q\377\221\26*S\377\3\25)R\377" \ - "\77Oq\377\373\373\374\377\244\377\377\377\377\2\253\263\302\377\17#N" \ - "\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377" \ - "\377\1\20$N\377\220\26*S\377\6\25)R\377\23'Q\377\17#N\377\35""0X\377" \ - "GWx\377\254\264\302\377\252\377\377\377\377\2\221\232\256\377\17$N\377" \ - "\210\26*S\377\2\25*S\377\276\304\317\377\247\377\377\377\377\2iv\220" \ - "\377\22'P\377\217\26*S\377\4\21%O\377DTu\377\366\367\371\377\376\376" \ - "\376\377\244\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\15\"L\377" \ - "\214\23(Q\377\202\23'Q\377\7\22&P\377\21%O\377+=c\377fs\216\377\277\305" \ - "\320\377\375\375\375\377\376\376\376\377\253\377\377\377\377\2=Np\377" \ - "\25)R\377\211\26*S\377\1\207\221\246\377\250\377\377\377\377\2\263\272" \ - "\307\377\17#N\377\215\26*S\377\3\20$N\377\220\231\255\377\376\376\376" \ - "\377\246\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347" \ - "\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\221\26*S\377\1\30,U\377\244\377\377\377\377\1\323\327\337\377" \ - "\214\324\330\337\377\4\330\334\342\377\342\345\352\377\360\361\364\377" \ - "\375\375\376\377\257\377\377\377\377\2\357\360\363\377\"5\\\377\212\26" \ - "*S\377\1=Np\377\251\377\377\377\377\17\360\361\364\377\220\231\255\377" \ - "5Fj\377\7\34H\377\15\"M\377\21&O\377\23'Q\377\22'P\377\22&P\377\17#N" \ - "\377\13\40K\377\14!L\377DTu\377\226\237\262\377\353\355\360\377\250\377" \ - "\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377" \ - "\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26" \ - "*S\377\1\30,U\377\344\377\377\377\377\2\322\326\336\377\27+T\377\212" \ - "\26*S\377\2\7\35H\377\374\374\375\377\253\377\377\377\377\10\350\352" \ - "\356\377\247\257\276\377v\202\232\377\\j\207\377dr\215\377q}\226\377" \ - "\225\235\260\377\307\314\326\377\254\377\377\377\377\2\253\263\302\377" \ - "\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277" \ - "\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377" \ - "\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\344\377\377" \ - "\377\377\2jw\221\377\25)R\377\212\26*S\377\2\17$N\377\223\234\257\377" \ - "\337\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\343\377\377\377\377\2\370\371\372\377" \ - "\15\"M\377\214\26*S\377\2""7Il\377\376\376\376\377\336\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377" \ - "\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\343\377\377\377\377\2\203\215\243\377\23'Q\377\214\26*S\377\2" \ - "\37""2Z\377\353\354\360\377\336\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\343\377\377\377" \ - "\377\1""0Bf\377\215\26*S\377\2\23'Q\377\247\256\276\377\336\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\342\377\377\377\377\2\245\255\275\377\16#M\377\216\26*S\377" \ - "\1\"4[\377\336\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\341\377\377\377\377\2\352\354\360" \ - "\377\30,T\377\217\26*S\377\2\20$N\377\267\275\312\377\335\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\341\377\377\377\377\1v\202\231\377\221\26*S\377\1Ud\202\377" \ - "\335\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\340\377\377\377\377\2\305\312\324\377" \ - "\11\36I\377\221\26*S\377\2\20$N\377\356\357\363\377\334\377\377\377\377" \ - "\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377" \ - "\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30" \ - ",U\377\336\377\377\377\377\3\376\376\377\377\367\370\371\377':`\377\222" \ - "\26*S\377\2\23(Q\377IYy\377\334\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\337\377\377\377" \ - "\377\2N]}\377\24(Q\377\224\26*S\377\1\320\324\335\377\333\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\336\377\377\377\377\2mz\223\377\25)R\377\225\26*S\377\1T" \ - "c\201\377\333\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\335\377\377\377\377\2\200\213\241" \ - "\377\21%O\377\226\26*S\377\2\12\37J\377\264\272\307\377\332\377\377\377" \ - "\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351\355\377\207\377" \ - "\377\377\377\2\271\277\313\377\22&P\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\221\26*S\377" \ - "\1\30,U\377\334\377\377\377\377\2\233\244\265\377\25)R\377\230\26*S\377" \ - "\2+=c\377\366\367\370\377\265\377\377\377\377\2\373\373\374\377\355\356" \ - "\361\377\242\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377" \ - "\1\347\351\355\377\207\377\377\377\377\2\271\277\313\377\22&P\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\221\26*S\377\1\30,U\377\333\377\377\377\377\2o|\225\377" \ - "\23'Q\377\231\26*S\377\2\23(Q\377p}\226\377\265\377\377\377\377\3We\203" \ - "\377\30,T\377\245\255\275\377\241\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\277\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\331\377\377\377" \ - "\377\3\370\370\372\377ly\222\377\21%O\377\233\26*S\377\2\15!L\377\264" \ - "\272\310\377\263\377\377\377\377\5\300\305\320\377\25*S\377\26*S\377" \ - "\"5\\\377\366\366\370\377\240\377\377\377\377\2\253\263\302\377\17#N" \ - "\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\271\276\313" \ - "\377\22&P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\330\377\377\377" \ - "\377\2\371\371\372\3774Ei\377\236\26*S\377\2\35""1Y\377\373\373\374\377" \ - "\261\377\377\377\377\2\367\370\371\377\25*R\377\202\26*S\377\2\24(R\377" \ - "\214\226\252\377\240\377\377\377\377\2\253\263\302\377\17#N\377\221\26" \ - "*S\377\1\347\351\355\377\207\377\377\377\377\2\304\311\323\377\21%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\221\26*S\377\1\30,U\377\327\377\377\377\377\3\241\252" \ - "\272\377\34""0X\377\24(Q\377\236\26*S\377\4\24(Q\3776Gk\377\370\371\372" \ - "\377\376\377\377\377\257\377\377\377\377\2DTu\377\24(R\377\203\26*S\377" \ - "\2\20%O\377\333\337\345\377\237\377\377\377\377\2\253\263\302\377\17" \ - "#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\313\320\331" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\325\377\377\377" \ - "\377\3\347\351\355\377Q`~\377\15\"M\377\241\26*S\377\2\25)R\377Zh\205" \ - "\377\257\377\377\377\377\2r~\227\377\21%O\377\205\26*S\377\1Tb\201\377" \ - "\237\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\324\377\377\377\377\3\202\215\243\377" \ - "\37""2Y\377\25)R\377\243\26*S\377\2\24(Q\377Tc\201\377\255\377\377\377" \ - "\377\2\205\217\245\377\24(R\377\206\26*S\377\2\20%O\377\317\322\333\377" \ - "\236\377\377\377\377\2\253\263\302\377\17#N\377\221\26*S\377\1\347\351" \ - "\355\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\221\26*S\377\1\30,U\377\321\377\377\377\377\4\375\375\375\377" \ - "\244\254\274\377.Ae\377\16#M\377\246\26*S\377\3\20%O\377`n\212\377\375" \ - "\375\375\377\252\377\377\377\377\2\207\221\246\377\15!L\377\210\26*S" \ - "\377\2\40""3Z\377\370\371\372\377\235\377\377\377\377\2\253\263\302\377" \ - "\17#N\377\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\313\317" \ - "\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377" \ - "\377\377\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\317\377\377" \ - "\377\377\4\374\374\375\377\252\262\300\377\37""2Z\377\25)R\377\252\26" \ - "*S\377\1GWw\377\251\377\377\377\377\2z\206\235\377\25)R\377\212\26*S" \ - "\377\1\232\243\264\377\235\377\377\377\377\2\253\263\302\377\17#N\377" \ - "\221\26*S\377\1\347\351\355\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\221\26*S\377\1\30,U\377\315\377\377\377\377" \ - "\5\335\340\346\377fs\216\377*c\377" \ - "\202\24(R\377\226\26*S\377\1\32-V\377\232#6\\\377\1\36""2Y\377\222\26" \ - "*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\233\26*S\377\11\25)S\377\17#N\377\6\33" \ - "G\377&9_\377Xf\204\377\201\214\242\377\236\246\267\377\265\274\311\377" \ - "\274\301\315\377\203\305\312\324\377\11\274\302\316\377\262\271\306\377" \ - "\236\246\267\377\200\213\242\377Yg\205\377,>c\377\4\32F\377\15\"M\377" \ - "\24)R\377\307\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317" \ - "\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230" \ - "\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377" \ - "\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336" \ - "\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377" \ - "\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377" \ - "\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20" \ - "$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377" \ - "\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0" \ - "\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207" \ - "\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377" \ - "\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207" \ - "\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207" \ - "\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251" \ - "\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377" \ - "\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367" \ - "\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20" \ - "%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330" \ - "\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313" \ - "\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377\20%O\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377" \ - "\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\313\317\330\377" \ - "\20%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377" \ - "\207\377\377\377\377\2\313\317\330\377\20%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\312\317\330" \ - "\377\21%O\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344" \ - "\377\207\377\377\377\377\2\333\336\344\377\17$N\377\207\26*S\377\1\31" \ - ",U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4" \ - "Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377" \ - "\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377\377\2\334" \ - "\340\346\377\17$N\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217" \ - "\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377" \ - "\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\332" \ - "\336\344\377\207\377\377\377\377\2\334\340\346\377\17$N\377\207\26*S" \ - "\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*" \ - "S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225\251\377" \ - "\20$N\377\377\26*S\377\367\26*S\377\1\332\336\344\377\207\377\377\377" \ - "\377\2\334\340\346\377\17$N\377\207\26*S\377\1\31,U\377\212\377\377\377" \ - "\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377" \ - "\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*" \ - "S\377\1\333\336\344\377\207\377\377\377\377\2\334\340\346\377\17$N\377" \ - "\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\367\26*S\377\1\321\325\335\377\207\377" \ - "\377\377\377\2\334\340\346\377\17$N\377\207\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\367\26*S\377\1\333\336\344\377\207\377\377\377\377\2\330\334\342\377" \ - "\17$N\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377" \ - "\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377" \ - "\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\1\345\347\354\377" \ - "\207\377\377\377\377\2\306\313\324\377\21%O\377\207\26*S\377\1\31,U\377" \ - "\212\377\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377" \ - "\371\372\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26" \ - "*S\377\367\26*S\377\1\356\360\363\377\207\377\377\377\377\2\265\273\310" \ - "\377\22'P\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254" \ - "\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377" \ - "\377\2\214\225\251\377\20$N\377\377\26*S\377\367\26*S\377\210\377\377" \ - "\377\377\2\253\263\301\377\23'Q\377\207\26*S\377\1\31,U\377\212\377\377" \ - "\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372\373" \ - "\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377\365" \ - "\26*S\377\2\24)R\3779Jm\377\210\377\377\377\377\2\220\231\255\377\25" \ - ")S\377\207\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20" \ - "$N\377\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2" \ - "\214\225\251\377\20$N\377\377\26*S\377\365\26*S\377\2\22&P\377u\201\231" \ - "\377\210\377\377\377\377\1ly\223\377\210\26*S\377\1\31,U\377\212\377" \ - "\377\377\0\2\217\230\254\377\20$N\377\207\26*S\377\2""4Fi\377\371\372" \ - "\373\377\207\377\377\377\377\2\214\225\251\377\20$N\377\377\26*S\377" \ - "\365\26*S\377\2\17#N\377\263\272\307\377\210\377\377\377\377\1O_}\377" \ - "\210\26*S\377\1\31,U\377\212\377\377\377\0\2\217\230\254\377\20$N\377" \ - "\207\26*S\377\2""4Fi\377\371\372\373\377\207\377\377\377\377\2\214\225" \ - "\251\377\20$N\377\377\26*S\377\365\26*S\377\2\23'Q\377\366\367\370\377" \ - "\210\377\377\377\377\1*Np\377" \ - "\261\271\306\377\253\377\377\377\0\2\217\230\254\377\20$N\377\377\26" \ - "*S\377\356\26*S\377\11\25)R\377\23'Q\377\20$N\377\14!L\377\11\36J\377" \ - "&8^\377We\203\377\202\215\243\377\267\275\311\377\256\377\377\377\0\2" \ - "\224\235\260\377\33/W\377\377!4[\377\353!4[\377\7\"5\\\377$7]\377&9_" \ - "\3776Gk\377Zh\205\377\212\224\251\377\304\311\323\377\377\377\377\377" \ - "\0\377\377\377\377\0\377\377\377\377\0\377\377\377\377\0\377\377\377" \ - "\377\0\377\377\377\377\0\377\377\377\377\0\377\377\377\377\0\377\377" \ - "\377\377\0\377\377\377\377\0\377\377\377\377\0\370\377\377\377\0") - - diff --git a/bsp/meta-boundary/recipes-core/psplash/psplash_git.bbappend b/bsp/meta-boundary/recipes-core/psplash/psplash_git.bbappend deleted file mode 100644 index 80f4f74a..00000000 --- a/bsp/meta-boundary/recipes-core/psplash/psplash_git.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SPLASH_IMAGES = "file://boundary-logo-img.h;outsuffix=default" diff --git a/bsp/meta-boundary/recipes-graphics/tslib_%.bbappend b/bsp/meta-boundary/recipes-graphics/tslib_%.bbappend deleted file mode 100644 index 2b692897..00000000 --- a/bsp/meta-boundary/recipes-graphics/tslib_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -SRC_URI = "git://github.com/boundarydevices/tslib.git;branch=${SRCBRANCH} \ -" -SRCBRANCH = "boundary-kergoth" -SRCREV = "${AUTOREV}" - -PACKAGECONFIG = "debounce dejitter linear pthres variance input" - -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm)" diff --git a/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mm/weston.ini b/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mm/weston.ini deleted file mode 100644 index 913b13e5..00000000 --- a/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mm/weston.ini +++ /dev/null @@ -1,29 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 -gbm-format=argb8888 -backend=drm-backend.so - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -[output] -name=DSI-1 -mode=current - -[shell] -#size=1920x1080 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mq/weston.ini b/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mq/weston.ini deleted file mode 100644 index 3a98b988..00000000 --- a/bsp/meta-boundary/recipes-graphics/wayland/weston/mx8mq/weston.ini +++ /dev/null @@ -1,25 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 -gbm-format=argb8888 -backend=fbdev-backend.so - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -[shell] -size=1920x1080 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-boundary/recipes-graphics/wayland/weston_4.0.0.imx.bbappend b/bsp/meta-boundary/recipes-graphics/wayland/weston_4.0.0.imx.bbappend deleted file mode 100644 index 6401f1a6..00000000 --- a/bsp/meta-boundary/recipes-graphics/wayland/weston_4.0.0.imx.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/weston:" - -SRC_URI_append = "${@bb.utils.contains('MACHINE', 'nitrogen8mm', "file://mx8mm/weston.ini", "", d)}" -SRC_URI_append = "${@bb.utils.contains('MACHINE', 'nitrogen8m', "file://mx8mq/weston.ini", "", d)}" - -do_install_append_mx8mm() { - - # install default weston.ini - install -D -m 0644 ${WORKDIR}/mx8mm/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini -} - diff --git a/bsp/meta-boundary/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend b/bsp/meta-boundary/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend deleted file mode 100644 index 46fbab94..00000000 --- a/bsp/meta-boundary/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# Remove xinput_calibrator autostart. Our displays are already calibrated. -# Leaves binary in place in case they want to run it anyway manually - -do_install_append(){ - rm -rf ${D}${sysconfdir}/ -} - -FILES_${PN}_remove += "${sysconfdir}/xdg/autostart" diff --git a/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg/0001-v2-xserver-xorg-Fix-X-server-crash.patch b/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg/0001-v2-xserver-xorg-Fix-X-server-crash.patch deleted file mode 100644 index 37693d65..00000000 --- a/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg/0001-v2-xserver-xorg-Fix-X-server-crash.patch +++ /dev/null @@ -1,45 +0,0 @@ -From eaeaa8b1d84310d40cf30803b24c2155ce1ee4cb Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Mon, 20 May 2019 20:52:15 +0000 -Subject: [PATCH] [v2] xserver-xorg: Fix X server crash - -Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of -useSIGIO option: - -xfree86 SIGIO support is reworked to use internal versions of -OsBlockSIGIO and OsReleaseSIGIO - -The check for useSIGIO is no longer needed. - -Upstream-Status: Pending - -Signed-off-by: Tom Hochstein -Signed-off-by: Troy Kisky ---- - hw/xfree86/os-support/shared/sigio.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c -index 884a71c..be76498 100644 ---- a/hw/xfree86/os-support/shared/sigio.c -+++ b/hw/xfree86/os-support/shared/sigio.c -@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) - int i; - int installed = FALSE; - -- if (!xf86Info.useSIGIO) -- return 0; -- - for (i = 0; i < MAX_FUNCS; i++) { - if (!xf86SigIOFuncs[i].f) { - if (xf86IsPipe(fd)) -@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) - int max; - int ret; - -- if (!xf86Info.useSIGIO) -- return 0; -- - max = 0; - ret = 0; - for (i = 0; i < MAX_FUNCS; i++) { diff --git a/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg_1.20.1.bbappend b/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg_1.20.1.bbappend deleted file mode 100644 index 7ea8cddd..00000000 --- a/bsp/meta-boundary/recipes-graphics/xorg-xserver/xserver-xorg_1.20.1.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://0001-v2-xserver-xorg-Fix-X-server-crash.patch" - diff --git a/bsp/meta-boundary/recipes-kernel/kernel-iio/kernel-iio.bb b/bsp/meta-boundary/recipes-kernel/kernel-iio/kernel-iio.bb deleted file mode 100644 index 9124f1cb..00000000 --- a/bsp/meta-boundary/recipes-kernel/kernel-iio/kernel-iio.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "IIO tools for Linux" -DESCRIPTION = "Tools to monitor and list Industrial I/O (IIO) devices." - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -inherit linux-kernel-base kernel-arch kernelsrc - -do_configure[depends] += "virtual/kernel:do_shared_workdir" -do_populate_lic[depends] += "virtual/kernel:do_patch" - -B = "${WORKDIR}/${BPN}-${PV}" -SPDX_S = "${S}/tools/iio" - -EXTRA_OEMAKE = '\ - -C ${S}/tools/iio \ - O=${B} \ - CROSS_COMPILE=${TARGET_PREFIX} \ - ARCH=${ARCH} \ - CC="${CC}" \ - AR="${AR}" \ - LD="${LD}" \ - EXTRA_CFLAGS="-idirafter ${S}/include" \ -' - -EXTRA_OEMAKE += "\ - 'INSTALL_ROOT=${D}' \ - 'BINDIR=${bindir}' \ -" - -do_compile() { - # Linux kernel build system is expected to do the right thing - unset CFLAGS - oe_runmake all -} - -do_install() { - # Linux kernel build system is expected to do the right thing - unset CFLAGS - oe_runmake install -} - -do_configure_prepend () { - # Fix for rebuilding - rm -rf ${B}/ - mkdir -p ${B}/ -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -FILES_${PN} += "${bindir}" diff --git a/bsp/meta-boundary/recipes-kernel/kernel-modules/kernel-module-qcacld_git.bb b/bsp/meta-boundary/recipes-kernel/kernel-modules/kernel-module-qcacld_git.bb deleted file mode 100644 index add8e8a0..00000000 --- a/bsp/meta-boundary/recipes-kernel/kernel-modules/kernel-module-qcacld_git.bb +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2016 Boundary Devices -SUMMARY = "QCACLD driver for QCA9377-based BD-SDMAC module" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://${S}/CORE/HDD/src/wlan_hdd_main.c;beginline=1;endline=20;md5=c191a07d6df8a17ee5b865137f729304" - -inherit module - -SRCREV = "${AUTOREV}" - -SRC_URI = "git://github.com/boundarydevices/qcacld-2.0.git;branch=${SRCBRANCH} \ -" -SRCBRANCH = "boundary-LNX.LEH.4.2.2.2" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE_append = " CONFIG_CLD_HL_SDIO_CORE=y" - -COMPATIBLE_MACHINE = "mx6|mx7|mx8" diff --git a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-bdsdmac_git.bb b/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-bdsdmac_git.bb deleted file mode 100644 index 07956080..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-bdsdmac_git.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "WiFi and BT firmware files for BD-SDMAC module" -SECTION = "kernel" - -LICENSE = "Firmware-qca" - -LIC_FILES_CHKSUM = "\ - file://LICENSE.qca_firmware;md5=e8b1e9e8ce377ca5b2c1098e5690f470 \ -" - -SRCREV = "5e4b71211ecbb79e7693d2ee07361847f5a0cb40" - -SRC_URI = "git://github.com/boundarydevices/qca-firmware.git;branch=${SRCBRANCH}" -SRCBRANCH = "bd-sdmac-qcacld" - -S = "${WORKDIR}/git" - -# These are not common licenses, set NO_GENERIC_LICENSE for them -# so that the license files will be copied from fetched source -NO_GENERIC_LICENSE[Firmware-qca] = "LICENSE.qca_firmware" - -inherit allarch - -CLEANBROKEN = "1" - -do_compile() { - : -} - -do_install() { - DESTDIR=${D} make install -} - -FILES_${PN} += "/lib/firmware/* /lib/firmware/*/*" - -RDEPENDS_${PN} += "crda" diff --git a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-gslx680_1.0.bb b/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-gslx680_1.0.bb deleted file mode 100644 index ff67b998..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware-gslx680_1.0.bb +++ /dev/null @@ -1,29 +0,0 @@ -SUMMARY = "Firmware files for GSLx680 touch controllers" -SECTION = "kernel" - -LICENSE = "\ - GPLv2+ \ -" - -LIC_FILES_CHKSUM = "\ - file://${WORKDIR}/LICENSE.GPLv2+.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ -" - -SRC_URI_append = "\ - http://linode.boundarydevices.com/gsl1680.fw;name=gsl1680 \ - http://linode.boundarydevices.com/LICENSE.GPLv2+.txt;name=license \ -" - -SRC_URI[gsl1680.sha256sum] = "d0e85f5b601e58ef04dd016f99de89aebdc5e16c7b0173f45196f9593d43e854" -SRC_URI[license.sha256sum] = "8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643" - -inherit allarch update-alternatives - -CLEANBROKEN = "1" - -do_install() { - mkdir -p ${D}/lib/firmware/silead - install -m 0644 ${WORKDIR}/gsl1680.fw ${D}/lib/firmware/silead/ -} - -FILES_${PN} += "/lib/firmware/*" diff --git a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index fdb63989..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,16 +0,0 @@ -# Support additional firmware for TiWi-BLE module -# TIInit_7.6.15.bts is required for bluetooth support but this particular -# version is not available in the linux-firmware repository. -# -SRC_URI_append = "\ - https://git.ti.com/ti-bt/service-packs/blobs/raw/54f5c151dacc608b19ab2ce4c30e27a3983048b2/initscripts/TIInit_7.6.15.bts;name=TIInit_7.6.15 \ -" -SRC_URI[TIInit_7.6.15.md5sum] = "3f84f0d782376363d0028fc4b2402ccb" -SRC_URI[TIInit_7.6.15.sha256sum] = "e78156ad81446fdeb46da661290f763f3fe97d111526b2d19cd764a634268888" - -do_install_append() { - cp ${WORKDIR}/TIInit_7.6.15.bts ${D}/lib/firmware/ti-connectivity/ -} - -PACKAGE_ARCH_mx7 = "${MACHINE_ARCH}" -PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}" diff --git a/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_%.bbappend b/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_%.bbappend deleted file mode 100644 index a2457cb7..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_%.bbappend +++ /dev/null @@ -1,23 +0,0 @@ -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/files/arm:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/files/arm:" -FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/files/arm64:" - -SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH} \ -" - -LOCALVERSION = "-2.0.0-ga+yocto" -SRCREV = "${AUTOREV}" -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm)" - -S = "${WORKDIR}/git" - -do_merge_default_config() { - - if [ -f ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ]; then - # create config with make config - oe_runmake -C ${S} O=${KBUILD_OUTPUT} ${KERNEL_DEFCONFIG} - cp ${KBUILD_OUTPUT}/.config ${WORKDIR}/defconfig - fi - -} -addtask merge_default_config before do_preconfigure after do_patch diff --git a/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.14.x.bb b/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.14.x.bb deleted file mode 100644 index 96cf9cf4..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux/linux-boundary_4.14.x.bb +++ /dev/null @@ -1,22 +0,0 @@ -# Adapted from linux-imx.inc, copyright (C) 2013, 2014 O.S. Systems Software LTDA -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-kernel/linux/linux-imx.inc - -SUMMARY = "Linux kernel for Boundary Devices boards" - -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/${PN}-${PV}/arm:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/${PN}-${PV}/arm:" -FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/${PN}-${PV}/arm64:" - -SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH} \ - file://defconfig \ -" - -LOCALVERSION = "-2.0.0-ga+yocto" -SRCBRANCH = "boundary-imx_4.14.x_2.0.0_ga" -SRCREV = "${AUTOREV}" -DEPENDS += "lzop-native bc-native" -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m)" - -KERNEL_DEFCONFIG = "boundary_defconfig" diff --git a/bsp/meta-boundary/recipes-kernel/linux/linux-imx-headers_4.14.x.bb b/bsp/meta-boundary/recipes-kernel/linux/linux-imx-headers_4.14.x.bb deleted file mode 100644 index 2040c02f..00000000 --- a/bsp/meta-boundary/recipes-kernel/linux/linux-imx-headers_4.14.x.bb +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Installs i.MX-specific kernel headers" -DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \ -New headers are installed in ${includedir}/imx." -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -LOCALVERSION = "-imx" -SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH}" -SRCBRANCH = "boundary-imx_4.14.x_2.0.0_ga" -SRCREV = "${AUTOREV}" - -S = "${WORKDIR}/git" - -do_compile[noexec] = "1" - -IMX_UAPI_HEADERS = " \ - dma-buf.h \ - hantrodec.h \ - hx280enc.h \ - ion.h \ - ipu.h \ - isl29023.h \ - mxc_asrc.h \ - mxc_dcic.h \ - mxc_mlb.h \ - mxc_sim_interface.h \ - mxc_v4l2.h \ - mxcfb.h \ - pxp_device.h \ - pxp_dma.h \ - version.h \ - videodev2.h \ -" - -do_install() { - # We install all headers inside of B so we can copy only the - # whitelisted ones, and there is no risk of a new header to be - # installed by mistake. - oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} - - # FIXME: The ion.h is still on staging so "promote" it for now - cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux - - # Install whitelisted headers only - for h in ${IMX_UAPI_HEADERS}; do - install -D -m 0644 ${B}${includedir}/linux/$h \ - ${D}${includedir}/imx/linux/$h - done -} - -ALLOW_EMPTY_${PN} = "1" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_HOST_imx = ".*" -COMPATIBLE_HOST ?= "(none)" diff --git a/bsp/meta-boundary/recipes-sato/images/boundary-eval-image.bb b/bsp/meta-boundary/recipes-sato/images/boundary-eval-image.bb deleted file mode 100644 index 57950464..00000000 --- a/bsp/meta-boundary/recipes-sato/images/boundary-eval-image.bb +++ /dev/null @@ -1,49 +0,0 @@ -# Basically core-image-sato-dev + extra packages in IMAGE_INSTALL below - -DESCRIPTION = "Image with Sato for development work. It includes everything \ -within core-image-sato plus a native toolchain, application development and \ -testing libraries, profiling and debug symbols. \ -Also includes many other packages for a generic Boundary Devices Evaluation Image" - -IMAGE_FEATURES += "splash package-management x11-base x11-sato ssh-server-dropbear hwcodecs dev-pkgs" - -LICENSE = "MIT" - -inherit core-image distro_features_check - -REQUIRED_DISTRO_FEATURES = "x11" -CONFLICT_DISTRO_FEATURES = "wayland" - -CORE_IMAGE_BASE_INSTALL += "\ - packagegroup-core-x11-sato-games \ - nodejs \ - packagegroup-fsl-gstreamer1.0-full \ - tslib-tests tslib-calibrate \ - flex \ - gcc \ - git \ - m4 \ - make \ - iperf3 \ - libtool \ - nano \ - python-compiler \ - strace \ - screen \ - minicom \ - openssl \ - cryptodev-module \ -" - -# For silex module support uncomment the line below and register your ssh key on our webserver to get access. -# Silex requires some terms and conditions to be accepted before you can build -# Please fill out the form located here for access: https://boundarydevices.com/private-git-access/ -#CORE_IMAGE_BASE_INSTALL += "kernel-module-silex linux-firmware-silex" - -# Video input demos only on nitrogen6x/sx/7 platform -# Chromium not on nitrogen7 -CORE_IMAGE_BASE_INSTALL_append_nitrogen6x += "video-input-icon firefox qt5everywheredemo cinematicexperience" -#CORE_IMAGE_BASE_INSTALL_append_nitrogen6x += "chromium" -CORE_IMAGE_BASE_INSTALL_append_nitrogen6x-lite += "chromium firefox" -CORE_IMAGE_BASE_INSTALL_append_nitrogen6sx += "video-input-icon chromium firefox" -CORE_IMAGE_BASE_INSTALL_append_nitrogen7 += "video-input-icon" diff --git a/bsp/meta-boundary/recipes-sato/packagegroups/packagegroup-core-x11-sato.bbappend b/bsp/meta-boundary/recipes-sato/packagegroups/packagegroup-core-x11-sato.bbappend deleted file mode 100644 index 98970335..00000000 --- a/bsp/meta-boundary/recipes-sato/packagegroups/packagegroup-core-x11-sato.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Get rid of connman -NETWORK_MANAGER = "networkmanager" diff --git a/bsp/meta-freescale-3rdparty/.gitignore b/bsp/meta-freescale-3rdparty/.gitignore index b25c15b8..983cee9c 100644 --- a/bsp/meta-freescale-3rdparty/.gitignore +++ b/bsp/meta-freescale-3rdparty/.gitignore @@ -1 +1,5 @@ *~ +*.bak +*.orig +*.rej +*.swp diff --git a/bsp/meta-freescale-3rdparty/README b/bsp/meta-freescale-3rdparty/README index 2c59aa68..efd6a002 100644 --- a/bsp/meta-freescale-3rdparty/README +++ b/bsp/meta-freescale-3rdparty/README @@ -7,22 +7,28 @@ use with OpenEmbedded and/or Yocto Freescale's BSP layer. This layer depends on: URI: git://git.openembedded.org/openembedded-core -branch: sumo +branch: master revision: HEAD URI: git://git.yoctoproject.org/meta-freescale -branch: sumo +branch: master revision: HEAD Contributing ------------ -To contribute to this layer you should the patches for review to the -mailing list (meta-freescale@yoctoproject.org). +Please submit any patches against the `meta-freescale-3rdparty` layer by +using the GitHub pull-request feature. Fork the repo, make a branch, +do the work, rebase from upstream, create the pull request. -Please refer to: +For some useful guidelines to be followed when submitting patches, +please refer to: http://openembedded.org/wiki/Commit_Patch_Message_Guidelines +Pull requests will be discussed within the GitHub pull-request +infrastructure. If you want to get informed on new PRs and the +follow-up discussions please use GitHub's notification system. + Mailing list: https://lists.yoctoproject.org/listinfo/meta-freescale @@ -30,11 +36,3 @@ Mailing list: Source code: https://github.com/Freescale/meta-freescale-3rdparty - -When creating a patch of the last commit, use - - git format-patch -s --subject-prefix='3rdparty][PATCH][sumo' -1 - -To send it to the community, use - - git send-email --to meta-freescale@yoctoproject.org diff --git a/bsp/meta-freescale-3rdparty/conf/layer.conf b/bsp/meta-freescale-3rdparty/conf/layer.conf index 63fdea3d..1de1d658 100644 --- a/bsp/meta-freescale-3rdparty/conf/layer.conf +++ b/bsp/meta-freescale-3rdparty/conf/layer.conf @@ -5,9 +5,9 @@ BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ ${LAYERDIR}/recipes-*/*/*.bbappend" -BBFILE_COLLECTIONS += "fsl-arm-extra" -BBFILE_PATTERN_fsl-arm-extra := "^${LAYERDIR}/" -BBFILE_PRIORITY_fsl-arm-extra = "4" +BBFILE_COLLECTIONS += "freescale-3rdparty" +BBFILE_PATTERN_freescale-3rdparty := "^${LAYERDIR}/" +BBFILE_PRIORITY_freescale-3rdparty = "4" -LAYERSERIES_COMPAT_fsl-arm-extra = "thud" -LAYERDEPENDS_fsl-arm-extra = "core freescale-layer" +LAYERSERIES_COMPAT_freescale-3rdparty = "zeus dunfell" +LAYERDEPENDS_freescale-3rdparty = "core freescale-layer" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/apalis-imx6.conf b/bsp/meta-freescale-3rdparty/conf/machine/apalis-imx6.conf index a9b9af0d..8125f61f 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/apalis-imx6.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/apalis-imx6.conf @@ -9,11 +9,9 @@ MACHINEOVERRIDES =. "mx6:mx6q:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc -PREFERRED_PROVIDER_virtual/kernel ??= "linux-toradex" -PREFERRED_PROVIDER_virtual/kernel_use-mainline-bsp ??= "linux-fslc" +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ??= "linux-toradex" KERNEL_DEVICETREE += "imx6q-apalis-eval.dtb imx6q-apalis-ixora.dtb \ imx6q-apalis-ixora-v1.1.dtb" -KERNEL_DEVICETREE_use-mainline-bsp += "imx6q-apalis-ixora.dtb" KERNEL_IMAGETYPE = "zImage" # The kernel lives in a seperate FAT partition, don't deploy it in /boot/ RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" @@ -22,6 +20,7 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" SPL_BINARY = "SPL" # The SPL configures the DDR RAM depending on the module it runs on. Thus there @@ -33,6 +32,8 @@ UBOOT_ENTRYPOINT_use-mainline-bsp = "0x10008000" IMAGE_FSTYPES += "tar.xz" # wic support +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" WKS_FILE = "sdimage-bootpart.wks" MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g pci" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/ccimx6ulsbcexpress.conf b/bsp/meta-freescale-3rdparty/conf/machine/ccimx6ulsbcexpress.conf deleted file mode 100644 index 45508727..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/ccimx6ulsbcexpress.conf +++ /dev/null @@ -1,38 +0,0 @@ -#@TYPE: Machine -#@NAME: ConnecCore 6UL SBC Express -#@SOC: i.MX6UL -#@DESCRIPTION: Machine configuration for ConnectCore 6UL SBC Express board. -#@MAINTAINER: Alex Gonzalez - -MACHINEOVERRIDES =. "mx6:mx6ul:ccimx6ul:use-mainline-bsp:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-cortexa7.inc - -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-digi" -PREFERRED_PROVIDER_u-boot = "u-boot-digi" - -UBOOT_BOOTSCRIPT = "boot.scr" - -UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter" -UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig" -UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig" - -MACHINE_EXTRA_RDEPENDS += " \ - mtd-utils-ubifs \ -" -# mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files) -# Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size. -MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255" - -# mkfs.ubifs parameters for rootfs partition -# Max LEB count (-c 8191) calculated for a partition of up to 1 GiB considering 128 KiB erase-block size. -MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191" - -IMAGE_CLASSES += "image_types_digi" -# Overwrite the defaults in imx-base not to include wic images -IMAGE_FSTYPES = "tar.bz2 ubifs boot.ubifs" - -SERIAL_CONSOLE = "115200 ttymxc4" - -KERNEL_DEVICETREE = "imx6ul-ccimx6ulsbcexpress.dtb" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/cgtqmx6.conf b/bsp/meta-freescale-3rdparty/conf/machine/cgtqmx6.conf index 5be7971d..bce34b19 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/cgtqmx6.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/cgtqmx6.conf @@ -16,13 +16,13 @@ UBOOT_SUFFIX = "img" SPL_BINARY = "SPL" UBOOT_CONFIG ??= "cgtqmx6" UBOOT_CONFIG[cgtqmx6] = "cgtqmx6eval_defconfig" -WKS_FILE = "imx-uboot-spl-bootpart.wks" +WKS_FILE = "imx-uboot-spl-bootpart.wks.in" # Use linux kernel QMX6 PREFERRED_PROVIDER_virtual/kernel ??= "linux-congatec" KERNEL_DEVICETREE = "imx6q-qmx6.dtb imx6dl-qmx6.dtb" KERNEL_IMAGETYPE = "uImage" -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" MACHINE_FEATURES += " pci" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/cm-fx6.conf b/bsp/meta-freescale-3rdparty/conf/machine/cm-fx6.conf deleted file mode 100644 index 81d1062e..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/cm-fx6.conf +++ /dev/null @@ -1,21 +0,0 @@ -#@TYPE: Machine -#@NAME: CompuLab CM-FX6 -#@SOC: i.MX6 Q/DL -#@DESCRIPTION: Machine configuration for CompuLab CM-FX6 machines -#@MAINTAINER: Valentin Raevsky - -MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:" - -require conf/machine/include/imx-base.inc -require conf/machine/include/tune-cortexa9.inc - -PREFERRED_PROVIDER_u-boot = "u-boot-compulab" -PREFERRED_PROVIDER_virtual/kernel = "linux-compulab" - -UBOOT_MACHINE ?= "cm_fx6_defconfig" - -KERNEL_DEVICETREE = "imx6dl-cm-fx6.dtb imx6dl-sbc-fx6.dtb imx6dl-sbc-fx6m.dtb imx6q-cm-fx6.dtb imx6q-sbc-fx6.dtb imx6q-sbc-fx6m.dtb" - -MACHINE_FEATURES += "pci wifi bluetooth alsa bluetooth serial usbhost wifi" - -SERIAL_CONSOLE = "115200 ttymxc3" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf index 0c6d7ccf..45f4d9b2 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf @@ -9,11 +9,10 @@ MACHINEOVERRIDES =. "mx6:mx6dl:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc -PREFERRED_PROVIDER_virtual/kernel ??= "linux-toradex" -PREFERRED_PROVIDER_virtual/kernel_use-mainline-bsp ??= "linux-fslc" +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ??= "linux-toradex" KERNEL_DEVICETREE += "imx6dl-colibri-eval-v3.dtb imx6dl-colibri-cam-eval-v3.dtb \ imx6dl-colibri-aster.dtb" -KERNEL_DEVICETREE_use-mainline-bsp += "imx6dl-colibri-eval-v3.dtb" +KERNEL_DEVICETREE_use-mainline-bsp = "imx6dl-colibri-eval-v3.dtb" KERNEL_IMAGETYPE = "zImage" # The kernel lives in a seperate FAT partition, don't deploy it in /boot/ RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" @@ -22,6 +21,7 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" SPL_BINARY = "SPL" UBOOT_CONFIG ??= "spl" @@ -31,6 +31,8 @@ UBOOT_ENTRYPOINT_use-mainline-bsp = "0x10008000" IMAGE_FSTYPES += "tar.xz" # wic support +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" WKS_FILE = "sdimage-bootpart.wks" MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6ull.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6ull.conf index a70dd421..1e1fd93c 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6ull.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx6ull.conf @@ -9,7 +9,7 @@ MACHINEOVERRIDES =. "mx6:mx6ul:mx6ull:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa7.inc -PREFERRED_PROVIDER_virtual/kernel ?= "linux-toradex" +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ?= "linux-toradex" KERNEL_DEVICETREE += "imx6ull-colibri-eval-v3.dtb imx6ull-colibri-wifi-eval-v3.dtb" KERNEL_IMAGETYPE = "zImage" # The kernel lives in its own ubi volume. @@ -19,13 +19,16 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" UBOOT_BINARY = "u-boot-nand.imx" -UBOOT_MAKE_TARGET = "u-boot-nand.imx" +UBOOT_MAKE_TARGET = "u-boot.imx" UBOOT_MACHINE ?= "colibri-imx6ull_defconfig" IMAGE_FSTYPES += "tar.xz" # wic support +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" WKS_FILE = "sdimage-bootpart.wks" MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-emmc.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-emmc.conf new file mode 100644 index 00000000..f67c41c3 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-emmc.conf @@ -0,0 +1,30 @@ +#@TYPE: Machine +#@NAME: Toradex Colibri iMX7 Dual 1GB (eMMC) +#@SOC: i.MX 7Dual +#@DESCRIPTION: Machine configuration for Toradex Colibri iMX7 SOM (eMMC) +#@MAINTAINER: Stefan Agner + +MACHINEOVERRIDES =. "mx7:mx7d:" + +include conf/machine/include/imx-base.inc +include conf/machine/include/tune-cortexa7.inc + +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ??= "linux-toradex" + +KERNEL_DEVICETREE = "imx7d-colibri-emmc-eval-v3.dtb" +KERNEL_DEVICETREE_append_use-nxp-bsp = " imx7d-colibri-emmc-aster.dtb" + +# The kernel lives in a seperate FAT partition, don't deploy it in /boot/ +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" + +PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" +PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" +UBOOT_MACHINE ?= "colibri_imx7_emmc_defconfig" + +IMAGE_FSTYPES += "tar.xz" +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" + +MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-nand.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-nand.conf new file mode 100644 index 00000000..4ab7a95d --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7-nand.conf @@ -0,0 +1,54 @@ +#@TYPE: Machine +#@NAME: Toradex Colibri iMX7D/S (NAND) +#@SOC: i.MX 7Dual / i.MX 7Solo +#@DESCRIPTION: Machine configuration for Toradex Colibri iMX7 SOM (NAND) +#@MAINTAINER: Max Krummenacher + +MACHINEOVERRIDES =. "mx7:mx7d:colibri-imx7:" + +include conf/machine/include/imx-base.inc +include conf/machine/include/tune-cortexa7.inc + +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ??= "linux-toradex" + +KERNEL_IMAGETYPE = "zImage" + +KERNEL_DEVICETREE = " \ + imx7d-colibri-eval-v3.dtb \ + imx7s-colibri-eval-v3.dtb \ +" + +KERNEL_DEVICETREE_append_use-nxp-bsp = " \ + imx7d-colibri-aster.dtb \ + imx7s-colibri-aster.dtb \ +" + +# U-Boot of our newer release read the Kernel and device tree from static UBI +# volumes, hence no need to deploy the kernel binary in the image itself +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" + +PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" +PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" + +# U-Boot NAND binary includes 0x400 padding required for NAND boot +UBOOT_BINARY = "u-boot-nand.imx" +UBOOT_MAKE_TARGET = "u-boot.imx" +UBOOT_MACHINE ?= "colibri_imx7_defconfig" + +IMAGE_FSTYPES += "tar.xz" +# wic support +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" +WKS_FILE = "sdimage-bootpart.wks" + +# Enable free --space-fixup (-F) by default, this allows DFU updates +MKUBIFS_ARGS = " -c 8112 -e 124KiB -m 2KiB -F" +UBINIZE_ARGS = " -p 128KiB -m 2048 -s 2048" +UBI_VOLNAME = "rootfs" + +SERIAL_CONSOLES = "115200;ttymxc0" + +MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7.conf deleted file mode 100644 index 2ad296b9..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/colibri-imx7.conf +++ /dev/null @@ -1,42 +0,0 @@ -#@TYPE: Machine -#@NAME: Toradex Colibri iMX7D/S -#@SOC: i.MX 7Dual / i.MX 7Solo -#@DESCRIPTION: Machine configuration for Toradex Colibri iMX7 SOM -#@MAINTAINER: Max Krummenacher - -MACHINEOVERRIDES =. "mx7:mx7d:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-cortexa7.inc - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-toradex" -KERNEL_IMAGETYPE = "zImage" -KERNEL_DEVICETREE += "imx7d-colibri-eval-v3.dtb imx7s-colibri-eval-v3.dtb \ - imx7d-colibri-aster.dtb imx7s-colibri-aster.dtb" - -# U-Boot of our newer release read the Kernel and device tree from static UBI -# volumes, hence no need to deploy the kernel binary in the image itself -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" - -PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" -PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" -PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" - -# U-Boot NAND binary includes 0x400 padding required for NAND boot -UBOOT_BINARY = "u-boot-nand.imx" -UBOOT_MAKE_TARGET = "u-boot-nand.imx" -UBOOT_MACHINE ?= "colibri_imx7_defconfig" - -IMAGE_FSTYPES += "tar.xz" -# wic support -WKS_FILE = "sdimage-bootpart.wks" - -# Enable free --space-fixup (-F) by default, this allows DFU updates -MKUBIFS_ARGS = " -c 8112 -e 124KiB -m 2KiB -F" -UBINIZE_ARGS = " -p 128KiB -m 2048 -s 2048" -UBI_VOLNAME = "rootfs" - -SERIAL_CONSOLE = "115200 ttymxc0" - -MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/colibri-vf.conf b/bsp/meta-freescale-3rdparty/conf/machine/colibri-vf.conf index a03853d9..8c66ceda 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/colibri-vf.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/colibri-vf.conf @@ -9,10 +9,19 @@ MACHINEOVERRIDES =. "vf:vf50:vf60:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa5.inc -PREFERRED_PROVIDER_virtual/kernel ?= "linux-toradex" +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp ??= "linux-toradex" + KERNEL_IMAGETYPE = "zImage" -KERNEL_DEVICETREE += "vf500-colibri-eval-v3.dtb vf610-colibri-eval-v3.dtb \ - vf500-colibri-aster.dtb vf610-colibri-aster.dtb" + +KERNEL_DEVICETREE = " \ + vf500-colibri-eval-v3.dtb \ + vf610-colibri-eval-v3.dtb \ +" + +KERNEL_DEVICETREE_append_use-nxp-bsp = " \ + vf500-colibri-aster.dtb \ + vf610-colibri-aster.dtb \ +" # U-Boot of our newer release read the Kernel and device tree from static UBI volumes, # hence no need to deploy the kernel binary in the image itself @@ -22,17 +31,21 @@ PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex" PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" +PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex" PREFERRED_PROVIDER_virtual/kernel-module-mcc ?= "kernel-module-mcc-toradex" PREFERRED_PROVIDER_virtual/kernel-module-mcc-dev ?= "kernel-module-mcc-toradex" PREFERRED_VERSION_mqxboot ?= "1.%" +PREFERRED_VERSION_weston_use-nxp-bsp = "" # U-Boot NAND binary includes 0x400 padding required for NAND boot -UBOOT_BINARY ?= "u-boot-nand.imx" -UBOOT_MAKE_TARGET = "u-boot-nand.imx" +UBOOT_BINARY = "u-boot-nand.imx" +UBOOT_MAKE_TARGET = "u-boot.imx" UBOOT_MACHINE ?= "colibri_vf_defconfig" IMAGE_FSTYPES += "tar.xz ubifs" # wic support +IMAGE_BOOT_FILES_append = " boot.scr-${MACHINE};boot.scr" +WKS_FILE_DEPENDS_append = " u-boot-default-script" WKS_FILE = "sdimage-bootpart.wks" # Enable free --space-fixup (-F) by default, this allows DFU updates @@ -40,6 +53,6 @@ MKUBIFS_ARGS = " -c 8112 -e 124KiB -m 2KiB -F" UBINIZE_ARGS = " -p 128KiB -m 2048 -s 2048" UBI_VOLNAME = "rootfs" -SERIAL_CONSOLE = "115200 ttyLP0" +SERIAL_CONSOLES = "115200;ttyLP0" MACHINE_FEATURES += "usbgadget usbhost vfat alsa touchscreen" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/cubox-i.conf b/bsp/meta-freescale-3rdparty/conf/machine/cubox-i.conf index 4c9ae2e0..b4248157 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/cubox-i.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/cubox-i.conf @@ -23,7 +23,7 @@ UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "mx6cuboxi_defconfig,sdcard" UENV_FILENAME = "uEnv-${MACHINE}.txt" SPL_BINARY = "SPL" -WKS_FILES = "imx-uboot-spl.wks" +WKS_FILES = "imx-uboot-spl.wks.in" UBOOT_EXTLINUX = "1" UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" @@ -34,7 +34,7 @@ KERNEL_DEVICETREE = "imx6dl-cubox-i.dtb imx6q-cubox-i.dtb imx6dl-hummingboard.dt MACHINE_FEATURES += "pci wifi bluetooth alsa irda serial usbhost" MACHINE_EXTRA_RRECOMMENDS += "bcm4330-nvram-config bcm4329-nvram-config" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ kernel-image \ diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6dl-riotboard.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6dl-riotboard.conf index 157e2c96..e3e2f055 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6dl-riotboard.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6dl-riotboard.conf @@ -14,7 +14,7 @@ UBOOT_MACHINE = "riotboard_defconfig" PREFERRED_PROVIDER_virtual/kernel ?= "linux-fslc" KERNEL_DEVICETREE = "imx6dl-riotboard.dtb" -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ kernel-image \ diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6q-dms-ba16.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6q-dms-ba16.conf index 2f837f6c..56065d9b 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6q-dms-ba16.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6q-dms-ba16.conf @@ -11,11 +11,11 @@ include conf/machine/include/tune-cortexa9.inc UBOOT_MACHINE = "dms-ba16_defconfig" -PREFERRED_PROVIDER_virtual/kernel = "linux-advantech" +PREFERRED_PROVIDER_virtual/kernel_use-nxp-bsp = "linux-advantech" PREFERRED_PROVIDER_kernel = "linux-advantech" KERNEL_DEVICETREE = "imx6q-dms-ba16.dtb" KERNEL_IMAGETYPE = "uImage" MACHINE_FEATURES += "pci" -SERIAL_CONSOLE = "115200 ttymxc3" +SERIAL_CONSOLES = "115200;ttymxc3" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-pico.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-pico.conf new file mode 100644 index 00000000..657299c0 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-pico.conf @@ -0,0 +1,50 @@ +#@TYPE: Machine +#@NAME: IMX6Q/DL-PICO +#@SOC: i.MX6QDL +#@DESCRIPTION: Machine configuration for IMX6QDL-PICO board. +#@MAINTAINER: Otavio Salvador otavio.salvador@ossystems.com.br + +MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:" + +require conf/machine/include/imx-base.inc +require conf/machine/include/tune-cortexa9.inc + +IMX_DEFAULT_BSP = "mainline" + +SERIAL_CONSOLES = "115200;ttymxc4" + +SPL_BINARY = "SPL" +UBOOT_SUFFIX = "img" +UBOOT_MAKE_TARGET = "" + +UBOOT_EXTLINUX = "1" +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" +UBOOT_EXTLINUX_CONSOLE = "console=${console},${baudrate}" + +UBOOT_CONFIG ??= "generic" +UBOOT_CONFIG[generic] = "pico-imx6_defconfig" + +KERNEL_DEVICETREE = " \ + imx6dl-pico-dwarf.dtb \ + imx6dl-pico-hobbit.dtb \ + imx6dl-pico-nymph.dtb \ + imx6dl-pico-pi.dtb \ + imx6q-pico-dwarf.dtb \ + imx6q-pico-hobbit.dtb \ + imx6q-pico-nymph.dtb \ + imx6q-pico-pi.dtb \ +" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ + kernel-image \ + kernel-devicetree \ + u-boot-fslc \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + bcm4339-nvram-config \ +" + +WKS_FILES ?= "imx-uboot-spl.wks.in" +WKS_FILE_DEPENDS ?= "" +IMAGE_FSTYPES = "wic.bmap wic.xz ext4.gz" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-variscite-som.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-variscite-som.conf index 6b6d7b5b..467dba8b 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-variscite-som.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6qdl-variscite-som.conf @@ -11,7 +11,7 @@ require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa9.inc PREFERRED_PROVIDER_virtual/kernel = "linux-variscite" -PREFERRED_PROVIDER_virtual/kernel_use-mainline-bsp ??= "linux-fslc" +PREFERRED_PROVIDER_virtual/kernel_use-mainline-bsp ??= "linux-fslc-lts-4.19" KERNEL_DEVICETREE = " \ imx6dl-var-som-cap.dtb \ @@ -34,7 +34,7 @@ KERNEL_IMAGETYPE = "uImage" UBOOT_SPL_BUILD = "yes" UBOOT_MAKE_TARGET = "all" UBOOT_SUFFIX = "img" -WKS_FILE = "imx-uboot-spl-bootpart.wks" +WKS_FILE = "imx-uboot-spl-bootpart.wks.in" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-variscite" PREFERRED_PROVIDER_u-boot = "u-boot-variscite" @@ -52,7 +52,7 @@ UBI_VOLNAME = "rootfs" MKUBIFS_ARGS = " -m 2048 -e 124KiB -c 3965 -F " UBINIZE_ARGS = " -m 2048 -p 128KiB -s 2048 -O 2048 " -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" USE_VT = "0" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6qsabrelite.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6qsabrelite.conf deleted file mode 100644 index d5703670..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6qsabrelite.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Boundary Devices i.MX6Q SABRE Lite -#@SOC: i.MX6Q -#@DESCRIPTION: Machine configuration for Boundary Devices i.MX6Q SABRE Lite -#@MAINTAINER: Ian Coolidge - -# WARNING: This board now use the *same* code as Nitrogen6X and it -# boots from internal SPI NOR memory. If you did change it to boot -# from the MMC (SD3 or SD4) please check the Boundary's blog post -# at: http://boundarydevices.com/u-boot-on-i-mx6/#unbricking - -MACHINEOVERRIDES = "nitrogen6x:${MACHINE}" -include conf/machine/nitrogen6x.conf diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6sl-warp.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6sl-warp.conf index 5e0d19f7..398220f2 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6sl-warp.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6sl-warp.conf @@ -27,6 +27,8 @@ MACHINEOVERRIDES =. "mx6:mx6sl:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc +IMX_DEFAULT_BSP = "mainline" + # WaRP uses eMMC boot partition by default and the u-boot inside .sdcard image # does not override it. However, build u-boot binary anyway in order to provide # a binary to be used if an update is needed @@ -37,10 +39,9 @@ EXTRA_IMAGEDEPENDS += "u-boot" UBOOT_MACHINE ?= "warp_defconfig" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-fslc-imx" KERNEL_DEVICETREE = "imx6sl-warp.dtb" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FEATURES += "wifi bluetooth serial" MACHINE_EXTRA_RRECOMMENDS += "bcm4330-nvram-config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-kontron.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-kontron.conf new file mode 100644 index 00000000..1a779a87 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-kontron.conf @@ -0,0 +1,62 @@ +#@TYPE: Machine +#@NAME: Kontron N63XX/N64XX SoM based boards +#@SOC: i.MX6UL/i.MX6ULL +#@DESCRIPTION: Machine configuration for Kontron N63XX/N64XX SoM based boards +#@MAINTAINER: Frieder Schrempf + +MACHINEOVERRIDES =. "mx6:mx6ul:" + +include conf/machine/include/imx-base.inc +include conf/machine/include/tune-cortexa7.inc + +IMX_DEFAULT_BSP = "mainline" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-kontron" +PREFERRED_PROVIDER_u-boot ?= "u-boot-kontron" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-kontron" + +KERNEL_CLASSES ?= " kernel-fitimage " +KERNEL_IMAGETYPES ?= "fitImage" +KERNEL_DEVICETREE = " \ + imx6ul-kontron-n6310-s.dtb \ + imx6ul-kontron-n6310-s-43.dtb \ + imx6ul-kontron-n6311-s.dtb \ + imx6ull-kontron-n6411-s.dtb \ +" + + +SERIAL_CONSOLES = "115200;ttymxc3" + +UBOOT_CONFIG = "kontron-mx6ul" +UBOOT_CONFIG[kontron-mx6ul] = "kontron_mx6ul_defconfig" + +SPL_BINARY = "SPL" +UBOOT_ENTRYPOINT = "0x81000000" +UBOOT_MAKE_TARGET = "u-boot.img SPL" +UBOOT_SUFFIX = "img" + +UBOOT_EXTLINUX ?= "1" +UBOOT_EXTLINUX_LABELS ?= "default" +UBOOT_EXTLINUX_KERNEL_IMAGE ?= "../fitImage" +UBOOT_EXTLINUX_FDTDIR ?= "" +UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait" +UBOOT_EXTLINUX_TIMEOUT = "8" +UBOOT_EXTLINUX_LABELS = "kontron-n6310-s kontron-n6311-s kontron-n6310-s-43 kontron-n6411-s" +UBOOT_EXTLINUX_KERNEL_IMAGE_kontron-n6310-s = "../fitImage#conf@imx6ul-kontron-n6310-s.dtb" +UBOOT_EXTLINUX_KERNEL_IMAGE_kontron-n6311-s = "../fitImage#conf@imx6ul-kontron-n6311-s.dtb" +UBOOT_EXTLINUX_KERNEL_IMAGE_kontron-n6310-s-43 = "../fitImage#conf@imx6ul-kontron-n6310-s-43.dtb" +UBOOT_EXTLINUX_KERNEL_IMAGE_kontron-n6411-s = "../fitImage#conf@imx6ull-kontron-n6411-s.dtb" +UBOOT_EXTLINUX_MENU_DESCRIPTION_kontron-n6310-s = "Kontron N6310 S" +UBOOT_EXTLINUX_MENU_DESCRIPTION_kontron-n6311-s = "Kontron N6311 S" +UBOOT_EXTLINUX_MENU_DESCRIPTION_kontron-n6310-s-43 = "Kontron N6310 S 43" +UBOOT_EXTLINUX_MENU_DESCRIPTION_kontron-n6411-s = "Kontron N6411 S" +UBOOT_EXTLINUX_CONSOLE = "console=ttymxc3,115200" +UBOOT_EXTLINUX_ROOT = "root=/dev/mmcblk0p2" + +MACHINE_FEATURES = "usbhost vfat serial ext2 rtc usbgadget" +IMAGE_BOOT_FILES = " \ + extlinux.conf;extlinux/extlinux.conf \ + fitImage \ +" + +WKS_FILES ?= "imx-uboot-spl-bootpart.wks.in" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-pico.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-pico.conf index 3448318a..11ea23bd 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-pico.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx6ul-pico.conf @@ -4,14 +4,17 @@ #@DESCRIPTION: Machine configuration for IMX6UL-PICO board. #@MAINTAINER: Daiane Angolini -MACHINEOVERRIDES =. "use-mainline-bsp:mx6:mx6ul:" +MACHINEOVERRIDES =. "mx6:mx6ul:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa7.inc -SERIAL_CONSOLE = "115200 ttymxc5" +IMX_DEFAULT_BSP = "mainline" + +SERIAL_CONSOLES = "115200;ttymxc5" KERNEL_DEVICETREE = " \ + imx6ul-pico-dwarf.dtb \ imx6ul-pico-hobbit.dtb \ imx6ul-pico-pi.dtb \ " @@ -20,7 +23,8 @@ SPL_BINARY = "SPL" UBOOT_SUFFIX = "img" UBOOT_MAKE_TARGET = "" -UBOOT_CONFIG ??= "hobbit pi generic" +UBOOT_CONFIG ??= "dwarf hobbit pi generic" +UBOOT_CONFIG[dwarf] = "pico-dwarf-imx6ul_defconfig" UBOOT_CONFIG[generic] = "pico-imx6ul_defconfig" UBOOT_CONFIG[hobbit] = "pico-hobbit-imx6ul_defconfig" UBOOT_CONFIG[pi] = "pico-pi-imx6ul_defconfig" @@ -37,6 +41,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ MACHINE_FEATURES += "wifi bluetooth" -WKS_FILES ?= "imx-uboot-spl.wks" +WKS_FILES ?= "imx-uboot-spl.wks.in" WKS_FILE_DEPENDS ?= "" -IMAGE_FSTYPES = "wic.xz ext4.gz" +IMAGE_FSTYPES = "wic.bmap wic.xz ext4.gz" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx7d-pico.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx7d-pico.conf index 625b6002..701cd6b0 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx7d-pico.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx7d-pico.conf @@ -4,25 +4,30 @@ #@DESCRIPTION: Machine configuration for IMX7D-PICO board. #@MAINTAINER: Vanessa Maegima -MACHINEOVERRIDES =. "use-mainline-bsp:mx7:mx7d:" +MACHINEOVERRIDES =. "mx7:mx7d:" require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa7.inc -SERIAL_CONSOLE = "115200 ttymxc4" +IMX_DEFAULT_BSP = "mainline" + +SERIAL_CONSOLES = "115200;ttymxc4" KERNEL_DEVICETREE = " \ + imx7d-pico-dwarf.dtb \ imx7d-pico-hobbit.dtb \ imx7d-pico-pi.dtb \ " SPL_BINARY = "SPL" -UBOOT_SUFFIX = "img" +UBOOT_BINARY = "u-boot-dtb.img" UBOOT_MAKE_TARGET = "" -UBOOT_CONFIG ??= "hobbit pi generic" +UBOOT_CONFIG ??= "dwarf hobbit nymph pi generic" +UBOOT_CONFIG[dwarf] = "pico-dwarf-imx7d_defconfig" UBOOT_CONFIG[generic] = "pico-imx7d_defconfig" UBOOT_CONFIG[hobbit] = "pico-hobbit-imx7d_defconfig" +UBOOT_CONFIG[nymph] = "pico-nymph-imx7d_defconfig" UBOOT_CONFIG[pi] = "pico-pi-imx7d_defconfig" UBOOT_EXTLINUX = "1" @@ -37,8 +42,9 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ MACHINE_EXTRA_RRECOMMENDS += " \ bcm4339-nvram-config \ + linux-firmware-ath10k \ " -WKS_FILES ?= "imx-uboot-spl.wks" +WKS_FILES ?= "imx-uboot-spl.wks.in" WKS_FILE_DEPENDS ?= "" -IMAGE_FSTYPES = "wic.xz ext4.gz" +IMAGE_FSTYPES = "wic.bmap wic.xz ext4.gz" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/imx7s-warp.conf b/bsp/meta-freescale-3rdparty/conf/machine/imx7s-warp.conf index 7760c109..f76386be 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/imx7s-warp.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/imx7s-warp.conf @@ -4,15 +4,20 @@ #@DESCRIPTION: Machine configuration for i.MX7S WaRP board. #@MAINTAINER: Pierre-Jean Texier -MACHINEOVERRIDES =. "mx7:mx7d:use-mainline-bsp:" +MACHINEOVERRIDES =. "mx7:mx7d:" require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa7.inc +IMX_DEFAULT_BSP = "mainline" + MACHINE_FEATURES += " wifi bluetooth" KERNEL_DEVICETREE = "imx7s-warp.dtb" +UBOOT_BINARY = "u-boot-dtb.imx" +UBOOT_MAKE_TARGET = "" + UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "warp7_defconfig,sdcard" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/include/ccimx6ulsom.inc b/bsp/meta-freescale-3rdparty/conf/machine/include/ccimx6ulsom.inc new file mode 100644 index 00000000..18ba7545 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/include/ccimx6ulsom.inc @@ -0,0 +1,42 @@ +#@TYPE: Machine +#@NAME: ConnecCore 6UL SOM +#@SOC: i.MX6UL +#@DESCRIPTION: Machine configuration for ConnectCore 6UL System-On-Module. +#@MAINTAINER: Alex Gonzalez + +MACHINEOVERRIDES =. "mx6:mx6ul:ccimx6ul:use-mainline-bsp:" + +include conf/machine/include/imx-base.inc +include conf/machine/include/tune-cortexa7.inc + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-digi" +PREFERRED_PROVIDER_u-boot = "u-boot-digi" + +UBOOT_BOOTSCRIPT = "boot.scr" + +UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter" +UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig" +UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig" + +MACHINE_EXTRA_RDEPENDS += " \ + mtd-utils-ubifs \ +" + +MACHINE_FEATURES += " wifi bluetooth" + +MACHINE_EXTRA_RRECOMMENDS += " \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'kernel-module-qca6564 linux-firmware-qca6564-wifi', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', 'linux-firmware-qca6564-bt', '', d)} \ +" + +# mkfs.ubifs parameters for boot partition (the one holding kernel and device tree files) +# Max LEB count (-c 255) calculated for a partition of up to 32 MiB considering 128 KiB erase-block size. +MKUBIFS_BOOT_ARGS ?= "-m 2048 -e 126976 -c 255" + +# mkfs.ubifs parameters for rootfs partition +# Max LEB count (-c 8191) calculated for a partition of up to 1 GiB considering 128 KiB erase-block size. +MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191" + +IMAGE_CLASSES += "image_types_digi" +# Overwrite the defaults in imx-base not to include wic images +IMAGE_FSTYPES = "tar.bz2 ubifs boot.ubifs" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/include/tx6-karo-common.inc b/bsp/meta-freescale-3rdparty/conf/machine/include/tx6-karo-common.inc deleted file mode 100644 index 83a7de6f..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/include/tx6-karo-common.inc +++ /dev/null @@ -1,18 +0,0 @@ -# Provides the Ka-Ro TX6 common settings - -require conf/machine/include/imx-base.inc -require conf/machine/include/tune-cortexa9.inc - -SERIAL_CONSOLE = "115200 ttymxc0" - -UBOOT_SUFFIX = "bin" -UBOOT_MAKE_TARGET = "u-boot.bin" -UBOOT_BINARY="u-boot.bin" - -PREFERRED_PROVIDER_u-boot = "u-boot-karo" -PREFERRED_PROVIDER_virtual/kernel = "linux-karo" -PREFERRED_VERSION_linux-karo ?= "3.16%" - -MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k" -MACHINE_FEATURES += " pci wifi bluetooth" -IMAGE_FSTYPES_remove = "sdcard" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/lx2160acex7.conf b/bsp/meta-freescale-3rdparty/conf/machine/lx2160acex7.conf new file mode 100644 index 00000000..4812f8ec --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/lx2160acex7.conf @@ -0,0 +1,49 @@ +#@TYPE: Machine +#@NAME: Solid-Run LX2160A-CEx7 +#@SOC: LSCH3 +#@DESCRIPTION: Machine configuration for running LX2160A-CEx7 in 64-bit mode + +require conf/machine/include/qoriq-arm64.inc +require conf/machine/include/arm/arch-arm64.inc + +MACHINEOVERRIDES =. "fsl-lsch3:lx2160a:" + +MACHINE_FEATURES += "optee" + +KERNEL_CLASSES = " kernel-fitimage " +KERNEL_IMAGETYPES = "fitImage" + +DTB_LOAD = "0x90000000" +UBOOT_ENTRYPOINT = "0x80080000" + +UBOOT_CONFIG ??= "tfa" +UBOOT_CONFIG[tfa] = "lx2160acex7_tfa_defconfig,,u-boot-dtb.bin" + +KERNEL_DEVICETREE_BASENAME ?= "fsl-lx2160a-cex7.dtb" +KERNEL_DEVICETREE ?= "freescale/${KERNEL_DEVICETREE_BASENAME}" +KERNEL_DEFCONFIG ?= "defconfig" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" + +#SERDES=8_5_2 # 8x10g +#SERDES=13_5_2 # dual 100g +#SERDES=20_5_2 # dual 40g +SERDES ?= "8_5_2" +SPEED ?= "2000_700_3200" + +RCWAUTO ?= "${SERDES}/${SPEED}" +BOOTTYPE="auto" + +EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy atf inphi" +USE_VT = "0" + +PREFERRED_PROVIDER_u-boot-default-script = "u-boot-script-qoriq" +PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-qoriq" + +IMAGE_FSTYPES += "wic" +WKS_FILE = "lx2160acex7.wks.in" +WKS_FILE_DEPENDS_append = "\ + ${PREFERRED_PROVIDER_u-boot-default-script} \ +" +IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE_BASENAME} boot.scr-${MACHINE};boot.scr" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/m28evk.conf b/bsp/meta-freescale-3rdparty/conf/machine/m28evk.conf deleted file mode 100644 index d5d89862..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/m28evk.conf +++ /dev/null @@ -1,26 +0,0 @@ -#@TYPE: Machine -#@NAME: DENX M28 SoM Evaluation Kit -#@SOC: i.MX28 -#@DESCRIPTION: Machine configuration for DENX M28 SoM Evaluation Kit - -MACHINEOVERRIDES =. "mxs:mx28:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-arm926ejs.inc - -UBOOT_MACHINE = "m28evk_config" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-fslc" -KERNEL_IMAGETYPE = "uImage" -KERNEL_DEVICETREE = "imx28-m28evk.dtb" - -SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3" -IMAGE_FSTYPES ?= "tar.bz2 ext3 uboot.mxsboot-sdcard sdcard" - -SERIAL_CONSOLE = "115200 ttyAMA0" - -MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" - -# Overrides due use of non-FSL kernel -PREFERRED_VERSION_imx-test = "00.00.00" -MACHINE_GSTREAMER_PLUGIN_m28evk = "" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/m53evk.conf b/bsp/meta-freescale-3rdparty/conf/machine/m53evk.conf deleted file mode 100644 index 4356d18d..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/m53evk.conf +++ /dev/null @@ -1,28 +0,0 @@ -#@TYPE: Machine -#@NAME: DENX M53 SoM Evaluation Kit -#@SOC: i.MX53 -#@DESCRIPTION: Machine configuration for DENX M53 SoM Evaluation Kit - -MACHINEOVERRIDES =. "mx5:mx53:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-cortexa8.inc - -UBOOT_MACHINE = "m53evk_config" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-denx" - -KERNEL_IMAGETYPE = "uImage" -KERNEL_DEVICETREE = "imx53-m53evk.dtb" - -SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3" -IMAGE_FSTYPES ?= "tar.bz2 ext3 sdcard" - -SERIAL_CONSOLE = "115200 ttymxc1" - -MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" - -# Overrides due use of non-FSL kernel -PREFERRED_VERSION_imx-test = "00.00.00" -MACHINE_GSTREAMER_PLUGIN_m53evk = "" -XSERVER_DRIVER_m53evk = "xf86-video-fbdev" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6sx.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6sx.conf index 9aa43d46..3b629603 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6sx.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6sx.conf @@ -2,13 +2,15 @@ #@NAME: Boundary Devices Nitrogen6SX #@SOC: i.MX6SX #@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen6SX -#@MAINTAINER: Ian Coolidge +#@MAINTAINER: Chris Dimich MACHINEOVERRIDES =. "mx6:mx6sx:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc +IMX_DEFAULT_BSP = "nxp" + KERNEL_DEVICETREE = "imx6sx-nitrogen6sx.dtb" KERNEL_IMAGETYPE = "zImage" @@ -31,7 +33,7 @@ WKS_FILE_DEPENDS = " \ UBOOT_MACHINE ?= "nitrogen6sx_defconfig" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x-lite.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x-lite.conf index 44cf5c26..406305bf 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x-lite.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x-lite.conf @@ -2,13 +2,15 @@ #@NAME: Boundary Devices Nitrogen6X Lite #@SOC: i.MX6S #@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen6X Lite -#@MAINTAINER: Ian Coolidge +#@MAINTAINER: Chris Dimich MACHINEOVERRIDES =. "mx6:mx6dl:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc +IMX_DEFAULT_BSP = "nxp" + KERNEL_DEVICETREE = "imx6dl-nit6xlite.dtb" KERNEL_IMAGETYPE = "zImage" @@ -31,7 +33,7 @@ WKS_FILE_DEPENDS = " \ UBOOT_MACHINE ?= "nit6xlite_defconfig" -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" MACHINE_EXTRA_RRECOMMENDS += " bcm4330-nvram-config" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x.conf index e777a14c..d3aa3514 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen6x.conf @@ -2,7 +2,7 @@ #@NAME: Boundary Devices Nitrogen6X #@SOC: i.MX6 Q/DL #@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen6X -#@MAINTAINER: Ian Coolidge +#@MAINTAINER: Chris Dimich # # Note that this machine configuration also supports the SABRE Lite # reference design and the Nitrogen6X-SOM. @@ -34,6 +34,8 @@ MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc +IMX_DEFAULT_BSP = "nxp" + KERNEL_DEVICETREE = "imx6q-sabrelite.dtb \ imx6q-nitrogen6_max.dtb imx6qp-nitrogen6_max.dtb \ imx6q-nitrogen6x.dtb imx6dl-nitrogen6x.dtb \ @@ -65,7 +67,7 @@ WKS_FILE_DEPENDS = " \ UBOOT_MACHINE ?= "nitrogen6q_defconfig" -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen7.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen7.conf index 57160e08..b413212f 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen7.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen7.conf @@ -2,13 +2,15 @@ #@NAME: Boundary Devices Nitrogen7 #@SOC: i.MX7D #@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen7 -#@MAINTAINER: Ian Coolidge +#@MAINTAINER: Chris Dimich MACHINEOVERRIDES =. "mx7:mx7d:" require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa7.inc +IMX_DEFAULT_BSP = "nxp" + KERNEL_DEVICETREE = "imx7d-nitrogen7.dtb" KERNEL_IMAGETYPE = "zImage" @@ -31,7 +33,7 @@ WKS_FILE_DEPENDS = " \ UBOOT_MACHINE ?= "nitrogen7_defconfig" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8m.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8m.conf index 9565209b..73507f23 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8m.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8m.conf @@ -2,17 +2,23 @@ #@NAME: Boundary Devices Nitrogen8M #@SOC: i.MX8 MQ #@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen8M -#@MAINTAINER: Ian Coolidge +#@MAINTAINER: Chris Dimich MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc +require conf/machine/include/tune-cortexa53.inc + +IMX_DEFAULT_BSP = "nxp" # Kernel configuration PREFERRED_PROVIDER_virtual/kernel ??= "linux-boundary" KERNEL_DEVICETREE = "freescale/imx8mq-nitrogen8m.dtb \ freescale/imx8mq-nitrogen8m-m4.dtb \ + freescale/imx8mq-nitrogen8m_som.dtb \ + freescale/imx8mq-nitrogen8m_som-m4.dtb \ + freescale/imx8mq-nitrogen8m-tc358743.dtb \ + freescale/imx8mq-nitrogen8m-edp.dtb \ " KERNEL_IMAGETYPE = "Image" RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" @@ -20,11 +26,24 @@ RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" # U-Boot configuration PREFERRED_PROVIDER_u-boot ??= "u-boot-boundary" PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-boundary" +PREFERRED_PROVIDER_imx-atf ??= "imx-atf-boundary" SPL_BINARY = "spl/u-boot-spl.bin" UBOOT_DTB_NAME ?= "imx8mq-nitrogen8m.dtb" -UBOOT_MACHINE ?= "nitrogen8m_defconfig" UBOOT_MAKE_TARGET = "" UBOOT_SUFFIX = "bin" +UBOOT_CONFIG ??= "sd" +UBOOT_CONFIG[sd] = "nitrogen8m_defconfig,sdcard" + +IMAGE_BOOTLOADER = "imx-boot" + +IMXBOOT_TARGETS = "flash_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 \ +" # wic support WKS_FILE = "sdimage-bootpart.wks" @@ -37,6 +56,6 @@ WKS_FILE_DEPENDS_mx8 += " \ bmap-tools-native \ " -SERIAL_CONSOLE ?= "115200 ttymxc0" +SERIAL_CONSOLES ?= "115200;ttymxc0" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mm.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mm.conf new file mode 100644 index 00000000..cf18e0a8 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mm.conf @@ -0,0 +1,65 @@ +#@TYPE: Machine +#@NAME: Boundary Devices Nitrogen8MM +#@SOC: i.MX8MM +#@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen8MM +#@MAINTAINER: Chris Dimich + +MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" + +require conf/machine/include/imx-base.inc +require conf/machine/include/tune-cortexa53.inc + +IMX_DEFAULT_BSP = "nxp" + +# Kernel configuration +PREFERRED_PROVIDER_virtual/kernel ??= "linux-boundary" +KERNEL_DEVICETREE = "freescale/imx8mq-nitrogen8m.dtb \ + freescale/imx8mq-nitrogen8m-m4.dtb \ + freescale/imx8mm-nitrogen8mm.dtb \ + freescale/imx8mm-nitrogen8mm_som.dtb \ + freescale/imx8mm-nitrogen8mm_rev2.dtb \ + freescale/imx8mm-nitrogen8mm_rev2-m4.dtb \ + freescale/imx8mm-nitrogen8mm_som-m4.dtb \ + freescale/imx8mm-nitrogen8mm-m4.dtb \ + freescale/imx8mm-nitrogen8mm-tc358743.dtb \ +" +KERNEL_IMAGETYPE = "Image" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" + +# U-Boot configuration +PREFERRED_PROVIDER_u-boot ??= "u-boot-boundary" +PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-boundary" +PREFERRED_PROVIDER_imx-atf ??= "imx-atf-boundary" +SPL_BINARY = "spl/u-boot-spl.bin" +UBOOT_DTB_NAME ?= "imx8mm-nitrogen8mm.dtb" +UBOOT_MAKE_TARGET = "" +UBOOT_SUFFIX = "bin" +UBOOT_CONFIG ??= "sd" +UBOOT_CONFIG[sd] = "nitrogen8mm_2g_defconfig,sdcard" + +IMAGE_BOOTLOADER = "imx-boot" + +IMXBOOT_TARGETS = "flash_evk" + +# 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 \ +" + +# wic support +WKS_FILE = "sdimage-bootpart.wks" +IMAGE_BOOT_FILES_append = " \ + boot.scr-${MACHINE};boot.scr \ +" +WKS_FILE_DEPENDS_mx8 += " \ + u-boot-script-boundary \ + e2fsprogs-native \ + bmap-tools-native \ +" + +SERIAL_CONSOLES = "115200;ttymxc1" + +MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mn.conf b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mn.conf new file mode 100644 index 00000000..f3a595d7 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/conf/machine/nitrogen8mn.conf @@ -0,0 +1,60 @@ +#@TYPE: Machine +#@NAME: Boundary Devices Nitrogen8M Nano +#@SOC: i.MX8 Nano +#@DESCRIPTION: Machine configuration for Boundary Devices Nitrogen8M Nano +#@MAINTAINER: Chris Dimich + +MACHINEOVERRIDES =. "mx8:mx8m:mx8mn:" + +require conf/machine/include/imx-base.inc +require conf/machine/include/tune-cortexa53.inc + +IMX_DEFAULT_BSP = "nxp" + +# Kernel configuration +PREFERRED_PROVIDER_virtual/kernel ??= "linux-boundary" +KERNEL_DEVICETREE = "freescale/imx8mn-nitrogen8mn.dtb \ + freescale/imx8mn-nitrogen8mn_som.dtb \ + freescale/imx8mn-nitrogen8_nano.dtb \ +" + +KERNEL_IMAGETYPE = "Image" +KERNEL_DEFCONFIG = "boundary_defconfig" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" + +# U-Boot configuration +PREFERRED_PROVIDER_u-boot ??= "u-boot-boundary" +PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-boundary" +PREFERRED_PROVIDER_imx-atf ??= "imx-atf-boundary" +SPL_BINARY = "spl/u-boot-spl.bin" +UBOOT_DTB_NAME ?= "imx8mn-nitrogen8_nano.dtb" +UBOOT_MAKE_TARGET = "" +UBOOT_SUFFIX = "bin" +UBOOT_CONFIG ??= "sd" +UBOOT_CONFIG[sd] = "nitrogen8_nano_8mn1gr0_defconfig,sdcard" + +IMAGE_BOOTLOADER = "imx-boot" + +IMXBOOT_TARGETS = "flash_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 \ +" + +# wic support +WKS_FILE = "sdimage-bootpart.wks" +IMAGE_BOOT_FILES_append = " \ + boot.scr-${MACHINE};boot.scr \ +" +WKS_FILE_DEPENDS_mx8 += " \ + u-boot-script-boundary \ + e2fsprogs-native \ + bmap-tools-native \ +" + +SERIAL_CONSOLES = "115200;ttymxc1" + +MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/pcm052.conf b/bsp/meta-freescale-3rdparty/conf/machine/pcm052.conf deleted file mode 100644 index c1d017ad..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/pcm052.conf +++ /dev/null @@ -1,25 +0,0 @@ -#@TYPE: Machine -#@NAME: Phytec phyCORE Vybrid Development Kit -#@SOC: vf60 -#@DESCRIPTION: Machine configuration for Phytec phyCORE Vybrid Development Kit -#@MAINTAINER: Anthony Felice - -MACHINEOVERRIDES =. "vf:vf60:" - -include conf/machine/include/imx-base.inc -include conf/machine/include/tune-cortexa5.inc - -PREFERRED_PROVIDER_virtual/kernel = "linux-timesys" -PREFERRED_PROVIDER_virtual/kernel-module-mcc ?= "kernel-module-mcc" -PREFERRED_PROVIDER_virtual/kernel-module-mcc-dev ?= "kernel-module-mcc" - -UBOOT_MACHINE = "pcm052_config" - -KERNEL_DEVICETREE = "vf610-pcm052.dtb" - -SDCARD_ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3" -IMAGE_FSTYPES ?= "tar.bz2 ext3 sdcard" - -SERIAL_CONSOLE = "115200 ttyLP1" - -MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6q-10x0.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6q-10x0.conf deleted file mode 100644 index d2c65447..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6q-10x0.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6Q TX6Q Computer-On-Module -#@SOC: i.MX6Q -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6Q Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6q:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6q-tx6q-10x0.dtb" - -UBOOT_MACHINE = "tx6q-10x0_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6q-11x0.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6q-11x0.conf deleted file mode 100644 index 22cb6434..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6q-11x0.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6Q TX6Q Computer-On-Module -#@SOC: i.MX6Q -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6Q Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6q:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6q-tx6q-11x0.dtb" - -UBOOT_MACHINE = "tx6q-11x0_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8034.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8034.conf deleted file mode 100644 index c1d014c6..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8034.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6S TX6S Computer-On-Module -#@SOC: i.MX6S -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6S Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6dl:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6dl-tx6s-8034.dtb" - -UBOOT_MACHINE = "tx6s-8034_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8035.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8035.conf deleted file mode 100644 index 41465f25..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6s-8035.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6S TX6S Computer-On-Module -#@SOC: i.MX6S -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6S Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6dl:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6dl-tx6s-8035.dtb" - -UBOOT_MACHINE = "tx6s-80x0_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-8033.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6u-8033.conf deleted file mode 100644 index b3fcca2a..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-8033.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6DL TX6DL Computer-On-Module -#@SOC: i.MX6DL -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6DL Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6dl:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6dl-tx6u-8033.dtb" - -UBOOT_MACHINE = "tx6u-8033_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-80x0.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6u-80x0.conf deleted file mode 100644 index c9450635..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-80x0.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6DL TX6DL Computer-On-Module -#@SOC: i.MX6DL -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6DL Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6dl:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6dl-tx6u-80xx.dtb" - -UBOOT_MACHINE = "tx6u-80x0_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-81x0.conf b/bsp/meta-freescale-3rdparty/conf/machine/tx6u-81x0.conf deleted file mode 100644 index 6951abe5..00000000 --- a/bsp/meta-freescale-3rdparty/conf/machine/tx6u-81x0.conf +++ /dev/null @@ -1,13 +0,0 @@ -#@TYPE: Machine -#@NAME: Ka-Ro electronics i.MX6DL TX6DL Computer-On-Module -#@SOC: i.MX6DL -#@DESCRIPTION: Machine configuration for Ka-Ro electronics TX6DL Computer-On-Module -#@MAINTAINER: Oliver Wendt - -MACHINEOVERRIDES =. "mx6:mx6dl:" - -require include/tx6-karo-common.inc - -KERNEL_DEVICETREE = "imx6dl-tx6u-81xx.dtb" - -UBOOT_MACHINE = "tx6u-81x0_config" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/ventana.conf b/bsp/meta-freescale-3rdparty/conf/machine/ventana.conf index f3e111db..7794c779 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/ventana.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/ventana.conf @@ -61,7 +61,7 @@ UBOOT_CONFIG ??= "std" UBOOT_CONFIG[std] = "gwventana_config" UBOOT_ENTRYPOINT_use-mainline-bsp = "0x10008000" -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" # Override FS Type Creation IMAGE_FSTYPES = "tar.bz2 multiubi" diff --git a/bsp/meta-freescale-3rdparty/conf/machine/wandboard.conf b/bsp/meta-freescale-3rdparty/conf/machine/wandboard.conf index 50c19c8b..a32cb0b0 100644 --- a/bsp/meta-freescale-3rdparty/conf/machine/wandboard.conf +++ b/bsp/meta-freescale-3rdparty/conf/machine/wandboard.conf @@ -4,11 +4,13 @@ #@DESCRIPTION: Machine configuration for i.MX6 Wandboard QuadPlus/Quad/Dual/Solo #@MAINTAINER: Alfonso Tames -MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:use-mainline-bsp:" +MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc +IMX_DEFAULT_BSP = "mainline" + UBOOT_MAKE_TARGET = "" UBOOT_SUFFIX = "img" SPL_BINARY = "SPL" @@ -40,7 +42,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \ bcm4330-nvram-config \ " -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ kernel-image \ @@ -48,4 +50,4 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ u-boot-fslc \ " -WKS_FILES = "imx-uboot-spl.wks" +WKS_FILES = "imx-uboot-spl.wks.in" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0001-plat-nxp-Add-lx2160acex7-module-support.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0001-plat-nxp-Add-lx2160acex7-module-support.patch new file mode 100644 index 00000000..429a679e --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0001-plat-nxp-Add-lx2160acex7-module-support.patch @@ -0,0 +1,370 @@ +From 64bd53306e0301e707a52be9f4f7121c87cd6f7d Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:17:54 +0300 +Subject: [PATCH] plat/nxp: Add lx2160acex7 module support + +Adds SolidRun's LX2160A based SoC COM express type 7 module support. +The patch is based on LX2160ARDB board and modifies the support to two +SO-DIMMs DDR4 support on I2C address 0x50 and 0x52. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + plat/nxp/soc-lx2160/lx2160acex7/ddr_init.c | 77 ++++++++ + plat/nxp/soc-lx2160/lx2160acex7/platform.mk | 16 ++ + .../nxp/soc-lx2160/lx2160acex7/platform_def.h | 187 ++++++++++++++++++ + plat/nxp/soc-lx2160/lx2160acex7/policy.h | 40 ++++ + 4 files changed, 320 insertions(+) + create mode 100644 plat/nxp/soc-lx2160/lx2160acex7/ddr_init.c + create mode 100644 plat/nxp/soc-lx2160/lx2160acex7/platform.mk + create mode 100644 plat/nxp/soc-lx2160/lx2160acex7/platform_def.h + create mode 100644 plat/nxp/soc-lx2160/lx2160acex7/policy.h + +diff --git a/plat/nxp/soc-lx2160/lx2160acex7/ddr_init.c b/plat/nxp/soc-lx2160/lx2160acex7/ddr_init.c +new file mode 100644 +index 00000000..d0bcdf46 +--- /dev/null ++++ b/plat/nxp/soc-lx2160/lx2160acex7/ddr_init.c +@@ -0,0 +1,77 @@ ++/* ++ * Copyright 2019 SolidRun ltd. ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ * Author Rabeeh Khoury ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++int ddr_board_options(struct ddr_info *priv) ++{ ++ struct memctl_opt *popts = &priv->opt; ++ ++ popts->vref_dimm = 0x24; /* range 1, 83.4% */ ++ popts->rtt_override = 0; ++ popts->rtt_park = 240; ++ popts->otf_burst_chop_en = 0; ++ popts->burst_length = DDR_BL8; ++ popts->trwt_override = 1; ++ popts->bstopre = 0; /* auto precharge */ ++ popts->addr_hash = 1; ++ popts->trwt = 0x3; ++ popts->twrt = 0x3; ++ popts->trrt = 0x3; ++ popts->twwt = 0x3; ++ popts->vref_phy = 0x60; /* 75% */ ++ popts->odt = 48; ++ popts->phy_tx_impedance = 48; ++ ++ return 0; ++} ++ ++long long _init_ddr(void) ++{ ++ int spd_addr[] = { 0x51, 0x53 }; ++ struct ddr_info info; ++ struct sysinfo sys; ++ long long dram_size; ++ ++ zeromem(&sys, sizeof(sys)); ++ get_clocks(&sys); ++ debug("platform clock %lu\n", sys.freq_platform); ++ debug("DDR PLL1 %lu\n", sys.freq_ddr_pll0); ++ debug("DDR PLL2 %lu\n", sys.freq_ddr_pll1); ++ ++ zeromem(&info, sizeof(info)); ++ ++ /* Set two DDRC. Unused DDRC will be removed automatically. */ ++ info.num_ctlrs = 2; ++ info.spd_addr = spd_addr; ++ info.ddr[0] = (void *)NXP_DDR_ADDR; ++ info.ddr[1] = (void *)NXP_DDR2_ADDR; ++ info.phy[0] = (void *)NXP_DDR_PHY1_ADDR; ++ info.phy[1] = (void *)NXP_DDR_PHY2_ADDR; ++ info.clk = get_ddr_freq(&sys, 0); ++ if (!info.clk) ++ info.clk = get_ddr_freq(&sys, 1); ++ info.dimm_on_ctlr = 1; ++ ++ dram_size = dram_init(&info); ++ ++ if (dram_size < 0) ++ ERROR("DDR init failed.\n"); ++ ++ return dram_size; ++} +diff --git a/plat/nxp/soc-lx2160/lx2160acex7/platform.mk b/plat/nxp/soc-lx2160/lx2160acex7/platform.mk +new file mode 100644 +index 00000000..490f82f8 +--- /dev/null ++++ b/plat/nxp/soc-lx2160/lx2160acex7/platform.mk +@@ -0,0 +1,16 @@ ++# ++# Copyright 2019 SolidRun ltd. ++# ++# SPDX-License-Identifier: BSD-3-Clause ++# ++# Author Rabeeh Khoury ++ ++# board-specific build parameters ++BOOT_MODE := flexspi_nor ++BOARD := acex7 ++ ++ # get SoC common build parameters ++include plat/nxp/soc-lx2160/soc.mk ++ ++BL2_SOURCES += ${BOARD_PATH}/ddr_init.c ++ +diff --git a/plat/nxp/soc-lx2160/lx2160acex7/platform_def.h b/plat/nxp/soc-lx2160/lx2160acex7/platform_def.h +new file mode 100644 +index 00000000..614f0342 +--- /dev/null ++++ b/plat/nxp/soc-lx2160/lx2160acex7/platform_def.h +@@ -0,0 +1,187 @@ ++/* ++ * Copyright 2019 SolidRun ltd. ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ * Author: Rabeeh Khoury ++ */ ++ ++#ifndef __PLATFORM_DEF_H__ ++#define __PLATFORM_DEF_H__ ++ ++#include ++/* Certain ARM files require defines from this file */ ++#include ++/* From ARM :-> Has some common defines ARM requires */ ++#include ++/* Soc specific defines */ ++#include ++/* include the platform-level security policy */ ++#include ++ ++#if defined(IMAGE_BL2) ++#define SEC_MEM_NON_COHERENT ++#endif ++/* Special value used to verify platform parameters from BL2 to BL31 */ ++ ++/* TBD -- Check and get back if this value is same for all platforms */ ++#define LS_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL ++ ++/****************************************************************************** ++ * Board specific defines ++ *****************************************************************************/ ++ ++#define NXP_SYSCLK_FREQ 100000000 ++#define NXP_DDRCLK_FREQ 100000000 ++ ++/* UART related definition */ ++#define NXP_CONSOLE_ADDR NXP_UART_ADDR ++#define NXP_CONSOLE_BAUDRATE 115200 ++ ++#define NXP_SPD_EEPROM0 0x51 ++ ++#define DDRC_NUM_DIMM 1 ++#define CONFIG_DDR_ECC_EN ++#define CONFIG_DDR_ADDR_DEC /* enable address decoding feature */ ++ ++#define PLAT_DEF_DRAM0_SIZE 0x80000000 /* 2G */ ++ ++/* Board specific - size of QSPI Flash on board */ ++#if FLEXSPI_NOR_BOOT ++#define NXP_FLEXSPI_FLASH_SIZE 0x10000000 ++#endif ++/* TBD Put all memory specific defines here */ ++ ++/****************************************************************************** ++ * Required platform porting definitions common to all ARM standard platforms ++ *****************************************************************************/ ++ ++/* Size of cacheable stacks */ ++#if defined(IMAGE_BL2) ++#if defined(TRUSTED_BOARD_BOOT) ++#define PLATFORM_STACK_SIZE 0x2000 ++#else ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++#elif defined(IMAGE_BL31) ++#define PLATFORM_STACK_SIZE 0x1000 ++#endif ++ ++#define FIRMWARE_WELCOME_STR_LS_BL2 "Welcome to LX2160 BL2 Phase\n" ++#define FIRMWARE_WELCOME_STR_LS_BL31 "Welcome to LX2160 BL31 Phase\n" ++ ++/* This is common for all platforms where ++ * 64K is reserved for Secure memory ++ */ ++/* 64M Secure Memory */ ++#define NXP_SECURE_DRAM_SIZE (64 * 1024 * 1024) ++ ++/* 2M Secure EL1 Payload Shared Memory */ ++#define NXP_SP_SHRD_DRAM_SIZE (2 * 1024 * 1024) ++ ++/* Non secure memory */ ++#define NXP_NS_DRAM_SIZE (NXP_DRAM0_SIZE - \ ++ (NXP_SECURE_DRAM_SIZE + NXP_SP_SHRD_DRAM_SIZE)) ++ ++#define NXP_NS_DRAM_ADDR NXP_DRAM0_ADDR ++ ++#ifdef TEST_BL31 ++#define NXP_SECURE_DRAM_ADDR 0 ++#else ++#define NXP_SECURE_DRAM_ADDR (NXP_NS_DRAM_ADDR + NXP_DRAM0_SIZE - \ ++ (NXP_SECURE_DRAM_SIZE + NXP_SP_SHRD_DRAM_SIZE)) ++#endif ++ ++#define NXP_SP_SHRD_DRAM_ADDR (NXP_NS_DRAM_ADDR + NXP_DRAM0_SIZE \ ++ - NXP_SP_SHRD_DRAM_SIZE) ++ ++#define BL2_BASE (NXP_OCRAM_ADDR + NXP_ROM_RSVD + CSF_HDR_SZ) ++#ifdef SD_BOOT ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE - NXP_SD_BLOCK_BUF_SIZE) ++#else ++#define BL2_LIMIT (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE) ++#endif ++#define BL2_TEXT_LIMIT (BL2_LIMIT) ++ ++/* 2 MB reserved in secure memory for DDR */ ++#define BL31_BASE NXP_SECURE_DRAM_ADDR ++#define BL31_SIZE (0x200000) ++#define BL31_LIMIT (BL31_BASE + BL31_SIZE) ++ ++/* Put BL32 in secure memory */ ++#define BL32_BASE (NXP_SECURE_DRAM_ADDR + BL31_SIZE) ++#define BL32_LIMIT (NXP_SECURE_DRAM_ADDR + \ ++ NXP_SECURE_DRAM_SIZE + NXP_SP_SHRD_DRAM_SIZE) ++ ++/* BL33 memory region */ ++/* Hardcoded based on current address in u-boot */ ++#define BL33_BASE 0x82000000 ++#define BL33_LIMIT (NXP_NS_DRAM_ADDR + NXP_NS_DRAM_SIZE) ++ ++/* SD block buffer */ ++#define NXP_SD_BLOCK_BUF_SIZE (0xC000) ++#define NXP_SD_BLOCK_BUF_ADDR (NXP_OCRAM_ADDR + NXP_OCRAM_SIZE - NXP_SD_BLOCK_BUF_SIZE) ++ ++#define PHY_GEN2_FW_IMAGE_BUFFER (ULL(0x18000000) + CSF_HDR_SZ) ++ ++/* IO defines as needed by IO driver framework */ ++/* TBD Add how to reach these numbers */ ++#define MAX_IO_DEVICES 4 ++#define MAX_IO_BLOCK_DEVICES 1 ++#define MAX_IO_HANDLES 4 ++ ++ ++/* ++ * FIP image defines - Offset at which FIP Image would be present ++ * Image would include Bl31 , Bl33 and Bl32 (optional) ++ */ ++#ifdef POLICY_FUSE_PROVISION ++#define MAX_FIP_DEVICES 3 ++#define FUSE_BUF ULL(0x81000000) ++#define FUSE_SZ 0x80000 ++#endif ++ ++#ifndef MAX_FIP_DEVICES ++#define MAX_FIP_DEVICES 2 ++#endif ++ ++#define PLAT_FIP_OFFSET 0x100000 ++#define PLAT_FIP_MAX_SIZE 0x400000 ++ ++/* Check if this size can be determined from array size */ ++#if defined(IMAGE_BL2) ++#define MAX_MMAP_REGIONS 8 ++#define MAX_XLAT_TABLES 6 ++#elif defined(IMAGE_BL31) ++#define MAX_MMAP_REGIONS 9 ++#define MAX_XLAT_TABLES 9 ++#elif defined(IMAGE_BL32) ++#define MAX_MMAP_REGIONS 8 ++#define MAX_XLAT_TABLES 9 ++#endif ++ ++/******************************************************************************/ ++/* ++ * ID of the secure physical generic timer interrupt used by the BL32. ++ */ ++#define BL32_IRQ_SEC_PHY_TIMER 29 ++ ++#define BL31_WDOG_SEC 89 ++/* ++ * Define properties of Group 1 Secure and Group 0 interrupts as per GICv3 ++ * terminology. On a GICv2 system or mode, the lists will be merged and treated ++ * as Group 0 interrupts. ++ */ ++#define PLAT_LS_G1S_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL32_IRQ_SEC_PHY_TIMER, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE) ++ ++/* SGI 15 and Secure watchdog interrupts assigned to Group 0 */ ++#define PLAT_LS_G0_IRQ_PROPS(grp) \ ++ INTR_PROP_DESC(BL31_WDOG_SEC, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_EDGE), \ ++ INTR_PROP_DESC(15, GIC_HIGHEST_SEC_PRIORITY, grp, \ ++ GIC_INTR_CFG_LEVEL) ++ ++ ++#endif +diff --git a/plat/nxp/soc-lx2160/lx2160acex7/policy.h b/plat/nxp/soc-lx2160/lx2160acex7/policy.h +new file mode 100644 +index 00000000..deae979c +--- /dev/null ++++ b/plat/nxp/soc-lx2160/lx2160acex7/policy.h +@@ -0,0 +1,40 @@ ++/* ++ * Copyright 2019 SolidRun ltd. ++ * ++ * SPDX-License-Identifier: BSD-3-Clause ++ * ++ * Author : Rabeeh Khoury ++ */ ++ ++/*---------------------------------------------------------------------------*/ ++ ++#ifndef _POLICY_H ++#define _POLICY_H ++ ++ // the following defines affect the PLATFORM SECURITY POLICY ++ ++ // set this to 0x0 if the platform is not using/responding to ECC errors ++ // set this to 0x1 if ECC is being used (we have to do some init) ++#define POLICY_USING_ECC 0x0 ++ ++ // Set this to 0x0 to leave the default SMMU page size in sACR ++ // Set this to 0x1 to change the SMMU page size to 64K ++#define POLICY_SMMU_PAGESZ_64K 0x1 ++ ++/* ++ * POLICY_PERF_WRIOP = 0 : No Performance enhancement for WRIOP RN-I ++ * POLICY_PERF_WRIOP = 1 : No Performance enhancement for WRIOP RN-I = 7 ++ * POLICY_PERF_WRIOP = 2 : No Performance enhancement for WRIOP RN-I = 23 ++ */ ++#define POLICY_PERF_WRIOP 0 ++ ++ /* ++ * set this to '1' if the debug clocks need to remain enabled during ++ * system entry to low-power (LPM20) - this should only be necessary ++ * for testing and NEVER set for normal production ++ */ ++#define POLICY_DEBUG_ENABLE 0 ++ ++//----------------------------------------------------------------------------- ++ ++#endif // _POLICY_H +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0002-plat-nxp-lx2160a-auto-boot.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0002-plat-nxp-lx2160a-auto-boot.patch new file mode 100644 index 00000000..9a84b72a --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf-lx2160acex7/0002-plat-nxp-lx2160a-auto-boot.patch @@ -0,0 +1,194 @@ +From b5401a18ad8ade8f12a12171169f99214c7126e3 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 24 Mar 2020 02:48:34 +0200 +Subject: [PATCH 2/2] plat/nxp: lx2160a auto boot + +This patch adds support to patch RCW that already has SD/eMMC/SPI boot +support embedded with conditional load and jump. +The idea is to look for SD/eMMC/SPI boot, and modify src/dst/size +address with the correct values; rather than adding blockread at the end +of RCW code. + +With this patch images are unified and can be used to boot from SD / +eMMC and SPI. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + plat/nxp/common/common.mk | 5 +++ + plat/nxp/tools/create_pbl.c | 79 ++++++++++++++++++++++++++++--------- + 2 files changed, 66 insertions(+), 18 deletions(-) + +diff --git a/plat/nxp/common/common.mk b/plat/nxp/common/common.mk +index a80990740..e7e5f3879 100644 +--- a/plat/nxp/common/common.mk ++++ b/plat/nxp/common/common.mk +@@ -148,6 +148,11 @@ BOOT_DEV_SOURCES = ${PLAT_DRIVERS_PATH}/sd/sd_mmc.c \ + else ifeq (${BOOT_MODE}, flexspi_nor) + $(eval $(call add_define,FLEXSPI_NOR_BOOT)) + BOOT_DEV_SOURCES = ${PLAT_DRIVERS_PATH}/flexspi/nor/flexspi_nor.c ++else ifeq (${BOOT_MODE}, auto) ++$(eval $(call add_define,FLEXSPI_NOR_BOOT)) ++BOOT_DEV_SOURCES = ${PLAT_DRIVERS_PATH}/flexspi/nor/flexspi_nor.c \ ++ ${PLAT_DRIVERS_PATH}/sd/sd_mmc.c \ ++ drivers/io/io_block.c + endif + + # DDR driver needs to be enabled by default +diff --git a/plat/nxp/tools/create_pbl.c b/plat/nxp/tools/create_pbl.c +index 5a08472be..7ee085757 100644 +--- a/plat/nxp/tools/create_pbl.c ++++ b/plat/nxp/tools/create_pbl.c +@@ -67,6 +67,7 @@ typedef enum { + FLXSPI_NOR_BOOT, + FLXSPI_NAND_BOOT, + FLXSPI_NAND4K_BOOT, ++ AUTO_BOOT, + MAX_BOOT /* must be last item in list */ + } boot_src_t; + +@@ -194,7 +195,7 @@ struct pbl_image { + #define SOC_LS2088 2088 + #define SOC_LX2160 2160 + +-static uint32_t pbl_size; ++static uint32_t pbl_size = 0; + bool sb_flag = false; + + /*************************************************************************** +@@ -503,7 +504,6 @@ int add_boot_ptr_cmd(FILE *fp_rcw_pbi_op) + goto bootptr_err; + } + } +- + printf("\nBoot Location Pointer= %x\n", BYTE_SWAP_32(pblimg.ep)); + ret = SUCCESS; + +@@ -697,6 +697,8 @@ int main(int argc, char **argv) + int ret = FAILURE; + bool bootptr_flag = false; + enum stop_command flag_stop_cmd = CRC_STOP_COMMAND;; ++ int skip = 0; ++ uint32_t saved_src; + + /* Initializing the global structure to zero. */ + memset(&pblimg, 0x0, sizeof(struct pbl_image)); +@@ -797,6 +799,8 @@ int main(int argc, char **argv) + pblimg.boot_src = FLXSPI_NAND_BOOT; + else if (!strcmp(optarg, "flexspi_nand2k")) + pblimg.boot_src = FLXSPI_NAND4K_BOOT; ++ else if (!strcmp(optarg, "auto")) ++ pblimg.boot_src = AUTO_BOOT; + else { + printf("CMD Error: Invalid boot source.\n"); + goto exit_main; +@@ -902,13 +906,14 @@ int main(int argc, char **argv) + printf("%s: Error reading PBI Cmd.\n", __func__); + goto exit_main; + } +- while (word != 0x808f0000 && word != 0x80ff0000) { ++ saved_src = pblimg.src_addr; ++ while (word != 0x808f0000 && word != 0x80ff0000) { + pbl_size++; + /* 11th words in RCW has PBL length. Update it + * with new length. 2 comamnds get added + * Block copy + CCSR Write/CSF header write + */ +- if (pbl_size == 11) { ++ if ((pbl_size == 11) && (pblimg.boot_src != AUTO_BOOT)) { + word_1 = (word & PBI_LEN_MASK) + + (PBI_LEN_ADD << 20); + word = word & ~PBI_LEN_MASK; +@@ -923,8 +928,44 @@ int main(int argc, char **argv) + goto exit_main; + } + } +- if (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, +- fp_rcw_pbi_op) != NUM_MEM_BLOCK) { ++ if (pblimg.boot_src == AUTO_BOOT) { ++ if (word == 0x80000008) { ++ printf ("Found SD boot at %d\n",pbl_size); ++ pblimg.boot_src = SD_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip = 6; ++ } else skip=4; ++ } ++ if (word == 0x80000009) { ++ printf ("Found eMMC boot at %d\n",pbl_size); ++ pblimg.boot_src = EMMC_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip = 6; ++ } else skip=4; ++ } ++ if (word == 0x8000000f) { ++ printf ("Found SPI boot at %d\n",pbl_size); ++ pblimg.boot_src = FLXSPI_NOR_BOOT; ++ add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ pblimg.boot_src = AUTO_BOOT; ++ pblimg.src_addr = saved_src; ++ if (bootptr_flag == true) { ++ add_boot_ptr_cmd(fp_rcw_pbi_op); ++ skip = 6; ++ } else skip=4; ++ } ++ } ++ if (!skip && ++ (fwrite(&word, sizeof(word), NUM_MEM_BLOCK, ++ fp_rcw_pbi_op) != NUM_MEM_BLOCK)) { + printf("%s: [CH3] Error in Writing PBI Words\n", + __func__); + goto exit_main; +@@ -941,8 +982,9 @@ int main(int argc, char **argv) + } else if (word == STOP_CMD_ARM_CH3){ + flag_stop_cmd = STOP_COMMAND; + } ++ if (skip) skip--; + } +- if (bootptr_flag == true) { ++ if ((pblimg.boot_src != AUTO_BOOT) && (bootptr_flag == true)) { + /* Add command to set boot_loc ptr */ + ret = add_boot_ptr_cmd(fp_rcw_pbi_op); + if (ret != SUCCESS) { +@@ -953,18 +995,19 @@ int main(int argc, char **argv) + } + + /* Write acs write commands to output file */ +- ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); +- if (ret != SUCCESS) { +- printf("%s: Function add_blk_cpy_cmd return failure.\n", +- __func__); +- goto exit_main; +- } +- ++ if (pblimg.boot_src != AUTO_BOOT) { ++ ret = add_blk_cpy_cmd(fp_rcw_pbi_op, args); ++ if (ret != SUCCESS) { ++ printf("%s: Function add_blk_cpy_cmd return failure.\n", ++ __func__); ++ goto exit_main; ++ } ++ } + /* Add stop command after adding pbi commands */ +- ret = add_pbi_stop_cmd(fp_rcw_pbi_op, flag_stop_cmd); +- if (ret != SUCCESS) { +- goto exit_main; +- } ++ ret = add_pbi_stop_cmd(fp_rcw_pbi_op, flag_stop_cmd); ++ if (ret != SUCCESS) { ++ goto exit_main; ++ } + + break; + +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf_git.bbappend b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf_git.bbappend new file mode 100644 index 00000000..9f3171da --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/atf/atf_git.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_append_lx2160acex7 := "${THISDIR}/${PN}-lx2160acex7:" + +SRC_URI_append_lx2160acex7 = "\ + file://0001-plat-nxp-Add-lx2160acex7-module-support.patch \ + file://0002-plat-nxp-lx2160a-auto-boot.patch \ +" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/bcm4339-nvram-config.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/bcm4339-nvram-config.bb index bfd5ecf0..d87a2fd1 100644 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/bcm4339-nvram-config.bb +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/bcm4339-nvram-config.bb @@ -5,4 +5,4 @@ include broadcom-nvram-config.inc CHIP_MODEL = "4339" -COMPATIBLE_MACHINE = "(imx7d-pico)" +COMPATIBLE_MACHINE = "(imx7d-pico|imx6ul-pico|imx6qdl-pico)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6qdl-pico/brcmfmac4339-sdio.txt b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6qdl-pico/brcmfmac4339-sdio.txt new file mode 100644 index 00000000..1ddd9295 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6qdl-pico/brcmfmac4339-sdio.txt @@ -0,0 +1,99 @@ +#AP6335_NVRAM_V1.5_03112014 +NVRAMRev=$Rev: 410316 $ +sromrev=11 +boardrev=0x1203 +boardtype=0x06c5 +boardflags=0x00000c01 +boardflags2=0x00002000 +boardflags3=0x101188 +macaddr=00:90:4c:c5:12:38 +ccode=0 +regrev=0 +antswitch=0 +pdgain2g=7 +pdgain5g=7 +tworangetssi2g=0 +tworangetssi5g=0 +femctrl=7 +pcieingress_war=15 +vendid=0x14e4 +devid=0x43ae +manfid=0x2d0 +nocrc=1 +otpimagesize=502 +xtalfreq=37400 +extpagain2g=2 +pdetrange2g=2 +extpagain5g=2 +pdetrange5g=2 +rxgains2gelnagaina0=0 +rxgains2gtrisoa0=7 +rxgains2gtrelnabypa0=0 +rxgains5gelnagaina0=0 +rxgains5gtrisoa0=11 +rxgains5gtrelnabypa0=0 +rxchain=1 +txchain=1 +aa2g=1 +aa5g=1 +tssipos5g=0 +tssipos2g=0 +pa2ga0=-161,6269,-723 +pa2gccka0=-116,7568,-852 +pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pdoffset40ma0=0 +pdoffset80ma0=0 +pdoffsetcckma0=0 +maxp2ga0=75 +maxp5ga0=64,64,72,72 +cckbw202gpo=0x0000 +cckbw20ul2gpo=0x0 +mcsbw202gpo=0x99445533 +mcsbw402gpo=0x99775533 +dot11agofdmhrbw202gpo=0x2233 +ofdmlrbw202gpo=0x0000 +tssifloor2g=500 +mcsbw205glpo=0x66333330 +mcsbw405glpo=0x66665530 +mcsbw805glpo=0xAA555530 +mcsbw1605glpo=0x99555530 +mcsbw205gmpo=0x99BB5530 +mcsbw405gmpo=0x99BB5530 +mcsbw805gmpo=0xEE555530 +mcsbw1605gmpo=0x99555530 +mcsbw205ghpo=0x99995530 +mcsbw405ghpo=0x99BB5530 +mcsbw805ghpo=0xEE555530 +mcsbw1605ghpo=0x99555530 +mcslr5glpo=0x0000 +mcslr5gmpo=0x0000 +mcslr5ghpo=0x0000 +sb20in40hrrpo=0x0 +sb20in80and160hr5glpo=0x0 +sb40and80hr5glpo=0x0 +sb20in80and160hr5gmpo=0x0 +sb40and80hr5gmpo=0x0 +sb20in80and160hr5ghpo=0x0 +sb40and80hr5ghpo=0x0 +sb20in40lrpo=0x0 +sb20in80and160lr5glpo=0x0 +sb40and80lr5glpo=0x0 +sb20in80and160lr5gmpo=0x0 +sb40and80lr5gmpo=0x0 +sb20in80and160lr5ghpo=0x0 +sb40and80lr5ghpo=0x0 +dot11agduphrpo=0x0 +dot11agduplrpo=0x0 +phycal_tempdelta=25 +cckdigfilttype=2 +pacalidx2g=65 +dacrate2g=160 +swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038 +swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff +swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +rssicorrnorm_c0=3,3 +rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2 +muxenab=0x10 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6ul-pico/brcmfmac4339-sdio.txt b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6ul-pico/brcmfmac4339-sdio.txt new file mode 100644 index 00000000..1ddd9295 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/broadcom-nvram-config/files/imx6ul-pico/brcmfmac4339-sdio.txt @@ -0,0 +1,99 @@ +#AP6335_NVRAM_V1.5_03112014 +NVRAMRev=$Rev: 410316 $ +sromrev=11 +boardrev=0x1203 +boardtype=0x06c5 +boardflags=0x00000c01 +boardflags2=0x00002000 +boardflags3=0x101188 +macaddr=00:90:4c:c5:12:38 +ccode=0 +regrev=0 +antswitch=0 +pdgain2g=7 +pdgain5g=7 +tworangetssi2g=0 +tworangetssi5g=0 +femctrl=7 +pcieingress_war=15 +vendid=0x14e4 +devid=0x43ae +manfid=0x2d0 +nocrc=1 +otpimagesize=502 +xtalfreq=37400 +extpagain2g=2 +pdetrange2g=2 +extpagain5g=2 +pdetrange5g=2 +rxgains2gelnagaina0=0 +rxgains2gtrisoa0=7 +rxgains2gtrelnabypa0=0 +rxgains5gelnagaina0=0 +rxgains5gtrisoa0=11 +rxgains5gtrelnabypa0=0 +rxchain=1 +txchain=1 +aa2g=1 +aa5g=1 +tssipos5g=0 +tssipos2g=0 +pa2ga0=-161,6269,-723 +pa2gccka0=-116,7568,-852 +pa5ga0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw40a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pa5gbw80a0=0xFF61,0x163C,0xFD55,0xFF5D,0x1671,0xFD4F,0xFF5F,0x16CA,0xFD45,0xFF60,0x1676,0xFD4D +pdoffset40ma0=0 +pdoffset80ma0=0 +pdoffsetcckma0=0 +maxp2ga0=75 +maxp5ga0=64,64,72,72 +cckbw202gpo=0x0000 +cckbw20ul2gpo=0x0 +mcsbw202gpo=0x99445533 +mcsbw402gpo=0x99775533 +dot11agofdmhrbw202gpo=0x2233 +ofdmlrbw202gpo=0x0000 +tssifloor2g=500 +mcsbw205glpo=0x66333330 +mcsbw405glpo=0x66665530 +mcsbw805glpo=0xAA555530 +mcsbw1605glpo=0x99555530 +mcsbw205gmpo=0x99BB5530 +mcsbw405gmpo=0x99BB5530 +mcsbw805gmpo=0xEE555530 +mcsbw1605gmpo=0x99555530 +mcsbw205ghpo=0x99995530 +mcsbw405ghpo=0x99BB5530 +mcsbw805ghpo=0xEE555530 +mcsbw1605ghpo=0x99555530 +mcslr5glpo=0x0000 +mcslr5gmpo=0x0000 +mcslr5ghpo=0x0000 +sb20in40hrrpo=0x0 +sb20in80and160hr5glpo=0x0 +sb40and80hr5glpo=0x0 +sb20in80and160hr5gmpo=0x0 +sb40and80hr5gmpo=0x0 +sb20in80and160hr5ghpo=0x0 +sb40and80hr5ghpo=0x0 +sb20in40lrpo=0x0 +sb20in80and160lr5glpo=0x0 +sb40and80lr5glpo=0x0 +sb20in80and160lr5gmpo=0x0 +sb40and80lr5gmpo=0x0 +sb20in80and160lr5ghpo=0x0 +sb40and80lr5ghpo=0x0 +dot11agduphrpo=0x0 +dot11agduplrpo=0x0 +phycal_tempdelta=25 +cckdigfilttype=2 +pacalidx2g=65 +dacrate2g=160 +swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038 +swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff +swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000 +rssicorrnorm_c0=3,3 +rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2 +muxenab=0x10 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/imx-atf/imx-atf-boundary_2.3.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/imx-atf/imx-atf-boundary_2.3.bb new file mode 100644 index 00000000..93662466 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/imx-atf/imx-atf-boundary_2.3.bb @@ -0,0 +1,56 @@ +# Copyright (C) 2017-2019 NXP + +DESCRIPTION = "i.MX ARM Trusted Firmware" +SECTION = "BSP" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PROVIDES = "imx-atf" + +PV .= "+git${SRCPV}" + +SRCBRANCH = "boundary-imx_4.14.98_2.3.0" +SRC_URI = "git://github.com/boundarydevices/imx-atf.git;branch=${SRCBRANCH} \ +" +SRCREV = "99e07a29006b35e5b76e3a2555c54575f3b63d0c" + +S = "${WORKDIR}/git" + +inherit deploy + +BOOT_TOOLS = "imx-boot-tools" + +PLATFORM ?= "INVALID" +PLATFORM_mx8mq = "imx8mq" +PLATFORM_mx8mm = "imx8mm" +PLATFORM_mx8mn = "imx8mn" + +EXTRA_OEMAKE += " \ + CROSS_COMPILE="${TARGET_PREFIX}" \ + PLAT=${PLATFORM} \ +" + +BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" + +do_compile() { + # Clear LDFLAGS to avoid the option -Wl recognize issue + unset LDFLAGS + oe_runmake bl31 + if ${BUILD_OPTEE}; then + oe_runmake clean BUILD_BASE=build-optee + oe_runmake BUILD_BASE=build-optee SPD=opteed bl31 + fi +} + +do_install[noexec] = "1" + +do_deploy() { + install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin + if ${BUILD_OPTEE}; then + install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee + fi +} +addtask deploy after do_compile + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(nitrogen8m|nitrogen8mm|nitrogen8mn)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/libmcc2/libmcc2_2.0.1.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/libmcc2/libmcc2_2.0.1.bb deleted file mode 100644 index ce49b8b4..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/libmcc2/libmcc2_2.0.1.bb +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2013 Timesys Corporation -SUMMARY = "Multicore communication Library" -LICENSE = "GPL-2.0 | BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c49712341497d0b5f2e40c30dff2af9d \ - file://BSD_LICENSE;md5=10695b8f86532e5e44640acf4d92a2ef" - -DEPENDS = "virtual/kernel-module-mcc" - -SRC_URI = "http://repository.timesys.com/buildsources/l/libmcc2/libmcc2-${PV}/libmcc2-${PV}.tar.bz2" - -SRC_URI[md5sum] = "bd47714eb44ad67915ed51994e3af096" -SRC_URI[sha256sum] = "3bcbd9f3092c3be6edc6ab725346e822f05f303ce1dc5482fb320f4a1754f52d" - -S = "${WORKDIR}/libmcc2-${PV}" - -CFLAGS += "-I${STAGING_KERNEL_DIR}/include/uapi" - -RDEPENDS_${PN} = "virtual/kernel-module-mcc" - -COMPATIBLE_MACHINE = "(vf60)" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -RDEPENDS_${PN}-dev += "virtual/kernel-module-mcc-dev" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils-lx2160acex7/0001-lx2160acex7-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils-lx2160acex7/0001-lx2160acex7-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch new file mode 100644 index 00000000..b4f94f8c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils-lx2160acex7/0001-lx2160acex7-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch @@ -0,0 +1,1912 @@ +From 1b1279d4ce8eb28a3c4f1e98bcd62f16173d8285 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 14:40:28 +0300 +Subject: [PATCH] lx2160acex7: add 8x10G, dual 40G and dual 100G DPL/DPC files + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + config/lx2160a/CEX7/dpc-8_x_usxgmii.dts | 103 ++++ + config/lx2160a/CEX7/dpc-dual-100g.dts | 85 +++ + config/lx2160a/CEX7/dpc-dual-40g.dts | 85 +++ + config/lx2160a/CEX7/dpl-eth.8x10g.19.dts | 532 ++++++++++++++++++ + config/lx2160a/CEX7/dpl-eth.dual-100g.19.dts | 511 ++++++++++++++++++ + config/lx2160a/CEX7/dpl-eth.dual-40g.19.dts | 534 +++++++++++++++++++ + 6 files changed, 1850 insertions(+) + create mode 100644 config/lx2160a/CEX7/dpc-8_x_usxgmii.dts + create mode 100644 config/lx2160a/CEX7/dpc-dual-100g.dts + create mode 100644 config/lx2160a/CEX7/dpc-dual-40g.dts + create mode 100644 config/lx2160a/CEX7/dpl-eth.8x10g.19.dts + create mode 100644 config/lx2160a/CEX7/dpl-eth.dual-100g.19.dts + create mode 100644 config/lx2160a/CEX7/dpl-eth.dual-40g.19.dts + +diff --git a/config/lx2160a/CEX7/dpc-8_x_usxgmii.dts b/config/lx2160a/CEX7/dpc-8_x_usxgmii.dts +new file mode 100644 +index 0000000..44e22bb +--- /dev/null ++++ b/config/lx2160a/CEX7/dpc-8_x_usxgmii.dts +@@ -0,0 +1,103 @@ ++/* ++* Copyright 2018 NXP ++* ++* Redistribution and use in source and binary forms, with or without ++* modification, are permitted provided that the following conditions are met: ++* * Redistributions of source code must retain the above copyright ++* notice, this list of conditions and the following disclaimer. ++* * Redistributions in binary form must reproduce the above copyright ++* notice, this list of conditions and the following disclaimer in the ++* documentation and/or other materials provided with the distribution. ++* * Neither the name of the above-listed copyright holders nor the ++* names of any contributors may be used to endorse or promote products ++* derived from this software without specific prior written permission. ++* ++* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++* POSSIBILITY OF SUCH DAMAGE. ++*/ ++ ++/* ++* This DPC showcases one Linux configuration for lx2160a boards. ++*/ ++ ++/dts-v1/; ++ ++/ { ++ ++ resources { ++ ++ icid_pools { ++ ++ icid_pool@1 { ++ num = <0x64>; ++ base_icid = <0x0>; ++ }; ++ }; ++ }; ++ ++ mc_general { ++ ++ log { ++ mode = "LOG_MODE_ON"; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ ++ console { ++ mode = "CONSOLE_MODE_OFF"; ++ uart_id = <0x4>; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ }; ++ ++ controllers { ++ ++ qbman { ++ /* Transform this number of 8-WQ channels into four times ++ * as many 2-WQ channels. This allows the creation of a ++ * larger number of DPCONs. ++ */ ++ wq_ch_conversion = <32>; ++ }; ++ }; ++ ++ board_info { ++ ports { ++ mac@3 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@4 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@5 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@6 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@7 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@8 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@9 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@10 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@17 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ }; ++ }; ++}; +diff --git a/config/lx2160a/CEX7/dpc-dual-100g.dts b/config/lx2160a/CEX7/dpc-dual-100g.dts +new file mode 100644 +index 0000000..0601a07 +--- /dev/null ++++ b/config/lx2160a/CEX7/dpc-dual-100g.dts +@@ -0,0 +1,85 @@ ++/* ++* Copyright 2018 NXP ++* ++* Redistribution and use in source and binary forms, with or without ++* modification, are permitted provided that the following conditions are met: ++* * Redistributions of source code must retain the above copyright ++* notice, this list of conditions and the following disclaimer. ++* * Redistributions in binary form must reproduce the above copyright ++* notice, this list of conditions and the following disclaimer in the ++* documentation and/or other materials provided with the distribution. ++* * Neither the name of the above-listed copyright holders nor the ++* names of any contributors may be used to endorse or promote products ++* derived from this software without specific prior written permission. ++* ++* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++* POSSIBILITY OF SUCH DAMAGE. ++*/ ++ ++/* ++* This DPC showcases one Linux configuration for lx2160a boards. ++*/ ++ ++/dts-v1/; ++ ++/ { ++ ++ resources { ++ ++ icid_pools { ++ ++ icid_pool@1 { ++ num = <0x64>; ++ base_icid = <0x0>; ++ }; ++ }; ++ }; ++ ++ mc_general { ++ ++ log { ++ mode = "LOG_MODE_ON"; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ ++ console { ++ mode = "CONSOLE_MODE_OFF"; ++ uart_id = <0x4>; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ }; ++ ++ controllers { ++ ++ qbman { ++ /* Transform this number of 8-WQ channels into four times ++ * as many 2-WQ channels. This allows the creation of a ++ * larger number of DPCONs. ++ */ ++ wq_ch_conversion = <32>; ++ }; ++ }; ++ ++ board_info { ++ ports { ++ mac@1 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@2 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@17 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ }; ++ }; ++}; +diff --git a/config/lx2160a/CEX7/dpc-dual-40g.dts b/config/lx2160a/CEX7/dpc-dual-40g.dts +new file mode 100644 +index 0000000..0601a07 +--- /dev/null ++++ b/config/lx2160a/CEX7/dpc-dual-40g.dts +@@ -0,0 +1,85 @@ ++/* ++* Copyright 2018 NXP ++* ++* Redistribution and use in source and binary forms, with or without ++* modification, are permitted provided that the following conditions are met: ++* * Redistributions of source code must retain the above copyright ++* notice, this list of conditions and the following disclaimer. ++* * Redistributions in binary form must reproduce the above copyright ++* notice, this list of conditions and the following disclaimer in the ++* documentation and/or other materials provided with the distribution. ++* * Neither the name of the above-listed copyright holders nor the ++* names of any contributors may be used to endorse or promote products ++* derived from this software without specific prior written permission. ++* ++* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++* POSSIBILITY OF SUCH DAMAGE. ++*/ ++ ++/* ++* This DPC showcases one Linux configuration for lx2160a boards. ++*/ ++ ++/dts-v1/; ++ ++/ { ++ ++ resources { ++ ++ icid_pools { ++ ++ icid_pool@1 { ++ num = <0x64>; ++ base_icid = <0x0>; ++ }; ++ }; ++ }; ++ ++ mc_general { ++ ++ log { ++ mode = "LOG_MODE_ON"; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ ++ console { ++ mode = "CONSOLE_MODE_OFF"; ++ uart_id = <0x4>; ++ level = "LOG_LEVEL_WARNING"; ++ }; ++ }; ++ ++ controllers { ++ ++ qbman { ++ /* Transform this number of 8-WQ channels into four times ++ * as many 2-WQ channels. This allows the creation of a ++ * larger number of DPCONs. ++ */ ++ wq_ch_conversion = <32>; ++ }; ++ }; ++ ++ board_info { ++ ports { ++ mac@1 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@2 { ++ link_type = "MAC_LINK_TYPE_FIXED"; ++ }; ++ mac@17 { ++ link_type = "MAC_LINK_TYPE_PHY"; ++ }; ++ }; ++ }; ++}; +diff --git a/config/lx2160a/CEX7/dpl-eth.8x10g.19.dts b/config/lx2160a/CEX7/dpl-eth.8x10g.19.dts +new file mode 100644 +index 0000000..b72af03 +--- /dev/null ++++ b/config/lx2160a/CEX7/dpl-eth.8x10g.19.dts +@@ -0,0 +1,532 @@ ++/* ++ * Copyright 2018 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++ ++/ { ++ dpl-version = <0xa>; ++ /***************************************************************** ++ * Containers ++ *****************************************************************/ ++ containers { ++ dprc@1 { ++ parent = "none"; ++ options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; ++ objects { ++ /* ------------ DPNIs --------------*/ ++ obj_set@dpni { ++ type = "dpni"; ++ ids = <0x0>; ++ }; ++ ++ ++ /* ------------ DPMACs --------------*/ ++ obj_set@dpmac { ++ type = "dpmac"; ++ ids = <0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0x11>; ++ }; ++ ++ ++ /* ------------ DPBPs --------------*/ ++ obj_set@dpbp { ++ type = "dpbp"; ++ ids = <0x0 0x1>; ++ }; ++ ++ /* ------------ DPIOs --------------*/ ++ obj_set@dpio { ++ type = "dpio"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf>; ++ }; ++ ++ /* ------------ DPMCPs --------------*/ ++ obj_set@dpmcp { ++ type = "dpmcp"; ++ ids = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23>; ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ obj_set@dpcon { ++ type = "dpcon"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ obj@700 { ++ obj_name = "dpseci@0"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ obj@800 { ++ obj_name="dprtc@0"; ++ }; ++ }; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Objects ++ *****************************************************************/ ++ objects { ++ ++ /* ------------ DPNI --------------*/ ++ dpni@0 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@1 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@2 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@3 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@4 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@5 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@6 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@7 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@8 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpmac@2 { ++ }; ++ ++ dpmac@3 { ++ }; ++ ++ dpmac@4 { ++ }; ++ ++ dpmac@5 { ++ }; ++ ++ dpmac@6 { ++ }; ++ dpmac@7 { ++ }; ++ dpmac@8 { ++ }; ++ dpmac@9 { ++ }; ++ dpmac@10 { ++ }; ++ ++ dpmac@17 { ++ }; ++ ++ dpmac@18 { ++ }; ++ ++ /* ------------ DPBP --------------*/ ++ dpbp@0 { ++ }; ++ ++ dpbp@1 { ++ }; ++ ++ ++ /* ------------ DPIO --------------*/ ++ dpio@0 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@1 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@2 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@3 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@4 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@5 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@6 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@7 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@8 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@9 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@10 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@11 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@12 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@13 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@14 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@15 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ /* ------------ DPMCP --------------*/ ++ dpmcp@1 { ++ }; ++ ++ dpmcp@2 { ++ }; ++ ++ dpmcp@3 { ++ }; ++ ++ dpmcp@4 { ++ }; ++ ++ dpmcp@5 { ++ }; ++ ++ dpmcp@6 { ++ }; ++ ++ dpmcp@7 { ++ }; ++ ++ dpmcp@8 { ++ }; ++ ++ dpmcp@9 { ++ }; ++ ++ dpmcp@10 { ++ }; ++ ++ dpmcp@11 { ++ }; ++ ++ dpmcp@12 { ++ }; ++ ++ dpmcp@13 { ++ }; ++ ++ dpmcp@14 { ++ }; ++ ++ dpmcp@15 { ++ }; ++ ++ dpmcp@16 { ++ }; ++ ++ dpmcp@17 { ++ }; ++ ++ dpmcp@18 { ++ }; ++ ++ dpmcp@19 { ++ }; ++ ++ dpmcp@20 { ++ }; ++ ++ dpmcp@21 { ++ }; ++ ++ dpmcp@22 { ++ }; ++ ++ dpmcp@23 { ++ }; ++ ++ dpmcp@24 { ++ }; ++ ++ dpmcp@25 { ++ }; ++ ++ dpmcp@26 { ++ }; ++ ++ dpmcp@27 { ++ }; ++ ++ dpmcp@28 { ++ }; ++ ++ dpmcp@29 { ++ }; ++ ++ dpmcp@30 { ++ }; ++ ++ dpmcp@31 { ++ }; ++ ++ dpmcp@32 { ++ }; ++ ++ dpmcp@33 { ++ }; ++ ++ dpmcp@34 { ++ }; ++ ++ dpmcp@35 { ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ dpcon@0 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@1 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@2 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@3 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@4 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@5 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@6 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@7 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@8 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@9 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@10 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@11 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@12 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@13 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@14 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@15 { ++ num_priorities = <0x2>; ++ }; ++ dpcon@16 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@17 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@18 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@19 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@20 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@21 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@22 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@23 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@24 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@25 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@26 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@27 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@28 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@29 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@30 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@31 { ++ num_priorities = <0x2>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ dpseci@0 { ++ priorities = <0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01>; ++ options = "DPSECI_OPT_HAS_CG"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ dprtc@0 { ++ compatible="fsl,dprtc"; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Connections ++ *****************************************************************/ ++ connections { ++ connection@1 { ++ endpoint1 = "dpni@0"; ++ endpoint2 = "dpmac@17"; ++ }; ++/* connection@2 { ++ endpoint1 = "dpni@1"; ++ endpoint2 = "dpmac@3"; ++ }; ++ connection@3 { ++ endpoint1 = "dpni@2"; ++ endpoint2 = "dpmac@4"; ++ }; ++ connection@4 { ++ endpoint1 = "dpni@3"; ++ endpoint2 = "dpmac@5"; ++ }; ++ connection@5 { ++ endpoint1 = "dpni@4"; ++ endpoint2 = "dpmac@6"; ++ };*/ ++ }; ++}; ++ +diff --git a/config/lx2160a/CEX7/dpl-eth.dual-100g.19.dts b/config/lx2160a/CEX7/dpl-eth.dual-100g.19.dts +new file mode 100644 +index 0000000..bb1b54f +--- /dev/null ++++ b/config/lx2160a/CEX7/dpl-eth.dual-100g.19.dts +@@ -0,0 +1,511 @@ ++/* ++ * Copyright 2018 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++ ++/ { ++ dpl-version = <0xa>; ++ /***************************************************************** ++ * Containers ++ *****************************************************************/ ++ containers { ++ dprc@1 { ++ parent = "none"; ++ options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; ++ objects { ++ /* ------------ DPNIs --------------*/ ++ obj_set@dpni { ++ type = "dpni"; ++ ids = <0x0>; ++ }; ++ ++ ++ /* ------------ DPMACs --------------*/ ++ obj_set@dpmac { ++ type = "dpmac"; ++ ids = <0x1 0x2 0x11>; ++ }; ++ ++ ++ /* ------------ DPBPs --------------*/ ++ obj_set@dpbp { ++ type = "dpbp"; ++ ids = <0x0 0x1>; ++ }; ++ ++ /* ------------ DPIOs --------------*/ ++ obj_set@dpio { ++ type = "dpio"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf>; ++ }; ++ ++ /* ------------ DPMCPs --------------*/ ++ obj_set@dpmcp { ++ type = "dpmcp"; ++ ids = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23>; ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ obj_set@dpcon { ++ type = "dpcon"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ obj@700 { ++ obj_name = "dpseci@0"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ obj@800 { ++ obj_name="dprtc@0"; ++ }; ++ }; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Objects ++ *****************************************************************/ ++ objects { ++ ++ /* ------------ DPNI --------------*/ ++ dpni@0 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@1 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@2 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@3 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@4 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@5 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@6 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@7 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@8 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpmac@1 { ++ }; ++ dpmac@2 { ++ }; ++ ++ dpmac@17 { ++ }; ++ ++ /* ------------ DPBP --------------*/ ++ dpbp@0 { ++ }; ++ ++ dpbp@1 { ++ }; ++ ++ ++ /* ------------ DPIO --------------*/ ++ dpio@0 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@1 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@2 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@3 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@4 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@5 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@6 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@7 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@8 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@9 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@10 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@11 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@12 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@13 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@14 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@15 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ /* ------------ DPMCP --------------*/ ++ dpmcp@1 { ++ }; ++ ++ dpmcp@2 { ++ }; ++ ++ dpmcp@3 { ++ }; ++ ++ dpmcp@4 { ++ }; ++ ++ dpmcp@5 { ++ }; ++ ++ dpmcp@6 { ++ }; ++ ++ dpmcp@7 { ++ }; ++ ++ dpmcp@8 { ++ }; ++ ++ dpmcp@9 { ++ }; ++ ++ dpmcp@10 { ++ }; ++ ++ dpmcp@11 { ++ }; ++ ++ dpmcp@12 { ++ }; ++ ++ dpmcp@13 { ++ }; ++ ++ dpmcp@14 { ++ }; ++ ++ dpmcp@15 { ++ }; ++ ++ dpmcp@16 { ++ }; ++ ++ dpmcp@17 { ++ }; ++ ++ dpmcp@18 { ++ }; ++ ++ dpmcp@19 { ++ }; ++ ++ dpmcp@20 { ++ }; ++ ++ dpmcp@21 { ++ }; ++ ++ dpmcp@22 { ++ }; ++ ++ dpmcp@23 { ++ }; ++ ++ dpmcp@24 { ++ }; ++ ++ dpmcp@25 { ++ }; ++ ++ dpmcp@26 { ++ }; ++ ++ dpmcp@27 { ++ }; ++ ++ dpmcp@28 { ++ }; ++ ++ dpmcp@29 { ++ }; ++ ++ dpmcp@30 { ++ }; ++ ++ dpmcp@31 { ++ }; ++ ++ dpmcp@32 { ++ }; ++ ++ dpmcp@33 { ++ }; ++ ++ dpmcp@34 { ++ }; ++ ++ dpmcp@35 { ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ dpcon@0 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@1 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@2 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@3 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@4 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@5 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@6 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@7 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@8 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@9 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@10 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@11 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@12 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@13 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@14 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@15 { ++ num_priorities = <0x2>; ++ }; ++ dpcon@16 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@17 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@18 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@19 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@20 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@21 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@22 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@23 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@24 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@25 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@26 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@27 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@28 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@29 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@30 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@31 { ++ num_priorities = <0x2>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ dpseci@0 { ++ priorities = <0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01>; ++ options = "DPSECI_OPT_HAS_CG"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ dprtc@0 { ++ compatible="fsl,dprtc"; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Connections ++ *****************************************************************/ ++ connections { ++ connection@1 { ++ endpoint1 = "dpni@0"; ++ endpoint2 = "dpmac@17"; ++ }; ++/* connection@2 { ++ endpoint1 = "dpni@1"; ++ endpoint2 = "dpmac@3"; ++ }; ++ connection@3 { ++ endpoint1 = "dpni@2"; ++ endpoint2 = "dpmac@4"; ++ }; ++ connection@4 { ++ endpoint1 = "dpni@3"; ++ endpoint2 = "dpmac@5"; ++ }; ++ connection@5 { ++ endpoint1 = "dpni@4"; ++ endpoint2 = "dpmac@6"; ++ };*/ ++ }; ++}; ++ +diff --git a/config/lx2160a/CEX7/dpl-eth.dual-40g.19.dts b/config/lx2160a/CEX7/dpl-eth.dual-40g.19.dts +new file mode 100644 +index 0000000..5619fd2 +--- /dev/null ++++ b/config/lx2160a/CEX7/dpl-eth.dual-40g.19.dts +@@ -0,0 +1,534 @@ ++/* ++ * Copyright 2018 NXP ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * * Neither the name of the above-listed copyright holders nor the ++ * names of any contributors may be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/dts-v1/; ++ ++/ { ++ dpl-version = <0xa>; ++ /***************************************************************** ++ * Containers ++ *****************************************************************/ ++ containers { ++ dprc@1 { ++ parent = "none"; ++ options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; ++ objects { ++ /* ------------ DPNIs --------------*/ ++ obj_set@dpni { ++ type = "dpni"; ++ ids = <0x0>; ++ }; ++ ++ ++ /* ------------ DPMACs --------------*/ ++ obj_set@dpmac { ++ type = "dpmac"; ++ ids = <0x1 0x2 0x11>; ++ }; ++ ++ ++ /* ------------ DPBPs --------------*/ ++ obj_set@dpbp { ++ type = "dpbp"; ++ ids = <0x0 0x1>; ++ }; ++ ++ /* ------------ DPIOs --------------*/ ++ obj_set@dpio { ++ type = "dpio"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf>; ++ }; ++ ++ /* ------------ DPMCPs --------------*/ ++ obj_set@dpmcp { ++ type = "dpmcp"; ++ ids = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23>; ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ obj_set@dpcon { ++ type = "dpcon"; ++ ids = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ obj@700 { ++ obj_name = "dpseci@0"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ obj@800 { ++ obj_name="dprtc@0"; ++ }; ++ }; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Objects ++ *****************************************************************/ ++ objects { ++ ++ /* ------------ DPNI --------------*/ ++ dpni@0 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@1 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@2 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@3 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@4 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@5 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@6 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@7 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpni@8 { ++ options = "DPNI_OPT_HAS_KEY_MASKING"; ++ num_queues = <0x10>; ++ num_tcs = <0x1>; ++ }; ++ dpmac@1 { ++ }; ++ dpmac@2 { ++ }; ++ ++ dpmac@3 { ++ }; ++ ++ dpmac@4 { ++ }; ++ ++ dpmac@5 { ++ }; ++ ++ dpmac@6 { ++ }; ++ dpmac@7 { ++ }; ++ dpmac@8 { ++ }; ++ dpmac@9 { ++ }; ++ dpmac@10 { ++ }; ++ ++ dpmac@17 { ++ }; ++ ++ dpmac@18 { ++ }; ++ ++ /* ------------ DPBP --------------*/ ++ dpbp@0 { ++ }; ++ ++ dpbp@1 { ++ }; ++ ++ ++ /* ------------ DPIO --------------*/ ++ dpio@0 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@1 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@2 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@3 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@4 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@5 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@6 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@7 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@8 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@9 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@10 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@11 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@12 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@13 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@14 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ dpio@15 { ++ channel_mode = "DPIO_LOCAL_CHANNEL"; ++ num_priorities = <0x8>; ++ }; ++ ++ /* ------------ DPMCP --------------*/ ++ dpmcp@1 { ++ }; ++ ++ dpmcp@2 { ++ }; ++ ++ dpmcp@3 { ++ }; ++ ++ dpmcp@4 { ++ }; ++ ++ dpmcp@5 { ++ }; ++ ++ dpmcp@6 { ++ }; ++ ++ dpmcp@7 { ++ }; ++ ++ dpmcp@8 { ++ }; ++ ++ dpmcp@9 { ++ }; ++ ++ dpmcp@10 { ++ }; ++ ++ dpmcp@11 { ++ }; ++ ++ dpmcp@12 { ++ }; ++ ++ dpmcp@13 { ++ }; ++ ++ dpmcp@14 { ++ }; ++ ++ dpmcp@15 { ++ }; ++ ++ dpmcp@16 { ++ }; ++ ++ dpmcp@17 { ++ }; ++ ++ dpmcp@18 { ++ }; ++ ++ dpmcp@19 { ++ }; ++ ++ dpmcp@20 { ++ }; ++ ++ dpmcp@21 { ++ }; ++ ++ dpmcp@22 { ++ }; ++ ++ dpmcp@23 { ++ }; ++ ++ dpmcp@24 { ++ }; ++ ++ dpmcp@25 { ++ }; ++ ++ dpmcp@26 { ++ }; ++ ++ dpmcp@27 { ++ }; ++ ++ dpmcp@28 { ++ }; ++ ++ dpmcp@29 { ++ }; ++ ++ dpmcp@30 { ++ }; ++ ++ dpmcp@31 { ++ }; ++ ++ dpmcp@32 { ++ }; ++ ++ dpmcp@33 { ++ }; ++ ++ dpmcp@34 { ++ }; ++ ++ dpmcp@35 { ++ }; ++ ++ /* ------------ DPCON --------------*/ ++ dpcon@0 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@1 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@2 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@3 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@4 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@5 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@6 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@7 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@8 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@9 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@10 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@11 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@12 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@13 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@14 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@15 { ++ num_priorities = <0x2>; ++ }; ++ dpcon@16 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@17 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@18 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@19 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@20 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@21 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@22 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@23 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@24 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@25 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@26 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@27 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@28 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@29 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@30 { ++ num_priorities = <0x2>; ++ }; ++ ++ dpcon@31 { ++ num_priorities = <0x2>; ++ }; ++ ++ /* ------------ DPSECI --------------*/ ++ dpseci@0 { ++ priorities = <0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01>; ++ options = "DPSECI_OPT_HAS_CG"; ++ }; ++ ++ /* ------------ DPRTC --------------*/ ++ dprtc@0 { ++ compatible="fsl,dprtc"; ++ }; ++ }; ++ ++ /***************************************************************** ++ * Connections ++ *****************************************************************/ ++ connections { ++ connection@1 { ++ endpoint1 = "dpni@0"; ++ endpoint2 = "dpmac@17"; ++ }; ++/* connection@2 { ++ endpoint1 = "dpni@1"; ++ endpoint2 = "dpmac@3"; ++ }; ++ connection@3 { ++ endpoint1 = "dpni@2"; ++ endpoint2 = "dpmac@4"; ++ }; ++ connection@4 { ++ endpoint1 = "dpni@3"; ++ endpoint2 = "dpmac@5"; ++ }; ++ connection@5 { ++ endpoint1 = "dpni@4"; ++ endpoint2 = "dpmac@6"; ++ };*/ ++ }; ++}; ++ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils_git.bbappend b/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils_git.bbappend new file mode 100644 index 00000000..09c04156 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/mc-utils/mc-utils_git.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_append_lx2160acex7 := "${THISDIR}/${PN}-lx2160acex7:" + +SRC_URI_append_lx2160acex7 = "\ + file://0001-lx2160acex7-add-8x10G-dual-40G-and-dual-100G-DPL-DPC.patch \ +" + +MC_FLAVOUR_lx2160acex7 = "CEX7" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0001-lx2160acex7-misc-RCW-files.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0001-lx2160acex7-misc-RCW-files.patch new file mode 100644 index 00000000..ae873990 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0001-lx2160acex7-misc-RCW-files.patch @@ -0,0 +1,640 @@ +From ef5ab1b5a7262a6ef9caf334b0c772b0ebf00fdf Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 14:43:06 +0300 +Subject: [PATCH] lx2160acex7 misc RCW files + +This patch adds support for lx2160a rcw project. +In general RCW has lots of redundent files and can be restructured +better as in this patch. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/Makefile | 2 + + lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig | 61 +++++++++++++++++++ + .../rcw_1900_600_2600_17_4_2.rcw | 4 ++ + .../rcw_1900_600_2600_17_4_2_sd.rcw | 4 ++ + .../rcw_2000_700_2400_13_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_2400_20_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_2400_8_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_2600_8_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_2900_17_4_2_sd.rcw | 4 ++ + .../rcw_2000_700_2900_8_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_3200_17_4_2_sd.rcw | 4 ++ + .../rcw_2000_700_3200_20_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_3200_8_5_0_sd.rcw | 4 ++ + .../rcw_2000_700_3200_8_5_2_sd.rcw | 4 ++ + .../rcw_2000_700_3200_8_5_2_xspi.rcw | 4 ++ + .../rcw_2400_700_3200_8_5_2_sd.rcw | 4 ++ + .../rcw_2500_700_3200_8_5_2_sd.rcw | 4 ++ + .../rcw_2600_700_3200_8_5_2_sd.rcw | 4 ++ + .../XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw | 4 ++ + lx2160acex7/configs/lx2160a_13_5_2.rcwi | 3 + + lx2160acex7/configs/lx2160a_17_4_2.rcwi | 7 +++ + .../configs/lx2160a_1900_600_2600.rcwi | 12 ++++ + .../configs/lx2160a_2000_700_2400.rcwi | 12 ++++ + .../configs/lx2160a_2000_700_2600.rcwi | 12 ++++ + .../configs/lx2160a_2000_700_2900.rcwi | 12 ++++ + .../configs/lx2160a_2000_700_3200.rcwi | 12 ++++ + lx2160acex7/configs/lx2160a_20_5_2.rcwi | 7 +++ + .../configs/lx2160a_2400_700_3200.rcwi | 12 ++++ + .../configs/lx2160a_2500_700_3200.rcwi | 12 ++++ + .../configs/lx2160a_2600_700_3200.rcwi | 12 ++++ + lx2160acex7/configs/lx2160a_8_5_0.rcwi | 7 +++ + lx2160acex7/configs/lx2160a_8_5_2.rcwi | 7 +++ + lx2160acex7/configs/lx2160a_defaults.rcwi | 19 ++++++ + lx2160acex7/configs/lx2160a_sdboot.rcwi | 20 ++++++ + lx2160acex7/configs/lx2160a_test.rcwi | 20 ++++++ + lx2160acex7/configs/lx2160a_xspiboot.rcwi | 17 ++++++ + 36 files changed, 334 insertions(+) + create mode 100644 lx2160acex7/Makefile + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw + create mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw + create mode 100644 lx2160acex7/configs/lx2160a_13_5_2.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_17_4_2.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_1900_600_2600.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2000_700_2400.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2000_700_2600.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2000_700_2900.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2000_700_3200.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_20_5_2.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2400_700_3200.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2500_700_3200.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_2600_700_3200.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_8_5_0.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_8_5_2.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_defaults.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_sdboot.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_test.rcwi + create mode 100644 lx2160acex7/configs/lx2160a_xspiboot.rcwi + +diff --git a/lx2160acex7/Makefile b/lx2160acex7/Makefile +new file mode 100644 +index 0000000..d7e9447 +--- /dev/null ++++ b/lx2160acex7/Makefile +@@ -0,0 +1,2 @@ ++include ../Makefile.inc ++ +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig +new file mode 100644 +index 0000000..cdb6446 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig +@@ -0,0 +1,61 @@ ++/* ++ * SerDes Protocol 1 - 19 ++ * SerDes Protocol 2 - 5 ++ * SerDes Protocol 3 - 2 ++ * ++ * Frequencies: ++ * Core -- 1900 MHz ++ * Platform -- 600 MHz ++ * DDR -- 2600 MT/s ++ */ ++ ++#include <../lx2160asi/lx2160a.rcwi> ++ ++SYS_PLL_RAT=12 ++MEM_PLL_CFG=3 ++MEM_PLL_RAT=26 ++MEM2_PLL_CFG=3 ++MEM2_PLL_RAT=26 ++CGA_PLL1_RAT=19 ++CGA_PLL2_RAT=19 ++CGB_PLL1_RAT=19 ++CGB_PLL2_RAT=9 ++C5_PLL_SEL=0 ++C6_PLL_SEL=0 ++C7_PLL_SEL=0 ++C8_PLL_SEL=0 ++HWA_CGA_M1_CLK_SEL=1 ++HWA_CGB_M1_CLK_SEL=7 ++BOOT_LOC=26 ++SYSCLK_FREQ=600 ++IIC2_PMUX=6 ++IIC3_PMUX=2 ++IIC4_PMUX=2 ++USB3_CLK_FSEL=39 ++SRDS_PRTCL_S1=19 ++SRDS_PRTCL_S2=5 ++SRDS_PRTCL_S3=2 ++SRDS_PLL_REF_CLK_SEL_S1=2 ++SRDS_DIV_PEX_S1=1 ++SRDS_DIV_PEX_S2=3 ++SRDS_DIV_PEX_S3=1 ++ ++/* Errata to write on scratch reg for validation */ ++#include <../lx2160asi/scratchrw1.rcw> ++ ++/* Copy SPL Uboot to Ocram */ ++.pbi ++blockcopy 0x08,0x00100000,0x1800a000,0x00020000 ++.end ++ ++/* Boot Location Pointer */ ++#include <../lx2160asi/bootlocptr_sd.rcw> ++ ++/* Errata for SATA controller */ ++#include <../lx2160asi/a010554.rcw> ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_24.rcw> ++ ++/* common PBI commands */ ++#include <../lx2160asi/common.rcw> +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw +new file mode 100644 +index 0000000..13ab0b9 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw +new file mode 100644 +index 0000000..14fae8c +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw +new file mode 100644 +index 0000000..2dae5a2 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw +new file mode 100644 +index 0000000..5335072 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw +new file mode 100644 +index 0000000..e2a5bd3 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw +new file mode 100644 +index 0000000..a330bfe +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw +new file mode 100644 +index 0000000..8535dbd +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw +new file mode 100644 +index 0000000..698be01 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw +new file mode 100644 +index 0000000..780d8c3 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw +new file mode 100644 +index 0000000..eb9d240 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw +new file mode 100644 +index 0000000..ceb53a3 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw +new file mode 100644 +index 0000000..a220e98 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw +new file mode 100644 +index 0000000..1eabd7d +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw +new file mode 100644 +index 0000000..2ac59b1 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw +new file mode 100644 +index 0000000..e7c08df +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw +new file mode 100644 +index 0000000..1e7a8f7 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw +new file mode 100644 +index 0000000..86f12f8 +--- /dev/null ++++ b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw +@@ -0,0 +1,4 @@ ++#include ++#include ++#include ++#include +diff --git a/lx2160acex7/configs/lx2160a_13_5_2.rcwi b/lx2160acex7/configs/lx2160a_13_5_2.rcwi +new file mode 100644 +index 0000000..76f44bc +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_13_5_2.rcwi +@@ -0,0 +1,3 @@ ++SRDS_PRTCL_S1=13 ++SRDS_PRTCL_S2=5 ++SRDS_PRTCL_S3=2 +diff --git a/lx2160acex7/configs/lx2160a_17_4_2.rcwi b/lx2160acex7/configs/lx2160a_17_4_2.rcwi +new file mode 100644 +index 0000000..358972d +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_17_4_2.rcwi +@@ -0,0 +1,7 @@ ++SRDS_PRTCL_S1=17 ++SRDS_PRTCL_S2=4 ++SRDS_PRTCL_S3=2 ++ ++/*SRDS_INTRA_REF_CLK_S1 = 1*/ /* PLLF used for PLLS */ ++/*SRDS_PLL_REF_CLK_SEL_S1=2*/ ++ +diff --git a/lx2160acex7/configs/lx2160a_1900_600_2600.rcwi b/lx2160acex7/configs/lx2160a_1900_600_2600.rcwi +new file mode 100644 +index 0000000..8b61021 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_1900_600_2600.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=19 ++CGA_PLL2_RAT=19 ++CGB_PLL1_RAT=19 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=12 ++ ++MEM_PLL_RAT=26 ++MEM2_PLL_RAT=26 ++ ++/* Modify FlexSPI Clock Divisor value */ ++/* #include <../lx2160asi/flexspi_divisor_24.rcw>*/ +diff --git a/lx2160acex7/configs/lx2160a_2000_700_2400.rcwi b/lx2160acex7/configs/lx2160a_2000_700_2400.rcwi +new file mode 100644 +index 0000000..6b0b150 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2000_700_2400.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=24 ++MEM2_PLL_RAT=24 ++ ++/* Modify FlexSPI Clock Divisor value */ ++/* #include <../lx2160asi/flexspi_divisor_28.rcw>*/ +diff --git a/lx2160acex7/configs/lx2160a_2000_700_2600.rcwi b/lx2160acex7/configs/lx2160a_2000_700_2600.rcwi +new file mode 100644 +index 0000000..21dce67 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2000_700_2600.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=26 ++MEM2_PLL_RAT=26 ++ ++/* Modify FlexSPI Clock Divisor value */ ++/* #include <../lx2160asi/flexspi_divisor_28.rcw>*/ +diff --git a/lx2160acex7/configs/lx2160a_2000_700_2900.rcwi b/lx2160acex7/configs/lx2160a_2000_700_2900.rcwi +new file mode 100644 +index 0000000..e6a8e30 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2000_700_2900.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=29 ++MEM2_PLL_RAT=29 ++ ++/* Modify FlexSPI Clock Divisor value */ ++/* #include <../lx2160asi/flexspi_divisor_28.rcw>*/ +diff --git a/lx2160acex7/configs/lx2160a_2000_700_3200.rcwi b/lx2160acex7/configs/lx2160a_2000_700_3200.rcwi +new file mode 100644 +index 0000000..27ee377 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2000_700_3200.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_28.rcw> +diff --git a/lx2160acex7/configs/lx2160a_20_5_2.rcwi b/lx2160acex7/configs/lx2160a_20_5_2.rcwi +new file mode 100644 +index 0000000..c2c7bea +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_20_5_2.rcwi +@@ -0,0 +1,7 @@ ++SRDS_PRTCL_S1=20 ++SRDS_PRTCL_S2=5 ++SRDS_PRTCL_S3=2 ++ ++SRDS_INTRA_REF_CLK_S1 = 1 /* PLLF used for PLLS */ ++SRDS_PLL_REF_CLK_SEL_S1=2 ++SRDS_PLL_PD_PLL1=1 +diff --git a/lx2160acex7/configs/lx2160a_2400_700_3200.rcwi b/lx2160acex7/configs/lx2160a_2400_700_3200.rcwi +new file mode 100644 +index 0000000..fc0fd6c +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2400_700_3200.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=24 ++CGA_PLL2_RAT=24 ++CGB_PLL1_RAT=24 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_28.rcw> +diff --git a/lx2160acex7/configs/lx2160a_2500_700_3200.rcwi b/lx2160acex7/configs/lx2160a_2500_700_3200.rcwi +new file mode 100644 +index 0000000..62d9069 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2500_700_3200.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=25 ++CGA_PLL2_RAT=25 ++CGB_PLL1_RAT=25 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_28.rcw> +diff --git a/lx2160acex7/configs/lx2160a_2600_700_3200.rcwi b/lx2160acex7/configs/lx2160a_2600_700_3200.rcwi +new file mode 100644 +index 0000000..e244917 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_2600_700_3200.rcwi +@@ -0,0 +1,12 @@ ++CGA_PLL1_RAT=26 ++CGA_PLL2_RAT=26 ++CGB_PLL1_RAT=26 ++CGB_PLL2_RAT=9 ++ ++SYS_PLL_RAT=14 ++ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_28.rcw> +diff --git a/lx2160acex7/configs/lx2160a_8_5_0.rcwi b/lx2160acex7/configs/lx2160a_8_5_0.rcwi +new file mode 100644 +index 0000000..62ff153 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_8_5_0.rcwi +@@ -0,0 +1,7 @@ ++SRDS_PRTCL_S1=8 /* should be 8 */ ++SRDS_PRTCL_S2=5 ++SRDS_PRTCL_S3=0 ++ ++SRDS_INTRA_REF_CLK_S1 = 1 /* PLLF used for PLLS */ ++SRDS_PLL_REF_CLK_SEL_S1=2 ++SRDS_PLL_PD_PLL1=1 +diff --git a/lx2160acex7/configs/lx2160a_8_5_2.rcwi b/lx2160acex7/configs/lx2160a_8_5_2.rcwi +new file mode 100644 +index 0000000..d7d707a +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_8_5_2.rcwi +@@ -0,0 +1,7 @@ ++SRDS_PRTCL_S1=8 /* should be 8 */ ++SRDS_PRTCL_S2=5 ++SRDS_PRTCL_S3=2 ++ ++SRDS_INTRA_REF_CLK_S1 = 1 /* PLLF used for PLLS */ ++SRDS_PLL_REF_CLK_SEL_S1=2 ++SRDS_PLL_PD_PLL1=1 +diff --git a/lx2160acex7/configs/lx2160a_defaults.rcwi b/lx2160acex7/configs/lx2160a_defaults.rcwi +new file mode 100644 +index 0000000..6fd65ec +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_defaults.rcwi +@@ -0,0 +1,19 @@ ++#include <../lx2160asi/lx2160a.rcwi> ++MEM_PLL_CFG=3 ++MEM2_PLL_CFG=3 ++C5_PLL_SEL=0 ++C6_PLL_SEL=0 ++C7_PLL_SEL=0 ++C8_PLL_SEL=0 ++HWA_CGA_M1_CLK_SEL=1 ++HWA_CGB_M1_CLK_SEL=7 ++BOOT_LOC=26 ++SYSCLK_FREQ=600 ++IIC2_PMUX=6 ++IIC3_PMUX=0 ++IIC4_PMUX=2 ++USB3_CLK_FSEL=39 ++SRDS_DIV_PEX_S1=1 ++SRDS_DIV_PEX_S2=3 ++SRDS_DIV_PEX_S3=1 ++ +diff --git a/lx2160acex7/configs/lx2160a_sdboot.rcwi b/lx2160acex7/configs/lx2160a_sdboot.rcwi +new file mode 100644 +index 0000000..d537ea5 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_sdboot.rcwi +@@ -0,0 +1,20 @@ ++/* Errata to write on scratch reg for validation */ ++#include <../lx2160asi/scratchrw1.rcw> ++ ++/* Copy SPL Uboot to Ocram */ ++.pbi ++blockcopy 0x08,0x00100000,0x1800a000,0x00020000 ++.end ++ ++/* Boot Location Pointer */ ++#include <../lx2160asi/bootlocptr_sd.rcw> ++ ++/* Errata for SATA controller */ ++#include <../lx2160asi/a010554.rcw> ++ ++/* Errata for PCIe controller */ ++#include <../lx2160asi/a011270.rcw> ++ ++/* common PBI commands */ ++#include <../lx2160asi/common.rcw> ++ +diff --git a/lx2160acex7/configs/lx2160a_test.rcwi b/lx2160acex7/configs/lx2160a_test.rcwi +new file mode 100644 +index 0000000..a223be1 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_test.rcwi +@@ -0,0 +1,20 @@ ++CGA_PLL1_RAT=20 ++CGA_PLL2_RAT=20 ++CGB_PLL1_RAT=20 ++CGB_PLL2_RAT=8 ++ ++SYS_PLL_RAT=12 ++ ++MEM_PLL_RAT=32 ++MEM2_PLL_RAT=32 ++ ++/* Modify FlexSPI Clock Divisor value */ ++/* #include <../lx2160asi/flexspi_divisor_24.rcw> */ ++ ++SRDS_PLL_PD_PLL1=1 ++SRDS_PLL_PD_PLL2=1 ++SRDS_PLL_PD_PLL3=1 ++SRDS_PLL_PD_PLL4=1 ++SRDS_PLL_PD_PLL5=1 ++SRDS_PLL_PD_PLL6=1 ++ +diff --git a/lx2160acex7/configs/lx2160a_xspiboot.rcwi b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +new file mode 100644 +index 0000000..eecc314 +--- /dev/null ++++ b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +@@ -0,0 +1,17 @@ ++/* Errata to write on scratch reg for validation */ ++#include <../lx2160asi/scratchrw1.rcw> ++ ++/* Boot Location Pointer */ ++#include <../lx2160asi/bootlocptr_nor.rcw> ++ ++/* Errata for SATA controller */ ++#include <../lx2160asi/a010554.rcw> ++ ++/* Errata for PCIe controller */ ++#include <../lx2160asi/a011270.rcw> ++ ++/* common PBI commands */ ++#include <../lx2160asi/common.rcw> ++ ++/* Modify FlexSPI Clock Divisor value */ ++#include <../lx2160asi/flexspi_divisor_24.rcw> +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0002-Set-io-pads-as-GPIO.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0002-Set-io-pads-as-GPIO.patch new file mode 100644 index 00000000..b156a018 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0002-Set-io-pads-as-GPIO.patch @@ -0,0 +1,38 @@ +From b184697cff85d8f98e765014309b97444ff1c5b7 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Wed, 30 Oct 2019 11:43:37 +0200 +Subject: [PATCH 2/2] Set io pads as GPIO + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/configs/lx2160a_defaults.rcwi | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/lx2160acex7/configs/lx2160a_defaults.rcwi b/lx2160acex7/configs/lx2160a_defaults.rcwi +index 6fd65ec..dbc843f 100644 +--- a/lx2160acex7/configs/lx2160a_defaults.rcwi ++++ b/lx2160acex7/configs/lx2160a_defaults.rcwi +@@ -9,11 +9,16 @@ HWA_CGA_M1_CLK_SEL=1 + HWA_CGB_M1_CLK_SEL=7 + BOOT_LOC=26 + SYSCLK_FREQ=600 +-IIC2_PMUX=6 ++IIC2_PMUX=1 + IIC3_PMUX=0 + IIC4_PMUX=2 + USB3_CLK_FSEL=39 + SRDS_DIV_PEX_S1=1 + SRDS_DIV_PEX_S2=3 + SRDS_DIV_PEX_S3=1 +- ++SDHC1_DIR_PMUX=1 ++IRQ03_00_PMUX=1 ++IRQ07_04_PMUX=1 ++IRQ11_08_PMUX=1 ++EVT20_PMUX=1 ++EVT43_PMUX=1 +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0003-S2-enable-gen3-xspi-increase-divisor-to-28.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0003-S2-enable-gen3-xspi-increase-divisor-to-28.patch new file mode 100644 index 00000000..18d37a65 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0003-S2-enable-gen3-xspi-increase-divisor-to-28.patch @@ -0,0 +1,42 @@ +From 3b0e8b6e242549c2ed992d7556d7966a77b6da86 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 5 Nov 2019 10:35:32 +0200 +Subject: [PATCH] S2 - enable gen3, xspi increase divisor to 28 + +Serdes group 2 enable PCIe gen 3 +XSPI increase divisor to 28 - this fixes UEFI SPI flash detection. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/configs/lx2160a_defaults.rcwi | 2 +- + lx2160acex7/configs/lx2160a_xspiboot.rcwi | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lx2160acex7/configs/lx2160a_defaults.rcwi b/lx2160acex7/configs/lx2160a_defaults.rcwi +index dbc843f..3ea7683 100644 +--- a/lx2160acex7/configs/lx2160a_defaults.rcwi ++++ b/lx2160acex7/configs/lx2160a_defaults.rcwi +@@ -14,7 +14,7 @@ IIC3_PMUX=0 + IIC4_PMUX=2 + USB3_CLK_FSEL=39 + SRDS_DIV_PEX_S1=1 +-SRDS_DIV_PEX_S2=3 ++SRDS_DIV_PEX_S2=1 + SRDS_DIV_PEX_S3=1 + SDHC1_DIR_PMUX=1 + IRQ03_00_PMUX=1 +diff --git a/lx2160acex7/configs/lx2160a_xspiboot.rcwi b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +index eecc314..28310c9 100644 +--- a/lx2160acex7/configs/lx2160a_xspiboot.rcwi ++++ b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +@@ -14,4 +14,4 @@ + #include <../lx2160asi/common.rcw> + + /* Modify FlexSPI Clock Divisor value */ +-#include <../lx2160asi/flexspi_divisor_24.rcw> ++#include <../lx2160asi/flexspi_divisor_28.rcw> +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0004-refactor-a009531-a008851-and-a011270.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0004-refactor-a009531-a008851-and-a011270.patch new file mode 100644 index 00000000..0bcc5d33 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0004-refactor-a009531-a008851-and-a011270.patch @@ -0,0 +1,181 @@ +From c7c3ed47f1de7c20de348a6ca5fe0d5a18912f4b Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 12:16:13 +0200 +Subject: [PATCH 4/4] refactor a009531, a008851 and a011270 + +1. Add 'load conditional', 'jump condidional' and 'jump' to PBI +instructions. +2. Use SVR register to execute the PCIe workarounds on the relevant rev +of the device. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160asi/a009531_a008851.rcw | 96 +++++++++++++++++++++++++++++++++++ + lx2160asi/a011270.rcw | 6 +++ + rcw.py | 28 ++++++++++ + 3 files changed, 130 insertions(+) + create mode 100644 lx2160asi/a009531_a008851.rcw + +diff --git a/lx2160asi/a009531_a008851.rcw b/lx2160asi/a009531_a008851.rcw +new file mode 100644 +index 0000000..0eb7051 +--- /dev/null ++++ b/lx2160asi/a009531_a008851.rcw +@@ -0,0 +1,96 @@ ++/* ++ * Work-around for erratum A-009531 ++ * ++ * Description: ++ * As defined in section 2.2.6.4, Relaxed Ordering and ID-Based Ordering (IDO) ++ * Attributes of the PCI Express Base Specification Rev 3.1, “A Completer ++ * is permitted to set IDO only if the IDO Completion Enable bit in the Device ++ * Control 2 Register is set. It is not required to copy the value of IDO from ++ * the Request into the Completion(s) for that Request". ++ * ++ * However, the PCI Express controller as the completer sets the IDO bit in the ++ * completion packet header, in response to non-posted requests (memory read) with ++ * IDO bit set in the packet header, even if the IDO Completion Enable bit in the ++ * Device Control 2 Register is not set. ++ * ++ * Impact: ++ * The PCI Express controller as the completer sends completion packets with IDO ++ * bit set in packet header even when the IDO Completion Enable bit is cleared in ++ * the controller’s Device Control 2 Register. ++ * Applicable for SNP PCIe controller ++ */ ++ ++/* ++ * Work-around for erratum A-008851 ++ * ++ * Invalid transmitter/receiver preset values are used in Gen3 equalization ++ * phases during link training for RC mode ++ * This errata is valid only for PCI gen3. ++ * Workaround: ++ * write 0x00000001 to MISC_CONTROL_1_OFF ++ * write 0x4747 to Lane Equalization Control register for each lane ++ * Applicable for SNP PCIe controller ++ */ ++ ++.pbi ++/* Load condition SVR register mask major ID */ ++loadc 0x01e000a4,0x000000f0 ++ ++/* If it is rev 2, skip the following jump command */ ++jumpc 0x00000014,0x00000020 ++ ++/* Jump all the below instructions */ ++jump 0x190 /* All instruction below including the jump are 0x190 bytes */ ++ ++loadc 0x01ea1080,0x70000000 ++jumpc 0x00000034,0x00000000 ++write 0x03400098,0x00000000 ++write 0x034008bc,0x00000001 ++write 0x03400154,0x47474747 ++write 0x03400158,0x47474747 ++write 0x034008bc,0x00000000 ++ ++loadc 0x01ea1080,0x00700000 ++jumpc 0x00000034,0x00000000 ++write 0x03500098,0x00000000 ++write 0x035008bc,0x00000001 ++write 0x03500154,0x47474747 ++write 0x03500158,0x47474747 ++write 0x035008bc,0x00000000 ++ ++loadc 0x01eb1080,0x70000000 ++jumpc 0x00000044,0x00000000 ++write 0x03600098,0x00000000 ++write 0x036008bc,0x00000001 ++write 0x03600164,0x47474747 ++write 0x03600168,0x47474747 ++write 0x0360016c,0x47474747 ++write 0x03600170,0x47474747 ++write 0x036008bc,0x00000000 ++ ++loadc 0x01eb1080,0x00700000 ++jumpc 0x00000034,0x00000000 ++write 0x03700098,0x00000000 ++write 0x037008bc,0x00000001 ++write 0x03700154,0x47474747 ++write 0x03700158,0x47474747 ++write 0x037008bc,0x00000000 ++ ++loadc 0x01ec1080,0x70000000 ++jumpc 0x00000044,0x00000000 ++write 0x03800098,0x00000000 ++write 0x038008bc,0x00000001 ++write 0x03800164,0x47474747 ++write 0x03800168,0x47474747 ++write 0x0380016c,0x47474747 ++write 0x03800170,0x47474747 ++write 0x038008bc,0x00000000 ++ ++loadc 0x01ec1080,0x00700000 ++jumpc 0x00000034,0x00000000 ++write 0x03900098,0x00000000 ++write 0x039008bc,0x00000001 ++write 0x03900154,0x47474747 ++write 0x03900158,0x47474747 ++write 0x039008bc,0x00000000 ++.end +diff --git a/lx2160asi/a011270.rcw b/lx2160asi/a011270.rcw +index 0dc774d..5bd5558 100644 +--- a/lx2160asi/a011270.rcw ++++ b/lx2160asi/a011270.rcw +@@ -4,6 +4,12 @@ + */ + + .pbi ++/* Load condition SVR register mask major ID */ ++loadc 0x01e000a4,0x000000f0 ++/* If it is rev 1, skip the following jump command */ ++jumpc 0x00000014,0x00000010 ++/* Skip the following instructions by jumping to the end */ ++jump 0x38 + write 0x03400688,0x00000001 + write 0x03500688,0x00000001 + write 0x03600688,0x00000001 +diff --git a/rcw.py b/rcw.py +index 863f755..c2d06f6 100755 +--- a/rcw.py ++++ b/rcw.py +@@ -328,6 +328,34 @@ def build_pbi(lines): + v2 = struct.pack(endianess + 'L', p2) + subsection += v1 + subsection += v2 ++ elif op == 'loadc': ++ if p1 == None or p2 == None: ++ print('Error: "loadc" instruction requires two parameters') ++ return '' ++ v1 = struct.pack(endianess + 'L', 0x80140000) ++ v2 = struct.pack(endianess + 'L', p1) ++ v3 = struct.pack(endianess + 'L', p2) ++ subsection += v1 ++ subsection += v2 ++ subsection += v3 ++ elif op == 'jumpc': ++ if p1 == None or p2 == None: ++ print('Error: "jumpc" instruction requires two parameters') ++ return '' ++ v1 = struct.pack(endianess + 'L', 0x80850000) ++ v2 = struct.pack(endianess + 'L', p1) ++ v3 = struct.pack(endianess + 'L', p2) ++ subsection += v1 ++ subsection += v2 ++ subsection += v3 ++ elif op == 'jump': ++ if p1 == None: ++ print('Error: "jump" instruction requires a parameter') ++ return '' ++ v1 = struct.pack(endianess + 'L', 0x80840000) ++ v2 = struct.pack(endianess + 'L', p1) ++ subsection += v1 ++ subsection += v2 + elif op == 'awrite': + if p1 == None or p2 == None: + print('Error: "awrite" instruction requires two parameters') +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0006-lx2160a-add-SVR-check-for-a050234-to-apply-only-on-r.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0006-lx2160a-add-SVR-check-for-a050234-to-apply-only-on-r.patch new file mode 100644 index 00000000..68091513 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0006-lx2160a-add-SVR-check-for-a050234-to-apply-only-on-r.patch @@ -0,0 +1,32 @@ +From 2ebdb6a46e6db66cc0b09c51260a90ea8abc4713 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 12:35:04 +0200 +Subject: [PATCH 6/8] lx2160a: add SVR check for a050234 to apply only on rev1 + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160asi/a050234.rcw | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/lx2160asi/a050234.rcw b/lx2160asi/a050234.rcw +index 72a40e4..2130709 100644 +--- a/lx2160asi/a050234.rcw ++++ b/lx2160asi/a050234.rcw +@@ -4,6 +4,12 @@ + */ + + .pbi ++/* Load condition SVR register mask major ID */ ++loadc 0x01e000a4,0x000000f0 ++/* If it is rev 1, skip the following jump command */ ++jumpc 0x00000014,0x00000010 ++/* Skip the following instructions by jumping to the end */ ++jump 0xc8 + write 0x1ea1200,0x20081004 + write 0x1ea1240,0x20081004 + write 0x1ea1280,0x20081004 +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0007-lx2160acex7-pcie-workarounds-and-fan-full-speed.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0007-lx2160acex7-pcie-workarounds-and-fan-full-speed.patch new file mode 100644 index 00000000..9074b5cc --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0007-lx2160acex7-pcie-workarounds-and-fan-full-speed.patch @@ -0,0 +1,95 @@ +From 6d634d64528e5ba510c369a2ae19c337ae7d692e Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 12:36:20 +0200 +Subject: [PATCH 7/8] lx2160acex7 - pcie workarounds and fan full speed + +1. Moves calling the workarounds to the _defaults.rcwi +2. Toggle fan-full-speed GPIO. The fan controller starts throttling when +a driver exists (i.e. kernel); in order to avoid overheating until then +enable full speed. +3. Run a050234.rcw on rev1 - fixes some issues observed when using Mellanox +ConnectX-5 NICs +4. Run a009531 and a00885 on rev2. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/configs/lx2160a_defaults.rcwi | 21 +++++++++++++++++---- + lx2160acex7/configs/lx2160a_sdboot.rcwi | 6 ------ + lx2160acex7/configs/lx2160a_xspiboot.rcwi | 6 ------ + 3 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/lx2160acex7/configs/lx2160a_defaults.rcwi b/lx2160acex7/configs/lx2160a_defaults.rcwi +index 3ea7683..7af1f5b 100644 +--- a/lx2160acex7/configs/lx2160a_defaults.rcwi ++++ b/lx2160acex7/configs/lx2160a_defaults.rcwi +@@ -1,10 +1,6 @@ + #include <../lx2160asi/lx2160a.rcwi> + MEM_PLL_CFG=3 + MEM2_PLL_CFG=3 +-C5_PLL_SEL=0 +-C6_PLL_SEL=0 +-C7_PLL_SEL=0 +-C8_PLL_SEL=0 + HWA_CGA_M1_CLK_SEL=1 + HWA_CGB_M1_CLK_SEL=7 + BOOT_LOC=26 +@@ -22,3 +18,20 @@ IRQ07_04_PMUX=1 + IRQ11_08_PMUX=1 + EVT20_PMUX=1 + EVT43_PMUX=1 ++ ++/* Drive the fan full speed pin */ ++.pbi ++write 0x2320000,0x20000000 ++.end ++ ++/* Errata for SATA controller */ ++#include <../lx2160asi/a010554.rcw> ++ ++/* Errata for rev 1 PCIe controller */ ++#include <../lx2160asi/a011270.rcw> ++ ++/* Errata a050234 - fix elastic buffer threshold in rev 1 */ ++#include <../lx2160asi/a050234.rcw> ++ ++/* LX2 rev 2 PCIe Errata A-009531 and A-008851*/ ++#include <../lx2160asi/a009531_a008851.rcw> +diff --git a/lx2160acex7/configs/lx2160a_sdboot.rcwi b/lx2160acex7/configs/lx2160a_sdboot.rcwi +index d537ea5..9086ffc 100644 +--- a/lx2160acex7/configs/lx2160a_sdboot.rcwi ++++ b/lx2160acex7/configs/lx2160a_sdboot.rcwi +@@ -9,12 +9,6 @@ blockcopy 0x08,0x00100000,0x1800a000,0x00020000 + /* Boot Location Pointer */ + #include <../lx2160asi/bootlocptr_sd.rcw> + +-/* Errata for SATA controller */ +-#include <../lx2160asi/a010554.rcw> +- +-/* Errata for PCIe controller */ +-#include <../lx2160asi/a011270.rcw> +- + /* common PBI commands */ + #include <../lx2160asi/common.rcw> + +diff --git a/lx2160acex7/configs/lx2160a_xspiboot.rcwi b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +index 28310c9..fa092c9 100644 +--- a/lx2160acex7/configs/lx2160a_xspiboot.rcwi ++++ b/lx2160acex7/configs/lx2160a_xspiboot.rcwi +@@ -4,12 +4,6 @@ + /* Boot Location Pointer */ + #include <../lx2160asi/bootlocptr_nor.rcw> + +-/* Errata for SATA controller */ +-#include <../lx2160asi/a010554.rcw> +- +-/* Errata for PCIe controller */ +-#include <../lx2160asi/a011270.rcw> +- + /* common PBI commands */ + #include <../lx2160asi/common.rcw> + +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0008-lx2160a-add-generic-bootloc-section.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0008-lx2160a-add-generic-bootloc-section.patch new file mode 100644 index 00000000..820f7b21 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0008-lx2160a-add-generic-bootloc-section.patch @@ -0,0 +1,113 @@ +From f7f0ad5e568862f7dc70fbd0f790845ee576734d Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 24 Mar 2020 03:42:14 +0200 +Subject: [PATCH 8/8] lx2160a: add generic bootloc section + +The generic bootloc section does conditional blockcopy from SD/eMMC and +SPI with some predefined addresses. +Later on if ATF is used; those addresses are modified with ATF's +create_pbl.c + +With this method a single boot image is unified for all the 3 different +boot methods. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/configs/lx2160a_defaults.rcwi | 12 +++++ + lx2160asi/bootlocptr.rcw | 62 +++++++++++++++++++++++ + 2 files changed, 74 insertions(+) + create mode 100644 lx2160asi/bootlocptr.rcw + +diff --git a/lx2160acex7/configs/lx2160a_defaults.rcwi b/lx2160acex7/configs/lx2160a_defaults.rcwi +index 7af1f5b..7997d49 100644 +--- a/lx2160acex7/configs/lx2160a_defaults.rcwi ++++ b/lx2160acex7/configs/lx2160a_defaults.rcwi +@@ -35,3 +35,15 @@ write 0x2320000,0x20000000 + + /* LX2 rev 2 PCIe Errata A-009531 and A-008851*/ + #include <../lx2160asi/a009531_a008851.rcw> ++ ++/* Unified boot location copy */ ++#include <../lx2160asi/bootlocptr.rcw> ++ ++/* Errata to write on scratch reg for validation */ ++#include <../lx2160asi/scratchrw1.rcw> ++ ++/* common PBI commands */ ++#include <../lx2160asi/common.rcw> ++ ++/* Modify FlexSPI Clock Divisor value - for now keep it fixed value but using loadc/jumpc/jump it can be calculated on the fly */ ++#include <../lx2160asi/flexspi_divisor_28.rcw> +diff --git a/lx2160asi/bootlocptr.rcw b/lx2160asi/bootlocptr.rcw +new file mode 100644 +index 0000000..645182f +--- /dev/null ++++ b/lx2160asi/bootlocptr.rcw +@@ -0,0 +1,62 @@ ++/* ++ * Generic code for auto booting. ++ * For each section blockcopy followed by write to bootlocl then bootloch must ++ * be followed in each section since when using ATF with create_pbl script in ++ * auto mode; it counts on the sequence of to be in that order. ++ */ ++ ++/* Boot from SD - copy SPL Uboot to Ocram */ ++.pbi ++/* Load condition PORSR1 and mask RCW_SRC */ ++loadc 0x01e00000,0x07800000 ++ ++/* If it is 0x8 << 23 then skip the following jump command */ ++jumpc 0x00000014,0x04000000 ++ ++/* Jump all the below instructions */ ++jump 0x28 /* All instruction below including the jump are 40 bytes */ ++ ++/* blockcopy must be followed by two writes to bootlocl and bootloch */ ++blockcopy 0x08,0x00100000,0x1800a000,0x00020000 ++write 0x01e00400,0x1800a000 ++write 0x01e00404,0x00000000 ++.end ++ ++/* Boot from eMMC - copy SPL Uboot to Ocram */ ++.pbi ++/* Load condition PORSR1 and mask RCW_SRC */ ++loadc 0x01e00000,0x07800000 ++ ++/* If it is 0x9 << 23 then skip the following jump command */ ++jumpc 0x00000014,0x04800000 ++ ++/* Jump all the below instructions */ ++jump 0x28 /* All instruction below including the jump are 40 bytes */ ++ ++/* blockcopy must be followed by two writes to bootlocl and bootloch */ ++blockcopy 0x09,0x00100000,0x1800a000,0x00020000 ++write 0x01e00400,0x1800a000 ++write 0x01e00404,0x00000000 ++.end ++ ++/* XSPI boot Location Pointer */ ++/* ++ * Set the boot location pointer to the NOR flash boot area. ++ */ ++ ++.pbi ++/* Load condition PORSR1 and mask RCW_SRC */ ++loadc 0x01e00000,0x07800000 ++ ++/* If it is 0xf << 23 then skip the following jump command */ ++jumpc 0x00000014,0x07800000 ++ ++/* Jump all the below instructions */ ++jump 0x28 /* All instruction below including the jump are 0x190 bytes */ ++ ++/* blockcopy must be followed by two writes to bootlocl and bootloch */ ++blockcopy 0x0f,0x00100000,0x1800a000,0x00020000 ++write 0x01e00400,0x20100000 ++write 0x01e00404,0x00000000 ++.end ++ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0009-lx2160acex7-remove-all-predefined-RCW-files.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0009-lx2160acex7-remove-all-predefined-RCW-files.patch new file mode 100644 index 00000000..20d77e6f --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw-lx2160acex7/0009-lx2160acex7-remove-all-predefined-RCW-files.patch @@ -0,0 +1,301 @@ +From 151f650f383fc5ddd9c405cf96bc189c2eaf13bd Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 24 Mar 2020 03:51:28 +0200 +Subject: [PATCH 9/9] lx2160acex7: remove all predefined RCW files + +Remove all predefined RCW files and use on-the-fly created RCW from +external script. +For instance when using lx2160a_build repo; the runme.sh file creates +lx2160acex7/RCW/template.rcw file the gets compiled. +The creation is done using a simple bash script - + +cd $ROOTDIR/build/rcw/lx2160acex7 +mkdir -p RCW +echo "#include " > RCW/template.rcw +echo "#include " >> RCW/template.rcw +echo "#include " >> RCW/template.rcw +make clean +make -j${PARALLEL} + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig | 61 ------------------- + .../rcw_1900_600_2600_17_4_2.rcw | 4 -- + .../rcw_1900_600_2600_17_4_2_sd.rcw | 4 -- + .../rcw_2000_700_2400_13_5_2_sd.rcw | 4 -- + .../rcw_2000_700_2400_20_5_2_sd.rcw | 4 -- + .../rcw_2000_700_2400_8_5_2_sd.rcw | 4 -- + .../rcw_2000_700_2600_8_5_2_sd.rcw | 4 -- + .../rcw_2000_700_2900_17_4_2_sd.rcw | 4 -- + .../rcw_2000_700_2900_8_5_2_sd.rcw | 4 -- + .../rcw_2000_700_3200_17_4_2_sd.rcw | 4 -- + .../rcw_2000_700_3200_20_5_2_sd.rcw | 4 -- + .../rcw_2000_700_3200_8_5_0_sd.rcw | 4 -- + .../rcw_2000_700_3200_8_5_2_sd.rcw | 4 -- + .../rcw_2000_700_3200_8_5_2_xspi.rcw | 4 -- + .../rcw_2400_700_3200_8_5_2_sd.rcw | 4 -- + .../rcw_2500_700_3200_8_5_2_sd.rcw | 4 -- + .../rcw_2600_700_3200_8_5_2_sd.rcw | 4 -- + .../XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw | 4 -- + 18 files changed, 129 deletions(-) + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw + delete mode 100644 lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw + +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig +deleted file mode 100644 +index cdb6446..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw.orig ++++ /dev/null +@@ -1,61 +0,0 @@ +-/* +- * SerDes Protocol 1 - 19 +- * SerDes Protocol 2 - 5 +- * SerDes Protocol 3 - 2 +- * +- * Frequencies: +- * Core -- 1900 MHz +- * Platform -- 600 MHz +- * DDR -- 2600 MT/s +- */ +- +-#include <../lx2160asi/lx2160a.rcwi> +- +-SYS_PLL_RAT=12 +-MEM_PLL_CFG=3 +-MEM_PLL_RAT=26 +-MEM2_PLL_CFG=3 +-MEM2_PLL_RAT=26 +-CGA_PLL1_RAT=19 +-CGA_PLL2_RAT=19 +-CGB_PLL1_RAT=19 +-CGB_PLL2_RAT=9 +-C5_PLL_SEL=0 +-C6_PLL_SEL=0 +-C7_PLL_SEL=0 +-C8_PLL_SEL=0 +-HWA_CGA_M1_CLK_SEL=1 +-HWA_CGB_M1_CLK_SEL=7 +-BOOT_LOC=26 +-SYSCLK_FREQ=600 +-IIC2_PMUX=6 +-IIC3_PMUX=2 +-IIC4_PMUX=2 +-USB3_CLK_FSEL=39 +-SRDS_PRTCL_S1=19 +-SRDS_PRTCL_S2=5 +-SRDS_PRTCL_S3=2 +-SRDS_PLL_REF_CLK_SEL_S1=2 +-SRDS_DIV_PEX_S1=1 +-SRDS_DIV_PEX_S2=3 +-SRDS_DIV_PEX_S3=1 +- +-/* Errata to write on scratch reg for validation */ +-#include <../lx2160asi/scratchrw1.rcw> +- +-/* Copy SPL Uboot to Ocram */ +-.pbi +-blockcopy 0x08,0x00100000,0x1800a000,0x00020000 +-.end +- +-/* Boot Location Pointer */ +-#include <../lx2160asi/bootlocptr_sd.rcw> +- +-/* Errata for SATA controller */ +-#include <../lx2160asi/a010554.rcw> +- +-/* Modify FlexSPI Clock Divisor value */ +-#include <../lx2160asi/flexspi_divisor_24.rcw> +- +-/* common PBI commands */ +-#include <../lx2160asi/common.rcw> +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw +deleted file mode 100644 +index 13ab0b9..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw +deleted file mode 100644 +index 14fae8c..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_1900_600_2600_17_4_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw +deleted file mode 100644 +index 2dae5a2..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_13_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw +deleted file mode 100644 +index 5335072..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_20_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw +deleted file mode 100644 +index e2a5bd3..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2400_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw +deleted file mode 100644 +index a330bfe..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2600_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw +deleted file mode 100644 +index 8535dbd..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_17_4_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw +deleted file mode 100644 +index 698be01..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw +deleted file mode 100644 +index 780d8c3..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_17_4_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw +deleted file mode 100644 +index eb9d240..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_20_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw +deleted file mode 100644 +index ceb53a3..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_0_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw +deleted file mode 100644 +index a220e98..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw +deleted file mode 100644 +index 1eabd7d..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_3200_8_5_2_xspi.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw +deleted file mode 100644 +index 2ac59b1..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2400_700_3200_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw +deleted file mode 100644 +index e7c08df..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2500_700_3200_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw +deleted file mode 100644 +index 1e7a8f7..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_2600_700_3200_8_5_2_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +diff --git a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw b/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw +deleted file mode 100644 +index 86f12f8..0000000 +--- a/lx2160acex7/XGGFF_PP_HHHH_RR_19_5_2/rcw_test_sd.rcw ++++ /dev/null +@@ -1,4 +0,0 @@ +-#include +-#include +-#include +-#include +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw_git.bbappend b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw_git.bbappend new file mode 100644 index 00000000..4384c042 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/rcw/rcw_git.bbappend @@ -0,0 +1,29 @@ +FILESEXTRAPATHS_append_lx2160acex7 := "${THISDIR}/${PN}-lx2160acex7:" + +SRC_URI_append_lx2160acex7 = "\ + file://0001-lx2160acex7-misc-RCW-files.patch \ + file://0002-Set-io-pads-as-GPIO.patch \ + file://0003-S2-enable-gen3-xspi-increase-divisor-to-28.patch \ + file://0004-refactor-a009531-a008851-and-a011270.patch \ + file://0006-lx2160a-add-SVR-check-for-a050234-to-apply-only-on-r.patch \ + file://0007-lx2160acex7-pcie-workarounds-and-fan-full-speed.patch \ + file://0008-lx2160a-add-generic-bootloc-section.patch \ + file://0009-lx2160acex7-remove-all-predefined-RCW-files.patch \ +" + +do_configure_prepend_lx2160acex7 () { + for BT in ${BOARD_TARGETS} + do + mkdir -p ${S}/${BOARD_TARGETS}/${SERDES} + cat <${S}/${BOARD_TARGETS}/README +The RCW directories for lx2160acex7 are created based on existing SERDES +configuration. Currently created automatically - later maybe by building +cross product of serdes & ddr speeds in a final commit. +EOF + cat <${S}/${BOARD_TARGETS}/${SERDES}/${SPEED}.rcw +#include +#include +#include +EOF + done +} diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-common_2018.07.inc b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-common_2018.07.inc index 59b17cce..d5adb0e5 100644 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-common_2018.07.inc +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-common_2018.07.inc @@ -4,10 +4,10 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" PV = "v2018.07+git${SRCPV}" -SRCREV = "ca185fc7406207da613c728935f534a4054674f1" +SRCREV = "17fe0ef3aff3abc3908c854bfab1c283ed84d9c0" SRCBRANCH = "boundary-v2018.07" SRC_URI = "git://github.com/boundarydevices/u-boot-imx6.git;branch=${SRCBRANCH}" S = "${WORKDIR}/git" - +B = "${WORKDIR}/build" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/aarch64/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/aarch64/fw_env.config deleted file mode 100644 index eccfb0f4..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/aarch64/fw_env.config +++ /dev/null @@ -1 +0,0 @@ -/dev/mmcblk0boot0 0x1fe000 0x2000 0x1000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/arm/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/arm/fw_env.config deleted file mode 100644 index 571e829c..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils/arm/fw_env.config +++ /dev/null @@ -1 +0,0 @@ -/dev/mtd1 0x00000 0x2000 0x1000 2 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils_2018.07.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils_2018.07.bb deleted file mode 100644 index 6b8fb867..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary-fw-utils_2018.07.bb +++ /dev/null @@ -1,46 +0,0 @@ -require u-boot-boundary-common_${PV}.inc - -SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" -DEPENDS += "mtd-utils bison-native" - -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/${PN}/arm:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/${PN}/arm:" -FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/${PN}/aarch64:" - -SRC_URI += " \ - file://fw_env.config \ -" - -INSANE_SKIP_${PN} = "already-stripped" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' -EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' - -inherit uboot-config - -do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake envtools -} - -do_install () { - install -Dm 0755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -Dm 0755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv - install -Dm 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config -} - -do_install_class-cross () { - install -d ${D}${bindir_cross} - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv -} - -SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" -uboot_fw_utils_cross() { - sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} -} - -RPROVIDES_${PN} += "u-boot-fw-utils" - -BBCLASSEXTEND = "cross" - -COMPATIBLE_MACHINE = "(imx)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config new file mode 100644 index 00000000..b69cec9e --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config @@ -0,0 +1 @@ +/dev/mmcblk0boot0 0x3fe000 0x2000 0x1000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config new file mode 100644 index 00000000..571e829c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config @@ -0,0 +1 @@ +/dev/mtd1 0x00000 0x2000 0x1000 2 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb index d9417f54..7463eeea 100644 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-boundary_2018.07.bb @@ -1,17 +1,23 @@ require recipes-bsp/u-boot/u-boot.inc require recipes-bsp/u-boot/u-boot-boundary-common_${PV}.inc +FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/${PN}/arm:" +FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/${PN}/arm:" +FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/${PN}/aarch64:" + DEPENDS += "bison-native" +SRC_URI += "file://fw_env.config" + PROVIDES += "u-boot" BOOT_TOOLS = "imx-boot-tools" -do_deploy_append_mx8mq () { +do_deploy_append_mx8 () { 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} + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} } -COMPATIBLE_MACHINE = "(nitrogen6x-lite|nitrogen6x|nitrogen6sx|nitrogen7|nitrogen8m)" +COMPATIBLE_MACHINE = "(nitrogen6x-lite|nitrogen6x|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm|nitrogen8mn)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb deleted file mode 100644 index 02651e09..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb +++ /dev/null @@ -1,17 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc - -DESCRIPTION = "u-boot which includes support for CompuLab boards." -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://configs/cm_fx6_defconfig;md5=549452418e9e099e5fe19ef1ac65e892" - -PROVIDES += "u-boot" - -SRCBRANCH = "utilite/master" -SRCREV = "6803a75f3d40bee3b53f56e7b49c70465819b7ca" -SRC_URI = "git://github.com/utilite-computer/u-boot.git;branch=${SRCBRANCH}" -SRC_URI[md5sum] = "fd8234c5b3a460430689848c1f16acef" - -S = "${WORKDIR}/git" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "cm-fx6" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt deleted file mode 100644 index 06b42bed..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi/ccimx6ul/bootscript.txt +++ /dev/null @@ -1,7 +0,0 @@ -# -# U-Boot bootscript for NAND images created by Yocto. -# - -setenv fdt_file imx6ul-ccimx6ulsbcexpress.dtb -setenv zimage zImage-ccimx6ulsbcexpress.bin -dboot linux nand ${mtdbootpart} diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi_2017.03.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi_2017.03.bb deleted file mode 100644 index aa775727..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-digi_2017.03.bb +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2018 Digi International -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Bootloader for Digi platforms" -SECTION = "bootloaders" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" - -require recipes-bsp/u-boot/u-boot.inc - -DEPENDS = "u-boot-mkimage-native" - -PROVIDES += "u-boot" - -SRCBRANCH = "v2017.03/maint" -SRCREV = "8d60f536d2063ac6a0676bdf34c4c8c8807371c5" - -SRC_URI = "\ - git://github.com/digi-embedded/u-boot.git;protocol=git;nobranch=1 \ - file://bootscript.txt \ -" - -LOCALVERSION ?= "-${SRCBRANCH}" - -S = "${WORKDIR}/git" - -inherit dtc-145 fsl-u-boot-localversion - -UBOOT_ENV = "boot" -UBOOT_ENV_SUFFIX = "scr" - -do_compile_append () { - uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ - -n "boot script" -d ${WORKDIR}/bootscript.txt \ - ${WORKDIR}/${UBOOT_ENV_BINARY} -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-karo_git.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-karo_git.bb deleted file mode 100644 index 2e1f7bb1..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-karo_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc - -DESCRIPTION = "u-boot for Ka-Ro electronics TX Computer-On-Modules." -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95" - -PROVIDES = "u-boot" - -PV = "v2015.10-rc2+git${SRCPV}" - -SRCREV = "047997571bf2c5bd43058c8e9da8052e09d9111f" -SRCBRANCH = "karo-tx6" -SRC_URI = "git://git.karo-electronics.de/karo-tx-uboot.git;branch=${SRCBRANCH}" - -S = "${WORKDIR}/git" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_MACHINE = "(tx6[qsu]-.*)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron/fw_env.config new file mode 100644 index 00000000..a296d5d3 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron/fw_env.config @@ -0,0 +1 @@ +/dev/mmcblk0 0xf0000 0x10000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron_2020.01.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron_2020.01.bb new file mode 100644 index 00000000..ce33f8ef --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-kontron_2020.01.bb @@ -0,0 +1,37 @@ +# Copyright (C) 2012-2019 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +inherit fsl-u-boot-localversion + +require recipes-bsp/u-boot/u-boot.inc + +SUMMARY = "U-Boot for Kontron based boards" +DEPENDS += "bison-native bc-native dtc-native lzop-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" + +SRC_URI = "git://git.kontron-electronics.de/linux/u-boot.git;protocol=https;branch=${SRCBRANCH} \ + file://fw_env.config \ +" +SRCREV = "3d58441adf3e633279db6c96acb33a7aef4fd6f9" +SRCBRANCH = "v2020.01-ktn" +LOCALVERSION = "-ktn" + +PROVIDES += "u-boot" + +PV .= "+git${SRCPV}" + +S = "${WORKDIR}/git" +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 = "(imx6ul-kontron)" + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0001-armv8-add-lx2160acex7-build-inclusion.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0001-armv8-add-lx2160acex7-build-inclusion.patch new file mode 100644 index 00000000..7837bfff --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0001-armv8-add-lx2160acex7-build-inclusion.patch @@ -0,0 +1,75 @@ +From c24c3ec7d9591cf359ac12f656bd59a5440532f4 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:26:45 +0300 +Subject: [PATCH 01/17] armv8: add lx2160acex7 build inclusion + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm/Kconfig | 13 +++++++++++++ + arch/arm/cpu/armv8/Kconfig | 2 +- + arch/arm/dts/Makefile | 3 ++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 5d33526ae9..8615e1673f 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1189,6 +1189,18 @@ config TARGET_LX2160ARDB + is a high-performance development platform that supports the + QorIQ LX2160A/LX2120A/LX2080A Layerscape Architecture processor. + ++config TARGET_LX2160ACEX7 ++ bool "Support lx2160acex7" ++ select ARCH_LX2160A ++ select ARCH_MISC_INIT ++ select ARM64 ++ select ARMV8_MULTIENTRY ++ select BOARD_LATE_INIT ++ help ++ Support for SolidRun LX2160A based com express type 7 module and ++ platform. The lx2160acex7 high-performance platform that supports the ++ QorIQ LX2160A/LX2120A/LX2080A Layerscape Architecture processor. ++ + config TARGET_LX2160AQDS + bool "Support lx2160aqds" + select ARCH_LX2160A +@@ -1796,6 +1808,7 @@ source "board/freescale/ls1012aqds/Kconfig" + source "board/freescale/ls1012ardb/Kconfig" + source "board/freescale/ls1012afrdm/Kconfig" + source "board/freescale/lx2160a/Kconfig" ++source "board/solidrun/lx2160a/Kconfig" + source "board/freescale/mx35pdk/Kconfig" + source "board/freescale/s32v234evb/Kconfig" + source "board/grinn/chiliboard/Kconfig" +diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig +index 92a2b58ed4..9df6ebdc1b 100644 +--- a/arch/arm/cpu/armv8/Kconfig ++++ b/arch/arm/cpu/armv8/Kconfig +@@ -109,7 +109,7 @@ config PSCI_RESET + !TARGET_LS1046ARDB && !TARGET_LS1046AQDS && \ + !TARGET_LS1046AFRWY && \ + !TARGET_LS2081ARDB && !TARGET_LX2160ARDB && \ +- !TARGET_LX2160AQDS && \ ++ !TARGET_LX2160AQDS && !TARGET_LX2160ACEX7 && \ + !ARCH_UNIPHIER && !TARGET_S32V234EVB + help + Most armv8 systems have PSCI support enabled in EL3, either through +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 8d7d5bee45..6d8d7fa09e 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -348,7 +348,8 @@ dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \ + fsl-ls1028a-qds-duart.dtb \ + fsl-ls1028a-qds-lpuart.dtb \ + fsl-lx2160a-rdb.dtb \ +- fsl-lx2160a-qds.dtb ++ fsl-lx2160a-qds.dtb \ ++ fsl-lx2160a-cex7.dtb + dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds-duart.dtb \ + fsl-ls1043a-qds-lpuart.dtb \ + fsl-ls1043a-rdb.dtb \ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0002-armv8-lx2160acex-misc-hacks-to-get-the-sources-built.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0002-armv8-lx2160acex-misc-hacks-to-get-the-sources-built.patch new file mode 100644 index 00000000..5b8d07f1 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0002-armv8-lx2160acex-misc-hacks-to-get-the-sources-built.patch @@ -0,0 +1,44 @@ +From a8a182b435e96a22b01d722a8df3061c1a1b7da6 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:27:46 +0300 +Subject: [PATCH 02/17] armv8: lx2160acex: misc hacks to get the sources built + +those hacks will be sorted out nicer in the future and this patch will +not be needed anymore + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 - + drivers/mmc/fsl_esdhc.c | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +index 42ca990994..efdc31da5d 100644 +--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig ++++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +@@ -218,7 +218,6 @@ config ARCH_LX2160A + select SYS_FSL_DDR_LE + select SYS_FSL_DDR_VER_50 + select SYS_FSL_EC1 +- select SYS_FSL_EC2 + select SYS_FSL_ERRATUM_A050106 + select SYS_FSL_HAS_RGMII + select SYS_FSL_HAS_SEC +diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c +index f8e6ceba06..f4a7698cfd 100644 +--- a/drivers/mmc/fsl_esdhc.c ++++ b/drivers/mmc/fsl_esdhc.c +@@ -1020,7 +1020,7 @@ static int fsl_esdhc_probe(struct udevice *dev) + priv->non_removable = 0; + } + +- priv->wp_enable = 1; ++ priv->wp_enable = 0; + + if (IS_ENABLED(CONFIG_CLK)) { + /* Assigned clock already set clock */ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0003-armv8-lx2160acex7-defconfig-and-main-platform-includ.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0003-armv8-lx2160acex7-defconfig-and-main-platform-includ.patch new file mode 100644 index 00000000..cb968445 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0003-armv8-lx2160acex7-defconfig-and-main-platform-includ.patch @@ -0,0 +1,192 @@ +From caaf386e5511e8b9708abf9ee52b668019a5b094 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:29:31 +0300 +Subject: [PATCH 03/17] armv8: lx2160acex7: defconfig and main platform include + +This patch add lx2160acex7 main defconfig and main include file. +Notice that the defconfig doesn't support the secured boot mode where a +follow up patch will cover this. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + configs/lx2160acex7_tfa_defconfig | 73 ++++++++++++++++++++++++++ + include/configs/lx2160acex7.h | 85 +++++++++++++++++++++++++++++++ + 2 files changed, 158 insertions(+) + create mode 100644 configs/lx2160acex7_tfa_defconfig + create mode 100644 include/configs/lx2160acex7.h + +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +new file mode 100644 +index 0000000000..d59de7d054 +--- /dev/null ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -0,0 +1,73 @@ ++CONFIG_ARM=y ++CONFIG_TARGET_LX2160ACEX7=y ++CONFIG_SYS_TEXT_BASE=0x82000000 ++CONFIG_SYS_MALLOC_F_LEN=0x6000 ++CONFIG_EMC2301=y ++CONFIG_TFABOOT=y ++CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y ++CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y ++CONFIG_AHCI=y ++CONFIG_NR_DRAM_BANKS=3 ++CONFIG_FIT_VERBOSE=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_OF_BOARD_FIXUP=y ++CONFIG_OF_STDOUT_VIA_ALIAS=y ++CONFIG_BOOTDELAY=10 ++CONFIG_USE_BOOTARGS=y ++CONFIG_BOOTARGS="console=ttyAMA0,115200 root=/dev/ram0 earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf" ++# CONFIG_USE_BOOTCOMMAND is not set ++CONFIG_CMD_GREPENV=y ++CONFIG_CMD_EEPROM=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_SF=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_CACHE=y ++CONFIG_MP=y ++CONFIG_OF_CONTROL=y ++CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7" ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_ENV_IS_IN_SPI_FLASH=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_DM=y ++CONFIG_SATA_CEVA=y ++CONFIG_FSL_CAAM=y ++CONFIG_DM_MMC=y ++CONFIG_FSL_ESDHC=y ++CONFIG_DM_SPI_FLASH=y ++CONFIG_SPI_FLASH=y ++CONFIG_SPI_FLASH_SPANSION=y ++CONFIG_SPI_FLASH_STMICRO=y ++CONFIG_SPI_FLASH_MICRON=y ++CONFIG_SPI_FLASH_WINBOND=y ++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set ++CONFIG_PHYLIB=y ++CONFIG_NETDEVICES=y ++CONFIG_PHY_GIGE=y ++CONFIG_CMD_NET=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_MII=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_EXT2=y ++CONFIG_PCI=y ++CONFIG_DM_PCI=y ++CONFIG_DM_PCI_COMPAT=y ++CONFIG_PCIE_LAYERSCAPE_GEN4=y ++CONFIG_PHY_ATHEROS=y ++CONFIG_E1000=y ++CONFIG_DM_SCSI=y ++CONFIG_DM_SERIAL=y ++CONFIG_SERIAL_PROBE_ALL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_NXP_FSPI=y ++# CONFIG_SYS_NXP_FSPI_AHB=y ++CONFIG_USB=y ++CONFIG_DM_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +diff --git a/include/configs/lx2160acex7.h b/include/configs/lx2160acex7.h +new file mode 100644 +index 0000000000..478cd8242f +--- /dev/null ++++ b/include/configs/lx2160acex7.h +@@ -0,0 +1,85 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * Copyright 2019 SolidRun ltd. ++ */ ++ ++#ifndef __LX2_CEX7_H ++#define __LX2_CEX7_H ++ ++#include "lx2160a_common.h" ++ ++/*#define CONFIG_SYS_FSL_ESDHC_USE_PIO*/ ++/* VID */ ++ ++#define I2C_MUX_CH_VOL_MONITOR 0x2 ++/* Voltage monitor on channel 2*/ ++#define I2C_VOL_MONITOR_ADDR 0x5c ++#define I2C_VOL_MONITOR_BUS_V_OFFSET 0x2 ++#define I2C_VOL_MONITOR_BUS_V_OVF 0x1 ++#define I2C_VOL_MONITOR_BUS_V_SHIFT 3 ++#define CONFIG_VID_FLS_ENV "lx2160acex7_vdd_mv" ++#define CONFIG_VID ++ ++/* The lowest and highest voltage allowed*/ ++#define VDD_MV_MIN 700 ++#define VDD_MV_MAX 855 ++ ++/* PM Bus commands code for LTC3882*/ ++#define PMBUS_CMD_PAGE 0x0 ++#define PMBUS_CMD_READ_VOUT 0x8B ++#define PMBUS_CMD_PAGE_PLUS_WRITE 0x05 ++#define PMBUS_CMD_VOUT_COMMAND 0x21 ++#define PWM_CHANNEL0 0x0 ++ ++#define CONFIG_VOL_MONITOR_LTC3882_SET ++#define CONFIG_VOL_MONITOR_LTC3882_READ ++ ++/* RTC */ ++#define CONFIG_SYS_RTC_BUS_NUM 4 ++ ++/* MAC/PHY configuration */ ++#if defined(CONFIG_FSL_MC_ENET) ++#define CONFIG_MII ++#define CONFIG_ETHPRIME "DPMAC17@rgmii-id" ++ ++#define RGMII_PHY_ADDR1 0x01 ++ ++#endif ++ ++/* EMC2301 */ ++#define I2C_MUX_CH_EMC2301 0x01 ++#define I2C_EMC2301_ADDR 0x2f ++#define I2C_EMC2301_CMD 0x40 ++#define I2C_EMC2301_PWM 0x80 ++ ++/* EEPROM */ ++#undef CONFIG_ID_EEPROM /* Fixme */ ++#define CONFIG_SYS_I2C_EEPROM_NXID ++#define CONFIG_SYS_EEPROM_BUS_NUM 0 ++#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 ++#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 ++#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 ++#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 ++ ++/* Initial environment variables */ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ EXTRA_ENV_SETTINGS \ ++ "lx2160acex7_vdd_mv=800\0" \ ++ "BOARD=lx2160acex7\0" \ ++ "xspi_bootcmd=echo Trying load from flexspi..;" \ ++ "sf probe 0:0 && sf read $load_addr " \ ++ "$kernel_start $kernel_size ; env exists secureboot &&" \ ++ "sf read $kernelheader_addr_r $kernelheader_start " \ ++ "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\ ++ " bootm $load_addr#$BOARD\0" \ ++ "sd_bootcmd=echo Trying load from sd card..;" \ ++ "mmcinfo; mmc read $load_addr " \ ++ "$kernel_addr_sd $kernel_size_sd ;" \ ++ "env exists secureboot && mmc read $kernelheader_addr_r "\ ++ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ ++ " && esbc_validate ${kernelheader_addr_r};" \ ++ "bootm $load_addr#$BOARD\0" ++ ++#include ++ ++#endif /* __LX2_CEX7_H */ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0004-armv8-lx2160acex7-common-files-for-platform-support.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0004-armv8-lx2160acex7-common-files-for-platform-support.patch new file mode 100644 index 00000000..cbb2f08c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0004-armv8-lx2160acex7-common-files-for-platform-support.patch @@ -0,0 +1,1720 @@ +From 568555bb88a6d2880e21f736cfda0b89e89957fa Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:31:47 +0300 +Subject: [PATCH 04/17] armv8: lx2160acex7: common files for platform support + +The patch copies and modifies NXP's common platform resources that adds +support to the following - +1. Secureboot +2. Analog devices DC-DC controller +3. EMC2301 PWM fan controller based on NXP's EMC2305 driver + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + board/solidrun/common/Makefile | 24 + + board/solidrun/common/cmd_esbc_validate.c | 85 ++ + board/solidrun/common/emc2301.c | 31 + + board/solidrun/common/emc2301.h | 17 + + board/solidrun/common/fsl_chain_of_trust.c | 164 ++++ + board/solidrun/common/fsl_validate.c | 962 +++++++++++++++++++++ + board/solidrun/common/vid.c | 330 +++++++ + board/solidrun/common/vid.h | 23 + + 8 files changed, 1636 insertions(+) + create mode 100644 board/solidrun/common/Makefile + create mode 100644 board/solidrun/common/cmd_esbc_validate.c + create mode 100644 board/solidrun/common/emc2301.c + create mode 100644 board/solidrun/common/emc2301.h + create mode 100644 board/solidrun/common/fsl_chain_of_trust.c + create mode 100644 board/solidrun/common/fsl_validate.c + create mode 100644 board/solidrun/common/vid.c + create mode 100644 board/solidrun/common/vid.h + +diff --git a/board/solidrun/common/Makefile b/board/solidrun/common/Makefile +new file mode 100644 +index 0000000000..454a18e2f9 +--- /dev/null ++++ b/board/solidrun/common/Makefile +@@ -0,0 +1,24 @@ ++# SPDX-License-Identifier: GPL-2.0+ ++# ++# (C) Copyright 2006 ++# Wolfgang Denk, DENX Software Engineering, wd@denx.de. ++ ++MINIMAL= ++ ++ifdef CONFIG_SPL_BUILD ++ifdef CONFIG_SPL_INIT_MINIMAL ++MINIMAL=y ++endif ++endif ++ ++ifdef MINIMAL ++# necessary to create built-in.o ++obj- := __dummy__.o ++else ++obj-$(CONFIG_VID) += vid.o ++obj-$(CONFIG_EMC2301) += emc2301.o ++ifdef CONFIG_SECURE_BOOT ++obj-$(CONFIG_CMD_ESBC_VALIDATE) += fsl_validate.o cmd_esbc_validate.o ++endif ++obj-$(CONFIG_CHAIN_OF_TRUST) += fsl_chain_of_trust.o ++endif +diff --git a/board/solidrun/common/cmd_esbc_validate.c b/board/solidrun/common/cmd_esbc_validate.c +new file mode 100644 +index 0000000000..b06235f291 +--- /dev/null ++++ b/board/solidrun/common/cmd_esbc_validate.c +@@ -0,0 +1,85 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2015 Freescale Semiconductor, Inc. ++ */ ++ ++#include ++#include ++#include ++ ++int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc, ++ char * const argv[]) ++{ ++ if (fsl_check_boot_mode_secure() == 0) { ++ printf("Boot Mode is Non-Secure. Not entering spin loop.\n"); ++ return 0; ++ } ++ ++ printf("Core is entering spin loop.\n"); ++loop: ++ goto loop; ++ ++ return 0; ++} ++ ++#ifndef CONFIG_SPL_BUILD ++static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc, ++ char * const argv[]) ++{ ++ char *hash_str = NULL; ++ uintptr_t haddr; ++ int ret; ++ uintptr_t img_addr = 0; ++ char buf[20]; ++ ++ if (argc < 2) ++ return cmd_usage(cmdtp); ++ else if (argc > 2) ++ /* Second arg - Optional - Hash Str*/ ++ hash_str = argv[2]; ++ ++ /* First argument - header address -32/64bit */ ++ haddr = (uintptr_t)simple_strtoul(argv[1], NULL, 16); ++ ++ /* With esbc_validate command, Image address must be ++ * part of header. So, the function is called ++ * by passing this argument as 0. ++ */ ++ ret = fsl_secboot_validate(haddr, hash_str, &img_addr); ++ ++ /* Need to set "img_addr" even if validation failure. ++ * Required when SB_EN in RCW set and non-fatal error ++ * to continue U-Boot ++ */ ++ sprintf(buf, "%lx", img_addr); ++ env_set("img_addr", buf); ++ ++ if (ret) ++ return 1; ++ ++ printf("esbc_validate command successful\n"); ++ return 0; ++} ++ ++/***************************************************/ ++static char esbc_validate_help_text[] = ++ "esbc_validate hdr_addr - Validates signature using\n" ++ " RSA verification\n" ++ " $hdr_addr Address of header of the image\n" ++ " to be validated.\n" ++ " $hash_val -Optional\n" ++ " It provides Hash of public/srk key to be\n" ++ " used to verify signature.\n"; ++ ++U_BOOT_CMD( ++ esbc_validate, 3, 0, do_esbc_validate, ++ "Validates signature on a given image using RSA verification", ++ esbc_validate_help_text ++); ++ ++U_BOOT_CMD( ++ esbc_halt, 1, 0, do_esbc_halt, ++ "Put the core in spin loop (Secure Boot Only)", ++ "" ++); ++#endif +diff --git a/board/solidrun/common/emc2301.c b/board/solidrun/common/emc2301.c +new file mode 100644 +index 0000000000..a4780dbfcc +--- /dev/null ++++ b/board/solidrun/common/emc2301.c +@@ -0,0 +1,31 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2019 SolidRun ltd. Based on code from NXP LX2160A RDB ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "emc2301.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++void set_fan_speed(u8 data) ++{ ++ if (i2c_write(I2C_EMC2301_ADDR, I2C_EMC2301_FAN, 1, &data, 1) != 0) { ++ puts("Error: failed to change fan speed\n"); ++ } ++} ++ ++void emc2301_init(void) ++{ ++ u8 data; ++ ++ data = I2C_EMC2301_CMD; ++ if (i2c_write(I2C_EMC2301_ADDR, I2C_EMC2301_CONF, 1, &data, 1) != 0) ++ puts("Error: failed to configure EMC2301\n"); ++} +diff --git a/board/solidrun/common/emc2301.h b/board/solidrun/common/emc2301.h +new file mode 100644 +index 0000000000..a5ceb73b7c +--- /dev/null ++++ b/board/solidrun/common/emc2301.h +@@ -0,0 +1,17 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * Copyright 2019 SolidRun ltd. ++ * ++ * SPDX-License-Identifier: GPL-2.0+ ++ */ ++ ++#ifndef __EMC2301_H_ ++#define __EMC2301_H_ ++ ++#define I2C_EMC2301_CONF 0x20 ++#define I2C_EMC2301_FAN 0x30 ++ ++void emc2301_init(void); ++void set_fan_speed(u8 data); ++ ++#endif /* __EMC2305_H_ */ +diff --git a/board/solidrun/common/fsl_chain_of_trust.c b/board/solidrun/common/fsl_chain_of_trust.c +new file mode 100644 +index 0000000000..dddfd26a13 +--- /dev/null ++++ b/board/solidrun/common/fsl_chain_of_trust.c +@@ -0,0 +1,164 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2015 Freescale Semiconductor, Inc. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FRAMEWORK) ++#include ++#endif ++ ++#ifdef CONFIG_ADDR_MAP ++#include ++#endif ++ ++#ifdef CONFIG_FSL_CORENET ++#include ++#endif ++ ++#ifdef CONFIG_ARCH_LS1021A ++#include ++#endif ++ ++#if defined(CONFIG_MPC85xx) ++#define CONFIG_DCFG_ADDR CONFIG_SYS_MPC85xx_GUTS_ADDR ++#else ++#define CONFIG_DCFG_ADDR CONFIG_SYS_FSL_GUTS_ADDR ++#endif ++ ++#ifdef CONFIG_SYS_FSL_CCSR_GUR_LE ++#define gur_in32(a) in_le32(a) ++#else ++#define gur_in32(a) in_be32(a) ++#endif ++ ++/* Check the Boot Mode. If Secure, return 1 else return 0 */ ++int fsl_check_boot_mode_secure(void) ++{ ++ uint32_t val; ++ struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR); ++ struct ccsr_gur __iomem *gur = (void *)(CONFIG_DCFG_ADDR); ++ ++ val = sfp_in32(&sfp_regs->ospr) & ITS_MASK; ++ if (val == ITS_MASK) ++ return 1; ++ ++#if defined(CONFIG_FSL_CORENET) || !defined(CONFIG_MPC85xx) ++ /* For PBL based platforms check the SB_EN bit in RCWSR */ ++ val = gur_in32(&gur->rcwsr[RCW_SB_EN_REG_INDEX - 1]) & RCW_SB_EN_MASK; ++ if (val == RCW_SB_EN_MASK) ++ return 1; ++#endif ++ ++#if defined(CONFIG_MPC85xx) && !defined(CONFIG_FSL_CORENET) ++ /* For Non-PBL Platforms, check the Device Status register 2*/ ++ val = gur_in32(&gur->pordevsr2) & MPC85xx_PORDEVSR2_SBC_MASK; ++ if (val != MPC85xx_PORDEVSR2_SBC_MASK) ++ return 1; ++ ++#endif ++ return 0; ++} ++ ++#ifndef CONFIG_SPL_BUILD ++int fsl_setenv_chain_of_trust(void) ++{ ++ /* Check Boot Mode ++ * If Boot Mode is Non-Secure, no changes are required ++ */ ++ if (fsl_check_boot_mode_secure() == 0) ++ return 0; ++ ++ /* If Boot mode is Secure, set the environment variables ++ * bootdelay = 0 (To disable Boot Prompt) ++ * bootcmd = CONFIG_CHAIN_BOOT_CMD (Validate and execute Boot script) ++ */ ++ env_set("bootdelay", "-2"); ++ ++#ifdef CONFIG_ARM ++ env_set("secureboot", "y"); ++#else ++ env_set("bootcmd", CONFIG_CHAIN_BOOT_CMD); ++#endif ++ ++ return 0; ++} ++#endif ++ ++#ifdef CONFIG_SPL_BUILD ++void spl_validate_uboot(uint32_t hdr_addr, uintptr_t img_addr) ++{ ++ int res; ++ ++ /* ++ * Check Boot Mode ++ * If Boot Mode is Non-Secure, skip validation ++ */ ++ if (fsl_check_boot_mode_secure() == 0) ++ return; ++ ++ printf("SPL: Validating U-Boot image\n"); ++ ++#ifdef CONFIG_ADDR_MAP ++ init_addr_map(); ++#endif ++ ++#ifdef CONFIG_FSL_CORENET ++ if (pamu_init() < 0) ++ fsl_secboot_handle_error(ERROR_ESBC_PAMU_INIT); ++#endif ++ ++#ifdef CONFIG_FSL_CAAM ++ if (sec_init() < 0) ++ fsl_secboot_handle_error(ERROR_ESBC_SEC_INIT); ++#endif ++ ++/* ++ * dm_init_and_scan() is called as part of common SPL framework, so no ++ * need to call it again but in case of powerpc platforms which currently ++ * do not use common SPL framework, so need to call this function here. ++ */ ++#if defined(CONFIG_SPL_DM) && (!defined(CONFIG_SPL_FRAMEWORK)) ++ dm_init_and_scan(true); ++#endif ++ res = fsl_secboot_validate(hdr_addr, CONFIG_SPL_UBOOT_KEY_HASH, ++ &img_addr); ++ ++ if (res == 0) ++ printf("SPL: Validation of U-boot successful\n"); ++} ++ ++#ifdef CONFIG_SPL_FRAMEWORK ++/* Override weak funtion defined in SPL framework to enable validation ++ * of main u-boot image before jumping to u-boot image. ++ */ ++void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) ++{ ++ typedef void __noreturn (*image_entry_noargs_t)(void); ++ uint32_t hdr_addr; ++ ++ image_entry_noargs_t image_entry = ++ (image_entry_noargs_t)(unsigned long)spl_image->entry_point; ++ ++ hdr_addr = (spl_image->entry_point + spl_image->size - ++ CONFIG_U_BOOT_HDR_SIZE); ++ spl_validate_uboot(hdr_addr, (uintptr_t)spl_image->entry_point); ++ /* ++ * In case of failure in validation, spl_validate_uboot would ++ * not return back in case of Production environment with ITS=1. ++ * Thus U-Boot will not start. ++ * In Development environment (ITS=0 and SB_EN=1), the function ++ * may return back in case of non-fatal failures. ++ */ ++ ++ debug("image entry point: 0x%lX\n", spl_image->entry_point); ++ image_entry(); ++} ++#endif /* ifdef CONFIG_SPL_FRAMEWORK */ ++#endif /* ifdef CONFIG_SPL_BUILD */ +diff --git a/board/solidrun/common/fsl_validate.c b/board/solidrun/common/fsl_validate.c +new file mode 100644 +index 0000000000..2bf9d58746 +--- /dev/null ++++ b/board/solidrun/common/fsl_validate.c +@@ -0,0 +1,962 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2015 Freescale Semiconductor, Inc. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef CONFIG_ARCH_LS1021A ++#include ++#endif ++ ++#define SHA256_BITS 256 ++#define SHA256_BYTES (256/8) ++#define SHA256_NIBBLES (256/4) ++#define NUM_HEX_CHARS (sizeof(ulong) * 2) ++ ++#define CHECK_KEY_LEN(key_len) (((key_len) == 2 * KEY_SIZE_BYTES / 4) || \ ++ ((key_len) == 2 * KEY_SIZE_BYTES / 2) || \ ++ ((key_len) == 2 * KEY_SIZE_BYTES)) ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++/* Global data structure */ ++static struct fsl_secboot_glb glb; ++#endif ++ ++/* This array contains DER value for SHA-256 */ ++static const u8 hash_identifier[] = { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, ++ 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, ++ 0x04, 0x20 ++ }; ++ ++static u8 hash_val[SHA256_BYTES]; ++ ++#ifdef CONFIG_ESBC_HDR_LS ++/* New Barker Code for LS ESBC Header */ ++static const u8 barker_code[ESBC_BARKER_LEN] = { 0x12, 0x19, 0x20, 0x01 }; ++#else ++static const u8 barker_code[ESBC_BARKER_LEN] = { 0x68, 0x39, 0x27, 0x81 }; ++#endif ++ ++void branch_to_self(void) __attribute__ ((noreturn)); ++ ++/* ++ * This function will put core in infinite loop. ++ * This will be called when the ESBC can not proceed further due ++ * to some unknown errors. ++ */ ++void branch_to_self(void) ++{ ++ printf("Core is in infinite loop due to errors.\n"); ++self: ++ goto self; ++} ++ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++static u32 check_ie(struct fsl_secboot_img_priv *img) ++{ ++ if (img->hdr.ie_flag & IE_FLAG_MASK) ++ return 1; ++ ++ return 0; ++} ++ ++/* This function returns the CSF Header Address of uboot ++ * For MPC85xx based platforms, the LAW mapping for NOR ++ * flash changes in uboot code. Hence the offset needs ++ * to be calculated and added to the new NOR flash base ++ * address ++ */ ++#if defined(CONFIG_MPC85xx) ++int get_csf_base_addr(u32 *csf_addr, u32 *flash_base_addr) ++{ ++ struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); ++ u32 csf_hdr_addr = in_be32(&gur->scratchrw[0]); ++ u32 csf_flash_offset = csf_hdr_addr & ~(CONFIG_SYS_PBI_FLASH_BASE); ++ u32 flash_addr, addr; ++ int found = 0; ++ int i = 0; ++ ++ for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) { ++ flash_addr = flash_info[i].start[0]; ++ addr = flash_info[i].start[0] + csf_flash_offset; ++ if (memcmp((u8 *)addr, barker_code, ESBC_BARKER_LEN) == 0) { ++ debug("Barker found on addr %x\n", addr); ++ found = 1; ++ break; ++ } ++ } ++ ++ if (!found) ++ return -1; ++ ++ *csf_addr = addr; ++ *flash_base_addr = flash_addr; ++ ++ return 0; ++} ++#else ++/* For platforms like LS1020, correct flash address is present in ++ * the header. So the function reqturns flash base address as 0 ++ */ ++int get_csf_base_addr(u32 *csf_addr, u32 *flash_base_addr) ++{ ++ struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++ u32 csf_hdr_addr = in_be32(&gur->scratchrw[0]); ++ ++ if (memcmp((u8 *)(uintptr_t)csf_hdr_addr, ++ barker_code, ESBC_BARKER_LEN)) ++ return -1; ++ ++ *csf_addr = csf_hdr_addr; ++ *flash_base_addr = 0; ++ return 0; ++} ++#endif ++ ++#if defined(CONFIG_ESBC_HDR_LS) ++static int get_ie_info_addr(uintptr_t *ie_addr) ++{ ++ struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++ /* For LS-CH3, the address of IE Table is ++ * stated in Scratch13 and scratch14 of DCFG. ++ * Bootrom validates this table while validating uboot. ++ * DCFG is LE*/ ++ *ie_addr = in_le32(&gur->scratchrw[SCRATCH_IE_HIGH_ADR - 1]); ++ *ie_addr = *ie_addr << 32; ++ *ie_addr |= in_le32(&gur->scratchrw[SCRATCH_IE_LOW_ADR - 1]); ++ return 0; ++} ++#else /* CONFIG_ESBC_HDR_LS */ ++static int get_ie_info_addr(uintptr_t *ie_addr) ++{ ++ struct fsl_secboot_img_hdr *hdr; ++ struct fsl_secboot_sg_table *sg_tbl; ++ u32 flash_base_addr, csf_addr; ++ ++ if (get_csf_base_addr(&csf_addr, &flash_base_addr)) ++ return -1; ++ ++ hdr = (struct fsl_secboot_img_hdr *)(uintptr_t)csf_addr; ++ ++ /* For SoC's with Trust Architecture v1 with corenet bus ++ * the sg table field in CSF header has absolute address ++ * for sg table in memory. In other Trust Architecture, ++ * this field specifies the offset of sg table from the ++ * base address of CSF Header ++ */ ++#if defined(CONFIG_FSL_TRUST_ARCH_v1) && defined(CONFIG_FSL_CORENET) ++ sg_tbl = (struct fsl_secboot_sg_table *) ++ (((u32)hdr->psgtable & ~(CONFIG_SYS_PBI_FLASH_BASE)) + ++ flash_base_addr); ++#else ++ sg_tbl = (struct fsl_secboot_sg_table *)(uintptr_t)(csf_addr + ++ (u32)hdr->psgtable); ++#endif ++ ++ /* IE Key Table is the first entry in the SG Table */ ++#if defined(CONFIG_MPC85xx) ++ *ie_addr = (uintptr_t)((sg_tbl->src_addr & ++ ~(CONFIG_SYS_PBI_FLASH_BASE)) + ++ flash_base_addr); ++#else ++ *ie_addr = (uintptr_t)sg_tbl->src_addr; ++#endif ++ ++ debug("IE Table address is %lx\n", *ie_addr); ++ return 0; ++} ++#endif /* CONFIG_ESBC_HDR_LS */ ++#endif ++ ++#ifdef CONFIG_KEY_REVOCATION ++/* This function checks srk_table_flag in header and set/reset srk_flag.*/ ++static u32 check_srk(struct fsl_secboot_img_priv *img) ++{ ++#ifdef CONFIG_ESBC_HDR_LS ++ /* In LS, No SRK Flag as SRK is always present if IE not present*/ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ return !check_ie(img); ++#endif ++ return 1; ++#else ++ if (img->hdr.len_kr.srk_table_flag & SRK_FLAG) ++ return 1; ++ ++ return 0; ++#endif ++} ++ ++/* This function returns ospr's key_revoc values.*/ ++static u32 get_key_revoc(void) ++{ ++ struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR); ++ return (sfp_in32(&sfp_regs->ospr) & OSPR_KEY_REVOC_MASK) >> ++ OSPR_KEY_REVOC_SHIFT; ++} ++ ++/* This function checks if selected key is revoked or not.*/ ++static u32 is_key_revoked(u32 keynum, u32 rev_flag) ++{ ++ if (keynum == UNREVOCABLE_KEY) ++ return 0; ++ ++ if ((u32)(1 << (ALIGN_REVOC_KEY - keynum)) & rev_flag) ++ return 1; ++ ++ return 0; ++} ++ ++/* It read validates srk_table key lengths.*/ ++static u32 read_validate_srk_tbl(struct fsl_secboot_img_priv *img) ++{ ++ int i = 0; ++ u32 ret, key_num, key_revoc_flag, size; ++ struct fsl_secboot_img_hdr *hdr = &img->hdr; ++ void *esbc = (u8 *)(uintptr_t)img->ehdrloc; ++ ++ if ((hdr->len_kr.num_srk == 0) || ++ (hdr->len_kr.num_srk > MAX_KEY_ENTRIES)) ++ return ERROR_ESBC_CLIENT_HEADER_INVALID_SRK_NUM_ENTRY; ++ ++ key_num = hdr->len_kr.srk_sel; ++ if (key_num == 0 || key_num > hdr->len_kr.num_srk) ++ return ERROR_ESBC_CLIENT_HEADER_INVALID_KEY_NUM; ++ ++ /* Get revoc key from sfp */ ++ key_revoc_flag = get_key_revoc(); ++ ret = is_key_revoked(key_num, key_revoc_flag); ++ if (ret) ++ return ERROR_ESBC_CLIENT_HEADER_KEY_REVOKED; ++ ++ size = hdr->len_kr.num_srk * sizeof(struct srk_table); ++ ++ memcpy(&img->srk_tbl, esbc + hdr->srk_tbl_off, size); ++ ++ for (i = 0; i < hdr->len_kr.num_srk; i++) { ++ if (!CHECK_KEY_LEN(img->srk_tbl[i].key_len)) ++ return ERROR_ESBC_CLIENT_HEADER_INV_SRK_ENTRY_KEYLEN; ++ } ++ ++ img->key_len = img->srk_tbl[key_num - 1].key_len; ++ ++ memcpy(&img->img_key, &(img->srk_tbl[key_num - 1].pkey), ++ img->key_len); ++ ++ return 0; ++} ++#endif ++ ++#ifndef CONFIG_ESBC_HDR_LS ++static u32 read_validate_single_key(struct fsl_secboot_img_priv *img) ++{ ++ struct fsl_secboot_img_hdr *hdr = &img->hdr; ++ void *esbc = (u8 *)(uintptr_t)img->ehdrloc; ++ ++ /* check key length */ ++ if (!CHECK_KEY_LEN(hdr->key_len)) ++ return ERROR_ESBC_CLIENT_HEADER_KEY_LEN; ++ ++ memcpy(&img->img_key, esbc + hdr->pkey, hdr->key_len); ++ ++ img->key_len = hdr->key_len; ++ ++ return 0; ++} ++#endif /* CONFIG_ESBC_HDR_LS */ ++ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ ++static void install_ie_tbl(uintptr_t ie_tbl_addr, ++ struct fsl_secboot_img_priv *img) ++{ ++ /* Copy IE tbl to Global Data */ ++ memcpy(&glb.ie_tbl, (u8 *)ie_tbl_addr, sizeof(struct ie_key_info)); ++ img->ie_addr = (uintptr_t)&glb.ie_tbl; ++ glb.ie_addr = img->ie_addr; ++} ++ ++static u32 read_validate_ie_tbl(struct fsl_secboot_img_priv *img) ++{ ++ struct fsl_secboot_img_hdr *hdr = &img->hdr; ++ u32 ie_key_len, ie_revoc_flag, ie_num; ++ struct ie_key_info *ie_info; ++ ++ if (!img->ie_addr) { ++ if (get_ie_info_addr(&img->ie_addr)) ++ return ERROR_IE_TABLE_NOT_FOUND; ++ else ++ install_ie_tbl(img->ie_addr, img); ++ } ++ ++ ie_info = (struct ie_key_info *)(uintptr_t)img->ie_addr; ++ if (ie_info->num_keys == 0 || ie_info->num_keys > 32) ++ return ERROR_ESBC_CLIENT_HEADER_INVALID_IE_NUM_ENTRY; ++ ++ ie_num = hdr->ie_key_sel; ++ if (ie_num == 0 || ie_num > ie_info->num_keys) ++ return ERROR_ESBC_CLIENT_HEADER_INVALID_IE_KEY_NUM; ++ ++ ie_revoc_flag = ie_info->key_revok; ++ if ((u32)(1 << (ie_num - 1)) & ie_revoc_flag) ++ return ERROR_ESBC_CLIENT_HEADER_IE_KEY_REVOKED; ++ ++ ie_key_len = ie_info->ie_key_tbl[ie_num - 1].key_len; ++ ++ if (!CHECK_KEY_LEN(ie_key_len)) ++ return ERROR_ESBC_CLIENT_HEADER_INV_IE_ENTRY_KEYLEN; ++ ++ memcpy(&img->img_key, &(ie_info->ie_key_tbl[ie_num - 1].pkey), ++ ie_key_len); ++ ++ img->key_len = ie_key_len; ++ return 0; ++} ++#endif ++ ++ ++/* This function return length of public key.*/ ++static inline u32 get_key_len(struct fsl_secboot_img_priv *img) ++{ ++ return img->key_len; ++} ++ ++/* ++ * Handles the ESBC uboot client header verification failure. ++ * This function handles all the errors which might occur in the ++ * parsing and checking of ESBC uboot client header. It will also ++ * set the error bits in the SEC_MON. ++ */ ++static void fsl_secboot_header_verification_failure(void) ++{ ++ struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR); ++ ++ /* 29th bit of OSPR is ITS */ ++ u32 its = sfp_in32(&sfp_regs->ospr) >> 2; ++ ++ if (its == 1) ++ set_sec_mon_state(HPSR_SSM_ST_SOFT_FAIL); ++ else ++ set_sec_mon_state(HPSR_SSM_ST_NON_SECURE); ++ ++ printf("Generating reset request\n"); ++ do_reset(NULL, 0, 0, NULL); ++ /* If reset doesn't coocur, halt execution */ ++ do_esbc_halt(NULL, 0, 0, NULL); ++} ++ ++/* ++ * Handles the ESBC uboot client image verification failure. ++ * This function handles all the errors which might occur in the ++ * public key hash comparison and signature verification of ++ * ESBC uboot client image. It will also ++ * set the error bits in the SEC_MON. ++ */ ++static void fsl_secboot_image_verification_failure(void) ++{ ++ struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR); ++ ++ u32 its = (sfp_in32(&sfp_regs->ospr) & ITS_MASK) >> ITS_BIT; ++ ++ if (its == 1) { ++ set_sec_mon_state(HPSR_SSM_ST_SOFT_FAIL); ++ ++ printf("Generating reset request\n"); ++ do_reset(NULL, 0, 0, NULL); ++ /* If reset doesn't coocur, halt execution */ ++ do_esbc_halt(NULL, 0, 0, NULL); ++ ++ } else { ++ set_sec_mon_state(HPSR_SSM_ST_NON_SECURE); ++ } ++} ++ ++static void fsl_secboot_bootscript_parse_failure(void) ++{ ++ fsl_secboot_header_verification_failure(); ++} ++ ++/* ++ * Handles the errors in esbc boot. ++ * This function handles all the errors which might occur in the ++ * esbc boot phase. It will call the appropriate api to log the ++ * errors and set the error bits in the SEC_MON. ++ */ ++void fsl_secboot_handle_error(int error) ++{ ++#ifndef CONFIG_SPL_BUILD ++ const struct fsl_secboot_errcode *e; ++ ++ for (e = fsl_secboot_errcodes; e->errcode != ERROR_ESBC_CLIENT_MAX; ++ e++) { ++ if (e->errcode == error) ++ printf("ERROR :: %x :: %s\n", error, e->name); ++ } ++#else ++ printf("ERROR :: %x\n", error); ++#endif ++ ++ /* If Boot Mode is secure, transition the SNVS state and issue ++ * reset based on type of failure and ITS setting. ++ * If Boot mode is non-secure, return from this function. ++ */ ++ if (fsl_check_boot_mode_secure() == 0) ++ return; ++ ++ switch (error) { ++ case ERROR_ESBC_CLIENT_HEADER_BARKER: ++ case ERROR_ESBC_CLIENT_HEADER_IMG_SIZE: ++ case ERROR_ESBC_CLIENT_HEADER_KEY_LEN: ++ case ERROR_ESBC_CLIENT_HEADER_SIG_LEN: ++ case ERROR_ESBC_CLIENT_HEADER_KEY_LEN_NOT_TWICE_SIG_LEN: ++ case ERROR_ESBC_CLIENT_HEADER_KEY_MOD_1: ++ case ERROR_ESBC_CLIENT_HEADER_KEY_MOD_2: ++ case ERROR_ESBC_CLIENT_HEADER_SIG_KEY_MOD: ++ case ERROR_ESBC_CLIENT_HEADER_SG_ESBC_EP: ++ case ERROR_ESBC_CLIENT_HEADER_SG_ENTIRES_BAD: ++ case ERROR_KEY_TABLE_NOT_FOUND: ++#ifdef CONFIG_KEY_REVOCATION ++ case ERROR_ESBC_CLIENT_HEADER_KEY_REVOKED: ++ case ERROR_ESBC_CLIENT_HEADER_INVALID_SRK_NUM_ENTRY: ++ case ERROR_ESBC_CLIENT_HEADER_INVALID_KEY_NUM: ++ case ERROR_ESBC_CLIENT_HEADER_INV_SRK_ENTRY_KEYLEN: ++#endif ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ /*@fallthrough@*/ ++ case ERROR_ESBC_CLIENT_HEADER_IE_KEY_REVOKED: ++ case ERROR_ESBC_CLIENT_HEADER_INVALID_IE_NUM_ENTRY: ++ case ERROR_ESBC_CLIENT_HEADER_INVALID_IE_KEY_NUM: ++ case ERROR_ESBC_CLIENT_HEADER_INV_IE_ENTRY_KEYLEN: ++ case ERROR_IE_TABLE_NOT_FOUND: ++#endif ++ fsl_secboot_header_verification_failure(); ++ break; ++ case ERROR_ESBC_SEC_RESET: ++ case ERROR_ESBC_SEC_DEQ: ++ case ERROR_ESBC_SEC_ENQ: ++ case ERROR_ESBC_SEC_DEQ_TO: ++ case ERROR_ESBC_SEC_JOBQ_STATUS: ++ case ERROR_ESBC_CLIENT_HASH_COMPARE_KEY: ++ case ERROR_ESBC_CLIENT_HASH_COMPARE_EM: ++ fsl_secboot_image_verification_failure(); ++ break; ++ case ERROR_ESBC_MISSING_BOOTM: ++ fsl_secboot_bootscript_parse_failure(); ++ break; ++ case ERROR_ESBC_WRONG_CMD: ++ default: ++ branch_to_self(); ++ break; ++ } ++} ++ ++static void fsl_secblk_handle_error(int error) ++{ ++ switch (error) { ++ case ERROR_ESBC_SEC_ENQ: ++ fsl_secboot_handle_error(ERROR_ESBC_SEC_ENQ); ++ break; ++ case ERROR_ESBC_SEC_DEQ: ++ fsl_secboot_handle_error(ERROR_ESBC_SEC_DEQ); ++ break; ++ case ERROR_ESBC_SEC_DEQ_TO: ++ fsl_secboot_handle_error(ERROR_ESBC_SEC_DEQ_TO); ++ break; ++ default: ++ printf("Job Queue Output status %x\n", error); ++ fsl_secboot_handle_error(ERROR_ESBC_SEC_JOBQ_STATUS); ++ break; ++ } ++} ++ ++/* ++ * Calculate hash of key obtained via offset present in ESBC uboot ++ * client hdr. This function calculates the hash of key which is obtained ++ * through offset present in ESBC uboot client header. ++ */ ++static int calc_img_key_hash(struct fsl_secboot_img_priv *img) ++{ ++ struct hash_algo *algo; ++ void *ctx; ++ int i, srk = 0; ++ int ret = 0; ++ const char *algo_name = "sha256"; ++ ++ /* Calculate hash of the esbc key */ ++ ret = hash_progressive_lookup_algo(algo_name, &algo); ++ if (ret) ++ return ret; ++ ++ ret = algo->hash_init(algo, &ctx); ++ if (ret) ++ return ret; ++ ++ /* Update hash for ESBC key */ ++#ifdef CONFIG_KEY_REVOCATION ++ if (check_srk(img)) { ++ ret = algo->hash_update(algo, ctx, ++ (u8 *)(uintptr_t)(img->ehdrloc + img->hdr.srk_tbl_off), ++ img->hdr.len_kr.num_srk * sizeof(struct srk_table), 1); ++ srk = 1; ++ } ++#endif ++ if (!srk) ++ ret = algo->hash_update(algo, ctx, ++ img->img_key, img->key_len, 1); ++ if (ret) ++ return ret; ++ ++ /* Copy hash at destination buffer */ ++ ret = algo->hash_finish(algo, ctx, hash_val, algo->digest_size); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < SHA256_BYTES; i++) ++ img->img_key_hash[i] = hash_val[i]; ++ ++ return 0; ++} ++ ++/* ++ * Calculate hash of ESBC hdr and ESBC. This function calculates the ++ * single hash of ESBC header and ESBC image. If SG flag is on, all ++ * SG entries are also hashed alongwith the complete SG table. ++ */ ++static int calc_esbchdr_esbc_hash(struct fsl_secboot_img_priv *img) ++{ ++ struct hash_algo *algo; ++ void *ctx; ++ int ret = 0; ++ int key_hash = 0; ++ const char *algo_name = "sha256"; ++ ++ /* Calculate the hash of the ESBC */ ++ ret = hash_progressive_lookup_algo(algo_name, &algo); ++ if (ret) ++ return ret; ++ ++ ret = algo->hash_init(algo, &ctx); ++ /* Copy hash at destination buffer */ ++ if (ret) ++ return ret; ++ ++ /* Update hash for CSF Header */ ++ ret = algo->hash_update(algo, ctx, ++ (u8 *)&img->hdr, sizeof(struct fsl_secboot_img_hdr), 0); ++ if (ret) ++ return ret; ++ ++ /* Update the hash with that of srk table if srk flag is 1 ++ * If IE Table is selected, key is not added in the hash ++ * If neither srk table nor IE key table available, add key ++ * from header in the hash calculation ++ */ ++#ifdef CONFIG_KEY_REVOCATION ++ if (check_srk(img)) { ++ ret = algo->hash_update(algo, ctx, ++ (u8 *)(uintptr_t)(img->ehdrloc + img->hdr.srk_tbl_off), ++ img->hdr.len_kr.num_srk * sizeof(struct srk_table), 0); ++ key_hash = 1; ++ } ++#endif ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ if (!key_hash && check_ie(img)) ++ key_hash = 1; ++#endif ++#ifndef CONFIG_ESBC_HDR_LS ++/* No single key support in LS ESBC header */ ++ if (!key_hash) { ++ ret = algo->hash_update(algo, ctx, ++ img->img_key, img->hdr.key_len, 0); ++ key_hash = 1; ++ } ++#endif ++ if (ret) ++ return ret; ++ if (!key_hash) ++ return ERROR_KEY_TABLE_NOT_FOUND; ++ ++ /* Update hash for actual Image */ ++ ret = algo->hash_update(algo, ctx, ++ (u8 *)(*(img->img_addr_ptr)), img->img_size, 1); ++ if (ret) ++ return ret; ++ ++ /* Copy hash at destination buffer */ ++ ret = algo->hash_finish(algo, ctx, hash_val, algo->digest_size); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++/* ++ * Construct encoded hash EM' wrt PKCSv1.5. This function calculates the ++ * pointers for padding, DER value and hash. And finally, constructs EM' ++ * which includes hash of complete CSF header and ESBC image. If SG flag ++ * is on, hash of SG table and entries is also included. ++ */ ++static void construct_img_encoded_hash_second(struct fsl_secboot_img_priv *img) ++{ ++ /* ++ * RSA PKCSv1.5 encoding format for encoded message is below ++ * EM = 0x0 || 0x1 || PS || 0x0 || DER || Hash ++ * PS is Padding String ++ * DER is DER value for SHA-256 ++ * Hash is SHA-256 hash ++ * ********************************************************* ++ * representative points to first byte of EM initially and is ++ * filled with 0x0 ++ * representative is incremented by 1 and second byte is filled ++ * with 0x1 ++ * padding points to third byte of EM ++ * digest points to full length of EM - 32 bytes ++ * hash_id (DER value) points to 19 bytes before pDigest ++ * separator is one byte which separates padding and DER ++ */ ++ ++ size_t len; ++ u8 *representative; ++ u8 *padding, *digest; ++ u8 *hash_id, *separator; ++ int i; ++ ++ len = (get_key_len(img) / 2) - 1; ++ representative = img->img_encoded_hash_second; ++ representative[0] = 0; ++ representative[1] = 1; /* block type 1 */ ++ ++ padding = &representative[2]; ++ digest = &representative[1] + len - 32; ++ hash_id = digest - sizeof(hash_identifier); ++ separator = hash_id - 1; ++ ++ /* fill padding area pointed by padding with 0xff */ ++ memset(padding, 0xff, separator - padding); ++ ++ /* fill byte pointed by separator */ ++ *separator = 0; ++ ++ /* fill SHA-256 DER value pointed by HashId */ ++ memcpy(hash_id, hash_identifier, sizeof(hash_identifier)); ++ ++ /* fill hash pointed by Digest */ ++ for (i = 0; i < SHA256_BYTES; i++) ++ digest[i] = hash_val[i]; ++} ++ ++/* ++ * Reads and validates the ESBC client header. ++ * This function reads key and signature from the ESBC client header. ++ * If Scatter/Gather flag is on, lengths and offsets of images ++ * present as SG entries are also read. This function also checks ++ * whether the header is valid or not. ++ */ ++static int read_validate_esbc_client_header(struct fsl_secboot_img_priv *img) ++{ ++ struct fsl_secboot_img_hdr *hdr = &img->hdr; ++ void *esbc = (u8 *)(uintptr_t)img->ehdrloc; ++ u8 *k, *s; ++ u32 ret = 0; ++ ++ int key_found = 0; ++ ++ /* check barker code */ ++ if (memcmp(hdr->barker, barker_code, ESBC_BARKER_LEN)) ++ return ERROR_ESBC_CLIENT_HEADER_BARKER; ++ ++ /* If Image Address is not passed as argument to function, ++ * then Address and Size must be read from the Header. ++ */ ++ if (*(img->img_addr_ptr) == 0) { ++ #ifdef CONFIG_ESBC_ADDR_64BIT ++ *(img->img_addr_ptr) = hdr->pimg64; ++ #else ++ *(img->img_addr_ptr) = hdr->pimg; ++ #endif ++ } ++ ++ if (!hdr->img_size) ++ return ERROR_ESBC_CLIENT_HEADER_IMG_SIZE; ++ ++ img->img_size = hdr->img_size; ++ ++ /* Key checking*/ ++#ifdef CONFIG_KEY_REVOCATION ++ if (check_srk(img)) { ++ ret = read_validate_srk_tbl(img); ++ if (ret != 0) ++ return ret; ++ key_found = 1; ++ } ++#endif ++ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ if (!key_found && check_ie(img)) { ++ ret = read_validate_ie_tbl(img); ++ if (ret != 0) ++ return ret; ++ key_found = 1; ++ } ++#endif ++#ifndef CONFIG_ESBC_HDR_LS ++/* Single Key Feature not available in LS ESBC Header */ ++ if (key_found == 0) { ++ ret = read_validate_single_key(img); ++ if (ret != 0) ++ return ret; ++ key_found = 1; ++ } ++#endif ++ if (!key_found) ++ return ERROR_KEY_TABLE_NOT_FOUND; ++ ++ /* check signaure */ ++ if (get_key_len(img) == 2 * hdr->sign_len) { ++ /* check signature length */ ++ if (!((hdr->sign_len == KEY_SIZE_BYTES / 4) || ++ (hdr->sign_len == KEY_SIZE_BYTES / 2) || ++ (hdr->sign_len == KEY_SIZE_BYTES))) ++ return ERROR_ESBC_CLIENT_HEADER_SIG_LEN; ++ } else { ++ return ERROR_ESBC_CLIENT_HEADER_KEY_LEN_NOT_TWICE_SIG_LEN; ++ } ++ ++ memcpy(&img->img_sign, esbc + hdr->psign, hdr->sign_len); ++/* No SG support in LS-CH3 */ ++#ifndef CONFIG_ESBC_HDR_LS ++ /* No SG support */ ++ if (hdr->sg_flag) ++ return ERROR_ESBC_CLIENT_HEADER_SG; ++#endif ++ ++ /* modulus most significant bit should be set */ ++ k = (u8 *)&img->img_key; ++ ++ if ((k[0] & 0x80) == 0) ++ return ERROR_ESBC_CLIENT_HEADER_KEY_MOD_1; ++ ++ /* modulus value should be odd */ ++ if ((k[get_key_len(img) / 2 - 1] & 0x1) == 0) ++ return ERROR_ESBC_CLIENT_HEADER_KEY_MOD_2; ++ ++ /* Check signature value < modulus value */ ++ s = (u8 *)&img->img_sign; ++ ++ if (!(memcmp(s, k, hdr->sign_len) < 0)) ++ return ERROR_ESBC_CLIENT_HEADER_SIG_KEY_MOD; ++ ++ return ESBC_VALID_HDR; ++} ++ ++static inline int str2longbe(const char *p, ulong *num) ++{ ++ char *endptr; ++ ulong tmp; ++ ++ if (!p) { ++ return 0; ++ } else { ++ tmp = simple_strtoul(p, &endptr, 16); ++ if (sizeof(ulong) == 4) ++ *num = cpu_to_be32(tmp); ++ else ++ *num = cpu_to_be64(tmp); ++ } ++ ++ return *p != '\0' && *endptr == '\0'; ++} ++/* Function to calculate the ESBC Image Hash ++ * and hash from Digital signature. ++ * The Two hash's are compared to yield the ++ * result of signature validation. ++ */ ++static int calculate_cmp_img_sig(struct fsl_secboot_img_priv *img) ++{ ++ int ret; ++ uint32_t key_len; ++ struct key_prop prop; ++#if !defined(USE_HOSTCC) ++ struct udevice *mod_exp_dev; ++#endif ++ ret = calc_esbchdr_esbc_hash(img); ++ if (ret) ++ return ret; ++ ++ /* Construct encoded hash EM' wrt PKCSv1.5 */ ++ construct_img_encoded_hash_second(img); ++ ++ /* Fill prop structure for public key */ ++ memset(&prop, 0, sizeof(struct key_prop)); ++ key_len = get_key_len(img) / 2; ++ prop.modulus = img->img_key; ++ prop.public_exponent = img->img_key + key_len; ++ prop.num_bits = key_len * 8; ++ prop.exp_len = key_len; ++ ++ ret = uclass_get_device(UCLASS_MOD_EXP, 0, &mod_exp_dev); ++ if (ret) { ++ printf("RSA: Can't find Modular Exp implementation\n"); ++ return -EINVAL; ++ } ++ ++ ret = rsa_mod_exp(mod_exp_dev, img->img_sign, img->hdr.sign_len, ++ &prop, img->img_encoded_hash); ++ if (ret) ++ return ret; ++ ++ /* ++ * compare the encoded messages EM' and EM wrt RSA PKCSv1.5 ++ * memcmp returns zero on success ++ * memcmp returns non-zero on failure ++ */ ++ ret = memcmp(&img->img_encoded_hash_second, &img->img_encoded_hash, ++ img->hdr.sign_len); ++ ++ if (ret) ++ return ERROR_ESBC_CLIENT_HASH_COMPARE_EM; ++ ++ return 0; ++} ++/* Function to initialize img priv and global data structure ++ */ ++static int secboot_init(struct fsl_secboot_img_priv **img_ptr) ++{ ++ *img_ptr = malloc(sizeof(struct fsl_secboot_img_priv)); ++ ++ struct fsl_secboot_img_priv *img = *img_ptr; ++ ++ if (!img) ++ return -ENOMEM; ++ memset(img, 0, sizeof(struct fsl_secboot_img_priv)); ++ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ if (glb.ie_addr) ++ img->ie_addr = glb.ie_addr; ++#endif ++ return 0; ++} ++ ++ ++/* haddr - Address of the header of image to be validated. ++ * arg_hash_str - Option hash string. If provided, this ++ * overrides the key hash in the SFP fuses. ++ * img_addr_ptr - Optional pointer to address of image to be validated. ++ * If non zero addr, this overrides the addr of image in header, ++ * otherwise updated to image addr in header. ++ * Acts as both input and output of function. ++ * This pointer shouldn't be NULL. ++ */ ++int fsl_secboot_validate(uintptr_t haddr, char *arg_hash_str, ++ uintptr_t *img_addr_ptr) ++{ ++ struct ccsr_sfp_regs *sfp_regs = (void *)(CONFIG_SYS_SFP_ADDR); ++ ulong hash[SHA256_BYTES/sizeof(ulong)]; ++ char hash_str[NUM_HEX_CHARS + 1]; ++ struct fsl_secboot_img_priv *img; ++ struct fsl_secboot_img_hdr *hdr; ++ void *esbc; ++ int ret, i, hash_cmd = 0; ++ u32 srk_hash[8]; ++ ++ if (arg_hash_str != NULL) { ++ const char *cp = arg_hash_str; ++ int i = 0; ++ ++ if (*cp == '0' && *(cp + 1) == 'x') ++ cp += 2; ++ ++ /* The input string expected is in hex, where ++ * each 4 bits would be represented by a hex ++ * sha256 hash is 256 bits long, which would mean ++ * num of characters = 256 / 4 ++ */ ++ if (strlen(cp) != SHA256_NIBBLES) { ++ printf("%s is not a 256 bits hex string as expected\n", ++ arg_hash_str); ++ return -1; ++ } ++ ++ for (i = 0; i < sizeof(hash)/sizeof(ulong); i++) { ++ strncpy(hash_str, cp + (i * NUM_HEX_CHARS), ++ NUM_HEX_CHARS); ++ hash_str[NUM_HEX_CHARS] = '\0'; ++ if (!str2longbe(hash_str, &hash[i])) { ++ printf("%s is not a 256 bits hex string ", ++ arg_hash_str); ++ return -1; ++ } ++ } ++ ++ hash_cmd = 1; ++ } ++ ++ ret = secboot_init(&img); ++ if (ret) ++ goto exit; ++ ++ /* Update the information in Private Struct */ ++ hdr = &img->hdr; ++ img->ehdrloc = haddr; ++ img->img_addr_ptr = img_addr_ptr; ++ esbc = (u8 *)img->ehdrloc; ++ ++ memcpy(hdr, esbc, sizeof(struct fsl_secboot_img_hdr)); ++ ++ /* read and validate esbc header */ ++ ret = read_validate_esbc_client_header(img); ++ ++ if (ret != ESBC_VALID_HDR) { ++ fsl_secboot_handle_error(ret); ++ goto exit; ++ } ++ ++ /* SRKH present in SFP */ ++ for (i = 0; i < NUM_SRKH_REGS; i++) ++ srk_hash[i] = srk_in32(&sfp_regs->srk_hash[i]); ++ ++ /* ++ * Calculate hash of key obtained via offset present in ++ * ESBC uboot client hdr ++ */ ++ ret = calc_img_key_hash(img); ++ if (ret) { ++ fsl_secblk_handle_error(ret); ++ goto exit; ++ } ++ ++ /* Compare hash obtained above with SRK hash present in SFP */ ++ if (hash_cmd) ++ ret = memcmp(&hash, &img->img_key_hash, SHA256_BYTES); ++ else ++ ret = memcmp(srk_hash, img->img_key_hash, SHA256_BYTES); ++ ++#if defined(CONFIG_FSL_ISBC_KEY_EXT) ++ if (!hash_cmd && check_ie(img)) ++ ret = 0; ++#endif ++ ++ if (ret != 0) { ++ fsl_secboot_handle_error(ERROR_ESBC_CLIENT_HASH_COMPARE_KEY); ++ goto exit; ++ } ++ ++ ret = calculate_cmp_img_sig(img); ++ if (ret) { ++ fsl_secboot_handle_error(ret); ++ goto exit; ++ } ++ ++exit: ++ /* Free Img as it was malloc'ed*/ ++ free(img); ++ return ret; ++} +diff --git a/board/solidrun/common/vid.c b/board/solidrun/common/vid.c +new file mode 100644 +index 0000000000..cc81e80c37 +--- /dev/null ++++ b/board/solidrun/common/vid.c +@@ -0,0 +1,330 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2014 Freescale Semiconductor, Inc. ++ * Copyright 2018 NXP ++ */ ++#include ++#include ++#include ++#include ++#ifdef CONFIG_FSL_LSCH2 ++#include ++#elif defined(CONFIG_FSL_LSCH3) ++#include ++#else ++#include ++#endif ++#include "vid.h" ++ ++int __weak i2c_multiplexer_select_vid_channel(u8 channel) ++{ ++ return 0; ++} ++ ++/* ++ * Compensate for a board specific voltage drop between regulator and SoC ++ * return a value in mV ++ */ ++int __weak board_vdd_drop_compensation(void) ++{ ++ return 0; ++} ++ ++/* ++ * Board specific settings for specific voltage value ++ */ ++int __weak board_adjust_vdd(int vdd) ++{ ++ return 0; ++} ++ ++/* Maximum loop count waiting for new voltage to take effect */ ++#define MAX_LOOP_WAIT_NEW_VOL 100 ++/* Maximum loop count waiting for the voltage to be stable */ ++#define MAX_LOOP_WAIT_VOL_STABLE 100 ++/* ++ * read_voltage from sensor on I2C bus ++ * We use average of 4 readings, waiting for WAIT_FOR_ADC before ++ * another reading ++ */ ++#define NUM_READINGS 4 /* prefer to be power of 2 for efficiency */ ++ ++/* If an INA220 chip is available, we can use it to read back the voltage ++ * as it may have a higher accuracy than the IR chip for the same purpose ++ */ ++#ifdef CONFIG_VOL_MONITOR_INA220 ++#define WAIT_FOR_ADC 532 /* wait for 532 microseconds for ADC */ ++#define ADC_MIN_ACCURACY 4 ++#else ++#define WAIT_FOR_ADC 138 /* wait for 138 microseconds for ADC */ ++#define ADC_MIN_ACCURACY 4 ++#endif ++ ++/* read the current value of the LTC Regulator Voltage */ ++static int read_voltage_from_LTC(int i2caddress) ++{ ++ int ret, vcode = 0; ++ u8 chan = PWM_CHANNEL0; ++ ++ /* select the PAGE 0 using PMBus commands PAGE for VDD*/ ++ ret = i2c_write(I2C_VOL_MONITOR_ADDR, ++ PMBUS_CMD_PAGE, 1, &chan, 1); ++ if (ret) { ++ printf("VID: failed to select VDD Page 0\n"); ++ return ret; ++ } ++ ++ /*read the output voltage using PMBus command READ_VOUT*/ ++ ret = i2c_read(I2C_VOL_MONITOR_ADDR, ++ PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2); ++ if (ret) { ++ printf("VID: failed to read the volatge\n"); ++ return ret; ++ } ++ ++ /* Scale down to the real mV as LTC resolution is 1/4096V,rounding up */ ++ vcode = DIV_ROUND_UP(vcode * 1000, 4096); ++ ++ return vcode; ++} ++ ++static int read_voltage(int i2caddress) ++{ ++ int voltage_read; ++ voltage_read = read_voltage_from_LTC(i2caddress); ++ return voltage_read; ++} ++ ++/* this function sets the VDD and returns the value set */ ++static int set_voltage_to_LTC(int i2caddress, int vdd) ++{ ++ int ret, vdd_last, vdd_target = vdd; ++ int count = 100, temp = 0; ++ ++ /* Scale up to the LTC resolution is 1/4096V */ ++ vdd = (vdd * 4096) / 1000; ++ ++ /* 5-byte buffer which needs to be sent following the ++ * PMBus command PAGE_PLUS_WRITE. ++ */ ++ u8 buff[5] = {0x04, PWM_CHANNEL0, PMBUS_CMD_VOUT_COMMAND, ++ vdd & 0xFF, (vdd & 0xFF00) >> 8}; ++ ++ /* Write the desired voltage code to the regulator */ ++ ret = i2c_write(I2C_VOL_MONITOR_ADDR, ++ PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5); ++ if (ret) { ++ printf("VID: I2C failed to write to the volatge regulator\n"); ++ return -1; ++ } ++ ++ /* Wait for the volatge to get to the desired value */ ++ do { ++ vdd_last = read_voltage_from_LTC(i2caddress); ++ if (vdd_last < 0) { ++ printf("VID: Couldn't read sensor abort VID adjust\n"); ++ return -1; ++ } ++ count--; ++ temp = vdd_last - vdd_target; ++ } while ((abs(temp) > 2) && (count > 0)); ++ ++ return vdd_last; ++} ++ ++static int set_voltage(int i2caddress, int vdd) ++{ ++ int vdd_last = -1; ++ ++ vdd_last = set_voltage_to_LTC(i2caddress, vdd); ++ return vdd_last; ++} ++ ++int adjust_vdd(ulong vdd_override) ++{ ++ int re_enable = disable_interrupts(); ++ struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++ u32 fusesr; ++ u8 vid; ++ int vdd_target, vdd_current, vdd_last; ++ int ret, i2caddress; ++ unsigned long vdd_string_override; ++ char *vdd_string; ++ static const u16 vdd[32] = { ++ 8250, ++ 7875, ++ 7750, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 8000, ++ 8125, ++ 8250, ++ 0, /* reserved */ ++ 8500, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ }; ++ struct vdd_drive { ++ u8 vid; ++ unsigned voltage; ++ }; ++ ret = i2c_multiplexer_select_vid_channel(I2C_MUX_CH_VOL_MONITOR); ++ if (ret) { ++ debug("VID: I2C failed to switch channel\n"); ++ ret = -1; ++ goto exit; ++ } ++ /* get the voltage ID from fuse status register */ ++ fusesr = in_le32(&gur->dcfg_fusesr); ++ vid = (fusesr >> FSL_CHASSIS3_DCFG_FUSESR_ALTVID_SHIFT) & ++ FSL_CHASSIS3_DCFG_FUSESR_ALTVID_MASK; ++ if ((vid == 0) || (vid == FSL_CHASSIS3_DCFG_FUSESR_ALTVID_MASK)) { ++ vid = (fusesr >> FSL_CHASSIS3_DCFG_FUSESR_VID_SHIFT) & ++ FSL_CHASSIS3_DCFG_FUSESR_VID_MASK; ++ } ++ vdd_target = vdd[vid]; ++ printf ("vid FUSE index %d (vdd_target = %d)\n",vid,vdd_target); ++ ++ /* check override variable for overriding VDD */ ++ vdd_string = env_get(CONFIG_VID_FLS_ENV); ++ if (vdd_override == 0 && vdd_string && ++ !strict_strtoul(vdd_string, 10, &vdd_string_override)) ++ vdd_override = vdd_string_override; ++ ++ if (vdd_override >= VDD_MV_MIN && vdd_override <= VDD_MV_MAX) { ++ vdd_target = vdd_override * 10; /* convert to 1/10 mV */ ++ debug("VDD override is %lu\n", vdd_override); ++ } else if (vdd_override != 0) { ++ printf("Invalid value.\n"); ++ } ++ ++ /* divide and round up by 10 to get a value in mV */ ++ vdd_target = DIV_ROUND_UP(vdd_target, 10); ++ if (vdd_target == 0) { ++ debug("VID: VID not used\n"); ++ ret = 0; ++ goto exit; ++ } else if (vdd_target < VDD_MV_MIN || vdd_target > VDD_MV_MAX) { ++ /* Check vdd_target is in valid range */ ++ printf("VID: Target VID %d mV is not in range.\n", ++ vdd_target); ++ ret = -1; ++ goto exit; ++ } else { ++ debug("VID: vid = %d mV\n", vdd_target); ++ } ++ ++ /* ++ * Read voltage monitor to check real voltage. ++ */ ++ vdd_last = read_voltage(i2caddress); ++ if (vdd_last < 0) { ++ printf("VID: Couldn't read sensor abort VID adjustment\n"); ++ ret = -1; ++ goto exit; ++ } ++ vdd_current = vdd_last; ++ debug("VID: Core voltage is currently at %d mV\n", vdd_last); ++ ++ /* Set the target voltage */ ++ vdd_last = vdd_current = set_voltage(i2caddress, vdd_target); ++ if (board_adjust_vdd(vdd_target) < 0) { ++ ret = -1; ++ goto exit; ++ } ++ ++ if (vdd_last > 0) ++ printf("VID: Core voltage after adjustment is at %d mV\n", ++ vdd_last); ++ else ++ ret = -1; ++exit: ++ if (re_enable) ++ enable_interrupts(); ++ i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT); ++ return ret; ++} ++ ++static int print_vdd(void) ++{ ++ int vdd_last, ret, i2caddress; ++ ++ ret = i2c_multiplexer_select_vid_channel(I2C_MUX_CH_VOL_MONITOR); ++ if (ret) { ++ debug("VID : I2c failed to switch channel\n"); ++ return -1; ++ } ++ /* ++ * Read voltage monitor to check real voltage. ++ */ ++ vdd_last = read_voltage(i2caddress); ++ if (vdd_last < 0) { ++ printf("VID: Couldn't read sensor abort VID adjustment\n"); ++ goto exit; ++ } ++ printf("VID: Core voltage is at %d mV\n", vdd_last); ++exit: ++ i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT); ++ ++ return ret < 0 ? -1 : 0; ++ ++} ++ ++static int do_vdd_override(cmd_tbl_t *cmdtp, ++ int flag, int argc, ++ char * const argv[]) ++{ ++ ulong override; ++ ++ if (argc < 2) ++ return CMD_RET_USAGE; ++ ++ if (!strict_strtoul(argv[1], 10, &override)) ++ adjust_vdd(override); /* the value is checked by callee */ ++ else ++ return CMD_RET_USAGE; ++ return 0; ++} ++ ++static int do_vdd_read(cmd_tbl_t *cmdtp, ++ int flag, int argc, ++ char * const argv[]) ++{ ++ if (argc < 1) ++ return CMD_RET_USAGE; ++ print_vdd(); ++ ++ return 0; ++} ++ ++U_BOOT_CMD( ++ vdd_override, 2, 0, do_vdd_override, ++ "override VDD", ++ " - override with the voltage specified in mV, eg. 1050" ++); ++ ++U_BOOT_CMD( ++ vdd_read, 1, 0, do_vdd_read, ++ "read VDD", ++ " - Read the voltage specified in mV" ++) +diff --git a/board/solidrun/common/vid.h b/board/solidrun/common/vid.h +new file mode 100644 +index 0000000000..99778e9a93 +--- /dev/null ++++ b/board/solidrun/common/vid.h +@@ -0,0 +1,23 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * Copyright 2014 Freescale Semiconductor, Inc. ++ */ ++ ++#ifndef __VID_H_ ++#define __VID_H_ ++ ++#define IR36021_LOOP1_MANUAL_ID_OFFSET 0x6A ++#define IR36021_LOOP1_VOUT_OFFSET 0x9A ++#define IR36021_MFR_ID_OFFSET 0x92 ++#define IR36021_MFR_ID 0x43 ++#define IR36021_INTEL_MODE_OOFSET 0x14 ++#define IR36021_MODE_MASK 0x20 ++#define IR36021_INTEL_MODE 0x00 ++#define IR36021_AMD_MODE 0x20 ++ ++/* step the IR regulator in 5mV increments */ ++#define IR_VDD_STEP_DOWN 5 ++#define IR_VDD_STEP_UP 5 ++int adjust_vdd(ulong vdd_override); ++ ++#endif /* __VID_H_ */ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0005-armv8-lx2160acex7-lx2160acex-device-tree.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0005-armv8-lx2160acex7-lx2160acex-device-tree.patch new file mode 100644 index 00000000..51acc55b --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0005-armv8-lx2160acex7-lx2160acex-device-tree.patch @@ -0,0 +1,91 @@ +From bd96fd21fafd7560dba1d5a6f893e4a7d0b7ee74 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:37:22 +0300 +Subject: [PATCH 05/17] armv8: lx2160acex7: lx2160acex device tree + +Based on NXP's LX2160ARDB device tree; it defines - +1. MX35X based SPI flash +2. SDHC0 (SD card) and SDHC1 (eMMC) +3. 4 SATA ports that depending on SERDES configuration they can get +connected to external SATA drives + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm/dts/fsl-lx2160a-cex7.dts | 63 +++++++++++++++++++++++++++++++ + 1 file changed, 63 insertions(+) + create mode 100644 arch/arm/dts/fsl-lx2160a-cex7.dts + +diff --git a/arch/arm/dts/fsl-lx2160a-cex7.dts b/arch/arm/dts/fsl-lx2160a-cex7.dts +new file mode 100644 +index 0000000000..4fbcaafb0e +--- /dev/null ++++ b/arch/arm/dts/fsl-lx2160a-cex7.dts +@@ -0,0 +1,63 @@ ++// SPDX-License-Identifier: GPL-2.0+ OR X11 ++/* ++ * SolidRun LX2160ACEX7 device tree source ++ * ++ * Author: Rabeeh Khoury ++ * ++ * Copyright 2019 SolidRun ltd. ++ * ++ */ ++ ++/dts-v1/; ++ ++#include "fsl-lx2160a.dtsi" ++ ++/ { ++ model = "SolidRun LX2160ACEX7 COM express type 7 based board"; ++ compatible = "fsl,lx2160acex7", "fsl,lx2160a"; ++ ++ aliases { ++ spi0 = &fspi; ++ }; ++}; ++ ++&fspi { ++ bus-num = <0>; ++ status = "okay"; ++ ++ qflash0: MT35XU512ABA1G12@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "spi-flash"; ++ spi-max-frequency = <50000000>; ++ reg = <0>; ++ /* The following setting enables 1-1-8 (CMD-ADDR-DATA) mode */ ++ fspi-rx-bus-width = <8>; /* 8 FSPI Rx lines */ ++ fspi-tx-bus-width = <1>; /* 1 FSPI Tx line */ ++ }; ++ ++}; ++ ++&esdhc0 { ++ status = "okay"; ++}; ++ ++&esdhc1 { ++ status = "okay"; ++}; ++ ++&sata0 { ++ status = "okay"; ++}; ++ ++&sata1 { ++ status = "okay"; ++}; ++ ++&sata2 { ++ status = "okay"; ++}; ++ ++&sata3 { ++ status = "okay"; ++}; +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0006-armv8-lx2160acex7-board-support-files.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0006-armv8-lx2160acex7-board-support-files.patch new file mode 100644 index 00000000..c38abbf9 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0006-armv8-lx2160acex7-board-support-files.patch @@ -0,0 +1,519 @@ +From c42a926fb0ff087b8c5cb774a67fb64aa1a566ce Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 13:45:24 +0300 +Subject: [PATCH 06/17] armv8: lx2160acex7: board support files + +The lx2160acex7 board support files does the following - +1. Initializes 1GBps PHY address according to SERDES1 block config. +2. Sets uart0 as the console +3. Sets EMC2301 PWM fan controller to it's default value +4. Misc FDT fixups prior to booting Linux + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + board/solidrun/lx2160a/Kconfig | 22 ++ + board/solidrun/lx2160a/MAINTAINERS | 8 + + board/solidrun/lx2160a/Makefile | 9 + + board/solidrun/lx2160a/ddr.c | 20 ++ + board/solidrun/lx2160a/eth_lx2160acex7.c | 104 ++++++++ + board/solidrun/lx2160a/lx2160a.c | 288 +++++++++++++++++++++++ + 6 files changed, 451 insertions(+) + create mode 100644 board/solidrun/lx2160a/Kconfig + create mode 100644 board/solidrun/lx2160a/MAINTAINERS + create mode 100644 board/solidrun/lx2160a/Makefile + create mode 100644 board/solidrun/lx2160a/ddr.c + create mode 100644 board/solidrun/lx2160a/eth_lx2160acex7.c + create mode 100644 board/solidrun/lx2160a/lx2160a.c + +diff --git a/board/solidrun/lx2160a/Kconfig b/board/solidrun/lx2160a/Kconfig +new file mode 100644 +index 0000000000..85abac9bfc +--- /dev/null ++++ b/board/solidrun/lx2160a/Kconfig +@@ -0,0 +1,22 @@ ++if TARGET_LX2160ACEX7 ++ ++config SYS_BOARD ++ default "lx2160a" ++ ++config SYS_VENDOR ++ default "solidrun" ++ ++config SYS_SOC ++ default "fsl-layerscape" ++ ++config SYS_CONFIG_NAME ++ default "lx2160acex7" ++ ++config EMC2301 ++ bool "Fan controller" ++ help ++ Enable the EMC2301 fan controller for configuration of fan ++ speed. ++ ++source "board/freescale/common/Kconfig" ++endif +diff --git a/board/solidrun/lx2160a/MAINTAINERS b/board/solidrun/lx2160a/MAINTAINERS +new file mode 100644 +index 0000000000..688ff66afa +--- /dev/null ++++ b/board/solidrun/lx2160a/MAINTAINERS +@@ -0,0 +1,8 @@ ++LX2160ACEX7 BOARD ++M: Rabeeh Khoury ++S: Maintained ++F: board/solidrun/lx2160a/ ++F: include/configs/lx2160a_common.h ++F: include/configs/lx2160acex7.h ++F: configs/lx2160acex7_tfa_defconfig ++F: arch/arm/dts/fsl-lx2160a-cex7.dts +diff --git a/board/solidrun/lx2160a/Makefile b/board/solidrun/lx2160a/Makefile +new file mode 100644 +index 0000000000..c92266f322 +--- /dev/null ++++ b/board/solidrun/lx2160a/Makefile +@@ -0,0 +1,9 @@ ++# ++# Copyright 2019 SolidRun ltd. ++# ++# SPDX-License-Identifier: GPL-2.0+ ++# ++ ++obj-y += lx2160a.o ++obj-y += ddr.o ++obj-$(CONFIG_TARGET_LX2160ACEX7) += eth_lx2160acex7.o +diff --git a/board/solidrun/lx2160a/ddr.c b/board/solidrun/lx2160a/ddr.c +new file mode 100644 +index 0000000000..9c7bd10475 +--- /dev/null ++++ b/board/solidrun/lx2160a/ddr.c +@@ -0,0 +1,20 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2019 SolidRun ltd. ++ */ ++ ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int fsl_initdram(void) ++{ ++ gd->ram_size = tfa_get_dram_size(); ++ ++ if (!gd->ram_size) ++ gd->ram_size = fsl_ddr_sdram_size(); ++ ++ return 0; ++} +diff --git a/board/solidrun/lx2160a/eth_lx2160acex7.c b/board/solidrun/lx2160a/eth_lx2160acex7.c +new file mode 100644 +index 0000000000..97e414838f +--- /dev/null ++++ b/board/solidrun/lx2160a/eth_lx2160acex7.c +@@ -0,0 +1,104 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2019 SolidRun ltd. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int board_eth_init(bd_t *bis) ++{ ++#if defined(CONFIG_FSL_MC_ENET) ++ struct memac_mdio_info mdio_info; ++ struct memac_mdio_controller *reg; ++ int i, interface; ++ struct mii_dev *dev; ++ struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++ u32 srds_s1; ++ ++ srds_s1 = in_le32(&gur->rcwsr[28]) & ++ FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_MASK; ++ srds_s1 >>= FSL_CHASSIS3_RCWSR28_SRDS1_PRTCL_SHIFT; ++ ++ reg = (struct memac_mdio_controller *)CONFIG_SYS_FSL_WRIOP1_MDIO1; ++ mdio_info.regs = reg; ++ mdio_info.name = DEFAULT_WRIOP_MDIO1_NAME; ++ ++ /* Register the EMI 1 */ ++ fm_memac_mdio_init(bis, &mdio_info); ++ ++ wriop_set_phy_address(WRIOP1_DPMAC17, 0, ++ RGMII_PHY_ADDR1); ++ reg = (struct memac_mdio_controller *)CONFIG_SYS_FSL_WRIOP1_MDIO2; ++ switch (srds_s1) { ++ case 3: ++ case 5: ++ case 8: ++ case 13: ++ case 14: ++ case 15: ++ case 17: ++ case 20: ++ case 23: ++ wriop_set_phy_address(WRIOP1_DPMAC17, 0, ++ RGMII_PHY_ADDR1); ++ break; ++ ++ default: ++ printf("SerDes1 protocol 0x%x is not supported on LX2160ACEX7\n", ++ srds_s1); ++ goto next; ++ } ++ for (i = WRIOP1_DPMAC17; i <= WRIOP1_DPMAC17; i++) { ++ interface = wriop_get_enet_if(i); ++ switch (interface) { ++ case PHY_INTERFACE_MODE_RGMII: ++ case PHY_INTERFACE_MODE_RGMII_ID: ++ dev = miiphy_get_dev_by_name(DEFAULT_WRIOP_MDIO1_NAME); ++ wriop_set_mdio(i, dev); ++ break; ++ default: ++ break; ++ } ++ } ++ ++next: ++ cpu_eth_init(bis); ++#endif /* CONFIG_FSL_MC_ENET */ ++ ++ return pci_eth_init(bis); ++} ++ ++#if defined(CONFIG_RESET_PHY_R) ++void reset_phy(void) ++{ ++#if defined(CONFIG_FSL_MC_ENET) ++ mc_env_boot(); ++#endif ++} ++#endif /* CONFIG_RESET_PHY_R */ ++ ++int fdt_fixup_board_phy(void *fdt) ++{ ++ int mdio_offset; ++ int ret; ++ struct mii_dev *dev; ++ ++ ret = 0; ++ ++ return ret; ++} +diff --git a/board/solidrun/lx2160a/lx2160a.c b/board/solidrun/lx2160a/lx2160a.c +new file mode 100644 +index 0000000000..b0d9f1012e +--- /dev/null ++++ b/board/solidrun/lx2160a/lx2160a.c +@@ -0,0 +1,288 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright 2019 SolidRun ltd. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "../../freescale/common/vid.h" ++#include ++ ++#ifdef CONFIG_EMC2301 ++#include "../common/emc2301.h" ++#endif ++ ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++static struct pl01x_serial_platdata serial0 = { ++#if CONFIG_CONS_INDEX == 0 ++ .base = CONFIG_SYS_SERIAL0, ++#elif CONFIG_CONS_INDEX == 1 ++ .base = CONFIG_SYS_SERIAL1, ++#else ++#error "Unsupported console index value." ++#endif ++ .type = TYPE_PL011, ++}; ++ ++U_BOOT_DEVICE(nxp_serial0) = { ++ .name = "serial_pl01x", ++ .platdata = &serial0, ++}; ++ ++static struct pl01x_serial_platdata serial1 = { ++ .base = CONFIG_SYS_SERIAL1, ++ .type = TYPE_PL011, ++}; ++ ++U_BOOT_DEVICE(nxp_serial1) = { ++ .name = "serial_pl01x", ++ .platdata = &serial1, ++}; ++ ++int select_i2c_ch_pca9547(u8 ch) ++{ ++ int ret; ++ ++ ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1); ++ if (ret) { ++ puts("PCA: failed to select proper channel\n"); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static void uart_get_clock(void) ++{ ++ serial0.clock = get_serial_clock(); ++ serial1.clock = get_serial_clock(); ++} ++ ++int board_early_init_f(void) ++{ ++#ifdef CONFIG_SYS_I2C_EARLY_INIT ++ i2c_early_init_f(); ++#endif ++ /* get required clock for UART IP */ ++ uart_get_clock(); ++ ++#ifdef CONFIG_EMC2301 ++ select_i2c_ch_pca9547(I2C_MUX_CH_EMC2301); ++ emc2301_init(); ++ set_fan_speed(I2C_EMC2301_PWM); ++ select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); ++#endif ++ fsl_lsch3_early_init_f(); ++ return 0; ++} ++ ++#ifdef CONFIG_OF_BOARD_FIXUP ++int board_fix_fdt(void *fdt) ++{ ++ return 0; ++} ++#endif ++ ++int esdhc_status_fixup(void *blob, const char *compat) ++{ ++ /* Enable both esdhc DT nodes for LX2160ARDB */ ++ do_fixup_by_compat(blob, compat, "status", "okay", ++ sizeof("okay"), 1); ++ return 0; ++} ++ ++#if defined(CONFIG_VID) ++int i2c_multiplexer_select_vid_channel(u8 channel) ++{ ++ return select_i2c_ch_pca9547(channel); ++} ++ ++#endif ++ ++int checkboard(void) ++{ ++ enum boot_src src = get_boot_src(); ++ char buf[64]; ++ cpu_name(buf); ++ printf("Board: %s-CEX7, ", buf); ++ ++ if (src == BOOT_SOURCE_SD_MMC) { ++ puts("SD\n"); ++ } ++ puts("SERDES1 Reference: Clock1 = 161.13MHz Clock2 = 100MHz\n"); ++ puts("SERDES2 Reference: Clock1 = 100MHz Clock2 = 100MHz\n"); ++ puts("SERDES3 Reference: Clock1 = 100MHz Clock2 = 100Hz\n"); ++ return 0; ++} ++ ++int config_board_mux(void) ++{ ++ return 0; ++} ++ ++unsigned long get_board_sys_clk(void) ++{ ++ return 100000000; ++} ++ ++unsigned long get_board_ddr_clk(void) ++{ ++ return 100000000; ++} ++ ++int board_init(void) ++{ ++#ifdef CONFIG_ENV_IS_NOWHERE ++ gd->env_addr = (ulong)&default_environment[0]; ++#endif ++ ++ select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); ++ ++#ifdef CONFIG_FSL_CAAM ++ sec_init(); ++#endif ++ ++ return 0; ++} ++ ++void detail_board_ddr_info(void) ++{ ++ int i; ++ u64 ddr_size = 0; ++ ++ puts("\nDDR "); ++ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) ++ ddr_size += gd->bd->bi_dram[i].size; ++ print_size(ddr_size, ""); ++ print_ddr_info(0); ++} ++ ++#if defined(CONFIG_ARCH_MISC_INIT) ++int arch_misc_init(void) ++{ ++ config_board_mux(); ++ ++ return 0; ++} ++#endif ++ ++#ifdef CONFIG_FSL_MC_ENET ++extern int fdt_fixup_board_phy(void *fdt); ++ ++void fdt_fixup_board_enet(void *fdt) ++{ ++ int offset; ++ ++ offset = fdt_path_offset(fdt, "/soc/fsl-mc"); ++ ++ if (offset < 0) ++ offset = fdt_path_offset(fdt, "/fsl-mc"); ++ ++ if (offset < 0) { ++ printf("%s: fsl-mc node not found in device tree (error %d)\n", ++ __func__, offset); ++ return; ++ } ++ ++ if (get_mc_boot_status() == 0 && ++ (is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) { ++ fdt_status_okay(fdt, offset); ++ fdt_fixup_board_phy(fdt); ++ } else { ++ fdt_status_fail(fdt, offset); ++ } ++} ++ ++void board_quiesce_devices(void) ++{ ++ fsl_mc_ldpaa_exit(gd->bd); ++} ++#endif ++ ++#ifdef CONFIG_OF_BOARD_SETUP ++ ++int ft_board_setup(void *blob, bd_t *bd) ++{ ++ int i; ++ bool mc_memory_bank = false; ++ ++ u64 *base; ++ u64 *size; ++ u64 mc_memory_base = 0; ++ u64 mc_memory_size = 0; ++ u16 total_memory_banks; ++ ++ ft_cpu_setup(blob, bd); ++ ++ fdt_fixup_mc_ddr(&mc_memory_base, &mc_memory_size); ++ ++ if (mc_memory_base != 0) ++ mc_memory_bank = true; ++ ++ total_memory_banks = CONFIG_NR_DRAM_BANKS + mc_memory_bank; ++ ++ base = calloc(total_memory_banks, sizeof(u64)); ++ size = calloc(total_memory_banks, sizeof(u64)); ++ ++ /* fixup DT for the three GPP DDR banks */ ++ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { ++ base[i] = gd->bd->bi_dram[i].start; ++ size[i] = gd->bd->bi_dram[i].size; ++ } ++ ++#ifdef CONFIG_RESV_RAM ++ /* reduce size if reserved memory is within this bank */ ++ if (gd->arch.resv_ram >= base[0] && ++ gd->arch.resv_ram < base[0] + size[0]) ++ size[0] = gd->arch.resv_ram - base[0]; ++ else if (gd->arch.resv_ram >= base[1] && ++ gd->arch.resv_ram < base[1] + size[1]) ++ size[1] = gd->arch.resv_ram - base[1]; ++ else if (gd->arch.resv_ram >= base[2] && ++ gd->arch.resv_ram < base[2] + size[2]) ++ size[2] = gd->arch.resv_ram - base[2]; ++#endif ++ ++ if (mc_memory_base != 0) { ++ for (i = 0; i <= total_memory_banks; i++) { ++ if (base[i] == 0 && size[i] == 0) { ++ base[i] = mc_memory_base; ++ size[i] = mc_memory_size; ++ break; ++ } ++ } ++ } ++ ++ fdt_fixup_memory_banks(blob, base, size, total_memory_banks); ++ ++#ifdef CONFIG_USB ++ fsl_fdt_fixup_dr_usb(blob, bd); ++#endif ++ ++#ifdef CONFIG_FSL_MC_ENET ++ fdt_fsl_mc_fixup_iommu_map_entry(blob); ++ fdt_fixup_board_enet(blob); ++#endif ++ ++ return 0; ++} ++#endif +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0007-lx2160a-load-dpl-into-0x80001000-instead-of-0x80d000.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0007-lx2160a-load-dpl-into-0x80001000-instead-of-0x80d000.patch new file mode 100644 index 00000000..b5d2d161 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0007-lx2160a-load-dpl-into-0x80001000-instead-of-0x80d000.patch @@ -0,0 +1,47 @@ +From 422b44970b160ee2e8752552a6232e50106a7bd8 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 4 May 2020 23:09:52 +0300 +Subject: [PATCH 07/17] lx2160a: load dpl into 0x80001000 instead of 0x80d00000 + +and enlarge the image size to 0x1000 blocks + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + include/configs/lx2160a_common.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h +index c6a6a96ff0..5b9808b2ef 100644 +--- a/include/configs/lx2160a_common.h ++++ b/include/configs/lx2160a_common.h +@@ -293,21 +293,21 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); + + #define SD_BOOTCOMMAND \ + "env exists mcinitcmd && mmcinfo; " \ +- "mmc read 0x80d00000 0x6800 0x800; " \ ++ "mmc read 0x80001000 0x6800 0x1000; " \ + "env exists mcinitcmd && env exists secureboot " \ + " && mmc read 0x806C0000 0x3600 0x20 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ +- "&& fsl_mc lazyapply dpl 0x80d00000;" \ ++ "&& fsl_mc lazyapply dpl 0x80001000;" \ + "run distro_bootcmd;run sd_bootcmd;" \ + "env exists secureboot && esbc_halt;" + + #define SD2_BOOTCOMMAND \ + "mmc dev 1; env exists mcinitcmd && mmcinfo; " \ +- "mmc read 0x80d00000 0x6800 0x800; " \ ++ "mmc read 0x80001000 0x6800 0x1000; " \ + "env exists mcinitcmd && env exists secureboot " \ + " && mmc read 0x806C0000 0x3600 0x20 " \ + "&& esbc_validate 0x806C0000;env exists mcinitcmd " \ +- "&& fsl_mc lazyapply dpl 0x80d00000;" \ ++ "&& fsl_mc lazyapply dpl 0x80001000;" \ + "run distro_bootcmd;run emmc_bootcmd;" \ + "env exists secureboot && esbc_halt;" + +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0008-uboot-add-nvme-commands-and-for-distroboot.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0008-uboot-add-nvme-commands-and-for-distroboot.patch new file mode 100644 index 00000000..6ea81105 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0008-uboot-add-nvme-commands-and-for-distroboot.patch @@ -0,0 +1,41 @@ +From 8fa576d659e4710eae0b62aadd7717846c64746c Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 11 Nov 2019 23:45:31 +0200 +Subject: [PATCH 08/17] uboot - add nvme commands and for distroboot + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + configs/lx2160acex7_tfa_defconfig | 2 ++ + include/configs/lx2160a_common.h | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +index d59de7d054..3891d2a7c4 100644 +--- a/configs/lx2160acex7_tfa_defconfig ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -25,6 +25,8 @@ CONFIG_CMD_PCI=y + CONFIG_CMD_SF=y + CONFIG_CMD_USB=y + CONFIG_CMD_CACHE=y ++CONFIG_CMD_NVME=y ++CONFIG_NVME=y + CONFIG_MP=y + CONFIG_OF_CONTROL=y + CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7" +diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h +index 5b9808b2ef..e31738d3a3 100644 +--- a/include/configs/lx2160a_common.h ++++ b/include/configs/lx2160a_common.h +@@ -316,6 +316,7 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(SCSI, scsi, 0) \ ++ func(NVME, nvme, 0) \ + func(DHCP, dhcp, na) + #include + +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0009-armv8-lx2160acex7-Fix-booting-from-NVMe-drives.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0009-armv8-lx2160acex7-Fix-booting-from-NVMe-drives.patch new file mode 100644 index 00000000..e813e423 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0009-armv8-lx2160acex7-Fix-booting-from-NVMe-drives.patch @@ -0,0 +1,33 @@ +From aeefed55fa39f4fc5acb2bd22fdde4dc97924d22 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 13:32:09 +0200 +Subject: [PATCH 09/17] armv8: lx2160acex7: Fix booting from NVMe drives + +Currently NVMe is not initialized so u-boot fails to read kernel from +NVMe drive. This patch modifies default environment so it initializes +NVMe as part of default startup script... + +Credit to Damjan Marion on fixing that on LSDK-19.09. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + include/configs/lx2160a_common.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h +index e31738d3a3..91e9a2470f 100644 +--- a/include/configs/lx2160a_common.h ++++ b/include/configs/lx2160a_common.h +@@ -261,6 +261,7 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); + BOOTENV \ + "mcmemsize=0x70000000\0" \ + XSPI_MC_INIT_CMD \ ++ "nvme_need_init=true\0" \ + "scan_dev_for_boot_part=" \ + "part list ${devtype} ${devnum} devplist; " \ + "env exists devplist || setenv devplist 1; " \ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0010-nvme-add-accessor-to-namespace-id-and-eui64.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0010-nvme-add-accessor-to-namespace-id-and-eui64.patch new file mode 100644 index 00000000..d8de8a38 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0010-nvme-add-accessor-to-namespace-id-and-eui64.patch @@ -0,0 +1,90 @@ +From 89dbced60971ec1d01386b0457c20e045cbfe5ad Mon Sep 17 00:00:00 2001 +From: Patrick Wildt +Date: Thu, 3 Oct 2019 13:48:47 +0200 +Subject: [PATCH 10/17] nvme: add accessor to namespace id and eui64 + +This adds a function which can be used by e.g. EFI to retrieve +the namespace identifier and EUI64. For that it adds the EUI64 +to its driver internal namespace structure and copies the EUI64 +during namespace identification. + +Upstream-Status: Backport [Solid-Run BSP] + +Signed-off-by: Patrick Wildt +Tested-by: Heinrich Schuchardt +Reviewed-by: Bin Meng +(cherry picked from commit c50b2883dfc1ce355dc37238741ef97cd2c5d000) +Signed-off-by: Olof Johansson +--- + drivers/nvme/nvme.c | 13 +++++++++++++ + drivers/nvme/nvme.h | 1 + + include/nvme.h | 12 ++++++++++++ + 3 files changed, 26 insertions(+) + +diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c +index 47f101e280..ee6b581d9e 100644 +--- a/drivers/nvme/nvme.c ++++ b/drivers/nvme/nvme.c +@@ -621,6 +621,18 @@ static int nvme_get_info_from_identify(struct nvme_dev *dev) + return 0; + } + ++int nvme_get_namespace_id(struct udevice *udev, u32 *ns_id, u8 *eui64) ++{ ++ struct nvme_ns *ns = dev_get_priv(udev); ++ ++ if (ns_id) ++ *ns_id = ns->ns_id; ++ if (eui64) ++ memcpy(eui64, ns->eui64, sizeof(ns->eui64)); ++ ++ return 0; ++} ++ + int nvme_scan_namespace(void) + { + struct uclass *uc; +@@ -657,6 +669,7 @@ static int nvme_blk_probe(struct udevice *udev) + if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) + return -EIO; + ++ memcpy(&ns->eui64, &id->eui64, sizeof(id->eui64)); + flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK; + ns->flbas = flbas; + ns->lba_shift = id->lbaf[flbas].ds; +diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h +index 922f7abfe8..0e8cb221a7 100644 +--- a/drivers/nvme/nvme.h ++++ b/drivers/nvme/nvme.h +@@ -637,6 +637,7 @@ struct nvme_ns { + struct list_head list; + struct nvme_dev *dev; + unsigned ns_id; ++ u8 eui64[8]; + int devnum; + int lba_shift; + u8 flbas; +diff --git a/include/nvme.h b/include/nvme.h +index 2c3d14d241..2cdf8ce320 100644 +--- a/include/nvme.h ++++ b/include/nvme.h +@@ -78,4 +78,16 @@ int nvme_scan_namespace(void); + */ + int nvme_print_info(struct udevice *udev); + ++/** ++ * nvme_get_namespace_id - return namespace identifier ++ * ++ * This returns the namespace identifier. ++ * ++ * @udev: NVMe controller device ++ * @ns_id: Place where to put the name space identifier ++ * @eui64: Place where to put the IEEE Extended Unique Identifier ++ * @return: 0 on success, -ve on error ++ */ ++int nvme_get_namespace_id(struct udevice *udev, u32 *ns_id, u8 *eui64); ++ + #endif /* __NVME_H__ */ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0011-nvme-flush-dcache-on-both-r-w-and-the-prp-list.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0011-nvme-flush-dcache-on-both-r-w-and-the-prp-list.patch new file mode 100644 index 00000000..0e0c8d54 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0011-nvme-flush-dcache-on-both-r-w-and-the-prp-list.patch @@ -0,0 +1,51 @@ +From bdc721890d0a68d297959052394da75112080bfe Mon Sep 17 00:00:00 2001 +From: Patrick Wildt +Date: Wed, 16 Oct 2019 23:22:50 +0200 +Subject: [PATCH 11/17] nvme: flush dcache on both r/w, and the prp list + +It's possible that the data cache for the buffer still holds data +to be flushed to memory, since the buffer was probably used as stack +before. Thus we need to make sure to flush it also on reads, since +it's possible that the cache is automatically flused to memory after +the NVMe DMA transfer happened, thus overwriting the NVMe transfer's +data. Also add a missing dcache flush for the prp list. + +Upstream-Status: Backport [Solid-Run BSP] + +Signed-off-by: Patrick Wildt +Reviewed-by: Bin Meng +(cherry picked from commit 8c403402ca691c967516481b6bc2c879d683a73d) +Signed-off-by: Olof Johansson +--- + drivers/nvme/nvme.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c +index ee6b581d9e..53ff6e89aa 100644 +--- a/drivers/nvme/nvme.c ++++ b/drivers/nvme/nvme.c +@@ -123,6 +123,9 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2, + } + *prp2 = (ulong)dev->prp_pool; + ++ flush_dcache_range((ulong)dev->prp_pool, (ulong)dev->prp_pool + ++ dev->prp_entry_num * sizeof(u64)); ++ + return 0; + } + +@@ -705,9 +708,8 @@ static ulong nvme_blk_rw(struct udevice *udev, lbaint_t blknr, + u16 lbas = 1 << (dev->max_transfer_shift - ns->lba_shift); + u64 total_lbas = blkcnt; + +- if (!read) +- flush_dcache_range((unsigned long)buffer, +- (unsigned long)buffer + total_len); ++ flush_dcache_range((unsigned long)buffer, ++ (unsigned long)buffer + total_len); + + c.rw.opcode = read ? nvme_cmd_read : nvme_cmd_write; + c.rw.flags = 0; +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0012-nvme-use-page-aligned-buffer-for-identify-command.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0012-nvme-use-page-aligned-buffer-for-identify-command.patch new file mode 100644 index 00000000..c82cd649 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0012-nvme-use-page-aligned-buffer-for-identify-command.patch @@ -0,0 +1,94 @@ +From f6b1bf35c4423eb1f038eca80df4f7d6862f338a Mon Sep 17 00:00:00 2001 +From: Patrick Wildt +Date: Wed, 16 Oct 2019 08:42:04 +0200 +Subject: [PATCH 12/17] nvme: use page-aligned buffer for identify command + +Change the stack-allocated buffer for the identification command +to explicitly allocate page-aligned buffers. Even though the spec +seems to allow having admin queue commands on non page-aligned +buffers, it seems to not be possible on my i.MX8MQ board with a +a Silicon Power P34A80. Since all of the NVMe drivers I have seen +always do admin commands on a page-aligned buffer, which does work +on my system, it makes sense for us to do that as well. + +Upstream-Status: Backport [Solid-Run BSP] + +Signed-off-by: Patrick Wildt +Reviewed-by: Bin Meng +(cherry picked from commit 2f83481dff9c4f253a6ac341911d78d4984ca07b) +Signed-off-by: Olof Johansson +--- + drivers/nvme/nvme.c | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) + +diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c +index 53ff6e89aa..f915817aaa 100644 +--- a/drivers/nvme/nvme.c ++++ b/drivers/nvme/nvme.c +@@ -583,14 +583,19 @@ static int nvme_setup_io_queues(struct nvme_dev *dev) + + static int nvme_get_info_from_identify(struct nvme_dev *dev) + { +- ALLOC_CACHE_ALIGN_BUFFER(char, buf, sizeof(struct nvme_id_ctrl)); +- struct nvme_id_ctrl *ctrl = (struct nvme_id_ctrl *)buf; ++ struct nvme_id_ctrl *ctrl; + int ret; + int shift = NVME_CAP_MPSMIN(dev->cap) + 12; + ++ ctrl = memalign(dev->page_size, sizeof(struct nvme_id_ctrl)); ++ if (!ctrl) ++ return -ENOMEM; ++ + ret = nvme_identify(dev, 0, 1, (dma_addr_t)(long)ctrl); +- if (ret) ++ if (ret) { ++ free(ctrl); + return -EIO; ++ } + + dev->nn = le32_to_cpu(ctrl->nn); + dev->vwc = ctrl->vwc; +@@ -621,6 +626,7 @@ static int nvme_get_info_from_identify(struct nvme_dev *dev) + dev->max_transfer_shift = 20; + } + ++ free(ctrl); + return 0; + } + +@@ -661,16 +667,21 @@ static int nvme_blk_probe(struct udevice *udev) + struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct nvme_ns *ns = dev_get_priv(udev); + u8 flbas; +- ALLOC_CACHE_ALIGN_BUFFER(char, buf, sizeof(struct nvme_id_ns)); +- struct nvme_id_ns *id = (struct nvme_id_ns *)buf; + struct pci_child_platdata *pplat; ++ struct nvme_id_ns *id; ++ ++ id = memalign(ndev->page_size, sizeof(struct nvme_id_ns)); ++ if (!id) ++ return -ENOMEM; + + memset(ns, 0, sizeof(*ns)); + ns->dev = ndev; + /* extract the namespace id from the block device name */ + ns->ns_id = trailing_strtol(udev->name) + 1; +- if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) ++ if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) { ++ free(id); + return -EIO; ++ } + + memcpy(&ns->eui64, &id->eui64, sizeof(id->eui64)); + flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK; +@@ -689,6 +700,7 @@ static int nvme_blk_probe(struct udevice *udev) + memcpy(desc->product, ndev->serial, sizeof(ndev->serial)); + memcpy(desc->revision, ndev->firmware_rev, sizeof(ndev->firmware_rev)); + ++ free(id); + return 0; + } + +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0013-lx2160a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0013-lx2160a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch new file mode 100644 index 00000000..0ccb2eb9 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0013-lx2160a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch @@ -0,0 +1,923 @@ +From 4672d506d0abfba7890b2719b7b53f3694b88d06 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 3 Feb 2020 14:26:55 +0200 +Subject: [PATCH 13/17] lx2160a-cex7 : move from lsdk-19.06 to lsdk-19.09 + +Following is a list of changes - +1. I2C moved to DM model +2. removed emc2301 support +3. synchronized vid.c with NXP's driver. But it is still not functional +in u-boot +4. Added eMMC to distroboot target list + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm/dts/fsl-lx2160a-cex7.dts | 14 + + board/solidrun/common/Makefile | 1 - + board/solidrun/common/emc2301.c | 31 -- + board/solidrun/common/vid.c | 638 +++++++++++++++++++++++++++++- + board/solidrun/lx2160a/lx2160a.c | 8 + + configs/lx2160acex7_tfa_defconfig | 8 +- + 6 files changed, 665 insertions(+), 35 deletions(-) + delete mode 100644 board/solidrun/common/emc2301.c + +diff --git a/arch/arm/dts/fsl-lx2160a-cex7.dts b/arch/arm/dts/fsl-lx2160a-cex7.dts +index 4fbcaafb0e..4ca67df25a 100644 +--- a/arch/arm/dts/fsl-lx2160a-cex7.dts ++++ b/arch/arm/dts/fsl-lx2160a-cex7.dts +@@ -46,6 +46,20 @@ + status = "okay"; + }; + ++&i2c0 { ++ status = "okay"; ++ u-boot,dm-pre-reloc; ++}; ++ ++&i2c4 { ++ status = "okay"; ++ ++ rtc@51 { ++ compatible = "pcf2127-rtc"; ++ reg = <0x51>; ++ }; ++}; ++ + &sata0 { + status = "okay"; + }; +diff --git a/board/solidrun/common/Makefile b/board/solidrun/common/Makefile +index 454a18e2f9..c335c658d4 100644 +--- a/board/solidrun/common/Makefile ++++ b/board/solidrun/common/Makefile +@@ -16,7 +16,6 @@ ifdef MINIMAL + obj- := __dummy__.o + else + obj-$(CONFIG_VID) += vid.o +-obj-$(CONFIG_EMC2301) += emc2301.o + ifdef CONFIG_SECURE_BOOT + obj-$(CONFIG_CMD_ESBC_VALIDATE) += fsl_validate.o cmd_esbc_validate.o + endif +diff --git a/board/solidrun/common/emc2301.c b/board/solidrun/common/emc2301.c +deleted file mode 100644 +index a4780dbfcc..0000000000 +--- a/board/solidrun/common/emc2301.c ++++ /dev/null +@@ -1,31 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0+ +-/* +- * Copyright 2019 SolidRun ltd. Based on code from NXP LX2160A RDB +- * +- * SPDX-License-Identifier: GPL-2.0+ +- */ +- +-#include +-#include +-#include +-#include +- +-#include "emc2301.h" +- +-DECLARE_GLOBAL_DATA_PTR; +- +-void set_fan_speed(u8 data) +-{ +- if (i2c_write(I2C_EMC2301_ADDR, I2C_EMC2301_FAN, 1, &data, 1) != 0) { +- puts("Error: failed to change fan speed\n"); +- } +-} +- +-void emc2301_init(void) +-{ +- u8 data; +- +- data = I2C_EMC2301_CMD; +- if (i2c_write(I2C_EMC2301_ADDR, I2C_EMC2301_CONF, 1, &data, 1) != 0) +- puts("Error: failed to configure EMC2301\n"); +-} +diff --git a/board/solidrun/common/vid.c b/board/solidrun/common/vid.c +index cc81e80c37..c7a626fd4f 100644 +--- a/board/solidrun/common/vid.c ++++ b/board/solidrun/common/vid.c +@@ -1,8 +1,9 @@ + // SPDX-License-Identifier: GPL-2.0+ + /* + * Copyright 2014 Freescale Semiconductor, Inc. +- * Copyright 2018 NXP ++ * Copyright 2019 NXP + */ ++ + #include + #include + #include +@@ -38,6 +39,52 @@ int __weak board_adjust_vdd(int vdd) + return 0; + } + ++#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ ++ defined(CONFIG_VOL_MONITOR_IR36021_READ) ++/* ++ * Get the i2c address configuration for the IR regulator chip ++ * ++ * There are some variance in the RDB HW regarding the I2C address configuration ++ * for the IR regulator chip, which is likely a problem of external resistor ++ * accuracy. So we just check each address in a hopefully non-intrusive mode ++ * and use the first one that seems to work ++ * ++ * The IR chip can show up under the following addresses: ++ * 0x08 (Verified on T1040RDB-PA,T4240RDB-PB,X-T4240RDB-16GPA) ++ * 0x09 (Verified on T1040RDB-PA) ++ * 0x38 (Verified on T2080QDS, T2081QDS, T4240RDB) ++ */ ++static int find_ir_chip_on_i2c(void) ++{ ++ int i2caddress; ++ int ret; ++ u8 byte; ++ int i; ++ const int ir_i2c_addr[] = {0x38, 0x08, 0x09}; ++#ifdef CONFIG_DM_I2C ++ struct udevice *dev; ++#endif ++ ++ /* Check all the address */ ++ for (i = 0; i < (sizeof(ir_i2c_addr)/sizeof(ir_i2c_addr[0])); i++) { ++ i2caddress = ir_i2c_addr[i]; ++#ifndef CONFIG_DM_I2C ++ ret = i2c_read(i2caddress, ++ IR36021_MFR_ID_OFFSET, 1, (void *)&byte, ++ sizeof(byte)); ++#else ++ ret = i2c_get_chip_for_busnum(0, i2caddress, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_read(dev, IR36021_MFR_ID_OFFSET, ++ (void *)&byte, sizeof(byte)); ++#endif ++ if ((ret >= 0) && (byte == IR36021_MFR_ID)) ++ return i2caddress; ++ } ++ return -1; ++} ++#endif ++ + /* Maximum loop count waiting for new voltage to take effect */ + #define MAX_LOOP_WAIT_NEW_VOL 100 + /* Maximum loop count waiting for the voltage to be stable */ +@@ -60,23 +107,135 @@ int __weak board_adjust_vdd(int vdd) + #define ADC_MIN_ACCURACY 4 + #endif + ++#ifdef CONFIG_VOL_MONITOR_INA220 ++static int read_voltage_from_INA220(int i2caddress) ++{ ++ int i, ret, voltage_read = 0; ++ u16 vol_mon; ++ u8 buf[2]; ++#ifdef CONFIG_DM_I2C ++ struct udevice *dev; ++#endif ++ ++ for (i = 0; i < NUM_READINGS; i++) { ++#ifndef CONFIG_DM_I2C ++ ret = i2c_read(I2C_VOL_MONITOR_ADDR, ++ I2C_VOL_MONITOR_BUS_V_OFFSET, 1, ++ (void *)&buf, 2); ++#else ++ ret = i2c_get_chip_for_busnum(0, I2C_VOL_MONITOR_ADDR, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_read(dev, I2C_VOL_MONITOR_BUS_V_OFFSET, ++ (void *)&buf, 2); ++#endif ++ if (ret) { ++ printf("VID: failed to read core voltage\n"); ++ return ret; ++ } ++ vol_mon = (buf[0] << 8) | buf[1]; ++ if (vol_mon & I2C_VOL_MONITOR_BUS_V_OVF) { ++ printf("VID: Core voltage sensor error\n"); ++ return -1; ++ } ++ debug("VID: bus voltage reads 0x%04x\n", vol_mon); ++ /* LSB = 4mv */ ++ voltage_read += (vol_mon >> I2C_VOL_MONITOR_BUS_V_SHIFT) * 4; ++ udelay(WAIT_FOR_ADC); ++ } ++ /* calculate the average */ ++ voltage_read /= NUM_READINGS; ++ ++ return voltage_read; ++} ++#endif ++ ++/* read voltage from IR */ ++#ifdef CONFIG_VOL_MONITOR_IR36021_READ ++static int read_voltage_from_IR(int i2caddress) ++{ ++ int i, ret, voltage_read = 0; ++ u16 vol_mon; ++ u8 buf; ++#ifdef CONFIG_DM_I2C ++ struct udevice *dev; ++#endif ++ ++ for (i = 0; i < NUM_READINGS; i++) { ++#ifndef CONFIG_DM_I2C ++ ret = i2c_read(i2caddress, ++ IR36021_LOOP1_VOUT_OFFSET, ++ 1, (void *)&buf, 1); ++#else ++ ret = i2c_get_chip_for_busnum(0, i2caddress, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_read(dev, IR36021_LOOP1_VOUT_OFFSET, ++ (void *)&buf, 1); ++#endif ++ if (ret) { ++ printf("VID: failed to read vcpu\n"); ++ return ret; ++ } ++ vol_mon = buf; ++ if (!vol_mon) { ++ printf("VID: Core voltage sensor error\n"); ++ return -1; ++ } ++ debug("VID: bus voltage reads 0x%02x\n", vol_mon); ++ /* Resolution is 1/128V. We scale up here to get 1/128mV ++ * and divide at the end ++ */ ++ voltage_read += vol_mon * 1000; ++ udelay(WAIT_FOR_ADC); ++ } ++ /* Scale down to the real mV as IR resolution is 1/128V, rounding up */ ++ voltage_read = DIV_ROUND_UP(voltage_read, 128); ++ ++ /* calculate the average */ ++ voltage_read /= NUM_READINGS; ++ ++ /* Compensate for a board specific voltage drop between regulator and ++ * SoC before converting into an IR VID value ++ */ ++ voltage_read -= board_vdd_drop_compensation(); ++ ++ return voltage_read; ++} ++#endif ++ ++#ifdef CONFIG_VOL_MONITOR_LTC3882_READ + /* read the current value of the LTC Regulator Voltage */ + static int read_voltage_from_LTC(int i2caddress) + { + int ret, vcode = 0; + u8 chan = PWM_CHANNEL0; + ++#ifndef CONFIG_DM_I2C + /* select the PAGE 0 using PMBus commands PAGE for VDD*/ + ret = i2c_write(I2C_VOL_MONITOR_ADDR, + PMBUS_CMD_PAGE, 1, &chan, 1); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, I2C_VOL_MONITOR_ADDR, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_write(dev, PMBUS_CMD_PAGE, &chan, 1); ++#endif + if (ret) { + printf("VID: failed to select VDD Page 0\n"); + return ret; + } + ++#ifndef CONFIG_DM_I2C + /*read the output voltage using PMBus command READ_VOUT*/ + ret = i2c_read(I2C_VOL_MONITOR_ADDR, + PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2); ++#else ++ ret = dm_i2c_read(dev, PMBUS_CMD_READ_VOUT, (void *)&vcode, 2); ++ if (ret) { ++ printf("VID: failed to read the volatge\n"); ++ return ret; ++ } ++#endif + if (ret) { + printf("VID: failed to read the volatge\n"); + return ret; +@@ -87,14 +246,131 @@ static int read_voltage_from_LTC(int i2caddress) + + return vcode; + } ++#endif + + static int read_voltage(int i2caddress) + { + int voltage_read; ++#ifdef CONFIG_VOL_MONITOR_INA220 ++ voltage_read = read_voltage_from_INA220(i2caddress); ++#elif defined CONFIG_VOL_MONITOR_IR36021_READ ++ voltage_read = read_voltage_from_IR(i2caddress); ++#elif defined CONFIG_VOL_MONITOR_LTC3882_READ + voltage_read = read_voltage_from_LTC(i2caddress); ++#else ++ return -1; ++#endif + return voltage_read; + } + ++#ifdef CONFIG_VOL_MONITOR_IR36021_SET ++/* ++ * We need to calculate how long before the voltage stops to drop ++ * or increase. It returns with the loop count. Each loop takes ++ * several readings (WAIT_FOR_ADC) ++ */ ++static int wait_for_new_voltage(int vdd, int i2caddress) ++{ ++ int timeout, vdd_current; ++ ++ vdd_current = read_voltage(i2caddress); ++ /* wait until voltage starts to reach the target. Voltage slew ++ * rates by typical regulators will always lead to stable readings ++ * within each fairly long ADC interval in comparison to the ++ * intended voltage delta change until the target voltage is ++ * reached. The fairly small voltage delta change to any target ++ * VID voltage also means that this function will always complete ++ * within few iterations. If the timeout was ever reached, it would ++ * point to a serious failure in the regulator system. ++ */ ++ for (timeout = 0; ++ abs(vdd - vdd_current) > (IR_VDD_STEP_UP + IR_VDD_STEP_DOWN) && ++ timeout < MAX_LOOP_WAIT_NEW_VOL; timeout++) { ++ vdd_current = read_voltage(i2caddress); ++ } ++ if (timeout >= MAX_LOOP_WAIT_NEW_VOL) { ++ printf("VID: Voltage adjustment timeout\n"); ++ return -1; ++ } ++ return timeout; ++} ++ ++/* ++ * this function keeps reading the voltage until it is stable or until the ++ * timeout expires ++ */ ++static int wait_for_voltage_stable(int i2caddress) ++{ ++ int timeout, vdd_current, vdd; ++ ++ vdd = read_voltage(i2caddress); ++ udelay(NUM_READINGS * WAIT_FOR_ADC); ++ ++ /* wait until voltage is stable */ ++ vdd_current = read_voltage(i2caddress); ++ /* The maximum timeout is ++ * MAX_LOOP_WAIT_VOL_STABLE * NUM_READINGS * WAIT_FOR_ADC ++ */ ++ for (timeout = MAX_LOOP_WAIT_VOL_STABLE; ++ abs(vdd - vdd_current) > ADC_MIN_ACCURACY && ++ timeout > 0; timeout--) { ++ vdd = vdd_current; ++ udelay(NUM_READINGS * WAIT_FOR_ADC); ++ vdd_current = read_voltage(i2caddress); ++ } ++ if (timeout == 0) ++ return -1; ++ return vdd_current; ++} ++ ++/* Set the voltage to the IR chip */ ++static int set_voltage_to_IR(int i2caddress, int vdd) ++{ ++ int wait, vdd_last; ++ int ret; ++ u8 vid; ++ ++ /* Compensate for a board specific voltage drop between regulator and ++ * SoC before converting into an IR VID value ++ */ ++ vdd += board_vdd_drop_compensation(); ++#ifdef CONFIG_FSL_LSCH2 ++ vid = DIV_ROUND_UP(vdd - 265, 5); ++#else ++ vid = DIV_ROUND_UP(vdd - 245, 5); ++#endif ++ ++#ifndef CONFIG_DM_I2C ++ ret = i2c_write(i2caddress, IR36021_LOOP1_MANUAL_ID_OFFSET, ++ 1, (void *)&vid, sizeof(vid)); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, i2caddress, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_write(dev, IR36021_LOOP1_MANUAL_ID_OFFSET, ++ (void *)&vid, sizeof(vid)); ++ ++#endif ++ if (ret) { ++ printf("VID: failed to write VID\n"); ++ return -1; ++ } ++ wait = wait_for_new_voltage(vdd, i2caddress); ++ if (wait < 0) ++ return -1; ++ debug("VID: Waited %d us\n", wait * NUM_READINGS * WAIT_FOR_ADC); ++ ++ vdd_last = wait_for_voltage_stable(i2caddress); ++ if (vdd_last < 0) ++ return -1; ++ debug("VID: Current voltage is %d mV\n", vdd_last); ++ return vdd_last; ++} ++ ++#endif ++ ++#ifdef CONFIG_VOL_MONITOR_LTC3882_SET + /* this function sets the VDD and returns the value set */ + static int set_voltage_to_LTC(int i2caddress, int vdd) + { +@@ -111,8 +387,17 @@ static int set_voltage_to_LTC(int i2caddress, int vdd) + vdd & 0xFF, (vdd & 0xFF00) >> 8}; + + /* Write the desired voltage code to the regulator */ ++#ifndef CONFIG_DM_I2C + ret = i2c_write(I2C_VOL_MONITOR_ADDR, + PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, I2C_VOL_MONITOR_ADDR, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_write(dev, PMBUS_CMD_PAGE_PLUS_WRITE, ++ (void *)&buff, 5); ++#endif + if (ret) { + printf("VID: I2C failed to write to the volatge regulator\n"); + return -1; +@@ -131,25 +416,39 @@ static int set_voltage_to_LTC(int i2caddress, int vdd) + + return vdd_last; + } ++#endif + + static int set_voltage(int i2caddress, int vdd) + { + int vdd_last = -1; + ++#ifdef CONFIG_VOL_MONITOR_IR36021_SET ++ vdd_last = set_voltage_to_IR(i2caddress, vdd); ++#elif defined CONFIG_VOL_MONITOR_LTC3882_SET + vdd_last = set_voltage_to_LTC(i2caddress, vdd); ++#else ++ #error Specific voltage monitor must be defined ++#endif + return vdd_last; + } + ++#ifdef CONFIG_FSL_LSCH3 + int adjust_vdd(ulong vdd_override) + { + int re_enable = disable_interrupts(); + struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); + u32 fusesr; ++#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ ++ defined(CONFIG_VOL_MONITOR_IR36021_READ) ++ u8 vid, buf; ++#else + u8 vid; ++#endif + int vdd_target, vdd_current, vdd_last; + int ret, i2caddress; + unsigned long vdd_string_override; + char *vdd_string; ++#ifdef CONFIG_ARCH_LX2160A + static const u16 vdd[32] = { + 8250, + 7875, +@@ -184,16 +483,129 @@ int adjust_vdd(ulong vdd_override) + 0, /* reserved */ + 0, /* reserved */ + }; ++#else ++#ifdef CONFIG_ARCH_LS1088A ++ static const uint16_t vdd[32] = { ++ 10250, ++ 9875, ++ 9750, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 9000, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 10000, /* 1.0000V */ ++ 10125, ++ 10250, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ }; ++ ++#else ++ static const uint16_t vdd[32] = { ++ 10500, ++ 0, /* reserved */ ++ 9750, ++ 0, /* reserved */ ++ 9500, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 9000, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 10000, /* 1.0000V */ ++ 0, /* reserved */ ++ 10250, ++ 0, /* reserved */ ++ 10500, ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ 0, /* reserved */ ++ }; ++#endif ++#endif + struct vdd_drive { + u8 vid; + unsigned voltage; + }; ++ + ret = i2c_multiplexer_select_vid_channel(I2C_MUX_CH_VOL_MONITOR); + if (ret) { + debug("VID: I2C failed to switch channel\n"); + ret = -1; + goto exit; + } ++#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ ++ defined(CONFIG_VOL_MONITOR_IR36021_READ) ++ ret = find_ir_chip_on_i2c(); ++ if (ret < 0) { ++ printf("VID: Could not find voltage regulator on I2C.\n"); ++ ret = -1; ++ goto exit; ++ } else { ++ i2caddress = ret; ++ debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); ++ } ++ ++ /* check IR chip work on Intel mode*/ ++#ifndef CONFIG_DM_I2C ++ ret = i2c_read(i2caddress, ++ IR36021_INTEL_MODE_OOFSET, ++ 1, (void *)&buf, 1); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, i2caddress, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_read(dev, IR36021_INTEL_MODE_OOFSET, ++ (void *)&buf, 1); ++#endif ++ if (ret) { ++ printf("VID: failed to read IR chip mode.\n"); ++ ret = -1; ++ goto exit; ++ } ++ ++ if ((buf & IR36021_MODE_MASK) != IR36021_INTEL_MODE) { ++ printf("VID: IR Chip is not used in Intel mode.\n"); ++ ret = -1; ++ goto exit; ++ } ++#endif ++ + /* get the voltage ID from fuse status register */ + fusesr = in_le32(&gur->dcfg_fusesr); + vid = (fusesr >> FSL_CHASSIS3_DCFG_FUSESR_ALTVID_SHIFT) & +@@ -203,7 +615,6 @@ int adjust_vdd(ulong vdd_override) + FSL_CHASSIS3_DCFG_FUSESR_VID_MASK; + } + vdd_target = vdd[vid]; +- printf ("vid FUSE index %d (vdd_target = %d)\n",vid,vdd_target); + + /* check override variable for overriding VDD */ + vdd_string = env_get(CONFIG_VID_FLS_ENV); +@@ -246,8 +657,28 @@ int adjust_vdd(ulong vdd_override) + vdd_current = vdd_last; + debug("VID: Core voltage is currently at %d mV\n", vdd_last); + ++#ifdef CONFIG_VOL_MONITOR_LTC3882_SET + /* Set the target voltage */ + vdd_last = vdd_current = set_voltage(i2caddress, vdd_target); ++#else ++ /* ++ * Adjust voltage to at or one step above target. ++ * As measurements are less precise than setting the values ++ * we may run through dummy steps that cancel each other ++ * when stepping up and then down. ++ */ ++ while (vdd_last > 0 && ++ vdd_last < vdd_target) { ++ vdd_current += IR_VDD_STEP_UP; ++ vdd_last = set_voltage(i2caddress, vdd_current); ++ } ++ while (vdd_last > 0 && ++ vdd_last > vdd_target + (IR_VDD_STEP_DOWN - 1)) { ++ vdd_current -= IR_VDD_STEP_DOWN; ++ vdd_last = set_voltage(i2caddress, vdd_current); ++ } ++ ++#endif + if (board_adjust_vdd(vdd_target) < 0) { + ret = -1; + goto exit; +@@ -264,6 +695,197 @@ exit: + i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT); + return ret; + } ++#else /* !CONFIG_FSL_LSCH3 */ ++int adjust_vdd(ulong vdd_override) ++{ ++ int re_enable = disable_interrupts(); ++#if defined(CONFIG_FSL_LSCH2) ++ struct ccsr_gur *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR); ++#else ++ ccsr_gur_t __iomem *gur = ++ (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); ++#endif ++ u32 fusesr; ++ u8 vid, buf; ++ int vdd_target, vdd_current, vdd_last; ++ int ret, i2caddress; ++ unsigned long vdd_string_override; ++ char *vdd_string; ++ static const uint16_t vdd[32] = { ++ 0, /* unused */ ++ 9875, /* 0.9875V */ ++ 9750, ++ 9625, ++ 9500, ++ 9375, ++ 9250, ++ 9125, ++ 9000, ++ 8875, ++ 8750, ++ 8625, ++ 8500, ++ 8375, ++ 8250, ++ 8125, ++ 10000, /* 1.0000V */ ++ 10125, ++ 10250, ++ 10375, ++ 10500, ++ 10625, ++ 10750, ++ 10875, ++ 11000, ++ 0, /* reserved */ ++ }; ++ struct vdd_drive { ++ u8 vid; ++ unsigned voltage; ++ }; ++ ++ ret = i2c_multiplexer_select_vid_channel(I2C_MUX_CH_VOL_MONITOR); ++ if (ret) { ++ debug("VID: I2C failed to switch channel\n"); ++ ret = -1; ++ goto exit; ++ } ++#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ ++ defined(CONFIG_VOL_MONITOR_IR36021_READ) ++ ret = find_ir_chip_on_i2c(); ++ if (ret < 0) { ++ printf("VID: Could not find voltage regulator on I2C.\n"); ++ ret = -1; ++ goto exit; ++ } else { ++ i2caddress = ret; ++ debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); ++ } ++ ++ /* check IR chip work on Intel mode*/ ++#ifndef CONFIG_DM_I2C ++ ret = i2c_read(i2caddress, ++ IR36021_INTEL_MODE_OOFSET, ++ 1, (void *)&buf, 1); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, i2caddress, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_read(dev, IR36021_INTEL_MODE_OOFSET, ++ (void *)&buf, 1); ++#endif ++ if (ret) { ++ printf("VID: failed to read IR chip mode.\n"); ++ ret = -1; ++ goto exit; ++ } ++ if ((buf & IR36021_MODE_MASK) != IR36021_INTEL_MODE) { ++ printf("VID: IR Chip is not used in Intel mode.\n"); ++ ret = -1; ++ goto exit; ++ } ++#endif ++ ++ /* get the voltage ID from fuse status register */ ++ fusesr = in_be32(&gur->dcfg_fusesr); ++ /* ++ * VID is used according to the table below ++ * --------------------------------------- ++ * | DA_V | ++ * |-------------------------------------| ++ * | 5b00000 | 5b00001-5b11110 | 5b11111 | ++ * ---------------+---------+-----------------+---------| ++ * | D | 5b00000 | NO VID | VID = DA_V | NO VID | ++ * | A |----------+---------+-----------------+---------| ++ * | _ | 5b00001 |VID = | VID = |VID = | ++ * | V | ~ | DA_V_ALT| DA_V_ALT | DA_A_VLT| ++ * | _ | 5b11110 | | | | ++ * | A |----------+---------+-----------------+---------| ++ * | L | 5b11111 | No VID | VID = DA_V | NO VID | ++ * | T | | | | | ++ * ------------------------------------------------------ ++ */ ++#ifdef CONFIG_FSL_LSCH2 ++ vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_ALTVID_SHIFT) & ++ FSL_CHASSIS2_DCFG_FUSESR_ALTVID_MASK; ++ if ((vid == 0) || (vid == FSL_CHASSIS2_DCFG_FUSESR_ALTVID_MASK)) { ++ vid = (fusesr >> FSL_CHASSIS2_DCFG_FUSESR_VID_SHIFT) & ++ FSL_CHASSIS2_DCFG_FUSESR_VID_MASK; ++ } ++#else ++ vid = (fusesr >> FSL_CORENET_DCFG_FUSESR_ALTVID_SHIFT) & ++ FSL_CORENET_DCFG_FUSESR_ALTVID_MASK; ++ if ((vid == 0) || (vid == FSL_CORENET_DCFG_FUSESR_ALTVID_MASK)) { ++ vid = (fusesr >> FSL_CORENET_DCFG_FUSESR_VID_SHIFT) & ++ FSL_CORENET_DCFG_FUSESR_VID_MASK; ++ } ++#endif ++ vdd_target = vdd[vid]; ++ ++ /* check override variable for overriding VDD */ ++ vdd_string = env_get(CONFIG_VID_FLS_ENV); ++ if (vdd_override == 0 && vdd_string && ++ !strict_strtoul(vdd_string, 10, &vdd_string_override)) ++ vdd_override = vdd_string_override; ++ if (vdd_override >= VDD_MV_MIN && vdd_override <= VDD_MV_MAX) { ++ vdd_target = vdd_override * 10; /* convert to 1/10 mV */ ++ debug("VDD override is %lu\n", vdd_override); ++ } else if (vdd_override != 0) { ++ printf("Invalid value.\n"); ++ } ++ if (vdd_target == 0) { ++ debug("VID: VID not used\n"); ++ ret = 0; ++ goto exit; ++ } else { ++ /* divide and round up by 10 to get a value in mV */ ++ vdd_target = DIV_ROUND_UP(vdd_target, 10); ++ debug("VID: vid = %d mV\n", vdd_target); ++ } ++ ++ /* ++ * Read voltage monitor to check real voltage. ++ */ ++ vdd_last = read_voltage(i2caddress); ++ if (vdd_last < 0) { ++ printf("VID: Couldn't read sensor abort VID adjustment\n"); ++ ret = -1; ++ goto exit; ++ } ++ vdd_current = vdd_last; ++ debug("VID: Core voltage is currently at %d mV\n", vdd_last); ++ /* ++ * Adjust voltage to at or one step above target. ++ * As measurements are less precise than setting the values ++ * we may run through dummy steps that cancel each other ++ * when stepping up and then down. ++ */ ++ while (vdd_last > 0 && ++ vdd_last < vdd_target) { ++ vdd_current += IR_VDD_STEP_UP; ++ vdd_last = set_voltage(i2caddress, vdd_current); ++ } ++ while (vdd_last > 0 && ++ vdd_last > vdd_target + (IR_VDD_STEP_DOWN - 1)) { ++ vdd_current -= IR_VDD_STEP_DOWN; ++ vdd_last = set_voltage(i2caddress, vdd_current); ++ } ++ ++ if (vdd_last > 0) ++ printf("VID: Core voltage after adjustment is at %d mV\n", ++ vdd_last); ++ else ++ ret = -1; ++exit: ++ if (re_enable) ++ enable_interrupts(); ++ ++ i2c_multiplexer_select_vid_channel(I2C_MUX_CH_DEFAULT); ++ ++ return ret; ++} ++#endif + + static int print_vdd(void) + { +@@ -274,6 +896,18 @@ static int print_vdd(void) + debug("VID : I2c failed to switch channel\n"); + return -1; + } ++#if defined(CONFIG_VOL_MONITOR_IR36021_SET) || \ ++ defined(CONFIG_VOL_MONITOR_IR36021_READ) ++ ret = find_ir_chip_on_i2c(); ++ if (ret < 0) { ++ printf("VID: Could not find voltage regulator on I2C.\n"); ++ goto exit; ++ } else { ++ i2caddress = ret; ++ debug("VID: IR Chip found on I2C address 0x%02x\n", i2caddress); ++ } ++#endif ++ + /* + * Read voltage monitor to check real voltage. + */ +diff --git a/board/solidrun/lx2160a/lx2160a.c b/board/solidrun/lx2160a/lx2160a.c +index b0d9f1012e..3713e91351 100644 +--- a/board/solidrun/lx2160a/lx2160a.c ++++ b/board/solidrun/lx2160a/lx2160a.c +@@ -62,7 +62,15 @@ int select_i2c_ch_pca9547(u8 ch) + { + int ret; + ++#ifndef CONFIG_DM_I2C + ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1); ++#else ++ struct udevice *dev; ++ ++ ret = i2c_get_chip_for_busnum(0, I2C_MUX_PCA_ADDR_PRI, 1, &dev); ++ if (!ret) ++ ret = dm_i2c_write(dev, 0, &ch, 1); ++#endif + if (ret) { + puts("PCA: failed to select proper channel\n"); + return ret; +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +index 3891d2a7c4..89a47adb23 100644 +--- a/configs/lx2160acex7_tfa_defconfig ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -2,7 +2,6 @@ CONFIG_ARM=y + CONFIG_TARGET_LX2160ACEX7=y + CONFIG_SYS_TEXT_BASE=0x82000000 + CONFIG_SYS_MALLOC_F_LEN=0x6000 +-CONFIG_EMC2301=y + CONFIG_TFABOOT=y + CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y + CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y +@@ -73,3 +72,10 @@ CONFIG_DM_USB=y + CONFIG_USB_XHCI_HCD=y + CONFIG_USB_XHCI_DWC3=y + CONFIG_EFI_LOADER_BOUNCE_BUFFER=y ++CONFIG_DM_I2C=y ++CONFIG_I2C_SET_DEFAULT_BUS_NUM=y ++CONFIG_I2C_DEFAULT_BUS_NUMBER=0 ++CONFIG_DM_RTC=y ++CONFIG_DM_GPIO=y ++CONFIG_CMD_DATE=y ++CONFIG_RTC_PCF2127=y +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0014-lx2160acex7-pcie-fixup-and-boot-from-eMMC-print.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0014-lx2160acex7-pcie-fixup-and-boot-from-eMMC-print.patch new file mode 100644 index 00000000..4505f2cf --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0014-lx2160acex7-pcie-fixup-and-boot-from-eMMC-print.patch @@ -0,0 +1,128 @@ +From 5d45e2ab0e00cc809c11a3d0a412022f25639c58 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 12:53:48 +0200 +Subject: [PATCH 14/17] lx2160acex7: pcie fixup and boot from eMMC print + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + board/solidrun/lx2160a/lx2160a.c | 66 +++++++++++++++++++++++++++++++ + configs/lx2160acex7_tfa_defconfig | 3 +- + 2 files changed, 68 insertions(+), 1 deletion(-) + +diff --git a/board/solidrun/lx2160a/lx2160a.c b/board/solidrun/lx2160a/lx2160a.c +index 3713e91351..b7211a2d5c 100644 +--- a/board/solidrun/lx2160a/lx2160a.c ++++ b/board/solidrun/lx2160a/lx2160a.c +@@ -20,6 +20,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include "../../freescale/common/vid.h" +@@ -106,6 +108,66 @@ int board_early_init_f(void) + #ifdef CONFIG_OF_BOARD_FIXUP + int board_fix_fdt(void *fdt) + { ++ char *reg_name, *old_str, *new_str; ++ const char *reg_names; ++ int names_len, old_str_len, new_str_len, remaining_str_len; ++ struct str_map { ++ char *old_str; ++ char *new_str; ++ } reg_names_map[] = { ++ { "ccsr", "dbi" }, ++ { "pf_ctrl", "ctrl" } ++ }; ++ int off = -1, i; ++ ++ if (IS_SVR_REV(get_svr(), 1, 0)) ++ return 0; ++ ++ off = fdt_node_offset_by_compatible(fdt, -1, "fsl,lx2160a-pcie"); ++ while (off != -FDT_ERR_NOTFOUND) { ++ fdt_setprop(fdt, off, "compatible", "fsl,ls-pcie", ++ strlen("fsl,ls-pcie") + 1); ++ ++ reg_names = fdt_getprop(fdt, off, "reg-names", &names_len); ++ if (!reg_names) ++ continue; ++ ++ reg_name = (char *)reg_names; ++ remaining_str_len = names_len - (reg_name - reg_names); ++ i = 0; ++ while ((i < ARRAY_SIZE(reg_names_map)) && remaining_str_len) { ++ old_str = reg_names_map[i].old_str; ++ new_str = reg_names_map[i].new_str; ++ old_str_len = strlen(old_str); ++ new_str_len = strlen(new_str); ++ if (memcmp(reg_name, old_str, old_str_len) == 0) { ++ /* first only leave required bytes for new_str ++ * and copy rest of the string after it ++ */ ++ memcpy(reg_name + new_str_len, ++ reg_name + old_str_len, ++ remaining_str_len - old_str_len); ++ /* Now copy new_str */ ++ memcpy(reg_name, new_str, new_str_len); ++ names_len -= old_str_len; ++ names_len += new_str_len; ++ i++; ++ } ++ ++ reg_name = memchr(reg_name, '\0', remaining_str_len); ++ if (!reg_name) ++ break; ++ ++ reg_name += 1; ++ ++ remaining_str_len = names_len - (reg_name - reg_names); ++ } ++ ++ fdt_setprop(fdt, off, "reg-names", reg_names, names_len); ++ off = fdt_node_offset_by_compatible(fdt, off, ++ "fsl,lx2160a-pcie"); ++ } ++ + return 0; + } + #endif +@@ -135,6 +197,10 @@ int checkboard(void) + + if (src == BOOT_SOURCE_SD_MMC) { + puts("SD\n"); ++ } else if (src == BOOT_SOURCE_SD_MMC2) { ++ puts("eMMC\n"); ++ } else { ++ puts("FlexSPI DEV#0\n"); + } + puts("SERDES1 Reference: Clock1 = 161.13MHz Clock2 = 100MHz\n"); + puts("SERDES2 Reference: Clock1 = 100MHz Clock2 = 100MHz\n"); +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +index 89a47adb23..2a3441d263 100644 +--- a/configs/lx2160acex7_tfa_defconfig ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -2,6 +2,7 @@ CONFIG_ARM=y + CONFIG_TARGET_LX2160ACEX7=y + CONFIG_SYS_TEXT_BASE=0x82000000 + CONFIG_SYS_MALLOC_F_LEN=0x6000 ++CONFIG_FSPI_AHB_EN_4BYTE=y + CONFIG_TFABOOT=y + CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y + CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y +@@ -58,7 +59,7 @@ CONFIG_PCI=y + CONFIG_DM_PCI=y + CONFIG_DM_PCI_COMPAT=y + CONFIG_PCIE_LAYERSCAPE_GEN4=y +-CONFIG_PHY_ATHEROS=y ++CONFIG_PCIE_LAYERSCAPE=y + CONFIG_E1000=y + CONFIG_DM_SCSI=y + CONFIG_DM_SERIAL=y +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0015-lx2160a-cex7-set-mmc-dev-to-0-when-attempting-sd_boo.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0015-lx2160a-cex7-set-mmc-dev-to-0-when-attempting-sd_boo.patch new file mode 100644 index 00000000..ce8dec3f --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0015-lx2160a-cex7-set-mmc-dev-to-0-when-attempting-sd_boo.patch @@ -0,0 +1,32 @@ +From 47923a2f4cf159963d20acd1744619b44c9d5b02 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 23 Mar 2020 15:13:11 +0200 +Subject: [PATCH 15/17] lx2160a-cex7: set mmc dev to 0 when attempting + sd_bootcmd + +When attempting sd_bootcmd which is the fallback of failed distroboot +then set mmc dev to 0; since distroboot already set that variable to 1. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + include/configs/lx2160acex7.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/configs/lx2160acex7.h b/include/configs/lx2160acex7.h +index 478cd8242f..7116e038a1 100644 +--- a/include/configs/lx2160acex7.h ++++ b/include/configs/lx2160acex7.h +@@ -73,7 +73,7 @@ + "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\ + " bootm $load_addr#$BOARD\0" \ + "sd_bootcmd=echo Trying load from sd card..;" \ +- "mmcinfo; mmc read $load_addr " \ ++ "mmc dev 0; mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ + "env exists secureboot && mmc read $kernelheader_addr_r "\ + "$kernelhdr_addr_sd $kernelhdr_size_sd " \ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0016-lx2160acex7-Misc-fixes-to-support-LSDK-20.04.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0016-lx2160acex7-Misc-fixes-to-support-LSDK-20.04.patch new file mode 100644 index 00000000..83e2139c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0016-lx2160acex7-Misc-fixes-to-support-LSDK-20.04.patch @@ -0,0 +1,127 @@ +From eacde91ef9d8b05ad4df8b6755dd3726e40fb75c Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 4 May 2020 22:52:02 +0300 +Subject: [PATCH 16/17] lx2160acex7: Misc fixes to support LSDK-20.04 + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm/Kconfig | 1 + + board/solidrun/lx2160a/lx2160a.c | 4 +++- + configs/lx2160acex7_tfa_defconfig | 24 ++++++++++++------------ + 3 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 8615e1673f..c78e17a0ed 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1195,6 +1195,7 @@ config TARGET_LX2160ACEX7 + select ARCH_MISC_INIT + select ARM64 + select ARMV8_MULTIENTRY ++ select ARCH_SUPPORT_TFABOOT + select BOARD_LATE_INIT + help + Support for SolidRun LX2160A based com express type 7 module and +diff --git a/board/solidrun/lx2160a/lx2160a.c b/board/solidrun/lx2160a/lx2160a.c +index b7211a2d5c..975431fd53 100644 +--- a/board/solidrun/lx2160a/lx2160a.c ++++ b/board/solidrun/lx2160a/lx2160a.c +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -26,6 +26,8 @@ + #include + #include "../../freescale/common/vid.h" + #include ++#include ++#include + + #ifdef CONFIG_EMC2301 + #include "../common/emc2301.h" +diff --git a/configs/lx2160acex7_tfa_defconfig b/configs/lx2160acex7_tfa_defconfig +index 2a3441d263..d2e62a6e91 100644 +--- a/configs/lx2160acex7_tfa_defconfig ++++ b/configs/lx2160acex7_tfa_defconfig +@@ -1,16 +1,15 @@ + CONFIG_ARM=y + CONFIG_TARGET_LX2160ACEX7=y ++CONFIG_TFABOOT=y + CONFIG_SYS_TEXT_BASE=0x82000000 + CONFIG_SYS_MALLOC_F_LEN=0x6000 + CONFIG_FSPI_AHB_EN_4BYTE=y +-CONFIG_TFABOOT=y ++CONFIG_NR_DRAM_BANKS=3 + CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y + CONFIG_SEC_FIRMWARE_ARMV8_PSCI=y + CONFIG_AHCI=y +-CONFIG_NR_DRAM_BANKS=3 + CONFIG_FIT_VERBOSE=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_OF_BOARD_FIXUP=y + CONFIG_OF_STDOUT_VIA_ALIAS=y + CONFIG_BOOTDELAY=10 + CONFIG_USE_BOOTARGS=y +@@ -29,6 +28,7 @@ CONFIG_CMD_NVME=y + CONFIG_NVME=y + CONFIG_MP=y + CONFIG_OF_CONTROL=y ++CONFIG_OF_BOARD_FIXUP=y + CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-cex7" + CONFIG_ENV_IS_IN_MMC=y + CONFIG_ENV_IS_IN_SPI_FLASH=y +@@ -36,6 +36,10 @@ CONFIG_NET_RANDOM_ETHADDR=y + CONFIG_DM=y + CONFIG_SATA_CEVA=y + CONFIG_FSL_CAAM=y ++CONFIG_DM_GPIO=y ++CONFIG_DM_I2C=y ++CONFIG_I2C_SET_DEFAULT_BUS_NUM=y ++CONFIG_I2C_DEFAULT_BUS_NUMBER=0 + CONFIG_DM_MMC=y + CONFIG_FSL_ESDHC=y + CONFIG_DM_SPI_FLASH=y +@@ -55,28 +59,24 @@ CONFIG_CMD_MII=y + CONFIG_CMD_DHCP=y + CONFIG_CMD_FAT=y + CONFIG_CMD_EXT2=y ++CONFIG_E1000=y + CONFIG_PCI=y + CONFIG_DM_PCI=y + CONFIG_DM_PCI_COMPAT=y + CONFIG_PCIE_LAYERSCAPE_GEN4=y + CONFIG_PCIE_LAYERSCAPE=y +-CONFIG_E1000=y ++CONFIG_DM_RTC=y ++CONFIG_RTC_PCF2127=y ++ + CONFIG_DM_SCSI=y + CONFIG_DM_SERIAL=y +-CONFIG_SERIAL_PROBE_ALL=y + CONFIG_SPI=y + CONFIG_DM_SPI=y + CONFIG_NXP_FSPI=y +-# CONFIG_SYS_NXP_FSPI_AHB=y + CONFIG_USB=y + CONFIG_DM_USB=y + CONFIG_USB_XHCI_HCD=y + CONFIG_USB_XHCI_DWC3=y + CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +-CONFIG_DM_I2C=y +-CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +-CONFIG_I2C_DEFAULT_BUS_NUMBER=0 +-CONFIG_DM_RTC=y +-CONFIG_DM_GPIO=y + CONFIG_CMD_DATE=y +-CONFIG_RTC_PCF2127=y ++CONFIG_GIC_V3_ITS=y +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0017-lx2160acex7-misc-fixes-to-get-booting-from-eMMC-func.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0017-lx2160acex7-misc-fixes-to-get-booting-from-eMMC-func.patch new file mode 100644 index 00000000..053da1cf --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq-lx2160acex7/0017-lx2160acex7-misc-fixes-to-get-booting-from-eMMC-func.patch @@ -0,0 +1,70 @@ +From ce6a26cf0aa2af3a93b1183bd3543a9913e0656e Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 5 May 2020 01:01:01 +0300 +Subject: [PATCH 17/17] lx2160acex7: misc fixes to get booting from eMMC + functional + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + include/configs/lx2160a_common.h | 10 ++++++++++ + include/configs/lx2160acex7.h | 14 ++++++++------ + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h +index 91e9a2470f..f0c44a2368 100644 +--- a/include/configs/lx2160a_common.h ++++ b/include/configs/lx2160a_common.h +@@ -235,6 +235,16 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); + "esbc_validate 0x80680000 ;" \ + "fsl_mc start mc 0x80a00000 0x80e00000\0" + ++#define SD2_MC_INIT_CMD \ ++ "mmc dev 1; mmc read 0x80a00000 0x5000 0x1200;" \ ++ "mmc read 0x80e00000 0x7000 0x800;" \ ++ "env exists secureboot && " \ ++ "mmc read 0x80640000 0x3200 0x20 && " \ ++ "mmc read 0x80680000 0x3400 0x20 && " \ ++ "esbc_validate 0x80640000 && " \ ++ "esbc_validate 0x80680000 ;" \ ++ "fsl_mc start mc 0x80a00000 0x80e00000\0" ++ + #define EXTRA_ENV_SETTINGS \ + "hwconfig=fsl_ddr:bank_intlv=auto\0" \ + "ramdisk_addr=0x800000\0" \ +diff --git a/include/configs/lx2160acex7.h b/include/configs/lx2160acex7.h +index 7116e038a1..310168db47 100644 +--- a/include/configs/lx2160acex7.h ++++ b/include/configs/lx2160acex7.h +@@ -46,11 +46,6 @@ + + #endif + +-/* EMC2301 */ +-#define I2C_MUX_CH_EMC2301 0x01 +-#define I2C_EMC2301_ADDR 0x2f +-#define I2C_EMC2301_CMD 0x40 +-#define I2C_EMC2301_PWM 0x80 + + /* EEPROM */ + #undef CONFIG_ID_EEPROM /* Fixme */ +@@ -73,7 +68,14 @@ + "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; "\ + " bootm $load_addr#$BOARD\0" \ + "sd_bootcmd=echo Trying load from sd card..;" \ +- "mmc dev 0; mmcinfo; mmc read $load_addr " \ ++ "mmcinfo; mmc read $load_addr " \ ++ "$kernel_addr_sd $kernel_size_sd ;" \ ++ "env exists secureboot && mmc read $kernelheader_addr_r "\ ++ "$kernelhdr_addr_sd $kernelhdr_size_sd " \ ++ " && esbc_validate ${kernelheader_addr_r};" \ ++ "bootm $load_addr#$BOARD\0" \ ++ "emmc_bootcmd=echo Trying load from emmc card..;" \ ++ "mmc dev 1; mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ + "env exists secureboot && mmc read $kernelheader_addr_r "\ + "$kernelhdr_addr_sd $kernelhdr_size_sd " \ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bbappend b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bbappend new file mode 100644 index 00000000..40e6c38d --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_append_lx2160acex7 := "${THISDIR}/${PN}-lx2160acex7:" + +SRC_URI_append_lx2160acex7 = "\ + file://0001-armv8-add-lx2160acex7-build-inclusion.patch \ + file://0002-armv8-lx2160acex-misc-hacks-to-get-the-sources-built.patch \ + file://0003-armv8-lx2160acex7-defconfig-and-main-platform-includ.patch \ + file://0004-armv8-lx2160acex7-common-files-for-platform-support.patch \ + file://0005-armv8-lx2160acex7-lx2160acex-device-tree.patch \ + file://0006-armv8-lx2160acex7-board-support-files.patch \ + file://0007-lx2160a-load-dpl-into-0x80001000-instead-of-0x80d000.patch \ + file://0008-uboot-add-nvme-commands-and-for-distroboot.patch \ + file://0009-armv8-lx2160acex7-Fix-booting-from-NVMe-drives.patch \ + file://0010-nvme-add-accessor-to-namespace-id-and-eui64.patch \ + file://0011-nvme-flush-dcache-on-both-r-w-and-the-prp-list.patch \ + file://0012-nvme-use-page-aligned-buffer-for-identify-command.patch \ + file://0013-lx2160a-cex7-move-from-lsdk-19.06-to-lsdk-19.09.patch \ + file://0014-lx2160acex7-pcie-fixup-and-boot-from-eMMC-print.patch \ + file://0015-lx2160a-cex7-set-mmc-dev-to-0-when-attempting-sd_boo.patch \ + file://0016-lx2160acex7-Misc-fixes-to-support-LSDK-20.04.patch \ + file://0017-lx2160acex7-misc-fixes-to-get-booting-from-eMMC-func.patch \ +" + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-boundary_2018.07.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-boundary_2018.07.bb index ef47d5f4..15542968 100644 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-boundary_2018.07.bb +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-boundary_2018.07.bb @@ -42,4 +42,4 @@ addtask deploy after do_install before do_build FILES_${PN} += "/" -COMPATIBLE_MACHINE = "(nitrogen6x-lite|nitrogen6x|nitrogen6sx|nitrogen7|nitrogen8m)" +COMPATIBLE_MACHINE = "(nitrogen6x-lite|nitrogen6x|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm|nitrogen8mn)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq/boot.cmd.in b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq/boot.cmd.in new file mode 100644 index 00000000..d42efaf9 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq/boot.cmd.in @@ -0,0 +1,12 @@ +setenv kernel @KERNEL_IMAGETYPE@ +setenv fdt_file @KERNEL_DEVICETREE@ +setenv rootfs_mmc0 setenv rootfs /dev/mmcblk0p2 +setenv rootfs_mmc1 setenv rootfs /dev/mmcblk1p2 +setenv rootfs_nvme0 setenv rootfs /dev/nvme0n1p2 +setenv rootfs_scsi0 setenv rootfs /dev/sda2 +setenv rootfs_usb0 setenv rootfs /dev/sda2 +setenv rootfs_dhcp setenv rootfs /dev/root +run rootfs_${target} +setenv new_bootargs setenv bootargs console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 root=${rootfs} default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf +run new_bootargs +${bootfstype}load ${devtype} ${devnum}:1 ${kernel_addr_r} /${kernel}; ${bootfstype}load ${devtype} ${devnum}:1 ${fdt_addr_r} /${fdt_file}; @KERNEL_BOOTCMD@ ${kernel_addr_r} - ${fdt_addr_r} diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq_2019.10.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq_2019.10.bb new file mode 100644 index 00000000..eadd6832 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-qoriq_2019.10.bb @@ -0,0 +1,54 @@ +DESCRIPTION = "Boot script for launching images with U-Boot distro boot" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "\ + file://boot.cmd.in \ +" + +KERNEL_BOOTCMD ?= "booti" + +inherit deploy + +do_configure[noexec] = "1" + +do_compile() { + kernel_devicetree_spc="" + kernel_devicetree_tmp="" + for kdt in ${KERNEL_DEVICETREE} + do + kernel_devicetree_tmp="${kernel_devicetree_tmp}${kernel_devicetree_spc}$(basename ${kdt})" + kernel_devicetree_spc=" " + done + kernel_devicetree="${kernel_devicetree_tmp}" + sed -e 's/@KERNEL_BOOTCMD[@]/${KERNEL_BOOTCMD}/' -e "s,@KERNEL_IMAGETYPE[@],${KERNEL_IMAGETYPE},g" \ + -e "s,@KERNEL_DEVICETREE[@],${kernel_devicetree},g" \ + "${WORKDIR}/boot.cmd.in" > ${B}/boot.cmd + target_arch="${TARGET_ARCH}" + test "${TARGET_ARCH}" = "aarch64" && target_arch="arm64" + mkimage -A ${target_arch} -T script -C none -n "Distro boot script" -d ${B}/boot.cmd ${B}/boot.scr +} + +do_install() { + install -Dm 0644 ${B}/boot.scr ${D}/boot/boot.scr +} + +do_deploy() { + install -Dm 0644 ${D}/boot/boot.scr ${DEPLOYDIR}/boot.scr-${MACHINE}-${PV}-${PR} + cd ${DEPLOYDIR} + rm -f boot.scr-${MACHINE} + ln -sf boot.scr-${MACHINE}-${PV}-${PR} boot.scr-${MACHINE} +} + +addtask deploy after do_install before do_build + +PROVIDES += "u-boot-default-script" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "(qoriq)" + +FILES_${PN} = "/boot" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex/boot.cmd.in b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex/boot.cmd.in new file mode 100644 index 00000000..5c514bad --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex/boot.cmd.in @@ -0,0 +1,30 @@ +if test ${devtype} = "ubi" +then + echo "This script is not meant to distro boot from raw NAND flash." + exit +fi + +if test ${distro_bootpart} != 1 +then + echo "Boot partition needs to be the first partition" + exit +fi + +if test -n ${setup} +then + run setup +else + env set setupargs 'console=tty1 consoleblank=0' +fi +test -n ${m4boot} || env set m4boot ';' +test -n ${fdtfile} || env set fdtfile $fdt_file +test -n ${kernel_image} || env set kernel_image ${boot_file} + +env set uuid_set 'part uuid ${devtype} ${devnum}:2 uuid' +env set emmcargs_set 'env set emmcargs root=PARTUUID=${uuid} rw rootfstype=ext4 rootwait' +env set bootcmd_args 'env set bootargs ${defargs} ${emmcargs} ${setupargs} ${vidargs} ${tdxargs}' +env set bootcmd_kernel 'load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${kernel_image}' +env set bootcmd_dtb 'load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile}' +env set bootcmd_run '@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr_r}' +env set bootcmd 'run m4boot; run bootcmd_dtb && run uuid_set && run emmcargs_set && run bootcmd_args && run bootcmd_kernel && run bootcmd_run' +run bootcmd diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex_2019.07.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex_2019.07.bb new file mode 100644 index 00000000..a2aacdbb --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-script-toradex_2019.07.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "Boot script for launching images with U-Boot distro boot" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "\ + file://boot.cmd.in \ +" + +KERNEL_BOOTCMD ??= "bootz" +KERNEL_BOOTCMD_aarch64 ?= "booti" + +inherit deploy nopackages + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_mkimage() { + sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ + "${WORKDIR}/boot.cmd.in" > ${B}/boot.cmd + mkimage -T script -C none -n "Distro boot script" -d ${B}/boot.cmd ${B}/boot.scr +} + +addtask mkimage after do_compile before do_install + +do_install() { + install -Dm 0644 ${B}/boot.scr ${D}/boot.scr +} + +do_deploy() { + install -Dm 0644 ${D}/boot.scr ${DEPLOYDIR}/boot.scr-${MACHINE}-${PV}-${PR} + cd ${DEPLOYDIR} + rm -f boot.scr-${MACHINE} + ln -sf boot.scr-${MACHINE}-${PV}-${PR} boot.scr-${MACHINE} +} + +addtask deploy after do_install before do_build + +PROVIDES += "u-boot-default-script" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "(apalis-imx6|colibri-imx6|colibri-imx6ull|colibri-imx7-emmc|colibri-imx7-nand|colibri-vf)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-common.inc b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-common.inc new file mode 100644 index 00000000..50319983 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-common.inc @@ -0,0 +1,22 @@ +# Copyright (C) 2015 Toradex AG +# Based on u-boot-fslc.inc Copyright (C) 2012-2020 O.S. Systems Software LTDA +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "U-Boot bootloader with support for Toradex Computer on Modules" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" + +DEPENDS += "flex-native bison-native" + +SRC_URI = "git://git.toradex.com/u-boot-toradex.git;branch=${SRCBRANCH}" + +SRCREV = "8f0e253cbceb940a3540e9ce73279a3e9a5a8528" +SRCBRANCH = "toradex_2019.07" + +S = "${WORKDIR}/git" + +PV = "2019.07+git${SRCPV}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "(mx6|mx7|vf|use-mainline-bsp)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/0001-tools-fix-cross-compiling-tools-when-HOSTCC-is-overr.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/0001-tools-fix-cross-compiling-tools-when-HOSTCC-is-overr.patch deleted file mode 100644 index 2c087e85..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/0001-tools-fix-cross-compiling-tools-when-HOSTCC-is-overr.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7 Mon Sep 17 00:00:00 2001 -From: Masahiro Yamada -Date: Mon, 13 Mar 2017 17:43:16 +0900 -Subject: [PATCH] tools: fix cross-compiling tools when HOSTCC is overridden - -Upstream-Status: Backport - -Richard reported U-Boot tools issues in OpenEmbedded/Yocto project. - -OE needs to be able to change the default compiler. If we pass in -HOSTCC through the make command, it overwrites all HOSTCC instances, -including ones in tools/Makefile and tools/env/Makefile, which breaks -"make cross_tools" and "make env", respectively. - -Add "override" directives to avoid overriding HOSTCC instances that -really need to point to the cross-compiler. - -Signed-off-by: Masahiro Yamada -Reported-by: Richard Purdie -Reviewed-by: Simon Glass ---- - tools/Makefile | 2 +- - tools/env/Makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/Makefile b/tools/Makefile -index 1c840d7..a894b5c 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -262,7 +262,7 @@ $(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP) - subdir- += env - - ifneq ($(CROSS_BUILD_TOOLS),) --HOSTCC = $(CC) -+override HOSTCC = $(CC) - - quiet_cmd_crosstools_strip = STRIP $^ - cmd_crosstools_strip = $(STRIP) $^; touch $@ -diff --git a/tools/env/Makefile b/tools/env/Makefile -index 38ad118..95b28c0 100644 ---- a/tools/env/Makefile -+++ b/tools/env/Makefile -@@ -8,7 +8,7 @@ - # fw_printenv is supposed to run on the target system, which means it should be - # built with cross tools. Although it may look weird, we only replace "HOSTCC" - # with "CC" here for the maximum code reuse of scripts/Makefile.host. --HOSTCC = $(CC) -+override HOSTCC = $(CC) - - # Compile for a hosted environment on the target - HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ --- -2.7.4 - diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx6ull/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx6ull/fw_env.config deleted file mode 100644 index 930bceee..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx6ull/fw_env.config +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# MTD device name Device offset Env. size Flash sector size Number of sectors -# Colibri iMX6ULL -/dev/mtd3 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx7/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx7/fw_env.config deleted file mode 100644 index b59116d4..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/colibri-imx7/fw_env.config +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# MTD device name Device offset Env. size Flash sector size Number of sectors -# Colibri iMX7 -/dev/mtd3 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/fw_env.config deleted file mode 100644 index e054ccbb..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/fw_env.config +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# NOR example -# MTD device name Device offset Env. size Flash sector size Number of sectors -#/dev/mtd1 0x0000 0x4000 0x4000 -#/dev/mtd2 0x0000 0x4000 0x4000 - -# MTD SPI-dataflash example -# MTD device name Device offset Env. size Flash sector size Number of sectors -#/dev/mtd5 0x4200 0x4200 -#/dev/mtd6 0x4200 0x4200 - -# NAND example -#/dev/mtd0 0x4000 0x4000 0x20000 2 - -# Block device example -#/dev/mmcblk0 0xc0000 0x20000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/mx6/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/mx6/fw_env.config deleted file mode 100644 index a9e724e4..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/mx6/fw_env.config +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. -# On a block device a negative offset is treated as a backwards offset from the -# end of the device/partition, rather than a forwards offset from the start. - -# Colibri iMX6/Apalis iMX6 -# U-Boot environment is stored at the end of the first eMMC boot partition -# hence use a negative value. The environment is just in front of the config -# block which occupies the last sector (hence -0x200) -# Note that /dev/mmcblk0boot0 by default is read only -# To use fw_setenv you have to first make it writeable, on the cmdline e.g. by -# $ echo 0 > /sys/block/mmcblk0boot0/force_ro - -# Block device name Device offset Env. size -/dev/mmcblk0boot0 -0x2200 0x2000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/vf/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/vf/fw_env.config deleted file mode 100644 index 51f09d1d..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils/vf/fw_env.config +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration file for fw_(printenv/setenv) utility. -# Up to two entries are valid, in this case the redundant -# environment sector is assumed present. -# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. -# Futhermore, if the Flash sector size is ommitted, this value is assumed to -# be the same as the Environment size, which is valid for NOR and SPI-dataflash - -# MTD device name Device offset Env. size Flash sector size Number of sectors -# Colibri VF61 -/dev/mtd2 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils_2016.11.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils_2016.11.bb deleted file mode 100644 index 727c0a84..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex-fw-utils_2016.11.bb +++ /dev/null @@ -1,42 +0,0 @@ -require recipes-bsp/u-boot/u-boot-toradex_${PV}.inc - -SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" - -SRC_URI += "file://0001-tools-fix-cross-compiling-tools-when-HOSTCC-is-overr.patch \ - file://fw_env.config \ -" - -DEPENDS += "mtd-utils" - -INSANE_SKIP_${PN} = "already-stripped" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' -EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' - -inherit uboot-config - -do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake env -} - -do_install () { - install -d ${D}${base_sbindir} - install -d ${D}${sysconfdir} - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config -} - -do_install_class-cross () { - install -d ${D}${bindir_cross} - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv -} - -SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" - -PROVIDES += "u-boot-fw-utils" -RPROVIDES_${PN} += "u-boot-fw-utils" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -BBCLASSEXTEND = "cross" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config new file mode 100644 index 00000000..930bceee --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config @@ -0,0 +1,10 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# MTD device name Device offset Env. size Flash sector size Number of sectors +# Colibri iMX6ULL +/dev/mtd3 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config new file mode 100644 index 00000000..3c2ebb84 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config @@ -0,0 +1,17 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. +# On a block device a negative offset is treated as a backwards offset from the +# end of the device/partition, rather than a forwards offset from the start. + +# Colibri iMX7 Dual 1GB (eMMC) +# U-Boot environment is stored at the end of the first eMMC boot partition +# hence use a negative value. The environment is just in front of the config +# block which occupies the last sector (hence -0x200) +# Note that /dev/mmcblk0boot0 by default is read only +# To use fw_setenv you have to first make it writeable, on the cmdline e.g. by +# $ echo 0 > /sys/block/mmcblk0boot0/force_ro + +# Block device name Device offset Env. size +/dev/mmcblk0boot0 -0x2200 0x2000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config new file mode 100644 index 00000000..b59116d4 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config @@ -0,0 +1,10 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# MTD device name Device offset Env. size Flash sector size Number of sectors +# Colibri iMX7 +/dev/mtd3 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/fw_env.config new file mode 100644 index 00000000..e054ccbb --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/fw_env.config @@ -0,0 +1,22 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# NOR example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd1 0x0000 0x4000 0x4000 +#/dev/mtd2 0x0000 0x4000 0x4000 + +# MTD SPI-dataflash example +# MTD device name Device offset Env. size Flash sector size Number of sectors +#/dev/mtd5 0x4200 0x4200 +#/dev/mtd6 0x4200 0x4200 + +# NAND example +#/dev/mtd0 0x4000 0x4000 0x20000 2 + +# Block device example +#/dev/mmcblk0 0xc0000 0x20000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config new file mode 100644 index 00000000..a9e724e4 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config @@ -0,0 +1,17 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. +# On a block device a negative offset is treated as a backwards offset from the +# end of the device/partition, rather than a forwards offset from the start. + +# Colibri iMX6/Apalis iMX6 +# U-Boot environment is stored at the end of the first eMMC boot partition +# hence use a negative value. The environment is just in front of the config +# block which occupies the last sector (hence -0x200) +# Note that /dev/mmcblk0boot0 by default is read only +# To use fw_setenv you have to first make it writeable, on the cmdline e.g. by +# $ echo 0 > /sys/block/mmcblk0boot0/force_ro + +# Block device name Device offset Env. size +/dev/mmcblk0boot0 -0x2200 0x2000 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config new file mode 100644 index 00000000..51f09d1d --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config @@ -0,0 +1,10 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is ommitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash + +# MTD device name Device offset Env. size Flash sector size Number of sectors +# Colibri VF61 +/dev/mtd2 0x00000000 0x00020000 0x20000 4 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.bb deleted file mode 100644 index e409131d..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.bb +++ /dev/null @@ -1,8 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc -require recipes-bsp/u-boot/u-boot-toradex_${PV}.inc - -LOCALVERSION = "-2.8.3" - -PROVIDES += "u-boot" - -inherit fsl-u-boot-localversion dtc-145 diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.inc b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.inc deleted file mode 100644 index dd8c9215..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2016.11.inc +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2015 Toradex AG -# Based on u-boot-fslc.inc Copyright (C) 2012-2014 O.S. Systems Software LTDA -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "U-Boot bootloader with support for Toradex Computer on Modules" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" - -SRC_URI = "git://git.toradex.com/u-boot-toradex.git;branch=${SRCBRANCH}" - -SRCREV ?= "aca804c9ddadbf34a8ff82779e5598ec5e319f23" -SRCBRANCH ?= "2016.11-toradex" - -S = "${WORKDIR}/git" - -PV = "2016.11+git${SRCPV}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_MACHINE = "(mx6|mx7|vf|use-mainline-bsp)" diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2019.07.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2019.07.bb new file mode 100644 index 00000000..6a1c71e6 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-toradex_2019.07.bb @@ -0,0 +1,31 @@ +require recipes-bsp/u-boot/u-boot.inc +require recipes-bsp/u-boot/u-boot-toradex-common.inc + +DEPENDS += "bc-native dtc-native" + +SRC_URI += "file://fw_env.config" + +PROVIDES += "u-boot" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" + +inherit fsl-u-boot-localversion + +# U-Boot is flashed 1k into a NAND block, create a binary which prepends +# U-boot with 1k of zeros to ease flashing +nand_padding () { + dd bs=1024 count=1 if=/dev/zero | cat - u-boot.imx > u-boot-nand.imx +} + +do_compile_append_colibri-imx6ull () { + nand_padding +} + +do_compile_append_colibri-imx7 () { + nand_padding +} + +do_compile_append_colibri-vf () { + nand_padding +} diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite/0001-Fix-build-with-recent-layers.patch b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite/0001-Fix-build-with-recent-layers.patch new file mode 100644 index 00000000..dba4dc18 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite/0001-Fix-build-with-recent-layers.patch @@ -0,0 +1,34 @@ +From 8c3356f5328d3e48709ed7483564a1cd79e387cf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Fri, 3 Jan 2020 14:04:46 +0100 +Subject: [PATCH] Fix build with recent layers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: +arm-mortsgna-linux-gnueabi-ld.bfd: error: linker script file '/git/arch/arm/lib/elf_arm_efi.lds' appears multiple times + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + scripts/Makefile.lib | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 23be324369..a32daa4394 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -377,8 +377,6 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \ + + EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS) + +-$(obj)/helloworld.so: $(EFI_LDS_PATH) +- + $(obj)/helloworld.so: $(obj)/helloworld.o arch/$(ARCH)/lib/$(EFI_CRT0) \ + arch/$(ARCH)/lib/$(EFI_RELOC) + $(call cmd,efi_ld) +-- +2.21.0 + diff --git a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite_2017.03.bb b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite_2017.03.bb index 818e03e4..c529e56a 100644 --- a/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite_2017.03.bb +++ b/bsp/meta-freescale-3rdparty/recipes-bsp/u-boot/u-boot-variscite_2017.03.bb @@ -5,15 +5,19 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" COMPATIBLE_MACHINE = "(imx6qdl-variscite-som)" +DEPENDS += "bc-native" +UBOOT_INITIAL_ENV = "" + PROVIDES += "u-boot" SPL_BINARY = "SPL" -SRCREV = "3b5f889cb501c9fbe44c750c657dcd9ea4875176" +SRCREV = "a7869c2cde98e5f5b1886d8f54dff321a7aa0597" SRCBRANCH = "imx_v2017.03_4.9.11_1.0.0_ga_var01" SRC_URI = "\ git://github.com/varigit/uboot-imx.git;protocol=git;branch=${SRCBRANCH} \ + file://0001-Fix-build-with-recent-layers.patch \ " S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcexpress/interfaces b/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcexpress/interfaces new file mode 100644 index 00000000..6d1c3d21 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcexpress/interfaces @@ -0,0 +1,39 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wireless interfaces + +# Client infrastructure mode +auto wlan0 +iface wlan0 inet static + address 192.168.8.2 + netmask 255.255.255.0 + network 192.168.8.0 + wireless_mode managed + wireless_essid any + wpa-driver nl80211 + wpa-conf /etc/wpa_supplicant.conf + +# SoftAP mode +auto wlan1 +iface wlan1 inet static + address 192.168.9.2 + netmask 255.255.255.0 + network 192.168.9.0 + post-up /etc/init.d/hostapd start + pre-down /etc/init.d/hostapd stop + +# Wired interfaces +auto eth0 +iface eth0 inet dhcp + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +iface usb0 inet static + address 192.168.7.2 + netmask 255.255.255.0 + network 192.168.7.0 + gateway 192.168.7.1 diff --git a/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcpro/interfaces b/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcpro/interfaces new file mode 100644 index 00000000..281f91c4 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/init-ifupdown/init-ifupdown/ccimx6ulsbcpro/interfaces @@ -0,0 +1,40 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wireless interfaces + +# Client infrastructure mode +auto wlan0 +iface wlan0 inet static + address 192.168.8.2 + netmask 255.255.255.0 + network 192.168.8.0 + wireless_mode managed + wireless_essid any + wpa-driver nl80211 + wpa-conf /etc/wpa_supplicant.conf + +# SoftAP mode +auto wlan1 +iface wlan1 inet static + address 192.168.9.2 + netmask 255.255.255.0 + network 192.168.9.0 + post-up /etc/init.d/hostapd start + pre-down /etc/init.d/hostapd stop + +# Wired interfaces +auto eth1 +iface eth0 inet dhcp +iface eth1 inet dhcp + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +iface usb0 inet static + address 192.168.7.2 + netmask 255.255.255.0 + network 192.168.7.0 + gateway 192.168.7.1 diff --git a/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi.bb b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi.bb new file mode 100644 index 00000000..c438c91c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi.bb @@ -0,0 +1,25 @@ +# Copyright (C) 2019 Digi International. + +DESCRIPTION = "udev rules for Digi International SOMs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI_ccimx6ul = " \ + file://81-qcom-wifi.rules \ + file://qca6564-init-wifi.sh \ + file://81-qcom-bt.rules \ + file://qca6564-attach.sh \ +" + +S = "${WORKDIR}" + +do_install_ccimx6ul () { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/81-qcom-wifi.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/81-qcom-bt.rules ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/udev/scripts/ + install -m 0755 ${WORKDIR}/qca6564-init-wifi.sh ${D}${sysconfdir}/udev/scripts/ + install -m 0755 ${WORKDIR}/qca6564-attach.sh ${D}${sysconfdir}/udev/scripts/ +} + +COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-bt.rules b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-bt.rules new file mode 100644 index 00000000..aee7fd75 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-bt.rules @@ -0,0 +1,2 @@ +# Attach QCA6564 Bluetooth (uart) +SUBSYSTEM=="tty", KERNEL=="ttymxc0", ACTION=="add", RUN="/etc/udev/scripts/qca6564-attach.sh start" diff --git a/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-wifi.rules b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-wifi.rules new file mode 100644 index 00000000..0f32f74a --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/81-qcom-wifi.rules @@ -0,0 +1,2 @@ +# Load Qualcomm wireless module (sdio) +SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/etc/udev/scripts/qca6564-init-wifi.sh" diff --git a/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-attach.sh b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-attach.sh new file mode 100644 index 00000000..ef34c619 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-attach.sh @@ -0,0 +1,97 @@ +#!/bin/sh +#=============================================================================== +# +# Copyright (C) 2019 by Digi International Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published by +# the Free Software Foundation. +# +# +# !Description: Initialize bluetooth hardware +# +#=============================================================================== + +# Bluetooth power GPIO +BT_EN_QCA_GPIO_NR="137" + +# set_gpio_value +set_gpio_value() { + local SG_GPIONR="${1}" + local SG_GPIOVAL="${2}" + local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}" + + [ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export + printf out > "${SG_GPIOPATH}/direction" && sleep .2 + printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2 + [ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport +} + +# powercycle_gpio +powercycle_gpio() { + set_gpio_value "${1}" 0 + set_gpio_value "${1}" 1 +} + +set_mac_address() { + # Get MAC address from the device tree. Use a default value if it has not been set. + BT_MACADDR="$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/bluetooth/mac-address 2>/dev/null | sed 's/:$//g')" + if [ -z "${BT_MACADDR}" ] || [ "${BT_MACADDR}" = "00:00:00:00:00:00" ]; then + BT_MACADDR="00:04:F3:FF:FF:BB" + fi + + # Convert the BT address to the hcitool command format. + # Example: "00:04:F3:11:22:33" coverted to "33 22 11 F3 04 00" + HCI_BT_ADDR="$(echo ${BT_MACADDR} | sed -e 's,^\(..\):\(..\):\(..\):\(..\):\(..\):\(..\)$,\6 \5 \4 \3 \2 \1,g')" + + # Up the interface to be able to send hci commands + hciconfig hci0 up || echo "Cannot bring up bluetooth interface after initial attach" || exit 1 + + # Set the MAC address + hcitool -i hci0 cmd 3F 000B 01 02 06 ${HCI_BT_ADDR} > /dev/null || echo "Unable to set BT MAC Address" || exit 1 + + # Bring the interface down/up to apply the MAC change + hciconfig hci0 down || echo "Cannot bring down bluetooth interface after setting MAC" || exit 1 + hciconfig hci0 up || echo "Cannot bring up bluetooth interface after setting MAC" || exit 1 + +} + +bluetooth_init() { + # Start the Bluetooth driver and bring up the interface + killproc hciattach + powercycle_gpio "${BT_EN_QCA_GPIO_NR}" + hciattach ttymxc0 qualcomm 115200 -t3 flow unused > /dev/null 2>&1 || BT_ERROR="FAIL (hciattach)" + set_mac_address || BT_ERROR="Unable to set MAC address" +} + +# Source function library +. /etc/init.d/functions + +case "$1" in + start) + if [ -d "/proc/device-tree/bluetooth" ]; then + echo -n "Starting bluetooth hardware: " + bluetooth_init + echo "${BT_ERROR:-done.}" + fi + ;; + stop) + if [ -d "/sys/class/bluetooth/hci0" ]; then + echo -n "Stopping bluetooth hardware: " + killproc hciattach + # Power down bluetooth + set_gpio_value "${BT_EN_QCA_GPIO_NR}" 0 + echo "done." + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac diff --git a/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-init-wifi.sh b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-init-wifi.sh new file mode 100644 index 00000000..fe3be3b4 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-core/udev/udev-rules-digi/ccimx6ul/qca6564-init-wifi.sh @@ -0,0 +1,121 @@ +#!/bin/sh +# +# Copyright (c) 2019 Digi International Inc. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, you can obtain one at http://mozilla.org/MPL/2.0/. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +# At this point of the boot (udev script), the system log (syslog) is not +# available yet, so use the kernel log buffer from userspace. +log() { + printf "<$1>qca6564: $2\n" >/dev/kmsg +} + +# Do nothing if the module is already loaded +grep -qws 'wlan' /proc/modules && exit 0 + +FIRMWARE_DIR="/lib/firmware" +MACFILE="${FIRMWARE_DIR}/wlan/wlan_mac.bin" +TMP_MACFILE="$(mktemp -t wlan_mac.XXXXXX)" + +# Read the MACs from DeviceTree. We can have up to four wireless interfaces +# The only required one is wlan0 that is mapped with device tree mac address +# without suffix. +for index in $(seq 0 3); do + MAC_ADDR="$(hexdump -ve '1/1 "%02X"' /proc/device-tree/wireless/mac-address${index%0} 2>/dev/null)" + if [ "${index}" = "0" ] && { [ -z "${MAC_ADDR}" ] || [ "${MAC_ADDR}" = "00:00:00:00:00:00" ]; }; then + # Set a default MAC for wlan0 + MAC_ADDR="0004F3FFFFFB" + fi + + # Add the MAC address to the firmware file with the expected format + echo "Intf${index}MacAddress=${MAC_ADDR}" >> ${TMP_MACFILE} +done + +# Override the MAC firmware file only if the MAC file has changed. +if ! cmp -s ${TMP_MACFILE} ${MACFILE}; then + cp ${TMP_MACFILE} ${MACFILE} +fi +rm -f "${TMP_MACFILE}" + +OTP_REGION_CODE="$(cat /proc/device-tree/digi,hwid,cert 2>/dev/null | tr -d '\0')" +DTB_REGION_CODE="$(cat /proc/device-tree/wireless/regulatory-domain 2>/dev/null | tr -d '\0')" +US_CODE="0x0" +WW_CODE="0x1" +JP_CODE="0x2" +# Check if the DTB_REGION_CODE is in the list of valid codes, +# if not use the OTP programmed value. +case "${DTB_REGION_CODE}" in + ${US_CODE} | ${WW_CODE} | ${JP_CODE}) + REGULATORY_DOMAIN="${DTB_REGION_CODE}";; + *) + if [ -n "${DTB_REGION_CODE}" ]; then + log "5" "[WARN] Invalid region code in device tree, using OTP value" + fi + REGULATORY_DOMAIN="${OTP_REGION_CODE}";; +esac + + +# Create symbolic links to the proper FW files depending on the country region +# Use a sub-shell here to change to firmware directory +( + cd "${FIRMWARE_DIR}" + + BDATA_SOURCE="bdwlan30_US.bin" + case "${REGULATORY_DOMAIN}" in + ${US_CODE}) + log "5" "Setting US wireless region";; + ${WW_CODE}|${JP_CODE}) + if [ -f "bdwlan30_World.bin" ]; then + log "5" "Setting WW (world wide) wireless region" + BDATA_SOURCE="bdwlan30_World.bin" + else + log "5" "[WARN] No WW (worldwide) board data file, using US" + fi + ;; + "") + log "5" "[WARN] region code not found, using US";; + *) + log "5" "[WARN] Invalid region code, using US";; + esac + + # We don't want to rewrite NAND every time we boot so only + # change the links if they are wrong. + BDATA_LINK="bdwlan30.bin" + UTFBDATA_LINK="utfbd30.bin" + if [ ! -e "${BDATA_LINK}" ] || ! cmp -s "${BDATA_LINK}" "${BDATA_SOURCE}"; then + ln -sf "${BDATA_SOURCE}" "${BDATA_LINK}" + ln -sf "${BDATA_SOURCE}" "${UTFBDATA_LINK}" + fi +) + +# Load the wireless module with the params defined in modprobe.d/qca6564.conf +# and reduce the console log level to avoid debug messages at boot time +LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sysctl.conf 2>/dev/null)" +[ -n "${LOGLEVEL}" ] && sysctl -q -w kernel.printk="${LOGLEVEL}" +modprobe wlan + +# Verify the interface is present +if [ -d "/sys/class/net/wlan0" ]; then + # Create 'wlan1' virtual interface + if [ -s "/proc/device-tree/wireless/mac-address1" ] && + [ -s "/proc/device-tree/wireless/mac-address2" ] && + [ -s "/proc/device-tree/wireless/mac-address3" ]; then + : + else + echo "[WARN] Using default MAC addresses for virtual interfaces." + fi + iw dev wlan0 interface add wlan1 type __ap +else + log "3" "[ERROR] Loading qca6564 module" +fi diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-mcc_2.1.01.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-mcc_2.1.01.bb deleted file mode 100644 index ccdd9314..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-mcc_2.1.01.bb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2013 Timesys Corporation -SUMMARY = "Multicore communication kernel module" -LICENSE = "GPL-2.0 | BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c8959abcbbe4d6676c58eab9354019e6 \ - file://BSD_LICENSE;md5=10695b8f86532e5e44640acf4d92a2ef" - -PROVIDES = "virtual/kernel-module-mcc" -RPROVIDES_${PN} = "virtual/kernel-module-mcc" -RPROVIDES_${PN}-dev = "virtual/kernel-module-mcc-dev" - -inherit module - -SRC_URI = "http://repository.timesys.com/buildsources/m/mcc-kmod/mcc-kmod-${PV}/mcc-kmod-${PV}.tar.bz2" - -SRC_URI[md5sum] = "849dfdc34e08c7c82a5e8b452a95f1b3" -SRC_URI[sha256sum] = "ece0c9ccbfb5d2771b115f750361184bb80b2ae5fe82d97d38be2bfee3eeb87e" - -S = "${WORKDIR}/mcc-kmod-${PV}" - -COMPATIBLE_MACHINE = "(vf60)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564/modprobe-qca6564.conf b/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564/modprobe-qca6564.conf new file mode 100644 index 00000000..13852c0c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564/modprobe-qca6564.conf @@ -0,0 +1,4 @@ +# Load the wlan module with values for SDIO3.0. +options wlan asyncintdelay=0x2 writecccr1=0xf2 writecccr1value=0xf \ + writecccr2=0xf1 writecccr2value=0xa8 writecccr3=0xf0 \ + writecccr3value=0xa1 writecccr4=0x15 writecccr4value=0x30 diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564_git.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564_git.bb new file mode 100644 index 00000000..9bed55e0 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/kernel-modules/kernel-module-qca6564_git.bb @@ -0,0 +1,57 @@ +# Copyright (C) 2019 Digi International Inc. + +SUMMARY = "Qualcomm QCA6564 wireless driver module" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d" + +# Reference Qualcomm tag/version +PV = "v4.2.89.63+${SRCPV}" + +SRCBRANCH = "qca6564/master" +SRCREV = "fef49841fd1b4f3fee3b2193f9927c09d59df7de" + +SRC_URI = "\ + git://github.com/digi-embedded/qcacld-2.0.git;protocol=git;branch=${SRCBRANCH} \ + file://modprobe-qca6564.conf \ +" + +S = "${WORKDIR}/git" + +inherit module + +EXTRA_OEMAKE += "CONFIG_LINUX_QCMBR=y WLAN_OPEN_SOURCE=1" +# Explicity state it is not a QC platform, if not the driver will try to remap +# memory that is not allowed in ARMv6 +EXTRA_OEMAKE += "CONFIG_NON_QC_PLATFORM=y" +# Flag to compile the debug version (1 - enabled, rest of values - disabled) +EXTRA_OEMAKE += "BUILD_DEBUG_VERSION=0" +# Flags for SDIO interface +EXTRA_OEMAKE += "CONFIG_CLD_HL_SDIO_CORE=y" + +do_compile_prepend() { + export BUILD_VER=${PV} +} + +do_install_prepend() { + sed -i -e "s/gVhtTxMCS=2/gVhtTxMCS=0/g" ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini +} + +do_install_append() { + install -d ${D}${sysconfdir}/modprobe.d + install -m 0644 ${WORKDIR}/modprobe-qca6564.conf ${D}${sysconfdir}/modprobe.d/qca6564.conf + + install -d ${D}${base_libdir}/firmware/wlan/ + install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_cfg.dat ${D}${base_libdir}/firmware/wlan/cfg.dat + install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini + sed -i -e "s/gVhtTxMCS=2/gVhtTxMCS=0/g" ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini +} + +FILES_${PN} += " \ + ${sysconfdir}/modprobe.d/qca6564.conf \ + ${base_libdir}/firmware/wlan/cfg.dat \ + ${base_libdir}/firmware/wlan/qcom_cfg.ini \ +" + +RRECOMMENDS_${PN} = "hostapd iw crda wireless-regdb udev-rules-digi" + +COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware-qca6564/linux-firmware-qca6564_2.4-r2.2.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware-qca6564/linux-firmware-qca6564_2.4-r2.2.bb new file mode 100644 index 00000000..a844a5c6 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware-qca6564/linux-firmware-qca6564_2.4-r2.2.bb @@ -0,0 +1,31 @@ +# Copyright (C) 2019 Digi International Inc. + +SUMMARY = "Firmware files for Qualcomm's QCA6564 wireless chip" +SECTION = "base" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13" + +SRC_URI = "ftp://ftp1.digi.com/support/digiembeddedyocto/source/${BPN}-${PV}.tar.gz" +SRC_URI[md5sum] = "7400b74881ac499517b6ad761a54f8fc" +SRC_URI[sha256sum] = "be3a56334764e21ee297260b6648075b7fada6f55e24a287a24e7c7d128e27ef" + +S = "${WORKDIR}/linux-firmware-qca6564/" + +do_install() { + install -d ${D}${base_libdir}/firmware/qca + install -m 0644 nvm_tlv_3.2.bin ${D}${base_libdir}/firmware/qca + install -m 0644 rampatch_tlv_3.2.tlv ${D}${base_libdir}/firmware/qca + install -m 0644 bdwlan30_US.bin ${D}${base_libdir}/firmware + install -m 0644 LICENCE.atheros_firmware ${D}${base_libdir}/firmware + install -m 0644 otp30.bin ${D}${base_libdir}/firmware + install -m 0644 qwlan30.bin ${D}${base_libdir}/firmware + install -m 0644 utf30.bin ${D}${base_libdir}/firmware +} + +PACKAGES = "${PN}-bt ${PN}-wifi" + +FILES_${PN}-bt = "/lib/firmware/qca" +FILES_${PN}-wifi = "/lib/firmware" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 00000000..50deb2e0 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -0,0 +1,15 @@ +# Support additional firmware for WiLink8 modules +# TIInit_11.8.32.bts is required for bluetooth support but this particular +# version is not available in the linux-firmware repository. +# +SRC_URI_append_imx6qdl-variscite-som = "\ + https://git.ti.com/ti-bt/service-packs/blobs/raw/5f73abe7c03631bb2596af27e41a94abcc70b009/initscripts/TIInit_11.8.32.bts;name=TIInit_11.8.32 \ +" +SRC_URI[TIInit_11.8.32.md5sum] = "a76788680905c30979038f9e6aa407f3" +SRC_URI[TIInit_11.8.32.sha256sum] = "26ab0608e39fab95a6a55070c2f8364c92aad34442e8349abda71cee4da3277a" + +do_install_append_imx6qdl-variscite-som() { + cp ${WORKDIR}/TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ +} + +PACKAGE_ARCH_imx6qdl-variscite-som = "${MACHINE_ARCH}" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index 50deb2e0..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -# Support additional firmware for WiLink8 modules -# TIInit_11.8.32.bts is required for bluetooth support but this particular -# version is not available in the linux-firmware repository. -# -SRC_URI_append_imx6qdl-variscite-som = "\ - https://git.ti.com/ti-bt/service-packs/blobs/raw/5f73abe7c03631bb2596af27e41a94abcc70b009/initscripts/TIInit_11.8.32.bts;name=TIInit_11.8.32 \ -" -SRC_URI[TIInit_11.8.32.md5sum] = "a76788680905c30979038f9e6aa407f3" -SRC_URI[TIInit_11.8.32.sha256sum] = "26ab0608e39fab95a6a55070c2f8364c92aad34442e8349abda71cee4da3277a" - -do_install_append_imx6qdl-variscite-som() { - cp ${WORKDIR}/TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ -} - -PACKAGE_ARCH_imx6qdl-variscite-som = "${MACHINE_ARCH}" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_4.9.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_4.9.bb deleted file mode 100644 index 352e5b6d..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_4.9.bb +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2018 Advantech Corporation -# Released under the MIT license (see COPYING.MIT for the terms) - -include recipes-kernel/linux/linux-imx.inc -DEPENDS += "lzop-native bc-native" - -SRCBRANCH = "4.9-1.0.x-imx" -SRCREV = "0e674a64b86e2bb00ab43f56104d3ea85dda0066" -LOCALVERSION = "-${SRCBRANCH}-dms-ba16" - -SRC_URI = "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH} \ - file://0001-Add-support-for-the-Advantech-DMS-BA16-Board.patch \ - file://0002-mfd-da9063-Add-wakeup-source-support.patch \ - file://0003-da9063-Add-a-PMIC-qurk-to-support-system-suspend-res.patch \ - file://defconfig \ - " - -COMPATIBLE_MACHINE = "(imx6q-dms-ba16)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_5.4.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_5.4.bb new file mode 100644 index 00000000..7ced8fd9 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech_5.4.bb @@ -0,0 +1,18 @@ +# Copyright (C) 2018 Advantech Corporation +# Released under the MIT license (see COPYING.MIT for the terms) + +include recipes-kernel/linux/linux-imx.inc +DEPENDS += "lzop-native bc-native" + +SRCBRANCH = "imx_5.4.3_2.0.0" +SRCREV = "6ea635c2f9b08dc75ffef7d6262a2c6df7afa4e1" +LOCALVERSION = "-${SRCBRANCH}-dms-ba16" + +SRC_URI = "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH} \ + file://0001-Add-support-for-the-Advantech-DMS-BA16-Board.patch \ + file://0002-mfd-da9063-Add-wakeup-source-support.patch \ + file://0003-da9063-Add-a-PMIC-qurk-to-support-system-suspend-res.patch \ + file://defconfig \ + " + +COMPATIBLE_MACHINE = "(imx6q-dms-ba16)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm/defconfig deleted file mode 100644 index 8df3b3de..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm/defconfig +++ /dev/null @@ -1,507 +0,0 @@ -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_MEMCG=y -CONFIG_MEMCG_SWAP=y -# CONFIG_MEMCG_SWAP_ENABLED is not set -CONFIG_BLK_CGROUP=y -CONFIG_CGROUP_SCHED=y -CONFIG_CFS_BANDWIDTH=y -CONFIG_CGROUP_PIDS=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CPUSETS=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_CGROUP_PERF=y -CONFIG_NAMESPACES=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_CC_STACKPROTECTOR_STRONG=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX51=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_IMX7D=y -CONFIG_PCI=y -CONFIG_PCI_MSI=y -CONFIG_PCI_IMX6=y -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_ARM_PSCI=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 -CONFIG_CMA=y -CONFIG_SECCOMP=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=y -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_NETFILTER=y -CONFIG_NF_CONNTRACK=m -# CONFIG_NF_CONNTRACK_PROCFS is not set -CONFIG_NF_TABLES=m -CONFIG_NF_TABLES_INET=m -CONFIG_NFT_EXTHDR=m -CONFIG_NFT_META=m -CONFIG_NFT_CT=m -CONFIG_NFT_COUNTER=m -CONFIG_NFT_LOG=m -CONFIG_NFT_LIMIT=m -CONFIG_NFT_MASQ=m -CONFIG_NFT_REDIR=m -CONFIG_NFT_NAT=m -CONFIG_NFT_REJECT=m -CONFIG_NFT_COMPAT=m -CONFIG_NFT_HASH=m -CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_IPVS=m -CONFIG_IP_VS=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_NFT_CHAIN_NAT_IPV4=m -CONFIG_NFT_MASQ_IPV4=m -CONFIG_NFT_REDIR_IPV4=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_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=y -CONFIG_LLC2=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CAN_M_CAN=y -CONFIG_CAN_MCP251X=m -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_LL=y -CONFIG_CFG80211=m -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=m -CONFIG_RFKILL=y -CONFIG_RFKILL_GPIO=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_SPI_NOR=y -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_FTP628=m -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -CONFIG_MD=y -CONFIG_BLK_DEV_DM=y -CONFIG_NETDEVICES=y -CONFIG_TUN=m -CONFIG_VETH=m -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -CONFIG_R8169=m -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_AT803X_PHY=y -CONFIG_MICREL_PHY=y -CONFIG_PPP=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_FILTER=y -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_AX88179_178A is not set -CONFIG_USB_NET_CDC_EEM=m -CONFIG_USB_NET_CDC_MBIM=m -# CONFIG_USB_NET_NET1080 is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -# CONFIG_USB_NET_ZAURUS is not set -CONFIG_USB_NET_QMI_WWAN=m -CONFIG_USB_HSO=m -CONFIG_ATH9K=m -# CONFIG_ATH9K_RFKILL is not set -CONFIG_BRCMFMAC=m -CONFIG_IWLWIFI=m -CONFIG_IWLDVM=m -CONFIG_IWLMVM=m -CONFIG_RTL8192CE=m -CONFIG_WL12XX=m -CONFIG_WLCORE_SDIO=m -# CONFIG_WILINK_PLATFORM_DATA is not set -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=m -CONFIG_KEYBOARD_IMX=m -CONFIG_KEYBOARD_CWC_HOOKSWITCH=y -# CONFIG_MOUSE_PS2 is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_AR1020_I2C=m -CONFIG_TOUCHSCREEN_ATMEL_MXT=m -CONFIG_TOUCHSCREEN_CR_MULTI=m -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5=m -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_DEVICETREE_SUPPORT=y -CONFIG_TOUCHSCREEN_CYPRESS_CYTTSP5_I2C=m -CONFIG_TOUCHSCREEN_EGALAX=m -CONFIG_TOUCHSCREEN_EXC3000=m -CONFIG_TOUCHSCREEN_FT5X06=m -CONFIG_TOUCHSCREEN_GOODIX=m -CONFIG_TOUCHSCREEN_ILI210X=m -CONFIG_TOUCHSCREEN_PIC16F616=m -CONFIG_TOUCHSCREEN_MC13783=m -CONFIG_TOUCHSCREEN_TSC2004=m -CONFIG_TOUCHSCREEN_SILEAD=m -CONFIG_TOUCHSCREEN_AR1010_UART=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_GPS_MAX7W=m -CONFIG_SERIAL_SC16IS7XX=m -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_SERIAL_XR20M117X=m -CONFIG_FSL_OTP=y -CONFIG_HW_RANDOM_IMX_RNG=y -CONFIG_MAGSTRIPE=m -CONFIG_SAS=m -CONFIG_DUMMY_I2C_DEVICE=m -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX_GPIO=y -CONFIG_I2C_MUX_PCA954x=y -CONFIG_I2C_MUX_PINCTRL=m -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_I2C_IMX_HS=m -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_IMX_RPMSG=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_GPIO=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_POWER_SUPPLY=y -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_ADS1000=m -CONFIG_SENSORS_MAG3110=y -# CONFIG_MXC_MMA8451 is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_WRITABLE_TRIPS=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_MC13XXX_SPI=m -CONFIG_MFD_MAX77823=y -CONFIG_MFD_ARIZONA_SPI=m -CONFIG_MFD_WM5102=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_ARIZONA=m -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MC13892=m -CONFIG_REGULATOR_PFUZE100=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_MEDIA_PCI_SUPPORT=y -CONFIG_VIDEO_TW686X=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_MXC_MIPI_CSI=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5640_V2=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5642_V2=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m -CONFIG_MXC_VIDEO_GS2971=m -CONFIG_MXC_HDMI_CSI2_TC358743=m -CONFIG_TC358743_AUDIO=y -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_SOC_CAMERA=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_MIPI_RM68200=y -CONFIG_FB_MXC_TVOUT_ADV739X=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_BACKLIGHT_LP8860=y -CONFIG_BACKLIGHT_GPIO=y -CONFIG_DVI_TFP410=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_WM8960=m -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_WM5102=m -CONFIG_SND_SOC_IMX_HDMI=m -CONFIG_HID_MULTITOUCH=m -CONFIG_USB=y -CONFIG_USB_XHCI_HCD=m -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_ACM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_CP210X=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_KEYSPAN=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_SERIAL_QUALCOMM=y -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_CC_TUSB320=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_FUNCTIONFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_G_MULTI=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -# CONFIG_MXC_GPU_VIV is not set -CONFIG_MXC_IPU=y -CONFIG_MXC_IPU_V3_PRE=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_HDMI_CEC=y -CONFIG_MXC_SIM=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_LM3643=m -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=m -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_ISL1208=y -CONFIG_RTC_DRV_M41T80=y -CONFIG_RTC_DRV_M41T80_WDT=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -# CONFIG_MX3_IPU is not set -CONFIG_STAGING=y -CONFIG_DRM_ANX78XX=m -CONFIG_FB_TFT=m -CONFIG_FB_TFT_ST7789V=m -CONFIG_COMMON_CLK_PWM=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_IIO=y -CONFIG_ISL28022_ADC=m -CONFIG_TI_ADC081C=m -CONFIG_TI_ADS7924=m -CONFIG_TI_LMP900XX=m -CONFIG_ISL76534=m -CONFIG_APDS9300=m -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_BATTERY_SAMSUNG=y -CONFIG_FUELGAUGE_MAX77823=m -CONFIG_FUELGAUGE_MAX77823_COULOMB_COUNTING=y -CONFIG_CHARGER_MAX77823=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_QUOTA=y -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_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CONFIGFS_FS=y -CONFIG_ECRYPT_FS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_XZ=y -CONFIG_SQUASHFS_EMBEDDED=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -CONFIG_DEBUG_INFO=y -CONFIG_FRAME_WARN=2048 -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_STRICT_DEVMEM=y -# CONFIG_ARM_UNWIND is not set -CONFIG_DEBUG_SET_MODULE_RONX=y -CONFIG_SECURITY=y -CONFIG_LSM_MMAP_MIN_ADDR=0 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SMACK=y -CONFIG_SECURITY_APPARMOR=y -CONFIG_SECURITY_YAMA=y -CONFIG_DEFAULT_SECURITY_APPARMOR=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_CCM=y -CONFIG_CRYPTO_GCM=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_LIBCRC32C=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm64/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm64/defconfig deleted file mode 100644 index 4e74c69c..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary-4.9.x/arm64/defconfig +++ /dev/null @@ -1,583 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_NO_HZ_IDLE=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -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_JUMP_LABEL=y -CONFIG_CC_STACKPROTECTOR_STRONG=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_ARCH_FSL_IMX8QM=y -CONFIG_ARCH_FSL_IMX8QXP=y -CONFIG_ARCH_FSL_IMX8MQ=y -CONFIG_PCI=y -CONFIG_PCI_IOV=y -CONFIG_PCI_IMX6=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_PCI_HISI=y -CONFIG_ARM64_VA_BITS_48=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_CMA=y -CONFIG_SECCOMP=y -CONFIG_KEXEC=y -CONFIG_XEN=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_COMPAT=y -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_ARM_CPUIDLE=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPUFREQ_DT=y -CONFIG_ARM_BIG_LITTLE_CPUFREQ=y -CONFIG_ARM_IMX8_CPUFREQ=y -CONFIG_ARM_IMX8MQ_CPUFREQ=y -CONFIG_ARM_SCPI_CPUFREQ=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_SYN_COOKIES=y -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -CONFIG_IPV6_SIT=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_NETFILTER_XT_MATCH_IPVS=m -CONFIG_IP_VS=m -CONFIG_NF_CONNTRACK_IPV4=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_NF_CONNTRACK_IPV6=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_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_VLAN_8021Q_MVRP=y -CONFIG_LLC2=y -CONFIG_NET_SWITCHDEV=y -CONFIG_BPF_JIT=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_LEDS=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_BCM=y -CONFIG_BT_HCIUART_QCA=y -CONFIG_BT_HCIVHCI=y -CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_MAC80211_LEDS=y -CONFIG_RFKILL=y -CONFIG_RFKILL_GPIO=y -CONFIG_NET_9P=y -CONFIG_NET_9P_VIRTIO=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=320 -CONFIG_VEXPRESS_CONFIG=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_RAM=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SLRAM=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_SPI_NOR=y -# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set -CONFIG_SPI_FSL_FLEXSPI=y -CONFIG_MTD_UBI=y -CONFIG_OF_OVERLAY=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_XEN_BLKDEV_BACKEND=m -CONFIG_VIRTIO_BLK=y -CONFIG_BLK_DEV_NVME=m -CONFIG_SENSORS_FXOS8700=y -CONFIG_SENSORS_FXAS2100X=y -CONFIG_SRAM=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_SAS_ATA=y -CONFIG_SCSI_HISI_SAS=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_AHCI_CEVA=y -CONFIG_AHCI_XGENE=y -CONFIG_AHCI_QORIQ=y -CONFIG_SATA_SIL24=y -CONFIG_PATA_PLATFORM=y -CONFIG_PATA_OF_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_MACVLAN=m -CONFIG_MACVTAP=m -CONFIG_TUN=y -CONFIG_VETH=m -CONFIG_VIRTIO_NET=y -CONFIG_AMD_XGBE=y -CONFIG_MACB=y -CONFIG_HNS_DSAF=y -CONFIG_HNS_ENET=y -CONFIG_E1000E=y -CONFIG_IGB=y -CONFIG_IGBVF=y -CONFIG_SKY2=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -CONFIG_STMMAC_ETH=m -CONFIG_MDIO_BITBANG=y -CONFIG_AT803X_PHY=y -CONFIG_MICREL_PHY=y -CONFIG_REALTEK_PHY=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=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=y -CONFIG_ATH10K_PCI=y -CONFIG_ATH10K_AHB=y -CONFIG_ATH10K_DEBUGFS=y -CONFIG_BCMDHD_1363=y -CONFIG_BCMDHD_PCIE=y -CONFIG_RTL_CARDS=m -# CONFIG_WLAN_VENDOR_TI is not set -CONFIG_INPUT_POLLDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX_SC_PWRKEY=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_FT5X06=m -CONFIG_TOUCHSCREEN_GOODIX=m -CONFIG_TOUCHSCREEN_SITRONIX_I2C_TOUCH=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -CONFIG_INPUT_MPL3115=y -CONFIG_INPUT_ISL29023=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_DW=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_IMX_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_FSL_OTP=y -CONFIG_VIRTIO_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX_PCA954x=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_I2C_IMX=y -CONFIG_I2C_IMX_LPI2C=y -CONFIG_I2C_CROS_EC_TUNNEL=y -CONFIG_I2C_SLAVE=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_FSL_LPSPI=y -CONFIG_SPI_PL022=y -CONFIG_SPI_SPIDEV=m -CONFIG_SPMI=y -CONFIG_PINCTRL_SINGLE=y -CONFIG_PINCTRL_MAX77620=y -CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_DWAPB=y -CONFIG_GPIO_PL061=y -CONFIG_GPIO_XGENE=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_MAX77620=y -CONFIG_POWER_RESET_SNVS=y -CONFIG_POWER_RESET_VEXPRESS=y -CONFIG_POWER_RESET_XGENE=y -CONFIG_POWER_RESET_SYSCON=y -CONFIG_BATTERY_BQ27XXX=y -CONFIG_SENSORS_ARM_SCPI=y -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_INA2XX=m -# CONFIG_MXC_MMA8451 is not set -CONFIG_THERMAL_WRITABLE_TRIPS=y -CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y -CONFIG_CPU_THERMAL=y -CONFIG_THERMAL_EMULATION=y -CONFIG_IMX8M_THERMAL=y -CONFIG_IMX_SC_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_IMX8_WDT=y -CONFIG_MFD_CROS_EC=y -CONFIG_MFD_CROS_EC_I2C=y -CONFIG_MFD_MAX77620=y -CONFIG_MFD_SEC_CORE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX77620=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_REGULATOR_PWM=y -CONFIG_REGULATOR_QCOM_SPMI=y -CONFIG_REGULATOR_S2MPS11=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_CAPTURE=y -CONFIG_VIDEO_MX8_CAPTURE=y -CONFIG_GMSL_MAX9286=y -CONFIG_VIDEO_MXC_CSI_CAMERA=y -CONFIG_MXC_MIPI_CSI=y -CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_IMX_DPU_CORE=y -CONFIG_IMX_DCSS_CORE=y -CONFIG_DRM=y -CONFIG_DRM_LOAD_EDID_FIRMWARE=y -CONFIG_DRM_I2C_CH7006=m -CONFIG_DRM_I2C_SIL164=m -CONFIG_DRM_VIVANTE=m -CONFIG_DRM_PANEL_SIMPLE=y -CONFIG_DRM_PANEL_RAYDIUM_RM67191=y -CONFIG_DRM_I2C_ADV7511=y -CONFIG_DRM_ITE_IT6263=y -CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -CONFIG_DRM_IMX_TVE=y -CONFIG_DRM_IMX_LDB=y -CONFIG_DRM_IMX_HDMI=y -CONFIG_DRM_IMX_NWL_DSI=y -CONFIG_DRM_IMX_HDP=y -CONFIG_IMX_HDP_CEC=y -CONFIG_DRM_MXSFB=y -CONFIG_FB_IMX64=y -CONFIG_FB_IMX64_DEBUG=y -CONFIG_FB_ARMCLCD=y -CONFIG_FB_MXC_DISP_FRAMEWORK=y -CONFIG_BACKLIGHT_GENERIC=m -CONFIG_BACKLIGHT_PWM=y -CONFIG_BACKLIGHT_LP855X=m -CONFIG_SN65DSI83=y -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_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_SOC_FSL_ACM=y -CONFIG_SND_SOC_FSL_HIFI4=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_AK4458=y -CONFIG_SND_SOC_IMX_AK5558=y -CONFIG_SND_SOC_IMX_AK4497=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_WM8524=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_AMIX=y -CONFIG_SND_SOC_IMX_CDNHDMI=y -CONFIG_SND_SOC_AK4613=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_HID_MULTITOUCH=y -CONFIG_USB=y -CONFIG_USB_OTG=y -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=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_ISP1760_HOST_ROLE=y -CONFIG_USB_CDNS3=y -CONFIG_USB_CDNS3_GADGET=y -CONFIG_USB_CDNS3_HOST=y -CONFIG_USB_TEST=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_USB_HSIC_USB3503=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_GPIO_VBUS=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_ULPI=y -CONFIG_USB_GADGET=y -CONFIG_USB_CONFIGFS=y -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_FSL_UTP=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_CONFIGFS_F_UAC1=y -CONFIG_USB_CONFIGFS_F_UAC2=y -CONFIG_USB_CONFIGFS_F_MIDI=y -CONFIG_USB_CONFIGFS_F_HID=y -CONFIG_USB_ZERO=m -CONFIG_USB_AUDIO=m -CONFIG_GADGET_UAC1=y -CONFIG_USB_ETH=m -CONFIG_USB_ETH_EEM=y -CONFIG_USB_G_NCM=m -CONFIG_USB_FUNCTIONFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=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_ESDHC_IMX=y -CONFIG_MMC_SPI=y -# CONFIG_MXC_GPU_VIV is not set -CONFIG_MXC_SIM=y -CONFIG_MXC_EMVSIM=y -CONFIG_MXC_MLB150=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_SYSCON=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_MAX77686=y -CONFIG_RTC_DRV_M41T80=y -CONFIG_RTC_DRV_M41T80_WDT=y -CONFIG_RTC_DRV_S5M=y -CONFIG_RTC_DRV_DS3232=y -CONFIG_RTC_DRV_EFI=y -CONFIG_RTC_DRV_PL031=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_RTC_DRV_IMX_SC=y -CONFIG_DMADEVICES=y -CONFIG_FSL_EDMA_V3=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_PL330_DMA=y -CONFIG_QCOM_HIDMA_MGMT=y -CONFIG_QCOM_HIDMA=y -CONFIG_SYNC_FILE=y -CONFIG_VIRTIO_PCI=y -CONFIG_VIRTIO_BALLOON=y -CONFIG_VIRTIO_MMIO=y -CONFIG_XEN_GNTDEV=y -CONFIG_XEN_GRANT_DEV_ALLOC=y -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -CONFIG_MEDIA_CEC=y -CONFIG_ION=y -CONFIG_ION_MXC=y -CONFIG_TYPEC_TCPM=y -CONFIG_TYPEC_TCPCI=y -CONFIG_COMMON_CLK_VERSATILE=y -CONFIG_CLK_SP810=y -CONFIG_COMMON_CLK_SCPI=y -CONFIG_CLK_QORIQ=y -# CONFIG_COMMON_CLK_XGENE is not set -CONFIG_COMMON_CLK_PWM=y -CONFIG_ARM_TIMER_SP804=y -CONFIG_CLKSRC_IMX_SYS_CNT=y -CONFIG_MAILBOX=y -CONFIG_ARM_MHU=y -CONFIG_BCM_PDC_MBOX=y -CONFIG_ARM_SMMU=y -CONFIG_ARCH_MXC_ARM64=y -CONFIG_EXTCON_PTN5150=y -CONFIG_IIO=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_PHY_SAMSUNG_USB2=y -CONFIG_PHY_XGENE=y -CONFIG_IMX8_DDR_PERF=y -CONFIG_NVMEM=y -CONFIG_NVMEM_IMX_OCOTP=y -CONFIG_NVMEM_IMX_SCU_OCOTP=y -CONFIG_TEE=y -CONFIG_OPTEE=y -CONFIG_ARM_SCPI_PROTOCOL=y -CONFIG_ACPI=y -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=y -CONFIG_CUSE=m -CONFIG_OVERLAY_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_HUGETLBFS=y -CONFIG_EFIVAR_FS=y -CONFIG_ECRYPT_FS=y -CONFIG_ECRYPT_FS_MESSAGING=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_XZ=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_KVM=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOCKUP_DETECTOR=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_FTRACE is not set -CONFIG_MEMTEST=y -CONFIG_STRICT_DEVMEM=y -CONFIG_SECURITY=y -CONFIG_LSM_MMAP_MIN_ADDR=0 -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SMACK=y -CONFIG_SECURITY_APPARMOR=y -CONFIG_DEFAULT_SECURITY_APPARMOR=y -CONFIG_CRYPTO_RSA=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CHACHA20POLY1305=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_SHA3=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_CAST5=y -CONFIG_CRYPTO_CAST6=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_SERPENT=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_ANSI_CPRNG=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_ARM64_CRYPTO=y -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SHA2_ARM64_CE=y -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_CRC32_ARM64=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_4.9.x.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_4.9.x.bb deleted file mode 100644 index c659eb10..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_4.9.x.bb +++ /dev/null @@ -1,20 +0,0 @@ -# Adapted from linux-imx.inc, copyright (C) 2013, 2014 O.S. Systems Software LTDA -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-kernel/linux/linux-imx.inc - -SUMMARY = "Linux kernel for Boundary Devices boards" - -FILESEXTRAPATHS_prepend_mx6 := "${THISDIR}/${PN}-${PV}/arm:" -FILESEXTRAPATHS_prepend_mx7 := "${THISDIR}/${PN}-${PV}/arm:" -FILESEXTRAPATHS_prepend_mx8 := "${THISDIR}/${PN}-${PV}/arm64:" - -SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH} \ - file://defconfig \ -" - -LOCALVERSION = "-2.0.0-ga+yocto" -SRCBRANCH = "boundary-imx_4.9.x_2.0.0_ga" -SRCREV = "a141bcc882fbba6c2d80d467fa54ac07b37b6f04" -DEPENDS += "lzop-native bc-native" -COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_5.4.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_5.4.bb new file mode 100644 index 00000000..abe3099c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-boundary_5.4.bb @@ -0,0 +1,24 @@ +# Adapted from linux-imx.inc, copyright (C) 2013, 2014 O.S. Systems Software LTDA +# Released under the MIT license (see COPYING.MIT for the terms) + +require recipes-kernel/linux/linux-imx.inc + +SUMMARY = "Linux kernel for Boundary Devices boards" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +LINUX_VERSION = "5.4.50" + +SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH} \ +" + +LOCALVERSION = "-2.1.0-ga+yocto" +SRCBRANCH = "boundary-imx_5.4.x_2.1.0" +SRCREV = "503a3dce966a6b98e7bfdc376477c604a4275c60" +DEPENDS += "lzop-native bc-native" +COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7|nitrogen8m|nitrogen8mm|nitrogen8mn)" + +KBUILD_DEFCONFIG ?= "boundary_defconfig" + +S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch deleted file mode 100644 index 1156b835..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch +++ /dev/null @@ -1,399 +0,0 @@ -From af4b4f2854d6223ba2f1235400f8e8dac660a6a2 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 15 May 2014 17:18:11 +0300 -Subject: [PATCH 01/59] ARM: i.MX6: dts: Add initial support for cm-fx6 - -Add initial support for cm-fx6 module. - -This patch configures: -1) serial console -2) hearbeat led -3) FreeScale NIC -4) pcie -5) Intel I210 NIC -6) wif/bt -7) sata - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 368 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 368 insertions(+) - create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dts - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -new file mode 100644 -index 0000000..1f06d95 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -0,0 +1,368 @@ -+/* -+* Copyright 2013 CompuLab Ltd. -+* -+* Author: Valentin Raevsky -+* -+* The code contained herein is licensed under the GNU General Public -+* License. You may obtain a copy of the GNU General Public License -+* Version 2 or later at the following locations: -+* -+* http://www.opensource.org/licenses/gpl-license.html -+* http://www.gnu.org/copyleft/gpl.html -+*/ -+ -+/dts-v1/; -+#include "imx6q.dtsi" -+ -+/ { -+ model = "CompuLab CM-FX6"; -+ compatible = "compulab,cm-fx6", "fsl,imx6q"; -+ -+ memory { -+ reg = <0x10000000 0x80000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ heartbeat-led { -+ label = "Heartbeat"; -+ gpios = <&gpio2 31 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for mmc */ -+ reg_3p3v: 3p3v { -+ compatible = "regulator-fixed"; -+ regulator-name = "3P3V"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; -+ -+ /* regulator for usb otg */ -+ reg_usb_otg_vbus: usb_otg_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_otg_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio3 22 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator for usb hub1 */ -+ reg_usb_h1_vbus: usb_h1_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_h1_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio7 8 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator1 for wifi/bt */ -+ awnh387_npoweron: regulator-awnh387-npoweron { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-npoweron"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio7 12 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator2 for wifi/bt */ -+ awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-wifi-nreset"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 16 0>; -+ startup-delay-us = <10000>; -+ }; -+ }; -+}; -+ -+&iomuxc { -+ imx6q-cm-fx6 { -+ /* pins for eth0 */ -+ pinctrl_enet: enetgrp { -+ fsl,pins = < -+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 -+ >; -+ }; -+ -+ /* pins for spi */ -+ pinctrl_ecspi1: ecspi1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -+ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -+ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -+ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -+ >; -+ }; -+ -+ /* pins for nand */ -+ pinctrl_gpmi_nand: gpminandgrp { -+ fsl,pins = < -+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -+ >; -+ }; -+ -+ /* pins for i2c1 */ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for i2c2 */ -+ pinctrl_i2c2: i2c2grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for i2c3 */ -+ pinctrl_i2c3: i2c3grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -+ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for console */ -+ pinctrl_uart4: uart4grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -+ >; -+ }; -+ -+ /* pins for usb hub1 */ -+ pinctrl_usbh1: usbh1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -+ >; -+ }; -+ -+ /* pins for usb otg */ -+ pinctrl_usbotg: usbotggrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -+ >; -+ }; -+ -+ /* pins for wifi/bt */ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -+ >; -+ }; -+ -+ /* pins for mmc */ -+ pinctrl_usdhc3: usdhc3grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -+ >; -+ }; -+ }; -+}; -+ -+/* spi */ -+&ecspi1 { -+ fsl,spi-num-chipselects = <2>; -+ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ecspi1>; -+ status = "okay"; -+ -+ flash: m25p80@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "st,m25px16", "st,m25p"; -+ spi-max-frequency = <20000000>; -+ reg = <0>; -+ -+ partition@0 { -+ label = "uboot"; -+ reg = <0x0 0xc0000>; -+ }; -+ -+ partition@c0000 { -+ label = "uboot environment"; -+ reg = <0xc0000 0x40000>; -+ }; -+ -+ partition@100000 { -+ label = "reserved"; -+ reg = <0x100000 0x100000>; -+ }; -+ }; -+}; -+ -+/* eth0 */ -+&fec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+/* nand */ -+&gpmi { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_gpmi_nand>; -+ status = "okay"; -+}; -+ -+/* i2c1 */ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ rtc@56 { -+ compatible = "emmicro,em3027"; -+ reg = <0x56>; -+ }; -+}; -+ -+/* i2c2 */ -+&i2c2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c2>; -+ status = "okay"; -+}; -+ -+/* i2c3 */ -+&i2c3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c3>; -+ status = "okay"; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+}; -+ -+/* eth1 */ -+&pcie { -+ reset-gpio = <&gpio1 26 0>; -+ status = "okay"; -+}; -+ -+/* sata */ -+&sata { -+ status = "okay"; -+}; -+ -+/* rear serial console */ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2_2>; -+ fsl,dte-mode; -+ fsl,uart-has-rtscts; -+ dma-names = "rx", "tx"; -+ dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; -+ status = "okay"; -+}; -+ -+/* console */ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart4>; -+ status = "okay"; -+}; -+ -+/* usb otg */ -+&usbotg { -+ vbus-supply = <®_usb_otg_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbotg>; -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+/* usb hub1 */ -+&usbh1 { -+ vbus-supply = <®_usb_h1_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbh1>; -+ status = "okay"; -+}; -+ -+/* wifi/bt */ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ non-removable; -+ vmmc-supply = <&awnh387_npoweron>; -+ vmmc_aux-supply = <&awnh387_wifi_nreset>; -+ status = "okay"; -+}; -+ -+/* mmc */ -+&usdhc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc3>; -+ vmmc-supply = <®_3p3v>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch deleted file mode 100644 index 44281463..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch +++ /dev/null @@ -1,456 +0,0 @@ -From 591aecd36eb5e5eaf189bfce36db616425c00959 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 15 May 2014 17:25:07 +0300 -Subject: [PATCH 02/59] ARM: i.MX6: cm-fx6: Add defconfig - -Add default configuration file for the cm-fx6 module. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/configs/cm_fx6_defconfig | 434 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 434 insertions(+) - create mode 100644 arch/arm/configs/cm_fx6_defconfig - -diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig -new file mode 100644 -index 0000000..92c3da1 ---- /dev/null -+++ b/arch/arm/configs/cm_fx6_defconfig -@@ -0,0 +1,434 @@ -+CONFIG_KERNEL_LZO=y -+CONFIG_SYSVIPC=y -+CONFIG_NO_HZ=y -+CONFIG_HIGH_RES_TIMERS=y -+CONFIG_IKCONFIG=y -+CONFIG_IKCONFIG_PROC=y -+CONFIG_LOG_BUF_SHIFT=18 -+CONFIG_CGROUPS=y -+CONFIG_RELAY=y -+CONFIG_BLK_DEV_INITRD=y -+CONFIG_EXPERT=y -+CONFIG_PERF_EVENTS=y -+# CONFIG_SLUB_DEBUG is not set -+# CONFIG_COMPAT_BRK is not set -+CONFIG_MODULES=y -+CONFIG_MODULE_UNLOAD=y -+CONFIG_MODVERSIONS=y -+CONFIG_MODULE_SRCVERSION_ALL=y -+# CONFIG_BLK_DEV_BSG is not set -+CONFIG_GPIO_PCA953X=y -+CONFIG_ARCH_MXC=y -+CONFIG_MXC_DEBUG_BOARD=y -+CONFIG_MACH_IMX51_DT=y -+CONFIG_MACH_EUKREA_CPUIMX51SD=y -+CONFIG_SOC_IMX53=y -+CONFIG_SOC_IMX6Q=y -+CONFIG_SOC_IMX6SL=y -+CONFIG_SOC_VF610=y -+# CONFIG_SWP_EMULATE is not set -+CONFIG_PCI=y -+CONFIG_PCI_IMX6=y -+CONFIG_SMP=y -+CONFIG_VMSPLIT_2G=y -+CONFIG_PREEMPT=y -+CONFIG_AEABI=y -+# CONFIG_OABI_COMPAT is not set -+CONFIG_HIGHMEM=y -+CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -+CONFIG_CPU_FREQ=y -+CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -+CONFIG_CPU_FREQ_GOV_POWERSAVE=y -+CONFIG_CPU_FREQ_GOV_USERSPACE=y -+CONFIG_CPU_FREQ_GOV_ONDEMAND=y -+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -+CONFIG_ARM_IMX6_CPUFREQ=y -+CONFIG_CPU_IDLE=y -+CONFIG_VFP=y -+CONFIG_NEON=y -+CONFIG_BINFMT_MISC=m -+CONFIG_PM_RUNTIME=y -+CONFIG_PM_DEBUG=y -+CONFIG_PM_TEST_SUSPEND=y -+CONFIG_NET=y -+CONFIG_PACKET=y -+CONFIG_UNIX=y -+CONFIG_INET=y -+CONFIG_IP_PNP=y -+CONFIG_IP_PNP_DHCP=y -+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -+# CONFIG_INET_XFRM_MODE_TUNNEL is not set -+# CONFIG_INET_XFRM_MODE_BEET is not set -+# CONFIG_INET_LRO is not set -+CONFIG_IPV6=y -+CONFIG_NETFILTER=y -+CONFIG_NETFILTER_DEBUG=y -+CONFIG_NF_CONNTRACK=m -+CONFIG_NF_CONNTRACK_FTP=m -+CONFIG_NF_CONNTRACK_TFTP=m -+CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m -+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -+CONFIG_NETFILTER_XT_TARGET_DSCP=m -+CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m -+CONFIG_NETFILTER_XT_TARGET_LED=m -+CONFIG_NETFILTER_XT_TARGET_MARK=m -+CONFIG_NETFILTER_XT_TARGET_NFLOG=m -+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -+CONFIG_NETFILTER_XT_TARGET_TEE=m -+CONFIG_NETFILTER_XT_TARGET_TRACE=m -+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -+CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m -+CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -+CONFIG_NETFILTER_XT_MATCH_CLUSTER=m -+CONFIG_NETFILTER_XT_MATCH_COMMENT=m -+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -+CONFIG_NETFILTER_XT_MATCH_CPU=m -+CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m -+CONFIG_NETFILTER_XT_MATCH_DSCP=m -+CONFIG_NETFILTER_XT_MATCH_ESP=m -+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -+CONFIG_NETFILTER_XT_MATCH_HELPER=m -+CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -+CONFIG_NETFILTER_XT_MATCH_LENGTH=m -+CONFIG_NETFILTER_XT_MATCH_LIMIT=m -+CONFIG_NETFILTER_XT_MATCH_MAC=m -+CONFIG_NETFILTER_XT_MATCH_MARK=m -+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -+CONFIG_NETFILTER_XT_MATCH_OSF=m -+CONFIG_NETFILTER_XT_MATCH_OWNER=m -+CONFIG_NETFILTER_XT_MATCH_POLICY=m -+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -+CONFIG_NETFILTER_XT_MATCH_QUOTA=m -+CONFIG_NETFILTER_XT_MATCH_RATEEST=m -+CONFIG_NETFILTER_XT_MATCH_REALM=m -+CONFIG_NETFILTER_XT_MATCH_RECENT=m -+CONFIG_NETFILTER_XT_MATCH_STATE=m -+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -+CONFIG_NETFILTER_XT_MATCH_STRING=m -+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -+CONFIG_NETFILTER_XT_MATCH_TIME=m -+CONFIG_NETFILTER_XT_MATCH_U32=m -+CONFIG_NF_CONNTRACK_IPV4=m -+CONFIG_IP_NF_IPTABLES=y -+CONFIG_IP_NF_MATCH_AH=m -+CONFIG_IP_NF_MATCH_ECN=m -+CONFIG_IP_NF_MATCH_RPFILTER=m -+CONFIG_IP_NF_MATCH_TTL=m -+CONFIG_IP_NF_FILTER=y -+CONFIG_IP_NF_TARGET_REJECT=y -+CONFIG_IP_NF_TARGET_ULOG=m -+CONFIG_NF_NAT_IPV4=m -+CONFIG_IP_NF_TARGET_MASQUERADE=m -+CONFIG_IP_NF_TARGET_NETMAP=m -+CONFIG_IP_NF_TARGET_REDIRECT=m -+CONFIG_IP_NF_MANGLE=m -+CONFIG_IP_NF_TARGET_ECN=m -+CONFIG_IP_NF_TARGET_TTL=m -+CONFIG_IP_NF_RAW=m -+CONFIG_IP_NF_ARPTABLES=m -+CONFIG_IP_NF_ARPFILTER=m -+CONFIG_IP_NF_ARP_MANGLE=m -+CONFIG_VLAN_8021Q=m -+CONFIG_VLAN_8021Q_GVRP=y -+CONFIG_CAN=y -+CONFIG_CAN_FLEXCAN=y -+CONFIG_CFG80211=y -+CONFIG_CFG80211_WEXT=y -+CONFIG_MAC80211=y -+CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y -+# CONFIG_STANDALONE is not set -+CONFIG_CMA=y -+CONFIG_CMA_SIZE_MBYTES=320 -+CONFIG_IMX_WEIM=y -+CONFIG_CONNECTOR=y -+CONFIG_MTD=y -+CONFIG_MTD_CMDLINE_PARTS=y -+CONFIG_MTD_BLOCK=y -+CONFIG_MTD_CFI=y -+CONFIG_MTD_JEDECPROBE=y -+CONFIG_MTD_CFI_INTELEXT=y -+CONFIG_MTD_CFI_AMDSTD=y -+CONFIG_MTD_CFI_STAA=y -+CONFIG_MTD_PHYSMAP_OF=y -+CONFIG_MTD_DATAFLASH=y -+CONFIG_MTD_M25P80=y -+CONFIG_MTD_SST25L=y -+CONFIG_MTD_NAND=y -+CONFIG_MTD_NAND_GPMI_NAND=y -+CONFIG_MTD_NAND_MXC=y -+CONFIG_MTD_UBI=y -+CONFIG_BLK_DEV_LOOP=y -+CONFIG_BLK_DEV_RAM=y -+CONFIG_BLK_DEV_RAM_SIZE=65536 -+CONFIG_EEPROM_AT24=y -+CONFIG_EEPROM_AT25=y -+# CONFIG_SCSI_PROC_FS is not set -+CONFIG_BLK_DEV_SD=y -+CONFIG_SCSI_MULTI_LUN=y -+CONFIG_SCSI_CONSTANTS=y -+CONFIG_SCSI_LOGGING=y -+CONFIG_SCSI_SCAN_ASYNC=y -+# CONFIG_SCSI_LOWLEVEL is not set -+CONFIG_ATA=y -+CONFIG_SATA_AHCI_PLATFORM=y -+CONFIG_AHCI_IMX=y -+CONFIG_PATA_IMX=y -+CONFIG_NETDEVICES=y -+CONFIG_TUN=m -+# CONFIG_NET_VENDOR_BROADCOM is not set -+CONFIG_CS89x0=y -+CONFIG_CS89x0_PLATFORM=y -+# CONFIG_NET_VENDOR_FARADAY is not set -+CONFIG_IGB=m -+# CONFIG_NET_VENDOR_MARVELL is not set -+# CONFIG_NET_VENDOR_MICREL is not set -+# CONFIG_NET_VENDOR_MICROCHIP is not set -+# CONFIG_NET_VENDOR_NATSEMI is not set -+# CONFIG_NET_VENDOR_SEEQ is not set -+CONFIG_SMC91X=y -+CONFIG_SMC911X=y -+CONFIG_SMSC911X=y -+# CONFIG_NET_VENDOR_STMICRO is not set -+CONFIG_ATH_CARDS=y -+CONFIG_ATH6KL=m -+CONFIG_ATH6KL_SDIO=m -+CONFIG_MWIFIEX=m -+CONFIG_MWIFIEX_SDIO=m -+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -+CONFIG_INPUT_EVDEV=y -+CONFIG_INPUT_EVBUG=m -+CONFIG_KEYBOARD_GPIO=y -+CONFIG_KEYBOARD_IMX=y -+CONFIG_MOUSE_PS2=m -+CONFIG_MOUSE_PS2_ELANTECH=y -+CONFIG_INPUT_TOUCHSCREEN=y -+CONFIG_TOUCHSCREEN_EGALAX=y -+CONFIG_TOUCHSCREEN_ELAN=y -+CONFIG_TOUCHSCREEN_MAX11801=y -+CONFIG_TOUCHSCREEN_MC13783=y -+CONFIG_INPUT_MISC=y -+CONFIG_INPUT_MMA8450=y -+CONFIG_INPUT_ISL29023=y -+CONFIG_SERIO_SERPORT=m -+CONFIG_VT_HW_CONSOLE_BINDING=y -+# CONFIG_LEGACY_PTYS is not set -+# CONFIG_DEVKMEM is not set -+CONFIG_SERIAL_IMX=y -+CONFIG_SERIAL_IMX_CONSOLE=y -+CONFIG_SERIAL_FSL_LPUART=y -+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -+CONFIG_FSL_OTP=y -+CONFIG_MXS_VIIM=y -+# CONFIG_I2C_COMPAT is not set -+CONFIG_I2C_CHARDEV=y -+# CONFIG_I2C_HELPER_AUTO is not set -+CONFIG_I2C_ALGOPCF=m -+CONFIG_I2C_ALGOPCA=m -+CONFIG_I2C_IMX=y -+CONFIG_SPI=y -+CONFIG_SPI_IMX=y -+CONFIG_GPIO_SYSFS=y -+CONFIG_POWER_SUPPLY=y -+CONFIG_SABRESD_MAX8903=y -+CONFIG_IMX6_USB_CHARGER=y -+CONFIG_SENSORS_MAX17135=y -+CONFIG_SENSORS_MAG3110=y -+CONFIG_THERMAL=y -+CONFIG_CPU_THERMAL=y -+CONFIG_IMX_THERMAL=y -+CONFIG_DEVICE_THERMAL=y -+CONFIG_WATCHDOG=y -+CONFIG_IMX2_WDT=y -+CONFIG_MFD_DA9052_I2C=y -+CONFIG_MFD_MC13XXX_SPI=y -+CONFIG_MFD_MC13XXX_I2C=y -+CONFIG_MFD_MAX17135=y -+CONFIG_MFD_SI476X_CORE=y -+CONFIG_REGULATOR=y -+CONFIG_REGULATOR_FIXED_VOLTAGE=y -+CONFIG_REGULATOR_DA9052=y -+CONFIG_REGULATOR_ANATOP=y -+CONFIG_REGULATOR_MC13783=y -+CONFIG_REGULATOR_MC13892=y -+CONFIG_REGULATOR_MAX17135=y -+CONFIG_REGULATOR_PFUZE100=y -+CONFIG_MEDIA_SUPPORT=y -+CONFIG_MEDIA_CAMERA_SUPPORT=y -+CONFIG_MEDIA_RADIO_SUPPORT=y -+CONFIG_VIDEO_V4L2_INT_DEVICE=y -+CONFIG_MEDIA_USB_SUPPORT=y -+CONFIG_USB_VIDEO_CLASS=m -+CONFIG_V4L_PLATFORM_DRIVERS=y -+CONFIG_VIDEO_MXC_OUTPUT=y -+CONFIG_VIDEO_MXC_CAPTURE=m -+CONFIG_VIDEO_MXC_CSI_CAMERA=m -+CONFIG_MXC_CAMERA_OV5640=m -+CONFIG_MXC_CAMERA_OV5642=m -+CONFIG_MXC_CAMERA_OV5640_MIPI=m -+CONFIG_MXC_TVIN_ADV7180=m -+CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -+CONFIG_VIDEO_MXC_IPU_OUTPUT=y -+CONFIG_VIDEO_MXC_PXP_V4L2=y -+CONFIG_SOC_CAMERA=y -+CONFIG_VIDEO_MX3=y -+CONFIG_RADIO_SI476X=y -+CONFIG_SOC_CAMERA_OV2640=y -+CONFIG_DRM=y -+CONFIG_DRM_VIVANTE=y -+CONFIG_FB=y -+CONFIG_FB_MXS=y -+CONFIG_BACKLIGHT_LCD_SUPPORT=y -+CONFIG_LCD_CLASS_DEVICE=y -+CONFIG_LCD_L4F00242T03=y -+CONFIG_LCD_PLATFORM=y -+CONFIG_BACKLIGHT_CLASS_DEVICE=y -+CONFIG_BACKLIGHT_PWM=y -+CONFIG_FB_MXC_SYNC_PANEL=y -+CONFIG_FB_MXC_LDB=y -+CONFIG_FB_MXC_MIPI_DSI=y -+CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -+CONFIG_FB_MXC_HDMI=y -+CONFIG_FB_MXC_EINK_PANEL=y -+CONFIG_FB_MXS_SII902X=y -+CONFIG_HANNSTAR_CABC=y -+CONFIG_FRAMEBUFFER_CONSOLE=y -+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -+CONFIG_FONTS=y -+CONFIG_FONT_8x8=y -+CONFIG_FONT_8x16=y -+CONFIG_LOGO=y -+CONFIG_SOUND=y -+CONFIG_SND=y -+CONFIG_SND_USB_AUDIO=m -+CONFIG_SND_SOC=y -+CONFIG_SND_IMX_SOC=y -+CONFIG_SND_SOC_EUKREA_TLV320=y -+CONFIG_SND_SOC_IMX_CS42888=y -+CONFIG_SND_SOC_IMX_WM8962=y -+CONFIG_SND_SOC_IMX_SGTL5000=y -+CONFIG_SND_SOC_IMX_SPDIF=y -+CONFIG_SND_SOC_IMX_MC13783=y -+CONFIG_SND_SOC_IMX_HDMI=y -+CONFIG_SND_SOC_IMX_SI476X=y -+CONFIG_USB=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_STORAGE=y -+CONFIG_USB_CHIPIDEA=y -+CONFIG_USB_CHIPIDEA_UDC=y -+CONFIG_USB_CHIPIDEA_HOST=y -+CONFIG_USB_PHY=y -+CONFIG_NOP_USB_XCEIV=y -+CONFIG_USB_MXS_PHY=y -+CONFIG_USB_GADGET=y -+CONFIG_USB_ZERO=m -+CONFIG_USB_ETH=m -+CONFIG_USB_MASS_STORAGE=m -+CONFIG_USB_G_SERIAL=m -+CONFIG_MMC=y -+CONFIG_MMC_UNSAFE_RESUME=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_PLTFM=y -+CONFIG_MMC_SDHCI_ESDHC_IMX=y -+CONFIG_MXC_IPU=y -+CONFIG_MXC_GPU_VIV=y -+CONFIG_MXC_ASRC=y -+CONFIG_MXC_MIPI_CSI2=y -+CONFIG_MXC_MLB150=m -+CONFIG_NEW_LEDS=y -+CONFIG_LEDS_CLASS=y -+CONFIG_LEDS_GPIO=y -+CONFIG_LEDS_TRIGGERS=y -+CONFIG_LEDS_TRIGGER_GPIO=y -+CONFIG_RTC_CLASS=y -+CONFIG_RTC_INTF_DEV_UIE_EMUL=y -+CONFIG_RTC_DRV_MC13XXX=y -+CONFIG_RTC_DRV_MXC=y -+CONFIG_RTC_DRV_SNVS=y -+CONFIG_DMADEVICES=y -+CONFIG_MXC_PXP_V2=y -+CONFIG_IMX_SDMA=y -+CONFIG_MXS_DMA=y -+CONFIG_STAGING=y -+CONFIG_COMMON_CLK_DEBUG=y -+# CONFIG_IOMMU_SUPPORT is not set -+CONFIG_PWM=y -+CONFIG_PWM_IMX=y -+CONFIG_EXT2_FS=y -+CONFIG_EXT2_FS_XATTR=y -+CONFIG_EXT2_FS_POSIX_ACL=y -+CONFIG_EXT2_FS_SECURITY=y -+CONFIG_EXT3_FS=y -+CONFIG_EXT3_FS_POSIX_ACL=y -+CONFIG_EXT3_FS_SECURITY=y -+CONFIG_EXT4_FS=y -+CONFIG_EXT4_FS_POSIX_ACL=y -+CONFIG_EXT4_FS_SECURITY=y -+CONFIG_QUOTA=y -+CONFIG_QUOTA_NETLINK_INTERFACE=y -+# CONFIG_PRINT_QUOTA_WARNING is not set -+CONFIG_AUTOFS4_FS=y -+CONFIG_FUSE_FS=y -+CONFIG_ISO9660_FS=m -+CONFIG_JOLIET=y -+CONFIG_ZISOFS=y -+CONFIG_UDF_FS=m -+CONFIG_MSDOS_FS=m -+CONFIG_VFAT_FS=y -+CONFIG_TMPFS=y -+CONFIG_JFFS2_FS=y -+CONFIG_UBIFS_FS=y -+CONFIG_NFS_FS=y -+CONFIG_NFS_V3_ACL=y -+CONFIG_NFS_V4=y -+CONFIG_ROOT_NFS=y -+CONFIG_NLS_DEFAULT="cp437" -+CONFIG_NLS_CODEPAGE_437=y -+CONFIG_NLS_ASCII=y -+CONFIG_NLS_ISO8859_1=y -+CONFIG_NLS_ISO8859_15=m -+CONFIG_NLS_UTF8=y -+CONFIG_MAGIC_SYSRQ=y -+# CONFIG_SCHED_DEBUG is not set -+# CONFIG_DEBUG_BUGVERBOSE is not set -+# CONFIG_FTRACE is not set -+CONFIG_SECURITYFS=y -+CONFIG_CRYPTO_USER=y -+CONFIG_CRYPTO_TEST=m -+CONFIG_CRYPTO_CCM=y -+CONFIG_CRYPTO_GCM=y -+CONFIG_CRYPTO_CBC=y -+CONFIG_CRYPTO_CTS=y -+CONFIG_CRYPTO_ECB=y -+CONFIG_CRYPTO_LRW=y -+CONFIG_CRYPTO_XTS=y -+CONFIG_CRYPTO_MD4=y -+CONFIG_CRYPTO_MD5=y -+CONFIG_CRYPTO_MICHAEL_MIC=y -+CONFIG_CRYPTO_RMD128=y -+CONFIG_CRYPTO_RMD160=y -+CONFIG_CRYPTO_RMD256=y -+CONFIG_CRYPTO_RMD320=y -+CONFIG_CRYPTO_SHA1=y -+CONFIG_CRYPTO_SHA256=y -+CONFIG_CRYPTO_SHA512=y -+CONFIG_CRYPTO_TGR192=y -+CONFIG_CRYPTO_WP512=y -+CONFIG_CRYPTO_BLOWFISH=y -+CONFIG_CRYPTO_CAMELLIA=y -+CONFIG_CRYPTO_DES=y -+CONFIG_CRYPTO_TWOFISH=y -+# CONFIG_CRYPTO_ANSI_CPRNG is not set -+CONFIG_CRYPTO_DEV_FSL_CAAM=y -+CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -+CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -+CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -+CONFIG_CRC_CCITT=m -+CONFIG_CRC_T10DIF=y -+CONFIG_CRC7=m -+CONFIG_LIBCRC32C=m --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0003-igb-Enable-random-mac-address.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0003-igb-Enable-random-mac-address.patch deleted file mode 100644 index 7fb766b5..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0003-igb-Enable-random-mac-address.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0a691facfb253b42cdaeaedd77477d13c6fa99f8 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 15 May 2014 17:26:30 +0300 -Subject: [PATCH 03/59] igb: Enable random mac address - -Enable random mac address in order to let the driver up -if eeprom values are incorrect. - -Signed-off-by: Valentin Raevsky ---- - drivers/net/ethernet/intel/igb/igb_main.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c -index 206e79d..2472835 100644 ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -2387,6 +2387,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - if (hw->mac.ops.read_mac_addr(hw)) - dev_err(&pdev->dev, "NVM Read Error\n"); - -+ if (!is_valid_ether_addr(hw->mac.addr)) { -+ dev_info(&pdev->dev, "Random MAC Address\n"); -+ random_ether_addr(hw->mac.addr); -+ } -+ - memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); - - if (!is_valid_ether_addr(netdev->dev_addr)) { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch deleted file mode 100644 index d9c90b0b..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0004-ARM-i.MX6-cm-fx6-update-defconfig.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f02b927b88856dde0ec988705e6445159bb272ae Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 22 Jun 2014 18:03:27 +0300 -Subject: [PATCH 04/59] ARM: i.MX6: cm-fx6: update defconfig - -Enable EM3027 RTC - -Signed-off-by: Valentin Raevsky ---- - arch/arm/configs/cm_fx6_defconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig -index 92c3da1..eb6d9cb 100644 ---- a/arch/arm/configs/cm_fx6_defconfig -+++ b/arch/arm/configs/cm_fx6_defconfig -@@ -347,6 +347,7 @@ CONFIG_LEDS_TRIGGERS=y - CONFIG_LEDS_TRIGGER_GPIO=y - CONFIG_RTC_CLASS=y - CONFIG_RTC_INTF_DEV_UIE_EMUL=y -+CONFIG_RTC_DRV_EM3027=y - CONFIG_RTC_DRV_MC13XXX=y - CONFIG_RTC_DRV_MXC=y - CONFIG_RTC_DRV_SNVS=y --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch deleted file mode 100644 index 8d133e40..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 80e3270f42e72dc01f8c2235fbdaf5fa94dd6fce Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 23 Jun 2014 13:53:35 +0300 -Subject: [PATCH 05/59] ARM: i.MX6: dts: add HDMI and DVI support - -Add HDMI and DVI support on IPU1 and IPU2, define two frame buffers. -Enable starting X with fbdev. ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 65 +++++++++++++++++++++++++++++++++++- - 1 file changed, 64 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 1f06d95..018c3b1 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -86,6 +86,44 @@ - startup-delay-us = <10000>; - }; - }; -+ -+ aliases { -+ mxcfb0 = &mxcfb1; -+ mxcfb1 = &mxcfb2; -+ }; -+ -+ mxcfb1: fb@0 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "hdmi"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <24>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ mxcfb2: fb@1 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "lcd"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <24>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ lcd@0 { -+ compatible = "fsl,lcd"; -+ ipu_id = <0>; -+ disp_id = <0>; -+ default_ifmt = "RGB24"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ipu1_1>; -+ status = "okay"; -+ }; -+ - }; - - &iomuxc { -@@ -287,7 +325,7 @@ - &i2c2 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c2>; -- status = "okay"; -+ /* status = "okay"; */ - }; - - /* i2c3 */ -@@ -366,3 +404,28 @@ - vmmc-supply = <®_3p3v>; - status = "okay"; - }; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ status = "okay"; -+}; -+ -+&hdmi_core { -+ ipu_id = <1>; -+ disp_id = <0>; -+ status = "okay"; -+}; -+ -+&hdmi_video { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -+ fsl,hdcp; -+ status = "okay"; -+}; -+ -+&hdmi_audio { -+/* status = "okay"; */ -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch deleted file mode 100644 index a31a9771..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 608c9ed0c20fe1258b8982e3ce452482aa1c002e Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 23 Jun 2014 15:29:21 +0300 -Subject: [PATCH 06/59] ARM: i.MX6: dts: add HDMI-Audio support - -Add HDMI-Audio support. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 018c3b1..76b4b0c 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -92,6 +92,13 @@ - mxcfb1 = &mxcfb2; - }; - -+ sound-hdmi { -+ compatible = "fsl,imx6q-audio-hdmi", -+ "fsl,imx-audio-hdmi"; -+ model = "imx-audio-hdmi"; -+ hdmi-controller = <&hdmi_audio>; -+ }; -+ - mxcfb1: fb@0 { - compatible = "fsl,mxc_sdc_fb"; - disp_dev = "hdmi"; -@@ -427,5 +434,5 @@ - }; - - &hdmi_audio { --/* status = "okay"; */ -+ status = "okay"; - }; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0007-ARM-i.MX6-dts-add-SPDIF-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0007-ARM-i.MX6-dts-add-SPDIF-support.patch deleted file mode 100644 index 24e53615..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0007-ARM-i.MX6-dts-add-SPDIF-support.patch +++ /dev/null @@ -1,69 +0,0 @@ -From b0e655dbaddb94c4b7c73c00140b43fb0b1ecd36 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 23 Jun 2014 16:30:18 +0300 -Subject: [PATCH 07/59] ARM: i.MX6: dts: add SPDIF support - -Add SPDIF support. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 76b4b0c..3f73b83 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -99,6 +99,15 @@ - hdmi-controller = <&hdmi_audio>; - }; - -+ sound-spdif { -+ compatible = "fsl,imx-audio-spdif", -+ "fsl,imx-sabreauto-spdif"; -+ model = "imx-spdif"; -+ spdif-controller = <&spdif>; -+ spdif-out; -+ spdif-in; -+ }; -+ - mxcfb1: fb@0 { - compatible = "fsl,mxc_sdc_fb"; - disp_dev = "hdmi"; -@@ -153,7 +162,6 @@ - MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 - MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 - MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -- MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 - >; - }; - -@@ -260,6 +268,15 @@ - MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 - >; - }; -+ -+ /* pins for spdif */ -+ pinctrl_spdif: spdifgrp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -+ MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -+ >; -+ }; -+ - }; - }; - -@@ -436,3 +453,9 @@ - &hdmi_audio { - status = "okay"; - }; -+ -+&spdif { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spdif>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0008-ARM-i.MX6-dts-add-Power-Button.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0008-ARM-i.MX6-dts-add-Power-Button.patch deleted file mode 100644 index d463399d..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0008-ARM-i.MX6-dts-add-Power-Button.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a15ad25075d0d78f4462521260902c0f03d6a343 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 24 Jun 2014 15:35:52 +0300 -Subject: [PATCH 08/59] ARM: i.MX6: dts: add "Power Button" - -Add "Power Button" by means of GPIO - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 3f73b83..0abb116 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -87,6 +87,16 @@ - }; - }; - -+ gpio-keys { -+ compatible = "gpio-keys"; -+ power { -+ label = "Power Button"; -+ gpios = <&gpio1 29 1>; -+ linux,code = <116>; /* KEY_POWER */ -+ gpio-key,wakeup; -+ }; -+ }; -+ - aliases { - mxcfb0 = &mxcfb1; - mxcfb1 = &mxcfb2; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch deleted file mode 100644 index cf06c29e..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0d82c1831d3fe3cf53e6b8d0435ff6bd621e07d2 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 10:42:20 +0300 -Subject: [PATCH 09/59] ARM: i.MX6: dts: Enable uart2 as a serial console - -Enable ttymxc1 for use as a serial console: -1) Add the correct uart2 pinmux configuration. -2) Disable uart2 dte mode. - It allows running 'getty' and 'login' on the ttymxc1. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 0abb116..16cefe0 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -287,6 +287,16 @@ - >; - }; - -+ /* pins for uart2 */ -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 -+ >; -+ }; -+ - }; - }; - -@@ -389,8 +399,8 @@ - /* rear serial console */ - &uart2 { - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart2_2>; -- fsl,dte-mode; -+ pinctrl-0 = <&pinctrl_uart2>; -+ /* fsl,dte-mode; */ - fsl,uart-has-rtscts; - dma-names = "rx", "tx"; - dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch deleted file mode 100644 index e055a3c7..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 11f421d3b4a9f4b1d256fa6bc6b6b9c313cf1b93 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 10:51:44 +0300 -Subject: [PATCH 10/59] ARM: i.MX6: dts: add pcie power/reset gpio definition - -Add pcie power/reset gpio definition. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 16cefe0..592db30 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -297,6 +297,13 @@ - >; - }; - -+ /* pins for pcie */ -+ pinctrl_pcie: pciegrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -+ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -+ >; -+ }; - }; - }; - -@@ -387,7 +394,10 @@ - - /* eth1 */ - &pcie { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pcie>; - reset-gpio = <&gpio1 26 0>; -+ power-on-gpio = <&gpio2 24 0>; - status = "okay"; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch deleted file mode 100644 index 37b49495..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 811721a51deec0f751d98ba438d763c4b9d1f736 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 10:53:32 +0300 -Subject: [PATCH 11/59] ARM: i.MX6: dts: add onboard SSD pin configuration - -Add onboard SSD pin configuration. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 592db30..0dfffa9 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -153,6 +153,26 @@ - }; - - &iomuxc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hog>; -+ -+ hog { -+ pinctrl_hog: hoggrp { -+ fsl,pins = < -+ /* SATA PWR */ -+ MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 -+ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 -+ MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 -+ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 -+ /* SATA CTRL */ -+ MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 -+ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 -+ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 -+ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -+ >; -+ }; -+ }; -+ - imx6q-cm-fx6 { - /* pins for eth0 */ - pinctrl_enet: enetgrp { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch deleted file mode 100644 index e2e8fd28..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch +++ /dev/null @@ -1,92 +0,0 @@ -From bf5a6721257ec96c1626f295851014b373a3a20a Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 10:54:43 +0300 -Subject: [PATCH 12/59] ARM: i.MX6: dts: add onboard SSD power up sequence - -Add onboard SSD power up sequence. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 66 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 66 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 0dfffa9..286b03e 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -85,6 +85,72 @@ - gpio = <&gpio6 16 0>; - startup-delay-us = <10000>; - }; -+ -+ reg_sata_phy_slp: sata_phy_slp { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_phy_slp"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 23 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ }; -+ -+ reg_sata_nrstdly: sata_nrstdly { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nrstdly"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 6 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_phy_slp>; -+ }; -+ -+ reg_sata_pwren: sata_pwren { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_pwren"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio1 28 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nrstdly>; -+ }; -+ -+ reg_sata_nstandby1: sata_nstandby1 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby1"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 20 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_pwren>; -+ }; -+ -+ reg_sata_nstandby2: sata_nstandby2 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby2"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio5 2 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nstandby1>; -+ }; -+ -+ reg_sata_ldo_en: sata_ldo_en { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_ldo_en"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 16 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ regulator-boot-on; -+ vin-supply = <®_sata_nstandby2>; -+ }; - }; - - gpio-keys { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch deleted file mode 100644 index e09502f9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6a962cb469afddc96a37dce883af88a29a53a30c Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 10:57:39 +0300 -Subject: [PATCH 13/59] ARM: i.MX6: dts: add audio mux pinmux configuration - -Add audio mux pinmux configuration and enable audio mux. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 286b03e..776e0d8 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -373,6 +373,17 @@ - >; - }; - -+ /* pins for audmux */ -+ pinctrl_audmux: audmuxgrp { -+ fsl,pins = < -+ MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -+ MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -+ MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -+ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -+ MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -+ >; -+ }; -+ - /* pins for uart2 */ - pinctrl_uart2: uart2grp { - fsl,pins = < -@@ -575,3 +586,9 @@ - pinctrl-0 = <&pinctrl_spdif>; - status = "okay"; - }; -+ -+&audmux { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_audmux>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0014-ARM-i.MX6-dts-add-analog-audio-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0014-ARM-i.MX6-dts-add-analog-audio-support.patch deleted file mode 100644 index 511298fd..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0014-ARM-i.MX6-dts-add-analog-audio-support.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0afe8320732c2609015af4c0b474cede18f81f24 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 11:02:28 +0300 -Subject: [PATCH 14/59] ARM: i.MX6: dts: add analog audio support - -1) Add i2c analog audion device node definition. -2) Add wm8731 codec node definition. -3) Enable ssi2 in master mode. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 776e0d8..9f5da43 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -168,6 +168,15 @@ - mxcfb1 = &mxcfb2; - }; - -+ sound { -+ compatible = "fsl,imx6q-cm-fx6-wm8731", -+ "fsl,imx-audio-wm8731"; -+ model = "wm8731-audio"; -+ ssi-controller = <&ssi2>; -+ audio-codec = <&codec>; -+ audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; -+ }; -+ - sound-hdmi { - compatible = "fsl,imx6q-audio-hdmi", - "fsl,imx-audio-hdmi"; -@@ -487,6 +496,17 @@ - reg = <0x50>; - pagesize = <16>; - }; -+ -+ codec: wm8731@1a { -+ compatible = "wlf,wm8731"; -+ reg = <0x1a>; -+ clocks = <&clks 173>, <&clks 158>; -+ clock-names = "pll4", "imx-ssi.1"; -+ AVDD-supply = <&pu_dummy>; -+ HPVDD-supply = <&pu_dummy>; -+ DCVDD-supply = <&pu_dummy>; -+ DBVDD-supply = <&pu_dummy>; -+ }; - }; - - /* eth1 */ -@@ -556,6 +576,11 @@ - status = "okay"; - }; - -+&ssi2 { -+ fsl,mode = "i2s-master"; -+ status = "okay"; -+}; -+ - &mxcfb1 { - status = "okay"; - }; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch deleted file mode 100644 index f3d4befd..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch +++ /dev/null @@ -1,573 +0,0 @@ -From 5fbe55d2945782fee3f3238f20a8dcd0b9ba630c Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 20 Jul 2014 11:10:12 +0300 -Subject: [PATCH 15/59] ARM: i.MX6: ASoC: add imx-wm8731 machine driver - -This is the initial imx-wm8731 device-tree-only machine driver working with -fsl_ssi driver. Works in the slave mode. - -Signed-off-by: Valentin Raevsky ---- - sound/soc/fsl/Kconfig | 12 ++ - sound/soc/fsl/Makefile | 2 + - sound/soc/fsl/imx-wm8731.c | 505 ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 519 insertions(+) - create mode 100644 sound/soc/fsl/imx-wm8731.c - -diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig -index 573dabb..bb229da 100644 ---- a/sound/soc/fsl/Kconfig -+++ b/sound/soc/fsl/Kconfig -@@ -252,6 +252,18 @@ config SND_SOC_IMX_CS42888 - Say Y if you want to add support for SoC audio on an i.MX board with - a cs42888 codec. - -+config SND_SOC_IMX_WM8731 -+ tristate "SoC Audio support for i.MX boards with wm8731" -+ depends on OF && I2C -+ select SND_SOC_WM8731 -+ select SND_SOC_IMX_PCM_DMA -+ select SND_SOC_IMX_AUDMUX -+ select SND_SOC_FSL_SSI -+ select SND_SOC_FSL_UTILS -+ help -+ Say Y if you want to add support for SoC audio on an i.MX board with -+ a wm8731 codec. -+ - config SND_SOC_IMX_WM8962 - tristate "SoC Audio support for i.MX boards with wm8962" - depends on OF && I2C -diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile -index 144cd69..65f8e6f 100644 ---- a/sound/soc/fsl/Makefile -+++ b/sound/soc/fsl/Makefile -@@ -55,6 +55,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o - snd-soc-wm1133-ev1-objs := wm1133-ev1.o - snd-soc-imx-cs42888-objs := imx-cs42888.o - snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o -+snd-soc-imx-wm8731-objs := imx-wm8731.o - snd-soc-imx-wm8962-objs := imx-wm8962.o - snd-soc-imx-spdif-objs := imx-spdif.o - snd-soc-imx-mc13783-objs := imx-mc13783.o -@@ -69,6 +70,7 @@ obj-$(CONFIG_SND_MXC_SOC_WM1133_EV1) += snd-soc-wm1133-ev1.o - obj-$(CONFIG_SND_SOC_IMX_CS42888) += snd-soc-imx-cs42888.o - obj-$(CONFIG_SND_SOC_IMX_SGTL5000) += snd-soc-imx-sgtl5000.o - obj-$(CONFIG_SND_SOC_IMX_WM8962) += snd-soc-imx-wm8962.o -+obj-$(CONFIG_SND_SOC_IMX_WM8731) += snd-soc-imx-wm8731.o - obj-$(CONFIG_SND_SOC_IMX_SPDIF) += snd-soc-imx-spdif.o - obj-$(CONFIG_SND_SOC_IMX_MC13783) += snd-soc-imx-mc13783.o - obj-$(CONFIG_SND_SOC_IMX_HDMI) += snd-soc-imx-hdmi.o -diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c -new file mode 100644 -index 0000000..ba1363f ---- /dev/null -+++ b/sound/soc/fsl/imx-wm8731.c -@@ -0,0 +1,505 @@ -+/* -+ * Copyright (C) 2014 Freescale Semiconductor, Inc. -+ * -+ * Based on imx-sgtl5000.c -+ * Copyright (C) 2012 Freescale Semiconductor, Inc. -+ * Copyright (C) 2012 Linaro Ltd. -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "../codecs/wm8731.h" -+#include "imx-audmux.h" -+#include "imx-ssi.h" -+ -+#define DAI_NAME_SIZE 32 -+ -+struct imx_wm8731_data { -+ struct snd_soc_dai_link dai; -+ struct snd_soc_card card; -+ char codec_dai_name[DAI_NAME_SIZE]; -+ char platform_name[DAI_NAME_SIZE]; -+ struct i2c_client *codec_dev; -+ /* audio_clocking_data */ -+ struct clk *pll; -+ struct clk *clock_root; -+ long sysclk; -+ long current_rate; -+ /* platfor data */ -+ unsigned int ssi_num; -+ unsigned int src_port; -+ unsigned int ext_port; -+}; -+ -+static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd); -+static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params); -+static void imx_hifi_shutdown(struct snd_pcm_substream *substream); -+ -+struct imx_priv { -+ struct platform_device *pdev; -+ struct imx_wm8731_data *data; -+}; -+ -+static struct imx_priv card_priv; -+ -+static struct snd_soc_ops imx_hifi_ops = { -+ .shutdown = imx_hifi_shutdown, -+ .hw_params = imx_hifi_hw_params_slv_mode, -+}; -+ -+/* imx card dapm widgets */ -+static const struct snd_soc_dapm_widget imx_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone Jack", NULL), -+ SND_SOC_DAPM_SPK("Ext Spk", NULL), -+ SND_SOC_DAPM_LINE("Line Jack", NULL), -+ SND_SOC_DAPM_MIC("Mic Jack", NULL), -+}; -+ -+/* imx machine connections to the codec pins */ -+static const struct snd_soc_dapm_route audio_map[] = { -+ { "Headphone Jack", NULL, "LHPOUT" }, -+ { "Headphone Jack", NULL, "RHPOUT" }, -+ -+ { "Ext Spk", NULL, "LOUT" }, -+ { "Ext Spk", NULL, "ROUT" }, -+ -+ { "LLINEIN", NULL, "Line Jack" }, -+ { "RLINEIN", NULL, "Line Jack" }, -+ -+ { "MICIN", NULL, "Mic Bias" }, -+ { "Mic Bias", NULL, "Mic Jack"}, -+}; -+ -+static int wm8731_slv_mode_init(struct imx_wm8731_data *data) -+{ -+ struct clk *new_parent; -+ struct clk *ssi_clk; -+ struct i2c_client *codec_dev = data->codec_dev; -+ -+ new_parent = devm_clk_get(&codec_dev->dev, "pll4"); -+ if (IS_ERR(new_parent)) { -+ pr_err("Could not get \"pll4\" clock \n"); -+ return PTR_ERR(new_parent); -+ } -+ -+ ssi_clk = devm_clk_get(&codec_dev->dev, "imx-ssi.1"); -+ if (IS_ERR(ssi_clk)) { -+ pr_err("Could not get \"imx-ssi.1\" clock \n"); -+ return PTR_ERR(ssi_clk); -+ } -+ -+ clk_set_parent(ssi_clk, new_parent); -+ -+ data->pll = new_parent; -+ data->clock_root = ssi_clk; -+ data->current_rate = 0; -+ -+ data->sysclk = 0; -+ -+ return 0; -+} -+ -+static int wm8731_slv_mode_clock_enable(int enable, struct imx_wm8731_data *data) -+{ -+ long pll_rate; -+ long rate_req; -+ long rate_avail; -+ -+ if (!enable) -+ return 0; -+ -+ if (data->sysclk == data->current_rate) -+ return 0; -+ -+ switch (data->sysclk) { -+ case 11289600: -+ pll_rate = 632217600; -+ break; -+ -+ case 12288000: -+ pll_rate = 688128000; -+ break; -+ -+ default: -+ return -EINVAL; -+ } -+ -+ rate_req = pll_rate; -+ rate_avail = clk_round_rate(data->pll, rate_req); -+ clk_set_rate(data->pll, rate_avail); -+ -+ rate_req = data->sysclk; -+ rate_avail = clk_round_rate(data->clock_root, -+ rate_req); -+ clk_set_rate(data->clock_root, rate_avail); -+ -+ pr_info("%s: \"imx-ssi.1\" rate = %ld (= %ld)\n", -+ __func__, rate_avail, rate_req); -+ -+ data->current_rate = data->sysclk; -+ -+ return 0; -+} -+ -+static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ struct snd_soc_dai *codec_dai = rtd->codec_dai; -+ struct snd_soc_card *card = codec_dai->codec->card; -+ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); -+ -+ u32 dai_format, pll_out; -+ snd_pcm_format_t sample_format; -+ unsigned int channels; -+ unsigned int tx_mask, rx_mask; -+ unsigned int sampling_rate; -+ unsigned int div_2, div_psr, div_pm; -+ int ret; -+ -+ sampling_rate = params_rate(params); -+ sample_format = params_format(params); -+ -+ channels = params_channels(params); -+ printk("%s:%s sampling rate = %u channels = %u \n", __FUNCTION__, -+ (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"), -+ sampling_rate, channels); -+ -+ /* set CPU DAI configuration */ -+ switch (sampling_rate) { -+ case 8000: -+ case 32000: -+ case 48000: -+ case 96000: -+ data->sysclk = 12288000; -+ break; -+ -+ case 44100: -+ case 88200: -+ data->sysclk = 11289600; -+ break; -+ -+ default: -+ return -EINVAL; -+ } -+ -+ wm8731_slv_mode_clock_enable(1,data); -+ -+ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | -+ SND_SOC_DAIFMT_CBS_CFS; -+ -+ ret = snd_soc_dai_set_fmt(cpu_dai, dai_format); -+ if (ret < 0) -+ return ret; -+ -+ /* set i.MX active slot mask */ -+ /* S[TR]CCR:DC */ -+ tx_mask = ~((1 << channels) - 1); -+ rx_mask = tx_mask; -+ snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32); -+ -+ /* -+ * SSI sysclk divider: -+ * div_2: /1 or /2 -+ * div_psr: /1 or /8 -+ * div_pm: /1 .. /256 -+ */ -+ div_2 = 0; -+ div_psr = 0; -+ switch (sampling_rate) { -+ case 8000: -+ // 1x1x12 -+ div_pm = 11; -+ break; -+ case 32000: -+ // 1x1x3 -+ div_pm = 2; -+ break; -+ case 48000: -+ // 1x1x2 -+ div_pm = 1; -+ break; -+ case 96000: -+ // 1x1x1 -+ div_pm = 0; -+ break; -+ case 44100: -+ // 1x1x2 -+ div_pm = 1; -+ break; -+ case 88200: -+ // 1x1x1 -+ div_pm = 0; -+ break; -+ default: -+ return -EINVAL; -+ } -+ -+ /* sync mode: a single clock controls both playback and capture */ -+ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_2, (div_2 ? SSI_STCCR_DIV2 : 0)); -+ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PSR, (div_psr ? SSI_STCCR_PSR : 0)); -+ snd_soc_dai_set_clkdiv(cpu_dai, IMX_SSI_TX_DIV_PM, div_pm); -+ -+ /* set codec DAI configuration */ -+ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | -+ SND_SOC_DAIFMT_CBS_CFS; -+ -+ ret = snd_soc_dai_set_fmt(codec_dai, dai_format); -+ if (ret < 0) -+ return ret; -+ -+ ret = snd_soc_dai_set_sysclk(codec_dai, -+ WM8731_SYSCLK_MCLK, -+ data->sysclk, -+ SND_SOC_CLOCK_IN); -+ -+ if (ret < 0) { -+ pr_err("Failed to set codec master clock to %u: %d \n", -+ data->sysclk, ret); -+ return ret; -+ } -+ -+ return 0; -+} -+ -+static void imx_hifi_shutdown(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *codec_dai = rtd->codec_dai; -+ struct snd_soc_card *card = codec_dai->codec->card; -+ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); -+ -+ if (!codec_dai->active) -+ wm8731_slv_mode_clock_enable(0,data); -+ -+ return; -+} -+ -+static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd) -+{ -+ int ret = 0; -+ struct snd_soc_codec *codec = rtd->codec; -+ -+ /* Add imx specific widgets */ -+ ret = snd_soc_dapm_new_controls(&codec->dapm, imx_dapm_widgets, -+ ARRAY_SIZE(imx_dapm_widgets)); -+ if (ret) -+ goto out_retcode; -+ -+ /* Set up imx specific audio path audio_map */ -+ ret = snd_soc_dapm_add_routes(&codec->dapm, audio_map, ARRAY_SIZE(audio_map)); -+ if (ret) -+ goto out_retcode; -+ -+ ret = snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack"); -+ if (ret) -+ goto out_retcode; -+ -+ ret = snd_soc_dapm_nc_pin(&codec->dapm, "Ext Spk"); -+ if (ret) -+ goto out_retcode; -+ -+out_retcode: -+ -+ if (ret) -+ pr_err("%s: failed with error code: %d \n", __FUNCTION__, ret); -+ else -+ pr_info("%s: success \n", __FUNCTION__); -+ -+ return ret; -+} -+ -+/** -+ * Configure AUDMUX interconnection between -+ * _slave (CPU side) and _master (codec size) -+ * -+ * When SSI operates in master mode, 5-wire interconnect with -+ * audio codec is required: -+ * TXC - BCLK -+ * TXD - DAC data -+ * RXD - ADC data -+ * TXFS - {DAC|ADC}LRC, i.e. word clock -+ * RXC - MCLK, i.e. oversampling clock -+ * Audmux is operated in asynchronous mode to enable 6-wire -+ * interface (as opposed to 4-wire interface in sync mode). -+ */ -+static int imx_audmux_config_slv_mode(int _slave, int _master) -+{ -+ unsigned int ptcr, pdcr; -+ int slave = _slave - 1; -+ int master = _master - 1; -+ -+ ptcr = IMX_AUDMUX_V2_PTCR_SYN | -+ IMX_AUDMUX_V2_PTCR_TFSDIR | -+ IMX_AUDMUX_V2_PTCR_TFSEL(slave) | -+ IMX_AUDMUX_V2_PTCR_RCLKDIR | -+ IMX_AUDMUX_V2_PTCR_RCSEL(slave | 0x8) | -+ IMX_AUDMUX_V2_PTCR_TCLKDIR | -+ IMX_AUDMUX_V2_PTCR_TCSEL(slave); -+ -+ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave); -+ imx_audmux_v2_configure_port(master, ptcr, pdcr); -+ ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN; -+ imx_audmux_v2_configure_port(master, ptcr, pdcr); -+ -+ ptcr = IMX_AUDMUX_V2_PTCR_SYN | -+ IMX_AUDMUX_V2_PTCR_RCLKDIR | -+ IMX_AUDMUX_V2_PTCR_RCSEL(master | 0x8) | -+ IMX_AUDMUX_V2_PTCR_TCLKDIR | -+ IMX_AUDMUX_V2_PTCR_TCSEL(master); -+ -+ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master); -+ imx_audmux_v2_configure_port(slave, ptcr, pdcr); -+ ptcr = ptcr & ~IMX_AUDMUX_V2_PTCR_SYN; -+ imx_audmux_v2_configure_port(slave, ptcr, pdcr); -+ -+ return 0; -+} -+ -+static int imx_wm8731_probe(struct platform_device *pdev) -+{ -+ struct device_node *ssi_np, *codec_np; -+ struct platform_device *ssi_pdev; -+ struct imx_priv *priv = &card_priv; -+ struct i2c_client *codec_dev; -+ struct imx_wm8731_data *data; -+ int ret; -+ -+ priv->pdev = pdev; -+ -+ ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0); -+ codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0); -+ if (!ssi_np || !codec_np) { -+ dev_err(&pdev->dev, "phandle missing or invalid\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ ssi_pdev = of_find_device_by_node(ssi_np); -+ if (!ssi_pdev) { -+ dev_err(&pdev->dev, "failed to find SSI platform device\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ codec_dev = of_find_i2c_device_by_node(codec_np); -+ if (!codec_dev || !codec_dev->driver) { -+ dev_err(&pdev->dev, "failed to find codec platform device\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); -+ if (!data) { -+ ret = -ENOMEM; -+ goto fail; -+ } -+ -+ card_priv.data = data; -+ -+ data->codec_dev = codec_dev; -+ -+ data->dai.name = "HiFi"; -+ data->dai.stream_name = "HiFi"; -+ data->dai.codec_dai_name = "wm8731-hifi"; -+ data->dai.codec_of_node = codec_np; -+ data->dai.cpu_dai_name = dev_name(&ssi_pdev->dev); -+ data->dai.platform_of_node = ssi_np; -+ data->dai.ops = &imx_hifi_ops; -+ data->dai.init = &imx_wm8731_init; -+ -+ data->ssi_num = 2; /* 1-based */ -+ data->src_port = 2; -+ data->ext_port = 4; -+ -+ imx_audmux_config_slv_mode(data->src_port, data->ext_port); -+ -+ /* Slave Mode Init */ -+ wm8731_slv_mode_init(data); -+ -+ data->card.dev = &pdev->dev; -+ ret = snd_soc_of_parse_card_name(&data->card, "model"); -+ if (ret) -+ goto fail; -+ -+ ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing"); -+ if (ret) -+ goto fail; -+ -+ data->card.num_links = 1; -+ data->card.dai_link = &data->dai; -+ -+ data->card.dapm_widgets = imx_dapm_widgets; -+ data->card.num_dapm_widgets = ARRAY_SIZE(imx_dapm_widgets); -+ -+ platform_set_drvdata(pdev, &data->card); -+ snd_soc_card_set_drvdata(&data->card, data); -+ -+ ret = snd_soc_register_card(&data->card); -+ if (ret) { -+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); -+ goto fail; -+ } -+ -+ return 0; -+ -+fail: -+ -+ if (ssi_np) -+ of_node_put(ssi_np); -+ -+ if (codec_np) -+ of_node_put(codec_np); -+ -+ return ret; -+} -+ -+static int imx_wm8731_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ snd_soc_unregister_card(card); -+ -+ return 0; -+} -+ -+static const struct of_device_id imx_wm8731_dt_ids[] = { -+ { .compatible = "fsl,imx-audio-wm8731", }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, imx_wm8731_dt_ids); -+ -+static struct platform_driver imx_wm8731_driver = { -+ .driver = { -+ .name = "imx-wm8731", -+ .owner = THIS_MODULE, -+ .of_match_table = imx_wm8731_dt_ids, -+ }, -+ .probe = imx_wm8731_probe, -+ .remove = imx_wm8731_remove, -+}; -+module_platform_driver(imx_wm8731_driver); -+ -+MODULE_AUTHOR("Freescale Semiconductor, Inc."); -+MODULE_DESCRIPTION("Freescale i.MX WM8731 ASoC machine driver"); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:imx-wm8731"); --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch deleted file mode 100644 index ae67161a..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch +++ /dev/null @@ -1,335 +0,0 @@ -From 4c7271dbe9a5fb21e049b07fffb78a933f59382b Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 21 Jul 2014 17:17:32 +0300 -Subject: [PATCH 16/59] ARM: i.MX6: ASoC: add imx-wm8731 master mode support - -Add imx-wm8731 master mode support. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 8 +- - sound/soc/fsl/imx-wm8731.c | 212 +++++++++++++++++++++++++++++++++--- - 2 files changed, 203 insertions(+), 17 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 9f5da43..050795b 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -173,6 +173,8 @@ - "fsl,imx-audio-wm8731"; - model = "wm8731-audio"; - ssi-controller = <&ssi2>; -+ src-port = <2>; -+ ext-port = <4>; - audio-codec = <&codec>; - audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; - }; -@@ -390,6 +392,8 @@ - MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 - MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 - MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -+ /* master mode pin */ -+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 - >; - }; - -@@ -500,8 +504,8 @@ - codec: wm8731@1a { - compatible = "wlf,wm8731"; - reg = <0x1a>; -- clocks = <&clks 173>, <&clks 158>; -- clock-names = "pll4", "imx-ssi.1"; -+ clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; -+ clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; - AVDD-supply = <&pu_dummy>; - HPVDD-supply = <&pu_dummy>; - DCVDD-supply = <&pu_dummy>; -diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c -index ba1363f..72b75ad 100644 ---- a/sound/soc/fsl/imx-wm8731.c -+++ b/sound/soc/fsl/imx-wm8731.c -@@ -31,6 +31,7 @@ - #include "imx-ssi.h" - - #define DAI_NAME_SIZE 32 -+#define WM8731_MCLK_FREQ (24000000 / 2) - - struct imx_wm8731_data { - struct snd_soc_dai_link dai; -@@ -43,10 +44,8 @@ struct imx_wm8731_data { - struct clk *clock_root; - long sysclk; - long current_rate; -- /* platfor data */ -- unsigned int ssi_num; -- unsigned int src_port; -- unsigned int ext_port; -+ /* apis */ -+ int (*clock_enable)(int enable,struct imx_wm8731_data *data); - }; - - static int imx_wm8731_init(struct snd_soc_pcm_runtime *rtd); -@@ -63,7 +62,6 @@ static struct imx_priv card_priv; - - static struct snd_soc_ops imx_hifi_ops = { - .shutdown = imx_hifi_shutdown, -- .hw_params = imx_hifi_hw_params_slv_mode, - }; - - /* imx card dapm widgets */ -@@ -160,6 +158,78 @@ static int wm8731_slv_mode_clock_enable(int enable, struct imx_wm8731_data *data - return 0; - } - -+static int imx_hifi_startup_slv_mode(struct snd_pcm_substream *substream) -+{ -+ /* -+ * As SSI's sys clock rate depends on sampling rate, -+ * the clock enabling code is moved to imx_hifi_hw_params(). -+ */ -+ return 0; -+} -+ -+static int wm8731_mst_mode_init(struct imx_wm8731_data *data) -+{ -+ long rate; -+ struct clk *new_parent; -+ struct clk *ssi_clk; -+ struct i2c_client *codec_dev = data->codec_dev; -+ -+ new_parent = devm_clk_get(&codec_dev->dev, "cko2"); -+ if (IS_ERR(new_parent)) { -+ pr_err("Could not get \"cko2\" clock \n"); -+ return PTR_ERR(new_parent); -+ } -+ -+ ssi_clk = devm_clk_get(&codec_dev->dev, "cko"); -+ if (IS_ERR(ssi_clk)) { -+ pr_err("Could not get \"cko\" clock \n"); -+ return PTR_ERR(ssi_clk); -+ } -+ -+ rate = clk_round_rate(new_parent, WM8731_MCLK_FREQ); -+ clk_set_rate(new_parent, rate); -+ -+ clk_set_parent(ssi_clk, new_parent); -+ -+ rate = clk_round_rate(ssi_clk, WM8731_MCLK_FREQ); -+ clk_set_rate(ssi_clk, rate); -+ -+ pr_info("%s: \"CLKO\" rate = %ld (= %d)\n", -+ __func__, rate, WM8731_MCLK_FREQ); -+ -+ data->pll = new_parent; -+ data->clock_root = ssi_clk; -+ data->sysclk = rate; -+ -+ return 0; -+} -+ -+static int wm8731_mst_mode_clock_enable(int enable, struct imx_wm8731_data *data) -+{ -+ struct clk *clko = data->clock_root; -+ -+ if (enable) -+ clk_enable(clko); -+ else -+ clk_disable(clko); -+ -+ return 0; -+} -+ -+static int imx_hifi_startup_mst_mode(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *codec_dai = rtd->codec_dai; -+ struct snd_soc_card *card = codec_dai->codec->card; -+ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); -+ -+ if (!codec_dai->active) -+ data->clock_enable(1,data); -+ -+ return 0; -+} -+ -+ - static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) - { -@@ -169,7 +239,7 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, - struct snd_soc_card *card = codec_dai->codec->card; - struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); - -- u32 dai_format, pll_out; -+ u32 dai_format; - snd_pcm_format_t sample_format; - unsigned int channels; - unsigned int tx_mask, rx_mask; -@@ -282,6 +352,63 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, - return 0; - } - -+static int imx_hifi_hw_params_mst_mode(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ struct snd_soc_dai *codec_dai = rtd->codec_dai; -+ struct snd_soc_card *card = codec_dai->codec->card; -+ struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); -+ u32 dai_format; -+ unsigned int channels; -+ unsigned int tx_mask, rx_mask; -+ unsigned int sampling_rate; -+ int ret; -+ -+ -+ sampling_rate = params_rate(params); -+ channels = params_channels(params); -+ pr_debug("%s:%s sampling rate = %u channels = %u \n", __FUNCTION__, -+ (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? "Playback" : "Capture"), -+ sampling_rate, channels); -+ -+ /* set cpu DAI configuration */ -+ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | -+ SND_SOC_DAIFMT_CBM_CFM; -+ -+ ret = snd_soc_dai_set_fmt(cpu_dai, dai_format); -+ if (ret < 0) -+ return ret; -+ -+ /* set i.MX active slot mask */ -+ /* S[TR]CCR:DC */ -+ tx_mask = ~((1 << channels) - 1); -+ rx_mask = tx_mask; -+ snd_soc_dai_set_tdm_slot(cpu_dai, tx_mask, rx_mask, 2, 32); -+ -+ /* set codec DAI configuration */ -+ dai_format = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | -+ SND_SOC_DAIFMT_CBM_CFM; -+ -+ ret = snd_soc_dai_set_fmt(codec_dai, dai_format); -+ if (ret < 0) -+ return ret; -+ -+ ret = snd_soc_dai_set_sysclk(codec_dai, -+ WM8731_SYSCLK_MCLK, -+ data->sysclk, -+ SND_SOC_CLOCK_IN); -+ -+ if (ret < 0) { -+ pr_err("Failed to set codec master clock to %u: %d \n", -+ data->sysclk, ret); -+ return ret; -+ } -+ -+ return 0; -+} -+ - static void imx_hifi_shutdown(struct snd_pcm_substream *substream) - { - struct snd_soc_pcm_runtime *rtd = substream->private_data; -@@ -290,7 +417,7 @@ static void imx_hifi_shutdown(struct snd_pcm_substream *substream) - struct imx_wm8731_data *data = snd_soc_card_get_drvdata(card); - - if (!codec_dai->active) -- wm8731_slv_mode_clock_enable(0,data); -+ data->clock_enable(0,data); - - return; - } -@@ -376,6 +503,27 @@ static int imx_audmux_config_slv_mode(int _slave, int _master) - return 0; - } - -+static int imx_audmux_config_mst_mode(int _slave, int _master) -+{ -+ unsigned int ptcr, pdcr; -+ int slave = _slave - 1; -+ int master = _master - 1; -+ -+ ptcr = IMX_AUDMUX_V2_PTCR_SYN; -+ ptcr |= IMX_AUDMUX_V2_PTCR_TFSDIR | -+ IMX_AUDMUX_V2_PTCR_TFSEL(master) | -+ IMX_AUDMUX_V2_PTCR_TCLKDIR | -+ IMX_AUDMUX_V2_PTCR_TCSEL(master); -+ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(master); -+ imx_audmux_v2_configure_port(slave, ptcr, pdcr); -+ -+ ptcr = IMX_AUDMUX_V2_PTCR_SYN; -+ pdcr = IMX_AUDMUX_V2_PDCR_RXDSEL(slave); -+ imx_audmux_v2_configure_port(master, ptcr, pdcr); -+ -+ return 0; -+} -+ - static int imx_wm8731_probe(struct platform_device *pdev) - { - struct device_node *ssi_np, *codec_np; -@@ -383,6 +531,10 @@ static int imx_wm8731_probe(struct platform_device *pdev) - struct imx_priv *priv = &card_priv; - struct i2c_client *codec_dev; - struct imx_wm8731_data *data; -+ unsigned int src_port, ext_port; -+ unsigned int ssi_mode; -+ const char *ssi_mode_str; -+ - int ret; - - priv->pdev = pdev; -@@ -428,14 +580,44 @@ static int imx_wm8731_probe(struct platform_device *pdev) - data->dai.ops = &imx_hifi_ops; - data->dai.init = &imx_wm8731_init; - -- data->ssi_num = 2; /* 1-based */ -- data->src_port = 2; -- data->ext_port = 4; -- -- imx_audmux_config_slv_mode(data->src_port, data->ext_port); -- -- /* Slave Mode Init */ -- wm8731_slv_mode_init(data); -+ ret = of_property_read_u32(pdev->dev.of_node, "src-port", &src_port); -+ if (ret) { -+ dev_err(&pdev->dev, "failed to get \"src-port\" value\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ ret = of_property_read_u32(pdev->dev.of_node, "ext-port", &ext_port); -+ if (ret) { -+ dev_err(&pdev->dev, "failed to get \"ext-port\" value\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ ret = of_property_read_string(ssi_np, "fsl,mode", &ssi_mode_str); -+ if (ret) { -+ dev_err(&pdev->dev, "failed to get \"fsl,mode\" value\n"); -+ ret = -EINVAL; -+ goto fail; -+ } -+ -+ ssi_mode = strcmp(ssi_mode_str, "i2s-master"); -+ -+ if (ssi_mode) { -+ /* Master Mode */ -+ imx_audmux_config_mst_mode(src_port, ext_port); -+ wm8731_mst_mode_init(data); -+ data->clock_enable = wm8731_mst_mode_clock_enable; -+ imx_hifi_ops.hw_params = imx_hifi_hw_params_mst_mode; -+ imx_hifi_ops.startup = imx_hifi_startup_mst_mode; -+ } else { -+ /* Slave Mode */ -+ imx_audmux_config_slv_mode(src_port, ext_port); -+ wm8731_slv_mode_init(data); -+ data->clock_enable = wm8731_slv_mode_clock_enable; -+ imx_hifi_ops.hw_params = imx_hifi_hw_params_slv_mode; -+ imx_hifi_ops.startup = imx_hifi_startup_slv_mode; -+ } - - data->card.dev = &pdev->dev; - ret = snd_soc_of_parse_card_name(&data->card, "model"); --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0017-ARM-i.MX6-dts-enable-v4l2-output.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0017-ARM-i.MX6-dts-enable-v4l2-output.patch deleted file mode 100644 index 21cbbc30..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0017-ARM-i.MX6-dts-enable-v4l2-output.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7b953812d9804bbce9f2b8f21ca5e72229272eb6 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 24 Jul 2014 16:11:29 +0300 -Subject: [PATCH 17/59] ARM: i.MX6: dts: enable v4l2 output - -Enable v4l2 output. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 050795b..2e04224 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -227,6 +227,11 @@ - status = "okay"; - }; - -+ v4l2_out { -+ compatible = "fsl,mxc_v4l2_output"; -+ status = "okay"; -+ }; -+ - }; - - &iomuxc { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch deleted file mode 100644 index 328ac9b9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 7cadcbd1a95de480f3412c56f6a3567ba213091a Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 31 Jul 2014 16:27:38 +0300 -Subject: [PATCH 18/59] ARM: i.MX6: dts: some small changes in the dts file - -1) Fixed the color depth value for both frame buffers. -2) Added a missing OTG pinmux definition. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 2e04224..1613c32 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -200,7 +200,7 @@ - disp_dev = "hdmi"; - interface_pix_fmt = "RGB24"; - mode_str ="1920x1080M@60"; -- default_bpp = <24>; -+ default_bpp = <32>; - int_clk = <0>; - late_init = <0>; - status = "disabled"; -@@ -211,12 +211,13 @@ - disp_dev = "lcd"; - interface_pix_fmt = "RGB24"; - mode_str ="1920x1080M@60"; -- default_bpp = <24>; -+ default_bpp = <32>; - int_clk = <0>; - late_init = <0>; - status = "disabled"; - }; - -+ - lcd@0 { - compatible = "fsl,lcd"; - ipu_id = <0>; -@@ -354,6 +355,7 @@ - pinctrl_usbotg: usbotggrp { - fsl,pins = < - MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 - >; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0019-igb-Define-the-device-mac-address-in-device-tree.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0019-igb-Define-the-device-mac-address-in-device-tree.patch deleted file mode 100644 index 39702bff..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0019-igb-Define-the-device-mac-address-in-device-tree.patch +++ /dev/null @@ -1,79 +0,0 @@ -From da2c6c15b0db7f361b0db50b93b0d2df98ad81a4 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 5 Aug 2014 15:04:44 +0300 -Subject: [PATCH 19/59] igb: Define the device mac address in device tree - -1) Define the device mac address node in the device tree. -2) Make the driver read the mac address from the device tree node. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 6 ++++++ - drivers/net/ethernet/intel/igb/igb_main.c | 27 +++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 1613c32..0e2558f 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -233,6 +233,12 @@ - status = "okay"; - }; - -+ eth@pcie { -+ compatible = "intel,i211"; -+ local-mac-address = [00 1C 1D 1E 1F 20]; -+ status = "okay"; -+ }; -+ - }; - - &iomuxc { -diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c -index 2472835..5f93765 100644 ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -2185,6 +2185,30 @@ static s32 igb_init_i2c(struct igb_adapter *adapter) - return status; - } - -+ -+/** -+ * igb_read_mac_addr_dts - Read mac addres from the device tree -+ * blob -+ * @adapter: pointer to adapter structure -+ **/ -+static void igb_read_mac_addr_dts(struct e1000_hw *hw) -+{ -+ struct device_node *dn; -+ const uint8_t *mac; -+ -+ dn = of_find_compatible_node(NULL, NULL, "intel,i211"); -+ -+ if (!dn) -+ return; -+ -+ mac = of_get_property(dn, "local-mac-address", NULL); -+ -+ if (mac) -+ memcpy(hw->mac.addr, mac, ETH_ALEN); -+ -+ return; -+} -+ - /** - * igb_probe - Device Initialization Routine - * @pdev: PCI device information struct -@@ -2387,6 +2411,9 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - if (hw->mac.ops.read_mac_addr(hw)) - dev_err(&pdev->dev, "NVM Read Error\n"); - -+ if (!is_valid_ether_addr(hw->mac.addr)) -+ igb_read_mac_addr_dts(hw); -+ - if (!is_valid_ether_addr(hw->mac.addr)) { - dev_info(&pdev->dev, "Random MAC Address\n"); - random_ether_addr(hw->mac.addr); --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch deleted file mode 100644 index 2a455067..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0020-ARM-i.MX6-cm-fx6-update-defconfig.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 764be38216e273b22671b1f4d2babb47e0dc1d74 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 5 Aug 2014 15:39:32 +0300 -Subject: [PATCH 20/59] ARM: i.MX6: cm-fx6: update defconfig - -Enable: -1) Analog audio -2) MRVL bluetooth -3) SATA AHCI -4) USB OTG -5) Board revision - -Signed-off-by: Valentin Raevsky ---- - arch/arm/configs/cm_fx6_defconfig | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig -index eb6d9cb..210062b 100644 ---- a/arch/arm/configs/cm_fx6_defconfig -+++ b/arch/arm/configs/cm_fx6_defconfig -@@ -26,6 +26,7 @@ CONFIG_SOC_IMX53=y - CONFIG_SOC_IMX6Q=y - CONFIG_SOC_IMX6SL=y - CONFIG_SOC_VF610=y -+CONFIG_MACH_CM_FX6=y - # CONFIG_SWP_EMULATE is not set - CONFIG_PCI=y - CONFIG_PCI_IMX6=y -@@ -137,6 +138,9 @@ CONFIG_VLAN_8021Q=m - CONFIG_VLAN_8021Q_GVRP=y - CONFIG_CAN=y - CONFIG_CAN_FLEXCAN=y -+CONFIG_BT=m -+CONFIG_BT_MRVL=m -+CONFIG_BT_MRVL_SDIO=m - CONFIG_CFG80211=y - CONFIG_CFG80211_WEXT=y - CONFIG_MAC80211=y -@@ -176,6 +180,7 @@ CONFIG_SCSI_LOGGING=y - CONFIG_SCSI_SCAN_ASYNC=y - # CONFIG_SCSI_LOWLEVEL is not set - CONFIG_ATA=y -+CONFIG_SATA_AHCI=y - CONFIG_SATA_AHCI_PLATFORM=y - CONFIG_AHCI_IMX=y - CONFIG_PATA_IMX=y -@@ -251,6 +256,7 @@ CONFIG_MFD_MC13XXX_I2C=y - CONFIG_MFD_MAX17135=y - CONFIG_MFD_SI476X_CORE=y - CONFIG_REGULATOR=y -+CONFIG_REGULATOR_DUMMY=y - CONFIG_REGULATOR_FIXED_VOLTAGE=y - CONFIG_REGULATOR_DA9052=y - CONFIG_REGULATOR_ANATOP=y -@@ -310,6 +316,7 @@ CONFIG_SND_SOC=y - CONFIG_SND_IMX_SOC=y - CONFIG_SND_SOC_EUKREA_TLV320=y - CONFIG_SND_SOC_IMX_CS42888=y -+CONFIG_SND_SOC_IMX_WM8731=y - CONFIG_SND_SOC_IMX_WM8962=y - CONFIG_SND_SOC_IMX_SGTL5000=y - CONFIG_SND_SOC_IMX_SPDIF=y -@@ -317,7 +324,10 @@ CONFIG_SND_SOC_IMX_MC13783=y - CONFIG_SND_SOC_IMX_HDMI=y - CONFIG_SND_SOC_IMX_SI476X=y - CONFIG_USB=y -+CONFIG_USB_OTG=y - CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_MXC=y -+CONFIG_USB_EHCI_HCD_PLATFORM=y - CONFIG_USB_STORAGE=y - CONFIG_USB_CHIPIDEA=y - CONFIG_USB_CHIPIDEA_UDC=y -@@ -326,7 +336,9 @@ CONFIG_USB_PHY=y - CONFIG_NOP_USB_XCEIV=y - CONFIG_USB_MXS_PHY=y - CONFIG_USB_GADGET=y -+CONFIG_USB_FSL_USB2=y - CONFIG_USB_ZERO=m -+CONFIG_USB_AUDIO=m - CONFIG_USB_ETH=m - CONFIG_USB_MASS_STORAGE=m - CONFIG_USB_G_SERIAL=m --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch deleted file mode 100644 index 4bfa1bda..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch +++ /dev/null @@ -1,1112 +0,0 @@ -From a2cdd3f7524d4336e5a704d42b85503a7ab3f543 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 7 Aug 2014 15:30:03 +0300 -Subject: [PATCH 21/59] ARM: i.MX6: dts: refactoring the cm-fx6 device tree - file. - -Separate the staff that belongs to SB-FX6 and SB-FX6m boards. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 880 ++++++++++++++++------------------ - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 23 + - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 83 ++++ - 3 files changed, 516 insertions(+), 470 deletions(-) - create mode 100644 arch/arm/boot/dts/imx6q-sbc-fx6.dts - create mode 100644 arch/arm/boot/dts/imx6q-sbc-fx6m.dts - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index 0e2558f..fa32c57 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -15,158 +15,147 @@ - #include "imx6q.dtsi" - - / { -- model = "CompuLab CM-FX6"; -- compatible = "compulab,cm-fx6", "fsl,imx6q"; -- -- memory { -- reg = <0x10000000 0x80000000>; -- }; -- -- leds { -- compatible = "gpio-leds"; -- -- heartbeat-led { -- label = "Heartbeat"; -- gpios = <&gpio2 31 0>; -- linux,default-trigger = "heartbeat"; -- }; -- }; -- -- regulators { -- compatible = "simple-bus"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- /* regulator for mmc */ -- reg_3p3v: 3p3v { -- compatible = "regulator-fixed"; -- regulator-name = "3P3V"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-always-on; -- }; -- -- /* regulator for usb otg */ -- reg_usb_otg_vbus: usb_otg_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_otg_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio3 22 0>; -- enable-active-high; -- }; -- -- /* regulator for usb hub1 */ -- reg_usb_h1_vbus: usb_h1_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_h1_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio7 8 0>; -- enable-active-high; -- }; -- -- /* regulator1 for wifi/bt */ -- awnh387_npoweron: regulator-awnh387-npoweron { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-npoweron"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio7 12 0>; -- enable-active-high; -- }; -- -- /* regulator2 for wifi/bt */ -- awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-wifi-nreset"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio6 16 0>; -- startup-delay-us = <10000>; -- }; -- -- reg_sata_phy_slp: sata_phy_slp { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_phy_slp"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio3 23 0>; -- startup-delay-us = <100>; -- enable-active-high; -- }; -- -- reg_sata_nrstdly: sata_nrstdly { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nrstdly"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio6 6 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_phy_slp>; -- }; -- -- reg_sata_pwren: sata_pwren { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_pwren"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio1 28 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_nrstdly>; -- }; -- -- reg_sata_nstandby1: sata_nstandby1 { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nstandby1"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio3 20 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_pwren>; -- }; -- -- reg_sata_nstandby2: sata_nstandby2 { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nstandby2"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio5 2 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_nstandby1>; -- }; -- -- reg_sata_ldo_en: sata_ldo_en { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_ldo_en"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio2 16 0>; -- startup-delay-us = <100>; -- enable-active-high; -- regulator-boot-on; -- vin-supply = <®_sata_nstandby2>; -- }; -- }; -- -- gpio-keys { -- compatible = "gpio-keys"; -- power { -- label = "Power Button"; -- gpios = <&gpio1 29 1>; -- linux,code = <116>; /* KEY_POWER */ -- gpio-key,wakeup; -+ model = "CompuLab CM-FX6"; -+ compatible = "compulab,cm-fx6", "fsl,imx6q"; -+ -+ memory { -+ reg = <0x10000000 0x80000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ heartbeat-led { -+ label = "Heartbeat"; -+ gpios = <&gpio2 31 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for mmc */ -+ reg_3p3v: 3p3v { -+ compatible = "regulator-fixed"; -+ regulator-name = "3P3V"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; -+ -+ /* regulator for usb otg */ -+ reg_usb_otg_vbus: usb_otg_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_otg_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio3 22 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator for usb hub1 */ -+ reg_usb_h1_vbus: usb_h1_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_h1_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio7 8 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator1 for wifi/bt */ -+ awnh387_npoweron: regulator-awnh387-npoweron { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-npoweron"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio7 12 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator2 for wifi/bt */ -+ awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-wifi-nreset"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 16 0>; -+ startup-delay-us = <10000>; -+ }; -+ -+ reg_sata_phy_slp: sata_phy_slp { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_phy_slp"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 23 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ }; -+ -+ reg_sata_nrstdly: sata_nrstdly { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nrstdly"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 6 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_phy_slp>; -+ }; -+ -+ reg_sata_pwren: sata_pwren { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_pwren"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio1 28 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nrstdly>; -+ }; -+ -+ reg_sata_nstandby1: sata_nstandby1 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby1"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 20 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_pwren>; -+ }; -+ -+ reg_sata_nstandby2: sata_nstandby2 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby2"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio5 2 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nstandby1>; -+ }; -+ -+ reg_sata_ldo_en: sata_ldo_en { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_ldo_en"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 16 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ regulator-boot-on; -+ vin-supply = <®_sata_nstandby2>; -+ }; - }; -- }; - -- aliases { -- mxcfb0 = &mxcfb1; -- mxcfb1 = &mxcfb2; -- }; -+ aliases { -+ mxcfb0 = &mxcfb1; -+ mxcfb1 = &mxcfb2; -+ }; - - sound { - compatible = "fsl,imx6q-cm-fx6-wm8731", -@@ -179,66 +168,58 @@ - audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; - }; - -- sound-hdmi { -- compatible = "fsl,imx6q-audio-hdmi", -- "fsl,imx-audio-hdmi"; -- model = "imx-audio-hdmi"; -- hdmi-controller = <&hdmi_audio>; -- }; -- -- sound-spdif { -- compatible = "fsl,imx-audio-spdif", -- "fsl,imx-sabreauto-spdif"; -- model = "imx-spdif"; -- spdif-controller = <&spdif>; -- spdif-out; -- spdif-in; -- }; -- -- mxcfb1: fb@0 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "hdmi"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- mxcfb2: fb@1 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "lcd"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- -- lcd@0 { -- compatible = "fsl,lcd"; -- ipu_id = <0>; -- disp_id = <0>; -- default_ifmt = "RGB24"; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ipu1_1>; -- status = "okay"; -- }; -+ sound-hdmi { -+ compatible = "fsl,imx6q-audio-hdmi", -+ "fsl,imx-audio-hdmi"; -+ model = "imx-audio-hdmi"; -+ hdmi-controller = <&hdmi_audio>; -+ }; - -- v4l2_out { -- compatible = "fsl,mxc_v4l2_output"; -- status = "okay"; -- }; -+ sound-spdif { -+ compatible = "fsl,imx-audio-spdif", -+ "fsl,imx-sabreauto-spdif"; -+ model = "imx-spdif"; -+ spdif-controller = <&spdif>; -+ spdif-out; -+ spdif-in; -+ }; - -- eth@pcie { -- compatible = "intel,i211"; -- local-mac-address = [00 1C 1D 1E 1F 20]; -- status = "okay"; -- }; -+ mxcfb1: fb@0 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "hdmi"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ mxcfb2: fb@1 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "lcd"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ lcd@0 { -+ compatible = "fsl,lcd"; -+ ipu_id = <0>; -+ disp_id = <0>; -+ default_ifmt = "RGB24"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ipu1_1>; -+ status = "okay"; -+ }; - -+ v4l2_out { -+ compatible = "fsl,mxc_v4l2_output"; -+ status = "okay"; -+ }; - }; - - &iomuxc { -@@ -258,261 +239,240 @@ - MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 - MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 - MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -+ /* POWER_BUTTON */ -+ MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 - >; - }; - }; - -- imx6q-cm-fx6 { -- /* pins for eth0 */ -- pinctrl_enet: enetgrp { -- fsl,pins = < -- MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -- MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -- MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -- MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -- MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -- MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -- MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -- MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -- MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -- MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -- MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -- MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -- MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -- MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -- >; -- }; -+ imx6q-cm-fx6 { -+ /* pins for eth0 */ -+ pinctrl_enet: enetgrp { -+ fsl,pins = < -+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -+ >; -+ }; - -- /* pins for spi */ -- pinctrl_ecspi1: ecspi1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -- MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -- MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -- MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -- MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -- >; -- }; -- -- /* pins for nand */ -- pinctrl_gpmi_nand: gpminandgrp { -- fsl,pins = < -- MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -- MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -- MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -- MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -- MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -- MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -- MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -- MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -- MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -- MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -- MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -- MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -- MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -- MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -- MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -- MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -- MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -- >; -- }; -- -- /* pins for i2c1 */ -- pinctrl_i2c1: i2c1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -- MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -- >; -- }; -+ /* pins for spi */ -+ pinctrl_ecspi1: ecspi1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -+ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -+ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -+ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -+ >; -+ }; -+ -+ /* pins for nand */ -+ pinctrl_gpmi_nand: gpminandgrp { -+ fsl,pins = < -+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -+ >; -+ }; -+ -+ /* pins for i2c1 */ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -+ >; -+ }; - -- /* pins for i2c2 */ -- pinctrl_i2c2: i2c2grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -- MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -- >; -- }; -+ /* pins for i2c2 */ -+ pinctrl_i2c2: i2c2grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -+ >; -+ }; - -- /* pins for i2c3 */ -- pinctrl_i2c3: i2c3grp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -- MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for console */ -- pinctrl_uart4: uart4grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -- MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -- >; -- }; -+ /* pins for i2c3 */ -+ pinctrl_i2c3: i2c3grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -+ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for console */ -+ pinctrl_uart4: uart4grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -+ >; -+ }; - -- /* pins for usb hub1 */ -- pinctrl_usbh1: usbh1grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -- >; -- }; -+ /* pins for usb hub1 */ -+ pinctrl_usbh1: usbh1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -+ >; -+ }; - -- /* pins for usb otg */ -- pinctrl_usbotg: usbotggrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -- MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -- >; -- }; -- -- /* pins for wifi/bt */ -- pinctrl_usdhc1: usdhc1grp { -- fsl,pins = < -- MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -- MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -- MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -- MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -- MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -- MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -- >; -- }; -- -- /* pins for mmc */ -- pinctrl_usdhc3: usdhc3grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -- >; -- }; -- -- /* pins for spdif */ -- pinctrl_spdif: spdifgrp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -- MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -- >; -- }; -- -- /* pins for audmux */ -- pinctrl_audmux: audmuxgrp { -- fsl,pins = < -- MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -- MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -- MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -- MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -- MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -- /* master mode pin */ -- MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -- >; -- }; -+ /* pins for usb otg */ -+ pinctrl_usbotg: usbotggrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -+ >; -+ }; - -- /* pins for uart2 */ -- pinctrl_uart2: uart2grp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 -- MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 -- MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 -- MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 -- >; -- }; -+ /* pins for wifi/bt */ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -+ >; -+ }; -+ -+ /* pins for mmc */ -+ pinctrl_usdhc3: usdhc3grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -+ >; -+ }; -+ -+ /* pins for spdif */ -+ pinctrl_spdif: spdifgrp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -+ MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -+ >; -+ }; - -- /* pins for pcie */ -- pinctrl_pcie: pciegrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -- MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -- >; -- }; -- }; -+ /* pins for audmux */ -+ pinctrl_audmux: audmuxgrp { -+ fsl,pins = < -+ MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -+ MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -+ MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -+ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -+ MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -+ /* master mode pin */ -+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -+ >; -+ }; -+ }; - }; - - /* spi */ - &ecspi1 { -- fsl,spi-num-chipselects = <2>; -- cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ecspi1>; -- status = "okay"; -- -- flash: m25p80@0 { -- #address-cells = <1>; -- #size-cells = <1>; -- compatible = "st,m25px16", "st,m25p"; -- spi-max-frequency = <20000000>; -- reg = <0>; -- -- partition@0 { -- label = "uboot"; -- reg = <0x0 0xc0000>; -- }; -- -- partition@c0000 { -- label = "uboot environment"; -- reg = <0xc0000 0x40000>; -- }; -- -- partition@100000 { -- label = "reserved"; -- reg = <0x100000 0x100000>; -- }; -- }; -+ fsl,spi-num-chipselects = <2>; -+ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ecspi1>; -+ status = "okay"; -+ -+ flash: m25p80@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "st,m25px16", "st,m25p"; -+ spi-max-frequency = <20000000>; -+ reg = <0>; -+ -+ partition@0 { -+ label = "uboot"; -+ reg = <0x0 0xc0000>; -+ }; -+ -+ partition@c0000 { -+ label = "uboot environment"; -+ reg = <0xc0000 0x40000>; -+ }; -+ -+ partition@100000 { -+ label = "reserved"; -+ reg = <0x100000 0x100000>; -+ }; -+ }; - }; - - /* eth0 */ - &fec { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_enet>; -- phy-mode = "rgmii"; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet>; -+ phy-mode = "rgmii"; -+ status = "okay"; - }; - - /* nand */ - &gpmi { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_gpmi_nand>; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_gpmi_nand>; -+ status = "okay"; - }; - - /* i2c1 */ - &i2c1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c1>; -- status = "okay"; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -- -- rtc@56 { -- compatible = "emmicro,em3027"; -- reg = <0x56>; -- }; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; - }; - - /* i2c2 */ --&i2c2 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c2>; -- /* status = "okay"; */ -+&i2c2 { /* to be removed */ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c2>; -+ /* status = "okay"; */ - }; - - /* i2c3 */ - &i2c3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c3>; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c3>; -+ status = "okay"; - -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; - - codec: wm8731@1a { - compatible = "wlf,wm8731"; -@@ -526,71 +486,51 @@ - }; - }; - --/* eth1 */ --&pcie { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_pcie>; -- reset-gpio = <&gpio1 26 0>; -- power-on-gpio = <&gpio2 24 0>; -- status = "okay"; --}; -- - /* sata */ - &sata { -- status = "okay"; --}; -- --/* rear serial console */ --&uart2 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart2>; -- /* fsl,dte-mode; */ -- fsl,uart-has-rtscts; -- dma-names = "rx", "tx"; -- dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; -- status = "okay"; -+ status = "okay"; - }; - - /* console */ - &uart4 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart4>; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart4>; -+ status = "okay"; - }; - - /* usb otg */ - &usbotg { -- vbus-supply = <®_usb_otg_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbotg>; -- dr_mode = "otg"; -- status = "okay"; -+ vbus-supply = <®_usb_otg_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbotg>; -+ dr_mode = "otg"; -+ status = "okay"; - }; - - /* usb hub1 */ - &usbh1 { -- vbus-supply = <®_usb_h1_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbh1>; -- status = "okay"; -+ vbus-supply = <®_usb_h1_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbh1>; -+ status = "okay"; - }; - - /* wifi/bt */ - &usdhc1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc1>; -- non-removable; -- vmmc-supply = <&awnh387_npoweron>; -- vmmc_aux-supply = <&awnh387_wifi_nreset>; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ non-removable; -+ vmmc-supply = <&awnh387_npoweron>; -+ vmmc_aux-supply = <&awnh387_wifi_nreset>; -+ status = "okay"; - }; - - /* mmc */ - &usdhc3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc3>; -- vmmc-supply = <®_3p3v>; -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc3>; -+ vmmc-supply = <®_3p3v>; -+ status = "okay"; - }; - - &ssi2 { -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -new file mode 100644 -index 0000000..5d3c7da ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -0,0 +1,23 @@ -+/* -+* Copyright 2014 CompuLab Ltd. -+* -+* Author: Valentin Raevsky -+* -+* The code contained herein is licensed under the GNU General Public -+* License. You may obtain a copy of the GNU General Public License -+* Version 2 or later at the following locations: -+* -+* http://www.opensource.org/licenses/gpl-license.html -+* http://www.gnu.org/copyleft/gpl.html -+*/ -+ -+#include "imx6q-cm-fx6.dts" -+ -+/ { -+ model = "CompuLab CM-FX6 on SBC-FX6"; -+ compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; -+}; -+ -+&pcie { -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -new file mode 100644 -index 0000000..0e76f02 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -0,0 +1,83 @@ -+/* -+* Copyright 2014 CompuLab Ltd. -+* -+* Author: Valentin Raevsky -+* -+* The code contained herein is licensed under the GNU General Public -+* License. You may obtain a copy of the GNU General Public License -+* Version 2 or later at the following locations: -+* -+* http://www.opensource.org/licenses/gpl-license.html -+* http://www.gnu.org/copyleft/gpl.html -+*/ -+ -+#include "imx6q-cm-fx6.dts" -+ -+/ { -+ model = "CompuLab CM-FX6 on SBC-FX6m"; -+ compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; -+ -+ eth@pcie { -+ compatible = "intel,i211"; -+ local-mac-address = [FF FF FF FF FF FF]; -+ status = "okay"; -+ }; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ power { -+ label = "Power Button"; -+ gpios = <&gpio1 29 1>; -+ linux,code = <116>; /* KEY_POWER */ -+ gpio-key,wakeup; -+ }; -+ }; -+}; -+ -+&iomuxc { -+ imx6q-sb-fx6m { -+ /* pins for uart2 */ -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 -+ >; -+ }; -+ -+ /* pins for pcie */ -+ pinctrl_pcie: pciegrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -+ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -+ >; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ rtc@56 { -+ compatible = "emmicro,em3027"; -+ reg = <0x56>; -+ }; -+}; -+ -+&pcie { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pcie>; -+ reset-gpio = <&gpio1 26 0>; -+ power-on-gpio = <&gpio2 24 0>; -+ status = "okay"; -+}; -+ -+/* rear serial console */ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ /* fsl,dte-mode; */ -+ fsl,uart-has-rtscts; -+ dma-names = "rx", "tx"; -+ dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0022-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0022-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch deleted file mode 100644 index f9986338..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0022-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch +++ /dev/null @@ -1,1422 +0,0 @@ -From 0597ee45b5a7b0491977b7b91745c24a0406783f Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 12 Aug 2014 17:46:23 +0300 -Subject: [PATCH 22/59] ARM: i.MX6: dts: refactoring of the cm-fx6 device tree - files. - -Refactoring device tree files: -1) Utilite: -+ imx6q.dtsi -+ imx6q-sb-fx6x.dtsi -+ imx6q-sb-fx6m.dtsi -+ imx6q-cm-fx6.dtsi -= imx6q-sbc-fx6m.dts - -2) CM-FX6-EVAL: -+ imx6q.dtsi -+ imx6q-sb-fx6x.dtsi -+ imx6q-sb-fx6.dtsi -+ imx6q-cm-fx6.dtsi -= imx6q-sbc-fx6.dts - -3) CM-FX6 Module: -+ imx6q.dtsi -+ imx6q-cm-fx6.dtsi -= imx6q-cm-fx6.dts - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 582 +--------------------------------- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 531 +++++++++++++++++++++++++++++++ - arch/arm/boot/dts/imx6q-sb-fx6.dtsi | 14 + - arch/arm/boot/dts/imx6q-sb-fx6m.dtsi | 32 ++ - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 75 +++++ - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 8 +- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 38 +-- - 7 files changed, 677 insertions(+), 603 deletions(-) - create mode 100644 arch/arm/boot/dts/imx6q-cm-fx6.dtsi - create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6.dtsi - create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6m.dtsi - create mode 100644 arch/arm/boot/dts/imx6q-sb-fx6x.dtsi - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index fa32c57..a0e423b 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -1,576 +1,20 @@ - /* --* Copyright 2013 CompuLab Ltd. --* --* Author: Valentin Raevsky --* --* The code contained herein is licensed under the GNU General Public --* License. You may obtain a copy of the GNU General Public License --* Version 2 or later at the following locations: --* --* http://www.opensource.org/licenses/gpl-license.html --* http://www.gnu.org/copyleft/gpl.html --*/ -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ - - /dts-v1/; --#include "imx6q.dtsi" -+#include "imx6q-cm-fx6.dtsi" - - / { - model = "CompuLab CM-FX6"; - compatible = "compulab,cm-fx6", "fsl,imx6q"; -- -- memory { -- reg = <0x10000000 0x80000000>; -- }; -- -- leds { -- compatible = "gpio-leds"; -- heartbeat-led { -- label = "Heartbeat"; -- gpios = <&gpio2 31 0>; -- linux,default-trigger = "heartbeat"; -- }; -- }; -- -- regulators { -- compatible = "simple-bus"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- /* regulator for mmc */ -- reg_3p3v: 3p3v { -- compatible = "regulator-fixed"; -- regulator-name = "3P3V"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-always-on; -- }; -- -- /* regulator for usb otg */ -- reg_usb_otg_vbus: usb_otg_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_otg_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio3 22 0>; -- enable-active-high; -- }; -- -- /* regulator for usb hub1 */ -- reg_usb_h1_vbus: usb_h1_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_h1_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio7 8 0>; -- enable-active-high; -- }; -- -- /* regulator1 for wifi/bt */ -- awnh387_npoweron: regulator-awnh387-npoweron { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-npoweron"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio7 12 0>; -- enable-active-high; -- }; -- -- /* regulator2 for wifi/bt */ -- awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-wifi-nreset"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio6 16 0>; -- startup-delay-us = <10000>; -- }; -- -- reg_sata_phy_slp: sata_phy_slp { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_phy_slp"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio3 23 0>; -- startup-delay-us = <100>; -- enable-active-high; -- }; -- -- reg_sata_nrstdly: sata_nrstdly { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nrstdly"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio6 6 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_phy_slp>; -- }; -- -- reg_sata_pwren: sata_pwren { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_pwren"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio1 28 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_nrstdly>; -- }; -- -- reg_sata_nstandby1: sata_nstandby1 { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nstandby1"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio3 20 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_pwren>; -- }; -- -- reg_sata_nstandby2: sata_nstandby2 { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_nstandby2"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio5 2 0>; -- startup-delay-us = <100>; -- enable-active-high; -- vin-supply = <®_sata_nstandby1>; -- }; -- -- reg_sata_ldo_en: sata_ldo_en { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_ldo_en"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio2 16 0>; -- startup-delay-us = <100>; -- enable-active-high; -- regulator-boot-on; -- vin-supply = <®_sata_nstandby2>; -- }; -- }; -- -- aliases { -- mxcfb0 = &mxcfb1; -- mxcfb1 = &mxcfb2; -- }; -- -- sound { -- compatible = "fsl,imx6q-cm-fx6-wm8731", -- "fsl,imx-audio-wm8731"; -- model = "wm8731-audio"; -- ssi-controller = <&ssi2>; -- src-port = <2>; -- ext-port = <4>; -- audio-codec = <&codec>; -- audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; -- }; -- -- sound-hdmi { -- compatible = "fsl,imx6q-audio-hdmi", -- "fsl,imx-audio-hdmi"; -- model = "imx-audio-hdmi"; -- hdmi-controller = <&hdmi_audio>; -- }; -- -- sound-spdif { -- compatible = "fsl,imx-audio-spdif", -- "fsl,imx-sabreauto-spdif"; -- model = "imx-spdif"; -- spdif-controller = <&spdif>; -- spdif-out; -- spdif-in; -- }; -- -- mxcfb1: fb@0 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "hdmi"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- mxcfb2: fb@1 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "lcd"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- lcd@0 { -- compatible = "fsl,lcd"; -- ipu_id = <0>; -- disp_id = <0>; -- default_ifmt = "RGB24"; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ipu1_1>; -- status = "okay"; -- }; -- -- v4l2_out { -- compatible = "fsl,mxc_v4l2_output"; -- status = "okay"; -- }; --}; -- --&iomuxc { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hog>; -- -- hog { -- pinctrl_hog: hoggrp { -- fsl,pins = < -- /* SATA PWR */ -- MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 -- MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 -- MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 -- MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 -- /* SATA CTRL */ -- MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 -- MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 -- MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 -- MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -- /* POWER_BUTTON */ -- MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -- >; -- }; -- }; -- -- imx6q-cm-fx6 { -- /* pins for eth0 */ -- pinctrl_enet: enetgrp { -- fsl,pins = < -- MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -- MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -- MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -- MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -- MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -- MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -- MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -- MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -- MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -- MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -- MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -- MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -- MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -- MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -- >; -- }; -- -- /* pins for spi */ -- pinctrl_ecspi1: ecspi1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -- MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -- MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -- MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -- MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -- >; -- }; -- -- /* pins for nand */ -- pinctrl_gpmi_nand: gpminandgrp { -- fsl,pins = < -- MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -- MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -- MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -- MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -- MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -- MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -- MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -- MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -- MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -- MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -- MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -- MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -- MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -- MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -- MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -- MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -- MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -- >; -- }; -- -- /* pins for i2c1 */ -- pinctrl_i2c1: i2c1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -- MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for i2c2 */ -- pinctrl_i2c2: i2c2grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -- MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for i2c3 */ -- pinctrl_i2c3: i2c3grp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -- MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for console */ -- pinctrl_uart4: uart4grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -- MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -- >; -- }; -- -- /* pins for usb hub1 */ -- pinctrl_usbh1: usbh1grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -- >; -- }; -- -- /* pins for usb otg */ -- pinctrl_usbotg: usbotggrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -- MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -- >; -- }; -- -- /* pins for wifi/bt */ -- pinctrl_usdhc1: usdhc1grp { -- fsl,pins = < -- MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -- MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -- MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -- MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -- MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -- MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -- >; -- }; -- -- /* pins for mmc */ -- pinctrl_usdhc3: usdhc3grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -- >; -- }; -- -- /* pins for spdif */ -- pinctrl_spdif: spdifgrp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -- MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -- >; -- }; -- -- /* pins for audmux */ -- pinctrl_audmux: audmuxgrp { -- fsl,pins = < -- MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -- MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -- MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -- MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -- MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -- /* master mode pin */ -- MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -- >; -- }; -- }; --}; -- --/* spi */ --&ecspi1 { -- fsl,spi-num-chipselects = <2>; -- cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ecspi1>; -- status = "okay"; -- -- flash: m25p80@0 { -- #address-cells = <1>; -- #size-cells = <1>; -- compatible = "st,m25px16", "st,m25p"; -- spi-max-frequency = <20000000>; -- reg = <0>; -- -- partition@0 { -- label = "uboot"; -- reg = <0x0 0xc0000>; -- }; -- -- partition@c0000 { -- label = "uboot environment"; -- reg = <0xc0000 0x40000>; -- }; -- -- partition@100000 { -- label = "reserved"; -- reg = <0x100000 0x100000>; -- }; -- }; --}; -- --/* eth0 */ --&fec { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_enet>; -- phy-mode = "rgmii"; -- status = "okay"; --}; -- --/* nand */ --&gpmi { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_gpmi_nand>; -- status = "okay"; --}; -- --/* i2c1 */ --&i2c1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c1>; -- status = "okay"; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; --}; -- --/* i2c2 */ --&i2c2 { /* to be removed */ -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c2>; -- /* status = "okay"; */ --}; -- --/* i2c3 */ --&i2c3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c3>; -- status = "okay"; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -- -- codec: wm8731@1a { -- compatible = "wlf,wm8731"; -- reg = <0x1a>; -- clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; -- clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; -- AVDD-supply = <&pu_dummy>; -- HPVDD-supply = <&pu_dummy>; -- DCVDD-supply = <&pu_dummy>; -- DBVDD-supply = <&pu_dummy>; -- }; --}; -- --/* sata */ --&sata { -- status = "okay"; --}; -- --/* console */ --&uart4 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart4>; -- status = "okay"; --}; -- --/* usb otg */ --&usbotg { -- vbus-supply = <®_usb_otg_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbotg>; -- dr_mode = "otg"; -- status = "okay"; --}; -- --/* usb hub1 */ --&usbh1 { -- vbus-supply = <®_usb_h1_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbh1>; -- status = "okay"; --}; -- --/* wifi/bt */ --&usdhc1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc1>; -- non-removable; -- vmmc-supply = <&awnh387_npoweron>; -- vmmc_aux-supply = <&awnh387_wifi_nreset>; -- status = "okay"; --}; -- --/* mmc */ --&usdhc3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc3>; -- vmmc-supply = <®_3p3v>; -- status = "okay"; --}; -- --&ssi2 { -- fsl,mode = "i2s-master"; -- status = "okay"; --}; -- --&mxcfb1 { -- status = "okay"; --}; -- --&mxcfb2 { -- status = "okay"; --}; -- --&hdmi_core { -- ipu_id = <1>; -- disp_id = <0>; -- status = "okay"; --}; -- --&hdmi_video { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -- fsl,hdcp; -- status = "okay"; --}; -- --&hdmi_audio { -- status = "okay"; --}; -- --&spdif { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_spdif>; -- status = "okay"; --}; -- --&audmux { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_audmux>; -- status = "okay"; --}; -+}; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -new file mode 100644 -index 0000000..0aa4461 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -0,0 +1,531 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include "imx6q.dtsi" -+ -+/ { -+ memory { -+ reg = <0x10000000 0x80000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ heartbeat-led { -+ label = "Heartbeat"; -+ gpios = <&gpio2 31 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for usb otg */ -+ reg_usb_otg_vbus: usb_otg_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_otg_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio3 22 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator for usb hub1 */ -+ reg_usb_h1_vbus: usb_h1_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_h1_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio7 8 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator1 for wifi/bt */ -+ awnh387_npoweron: regulator-awnh387-npoweron { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-npoweron"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio7 12 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator2 for wifi/bt */ -+ awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-wifi-nreset"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 16 0>; -+ startup-delay-us = <10000>; -+ }; -+ -+ reg_sata_phy_slp: sata_phy_slp { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_phy_slp"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 23 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ }; -+ -+ reg_sata_nrstdly: sata_nrstdly { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nrstdly"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 6 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_phy_slp>; -+ }; -+ -+ reg_sata_pwren: sata_pwren { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_pwren"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio1 28 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nrstdly>; -+ }; -+ -+ reg_sata_nstandby1: sata_nstandby1 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby1"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio3 20 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_pwren>; -+ }; -+ -+ reg_sata_nstandby2: sata_nstandby2 { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_nstandby2"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio5 2 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ vin-supply = <®_sata_nstandby1>; -+ }; -+ -+ reg_sata_ldo_en: sata_ldo_en { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_ldo_en"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 16 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ regulator-boot-on; -+ vin-supply = <®_sata_nstandby2>; -+ }; -+ }; -+ -+ aliases { -+ mxcfb0 = &mxcfb1; -+ mxcfb1 = &mxcfb2; -+ }; -+ -+ sound { -+ compatible = "fsl,imx6q-cm-fx6-wm8731", -+ "fsl,imx-audio-wm8731"; -+ model = "wm8731-audio"; -+ ssi-controller = <&ssi2>; -+ src-port = <2>; -+ ext-port = <4>; -+ audio-codec = <&codec>; -+ audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; -+ }; -+ -+ sound-hdmi { -+ compatible = "fsl,imx6q-audio-hdmi", -+ "fsl,imx-audio-hdmi"; -+ model = "imx-audio-hdmi"; -+ hdmi-controller = <&hdmi_audio>; -+ }; -+ -+ sound-spdif { -+ compatible = "fsl,imx-audio-spdif", -+ "fsl,imx-sabreauto-spdif"; -+ model = "imx-spdif"; -+ spdif-controller = <&spdif>; -+ spdif-out; -+ spdif-in; -+ }; -+ -+ mxcfb1: fb@0 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "hdmi"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ mxcfb2: fb@1 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "lcd"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ lcd@0 { -+ compatible = "fsl,lcd"; -+ ipu_id = <0>; -+ disp_id = <0>; -+ default_ifmt = "RGB24"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ipu1_1>; -+ status = "okay"; -+ }; -+ -+ v4l2_out { -+ compatible = "fsl,mxc_v4l2_output"; -+ status = "okay"; -+ }; -+}; -+ -+&iomuxc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hog>; -+ -+ hog { -+ pinctrl_hog: hoggrp { -+ fsl,pins = < -+ /* SATA PWR */ -+ MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 -+ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 -+ MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 -+ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 -+ /* SATA CTRL */ -+ MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 -+ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 -+ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 -+ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -+ /* POWER_BUTTON */ -+ MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -+ >; -+ }; -+ }; -+ -+ imx6q-cm-fx6 { -+ /* pins for eth0 */ -+ pinctrl_enet: enetgrp { -+ fsl,pins = < -+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -+ >; -+ }; -+ -+ /* pins for spi */ -+ pinctrl_ecspi1: ecspi1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -+ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -+ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -+ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -+ >; -+ }; -+ -+ /* pins for nand */ -+ pinctrl_gpmi_nand: gpminandgrp { -+ fsl,pins = < -+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -+ >; -+ }; -+ -+ /* pins for i2c2 */ -+ pinctrl_i2c2: i2c2grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for i2c3 */ -+ pinctrl_i2c3: i2c3grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -+ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for console */ -+ pinctrl_uart4: uart4grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -+ >; -+ }; -+ -+ /* pins for usb hub1 */ -+ pinctrl_usbh1: usbh1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -+ >; -+ }; -+ -+ /* pins for usb otg */ -+ pinctrl_usbotg: usbotggrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -+ >; -+ }; -+ -+ /* pins for wifi/bt */ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -+ >; -+ }; -+ -+ /* pins for pcie */ -+ pinctrl_pcie: pciegrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -+ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -+ >; -+ }; -+ -+ /* pins for spdif */ -+ pinctrl_spdif: spdifgrp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -+ MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -+ >; -+ }; -+ -+ /* pins for audmux */ -+ pinctrl_audmux: audmuxgrp { -+ fsl,pins = < -+ MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -+ MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -+ MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -+ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -+ MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -+ /* master mode pin */ -+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -+ >; -+ }; -+ }; -+}; -+ -+/* spi */ -+&ecspi1 { -+ fsl,spi-num-chipselects = <2>; -+ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ecspi1>; -+ status = "okay"; -+ -+ flash: m25p80@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "st,m25px16", "st,m25p"; -+ spi-max-frequency = <20000000>; -+ reg = <0>; -+ -+ partition@0 { -+ label = "uboot"; -+ reg = <0x0 0xc0000>; -+ }; -+ -+ partition@c0000 { -+ label = "uboot environment"; -+ reg = <0xc0000 0x40000>; -+ }; -+ -+ partition@100000 { -+ label = "reserved"; -+ reg = <0x100000 0x100000>; -+ }; -+ }; -+}; -+ -+/* eth0 */ -+&fec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+/* nand */ -+&gpmi { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_gpmi_nand>; -+ status = "okay"; -+}; -+ -+/* i2c3 */ -+&i2c3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c3>; -+ status = "okay"; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ codec: wm8731@1a { -+ compatible = "wlf,wm8731"; -+ reg = <0x1a>; -+ clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; -+ clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; -+ AVDD-supply = <&pu_dummy>; -+ HPVDD-supply = <&pu_dummy>; -+ DCVDD-supply = <&pu_dummy>; -+ DBVDD-supply = <&pu_dummy>; -+ }; -+}; -+ -+&pcie { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pcie>; -+ reset-gpio = <&gpio1 26 0>; -+ power-on-gpio = <&gpio2 24 0>; -+ status = "okay"; -+}; -+ -+/* sata */ -+&sata { -+ status = "okay"; -+}; -+ -+/* console */ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart4>; -+ status = "okay"; -+}; -+ -+/* usb otg */ -+&usbotg { -+ vbus-supply = <®_usb_otg_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbotg>; -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+/* usb hub1 */ -+&usbh1 { -+ vbus-supply = <®_usb_h1_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbh1>; -+ status = "okay"; -+}; -+ -+/* wifi/bt */ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ non-removable; -+ vmmc-supply = <&awnh387_npoweron>; -+ vmmc_aux-supply = <&awnh387_wifi_nreset>; -+ status = "okay"; -+}; -+ -+&ssi2 { -+ fsl,mode = "i2s-master"; -+ status = "okay"; -+}; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ status = "okay"; -+}; -+ -+&hdmi_core { -+ ipu_id = <1>; -+ disp_id = <0>; -+ status = "okay"; -+}; -+ -+&hdmi_video { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -+ fsl,hdcp; -+ status = "okay"; -+}; -+ -+&hdmi_audio { -+ status = "okay"; -+}; -+ -+&spdif { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spdif>; -+ status = "okay"; -+}; -+ -+&audmux { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_audmux>; -+ status = "okay"; -+}; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -new file mode 100644 -index 0000000..acfc572 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -@@ -0,0 +1,14 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include "imx6q-sb-fx6x.dtsi" -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -new file mode 100644 -index 0000000..5a488f8 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -@@ -0,0 +1,32 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include "imx6q-sb-fx6x.dtsi" -+ -+/ { -+ eth@pcie { -+ compatible = "intel,i211"; -+ local-mac-address = [FF FF FF FF FF FF]; -+ status = "okay"; -+ }; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ power { -+ label = "Power Button"; -+ gpios = <&gpio1 29 1>; -+ linux,code = <116>; /* KEY_POWER */ -+ gpio-key,wakeup; -+ }; -+ }; -+}; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -new file mode 100644 -index 0000000..9f67b3e ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -@@ -0,0 +1,75 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include "imx6q.dtsi" -+ -+/ { -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for mmc */ -+ reg_3p3v: 3p3v { -+ compatible = "regulator-fixed"; -+ regulator-name = "3P3V"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; -+ }; -+ -+}; -+ -+&iomuxc { -+ imx6q-sb-fx6x { -+ /* pins for i2c1 */ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for mmc */ -+ pinctrl_usdhc3: usdhc3grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -+ >; -+ }; -+ }; -+}; -+ -+/* i2c1 */ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c1>; -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+}; -+ -+/* mmc */ -+&usdhc3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc3>; -+ vmmc-supply = <®_3p3v>; -+ status = "disabled"; -+}; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 5d3c7da..33e4f33 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -11,13 +11,15 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q-cm-fx6.dts" -+/dts-v1/; -+#include "imx6q-sb-fx6x.dtsi" -+#include "imx6q-cm-fx6.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; - }; - --&pcie { -+&usdhc3 { - status = "okay"; --}; -+}; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 0e76f02..2282250 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -11,31 +11,18 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q-cm-fx6.dts" -+/dts-v1/; -+#include "imx6q-sb-fx6m.dtsi" -+#include "imx6q-cm-fx6.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6m"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; - -- eth@pcie { -- compatible = "intel,i211"; -- local-mac-address = [FF FF FF FF FF FF]; -- status = "okay"; -- }; -- -- gpio-keys { -- compatible = "gpio-keys"; -- power { -- label = "Power Button"; -- gpios = <&gpio1 29 1>; -- linux,code = <116>; /* KEY_POWER */ -- gpio-key,wakeup; -- }; -- }; - }; - - &iomuxc { -- imx6q-sb-fx6m { -+ imx6q-sbc-fx6m { - /* pins for uart2 */ - pinctrl_uart2: uart2grp { - fsl,pins = < -@@ -45,17 +32,10 @@ - MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 - >; - }; -- -- /* pins for pcie */ -- pinctrl_pcie: pciegrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -- MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -- >; -- }; - }; - }; - -+ - &i2c1 { - rtc@56 { - compatible = "emmicro,em3027"; -@@ -63,11 +43,7 @@ - }; - }; - --&pcie { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_pcie>; -- reset-gpio = <&gpio1 26 0>; -- power-on-gpio = <&gpio2 24 0>; -+&usdhc3 { - status = "okay"; - }; - -@@ -80,4 +56,4 @@ - dma-names = "rx", "tx"; - dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; - status = "okay"; --}; -+}; -\ No newline at end of file --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0023-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0023-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch deleted file mode 100644 index 89162e24..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0023-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch +++ /dev/null @@ -1,46 +0,0 @@ -From dbd1cd2da1f43bde17e66b95128533d1658ece09 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 20 Aug 2014 14:48:09 +0300 -Subject: [PATCH 23/59] ARM: i.MX6: dts: pcie power-on-gpio to a fixed - regulator - -Define pcie power-on-gpio as a fixed regulator. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 0aa4461..27f9567 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -42,6 +42,16 @@ - enable-active-high; - }; - -+ /* regulator1 for pcie power-on-gpio */ -+ pcie_power_on_gpio: regulator-pcie-power-on-gpio { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-pcie-power-on-gpio"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 24 0>; -+ enable-active-high; -+ }; -+ - /* regulator for usb hub1 */ - reg_usb_h1_vbus: usb_h1_vbus { - compatible = "regulator-fixed"; -@@ -445,7 +455,7 @@ - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pcie>; - reset-gpio = <&gpio1 26 0>; -- power-on-gpio = <&gpio2 24 0>; -+ vdd-supply = <&pcie_power_on_gpio>; - status = "okay"; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch deleted file mode 100644 index cead2acc..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 84e2c9793f9240cec297eef8bb38978aade1fbb1 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 20 Aug 2014 15:15:38 +0300 -Subject: [PATCH 24/59] ARM: i.MX6: dts: add i2c1 status okay - -Restore the i2c1 bus staus that has been deleted while refactoring. -It was the reason why em3027 stoped working. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 4 ++++ - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 1 + - 2 files changed, 5 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 33e4f33..6f6ad33 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -20,6 +20,10 @@ - compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; - }; - -+&i2c1 { -+ status = "okay"; -+}; -+ - &usdhc3 { - status = "okay"; - }; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 2282250..cf2a0eb 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -37,6 +37,7 @@ - - - &i2c1 { -+ status = "okay"; - rtc@56 { - compatible = "emmicro,em3027"; - reg = <0x56>; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0025-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0025-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch deleted file mode 100644 index 1295ded9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0025-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b223d8ffc36e39f88c1b9014ca6bbaecd9022508 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 3 Sep 2014 10:48:29 +0300 -Subject: [PATCH 25/59] ARM: i.MX6: dts: add local-mac-address field for fec. - -Add local-mac-address field for fec. -The board U-Boot is in charge to fill this field with a correct value. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6qdl.dtsi | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi -index 732f2d2..f4f3de3 100644 ---- a/arch/arm/boot/dts/imx6qdl.dtsi -+++ b/arch/arm/boot/dts/imx6qdl.dtsi -@@ -944,6 +944,7 @@ - <&clks IMX6QDL_CLK_ENET>, - <&clks IMX6QDL_CLK_ENET_REF>; - clock-names = "ipg", "ahb", "ptp"; -+ local-mac-address = [FF FF FF FF FF FF]; - status = "disabled"; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0026-ARM-mxs-change-usb-phy-test-clock-gating.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0026-ARM-mxs-change-usb-phy-test-clock-gating.patch deleted file mode 100644 index 2a2436e2..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0026-ARM-mxs-change-usb-phy-test-clock-gating.patch +++ /dev/null @@ -1,36 +0,0 @@ -From e7e09deee3c3ac74e3d429cf8af2effade1152c7 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 28 Dec 2014 15:05:21 +0200 -Subject: [PATCH 26/59] ARM: mxs: change usb phy test clock gating. - -This change proposes to invert test clock gating. -This solution has fixed usb hub suspend resume loop issue. ---- - drivers/usb/phy/phy-mxs-usb.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c -index 97556b5..fffa67d 100644 ---- a/drivers/usb/phy/phy-mxs-usb.c -+++ b/drivers/usb/phy/phy-mxs-usb.c -@@ -239,7 +239,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect) - - if (disconnect) - writel_relaxed(BM_USBPHY_DEBUG_CLKGATE, -- base + HW_USBPHY_DEBUG_CLR); -+ base + HW_USBPHY_DEBUG_SET); - - if (mxs_phy->port_id == 0) { - reg = disconnect ? ANADIG_USB1_LOOPBACK_SET -@@ -257,7 +257,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect) - - if (!disconnect) - writel_relaxed(BM_USBPHY_DEBUG_CLKGATE, -- base + HW_USBPHY_DEBUG_SET); -+ base + HW_USBPHY_DEBUG_CLR); - - /* Delay some time, and let Linestate be SE0 for controller */ - if (disconnect) --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0027-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0027-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch deleted file mode 100644 index 8f77c7e1..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0027-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 246fc4a1169a2ef6fa2582e72bdf3d9c9dc451c2 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 30 Dec 2014 13:55:58 +0200 -Subject: [PATCH 27/59] ARM: i.MX6: dts: fix the cm-fx6 operation points. - -Fix the cm-fx6 operation points. Remove settings for 1.2GHz. -The current ldo settings do not allow 1.2GHz cpu frequency. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 27f9567..12eed61 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -380,6 +380,23 @@ - }; - }; - -+&cpu0 { -+ operating-points = < -+ /* kHz uV */ -+ 996000 1250000 -+ 852000 1250000 -+ 792000 1150000 -+ 396000 975000 -+ >; -+ fsl,soc-operating-points = < -+ /* ARM kHz SOC-PU uV */ -+ 996000 1250000 -+ 852000 1250000 -+ 792000 1175000 -+ 396000 1175000 -+ >; -+}; -+ - /* spi */ - &ecspi1 { - fsl,spi-num-chipselects = <2>; -@@ -538,4 +555,4 @@ - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_audmux>; - status = "okay"; --}; -\ No newline at end of file -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0028-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0028-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch deleted file mode 100644 index df9102d9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0028-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4e0f406df2399be8984a6b774669ec1181153a37 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 5 Jan 2015 10:34:13 +0200 -Subject: [PATCH 28/59] ARM: i.MX6: ASoC: fix build warnings and update - includes - -Fix build warnings and update includes. - -sound/soc/fsl/imx-wm8731.c: In function 'imx_hifi_hw_params_slv_mode': -sound/soc/fsl/imx-wm8731.c:357:3: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long int' -sound/soc/fsl/imx-wm8731.c: In function 'imx_hifi_hw_params_mst_mode': -sound/soc/fsl/imx-wm8731.c:414:3: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long int' - -Signed-off-by: Valentin Raevsky ---- - sound/soc/fsl/imx-wm8731.c | 13 ++++--------- - 1 file changed, 4 insertions(+), 9 deletions(-) - -diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c -index 72b75ad..c0833cf 100644 ---- a/sound/soc/fsl/imx-wm8731.c -+++ b/sound/soc/fsl/imx-wm8731.c -@@ -14,17 +14,12 @@ - */ - - #include -+#include - #include - #include --#include --#include --#include - #include - #include --#include - #include --#include --#include - - #include "../codecs/wm8731.h" - #include "imx-audmux.h" -@@ -344,7 +339,7 @@ static int imx_hifi_hw_params_slv_mode(struct snd_pcm_substream *substream, - SND_SOC_CLOCK_IN); - - if (ret < 0) { -- pr_err("Failed to set codec master clock to %u: %d \n", -+ pr_err("Failed to set codec master clock to %lu: %d \n", - data->sysclk, ret); - return ret; - } -@@ -401,7 +396,7 @@ static int imx_hifi_hw_params_mst_mode(struct snd_pcm_substream *substream, - SND_SOC_CLOCK_IN); - - if (ret < 0) { -- pr_err("Failed to set codec master clock to %u: %d \n", -+ pr_err("Failed to set codec master clock to %lu: %d \n", - data->sysclk, ret); - return ret; - } -@@ -555,7 +550,7 @@ static int imx_wm8731_probe(struct platform_device *pdev) - } - - codec_dev = of_find_i2c_device_by_node(codec_np); -- if (!codec_dev || !codec_dev->driver) { -+ if (!codec_dev) { - dev_err(&pdev->dev, "failed to find codec platform device\n"); - ret = -EINVAL; - goto fail; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0029-ARM-i.MX6-dts-change-issd-gpio-order.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0029-ARM-i.MX6-dts-change-issd-gpio-order.patch deleted file mode 100644 index 4076dfa1..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0029-ARM-i.MX6-dts-change-issd-gpio-order.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0c263e8ce8ff9a47bc336ed10d7144d7f673ed05 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 15 Jan 2015 13:52:37 +0200 -Subject: [PATCH 29/59] ARM: i.MX6: dts: change issd gpio order - -Change the order in which GPIOs are toggled in SATA init sequence to -accomodate both SanDisk and Phison SSDs. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 23 ++++++++++++----------- - 1 file changed, 12 insertions(+), 11 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 12eed61..dd91190 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -82,6 +82,16 @@ - startup-delay-us = <10000>; - }; - -+ reg_sata_ldo_en: sata_ldo_en { -+ compatible = "regulator-fixed"; -+ regulator-name = "cm_fx6_sata_ldo_en"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 16 0>; -+ startup-delay-us = <100>; -+ enable-active-high; -+ }; -+ - reg_sata_phy_slp: sata_phy_slp { - compatible = "regulator-fixed"; - regulator-name = "cm_fx6_sata_phy_slp"; -@@ -90,6 +100,7 @@ - gpio = <&gpio3 23 0>; - startup-delay-us = <100>; - enable-active-high; -+ vin-supply = <®_sata_ldo_en>; - }; - - reg_sata_nrstdly: sata_nrstdly { -@@ -133,20 +144,10 @@ - gpio = <&gpio5 2 0>; - startup-delay-us = <100>; - enable-active-high; -+ regulator-boot-on; - vin-supply = <®_sata_nstandby1>; - }; - -- reg_sata_ldo_en: sata_ldo_en { -- compatible = "regulator-fixed"; -- regulator-name = "cm_fx6_sata_ldo_en"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio2 16 0>; -- startup-delay-us = <100>; -- enable-active-high; -- regulator-boot-on; -- vin-supply = <®_sata_nstandby2>; -- }; - }; - - aliases { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0030-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0030-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch deleted file mode 100644 index 4aeabcdc..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0030-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5fd7676d1ed0b1147d17304fe93f6e65df824fe3 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Tue, 27 Jan 2015 15:54:24 +0200 -Subject: [PATCH 30/59] ARM: i.MX6: dts: add missing WiFi/BT pinmuxes - -Set a correct mux mode for both: -WLAN_BT_nPD and WLAN_BT_nRESET. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index dd91190..3b1a046 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -239,6 +239,9 @@ - MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 - /* POWER_BUTTON */ - MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -+ /* WIFI_PWR_RST */ -+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 -+ MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 - >; - }; - }; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0031-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0031-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch deleted file mode 100644 index 08ac85dc..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0031-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9c4cc9ad875d6dbbf099b3eb3cf145e8e32c8fa1 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 12 Feb 2015 13:41:56 +0200 -Subject: [PATCH 31/59] ARM: i.MX6: cm-fx6: enable i2cmux in defconfig - -Enable i2cmux in defconfig. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/configs/cm_fx6_defconfig | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig -index 210062b..7d753ae 100644 ---- a/arch/arm/configs/cm_fx6_defconfig -+++ b/arch/arm/configs/cm_fx6_defconfig -@@ -232,6 +232,9 @@ CONFIG_FSL_OTP=y - CONFIG_MXS_VIIM=y - # CONFIG_I2C_COMPAT is not set - CONFIG_I2C_CHARDEV=y -+CONFIG_I2C_MUX=y -+CONFIG_I2C_MUX_GPIO=y -+CONFIG_I2C_MUX_PCA954x=y - # CONFIG_I2C_HELPER_AUTO is not set - CONFIG_I2C_ALGOPCF=m - CONFIG_I2C_ALGOPCA=m --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0032-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0032-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch deleted file mode 100644 index 1d1fd3da..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0032-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 071b13a32ba25d50adf4f552e71339edce00e1f9 Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Feb 2015 15:54:13 +0200 -Subject: [PATCH 32/59] ARM: i.MX6: sb-fx6m: Fix uart1 rts/cts flow control - -According to the board schematics uart1 works in DCE mode only. -Remove the DCEDTE mode flag in the uart1 properties. - -Set a correct value in the IOMUXC_UART2_UART_RTS_B_SELECT_INPUT register. -This value lets connect RTS_B pad to ipp_uart_rts_b when UART is in DCE mode. - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: removed remnant include from previous patch -version] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index cf2a0eb..8afb83d 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -19,6 +19,14 @@ - model = "CompuLab CM-FX6 on SBC-FX6m"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; - -+ iomux_uart2: pinmux@20E0924 { -+ compatible = "pinctrl-single"; -+ reg = <0x20E0000 0x924>; /* Single register */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ pinctrl-single,register-width = <32>; -+ pinctrl-single,function-mask = <0x4>; -+ }; - }; - - &iomuxc { -@@ -52,9 +60,6 @@ - &uart2 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart2>; -- /* fsl,dte-mode; */ - fsl,uart-has-rtscts; -- dma-names = "rx", "tx"; -- dmas = <&sdma 27 4 0>, <&sdma 28 4 0>; - status = "okay"; --}; -\ No newline at end of file -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0033-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0033-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch deleted file mode 100644 index e6c21a4e..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0033-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 38a739ee4a93cbf436a4d3dfbe9f9fc729177392 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 18 Feb 2015 18:25:23 +0200 -Subject: [PATCH 33/59] ARM: i.MX6: dts: add i2cmux support for SBC-FX6 boards - -Add i2cmux support for SBC-FX6 boards. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sb-fx6.dtsi | 50 +++++++++++++++++++++++++++++++++- - arch/arm/boot/dts/imx6q-sb-fx6m.dtsi | 36 ++++++++++++++++++++++++ - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 6 +--- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 2 +- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 5 ---- - 5 files changed, 87 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -index acfc572..fc4f347a 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -@@ -11,4 +11,52 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q-sb-fx6x.dtsi" -\ No newline at end of file -+#include "imx6q-sb-fx6x.dtsi" -+ -+/ { -+ i2cmux { -+ compatible = "i2c-mux-gpio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ mux-gpios = <&gpio1 2 0>; -+ i2c-parent = <&i2c1>; -+ -+ i2c@0 { -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ pca9555@26 { -+ compatible = "nxp,pca9555"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ reg = <0x26>; -+ }; -+ -+ hx8526@4a { -+ compatible = "himax,himax_ts"; -+ reg = <0x4a>; -+ gpio_intr = <&gpio1 4 0>; -+ }; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ }; -+ -+ i2c@1 { -+ reg = <1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ dvi: edid@50 { -+ compatible = "fsl,imx6-hdmi-i2c"; -+ reg = <0x50>; -+ }; -+ }; -+ -+ }; -+}; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -index 5a488f8..a6cc8dd 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -@@ -29,4 +29,40 @@ - gpio-key,wakeup; - }; - }; -+ -+ i2cmux { -+ compatible = "i2c-mux-gpio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ mux-gpios = <&gpio1 2 0>; -+ i2c-parent = <&i2c1>; -+ -+ i2c@0 { -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ rtc@56 { -+ compatible = "emmicro,em3027"; -+ reg = <0x56>; -+ }; -+ }; -+ -+ i2c@1 { -+ reg = <1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ dvi: edid@50 { -+ compatible = "fsl,imx6-hdmi-i2c"; -+ reg = <0x50>; -+ }; -+ }; -+ }; - }; -\ No newline at end of file -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -index 9f67b3e..ae70c87 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -@@ -59,11 +59,7 @@ - &i2c1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c1>; -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -+ status = "disabled"; - }; - - /* mmc */ -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 6f6ad33..4bba196 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -12,7 +12,7 @@ - */ - - /dts-v1/; --#include "imx6q-sb-fx6x.dtsi" -+#include "imx6q-sb-fx6.dtsi" - #include "imx6q-cm-fx6.dtsi" - - / { -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 8afb83d..31d0e8c 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -43,13 +43,8 @@ - }; - }; - -- - &i2c1 { - status = "okay"; -- rtc@56 { -- compatible = "emmicro,em3027"; -- reg = <0x56>; -- }; - }; - - &usdhc3 { --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch deleted file mode 100644 index f5e3b09c..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 23349ee1dfee32db88d3a493fc7c8aaeb8e72868 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 12 Feb 2015 13:49:31 +0200 -Subject: [PATCH 34/59] ARM: i.MX6: dts: add dvi edid GPIOs - -Add dvi edid GPIOs. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -index ae70c87..41237c7 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -@@ -32,6 +32,9 @@ - }; - - &iomuxc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>; -+ - imx6q-sb-fx6x { - /* pins for i2c1 */ - pinctrl_i2c1: i2c1grp { -@@ -52,6 +55,16 @@ - MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 - >; - }; -+ -+ /* pins for dvi/ts */ -+ pinctrl_dvi0: dvi0grp { -+ fsl,pins = < -+ /* DVI_DDC_SEL */ -+ MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000 -+ /* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */ -+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000 -+ >; -+ }; - }; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0035-video-mxc-IPUv3-fb-restore-sync-bits.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0035-video-mxc-IPUv3-fb-restore-sync-bits.patch deleted file mode 100644 index 45712e58..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0035-video-mxc-IPUv3-fb-restore-sync-bits.patch +++ /dev/null @@ -1,114 +0,0 @@ -From db8c584359449958872973912001bd845438c487 Mon Sep 17 00:00:00 2001 -From: Dmitry Lifshitz -Date: Thu, 12 Feb 2015 16:59:53 +0200 -Subject: [PATCH 35/59] video: mxc: IPUv3 fb: restore sync bits - -Freescale framebuffer driver uses some driver-specific -proprietary bits in the sync field (like pixel clock polarity). - -Xorg driver discards unknown sync bits in the fb_var_screeninfo -structure. As the results of dropping the proprietary sync bits -some displays shows various artifacts. - -Fix the bug by hacking mxcfb_set_par() callback. - -Before applying new var parameters, try to find a match in the mode -list, skipping proprietary sync bits (FB_MXC_SYNC_MASK). - -If the entry is found, copy its FB_MXC_SYNC_MASK bits. - -Signed-off-by: Dmitry Lifshitz -Signed-off-by: Valentin Raevsky ---- - drivers/video/mxc/mxc_ipuv3_fb.c | 38 ++++++++++++++++++++++++++++++++++++++ - include/linux/mxcfb.h | 11 +++++++++++ - 2 files changed, 49 insertions(+) - -diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c -index 1fbfc9d..d24241a 100644 ---- a/drivers/video/mxc/mxc_ipuv3_fb.c -+++ b/drivers/video/mxc/mxc_ipuv3_fb.c -@@ -428,6 +428,28 @@ static bool mxcfb_need_to_set_par(struct fb_info *fbi) - sizeof(struct fb_var_screeninfo)); - } - -+static struct fb_videomode *mxc_match_mode(const struct fb_var_screeninfo *var, -+ struct list_head *head) -+{ -+ struct list_head *pos; -+ struct fb_modelist *modelist; -+ struct fb_videomode *m, mode; -+ -+ fb_var_to_videomode(&mode, var); -+ list_for_each(pos, head) { -+ modelist = list_entry(pos, struct fb_modelist, list); -+ m = &modelist->mode; -+ -+ mode.sync &= ~FB_MXC_SYNC_MASK; -+ mode.sync |= m->sync & FB_MXC_SYNC_MASK; -+ -+ if (fb_mode_is_equal(m, &mode)) -+ return m; -+ } -+ -+ return NULL; -+} -+ - /* - * Set framebuffer parameters and change the operating mode. - * -@@ -583,6 +605,7 @@ static int mxcfb_set_par(struct fb_info *fbi) - - if (!mxc_fbi->overlay) { - uint32_t out_pixel_fmt; -+ struct fb_videomode *sync_mode; - - memset(&sig_cfg, 0, sizeof(sig_cfg)); - if (fbi->var.vmode & FB_VMODE_INTERLACED) -@@ -596,6 +619,21 @@ static int mxcfb_set_par(struct fb_info *fbi) - sig_cfg.Hsync_pol = true; - if (fbi->var.sync & FB_SYNC_VERT_HIGH_ACT) - sig_cfg.Vsync_pol = true; -+ -+ /* -+ * Try to find matching all parameters, except -+ * FB_MXC_SYNC_MASK bits in the .sync field. -+ */ -+ sync_mode = mxc_match_mode(&fbi->var, &fbi->modelist); -+ /* -+ * If entry exists in the mode list and FB_MXC_SYNC_MASK -+ * bits are empty in the fbi->var.sync (most probably cleared -+ * by the user space application) then copy it from the found -+ * mode list entry. -+ */ -+ if (sync_mode && !(fbi->var.sync & FB_MXC_SYNC_MASK)) -+ fbi->var.sync = sync_mode->sync; -+ - if (!(fbi->var.sync & FB_SYNC_CLK_LAT_FALL)) - sig_cfg.clk_pol = true; - if (fbi->var.sync & FB_SYNC_DATA_INVERT) -diff --git a/include/linux/mxcfb.h b/include/linux/mxcfb.h -index 67db5ee..e63aa2c 100644 ---- a/include/linux/mxcfb.h -+++ b/include/linux/mxcfb.h -@@ -23,6 +23,17 @@ - - #include - -+#define FB_SYNC_OE_LOW_ACT 0x80000000 -+#define FB_SYNC_CLK_LAT_FALL 0x40000000 -+#define FB_SYNC_DATA_INVERT 0x20000000 -+#define FB_SYNC_CLK_IDLE_EN 0x10000000 -+#define FB_SYNC_SHARP_MODE 0x08000000 -+#define FB_SYNC_SWAP_RGB 0x04000000 -+ -+#define FB_MXC_SYNC_MASK (FB_SYNC_OE_LOW_ACT | FB_SYNC_CLK_LAT_FALL | \ -+ FB_SYNC_DATA_INVERT | FB_SYNC_CLK_IDLE_EN | \ -+ FB_SYNC_SHARP_MODE | FB_SYNC_SWAP_RGB) -+ - extern struct fb_videomode mxcfb_modedb[]; - extern int mxcfb_modedb_sz; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0036-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0036-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch deleted file mode 100644 index 12216fc0..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0036-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch +++ /dev/null @@ -1,48 +0,0 @@ -From ed1cec186cd961a9d910bfc4817b925173a0081d Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 18 Feb 2015 18:48:26 +0200 -Subject: [PATCH 36/59] ARM: i.MX6: dts: add backlight support for SBC-FX6 - boards - -Add backlight support for SBC-FX6 boards. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 4bba196..5febb69 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -18,6 +18,14 @@ - / { - model = "CompuLab CM-FX6 on SBC-FX6"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; -+ -+ backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm3 0 5000000>; -+ brightness-levels = <0 4 8 16 32 64 128 255>; -+ default-brightness-level = <7>; -+ }; -+ - }; - - &i2c1 { -@@ -26,4 +34,10 @@ - - &usdhc3 { - status = "okay"; --}; -\ No newline at end of file -+}; -+ -+&pwm3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pwm3_1>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0037-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0037-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch deleted file mode 100644 index 523ab659..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0037-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch +++ /dev/null @@ -1,70 +0,0 @@ -From fbf61cbe1472b3c719b7cd67c03c0736096dbeb1 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 18 Feb 2015 18:53:01 +0200 -Subject: [PATCH 37/59] ARM: i.MX6: dts: rearrangement of the frame buffers - definitions - -Add a correct frame buffers' definitions -with regard to the board configuration. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 8 -------- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 8 ++++++++ - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 8 ++++++++ - 3 files changed, 16 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 3b1a046..7d39f50 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -524,14 +524,6 @@ - status = "okay"; - }; - --&mxcfb1 { -- status = "okay"; --}; -- --&mxcfb2 { -- status = "okay"; --}; -- - &hdmi_core { - ipu_id = <1>; - disp_id = <0>; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 5febb69..8e7432d 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -41,3 +41,11 @@ - pinctrl-0 = <&pinctrl_pwm3_1>; - status = "okay"; - }; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 31d0e8c..0005eca 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -58,3 +58,11 @@ - fsl,uart-has-rtscts; - status = "okay"; - }; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0038-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0038-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch deleted file mode 100644 index f2c5823d..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0038-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 18d516509c4acc54d0d8b6ce3019d721db81334a Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 11 Feb 2015 18:15:42 +0200 -Subject: [PATCH 38/59] ARM: i.MX6: iomux: raise DSE for display signals - -While drive strength of display signals is configured for 120 Ohm, some -displays exhibit artifacts. -Typical drive strength should be around 50 Ohm. -To fix the the visual artifacts, we raise the drive strength to 48 Ohm. - -Signed-off-by: Igor Grinberg -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 36 ++++++++++++++++++++++++++++++++++- - 1 file changed, 35 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 7d39f50..9a956ac 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -210,7 +210,7 @@ - disp_id = <0>; - default_ifmt = "RGB24"; - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ipu1_1>; -+ pinctrl-0 = <&pinctrl_ipu1_lcd>; - status = "okay"; - }; - -@@ -268,6 +268,40 @@ - >; - }; - -+ pinctrl_ipu1_lcd: ipu1grp-lcd { -+ fsl,pins = < -+ MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38 -+ MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x38 -+ MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x38 -+ MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x38 -+ MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000028 -+ MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x38 -+ MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x38 -+ MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x38 -+ MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x38 -+ MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x38 -+ MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x38 -+ MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x38 -+ MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x38 -+ MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x38 -+ MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x38 -+ MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x38 -+ MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x38 -+ MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x38 -+ MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x38 -+ MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x38 -+ MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x38 -+ MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x38 -+ MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x38 -+ MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x38 -+ MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x38 -+ MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x38 -+ MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x38 -+ MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x38 -+ MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x38 -+ >; -+ }; -+ - /* pins for spi */ - pinctrl_ecspi1: ecspi1grp { - fsl,pins = < --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0039-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0039-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch deleted file mode 100644 index a5afa7e2..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0039-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9cc3784253ae0104f22cdd487e6d4065b3308f0b Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 12 Feb 2015 16:54:04 +0200 -Subject: [PATCH 39/59] ARM: i.MX6: cm-fx6: add video mode for KD050C-WVGA - -Add video mode for KD050C-WVGA, update the lcdif_modedb with -the correct parameters for KD050C-WVGA. -Change mode string for second frame buffer. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 1 + - drivers/video/mxc/mxc_lcdif.c | 6 ++++++ - 2 files changed, 7 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 8e7432d..63f91a6 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -47,5 +47,6 @@ - }; - - &mxcfb2 { -+ mode_str ="KD050C-WVGA"; - status = "okay"; - }; -diff --git a/drivers/video/mxc/mxc_lcdif.c b/drivers/video/mxc/mxc_lcdif.c -index d635edd..ae6ac42 100644 ---- a/drivers/video/mxc/mxc_lcdif.c -+++ b/drivers/video/mxc/mxc_lcdif.c -@@ -48,6 +48,12 @@ static struct fb_videomode lcdif_modedb[] = { - FB_SYNC_CLK_LAT_FALL, - FB_VMODE_NONINTERLACED, - 0,}, -+ { -+ /* 800x480 @ 60 Hz , pixel clk @ 32MHz */ -+ "KD050C-WVGA", 60, 800, 480, 30000, 40, 40, 13, 29, 48, 3, -+ FB_SYNC_CLK_LAT_FALL, -+ FB_VMODE_NONINTERLACED, -+ 0,}, - }; - static int lcdif_modedb_sz = ARRAY_SIZE(lcdif_modedb); - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0040-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0040-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch deleted file mode 100644 index 727512cc..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0040-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch +++ /dev/null @@ -1,54 +0,0 @@ -From e3f8a9bf6c298da7919353e364e0873425005033 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 19 Feb 2015 15:45:07 +0200 -Subject: [PATCH 40/59] ARM: i.MX6: cm-fx6: refactor the cm-fx6 iomux - -Move Marvell Power On and Reset GPIOs into a separate group. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 9a956ac..412e03b 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -239,9 +239,6 @@ - MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 - /* POWER_BUTTON */ - MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -- /* WIFI_PWR_RST */ -- MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 -- MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 - >; - }; - }; -@@ -387,6 +384,15 @@ - >; - }; - -+ /* pins for wifi/bt */ -+ pinctrl_mrvl1: mrvl1grp { -+ fsl,pins = < -+ /* WIFI_PWR_RST */ -+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 -+ MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 -+ >; -+ }; -+ - /* pins for pcie */ - pinctrl_pcie: pciegrp { - fsl,pins = < -@@ -546,7 +552,7 @@ - /* wifi/bt */ - &usdhc1 { - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc1>; -+ pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>; - non-removable; - vmmc-supply = <&awnh387_npoweron>; - vmmc_aux-supply = <&awnh387_wifi_nreset>; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0041-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0041-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch deleted file mode 100644 index 11d563c9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0041-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 590ff97539070fb89f25337e8123495920f17433 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 15 Jan 2015 12:52:56 +0200 -Subject: [PATCH 41/59] ARM: i.MX6: dts: gpmi: separate kernel and rootfs - -Make separate partitions for kernel and root filesystem on the NAND -flash. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 412e03b..5ca8993 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -486,6 +486,16 @@ - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpmi_nand>; - status = "okay"; -+ -+ partition@0 { -+ label = "linux"; -+ reg = <0x0 0x800000>; -+ }; -+ -+ partition@800000 { -+ label = "rootfs"; -+ reg = < 0x800000 0x0>; -+ }; - }; - - /* i2c3 */ --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0042-ARM-dts-cm-fx6-enable-can-bus.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0042-ARM-dts-cm-fx6-enable-can-bus.patch deleted file mode 100644 index 0dccbaa1..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0042-ARM-dts-cm-fx6-enable-can-bus.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6c5e8a2dc899ae44e3ae1007ec1a1be4c6cb0f86 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 26 Feb 2015 16:45:42 +0200 -Subject: [PATCH 42/59] ARM: dts: cm-fx6: enable can bus - -Enable can bus. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 63f91a6..2432f34 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -50,3 +50,9 @@ - mode_str ="KD050C-WVGA"; - status = "okay"; - }; -+ -+&flexcan1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_flexcan1_1>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0043-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0043-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch deleted file mode 100644 index 98eb30d5..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0043-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5439887f65973766007f69f56277bfc7bd50494f Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 25 Feb 2015 20:18:34 +0200 -Subject: [PATCH 43/59] ARM: dts: cm-fx6: add tsc2046 touchscreen support - -Add tsc2046 touchscreen support. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 45 +++++++++++++++++++++++++++++++++++ - 1 file changed, 45 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 5ca8993..704ef4b 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -148,6 +148,13 @@ - vin-supply = <®_sata_nstandby1>; - }; - -+ tsc2046reg: tsc2046-reg { -+ compatible = "regulator-fixed"; -+ regulator-name = "tsc2046-reg"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ - }; - - aliases { -@@ -393,6 +400,14 @@ - >; - }; - -+ /* pins for tsc2046 pendown */ -+ pinctrl_tsc2046: tsc2046grp { -+ fsl,pins = < -+ /* tsc2046 PENDOWN */ -+ MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000 -+ >; -+ }; -+ - /* pins for pcie */ - pinctrl_pcie: pciegrp { - fsl,pins = < -@@ -471,6 +486,36 @@ - reg = <0x100000 0x100000>; - }; - }; -+ -+ /* touch controller */ -+ touch: tsc2046@1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_tsc2046>; -+ -+ compatible = "ti,tsc2046"; -+ vcc-supply = <&tsc2046reg>; -+ -+ reg = <1>; /* CS1 */ -+ spi-max-frequency = <1500000>; -+ -+ interrupt-parent = <&gpio2>; -+ interrupts = <15 0>; -+ pendown-gpio = <&gpio2 15 0>; -+ -+ ti,x-min = /bits/ 16 <0x0>; -+ ti,x-max = /bits/ 16 <0x0fff>; -+ ti,y-min = /bits/ 16 <0x0>; -+ ti,y-max = /bits/ 16 <0x0fff>; -+ -+ ti,x-plate-ohms = /bits/ 16 <180>; -+ ti,pressure-max = /bits/ 16 <255>; -+ -+ ti,debounce-max = /bits/ 16 <30>; -+ ti,debounce-tol = /bits/ 16 <10>; -+ ti,debounce-rep = /bits/ 16 <1>; -+ -+ linux,wakeup; -+ }; - }; - - /* eth0 */ --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0044-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0044-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch deleted file mode 100644 index 964db0e9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0044-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 6773725e718bd458147b9e66fa1b9edb95f8dd91 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 5 Mar 2015 09:59:32 +0200 -Subject: [PATCH 44/59] ARM: i.MX6: sb-fx6x: refactoring of the usdhc3 - definition - -Add uhs pinctrl state for usdhc3. -This is needed for supporting ultra high speed cards. - -Add cd/wp definitions. -Add a missing property no-1-8-v. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 32 ++++++++++++++++++++++++++++++-- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 1 + - 2 files changed, 31 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -index 41237c7..372a3c1 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -@@ -53,6 +53,30 @@ - MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 - MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 - MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -+ MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000 -+ MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000 -+ >; -+ }; -+ -+ pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */ -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9 -+ >; -+ }; -+ -+ pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */ -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9 - >; - }; - -@@ -77,8 +101,12 @@ - - /* mmc */ - &usdhc3 { -- pinctrl-names = "default"; -+ pinctrl-names = "default", "state_100mhz", "state_200mhz"; - pinctrl-0 = <&pinctrl_usdhc3>; -+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>; -+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>; -+ cd-gpios = <&gpio7 1 0>; -+ no-1-8-v; - vmmc-supply = <®_3p3v>; - status = "disabled"; --}; -\ No newline at end of file -+}; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 2432f34..cd5c011 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -33,6 +33,7 @@ - }; - - &usdhc3 { -+ wp-gpios = <&gpio7 0 0>; - status = "okay"; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0045-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0045-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch deleted file mode 100644 index 4a523346..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0045-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 706e2109599bd2ac09114b5064bc75140e928f2c Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 18 Mar 2015 14:30:49 +0200 -Subject: [PATCH 45/59] ARM: i.MX6: cm-fx6: fix up incorrect compatibilities - -Fix up incorrect compatibilities. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 704ef4b..8175cee 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -163,8 +163,7 @@ - }; - - sound { -- compatible = "fsl,imx6q-cm-fx6-wm8731", -- "fsl,imx-audio-wm8731"; -+ compatible = "fsl,imx-audio-wm8731"; - model = "wm8731-audio"; - ssi-controller = <&ssi2>; - src-port = <2>; -@@ -174,15 +173,13 @@ - }; - - sound-hdmi { -- compatible = "fsl,imx6q-audio-hdmi", -- "fsl,imx-audio-hdmi"; -+ compatible = "fsl,imx-audio-hdmi"; - model = "imx-audio-hdmi"; - hdmi-controller = <&hdmi_audio>; - }; - - sound-spdif { -- compatible = "fsl,imx-audio-spdif", -- "fsl,imx-sabreauto-spdif"; -+ compatible = "fsl,imx-audio-spdif"; - model = "imx-spdif"; - spdif-controller = <&spdif>; - spdif-out; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0046-ARM-i.MX6-dts-fix-include-file-order.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0046-ARM-i.MX6-dts-fix-include-file-order.patch deleted file mode 100644 index bfd151b3..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0046-ARM-i.MX6-dts-fix-include-file-order.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 1ba89a208ecf8096a1b9a0fd1867d4227e04a1e8 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Sun, 22 Mar 2015 11:15:08 +0200 -Subject: [PATCH 46/59] ARM: i.MX6: dts: fix include file order - -Fix include file order. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-cm-fx6.dts | 3 ++- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 2 -- - arch/arm/boot/dts/imx6q-sb-fx6.dtsi | 2 -- - arch/arm/boot/dts/imx6q-sb-fx6m.dtsi | 4 +--- - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 2 -- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 4 +++- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 4 +++- - 7 files changed, 9 insertions(+), 12 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -index a0e423b..14c2d6a 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -12,9 +12,10 @@ - */ - - /dts-v1/; -+#include "imx6q.dtsi" - #include "imx6q-cm-fx6.dtsi" - - / { - model = "CompuLab CM-FX6"; - compatible = "compulab,cm-fx6", "fsl,imx6q"; --}; -\ No newline at end of file -+}; -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index 8175cee..f53d94e 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -11,8 +11,6 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q.dtsi" -- - / { - memory { - reg = <0x10000000 0x80000000>; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -index fc4f347a..4d030f9 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -@@ -11,8 +11,6 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q-sb-fx6x.dtsi" -- - / { - i2cmux { - compatible = "i2c-mux-gpio"; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -index a6cc8dd..5e6c859 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -@@ -11,8 +11,6 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q-sb-fx6x.dtsi" -- - / { - eth@pcie { - compatible = "intel,i211"; -@@ -65,4 +63,4 @@ - }; - }; - }; --}; -\ No newline at end of file -+}; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -index 372a3c1..01f73ae 100644 ---- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -+++ b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -@@ -11,8 +11,6 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --#include "imx6q.dtsi" -- - / { - regulators { - compatible = "simple-bus"; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index cd5c011..84a6d23 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -12,8 +12,10 @@ - */ - - /dts-v1/; --#include "imx6q-sb-fx6.dtsi" -+#include "imx6q.dtsi" - #include "imx6q-cm-fx6.dtsi" -+#include "imx6q-sb-fx6x.dtsi" -+#include "imx6q-sb-fx6.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6"; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 0005eca..817da28 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -12,8 +12,10 @@ - */ - - /dts-v1/; --#include "imx6q-sb-fx6m.dtsi" -+#include "imx6q.dtsi" - #include "imx6q-cm-fx6.dtsi" -+#include "imx6q-sb-fx6x.dtsi" -+#include "imx6q-sb-fx6m.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6m"; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0047-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0047-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch deleted file mode 100644 index 74f249a9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0047-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch +++ /dev/null @@ -1,570 +0,0 @@ -From feeb12eb1567043d60246cceb805a28d82d2c78e Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Mar 2015 09:50:04 +0200 -Subject: [PATCH 47/59] ARM: i.MX6: dts: rename the sb-fx6 board files - -In preparation for DL/S support addition, we rename the files to better -describe the content and reuse the same DT code. -Rename the sb-fx6 board files' names - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: added a bit more descriptive commit message] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6q-sb-fx6.dtsi | 60 ----------------- - arch/arm/boot/dts/imx6q-sb-fx6m.dtsi | 66 ------------------- - arch/arm/boot/dts/imx6q-sb-fx6x.dtsi | 110 -------------------------------- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 4 +- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 4 +- - arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi | 60 +++++++++++++++++ - arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi | 66 +++++++++++++++++++ - arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi | 110 ++++++++++++++++++++++++++++++++ - 8 files changed, 240 insertions(+), 240 deletions(-) - delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6.dtsi - delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6m.dtsi - delete mode 100644 arch/arm/boot/dts/imx6q-sb-fx6x.dtsi - create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi - create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi - create mode 100644 arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi - -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -deleted file mode 100644 -index 4d030f9..0000000 ---- a/arch/arm/boot/dts/imx6q-sb-fx6.dtsi -+++ /dev/null -@@ -1,60 +0,0 @@ --/* -- * Copyright 2014 CompuLab Ltd. -- * -- * Author: Valentin Raevsky -- * -- * The code contained herein is licensed under the GNU General Public -- * License. You may obtain a copy of the GNU General Public License -- * Version 2 or later at the following locations: -- * -- * http://www.opensource.org/licenses/gpl-license.html -- * http://www.gnu.org/copyleft/gpl.html -- */ -- --/ { -- i2cmux { -- compatible = "i2c-mux-gpio"; -- #address-cells = <1>; -- #size-cells = <0>; -- mux-gpios = <&gpio1 2 0>; -- i2c-parent = <&i2c1>; -- -- i2c@0 { -- reg = <0>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- pca9555@26 { -- compatible = "nxp,pca9555"; -- gpio-controller; -- #gpio-cells = <2>; -- reg = <0x26>; -- }; -- -- hx8526@4a { -- compatible = "himax,himax_ts"; -- reg = <0x4a>; -- gpio_intr = <&gpio1 4 0>; -- }; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -- -- }; -- -- i2c@1 { -- reg = <1>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- dvi: edid@50 { -- compatible = "fsl,imx6-hdmi-i2c"; -- reg = <0x50>; -- }; -- }; -- -- }; --}; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -deleted file mode 100644 -index 5e6c859..0000000 ---- a/arch/arm/boot/dts/imx6q-sb-fx6m.dtsi -+++ /dev/null -@@ -1,66 +0,0 @@ --/* -- * Copyright 2014 CompuLab Ltd. -- * -- * Author: Valentin Raevsky -- * -- * The code contained herein is licensed under the GNU General Public -- * License. You may obtain a copy of the GNU General Public License -- * Version 2 or later at the following locations: -- * -- * http://www.opensource.org/licenses/gpl-license.html -- * http://www.gnu.org/copyleft/gpl.html -- */ -- --/ { -- eth@pcie { -- compatible = "intel,i211"; -- local-mac-address = [FF FF FF FF FF FF]; -- status = "okay"; -- }; -- -- gpio-keys { -- compatible = "gpio-keys"; -- power { -- label = "Power Button"; -- gpios = <&gpio1 29 1>; -- linux,code = <116>; /* KEY_POWER */ -- gpio-key,wakeup; -- }; -- }; -- -- i2cmux { -- compatible = "i2c-mux-gpio"; -- #address-cells = <1>; -- #size-cells = <0>; -- mux-gpios = <&gpio1 2 0>; -- i2c-parent = <&i2c1>; -- -- i2c@0 { -- reg = <0>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; -- }; -- -- rtc@56 { -- compatible = "emmicro,em3027"; -- reg = <0x56>; -- }; -- }; -- -- i2c@1 { -- reg = <1>; -- #address-cells = <1>; -- #size-cells = <0>; -- -- dvi: edid@50 { -- compatible = "fsl,imx6-hdmi-i2c"; -- reg = <0x50>; -- }; -- }; -- }; --}; -diff --git a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -deleted file mode 100644 -index 01f73ae..0000000 ---- a/arch/arm/boot/dts/imx6q-sb-fx6x.dtsi -+++ /dev/null -@@ -1,110 +0,0 @@ --/* -- * Copyright 2014 CompuLab Ltd. -- * -- * Author: Valentin Raevsky -- * -- * The code contained herein is licensed under the GNU General Public -- * License. You may obtain a copy of the GNU General Public License -- * Version 2 or later at the following locations: -- * -- * http://www.opensource.org/licenses/gpl-license.html -- * http://www.gnu.org/copyleft/gpl.html -- */ -- --/ { -- regulators { -- compatible = "simple-bus"; -- #address-cells = <1>; -- #size-cells = <0>; -- -- /* regulator for mmc */ -- reg_3p3v: 3p3v { -- compatible = "regulator-fixed"; -- regulator-name = "3P3V"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- regulator-always-on; -- }; -- }; -- --}; -- --&iomuxc { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>; -- -- imx6q-sb-fx6x { -- /* pins for i2c1 */ -- pinctrl_i2c1: i2c1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -- MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for mmc */ -- pinctrl_usdhc3: usdhc3grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -- MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000 -- MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000 -- >; -- }; -- -- pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */ -- fsl,pins = < -- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9 -- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9 -- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9 -- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9 -- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9 -- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9 -- >; -- }; -- -- pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */ -- fsl,pins = < -- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9 -- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9 -- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9 -- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9 -- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9 -- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9 -- >; -- }; -- -- /* pins for dvi/ts */ -- pinctrl_dvi0: dvi0grp { -- fsl,pins = < -- /* DVI_DDC_SEL */ -- MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000 -- /* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */ -- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000 -- >; -- }; -- }; --}; -- --/* i2c1 */ --&i2c1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c1>; -- status = "disabled"; --}; -- --/* mmc */ --&usdhc3 { -- pinctrl-names = "default", "state_100mhz", "state_200mhz"; -- pinctrl-0 = <&pinctrl_usdhc3>; -- pinctrl-1 = <&pinctrl_usdhc3_100mhz>; -- pinctrl-2 = <&pinctrl_usdhc3_200mhz>; -- cd-gpios = <&gpio7 1 0>; -- no-1-8-v; -- vmmc-supply = <®_3p3v>; -- status = "disabled"; --}; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 84a6d23..9d31d15 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -14,8 +14,8 @@ - /dts-v1/; - #include "imx6q.dtsi" - #include "imx6q-cm-fx6.dtsi" --#include "imx6q-sb-fx6x.dtsi" --#include "imx6q-sb-fx6.dtsi" -+#include "imx6qdl-sb-fx6x.dtsi" -+#include "imx6qdl-sb-fx6.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6"; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 817da28..a98f1a2 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -14,8 +14,8 @@ - /dts-v1/; - #include "imx6q.dtsi" - #include "imx6q-cm-fx6.dtsi" --#include "imx6q-sb-fx6x.dtsi" --#include "imx6q-sb-fx6m.dtsi" -+#include "imx6qdl-sb-fx6x.dtsi" -+#include "imx6qdl-sb-fx6m.dtsi" - - / { - model = "CompuLab CM-FX6 on SBC-FX6m"; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -new file mode 100644 -index 0000000..4d030f9 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -@@ -0,0 +1,60 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/ { -+ i2cmux { -+ compatible = "i2c-mux-gpio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ mux-gpios = <&gpio1 2 0>; -+ i2c-parent = <&i2c1>; -+ -+ i2c@0 { -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ pca9555@26 { -+ compatible = "nxp,pca9555"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ reg = <0x26>; -+ }; -+ -+ hx8526@4a { -+ compatible = "himax,himax_ts"; -+ reg = <0x4a>; -+ gpio_intr = <&gpio1 4 0>; -+ }; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ }; -+ -+ i2c@1 { -+ reg = <1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ dvi: edid@50 { -+ compatible = "fsl,imx6-hdmi-i2c"; -+ reg = <0x50>; -+ }; -+ }; -+ -+ }; -+}; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi -new file mode 100644 -index 0000000..5e6c859 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi -@@ -0,0 +1,66 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/ { -+ eth@pcie { -+ compatible = "intel,i211"; -+ local-mac-address = [FF FF FF FF FF FF]; -+ status = "okay"; -+ }; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ power { -+ label = "Power Button"; -+ gpios = <&gpio1 29 1>; -+ linux,code = <116>; /* KEY_POWER */ -+ gpio-key,wakeup; -+ }; -+ }; -+ -+ i2cmux { -+ compatible = "i2c-mux-gpio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ mux-gpios = <&gpio1 2 0>; -+ i2c-parent = <&i2c1>; -+ -+ i2c@0 { -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ rtc@56 { -+ compatible = "emmicro,em3027"; -+ reg = <0x56>; -+ }; -+ }; -+ -+ i2c@1 { -+ reg = <1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ dvi: edid@50 { -+ compatible = "fsl,imx6-hdmi-i2c"; -+ reg = <0x50>; -+ }; -+ }; -+ }; -+}; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi -new file mode 100644 -index 0000000..01f73ae ---- /dev/null -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6x.dtsi -@@ -0,0 +1,110 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/ { -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for mmc */ -+ reg_3p3v: 3p3v { -+ compatible = "regulator-fixed"; -+ regulator-name = "3P3V"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; -+ }; -+ -+}; -+ -+&iomuxc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hog>, <&pinctrl_dvi0>; -+ -+ imx6q-sb-fx6x { -+ /* pins for i2c1 */ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1 -+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for mmc */ -+ pinctrl_usdhc3: usdhc3grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 -+ MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x80000000 -+ MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x80000000 -+ >; -+ }; -+ -+ pinctrl_usdhc3_100mhz: usdhc3grp-100mhz { /* 100Mhz */ -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9 -+ >; -+ }; -+ -+ pinctrl_usdhc3_200mhz: usdhc3grp-200mhz { /* 200Mhz */ -+ fsl,pins = < -+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9 -+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9 -+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9 -+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9 -+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9 -+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9 -+ >; -+ }; -+ -+ /* pins for dvi/ts */ -+ pinctrl_dvi0: dvi0grp { -+ fsl,pins = < -+ /* DVI_DDC_SEL */ -+ MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000 -+ /* SB-FX6 Himax TS PENDOWN or SB-FX6m DVI HPD */ -+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x80000000 -+ >; -+ }; -+ }; -+}; -+ -+/* i2c1 */ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "disabled"; -+}; -+ -+/* mmc */ -+&usdhc3 { -+ pinctrl-names = "default", "state_100mhz", "state_200mhz"; -+ pinctrl-0 = <&pinctrl_usdhc3>; -+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>; -+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>; -+ cd-gpios = <&gpio7 1 0>; -+ no-1-8-v; -+ vmmc-supply = <®_3p3v>; -+ status = "disabled"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0048-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0048-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch deleted file mode 100644 index cfa79baf..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0048-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch +++ /dev/null @@ -1,243 +0,0 @@ -From a19b8fff6f84ecf1199be3b0a97325a0cab437c5 Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Mar 2015 09:59:54 +0200 -Subject: [PATCH 48/59] ARM: i.MX6: dts: refactor the sbc-fx6 target files - -In preparation for DL/S support addition, we move the common code -to dtsi files for better reuse of the same DT code. -Refactor the sbc-fx6 target files. - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: added a bit more descriptive commit message] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6q-sbc-fx6.dts | 42 ++-------------------------- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 47 -------------------------------- - arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi | 37 +++++++++++++++++++++++++ - arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi | 47 ++++++++++++++++++++++++++++++++ - 4 files changed, 86 insertions(+), 87 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6.dts b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -index 9d31d15..1234fb3 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6.dts -@@ -18,44 +18,6 @@ - #include "imx6qdl-sb-fx6.dtsi" - - / { -- model = "CompuLab CM-FX6 on SBC-FX6"; -- compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; -- -- backlight { -- compatible = "pwm-backlight"; -- pwms = <&pwm3 0 5000000>; -- brightness-levels = <0 4 8 16 32 64 128 255>; -- default-brightness-level = <7>; -- }; -- --}; -- --&i2c1 { -- status = "okay"; --}; -- --&usdhc3 { -- wp-gpios = <&gpio7 0 0>; -- status = "okay"; --}; -- --&pwm3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_pwm3_1>; -- status = "okay"; --}; -- --&mxcfb1 { -- status = "okay"; --}; -- --&mxcfb2 { -- mode_str ="KD050C-WVGA"; -- status = "okay"; --}; -- --&flexcan1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_flexcan1_1>; -- status = "okay"; -+ model = "CompuLab CM-FX6 on SBC-FX6"; -+ compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6q"; - }; -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index a98f1a2..19bf948 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -20,51 +20,4 @@ - / { - model = "CompuLab CM-FX6 on SBC-FX6m"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; -- -- iomux_uart2: pinmux@20E0924 { -- compatible = "pinctrl-single"; -- reg = <0x20E0000 0x924>; /* Single register */ -- #address-cells = <1>; -- #size-cells = <0>; -- pinctrl-single,register-width = <32>; -- pinctrl-single,function-mask = <0x4>; -- }; --}; -- --&iomuxc { -- imx6q-sbc-fx6m { -- /* pins for uart2 */ -- pinctrl_uart2: uart2grp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 -- MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 -- MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 -- MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 -- >; -- }; -- }; --}; -- --&i2c1 { -- status = "okay"; --}; -- --&usdhc3 { -- status = "okay"; --}; -- --/* rear serial console */ --&uart2 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart2>; -- fsl,uart-has-rtscts; -- status = "okay"; --}; -- --&mxcfb1 { -- status = "okay"; --}; -- --&mxcfb2 { -- status = "okay"; - }; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -index 4d030f9..129e88e 100644 ---- a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -@@ -12,6 +12,13 @@ - */ - - / { -+ backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&pwm3 0 5000000>; -+ brightness-levels = <0 4 8 16 32 64 128 255>; -+ default-brightness-level = <7>; -+ }; -+ - i2cmux { - compatible = "i2c-mux-gpio"; - #address-cells = <1>; -@@ -58,3 +65,33 @@ - - }; - }; -+ -+&i2c1 { -+ status = "okay"; -+}; -+ -+&usdhc3 { -+ wp-gpios = <&gpio7 0 0>; -+ status = "okay"; -+}; -+ -+&pwm3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pwm3_1>; -+ status = "okay"; -+}; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ mode_str ="KD050C-WVGA"; -+ status = "okay"; -+}; -+ -+&flexcan1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_flexcan1_1>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi -index 5e6c859..5394364 100644 ---- a/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6m.dtsi -@@ -12,6 +12,15 @@ - */ - - / { -+ iomux_uart2: pinmux@20E0924 { -+ compatible = "pinctrl-single"; -+ reg = <0x20E0000 0x924>; /* Single register */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ pinctrl-single,register-width = <32>; -+ pinctrl-single,function-mask = <0x4>; -+ }; -+ - eth@pcie { - compatible = "intel,i211"; - local-mac-address = [FF FF FF FF FF FF]; -@@ -64,3 +73,41 @@ - }; - }; - }; -+ -+&iomuxc { -+ imx6q-sbc-fx6m { -+ /* pins for uart2 */ -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1 -+ MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1 -+ >; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ status = "okay"; -+}; -+ -+&usdhc3 { -+ status = "okay"; -+}; -+ -+/* rear serial console */ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ fsl,uart-has-rtscts; -+ status = "okay"; -+}; -+ -+&mxcfb1 { -+ status = "okay"; -+}; -+ -+&mxcfb2 { -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0049-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0049-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch deleted file mode 100644 index 0fd11090..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0049-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch +++ /dev/null @@ -1,1182 +0,0 @@ -From ae49df750fb2a10cf04fca9854d5faa5f1a3d5a0 Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Mar 2015 10:12:35 +0200 -Subject: [PATCH 49/59] ARM: i.MX6: cm-fx6: separate DL and Quad stuff - -Break down the cm-fx6 file into two files in order to -separate DL and Quad supported features. - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: fix available memory size and -rename "dl" to "qdl"] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6q-cm-fx6.dtsi | 553 +------------------------------ - arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi | 573 +++++++++++++++++++++++++++++++++ - 2 files changed, 575 insertions(+), 551 deletions(-) - create mode 100644 arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi - -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -index f53d94e..3a10e5e 100644 ---- a/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dtsi -@@ -11,75 +11,14 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - --/ { -- memory { -- reg = <0x10000000 0x80000000>; -- }; -- -- leds { -- compatible = "gpio-leds"; -- heartbeat-led { -- label = "Heartbeat"; -- gpios = <&gpio2 31 0>; -- linux,default-trigger = "heartbeat"; -- }; -- }; -+#include "imx6qdl-cm-fx6.dtsi" - -+/ { - regulators { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <0>; - -- /* regulator for usb otg */ -- reg_usb_otg_vbus: usb_otg_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_otg_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio3 22 0>; -- enable-active-high; -- }; -- -- /* regulator1 for pcie power-on-gpio */ -- pcie_power_on_gpio: regulator-pcie-power-on-gpio { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-pcie-power-on-gpio"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio2 24 0>; -- enable-active-high; -- }; -- -- /* regulator for usb hub1 */ -- reg_usb_h1_vbus: usb_h1_vbus { -- compatible = "regulator-fixed"; -- regulator-name = "usb_h1_vbus"; -- regulator-min-microvolt = <5000000>; -- regulator-max-microvolt = <5000000>; -- gpio = <&gpio7 8 0>; -- enable-active-high; -- }; -- -- /* regulator1 for wifi/bt */ -- awnh387_npoweron: regulator-awnh387-npoweron { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-npoweron"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio7 12 0>; -- enable-active-high; -- }; -- -- /* regulator2 for wifi/bt */ -- awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -- compatible = "regulator-fixed"; -- regulator-name = "regulator-awnh387-wifi-nreset"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- gpio = <&gpio6 16 0>; -- startup-delay-us = <10000>; -- }; -- - reg_sata_ldo_en: sata_ldo_en { - compatible = "regulator-fixed"; - regulator-name = "cm_fx6_sata_ldo_en"; -@@ -146,499 +85,11 @@ - vin-supply = <®_sata_nstandby1>; - }; - -- tsc2046reg: tsc2046-reg { -- compatible = "regulator-fixed"; -- regulator-name = "tsc2046-reg"; -- regulator-min-microvolt = <3300000>; -- regulator-max-microvolt = <3300000>; -- }; -- -- }; -- -- aliases { -- mxcfb0 = &mxcfb1; -- mxcfb1 = &mxcfb2; -- }; -- -- sound { -- compatible = "fsl,imx-audio-wm8731"; -- model = "wm8731-audio"; -- ssi-controller = <&ssi2>; -- src-port = <2>; -- ext-port = <4>; -- audio-codec = <&codec>; -- audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; -- }; -- -- sound-hdmi { -- compatible = "fsl,imx-audio-hdmi"; -- model = "imx-audio-hdmi"; -- hdmi-controller = <&hdmi_audio>; -- }; -- -- sound-spdif { -- compatible = "fsl,imx-audio-spdif"; -- model = "imx-spdif"; -- spdif-controller = <&spdif>; -- spdif-out; -- spdif-in; -- }; -- -- mxcfb1: fb@0 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "hdmi"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- mxcfb2: fb@1 { -- compatible = "fsl,mxc_sdc_fb"; -- disp_dev = "lcd"; -- interface_pix_fmt = "RGB24"; -- mode_str ="1920x1080M@60"; -- default_bpp = <32>; -- int_clk = <0>; -- late_init = <0>; -- status = "disabled"; -- }; -- -- lcd@0 { -- compatible = "fsl,lcd"; -- ipu_id = <0>; -- disp_id = <0>; -- default_ifmt = "RGB24"; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ipu1_lcd>; -- status = "okay"; -- }; -- -- v4l2_out { -- compatible = "fsl,mxc_v4l2_output"; -- status = "okay"; -- }; --}; -- --&iomuxc { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hog>; -- -- hog { -- pinctrl_hog: hoggrp { -- fsl,pins = < -- /* SATA PWR */ -- MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 -- MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 -- MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 -- MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 -- /* SATA CTRL */ -- MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 -- MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 -- MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 -- MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -- /* POWER_BUTTON */ -- MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -- >; -- }; -- }; -- -- imx6q-cm-fx6 { -- /* pins for eth0 */ -- pinctrl_enet: enetgrp { -- fsl,pins = < -- MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -- MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -- MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -- MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -- MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -- MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -- MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -- MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -- MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -- MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -- MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -- MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -- MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -- MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -- MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -- >; -- }; -- -- pinctrl_ipu1_lcd: ipu1grp-lcd { -- fsl,pins = < -- MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38 -- MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x38 -- MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x38 -- MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x38 -- MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000028 -- MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x38 -- MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x38 -- MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x38 -- MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x38 -- MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x38 -- MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x38 -- MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x38 -- MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x38 -- MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x38 -- MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x38 -- MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x38 -- MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x38 -- MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x38 -- MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x38 -- MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x38 -- MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x38 -- MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x38 -- MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x38 -- MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x38 -- MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x38 -- MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x38 -- MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x38 -- MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x38 -- MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x38 -- >; -- }; -- -- /* pins for spi */ -- pinctrl_ecspi1: ecspi1grp { -- fsl,pins = < -- MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -- MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -- MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -- MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -- MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -- >; -- }; -- -- /* pins for nand */ -- pinctrl_gpmi_nand: gpminandgrp { -- fsl,pins = < -- MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -- MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -- MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -- MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -- MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -- MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -- MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -- MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -- MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -- MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -- MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -- MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -- MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -- MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -- MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -- MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -- MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -- >; -- }; -- -- /* pins for i2c2 */ -- pinctrl_i2c2: i2c2grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -- MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for i2c3 */ -- pinctrl_i2c3: i2c3grp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -- MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -- >; -- }; -- -- /* pins for console */ -- pinctrl_uart4: uart4grp { -- fsl,pins = < -- MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -- MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -- >; -- }; -- -- /* pins for usb hub1 */ -- pinctrl_usbh1: usbh1grp { -- fsl,pins = < -- MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -- >; -- }; -- -- /* pins for usb otg */ -- pinctrl_usbotg: usbotggrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -- MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -- >; -- }; -- -- /* pins for wifi/bt */ -- pinctrl_usdhc1: usdhc1grp { -- fsl,pins = < -- MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -- MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -- MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -- MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -- MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -- MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -- >; -- }; -- -- /* pins for wifi/bt */ -- pinctrl_mrvl1: mrvl1grp { -- fsl,pins = < -- /* WIFI_PWR_RST */ -- MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 -- MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 -- >; -- }; -- -- /* pins for tsc2046 pendown */ -- pinctrl_tsc2046: tsc2046grp { -- fsl,pins = < -- /* tsc2046 PENDOWN */ -- MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000 -- >; -- }; -- -- /* pins for pcie */ -- pinctrl_pcie: pciegrp { -- fsl,pins = < -- MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -- MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -- >; -- }; -- -- /* pins for spdif */ -- pinctrl_spdif: spdifgrp { -- fsl,pins = < -- MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -- MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -- >; -- }; -- -- /* pins for audmux */ -- pinctrl_audmux: audmuxgrp { -- fsl,pins = < -- MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -- MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -- MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -- MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -- MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -- /* master mode pin */ -- MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -- >; -- }; -- }; --}; -- --&cpu0 { -- operating-points = < -- /* kHz uV */ -- 996000 1250000 -- 852000 1250000 -- 792000 1150000 -- 396000 975000 -- >; -- fsl,soc-operating-points = < -- /* ARM kHz SOC-PU uV */ -- 996000 1250000 -- 852000 1250000 -- 792000 1175000 -- 396000 1175000 -- >; --}; -- --/* spi */ --&ecspi1 { -- fsl,spi-num-chipselects = <2>; -- cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_ecspi1>; -- status = "okay"; -- -- flash: m25p80@0 { -- #address-cells = <1>; -- #size-cells = <1>; -- compatible = "st,m25px16", "st,m25p"; -- spi-max-frequency = <20000000>; -- reg = <0>; -- -- partition@0 { -- label = "uboot"; -- reg = <0x0 0xc0000>; -- }; -- -- partition@c0000 { -- label = "uboot environment"; -- reg = <0xc0000 0x40000>; -- }; -- -- partition@100000 { -- label = "reserved"; -- reg = <0x100000 0x100000>; -- }; -- }; -- -- /* touch controller */ -- touch: tsc2046@1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_tsc2046>; -- -- compatible = "ti,tsc2046"; -- vcc-supply = <&tsc2046reg>; -- -- reg = <1>; /* CS1 */ -- spi-max-frequency = <1500000>; -- -- interrupt-parent = <&gpio2>; -- interrupts = <15 0>; -- pendown-gpio = <&gpio2 15 0>; -- -- ti,x-min = /bits/ 16 <0x0>; -- ti,x-max = /bits/ 16 <0x0fff>; -- ti,y-min = /bits/ 16 <0x0>; -- ti,y-max = /bits/ 16 <0x0fff>; -- -- ti,x-plate-ohms = /bits/ 16 <180>; -- ti,pressure-max = /bits/ 16 <255>; -- -- ti,debounce-max = /bits/ 16 <30>; -- ti,debounce-tol = /bits/ 16 <10>; -- ti,debounce-rep = /bits/ 16 <1>; -- -- linux,wakeup; -- }; --}; -- --/* eth0 */ --&fec { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_enet>; -- phy-mode = "rgmii"; -- status = "okay"; --}; -- --/* nand */ --&gpmi { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_gpmi_nand>; -- status = "okay"; -- -- partition@0 { -- label = "linux"; -- reg = <0x0 0x800000>; -- }; -- -- partition@800000 { -- label = "rootfs"; -- reg = < 0x800000 0x0>; -- }; --}; -- --/* i2c3 */ --&i2c3 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_i2c3>; -- status = "okay"; -- -- eeprom@50 { -- compatible = "at24,24c02"; -- reg = <0x50>; -- pagesize = <16>; - }; - -- codec: wm8731@1a { -- compatible = "wlf,wm8731"; -- reg = <0x1a>; -- clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; -- clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; -- AVDD-supply = <&pu_dummy>; -- HPVDD-supply = <&pu_dummy>; -- DCVDD-supply = <&pu_dummy>; -- DBVDD-supply = <&pu_dummy>; -- }; --}; -- --&pcie { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_pcie>; -- reset-gpio = <&gpio1 26 0>; -- vdd-supply = <&pcie_power_on_gpio>; -- status = "okay"; - }; - - /* sata */ - &sata { - status = "okay"; - }; -- --/* console */ --&uart4 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_uart4>; -- status = "okay"; --}; -- --/* usb otg */ --&usbotg { -- vbus-supply = <®_usb_otg_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbotg>; -- dr_mode = "otg"; -- status = "okay"; --}; -- --/* usb hub1 */ --&usbh1 { -- vbus-supply = <®_usb_h1_vbus>; -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usbh1>; -- status = "okay"; --}; -- --/* wifi/bt */ --&usdhc1 { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>; -- non-removable; -- vmmc-supply = <&awnh387_npoweron>; -- vmmc_aux-supply = <&awnh387_wifi_nreset>; -- status = "okay"; --}; -- --&ssi2 { -- fsl,mode = "i2s-master"; -- status = "okay"; --}; -- --&hdmi_core { -- ipu_id = <1>; -- disp_id = <0>; -- status = "okay"; --}; -- --&hdmi_video { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -- fsl,hdcp; -- status = "okay"; --}; -- --&hdmi_audio { -- status = "okay"; --}; -- --&spdif { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_spdif>; -- status = "okay"; --}; -- --&audmux { -- pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_audmux>; -- status = "okay"; --}; -diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -new file mode 100644 -index 0000000..31086b7 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -@@ -0,0 +1,573 @@ -+/* -+ * Copyright 2014 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/ { -+ memory { -+ reg = <0x10000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ heartbeat-led { -+ label = "Heartbeat"; -+ gpios = <&gpio2 31 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* regulator for usb otg */ -+ reg_usb_otg_vbus: usb_otg_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_otg_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio3 22 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator1 for pcie power-on-gpio */ -+ pcie_power_on_gpio: regulator-pcie-power-on-gpio { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-pcie-power-on-gpio"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 24 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator for usb hub1 */ -+ reg_usb_h1_vbus: usb_h1_vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "usb_h1_vbus"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ gpio = <&gpio7 8 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator1 for wifi/bt */ -+ awnh387_npoweron: regulator-awnh387-npoweron { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-npoweron"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio7 12 0>; -+ enable-active-high; -+ }; -+ -+ /* regulator2 for wifi/bt */ -+ awnh387_wifi_nreset: regulator-awnh387-wifi-nreset { -+ compatible = "regulator-fixed"; -+ regulator-name = "regulator-awnh387-wifi-nreset"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio6 16 0>; -+ startup-delay-us = <10000>; -+ }; -+ -+ tsc2046reg: tsc2046-reg { -+ compatible = "regulator-fixed"; -+ regulator-name = "tsc2046-reg"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ -+ }; -+ -+ aliases { -+ mxcfb0 = &mxcfb1; -+ mxcfb1 = &mxcfb2; -+ }; -+ -+ sound { -+ compatible = "fsl,imx-audio-wm8731"; -+ model = "wm8731-audio"; -+ ssi-controller = <&ssi2>; -+ src-port = <2>; -+ ext-port = <4>; -+ audio-codec = <&codec>; -+ audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN"; -+ }; -+ -+ sound-hdmi { -+ compatible = "fsl,imx-audio-hdmi"; -+ model = "imx-audio-hdmi"; -+ hdmi-controller = <&hdmi_audio>; -+ }; -+ -+ sound-spdif { -+ compatible = "fsl,imx-audio-spdif"; -+ model = "imx-spdif"; -+ spdif-controller = <&spdif>; -+ spdif-out; -+ spdif-in; -+ }; -+ -+ mxcfb1: fb@0 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "hdmi"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ mxcfb2: fb@1 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "lcd"; -+ interface_pix_fmt = "RGB24"; -+ mode_str ="1920x1080M@60"; -+ default_bpp = <32>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ lcd@0 { -+ compatible = "fsl,lcd"; -+ ipu_id = <0>; -+ disp_id = <0>; -+ default_ifmt = "RGB24"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ipu1_lcd>; -+ status = "okay"; -+ }; -+ -+ v4l2_out { -+ compatible = "fsl,mxc_v4l2_output"; -+ status = "okay"; -+ }; -+}; -+ -+&iomuxc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hog>; -+ -+ hog { -+ pinctrl_hog: hoggrp { -+ fsl,pins = < -+ /* SATA PWR */ -+ MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 -+ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 -+ MX6QDL_PAD_EIM_D20__GPIO3_IO20 0x80000000 -+ MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 -+ /* SATA CTRL */ -+ MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 -+ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x80000000 -+ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x80000000 -+ MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 -+ /* POWER_BUTTON */ -+ MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 -+ >; -+ }; -+ }; -+ -+ imx6q-cm-fx6 { -+ /* pins for eth0 */ -+ pinctrl_enet: enetgrp { -+ fsl,pins = < -+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -+ >; -+ }; -+ -+ pinctrl_ipu1_lcd: ipu1grp-lcd { -+ fsl,pins = < -+ MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x38 -+ MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 0x38 -+ MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 0x38 -+ MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 0x38 -+ MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000028 -+ MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 0x38 -+ MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01 0x38 -+ MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02 0x38 -+ MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03 0x38 -+ MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04 0x38 -+ MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05 0x38 -+ MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06 0x38 -+ MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07 0x38 -+ MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08 0x38 -+ MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09 0x38 -+ MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10 0x38 -+ MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11 0x38 -+ MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12 0x38 -+ MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13 0x38 -+ MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14 0x38 -+ MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 0x38 -+ MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16 0x38 -+ MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17 0x38 -+ MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18 0x38 -+ MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19 0x38 -+ MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20 0x38 -+ MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21 0x38 -+ MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22 0x38 -+ MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23 0x38 -+ >; -+ }; -+ -+ /* pins for spi */ -+ pinctrl_ecspi1: ecspi1grp { -+ fsl,pins = < -+ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 -+ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 -+ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 -+ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 -+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1 -+ >; -+ }; -+ -+ /* pins for nand */ -+ pinctrl_gpmi_nand: gpminandgrp { -+ fsl,pins = < -+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -+ >; -+ }; -+ -+ /* pins for i2c2 */ -+ pinctrl_i2c2: i2c2grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 -+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for i2c3 */ -+ pinctrl_i2c3: i2c3grp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 -+ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ /* pins for console */ -+ pinctrl_uart4: uart4grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -+ >; -+ }; -+ -+ /* pins for usb hub1 */ -+ pinctrl_usbh1: usbh1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000 -+ >; -+ }; -+ -+ /* pins for usb otg */ -+ pinctrl_usbotg: usbotggrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 -+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000 -+ >; -+ }; -+ -+ /* pins for wifi/bt */ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17071 -+ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10071 -+ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17071 -+ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17071 -+ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17071 -+ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17071 -+ >; -+ }; -+ -+ /* pins for wifi/bt */ -+ pinctrl_mrvl1: mrvl1grp { -+ fsl,pins = < -+ /* WIFI_PWR_RST */ -+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000 -+ MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x80000000 -+ >; -+ }; -+ -+ /* pins for tsc2046 pendown */ -+ pinctrl_tsc2046: tsc2046grp { -+ fsl,pins = < -+ /* tsc2046 PENDOWN */ -+ MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x80000000 -+ >; -+ }; -+ -+ /* pins for pcie */ -+ pinctrl_pcie: pciegrp { -+ fsl,pins = < -+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 -+ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000 -+ >; -+ }; -+ -+ /* pins for spdif */ -+ pinctrl_spdif: spdifgrp { -+ fsl,pins = < -+ MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0 -+ MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0 -+ >; -+ }; -+ -+ /* pins for audmux */ -+ pinctrl_audmux: audmuxgrp { -+ fsl,pins = < -+ MX6QDL_PAD_SD2_CMD__AUD4_RXC 0x17059 -+ MX6QDL_PAD_SD2_DAT0__AUD4_RXD 0x17059 -+ MX6QDL_PAD_SD2_DAT3__AUD4_TXC 0x17059 -+ MX6QDL_PAD_SD2_DAT2__AUD4_TXD 0x17059 -+ MX6QDL_PAD_SD2_DAT1__AUD4_TXFS 0x17059 -+ /* master mode pin */ -+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 -+ >; -+ }; -+ }; -+}; -+ -+&cpu0 { -+ operating-points = < -+ /* kHz uV */ -+ 996000 1250000 -+ 852000 1250000 -+ 792000 1150000 -+ 396000 975000 -+ >; -+ fsl,soc-operating-points = < -+ /* ARM kHz SOC-PU uV */ -+ 996000 1250000 -+ 852000 1250000 -+ 792000 1175000 -+ 396000 1175000 -+ >; -+}; -+ -+/* spi */ -+&ecspi1 { -+ fsl,spi-num-chipselects = <2>; -+ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_ecspi1>; -+ status = "okay"; -+ -+ flash: m25p80@0 { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ compatible = "st,m25px16", "st,m25p"; -+ spi-max-frequency = <20000000>; -+ reg = <0>; -+ -+ partition@0 { -+ label = "uboot"; -+ reg = <0x0 0xc0000>; -+ }; -+ -+ partition@c0000 { -+ label = "uboot environment"; -+ reg = <0xc0000 0x40000>; -+ }; -+ -+ partition@100000 { -+ label = "reserved"; -+ reg = <0x100000 0x100000>; -+ }; -+ }; -+ -+ /* touch controller */ -+ touch: tsc2046@1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_tsc2046>; -+ -+ compatible = "ti,tsc2046"; -+ vcc-supply = <&tsc2046reg>; -+ -+ reg = <1>; /* CS1 */ -+ spi-max-frequency = <1500000>; -+ -+ interrupt-parent = <&gpio2>; -+ interrupts = <15 0>; -+ pendown-gpio = <&gpio2 15 0>; -+ -+ ti,x-min = /bits/ 16 <0x0>; -+ ti,x-max = /bits/ 16 <0x0fff>; -+ ti,y-min = /bits/ 16 <0x0>; -+ ti,y-max = /bits/ 16 <0x0fff>; -+ -+ ti,x-plate-ohms = /bits/ 16 <180>; -+ ti,pressure-max = /bits/ 16 <255>; -+ -+ ti,debounce-max = /bits/ 16 <30>; -+ ti,debounce-tol = /bits/ 16 <10>; -+ ti,debounce-rep = /bits/ 16 <1>; -+ -+ linux,wakeup; -+ }; -+}; -+ -+/* eth0 */ -+&fec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+/* nand */ -+&gpmi { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_gpmi_nand>; -+ status = "okay"; -+ -+ partition@0 { -+ label = "linux"; -+ reg = <0x0 0x800000>; -+ }; -+ -+ partition@800000 { -+ label = "rootfs"; -+ reg = < 0x800000 0x0>; -+ }; -+}; -+ -+/* i2c3 */ -+&i2c3 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_i2c3>; -+ status = "okay"; -+ -+ eeprom@50 { -+ compatible = "at24,24c02"; -+ reg = <0x50>; -+ pagesize = <16>; -+ }; -+ -+ codec: wm8731@1a { -+ compatible = "wlf,wm8731"; -+ reg = <0x1a>; -+ clocks = <&clks 173>, <&clks 158>, <&clks 201>, <&clks 200>; -+ clock-names = "pll4", "imx-ssi.1", "cko", "cko2"; -+ AVDD-supply = <&pu_dummy>; -+ HPVDD-supply = <&pu_dummy>; -+ DCVDD-supply = <&pu_dummy>; -+ DBVDD-supply = <&pu_dummy>; -+ }; -+}; -+ -+&pcie { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_pcie>; -+ reset-gpio = <&gpio1 26 0>; -+ vdd-supply = <&pcie_power_on_gpio>; -+ status = "okay"; -+}; -+ -+/* console */ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart4>; -+ status = "okay"; -+}; -+ -+/* usb otg */ -+&usbotg { -+ vbus-supply = <®_usb_otg_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbotg>; -+ dr_mode = "otg"; -+ status = "okay"; -+}; -+ -+/* usb hub1 */ -+&usbh1 { -+ vbus-supply = <®_usb_h1_vbus>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usbh1>; -+ status = "okay"; -+}; -+ -+/* wifi/bt */ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_mrvl1>; -+ non-removable; -+ vmmc-supply = <&awnh387_npoweron>; -+ vmmc_aux-supply = <&awnh387_wifi_nreset>; -+ status = "okay"; -+}; -+ -+&ssi2 { -+ fsl,mode = "i2s-master"; -+ status = "okay"; -+}; -+ -+&hdmi_core { -+ ipu_id = <1>; -+ disp_id = <0>; -+ status = "okay"; -+}; -+ -+&hdmi_video { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -+ fsl,hdcp; -+ status = "okay"; -+}; -+ -+&hdmi_audio { -+ status = "okay"; -+}; -+ -+&spdif { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_spdif>; -+ status = "okay"; -+}; -+ -+&audmux { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_audmux>; -+ status = "okay"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0050-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0050-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch deleted file mode 100644 index 7c3da0ce..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0050-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 7f9cb189d94d973ce8f8211794fc3cb20171ed1a Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Mar 2015 10:15:50 +0200 -Subject: [PATCH 50/59] ARM: i.MX6: dts: add initial support for cm-fx6 DL/S - -Add initial support for cm-fx6 DL/S modules. - -This patch configures: -1) serial console -2) hearbeat led -3) FreeScale NIC -4) pcie -5) Intel I210 NIC -6) Analog audio wm8731-audio - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: fix dtsi file name as per previous patch] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6dl-cm-fx6.dts | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - create mode 100644 arch/arm/boot/dts/imx6dl-cm-fx6.dts - -diff --git a/arch/arm/boot/dts/imx6dl-cm-fx6.dts b/arch/arm/boot/dts/imx6dl-cm-fx6.dts -new file mode 100644 -index 0000000..d33d14c ---- /dev/null -+++ b/arch/arm/boot/dts/imx6dl-cm-fx6.dts -@@ -0,0 +1,21 @@ -+/* -+ * Copyright 2015 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/dts-v1/; -+#include "imx6dl.dtsi" -+#include "imx6qdl-cm-fx6.dtsi" -+ -+/ { -+ model = "CompuLab CM-FX6"; -+ compatible = "compulab,cm-fx6", "fsl,imx6dl"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0051-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0051-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch deleted file mode 100644 index d727345f..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0051-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d979cd240d5aae4344c705524d05dbe5792695b4 Mon Sep 17 00:00:00 2001 -From: Igor Grinberg -Date: Mon, 23 Mar 2015 10:21:26 +0200 -Subject: [PATCH 51/59] ARM: i.MX6: dts: add board files for sbc-fx6 DL/S - -Add board files for sbc-fx6 DL/S modules and Utilite Value. - -Signed-off-by: Valentin Raevsky -[grinberg@compulab.co.il: fix dtsi files names as per previous patches] -Signed-off-by: Igor Grinberg ---- - arch/arm/boot/dts/imx6dl-sbc-fx6.dts | 23 +++++++++++++++++++++++ - arch/arm/boot/dts/imx6dl-sbc-fx6m.dts | 23 +++++++++++++++++++++++ - 2 files changed, 46 insertions(+) - create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6.dts - create mode 100644 arch/arm/boot/dts/imx6dl-sbc-fx6m.dts - -diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6.dts -new file mode 100644 -index 0000000..723b654 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6dl-sbc-fx6.dts -@@ -0,0 +1,23 @@ -+/* -+* Copyright 2015 CompuLab Ltd. -+* -+* Author: Valentin Raevsky -+* -+* The code contained herein is licensed under the GNU General Public -+* License. You may obtain a copy of the GNU General Public License -+* Version 2 or later at the following locations: -+* -+* http://www.opensource.org/licenses/gpl-license.html -+* http://www.gnu.org/copyleft/gpl.html -+*/ -+ -+/dts-v1/; -+#include "imx6dl.dtsi" -+#include "imx6qdl-cm-fx6.dtsi" -+#include "imx6qdl-sb-fx6x.dtsi" -+#include "imx6qdl-sb-fx6.dtsi" -+ -+/ { -+ model = "CompuLab CM-FX6 on SBC-FX6"; -+ compatible = "compulab,cm-fx6", "compulab,sbc-fx6", "fsl,imx6dl"; -+}; -diff --git a/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts b/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts -new file mode 100644 -index 0000000..f66b177 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6dl-sbc-fx6m.dts -@@ -0,0 +1,23 @@ -+/* -+* Copyright 2015 CompuLab Ltd. -+* -+* Author: Valentin Raevsky -+* -+* The code contained herein is licensed under the GNU General Public -+* License. You may obtain a copy of the GNU General Public License -+* Version 2 or later at the following locations: -+* -+* http://www.opensource.org/licenses/gpl-license.html -+* http://www.gnu.org/copyleft/gpl.html -+*/ -+ -+/dts-v1/; -+#include "imx6dl.dtsi" -+#include "imx6qdl-cm-fx6.dtsi" -+#include "imx6qdl-sb-fx6x.dtsi" -+#include "imx6qdl-sb-fx6m.dtsi" -+ -+/ { -+ model = "CompuLab CM-FX6 on SBC-FX6m"; -+ compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6dl"; -+}; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0052-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0052-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch deleted file mode 100644 index e219233b..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0052-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 82c104998b3e0c8c55c3ddab4d41d8a012e40307 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 23 Mar 2015 11:47:54 +0200 -Subject: [PATCH 52/59] ARM: dts: cm-fx6: add build targets for cm-fx6 flavour - boards. - -Add build targets for cm-fx6 flavour boards. - -Signed-off-by: Valentin Raevsky - -Conflicts: - - arch/arm/boot/dts/Makefile - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/Makefile | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 699bf8f..0d6813e 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -153,6 +153,7 @@ dtb-$(CONFIG_ARCH_MXC) += \ - imx53-mba53.dtb \ - imx53-qsb.dtb \ - imx53-smd.dtb \ -+ imx6dl-cm-fx6.dtb \ - imx6dl-cubox-i.dtb \ - imx6dl-hummingboard.dtb \ - imx6dl-sabreauto.dtb \ -@@ -164,8 +165,11 @@ dtb-$(CONFIG_ARCH_MXC) += \ - imx6dl-sabresd-ldo.dtb \ - imx6dl-sabresd-pf200.dtb \ - imx6dl-sabresd-hdcp.dtb \ -+ imx6dl-sbc-fx6.dtb \ -+ imx6dl-sbc-fx6m.dtb \ - imx6dl-wandboard.dtb \ - imx6q-arm2.dtb \ -+ imx6q-cm-fx6.dtb \ - imx6q-cubox-i.dtb \ - imx6q-phytec-pbab01.dtb \ - imx6q-sabreauto.dtb \ -@@ -179,6 +183,8 @@ dtb-$(CONFIG_ARCH_MXC) += \ - imx6q-sabresd-uart.dtb \ - imx6q-sabresd-hdcp.dtb \ - imx6q-sabresd-ldo.dtb \ -+ imx6q-sbc-fx6.dtb \ -+ imx6q-sbc-fx6m.dtb \ - imx6q-sbc6x.dtb \ - imx6q-udoo.dtb \ - imx6q-wandboard.dtb \ --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0053-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0053-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch deleted file mode 100644 index 493463e3..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0053-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b59a9dad52a2c53b9921d2e8ecb98dd92ee0bd6b Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 25 Mar 2015 17:39:07 +0200 -Subject: [PATCH 53/59] ARM: dts: cm-fx6: change the hdmi_core ipu connection - -Change the hdmi_core ipu connection in order to -allow using the second IPU on quad SBC-FX6 boards with ldb devices. -SBC-FX6m boards still use an IPU per port. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6q-sbc-fx6m.dts | 6 ++++++ - arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi | 4 ++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -index 19bf948..dd8c1c0 100644 ---- a/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -+++ b/arch/arm/boot/dts/imx6q-sbc-fx6m.dts -@@ -21,3 +21,9 @@ - model = "CompuLab CM-FX6 on SBC-FX6m"; - compatible = "compulab,cm-fx6", "compulab,sbc-fx6m", "fsl,imx6q"; - }; -+ -+&hdmi_core { -+ ipu_id = <1>; -+ disp_id = <0>; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -index 31086b7..4f02e30 100644 ---- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -@@ -544,8 +544,8 @@ - }; - - &hdmi_core { -- ipu_id = <1>; -- disp_id = <0>; -+ ipu_id = <0>; -+ disp_id = <1>; - status = "okay"; - }; - --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0054-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0054-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch deleted file mode 100644 index 1ac22288..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0054-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch +++ /dev/null @@ -1,90 +0,0 @@ -From e8ab6bcb80954c1b7874c288375defe73242458d Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Wed, 25 Mar 2015 17:55:09 +0200 -Subject: [PATCH 54/59] ARM: i.MX6: dts: add ldb support for SBC-FX6 boards - -Add ldb support for SBC-FX6 boards. -LVDS1/0 ports of the SBC-FX6 are configured. -LVDS0 - IPU1:DISP0 - fb3 -LVDS1 - IPU1:DISP1 - fb5 - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi | 24 ++++++++++++++++++++++++ - arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi | 18 ++++++++++++++++++ - 2 files changed, 42 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -index 4f02e30..d17a4d1 100644 ---- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -@@ -92,6 +92,8 @@ - aliases { - mxcfb0 = &mxcfb1; - mxcfb1 = &mxcfb2; -+ mxcfb2 = &mxcfb3; -+ mxcfb3 = &mxcfb4; - }; - - sound { -@@ -140,6 +142,28 @@ - status = "disabled"; - }; - -+ mxcfb3: fb@2 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "ldb"; -+ interface_pix_fmt = "RGB666"; -+ mode_str ="1366x768M-18@60"; -+ default_bpp = <16>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ -+ mxcfb4: fb@3 { -+ compatible = "fsl,mxc_sdc_fb"; -+ disp_dev = "ldb"; -+ interface_pix_fmt = "RGB666"; -+ mode_str ="1280x800M-18@60"; -+ default_bpp = <16>; -+ int_clk = <0>; -+ late_init = <0>; -+ status = "disabled"; -+ }; -+ - lcd@0 { - compatible = "fsl,lcd"; - ipu_id = <0>; -diff --git a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -index 129e88e..85836d7 100644 ---- a/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-sb-fx6.dtsi -@@ -90,6 +90,24 @@ - status = "okay"; - }; - -+&mxcfb3 { -+ status = "okay"; -+}; -+ -+&mxcfb4 { -+ status = "okay"; -+}; -+ -+&ldb { -+ ipu_id = <1>; -+ disp_id = <0>; -+ ext_ref = <1>; -+ mode = "sep0"; -+ sec_ipu_id = <1>; -+ sec_disp_id = <1>; -+ status = "okay"; -+}; -+ - &flexcan1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_flexcan1_1>; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0055-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0055-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch deleted file mode 100644 index 7abbf958..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0055-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 8aa5e04aeeb40323b6f7615b500058c02115d17f Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Mon, 30 Mar 2015 11:29:07 +0300 -Subject: [PATCH 55/59] ARM: dts: cm-fx6: IOMUXC_GPR1/6/7 to set correct - values - -Add IOMUXC_GPR1/6/7 registers to the iomux default pinctrl group. -The IOMUXC_GPR1 register must have default value in order to let the SoC boot up after a warm reboot. -IOMUXC_GPR6/7 registers must have a correct value for the ipu QoS priority. -Otherwise the SoC reports on: -1) the interrupt that is a result of a time out error during a read access via DIx. -2) a new frame starts before the previous end-of-frame event. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -index d17a4d1..cff8d4e 100644 ---- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -@@ -11,6 +11,10 @@ - * http://www.gnu.org/copyleft/gpl.html - */ - -+#define MX6QDL_GPR1 0x04 0x04 0x000 0x0 0x0 -+#define MX6QDL_GPR6 0x18 0x18 0x000 0x0 0x0 -+#define MX6QDL_GPR7 0x1c 0x1c 0x000 0x0 0x0 -+ - / { - memory { - reg = <0x10000000 0x20000000>; -@@ -187,6 +191,10 @@ - hog { - pinctrl_hog: hoggrp { - fsl,pins = < -+ MX6QDL_GPR1 0x48400005 -+ /* ipu3 QoS */ -+ MX6QDL_GPR6 0x007f007f -+ MX6QDL_GPR7 0x007f007f - /* SATA PWR */ - MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x80000000 - MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x80000000 --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0056-i2c-fix-i2c_of-include.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0056-i2c-fix-i2c_of-include.patch deleted file mode 100644 index 9e78f041..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0056-i2c-fix-i2c_of-include.patch +++ /dev/null @@ -1,30 +0,0 @@ -From cdf878ae149301273767ed4f5052def1529c6cfa Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 9 Apr 2015 13:27:01 +0300 -Subject: [PATCH 56/59] i2c: fix i2c_of include - -The OF helpers have been moved to the core. -As a result the i2c_of.h does not exist anymore. -Fix i2c_of include with respect to the latest core implementation. - -Signed-off-by: Valentin Raevsky ---- - sound/soc/fsl/imx-wm8731.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sound/soc/fsl/imx-wm8731.c b/sound/soc/fsl/imx-wm8731.c -index c0833cf..7248042 100644 ---- a/sound/soc/fsl/imx-wm8731.c -+++ b/sound/soc/fsl/imx-wm8731.c -@@ -16,7 +16,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0057-ARM-dts-cm-fx6-fix-missing-defines.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0057-ARM-dts-cm-fx6-fix-missing-defines.patch deleted file mode 100644 index 30ed8bf9..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0057-ARM-dts-cm-fx6-fix-missing-defines.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 9388d08644b2397682db8d5cfce894e42e128999 Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 9 Apr 2015 13:30:42 +0300 -Subject: [PATCH 57/59] ARM: dts: cm-fx6: fix missing defines - -Fix missing defines that have been changed since 3.10.17 - -Signed-off-by: Valentin Raevsky ---- - arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi | 26 +++++++++++++++++++++++++- - 1 file changed, 25 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -index cff8d4e..e8f80bc 100644 ---- a/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -+++ b/arch/arm/boot/dts/imx6qdl-cm-fx6.dtsi -@@ -182,6 +182,10 @@ - compatible = "fsl,mxc_v4l2_output"; - status = "okay"; - }; -+ -+ pu_dummy: pudummy_reg { -+ compatible = "fsl,imx6-dummy-pureg"; /* only used in ldo-bypass */ -+ }; - }; - - &iomuxc { -@@ -397,6 +401,26 @@ - MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x17059 - >; - }; -+ -+ pinctrl_hdmi_hdcp: hdmihdcpgrp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL3__HDMI_TX_DDC_SCL 0x4001b8b1 -+ MX6QDL_PAD_KEY_ROW3__HDMI_TX_DDC_SDA 0x4001b8b1 -+ >; -+ }; -+ -+ pinctrl_pwm3_1: pwm3grp-1 { -+ fsl,pins = < -+ MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x1b0b1 -+ >; -+ }; -+ -+ pinctrl_flexcan1_1: flexcan1grp-1 { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x80000000 -+ MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX 0x80000000 -+ >; -+ }; - }; - }; - -@@ -583,7 +607,7 @@ - - &hdmi_video { - pinctrl-names = "default"; -- pinctrl-0 = <&pinctrl_hdmi_hdcp_1>; -+ pinctrl-0 = <&pinctrl_hdmi_hdcp>; - fsl,hdcp; - status = "okay"; - }; --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0058-imx6-hdmi-add-missing-definition.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0058-imx6-hdmi-add-missing-definition.patch deleted file mode 100644 index 9caceb04..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0058-imx6-hdmi-add-missing-definition.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3cb466070695ae9586aa52d668976c590f66008c Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 9 Apr 2015 14:01:38 +0300 -Subject: [PATCH 58/59] imx6: hdmi: add missing definition - -IMX6Q_GPR3_HDMI_MUX_CTL_SHIFT - -Signed-off-by: Valentin Raevsky ---- - include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h -index f6515b5..a5f996f 100644 ---- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h -+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h -@@ -215,6 +215,7 @@ - #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) - #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI0 (0x2 << 4) - #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI1 (0x3 << 4) -+#define IMX6Q_GPR3_HDMI_MUX_CTL_SHIFT 2 - #define IMX6Q_GPR3_HDMI_MUX_CTL_MASK (0x3 << 2) - #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI0 (0x0 << 2) - #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI1 (0x1 << 2) --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0059-ARM-i.MX6-cm-fx6-update-defconfig.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0059-ARM-i.MX6-cm-fx6-update-defconfig.patch deleted file mode 100644 index 80f9fe0e..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/0059-ARM-i.MX6-cm-fx6-update-defconfig.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 2a61f4133182c9c5b63ceb9f73cbc9bbc758c29a Mon Sep 17 00:00:00 2001 -From: Valentin Raevsky -Date: Thu, 16 Apr 2015 14:55:42 +0300 -Subject: [PATCH 59/59] ARM: i.MX6: cm-fx6: update defconfig - -Update the cm_fx6_defconfig with respect to -the kernel release after applying the 3.10.17 patches. - -Signed-off-by: Valentin Raevsky ---- - arch/arm/configs/cm_fx6_defconfig | 55 ++++++++++++++++--------------------- - 1 file changed, 24 insertions(+), 31 deletions(-) - -diff --git a/arch/arm/configs/cm_fx6_defconfig b/arch/arm/configs/cm_fx6_defconfig -index 7d753ae..a247438 100644 ---- a/arch/arm/configs/cm_fx6_defconfig -+++ b/arch/arm/configs/cm_fx6_defconfig -@@ -1,3 +1,4 @@ -+CONFIG_LOCALVERSION="-cm-fx6" - CONFIG_KERNEL_LZO=y - CONFIG_SYSVIPC=y - CONFIG_NO_HZ=y -@@ -25,8 +26,8 @@ CONFIG_MACH_EUKREA_CPUIMX51SD=y - CONFIG_SOC_IMX53=y - CONFIG_SOC_IMX6Q=y - CONFIG_SOC_IMX6SL=y -+CONFIG_SOC_IMX6SX=y - CONFIG_SOC_VF610=y --CONFIG_MACH_CM_FX6=y - # CONFIG_SWP_EMULATE is not set - CONFIG_PCI=y - CONFIG_PCI_IMX6=y -@@ -34,16 +35,16 @@ CONFIG_SMP=y - CONFIG_VMSPLIT_2G=y - CONFIG_PREEMPT=y - CONFIG_AEABI=y --# CONFIG_OABI_COMPAT is not set - CONFIG_HIGHMEM=y --CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -+CONFIG_CMA=y -+CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait" - CONFIG_CPU_FREQ=y - CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y - CONFIG_CPU_FREQ_GOV_POWERSAVE=y - CONFIG_CPU_FREQ_GOV_USERSPACE=y - CONFIG_CPU_FREQ_GOV_ONDEMAND=y - CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y --CONFIG_ARM_IMX6_CPUFREQ=y -+CONFIG_ARM_IMX6Q_CPUFREQ=y - CONFIG_CPU_IDLE=y - CONFIG_VFP=y - CONFIG_NEON=y -@@ -147,8 +148,6 @@ CONFIG_MAC80211=y - CONFIG_DEVTMPFS=y - CONFIG_DEVTMPFS_MOUNT=y - # CONFIG_STANDALONE is not set --CONFIG_CMA=y --CONFIG_CMA_SIZE_MBYTES=320 - CONFIG_IMX_WEIM=y - CONFIG_CONNECTOR=y - CONFIG_MTD=y -@@ -161,7 +160,6 @@ CONFIG_MTD_CFI_AMDSTD=y - CONFIG_MTD_CFI_STAA=y - CONFIG_MTD_PHYSMAP_OF=y - CONFIG_MTD_DATAFLASH=y --CONFIG_MTD_M25P80=y - CONFIG_MTD_SST25L=y - CONFIG_MTD_NAND=y - CONFIG_MTD_NAND_GPMI_NAND=y -@@ -221,7 +219,6 @@ CONFIG_INPUT_MISC=y - CONFIG_INPUT_MMA8450=y - CONFIG_INPUT_ISL29023=y - CONFIG_SERIO_SERPORT=m --CONFIG_VT_HW_CONSOLE_BINDING=y - # CONFIG_LEGACY_PTYS is not set - # CONFIG_DEVKMEM is not set - CONFIG_SERIAL_IMX=y -@@ -229,10 +226,8 @@ CONFIG_SERIAL_IMX_CONSOLE=y - CONFIG_SERIAL_FSL_LPUART=y - CONFIG_SERIAL_FSL_LPUART_CONSOLE=y - CONFIG_FSL_OTP=y --CONFIG_MXS_VIIM=y - # CONFIG_I2C_COMPAT is not set - CONFIG_I2C_CHARDEV=y --CONFIG_I2C_MUX=y - CONFIG_I2C_MUX_GPIO=y - CONFIG_I2C_MUX_PCA954x=y - # CONFIG_I2C_HELPER_AUTO is not set -@@ -259,24 +254,21 @@ CONFIG_MFD_MC13XXX_I2C=y - CONFIG_MFD_MAX17135=y - CONFIG_MFD_SI476X_CORE=y - CONFIG_REGULATOR=y --CONFIG_REGULATOR_DUMMY=y - CONFIG_REGULATOR_FIXED_VOLTAGE=y --CONFIG_REGULATOR_DA9052=y - CONFIG_REGULATOR_ANATOP=y -+CONFIG_REGULATOR_DA9052=y -+CONFIG_REGULATOR_MAX17135=y - CONFIG_REGULATOR_MC13783=y - CONFIG_REGULATOR_MC13892=y --CONFIG_REGULATOR_MAX17135=y - CONFIG_REGULATOR_PFUZE100=y - CONFIG_MEDIA_SUPPORT=y - CONFIG_MEDIA_CAMERA_SUPPORT=y - CONFIG_MEDIA_RADIO_SUPPORT=y --CONFIG_VIDEO_V4L2_INT_DEVICE=y - CONFIG_MEDIA_USB_SUPPORT=y - CONFIG_USB_VIDEO_CLASS=m - CONFIG_V4L_PLATFORM_DRIVERS=y - CONFIG_VIDEO_MXC_OUTPUT=y - CONFIG_VIDEO_MXC_CAPTURE=m --CONFIG_VIDEO_MXC_CSI_CAMERA=m - CONFIG_MXC_CAMERA_OV5640=m - CONFIG_MXC_CAMERA_OV5642=m - CONFIG_MXC_CAMERA_OV5640_MIPI=m -@@ -284,13 +276,13 @@ CONFIG_MXC_TVIN_ADV7180=m - CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m - CONFIG_VIDEO_MXC_IPU_OUTPUT=y - CONFIG_VIDEO_MXC_PXP_V4L2=y -+CONFIG_VIDEO_MXC_CSI_CAMERA=m - CONFIG_SOC_CAMERA=y - CONFIG_VIDEO_MX3=y - CONFIG_RADIO_SI476X=y - CONFIG_SOC_CAMERA_OV2640=y - CONFIG_DRM=y - CONFIG_DRM_VIVANTE=y --CONFIG_FB=y - CONFIG_FB_MXS=y - CONFIG_BACKLIGHT_LCD_SUPPORT=y - CONFIG_LCD_CLASS_DEVICE=y -@@ -307,25 +299,20 @@ CONFIG_FB_MXC_EINK_PANEL=y - CONFIG_FB_MXS_SII902X=y - CONFIG_HANNSTAR_CABC=y - CONFIG_FRAMEBUFFER_CONSOLE=y --CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y --CONFIG_FONTS=y --CONFIG_FONT_8x8=y --CONFIG_FONT_8x16=y - CONFIG_LOGO=y - CONFIG_SOUND=y - CONFIG_SND=y - CONFIG_SND_USB_AUDIO=m - CONFIG_SND_SOC=y -+CONFIG_SND_SOC_FSL_ASRC=y -+CONFIG_SND_SOC_FSL_SAI=y -+CONFIG_SND_SOC_FSL_SSI=y -+CONFIG_SND_SOC_FSL_ESAI=y -+CONFIG_SND_SOC_IMX_AUDMUX=y - CONFIG_SND_IMX_SOC=y --CONFIG_SND_SOC_EUKREA_TLV320=y --CONFIG_SND_SOC_IMX_CS42888=y --CONFIG_SND_SOC_IMX_WM8731=y --CONFIG_SND_SOC_IMX_WM8962=y --CONFIG_SND_SOC_IMX_SGTL5000=y - CONFIG_SND_SOC_IMX_SPDIF=y --CONFIG_SND_SOC_IMX_MC13783=y - CONFIG_SND_SOC_IMX_HDMI=y --CONFIG_SND_SOC_IMX_SI476X=y -+CONFIG_SND_SOC_CS42XX8_I2C=y - CONFIG_USB=y - CONFIG_USB_OTG=y - CONFIG_USB_EHCI_HCD=y -@@ -335,7 +322,6 @@ CONFIG_USB_STORAGE=y - CONFIG_USB_CHIPIDEA=y - CONFIG_USB_CHIPIDEA_UDC=y - CONFIG_USB_CHIPIDEA_HOST=y --CONFIG_USB_PHY=y - CONFIG_NOP_USB_XCEIV=y - CONFIG_USB_MXS_PHY=y - CONFIG_USB_GADGET=y -@@ -352,7 +338,6 @@ CONFIG_MMC_SDHCI_PLTFM=y - CONFIG_MMC_SDHCI_ESDHC_IMX=y - CONFIG_MXC_IPU=y - CONFIG_MXC_GPU_VIV=y --CONFIG_MXC_ASRC=y - CONFIG_MXC_MIPI_CSI2=y - CONFIG_MXC_MLB150=m - CONFIG_NEW_LEDS=y -@@ -371,7 +356,13 @@ CONFIG_MXC_PXP_V2=y - CONFIG_IMX_SDMA=y - CONFIG_MXS_DMA=y - CONFIG_STAGING=y --CONFIG_COMMON_CLK_DEBUG=y -+CONFIG_DRM_IMX=y -+CONFIG_DRM_IMX_FB_HELPER=y -+CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -+CONFIG_DRM_IMX_LDB=y -+CONFIG_DRM_IMX_IPUV3_CORE=y -+CONFIG_DRM_IMX_IPUV3=y -+CONFIG_DRM_IMX_HDMI=y - # CONFIG_IOMMU_SUPPORT is not set - CONFIG_PWM=y - CONFIG_PWM_IMX=y -@@ -416,7 +407,6 @@ CONFIG_MAGIC_SYSRQ=y - CONFIG_SECURITYFS=y - CONFIG_CRYPTO_USER=y - CONFIG_CRYPTO_TEST=m --CONFIG_CRYPTO_CCM=y - CONFIG_CRYPTO_GCM=y - CONFIG_CRYPTO_CBC=y - CONFIG_CRYPTO_CTS=y -@@ -448,3 +438,6 @@ CONFIG_CRC_CCITT=m - CONFIG_CRC_T10DIF=y - CONFIG_CRC7=m - CONFIG_LIBCRC32C=m -+CONFIG_FONTS=y -+CONFIG_FONT_8x8=y -+CONFIG_FONT_8x16=y --- -1.7.9.5 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/defconfig deleted file mode 100644 index a247438e..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab-3.14.28/defconfig +++ /dev/null @@ -1,443 +0,0 @@ -CONFIG_LOCALVERSION="-cm-fx6" -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_GPIO_PCA953X=y -CONFIG_ARCH_MXC=y -CONFIG_MXC_DEBUG_BOARD=y -CONFIG_MACH_IMX51_DT=y -CONFIG_MACH_EUKREA_CPUIMX51SD=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_VF610=y -# CONFIG_SWP_EMULATE is not set -CONFIG_PCI=y -CONFIG_PCI_IMX6=y -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_CMDLINE="console=ttymxc3,115200 root=/dev/mmcblk0p1 rootwait" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_NETFILTER=y -CONFIG_NETFILTER_DEBUG=y -CONFIG_NF_CONNTRACK=m -CONFIG_NF_CONNTRACK_FTP=m -CONFIG_NF_CONNTRACK_TFTP=m -CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_DSCP=m -CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m -CONFIG_NETFILTER_XT_TARGET_LED=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFLOG=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_TEE=m -CONFIG_NETFILTER_XT_TARGET_TRACE=m -CONFIG_NETFILTER_XT_TARGET_TCPMSS=m -CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m -CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -CONFIG_NETFILTER_XT_MATCH_CLUSTER=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_CPU=m -CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m -CONFIG_NETFILTER_XT_MATCH_DSCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_IPRANGE=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_OSF=m -CONFIG_NETFILTER_XT_MATCH_OWNER=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_RATEEST=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_RECENT=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -CONFIG_NETFILTER_XT_MATCH_TIME=m -CONFIG_NETFILTER_XT_MATCH_U32=m -CONFIG_NF_CONNTRACK_IPV4=m -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_RPFILTER=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_NF_NAT_IPV4=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m -CONFIG_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_BT=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -CONFIG_NETDEVICES=y -CONFIG_TUN=m -# CONFIG_NET_VENDOR_BROADCOM is not set -CONFIG_CS89x0=y -CONFIG_CS89x0_PLATFORM=y -# CONFIG_NET_VENDOR_FARADAY is not set -CONFIG_IGB=m -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_ATH_CARDS=y -CONFIG_ATH6KL=m -CONFIG_ATH6KL_SDIO=m -CONFIG_MWIFIEX=m -CONFIG_MWIFIEX_SDIO=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_ELAN=y -CONFIG_TOUCHSCREEN_MAX11801=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_INPUT_ISL29023=y -CONFIG_SERIO_SERPORT=m -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX_GPIO=y -CONFIG_I2C_MUX_PCA954x=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_SUPPLY=y -CONFIG_SABRESD_MAX8903=y -CONFIG_IMX6_USB_CHARGER=y -CONFIG_SENSORS_MAX17135=y -CONFIG_SENSORS_MAG3110=y -CONFIG_THERMAL=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_MFD_MAX17135=y -CONFIG_MFD_SI476X_CORE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_MAX17135=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_SOC_CAMERA=y -CONFIG_VIDEO_MX3=y -CONFIG_RADIO_SI476X=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_HDMI=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_FB_MXS_SII902X=y -CONFIG_HANNSTAR_CABC=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_SOC_FSL_ASRC=y -CONFIG_SND_SOC_FSL_SAI=y -CONFIG_SND_SOC_FSL_SSI=y -CONFIG_SND_SOC_FSL_ESAI=y -CONFIG_SND_SOC_IMX_AUDMUX=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_SND_SOC_CS42XX8_I2C=y -CONFIG_USB=y -CONFIG_USB_OTG=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_FSL_USB2=y -CONFIG_USB_ZERO=m -CONFIG_USB_AUDIO=m -CONFIG_USB_ETH=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_GPU_VIV=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_MLB150=m -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_EM3027=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_MXC_PXP_V2=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_DRM_IMX=y -CONFIG_DRM_IMX_FB_HELPER=y -CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -CONFIG_DRM_IMX_LDB=y -CONFIG_DRM_IMX_IPUV3_CORE=y -CONFIG_DRM_IMX_IPUV3=y -CONFIG_DRM_IMX_HDMI=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_GCM=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_TWOFISH=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab_3.14.28.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab_3.14.28.bb deleted file mode 100644 index 013b7969..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-compulab_3.14.28.bb +++ /dev/null @@ -1,74 +0,0 @@ -require recipes-kernel/linux/linux-imx.inc - -SUMMARY = "CompuLab 3.14.28 kernel" -DESCRIPTION = "Linux kernel for CompuLab cm-fx6 boards." - -DEPENDS += "lzop-native bc-native" - -SRCBRANCH = "imx_3.14.28_1.0.0_ga" -SRCREV = "91cf351a2afc17ac4a260e4d2ad1e32d00925a1b" -LOCALVERSION = "-cm-fx6" - -SRC_URI += "file://defconfig \ - file://0001-ARM-i.MX6-dts-Add-initial-support-for-cm-fx6.patch \ - file://0002-ARM-i.MX6-cm-fx6-Add-defconfig.patch \ - file://0003-igb-Enable-random-mac-address.patch \ - file://0004-ARM-i.MX6-cm-fx6-update-defconfig.patch \ - file://0005-ARM-i.MX6-dts-add-HDMI-and-DVI-support.patch \ - file://0006-ARM-i.MX6-dts-add-HDMI-Audio-support.patch \ - file://0007-ARM-i.MX6-dts-add-SPDIF-support.patch \ - file://0008-ARM-i.MX6-dts-add-Power-Button.patch \ - file://0009-ARM-i.MX6-dts-Enable-uart2-as-a-serial-console.patch \ - file://0010-ARM-i.MX6-dts-add-pcie-power-reset-gpio-definition.patch \ - file://0011-ARM-i.MX6-dts-add-onboard-SSD-pin-configuration.patch \ - file://0012-ARM-i.MX6-dts-add-onboard-SSD-power-up-sequence.patch \ - file://0013-ARM-i.MX6-dts-add-audio-mux-pinmux-configuration.patch \ - file://0014-ARM-i.MX6-dts-add-analog-audio-support.patch \ - file://0015-ARM-i.MX6-ASoC-add-imx-wm8731-machine-driver.patch \ - file://0016-ARM-i.MX6-ASoC-add-imx-wm8731-master-mode-support.patch \ - file://0017-ARM-i.MX6-dts-enable-v4l2-output.patch \ - file://0018-ARM-i.MX6-dts-some-small-changes-in-the-dts-file.patch \ - file://0019-igb-Define-the-device-mac-address-in-device-tree.patch \ - file://0020-ARM-i.MX6-cm-fx6-update-defconfig.patch \ - file://0021-ARM-i.MX6-dts-refactoring-the-cm-fx6-device-tree-fil.patch \ - file://0022-ARM-i.MX6-dts-refactoring-of-the-cm-fx6-device-tree-.patch \ - file://0023-ARM-i.MX6-dts-pcie-power-on-gpio-to-a-fixed-regulato.patch \ - file://0024-ARM-i.MX6-dts-add-i2c1-status-okay.patch \ - file://0025-ARM-i.MX6-dts-add-local-mac-address-field-for-fec.patch \ - file://0026-ARM-mxs-change-usb-phy-test-clock-gating.patch \ - file://0027-ARM-i.MX6-dts-fix-the-cm-fx6-operation-points.patch \ - file://0028-ARM-i.MX6-ASoC-fix-build-warnings-and-update-include.patch \ - file://0029-ARM-i.MX6-dts-change-issd-gpio-order.patch \ - file://0030-ARM-i.MX6-dts-add-missing-WiFi-BT-pinmuxes.patch \ - file://0031-ARM-i.MX6-cm-fx6-enable-i2cmux-in-defconfig.patch \ - file://0032-ARM-i.MX6-sb-fx6m-Fix-uart1-rts-cts-flow-control.patch \ - file://0033-ARM-i.MX6-dts-add-i2cmux-support-for-SBC-FX6-boards.patch \ - file://0034-ARM-i.MX6-dts-add-dvi-edid-GPIOs.patch \ - file://0035-video-mxc-IPUv3-fb-restore-sync-bits.patch \ - file://0036-ARM-i.MX6-dts-add-backlight-support-for-SBC-FX6-boar.patch \ - file://0037-ARM-i.MX6-dts-rearrangement-of-the-frame-buffers-def.patch \ - file://0038-ARM-i.MX6-iomux-raise-DSE-for-display-signals.patch \ - file://0039-ARM-i.MX6-cm-fx6-add-video-mode-for-KD050C-WVGA.patch \ - file://0040-ARM-i.MX6-cm-fx6-refactor-the-cm-fx6-iomux.patch \ - file://0041-ARM-i.MX6-dts-gpmi-separate-kernel-and-rootfs.patch \ - file://0042-ARM-dts-cm-fx6-enable-can-bus.patch \ - file://0043-ARM-dts-cm-fx6-add-tsc2046-touchscreen-support.patch \ - file://0044-ARM-i.MX6-sb-fx6x-refactoring-of-the-usdhc3-definiti.patch \ - file://0045-ARM-i.MX6-cm-fx6-fix-up-incorrect-compatibilities.patch \ - file://0046-ARM-i.MX6-dts-fix-include-file-order.patch \ - file://0047-ARM-i.MX6-dts-rename-the-sb-fx6-board-files.patch \ - file://0048-ARM-i.MX6-dts-refactor-the-sbc-fx6-target-files.patch \ - file://0049-ARM-i.MX6-cm-fx6-separate-DL-and-Quad-stuff.patch \ - file://0050-ARM-i.MX6-dts-add-initial-support-for-cm-fx6-DL-S.patch \ - file://0051-ARM-i.MX6-dts-add-board-files-for-sbc-fx6-DL-S.patch \ - file://0052-ARM-dts-cm-fx6-add-build-targets-for-cm-fx6-flavour-.patch \ - file://0053-ARM-dts-cm-fx6-change-the-hdmi_core-ipu-connection.patch \ - file://0054-ARM-i.MX6-dts-add-ldb-support-for-SBC-FX6-boards.patch \ - file://0055-ARM-dts-cm-fx6-IOMUXC_GPR1-6-7-to-set-correct-values.patch \ - file://0056-i2c-fix-i2c_of-include.patch \ - file://0057-ARM-dts-cm-fx6-fix-missing-defines.patch \ - file://0058-imx6-hdmi-add-missing-definition.patch \ - file://0059-ARM-i.MX6-cm-fx6-update-defconfig.patch \ -" - -COMPATIBLE_MACHINE = "(cm-fx6)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx.inc b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx.inc deleted file mode 100644 index 8d135f01..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx.inc +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2013 Marek Vasut -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "DENX mainline based Linux kernel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -DEPENDS += "lzop-native" -PROVIDES = "virtual/kernel linux-mainline" - -inherit kernel - -require recipes-kernel/linux/linux-imx.inc - -# Avoid imx-test installation hacks -IMX_TEST_SUPPORT = "n" - -SRCBRANCH ?= "master" -SRC_URI = "git://git.denx.de/linux-denx.git;branch=${SRCBRANCH} \ - file://defconfig" - -LOCALVERSION = "-master" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx/m53evk/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx/m53evk/defconfig deleted file mode 100644 index 23b29af6..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx/m53evk/defconfig +++ /dev/null @@ -1,290 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_KERNEL_LZMA=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_EXPERT=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG 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_PCM043=y -CONFIG_MACH_MX35_3DS=y -CONFIG_MACH_VPR200=y -CONFIG_MACH_IMX51_DT=y -CONFIG_MACH_MX51_BABBAGE=y -CONFIG_MACH_EUKREA_CPUIMX51SD=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_CAN=y -# CONFIG_CAN_BCM is not set -# CONFIG_CAN_GW is not set -CONFIG_CAN_FLEXCAN=y -# CONFIG_WIRELESS is not set -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_PATA_IMX=y -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_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_AT803X_PHY=y -CONFIG_AMD_PHY=y -CONFIG_MARVELL_PHY=y -CONFIG_DAVICOM_PHY=y -CONFIG_QSEMI_PHY=y -CONFIG_LXT_PHY=y -CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y -CONFIG_BROADCOM_PHY=y -CONFIG_BCM87XX_PHY=y -CONFIG_ICPLUS_PHY=y -CONFIG_REALTEK_PHY=y -CONFIG_NATIONAL_PHY=y -CONFIG_STE10XP=y -CONFIG_LSI_ET1011C_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_SERIO_SERPORT=m -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_MXC_RNGA=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_MC9S08DZ60=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_STMPE=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_SOC_CAMERA=y -CONFIG_VIDEO_MX3=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_LOAD_EDID_FIRMWARE=y -CONFIG_OF_VIDEOMODE=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_SEQUENCER=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_PHYCORE_AC97=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_STORAGE=y -CONFIG_USB_MXS_PHY=y -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_M41T80=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_DRM_IMX=y -CONFIG_DRM_IMX_FB_HELPER=y -CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -CONFIG_DRM_IMX_IPUV3_CORE=y -CONFIG_DRM_IMX_IPUV3=y -CONFIG_COMMON_CLK_DEBUG=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CONFIGFS_FS=m -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_SECURITYFS=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx_3.9.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx_3.9.bb deleted file mode 100644 index a5328671..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-denx_3.9.bb +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (C) 2013 Marek Vasut -# Released under the MIT license (see COPYING.MIT for the terms) - -include linux-denx.inc - -# m53evk -SRCREV_m53evk = "7c75b82904fa555ce7988b97619b85a436a8ed12" -SRCBRANCH_m53evk = "m53evk-rel-2013-05-02-v3.9" - -COMPATIBLE_MACHINE = "(m53evk)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19.bbappend new file mode 100644 index 00000000..5621c499 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_imx6sl-warp = "(.)" +COMPATIBLE_MACHINE_imx6dl-riotboard = "(.)" + +SRC_URI_append_imx6qdl-variscite-som_use-mainline-bsp = " \ + file://imx6qdl-var-som.dtsi \ + file://imx6q-var-som-vsc.dts \ +" + +SRC_URI_append_ccimx6ul = " \ + file://0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch \ + file://0002-cpufreq-imx6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch \ + file://0003-ARM-dts-imx6ul-use-nvmem-cells-for-cpu-speed-grading.patch \ +" + +do_configure_prepend_imx6qdl-variscite-som() { + cp ${WORKDIR}/imx6*-var*.dts* ${S}/arch/arm/boot/dts +} diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch new file mode 100644 index 00000000..c2b81030 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch @@ -0,0 +1,552 @@ +From: Alex Gonzalez +Date: Fri, 24 Aug 2018 18:53:40 +0200 +Subject: [PATCH] MLK-11719-4: mtd: gpmi: change the BCH layout setting for + large oob NAND +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The cod change updated the NAND driver BCH ECC layout algorithm to +support large oob size NAND chips(oob > 1024 bytes) and proposed a new +way to set ECC layout. + +Current implementation requires each chunk size larger than oob size so +the bad block marker (BBM) can be guaranteed located in data chunk. The +ECC layout always using the unbalanced layout(Ecc for both meta and +Data0 chunk), but for the NAND chips with oob larger than 1k, the driver +cannot support because BCH doesn’t support GF 15 for 2K chunk. + +The change keeps the data chunk no larger than 1k and adjust the ECC +strength or ECC layout to locate the BBM in data chunk. General idea for +large oob NAND chips is + +1.Try all ECC strength from the minimum value required by NAND spec to +the maximum one that works, any ECC makes the BBM locate in data chunk +can be chosen. + +2.If none of them works, using separate ECC for meta, which will add one +extra ecc with the same ECC strength as other data chunks. This extra +ECC can guarantee BBM located in data chunk, of course, we need to check +if oob can afford it. + +Previous code has two methods for ECC layout setting, the +legacy_set_geometry and set_geometry_by_ecc_info, the difference +between these two methods is, legacy_set_geometry set the chunk size +larger chan oob size and then set the maximum ECC strength that oob can +afford. While the set_geometry_by_ecc_info set chunk size and ECC +strength according to NAND spec. It has been proved that the first +method cannot provide safe ECC strength for some modern NAND chips, so +in current code, + +1. Driver read NAND parameters first and then chose the proper ECC +layout setting method. + +2. If the oob is large or NAND required data chunk larger than oob size, +chose set_geometry_for_large_oob, otherwise use set_geometry_by_ecc_info + +3. legacy_set_geometry only used for some NAND chips does not contains +necessary information. So this is only a backup plan, it is NOT +recommended to use these NAND chips. + +Signed-off-by: Han Xu +(cherry picked from commit 78e8beff734adb72185405ae2cb55e0097eb96cb) +Signed-off-by: Alex Gonzalez +--- + drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 16 +- + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 269 ++++++++++++++++++++++++----- + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 12 +- + 3 files changed, 248 insertions(+), 49 deletions(-) + +diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c +index 88ea2203e263..a4cd9523e220 100644 +--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c ++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c +@@ -212,7 +212,8 @@ void gpmi_dump_info(struct gpmi_nand_data *this) + "ECC Strength : %u\n" + "Page Size in Bytes : %u\n" + "Metadata Size in Bytes : %u\n" +- "ECC Chunk Size in Bytes: %u\n" ++ "ECC Chunk0 Size in Bytes: %u\n" ++ "ECC Chunkn Size in Bytes: %u\n" + "ECC Chunk Count : %u\n" + "Payload Size in Bytes : %u\n" + "Auxiliary Size in Bytes: %u\n" +@@ -223,7 +224,8 @@ void gpmi_dump_info(struct gpmi_nand_data *this) + geo->ecc_strength, + geo->page_size, + geo->metadata_size, +- geo->ecc_chunk_size, ++ geo->ecc_chunk0_size, ++ geo->ecc_chunkn_size, + geo->ecc_chunk_count, + geo->payload_size, + geo->auxiliary_size, +@@ -238,7 +240,8 @@ int bch_set_geometry(struct gpmi_nand_data *this) + struct resources *r = &this->resources; + struct bch_geometry *bch_geo = &this->bch_geometry; + unsigned int block_count; +- unsigned int block_size; ++ unsigned int block0_size; ++ unsigned int blockn_size; + unsigned int metadata_size; + unsigned int ecc_strength; + unsigned int page_size; +@@ -250,7 +253,8 @@ int bch_set_geometry(struct gpmi_nand_data *this) + return ret; + + block_count = bch_geo->ecc_chunk_count - 1; +- block_size = bch_geo->ecc_chunk_size; ++ block0_size = bch_geo->ecc_chunk0_size; ++ blockn_size = bch_geo->ecc_chunkn_size; + metadata_size = bch_geo->metadata_size; + ecc_strength = bch_geo->ecc_strength >> 1; + page_size = bch_geo->page_size; +@@ -277,13 +281,13 @@ int bch_set_geometry(struct gpmi_nand_data *this) + | BF_BCH_FLASH0LAYOUT0_META_SIZE(metadata_size) + | BF_BCH_FLASH0LAYOUT0_ECC0(ecc_strength, this) + | BF_BCH_FLASH0LAYOUT0_GF(gf_len, this) +- | BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(block_size, this), ++ | BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(block0_size, this), + r->bch_regs + HW_BCH_FLASH0LAYOUT0); + + writel(BF_BCH_FLASH0LAYOUT1_PAGE_SIZE(page_size) + | BF_BCH_FLASH0LAYOUT1_ECCN(ecc_strength, this) + | BF_BCH_FLASH0LAYOUT1_GF(gf_len, this) +- | BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(block_size, this), ++ | BF_BCH_FLASH0LAYOUT1_DATAN_SIZE(blockn_size, this), + r->bch_regs + HW_BCH_FLASH0LAYOUT1); + + /* Set *all* chip selects to use layout 0. */ +diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +index 1c1ebbc82824..bc4a364e5696 100644 +--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c ++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +@@ -179,6 +179,36 @@ static inline bool gpmi_check_ecc(struct gpmi_nand_data *this) + return geo->ecc_strength <= this->devdata->bch_max_ecc_strength; + } + ++static inline bool bbm_in_data_chunk(struct gpmi_nand_data *this, ++ unsigned int *chunk_num) ++{ ++ struct bch_geometry *geo = &this->bch_geometry; ++ struct mtd_info *mtd = &this->nand.mtd; ++ unsigned int i, j; ++ ++ if (geo->ecc_chunk0_size != geo->ecc_chunkn_size) { ++ dev_err(this->dev, "The size of chunk0 must equal to chunkn\n"); ++ return false; ++ } ++ ++ i = (mtd->writesize * 8 - geo->metadata_size * 8) / ++ (geo->gf_len * geo->ecc_strength + ++ geo->ecc_chunkn_size * 8); ++ ++ j = (mtd->writesize * 8 - geo->metadata_size * 8) - ++ (geo->gf_len * geo->ecc_strength + ++ geo->ecc_chunkn_size * 8) * i; ++ ++ if (j < geo->ecc_chunkn_size * 8) { ++ *chunk_num = i+1; ++ dev_dbg(this->dev, "Set ecc to %d and bbm in chunk %d\n", ++ geo->ecc_strength, *chunk_num); ++ return true; ++ } ++ ++ return false; ++} ++ + /* + * If we can get the ECC information from the nand chip, we do not + * need to calculate them ourselves. +@@ -207,13 +237,14 @@ static int set_geometry_by_ecc_info(struct gpmi_nand_data *this, + chip->ecc_strength_ds, chip->ecc_step_ds); + return -EINVAL; + } +- geo->ecc_chunk_size = ecc_step; +- geo->ecc_strength = round_up(ecc_strength, 2); ++ geo->ecc_chunk0_size = chip->ecc_step_ds; ++ geo->ecc_chunkn_size = chip->ecc_step_ds; ++ geo->ecc_strength = round_up(chip->ecc_strength_ds, 2); + if (!gpmi_check_ecc(this)) + return -EINVAL; + + /* Keep the C >= O */ +- if (geo->ecc_chunk_size < mtd->oobsize) { ++ if (geo->ecc_chunkn_size < mtd->oobsize) { + dev_err(this->dev, + "unsupported nand chip. ecc size: %d, oob size : %d\n", + ecc_step, mtd->oobsize); +@@ -223,7 +254,7 @@ static int set_geometry_by_ecc_info(struct gpmi_nand_data *this, + /* The default value, see comment in the legacy_set_geometry(). */ + geo->metadata_size = 10; + +- geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; ++ geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunkn_size; + + /* + * Now, the NAND chip with 2K page(data chunk is 512byte) shows below: +@@ -295,6 +326,129 @@ static int set_geometry_by_ecc_info(struct gpmi_nand_data *this, + return 0; + } + ++static int set_geometry_for_large_oob(struct gpmi_nand_data *this) ++{ ++ struct bch_geometry *geo = &this->bch_geometry; ++ struct mtd_info *mtd = &this->nand.mtd; ++ struct nand_chip *chip = mtd->priv; ++ unsigned int block_mark_bit_offset; ++ unsigned int max_ecc; ++ unsigned int bbm_chunk; ++ unsigned int i; ++ ++ ++ /* sanity check for the minimum ecc nand required */ ++ if (!(chip->ecc_strength_ds > 0 && chip->ecc_step_ds > 0)) ++ return -EINVAL; ++ geo->ecc_strength = chip->ecc_strength_ds; ++ ++ /* check if platform can support this nand */ ++ if (!gpmi_check_ecc(this)) { ++ dev_err(this->dev, "unsupported NAND chip, minimum ecc required %d\n" ++ , geo->ecc_strength); ++ return -EINVAL; ++ } ++ ++ /* calculate the maximum ecc platform can support*/ ++ geo->metadata_size = 10; ++ geo->gf_len = 14; ++ geo->ecc_chunk0_size = 1024; ++ geo->ecc_chunkn_size = 1024; ++ geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunkn_size; ++ max_ecc = min(get_ecc_strength(this), ++ this->devdata->bch_max_ecc_strength); ++ ++ /* search a supported ecc strength that makes bbm */ ++ /* located in data chunk */ ++ geo->ecc_strength = chip->ecc_strength_ds; ++ while (!(geo->ecc_strength > max_ecc)) { ++ if (bbm_in_data_chunk(this, &bbm_chunk)) ++ goto geo_setting; ++ geo->ecc_strength += 2; ++ } ++ ++ /* if none of them works, keep using the minimum ecc */ ++ /* nand required but changing ecc page layout */ ++ geo->ecc_strength = chip->ecc_strength_ds; ++ /* add extra ecc for meta data */ ++ geo->ecc_chunk0_size = 0; ++ geo->ecc_chunk_count = (mtd->writesize / geo->ecc_chunkn_size) + 1; ++ geo->ecc_for_meta = 1; ++ /* check if oob can afford this extra ecc chunk */ ++ if (mtd->oobsize * 8 < geo->metadata_size * 8 + ++ geo->gf_len * geo->ecc_strength ++ * geo->ecc_chunk_count) { ++ dev_err(this->dev, "unsupported NAND chip with new layout\n"); ++ return -EINVAL; ++ } ++ ++ /* calculate in which chunk bbm located */ ++ bbm_chunk = (mtd->writesize * 8 - geo->metadata_size * 8 - ++ geo->gf_len * geo->ecc_strength) / ++ (geo->gf_len * geo->ecc_strength + ++ geo->ecc_chunkn_size * 8) + 1; ++ ++geo_setting: ++ ++ geo->page_size = mtd->writesize + mtd->oobsize; ++ geo->payload_size = mtd->writesize; ++ ++ /* ++ * The auxiliary buffer contains the metadata and the ECC status. The ++ * metadata is padded to the nearest 32-bit boundary. The ECC status ++ * contains one byte for every ECC chunk, and is also padded to the ++ * nearest 32-bit boundary. ++ */ ++ geo->auxiliary_status_offset = ALIGN(geo->metadata_size, 4); ++ geo->auxiliary_size = ALIGN(geo->metadata_size, 4) ++ + ALIGN(geo->ecc_chunk_count, 4); ++ ++ if (!this->swap_block_mark) ++ return 0; ++ ++ /* calculate the number of ecc chunk behind the bbm */ ++ i = (mtd->writesize / geo->ecc_chunkn_size) - bbm_chunk + 1; ++ ++ block_mark_bit_offset = mtd->writesize * 8 - ++ (geo->ecc_strength * geo->gf_len * (geo->ecc_chunk_count - i) ++ + geo->metadata_size * 8); ++ ++ geo->block_mark_byte_offset = block_mark_bit_offset / 8; ++ geo->block_mark_bit_offset = block_mark_bit_offset % 8; ++ ++ dev_dbg(this->dev, "BCH Geometry :\n" ++ "GF length : %u\n" ++ "ECC Strength : %u\n" ++ "Page Size in Bytes : %u\n" ++ "Metadata Size in Bytes : %u\n" ++ "ECC Chunk0 Size in Bytes: %u\n" ++ "ECC Chunkn Size in Bytes: %u\n" ++ "ECC Chunk Count : %u\n" ++ "Payload Size in Bytes : %u\n" ++ "Auxiliary Size in Bytes: %u\n" ++ "Auxiliary Status Offset: %u\n" ++ "Block Mark Byte Offset : %u\n" ++ "Block Mark Bit Offset : %u\n" ++ "Block Mark in chunk : %u\n" ++ "Ecc for Meta data : %u\n", ++ geo->gf_len, ++ geo->ecc_strength, ++ geo->page_size, ++ geo->metadata_size, ++ geo->ecc_chunk0_size, ++ geo->ecc_chunkn_size, ++ geo->ecc_chunk_count, ++ geo->payload_size, ++ geo->auxiliary_size, ++ geo->auxiliary_status_offset, ++ geo->block_mark_byte_offset, ++ geo->block_mark_bit_offset, ++ bbm_chunk, ++ geo->ecc_for_meta); ++ ++ return 0; ++} ++ + static int legacy_set_geometry(struct gpmi_nand_data *this) + { + struct bch_geometry *geo = &this->bch_geometry; +@@ -314,13 +468,15 @@ static int legacy_set_geometry(struct gpmi_nand_data *this) + geo->gf_len = 13; + + /* The default for chunk size. */ +- geo->ecc_chunk_size = 512; +- while (geo->ecc_chunk_size < mtd->oobsize) { +- geo->ecc_chunk_size *= 2; /* keep C >= O */ ++ geo->ecc_chunk0_size = 512; ++ geo->ecc_chunkn_size = 512; ++ while (geo->ecc_chunkn_size < mtd->oobsize) { ++ geo->ecc_chunk0_size *= 2; /* keep C >= O */ ++ geo->ecc_chunkn_size *= 2; /* keep C >= O */ + geo->gf_len = 14; + } + +- geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunk_size; ++ geo->ecc_chunk_count = mtd->writesize / geo->ecc_chunkn_size; + + /* We use the same ECC strength for all chunks. */ + geo->ecc_strength = get_ecc_strength(this); +@@ -409,22 +565,25 @@ static int legacy_set_geometry(struct gpmi_nand_data *this) + + int common_nfc_set_geometry(struct gpmi_nand_data *this) + { +- struct nand_chip *chip = &this->nand; ++ struct mtd_info *mtd = &this->nand.mtd; ++ struct nand_chip *chip = mtd_to_nand(mtd); + +- if (chip->ecc.strength > 0 && chip->ecc.size > 0) +- return set_geometry_by_ecc_info(this, chip->ecc.strength, +- chip->ecc.size); ++ if (chip->ecc_strength_ds > this->devdata->bch_max_ecc_strength) { ++ dev_err(this->dev, ++ "unsupported NAND chip, minimum ecc required %d\n" ++ , chip->ecc_strength_ds); ++ return -EINVAL; ++ } + +- if ((of_property_read_bool(this->dev->of_node, "fsl,use-minimum-ecc")) +- || legacy_set_geometry(this)) { +- if (!(chip->ecc_strength_ds > 0 && chip->ecc_step_ds > 0)) +- return -EINVAL; ++ if (!(chip->ecc_strength_ds > 0 && chip->ecc_step_ds > 0) && ++ !(mtd->oobsize > 1024)) ++ return legacy_set_geometry(this); + +- return set_geometry_by_ecc_info(this, chip->ecc_strength_ds, +- chip->ecc_step_ds); +- } ++ if (mtd->oobsize > 1024 || chip->ecc_step_ds < mtd->oobsize) ++ return set_geometry_for_large_oob(this); + +- return 0; ++ return set_geometry_by_ecc_info(this, chip->ecc_strength_ds, ++ chip->ecc_step_ds); + } + + struct dma_chan *get_dma_chan(struct gpmi_nand_data *this) +@@ -997,7 +1156,8 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip, + + /* Read ECC bytes into our internal raw_buffer */ + offset = nfc_geo->metadata_size * 8; +- offset += ((8 * nfc_geo->ecc_chunk_size) + eccbits) * (i + 1); ++ offset += ((8 * nfc_geo->ecc_chunkn_size) + eccbits) * ++ (i + 1); + offset -= eccbits; + bitoffset = offset % 8; + eccbytes = DIV_ROUND_UP(offset + eccbits, 8); +@@ -1034,19 +1194,19 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip, + if (i == 0) { + /* The first block includes metadata */ + flips = nand_check_erased_ecc_chunk( +- buf + i * nfc_geo->ecc_chunk_size, +- nfc_geo->ecc_chunk_size, +- eccbuf, eccbytes, +- this->auxiliary_virt, +- nfc_geo->metadata_size, +- nfc_geo->ecc_strength); ++ buf + i * nfc_geo->ecc_chunkn_size, ++ nfc_geo->ecc_chunkn_size, ++ eccbuf, eccbytes, ++ this->payload_virt, ++ nfc_geo->metadata_size, ++ nfc_geo->ecc_strength); + } else { + flips = nand_check_erased_ecc_chunk( +- buf + i * nfc_geo->ecc_chunk_size, +- nfc_geo->ecc_chunk_size, +- eccbuf, eccbytes, +- NULL, 0, +- nfc_geo->ecc_strength); ++ buf + i * nfc_geo->ecc_chunkn_size, ++ nfc_geo->ecc_chunkn_size, ++ eccbuf, eccbytes, ++ NULL, 0, ++ nfc_geo->ecc_strength); + } + + if (flips > 0) { +@@ -1134,9 +1294,24 @@ static int gpmi_ecc_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, + } + } + ++ /* ++ * if there is an ECC dedicate for meta: ++ * - need to add an extra ECC size when calculating col and page_size, ++ * if the meta size is NOT zero. ++ * ++ * - chunk0 size need to set to the same size as other chunks, ++ * if the meta size is zero. ++ */ ++ + meta = geo->metadata_size; + if (first) { +- col = meta + (size + ecc_parity_size) * first; ++ if (geo->ecc_for_meta) ++ col = meta + ecc_parity_size ++ + (size + ecc_parity_size) * first; ++ else ++ col = meta + (size + ecc_parity_size) * first; ++ ++ chip->cmdfunc(mtd, NAND_CMD_RNDOUT, col, -1); + meta = 0; + buf = buf + first * size; + } +@@ -1149,21 +1324,37 @@ static int gpmi_ecc_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, + + /* change the BCH registers and bch_geometry{} */ + n = last - first + 1; +- page_size = meta + (size + ecc_parity_size) * n; ++ ++ if (geo->ecc_for_meta && meta) ++ page_size = meta + ecc_parity_size ++ + (size + ecc_parity_size) * n; ++ else ++ page_size = meta + (size + ecc_parity_size) * n; + + r1_new &= ~(BM_BCH_FLASH0LAYOUT0_NBLOCKS | + BM_BCH_FLASH0LAYOUT0_META_SIZE); +- r1_new |= BF_BCH_FLASH0LAYOUT0_NBLOCKS(n - 1) ++ r1_new |= BF_BCH_FLASH0LAYOUT0_NBLOCKS( ++ (geo->ecc_for_meta && meta) ? n : n - 1) + | BF_BCH_FLASH0LAYOUT0_META_SIZE(meta); ++ ++ /* set chunk0 size if meta size is 0 */ ++ if (!meta) { ++ if (GPMI_IS_MX6(this)) ++ r1_new &= ~MX6Q_BM_BCH_FLASH0LAYOUT0_DATA0_SIZE; ++ else ++ r1_new &= ~BM_BCH_FLASH0LAYOUT0_DATA0_SIZE; ++ r1_new |= BF_BCH_FLASH0LAYOUT0_DATA0_SIZE(size, this); ++ } + writel(r1_new, bch_regs + HW_BCH_FLASH0LAYOUT0); + + r2_new &= ~BM_BCH_FLASH0LAYOUT1_PAGE_SIZE; + r2_new |= BF_BCH_FLASH0LAYOUT1_PAGE_SIZE(page_size); + writel(r2_new, bch_regs + HW_BCH_FLASH0LAYOUT1); + +- geo->ecc_chunk_count = n; ++ geo->ecc_chunk_count = (geo->ecc_for_meta && meta) ? n + 1 : n; + geo->payload_size = n * size; + geo->page_size = page_size; ++ geo->metadata_size = meta; + geo->auxiliary_status_offset = ALIGN(meta, 4); + + dev_dbg(this->dev, "page:%d(%d:%d)%d, chunk:(%d:%d), BCH PG size:%d\n", +@@ -1386,7 +1577,7 @@ static int gpmi_ecc_read_page_raw(struct mtd_info *mtd, + { + struct gpmi_nand_data *this = nand_get_controller_data(chip); + struct bch_geometry *nfc_geo = &this->bch_geometry; +- int eccsize = nfc_geo->ecc_chunk_size; ++ int eccsize = nfc_geo->ecc_chunkn_size; + int eccbits = nfc_geo->ecc_strength * nfc_geo->gf_len; + u8 *tmp_buf = this->raw_buffer; + size_t src_bit_off; +@@ -1471,7 +1662,7 @@ static int gpmi_ecc_write_page_raw(struct mtd_info *mtd, + { + struct gpmi_nand_data *this = nand_get_controller_data(chip); + struct bch_geometry *nfc_geo = &this->bch_geometry; +- int eccsize = nfc_geo->ecc_chunk_size; ++ int eccsize = nfc_geo->ecc_chunkn_size; + int eccbits = nfc_geo->ecc_strength * nfc_geo->gf_len; + u8 *tmp_buf = this->raw_buffer; + uint8_t *oob = chip->oob_poi; +@@ -1847,7 +2038,7 @@ static int gpmi_init_last(struct gpmi_nand_data *this) + ecc->read_oob_raw = gpmi_ecc_read_oob_raw; + ecc->write_oob_raw = gpmi_ecc_write_oob_raw; + ecc->mode = NAND_ECC_HW; +- ecc->size = bch_geo->ecc_chunk_size; ++ ecc->size = bch_geo->ecc_chunkn_size; + ecc->strength = bch_geo->ecc_strength; + mtd_set_ooblayout(mtd, &gpmi_ooblayout_ops); + +diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h +index 69cd0cbde4f2..ef4e57256d30 100644 +--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h ++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h +@@ -30,9 +30,9 @@ struct resources { + * @page_size: The size, in bytes, of a physical page, including + * both data and OOB. + * @metadata_size: The size, in bytes, of the metadata. +- * @ecc_chunk_size: The size, in bytes, of a single ECC chunk. Note +- * the first chunk in the page includes both data and +- * metadata, so it's a bit larger than this value. ++ * @ecc_chunk0_size: The size, in bytes, of a first ECC chunk. ++ * @ecc_chunkn_size: The size, in bytes, of a single ECC chunk after ++ * the first chunk in the page. + * @ecc_chunk_count: The number of ECC chunks in the page, + * @payload_size: The size, in bytes, of the payload buffer. + * @auxiliary_size: The size, in bytes, of the auxiliary buffer. +@@ -42,19 +42,23 @@ struct resources { + * which the underlying physical block mark appears. + * @block_mark_bit_offset: The bit offset into the ECC-based page view at + * which the underlying physical block mark appears. ++ * @ecc_for_meta: The flag to indicate if there is a dedicate ecc ++ * for meta. + */ + struct bch_geometry { + unsigned int gf_len; + unsigned int ecc_strength; + unsigned int page_size; + unsigned int metadata_size; +- unsigned int ecc_chunk_size; ++ unsigned int ecc_chunk0_size; ++ unsigned int ecc_chunkn_size; + unsigned int ecc_chunk_count; + unsigned int payload_size; + unsigned int auxiliary_size; + unsigned int auxiliary_status_offset; + unsigned int block_mark_byte_offset; + unsigned int block_mark_bit_offset; ++ unsigned int ecc_for_meta; /* ECC for meta data */ + }; + + /** diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0002-cpufreq-imx6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0002-cpufreq-imx6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch new file mode 100644 index 00000000..26f6ba89 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0002-cpufreq-imx6q-read-OCOTP-through-nvmem-for-imx6ul-im.patch @@ -0,0 +1,113 @@ +From: Anson Huang +Date: Mon, 8 Oct 2018 14:07:34 +0800 +Subject: [PATCH] cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull + +On i.MX6UL/i.MX6ULL, accessing OCOTP directly is wrong because +the ocotp clock needs to be enabled first. Add support for reading +OCOTP through the nvmem API, and keep the old method there to +support old dtb. + +Signed-off-by: Anson Huang +Acked-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +(cherry picked from commit 2733fb0d0699246711cf622e0e2faf02a05b69dc) +--- + drivers/cpufreq/imx6q-cpufreq.c | 52 +++++++++++++++++++++++++++-------------- + 1 file changed, 35 insertions(+), 17 deletions(-) + +diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c +index b2ff423ad7f8..8cfee0ab804b 100644 +--- a/drivers/cpufreq/imx6q-cpufreq.c ++++ b/drivers/cpufreq/imx6q-cpufreq.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -290,20 +291,32 @@ static void imx6q_opp_check_speed_grading(struct device *dev) + #define OCOTP_CFG3_6ULL_SPEED_792MHZ 0x2 + #define OCOTP_CFG3_6ULL_SPEED_900MHZ 0x3 + +-static void imx6ul_opp_check_speed_grading(struct device *dev) ++static int imx6ul_opp_check_speed_grading(struct device *dev) + { +- struct device_node *np; +- void __iomem *base; + u32 val; ++ int ret = 0; + +- np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp"); +- if (!np) +- return; ++ if (of_find_property(dev->of_node, "nvmem-cells", NULL)) { ++ ret = nvmem_cell_read_u32(dev, "speed_grade", &val); ++ if (ret) ++ return ret; ++ } else { ++ struct device_node *np; ++ void __iomem *base; ++ ++ np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp"); ++ if (!np) ++ return -ENOENT; ++ ++ base = of_iomap(np, 0); ++ of_node_put(np); ++ if (!base) { ++ dev_err(dev, "failed to map ocotp\n"); ++ return -EFAULT; ++ } + +- base = of_iomap(np, 0); +- if (!base) { +- dev_err(dev, "failed to map ocotp\n"); +- goto put_node; ++ val = readl_relaxed(base + OCOTP_CFG3); ++ iounmap(base); + } + + /* +@@ -314,7 +327,6 @@ static void imx6ul_opp_check_speed_grading(struct device *dev) + * 2b'11: 900000000Hz on i.MX6ULL only; + * We need to set the max speed of ARM according to fuse map. + */ +- val = readl_relaxed(base + OCOTP_CFG3); + val >>= OCOTP_CFG3_SPEED_SHIFT; + val &= 0x3; + +@@ -334,9 +346,7 @@ static void imx6ul_opp_check_speed_grading(struct device *dev) + dev_warn(dev, "failed to disable 900MHz OPP\n"); + } + +- iounmap(base); +-put_node: +- of_node_put(np); ++ return ret; + } + + static int imx6q_cpufreq_probe(struct platform_device *pdev) +@@ -394,10 +404,18 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) + } + + if (of_machine_is_compatible("fsl,imx6ul") || +- of_machine_is_compatible("fsl,imx6ull")) +- imx6ul_opp_check_speed_grading(cpu_dev); +- else ++ of_machine_is_compatible("fsl,imx6ull")) { ++ ret = imx6ul_opp_check_speed_grading(cpu_dev); ++ if (ret == -EPROBE_DEFER) ++ return ret; ++ if (ret) { ++ dev_err(cpu_dev, "failed to read ocotp: %d\n", ++ ret); ++ return ret; ++ } ++ } else { + imx6q_opp_check_speed_grading(cpu_dev); ++ } + + /* Because we have added the OPPs here, we must free them */ + free_opp = true; diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0003-ARM-dts-imx6ul-use-nvmem-cells-for-cpu-speed-grading.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0003-ARM-dts-imx6ul-use-nvmem-cells-for-cpu-speed-grading.patch new file mode 100644 index 00000000..e8c6d16a --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/ccimx6ul/0003-ARM-dts-imx6ul-use-nvmem-cells-for-cpu-speed-grading.patch @@ -0,0 +1,38 @@ +From: Anson Huang +Date: Fri, 14 Sep 2018 10:59:21 +0800 +Subject: [PATCH] ARM: dts: imx6ul: use nvmem-cells for cpu speed grading + +On i.MX6UL, accessing OCOTP directly is wrong because the ocotp clock +needs to be enabled first, so use the nvmem-cells binding instead. + +Signed-off-by: Anson Huang +Signed-off-by: Shawn Guo +(cherry picked from commit 92f0eb08c66a73594cf200e65689e767f7f0da5e) +--- + arch/arm/boot/dts/imx6ul.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts/imx6ul.dtsi +index 6dc0b569acdf..c670d8e4e0a9 100644 +--- a/arch/arm/boot/dts/imx6ul.dtsi ++++ b/arch/arm/boot/dts/imx6ul.dtsi +@@ -89,6 +89,8 @@ + "pll1_sys"; + arm-supply = <®_arm>; + soc-supply = <®_soc>; ++ nvmem-cells = <&cpu_speed_grade>; ++ nvmem-cell-names = "speed_grade"; + }; + }; + +@@ -932,6 +934,10 @@ + tempmon_temp_grade: temp-grade@20 { + reg = <0x20 4>; + }; ++ ++ cpu_speed_grade: speed-grade@10 { ++ reg = <0x10 4>; ++ }; + }; + + lcdif: lcdif@21c8000 { diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6q-var-som-vsc.dts b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6q-var-som-vsc.dts new file mode 100644 index 00000000..63be949e --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6q-var-som-vsc.dts @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Support for Variscite VAR-SOM-MX6 Starter Kit + * + * Copyright 2018 + * Author: Andreas Müller + */ + +/dts-v1/; + +#include "imx6q.dtsi" +#include "imx6qdl-var-som.dtsi" +#include + +/ { + model = "Variscite i.MX6 VAR-SOM-MX6"; + compatible = "variscite,var-som", "fsl,imx6q"; + + gpio-keys { /* OK */ + compatible = "gpio-keys"; + autorepeat; + + back { + gpios = <&gpio5 20 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "Key Back"; + linux,input-type = <1>; + debounce-interval = <100>; + wakeup-source; + }; + }; + + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "tlv320aic3106-audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sound_codec>; + simple-audio-card,frame-master = <&sound_codec>; + simple-audio-card,widgets = "Headphone", "Headphone Jack", + "Line", "Line In"; + simple-audio-card,routing = "Headphone Jack", "HPLOUT", + "Headphone Jack", "HPROUT", + "LINE1L", "Line In", + "LINE1R", "Line In"; + + sound_cpu: simple-audio-card,cpu { + sound-dai = <&ssi2>; + }; + + sound_codec: simple-audio-card,codec { + sound-dai = <&tlv320aic3106>; + clocks = <&clks IMX6QDL_CLK_CKO>; + }; + }; +}; + +&can1 { + status = "okay"; +}; + +&ecspi1 { + cs-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>, + <&gpio4 10 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&fec { /* OK */ + status = "okay"; +}; + +&hdmi { + status = "okay"; +}; + +&i2c3 { /* OK */ + status = "okay"; + rtc@0x68 { + compatible = "dallas,ds1337"; + reg = <0x68>; + }; +}; + +/*&ldb { + status = "okay"; + + lvds-channel@1 { + status = "okay"; + + port@4 { + reg = <4>; + + lvds1_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +};*/ + +&pwm2 { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart3 { + status = "okay"; +}; + +&usbh1 { + status = "okay"; +}; + +&usbotg { + status = "okay"; +}; + +&usdhc2 { /* OK */ + pinctrl-1 = <&pinctrl_usdhc2cdwp>; + cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio4 15 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&iomuxc { + pinctrl_gpio_keys: gpio_keysgrp { + fsl,pins = < + /* user button */ + MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20 0x17059 + >; + }; + + pinctrl_usdhc2cdwp: usdhc2cdwpgrp { + fsl,pins = < + /* SDMMC2 CD/WP */ + MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x80000000 + MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x80000000 + >; + }; +}; + + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6qdl-var-som.dtsi b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6qdl-var-som.dtsi new file mode 100644 index 00000000..47949d1c --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-lts-4.19/imx6qdl-var-som.dtsi @@ -0,0 +1,626 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Support for Variscite SOM Module + * + * Copyright 2018 + * Author: Andreas Müller + * Based on imx6qdl-var-dart.dtsi + */ + +#include +#include + +/ { + memory@10000000 { + reg = <0x10000000 0x40000000>; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + reg_wl18xx_vmmc: regulator-wl18xx { + compatible = "regulator-fixed"; + regulator-name = "vwl1807"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <70000>; + }; + + reg_usb_h1_vbus: regulator-usbh1vbus { + compatible = "regulator-fixed"; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + reg_usb_otg_vbus: regulator-usbotgvbus { + compatible = "regulator-fixed"; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; +}; + +&iomuxc { + pinctrl_audmux: audmux { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0 + MX6QDL_PAD_CSI0_DAT4__AUD3_TXC 0x130b0 + MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0 + MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0 + /* Audio Clock */ + MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 + /* Audio reset */ + MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x178b0 + >; + }; + + pinctrl_bt: bt { + fsl,pins = < + /* Bluetooth / Wifi enable */ + MX6QDL_PAD_SD3_DAT6__GPIO6_IO18 0x1b0b1 + /* Bluetooth Slow Clock */ + MX6QDL_PAD_ENET_RXD0__OSC32K_32K_OUT 0x000b0 + >; + }; + + pinctrl_ecspi3: ecspi3grp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO 0x100b1 + MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI 0x100b1 + MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK 0x100b1 + MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24 0x178b0 /* CS */ + >; + }; + + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x100b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x100b0 + MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x10030 + MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x10030 + MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x10030 + MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x10030 + MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x10030 + MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x10030 + MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x100b0 + MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030 + MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b030 + MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b030 + MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030 + MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030 + MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030 + >; + }; + + pinctrl_flexcan1: flexcan1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_7__FLEXCAN1_TX 0x1b0b0 + MX6QDL_PAD_GPIO_8__FLEXCAN1_RX 0x1b0b0 + >; + }; + + pinctrl_flexcan2: flexcan2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX 0x1b0b0 + MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX 0x1b0b0 + >; + }; + + pinctrl_hdmicec: hdmicecgrp { + fsl,pins = < + MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0 + >; + }; + + pinctrl_i2c1: i2c1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1 + MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1 + >; + }; + + pinctrl_i2c2: i2c2grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1 + MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1 + >; + }; + + pinctrl_i2c3: i2c3grp { + fsl,pins = < + MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1 + MX6QDL_PAD_GPIO_16__I2C3_SDA 0x4001b8b1 + >; + }; + + pinctrl_pmic: pmicgrp { + fsl,pins = < + /* PMIC INT */ + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b1 + >; + }; + + pinctrl_pwm2: pwm2grp { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT9__PWM2_OUT 0x1b0b1 + >; + }; + + pinctrl_uart1: uart1grp { + fsl,pins = < + MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1 + MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1 + >; + }; + + pinctrl_uart2: uart2grp { + fsl,pins = < + MX6QDL_PAD_SD3_DAT4__UART2_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT5__UART2_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1 + >; + }; + + pinctrl_uart3: uart3grp { + fsl,pins = < + MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D23__UART3_CTS_B 0x1b0b1 + MX6QDL_PAD_EIM_EB3__UART3_RTS_B 0x1b0b1 + >; + }; + + pinctrl_usbotg: usbotggrp { + fsl,pins = < + MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x17059 + >; + }; + + pinctrl_usdhc1: usdhc1grp { + fsl,pins = < + MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059 + MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059 + MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059 + MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059 + MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059 + MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059 + >; + }; + + pinctrl_usdhc2: usdhc2grp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059 + MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059 + MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059 + MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059 + MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059 + MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059 + >; + }; + + pinctrl_usdhc3: usdhc3grp { + fsl,pins = < + MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 + MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 + MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 + MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 + MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 + MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 + /* WL_EN */ + MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x13059 + /* WL_IRQ */ + MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x13059 + >; + }; + + pinctrl_usdhc3_100mhz: usdhc3grp100mhz { + fsl,pins = < + MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170B9 + MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100B9 + MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170B9 + MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170B9 + MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170B9 + MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170B9 + /* WL_EN */ + MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x130B9 + /* WL_IRQ */ + MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x130B9 + >; + }; + + pinctrl_usdhc3_200mhz: usdhc3grp200mhz { + fsl,pins = < + MX6QDL_PAD_SD3_CMD__SD3_CMD 0x170F9 + MX6QDL_PAD_SD3_CLK__SD3_CLK 0x100F9 + MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x170F9 + MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x170F9 + MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x170F9 + MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x170F9 + /* WL_EN */ + MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x130F9 + /* WL_IRQ */ + MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x130F9 + >; + }; + + pinctrl_gpmi_nand: gpmi-nand { + fsl,pins = < + MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 + MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 + MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 + MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 + MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb0b1 + MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 + MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 + MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 + MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 + MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 + MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 + MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 + MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 + MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 + MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 + MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 + >; + }; +}; + +&audmux { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux>; + status = "okay"; + + ssi2 { + fsl,audmux-port = <1>; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_SYN | + IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(2) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(2)) + IMX_AUDMUX_V2_PDCR_RXDSEL(2) + >; + }; + + aud3 { + fsl,audmux-port = <2>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(1) + >; + }; +}; + +&can1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan1>; + status = "disabled"; +}; + +&can2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan2>; + status = "disabled"; +}; + +&ecspi3 { + pinctrl-names = "default"; + fsl,spi-num-chipselects = <1>; + pinctrl-0 = <&pinctrl_ecspi3>; + cs-gpios = <&gpio4 24 0>; + status = "disabled"; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-mode = "rgmii"; + phy-reset-gpios = <&gpio1 25 0>; + phy-reset-duration=<100>; + status = "disabled"; +}; + +&hdmi { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hdmicec>; + ddc-i2c-bus = <&i2c2>; + status = "disabled"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1>; + status = "disabled"; +}; + +&i2c2 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2>; + status = "okay"; + + pmic@8 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pmic>; + compatible = "fsl,pfuze100"; + reg = <0x08>; + + regulators { + sw1a_reg: sw1ab { + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <6250>; + }; + + sw1c_reg: sw1c { + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <6250>; + }; + + sw2_reg: sw2 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + sw3a_reg: sw3a { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3950000>; + regulator-boot-on; + regulator-always-on; + }; + + sw3b_reg: sw3b { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3950000>; + regulator-boot-on; + regulator-always-on; + }; + + sw4_reg: sw4 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3950000>; + }; + + snvs_reg: vsnvs { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <3000000>; + regulator-boot-on; + regulator-always-on; + }; + + vref_reg: vrefddr { + regulator-boot-on; + regulator-always-on; + }; + + vgen1_reg: vgen1 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1550000>; + }; + + vgen2_reg: vgen2 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1550000>; + }; + + vgen3_reg: vgen3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vgen4_reg: vgen4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vgen5_reg: vgen5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vgen6_reg: vgen6 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-boot-on; + }; + }; + }; + + tlv320aic3106: codec@1b { + compatible = "ti,tlv320aic3106"; + reg = <0x1b>; + #sound-dai-cells = <0>; + DRVDD-supply = <®_3p3v>; + AVDD-supply = <®_3p3v>; + IOVDD-supply = <®_3p3v>; + DVDD-supply = <®_3p3v>; + ai3x-ocmv = <0>; + reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; + ai3x-gpio-func = < + 0 /* AIC3X_GPIO1_FUNC_DISABLED */ + 5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */ + >; + }; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "disabled"; +}; + +&pcie { + fsl,tx-swing-full = <103>; + fsl,tx-swing-low = <103>; + reset-gpio = <&gpio4 11 GPIO_ACTIVE_LOW>; + status = "disabled"; +}; + +&pwm2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm2>; + status = "disabled"; +}; + +®_arm { + vin-supply = <&sw1a_reg>; +}; + +®_pu { + vin-supply = <&sw1c_reg>; +}; + +®_soc { + vin-supply = <&sw1c_reg>; +}; + +&snvs_poweroff { + status = "okay"; +}; + +&ssi2 { /* Onboard audio */ + fsl,mode = "i2s-slave"; + status = "okay"; +}; + +&uart1 { /* Console */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + status = "disabled"; +}; + +&uart2 { /* Bluetooth */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2 &pinctrl_bt>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "ti,wl1835-st"; + enable-gpios = <&gpio6 18 GPIO_ACTIVE_HIGH>; + }; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart3>; + uart-has-rtscts; + status = "disabled"; +}; + +&usbh1 { + vbus-supply = <®_usb_h1_vbus>; + status = "disabled"; +}; + +&usbotg { + vbus-supply = <®_usb_otg_vbus>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbotg>; + disable-over-current; + status = "disabled"; +}; + +&gpmi { /* NAND */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpmi_nand>; + fsl,legacy-bch-geometry; + status = "okay"; + + /* a 2 MiB partition */ + partition@0 { + label = "spl"; + reg = <0x00000000 0x00200000>; + }; + + /* a 2 MiB partition */ + partition@1 { + label = "bootloader"; + reg = <0x00200000 0x00200000>; + }; + + /* an 8 MiB partition */ + partition@2 { + label = "kernel"; + reg = <0x00400000 0x00800000>; + }; + + /* max 1012 MiB partition - truncated automatically */ + partition@3 { + label = "rootfs"; + reg = <0x00c00000 0x3f400000>; + }; +}; + +&usdhc1 { /* eMMC */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc1>; + keep-power-in-suspend; + wakeup-source; + non-removable; + status = "okay"; +}; + +&usdhc2 { /* MMC/SD card */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2>; + no-1-8-v; + keep-power-in-suspend; + wakeup-source; + status = "disabled"; +}; + +&usdhc3 { /* Wilink8 WL18xx*/ + pinctrl-names = "default", "state_100mhz", "state_200mhz"; + pinctrl-0 = <&pinctrl_usdhc3>; + pinctrl-1 = <&pinctrl_usdhc3_100mhz>; + pinctrl-2 = <&pinctrl_usdhc3_200mhz>; + + non-removable; + keep-power-in-suspend; + wakeup-source; + bus-width = <4>; + vmmc-supply = <®_wl18xx_vmmc>; + non-removable; + wakeup-source; + keep-power-in-suspend; + cap-power-off-card; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + wlcore: wlcore@2 { + compatible = "ti,wl1835"; + reg = <2>; + interrupt-parent = <&gpio6>; + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; + ref-clock-frequency = <38400000>; + }; +}; + +&snvs_rtc { + status = "disabled"; +}; diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0001-arm64-dts-lx2160a-add-lx2160acex7-device-tree-build.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0001-arm64-dts-lx2160a-add-lx2160acex7-device-tree-build.patch new file mode 100644 index 00000000..2981aa95 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0001-arm64-dts-lx2160a-add-lx2160acex7-device-tree-build.patch @@ -0,0 +1,27 @@ +From 0038ae610ef69f00adf358d915ae618a83ac63cb Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 4 May 2020 17:33:28 +0300 +Subject: [PATCH] arm64: dts: lx2160a: add lx2160acex7 device tree build + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm64/boot/dts/freescale/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile +index 5e05e0be3aeb..7d342cffb87e 100644 +--- a/arch/arm64/boot/dts/freescale/Makefile ++++ b/arch/arm64/boot/dts/freescale/Makefile +@@ -47,6 +47,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-qds.dtb + dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-rdb.dtb + dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-qds.dtb + dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb ++dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-cex7.dtb + + dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb imx8mm-evk-rpmsg.dtb imx8mm-evk-rm67191.dtb \ + imx8mm-ddr4-evk.dtb imx8mm-evk-root.dtb imx8mm-evk-inmate.dtb \ +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0002-arm64-dts-lx2160a-add-lx2160acex7-device-tree.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0002-arm64-dts-lx2160a-add-lx2160acex7-device-tree.patch new file mode 100644 index 00000000..c834906a --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0002-arm64-dts-lx2160a-add-lx2160acex7-device-tree.patch @@ -0,0 +1,225 @@ +From 35dc5b03bb8f7b93fb474c39d7689d39062ff81a Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 28 Jul 2019 14:21:06 +0300 +Subject: [PATCH 2/3] arm64: dts: lx2160a: add lx2160acex7 device tree + +The device tree enables the following features - +1. dpmac17 RGMII MAC connected to Atheros AR8035 phy +2. 2x MDIO busses +3. 2x USB 3.0 controllers +4. 4x SATA ports +5. MT35X 512Mb SPI flash +6. Temperature sensor on i2c0 channel 3 +7. AMC6821 temperature and PWM fan controller + +The module supports AMC6821 and EMC2301 PWM controllers where either can +be assembled, but not both together since the PWM and TACH signals are +shared between them. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + .../boot/dts/freescale/fsl-lx2160a-cex7.dts | 190 ++++++++++++++++++ + 1 file changed, 190 insertions(+) + create mode 100644 arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts + +diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +new file mode 100644 +index 000000000000..872fcf9e724d +--- /dev/null ++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +@@ -0,0 +1,190 @@ ++// SPDX-License-Identifier: (GPL-2.0 OR MIT) ++// ++// Device Tree file for LX2160A-CEx7 ++// ++// Copyright 2019 SolidRun ltd. ++ ++/dts-v1/; ++ ++#include "fsl-lx2160a.dtsi" ++ ++/ { ++ model = "SolidRun LX2160A COM express type 7 module"; ++ compatible = "fsl,lx2160a-cex7", "fsl,lx2160a"; ++ ++ aliases { ++ crypto = &crypto; ++ serial0 = &uart0; ++ serial1 = &uart1; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ sb_3v3: regulator-sb3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "RT7290"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++&crypto { ++ status = "okay"; ++}; ++ ++&esdhc0 { ++ sd-uhs-sdr104; ++ sd-uhs-sdr50; ++ sd-uhs-sdr25; ++ sd-uhs-sdr12; ++ status = "okay"; ++}; ++ ++&esdhc1 { ++ mmc-hs200-1_8v; ++ mmc-hs400-1_8v; ++ bus-width = <8>; ++ status = "okay"; ++}; ++ ++ ++/* ++i2c busses are - ++/dev/i2c0 - CTRL #0 - connected to PCA9547 I2C switch ++/dev/i2c1 - CTRL #2 - COM module to carrier (general I2C_CK/I2C_DAT) ++/dev/i2c2 - CTRL #4 - Connected to RTC PCF2129AT (0x51), EEPROM (0x54,0x55,0x56,0x57) ++ ++I2C switch - ++/dev/i2c3 - CH0 - SO-DIMMs SPD (0x51, 0x53), 2Kb EEPROM (0x57), bootable 512Kb eeprom (0x50) ++/dev/i2c4 - CH1 - 100MHz clk gen (address 0x6a) ++/dev/i2c5 - CH2 - LTC3882 DC-DC controller on 0x63 ++/dev/i2c6 - CH3 - SA56004ED (0x4c), SA56004FD (0x4d), COM module SMB_CK,SMB_DAT and COM module 10G_LED_SDA,10G_LED_SCL ++/dev/i2c7 - CH4 - SFP #0 I2C ++/dev/i2c8 - CH5 - SFP #1 I2C ++/dev/i2c9 - CH6 - SFP #2 I2C ++/dev/i2c10 - CH7 - SFP #3 I2C ++ ++ ++*/ ++ ++ ++ ++&i2c0 { ++ status = "okay"; ++ ++ i2c-mux@77 { ++ compatible = "nxp,pca9547"; ++ reg = <0x77>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x1>; ++ fan-temperature-ctrlr@18 { ++ compatible = "ti,amc6821"; ++ reg = <0x18>; ++ cooling-min-state = <0>; ++ cooling-max-state = <9>; ++ #cooling-cells = <2>; ++ }; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x3>; ++ ++ temperature-sensor@48 { ++ compatible = "nxp,sa56004"; ++ reg = <0x48>; ++ vcc-supply = <&sb_3v3>; ++ }; ++ }; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++}; ++ ++&i2c4 { ++ status = "okay"; ++ ++ rtc@51 { ++ compatible = "nxp,pcf2129"; ++ reg = <0x51>; ++ // IRQ10_B ++ interrupts = <0 150 0x4>; ++ }; ++}; ++ ++&fspi { ++ status = "okay"; ++ flash0: mt35xu512aba@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "micron,m25p80"; ++ m25p,fast-read; ++ spi-max-frequency = <50000000>; ++ reg = <0>; ++ /* The following setting enables 1-1-8 (CMD-ADDR-DATA) mode */ ++ spi-rx-bus-width = <8>; ++ spi-tx-bus-width = <1>; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&uart1 { ++ status = "okay"; ++}; ++ ++&usb0 { ++ status = "okay"; ++}; ++ ++&usb1 { ++ status = "okay"; ++}; ++ ++&emdio1 { ++ status = "okay"; ++ rgmii_phy1: ethernet-phy@1 { ++ /* AR8035 PHY - "compatible" property not strictly needed */ ++ compatible = "ethernet-phy-id004d.d072"; ++ reg = <0x1>; ++ /* Poll mode - no "interrupts" property defined */ ++ }; ++}; ++ ++&emdio2 { ++ status = "okay"; ++}; ++ ++&dpmac17 { ++ phy-handle = <&rgmii_phy1>; ++ phy-connection-type = "rgmii-id"; ++}; ++ ++&sata0 { ++ status = "okay"; ++}; ++ ++&sata1 { ++ status = "okay"; ++}; ++ ++&sata2 { ++ status = "okay"; ++}; ++ ++&sata3 { ++ status = "okay"; ++}; +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0005-arm64-dts-lx2160a-cex7-add-ltc3882-support.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0005-arm64-dts-lx2160a-cex7-add-ltc3882-support.patch new file mode 100644 index 00000000..2619e9e6 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0005-arm64-dts-lx2160a-cex7-add-ltc3882-support.patch @@ -0,0 +1,39 @@ +From cca2439ac83136b9ed85f8519931018d4f5385e6 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 12 Jan 2020 14:24:47 +0200 +Subject: [PATCH] arm64: dts: lx2160a-cex7: add ltc3882 support + +ltc3882 is lx2 cortex-a72 core voltage. +this patch adds it to the device tree support; the driver is in +drivers/hwmon/pmbus/ltc2978.c + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +index 872fcf9e724d..1c1a0d47897d 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +@@ -94,6 +94,15 @@ I2C switch - + #cooling-cells = <2>; + }; + }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x2>; ++ ltc3882@5c { ++ compatible = "ltc3882"; ++ reg = <0x5c>; ++ }; ++ }; + i2c@3 { + #address-cells = <1>; + #size-cells = <0>; +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0006-arm64-dts-lx2160a-cex7-add-on-module-eeproms.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0006-arm64-dts-lx2160a-cex7-add-on-module-eeproms.patch new file mode 100644 index 00000000..46a97d34 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0006-arm64-dts-lx2160a-cex7-add-on-module-eeproms.patch @@ -0,0 +1,54 @@ +From 05acb6ecc8eb7426c4664a1e8fd22ad69256d541 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Sun, 26 Jan 2020 15:36:07 +0200 +Subject: [PATCH] arm64: dts: lx2160a-cex7: add on-module eeproms + +This patch adds 4 eeprom support on i2c mux channel #0 - +1. Bootable 512Kbit eeprom at address 0x50. +2. Memory SO-DIMMs SPD channels at 0x51 (upper SO-DIMM) and 0x53. +3. 2Kb eeprom at 0x57 will be used by SolidRun to hold manufacturing +data. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + .../boot/dts/freescale/fsl-lx2160a-cex7.dts | 22 ++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +index 1c1a0d47897d..2b8f1118b37a 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts ++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dts +@@ -81,7 +81,27 @@ I2C switch - + reg = <0x77>; + #address-cells = <1>; + #size-cells = <0>; +- ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x0>; ++ 24aa512@50 { ++ compatible = "atmel,24c512"; ++ reg = <0x50>; ++ }; ++ spd1@51 { ++ compatible = "atmel,spd"; ++ reg = <0x51>; ++ }; ++ spd2@53 { ++ compatible = "atmel,spd"; ++ reg = <0x53>; ++ }; ++ m24c02@57 { ++ compatible = "atmel,24c02"; ++ reg = <0x57>; ++ }; ++ }; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0007-pci-hotplug-declare-IDT-bridge-as-hotpluggabl-bridge.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0007-pci-hotplug-declare-IDT-bridge-as-hotpluggabl-bridge.patch new file mode 100644 index 00000000..f60f6c1f --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0007-pci-hotplug-declare-IDT-bridge-as-hotpluggabl-bridge.patch @@ -0,0 +1,27 @@ +From 927a01dffed9eb439bc9bf6df0b6548380bc84a7 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Mon, 10 Feb 2020 10:47:45 +0200 +Subject: [PATCH] pci: hotplug: declare IDT bridge as hotpluggabl bridge + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + drivers/pci/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 55870dd42b4d..bfac025931e0 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -2915,6 +2915,7 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) + dev->is_hotplug_bridge = 1; + } + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); ++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IDT, 0x808c, quirk_hotplug_bridge); + + /* + * This is a quirk for the Ricoh MMC controller found as a part of some +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0008-pci-spr2803-quirk-to-fix-class-ID.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0008-pci-spr2803-quirk-to-fix-class-ID.patch new file mode 100644 index 00000000..3a581a07 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq-lx2160acex7/0008-pci-spr2803-quirk-to-fix-class-ID.patch @@ -0,0 +1,41 @@ +From bba6ebb2daac17bd2268c97b7255e477c2b15b52 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Wed, 26 Feb 2020 17:57:54 +0200 +Subject: [PATCH] pci: spr2803: quirk to fix class ID + +spr2803 class is 0x0, this quirk modifies that to multimedia class in +order to allocate memory to it's bars. + +Upstream-Status: Inappropriate [Solid-Run BSP] + +Signed-off-by: Rabeeh Khoury +--- + drivers/pci/quirks.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 28c64f84bfe7..4ddf7e43d531 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -3068,6 +3068,18 @@ static void fixup_ti816x_class(struct pci_dev *dev) + DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800, + PCI_CLASS_NOT_DEFINED, 8, fixup_ti816x_class); + ++static void fixup_spr2803_class(struct pci_dev *dev) ++{ ++ u32 class = dev->class; ++ ++ /* spr2803 does not have class code */ ++ dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8; ++ pci_info(dev, "PCI class overridden (%#08x -> %#08x)\n", ++ class, dev->class); ++} ++DECLARE_PCI_FIXUP_CLASS_EARLY(0x1e00, 0x2803, ++ PCI_CLASS_NOT_DEFINED, 8, fixup_spr2803_class); ++ + /* + * Some PCIe devices do not work reliably with the claimed maximum + * payload size supported. +-- +2.17.1 + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq_5.4.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq_5.4.bbappend new file mode 100644 index 00000000..40455572 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc-qoriq_5.4.bbappend @@ -0,0 +1 @@ +require linux-lx2160acex7.inc diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0002-ARM-dts-imx6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0002-ARM-dts-imx6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch new file mode 100644 index 00000000..4c514088 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0002-ARM-dts-imx6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch @@ -0,0 +1,32 @@ +From: Alex Gonzalez +Date: Fri, 14 Sep 2018 12:32:41 +0200 +Subject: [PATCH] ARM: dts: imx6ul: ccimx6ulsom: Add empty wireless and + bluetooth placeholders + +The vendor provided U-Boot will use these empty nodes to populate the +MAC addresses used for both the Bluetooth and the Wireless chips. + +Upstream-Status: Inappropriate [vendor specific] + +Signed-off-by: Alex Gonzalez +--- + arch/arm/boot/dts/imx6ul-ccimx6ulsom.dtsi | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/imx6ul-ccimx6ulsom.dtsi b/arch/arm/boot/dts/imx6ul-ccimx6ulsom.dtsi +index b5781c3656d1..82fa176bf138 100644 +--- a/arch/arm/boot/dts/imx6ul-ccimx6ulsom.dtsi ++++ b/arch/arm/boot/dts/imx6ul-ccimx6ulsom.dtsi +@@ -24,6 +24,12 @@ + linux,cma-default; + }; + }; ++ ++ bluetooth { ++ }; ++ ++ wireless { ++ }; + }; + + &adc1 { diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0003-net-wireless-Export-regulatory_hint_user.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0003-net-wireless-Export-regulatory_hint_user.patch new file mode 100644 index 00000000..82445247 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0003-net-wireless-Export-regulatory_hint_user.patch @@ -0,0 +1,77 @@ +From: Alex Gonzalez +Date: Mon, 10 Sep 2018 13:38:40 +0200 +Subject: [PATCH] net: wireless: Export regulatory_hint_user() + +The QCA6564 driver makes use of this kernel API when built with +the QCA_VENDOR_KERNEL flag. + +Signed-off-by: Alex Gonzalez +--- + include/net/cfg80211.h | 26 ++++++++++++++++++++++++++ + net/wireless/reg.c | 1 + + net/wireless/reg.h | 3 --- + 3 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h +index e0c41eb1c860..84d47ac0cea4 100644 +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -5111,6 +5111,32 @@ int regulatory_set_wiphy_regd_sync_rtnl(struct wiphy *wiphy, + struct ieee80211_regdomain *rd); + + /** ++ * regulatory_hint_user - hint to the wireless core a regulatory domain ++ * which the driver has received from an application ++ * @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain ++ * should be in. If @rd is set this should be NULL. Note that if you ++ * set this to NULL you should still set rd->alpha2 to some accepted ++ * alpha2. ++ * @user_reg_hint_type: the type of user regulatory hint. ++ * ++ * Wireless drivers can use this function to hint to the wireless core ++ * the current regulatory domain as specified by trusted applications, ++ * it is the driver's responsibilty to estbalish which applications it ++ * trusts. ++ * ++ * The wiphy should be registered to cfg80211 prior to this call. ++ * For cfg80211 drivers this means you must first use wiphy_register(), ++ * for mac80211 drivers you must first use ieee80211_register_hw(). ++ * ++ * Drivers should check the return value, its possible you can get ++ * an -ENOMEM or an -EINVAL. ++ * ++ * Return: 0 on success. -ENOMEM, -EINVAL. ++ */ ++int regulatory_hint_user(const char *alpha2, ++ enum nl80211_user_reg_hint_type user_reg_hint_type); ++ ++/** + * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain + * @wiphy: the wireless device we want to process the regulatory domain on + * @regd: the custom regulatory domain to use for this wiphy +diff --git a/net/wireless/reg.c b/net/wireless/reg.c +index dd58b9909ac9..816a8a25b06f 100644 +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -2912,6 +2912,7 @@ int regulatory_hint_user(const char *alpha2, + + return 0; + } ++EXPORT_SYMBOL(regulatory_hint_user); + + int regulatory_hint_indoor(bool is_indoor, u32 portid) + { +diff --git a/net/wireless/reg.h b/net/wireless/reg.h +index 9ceeb5f3a7cb..92de47dec466 100644 +--- a/net/wireless/reg.h ++++ b/net/wireless/reg.h +@@ -31,9 +31,6 @@ bool is_world_regdom(const char *alpha2); + bool reg_supported_dfs_region(enum nl80211_dfs_regions dfs_region); + enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy); + +-int regulatory_hint_user(const char *alpha2, +- enum nl80211_user_reg_hint_type user_reg_hint_type); +- + /** + * regulatory_hint_indoor - hint operation in indoor env. or not + * @is_indoor: if true indicates that user space thinks that the diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0004-net-wireless-Allow-for-firmware-to-handle-DFS.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0004-net-wireless-Allow-for-firmware-to-handle-DFS.patch new file mode 100644 index 00000000..aad7623f --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0004-net-wireless-Allow-for-firmware-to-handle-DFS.patch @@ -0,0 +1,62 @@ +From: Alex Gonzalez +Date: Fri, 7 Sep 2018 13:12:14 +0200 +Subject: [PATCH] net: wireless: Allow for firmware to handle DFS + +The QCA6564 driver makes use of this functionality when compiled with +the QCA_VENDOR_KERNEL flag. + +Signed-off-by: Alex Gonzalez +--- + include/net/cfg80211.h | 2 ++ + net/wireless/chan.c | 3 ++- + net/wireless/nl80211.c | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h +index 84d47ac0cea4..3082f6bf047d 100644 +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -3740,6 +3740,7 @@ struct cfg80211_ops { + * beaconing mode (AP, IBSS, Mesh, ...). + * @WIPHY_FLAG_HAS_STATIC_WEP: The device supports static WEP key installation + * before connection. ++ * @WIPHY_FLAG_DFS_OFFLOAD: The driver handles all the DFS related operations. + */ + enum wiphy_flags { + /* use hole at 0 */ +@@ -3766,6 +3767,7 @@ enum wiphy_flags { + WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), + WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23), + WIPHY_FLAG_HAS_STATIC_WEP = BIT(24), ++ WIPHY_FLAG_DFS_OFFLOAD = BIT(25), + }; + + /** +diff --git a/net/wireless/chan.c b/net/wireless/chan.c +index 7dc1bbd0888f..2ef1f908408f 100644 +--- a/net/wireless/chan.c ++++ b/net/wireless/chan.c +@@ -321,7 +321,8 @@ static int cfg80211_get_chans_dfs_required(struct wiphy *wiphy, + if (!c) + return -EINVAL; + +- if (c->flags & IEEE80211_CHAN_RADAR) ++ if ((c->flags & IEEE80211_CHAN_RADAR) && ++ !(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD)) + return 1; + } + return 0; +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index d91a408db113..930670ccfa59 100644 +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -7956,6 +7956,9 @@ static int nl80211_start_radar_detection(struct sk_buff *skb, + if (netif_carrier_ok(dev)) + return -EBUSY; + ++ if (rdev->wiphy.flags & WIPHY_FLAG_DFS_OFFLOAD) ++ return -EOPNOTSUPP; ++ + if (wdev->cac_started) + return -EBUSY; + diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0005-net-wireless-Add-cfg80211_is_gratuitous_arp_unsolici.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0005-net-wireless-Add-cfg80211_is_gratuitous_arp_unsolici.patch new file mode 100644 index 00000000..fbf1135e --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0005-net-wireless-Add-cfg80211_is_gratuitous_arp_unsolici.patch @@ -0,0 +1,95 @@ +From: Alex Gonzalez +Date: Fri, 7 Sep 2018 13:01:54 +0200 +Subject: [PATCH] net: wireless: Add + cfg80211_is_gratuitous_arp_unsolicited_na() + +The QCA6564 driver makes use of this call when compiled with the +QCA_VENDOR_KERNEL flag. + +Signed-off-by: Alex Gonzalez +--- + include/net/cfg80211.h | 10 ++++++++++ + net/wireless/util.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 62 insertions(+) + +diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h +index 3082f6bf047d..42445bd1c26a 100644 +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -6736,6 +6736,16 @@ void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp); + unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy); + + /** ++ * cfg80211_is_gratuitous_arp_unsolicited_na - packet is grat. ARP/unsol. NA ++ * @skb: the input packet, must be an ethernet frame already ++ * ++ * Return: %true if the packet is a gratuitous ARP or unsolicited NA packet. ++ * This is used to drop packets that shouldn't occur because the AP implements ++ * a proxy service. ++ */ ++bool cfg80211_is_gratuitous_arp_unsolicited_na(struct sk_buff *skb); ++ ++/** + * cfg80211_check_combinations - check interface combinations + * + * @wiphy: the wiphy +diff --git a/net/wireless/util.c b/net/wireless/util.c +index ec30e3732c7b..abcefae39e81 100644 +--- a/net/wireless/util.c ++++ b/net/wireless/util.c +@@ -2061,3 +2061,55 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, + return max_vht_nss; + } + EXPORT_SYMBOL(ieee80211_get_vht_max_nss); ++ ++bool cfg80211_is_gratuitous_arp_unsolicited_na(struct sk_buff *skb) ++{ ++ const struct ethhdr *eth = (void *)skb->data; ++ ++ const struct { ++ struct arphdr hdr; ++ u8 ar_sha[ETH_ALEN]; ++ u8 ar_sip[4]; ++ u8 ar_tha[ETH_ALEN]; ++ u8 ar_tip[4]; ++ } __packed * arp; ++ ++ const struct ipv6hdr *ipv6; ++ const struct icmp6hdr *icmpv6; ++ ++ switch (eth->h_proto) { ++ case cpu_to_be16(ETH_P_ARP): ++ /* can't say - but will probably be dropped later anyway */ ++ if (!pskb_may_pull(skb, sizeof(*eth) + sizeof(*arp))) ++ return false; ++ ++ arp = (void *)(eth + 1); ++ ++ if ((arp->hdr.ar_op == cpu_to_be16(ARPOP_REPLY) || ++ arp->hdr.ar_op == cpu_to_be16(ARPOP_REQUEST)) && ++ !memcmp(arp->ar_sip, arp->ar_tip, sizeof(arp->ar_sip))) ++ return true; ++ break; ++ case cpu_to_be16(ETH_P_IPV6): ++ /* can't say - but will probably be dropped later anyway */ ++ if (!pskb_may_pull(skb, sizeof(*eth) + sizeof(*ipv6) + ++ sizeof(*icmpv6))) ++ return false; ++ ++ ipv6 = (void *)(eth + 1); ++ icmpv6 = (void *)(ipv6 + 1); ++ ++ if (icmpv6->icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT && ++ !memcmp(&ipv6->saddr, &ipv6->daddr, sizeof(ipv6->saddr))) ++ return true; ++ break; ++ default: ++ /* no need to support other protocols, proxy service isn't ++ * specified for any others ++ */ ++ break; ++ } ++ ++ return false; ++} ++EXPORT_SYMBOL(cfg80211_is_gratuitous_arp_unsolicited_na); diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0006-linux-crypto-caam-set-hwrng-quality.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0006-linux-crypto-caam-set-hwrng-quality.patch new file mode 100644 index 00000000..7bc8d8d7 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc/ccimx6ul/0006-linux-crypto-caam-set-hwrng-quality.patch @@ -0,0 +1,26 @@ +From: Jose Diaz de Grenu +Date: Wed, 27 Jun 2018 17:39:11 +0200 +Subject: [PATCH] linux: crypto: caam set hwrng quality + +According to the i.MX6 Security Reference Manual it is a NIST +certifiable RNG, so set high quality to let the HWRNG framework +automatically use it. + +Signed-off-by: Jose Diaz de Grenu +Signed-off-by: Alex Gonzalez +--- + drivers/crypto/caam/caamrng.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c +index fde07d4ff019..ddca16941640 100644 +--- a/drivers/crypto/caam/caamrng.c ++++ b/drivers/crypto/caam/caamrng.c +@@ -292,6 +292,7 @@ static struct hwrng caam_rng = { + .name = "rng-caam", + .cleanup = caam_cleanup, + .read = caam_read, ++ .quality = 1024, + }; + + static void __exit caam_rng_exit(void) diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc_%.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc_%.bbappend index 53a8ace1..80574b12 100644 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc_%.bbappend +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-fslc_%.bbappend @@ -10,8 +10,25 @@ SRC_URI_append_imx6qdl-variscite-som_use-mainline-bsp = " \ SRC_URI_append_ccimx6ul = " \ file://0001-MLK-11719-4-mtd-gpmi-change-the-BCH-layout-setting-f.patch \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'file://0002-ARM-dts-imx6ul-ccimx6ulsom-Add-empty-wireless-and-bl.patch', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'file://0003-net-wireless-Export-regulatory_hint_user.patch', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'file://0004-net-wireless-Allow-for-firmware-to-handle-DFS.patch', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'file://0005-net-wireless-Add-cfg80211_is_gratuitous_arp_unsolici.patch', '', d)} \ + file://0006-linux-crypto-caam-set-hwrng-quality.patch \ " +do_configure_prepend_ccimx6ul() { + if ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'true', 'false', d)}; then + kernel_conf_variable HOSTAP m + kernel_conf_variable PROVE_LOCKING n + sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' + fi + if ${@bb.utils.contains('MACHINE_FEATURES', 'bluetooth', 'true', 'false', d)}; then + kernel_conf_variable BT_RFCOMM y + sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' + fi +} + do_configure_prepend_imx6qdl-variscite-som() { cp ${WORKDIR}/imx6*-var*.dts* ${S}/arch/arm/boot/dts } diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo-3.16/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo-3.16/defconfig deleted file mode 100644 index d2688425..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo-3.16/defconfig +++ /dev/null @@ -1,397 +0,0 @@ -CONFIG_SYSVIPC=y -# CONFIG_CROSS_MEMORY_ATTACH is not set -# CONFIG_USELIB is not set -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_RELAY=y -CONFIG_SGETMASK_SYSCALL=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -# CONFIG_VM_EVENT_COUNTERS is not set -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLUB_CPU_PARTIAL is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_BLK_CMDLINE_PARSER=y -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX6Q=y -CONFIG_PCI=y -CONFIG_PCI_DEBUG=y -CONFIG_PCI_IMX6=y -CONFIG_PCIE_ECRC=y -CONFIG_PCIEASPM_DEBUG=y -CONFIG_PCIEASPM_POWERSAVE=y -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_STAT is not set -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_GENERIC_CPUFREQ_CPU0=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_PM_AUTOSLEEP=y -CONFIG_PM_WAKELOCKS=y -CONFIG_PM_RUNTIME=y -CONFIG_PM_DEBUG=y -CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_APM_EMULATION=y -CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_CAN=y -# CONFIG_CAN_GW is not set -CONFIG_CAN_VCAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=320 -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_TESTS=m -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_FASTMAP=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_MTD_UBI_BLOCK=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -# CONFIG_SATA_PMP is not set -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -# CONFIG_ATA_SFF is not set -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NET_VENDOR_ADAPTEC is not set -# CONFIG_NET_VENDOR_ALTEON is not set -# CONFIG_NET_VENDOR_AMD is not set -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_ATHEROS is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_BROCADE is not set -# CONFIG_NET_VENDOR_CHELSIO is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_CISCO is not set -# CONFIG_NET_VENDOR_DEC is not set -# CONFIG_NET_VENDOR_DLINK is not set -# CONFIG_NET_VENDOR_EMULEX is not set -# CONFIG_NET_VENDOR_EXAR is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_HISILICON is not set -# CONFIG_NET_VENDOR_HP is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MELLANOX is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_MYRI is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_NVIDIA is not set -# CONFIG_NET_VENDOR_OKI is not set -# CONFIG_NET_PACKET_ENGINE is not set -# CONFIG_NET_VENDOR_QLOGIC is not set -# CONFIG_NET_VENDOR_REALTEK is not set -# CONFIG_NET_VENDOR_RDC is not set -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SILAN is not set -# CONFIG_NET_VENDOR_SIS is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_SUN is not set -# CONFIG_NET_VENDOR_TEHUTI is not set -# CONFIG_NET_VENDOR_TI is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_SMSC_PHY=y -CONFIG_ATH_CARDS=y -CONFIG_ATH6KL=m -CONFIG_ATH6KL_SDIO=m -CONFIG_BRCMFMAC=y -CONFIG_BRCMDBG=y -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_MATRIX=y -CONFIG_KEYBOARD_IMX=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_EDT_FT5X06=y -CONFIG_TOUCHSCREEN_USB_COMPOSITE=y -# CONFIG_TOUCHSCREEN_USB_PANJIT is not set -# CONFIG_TOUCHSCREEN_USB_3M is not set -# CONFIG_TOUCHSCREEN_USB_ITM is not set -# CONFIG_TOUCHSCREEN_USB_ETURBO is not set -# CONFIG_TOUCHSCREEN_USB_GUNZE is not set -# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set -# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set -# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set -# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set -# CONFIG_TOUCHSCREEN_USB_GOTOP is not set -# CONFIG_TOUCHSCREEN_USB_JASTEC is not set -# CONFIG_TOUCHSCREEN_USB_ELO is not set -# CONFIG_TOUCHSCREEN_USB_E2I is not set -# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set -# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set -# CONFIG_TOUCHSCREEN_USB_NEXIO is not set -# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set -CONFIG_TOUCHSCREEN_TSC2007=y -# CONFIG_SERIO is not set -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_HW_RANDOM=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_GPIO=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_GOV_FAIR_SHARE=y -CONFIG_THERMAL_GOV_USER_SPACE=y -CONFIG_CPU_THERMAL=y -CONFIG_THERMAL_EMULATION=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_SOC_CAMERA=y -CONFIG_VIDEO_MX3=y -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -# CONFIG_DVB_AU8522_V4L is not set -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set -# CONFIG_VGA_ARB is not set -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB=y -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_MX3 is not set -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_LDB=y -# CONFIG_FB_MXC_EDID is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_HRTIMER=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_DEBUG_VERBOSE=y -CONFIG_SND_PCM_XRUN_DEBUG=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_PCI is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DYNAMIC_MINORS=y -CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -CONFIG_USB_MON=m -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_REALTEK=y -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_TEST=m -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_GADGET_VBUS_DRAW=500 -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_EEM=y -CONFIG_USB_GADGETFS=m -CONFIG_USB_FUNCTIONFS=m -CONFIG_USB_FUNCTIONFS_ETH=y -CONFIG_USB_FUNCTIONFS_RNDIS=y -CONFIG_USB_FUNCTIONFS_GENERIC=y -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m -CONFIG_USB_G_ACM_MS=m -CONFIG_USB_G_HID=m -CONFIG_MMC=y -CONFIG_MMC_CLKGATE=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_GPU_VIV=y -CONFIG_MXC_VPU_DEBUG=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_PM_DEVFREQ=y -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -CONFIG_DEVFREQ_GOV_PERFORMANCE=y -CONFIG_DEVFREQ_GOV_POWERSAVE=y -CONFIG_DEVFREQ_GOV_USERSPACE=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_CONFIGFS_FS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=y -CONFIG_NLS_UTF8=y -CONFIG_STRIP_ASM_SYMS=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_SHIRQ=y -CONFIG_LOCKUP_DETECTOR=y -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y -CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y -CONFIG_PANIC_ON_OOPS=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_BLOCK_EXT_DEVT=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_SET_MODULE_RONX=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_GHASH=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_TWOFISH=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_SAHARA=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo_3.16.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo_3.16.bb deleted file mode 100644 index a4d184f5..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-karo_3.16.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Linux Kernel for Ka-Ro electronics TX Computer-On-Modules" - -require recipes-kernel/linux/linux-imx.inc - -DEPENDS += "lzop-native bc-native" - -SRCBRANCH = "karo-tx6" -LOCALVERSION = "-2015-09-18" -SRCREV = "5340e6663c3b575808a5be437a25d8a7f85cb658" -KERNEL_SRC = "git://git.karo-electronics.de/karo-tx-linux.git;protocol=git" -SRC_URI = "${KERNEL_SRC};branch=${SRCBRANCH} \ - file://defconfig \ -" - -KERNEL_IMAGETYPE="uImage" - -COMPATIBLE_MACHINE = "(tx6[qsu]-.*)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron/defconfig new file mode 100644 index 00000000..2f43fee8 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron/defconfig @@ -0,0 +1,431 @@ +CONFIG_LOCALVERSION="-exceet" +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_REFCOUNT_FULL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_MULTI_V6=y +CONFIG_ARCH_MXC=y +# CONFIG_MACH_MX31ADS is not set +# CONFIG_MACH_BUG is not set +CONFIG_SOC_IMX6Q=y +CONFIG_SOC_IMX6UL=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +CONFIG_SMP=y +CONFIG_HAVE_ARM_ARCH_TIMER=y +CONFIG_ARM_PSCI=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_HIGHMEM=y +CONFIG_ARM_MODULE_PLTS=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_BINFMT_MISC=m +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_NETFILTER=y +CONFIG_CAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SST25L=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_SPI_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +CONFIG_SCSI_MQ_DEFAULT=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_AGERE is not set +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_ALTEON is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_ATHEROS is not set +CONFIG_NET_VENDOR_AURORA=y +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_HP is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_MYRI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NVIDIA is not set +# CONFIG_NET_VENDOR_OKI is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_REALTEK is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_RDC is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +CONFIG_MICREL_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_BRCMFMAC=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MWIFIEX_USB=m +CONFIG_RT2X00=y +CONFIG_RT2800USB=y +# CONFIG_RT2800USB_RT33XX is not set +# CONFIG_RT2800USB_RT35XX is not set +CONFIG_RT2800USB_RT53XX=y +CONFIG_WL12XX=m +CONFIG_WLCORE_SDIO=m +# CONFIG_WILINK_PLATFORM_DATA is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=y +CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_MAX11801=y +CONFIG_TOUCHSCREEN_IMX6UL_TSC=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_TOUCHSCREEN_MC13783=y +CONFIG_TOUCHSCREEN_TSC2004=y +CONFIG_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_SX8654=y +CONFIG_TOUCHSCREEN_COLIBRI_VF50=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MMA8450=y +CONFIG_INPUT_PWM_BEEPER=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_IMX=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_STMPE=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DA9062_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_DA9052_I2C=y +CONFIG_MFD_DA9062=y +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_MC13783=y +CONFIG_REGULATOR_MC13892=y +CONFIG_REGULATOR_PFUZE100=y +# CONFIG_RC_CORE is not set +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=m +CONFIG_IMX_IPUV3_CORE=y +CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_DW_HDMI_AHB_AUDIO=m +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_LDB=y +CONFIG_DRM_IMX_HDMI=y +CONFIG_DRM_ETNAVIV=y +CONFIG_DRM_MXSFB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_FSL_ASRC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_ES8328=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_MC13783=y +CONFIG_SND_SOC_FSL_ASOC_CARD=y +CONFIG_SND_SOC_CS42XX8_I2C=y +CONFIG_SND_SOC_TLV320AIC3X=y +CONFIG_SND_SOC_WM8510=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_OTG_FSM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +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_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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_ULPI_BUS=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_RV8803=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_IMX_SDMA=m +CONFIG_MXS_DMA=y +CONFIG_IIO=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_VCNL4000=m +CONFIG_MPL3115=y +CONFIG_PWM=y +CONFIG_PWM_FSL_FTM=y +CONFIG_PWM_IMX=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y +CONFIG_PROVE_LOCKING=y +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_ECDH=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_SAHARA=y +CONFIG_ASYMMETRIC_KEY_TYPE=y +CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y +CONFIG_X509_CERTIFICATE_PARSER=y +CONFIG_PKCS7_MESSAGE_PARSER=y +CONFIG_SYSTEM_TRUSTED_KEYRING=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron_5.4.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron_5.4.bb new file mode 100644 index 00000000..8c99a579 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron_5.4.bb @@ -0,0 +1,29 @@ +# Copyright (C) 2012-2020 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) +# +# SPDX-License-Identifier: MIT +# + +require recipes-kernel/linux/linux-imx.inc + +SUMMARY = "Kontron Linux mainline based kernel with backported features and fixes" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +DEPENDS += "lzop-native bc-native" + +SRC_URI = "git://git.kontron-electronics.de/linux/linux.git;protocol=https;branch=${SRCBRANCH} \ + file://defconfig" +LOCALVERSION = "-ktn" + + +# 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.41" + +SRCBRANCH = "v5.4-ktn" +SRCREV = "807a88195d767631837242b89cd8c7734a471f81" + +COMPATIBLE_MACHINE = "(imx6ul-kontron)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-lx2160acex7.inc b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-lx2160acex7.inc new file mode 100644 index 00000000..2fa8231e --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-lx2160acex7.inc @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_append_lx2160acex7 := "${THISDIR}/linux-fslc-qoriq-lx2160acex7:" + +SRC_URI_append_lx2160acex7 = "\ + file://0001-arm64-dts-lx2160a-add-lx2160acex7-device-tree-build.patch \ + file://0002-arm64-dts-lx2160a-add-lx2160acex7-device-tree.patch \ + file://0005-arm64-dts-lx2160a-cex7-add-ltc3882-support.patch \ + file://0006-arm64-dts-lx2160a-cex7-add-on-module-eeproms.patch \ + file://0007-pci-hotplug-declare-IDT-bridge-as-hotpluggabl-bridge.patch \ + file://0008-pci-spr2803-quirk-to-fix-class-ID.patch \ +" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-qoriq_5.4.bbappend b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-qoriq_5.4.bbappend new file mode 100644 index 00000000..40455572 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-qoriq_5.4.bbappend @@ -0,0 +1 @@ +require linux-lx2160acex7.inc diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/0001-arm-dts-vf610-phycore-rdk.dts-rename-to-vf610-pcm052.patch b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/0001-arm-dts-vf610-phycore-rdk.dts-rename-to-vf610-pcm052.patch deleted file mode 100644 index d8c2b666..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/0001-arm-dts-vf610-phycore-rdk.dts-rename-to-vf610-pcm052.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 119e027174cde26d8243c52993a35283df4e4920 Mon Sep 17 00:00:00 2001 -From: Anthony Felice -Date: Mon, 26 Oct 2015 13:07:23 -0400 -Subject: [PATCH] arm: dts: vf610-phycore-rdk.dts: rename to vf610-pcm052.dts - -Rename vf610-phycore-rdk.dts to match upstream U-Boot. - -Signed-off-by: Anthony Felice ---- - arch/arm/boot/dts/{vf610-phycore-rdk.dts => vf610-pcm052.dts} | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - rename arch/arm/boot/dts/{vf610-phycore-rdk.dts => vf610-pcm052.dts} (100%) - -diff --git a/arch/arm/boot/dts/vf610-phycore-rdk.dts b/arch/arm/boot/dts/vf610-pcm052.dts -similarity index 100% -rename from arch/arm/boot/dts/vf610-phycore-rdk.dts -rename to arch/arm/boot/dts/vf610-pcm052.dts --- -1.9.1 - diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/defconfig deleted file mode 100644 index a3422bd1..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys-3.13/pcm052/defconfig +++ /dev/null @@ -1,175 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=m -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSCTL_SYSCALL=y -CONFIG_EMBEDDED=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PARTITION_ADVANCED=y -CONFIG_ARCH_MXC=y -CONFIG_SOC_VF610=y -CONFIG_HAVE_IMX_EXTERNAL_MCC=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_VMSPLIT_2G=y -CONFIG_AEABI=y -CONFIG_KSM=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs rw nfsroot=10.193.20.106:/tftpboot/10.193.20.115 ip=10.193.20.115:10.193.20.106:10.193.20.254:255.255.255.0::eth0:off console=ttymxc1,115200 mem=128M" -CONFIG_VFP=y -CONFIG_NEON=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_PM_RUNTIME=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_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_CAN=y -CONFIG_CAN_VCAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_FSL_NFC=y -CONFIG_MTD_SPI_NOR_BASE=y -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_RAM=y -CONFIG_EEPROM_AT24=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_NETDEVICES=y -CONFIG_MICREL_PHY=y -CONFIG_INPUT_POLLDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_CRTOUCH=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_CONSOLE_TRANSLATIONS is not set -CONFIG_LEGACY_PTY_COUNT=4 -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_HW_RANDOM=y -# CONFIG_IMX_MCC_LIBMCC is not set -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_FSL_DSPI=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_SYSCON=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_FB=y -CONFIG_FB_FSL_DCU=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_GENERIC=m -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_LOGO=y -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set -CONFIG_SND=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_SOC=y -CONFIG_SND_SOC_FSL_SAI=y -CONFIG_SND_SOC_SGTL5000=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_ULPI=y -CONFIG_USB_GADGET=y -CONFIG_USB_ETH=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_FSL_EDMA=y -CONFIG_STAGING=y -CONFIG_IIO=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_FSL_FTM=y -# CONFIG_RESET_CONTROLLER is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set -CONFIG_EXT4_FS=y -CONFIG_AUTOFS4_FS=m -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=m -CONFIG_FUNCTION_TRACER=y -CONFIG_BLK_DEV_IO_TRACE=y -# CONFIG_ARM_UNWIND is not set -CONFIG_DEBUG_LL=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_ARC4=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys_3.13.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys_3.13.bb deleted file mode 100644 index 0f3be236..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-timesys_3.13.bb +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2013-2014 Timesys Corporation -# Released under the MIT license (see COPYING.MIT for the terms) -require recipes-kernel/linux/linux-imx.inc - -SUMMARY = "Linux Kernel with added drivers and board support for Vybrid-based platforms" - -# Revision of 3.13_vybrid branch -SRC_URI = "git://github.com/Timesys/linux-timesys.git;protocol=git;branch=${SRCBRANCH} \ - file://defconfig \ - file://0001-arm-dts-vf610-phycore-rdk.dts-rename-to-vf610-pcm052.patch \ -" - -SRCBRANCH = "3.13_vybrid" -SRCREV = "a8caf227b68beff7b3e6a2b69a37272c6fc7d4ac" -LOCALVERSION ?= "-${SRCBRANCH}" - -COMPATIBLE_MACHINE = "(vf60)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/apalis-imx6/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/apalis-imx6/defconfig new file mode 100644 index 00000000..f8776ba4 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/apalis-imx6/defconfig @@ -0,0 +1,380 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_DEBUG=y +CONFIG_NAMESPACES=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX6Q=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_IMX6=y +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_HIGHMEM=y +CONFIG_CMA=y +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_SECCOMP=y +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_BINFMT_MISC=m +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=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_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT=m +CONFIG_NETFILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_CAN=y +CONFIG_CAN_VCAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIUART=m +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_RFKILL=y +CONFIG_RFKILL_GPIO=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=320 +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_ATA=y +CONFIG_SATA_AHCI=m +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_PATA_IMX=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_ATHEROS is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MICREL_PHY=y +CONFIG_PPP=m +CONFIG_USB_USBNET=y +# CONFIG_RTL_CARDS is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +# CONFIG_MOUSE_PS2 is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_FUSION_F0710A=m +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_SUPPLY=y +CONFIG_SENSORS_MAG3110=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MXC_OUTPUT=y +CONFIG_VIDEO_MXC_CAPTURE=m +CONFIG_VIDEO_MXC_CSI_CAMERA=m +CONFIG_MXC_VADC=m +CONFIG_MXC_CAMERA_OV5640=m +CONFIG_MXC_CAMERA_OV5642=m +CONFIG_MXC_CAMERA_OV5640_MIPI=m +CONFIG_MXC_TVIN_ADV7180=m +CONFIG_MXC_TVIN_ADV7280=m +CONFIG_MXC_TVIN_MAX9526=m +CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m +CONFIG_VIDEO_MXC_IPU_OUTPUT=y +CONFIG_VIDEO_MXC_PXP_V4L2=y +CONFIG_SOC_CAMERA=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_DRM=y +CONFIG_DRM_VIVANTE=y +CONFIG_FB_MXS=y +CONFIG_FB_MXC_SYNC_PANEL=y +CONFIG_FB_MXC_MIPI_DSI=y +CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y +CONFIG_FB_MXC_LDB=y +CONFIG_FB_MXC_HDMI=y +CONFIG_FB_MXS_SII902X=y +CONFIG_HANNSTAR_CABC=y +CONFIG_FB_MXC_EINK_PANEL=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_HIDRAW=y +CONFIG_HID_MULTITOUCH=m +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=m +CONFIG_USB_WDM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MXC_IPU=y +CONFIG_MXC_MIPI_CSI2=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_IMX_SDMA=m +CONFIG_MXC_PXP_V2=y +# CONFIG_MX3_IPU is not set +CONFIG_STAGING=y +CONFIG_R8188EU=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_STMPE_ADC=y +CONFIG_PWM=y +CONFIG_PWM_IMX=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_OVERLAY_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_FILE_DIRECT=y +CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=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_CIFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_ECDH=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_LRW=y +CONFIG_CRYPTO_PCBC=y +CONFIG_CRYPTO_XTS=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=y +CONFIG_CRYPTO_RMD160=y +CONFIG_CRYPTO_RMD256=y +CONFIG_CRYPTO_RMD320=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TGR192=y +CONFIG_CRYPTO_WP512=y +CONFIG_CRYPTO_BLOWFISH=y +CONFIG_CRYPTO_CAMELLIA=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=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_CRC_CCITT=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6/defconfig new file mode 100644 index 00000000..7aacece7 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6/defconfig @@ -0,0 +1,372 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_DEBUG=y +CONFIG_NAMESPACES=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX6Q=y +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_HIGHMEM=y +CONFIG_CMA=y +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_SECCOMP=y +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_BINFMT_MISC=m +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=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_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT=m +CONFIG_NETFILTER=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_CAN=y +CONFIG_CAN_VCAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_CAN_MCP251X=y +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIUART=m +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_RFKILL=y +CONFIG_RFKILL_GPIO=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=256 +CONFIG_CMA_SIZE_PERCENTAGE=50 +CONFIG_CMA_SIZE_SEL_MIN=y +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MICREL_PHY=y +CONFIG_PPP=m +CONFIG_USB_USBNET=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +# CONFIG_MOUSE_PS2 is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_FUSION_F0710A=m +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_SUPPLY=y +CONFIG_SENSORS_MAG3110=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MXC_OUTPUT=y +CONFIG_VIDEO_MXC_CAPTURE=m +CONFIG_VIDEO_MXC_CSI_CAMERA=m +CONFIG_MXC_VADC=m +CONFIG_MXC_CAMERA_OV5640=m +CONFIG_MXC_CAMERA_OV5642=m +CONFIG_MXC_CAMERA_OV5640_MIPI=m +CONFIG_MXC_TVIN_ADV7180=m +CONFIG_MXC_TVIN_ADV7280=m +CONFIG_MXC_TVIN_MAX9526=m +CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m +CONFIG_VIDEO_MXC_IPU_OUTPUT=y +CONFIG_VIDEO_MXC_PXP_V4L2=y +CONFIG_SOC_CAMERA=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_DRM=y +CONFIG_DRM_VIVANTE=y +CONFIG_FB_MXS=y +CONFIG_FB_MXC_SYNC_PANEL=y +CONFIG_FB_MXC_HDMI=y +CONFIG_FB_MXS_SII902X=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_HIDRAW=y +CONFIG_HID_MULTITOUCH=m +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=m +CONFIG_USB_WDM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_SERIAL_OPTION=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MXC_IPU=y +CONFIG_MXC_MIPI_CSI2=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_IMX_SDMA=m +CONFIG_MXC_PXP_V2=y +# CONFIG_MX3_IPU is not set +CONFIG_STAGING=y +CONFIG_R8188EU=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_STMPE_ADC=y +CONFIG_PWM=y +CONFIG_PWM_IMX=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_OVERLAY_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_FILE_DIRECT=y +CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=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_CIFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_ECDH=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_LRW=y +CONFIG_CRYPTO_PCBC=y +CONFIG_CRYPTO_XTS=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=y +CONFIG_CRYPTO_RMD160=y +CONFIG_CRYPTO_RMD256=y +CONFIG_CRYPTO_RMD320=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TGR192=y +CONFIG_CRYPTO_WP512=y +CONFIG_CRYPTO_BLOWFISH=y +CONFIG_CRYPTO_CAMELLIA=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=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_CRC_CCITT=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6ull/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6ull/defconfig new file mode 100644 index 00000000..af0680d5 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6ull/defconfig @@ -0,0 +1,384 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_DEBUG=y +CONFIG_NAMESPACES=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +CONFIG_KALLSYMS_ALL=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX6ULL=y +CONFIG_ARM_ERRATA_764369=y +CONFIG_SMP=y +# CONFIG_ARM_CPU_TOPOLOGY is not set +CONFIG_HAVE_ARM_ARCH_TIMER=y +CONFIG_VMSPLIT_2G=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_CMA=y +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_BINFMT_MISC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_NET_IPGRE_DEMUX=m +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT=m +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_INET=y +CONFIG_NFT_MASQ=y +CONFIG_NFT_NAT=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_NFACCT=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NFT_CHAIN_NAT_IPV4=y +CONFIG_NFT_MASQ_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_NF_TABLES_BRIDGE=y +CONFIG_L2TP=m +CONFIG_BRIDGE=y +# CONFIG_BRIDGE_IGMP_SNOOPING is not set +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_VLAN_8021Q=y +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_CAN=m +CONFIG_CAN_FLEXCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_MRVL=y +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=256 +CONFIG_CMA_SIZE_PERCENTAGE=50 +CONFIG_CMA_SIZE_SEL_MIN=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MICREL_PHY=y +CONFIG_PPP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_MPPE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_USB_NET_DRIVERS=m +CONFIG_USB_USBNET=m +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_INPUT_POLLDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +# CONFIG_MOUSE_PS2 is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_AD7879=y +CONFIG_TOUCHSCREEN_AD7879_I2C=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_FUSION_F0710A=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_FSL_OTP=y +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +# CONFIG_MXC_MMA8451 is not set +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_GPIO=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +# CONFIG_USB_GSPCA is not set +CONFIG_V4L_MEM2MEM_DRIVERS=y +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_FB=y +CONFIG_FB_MXS=y +# CONFIG_FB_MXC_EDID is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB_AUDIO=m +CONFIG_HIDRAW=y +CONFIG_HID_MULTITOUCH=m +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=m +CONFIG_USB_WDM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_SERIAL_OPTION=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MXC_SIM=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_IMX_SDMA=m +CONFIG_MXS_DMA=y +CONFIG_MXC_PXP_V2=y +CONFIG_MXC_PXP_V3=y +# CONFIG_MX3_IPU is not set +CONFIG_STAGING=y +CONFIG_R8188EU=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_PWM=y +CONFIG_PWM_IMX=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_OVERLAY_FS=y +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +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_CIFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_ECDH=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_LRW=y +CONFIG_CRYPTO_PCBC=y +CONFIG_CRYPTO_XTS=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=y +CONFIG_CRYPTO_RMD160=y +CONFIG_CRYPTO_RMD256=y +CONFIG_CRYPTO_RMD320=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TGR192=y +CONFIG_CRYPTO_WP512=y +CONFIG_CRYPTO_BLOWFISH=y +CONFIG_CRYPTO_CAMELLIA=y +CONFIG_CRYPTO_TWOFISH=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_MXS_DCP=y +CONFIG_CRC_CCITT=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/mx7/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/mx7/defconfig new file mode 100644 index 00000000..46ff17e7 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/mx7/defconfig @@ -0,0 +1,386 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_DEBUG=y +CONFIG_NAMESPACES=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +CONFIG_KALLSYMS_ALL=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX7D=y +# CONFIG_ARM_ERRATA_643719 is not set +CONFIG_SMP=y +# CONFIG_ARM_CPU_TOPOLOGY is not set +CONFIG_VMSPLIT_2G=y +CONFIG_ARM_PSCI=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_CMA=y +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_BINFMT_MISC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_NET_IPGRE_DEMUX=m +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_IPV6_SIT=m +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_TABLES=y +CONFIG_NF_TABLES_INET=y +CONFIG_NFT_MASQ=y +CONFIG_NFT_NAT=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_NFACCT=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NFT_CHAIN_NAT_IPV4=y +CONFIG_NFT_MASQ_IPV4=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_FILTER=y +CONFIG_NF_TABLES_BRIDGE=y +CONFIG_L2TP=m +CONFIG_BRIDGE=y +# CONFIG_BRIDGE_IGMP_SNOOPING is not set +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_VLAN_8021Q=y +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_CAN=m +CONFIG_CAN_FLEXCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HCIUART=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_FIRMWARE_IN_KERNEL is not set +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=256 +CONFIG_CMA_SIZE_PERCENTAGE=50 +CONFIG_CMA_SIZE_SEL_MIN=y +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MICREL_PHY=y +CONFIG_PPP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_MPPE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_USB_NET_DRIVERS=m +CONFIG_USB_USBNET=m +# CONFIG_USB_NET_CDC_NCM is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +CONFIG_INPUT_POLLDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +# CONFIG_MOUSE_PS2 is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_AD7879=y +CONFIG_TOUCHSCREEN_AD7879_I2C=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_FUSION_F0710A=m +# CONFIG_SERIO is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +# CONFIG_MXC_MMA8451 is not set +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_RN5T618_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_RN5T618=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_RN5T618=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +# CONFIG_USB_GSPCA is not set +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MXC_PXP_V4L2=y +CONFIG_SOC_CAMERA=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=y +CONFIG_FB=y +# CONFIG_FB_MX3 is not set +CONFIG_FB_MXS=y +# CONFIG_FB_MXC_EDID is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_FSL_ASRC=y +CONFIG_SND_SOC_FSL_SAI=y +CONFIG_SND_SOC_FSL_SPDIF=y +CONFIG_SND_SOC_IMX_AUDMUX=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_SGTL5000=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HIDRAW=y +CONFIG_HID_MULTITOUCH=m +CONFIG_USB_HIDDEV=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_ACM=m +CONFIG_USB_WDM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=y +CONFIG_USB_SERIAL_PL2303=y +CONFIG_USB_SERIAL_OPTION=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_ZERO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MXC_SIM=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_IMX_SDMA=m +CONFIG_MXS_DMA=y +CONFIG_MXC_PXP_V2=y +CONFIG_MXC_PXP_V3=y +CONFIG_STAGING=y +CONFIG_R8188EU=m +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_PWM=y +CONFIG_PWM_IMX=y +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_OVERLAY_FS=y +CONFIG_VFAT_FS=y +CONFIG_NTFS_FS=y +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +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_CIFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set +CONFIG_DEBUG_USER=y +CONFIG_CORESIGHT=y +CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y +CONFIG_CORESIGHT_SINK_TPIU=y +CONFIG_CORESIGHT_SINK_ETBV10=y +CONFIG_CORESIGHT_SOURCE_ETM3X=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_ECDH=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_LRW=y +CONFIG_CRYPTO_XTS=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=y +CONFIG_CRYPTO_RMD160=y +CONFIG_CRYPTO_RMD256=y +CONFIG_CRYPTO_RMD320=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_TGR192=y +CONFIG_CRYPTO_WP512=y +CONFIG_CRYPTO_BLOWFISH=y +CONFIG_CRYPTO_CAMELLIA=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m +CONFIG_CRC_CCITT=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.9-1.0.x/defconfig b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.9-1.0.x/defconfig deleted file mode 100644 index 9e5fe3e2..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.9-1.0.x/defconfig +++ /dev/null @@ -1,481 +0,0 @@ -CONFIG_LOCALVERSION="-" -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_CGROUP_SCHED=y -CONFIG_CGROUP_FREEZER=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_CGROUP_DEBUG=y -CONFIG_NAMESPACES=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -CONFIG_KALLSYMS_ALL=y -CONFIG_EMBEDDED=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6ULL=y -CONFIG_SOC_IMX7D=y -# CONFIG_ARM_ERRATA_643719 is not set -CONFIG_PCI=y -CONFIG_PCI_MSI=y -CONFIG_PCI_IMX6=y -CONFIG_SMP=y -# CONFIG_ARM_CPU_TOPOLOGY is not set -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_SECCOMP=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPUFREQ_DT=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_KERNEL_MODE_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_NET_IPGRE_DEMUX=m -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_IPV6_SIT=m -CONFIG_NETFILTER=y -CONFIG_BRIDGE_NETFILTER=y -CONFIG_NF_CONNTRACK=y -CONFIG_NF_TABLES=y -CONFIG_NF_TABLES_INET=y -CONFIG_NFT_MASQ=y -CONFIG_NFT_NAT=y -CONFIG_NETFILTER_XT_TARGET_CONNMARK=y -CONFIG_NETFILTER_XT_MATCH_CONNMARK=y -CONFIG_NETFILTER_XT_MATCH_NFACCT=y -CONFIG_NF_CONNTRACK_IPV4=y -CONFIG_NFT_CHAIN_NAT_IPV4=y -CONFIG_NFT_MASQ_IPV4=y -CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP6_NF_IPTABLES=y -CONFIG_NF_TABLES_BRIDGE=y -CONFIG_L2TP=m -CONFIG_BRIDGE=y -# CONFIG_BRIDGE_IGMP_SNOOPING is not set -CONFIG_BRIDGE_VLAN_FILTERING=y -CONFIG_VLAN_8021Q=y -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_CAN=y -CONFIG_CAN_VCAN=y -CONFIG_CAN_FLEXCAN=m -CONFIG_CAN_MCP251X=m -CONFIG_BT=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_LL=y -CONFIG_CFG80211=m -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=m -CONFIG_RFKILL=y -CONFIG_RFKILL_INPUT=y -CONFIG_RFKILL_GPIO=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=320 -CONFIG_CMA_SIZE_PERCENTAGE=50 -CONFIG_CMA_SIZE_SEL_MIN=y -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_FASTMAP=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI=m -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -CONFIG_NETDEVICES=y -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_ATHEROS is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_HISILICON is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_QUALCOMM is not set -# CONFIG_NET_VENDOR_ROCKER is not set -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_SMSC is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_MICREL_PHY=y -CONFIG_PPP=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_MPPE=m -CONFIG_PPTP=m -CONFIG_PPPOL2TP=m -CONFIG_PPP_ASYNC=m -CONFIG_USB_NET_DRIVERS=m -CONFIG_USB_USBNET=m -# CONFIG_USB_NET_CDC_NCM is not set -# CONFIG_USB_NET_NET1080 is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -# CONFIG_USB_NET_ZAURUS is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_POLLDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_KEYBOARD_ATKBD is not set -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -# CONFIG_MOUSE_PS2 is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_AD7879=y -CONFIG_TOUCHSCREEN_AD7879_I2C=y -CONFIG_TOUCHSCREEN_ATMEL_MXT=m -CONFIG_TOUCHSCREEN_FUSION_F0710A=m -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=y -# CONFIG_SERIO is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y -CONFIG_I2C_MUX_GPIO=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_GPIO=y -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_IMX=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_GPIO=y -CONFIG_POWER_RESET_GPIO_RESTART=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_POWER_SUPPLY=y -CONFIG_SENSORS_MAG3110=y -# CONFIG_MXC_MMA8451 is not set -CONFIG_THERMAL=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_RN5T618_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_RN5T618=y -CONFIG_MFD_STMPE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_REGULATOR_RN5T618=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -# CONFIG_USB_GSPCA is not set -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_TVIN_ADV7280=m -CONFIG_MXC_TVIN_MAX9526=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_SOC_CAMERA=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -CONFIG_SOC_CAMERA_OV2640=y -# CONFIG_DVB_AU8522_V4L is not set -# CONFIG_DVB_TUNER_DIB0070 is not set -# CONFIG_DVB_TUNER_DIB0090 is not set -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_HANNSTAR_CABC=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_SOC_FSL_ASRC=y -CONFIG_SND_SOC_FSL_SAI=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_HIDRAW=y -CONFIG_HID_MULTITOUCH=m -CONFIG_USB_HIDDEV=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_ACM=m -CONFIG_USB_WDM=m -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_CONSOLE=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=y -CONFIG_USB_SERIAL_PL2303=y -CONFIG_USB_SERIAL_OPTION=m -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -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_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_SIM=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_DS1307=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -# CONFIG_MX3_IPU is not set -CONFIG_STAGING=y -CONFIG_STMPE_ADC=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXTCON_USB_GPIO=y -CONFIG_IIO=y -CONFIG_IMX7D_ADC=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_CUSE=y -CONFIG_OVERLAY_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_NTFS_FS=y -CONFIG_NTFS_RW=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_UBIFS_FS=y -CONFIG_SQUASHFS=m -CONFIG_SQUASHFS_FILE_DIRECT=y -CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y -CONFIG_SQUASHFS_XATTR=y -CONFIG_SQUASHFS_LZ4=y -CONFIG_SQUASHFS_LZO=y -CONFIG_SQUASHFS_XZ=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_CIFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -CONFIG_LOCKUP_DETECTOR=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 -# CONFIG_SCHED_DEBUG is not set -CONFIG_STACKTRACE=y -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -# CONFIG_ARM_UNWIND is not set -CONFIG_DEBUG_USER=y -CONFIG_CORESIGHT=y -CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y -CONFIG_CORESIGHT_SINK_TPIU=y -CONFIG_CORESIGHT_SINK_ETBV10=y -CONFIG_CORESIGHT_SOURCE_ETM3X=y -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_ECDH=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CCM=y -CONFIG_CRYPTO_GCM=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_PCBC=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_TWOFISH=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_MXS_DCP=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.14-2.0.x.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.14-2.0.x.bb new file mode 100644 index 00000000..0ef10758 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.14-2.0.x.bb @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" + +require recipes-kernel/linux/linux-imx.inc + +DEPENDS += "lzop-native bc-native" + +SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules" + +SRC_URI = "git://git.toradex.com/linux-toradex.git;protocol=git;branch=${SRCBRANCH} \ + file://defconfig" + +# Load USB functions configurable through configfs (CONFIG_USB_CONFIGFS) +KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', ' libcomposite', '',d)}" + +PV_append = "+git${SRCPV}" + +LINUX_VERSION = "4.14.159" + +SRCREV = "1f43bce17a57a29d180ab0facb83a88b1fb9c797" +SRCBRANCH = "toradex_4.14-2.0.x-imx" + +COMPATIBLE_MACHINE = "(mx6|mx7)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.4.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.4.bb index 356aeb5f..b2e61c21 100644 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.4.bb +++ b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.4.bb @@ -11,8 +11,10 @@ KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget' LOCALVERSION = "-2.8.3" PV_append = "+git${SRCPV}" -SRCBRANCH = "toradex_vf_4.4-next" -SRCREV = "166cb6f4a4aff202d98914fe0c5530d26ce671a5" +LINUX_VERSION = "4.4.217" + +SRCBRANCH = "toradex_vf_4.4" +SRCREV = "4a31b8a3519d5dde0eacbb088b0d45c83732535b" DEPENDS += "lzop-native bc-native" COMPATIBLE_MACHINE = "(vf)" diff --git a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.9-1.0.x.bb b/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.9-1.0.x.bb deleted file mode 100644 index 12465a1f..00000000 --- a/bsp/meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex_4.9-1.0.x.bb +++ /dev/null @@ -1,19 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -require recipes-kernel/linux/linux-imx.inc - -SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules" - -SRC_URI = "git://git.toradex.com/linux-toradex.git;protocol=git;branch=${SRCBRANCH} \ - file://defconfig" - -# Load USB functions configurable through configfs (CONFIG_USB_CONFIGFS) -KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', ' libcomposite', '',d)}" - -LOCALVERSION = "-2.8.3" -PV_append = "+git${SRCPV}" - -SRCREV = "07d40f6ffcbb9b3db3c146f0949725752ed61b63" -SRCBRANCH = "toradex_4.9-1.0.x-imx" - -DEPENDS += "lzop-native bc-native" -COMPATIBLE_MACHINE = "(mx6|mx7)" diff --git a/bsp/meta-freescale-3rdparty/wic/lx2160acex7.wks.in b/bsp/meta-freescale-3rdparty/wic/lx2160acex7.wks.in new file mode 100644 index 00000000..8703ce41 --- /dev/null +++ b/bsp/meta-freescale-3rdparty/wic/lx2160acex7.wks.in @@ -0,0 +1,65 @@ +# short-description: Create eMMC/SD card image with a boot partition +# long-description: +# Create an image that can be written onto an eMMC or a SD card using +# dd for use with QorIQ SoC CEX7 family. +# It uses ... +# +# Offsets: +# * RCW+PBI+BL2 at block 8 +# * PFE firmware at block 0x100 +# * FIP (BL31+BL32+BL33) at 0x800 +# * Env variables at 0x2800 +# * Secureboot headers at 0x3000 +# * DDR PHY FIP at 0x4000 +# * DPAA1 FMAN ucode at 0x4800 +# * DPAA2-MC at 0x5000 +# * DPAA2 DPL at 0x6800 +# * DPAA2 DPC at 0x7000 +# * Device tree (UEFI) at 0x7800 +# * Kernel at 0x8000 +# * Ramdisk at 0x10000 +# +# The disk layout (in blocks) used is: +# blocks KiB +# 0x0 +-----------------------+ 0x0 +# | MBR / GPT ... | +# 0x8 +-----------------------+ 0x4 +# | RCW + PBI + BL2 | +# 0x100 +-----------------------+ 0x80 +# | PFE firmware | +# 0x800 +-----------------------+ 0x400 +# | FIP (BL31+BL32+BL33) | +# 0x2800 +-----------------------+ 0x1400 +# | U-Boot Env variables | +# 0x3000 +-----------------------+ 0x1800 +# | Secureboot headers | +# 0x4000 +-----------------------+ 0x2000 +# | DDR PHY FIP | +# 0x4800 +-----------------------+ 0x2400 +# | DPAA1 FMAN ucode | +# 0x5000 +-----------------------+ 0x2800 +# | DPAA2-MC | +# 0x6800 +-----------------------+ 0x3400 +# | DPAA2 DPL | +# 0x7000 +-----------------------+ 0x3800 +# | DPAA2 DPC | +# 0x7800 +-----------------------+ 0x3c00 +# | Device tree (UEFI) | +# 0x8000 +-----------------------+ 0x4000 +# | Kernel | +# 0x10000 +-----------------------+ 0x8000 +# | Ramdisk | +# +-----------------------+ +# + +part RCW --source rawcopy --sourceparams="file=atf/bl2_auto.pbl" --ondisk mmcblk --no-table --align 4 +part FIP --source rawcopy --sourceparams="file=atf/fip_uboot.bin" --ondisk mmcblk --no-table --align 1024 +part DDR --source rawcopy --sourceparams="file=ddr-phy/fip_ddr_all.bin" --ondisk mmcblk --no-table --align 8192 +part MCFW --source rawcopy --sourceparams="file=mc_app/mc.itb" --ondisk mmcblk --no-table --align 10240 +part DPL --source rawcopy --sourceparams="file=mc-utils/dpl-eth.8x10g.19.dtb" --ondisk mmcblk --no-table --align 13312 +part DPC --source rawcopy --sourceparams="file=mc-utils/dpc-8_x_usxgmii.dtb" --ondisk mmcblk --no-table --align 14336 + +part /boot --source bootimg-partition --ondisk mmcblk --fstype=ext4 --label boot --active --align 4096 --extra-space 0 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label rootfs --align 4096 --extra-space 32 + +bootloader --ptable msdos diff --git a/bsp/meta-freescale/.gitignore b/bsp/meta-freescale/.gitignore index b25c15b8..983cee9c 100644 --- a/bsp/meta-freescale/.gitignore +++ b/bsp/meta-freescale/.gitignore @@ -1 +1,5 @@ *~ +*.bak +*.orig +*.rej +*.swp diff --git a/bsp/meta-freescale/EULA b/bsp/meta-freescale/EULA index 4504a14d..402c87ca 100644 --- a/bsp/meta-freescale/EULA +++ b/bsp/meta-freescale/EULA @@ -1,288 +1,283 @@ -LA_OPT_BASE_LICENSE v24 May 2018 - - +LA_OPT_NXP_Software_License v10 December 2019 IMPORTANT. Read the following NXP Software License Agreement ("Agreement") -completely. By selecting the "I Accept" button at the end of this page, you -indicate that you accept the terms of the Agreement and you acknowledge that -you have the authority, for yourself or on behalf of your company, to bind your -company to these terms. You may then download or install the file. - - +completely. By selecting the "I Accept" button at the end of this page, or by +downloading, installing, or using the Licensed Software, you indicate that you +accept the terms of the Agreement and you acknowledge that you have the +authority, for yourself or on behalf of your company, to bind your company to +these terms. You may then download or install the file. In the event of a +conflict between the terms of this Agreement and any license terms and +conditions for NXP's proprietary software embedded anywhere in the Licensed +Software file, the terms of this Agreement shall control. If a separate +license agreement for the Licensed Software has been signed by you and NXP, +then that agreement shall govern your use of the Licensed Software and shall +supersede this Agreement. NXP SOFTWARE LICENSE AGREEMENT - - -This is a legal agreement between you, as an authorized representative of your -employer, or if you have no employer, as an individual (together "you"), and -NXP B.V. ("NXP"). It concerns your rights to use the software identified in -the Software Content Register and provided to you in binary or source code form -and any accompanying written materials (the "Licensed Software"). The Licensed -Software may include any updates or error corrections or documentation relating -to the Licensed Software provided to you by NXP under this License. In -consideration for NXP allowing you to access the Licensed Software, you are -agreeing to be bound by the terms of this Agreement. If you do not agree to all -of the terms of this Agreement, do not download or install the Licensed -Software. If you change your mind later, stop using the Licensed Software and -delete all copies of the Licensed Software in your possession or control. Any -copies of the Licensed Software that you have already distributed, where -permitted, and do not destroy will continue to be governed by this Agreement. -Your prior use will also continue to be governed by this Agreement. - -1. DEFINITIONS - -1.1. For NXP, the term "Affiliate" means (i) any Person Controlled by NXP -Semiconductors N.V. or (ii) any Person Controlled by any transferee of all or -substantially all of the assets of NXP Semiconductors N.V., where "Controlled" -means the direct or indirect beneficial ownership of more than fifty percent -(50%) of the voting stock, or decision-making authority in the event that there -is no voting stock, in another entity; provided, any such Person described in -clause (i) or (ii) shall be deemed to be an "Affiliate" only for so long as -such Person is Controlled by NXP Semiconductors N.V. or such transferee. For -the purposes of this definition, "Person" is defined to mean "an individual, -corporation, partnership, limited liability company, association, -unincorporated association, trust or other entity or organization, including a -government or political subdivision or an agency or instrumentality thereof." - -1.2. "Essential Patent" means a patent to the limited extent that infringement -of such patent cannot be avoided in remaining compliant with the technology -standards implicated by the usage of any of the Licensed Software, including -optional implementation of the standards, on technical but not commercial -grounds, taking into account normal technical practice and the state of the art -generally available at the time of standardization. - -1.3. "Intellectual Property Rights" means any and all rights under statute, -common law or equity in and under copyrights, trade secrets, and patents -(including utility models), and analogous rights throughout the world, +This is a legal agreement between your employer, of which you are an authorized +representative, or, if you have no employer, you as an individual ("you" or +"Licensee"), and NXP B.V. ("NXP"). It concerns your rights to use the software +provided to you in binary or source code form and any accompanying written +materials (the "Licensed Software"). The Licensed Software may include any +updates or error corrections or documentation relating to the Licensed Software +provided to you by NXP under this Agreement. In consideration for NXP allowing +you to access the Licensed Software, you are agreeing to be bound by the terms +of this Agreement. If you do not agree to all of the terms of this Agreement, +do not download or install the Licensed Software. If you change your mind +later, stop using the Licensed Software and delete all copies of the Licensed +Software in your possession or control. Any copies of the Licensed Software +that you have already distributed, where permitted, and do not destroy will +continue to be governed by this Agreement. Your prior use will also continue to +be governed by this Agreement. + +1. DEFINITIONS + +1.1. "Affiliate" means, with respect to a party, any corporation or +other legal entity that now or hereafter Controls, is Controlled by or is under +common Control with such party; where "Control" means the direct or indirect +ownership of greater than fifty percent (50%) of the shares or similar +interests entitled to vote for the election of directors or other persons +performing similar functions. An entity is considered an Affiliate only so long +as such Control exists. + +1.2 "Authorized System" means either (i) Licensee's hardware product +which incorporates an NXP Product or (ii) Licensee's software program which is +used exclusively in connection with an NXP Product and with which the Licensed +Software will be integrated. + +1.3. "Derivative Work" means a work based upon one or more pre-existing +works. A work consisting of editorial revisions, annotations, elaborations, or +other modifications which, as a whole, represent an original work of +authorship, is a Derivative Work. + +1.4 "Intellectual Property Rights" means any and all rights under +statute, common law or equity in and under copyrights, trade secrets, and +patents (including utility models), and analogous rights throughout the world, including any applications for and the right to apply for, any of the foregoing. -1.4. "Software Content Register" means the documentation accompanying the -Licensed Software which identifies the contents of the Licensed Software, -including but not limited to identification of any Third Party Software. +1.5 "NXP Product" means a programmable processing unit (e.g. a +microprocessor, microcontroller, sensor or digital signal processor) supplied +directly or indirectly from NXP or an NXP Affiliate. + +1.6 "Software Content Register" means the documentation which may +accompany the Licensed Software which identifies the contents of the Licensed +Software, including but not limited to identification of any Third Party +Software, if any, and may also contain other related information as whether the +license in 2.3 is applicable. -1.5. "Third Party Software" means, any software included in the Licensed -Software that is not NXP Proprietary software, and is not open source software, +1.7 "Third Party Software" means, any software included in the Licensed +Software that is not NXP proprietary software, and is not open source software, and to which different license terms may apply. -2. LICENSE GRANT. - -2.1. Separate license grants to Third Party Software, or other terms applicable -to the Licensed Software if different from those granted in this Section 2, are -contained in Appendix A. The Licensed Software is accompanied by a Software -Content Register which will identify that portion of the Licensed Software, if -any, that is subject to the different terms in Appendix A. - -2.2. Exclusively in connection with your development and distribution of -product containing a programmable processing unit (e.g. a microprocessor, -microcontroller, sensor or digital signal processor) ("NXP Product") supplied -directly or indirectly from NXP ("Authorized System"), and exclusively for use -with or integrated within an NXP Product, NXP grants you a world-wide, -personal, non-transferable, non-exclusive, non-sublicensable, license, under -NXP's Intellectual Property Rights: - -(a) to use and reproduce the Licensed Software only as part of, or integrated -within, Authorized Systems and not on a standalone basis; - -(b) to directly or indirectly manufacture, demonstrate, copy, distribute, -market and sell the Licensed Software in object code (machine readable) only as -part of, or embedded within, Authorized Systems in object code form and not on -a standalone basis. Notwithstanding the foregoing, those files marked as .h -files ("Header files") may be distributed in source or object code form, but -only as part of, or embedded within Authorized Systems. - -(c) to copy, use and distribute as needed, solely in connection with an -Authorized System, proprietary NXP information associated with the Licensed -Software for the purpose of developing, maintaining and supporting Authorized -Systems with which the Licensed Software is integrated or associated. - - - -2.3. For Licensed Software provided to you in source code form (human -readable), exclusively for use with or integrated within an NXP Product, NXP -further grants to you a worldwide, personal, non-transferable, non-exclusive, -non-sublicensable, license, under NXP's Intellectual Property Rights: - -(a) to prepare derivative works of the Licensed Software, only as part of, or -integrated within, Authorized Systems and not on a standalone basis; - -(b) to use, demonstrate, copy, distribute, market and sell the derivative -works of the Licensed Software in object code (machine readable) only as part -of, or integrated within, Authorized Systems and not on a standalone basis. -Notwithstanding the foregoing, those files marked as .h files ("Header files") -may be distributed in source or object code form, but only as part of, or -embedded within Authorized Systems. - -2.4. You may use subcontractors on your premises to exercise your rights under -Section 2.2 and 2.3 so long as you have an agreement in place with the -subcontractor containing confidentiality restrictions no less stringent than -those contained in this Agreement. You will remain liable for your -subcontractors' adherence to the terms of this Agreement and for any and all -acts and omissions of such subcontractors with respect to this Agreement and -the Licensed Software. - -3. LICENSE LIMITATIONS AND RESTRICTIONS. - -3.1. The licenses granted above in Section 2.3 only extend to NXP intellectual -property rights that would be infringed by the Licensed Software prior to your -preparation of any derivative work. - -3.2. The Licensed Software is licensed to you, not sold. Title to Licensed -Software delivered hereunder remains vested in NXP or NXP's licensor and cannot -be assigned or transferred. You are expressly forbidden from selling or -otherwise distributing the Licensed Software, or any portion thereof, except as -expressly permitted herein. This Agreement does not grant to you any implied -rights under any NXP or third party intellectual property. - -3.3. You may not translate, reverse engineer, decompile, or disassemble the -Licensed Software except to the extent applicable law specifically prohibits -such restriction. You must prohibit your sublicensees from translating, -reverse engineering, decompiling, or disassembling the Licensed Software except -to the extent applicable law specifically prohibits such restriction. - -3.4. You must reproduce any and all of NXP's (or its third party licensor's) -copyright notices and other proprietary legends on copies of Licensed Software. - - -3.5. If you distribute the Licensed Software to the United States Government, -then the Licensed Software is "restricted computer software" and is subject to -FAR 52.227-19 (c)(1) and (c)(2). - -3.6. You grant to NXP a non-exclusive, non-transferable, irrevocable, +2. LICENSE GRANT. + +2.1. If you are not expressly granted the production use 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. + +2.2. Internal Use 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: + +(a) to use and reproduce the Licensed Software (and its Derivative Works +prepared under the license in Section 2.2(b)); and + +(b) for Licensed Software provided to you in source code form (human +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: + +(a) to manufacture (or have manufactured), distribute, and market +the Licensed Software (and its Derivative Works prepared under the license in +2.2(b)) in object code (machine readable format) only as part of, or embedded +within, Authorized Systems and not on a standalone basis. Notwithstanding the +foregoing, those files marked as .h files ("Header files") may be distributed +in source or object code form, but only as part of, or embedded within +Authorized Systems; and + +(b) to copy and distribute as needed, solely in connection with an +Authorized System, non-confidential NXP information provided as part of the +Licensed Software for the purpose of maintaining and supporting Authorized +Systems with which the Licensed Software is integrated. + +2.4 Separate license grants to Third Party Software, or other terms +applicable to the Licensed Software if different from those granted in this +Section 2, are contained in Appendix A. The Licensed Software may be +accompanied by a Software Content Register which will identify that portion of +the Licensed Software, if any, that is subject to the different terms in +Appendix A. + +2.5. You may use subcontractors on your premises to exercise your +rights under Section 2.2 and Section 2.3, if any, so long as you have an +agreement in place with the subcontractor containing confidentiality +restrictions no less stringent than those contained in this Agreement. You will +remain liable for your subcontractors' adherence to the terms of this Agreement +and for any and all acts and omissions of such subcontractors with respect to +this Agreement and the Licensed Software. + +3. LICENSE LIMITATIONS AND RESTRICTIONS. + +3.1. The licenses granted above in Section 2 only extend to NXP +Intellectual Property Rights that would be infringed by the unmodified Licensed +Software prior to your preparation of any Derivative Work. + +3.2. The Licensed Software is licensed to you, not sold. Title to +Licensed Software delivered hereunder remains vested in NXP or NXP's licensor +and cannot be assigned or transferred. You are expressly forbidden from selling +or otherwise distributing the Licensed Software, or any portion thereof, except +as expressly permitted herein. This Agreement does not grant to you any implied +rights under any NXP or third party Intellectual Property Rights. + +3.3. You may not translate, reverse engineer, decompile, or disassemble +the Licensed Software except to the extent applicable law specifically +prohibits such restriction. You must prohibit your subcontractors or customers +(if distribution is permitted) from translating, reverse engineering, +decompiling, or disassembling the Licensed Software except to the extent +applicable law specifically prohibits such restriction. + +3.4. You must reproduce any and all of NXP's (or its third-party +licensor's) copyright notices and other proprietary legends on copies of +Licensed Software. + +3.5. If you distribute the Licensed Software to the United States +Government, then the Licensed Software is "restricted computer software" and is +subject to FAR 52.227-19. + +3.6. You grant to NXP a non-exclusive, non-transferable, irrevocable, perpetual, worldwide, royalty-free, sub-licensable license under your Intellectual Property Rights to use without restriction and for any purpose any suggestion, comment or other feedback related to the Licensed Software (including, but not limited to, error corrections and bug fixes). -3.7. You will not take or fail to take any action that could subject the -Licensed Software to an Excluded License. An Excluded License means any license -that requires, as a condition of use, modification or distribution of software -subject to the Excluded License, that such software or other software 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. - -4. OPEN SOURCE. Open source software included in the -Licensed Software is not licensed under the terms of this Agreement but is -instead licensed under the terms of the applicable open source license(s), such -as the BSD License, Apache License or the GNU Lesser General Public License. -Your use of the open source software is subject to the terms of each applicable -license. You must agree to the terms of each applicable license, or you cannot -use the open source software. - -5. INTELLECTUAL PROPERTY RIGHTS. Subject to NXP's ownership -interest in the underlying Licensed Software, all intellectual property rights -associated with, and title to, your Authorized System will be retained by or -will vest in you. Your modifications to the Licensed Software, and all -intellectual property rights associated with, and title thereto, will be the -property of NXP. Upon request, you must provide NXP the source code of any -derivative of the Licensed Software. You agree to assign all, and hereby do -assign all rights, title, and interest to any such modifications to the -Licensed Software to NXP and agree to provide all assistance reasonably -requested by NXP to establish, preserve or enforce such right. Further, you -agree to waive all moral rights relating to your modifications to the Licensed -Software, including, without limitation, all rights of identification of -authorship and all rights of approval, restriction, 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 licensees. - -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, a NXP Affiliate or subsidiary, or a -NXP licensee of the Licensed Software for infringement of your Intellectual +3.7. You will not take or fail to take any action that could subject +the Licensed Software to an Excluded License. An Excluded License means any +license that requires, as a condition of use, modification or distribution of +software subject to the Excluded License, that such software or other software +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 + +4. OPEN SOURCE. Open source software included in the Licensed +Software is not licensed under the terms of this Agreement but is instead +licensed under the terms of the applicable open source license(s), such as the +BSD License, Apache License or the GNU Lesser General Public License. Your use +of the open source software is subject to the terms of each applicable license. +You must agree to the terms of each applicable license, or you cannot use the +open source software. + +5. INTELLECTUAL PROPERTY RIGHTS. Your modifications to the Licensed +Software, and all Intellectual Property Rights associated with, and title +thereto, will be the property of NXP. Upon request, you must provide NXP the +source code of any derivative of the Licensed Software. You agree to assign +all, and hereby do assign all rights, title, and interest to any such +modifications to the Licensed Software to NXP and agree to provide all +assistance reasonably requested by NXP to establish, preserve or enforce such +right. Further, you agree to waive all moral rights relating to your +modifications to the Licensed Software, including, without limitation, all +rights of identification of authorship and all rights of approval, restriction, +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. You are solely responsible for obtaining -licenses for any relevant Essential Patents for your use in connection with -technology that you incorporate into your product (whether as part of the -Licensed Software or not). +7. 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 terminated as provided in this Section 8. +8. 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 to NXP at -the address provided below. +8.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 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 +8.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 +8.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 +obligations or the license restrictions under this Agreement; become bankrupt, +insolvent, or file a petition for bankruptcy or insolvency; make an assignment 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 its business or assets. - -8.4. Upon termination of this Agreement, all licenses granted under Section 2 -will expire, except that any licenses extended to end-users pursuant to -Sections 2.2(b), 2.2(c), and 2.3(b), which have been granted prior to such -termination will survive. - -8.5. After termination of this Agreement by either party and upon NXP's written -request, you will, at your discretion, return to the NXP any confidential -information including all copies thereof or furnish to NXP at the address -below, a statement certifying, with respect to the Licensed Software delivered -hereunder that the original and all copies, except for archival copies to be -used solely for dispute resolution purposes, in whole or in part, in any form, -of the Licensed Software have been destroyed. - -8.6. Notwithstanding the termination of this Agreement for any reason, the -terms of Sections 1, 3, 5 through 25 will survive. - -9. SUPPORT. NXP is not obligated to provide any support, upgrades -or new releases of the Licensed Software under this Agreement. If you wish, you +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 +Section 2 will expire. + +8.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. + +9. 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 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 +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 +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). -10. 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 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 +11. 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 contractors or distributee's use, if permitted) -of the Licensed Software or (2) your violation of the terms and conditions of -this Agreement. +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 +12. 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), 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 TIME, INCONVENIENCE, COMMERCIAL LOSS, OR LOST PROFITS, SAVINGS, OR REVENUES, TO -THE FULL EXTENT SUCH MAY BE DISCLAIMED BY LAW. NXP'S TOTAL LIABILITY FOR ALL +THE FULL EXTENT SUCH MAY BE DISCLAIMED BY LAW. NXP'S TOTAL LIABILITY FOR ALL COSTS, DAMAGES, CLAIMS, OR LOSSES WHATSOEVER ARISING OUT OF OR IN CONNECTION 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 TO WHICH LOSSES OR DAMAGES ARE CLAIMED. - +SOFTWARE PROVIDED UNDER THIS AGREEMENT TO WHICH LOSSES OR DAMAGES ARE CLAIMED. -13. EXPORT COMPLIANCE. Each party shall comply with all applicable +13. 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 Regulations (including prohibited party lists issued -by other federal governments), Catch-all regulations and all national and +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 @@ -293,88 +288,75 @@ 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 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 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 "Commercial Item" as defined in 48 C.F.R. §2.101, consisting -of "Commercial Computer Software", and/or "Commercial Computer Software -Documentation," as such terms are used in 48 C.F.R. §12.212 (or 48 C.F.R. -§227.7202, as applicable) and may only be licensed to or shared with U.S. -Government end users in object code form as part of, or embedded within, -Authorized Systems. Any agreement pursuant to which you share the Licensed -Software will include a provision that reiterates the limitations of this -document and requires all sub-agreements to similarly contain such limitations. - -15. SAFETY CRITICAL APPLICATIONS - -15.1. In some cases, NXP may promote certain Licensed Software -for use in safety-related applications. NXP's goal is to educate licensees so -that they can design their own end-product solutions to meet applicable -functional safety standards and requirements. 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. Accordingly, you 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 your incorporation of any -product in a safety-critical application or system. - -15.2. Only Licensed Software that NXP has specifically -designated as "Automotive Qualified" is intended for use in automotive, -military, or aerospace applications or environments. If you use Licensed -Software that has not been designated as "Automotive Qualified" in an -automotive, military, or aerospace application or environment, you do so at -your own risk. - -15.3. Licensed Software is not intended or authorized for any -use in anti-personnel landmines. - -16. CHOICE OF LAW; VENUE. This Agreement will be governed by, +14. GOVERNMENT CONTRACT COMPLIANCE + +14.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 +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 +"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 +C.F.R. Section 227.7202, as applicable) and may only be licensed to or shared +with U.S. Government end users in object code form as part of, or embedded +within, Authorized Systems. Any agreement pursuant to which you share the +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, 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 be subject to the exclusive jurisdiction of the courts of Amsterdam, The -Netherlands. The United Nations Convention on Contracts for the International +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 +17. 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, with respect to Licensed Software in source code form -(human readable), or for a period of five (5) years from the date of -termination of this Agreement, with respect to all other parts of the Licensed -Software. During this period, you may not disclose any part of the Licensed -Software to anyone other than employees, or sub-contractors in accordance with -Section 2.4 who have a need to know of the Licensed Software and who have -executed written agreements obligating them to protect such Licensed Software -to at least the same degree of care as in this Agreement. You agree to use the -same degree of care, but no less than a reasonable degree of care, with the -Licensed Software as you do with your own confidential information. You may -disclose Licensed Software to the extent required by a court or under operation -of law or order provided that you notify NXP of such requirement prior to -disclosure, which you only disclose information required, and that you allow -NXP the opportunity to object to such court or other legal body requiring such +confidence perpetually. You may not disclose any part of the Licensed Software +to anyone other than distributees in accordance with Section 2.3 and employees, +or subcontractors in accordance with Section 2.5, who have a need to know of +the Licensed Software and who have executed written agreements obligating them +to protect such Licensed Software to at least the same degree of +confidentiality as in this Agreement. You agree to use the same degree of care, +but no less than a reasonable degree of care, with the Licensed Software as you +do with your own confidential information. You may disclose Licensed Software +to the extent required by a court or under operation of law or order provided +that you notify NXP of such requirement prior to disclosure, which you only +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 names, or logos. +18. TRADEMARKS. You are not authorized to use any NXP trademarks, brand +names, or logos. -19. 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. +19 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 +20. 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 @@ -383,211 +365,208 @@ 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 Agreement will not operate or be construed as a waiver of any other or a +21. 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 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 accountant to examine and audit, at NXP's expense, not more -than once a year, and during normal business hours, all such records that may -bear upon your 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. 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 +accountant to examine and audit, at NXP's expense, not more than once a year, +and during normal business hours, all such records that may bear upon your +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 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 - - ATTN: Legal Department + 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. - - You: The address provided at registration will -be used. - -24. 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 +24. 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 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 or delayed. NXP may assign this Agreement, or any part of -this Agreement, in its sole discretion. - - - - +25. 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 +or delayed. NXP may assign this Agreement, or any part of this Agreement, in +its sole discretion. APPENDIX A Other License Grants and Restrictions: The Licensed Software may include some or all of the following software, which -is either 1) not NXP proprietary software or 2) NXP proprietary software -subject to different terms than those in the Agreement. If the Software -Content Register that accompanies the Licensed Software identifies any of the -following Third Party Software or specific components of the NXP Proprietary -Software, the following terms apply to the extent they deviate from the terms -in the Agreement: - - - -Third Party Software Use Restrictions - -Amphion Semiconductor Ltd. -Distribution of Amphion software must be a part of, or embedded within, -Authorized Systems that include an Amphion Video Decoder. - -Atheros -Use of Atheros software is limited to evaluation and demonstration only. -Permitted distributions must be similarly limited. Further rights must be -obtained directly from Atheros. - -ATI (AMD) -Distribution of ATI software must be a part of, or embedded within, Authorized -Systems that include a ATI graphics processor core. - -Broadcom Corporation -Your use of Broadcom Corporation software is restricted to Authorized Systems -that incorporate a compatible integrated circuit device manufactured or sold by -Broadcom. - -Cadence Design Systems -Use of Cadence audio codec software is limited to evaluation and demonstration -only of one copy embedded in a single NXP Product. Further rights must be -obtained from Cadence. The license granted herein to the Cadence Design Systems -HiFi aacPlus Audio Decoder software does not include a license to the AAC -family of technologies which you or your customer may need to obtain. -Configuration tool outputs may only be distributed by licensees of the relevant -Cadence SDK and distribution is limited to distribution of one copy embedded in -a single NXP Product. - -Cirque Corporation -Use of Cirque Corporation technology is limited to evaluation, demonstration, -or certification testing only. Permitted distributions must be similarly -limited. Further rights, including but not limited to ANY commercial -distribution rights, must be obtained directly from Cirque Corporation. - -Coding Technologies (Dolby Labs) -Use of CTS software is limited to evaluation and demonstration only. Permitted -distributions must be similarly limited. Further rights must be obtained from -Dolby Laboratories. - -CSR -Use of Cambridge Silicon Radio, Inc. ("CSR") software is limited to evaluation +is either 1) Third Party Software or 2) NXP proprietary software subject to +different terms than those in the Agreement. If the Software Content Register +that accompanies the Licensed Software identifies any of the following Third +Party Software or specific components of the NXP proprietary software, the +following terms apply to the extent they deviate from the terms in the +Agreement: + +Amazon: Use of the Amazon software constitutes your acceptance of the terms of +the Amazon Program Materials License Agreement (including the AVS Component +Schedule, if applicable), located at +https://developer.amazon.com/support/legal/pml. All Amazon software is hereby +designated "Amazon confidential". Amazon is a third-party beneficiary to this +Agreement with respect to the Amazon software. + +Amphion Semiconductor Ltd.: Distribution of Amphion software must be a part of, +or embedded within, Authorized Systems that include an Amphion Video Decoder. + +Aquantia Corp.: You may use Aquantia's API binaries solely to flash the API +software to an NXP Product which mates with an Aquantia device. + +Atheros: Use of Atheros software is limited to evaluation and demonstration +only. Permitted distributions must be similarly limited. Further rights must +be obtained directly from Atheros. + +ATI (AMD): Distribution of ATI software must be a part of, or embedded within, +Authorized Systems that include a ATI graphics processor core. + +Broadcom Corporation: Your use of Broadcom Corporation software is restricted +to Authorized Systems that incorporate a compatible integrated circuit device +manufactured or sold by Broadcom. + +Cadence Design Systems: Use of Cadence audio codec software is limited to +distribution only of one copy per single NXP Product. The license granted +herein to the Cadence Design Systems HiFi aacPlus Audio Decoder software does +not include a license to the AAC family of technologies which you or your +customer may need to obtain. Configuration tool outputs may only be distributed +by licensees of the relevant Cadence SDK and distribution is limited to +distribution of one copy embedded in a single NXP Product. + +Cirque Corporation: Use of Cirque Corporation technology is limited to +evaluation, demonstration, or certification testing only. Permitted +distributions must be similarly limited. Further rights, including but not +limited to ANY commercial distribution rights, must be obtained directly from +Cirque Corporation. + +Coding Technologies (Dolby Labs): Use of CTS software is limited to evaluation and demonstration only. Permitted distributions must be similarly limited. -Further rights must be obtained directly from CSR. - -NXP Wireless Charging Library -License to the Software is limited to use in inductive coupling or wireless -charging applications - -Global Locate (Broadcom Corporation) -Use of Global Locate, Inc. software is limited to evaluation and demonstration -only. Permitted distributions must be similarly limited. Further rights must -be obtained from Global Locate. - -Imagination Technologies Limited (IMG) -If the Licensed Software includes proprietary software developed by IMG, your -rights are limited to a non-exclusive, world-wide right and nontransferable and -non-sub-licensable license (i) to use and modify the Licensed Software and -documentation and (ii) to copy and distribute the Licensed Software only in -object code form solely for use on NXP Rayleigh products. If you are provided -with the Licensed Software in source code format, you are restricted to -accessing only those deliverables in source code format which are necessary for -you to carry out either specific customization or porting work in association -with NXP's Rayleigh products or your Authorized System. - -The confidentiality restrictions shall continue in force without limit in time -notwithstanding the termination or expiration of this Agreement. - -Micrium -uC/OS-II and uC/OS-III is provided in source form for FREE short-term -evaluation, for educational use or for peaceful research. If you plan or -intend to use uC/OS-II or uC/OS-III in a commercial application/product then, -you need to contact Micrium to properly license uC/OS-II or uC/OSIII for its -use in your application/product. We provide ALL the source code for your -convenience and to help you experience uC/OS-II or uC/OSIII. The fact that the -source is provided does NOT mean that you can use it commercially without -paying a licensing fee. - -Microsoft -If the Licensed Software includes software owned by Microsoft -Corporation ("Microsoft"), it is subject to the terms of your license with -Microsoft (the "Microsoft Underlying Licensed Software") and as such, NXP -grants no license to you, beyond evaluation and demonstration in connection -with NXP processors, in the Microsoft Underlying Licensed Software. You must -separately obtain rights beyond evaluation and demonstration in connection with -the Microsoft Underlying Licensed Software from Microsoft. - -Microsoft does not provide support services for the components provided to you -through this Agreement. If you have any questions or require technical -assistance, please contact NXP. Microsoft Corporation is a third party -beneficiary to this Agreement with the right to enforce the terms of this -Agreement. TO THE MAXIMUM EXTENT PERMITTED BY LAW, MICROSOFT AND ITS -AFFILIATES DISCLAIM ANY WARRANTIES FOR THE -MICROSOFT UNDERLYING LICENSED SOFTWARE. TO THE MAXIMUM -EXTENT PERMITTED BY LAW, NEITHER MICROSOFT NOR ITS AFFILIATES -WILL BE LIABLE, WHETHER IN CONTRACT, TORT, OR OTHERWISE, FOR ANY -DIRECT, INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE -DAMAGES, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR ANY LOSS -OF USE, LOSS OF TIME, INCONVENIENCE, COMMERCIAL LOSS, OR LOST PROFITS, SAVINGS, -OR REVENUES, ARISING FROM THE FROM THE USE OF THE MICROSOFT UNDERLYING LICENSED -SOFTWARE. - -MindTree -Notwithstanding the terms contained in Section 2.3 (a), if the Licensed -Software includes proprietary software of MindTree in source code format, -Licensee may make modifications and create derivative works only to the extent -necessary for debugging of the Licensed Software. - -MPEG LA -Use of MPEG LA audio or video codec technology is limited to evaluation and +Further rights must be obtained from Dolby Laboratories. + +CSR: Use of Cambridge Silicon Radio, Inc. ("CSR") software is limited to +evaluation and demonstration only. Permitted distributions must be similarly +limited. Further rights must be obtained directly from CSR. + +Crank: Use of Crank Software Inc. software is limited to evaluation and demonstration only. Permitted distributions must be similarly limited. Further -rights must be obtained directly from MPEG LA. - -MQX RTOS Code -MQX RTOS source code may not be re-distributed by any NXP Licensee under any -circumstance, even by a signed written amendment to this Agreement. - -Opus -Use of Opus software must be consistent with the terms of the Opus license -which can be found at: http://www.opus-codec.org/license/ - -Qualcomm Atheros, Inc. -Notwithstanding anything in this Agreement, Qualcomm Atheros, Inc. Wi-Fi -software must be used strictly in accordance with the Qualcomm Atheros, Inc. -Technology License Agreement that accompanies such software. Any other use is -expressly prohibited. - -Real Networks - its GStreamer Optimized Real Format Client Code implementation -or OpenMax Optimized Real Format Client Code -Use of the GStreamer Optimized Real Format Client Code, or OpenMax Optimized -Real Format Client code is restricted to applications in the automotive market. - Licensee must be a final manufacturer in good standing with a current license -with Real Networks for the 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. +rights must be obtained directly from Crank Software Inc. + +Cypress Semiconductor Corporation: WWD RTOS source code may only be used in +accordance with the Cypress IOT Community License Agreement located at +https://community.cypress.com/terms-and-conditions!input.jspa?displayOnly=true. + +Embedded Systems Academy GmbH (EmSA): Any use of Micro CANopen Plus is subject +to the acceptance of the license conditions described in the LICENSE.INFO file +distributed with all example projects and in the documentation and the +additional clause described below. + +Clause 1: Micro CANopen Plus 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 EmSA. + +Future Technology Devices International Ltd.: Future Technology Devices +International software must be used consistent with the terms found here: +http://www.ftdichip.com/Drivers/FTDriverLicenceTerms.htm + +Global Locate (Broadcom Corporation): Use of Global Locate, Inc. software is +limited to evaluation and demonstration only. Permitted distributions must be +similarly limited. Further rights must be obtained from Global Locate. + +Microsoft: Except for Microsoft PlayReady software, if the Licensed Software +includes software owned by Microsoft Corporation ("Microsoft"), it is subject +to the terms of your license with Microsoft (the "Microsoft Underlying Licensed +Software") and as such, NXP grants no license to you, beyond evaluation and +demonstration in connection with NXP processors, in the Microsoft Underlying +Licensed Software. You must separately obtain rights beyond evaluation and +demonstration in connection with the Microsoft Underlying Licensed Software +from Microsoft. Microsoft does not provide support services for the components +provided to you through this Agreement. If you have any questions or require +technical assistance, please contact NXP. Microsoft Corporation is a third +party beneficiary to this Agreement with the right to enforce the terms of this +Agreement. TO THE MAXIMUM EXTENT PERMITTED BY LAW, MICROSOFT AND ITS +AFFILIATES DISCLAIM ANY WARRANTIES FOR THE MICROSOFT UNDERLYING LICENSED +SOFTWARE. TO THE MAXIMUM EXTENT PERMITTED BY LAW, NEITHER MICROSOFT NOR ITS +AFFILIATES WILL BE LIABLE, WHETHER IN CONTRACT, TORT, OR OTHERWISE, FOR ANY +DIRECT, INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES, +INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR ANY LOSS OF USE, LOSS OF TIME, +INCONVENIENCE, COMMERCIAL LOSS, OR LOST PROFITS, SAVINGS, OR REVENUES, ARISING +FROM THE FROM THE USE OF THE MICROSOFT UNDERLYING LICENSED SOFTWARE. With +respect to the Microsoft PlayReady software, you will have the license rights +granted in Section 2, provided that you may not use the Microsoft PlayReady +software unless you have entered into a Microsoft PlayReady Master Agreement +and license directly with Microsoft. + +MindTree: Notwithstanding the terms contained in Section 2.3 (a), if the +Licensed Software includes proprietary software of MindTree in source code +format, Licensee may make modifications and create derivative works only to the +extent necessary for debugging of the Licensed Software. + +MM SOLUTIONS AD: Use of MM SOLUTIONS AEC (Auto Exposure Control) and AWB (Auto +White Balance) software is limited to demonstration, testing, and evaluation +only. In no event may Licensee distribute or sublicense the MM SOLUTIONS +software. Further rights must be obtained directly from MM SOLUTIONS. + +MPEG LA: Use of MPEG LA audio or video codec technology is limited to +evaluation and demonstration only. Permitted distributions must be similarly +limited. Further rights must be obtained directly from MPEG LA. + +MQX RTOS Code: MQX RTOS source code may not be re-distributed by any NXP +Licensee under any circumstance, even by a signed written amendment to this +Agreement. + +NXP Wireless Charging Library: License to the Software is limited to use in +inductive coupling or wireless charging applications + +Opus: Use of Opus software must be consistent with the terms of the Opus +license which can be found at: http://www.opus-codec.org/license/ + +Oracle JRE (Java): The Oracle JRE must be used consistent with terms found +here: http://java.com/license + +P&E Micro: P&E Software must be used consistent with the terms found here: +http://www.pemicro.com/licenses/gdbserver/license_gdb.pdf + +Pro Design Electronic: Licensee may not modify, create derivative works based +on, or copy the Pro Design software, documentation, hardware execution key or +the accompanying materials. Licensee shall not use Pro Design's or any of its +licensors names, logos or trademarks to market the Authorized System. Only NXP +customers and distributors are permitted to further redistribute the Pro Design +software and only as part of an Authorized System which contains the Pro Design +software. + +Qualcomm Atheros, Inc.: Notwithstanding anything in this Agreement, Qualcomm +Atheros, Inc. Wi-Fi software must be used strictly in accordance with the +Qualcomm Atheros, Inc. Technology License Agreement that accompanies such +software. Any other use is expressly prohibited. + +Real Networks - GStreamer Optimized Real Format Client Code implementation or +OpenMax Optimized Real Format Client Code: Use of the GStreamer Optimized Real +Format Client Code, or OpenMax Optimized Real Format Client code is restricted +to applications in the automotive market. Licensee must be a final +manufacturer in good standing with a current license with Real Networks for the +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 @@ -606,24 +585,25 @@ 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 intellectual property. Such use constitutes a breach of this -Agreement. Any such use rights must be obtained directly from RivieraWaves. +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 +intellectual property. Such use constitutes a breach of this Agreement. Any +such use rights must be obtained directly from RivieraWaves. -SanDisk Corporation -If the Licensed Software includes software developed by SanDisk Corporation -("SanDisk"), you must separately obtain the rights to reproduce and distribute -this software in source code form from SanDisk. Please follow these easy steps -to obtain the license and software: +SanDisk Corporation: If the Licensed Software includes software developed by +SanDisk Corporation ("SanDisk"), you must separately obtain the rights to +reproduce and distribute this software in source code form from SanDisk. +Please follow these easy steps to obtain the license and software: -1. Contact your local SanDisk sales representative to obtain the SanDisk +(1) Contact your local SanDisk sales representative to obtain the SanDisk License Agreement. -2. Sign the license agreement. Fax the signed agreement to SanDisk USA + +(2) Sign the license agreement. Fax the signed agreement to SanDisk USA marketing department at 408-542-0403. The license will be valid when fully executed by SanDisk. -3. If you have specific questions, please send an email to sales@sandisk.com + +(3) If you have specific questions, please send an email to sales@sandisk.com You may only use the SanDisk Corporation Licensed Software on products compatible with a SanDisk Secure Digital Card. You may not use the SanDisk @@ -631,29 +611,43 @@ Corporation Licensed Software on any memory device product. SanDisk retains all rights to any modifications or derivative works to the SanDisk Corporation Licensed Software that you may create. -SEGGER Microcontroller -Your use of SEGGER emWin software is restricted to NXP ARM7, ARM9, Cortex-M0, -Cortex-M3, and Cortex-M4 based devices only. +SEGGER Microcontroller - emWin Software: Your use of SEGGER emWin software and +components is restricted for development of NXP ARM7, ARM9, Cortex-M0, +Cortex-M3, Cortex-M4, Cortex-M33, Cortex-M7, and Cortex-A7 based products only. + +SEGGER Microcontroller - J-Link/J-Trace Software: Segger software must be used +consistent with the terms found here: http://www.segger.com/jlink-software.html -Synopsys/Target Compiler Technologies -Your use of the Synopsys/Target Compiler Technologies Licensed Software and -related documentation is subject to the following: +Synopsys/Target Compiler Technologies: Your use of the Synopsys/Target Compiler +Technologies Licensed Software and related documentation is subject to the +following: -* Duration of the license for the Licensed Software is limited to 12 -months, unless otherwise specified in the license file. -* The Licensed Software is usable by one user at a time on a single +(1) Duration of the license for the Licensed Software is limited to 12 months, +unless otherwise specified in the license file. + +(2) The Licensed Software is usable by one user at a time on a single designated computer, unless otherwise agreed by Synopsys. -* Licensed Software and documentation are to be used only on a designated + +(3) Licensed Software and documentation are to be used only on a designated computer at the designated physical address provided by you on the APEX license form. -* The Licensed Software is not sub-licensable. +(4) The Licensed Software is not sub-licensable. + +TARA Systems: Use of TARA Systems GUI technology Embedded Wizard is limited to +evaluation and demonstration only. Permitted distributions must be similarly +limited. Further rights must be obtained directly from TARA Systems. + +Texas Instruments: Your use of Texas Instruments Inc. WiLink8 Licensed Software +is restricted to NXP SoC based systems that include a compatible connectivity +device manufactured by TI. -Texas Instruments -Your use of Texas Instruments Inc. WiLink8 Licensed Software is restricted to -NXP SoC based systems that include a compatible connectivity device -manufactured by TI. +TES Electronic Solutions Germany (TES): TES 3D Surround View software and +associated data and documentation may only be used for evaluation purposes and +for demonstration to third parties in integrated form on a board package +containing an NXP S32V234 device. Licensee may not distribute or sublicense the +TES software. Your license to the TES software may be terminated at any time +upon notice. -Vivante -Distribution of Vivante software must be a part of, or embedded within, -Authorized Systems that include a Vivante Graphics Processing Unit. +Vivante: Distribution of Vivante software must be a part of, or embedded +within, Authorized Systems that include a Vivante Graphics Processing Unit. diff --git a/bsp/meta-freescale/README b/bsp/meta-freescale/README index 1f40864b..6745e069 100644 --- a/bsp/meta-freescale/README +++ b/bsp/meta-freescale/README @@ -13,26 +13,22 @@ revision: HEAD Contributing ------------ -To contribute to this layer you should submit the patches for review to the -mailing list (meta-freescale@yoctoproject.org). +Please submit any patches against the `meta-freescale` layer by using the +GitHub pull-request feature. Fork the repo, make a branch, do the +work, rebase from upstream, create the pull request. -Please refer to: +For some useful guidelines to be followed when submitting patches, +please refer to: http://openembedded.org/wiki/Commit_Patch_Message_Guidelines -for some useful guidelines to be followed when submitting patches. +Pull requests will be discussed within the GitHub pull-request +infrastructure. If you want to get informed on new PRs and the +follow-up discussions please use the GitHub's notification system. Mailing list: - https://lists.yoctoproject.org/listinfo/meta-freescale + https://lists.yoctoproject.org/g/meta-freescale Source code: https://github.com/Freescale/meta-freescale - -When creating patches, please use something like: - - git format-patch -s origin - -When sending patches, please use something like: - - git send-email --to meta-freescale@yoctoproject.org diff --git a/bsp/meta-freescale/classes/dtc-145.bbclass b/bsp/meta-freescale/classes/dtc-145.bbclass deleted file mode 100644 index d4a30711..00000000 --- a/bsp/meta-freescale/classes/dtc-145.bbclass +++ /dev/null @@ -1,7 +0,0 @@ -# Use this class for U-Boot 2017.03 or older. - -DEPENDS_append = " dtc-145-native" - -do_configure_prepend () { - sed -i -e 's/^DTC[[:space:]]*=[[:space:]]*dtc[[:space:]]*$/DTC = dtc-145/' ${S}/Makefile -} diff --git a/bsp/meta-freescale/classes/fsl-dynamic-packagearch.bbclass b/bsp/meta-freescale/classes/fsl-dynamic-packagearch.bbclass index a7cc53fc..9fcf37be 100644 --- a/bsp/meta-freescale/classes/fsl-dynamic-packagearch.bbclass +++ b/bsp/meta-freescale/classes/fsl-dynamic-packagearch.bbclass @@ -26,22 +26,22 @@ # Copyright 2013-2016 (C) O.S. Systems Software LTDA. python __anonymous () { - machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split()) - machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER", True) or "").split()) + machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER") or "").split()) + machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER") or "").split()) if machine_socarch_filter or machine_arch_filter: - provides = set((d.getVar("PROVIDES", True) or "").split()) - depends = set((d.getVar("DEPENDS", True) or "").split()) - PN = d.getVar("PN", True) + provides = set((d.getVar("PROVIDES") or "").split()) + depends = set((d.getVar("DEPENDS") or "").split()) + PN = d.getVar("PN") package_arch = None if list(machine_arch_filter & (provides | depends)): - package_arch = d.getVar("MACHINE_ARCH", True) + package_arch = d.getVar("MACHINE_ARCH") elif list(machine_socarch_filter & (provides | depends)): - package_arch = d.getVar("MACHINE_SOCARCH", True) + package_arch = d.getVar("MACHINE_SOCARCH") if not package_arch: raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH as MACHINE_SOCARCH_FILTER is set for this SoC.") - machine_socarch_suffix = d.getVar("MACHINE_SOCARCH_SUFFIX", True) + machine_socarch_suffix = d.getVar("MACHINE_SOCARCH_SUFFIX") if not machine_socarch_suffix: raise bb.parse.SkipPackage("You must set MACHINE_SOCARCH_SUFFIX as MACHINE_SOCARCH_FILTER is set for this SoC.") @@ -49,18 +49,18 @@ python __anonymous () { bb.debug(1, "Use '%s' as package architecture for '%s'" % (package_arch, PN)) d.setVar("PACKAGE_ARCH", package_arch) - cur_package_archs = (d.getVar("PACKAGE_ARCHS", True) or "").split() - machine_socarch = (d.getVar("MACHINE_SOCARCH", True) or "") + cur_package_archs = (d.getVar("PACKAGE_ARCHS") or "").split() + machine_socarch = (d.getVar("MACHINE_SOCARCH") or "") if not machine_socarch in cur_package_archs: d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % machine_socarch) - if d.getVar("TUNE_ARCH", True) == "arm": + if d.getVar("TUNE_ARCH") == "arm": # For ARM we have two possible machine_socarch values, one for the arm and one for the thumb instruction set # add the other value to extra archs also, so that a image recipe searches both for packages. - if d.getVar("ARM_INSTRUCTION_SET", True) == "thumb": - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("ARM_EXTRA_SOCARCH", True)) + if d.getVar("ARM_INSTRUCTION_SET") == "thumb": + d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("ARM_EXTRA_SOCARCH")) else: - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("THUMB_EXTRA_SOCARCH", True)) + d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("THUMB_EXTRA_SOCARCH")) } MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" diff --git a/bsp/meta-freescale/classes/fsl-eula-unpack.bbclass b/bsp/meta-freescale/classes/fsl-eula-unpack.bbclass index 198a1944..0671da91 100644 --- a/bsp/meta-freescale/classes/fsl-eula-unpack.bbclass +++ b/bsp/meta-freescale/classes/fsl-eula-unpack.bbclass @@ -6,12 +6,67 @@ # # SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true" -LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=ab61cab9599935bfe9f700405ef00f28" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V8 = "01ba08a2b77c3a0a9d0ab5d4d83fed64" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V10 = "3880bb9c943b135a30fad5e8aabd3ee9" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V11 = "a31dce3023402a821cfcdc1bb8dbdbc0" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V12 = "8cf95184c220e247b9917e7244124c5a" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V13 = "102094e9e695888c6a9f9fda9004165d" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V14 = "d4f548f93b5fe0ee2bc86758c344412d" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V16 = "be67a88e9e6c841043b005ad7bcf8309" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V17 = "88595f92466edd79be7f4f9547ffa0ef" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V18 = "6b552f505eedab4a11ab538cf3db743a" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V20 = "08fd295cce89b0a9c74b9b83ed74f671" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V21 = "6bd2df2910a2234bf6f419b7d2f531a3" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V22 = "75abe2fa1d16ca79f87cde926f05f72d" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V24 = "ab61cab9599935bfe9f700405ef00f28" +FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V26 = "5ab1a30d0cd181e3408077727ea5a2db" +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V3 = "6dfb32a488e5fd6bae52fbf6c7ebb086" +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V5 = "80c0478f4339af024519b3723023fe28" +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V7 = "fb0303e4ee8b0e71c094171e2272bd44" +FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V8 = "72c0f70181bb6e83eee6aab8de12a9f3" +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_MD5SUMS = " \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V8} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V10} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V11} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V12} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V13} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V14} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V16} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V17} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V18} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V20} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V21} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V22} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V24} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_BASE_LICENSE_V26} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V3} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V5} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V7} \ + ${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V8} \ + ${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} \ +" + +# The checksum for the EULA in the layer +FSL_EULA_FILE_MD5SUM ?= \ + "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10}" + +LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}" +LIC_FILES_CHKSUM_append = " ${LIC_FILES_CHKSUM_LAYER}" LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE" +do_fetch_prepend() { + if "Proprietary" not in d.getVar("LICENSE"): + bb.fatal("The recipe LICENSE should include Proprietary but is " + d.getVar("LICENSE") + ".") +} + python fsl_bin_do_unpack() { - src_uri = (d.getVar('SRC_URI', True) or "").split() + src_uri = (d.getVar('SRC_URI') or "").split() if len(src_uri) == 0: return @@ -21,32 +76,54 @@ python fsl_bin_do_unpack() { rootdir = localdata.getVar('WORKDIR', True) fetcher = bb.fetch2.Fetch(src_uri, localdata) + found = 0 for url in fetcher.ud.values(): - save_cwd = os.getcwd() - # Check for supported fetchers - if url.type in ['http', 'https', 'ftp', 'file']: - if url.parm.get('fsl-eula', False): - # If download has failed, do nothing - if not os.path.exists(url.localpath): - bb.debug(1, "Exiting as '%s' cannot be found" % url.basename) - return - - # Change to the working directory - bb.note("Handling file '%s' as a Freescale's EULA binary." % url.basename) - save_cwd = os.getcwd() - os.chdir(rootdir) - - cmd = "sh %s --auto-accept --force" % (url.localpath) - bb.fetch2.runfetchcmd(cmd, d, quiet=True) + # Skip this fetcher if it's not under EULA or if the fetcher type is not supported + if not url.parm.get('fsl-eula', False) or url.type not in ['http', 'https', 'ftp', 'file']: + continue + # If download has failed, do nothing + if not os.path.exists(url.localpath): + bb.debug(1, "Exiting as '%s' cannot be found" % url.basename) + return + found += 1 + bb.note("Handling file '%s' as a Freescale EULA-licensed archive." % url.basename) + cmd = "sh %s --auto-accept --force" % (url.localpath) + bb.fetch2.runfetchcmd(cmd, d, quiet=True, workdir=rootdir) - # Return to the previous directory - os.chdir(save_cwd) + # Check for two EULAs, one from the layer and one from the package + bb.note("Checking LIC_FILES_CHKSUM for Freescale EULA consistency...") + if found > 1: + bb.warn("The package contains multiple Freescale EULA-licensed archives. The consistency logic may not be able to detect a EULA problem.") + layer_license = d.getVar('LIC_FILES_CHKSUM_LAYER') + licenses = d.getVar('LIC_FILES_CHKSUM') or "" + md5sums = d.getVar('FSL_EULA_FILE_MD5SUMS') or "" + found_layer_license = False + found_package_license = False + for license in licenses.split(): + try: + (method, host, path, user, pswd, parm) = bb.fetch.decodeurl(license) + if method != "file" or not path: + raise bb.fetch.MalformedUrl() + except bb.fetch.MalformedUrl: + bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF'), license)) + if license == layer_license: + bb.note("Found Freescale EULA for the layer %s." % license) + found_layer_license = True + elif parm.get('md5') in md5sums: + bb.note("Found Freescale EULA for the package %s." % license) + found_package_license = True + if not found_layer_license: + bb.fatal("The Freescale layer EULA '%s' is not listed in LIC_FILES_CHKSUM '%s'." + % (layer_license, licenses)) + if not found_package_license: + bb.fatal("A valid package EULA with md5sum in %s was not found in LIC_FILES_CHKSUM '%s'." + % (md5sums.split(), licenses)) } python do_unpack() { - eula = d.getVar('ACCEPT_FSL_EULA', True) - eula_file = d.getVar('FSL_EULA_FILE', True) - pkg = d.getVar('PN', True) + eula = d.getVar('ACCEPT_FSL_EULA') + eula_file = d.getVar('FSL_EULA_FILE') + pkg = d.getVar('PN') if eula == None: bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. " "Please read it and in case you accept it, write: " diff --git a/bsp/meta-freescale/classes/fsl-vivante-kernel-driver-handler.bbclass b/bsp/meta-freescale/classes/fsl-vivante-kernel-driver-handler.bbclass index e0578f4e..8ac8a334 100644 --- a/bsp/meta-freescale/classes/fsl-vivante-kernel-driver-handler.bbclass +++ b/bsp/meta-freescale/classes/fsl-vivante-kernel-driver-handler.bbclass @@ -41,9 +41,9 @@ python fsl_vivante_kernel_driver_handler () { return if use_vivante_kernel_driver_module != "1": - e.data.appendVar('RPROVIDES_kernel-base', ' kernel-module-imx-gpu-viv') - e.data.appendVar('RREPLACES_kernel-base', ' kernel-module-imx-gpu-viv') - e.data.appendVar('RCONFLICTS_kernel-base', ' kernel-module-imx-gpu-viv') + e.data.appendVar('RPROVIDES_${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv') + e.data.appendVar('RREPLACES_${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv') + e.data.appendVar('RCONFLICTS_${KERNEL_PACKAGE_NAME}-base', ' kernel-module-imx-gpu-viv') } addhandler fsl_vivante_kernel_driver_handler diff --git a/bsp/meta-freescale/classes/kernel-itbimage.bbclass b/bsp/meta-freescale/classes/kernel-itbimage.bbclass index 703fa616..84262879 100644 --- a/bsp/meta-freescale/classes/kernel-itbimage.bbclass +++ b/bsp/meta-freescale/classes/kernel-itbimage.bbclass @@ -12,9 +12,9 @@ python __anonymous () { else: replacementtype = "vmlinux" - # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal - # to kernel.bbclass . We have to override it, since we pack zImage - # (at least for now) into the fitImage . + # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal + # to kernel.bbclass . We have to override it, since we pack zImage + # (at least for now) into the fitImage . typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or "" if 'itbImage' in typeformake.split(): d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('itbImage', replacementtype)) diff --git a/bsp/meta-freescale/classes/machine-overrides-extender.bbclass b/bsp/meta-freescale/classes/machine-overrides-extender.bbclass index 959fdc16..4b7d66d5 100644 --- a/bsp/meta-freescale/classes/machine-overrides-extender.bbclass +++ b/bsp/meta-freescale/classes/machine-overrides-extender.bbclass @@ -15,18 +15,18 @@ # Copyright 2016-2018 (C) O.S. Systems Software LTDA. def machine_overrides_extender(d): - machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES', True) or '').split(':') + machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES') or '').split(':') # Gather the list of overrides to filter out machine_overrides_filter_out = [] for override in machine_overrides: - machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT_%s' % override, True) or '').split() + machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT_%s' % override) or '').split() # Drop any overrides of filter_out prior extending machine_overrides = [o for o in machine_overrides if o not in machine_overrides_filter_out] for override in machine_overrides: - extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % override, True) + extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % override) if extender: extender = extender.split(':') diff --git a/bsp/meta-freescale/classes/qoriq_build_64bit_kernel.bbclass b/bsp/meta-freescale/classes/qoriq_build_64bit_kernel.bbclass index 2209e339..93b4d412 100644 --- a/bsp/meta-freescale/classes/qoriq_build_64bit_kernel.bbclass +++ b/bsp/meta-freescale/classes/qoriq_build_64bit_kernel.bbclass @@ -1,4 +1,4 @@ -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES_e6500 += "multiarch" python () { @@ -12,7 +12,7 @@ python () { d.setVar('KERNEL_LD', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ld.bfd' + d.getVar('HOST_LD_KERNEL_ARCH', False) + tc_options) d.setVar('KERNEL_AR', d.getVar('CCACHE', False) + sys_multilib + '-' + 'ar' + d.getVar('HOST_AR_KERNEL_ARCH', False)) - error_qa = d.getVar('ERROR_QA', True) + error_qa = d.getVar('ERROR_QA') if 'arch' in error_qa: d.setVar('ERROR_QA', error_qa.replace(' arch', '')) } diff --git a/bsp/meta-freescale/classes/use-imx-headers.bbclass b/bsp/meta-freescale/classes/use-imx-headers.bbclass index 9dcd864d..fcec68c8 100644 --- a/bsp/meta-freescale/classes/use-imx-headers.bbclass +++ b/bsp/meta-freescale/classes/use-imx-headers.bbclass @@ -14,6 +14,24 @@ # Copyright 2018 (C) O.S. Systems Software LTDA. DEPENDS_append_imx = " linux-imx-headers" + +# Set runtime dependency of -dev for package inheriting this class to +# linux-imx-headers-dev package. This is required in order to propagate +# headers into the SDK +RDEPENDS_${PN}-dev += "linux-imx-headers-dev" + PACKAGE_ARCH_imx ?= "${MACHINE_SOCARCH}" STAGING_INCDIR_IMX = "${STAGING_INCDIR}/imx" + +# Recipes that inherit this class are contracted to use NXP BSP only. +# This is done by overriding the COMPATIBLE_HOST, as this would effectively +# cause recipes to be skipped in case if 'use-nxp-bsp' override is not +# defined for them. This effectively marks recipes that should only be +# built using NXP BSP, and gives an indication to mainline BSP creators +# that recipe is not compatible with mainline. +# +# Typical example here would be imx-vpu-hantro recipe, which requires NXP +# BSP and is not compatible with mainline. +COMPATIBLE_HOST = '(null)' +COMPATIBLE_HOST_use-nxp-bsp = '.*' diff --git a/bsp/meta-freescale/conf/layer.conf b/bsp/meta-freescale/conf/layer.conf index e171fdaa..1a22e024 100644 --- a/bsp/meta-freescale/conf/layer.conf +++ b/bsp/meta-freescale/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 = "thud" +LAYERSERIES_COMPAT_freescale-layer = "zeus dunfell" # Add the Freescale-specific licenses into the metadata LICENSE_PATH += "${LAYERDIR}/custom-licenses" @@ -16,23 +16,27 @@ LICENSE_PATH += "${LAYERDIR}/custom-licenses" FSL_EULA_FILE = "${LAYERDIR}/EULA" IMX_MIRROR ?= "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/" -QORIQ_MIRROR ?= "http://git.freescale.com/source/" # FIXME: set this to avoid changing all the recipes that use it FSL_MIRROR ?= "${IMX_MIRROR}" MIRRORS += " \ ${IMX_MIRROR} http://download.ossystems.com.br/bsp/freescale/source/ \n \ -${QORIQ_MIRROR} http://download.ossystems.com.br/bsp/freescale/source/ \n \ " 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 \ \ filesystem-layer:${LAYERDIR}/dynamic-layers/filesystem-layer/*/*/*.bb \ filesystem-layer:${LAYERDIR}/dynamic-layers/filesystem-layer/*/*/*.bbappend \ \ + 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 \ \ diff --git a/bsp/meta-freescale/conf/machine/imx25pdk.conf b/bsp/meta-freescale/conf/machine/imx25pdk.conf index e22d9f4e..9e8ad003 100644 --- a/bsp/meta-freescale/conf/machine/imx25pdk.conf +++ b/bsp/meta-freescale/conf/machine/imx25pdk.conf @@ -13,7 +13,7 @@ UBOOT_MACHINE ?= "mx25pdk_defconfig" KERNEL_DEVICETREE = "imx25-pdk.dtb" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" diff --git a/bsp/meta-freescale/conf/machine/imx28evk.conf b/bsp/meta-freescale/conf/machine/imx28evk.conf index 937fd143..7c359e54 100644 --- a/bsp/meta-freescale/conf/machine/imx28evk.conf +++ b/bsp/meta-freescale/conf/machine/imx28evk.conf @@ -18,7 +18,7 @@ UBOOT_CONFIG[sd-auart-console] = "mx28evk_auart_console_config,sdcard" KERNEL_DEVICETREE = "imx28-evk.dtb" -SERIAL_CONSOLE = "115200 ttyAMA0" +SERIAL_CONSOLES = "115200;ttyAMA0" MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" diff --git a/bsp/meta-freescale/conf/machine/imx6qdlsabreauto.conf b/bsp/meta-freescale/conf/machine/imx6qdlsabreauto.conf index 71b1cf88..16c1dcb6 100644 --- a/bsp/meta-freescale/conf/machine/imx6qdlsabreauto.conf +++ b/bsp/meta-freescale/conf/machine/imx6qdlsabreauto.conf @@ -38,9 +38,9 @@ UBOOT_MACHINE ?= "mx6sabreauto_defconfig" UBOOT_MAKE_TARGET = "all" UBOOT_SUFFIX = "img" SPL_BINARY = "SPL" -WKS_FILE = "imx-uboot-spl-bootpart.wks" +WKS_FILE = "imx-uboot-spl-bootpart.wks.in" -SERIAL_CONSOLE = "115200 ttymxc3" +SERIAL_CONSOLES = "115200;ttymxc3" MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k" diff --git a/bsp/meta-freescale/conf/machine/imx6qdlsabresd.conf b/bsp/meta-freescale/conf/machine/imx6qdlsabresd.conf index a8407e28..2fe95dc6 100644 --- a/bsp/meta-freescale/conf/machine/imx6qdlsabresd.conf +++ b/bsp/meta-freescale/conf/machine/imx6qdlsabresd.conf @@ -17,14 +17,23 @@ require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa9.inc KERNEL_DEVICETREE = " \ - imx6qp-sabresd.dtb imx6qp-sabresd-btwifi.dtb imx6qp-sabresd-hdcp.dtb \ - imx6qp-sabresd-ldo.dtb imx6qp-sabresd-ldo-pcie-cert.dtb \ - \ - imx6q-sabresd.dtb imx6q-sabresd-ldo.dtb imx6q-sabresd-hdcp.dtb \ - imx6q-sabresd-enetirq.dtb imx6q-sabresd-btwifi.dtb \ - \ - imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb imx6dl-sabresd-hdcp.dtb \ - imx6dl-sabresd-enetirq.dtb imx6dl-sabresd-btwifi.dtb \ + imx6qp-sabresd-btwifi.dtb \ + imx6qp-sabresd.dtb \ + imx6qp-sabresd-hdcp.dtb \ + imx6qp-sabresd-ldo.dtb \ + \ + imx6q-sabresd-btwifi.dtb \ + imx6q-sabresd.dtb \ + imx6q-sabresd-enetirq.dtb \ + imx6q-sabresd-hdcp.dtb \ + imx6q-sabresd-ldo.dtb \ + imx6q-sabresd-uart.dtb \ + \ + imx6dl-sabresd-btwifi.dtb \ + imx6dl-sabresd.dtb \ + imx6dl-sabresd-enetirq.dtb \ + imx6dl-sabresd-hdcp.dtb \ + imx6dl-sabresd-ldo.dtb \ " KERNEL_DEVICETREE_use-mainline-bsp = " \ imx6qp-sabresd.dtb \ @@ -38,9 +47,9 @@ UBOOT_MACHINE ?= "mx6sabresd_defconfig" UBOOT_MAKE_TARGET = "all" UBOOT_SUFFIX = "img" SPL_BINARY = "SPL" -WKS_FILE = "imx-uboot-spl-bootpart.wks" +WKS_FILE = "imx-uboot-spl-bootpart.wks.in" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k" diff --git a/bsp/meta-freescale/conf/machine/imx6slevk.conf b/bsp/meta-freescale/conf/machine/imx6slevk.conf index ffcbaaa7..5d81272f 100644 --- a/bsp/meta-freescale/conf/machine/imx6slevk.conf +++ b/bsp/meta-freescale/conf/machine/imx6slevk.conf @@ -19,7 +19,7 @@ UBOOT_CONFIG[epdc] = "mx6slevk_epdc_config" UBOOT_CONFIG[spinor] = "mx6slevk_spinor_config" UBOOT_CONFIG[mfgtool] = "mx6slevk_config" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale/conf/machine/imx6sllevk.conf b/bsp/meta-freescale/conf/machine/imx6sllevk.conf index 84d1e319..478d1bbd 100644 --- a/bsp/meta-freescale/conf/machine/imx6sllevk.conf +++ b/bsp/meta-freescale/conf/machine/imx6sllevk.conf @@ -1,24 +1,22 @@ #@TYPE: Machine -#@NAME: Freescale i.MX6SLL Evaluation Kit +#@NAME: NXP i.MX6SLL Evaluation Kit #@SOC: i.MX6SLL -#@DESCRIPTION: Machine configuration for Freescale i.MX6SLL EVK -#@MAINTAINER: Lauren Post lauren.post@nxp.com +#@DESCRIPTION: Machine configuration for NXP i.MX6SLL EVK +#@MAINTAINER: Alexandru Palalau ioan-alexandru.palalau@nxp.com MACHINEOVERRIDES =. "mx6:mx6sll:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc -MACHINE_FIRMWARE_append = " firmware-imx-epdc firmware-imx-brcm" - -KERNEL_DEVICETREE = "imx6sll-evk.dtb imx6sll-evk-btwifi.dtb" +KERNEL_DEVICETREE = "imx6sll-evk.dtb imx6sll-evk-btwifi.dtb imx6sll-evk-reva.dtb" UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "mx6sllevk_config,sdcard" UBOOT_CONFIG[epdc] = "mx6sllevk_epdc_config" UBOOT_CONFIG[mfgtool] = "mx6sllevk_config" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FEATURES += " pci wifi bluetooth" diff --git a/bsp/meta-freescale/conf/machine/imx6sxsabreauto.conf b/bsp/meta-freescale/conf/machine/imx6sxsabreauto.conf index ca5c9746..1bdb1080 100644 --- a/bsp/meta-freescale/conf/machine/imx6sxsabreauto.conf +++ b/bsp/meta-freescale/conf/machine/imx6sxsabreauto.conf @@ -9,7 +9,7 @@ MACHINEOVERRIDES =. "mx6:mx6sx:" require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa9.inc -KERNEL_DEVICETREE = "imx6sx-sabreauto.dtb imx6sx-sabreauto-m4.dtb" +KERNEL_DEVICETREE = "imx6sx-sabreauto.dtb" KERNEL_DEVICETREE_use-mainline-bsp = "imx6sx-sabreauto.dtb" PREFERRED_PROVIDER_u-boot = "u-boot-imx" @@ -21,7 +21,7 @@ UBOOT_CONFIG[qspi1] = "mx6sxsabreauto_qspi1_config" UBOOT_CONFIG[nand] = "mx6sxsabreauto_nand_config,ubifs" UBOOT_CONFIG[mfgtool] = "mx6sxsabreauto_config" -SERIAL_CONSOLE = "115200 ttymxc3" +SERIAL_CONSOLES = "115200;ttymxc3" MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k" diff --git a/bsp/meta-freescale/conf/machine/imx6sxsabresd.conf b/bsp/meta-freescale/conf/machine/imx6sxsabresd.conf index 3a969e4a..5793a0b0 100644 --- a/bsp/meta-freescale/conf/machine/imx6sxsabresd.conf +++ b/bsp/meta-freescale/conf/machine/imx6sxsabresd.conf @@ -22,7 +22,7 @@ UBOOT_CONFIG[qspi2] = "mx6sxsabresd_qspi2_config" UBOOT_CONFIG[m4fastup] = "mx6sxsabresd_m4fastup_config" UBOOT_CONFIG[mfgtool] = "mx6sxsabresd_config" -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k" diff --git a/bsp/meta-freescale/conf/machine/imx6ulevk.conf b/bsp/meta-freescale/conf/machine/imx6ulevk.conf index 01ebce6f..18b6b04b 100644 --- a/bsp/meta-freescale/conf/machine/imx6ulevk.conf +++ b/bsp/meta-freescale/conf/machine/imx6ulevk.conf @@ -2,7 +2,7 @@ #@NAME: NXP i.MX6UL Evaluation Kit #@SOC: i.MX6UL #@DESCRIPTION: Machine configuration for NXP i.MX6UL EVK -#@MAINTAINER: Lauren Post +#@MAINTAINER: Alexandru Palalau MACHINEOVERRIDES =. "mx6:mx6ul:" @@ -11,16 +11,23 @@ include conf/machine/include/tune-cortexa7.inc MACHINE_FEATURES += " pci wifi bluetooth" -KERNEL_DEVICETREE = "imx6ul-14x14-evk.dtb imx6ul-14x14-evk-csi.dtb imx6ul-14x14-evk-btwifi.dtb \ - imx6ul-14x14-evk-gpmi-weim.dtb imx6ul-14x14-evk-usb-certi.dtb \ - imx6ul-14x14-evk-emmc.dtb " +KERNEL_DEVICETREE = " \ + imx6ul-14x14-evk-btwifi.dtb \ + imx6ul-14x14-evk-btwifi-oob.dtb \ + imx6ul-14x14-evk-csi.dtb \ + imx6ul-14x14-evk.dtb \ + imx6ul-14x14-evk-ecspi.dtb \ + imx6ul-14x14-evk-ecspi-slave.dtb \ + imx6ul-14x14-evk-emmc.dtb \ + imx6ul-14x14-evk-gpmi-weim.dtb \ +" 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" +WKS_FILE = "imx-uboot-spl-bootpart.wks.in" UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "mx6ul_14x14_evk_config,sdcard" diff --git a/bsp/meta-freescale/conf/machine/imx6ullevk.conf b/bsp/meta-freescale/conf/machine/imx6ullevk.conf index 7cf9c328..1b31c2f7 100644 --- a/bsp/meta-freescale/conf/machine/imx6ullevk.conf +++ b/bsp/meta-freescale/conf/machine/imx6ullevk.conf @@ -1,24 +1,29 @@ #@TYPE: Machine -#@NAME: Freescale i.MX6ULL Evaluation Kit +#@NAME: NXP i.MX6ULL Evaluation Kit #@SOC: i.MX6ULL -#@DESCRIPTION: Machine configuration for Freescale i.MX6ULL EVK -#@MAINTAINER: Daiane Angolini +#@DESCRIPTION: Machine configuration for NXP i.MX6ULL EVK +#@MAINTAINER: Alexandru Palalau MACHINEOVERRIDES =. "mx6:mx6ull:" include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa7.inc -KERNEL_DEVICETREE = "imx6ull-14x14-evk.dtb imx6ull-14x14-evk-btwifi.dtb" +KERNEL_DEVICETREE = " \ + imx6ull-14x14-evk.dtb \ +" + +KERNEL_DEVICETREE_append_use-nxp-bsp = " \ + imx6ull-14x14-evk-btwifi.dtb \ + imx6ull-14x14-evk-btwifi-oob.dtb \ + imx6ull-14x14-evk-emmc.dtb \ + imx6ull-14x14-evk-gpmi-weim.dtb \ +" UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "mx6ull_14x14_evk_config,sdcard" UBOOT_CONFIG[mfgtool] = "mx6ull_14x14_evk_config" -PREFERRED_PROVIDER_u-boot = "u-boot-imx" -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx" -PREFERRED_PROVIDER_virtual/kernel = "linux-imx" - -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" MACHINE_FEATURES += "wifi bluetooth" diff --git a/bsp/meta-freescale/conf/machine/imx7dsabresd.conf b/bsp/meta-freescale/conf/machine/imx7dsabresd.conf index be9a6703..84de3862 100644 --- a/bsp/meta-freescale/conf/machine/imx7dsabresd.conf +++ b/bsp/meta-freescale/conf/machine/imx7dsabresd.conf @@ -11,11 +11,17 @@ require conf/machine/include/tune-cortexa7.inc MACHINE_FEATURES += " pci wifi bluetooth" -KERNEL_DEVICETREE = "imx7d-sdb.dtb imx7d-sdb-epdc.dtb imx7d-sdb-gpmi-weim.dtb \ - imx7d-sdb-m4.dtb imx7d-sdb-mipi-dsi.dtb imx7d-sdb-qspi.dtb \ - imx7d-sdb-reva.dtb imx7d-sdb-reva-epdc.dtb imx7d-sdb-reva-gpmi-weim.dtb \ - imx7d-sdb-reva-hdmi-audio.dtb imx7d-sdb-reva-m4.dtb imx7d-sdb-reva-qspi.dtb \ - imx7d-sdb-reva-touch.dtb imx7d-sdb-reva-wm8960.dtb" +KERNEL_DEVICETREE = " \ + imx7d-sdb.dtb \ + imx7d-sdb-epdc.dtb \ + imx7d-sdb-gpmi-weim.dtb \ + imx7d-sdb-m4.dtb \ + imx7d-sdb-mipi-dsi.dtb \ + imx7d-sdb-qspi.dtb \ + imx7d-sdb-reva.dtb \ + imx7d-sdb-sht11.dtb \ +" + KERNEL_DEVICETREE_use-mainline-bsp = "imx7d-sdb.dtb" UBOOT_CONFIG ??= "sd" @@ -25,4 +31,3 @@ UBOOT_CONFIG[nand] = "mx7dsabresd_nand_config,ubifs" UBOOT_CONFIG[epdc] = "mx7dsabresd_epdc_config" UBOOT_CONFIG[mfgtool] = "mx7dsabresd_config" -MACHINE_EXTRA_RRECOMMENDS += "firmware-imx-brcm" diff --git a/bsp/meta-freescale/conf/machine/imx7ulpevk.conf b/bsp/meta-freescale/conf/machine/imx7ulpevk.conf index d077de74..d9d2a559 100644 --- a/bsp/meta-freescale/conf/machine/imx7ulpevk.conf +++ b/bsp/meta-freescale/conf/machine/imx7ulpevk.conf @@ -2,26 +2,34 @@ #@NAME: NXP i.MX7ULP Evaluation Kit #@SOC: i.MX7ULP #@DESCRIPTION: Machine configuration for NXP i.MX7ULP EVK -#@MAINTAINER: Lauren Post +#@MAINTAINER: Alexandru Palalau + +MACHINEOVERRIDES =. "mx7:mx7ulp:" require conf/machine/include/imx-base.inc require conf/machine/include/tune-cortexa7.inc -MACHINE_FEATURES += " pci wifi bluetooth" +MACHINE_FEATURES += " pci wifi bluetooth qca9377" -MACHINEOVERRIDES =. "mx7:mx7ulp:" - -KERNEL_DEVICETREE = "imx7ulp-evk.dtb imx7ulp-evk-emmc.dtb imx7ulp-evk-emmc-qspi.dtb imx7ulp-evk-ft5416.dtb imx7ulp-evk-mipi.dtb" -KERNEL_DEVICETREE += "imx7ulp-evk-lpuart.dtb imx7ulp-evk-qspi.dtb imx7ulp-evk-sd1.dtb imx7ulp-evk-sensors-to-i2c5.dtb" -KERNEL_DEVICETREE += "imx7ulp-evk-wm8960.dtb" +KERNEL_DEVICETREE = " \ + imx7ulp-evkb.dtb \ + imx7ulp-evkb-emmc.dtb \ + imx7ulp-evkb-lpuart.dtb \ + imx7ulp-evkb-mipi.dtb \ + imx7ulp-evkb-rm68191-qhd.dtb \ + imx7ulp-evkb-rm68200-wxga.dtb \ + 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" -# Install brcm firmware -MACHINE_FIRMWARE_append = " firmware-imx-brcm" - # Set Serial console -SERIAL_CONSOLE = "115200 ttyLP0" +SERIAL_CONSOLES = "115200;ttyLP0" diff --git a/bsp/meta-freescale/conf/machine/imx8mmevk.conf b/bsp/meta-freescale/conf/machine/imx8mmevk.conf index 44b3249f..2a2893e6 100644 --- a/bsp/meta-freescale/conf/machine/imx8mmevk.conf +++ b/bsp/meta-freescale/conf/machine/imx8mmevk.conf @@ -1,28 +1,32 @@ #@TYPE: Machine -#@NAME: NXP i.MX 8M Mini Evaluation Kit +#@NAME: NXP i.MX8MM LPDDR4 Evaluation Kit and i.MX8MM DDR4 Evaluation Kit #@SOC: i.MX8MM -#@DESCRIPTION: Machine configuration for NXP i.MX 8M Mini EVK +#@DESCRIPTION: Machine configuration for NXP i.MX8MMini LPDDR4 EVK and i.MX8MMini DDR4 EVK #@MAINTAINER: Jun Zhu MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc - -MACHINE_FEATURES += " pci wifi bluetooth optee qca9377 qca6174" - -KERNEL_DEVICETREE = "freescale/fsl-imx8mm-evk.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-ak4497.dtb freescale/fsl-imx8mm-evk-ak5558.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-audio-tdm.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-inmate.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-m4.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-rm67191.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mm-evk-root.dtb" - -IMAGE_BOOTFILES += "imx8mm_m4_TCM_hello_world.bin \ - imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \ - imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin \ - imx8mm_m4_TCM_sai_low_power_audio.bin \ +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" @@ -41,12 +45,10 @@ UBOOT_DTB_NAME = "fsl-imx8mm-evk.dtb" IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}" # Set Serial console -SERIAL_CONSOLE = "115200 ttymxc1" +SERIAL_CONSOLES = "115200;ttymxc1" IMAGE_BOOTLOADER = "imx-boot" -BOOT_SPACE = "65536" - LOADADDR = "" UBOOT_SUFFIX = "bin" UBOOT_MAKE_TARGET = "" diff --git a/bsp/meta-freescale/conf/machine/imx8mnevk.conf b/bsp/meta-freescale/conf/machine/imx8mnevk.conf new file mode 100644 index 00000000..adf80ea8 --- /dev/null +++ b/bsp/meta-freescale/conf/machine/imx8mnevk.conf @@ -0,0 +1,61 @@ +#@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 + +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/bsp/meta-freescale/conf/machine/imx8mqevk.conf b/bsp/meta-freescale/conf/machine/imx8mqevk.conf index 8ddb03cb..40794c35 100644 --- a/bsp/meta-freescale/conf/machine/imx8mqevk.conf +++ b/bsp/meta-freescale/conf/machine/imx8mqevk.conf @@ -2,26 +2,35 @@ #@NAME: NXP i.MX8MQ Evaluation Kit #@SOC: i.MX8MQ #@DESCRIPTION: Machine configuration for NXP i.MX8MQ EVK -#@MAINTAINER: Jun Zhu +#@MAINTAINER: Alexandru Palalau MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc +require conf/machine/include/tune-cortexa53.inc + +IMX_DEFAULT_BSP = "nxp" MACHINE_FEATURES += "pci wifi bluetooth optee qca6174" MACHINE_SOCARCH_FILTER_append_mx8mq = " virtual/libopenvg virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa virtual/libgl virtual/libg2d" -KERNEL_DEVICETREE = "freescale/fsl-imx8mq-evk.dtb freescale/fsl-imx8mq-evk-ak4497.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-audio-tdm.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-dcss-adv7535.dtb freescale/fsl-imx8mq-evk-dcss-rm67191.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-dual-display.dtb freescale/fsl-imx8mq-evk-drm.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-lcdif-adv7535.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-m4.dtb freescale/fsl-imx8mq-evk-mipi-csi2.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8mq-evk-pcie1-m2.dtb freescale/fsl-imx8mq-evk-pdm.dtb" - -IMAGE_BOOTFILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin" +KERNEL_DEVICETREE = " \ + 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-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-pcie1-m2.dtb \ + freescale/imx8mq-evk-pdm.dtb \ + freescale/imx8mq-evk-root.dtb \ + freescale/imx8mq-evk-rpmsg.dtb \ +" UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "imx8mq_evk_config,sdcard" @@ -35,15 +44,13 @@ DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin l UBOOT_DTB_NAME = "fsl-imx8mq-evk.dtb" # Set imx-mkimage boot target -IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi" +IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" # Set Serial console -SERIAL_CONSOLE = "115200 ttymxc0" +SERIAL_CONSOLES = "115200;ttymxc0" IMAGE_BOOTLOADER = "imx-boot" -BOOT_SPACE = "65536" - LOADADDR = "" UBOOT_SUFFIX = "bin" UBOOT_MAKE_TARGET = "" @@ -53,3 +60,10 @@ OPTEE_BIN_EXT = "8mq" # Add additional firmware MACHINE_FIRMWARE_append = " linux-firmware-ath10k" + +# Use gstreamer 1.16 from meta-freescale +PREFERRED_VERSION_gstreamer1.0 ?= "1.16.imx" +PREFERRED_VERSION_gstreamer1.0-plugins-base ?= "1.16.imx" +PREFERRED_VERSION_gstreamer1.0-plugins-good ?= "1.16.imx" +PREFERRED_VERSION_gstreamer1.0-plugins-bad ?= "1.16.imx" +PREFERRED_VERSION_gstreamer1.0-libav ?= "1.16.0" diff --git a/bsp/meta-freescale/conf/machine/imx8qmmek.conf b/bsp/meta-freescale/conf/machine/imx8qmmek.conf index e1f26b44..c92e5fd2 100644 --- a/bsp/meta-freescale/conf/machine/imx8qmmek.conf +++ b/bsp/meta-freescale/conf/machine/imx8qmmek.conf @@ -1,12 +1,14 @@ #@TYPE: Machine #@NAME: i.MX 8QM MEK #@DESCRIPTION: i.MX 8QuadMax MEK board -#@MAINTAINER: Jun Zhu +#@MAINTAINER: Alexandru Palalau MACHINEOVERRIDES =. "mx8:mx8qm:" require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc +require conf/machine/include/tune-cortexa72-cortexa53.inc + +IMX_DEFAULT_BSP = "nxp" MACHINE_FEATURES_append = " qca6174" @@ -16,21 +18,28 @@ RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" LOADADDR = "" # We have to disable SERIAL_CONSOLE due to auto-serial-console -SERIAL_CONSOLE = "115200 ttyAMA0" +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/fsl-imx8qm-mek.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek_ca53.dtb freescale/fsl-imx8qm-mek_ca72.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-8cam.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-hdmi.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-jdi-wuxga-lvds1-panel.dtb freescale/fsl-imx8qm-mek-dsi-rm67191.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-mipi-ov5640.dtb freescale/fsl-imx8qm-mek-mipi-two-ov5640.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-enet2-tja1100.dtb " -KERNEL_DEVICETREE += "freescale/fsl-imx8qm-mek-dom0.dtb freescale/fsl-imx8qm-mek-domu.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qp-lpddr4-arm2.dtb" +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" @@ -39,12 +48,15 @@ UBOOT_CONFIG[sd] = "imx8qm_mek_defconfig,sdcard" UBOOT_CONFIG[fspi] = "imx8qm_mek_fspi_defconfig" UBOOT_CONFIG[mfgtool] = "imx8qm_mek_defconfig" -BOOT_SPACE = "65536" IMAGE_BOOTLOADER = "imx-boot" IMX_BOOT_SEEK = "33" -IMAGE_BOOTFILES_DEPENDS += "firmware-imx:do_deploy" -IMAGE_BOOTFILES += "hdmitxfw.bin hdmirxfw.bin dpfw.bin" +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" diff --git a/bsp/meta-freescale/conf/machine/imx8qxpmek.conf b/bsp/meta-freescale/conf/machine/imx8qxpmek.conf index 2ffbcacc..bdce4b68 100644 --- a/bsp/meta-freescale/conf/machine/imx8qxpmek.conf +++ b/bsp/meta-freescale/conf/machine/imx8qxpmek.conf @@ -1,11 +1,14 @@ #@TYPE: Machine #@NAME: i.MX 8QXP MEK -#@DESCRIPTION: i.MX 8QXP MEK board +#@DESCRIPTION: i.MX 8QXP Multisensory Enablement Kit (MEK) board +#@MAINTAINER: Cristinel Panfir MACHINEOVERRIDES =. "mx8:mx8x:mx8qxp:" require conf/machine/include/imx-base.inc -require conf/machine/include/arm/arch-arm64.inc +require conf/machine/include/tune-cortexa35.inc + +IMX_DEFAULT_BSP = "nxp" MACHINE_FEATURES_append = " qca6174" @@ -15,17 +18,31 @@ RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" LOADADDR = "" # We have to disable SERIAL_CONSOLE due to auto-serial-console -SERIAL_CONSOLE = "115200 ttyAMA0" +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/fsl-imx8qxp-mek.dtb freescale/fsl-imx8qxp-mek-dom0.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qxp-mek-dsi-rm67191.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qxp-mek-enet2.dtb freescale/fsl-imx8qxp-mek-enet2-tja1100.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qxp-mek-csi.dtb" -KERNEL_DEVICETREE += "freescale/fsl-imx8qxp-mek-mipi-ov5640.dtb freescale/fsl-imx8qxp-mek-ov5640.dtb" +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" @@ -33,10 +50,14 @@ UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "imx8qxp_mek_config,sdcard" UBOOT_CONFIG[fspi] = "imx8qxp_mek_fspi_defconfig" -BOOT_SPACE = "65536" 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 diff --git a/bsp/meta-freescale/conf/machine/include/imx-base.inc b/bsp/meta-freescale/conf/machine/include/imx-base.inc index 20f861f2..4be14fb1 100644 --- a/bsp/meta-freescale/conf/machine/include/imx-base.inc +++ b/bsp/meta-freescale/conf/machine/include/imx-base.inc @@ -9,12 +9,30 @@ require conf/machine/include/utilities.inc 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. +# +# Two values are considered valid: mainline, nxp +IMX_DEFAULT_BSP ?= "mainline" + +# Those are SoC families we'd like to force the use of mainline BSP. +IMX_DEFAULT_BSP_mxs ?= "mainline" +IMX_DEFAULT_BSP_mx5 ?= "mainline" + +MACHINEOVERRIDES =. "use-${IMX_DEFAULT_BSP}-bsp:" + 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_virtual/bootloader ??= "${IMX_DEFAULT_BOOTLOADER}" PREFERRED_PROVIDER_u-boot-mxsboot-native ??= "u-boot-fslc-mxsboot-native" -UBOOT_MAKE_TARGET ?= "u-boot.imx" +UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" +UBOOT_MAKE_TARGET ?= "u-boot.${UBOOT_SUFFIX}" UBOOT_MAKE_TARGET_mxs ?= "u-boot.sb" UBOOT_MAKE_TARGET_mx8 ?= "" @@ -32,6 +50,9 @@ UBOOT_ENTRYPOINT_mx6sx = "0x80008000" UBOOT_ENTRYPOINT_mx6ul = "0x10008000" UBOOT_ENTRYPOINT_mx6ull = "0x10008000" UBOOT_ENTRYPOINT_mx7 = "0x80008000" +UBOOT_ENTRYPOINT_mx7ulp = "0x60008000" +UBOOT_ENTRYPOINT_mx8mm = "0x40480000" +UBOOT_ENTRYPOINT_mx8mn = "0x40480000" UBOOT_ENTRYPOINT_mx8mq = "0x40480000" UBOOT_ENTRYPOINT_vf = "0x80008000" @@ -55,11 +76,17 @@ MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" # handled by software # DEFAULTTUNE_mx6 ?= "cortexa9t-neon" # handled by hardware -DEFAULTTUNE_mx6 ?= "cortexa9thf-neon" -DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon" +DEFAULTTUNE_mx6 ?= "cortexa9thf-neon" +DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon" DEFAULTTUNE_mx6ull ?= "cortexa7thf-neon" -DEFAULTTUNE_mx7 ?= "cortexa7thf-neon" -DEFAULTTUNE_vf ?= "cortexa5thf-neon" +DEFAULTTUNE_mx7 ?= "cortexa7thf-neon" +DEFAULTTUNE_vf ?= "cortexa5thf-neon" + +DEFAULTTUNE_mx8mm ?= "cortexa53-crypto" +DEFAULTTUNE_mx8mn ?= "cortexa53-crypto" +DEFAULTTUNE_mx8mq ?= "cortexa53-crypto" +DEFAULTTUNE_mx8qm ?= "cortexa72-cortexa53-crypto" +DEFAULTTUNE_mx8qxp ?= "cortexa35-crypto" INHERIT += "machine-overrides-extender" @@ -75,10 +102,13 @@ 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_mx8mq = "imxdrm:imxvpu:imxgpu:imxgpu3d" MACHINEOVERRIDES_EXTENDER_mx8qxp = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d" MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp = " \ + imx \ + \ mx6 \ mx6q \ mx6dl \ @@ -95,16 +125,13 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp = " \ mx8 \ mx8qm \ mx8mm \ + mx8mn \ mx8mq \ mx8qxp \ " # Sub-architecture support MACHINE_SOCARCH_SUFFIX ?= "" -MACHINE_SOCARCH_SUFFIX_mx23 = "-mxs" -MACHINE_SOCARCH_SUFFIX_mx28 = "-mxs" -MACHINE_SOCARCH_SUFFIX_mx51 = "-mx5" -MACHINE_SOCARCH_SUFFIX_mx53 = "-mx5" MACHINE_SOCARCH_SUFFIX_mx6q = "-mx6qdl" MACHINE_SOCARCH_SUFFIX_mx6dl = "-mx6qdl" MACHINE_SOCARCH_SUFFIX_mx6sx = "-mx6sx" @@ -118,6 +145,7 @@ MACHINE_SOCARCH_SUFFIX_mx6ul = "-mx6ul" MACHINE_SOCARCH_SUFFIX_mx6ull = "-mx6ul" MACHINE_SOCARCH_SUFFIX_mx8qm = "-mx8" MACHINE_SOCARCH_SUFFIX_mx8mm = "-mx8mm" +MACHINE_SOCARCH_SUFFIX_mx8mn = "-mx8mn" MACHINE_SOCARCH_SUFFIX_mx8mq = "-mx8m" MACHINE_SOCARCH_SUFFIX_mx8qxp = "-mx8" MACHINE_SOCARCH_SUFFIX_use-mainline-bsp = "-imx" @@ -125,6 +153,7 @@ MACHINE_SOCARCH_SUFFIX_use-mainline-bsp = "-imx" MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER_append_imx = " \ alsa-lib \ + gstreamer1.0 \ weston \ " MACHINE_SOCARCH_FILTER_append_imxvpu = " \ @@ -140,7 +169,6 @@ MACHINE_SOCARCH_FILTER_append_imxgpu = " \ virtual/libopenvg \ libdrm \ cairo \ - gstreamer1.0-plugins-bad \ libgal-imx \ pango \ " @@ -207,13 +235,31 @@ MACHINE_FIRMWARE_append_use-mainline-bsp = " linux-firmware-imx-sdma-imx6q linux MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE}" # Extra audio support -MACHINE_EXTRA_RRECOMMENDS_append_mx6 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)}" -MACHINE_EXTRA_RRECOMMENDS_append_mx7 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)}" -MACHINE_EXTRA_RRECOMMENDS_append_mx8 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'imx-alsa-plugins', '', d)}" +IMX_ALSA_EXTRA = "" +IMX_ALSA_EXTRA_use-nxp-bsp = "imx-alsa-plugins" +MACHINE_EXTRA_RRECOMMENDS_append_mx6 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}" +MACHINE_EXTRA_RRECOMMENDS_append_mx7 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}" +MACHINE_EXTRA_RRECOMMENDS_append_mx8 = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}" + +# Extra Cypress Wi-Fi and BTW firmware (Murata) +MACHINE_FIRMWARE_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'bcm4339', 'linux-firmware-bcm4339', '', d)}" +MACHINE_FIRMWARE_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'bcm43430', 'linux-firmware-bcm43430', '', d)}" +MACHINE_FIRMWARE_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'bcm43455', 'linux-firmware-bcm43455', '', d)}" +MACHINE_FIRMWARE_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'bcm4356', 'linux-firmware-bcm4356-pcie', '', d)}" +MACHINE_FIRMWARE_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'bcm4359', 'linux-firmware-bcm4359-pcie', '', d)}" + +# Extra QCA Wi-Fi & BTE driver and firmware +MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'qca6174', 'packagegroup-fsl-qca6174', '', d)}" +MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'qca9377', 'packagegroup-fsl-qca9377', '', d)}" # Extra udev rules MACHINE_EXTRA_RRECOMMENDS += "udev-rules-imx" +# Jailhouse +MACHINE_EXTRA_RRECOMMENDS += " \ + ${@bb.utils.contains('COMBINED_FEATURES', 'jailhouse', 'jailhouse', '', d)} \ +" + # GStreamer 1.0 plugins MACHINE_GSTREAMER_1_0_PLUGIN ?= "" MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta" @@ -244,60 +290,72 @@ PREFERRED_PROVIDER_virtual/libgl_imxgpu3d ?= "imx-gpu-viv" 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_VERSION_weston_mx6 ?= "4.0.0.imx" -PREFERRED_VERSION_weston_mx7 ?= "4.0.0.imx" -PREFERRED_VERSION_weston_mx8 ?= "4.0.0.imx" +PREFERRED_VERSION_weston_imx ?= "8.0.0.imx" +PREFERRED_VERSION_weston_use-mainline-bsp = "" -PREFERRED_VERSION_wayland-protocols_mx6 ?= "1.13.imx" -PREFERRED_VERSION_wayland-protocols_mx7 ?= "1.13.imx" -PREFERRED_VERSION_wayland-protocols_mx8 ?= "1.13.imx" +PREFERRED_VERSION_wayland-protocols_mx6 ?= "1.18.imx" +PREFERRED_VERSION_wayland-protocols_mx7 ?= "1.18.imx" +PREFERRED_VERSION_wayland-protocols_mx8 ?= "1.18.imx" # Use i.MX libdrm Version -PREFERRED_VERSION_libdrm_mx6 ?= "2.4.91.imx" -PREFERRED_VERSION_libdrm_mx7 ?= "2.4.91.imx" -PREFERRED_VERSION_libdrm_mx8 ?= "2.4.91.imx" +PREFERRED_VERSION_libdrm_mx6 ?= "2.4.99.imx" +PREFERRED_VERSION_libdrm_mx7 ?= "2.4.99.imx" +PREFERRED_VERSION_libdrm_mx8 ?= "2.4.99.imx" + +# Use i.MX optee Version +PREFERRED_VERSION_optee-os_mx8 ?= "3.2.0.imx" +PREFERRED_VERSION_optee-client_mx8 ?= "3.2.0.imx" +PREFERRED_VERSION_optee-test_mx8 ?= "3.2.0.imx" # Handle default kernel IMX_DEFAULT_KERNEL = "linux-imx" IMX_DEFAULT_KERNEL_mxs = "linux-fslc" IMX_DEFAULT_KERNEL_mx5 = "linux-fslc" -IMX_DEFAULT_KERNEL_mx6 = "linux-fslc-imx" -IMX_DEFAULT_KERNEL_mx7 = "linux-fslc-imx" +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-fslc-imx" -IMX_DEFAULT_KERNEL_mx6ull = "linux-fslc-imx" +IMX_DEFAULT_KERNEL_mx6ul = "linux-imx" +IMX_DEFAULT_KERNEL_mx6ull = "linux-imx" IMX_DEFAULT_KERNEL_use-mainline-bsp = "linux-fslc" PREFERRED_PROVIDER_virtual/kernel ??= "${IMX_DEFAULT_KERNEL}" SOC_DEFAULT_IMAGE_FSTYPES = "wic.bmap wic.gz" -SOC_DEFAULT_IMAGE_FSTYPES_mxs = "uboot-mxsboot-sdcard wic.gz" +SOC_DEFAULT_IMAGE_FSTYPES_mxs = "uboot-mxsboot-sdcard wic.bmap wic.gz" # Do not update fstab file when using wic images WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update" -SDCARD_ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext4" +OPTEE_BOOT_IMAGE = "uTee" +OPTEE_BOOT_IMAGE_aarch64 = "" + IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}" IMAGE_BOOT_FILES ?= " \ ${KERNEL_IMAGETYPE} \ ${@make_dtb_boot_files(d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'optee', '${OPTEE_BOOT_IMAGE}', '', d)} \ " ### wic default support +OPTEE_WKS_FILE_DEPENDS = "optee-os" +OPTEE_WKS_FILE_DEPENDS_aarch64 = "" + WKS_FILE_DEPENDS ?= " \ virtual/bootloader \ \ e2fsprogs-native \ bmap-tools-native \ + ${@bb.utils.contains('MACHINE_FEATURES', 'optee', '${OPTEE_WKS_FILE_DEPENDS}', '', d)} \ " -WKS_FILE_DEPENDS_mx8 += "imx-boot" +WKS_FILE_DEPENDS_append_mx8 = " imx-boot " -SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks" +SOC_DEFAULT_WKS_FILE ?= "imx-uboot-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" @@ -309,21 +367,24 @@ WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}" 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" +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" +WKS_FILE_use-fsl-bsp_mx7 = "imx-uboot-bootpart.wks.in" -SERIAL_CONSOLE = "115200 ttymxc0" -SERIAL_CONSOLE_mxs = "115200 ttyAMA0" +SERIAL_CONSOLES = "115200;ttymxc0" +SERIAL_CONSOLES_mxs = "115200;ttyAMA0" KERNEL_IMAGETYPE = "zImage" KERNEL_IMAGETYPE_aarch64 = "Image" MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" +SOC_MACHINE_FEATURES_BACKFILL_mx8m = "jailhouse" +MACHINE_FEATURES_BACKFILL_append = " ${SOC_MACHINE_FEATURES_BACKFILL}" + # Add the ability to specify _imx machines MACHINEOVERRIDES =. "imx:" -HOSTTOOLS_NONFATAL_append_mx8x = " sha384sum" +HOSTTOOLS_NONFATAL_append_mx8 = " sha384sum" diff --git a/bsp/meta-freescale/conf/machine/include/qoriq-base.inc b/bsp/meta-freescale/conf/machine/include/qoriq-base.inc index b19332e3..93e48505 100644 --- a/bsp/meta-freescale/conf/machine/include/qoriq-base.inc +++ b/bsp/meta-freescale/conf/machine/include/qoriq-base.inc @@ -2,9 +2,8 @@ PREFERRED_PROVIDER_cryptodev-linux = "cryptodev-qoriq-linux" PREFERRED_PROVIDER_cryptodev-module = "cryptodev-qoriq-module" PREFERRED_PROVIDER_cryptodev-tests = "cryptodev-qoriq-tests" -PREFERRED_PROVIDER_openssl = "openssl-qoriq" PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-qoriq" +PREFERRED_PROVIDER_virtual/bootloader ?= "${PREFERRED_PROVIDER_u-boot}" PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq" PREFERRED_VERSION_testfloat = "2a" PREFERRED_PROVIDER_ptpd = "ptpd-qoriq" @@ -19,11 +18,20 @@ EXTRA_IMAGEDEPENDS += "u-boot cst-native" MACHINEOVERRIDES =. "qoriq:" +# Machines or distros can define which BSP it should use by default. We are +# intending to default for nxp BSP by default and specific machines or +# DISTROs might change it if need. +# +# Two values are considered valid: mainline, nxp +QORIQ_DEFAULT_BSP ?= "nxp" + +MACHINEOVERRIDES =. "use-${QORIQ_DEFAULT_BSP}-bsp:" + # Sub-architecture support 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 openssl-qoriq" +MACHINE_SOCARCH_FILTER_append_qoriq = " cryptodev-qoriq-linux cryptodev-qoriq-module cryptodev-qoriq-test" INHERIT += "fsl-dynamic-packagearch" diff --git a/bsp/meta-freescale/conf/machine/include/utilities.inc b/bsp/meta-freescale/conf/machine/include/utilities.inc index e6cfda80..e9695bde 100644 --- a/bsp/meta-freescale/conf/machine/include/utilities.inc +++ b/bsp/meta-freescale/conf/machine/include/utilities.inc @@ -6,11 +6,17 @@ def make_dtb_boot_files(d): # Use only the basename for dtb files: alldtbs = d.getVar('KERNEL_DEVICETREE') + + # DTBs may be built out of kernel with devicetree.bbclass + if not alldtbs: + return '' + def transform(dtb): - if dtb.endswith('dtb') or dtb.endswith('dtbo'): + if not (dtb.endswith('dtb') or dtb.endswith('dtbo')): # eg: whatever/bcm2708-rpi-b.dtb has: # DEPLOYDIR file: bcm2708-rpi-b.dtb # destination: bcm2708-rpi-b.dtb - return os.path.basename(dtb) + bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) ) + return os.path.basename(dtb) - return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) + return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) diff --git a/bsp/meta-freescale/conf/machine/ls1012afrwy-32b.conf b/bsp/meta-freescale/conf/machine/ls1012afrwy-32b.conf deleted file mode 100644 index 88f071ea..00000000 --- a/bsp/meta-freescale/conf/machine/ls1012afrwy-32b.conf +++ /dev/null @@ -1,33 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1012AFRWY board -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for NXP QorIQ LS1012AFRWY in 32-bit mode -# with ARM Cortext-A53 core -#@MAINTAINER: Chunrong Guo - -MACHINEOVERRIDES =. "fsl-lsch2:fsl-lsch2-32b:ls1012a:" - -require conf/machine/include/qoriq-arm.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "armv7ahf-neon" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80080000" - -UBOOT_CONFIG ??= "qspi-secure-boot qspi" -UBOOT_CONFIG[qspi] = "ls1012afrwy_qspi_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi-secure-boot] = "ls1012afrwy_qspi_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-frwy.dtb" -KERNEL_DEFCONFIG ?= "multi_v7_defconfig" - -EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw" -USE_VT = "0" - -require conf/multilib.conf -MULTILIBS ?= "multilib:lib64" -DEFAULTTUNE_virtclass-multilib-lib64 ?= "aarch64" diff --git a/bsp/meta-freescale/conf/machine/ls1012afrwy.conf b/bsp/meta-freescale/conf/machine/ls1012afrwy.conf index bd154acb..449e518c 100644 --- a/bsp/meta-freescale/conf/machine/ls1012afrwy.conf +++ b/bsp/meta-freescale/conf/machine/ls1012afrwy.conf @@ -10,6 +10,8 @@ MACHINEOVERRIDES =. "fsl-lsch2:ls1012a:" require conf/machine/include/qoriq-arm64.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -20,7 +22,7 @@ UBOOT_CONFIG ??= "tfa-secure-boot tfa" UBOOT_CONFIG[tfa] = "ls1012afrwy_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "ls1012afrwy_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -RCWQSPI ?= "N_SSNP_3305/rcw_1000_default.bin" +RCWQSPI ?= "N_SSNP_3305/rcw_1000" KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-frwy.dtb" KERNEL_DEFCONFIG ?= "defconfig" diff --git a/bsp/meta-freescale/conf/machine/ls1012ardb-32b.conf b/bsp/meta-freescale/conf/machine/ls1012ardb-32b.conf deleted file mode 100644 index 43abf70a..00000000 --- a/bsp/meta-freescale/conf/machine/ls1012ardb-32b.conf +++ /dev/null @@ -1,34 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1012ARDB board -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for NXP QorIQ LS1012ARDB -# with ARM Cortext-A53 core -#@MAINTAINER: Zongchun Yu - -MACHINEOVERRIDES =. "fsl-lsch2:fsl-lsch2-32b:ls1012a:" - -require conf/machine/include/qoriq-arm.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "armv7ahf-neon" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80008000" - -UBOOT_CONFIG ??= "qspi-secure-boot qspi" -UBOOT_CONFIG[qspi] = "ls1012ardb_qspi_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi-secure-boot] = "ls1012ardb_qspi_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -KERNEL_IMAGETYPE = "zImage" -KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-rdb.dtb" -KERNEL_DEFCONFIG ?= "multi_v7_defconfig" - -EXTRA_IMAGEDEPENDS += "rcw" -USE_VT = "0" - -require conf/multilib.conf -MULTILIBS ?= "multilib:lib64" -DEFAULTTUNE_virtclass-multilib-lib64 ?= "aarch64" diff --git a/bsp/meta-freescale/conf/machine/ls1012ardb.conf b/bsp/meta-freescale/conf/machine/ls1012ardb.conf index f05507d7..6efd6b3d 100644 --- a/bsp/meta-freescale/conf/machine/ls1012ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls1012ardb.conf @@ -10,6 +10,8 @@ MACHINEOVERRIDES =. "fsl-lsch2:ls1012a:" require conf/machine/include/qoriq-arm64.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -20,9 +22,10 @@ UBOOT_CONFIG ??= "tfa-secure-boot tfa" UBOOT_CONFIG[tfa] = "ls1012ardb_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "ls1012ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -RCWQSPI ?= "R_SPNH_3508/rcw_1000_default.bin" +RCWQSPI ?= "R_SPNH_3508/rcw_1000" +RCWQSPISEC ?= "R_SPNH_3508/rcw_1000" -KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-rdb.dtb" +KERNEL_DEVICETREE ?= "freescale/fsl-ls1012a-rdb.dtb freescale/fsl-ls1012a-qds.dtb" KERNEL_DEFCONFIG ?= "defconfig" EXTRA_IMAGEDEPENDS += "ppfe-firmware rcw atf" diff --git a/bsp/meta-freescale/conf/machine/ls1021atwr.conf b/bsp/meta-freescale/conf/machine/ls1021atwr.conf index a238fdca..aa0f0943 100644 --- a/bsp/meta-freescale/conf/machine/ls1021atwr.conf +++ b/bsp/meta-freescale/conf/machine/ls1021atwr.conf @@ -10,15 +10,17 @@ MACHINEOVERRIDES =. "ls102xa:" require conf/machine/include/qoriq-arm.inc require conf/machine/include/tune-cortexa7.inc +MACHINE_FEATURES += "optee" + DEFAULTTUNE = "cortexa7hf-neon" UBOOT_CONFIG ??= "sdcard-ifc-secure-boot sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor" -UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin" -UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin" -UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config,,u-boot-dtb.bin" +UBOOT_CONFIG[nor] = "ls1021atwr_nor_defconfig,,u-boot-dtb.bin" +UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_defconfig,,u-boot-with-spl-pbl.bin" +UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_defconfig,,u-boot-with-spl-pbl.bin" +UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_defconfig,,u-boot-dtb.bin" +UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_defconfig,,u-boot-dtb.bin" +UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[sdcard-ifc-secure-boot] = "ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin" QE_UCODE="iram_Type_A_LS1021a_r1.0.bin" diff --git a/bsp/meta-freescale/conf/machine/ls1028ardb.conf b/bsp/meta-freescale/conf/machine/ls1028ardb.conf new file mode 100644 index 00000000..b0bbc5b8 --- /dev/null +++ b/bsp/meta-freescale/conf/machine/ls1028ardb.conf @@ -0,0 +1,38 @@ +#@TYPE: Machine +#@NAME: NXP LS1028ARDB +#@SOC: LSCH3 +#@DESCRIPTION: Machine configuration for running LS1028ARDB in 64-bit mode +#@MAINTAINER: Chunrong.Guo + +require conf/machine/include/qoriq-arm64.inc +require conf/machine/include/arm/arch-arm64.inc + +MACHINE_FEATURES += "optee" + +MACHINEOVERRIDES =. "fsl-lsch3:ls1028a:" + +KERNEL_CLASSES = " kernel-fitimage " +KERNEL_IMAGETYPES = "fitImage" + +UBOOT_DTB_LOADADDRESS = "0x90000000" +UBOOT_ENTRYPOINT = "0x80080000" + +UBOOT_CONFIG ??= "tfa-secure-boot tfa" +UBOOT_CONFIG[tfa-secure-boot] = "ls1028ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" +UBOOT_CONFIG[tfa] = "ls1028ardb_tfa_defconfig,,u-boot-dtb.bin" + +KERNEL_DEVICETREE ?= "freescale/fsl-ls1028a-rdb.dtb freescale/fsl-ls1028a-qds.dtb" +KERNEL_DEVICETREE_append_use-nxp-bsp = "\ + freescale/fsl-ls1028a-rdb-dpdk.dtb \ +" +KERNEL_DEFCONFIG ?= "defconfig" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" + +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" +USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1043ardb-32b.conf b/bsp/meta-freescale/conf/machine/ls1043ardb-32b.conf deleted file mode 100644 index aa7f3f6f..00000000 --- a/bsp/meta-freescale/conf/machine/ls1043ardb-32b.conf +++ /dev/null @@ -1,39 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1043ARDB-32B -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for running LS1043A in 32B mode -#@MAINTAINER: Ting Liu - -MACHINEOVERRIDES =. "fsl-lsch2:fsl-lsch2-32b:ls1043a:" - -require conf/machine/include/qoriq-arm.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "armv7ahf-neon" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x9ffe0000" -UBOOT_ENTRYPOINT = "0x80008000" - -UBOOT_CONFIG ??= "nand sdcard nor" -UBOOT_CONFIG[nor] = "ls1043ardb_config,,u-boot-dtb.bin" -UBOOT_CONFIG[nand] = "ls1043ardb_nand_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard] = "ls1043ardb_sdcard_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "ls1043ardb_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -QE_UCODE = "iram_Type_A_LS1021a_r1.0.bin" - -KERNEL_DEVICETREE ?= "freescale/fsl-ls1043a-rdb-sdk.dtb freescale/fsl-ls1043a-rdb-usdpaa.dtb" -KERNEL_DEFCONFIG ?= "multi_v7_defconfig" - -SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyAMA0" -SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" - -EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode" -USE_VT = "0" - -require conf/multilib.conf -MULTILIBS ?= "multilib:lib64" -DEFAULTTUNE_virtclass-multilib-lib64 ?= "aarch64" diff --git a/bsp/meta-freescale/conf/machine/ls1043ardb-be.conf b/bsp/meta-freescale/conf/machine/ls1043ardb-be.conf deleted file mode 100644 index 3582162f..00000000 --- a/bsp/meta-freescale/conf/machine/ls1043ardb-be.conf +++ /dev/null @@ -1,40 +0,0 @@ -#@TYPE: Machine -#@NAME: Freescale LS1043ARDB -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for running LS1043A in 64-bit mode -#@MAINTAINER: Chunrong Guo - -DEFAULTTUNE = "aarch64_be" - -require conf/machine/include/qoriq-arm64.inc -require conf/machine/include/arm/arch-arm64.inc - -MACHINEOVERRIDES =. "fsl-lsch2:ls1043a:" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80080000" - -UBOOT_CONFIG ??= "nand sdcard nor" -UBOOT_CONFIG[nor] = "ls1043ardb_config,,u-boot-dtb.bin" -UBOOT_CONFIG[nand] = "ls1043ardb_nand_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard] = "ls1043ardb_sdcard_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "ls1043ardb_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[nand-secure-boot] = "ls1043ardb_nand_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[nand-spl-secure-boot] = "ls1043ardb_nand_SECURE_BOOT_defconfig,,spl/u-boot-spl.bin" -UBOOT_CONFIG[nand-dtb-secure-boot] = "ls1043ardb_nand_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[sdcard-secure-boot] = "ls1043ardb_sdcard_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard-spl-secure-boot] = "ls1043ardb_sdcard_SECURE_BOOT_defconfig,,spl/u-boot-spl.bin" -UBOOT_CONFIG[sdcard-dtb-secure-boot] = "ls1043ardb_sdcard_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -QE_UCODE = "iram_Type_A_LS1021a_r1.0.bin" -LE_UBOOT_FOR_ARMBE_TARGET = "1" - -KERNEL_DEVICETREE ?= "freescale/fsl-ls1043a-rdb-sdk.dtb freescale/fsl-ls1043a-rdb-usdpaa.dtb" -KERNEL_DEFCONFIG ?= "defconfig" - -EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode" - -USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1043ardb.conf b/bsp/meta-freescale/conf/machine/ls1043ardb.conf index f9b0d3d9..6f1f7ea4 100644 --- a/bsp/meta-freescale/conf/machine/ls1043ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls1043ardb.conf @@ -10,6 +10,8 @@ MACHINEOVERRIDES =. "fsl-lsch2:ls1043a:" require conf/machine/include/qoriq-arm64.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -20,14 +22,23 @@ UBOOT_CONFIG ??= "tfa-secure-boot tfa" UBOOT_CONFIG[tfa] = "ls1043ardb_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "ls1043ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -KERNEL_DEVICETREE ?= "freescale/fsl-ls1043a-rdb-sdk.dtb freescale/fsl-ls1043a-rdb-usdpaa.dtb" +KERNEL_DEVICETREE ?= "\ + freescale/fsl-ls1043a-rdb.dtb \ + freescale/fsl-ls1043a-qds.dtb \ +" +# usdpaa dtb is used for dpdk. TODO: rename in kernel +KERNEL_DEVICETREE_append_use-nxp-bsp = "\ + freescale/fsl-ls1043a-rdb-sdk.dtb \ + freescale/fsl-ls1043a-rdb-usdpaa.dtb \ + freescale/fsl-ls1043a-qds-sdk.dtb \ +" KERNEL_DEFCONFIG ?= "defconfig" UEFI_NORBOOT ?= "LS1043ARDB_EFI_NORBOOT.fd" -RCWNOR ?= "RR_FQPP_1455/rcw_1600.bin" -RCWSD ?= "RR_FQPP_1455/rcw_1600_sdboot.bin" -RCWNAND ?= "RR_FQPP_1455/rcw_1600_nandboot.bin" +RCWNOR ?= "RR_FQPP_1455/rcw_1600" +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" +EXTRA_IMAGEDEPENDS += "fm-ucode rcw qe-ucode uefi atf ls2-phy" USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1046afrwy.conf b/bsp/meta-freescale/conf/machine/ls1046afrwy.conf new file mode 100644 index 00000000..884f7666 --- /dev/null +++ b/bsp/meta-freescale/conf/machine/ls1046afrwy.conf @@ -0,0 +1,41 @@ +#@TYPE: Machine +#@NAME: NXP LS1046AFRWY +#@SOC: LSCH2 +#@DESCRIPTION: Machine configuration for running LS1046A in 64-bit mode +#@MAINTAINER: Chunrong.guo + +MACHINEOVERRIDES =. "fsl-lsch2:ls1046a:" + +require conf/machine/include/qoriq-arm64.inc +require conf/machine/include/arm/arch-arm64.inc + +MACHINE_FEATURES += "optee" + +KERNEL_CLASSES = " kernel-fitimage " +KERNEL_IMAGETYPES = "fitImage" + +UBOOT_DTB_LOADADDRESS = "0x90000000" +UBOOT_ENTRYPOINT = "0x80080000" + +UBOOT_CONFIG ??= "tfa-secure-boot tfa" +UBOOT_CONFIG[tfa] = "ls1046afrwy_tfa_defconfig,,u-boot-dtb.bin" +UBOOT_CONFIG[tfa-secure-boot] = "ls1046afrwy_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" + +KERNEL_DEVICETREE ?= "\ + freescale/fsl-ls1046a-frwy.dtb \ +" +# usdpaa dtb is used for dpdk. TODO: rename in kernel +KERNEL_DEVICETREE_append_use-nxp-bsp = "\ + freescale/fsl-ls1046a-frwy-sdk.dtb \ + freescale/fsl-ls1046a-frwy-usdpaa.dtb \ +" +KERNEL_DEFCONFIG ?= "defconfig" + +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyAMA0 115200;ttyLP0" +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" +USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1046ardb-32b.conf b/bsp/meta-freescale/conf/machine/ls1046ardb-32b.conf deleted file mode 100644 index 4267c0f1..00000000 --- a/bsp/meta-freescale/conf/machine/ls1046ardb-32b.conf +++ /dev/null @@ -1,40 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1046ARDB -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for running LS1046A in 32-bit mode -#@MAINTAINER: Zhenhua Luo - -MACHINEOVERRIDES =. "fsl-lsch2:fsl-lsch2-32b:ls1046a:" - -require conf/machine/include/qoriq-arm.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "armv7ahf-neon" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x9ffe0000" -UBOOT_ENTRYPOINT = "0x80008000" - -UBOOT_CONFIG ??= "emmc sdcard qspi-secure-boot qspi" -UBOOT_CONFIG[emmc] = "ls1046ardb_emmc_defconfig,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard] = "ls1046ardb_sdcard_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[qspi] = "ls1046ardb_qspi_config,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi-secure-boot] = "ls1046ardb_qspi_SECURE_BOOT_config,,u-boot-dtb.bin" - -KERNEL_DEVICETREE ?= "\ - freescale/fsl-ls1046a-rdb-sdk.dtb \ - freescale/fsl-ls1046a-rdb-usdpaa.dtb \ -" -KERNEL_DEFCONFIG ?= "multi_v7_defconfig" - -SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyAMA0 115200;ttyLP0" -SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" - -EXTRA_IMAGEDEPENDS += "fm-ucode rcw" -USE_VT = "0" - -require conf/multilib.conf -MULTILIBS ?= "multilib:lib64" -DEFAULTTUNE_virtclass-multilib-lib64 ?= "aarch64" diff --git a/bsp/meta-freescale/conf/machine/ls1046ardb-be.conf b/bsp/meta-freescale/conf/machine/ls1046ardb-be.conf deleted file mode 100644 index 0f72d579..00000000 --- a/bsp/meta-freescale/conf/machine/ls1046ardb-be.conf +++ /dev/null @@ -1,37 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1046ARDB -#@SOC: LSCH2 -#@DESCRIPTION: Machine configuration for running LS1046A in 64-bit mode -#@MAINTAINER: Zhenhua Luo - -DEFAULTTUNE = "aarch64_be" - -MACHINEOVERRIDES =. "fsl-lsch2:ls1046a:" - -require conf/machine/include/qoriq-arm64.inc -require conf/machine/include/arm/arch-arm64.inc - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80080000" - -LE_UBOOT_FOR_ARMBE_TARGET = "1" -UBOOT_CONFIG ??= "emmc sdcard sdcard-dtb-secure-boot sdcard-spl-secure-boot sdcard-secure-boot qspi-secure-boot qspi" -UBOOT_CONFIG[emmc] = "ls1046ardb_emmc_defconfig,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard] = "ls1046ardb_sdcard_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[qspi] = "ls1046ardb_qspi_config,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi-secure-boot] = "ls1046ardb_qspi_SECURE_BOOT_config,,u-boot-dtb.bin" -UBOOT_CONFIG[sdcard-secure-boot] = "ls1046ardb_sdcard_SECURE_BOOT_defconfig,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[sdcard-spl-secure-boot] = "ls1046ardb_sdcard_SECURE_BOOT_defconfig,,spl/u-boot-spl.bin" -UBOOT_CONFIG[sdcard-dtb-secure-boot] = "ls1046ardb_sdcard_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -KERNEL_DEVICETREE ?= "\ - freescale/fsl-ls1046a-rdb-sdk.dtb \ - freescale/fsl-ls1046a-rdb-usdpaa.dtb \ -" -KERNEL_DEFCONFIG ?= "defconfig" - -EXTRA_IMAGEDEPENDS += "fm-ucode rcw" -USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1046ardb.conf b/bsp/meta-freescale/conf/machine/ls1046ardb.conf index 83309c95..e8773366 100644 --- a/bsp/meta-freescale/conf/machine/ls1046ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls1046ardb.conf @@ -9,6 +9,8 @@ MACHINEOVERRIDES =. "fsl-lsch2:ls1046a:" require conf/machine/include/qoriq-arm64.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -20,17 +22,23 @@ UBOOT_CONFIG[tfa] = "ls1046ardb_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "ls1046ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" KERNEL_DEVICETREE ?= "\ + freescale/fsl-ls1046a-rdb.dtb \ + freescale/fsl-ls1046a-qds.dtb \ +" +# usdpaa dtb is used for dpdk. TODO: rename in kernel +KERNEL_DEVICETREE_append_use-nxp-bsp = "\ freescale/fsl-ls1046a-rdb-sdk.dtb \ freescale/fsl-ls1046a-rdb-usdpaa.dtb \ + freescale/fsl-ls1046a-qds-sdk.dtb \ " KERNEL_DEFCONFIG ?= "defconfig" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyAMA0 115200;ttyLP0" SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" -UEFI_NORBOOT ?= "LS1046ARDB_EFI_NORBOOT.fd" -RCWQSPI ?= "RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin" -RCWSD ?= "RR_FFSSPPPH_1133_5559/rcw_1800_sdboot.bin" +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" +EXTRA_IMAGEDEPENDS += "fm-ucode rcw uefi atf qe-ucode ls2-phy" USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1088ardb-be.conf b/bsp/meta-freescale/conf/machine/ls1088ardb-be.conf deleted file mode 100644 index 3460a9c1..00000000 --- a/bsp/meta-freescale/conf/machine/ls1088ardb-be.conf +++ /dev/null @@ -1,34 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS1088ARDB -#@SOC: LSCH3 -#@DESCRIPTION: Machine configuration for running LS1088ARDB in 64-bit mode -#@MAINTAINER: Zongchun Yu - -require conf/machine/include/qoriq-arm64.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "aarch64_be" - -LE_UBOOT_FOR_ARMBE_TARGET = "1" - -MACHINEOVERRIDES =. "fsl-lsch3:ls1088a:" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80080000" - -UBOOT_CONFIG ??= "secure-boot sdcard-qspi qspi" -UBOOT_CONFIG[secure-boot] = "ls1088ardb_qspi_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi] = "ls1088ardb_qspi_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[sdcard-qspi] = "ls1088ardb_sdcard_qspi_defconfig,,u-boot-with-spl.bin" - -KERNEL_DEVICETREE ?= "freescale/fsl-ls1088a-rdb.dtb" -KERNEL_DEFCONFIG ?= "defconfig" - -SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" -SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" - -EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex" -USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls1088ardb-pb.conf b/bsp/meta-freescale/conf/machine/ls1088ardb-pb.conf index 3726efa2..2e456f1b 100644 --- a/bsp/meta-freescale/conf/machine/ls1088ardb-pb.conf +++ b/bsp/meta-freescale/conf/machine/ls1088ardb-pb.conf @@ -9,6 +9,8 @@ require conf/machine/include/arm/arch-arm64.inc MACHINEOVERRIDES =. "fsl-lsch3:ls1088a:" +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -25,8 +27,8 @@ KERNEL_DEFCONFIG ?= "defconfig" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" -RCWSD ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_sd.bin" -RCWQSPI ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_qspi.bin" +RCWSD ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_sd" +RCWQSPI ?= "FCSSRR_PPPP_0x1d_0x13/rcw_1600_qspi" EXTRA_IMAGEDEPENDS += "mc-utils rcw management-complex atf" diff --git a/bsp/meta-freescale/conf/machine/ls1088ardb.conf b/bsp/meta-freescale/conf/machine/ls1088ardb.conf index 13c8bf29..8f47f284 100644 --- a/bsp/meta-freescale/conf/machine/ls1088ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls1088ardb.conf @@ -9,6 +9,8 @@ require conf/machine/include/arm/arch-arm64.inc MACHINEOVERRIDES =. "fsl-lsch3:ls1088a:" +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -25,8 +27,8 @@ KERNEL_DEFCONFIG ?= "defconfig" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" -RCWSD ?= "FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_sd.bin" -RCWQSPI ?= "FCQQQQQQQQ_PPP_H_0x1d_0x0d/rcw_1600_qspi.bin" +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" USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls2080ardb.conf b/bsp/meta-freescale/conf/machine/ls2080ardb.conf index d58a86a4..859a41be 100644 --- a/bsp/meta-freescale/conf/machine/ls2080ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls2080ardb.conf @@ -16,5 +16,5 @@ UBOOT_CONFIG[nor] = "ls2080ardb_defconfig,,u-boot-dtb.bin" KERNEL_DEVICETREE ?= "freescale/fsl-ls2080a-rdb.dtb" KERNEL_DEFCONFIG ?= "defconfig" -EXTRA_IMAGEDEPENDS += "dpl-examples ls2-phy rcw management-complex" +EXTRA_IMAGEDEPENDS += "ls2-phy rcw management-complex" USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls2088ardb-be.conf b/bsp/meta-freescale/conf/machine/ls2088ardb-be.conf deleted file mode 100644 index 71cf596d..00000000 --- a/bsp/meta-freescale/conf/machine/ls2088ardb-be.conf +++ /dev/null @@ -1,35 +0,0 @@ -#@TYPE: Machine -#@NAME: NXP LS2088ARDB -#@SOC: LSCH3 -#@DESCRIPTION: Machine configuration for running LS2088ARDB in 64-bit mode -#@MAINTAINER: Zongchun Yu - -require conf/machine/include/qoriq-arm64.inc -require conf/machine/include/arm/arch-arm64.inc - -DEFAULTTUNE = "aarch64_be" - -LE_UBOOT_FOR_ARMBE_TARGET = "1" - -MACHINEOVERRIDES =. "fsl-lsch3:ls2088a:" - -KERNEL_CLASSES = " kernel-fitimage " -KERNEL_IMAGETYPES = "fitImage" - -UBOOT_DTB_LOADADDRESS = "0x90000000" -UBOOT_ENTRYPOINT = "0x80080000" - -UBOOT_CONFIG ??= "qspi-secure-boot qspi nand nor" -UBOOT_CONFIG[nor] = "ls2080ardb_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[nand] = "ls2080ardb_nand_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi] = "ls2088ardb_qspi_defconfig,,u-boot-dtb.bin" -UBOOT_CONFIG[qspi-secure-boot] = "ls2088ardb_qspi_SECURE_BOOT_defconfig,,u-boot-dtb.bin" - -KERNEL_DEVICETREE ?= "freescale/fsl-ls2088a-rdb.dtb" -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" -USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/ls2088ardb.conf b/bsp/meta-freescale/conf/machine/ls2088ardb.conf index 04f3bbdc..f920d601 100644 --- a/bsp/meta-freescale/conf/machine/ls2088ardb.conf +++ b/bsp/meta-freescale/conf/machine/ls2088ardb.conf @@ -9,6 +9,8 @@ require conf/machine/include/arm/arch-arm64.inc MACHINEOVERRIDES =. "fsl-lsch3:ls2088a:" +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -19,11 +21,11 @@ UBOOT_CONFIG ??= "tfa-secure-boot tfa" UBOOT_CONFIG[tfa] = "ls2088ardb_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "ls2088ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -RCWNOR ?= "FFFFFFFF_PP_HH_0x2a_0x41/rcw_1800.bin" -RCWQSPI?= "FFFFFFFF_PP_HH_0x2a_0x41/rcw_2000_qspi.bin" +RCWNOR ?= "FFFFFFFF_PP_HH_0x2a_0x41/rcw_1800" +RCWQSPI?= "FFFFFFFF_PP_HH_0x2a_0x41/rcw_2000_qspi" UEFI_NORBOOT ?= "LS2088ARDB_EFI_NORBOOT.fd" -KERNEL_DEVICETREE ?= "freescale/fsl-ls2088a-rdb.dtb" +KERNEL_DEVICETREE ?= "freescale/fsl-ls2088a-rdb.dtb freescale/fsl-ls2088a-qds.dtb" KERNEL_DEFCONFIG ?= "defconfig" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" diff --git a/bsp/meta-freescale/conf/machine/lx2160ardb.conf b/bsp/meta-freescale/conf/machine/lx2160ardb.conf index 44eba5d9..a8bbdbda 100644 --- a/bsp/meta-freescale/conf/machine/lx2160ardb.conf +++ b/bsp/meta-freescale/conf/machine/lx2160ardb.conf @@ -9,6 +9,8 @@ require conf/machine/include/arm/arch-arm64.inc MACHINEOVERRIDES =. "fsl-lsch3:lx2160a:" +MACHINE_FEATURES += "optee" + KERNEL_CLASSES = " kernel-fitimage " KERNEL_IMAGETYPES = "fitImage" @@ -19,15 +21,16 @@ UBOOT_CONFIG ??= "tfa-secure-boot tfa" UBOOT_CONFIG[tfa] = "lx2160ardb_tfa_defconfig,,u-boot-dtb.bin" UBOOT_CONFIG[tfa-secure-boot] = "lx2160ardb_tfa_SECURE_BOOT_defconfig,,u-boot-dtb.bin" -KERNEL_DEVICETREE ?= "freescale/fsl-lx2160a-rdb.dtb" +KERNEL_DEVICETREE ?= "freescale/fsl-lx2160a-rdb.dtb freescale/fsl-lx2160a-qds.dtb" KERNEL_DEFCONFIG ?= "defconfig" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd" -RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2.bin" -RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2_sd.bin" +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" USE_VT = "0" diff --git a/bsp/meta-freescale/conf/machine/mpc8548cds.conf b/bsp/meta-freescale/conf/machine/mpc8548cds.conf index 73194402..c7c49ddc 100644 --- a/bsp/meta-freescale/conf/machine/mpc8548cds.conf +++ b/bsp/meta-freescale/conf/machine/mpc8548cds.conf @@ -6,9 +6,9 @@ require conf/machine/include/e500v2.inc UBOOT_CONFIG ??= "nor" -UBOOT_CONFIG[nor] = "MPC8548CDS_defconfig,,u-boot.bin" +UBOOT_CONFIG[nor] = "MPC8548CDS_defconfig,,u-boot-with-dtb.bin" -KERNEL_DEVICETREE = "mpc8548cds_32b.dtb" +KERNEL_DEVICETREE = "fsl/mpc8548cds_32b.dtb" KERNEL_DEFCONFIG = "mpc85xx_defconfig" USE_VT ?= "0" diff --git a/bsp/meta-freescale/conf/machine/p1020rdb.conf b/bsp/meta-freescale/conf/machine/p1020rdb.conf index 50edba7d..974213c1 100644 --- a/bsp/meta-freescale/conf/machine/p1020rdb.conf +++ b/bsp/meta-freescale/conf/machine/p1020rdb.conf @@ -7,20 +7,20 @@ require conf/machine/include/e500v2.inc -MACHINEOVERRIDES =. "p1020" +MACHINEOVERRIDES =. "p1020:" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_CONFIG ??= "nand sdcard spi nor" -UBOOT_CONFIG[nor] = "P1020RDB-PD_config" -UBOOT_CONFIG[nand] = "P1020RDB-PD_NAND_config" -UBOOT_CONFIG[sdcard] = "P1020RDB-PD_SDCARD_config" -UBOOT_CONFIG[spi] = "P1020RDB-PD_SPIFLASH_config" +UBOOT_CONFIG[nor] = "P1020RDB-PD_config,,u-boot-with-dtb.bin" +UBOOT_CONFIG[nand] = "P1020RDB-PD_NAND_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[sdcard] = "P1020RDB-PD_SDCARD_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[spi] = "P1020RDB-PD_SPIFLASH_config,,u-boot-with-spl.bin" UBOOT_SOURCE_NAND = "u-boot-with-spl.bin" UBOOT_SOURCE_SPI = "u-boot-with-spl.bin" UBOOT_SOURCE_SD = "u-boot-with-spl.bin" -KERNEL_DEVICETREE ?= "p1020rdb-pd.dtb" +KERNEL_DEVICETREE ?= "fsl/p1020rdb-pd.dtb" KERNEL_DEFCONFIG ?= "mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/bsp/meta-freescale/conf/machine/p2020rdb.conf b/bsp/meta-freescale/conf/machine/p2020rdb.conf index 324186ca..40e279d2 100644 --- a/bsp/meta-freescale/conf/machine/p2020rdb.conf +++ b/bsp/meta-freescale/conf/machine/p2020rdb.conf @@ -11,16 +11,16 @@ MACHINEOVERRIDES =. "p2020:" BOOTFORMAT_CONFIG = "config_sram_p1022ds.dat" UBOOT_CONFIG ??= "nand sdcard spi 36bit-nor 36bit-spi 36bit-nand 36bit-sdcard nor" -UBOOT_CONFIG[nor] = "P2020RDB-PC_config,,u-boot.bin" -UBOOT_CONFIG[nand] = "P2020RDB-PC_NAND_config,,u-boot.bin" -UBOOT_CONFIG[sdcard] = "P2020RDB-PC_SDCARD_config,,u-boot.bin" -UBOOT_CONFIG[spi] = "P2020RDB-PC_SPIFLASH_config,,u-boot.bin" -UBOOT_CONFIG[36bit-nor] = "P2020RDB-PC_36BIT_config,,u-boot.bin" -UBOOT_CONFIG[36bit-spi] = "P2020RDB-PC_36BIT_SPIFLASH_config,,u-boot.bin" -UBOOT_CONFIG[36bit-nand] = "P2020RDB-PC_36BIT_NAND_config,,u-boot.bin" -UBOOT_CONFIG[36bit-sdcard] = "P2020RDB-PC_36BIT_SDCARD_config,,u-boot.bin" +UBOOT_CONFIG[nor] = "P2020RDB-PC_config,,u-boot-with-dtb.bin" +UBOOT_CONFIG[nand] = "P2020RDB-PC_NAND_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[sdcard] = "P2020RDB-PC_SDCARD_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[spi] = "P2020RDB-PC_SPIFLASH_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[36bit-nor] = "P2020RDB-PC_36BIT_config,,u-boot-with-dtb.bin" +UBOOT_CONFIG[36bit-spi] = "P2020RDB-PC_36BIT_SPIFLASH_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[36bit-nand] = "P2020RDB-PC_36BIT_NAND_config,,u-boot-with-spl.bin" +UBOOT_CONFIG[36bit-sdcard] = "P2020RDB-PC_36BIT_SDCARD_config,,u-boot-with-spl.bin" -KERNEL_DEVICETREE ?= "p2020rdb-pc_32b.dtb" +KERNEL_DEVICETREE ?= "fsl/p2020rdb-pc_32b.dtb" KERNEL_DEFCONFIG ?= "mpc85xx_smp_defconfig" JFFS2_ERASEBLOCK = "0x20000" diff --git a/bsp/meta-freescale/conf/machine/p2041rdb.conf b/bsp/meta-freescale/conf/machine/p2041rdb.conf index 102cc8db..67fa16d1 100644 --- a/bsp/meta-freescale/conf/machine/p2041rdb.conf +++ b/bsp/meta-freescale/conf/machine/p2041rdb.conf @@ -7,18 +7,17 @@ require conf/machine/include/e500mc.inc -MACHINEOVERRIDES =. "p2041" +MACHINEOVERRIDES =. "p2041:" -UBOOT_CONFIG ??= "nand secure-boot sdcard spi nor" -UBOOT_CONFIG[nor] = "P2041RDB_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "P2041RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "P2041RDB_NAND_config,,u-boot.pbl" -UBOOT_CONFIG[secure-boot] = "P2041RDB_SECURE_BOOT_config" UBOOT_CONFIG[sdcard] = "P2041RDB_SDCARD_config,,u-boot.pbl" UBOOT_CONFIG[spi] = "P2041RDB_SPIFLASH_config,,u-boot.pbl" HV_CFG_M = "p2041rdb" -KERNEL_DEVICETREE ?= "p2041rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/p2041rdb.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/p3041ds.conf b/bsp/meta-freescale/conf/machine/p3041ds.conf index c7ce4692..cb8099c2 100644 --- a/bsp/meta-freescale/conf/machine/p3041ds.conf +++ b/bsp/meta-freescale/conf/machine/p3041ds.conf @@ -7,18 +7,17 @@ require conf/machine/include/e500mc.inc -MACHINEOVERRIDES =. "p3041" +MACHINEOVERRIDES =. "p3041:" -UBOOT_CONFIG ??= "nand secure-boot sdcard spi nor" -UBOOT_CONFIG[nor] = "P3041DS_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "P3041DS_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "P3041DS_NAND_config,,u-boot.pbl" -UBOOT_CONFIG[secure-boot] = "P3041DS_SECURE_BOOT_config" UBOOT_CONFIG[sdcard] = "P3041DS_SDCARD_config,,u-boot.pbl" UBOOT_CONFIG[spi] = "P3041DS_SPIFLASH_config,,u-boot.pbl" HV_CFG_M = "p3041ds" -KERNEL_DEVICETREE ?= "p3041ds.dtb" +KERNEL_DEVICETREE ?= "fsl/p3041ds.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/p4080ds.conf b/bsp/meta-freescale/conf/machine/p4080ds.conf index 23a7816b..e648a242 100644 --- a/bsp/meta-freescale/conf/machine/p4080ds.conf +++ b/bsp/meta-freescale/conf/machine/p4080ds.conf @@ -7,17 +7,16 @@ require conf/machine/include/e500mc.inc -MACHINEOVERRIDES =. "p4080" +MACHINEOVERRIDES =. "p4080:" -UBOOT_CONFIG ??= "secure-boot sdcard spi nor" -UBOOT_CONFIG[nor] = "P4080DS_config" -UBOOT_CONFIG[secure-boot] = "P4080DS_SECURE_BOOT_config" +UBOOT_CONFIG ??= "sdcard spi nor" +UBOOT_CONFIG[nor] = "P4080DS_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[sdcard] = "P4080DS_SDCARD_config,,u-boot.pbl" UBOOT_CONFIG[spi] = "P4080DS_SPIFLASH_config,,u-boot.pbl" HV_CFG_M = "p4080ds" -KERNEL_DEVICETREE ?= "p4080ds.dtb" +KERNEL_DEVICETREE ?= "fsl/p4080ds.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/p5040ds-64b.conf b/bsp/meta-freescale/conf/machine/p5040ds-64b.conf index 161eb5e9..a6a29393 100644 --- a/bsp/meta-freescale/conf/machine/p5040ds-64b.conf +++ b/bsp/meta-freescale/conf/machine/p5040ds-64b.conf @@ -9,16 +9,15 @@ require conf/machine/include/e5500-64b.inc MACHINEOVERRIDES =. "p5040:" -UBOOT_CONFIG ??= "nand secure-boot sdcard spi nor" -UBOOT_CONFIG[nor] = "P5040DS_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "P5040DS_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "P5040DS_NAND_config,,u-boot.pbl" -UBOOT_CONFIG[secure-boot] = "P5040DS_SECURE_BOOT_config" UBOOT_CONFIG[sdcard] = "P5040DS_SDCARD_config,,u-boot.pbl" UBOOT_CONFIG[spi] = "P5040DS_SPIFLASH_config,,u-boot.pbl" HV_CFG_M = "p5040ds" -KERNEL_DEVICETREE ?= "p5040ds.dtb" +KERNEL_DEVICETREE ?= "fsl/p5040ds.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/p5040ds.conf b/bsp/meta-freescale/conf/machine/p5040ds.conf index af581f49..daa8d4cd 100644 --- a/bsp/meta-freescale/conf/machine/p5040ds.conf +++ b/bsp/meta-freescale/conf/machine/p5040ds.conf @@ -7,18 +7,17 @@ require conf/machine/include/e5500.inc -MACHINEOVERRIDES =. "p5040" +MACHINEOVERRIDES =. "p5040:" -UBOOT_CONFIG ??= "nand secure-boot sdcard spi nor" -UBOOT_CONFIG[nor] = "P5040DS_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "P5040DS_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "P5040DS_NAND_config,,u-boot.pbl" -UBOOT_CONFIG[secure-boot] = "P5040DS_SECURE_BOOT_config" UBOOT_CONFIG[sdcard] = "P5040DS_SDCARD_config,,u-boot.pbl" UBOOT_CONFIG[spi] = "P5040DS_SPIFLASH_config,,u-boot.pbl" HV_CFG_M = "p5040ds" -KERNEL_DEVICETREE ?= "p5040ds.dtb" +KERNEL_DEVICETREE ?= "fsl/p5040ds.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t1024rdb-64b.conf b/bsp/meta-freescale/conf/machine/t1024rdb-64b.conf index 490c8491..92ccc0e6 100644 --- a/bsp/meta-freescale/conf/machine/t1024rdb-64b.conf +++ b/bsp/meta-freescale/conf/machine/t1024rdb-64b.conf @@ -9,16 +9,15 @@ require conf/machine/include/e5500-64b.inc MACHINEOVERRIDES =. "t1:t1024:" -UBOOT_CONFIG ??= "nand sdcard spi secure-boot nor" -UBOOT_CONFIG[nor] = "T1024RDB_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "T1024RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "T1024RDB_NAND_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[sdcard] = "T1024RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T1024RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "T1024RDB_SECURE_BOOT_config" HV_CFG_M = "t1024rdb" -KERNEL_DEVICETREE ?= "t1024rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t1024rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t1024rdb.conf b/bsp/meta-freescale/conf/machine/t1024rdb.conf index 616ce3f1..9d39958e 100644 --- a/bsp/meta-freescale/conf/machine/t1024rdb.conf +++ b/bsp/meta-freescale/conf/machine/t1024rdb.conf @@ -7,18 +7,17 @@ require conf/machine/include/e5500.inc -MACHINEOVERRIDES =. "t1:t1024" +MACHINEOVERRIDES =. "t1:t1024:" -UBOOT_CONFIG ??= "nand sdcard spi secure-boot nor" -UBOOT_CONFIG[nor] = "T1024RDB_config" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "T1024RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "T1024RDB_NAND_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[sdcard] = "T1024RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T1024RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "T1024RDB_SECURE_BOOT_config" HV_CFG_M = "t1024rdb" -KERNEL_DEVICETREE ?= "t1024rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t1024rdb.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t1042d4rdb-64b.conf b/bsp/meta-freescale/conf/machine/t1042d4rdb-64b.conf index 873f206a..dd9acda1 100644 --- a/bsp/meta-freescale/conf/machine/t1042d4rdb-64b.conf +++ b/bsp/meta-freescale/conf/machine/t1042d4rdb-64b.conf @@ -9,16 +9,15 @@ require conf/machine/include/e5500-64b.inc MACHINEOVERRIDES =. "t1:t1042:" -UBOOT_CONFIG ??= "nand sdcard spi secure-boot nor" -UBOOT_CONFIG[nor] = "T1042D4RDB_config,,u-boot.bin" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "T1042D4RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "T1042D4RDB_NAND_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[sdcard] = "T1042D4RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T1042D4RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "T1042D4RDB_SECURE_BOOT_config,,u-boot.bin" HV_CFG_M = "t1040rdb" -KERNEL_DEVICETREE ?= "t1042d4rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t1042d4rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t1042d4rdb.conf b/bsp/meta-freescale/conf/machine/t1042d4rdb.conf index 685b7cb1..52a792c7 100644 --- a/bsp/meta-freescale/conf/machine/t1042d4rdb.conf +++ b/bsp/meta-freescale/conf/machine/t1042d4rdb.conf @@ -9,16 +9,15 @@ require conf/machine/include/e5500.inc MACHINEOVERRIDES =. "t1:t1042:" -UBOOT_CONFIG ??= "nand sdcard spi secure-boot nor" -UBOOT_CONFIG[nor] = "T1042D4RDB_config,,u-boot.bin" +UBOOT_CONFIG ??= "nand sdcard spi nor" +UBOOT_CONFIG[nor] = "T1042D4RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[nand] = "T1042D4RDB_NAND_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[sdcard] = "T1042D4RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T1042D4RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[secure-boot] = "T1042D4RDB_SECURE_BOOT_config,,u-boot.bin" HV_CFG_M = "t1040rdb" -KERNEL_DEVICETREE ?= "t1042d4rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t1042d4rdb.dtb" KERNEL_DEFCONFIG ?= "corenet32_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t2080rdb-64b.conf b/bsp/meta-freescale/conf/machine/t2080rdb-64b.conf index c46d94cf..2da8b3d2 100644 --- a/bsp/meta-freescale/conf/machine/t2080rdb-64b.conf +++ b/bsp/meta-freescale/conf/machine/t2080rdb-64b.conf @@ -9,17 +9,15 @@ require conf/machine/include/e6500-64b.inc MACHINEOVERRIDES =. "t2:t2080:" -UBOOT_CONFIG ??= "sdcard spi nand srio-pcie-boot secure-boot nor" -UBOOT_CONFIG[nor] = "T2080RDB_config" +UBOOT_CONFIG ??= "sdcard spi nand nor" +UBOOT_CONFIG[nor] = "T2080RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[sdcard] = "T2080RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T2080RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[nand] = "T2080RDB_NAND_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[srio-pcie-boot] = "T2080RDB_SRIO_PCIE_BOOT_config" -UBOOT_CONFIG[secure-boot] = "T2080RDB_SECURE_BOOT_config" HV_CFG_M = "t2080rdb" -KERNEL_DEVICETREE ?= "t2080rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t2080rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t2080rdb.conf b/bsp/meta-freescale/conf/machine/t2080rdb.conf index bfcb7689..9b6a85ac 100644 --- a/bsp/meta-freescale/conf/machine/t2080rdb.conf +++ b/bsp/meta-freescale/conf/machine/t2080rdb.conf @@ -7,19 +7,17 @@ require conf/machine/include/e6500.inc -MACHINEOVERRIDES =. "t2:t2080" +MACHINEOVERRIDES =. "t2:t2080:" -UBOOT_CONFIG ??= "sdcard spi nand srio-pcie-boot secure-boot nor" -UBOOT_CONFIG[nor] = "T2080RDB_config" +UBOOT_CONFIG ??= "sdcard spi nand nor" +UBOOT_CONFIG[nor] = "T2080RDB_config,,u-boot-with-dtb.bin" UBOOT_CONFIG[sdcard] = "T2080RDB_SDCARD_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[spi] = "T2080RDB_SPIFLASH_config,,u-boot-with-spl-pbl.bin" UBOOT_CONFIG[nand] = "T2080RDB_NAND_config,,u-boot-with-spl-pbl.bin" -UBOOT_CONFIG[srio-pcie-boot] = "T2080RDB_SRIO_PCIE_BOOT_config" -UBOOT_CONFIG[secure-boot] = "T2080RDB_SECURE_BOOT_config" HV_CFG_M = "t2080rdb" -KERNEL_DEVICETREE ?= "t2080rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t2080rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t4240rdb-64b.conf b/bsp/meta-freescale/conf/machine/t4240rdb-64b.conf index 0ccfce7c..7073e2a9 100644 --- a/bsp/meta-freescale/conf/machine/t4240rdb-64b.conf +++ b/bsp/meta-freescale/conf/machine/t4240rdb-64b.conf @@ -10,11 +10,11 @@ require conf/machine/include/e6500-64b.inc MACHINEOVERRIDES =. "t4:t4240:" UBOOT_CONFIG ??= "nor" -UBOOT_CONFIG[nor] = "T4240RDB_config" +UBOOT_CONFIG[nor] = "T4240RDB_config,,u-boot-with-dtb.bin" HV_CFG_M = "t4240rdb" -KERNEL_DEVICETREE ?= "t4240rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t4240rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/conf/machine/t4240rdb.conf b/bsp/meta-freescale/conf/machine/t4240rdb.conf index 9f86345e..1f8cb83c 100644 --- a/bsp/meta-freescale/conf/machine/t4240rdb.conf +++ b/bsp/meta-freescale/conf/machine/t4240rdb.conf @@ -7,14 +7,14 @@ require conf/machine/include/e6500.inc -MACHINEOVERRIDES =. "t4:t4240" +MACHINEOVERRIDES =. "t4:t4240:" UBOOT_CONFIG ??= "nor" -UBOOT_CONFIG[nor] = "T4240RDB_config" +UBOOT_CONFIG[nor] = "T4240RDB_config,,u-boot-with-dtb.bin" HV_CFG_M = "t4240rdb" -KERNEL_DEVICETREE ?= "t4240rdb.dtb" +KERNEL_DEVICETREE ?= "fsl/t4240rdb.dtb" KERNEL_DEFCONFIG ?= "corenet64_smp_defconfig" JFFS2_ERASEBLOCK = "0x10000" diff --git a/bsp/meta-freescale/dynamic-layers/aglprofilegraphical/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-freescale/dynamic-layers/aglprofilegraphical/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..10b66c0e --- /dev/null +++ b/bsp/meta-freescale/dynamic-layers/aglprofilegraphical/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,3 @@ +do_install_append() { + rm -f ${D}${sysconfdir}/xdg/weston/weston.ini +} diff --git a/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..72d991c7 --- /dev/null +++ b/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini b/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..6e8e0140 --- /dev/null +++ b/bsp/meta-freescale/dynamic-layers/ivi/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,104 @@ +[core] +shell=ivi-shell.so +modules=hmi-controller.so +#gbm-format=argb8888 +#use-g2d=1 +#xwayland=true + +#[shell] +#size=1920x1080 + +[ivi-shell] +ivi-shell-user-interface=weston-ivi-shell-user-interface + +#developermode=true + +cursor-theme=default +cursor-size=32 + +base-layer-id=1000 +base-layer-id-offset=10000 + +workspace-background-layer-id=2000 +workspace-layer-id=3000 +application-layer-id=4000 + +transition-duration=300 + +background-image=/usr/share/weston/background.png +background-id=1001 +panel-image=/usr/share/weston/panel.png +panel-id=1002 +surface-id-offset=10 +tiling-image=/usr/share/weston/tiling.png +tiling-id=1003 +sidebyside-image=/usr/share/weston/sidebyside.png +sidebyside-id=1004 +fullscreen-image=/usr/share/weston/fullscreen.png +fullscreen-id=1005 +random-image=/usr/share/weston/random.png +random-id=1006 +home-image=/usr/share/weston/home.png +home-id=1007 +workspace-background-color=0x99000000 +workspace-background-id=2001 + +[ivi-launcher] +workspace-id=0 +icon-id=4001 +icon=/usr/share/weston/icon_ivi_flower.png +path=/usr/bin/weston-flower + +[ivi-launcher] +workspace-id=0 +icon-id=4002 +icon=/usr/share/weston/icon_ivi_clickdot.png +path=/usr/bin/weston-clickdot + +[ivi-launcher] +workspace-id=1 +icon-id=4003 +icon=/usr/share/weston/icon_ivi_simple-egl.png +path=/usr/bin/weston-simple-egl + +[ivi-launcher] +workspace-id=1 +icon-id=4004 +icon=/usr/share/weston/icon_ivi_simple-shm.png +path=/usr/bin/weston-simple-shm + +[ivi-launcher] +workspace-id=2 +icon-id=4005 +icon=/usr/share/weston/icon_ivi_smoke.png +path=/usr/bin/weston-smoke + +[ivi-launcher] +workspace-id=3 +icon-id=4006 +icon=/usr/share/weston/icon_ivi_flower.png +path=/usr/bin/weston-flower + +[ivi-launcher] +workspace-id=3 +icon-id=4007 +icon=/usr/share/weston/icon_ivi_clickdot.png +path=/usr/bin/weston-clickdot + +[ivi-launcher] +workspace-id=3 +icon-id=4008 +icon=/usr/share/weston/icon_ivi_simple-egl.png +path=/usr/bin/weston-simple-egl + +[ivi-launcher] +workspace-id=3 +icon-id=4009 +icon=/usr/share/weston/icon_ivi_simple-shm.png +path=/usr/bin/weston-simple-shm + +[ivi-launcher] +workspace-id=3 +icon-id=4010 +icon=/usr/share/weston/icon_ivi_smoke.png +path=/usr/bin/weston-smoke diff --git a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend index b579028b..2e648ba3 100644 --- a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend +++ b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend @@ -1,4 +1,4 @@ -PACKAGECONFIG_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', \ - bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d), d)}" -PACKAGECONFIG_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', '', \ - bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl', '', d), d)}" +# Only _mx8 machine do provide virtual/libgbm required for any drm* flavour +DRM-REMOVE_imxgpu = "drm-gl drm-gles2" +DRM-REMOVE_imxgpu_mx8 = "" +PACKAGECONFIG_remove = "${DRM-REMOVE}" diff --git a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb index cbf8e24f..2f5f1afa 100644 --- a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb +++ b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb @@ -39,7 +39,7 @@ do_install () { install -m 755 ${S}/source/fmc ${D}/${bindir} install -d ${D}${sysconfdir}/fmc/config - install -m 644 ${S}${sysconfdir}/fmc/config/hxs_pdl_v3.xml ${D}${sysconfdir}/fmc/config + install -m 644 ${S}${sysconfdir}/fmc/config/* ${D}${sysconfdir}/fmc/config install -d ${D}/${includedir}/fmc install ${S}/source/fmc.h ${D}/${includedir}/fmc diff --git a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv/0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv/0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch deleted file mode 100644 index 274fbe74..00000000 --- a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv/0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 90f869763026e8ff18aeecde217d778f00e4f294 Mon Sep 17 00:00:00 2001 -From: Shawn Xiao -Date: Tue, 10 Feb 2015 16:11:59 +0800 -Subject: [PATCH] MGS-515 [#ccc] Opencv app can't run on imx6sx with cam - -This issue is caused by the no support of VIDIOC_QUERYCTRL ioctl -item in latest cam driver. - -Modified the errno in check logic to compatible with new driver. - -Feb 10, 2015 - -Upstream-Status: Pending - -Signed-off-by: Shawn Xiao ---- - modules/highgui/src/cap_v4l.cpp | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/modules/highgui/src/cap_v4l.cpp b/modules/highgui/src/cap_v4l.cpp -index c9fca05..8c46b6c 100644 ---- a/modules/highgui/src/cap_v4l.cpp -+++ b/modules/highgui/src/cap_v4l.cpp -@@ -707,7 +707,8 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) - - } else { - -- if (errno == EINVAL) -+ if (errno == ENOTTY || -+ errno == EINVAL) - continue; - - perror ("VIDIOC_QUERYCTRL"); -@@ -774,7 +775,8 @@ static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) - - } else { - -- if (errno == EINVAL) -+ if (errno == ENOTTY || -+ errno == EINVAL) - break; - - perror ("VIDIOC_QUERYCTRL"); --- -2.3.0 - diff --git a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_3.4.%.bbappend b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_3.4.%.bbappend deleted file mode 100644 index 3c4c7f5e..00000000 --- a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_3.4.%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_mx6sx = " file://0001-MGS-515-ccc-Opencv-app-can-t-run-on-imx6sx-with-cam.patch" - -PACKAGECONFIG_remove_imxgpu2d = "v4l" diff --git a/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend new file mode 100644 index 00000000..2bae6470 --- /dev/null +++ b/bsp/meta-freescale/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG_remove_imxgpu2d = "v4l" diff --git a/bsp/meta-freescale/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc b/bsp/meta-freescale/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc index b7171ebc..187681a8 100644 --- a/bsp/meta-freescale/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc +++ b/bsp/meta-freescale/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc @@ -2,7 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:" python __anonymous () { families = ['mx6'] - cur_families = (d.getVar('MACHINEOVERRIDES', True) or '').split(':') + cur_families = (d.getVar('MACHINEOVERRIDES') or '').split(':') if any(map(lambda x: x in cur_families, families)): d.appendVarFlag('do_configure', 'depends', ' virtual/kernel:do_shared_workdir') diff --git a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch deleted file mode 100644 index 8e7129e3..00000000 --- a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0015-Add-eglfs-to-IMX-GPU.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: git/mkspecs/linux-oe-g++/qmake.conf -=================================================================== ---- git.orig/mkspecs/linux-oe-g++/qmake.conf 2016-12-14 17:03:17.000000000 -0600 -+++ git/mkspecs/linux-oe-g++/qmake.conf 2016-12-14 17:06:23.000000000 -0600 -@@ -37,6 +37,8 @@ QMAKE_LINK_C_SHLIB = $$(OE_QMAKE_LINK) - # for the SDK - isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $$(OE_QMAKE_QT_CONFIG) - -+EGLFS_DEVICE_INTEGRATION = eglfs_viv -+ - include(../oe-device-extra.pri) - - QMAKE_LIBS_EGL += -lEGL diff --git a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch deleted file mode 100644 index a245d79a..00000000 --- a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/0016-Configure-eglfs-with-egl-pkg-config.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: git/src/plugins/platforms/eglfs/eglfs-plugin.pro -=================================================================== ---- git.orig/src/plugins/platforms/eglfs/eglfs-plugin.pro 2017-01-04 16:54:05.000000000 -0600 -+++ git/src/plugins/platforms/eglfs/eglfs-plugin.pro 2017-01-04 16:56:25.000000000 -0600 -@@ -2,6 +2,8 @@ - - QT += platformsupport-private eglfs_device_lib-private - -+CONFIG += egl -+ - SOURCES += $$PWD/qeglfsmain.cpp - - OTHER_FILES += $$PWD/eglfs.json diff --git a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend index 08a2cbe3..bf3fb66e 100644 --- a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +++ b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -5,22 +5,20 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_imxgpu2d = " \ +SRC_URI_append_imxgpu = " \ file://0014-Add-IMX-GPU-support.patch \ file://0001-egl.prf-Fix-build-error-when-egl-headers-need-platfo.patch \ " -SRC_URI_APPEND_3D_NOT_X11 = " \ - file://0015-Add-eglfs-to-IMX-GPU.patch \ - file://0016-Configure-eglfs-with-egl-pkg-config.patch \ -" -SRC_URI_append_imxgpu3d = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '${SRC_URI_APPEND_3D_NOT_X11}', d)} \ -" + +PACKAGECONFIG_GL_IMX_GPU = "" +PACKAGECONFIG_GL_IMX_GPU_mx8 = "gbm kms" PACKAGECONFIG_GL_imxpxp = "gles2" -PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)}" -PACKAGECONFIG_GL_imxgpu3d = "gles2" -PACKAGECONFIG_GL_append_use-mainline-bsp = " gbm kms" +PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)} \ + ${PACKAGECONFIG_GL_IMX_GPU}" +PACKAGECONFIG_GL_imxgpu3d = "gles2 \ + ${PACKAGECONFIG_GL_IMX_GPU}" +PACKAGECONFIG_GL_use-mainline-bsp ?= "gles2 gbm kms" PACKAGECONFIG_PLATFORM = "" PACKAGECONFIG_PLATFORM_imxgpu2d = "no-opengl linuxfb" @@ -30,3 +28,10 @@ PACKAGECONFIG_PLATFORM_imxgpu3d = " \ 'eglfs', d), d)}" PACKAGECONFIG_PLATFORM_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'eglfs', d)}" PACKAGECONFIG += "${PACKAGECONFIG_PLATFORM}" + +PACKAGECONFIG_VULKAN_IMX_GPU = "" +PACKAGECONFIG_VULKAN_IMX_GPU_mx8 = "vulkan" +PACKAGECONFIG_VULKAN_IMX_GPU_mx8mm = "" +PACKAGECONFIG_VULKAN = "" +PACKAGECONFIG_VULKAN_imxgpu = "${PACKAGECONFIG_VULKAN_IMX_GPU}" +PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', '${PACKAGECONFIG_VULKAN}', '', d)}" diff --git a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend index 7f61dc50..afc728c1 100644 --- a/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend +++ b/bsp/meta-freescale/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend @@ -1,2 +1,5 @@ # etnaviv mesa does not have glx PACKAGECONFIG_remove_use-mainline-bsp = "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/bsp/meta-freescale/recipes-bsp/atf/atf-tools_git.bb b/bsp/meta-freescale/recipes-bsp/atf/atf-tools_git.bb new file mode 100644 index 00000000..33ec51c2 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/atf/atf-tools_git.bb @@ -0,0 +1,19 @@ +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" + +S = "${WORKDIR}/git" + +DEPENDS += "openssl" + +EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" + +do_install () { + install -m 0755 -d ${D}/${bindir} + install -m 0755 ${S}/tools/fiptool/fiptool ${D}/${bindir}/ +} + +BBCLASSEXTEND = "native" diff --git a/bsp/meta-freescale/recipes-bsp/atf/atf_git.bb b/bsp/meta-freescale/recipes-bsp/atf/atf_git.bb new file mode 100644 index 00000000..a93cb804 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/atf/atf_git.bb @@ -0,0 +1,247 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" + +inherit deploy + +DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native" +DEPENDS_append_lx2160a += "ddr-phy" +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" + +COMPATIBLE_MACHINE = "(qoriq)" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PLATFORM = "${MACHINE}" +PLATFORM_ls1088ardb-pb = "ls1088ardb" +PLATFORM_ADDITIONAL_TARGET ??= "" +PLATFORM_ADDITIONAL_TARGET_ls1012afrwy = "ls1012afrwy_512mb" + +RCW_FOLDER ?= "${MACHINE}" +RCW_FOLDER_ls1088ardb-pb = "ls1088ardb" + +# 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 ?= "nor nand qspi flexspi_nor sd emmc" +OTABOOTTYPE ?= "nor qspi flexspi_nor" +BUILD_SECURE = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}" +BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" +BUILD_FUSE = "${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'true', 'false', d)}" +BUILD_OTA = "${@bb.utils.contains('DISTRO_FEATURES', 'ota', 'true', 'false', d)}" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ +" +PACKAGECONFIG[optee] = ",,optee-os-qoriq" + +uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" +uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" +rcw ?= "" +rcw_ls1012afrwy = "_default" +rcw_ls1012ardb = "_default" +rcwsec ?= "_sben" + +chassistype ?= "ls2088_1088" +chassistype_ls1012ardb = "ls104x_1012" +chassistype_ls1012afrwy = "ls104x_1012" +chassistype_ls1043ardb = "ls104x_1012" +chassistype_ls1046ardb = "ls104x_1012" +chassistype_ls1046afrwy = "ls104x_1012" + +ddrphyopt ?= "" +ddrphyopt_lx2160ardb = "fip_ddr_sec" + +do_configure[noexec] = "1" + +do_compile() { + export LIBPATH="${RECIPE_SYSROOT_NATIVE}" + install -d ${S}/include/tools_share/openssl + cp -r ${RECIPE_SYSROOT}/usr/include/openssl/* ${S}/include/tools_share/openssl + 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 + + if [ "${BUILD_FUSE}" = "true" ]; then + ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_fusescr ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/input_files/gen_fusescr/${chassistype}/input_fuse_file + fuseopt="fip_fuse FUSE_PROG=1 FUSE_PROV_FILE=fuse_scr.bin" + fi + if [ "${BUILD_SECURE}" = "true" ]; then + secureopt="TRUSTED_BOARD_BOOT=1 ${ddrphyopt} CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst" + secext="_sec" + bl33="${uboot_boot_sec}" + if [ ${chassistype} = ls104x_1012 ]; then + rcwtemp="${rcwsec}" + else + rcwtemp="${rcw}" + fi + else + bl33="${uboot_boot}" + rcwtemp="${rcw}" + fi + + if [ "${BUILD_OPTEE}" = "true" ]; then + bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" + bl32opt="BL32=${bl32}" + spdopt="SPD=opteed" + fi + + if [ "${BUILD_OTA}" = "true" ]; then + otaopt="POLICY_OTA=1" + btype="${OTABOOTTYPE}" + else + btype="${BOOTTYPE}" + fi + + if [ -f ${DEPLOY_DIR_IMAGE}/ddr-phy/ddr4_pmu_train_dmem.bin ]; then + cp ${DEPLOY_DIR_IMAGE}/ddr-phy/*.bin ${S}/ + fi + + for d in ${btype}; do + case $d in + nor) + rcwimg="${RCWNOR}${rcwtemp}.bin" + uefiboot="${UEFI_NORBOOT}" + ;; + nand) + rcwimg="${RCWNAND}${rcwtemp}.bin" + ;; + qspi) + rcwimg="${RCWQSPI}${rcwtemp}.bin" + uefiboot="${UEFI_QSPIBOOT}" + if [ "${BUILD_SECURE}" = "true" ] && [ ${MACHINE} = ls1046ardb ]; then + rcwimg="RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_sben.bin" + fi + ;; + auto) + rcwimg="${RCWAUTO}${rcwtemp}.bin" + ;; + sd) + rcwimg="${RCWSD}${rcwtemp}.bin" + ;; + emmc) + rcwimg="${RCWEMMC}${rcwtemp}.bin" + ;; + flexspi_nor) + rcwimg="${RCWXSPI}${rcwtemp}.bin" + uefiboot="${UEFI_XSPIBOOT}" + ;; + esac + + if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then + oe_runmake V=1 -C ${S} realclean + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S} + cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S} + if [ "${BUILD_FUSE}" = "true" ]; then + cp -f ${S}/build/${PLATFORM}/release/fuse_fip.bin ${S} + fi + + if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then + oe_runmake V=1 -C ${S} realclean + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl + cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin + if [ "${BUILD_FUSE}" = "true" ]; then + cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin + fi + fi + if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then + oe_runmake V=1 -C ${S} realclean + oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} + cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S}/fip_uefi.bin + fi + fi + rcwimg="" + uefiboot="" + done +} + +do_install() { + install -d ${D}/boot/atf + cp -r ${S}/srk.pri ${D}/boot/atf + cp -r ${S}/srk.pub ${D}/boot/atf + if [ "${BUILD_SECURE}" = "true" ]; then + secext="_sec" + fi + if [ -f "${S}/fip_uefi.bin" ]; then + cp -r ${S}/fip_uefi.bin ${D}/boot/atf/fip_uefi.bin + fi + if [ -f "${S}/fuse_fip.bin" ]; then + cp -r ${S}/fuse_fip.bin ${D}/boot/atf/fuse_fip.bin + fi + if [ -f "${S}/fip.bin" ]; then + cp -r ${S}/fip.bin ${D}/boot/atf/fip.bin + fi + for d in ${BOOTTYPE}; do + if [ -e ${S}/bl2_${d}${secext}.pbl ]; then + cp -r ${S}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl + fi + done + if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then + cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fip_${PLATFORM_ADDITIONAL_TARGET}.bin + cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${D}/boot/atf/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl + if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then + cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin + fi + fi + chown -R root:root ${D} + if [ -f "${S}/fip_ddr_sec.bin" ]; then + cp -r ${S}/fip_ddr_sec.bin ${D}/boot/atf/fip_ddr_sec.bin + fi +} + +do_deploy() { + install -d ${DEPLOYDIR}/atf + cp -r ${D}/boot/atf/srk.pri ${DEPLOYDIR}/atf + cp -r ${D}/boot/atf/srk.pub ${DEPLOYDIR}/atf + if [ "${BUILD_SECURE}" = "true" ]; then + secext="_sec" + fi + + if [ -f "${S}/fuse_fip.bin" ]; then + cp -r ${D}/boot/atf/fuse_fip.bin ${DEPLOYDIR}/atf/fuse_fip${secext}.bin + fi + + if [ -e ${D}/boot/atf/fip_uefi.bin ]; then + cp -r ${D}/boot/atf/fip_uefi.bin ${DEPLOYDIR}/atf/fip_uefi.bin + fi + cp -r ${D}/boot/atf/fip.bin ${DEPLOYDIR}/atf/fip_uboot${secext}.bin + for d in ${BOOTTYPE}; do + if [ -e ${D}/boot/atf/bl2_${d}${secext}.pbl ]; then + cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl ${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl + fi + done + if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then + cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${DEPLOYDIR}/atf/ + cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_${PLATFORM_ADDITIONAL_TARGET}.bin + if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then + cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}${secext}.bin + fi + fi + if [ -f "${S}/fip_ddr_sec.bin" ]; then + cp -r ${D}/boot/atf/fip_ddr_sec.bin ${DEPLOYDIR}/atf/fip_ddr_sec.bin + fi +} +addtask deploy after do_install +FILES_${PN} += "/boot" +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb b/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb deleted file mode 100644 index 570ee3f6..00000000 --- a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "provides the tcl script for endian swap" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -SRC_URI = "file://byte_swap.tcl" - -S = "${WORKDIR}" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install () { - install -d ${D}/${bindir} - install -m 755 ${WORKDIR}/byte_swap.tcl ${D}/${bindir} -} - -RDEPENDS_${PN} += "tcl" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl b/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl deleted file mode 100755 index c6222022..00000000 --- a/bsp/meta-freescale/recipes-bsp/change-file-endianess/change-file-endianess/byte_swap.tcl +++ /dev/null @@ -1,40 +0,0 @@ -puts $argv -set i_file [lindex $argv 0] -set o_file [lindex $argv 1] -set num_b [lindex $argv 2] -puts "" - -set fileid_i [open $i_file "r"] -set fileid_o [open $o_file "w+"] -fconfigure $fileid_i -translation {binary binary} -fconfigure $fileid_o -translation {binary binary} - -set old_bin [read $fileid_i] -set new_bin {} -set old_length [string length $old_bin] -set old_rem [expr $old_length % $num_b] -if {$old_rem != 0} { - for {set i 0} {$i< [expr $num_b - $old_rem]} {incr i 1} { - append old_bin y - } -} -for {set i 0} {$i<[expr $old_length-8]} {incr i $num_b} { - for {set j $num_b} {$j>0} {incr j -1} { - append new_bin [string index $old_bin [expr $i+($j-1)]] - } -} - -for {set j 0} {$j<8} {incr j 1} { - append new_bin [string index $old_bin [expr $i+$j]] -} - -for {set i 0} {$i<[string length $old_bin]} {incr i $num_b} { - set binValue [string range $old_bin [expr $i+0] [expr $i+($num_b-1)]] - binary scan $binValue H[expr $num_b*2] hexValue - - set binValue [string range $new_bin [expr $i+0] [expr $i+($num_b-1)]] - binary scan $binValue H[expr $num_b*2] hexValue -} - -puts -nonewline $fileid_o $new_bin -close $fileid_o diff --git a/bsp/meta-freescale/recipes-bsp/ddr-phy/ddr-phy_git.bb b/bsp/meta-freescale/recipes-bsp/ddr-phy/ddr-phy_git.bb index ebd68c26..31f6c101 100644 --- a/bsp/meta-freescale/recipes-bsp/ddr-phy/ddr-phy_git.bb +++ b/bsp/meta-freescale/recipes-bsp/ddr-phy/ddr-phy_git.bb @@ -2,23 +2,38 @@ SUMMARY = "DDR firmware repository" LICENSE = "NXP-Binary-EULA" LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=89cc852481956e861228286ac7430d74" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/nxp/ddr-phy-binary.git;fsl-eula=true;nobranch=1" -SRCREV = "14d03e6e748ed5ebb9440f264bb374f1280b061c" +SRC_URI = "git://github.com/nxp/ddr-phy-binary.git;nobranch=1" +SRCREV = "fbc036b88acb6c06ffed02c898cbae9856ec75ba" S = "${WORKDIR}/git" REGLEX_lx2160a = "lx2160a" +DEPENDS += "atf-tools-native" + +do_compile() { + cd ${S}/${REGLEX} + fiptool create --ddr-immem-udimm-1d ddr4_pmu_train_imem.bin \ + --ddr-immem-udimm-2d ddr4_2d_pmu_train_imem.bin \ + --ddr-dmmem-udimm-1d ddr4_pmu_train_dmem.bin \ + --ddr-dmmem-udimm-2d ddr4_2d_pmu_train_dmem.bin \ + --ddr-immem-rdimm-1d ddr4_rdimm_pmu_train_imem.bin \ + --ddr-immem-rdimm-2d ddr4_rdimm2d_pmu_train_imem.bin \ + --ddr-dmmem-rdimm-1d ddr4_rdimm_pmu_train_dmem.bin \ + --ddr-dmmem-rdimm-2d ddr4_rdimm2d_pmu_train_dmem.bin \ + fip_ddr_all.bin +} + do_install () { install -d ${D}/boot - install -m 755 ${S}/${REGLEX}/* ${D}/boot + install -m 755 ${S}/${REGLEX}/*.bin ${D}/boot } do_deploy () { install -d ${DEPLOYDIR}/ddr-phy - install -m 755 ${S}/${REGLEX}/* ${DEPLOYDIR}/ddr-phy + install -m 755 ${S}/${REGLEX}/*.bin ${DEPLOYDIR}/ddr-phy } addtask deploy before do_populate_sysroot after do_install diff --git a/bsp/meta-freescale/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_20.04.bb b/bsp/meta-freescale/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_20.04.bb new file mode 100644 index 00000000..e8db5456 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/dp-firmware-cadence/dp-firmware-cadence_20.04.bb @@ -0,0 +1,30 @@ +SUMMARY = "DP firmware" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9" + +inherit deploy fsl-eula-unpack + +SRC_URI = "https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware-cadence-lsdk2004.bin;fsl-eula=true" + +SRC_URI[md5sum] = "d7eb8ef87cae8e4a205c266b3ac6f330" +SRC_URI[sha256sum] = "bef89a3eceed95e90748a2301d6f6ffbdf1a72237c0045093cb9485b05eb8fbd" + +S = "${WORKDIR}/firmware-cadence-lsdk2004" + +do_install () { + install -d ${D}/boot + cp -fr ${S}/dp/*.bin ${D}/boot +} + +do_deploy () { + install -d ${DEPLOYDIR}/dp + cp -fr ${S}/dp/*.bin ${DEPLOYDIR}/dp +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-7.8.inc b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-7.8.inc deleted file mode 100644 index 6da6736c..00000000 --- a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-7.8.inc +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright (C) 2018 O.S. Systems Software LTDA. -SECTION = "base" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -SRCBRANCH ?= "master" -SRC_URI = " \ - ${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \ -" - -SRC_URI[md5sum] = "0967aa59b3fd8d80fcb98146a9aac91b" -SRC_URI[sha256sum] = "910fbf866f61185adfd60c1704b2da41030cb175901d06e40402b49f9240bdee" - -S = "${WORKDIR}/firmware-imx-${PV}" - -inherit fsl-eula-unpack diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8.5.inc b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8.5.inc new file mode 100644 index 00000000..ae6b1d78 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8.5.inc @@ -0,0 +1,18 @@ +# Copyright (C) 2012-2016 Freescale Semiconductor +# Copyright 2017-2019 NXP +# Copyright (C) 2018 O.S. Systems Software LTDA. +SECTION = "base" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3" + +SRCBRANCH ?= "master" +SRC_URI = " \ + ${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \ +" + +SRC_URI[md5sum] = "a6b926d087e1e642580da8a6d982abe6" +SRC_URI[sha256sum] = "45b0a7392e7a4b2e6c7e1cb988dd660ff3f8cd465afdf796ff840a00db08389d" + +S = "${WORKDIR}/firmware-imx-${PV}" + +inherit fsl-eula-unpack diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_7.8.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_7.8.bb deleted file mode 100644 index d99aa41b..00000000 --- a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_7.8.bb +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2018 NXP -SUMMARY = "Freescale i.MX firmware for 8 family" -DESCRIPTION = "Freescale i.MX firmware for 8 family" - -require firmware-imx-${PV}.inc - -inherit deploy - -do_install[noexec] = "1" - -do_deploy() { - # Cadence HDMI - install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${DEPLOYDIR} - # SECO - install -m 0644 ${S}/firmware/seco/mx8qm-ahab-container.img ${DEPLOYDIR} -} -addtask deploy after do_install before do_build - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -COMPATIBLE_MACHINE = "(mx8)" -COMPATIBLE_MACHINE_mx8m = "(^$)" -COMPATIBLE_MACHINE_mx8x = "(^$)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb new file mode 100644 index 00000000..64fa2885 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb @@ -0,0 +1,23 @@ +# Copyright 2018 NXP +SUMMARY = "Freescale i.MX firmware for 8 family" +DESCRIPTION = "Freescale i.MX firmware for 8 family" + +require firmware-imx-${PV}.inc + +inherit deploy + +do_install[noexec] = "1" + +do_deploy() { + # Cadence HDMI + install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${DEPLOYDIR} +} +addtask deploy after do_install before do_build + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + +COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE_mx8m = "(^$)" +COMPATIBLE_MACHINE_mx8x = "(^$)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_7.8.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_7.8.bb deleted file mode 100644 index a605d226..00000000 --- a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_7.8.bb +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2018 NXP -SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family" -DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family" - -require firmware-imx-${PV}.inc - -inherit deploy - -do_install[noexec] = "1" - -do_deploy() { - # Synopsys DDR - for ddr_firmware in ${DDR_FIRMWARE_NAME}; do - install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} - done - # Cadence DP and HDMI - install -m 0644 ${S}/firmware/hdmi/cadence/signed_dp_imx8m.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ${DEPLOYDIR} -} -addtask deploy after do_install before do_build - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -COMPATIBLE_MACHINE = "(mx8m)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb new file mode 100644 index 00000000..a605d226 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb @@ -0,0 +1,24 @@ +# Copyright 2018 NXP +SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family" +DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family" + +require firmware-imx-${PV}.inc + +inherit deploy + +do_install[noexec] = "1" + +do_deploy() { + # Synopsys DDR + for ddr_firmware in ${DDR_FIRMWARE_NAME}; do + install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} + done + # Cadence DP and HDMI + install -m 0644 ${S}/firmware/hdmi/cadence/signed_dp_imx8m.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ${DEPLOYDIR} +} +addtask deploy after do_install before do_build + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + +COMPATIBLE_MACHINE = "(mx8m)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8x_7.8.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8x_7.8.bb deleted file mode 100644 index 85d394a0..00000000 --- a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx-8x_7.8.bb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2018 NXP -SUMMARY = "Freescale i.MX firmware for 8X family" -DESCRIPTION = "Freescale i.MX firmware for 8X family" - -require firmware-imx-${PV}.inc - -inherit deploy - -do_install[noexec] = "1" - -do_deploy() { - # SECO - install -m 0644 ${S}/firmware/seco/mx8qx-ahab-container.img ${DEPLOYDIR} -} - -addtask deploy after do_install before do_build - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -COMPATIBLE_MACHINE = "(mx8x)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_7.8.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_7.8.bb deleted file mode 100644 index bf0fbc3f..00000000 --- a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_7.8.bb +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright 2017-2018 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 - install -d ${D}${base_libdir}/firmware/bcm - install -d ${D}${sysconfdir}/firmware - - cd firmware - for d in *; do - case $d in - 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 - - - #1BW_BCM43340 - install -d ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 - cp -rfv git/brcm/1BW_BCM43340/*.bin ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 - cp -rfv git/brcm/1BW_BCM43340/*.cal ${D}${base_libdir}/firmware/bcm/1BW_BCM43340 - cp -rfv git/brcm/1BW_BCM43340/*.hcd ${D}${sysconfdir}/firmware/ - - #1CX_BCM4356 - install -d ${D}${base_libdir}/firmware/bcm/1CX_BCM4356 - cp -rfv git/brcm/1CX_BCM4356/fw_bcmdhd.bin ${D}${base_libdir}/firmware/bcm/1CX_BCM4356 - - #1DX_BCM4343W - install -d ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W - cp -rfv git/brcm/1DX_BCM4343W/*.bin ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W - cp -rfv git/brcm/1DX_BCM4343W/*.cal ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W - cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/ - - #1FD_BCM89359 - install -d ${D}${base_libdir}/firmware/bcm/1FD_BCM89359 - cp -rfv git/brcm/1FD_BCM89359/*.bin ${D}${base_libdir}/firmware/bcm/1FD_BCM89359 - cp -rfv git/brcm/1FD_BCM89359/*.hcd ${D}${sysconfdir}/firmware/ - - #SN8000_BCM43362 - install -d ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 - cp -rfv git/brcm/SN8000_BCM43362/*.bin ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 - cp -rfv git/brcm/SN8000_BCM43362/*.cal ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362 - cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/ - - #ZP_BCM4339 - install -d ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 - cp -rfv git/brcm/ZP_BCM4339/*.bin ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 - cp -rfv git/brcm/ZP_BCM4339/*.cal ${D}${base_libdir}/firmware/bcm/ZP_BCM4339 - cp -rfv git/brcm/ZP_BCM4339/*.hcd ${D}${sysconfdir}/firmware/ - - 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 - 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}-brcm ${PN}-scfw" - -FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/" -FILES_${PN}-brcm = "${base_libdir}/firmware/bcm/*/*.bin ${base_libdir}/firmware/bcm/*/*.cal ${sysconfdir}/firmware/" -FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/" - -COMPATIBLE_MACHINE = "(imx)" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_8.5.bb b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_8.5.bb new file mode 100644 index 00000000..ff623057 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-imx/firmware-imx_8.5.bb @@ -0,0 +1,76 @@ +# 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/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca.inc b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca.inc new file mode 100644 index 00000000..bafd0ea8 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca.inc @@ -0,0 +1,15 @@ +# Copyright 2018-2019 NXP + +SUMMARY = "Qualcomm Wi-Fi and Bluetooth firmware" +SECTION = "base" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3 \ + 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" +S = "${WORKDIR}/firmware-qca-${PV}" + +inherit fsl-eula-unpack diff --git a/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb new file mode 100644 index 00000000..fd0e24f0 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb @@ -0,0 +1,27 @@ +# Copyright 2019 NXP + +require firmware-qca.inc + +SUMMARY = "Qualcomm Wi-Fi and Bluetooth firmware" +DESCRIPTION = "Qualcomm Wi-Fi and Bluetooth firmware for modules such as QCA6174A" +SECTION = "base" +LICENSE = "Proprietary" + +inherit allarch + +do_install () { + # Install firmware.conf for QCA modules + install -d ${D}${sysconfdir}/bluetooth + install -m 644 ${S}/1CQ_QCA6174A_LEA_2.0/etc/bluetooth/firmware.conf ${D}${sysconfdir}/bluetooth + + # Install firmware files + install -d ${D}${base_libdir} + cp -r ${S}/1CQ_QCA6174A_LEA_2.0/lib/firmware ${D}${base_libdir} +} + +FILES_${PN} = " \ + ${sysconfdir}/bluetooth/firmware.conf \ + ${base_libdir}/firmware/qca6174 \ + ${base_libdir}/firmware/wlan \ + ${base_libdir}/firmware/* \ +" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb new file mode 100644 index 00000000..a1d6b0f1 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb @@ -0,0 +1,27 @@ +# Copyright 2018-2019 NXP + +require firmware-qca.inc + +SUMMARY = "Qualcomm Wi-Fi and Bluetooth firmware" +DESCRIPTION = "Qualcomm Wi-Fi and Bluetooth firmware for modules such as QCA9377-3" +SECTION = "base" +LICENSE = "Proprietary" + +inherit allarch + +do_install () { + # Install firmware.conf for QCA modules + install -d ${D}${sysconfdir}/bluetooth + install -m 644 ${S}/1PJ_QCA9377-3_LEA_3.0/etc/bluetooth/firmware.conf ${D}${sysconfdir}/bluetooth + + # Install firmware files + install -d ${D}${base_libdir} + cp -r ${S}/1PJ_QCA9377-3_LEA_3.0/lib/firmware ${D}${base_libdir} +} + +FILES_${PN} = " \ + ${sysconfdir}/bluetooth/firmware.conf \ + ${base_libdir}/firmware/qca \ + ${base_libdir}/firmware/qca9377 \ + ${base_libdir}/firmware/wlan \ +" diff --git a/bsp/meta-freescale/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb b/bsp/meta-freescale/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb new file mode 100644 index 00000000..b7bf0dff --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb @@ -0,0 +1,20 @@ +# Copyright 2018 NXP + +require firmware-qca.inc + +SUMMARY = "Qualcomm Wi-Fi and Bluetooth tools" +DESCRIPTION = "Qualcomm Wi-Fi and Bluetooth tools for modules such as QCA6174A and QCA9377" +LICENSE = "Proprietary" + +DEPENDS = "libnl zlib" + +FCC_TOOLS_FOLDER ?= "qca9377_qca6174_arm32" +FCC_TOOLS_FOLDER_aarch64 = "qca9377_qca6174_arm64" + +do_install() { + install -d ${D}${sbindir}/fcc_tools + cp -r ${S}/fcc_tools/${FCC_TOOLS_FOLDER} ${D}${sbindir}/fcc_tools +} + +COMPATIBLE_HOST = '(aarch64|arm).*-linux' +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/bsp/meta-freescale/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb b/bsp/meta-freescale/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb index 131bda55..60598ae5 100644 --- a/bsp/meta-freescale/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb +++ b/bsp/meta-freescale/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb @@ -5,7 +5,7 @@ and configuration files." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543" -SRC_URI = "git://git.freescale.com/ppc/sdk/fsl-tlu.git;branch=master" +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/fsl-tlu;protocol=https;nobranch=1" SRCREV = "8837cce3c86b30c0931c319e9e1a8ca622ae5354" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_1.5.0.bb b/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_1.5.0.bb deleted file mode 100644 index 9d402dba..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_1.5.0.bb +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2017-2018 NXP - -DESCRIPTION = "i.MX ARM Trusted Firmware" -SECTION = "BSP" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" - -PV = "1.5.0+git${SRCPV}" - -SRCBRANCH = "imx_4.9.123_imx8mm_ga" -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 = "af3554fc6ea8c17710ffd37a14a25834fad19271" - -S = "${WORKDIR}/git" - -inherit deploy - -BOOT_TOOLS = "imx-boot-tools" - -PLATFORM ?= "INVALID" -PLATFORM_mx8qm = "imx8qm" -PLATFORM_mx8qxp = "imx8qxp" -PLATFORM_mx8mq = "imx8mq" -PLATFORM_mx8mm = "imx8mm" - -EXTRA_OEMAKE += " \ - CROSS_COMPILE="${TARGET_PREFIX}" \ - PLAT=${PLATFORM} \ -" - -do_compile() { - # Clear LDFLAGS to avoid the option -Wl recognize issue - unset LDFLAGS - oe_runmake bl31 -} - -do_install[noexec] = "1" - -do_deploy() { - install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin -} -addtask deploy after do_compile - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_2.0.bb b/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_2.0.bb new file mode 100644 index 00000000..33ed6c62 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-atf/imx-atf_2.0.bb @@ -0,0 +1,57 @@ +# Copyright (C) 2017-2019 NXP + +DESCRIPTION = "i.MX ARM Trusted Firmware" +SECTION = "BSP" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PV .= "+git${SRCPV}" + +SRCBRANCH = "lf-5.4.y" +SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch \ +" +SRCREV = "7b3389d49815f1e3f7942bd312a27ee665bd2e33" + +S = "${WORKDIR}/git" + +inherit deploy + +BOOT_TOOLS = "imx-boot-tools" + +PLATFORM ?= "INVALID" +PLATFORM_mx8qm = "imx8qm" +PLATFORM_mx8qxp = "imx8qx" +PLATFORM_mx8mq = "imx8mq" +PLATFORM_mx8mm = "imx8mm" +PLATFORM_mx8mn = "imx8mn" + +EXTRA_OEMAKE += " \ + CROSS_COMPILE="${TARGET_PREFIX}" \ + PLAT=${PLATFORM} \ +" + +BUILD_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}" + +do_compile() { + # Clear LDFLAGS to avoid the option -Wl recognize issue + unset LDFLAGS + oe_runmake bl31 + if ${BUILD_OPTEE}; then + oe_runmake clean BUILD_BASE=build-optee + oe_runmake BUILD_BASE=build-optee SPD=opteed bl31 + fi +} + +do_install[noexec] = "1" + +do_deploy() { + install -Dm 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin + if ${BUILD_OPTEE}; then + install -m 0644 ${S}/build-optee/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${PLATFORM}.bin-optee + fi +} +addtask deploy after do_compile + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-kobs/imx-kobs_git.bb b/bsp/meta-freescale/recipes-bsp/imx-kobs/imx-kobs_git.bb index 60fcc25d..b104fafd 100644 --- a/bsp/meta-freescale/recipes-bsp/imx-kobs/imx-kobs_git.bb +++ b/bsp/meta-freescale/recipes-bsp/imx-kobs/imx-kobs_git.bb @@ -1,5 +1,5 @@ # Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP +# Copyright (C) 2017-2019 NXP # Copyright 2018 (C) O.S. Systems Software LTDA. SUMMARY = "Nand boot write source" @@ -9,11 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" PV = "5.5+git${SRCPV}" SRC_URI = "git://github.com/NXPmicro/imx-kobs.git;protocol=https \ - file://0001-Add-missing-includes-as-pointed-out-by-musl.patch \ " -SRCREV = "a0e9adce2fb7fcd57e794d7f9a5deba0f94f521b" +SRCREV = "cee66d0e956a64d03cc866fa8819da5b798c7f1b" S = "${WORKDIR}/git" inherit autotools pkgconfig -COMPATIBLE_MACHINE = "(imx)" +COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb index 32d5aa28..0f13a08b 100644 --- a/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb +++ b/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb @@ -1,4 +1,4 @@ -# Copyright 2017-2018 NXP +# Copyright 2017-2019 NXP require imx-mkimage_git.inc @@ -7,14 +7,15 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SECTION = "BSP" -IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware" +IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m" -IMX_EXTRA_FIRMWARE_mx8x = "firmware-imx-8x imx-sc-firmware" +IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco" DEPENDS += " \ - u-boot \ firmware-imx \ ${IMX_EXTRA_FIRMWARE} \ imx-atf \ + ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \ + u-boot-mkimage-native \ " DEPENDS_append_mx8m = " dtc-native" BOOT_NAME = "imx-boot" @@ -31,20 +32,18 @@ do_compile[depends] += " \ virtual/bootloader:do_deploy \ ${@' '.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)} \ " SC_FIRMWARE_NAME ?= "scfw_tcm.bin" ATF_MACHINE_NAME ?= "bl31-imx8qm.bin" ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin" -ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qxp.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_append = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', '-optee', '', d)}" - -DCD_NAME ?= "imx8qm_dcd.cfg.tmp" -DCD_NAME_mx8qm = "imx8qm_dcd.cfg.tmp" -DCD_NAME_mx8qxp = "imx8qx_dcd.cfg.tmp" +ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin" +ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin" @@ -56,22 +55,18 @@ SOC_TARGET_mx8qm = "iMX8QM" SOC_TARGET_mx8qxp = "iMX8QX" SOC_TARGET_mx8mq = "iMX8M" SOC_TARGET_mx8mm = "iMX8MM" +SOC_TARGET_mx8mn = "iMX8MN" + +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)}" -IMXBOOT_TARGETS_mx8qxp = \ - "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ - bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ - 'flash', d), d)}" -IMXBOOT_TARGETS_mx8qxpa0 = \ - "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi_a0', \ - bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand_a0', \ - 'flash_a0 flash_dcd_a0', d), d)}" BOOT_STAGING = "${S}/${SOC_TARGET}" BOOT_STAGING_mx8mm = "${S}/iMX8M" +BOOT_STAGING_mx8mn = "${S}/iMX8M" SOC_FAMILY = "INVALID" SOC_FAMILY_mx8 = "mx8" @@ -79,16 +74,19 @@ SOC_FAMILY_mx8m = "mx8m" SOC_FAMILY_mx8x = "mx8x" compile_mx8m() { - bbnote 8MQ/8MM boot binary build + bbnote 8MQ/8MM/8MN 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} done - cp ${DEPLOY_DIR_IMAGE}/signed_*_imx8m.bin ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${BOOT_STAGING}/u-boot-spl.bin + cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} + cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + ${BOOT_STAGING}/u-boot-spl.bin cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/mkimage_uboot ${BOOT_STAGING} + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ + ${BOOT_STAGING}/u-boot-nodtb.bin + cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin } @@ -107,8 +105,13 @@ compile_mx8x() { cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin } 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 + 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} @@ -127,34 +130,38 @@ do_install () { deploy_mx8m() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + ${DEPLOYDIR}/${BOOT_TOOLS} for ddr_firmware in ${DDR_FIRMWARE_NAME}; do install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} done - install -m 0644 ${DEPLOY_DIR_IMAGE}/signed_hdmi*.bin ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} + 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} } deploy_mx8() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${BOOT_STAGING}/${DCD_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/mx8qm-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} } deploy_mx8x() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - if [ "${MACHINE}" = "imx8qxpa0mek" ]; then - install -m 0644 ${BOOT_STAGING}/${DCD_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} - fi install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} } do_deploy() { deploy_${SOC_FAMILY} # copy the tool mkimage to deploy path and sc fw, dcd and uboot - install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} + + # copy tee.bin to deploy path + if ${DEPLOY_OPTEE}; then + install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} + fi + # copy makefile (soc.mak) for reference - install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} # copy the generated boot image to deploy path for target in ${IMXBOOT_TARGETS}; do # Use first "target" as IMAGE_IMXBOOT_TARGET diff --git a/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-mkimage_git.inc index a8cd930b..6e417722 100644 --- a/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-mkimage_git.inc +++ b/bsp/meta-freescale/recipes-bsp/imx-mkimage/imx-mkimage_git.inc @@ -1,10 +1,10 @@ -# Copyright 2017-2018 NXP +# Copyright 2017-2019 NXP DEPENDS = "zlib-native openssl-native" -SRCBRANCH = "imx_4.9.123_imx8mm_ga" +SRCBRANCH = "lf-5.4.y" SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "9e289f314eddb9d38cab73780b936acb30bb88b4" +SRCREV = "1c2277b95ce59f5d0265f26fec522e2ac2581e59" S = "${WORKDIR}/git" BOOT_TOOLS = "imx-boot-tools" diff --git a/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.9.bb b/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.9.bb deleted file mode 100644 index 329d4dc1..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_0.9.bb +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP - -DESCRIPTION = "i.MX System Controller Firmware" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" -SECTION = "BSP" - -inherit fsl-eula-unpack deploy - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" - -SRC_URI[md5sum] = "3246a44a242b68fae601561a80d5925c" -SRC_URI[sha256sum] = "00024e0dd332b402df03b62eac9a515fabc903568d0ad7f30fabc7c98b494f15" - -BOARD_TYPE ?= "mek" -SC_FIRMWARE_NAME ?= "mx8qm-mek-scfw-tcm.bin" -SC_FIRMWARE_NAME_mx8qm = "mx8qm-${BOARD_TYPE}-scfw-tcm.bin" -SC_FIRMWARE_NAME_mx8qxp = "mx8qx-${BOARD_TYPE}-scfw-tcm.bin" -symlink_name = "scfw_tcm.bin" - -BOOT_TOOLS = "imx-boot-tools" - -do_compile[noexec] = "1" - -do_install[noexec] = "1" - -do_deploy() { - install -Dm 0644 ${S}/${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} - ln -sf ${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${symlink_name} -} -addtask deploy after do_install - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb b/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb new file mode 100644 index 00000000..3bf7024c --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb @@ -0,0 +1,38 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright (C) 2017-2019 NXP + +DESCRIPTION = "i.MX System Controller Firmware" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3" +SECTION = "BSP" + +inherit fsl-eula-unpack deploy + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" + +SRC_URI[md5sum] = "b9d81d0c4cb7871e62dfe7b26d203240" +SRC_URI[sha256sum] = "5a28180217975f3d78fcfac15e46b0a942910fadf078e4af76deb6dc498136ed" + +BOARD_TYPE ?= "mek" +SC_FIRMWARE_NAME ?= "mx8qm-mek-scfw-tcm.bin" +SC_FIRMWARE_NAME_mx8qm = "mx8qm-${BOARD_TYPE}-scfw-tcm.bin" +SC_FIRMWARE_NAME_mx8qxp = "mx8qx-${BOARD_TYPE}-scfw-tcm.bin" +symlink_name = "scfw_tcm.bin" + +BOOT_TOOLS = "imx-boot-tools" + +do_compile[noexec] = "1" + +do_install[noexec] = "1" + +do_deploy() { + install -Dm 0644 ${S}/${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} + ln -sf ${SC_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}/${symlink_name} +} +addtask deploy after do_install + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-seco/imx-seco_2.3.1.bb b/bsp/meta-freescale/recipes-bsp/imx-seco/imx-seco_2.3.1.bb new file mode 100644 index 00000000..b86ea0b6 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-seco/imx-seco_2.3.1.bb @@ -0,0 +1,30 @@ +# 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/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch b/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch new file mode 100644 index 00000000..3fb9d4ef --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch @@ -0,0 +1,39 @@ +From d2e35983281a811b38e540ab82e7643322e84aab Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +--- + 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/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch b/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch deleted file mode 100644 index 8387a17c..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-test/imx-test/0001-test-Makefile-Add-include-path-to-CC-command.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d289d905c64882c58e3b99f74f68e72f9100115e Mon Sep 17 00:00:00 2001 -From: Fabio Berton -Date: Tue, 12 Jun 2018 14:58:40 -0300 -Subject: [PATCH] test/Makefile: Add include path to CC command -Organization: O.S. Systems Software LTDA. - -Signed-off-by: Fabio Berton ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index f1cfa2a..4f14d2c 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -12,7 +12,7 @@ ALL_OBJS := - - %.o: %.c - @echo " CC $@" -- $(Q)$(CC) -c $(CFLAGS) $< -o $@ -+ $(Q)$(CC) -c $(CFLAGS) $(INC) $< -o $@ - - - # This creates the build and copy rules for one executable. Because we --- -2.17.1 - diff --git a/bsp/meta-freescale/recipes-bsp/imx-test/imx-test_git.bb b/bsp/meta-freescale/recipes-bsp/imx-test/imx-test_git.bb index bf55f7df..81bbd3a3 100644 --- a/bsp/meta-freescale/recipes-bsp/imx-test/imx-test_git.bb +++ b/bsp/meta-freescale/recipes-bsp/imx-test/imx-test_git.bb @@ -1,6 +1,6 @@ -# Copyright (C) 2012-2018 O.S. Systems Software LTDA. +# Copyright (C) 2012-2016 O.S. Systems Software LTDA. # Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP +# Copyright (C) 2017-2019 NXP SUMMARY = "Test programs for i.MX BSP" DESCRIPTION = "Unit tests for the i.MX BSP" @@ -16,13 +16,13 @@ DEPENDS_append_imxvpu = " virtual/imxvpu" PE = "1" PV = "7.0+${SRCPV}" -SRCBRANCH = "imx_4.9.123_imx8mm_ga" +SRCBRANCH = "lf-5.4.y" SRC_URI = " \ git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-test-Makefile-Add-include-path-to-CC-command.patch \ + file://0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch \ file://memtool_profile \ " -SRCREV = "2cc785f94e5ee8782083d941e6aef24952cc2a38" +SRCREV = "6d20e84f2dbe5940fe6d629c2839e1390994ee1f" S = "${WORKDIR}/git" inherit module-base use-imx-headers @@ -30,15 +30,15 @@ inherit module-base use-imx-headers INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -PLATFORM_mx6q = "IMX6Q" -PLATFORM_mx6dl = "IMX6Q" -PLATFORM_mx6sl = "IMX6SL" +PLATFORM_mx6q = "IMX6Q" +PLATFORM_mx6dl = "IMX6Q" +PLATFORM_mx6sl = "IMX6SL" PLATFORM_mx6sll = "IMX6SL" -PLATFORM_mx6sx = "IMX6SX" -PLATFORM_mx6ul = "IMX6UL" -PLATFORM_mx7d = "IMX7D" +PLATFORM_mx6sx = "IMX6SX" +PLATFORM_mx6ul = "IMX6UL" +PLATFORM_mx7d = "IMX7D" PLATFORM_mx7ulp = "IMX7D" -PLATFORM_mx8 = "IMX8" +PLATFORM_mx8 = "IMX8" PARALLEL_MAKE = "-j 1" EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" @@ -49,9 +49,6 @@ PACKAGECONFIG_append_imxvpu = " vpu" PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr" PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu" -# FIXME: NXP should fix the possible string flaws from their code. -SECURITY_STRINGFORMAT = "" - do_compile() { CFLAGS="${TOOLCHAIN_OPTIONS}" oe_runmake V=1 VERBOSE='' \ @@ -82,5 +79,3 @@ FILES_${PN} += "/unit_tests /home/root/.profile" RDEPENDS_${PN} = "bash" FILES_${PN}-dbg += "/unit_tests/.debug" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-uuc/imx-uuc_git.bb b/bsp/meta-freescale/recipes-bsp/imx-uuc/imx-uuc_git.bb index ddc55db3..9fe9614a 100644 --- a/bsp/meta-freescale/recipes-bsp/imx-uuc/imx-uuc_git.bb +++ b/bsp/meta-freescale/recipes-bsp/imx-uuc/imx-uuc_git.bb @@ -1,20 +1,21 @@ # Copyright (C) 2016 Freescale Semiconductor - -SUMMARY = "A Daemon wait for Freescale/NXP mfgtools host's command" +# Copyright (C) 2017-2019 NXP +SUMMARY = "A Daemon wait for NXP mfgtools host's command" SECTION = "base" -DEPENDS = "dosfstools-native" +DEPENDS = "virtual/kernel dosfstools-native" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" inherit autotools-brokensep +PR = "r1" PV = "0.5.1+git${SRCPV}" SRC_URI = "git://github.com/NXPmicro/imx-uuc.git;protocol=https" -SRCREV = "e3fbdfef978abd150d9ea71c4d174daded9c8d33" +SRCREV = "ebb7d34853133d92eff9766e370ea21e6d6d8f2b" S = "${WORKDIR}/git" FILES_${PN} += "/linuxrc /fat" -COMPATIBLE_MACHINE = "(imx)" +COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch b/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch deleted file mode 100644 index a41641df..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro/0001-Get-i.MX-custom-headers-from-usr-include-imx.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a277191d6e7d775b1c081f8b25734f6f962ade14 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Thu, 4 Oct 2018 10:34:00 -0500 -Subject: [PATCH] Get i.MX custom headers from /usr/include/imx - -Upstream-Status: Pending - -Signed-off-by: Tom Hochstein ---- - Makefile_G1G2 | 5 ++--- - Makefile_H1 | 3 +-- - 2 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/Makefile_G1G2 b/Makefile_G1G2 -index caab40f..5b55a8b 100755 ---- a/Makefile_G1G2 -+++ b/Makefile_G1G2 -@@ -6,12 +6,11 @@ SOURCE_ROOT = decoder_sw/software - OMX_ROOT = openmax_il - - INCLUDE_HEADERS = -I./decoder_sw -I$(SOURCE_ROOT)/source/inc -I$(SOURCE_ROOT)/source/hevc \ -- -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9 \ -- -I$(SDKTARGETSYSROOT)/usr/imx/include -+ -I$(SOURCE_ROOT)/source/config -I$(SOURCE_ROOT)/source/dwl -I$(SOURCE_ROOT)/source/common -I$(SOURCE_ROOT)/source/vp9 - - INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/memalloc - #INCLUDE_HEADERS += -I$(SOURCE_ROOT)/linux/ldriver --INCLUDE_HEADERS += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include -+INCLUDE_HEADERS += -I$(SDKTARGETSYSROOT)/usr/include/imx - - CFLAGS += -DDEC_MODULE_PATH=\"/dev/mxc_hantro\" -DUSE_FAKE_RFC_TABLE -DFIFO_DATATYPE=void* -DNDEBUG -DDOWN_SCALER \ - -DUSE_EXTERNAL_BUFFER -DUSE_FAST_EC -DUSE_VP9_EC -DGET_FREE_BUFFER_NON_BLOCK \ -diff --git a/Makefile_H1 b/Makefile_H1 -index 9ca1aa9..237f53a 100755 ---- a/Makefile_H1 -+++ b/Makefile_H1 -@@ -17,8 +17,7 @@ ENV += -DMEMALLOC_MODULE_PATH=\\\"/dev/ion\\\" - #ENV += -DSDRAM_LM_BASE=0x00000000 - ENV += -DEWL_NO_HW_TIMEOUT - ENV += -DUSE_ION --ENV += -I$(LINUX_KERNEL_ROOT)/include/uapi -I$(LINUX_KERNEL_ROOT)/include --ENV += -I$(SDKTARGETSYSROOT)/usr/imx/include -+ENV += -I$(SDKTARGETSYSROOT)/usr/include/imx - - LIBENCNAME = libcodec_enc - LIBSENC = -L./ -lhantro_h1 -lpthread --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb b/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb new file mode 100644 index 00000000..67dbc8da --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.16.0.bb @@ -0,0 +1,34 @@ +# Copyright 2017-2018 NXP + +DESCRIPTION = "i.MX Hantro VPU library" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d" + +PROVIDES = "virtual/imxvpu" + +SRC_URI = " \ + ${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true \ +" +SRC_URI[md5sum] = "79ca586c67ea9b007fa772df8959c852" +SRC_URI[sha256sum] = "1f373f5d9a37754f7936f9bf4b134b65afe98459c0383b63c50c1f6ecba49e25" + +inherit fsl-eula-unpack use-imx-headers + +PARALLEL_MAKE="-j 1" + +PLATFORM_mx8mm = "IMX8MM" +PLATFORM_mx8mq = "IMX8MQ" + +do_compile () { + oe_runmake CROSS_COMPILE="${HOST_PREFIX}" \ + SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \ + PLATFORM="${PLATFORM}" all +} + +do_install () { + oe_runmake DEST_DIR="${D}" PLATFORM="${PLATFORM}" install +} + +FILES_${PN} += "/unit_tests" + +COMPATIBLE_MACHINE = "(mx8m)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb b/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb deleted file mode 100644 index a330c7b0..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-vpu-hantro/imx-vpu-hantro_1.8.0.bb +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2017-2018 NXP - -DESCRIPTION = "i.MX Hantro VPU library" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -PROVIDES = "virtual/imxvpu" - -SRC_URI = " \ - ${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ - file://0001-Get-i.MX-custom-headers-from-usr-include-imx.patch \ -" -SRC_URI[md5sum] = "140796ddd6f1be47cffb7e5e2bfe0fb6" -SRC_URI[sha256sum] = "c092a5b0f8897bae54154f58e47b6d2de033da01ee231a8cd779a51bbe962606" - -inherit fsl-eula-unpack use-imx-headers - -PARALLEL_MAKE="-j 1" - -PLATFORM_mx8mm = "IMX8MM" -PLATFORM_mx8mq = "IMX8MQ" - -do_compile () { - oe_runmake CROSS_COMPILE="${HOST_PREFIX}" \ - SDKTARGETSYSROOT="${STAGING_DIR_TARGET}" \ - PLATFORM="${PLATFORM}" all -} - -do_install () { - oe_runmake DEST_DIR="${D}" PLATFORM="${PLATFORM}" install -} - -FILES_${PN} += "/unit_tests" - -COMPATIBLE_MACHINE = "(mx8m)" diff --git a/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.38.bb b/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.38.bb deleted file mode 100644 index 185bb3d1..00000000 --- a/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.38.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=75abe2fa1d16ca79f87cde926f05f72d" - -PROVIDES = "virtual/imxvpu" - -PE = "1" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" - -SRC_URI[md5sum] = "521d5f839829f8d1f2a6a0e60270243e" -SRC_URI[sha256sum] = "34bed0ddf6c797f444bddfa5d5495adc751ff268b6431d8beb48129c89c9e47f" - -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/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb b/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb new file mode 100644 index 00000000..43377b1e --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/imx-vpu/imx-vpu_5.4.39.2.bb @@ -0,0 +1,31 @@ +# 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/bsp/meta-freescale/recipes-bsp/inphi/inphi_git.bb b/bsp/meta-freescale/recipes-bsp/inphi/inphi_git.bb index c0c8a776..3f3c5f28 100644 --- a/bsp/meta-freescale/recipes-bsp/inphi/inphi_git.bb +++ b/bsp/meta-freescale/recipes-bsp/inphi/inphi_git.bb @@ -2,9 +2,9 @@ SUMMARY = "Firmwares and Standalone Applications" LICENSE = "NXP-Binary-EULA" LIC_FILES_CHKSUM = "file://EULA.txt;md5=86d76166990962fa552f840ff08e5798" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/nxp/qoriq-firmware-inphi.git;fsl-eula=true;nobranch=1" +SRC_URI = "git://github.com/nxp/qoriq-firmware-inphi.git;nobranch=1" SRCREV = "f22e9ff3bfed8342da6efb699e473b11fbad5695" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/files/run-ptest b/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/files/run-ptest new file mode 100644 index 00000000..09f69a8d --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +./test-alloc >/dev/null 2>&1 + +if [ $? -eq 0 ]; then + echo "PASS: test-alloc" +else + echo "FAIL: test-alloc" +fi + diff --git a/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb b/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb new file mode 100644 index 00000000..9b918f2c --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb @@ -0,0 +1,46 @@ +DESCRIPTION = 'Library for allocating and managing physically contiguous memory \ + ("DMA memory" or "DMA buffers") on i.MX devices.' +HOMEPAGE = "https://github.com/Freescale/libimxdmabuffer" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" +SECTION = "base" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "d2058aa404ee1e8e8abd552c6a637787bcdcf514" +SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH} \ + file://run-ptest \ + " + + +S = "${WORKDIR}/git" + +inherit pkgconfig waf use-imx-headers ptest + +EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \ + --libdir=${libdir} \ + ${PACKAGECONFIG_CONFARGS}" + +PACKAGECONFIG ?= " " +PACKAGECONFIG_append_imxgpu2d = " g2d" +PACKAGECONFIG_append_imxipu = " ipu" +PACKAGECONFIG_append_imxpxp = " pxp" +PACKAGECONFIG_append_mx8m = " dwl ion" + +HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2" + +PACKAGECONFIG[dwl] = "--with-dwl-allocator=yes ${HANTRO_CONF},--with-dwl-allocator=no,imx-vpu-hantro" +PACKAGECONFIG[ion] = "--with-ion-allocator=yes, --with-ion-allocator=no," +PACKAGECONFIG[ipu] = "--with-ipu-allocator=yes, --with-ipu-allocator=no," +PACKAGECONFIG[g2d] = "--with-g2d-allocator=yes, --with-g2d-allocator=no,virtual/libg2d" +PACKAGECONFIG[pxp] = "--with-pxp-allocator=yes, --with-pxp-allocator=no," + +# Using do_install_ptest_base instead of do_install_ptest, since +# the default do_install_ptest_base is hardcoded to expect Makefiles. +do_install_ptest_base() { + install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest + install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH} +} + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/ls2-phy/ls2-phy_git.bb b/bsp/meta-freescale/recipes-bsp/ls2-phy/ls2-phy_git.bb index 18a63b13..a1c412be 100644 --- a/bsp/meta-freescale/recipes-bsp/ls2-phy/ls2-phy_git.bb +++ b/bsp/meta-freescale/recipes-bsp/ls2-phy/ls2-phy_git.bb @@ -2,9 +2,9 @@ SUMMARY = "Firmwares and Standalone Applications" LICENSE = "NXP-Binary-EULA" LIC_FILES_CHKSUM = "file://EULA.txt;md5=86d76166990962fa552f840ff08e5798" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/nxp/qoriq-firmware-cortina.git;fsl-eula=true;nobranch=1" +SRC_URI = "git://github.com/nxp/qoriq-firmware-cortina.git;nobranch=1" SRCREV = "9143c2a3adede595966583c00ca4edc99ec698cf" S = "${WORKDIR}/git" @@ -23,6 +23,6 @@ addtask deploy before do_build after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot" -COMPATIBLE_MACHINE = "(ls2080ardb|ls2088ardb|t2080|t4240|lx2160a)" +COMPATIBLE_MACHINE = "(qoriq)" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-freescale/recipes-bsp/mc-utils/mc-utils_git.bb b/bsp/meta-freescale/recipes-bsp/mc-utils/mc-utils_git.bb index 430d6cd8..31645061 100644 --- a/bsp/meta-freescale/recipes-bsp/mc-utils/mc-utils_git.bb +++ b/bsp/meta-freescale/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 = "6aca560c630dc54afdef382c506f214b28f4985e" +SRCREV = "8672a5f5abcd3a354dcab07e03f2a8a69b2e962d" S = "${WORKDIR}/git" @@ -19,24 +19,28 @@ MC_CFG_ls1088a = "ls1088a" MC_CFG_ls2088a = "ls2088a" MC_CFG_lx2160a = "lx2160a" -do_install () { +MC_FLAVOUR ?= "RDB" + +do_compile () { oe_runmake -C config +} +do_install () { install -d ${D}/boot/mc-utils - cp -r ${S}/config/${MC_CFG}/RDB/*.dtb ${D}/boot/mc-utils - if [ -d ${S}/config/${MC_CFG}/RDB/custom/ ]; then - install -d ${D}/boot/mc-utils/custom - cp -r ${S}/config/${MC_CFG}/RDB/custom/*.dtb ${D}/boot/mc-utils/custom - fi + cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${D}/boot/mc-utils + if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then + install -d ${D}/boot/mc-utils/custom + cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${D}/boot/mc-utils/custom + fi } do_deploy () { install -d ${DEPLOYDIR}/mc-utils - cp -r ${S}/config/${MC_CFG}/RDB/*.dtb ${DEPLOYDIR}/mc-utils - if [ -d ${S}/config/${MC_CFG}/RDB/custom/ ]; then - install -d ${DEPLOYDIR}/mc-utils/custom - cp -r ${S}/config/${MC_CFG}/RDB/custom/*.dtb ${DEPLOYDIR}/mc-utils/custom - fi + cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${DEPLOYDIR}/mc-utils + if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then + install -d ${DEPLOYDIR}/mc-utils/custom + cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${DEPLOYDIR}/mc-utils/custom + fi } addtask deploy after do_install diff --git a/bsp/meta-freescale/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb b/bsp/meta-freescale/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb index b94d88c4..fd53807f 100644 --- a/bsp/meta-freescale/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb +++ b/bsp/meta-freescale/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb @@ -5,10 +5,10 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=92723670f432558b9e2494ed177d2 INHIBIT_DEFAULT_DEPS = "1" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/NXP/qoriq-engine-pfe-bin.git;fsl-eula=true;nobranch=1" -SRCREV = "58aa0cac630528ed91fe5639700d6b571c0c07b5" +SRC_URI = "git://github.com/NXP/qoriq-engine-pfe-bin.git;nobranch=1" +SRCREV = "d3a8ef0760c54ddc243039c86389497e37be90ab" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-bsp/qe-ucode/qe-ucode_git.bb b/bsp/meta-freescale/recipes-bsp/qe-ucode/qe-ucode_git.bb index 1af630a6..cecd5903 100644 --- a/bsp/meta-freescale/recipes-bsp/qe-ucode/qe-ucode_git.bb +++ b/bsp/meta-freescale/recipes-bsp/qe-ucode/qe-ucode_git.bb @@ -3,36 +3,27 @@ SECTION = "qe-ucode" LICENSE = "NXP-Binary-EULA" LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=c62f8109b4df15ca37ceeb5e4943626c" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/NXP/qoriq-qe-ucode.git;fsl-eula=true;nobranch=1" +SRC_URI = "git://github.com/NXP/qoriq-qe-ucode.git;nobranch=1" SRCREV= "57401f6dff6507055558eaa6838116baa8a2fd46" S = "${WORKDIR}/git" -python () { - if not d.getVar("QE_UCODE", True): - PN = d.getVar("PN", True) - FILE = os.path.basename(d.getVar("FILE", True)) - bb.debug(1, "To build %s, see %s for instructions on \ - setting up your qe-ucode" % (PN, FILE)) - raise bb.parse.SkipRecipe("because QE_UCODE is not set") -} - do_install () { install -d ${D}/boot - install -m 644 ${B}/${QE_UCODE} ${D}/boot + install -m 644 ${B}/*.bin ${D}/boot } do_deploy () { install -d ${DEPLOYDIR}/boot - install -m 644 ${B}/${QE_UCODE} ${DEPLOYDIR}/boot + install -m 644 ${B}/*.bin ${DEPLOYDIR}/boot } addtask deploy before do_build after do_install PACKAGES += "${PN}-image" FILES_${PN}-image += "/boot/*" -COMPATIBLE_MACHINE = "(ls1021a|ls1043a|t1042|t1024)" +COMPATIBLE_MACHINE = "(qoriq)" PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/bsp/meta-freescale/recipes-bsp/rcw/rcw_git.bb b/bsp/meta-freescale/recipes-bsp/rcw/rcw_git.bb index c6bdad23..e1e63cce 100644 --- a/bsp/meta-freescale/recipes-bsp/rcw/rcw_git.bb +++ b/bsp/meta-freescale/recipes-bsp/rcw/rcw_git.bb @@ -1,30 +1,32 @@ SUMMARY = "Reset Configuration Word" DESCRIPTION = "Reset Configuration Word - hardware boot-time parameters for the QorIQ targets" LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=45a017ee5f4cfe64b1cddf2eb06cffc7" +LIC_FILES_CHKSUM = "file://LICENSE;md5=44a0d0fad189770cc022af4ac6262cbe" -DEPENDS += "change-file-endianess-native tcl-native" +DEPENDS += "tcl-native" inherit deploy siteinfo SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1" -SRCREV = "17254ac35250197877c6321f9d13e33b1f85388a" +SRCREV = "e0fab6d9b61003caef577f7474c2fac61e6ba2ff" S = "${WORKDIR}/git" -export PYTHON = "${USRBINPATH}/python2" +export PYTHON = "${USRBINPATH}/python3" -M="${@d.getVar('MACHINE', True).replace('-64b','').replace('-32b','').replace('-${SITEINFO_ENDIANNESS}','')}" +M="${@d.getVar('MACHINE').replace('-64b','').replace('-32b','').replace('-${SITEINFO_ENDIANNESS}','')}" + +BOARD_TARGETS="${M}" +BOARD_TARGETS_ls2088ardb="${M} ${M}_rev1.1" +BOARD_TARGETS_ls1088ardb-pb="ls1088ardb" +BOARD_TARGETS_lx2160ardb = "${M} ${M}_rev2" + +do_compile () { + oe_runmake BOARDS="${BOARD_TARGETS}" DESTDIR=${D}/boot/rcw/ +} do_install () { - if [ ${M} = ls2088ardb ]; then - oe_runmake BOARDS=${M} DESTDIR=${D}/boot/rcw/ install - oe_runmake BOARDS=${M}_rev1.1 DESTDIR=${D}/boot/rcw/ install - elif [ ${M} = ls1088ardb-pb ]; then - oe_runmake BOARDS=ls1088ardb DESTDIR=${D}/boot/rcw/ install - else - oe_runmake BOARDS=${M} DESTDIR=${D}/boot/rcw/ install - fi + oe_runmake BOARDS="${BOARD_TARGETS}" DESTDIR=${D}/boot/rcw/ install } do_deploy () { diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2018.11.inc b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2018.11.inc deleted file mode 100644 index 53496b7b..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2018.11.inc +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2012-2019 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -inherit fsl-u-boot-localversion - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" - -DEPENDS += "bison-native" - -SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH}" - -SRCREV = "6e25ce6f3c8568b9618de6569794a29a05e1b7a4" -SRCBRANCH = "2018.11+fslc" - -PV = "v2018.11+git${SRCPV}" - -S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc new file mode 100644 index 00000000..1ccd0d17 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2019 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +inherit fsl-u-boot-localversion + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" + +DEPENDS += "bison-native" + +SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH}" + +SRCREV = "a266838009e02b369b51f4139c6ac64facb12d34" +SRCBRANCH = "2020.04+fslc" + +PV = "v2020.04+git${SRCPV}" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-fw-utils_2018.11.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-fw-utils_2018.11.bb deleted file mode 100644 index a809a3f6..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-fw-utils_2018.11.bb +++ /dev/null @@ -1,45 +0,0 @@ -require u-boot-fslc-common_${PV}.inc - -SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" -DEPENDS += "mtd-utils" - -INSANE_SKIP_${PN} = "already-stripped" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' -EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' - -inherit uboot-config - -do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake envtools -} - -do_install () { - install -d ${D}${base_sbindir} - install -d ${D}${sysconfdir} - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv - - if [ -e ${WORKDIR}/fw_env.config ]; then - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config - else - install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config - fi -} - -do_install_class-cross () { - install -d ${D}${bindir_cross} - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv -} - -SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" -uboot_fw_utils_cross() { - sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} -} - -PROVIDES += "u-boot-fw-utils" -RPROVIDES_${PN} += "u-boot-fw-utils" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -BBCLASSEXTEND = "cross" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2018.11.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2018.11.bb deleted file mode 100644 index 9123b331..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2018.11.bb +++ /dev/null @@ -1,32 +0,0 @@ -require u-boot-fslc-common_${PV}.inc - -DESCRIPTION = "U-boot bootloader mxsboot tool" -SECTION = "bootloader" - -DEPENDS = "bison-native dtc openssl" - -PROVIDES = "u-boot-mxsboot" - -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' -EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' -EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' - -do_compile () { - oe_runmake sandbox_defconfig - - # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and - # generating it requires bin2header tool, which for target build - # is built with target tools and thus cannot be executed on host. - sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config - - oe_runmake cross_tools NO_SDL=1 -} - -do_install () { - install -Dm 0755 tools/mxsboot ${D}${bindir}/uboot-mxsboot - ln -sf uboot-mxsboot ${D}${bindir}/mxsboot -} - -COMPATIBLE_MACHINE_class-target = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb new file mode 100644 index 00000000..2492f450 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2020.04.bb @@ -0,0 +1,32 @@ +require u-boot-fslc-common_${PV}.inc + +DESCRIPTION = "U-boot bootloader mxsboot tool" +SECTION = "bootloader" + +DEPENDS = "bison-native dtc openssl" + +PROVIDES = "u-boot-mxsboot" + +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' +EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' +EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1 CONFIG_MX28=y' + +do_compile () { + oe_runmake -C ${S} O=${B} sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config + + oe_runmake -C ${S} O=${B} cross_tools NO_SDL=1 +} + +do_install () { + install -Dm 0755 tools/mxsboot ${D}${bindir}/uboot-mxsboot + ln -sf uboot-mxsboot ${D}${bindir}/mxsboot +} + +COMPATIBLE_MACHINE_class-target = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2018.11.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2018.11.bb deleted file mode 100644 index 5659e16c..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2018.11.bb +++ /dev/null @@ -1,21 +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 = " dtc-native" - -PROVIDES += "u-boot" - -# 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb new file mode 100644 index 00000000..64588efc --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-fslc_2020.04.bb @@ -0,0 +1,23 @@ +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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-common.inc b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-common.inc new file mode 100644 index 00000000..a2d2ed01 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-common.inc @@ -0,0 +1,20 @@ +DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCBRANCH = "lf-5.4.y_v2019.04" +SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}" +SRCREV = "228843cdf5435d4bd69f42a6015f78761ff4cc0d" + +DEPENDS += "flex-native bison-native bc-native dtc-native" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +inherit fsl-u-boot-localversion + +LOCALVERSION ?= "-${SRCBRANCH}" + +BOOT_TOOLS = "imx-boot-tools" + diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2017.03.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2017.03.bb deleted file mode 100644 index d5cb0339..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2017.03.bb +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2014 O.S. Systems Software LTDA. -# Copyright (C) 2014-2016 Freescale Semiconductor -# Copyright 2017 NXP - -FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-imx:" - -require u-boot-imx_${PV}.bb -require u-boot-mfgtool.inc diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb new file mode 100644 index 00000000..2b296c19 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb @@ -0,0 +1,8 @@ +# Copyright (C) 2014 O.S. Systems Software LTDA. +# Copyright (C) 2014-2016 Freescale Semiconductor +# Copyright 2017-2019 NXP + +FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-imx:" + +require u-boot-imx_${PV}.bb +require u-boot-mfgtool.inc diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb new file mode 100644 index 00000000..12ac72e2 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb @@ -0,0 +1,10 @@ +require recipes-bsp/u-boot/u-boot-tools.inc +require u-boot-imx-common.inc + +PROVIDES_append_class-target = " ${MLPREFIX}u-boot-tools" +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)" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch new file mode 100644 index 00000000..c717e029 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch @@ -0,0 +1,49 @@ +From bdaa73a5b3923257add182b4ab8058dbfa33421b Mon Sep 17 00:00:00 2001 +From: Stefano Babic +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 + +Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/bdaa73a5b3923257add182b4ab8058dbfa33421b] + +Signed-off-by: Andrey Zhizhikin +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch deleted file mode 100755 index f96de538..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx/0001-tools-allow-to-override-python.patch +++ /dev/null @@ -1,46 +0,0 @@ -From b48bfc74ee410b1e6681c620633ffef32aafaba0 Mon Sep 17 00:00:00 2001 -From: Stefano Babic -Date: Wed, 5 Apr 2017 17:46:41 +0200 -Subject: [PATCH] tools: allow to override python - -Not force to use python from PATH. Issue was noted when building with -Yocto, because python from the distro is always taken instead of -python-native built during Yocto process. - -Signed-off-by: Stefano Babic -CC: Simon Glass -Reviewed-by: Simon Glass ---- - Makefile | 2 +- - tools/Makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 09b597d450..8d4e6050b3 100644 ---- a/Makefile -+++ b/Makefile -@@ -348,7 +348,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy - OBJDUMP = $(CROSS_COMPILE)objdump - AWK = awk - PERL = perl --PYTHON = python -+PYTHON ?= python - DTC = dtc - CHECK = sparse - -diff --git a/tools/Makefile b/tools/Makefile -index fa1b85bdae..2fc4a583d4 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS) - libfdt: - - tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c -- LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \ -+ LDFLAGS="$(HOSTLDFLAGS)" ${PYTHON} $(srctree)/lib/libfdt/setup.py \ - "$(_hostc_flags)" $^ - mv _libfdt.so $@ - --- -2.17.1 - diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb deleted file mode 100644 index f85ed994..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. - -DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." -require recipes-bsp/u-boot/u-boot.inc - -PROVIDES += "u-boot" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRCBRANCH = "imx_v2017.03_4.9.123_imx8mm_ga" -SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-tools-allow-to-override-python.patch \ - " -SRCREV = "8be98e9322040c655b9e5c9fb2c494e002e3fad9" - -S = "${WORKDIR}/git" - -inherit dtc-145 fsl-u-boot-localversion - -LOCALVERSION ?= "-${SRCBRANCH}" - -BOOT_TOOLS = "imx-boot-tools" - -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}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot - install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin - fi - done - unset j - done - unset i - fi -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2019.04.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2019.04.bb new file mode 100644 index 00000000..d37ede83 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-imx_2019.04.bb @@ -0,0 +1,35 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Copyright 2017-2019 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() { + # 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}/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 + unset j + done + unset i + fi +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.03.inc b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.03.inc deleted file mode 100644 index 5be64e49..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.03.inc +++ /dev/null @@ -1,19 +0,0 @@ - -inherit fsl-u-boot-localversion - -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1 \ -" -SRCREV = "1e96fd8f464dfe23eb692a11018c20d70546783b" - -S = "${WORKDIR}/git" -PV_append = "+fslgit" -LOCALVERSION = "+fsl" \ No newline at end of file diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.09.inc b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.09.inc deleted file mode 100644 index a3a554cc..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-common_2018.09.inc +++ /dev/null @@ -1,19 +0,0 @@ - -inherit fsl-u-boot-localversion - -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1 \ -" -SRCREV= "c08de7c3c92d45a824500ad936f4d72465c181ec" - -S = "${WORKDIR}/git" -PV_append = "+fslgit" -LOCALVERSION = "+fsl" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-fw-utils_2018.03.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-fw-utils_2018.03.bb deleted file mode 100644 index ae47cb0d..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq-fw-utils_2018.03.bb +++ /dev/null @@ -1,45 +0,0 @@ -require u-boot-qoriq-common_${PV}.inc - -SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" -DEPENDS = "mtd-utils" - -INSANE_SKIP_${PN} = "already-stripped" -EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' -EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' - -inherit uboot-config - -do_compile () { - oe_runmake ${UBOOT_MACHINE} - oe_runmake envtools -} - -do_install () { - install -d ${D}${base_sbindir} - install -d ${D}${sysconfdir} - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv - - if [ -e ${WORKDIR}/fw_env.config ]; then - install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config - else - install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config - fi -} - -do_install_class-cross () { - install -d ${D}${bindir_cross} - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv - install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv -} - -SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross" -uboot_fw_utils_cross() { - sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross} -} - -PROVIDES += "u-boot-fw-utils" -RPROVIDES_${PN} += "u-boot-fw-utils" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -BBCLASSEXTEND = "cross" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch new file mode 100644 index 00000000..2609760c --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-Remove-redundant-YYLOC-global-declaration.patch @@ -0,0 +1,29 @@ +From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch new file mode 100644 index 00000000..e530b7ca --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-binman-Convert-a-few-tests-to-Python-3.patch @@ -0,0 +1,79 @@ +From b6ee0cf89f9405094cbb6047076a13e14ebc030b Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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(' +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch new file mode 100644 index 00000000..5d7ec42f --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-buildman-Convert-to-Python-3.patch @@ -0,0 +1,928 @@ +From c05aa0364280803d8274e260a739553d588ea052 Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch new file mode 100644 index 00000000..4c4f7acb --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Adjust-command-to-return-strings-instead-of-b.patch @@ -0,0 +1,228 @@ +From 3b3e3c0f6c261a8c9f989d437dc261ba84467d4f Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch new file mode 100644 index 00000000..cee88472 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Drop-binary-parameter.patch @@ -0,0 +1,105 @@ +From 3b1c0b09c99bfd30355a6ba87a15e9d408a51109 Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch new file mode 100644 index 00000000..bd23c458 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-patman-Update-command.Run-to-handle-failure-better.patch @@ -0,0 +1,42 @@ +From 6eace398072a62e74f10f412ffadfe51b7402395 Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch new file mode 100644 index 00000000..e74609de --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq/0001-pylibfdt-Convert-to-Python-3.patch @@ -0,0 +1,117 @@ +From b4cf5f1df741e8781bed6149291823cd1a4b8baa Mon Sep 17 00:00:00 2001 +From: Simon Glass +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 +--- + 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/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2018.09.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2018.09.bb deleted file mode 100644 index 8438134d..00000000 --- a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2018.09.bb +++ /dev/null @@ -1,79 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc -require u-boot-qoriq-common_${PV}.inc - -DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards" -PROVIDES += "u-boot" - -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc bison-native bc-native swig-native python-native" -DEPENDS_append_qoriq-arm64 = " change-file-endianess-native dtc-native tcl-native" -DEPENDS_append_qoriq-arm = " change-file-endianess-native dtc-native tcl-native" -DEPENDS_append_qoriq-ppc = " boot-format-native" - -python () { - if d.getVar("TCMODE", True) == "external-fsl": - return - - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - - if "e5500-64b:" in arch or "e6500-64b:" in arch: - if not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") - sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux' - sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') - workdir = d.getVar('WORKDIR') - d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc') - d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib) - d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot') - d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-') - elif "fsl-lsch2-32b:" in arch: - if not "lib64" in ml: - raise bb.parse.SkipRecipe("Building the u-boot for this arch requires multilib to be enabled") - sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux' - sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') - workdir = d.getVar('WORKDIR') - d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc') - d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib) - d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot') - d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-') -} - -LE_UBOOT_FOR_ARMBE_TARGET ?= "0" -ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}" -ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}" - -WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" -EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1' -EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' - -do_compile_append_qoriq() { - unset i j k - for config in ${UBOOT_MACHINE}; do - i=`expr $i + 1`; - for type in ${UBOOT_CONFIG}; do - j=`expr $j + 1`; - for binary in ${UBOOT_BINARIES}; do - k=`expr $k + 1` - if [ $j -eq $i ] && [ $k -eq $i ]; then - if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then - # regenerate spi binary if BOOTFORMAT_CONFIG is set - boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin - cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} - elif [ "qspi" = "${type}" ];then - cp ${config}/${binary} ${config}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - fi - fi - done - unset k - done - unset j - done - unset i -} - - -PACKAGES += "${PN}-images" -FILES_${PN}-images += "/boot" -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb new file mode 100644 index 00000000..571fadb7 --- /dev/null +++ b/bsp/meta-freescale/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb @@ -0,0 +1,107 @@ +require recipes-bsp/u-boot/u-boot.inc + +DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards" +PROVIDES += "u-boot" + +inherit fsl-u-boot-localversion + +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + 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" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" +PV_append = "+fslgit" +LOCALVERSION = "+fsl" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc bison-native bc-native swig-native python3-native" +DEPENDS_append_qoriq-arm64 = " dtc-native" +DEPENDS_append_qoriq-arm = " dtc-native" +DEPENDS_append_qoriq-ppc = " boot-format-native" + +python () { + if d.getVar("TCMODE") == "external-fsl": + return + + ml = d.getVar("MULTILIB_VARIANTS") + arch = d.getVar("OVERRIDES") + + if "e5500-64b:" in arch or "e6500-64b:" in arch: + if not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux' + sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') + workdir = d.getVar('WORKDIR') + d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc') + d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib) + d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot') + d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-') + elif "fsl-lsch2-32b:" in arch: + if not "lib64" in ml: + raise bb.parse.SkipRecipe("Building the u-boot for this arch requires multilib to be enabled") + sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux' + sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') + workdir = d.getVar('WORKDIR') + d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc') + d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib) + d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot') + d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-') +} + +LE_UBOOT_FOR_ARMBE_TARGET ?= "0" +ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}" +ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}" + +WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1' +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' +EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' + +do_compile_append_qoriq() { + unset i j k + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + for binary in ${UBOOT_BINARIES}; do + k=`expr $k + 1` + if [ $j -eq $i ] && [ $k -eq $i ]; then + if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then + # regenerate spi binary if BOOTFORMAT_CONFIG is set + boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin + cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} + elif [ "qspi" = "${type}" ];then + cp ${config}/${binary} ${config}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + fi + fi + done + unset k + done + unset j + done + unset i +} + + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-bsp/uefi/uefi_git.bb b/bsp/meta-freescale/recipes-bsp/uefi/uefi_git.bb index 8b63f501..f94a67e2 100644 --- a/bsp/meta-freescale/recipes-bsp/uefi/uefi_git.bb +++ b/bsp/meta-freescale/recipes-bsp/uefi/uefi_git.bb @@ -3,10 +3,10 @@ SECTION = "bootloaders" LICENSE = "NXP-Binary-EULA" LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=343ec8f06efc37467a6de53686fa6315" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;fsl-eula=true;nobranch=1" -SRCREV= "5b259f75decbc478bcab0612d79a58562bef1838" +SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1" +SRCREV= "e95ed52322f15437f98dee2b27de45a7495d648c" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Remove-test-that-requires-running-as-non-root.patch b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Remove-test-that-requires-running-as-non-root.patch deleted file mode 100644 index 736bb39a..00000000 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Remove-test-that-requires-running-as-non-root.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3fdb1e2a16ea405c6731447a8994f222808ef7e6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 7 Apr 2017 18:01:52 +0300 -Subject: [PATCH] Remove test that requires running as non-root - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - test/recipes/40-test_rehash.t | 17 +---------------- - 1 file changed, 1 insertion(+), 16 deletions(-) - -diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t -index f902c23..c7567c1 100644 ---- a/test/recipes/40-test_rehash.t -+++ b/test/recipes/40-test_rehash.t -@@ -23,7 +23,7 @@ setup("test_rehash"); - plan skip_all => "test_rehash is not available on this platform" - unless run(app(["openssl", "rehash", "-help"])); - --plan tests => 5; -+plan tests => 3; - - indir "rehash.$$" => sub { - prepare(); -@@ -42,21 +42,6 @@ indir "rehash.$$" => sub { - 'Testing rehash operations on empty directory'); - }, create => 1, cleanup => 1; - --indir "rehash.$$" => sub { -- prepare(); -- chmod 0500, curdir(); -- SKIP: { -- if (!ok(!open(FOO, ">unwritable.txt"), -- "Testing that we aren't running as a privileged user, such as root")) { -- close FOO; -- skip "It's pointless to run the next test as root", 1; -- } -- isnt(run(app(["openssl", "rehash", curdir()])), 1, -- 'Testing rehash operations on readonly directory'); -- } -- chmod 0700, curdir(); # make it writable again, so cleanup works --}, create => 1, cleanup => 1; -- - sub prepare { - my @pemsourcefiles = sort glob(srctop_file('test', "*.pem")); - my @destfiles = (); --- -2.11.0 - diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Take-linking-flags-from-LDFLAGS-env-var.patch b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Take-linking-flags-from-LDFLAGS-env-var.patch deleted file mode 100644 index 6ce4e47d..00000000 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-Take-linking-flags-from-LDFLAGS-env-var.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 08face4353d80111973aba9c1304c92158cfad0e Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 28 Mar 2017 16:40:12 +0300 -Subject: [PATCH] Take linking flags from LDFLAGS env var - -This fixes "No GNU_HASH in the elf binary" issues. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - Configurations/unix-Makefile.tmpl | 2 +- - Configure | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl -index c029817..43b769b 100644 ---- a/Configurations/unix-Makefile.tmpl -+++ b/Configurations/unix-Makefile.tmpl -@@ -173,7 +173,7 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -} - CC= $(CROSS_COMPILE){- $target{cc} -} - CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$target{defines}}, @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $target{cflags} -} {- $config{cflags} -} - CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -} --LDFLAGS= {- $target{lflags} -} -+LDFLAGS= {- $target{lflags}." ".$ENV{'LDFLAGS'} -} - PLIB_LDFLAGS= {- $target{plib_lflags} -} - EX_LIBS= {- $target{ex_libs} -} {- $config{ex_libs} -} - LIB_CFLAGS={- $target{shared_cflag} || "" -} -diff --git a/Configure b/Configure -index aee7cc3..274d236 100755 ---- a/Configure -+++ b/Configure -@@ -979,7 +979,7 @@ $config{build_file} = $target{build_file}; - $config{defines} = []; - $config{cflags} = ""; - $config{ex_libs} = ""; --$config{shared_ldflag} = ""; -+$config{shared_ldflag} = $ENV{'LDFLAGS'}; - - # Make sure build_scheme is consistent. - $target{build_scheme} = [ $target{build_scheme} ] --- -2.11.0 - diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch deleted file mode 100644 index bb0a1689..00000000 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch +++ /dev/null @@ -1,88 +0,0 @@ -From bcc096a50811bf0f0c4fd34b2993fed7a7015972 Mon Sep 17 00:00:00 2001 -From: Andy Polyakov -Date: Fri, 3 Nov 2017 23:30:01 +0100 -Subject: [PATCH] aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with - binutils-2.29. - -It's not clear if it's a feature or bug, but binutils-2.29[.1] -interprets 'adr' instruction with Thumb2 code reference differently, -in a way that affects calculation of addresses of constants' tables. - -Upstream-Status: Backport - -Reviewed-by: Tim Hudson -Reviewed-by: Bernd Edlinger -Signed-off-by: Stefan Agner -(Merged from https://github.com/openssl/openssl/pull/4669) - -(cherry picked from commit b82acc3c1a7f304c9df31841753a0fa76b5b3cda) ---- - crypto/aes/asm/aes-armv4.pl | 6 +++--- - crypto/aes/asm/bsaes-armv7.pl | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl -index 16d79aae53..c6474b8aad 100644 ---- a/crypto/aes/asm/aes-armv4.pl -+++ b/crypto/aes/asm/aes-armv4.pl -@@ -200,7 +200,7 @@ AES_encrypt: - #ifndef __thumb2__ - sub r3,pc,#8 @ AES_encrypt - #else -- adr r3,AES_encrypt -+ adr r3,. - #endif - stmdb sp!,{r1,r4-r12,lr} - #ifdef __APPLE__ -@@ -450,7 +450,7 @@ _armv4_AES_set_encrypt_key: - #ifndef __thumb2__ - sub r3,pc,#8 @ AES_set_encrypt_key - #else -- adr r3,AES_set_encrypt_key -+ adr r3,. - #endif - teq r0,#0 - #ifdef __thumb2__ -@@ -976,7 +976,7 @@ AES_decrypt: - #ifndef __thumb2__ - sub r3,pc,#8 @ AES_decrypt - #else -- adr r3,AES_decrypt -+ adr r3,. - #endif - stmdb sp!,{r1,r4-r12,lr} - #ifdef __APPLE__ -diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl -index 9f288660ef..a27bb4a179 100644 ---- a/crypto/aes/asm/bsaes-armv7.pl -+++ b/crypto/aes/asm/bsaes-armv7.pl -@@ -744,7 +744,7 @@ $code.=<<___; - .type _bsaes_decrypt8,%function - .align 4 - _bsaes_decrypt8: -- adr $const,_bsaes_decrypt8 -+ adr $const,. - vldmia $key!, {@XMM[9]} @ round 0 key - #ifdef __APPLE__ - adr $const,.LM0ISR -@@ -843,7 +843,7 @@ _bsaes_const: - .type _bsaes_encrypt8,%function - .align 4 - _bsaes_encrypt8: -- adr $const,_bsaes_encrypt8 -+ adr $const,. - vldmia $key!, {@XMM[9]} @ round 0 key - #ifdef __APPLE__ - adr $const,.LM0SR -@@ -951,7 +951,7 @@ $code.=<<___; - .type _bsaes_key_convert,%function - .align 4 - _bsaes_key_convert: -- adr $const,_bsaes_key_convert -+ adr $const,. - vld1.8 {@XMM[7]}, [$inp]! @ load round 0 key - #ifdef __APPLE__ - adr $const,.LM0 --- -2.15.0 - diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-eng_devcrypto-add-support-for-TLS-algorithms-offload.patch b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-eng_devcrypto-add-support-for-TLS-algorithms-offload.patch new file mode 100644 index 00000000..499df59b --- /dev/null +++ b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0001-eng_devcrypto-add-support-for-TLS-algorithms-offload.patch @@ -0,0 +1,389 @@ +From 501988587567b996c9c4a14239f575e77ed27791 Mon Sep 17 00:00:00 2001 +From: Pankaj Gupta +Date: Fri, 20 Sep 2019 12:18:16 +0530 +Subject: [PATCH 1/2] eng_devcrypto: add support for TLS algorithms offload + + - aes-128-cbc-hmac-sha1 + - aes-256-cbc-hmac-sha1 + +Requires TLS patches on cryptodev and TLS algorithm support in Linux +kernel driver. + +Signed-off-by: Pankaj Gupta +--- + crypto/engine/eng_devcrypto.c | 265 +++++++++++++++++++++++++++++----- + 1 file changed, 231 insertions(+), 34 deletions(-) + +diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c +index 49e9ce1af3..727a660e75 100644 +--- a/crypto/engine/eng_devcrypto.c ++++ b/crypto/engine/eng_devcrypto.c +@@ -60,6 +60,9 @@ struct cipher_ctx { + struct session_op sess; + int op; /* COP_ENCRYPT or COP_DECRYPT */ + unsigned long mode; /* EVP_CIPH_*_MODE */ ++ unsigned char *aad; ++ unsigned int aad_len; ++ unsigned int len; + + /* to handle ctr mode being a stream cipher */ + unsigned char partial[EVP_MAX_BLOCK_LENGTH]; +@@ -73,49 +76,62 @@ static const struct cipher_data_st { + int ivlen; + int flags; + int devcryptoid; ++ int mackeylen; + } cipher_data[] = { + #ifndef OPENSSL_NO_DES +- { NID_des_cbc, 8, 8, 8, EVP_CIPH_CBC_MODE, CRYPTO_DES_CBC }, +- { NID_des_ede3_cbc, 8, 24, 8, EVP_CIPH_CBC_MODE, CRYPTO_3DES_CBC }, ++ { NID_des_cbc, 8, 8, 8, EVP_CIPH_CBC_MODE, CRYPTO_DES_CBC, 0 }, ++ { NID_des_ede3_cbc, 8, 24, 8, EVP_CIPH_CBC_MODE, CRYPTO_3DES_CBC, 0 }, + #endif + #ifndef OPENSSL_NO_BF +- { NID_bf_cbc, 8, 16, 8, EVP_CIPH_CBC_MODE, CRYPTO_BLF_CBC }, ++ { NID_bf_cbc, 8, 16, 8, EVP_CIPH_CBC_MODE, CRYPTO_BLF_CBC, 0 }, + #endif + #ifndef OPENSSL_NO_CAST +- { NID_cast5_cbc, 8, 16, 8, EVP_CIPH_CBC_MODE, CRYPTO_CAST_CBC }, ++ { NID_cast5_cbc, 8, 16, 8, EVP_CIPH_CBC_MODE, CRYPTO_CAST_CBC, 0 }, + #endif +- { NID_aes_128_cbc, 16, 128 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC }, +- { NID_aes_192_cbc, 16, 192 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC }, +- { NID_aes_256_cbc, 16, 256 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC }, ++ { NID_aes_128_cbc, 16, 128 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC, 0 }, ++ { NID_aes_192_cbc, 16, 192 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC, 0 }, ++ { NID_aes_256_cbc, 16, 256 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC, 0 }, ++ { NID_aes_128_cbc_hmac_sha1, 16, 16, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS10_AES_CBC_HMAC_SHA1, 20 }, ++ { NID_aes_256_cbc_hmac_sha1, 16, 32, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS10_AES_CBC_HMAC_SHA1, 20 }, + #ifndef OPENSSL_NO_RC4 +- { NID_rc4, 1, 16, 0, EVP_CIPH_STREAM_CIPHER, CRYPTO_ARC4 }, ++ { NID_rc4, 1, 16, 0, EVP_CIPH_STREAM_CIPHER, CRYPTO_ARC4, 0 }, + #endif + #if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_AES_CTR) +- { NID_aes_128_ctr, 16, 128 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR }, +- { NID_aes_192_ctr, 16, 192 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR }, +- { NID_aes_256_ctr, 16, 256 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR }, ++ { NID_aes_128_ctr, 16, 128 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR, 0 }, ++ { NID_aes_192_ctr, 16, 192 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR, 0 }, ++ { NID_aes_256_ctr, 16, 256 / 8, 16, EVP_CIPH_CTR_MODE, CRYPTO_AES_CTR, 0 }, + #endif + #if 0 /* Not yet supported */ +- { NID_aes_128_xts, 16, 128 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS }, +- { NID_aes_256_xts, 16, 256 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS }, ++ { NID_aes_128_xts, 16, 128 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS, ++ 0 }, ++ { NID_aes_256_xts, 16, 256 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS, ++ 0 }, + #endif + #if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_AES_ECB) +- { NID_aes_128_ecb, 16, 128 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB }, +- { NID_aes_192_ecb, 16, 192 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB }, +- { NID_aes_256_ecb, 16, 256 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB }, ++ { NID_aes_128_ecb, 16, 128 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB, 0 }, ++ { NID_aes_192_ecb, 16, 192 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB, 0 }, ++ { NID_aes_256_ecb, 16, 256 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB, 0 }, + #endif + #if 0 /* Not yet supported */ +- { NID_aes_128_gcm, 16, 128 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM }, +- { NID_aes_192_gcm, 16, 192 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM }, +- { NID_aes_256_gcm, 16, 256 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM }, ++ { NID_aes_128_gcm, 16, 128 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM, 0 }, ++ { NID_aes_192_gcm, 16, 192 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM, 0 }, ++ { NID_aes_256_gcm, 16, 256 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM, 0 }, ++#endif ++#ifdef OPENSSL_NXP_CAAM ++ { NID_aes_128_gcm, 16, 128 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM, 0 }, ++ { NID_aes_192_gcm, 16, 192 / 8, 16, EVP_CIPH_GCM_MODE, CRYPTO_AES_GCM, 0 }, + #endif + #ifndef OPENSSL_NO_CAMELLIA + { NID_camellia_128_cbc, 16, 128 / 8, 16, EVP_CIPH_CBC_MODE, +- CRYPTO_CAMELLIA_CBC }, ++ CRYPTO_CAMELLIA_CBC, 0 }, + { NID_camellia_192_cbc, 16, 192 / 8, 16, EVP_CIPH_CBC_MODE, +- CRYPTO_CAMELLIA_CBC }, ++ CRYPTO_CAMELLIA_CBC, 0 }, + { NID_camellia_256_cbc, 16, 256 / 8, 16, EVP_CIPH_CBC_MODE, +- CRYPTO_CAMELLIA_CBC }, ++ CRYPTO_CAMELLIA_CBC, 0 }, + #endif + }; + +@@ -141,6 +157,158 @@ static const struct cipher_data_st *get_cipher_data(int nid) + return &cipher_data[get_cipher_data_index(nid)]; + } + ++/* ++ * Save the encryption key provided by upper layers. This function is called ++ * by EVP_CipherInit_ex to initialize the algorithm's extra data. We can't do ++ * much here because the mac key is not available. The next call should/will ++ * be to cryptodev_cbc_hmac_sha1_ctrl with parameter ++ * EVP_CTRL_AEAD_SET_MAC_KEY, to set the hmac key. There we call CIOCGSESSION ++ * with both the crypto and hmac keys. ++ */ ++static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, ++ const unsigned char *key, const unsigned char *iv, int enc) ++{ ++ struct cipher_ctx *state = EVP_CIPHER_CTX_get_cipher_data(ctx); ++ struct session_op *sess = &state->sess; ++ int cipher = -1, i; ++ ++ for (i = 0; cipher_data[i].devcryptoid; i++) { ++ if (EVP_CIPHER_CTX_nid(ctx) == cipher_data[i].nid && ++ EVP_CIPHER_CTX_iv_length(ctx) <= cipher_data[i].ivlen && ++ EVP_CIPHER_CTX_key_length(ctx) == cipher_data[i].keylen) { ++ cipher = cipher_data[i].devcryptoid; ++ break; ++ } ++ } ++ ++ if (!cipher_data[i].devcryptoid) ++ return (0); ++ ++ memset(sess, 0, sizeof(*sess)); ++ ++ sess->key = (void *) key; ++ sess->keylen = EVP_CIPHER_CTX_key_length(ctx); ++ sess->cipher = cipher; ++ ++ /* for whatever reason, (1) means success */ ++ return 1; ++} ++ ++static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t len) ++{ ++ struct crypt_auth_op cryp; ++ struct cipher_ctx *state = EVP_CIPHER_CTX_get_cipher_data(ctx); ++ struct session_op *sess = &state->sess; ++ const void *iiv; ++ unsigned char save_iv[EVP_MAX_IV_LENGTH]; ++ ++ if (cfd < 0) ++ return (0); ++ if (!len) ++ return (1); ++ if ((len % EVP_CIPHER_CTX_block_size(ctx)) != 0) ++ return (0); ++ ++ memset(&cryp, 0, sizeof(cryp)); ++ ++ /* TODO: make a seamless integration with cryptodev flags */ ++ switch (EVP_CIPHER_CTX_nid(ctx)) { ++ case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: ++ cryp.flags = COP_FLAG_AEAD_TLS_TYPE; ++ } ++ cryp.ses = sess->ses; ++ cryp.len = state->len; ++ cryp.src = (void *) in; ++ cryp.dst = (void *) out; ++ cryp.auth_src = state->aad; ++ cryp.auth_len = state->aad_len; ++ ++ cryp.op = EVP_CIPHER_CTX_encrypting(ctx) ? COP_ENCRYPT : COP_DECRYPT; ++ ++ if (EVP_CIPHER_CTX_iv_length(ctx) > 0) { ++ cryp.iv = (void *) EVP_CIPHER_CTX_iv(ctx); ++ if (!EVP_CIPHER_CTX_encrypting(ctx)) { ++ iiv = in + len - EVP_CIPHER_CTX_iv_length(ctx); ++ memcpy(save_iv, iiv, EVP_CIPHER_CTX_iv_length(ctx)); ++ } ++ } else ++ cryp.iv = NULL; ++ ++ if (ioctl(cfd, CIOCAUTHCRYPT, &cryp) == -1) { ++ /* ++ * XXX need better errror handling this can fail for a number of ++ * different reasons. ++ */ ++ return 0; ++ } ++ ++ if (EVP_CIPHER_CTX_iv_length(ctx) > 0) { ++ if (EVP_CIPHER_CTX_encrypting(ctx)) ++ iiv = out + len - EVP_CIPHER_CTX_iv_length(ctx); ++ else ++ iiv = save_iv; ++ ++ memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), iiv, ++ EVP_CIPHER_CTX_iv_length(ctx)); ++ } ++ return 1; ++} ++ ++static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, ++ int arg, void *ptr) ++{ ++ switch (type) { ++ case EVP_CTRL_AEAD_SET_MAC_KEY: ++ { ++ /* TODO: what happens with hmac keys larger than 64 bytes? */ ++ struct cipher_ctx *state = ++ EVP_CIPHER_CTX_get_cipher_data(ctx); ++ struct session_op *sess = &state->sess; ++ ++ /* the rest should have been set in cryptodev_init_aead_key */ ++ sess->mackey = ptr; ++ sess->mackeylen = arg; ++ if (ioctl(cfd, CIOCGSESSION, sess) == -1) ++ return 0; ++ ++ return 1; ++ } ++ case EVP_CTRL_AEAD_TLS1_AAD: ++ { ++ /* ptr points to the associated data buffer of 13 bytes */ ++ struct cipher_ctx *state = ++ EVP_CIPHER_CTX_get_cipher_data(ctx); ++ unsigned char *p = ptr; ++ unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; ++ unsigned int maclen, padlen; ++ unsigned int bs = EVP_CIPHER_CTX_block_size(ctx); ++ ++ state->aad = ptr; ++ state->aad_len = arg; ++ state->len = cryptlen; ++ ++ /* TODO: this should be an extension of EVP_CIPHER struct */ ++ switch (EVP_CIPHER_CTX_nid(ctx)) { ++ case NID_aes_128_cbc_hmac_sha1: ++ case NID_aes_256_cbc_hmac_sha1: ++ maclen = SHA_DIGEST_LENGTH; ++ } ++ ++ /* space required for encryption (not only TLS padding) */ ++ padlen = maclen; ++ if (EVP_CIPHER_CTX_encrypting(ctx)) { ++ cryptlen += maclen; ++ padlen += bs - (cryptlen % bs); ++ } ++ return padlen; ++ } ++ default: ++ return -1; ++ } ++} ++ + /* + * Following are the three necessary functions to map OpenSSL functionality + * with cryptodev. +@@ -165,6 +333,7 @@ static int cipher_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, + cipher_ctx->op = enc ? COP_ENCRYPT : COP_DECRYPT; + cipher_ctx->mode = cipher_d->flags & EVP_CIPH_MODE; + cipher_ctx->blocksize = cipher_d->blocksize; ++ + if (ioctl(cfd, CIOCGSESSION, &cipher_ctx->sess) < 0) { + SYSerr(SYS_F_IOCTL, errno); + return 0; +@@ -180,6 +349,7 @@ static int cipher_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + (struct cipher_ctx *)EVP_CIPHER_CTX_get_cipher_data(ctx); + struct crypt_op cryp; + unsigned char *iv = EVP_CIPHER_CTX_iv_noconst(ctx); ++ + #if !defined(COP_FLAG_WRITE_IV) + unsigned char saved_iv[EVP_MAX_IV_LENGTH]; + const unsigned char *ivptr; +@@ -340,32 +510,59 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx) + static int known_cipher_nids[OSSL_NELEM(cipher_data)]; + static int known_cipher_nids_amount = -1; /* -1 indicates not yet initialised */ + static EVP_CIPHER *known_cipher_methods[OSSL_NELEM(cipher_data)] = { NULL, }; ++int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, ++ const unsigned char *iv, int enc); ++int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t inl); ++int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); + + static void prepare_cipher_methods(void) + { + size_t i; + struct session_op sess; + unsigned long cipher_mode; ++ unsigned long flags; + + memset(&sess, 0, sizeof(sess)); + sess.key = (void *)"01234567890123456789012345678901234567890123456789"; ++ sess.mackey = (void *)"123456789ABCDEFGHIJKLMNO"; + + for (i = 0, known_cipher_nids_amount = 0; + i < OSSL_NELEM(cipher_data); i++) { + ++ init = cipher_init; ++ ctrl = cipher_ctrl; ++ flags = cipher_data[i].flags ++ | EVP_CIPH_CUSTOM_COPY ++ | EVP_CIPH_CTRL_INIT ++ | EVP_CIPH_FLAG_DEFAULT_ASN1; ++ + /* + * Check that the algo is really availably by trying to open and close + * a session. + */ + sess.cipher = cipher_data[i].devcryptoid; + sess.keylen = cipher_data[i].keylen; ++ sess.mackeylen = cipher_data[i].mackeylen; ++ ++ cipher_mode = cipher_data[i].flags & EVP_CIPH_MODE; ++ ++ do_cipher = (cipher_mode == EVP_CIPH_CTR_MODE ? ++ ctr_do_cipher : ++ cipher_do_cipher); ++ if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1) { ++ init = cryptodev_init_aead_key; ++ do_cipher = cryptodev_aead_cipher; ++ ctrl = cryptodev_cbc_hmac_sha1_ctrl; ++ flags = cipher_data[i].flags; ++ } ++ + if (ioctl(cfd, CIOCGSESSION, &sess) < 0 + || ioctl(cfd, CIOCFSESSION, &sess.ses) < 0) + continue; + +- cipher_mode = cipher_data[i].flags & EVP_CIPH_MODE; +- +- if ((known_cipher_methods[i] = ++ if ((known_cipher_methods[i] = + EVP_CIPHER_meth_new(cipher_data[i].nid, + cipher_mode == EVP_CIPH_CTR_MODE ? 1 : + cipher_data[i].blocksize, +@@ -373,16 +570,12 @@ static void prepare_cipher_methods(void) + || !EVP_CIPHER_meth_set_iv_length(known_cipher_methods[i], + cipher_data[i].ivlen) + || !EVP_CIPHER_meth_set_flags(known_cipher_methods[i], +- cipher_data[i].flags +- | EVP_CIPH_CUSTOM_COPY +- | EVP_CIPH_CTRL_INIT +- | EVP_CIPH_FLAG_DEFAULT_ASN1) +- || !EVP_CIPHER_meth_set_init(known_cipher_methods[i], cipher_init) ++ flags) ++ || !EVP_CIPHER_meth_set_init(known_cipher_methods[i], init) + || !EVP_CIPHER_meth_set_do_cipher(known_cipher_methods[i], +- cipher_mode == EVP_CIPH_CTR_MODE ? +- ctr_do_cipher : +- cipher_do_cipher) +- || !EVP_CIPHER_meth_set_ctrl(known_cipher_methods[i], cipher_ctrl) ++ do_cipher) ++ /* AEAD Support to be added. */ ++ || !EVP_CIPHER_meth_set_ctrl(known_cipher_methods[i], ctrl) + || !EVP_CIPHER_meth_set_cleanup(known_cipher_methods[i], + cipher_cleanup) + || !EVP_CIPHER_meth_set_impl_ctx_size(known_cipher_methods[i], +@@ -393,6 +586,10 @@ static void prepare_cipher_methods(void) + known_cipher_nids[known_cipher_nids_amount++] = + cipher_data[i].nid; + } ++ ++ if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1) ++ EVP_add_cipher(known_cipher_methods[i]); + } + } + +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0002-eng_devcrypto-add-support-for-TLS1.2-algorithms-offl.patch b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0002-eng_devcrypto-add-support-for-TLS1.2-algorithms-offl.patch new file mode 100644 index 00000000..b12af56e --- /dev/null +++ b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/0002-eng_devcrypto-add-support-for-TLS1.2-algorithms-offl.patch @@ -0,0 +1,285 @@ +From db9d8be9d0d81bdb2ddb78f8616243593a3d24c5 Mon Sep 17 00:00:00 2001 +From: Pankaj Gupta +Date: Fri, 10 Jan 2020 15:38:38 +0530 +Subject: [PATCH 2/2] eng_devcrypto: add support for TLS1.2 algorithms offload + + - aes-128-cbc-hmac-sha256 + - aes-256-cbc-hmac-sha256 + +Enabled the support of TLS1.1 algorithms offload + + - aes-128-cbc-hmac-sha1 + - aes-256-cbc-hmac-sha1 + +Requires TLS patches on cryptodev and TLS algorithm support in Linux +kernel driver. + +Fix: Remove the support for TLS1.0. + +Signed-off-by: Pankaj Gupta +Signed-off-by: Arun Pathak +--- + crypto/engine/eng_devcrypto.c | 133 +++++++++++++++++++++++----------- + 1 file changed, 90 insertions(+), 43 deletions(-) + +diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c +index 727a660e75..be63f65e04 100644 +--- a/crypto/engine/eng_devcrypto.c ++++ b/crypto/engine/eng_devcrypto.c +@@ -25,6 +25,7 @@ + #include "crypto/engine.h" + + /* #define ENGINE_DEVCRYPTO_DEBUG */ ++#define TLS1_1_VERSION 0x0302 + + #if CRYPTO_ALGORITHM_MIN < CRYPTO_ALGORITHM_MAX + # define CHECK_BSD_STYLE_MACROS +@@ -67,6 +68,7 @@ struct cipher_ctx { + /* to handle ctr mode being a stream cipher */ + unsigned char partial[EVP_MAX_BLOCK_LENGTH]; + unsigned int blocksize, num; ++ unsigned int tls_ver; + }; + + static const struct cipher_data_st { +@@ -92,11 +94,17 @@ static const struct cipher_data_st { + { NID_aes_192_cbc, 16, 192 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC, 0 }, + { NID_aes_256_cbc, 16, 256 / 8, 16, EVP_CIPH_CBC_MODE, CRYPTO_AES_CBC, 0 }, + { NID_aes_128_cbc_hmac_sha1, 16, 16, 16, +- EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, +- CRYPTO_TLS10_AES_CBC_HMAC_SHA1, 20 }, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS11_AES_CBC_HMAC_SHA1, 20 }, + { NID_aes_256_cbc_hmac_sha1, 16, 32, 16, +- EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, +- CRYPTO_TLS10_AES_CBC_HMAC_SHA1, 20 }, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS11_AES_CBC_HMAC_SHA1, 20 }, ++ { NID_aes_128_cbc_hmac_sha256, 16, 16, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS12_AES_CBC_HMAC_SHA256, 32 }, ++ { NID_aes_256_cbc_hmac_sha256, 16, 32, 16, ++ EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_AEAD_CIPHER, ++ CRYPTO_TLS12_AES_CBC_HMAC_SHA256, 32 }, + #ifndef OPENSSL_NO_RC4 + { NID_rc4, 1, 16, 0, EVP_CIPH_STREAM_CIPHER, CRYPTO_ARC4, 0 }, + #endif +@@ -107,9 +115,9 @@ static const struct cipher_data_st { + #endif + #if 0 /* Not yet supported */ + { NID_aes_128_xts, 16, 128 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS, +- 0 }, ++ 0 }, + { NID_aes_256_xts, 16, 256 / 8 * 2, 16, EVP_CIPH_XTS_MODE, CRYPTO_AES_XTS, +- 0 }, ++ 0 }, + #endif + #if !defined(CHECK_BSD_STYLE_MACROS) || defined(CRYPTO_AES_ECB) + { NID_aes_128_ecb, 16, 128 / 8, 0, EVP_CIPH_ECB_MODE, CRYPTO_AES_ECB, 0 }, +@@ -166,7 +174,7 @@ static const struct cipher_data_st *get_cipher_data(int nid) + * with both the crypto and hmac keys. + */ + static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx, +- const unsigned char *key, const unsigned char *iv, int enc) ++ const unsigned char *key, const unsigned char *iv, int enc) + { + struct cipher_ctx *state = EVP_CIPHER_CTX_get_cipher_data(ctx); + struct session_op *sess = &state->sess; +@@ -212,10 +220,29 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + + memset(&cryp, 0, sizeof(cryp)); + ++ if (EVP_CIPHER_CTX_iv_length(ctx) > 0) { ++ if (!EVP_CIPHER_CTX_encrypting(ctx)) { ++ iiv = in + len - EVP_CIPHER_CTX_iv_length(ctx); ++ memcpy(save_iv, iiv, EVP_CIPHER_CTX_iv_length(ctx)); ++ ++ if (state->tls_ver >= TLS1_1_VERSION) { ++ memcpy(EVP_CIPHER_CTX_iv_noconst(ctx), in, ++ EVP_CIPHER_CTX_iv_length(ctx)); ++ in += EVP_CIPHER_CTX_iv_length(ctx); ++ out += EVP_CIPHER_CTX_iv_length(ctx); ++ len -= EVP_CIPHER_CTX_iv_length(ctx); ++ } ++ } ++ cryp.iv = (void *) EVP_CIPHER_CTX_iv(ctx); ++ } else ++ cryp.iv = NULL; ++ + /* TODO: make a seamless integration with cryptodev flags */ + switch (EVP_CIPHER_CTX_nid(ctx)) { + case NID_aes_128_cbc_hmac_sha1: + case NID_aes_256_cbc_hmac_sha1: ++ case NID_aes_128_cbc_hmac_sha256: ++ case NID_aes_256_cbc_hmac_sha256: + cryp.flags = COP_FLAG_AEAD_TLS_TYPE; + } + cryp.ses = sess->ses; +@@ -227,15 +254,6 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + + cryp.op = EVP_CIPHER_CTX_encrypting(ctx) ? COP_ENCRYPT : COP_DECRYPT; + +- if (EVP_CIPHER_CTX_iv_length(ctx) > 0) { +- cryp.iv = (void *) EVP_CIPHER_CTX_iv(ctx); +- if (!EVP_CIPHER_CTX_encrypting(ctx)) { +- iiv = in + len - EVP_CIPHER_CTX_iv_length(ctx); +- memcpy(save_iv, iiv, EVP_CIPHER_CTX_iv_length(ctx)); +- } +- } else +- cryp.iv = NULL; +- + if (ioctl(cfd, CIOCAUTHCRYPT, &cryp) == -1) { + /* + * XXX need better errror handling this can fail for a number of +@@ -262,7 +280,7 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, + switch (type) { + case EVP_CTRL_AEAD_SET_MAC_KEY: + { +- /* TODO: what happens with hmac keys larger than 64 bytes? */ ++ /* TODO: what happens with hmac keys larger than 64 bytes? */ + struct cipher_ctx *state = + EVP_CIPHER_CTX_get_cipher_data(ctx); + struct session_op *sess = &state->sess; +@@ -282,27 +300,52 @@ static int cryptodev_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, + EVP_CIPHER_CTX_get_cipher_data(ctx); + unsigned char *p = ptr; + unsigned int cryptlen = p[arg - 2] << 8 | p[arg - 1]; +- unsigned int maclen, padlen; +- unsigned int bs = EVP_CIPHER_CTX_block_size(ctx); ++ unsigned int maclen; ++ unsigned int blocksize = EVP_CIPHER_CTX_block_size(ctx); ++ int ret; + ++ state->tls_ver = p[arg - 4] << 8 | p[arg - 3]; + state->aad = ptr; + state->aad_len = arg; +- state->len = cryptlen; + + /* TODO: this should be an extension of EVP_CIPHER struct */ + switch (EVP_CIPHER_CTX_nid(ctx)) { + case NID_aes_128_cbc_hmac_sha1: + case NID_aes_256_cbc_hmac_sha1: + maclen = SHA_DIGEST_LENGTH; ++ break; ++ case NID_aes_128_cbc_hmac_sha256: ++ case NID_aes_256_cbc_hmac_sha256: ++ maclen = SHA256_DIGEST_LENGTH; ++ break; ++ default: ++ /* ++ * Only above 4 supported NIDs are used to enter to this ++ * function. If any other NID reaches this function, ++ * there's a grave coding error further down. ++ */ ++ assert("Code that never should be reached" == NULL); ++ return -1; + } + + /* space required for encryption (not only TLS padding) */ +- padlen = maclen; + if (EVP_CIPHER_CTX_encrypting(ctx)) { +- cryptlen += maclen; +- padlen += bs - (cryptlen % bs); ++ if (state->tls_ver >= TLS1_1_VERSION) { ++ p[arg - 2] = (cryptlen - blocksize) >> 8; ++ p[arg - 1] = (cryptlen - blocksize); ++ } ++ ret = (int)(((cryptlen + maclen + ++ blocksize) & -blocksize) - cryptlen); ++ } else { ++ if (state->tls_ver >= TLS1_1_VERSION) { ++ cryptlen -= blocksize; ++ p[arg - 2] = cryptlen >> 8; ++ p[arg - 1] = cryptlen; ++ } ++ ret = maclen; + } +- return padlen; ++ state->len = cryptlen; ++ return ret; + } + default: + return -1; +@@ -510,11 +553,11 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx) + static int known_cipher_nids[OSSL_NELEM(cipher_data)]; + static int known_cipher_nids_amount = -1; /* -1 indicates not yet initialised */ + static EVP_CIPHER *known_cipher_methods[OSSL_NELEM(cipher_data)] = { NULL, }; +-int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, +- const unsigned char *iv, int enc); +-int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, +- const unsigned char *in, size_t inl); +-int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); ++int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key, ++ const unsigned char *iv, int enc); ++int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out, ++ const unsigned char *in, size_t inl); ++int (*ctrl)(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); + + static void prepare_cipher_methods(void) + { +@@ -543,26 +586,28 @@ static void prepare_cipher_methods(void) + */ + sess.cipher = cipher_data[i].devcryptoid; + sess.keylen = cipher_data[i].keylen; +- sess.mackeylen = cipher_data[i].mackeylen; ++ sess.mackeylen = cipher_data[i].mackeylen; + + cipher_mode = cipher_data[i].flags & EVP_CIPH_MODE; + +- do_cipher = (cipher_mode == EVP_CIPH_CTR_MODE ? ++ do_cipher = (cipher_mode == EVP_CIPH_CTR_MODE ? + ctr_do_cipher : + cipher_do_cipher); +- if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 +- || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1) { +- init = cryptodev_init_aead_key; +- do_cipher = cryptodev_aead_cipher; +- ctrl = cryptodev_cbc_hmac_sha1_ctrl; +- flags = cipher_data[i].flags; +- } ++ if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_128_cbc_hmac_sha256 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha256) { ++ init = cryptodev_init_aead_key; ++ do_cipher = cryptodev_aead_cipher; ++ ctrl = cryptodev_cbc_hmac_sha1_ctrl; ++ flags = cipher_data[i].flags; ++ } + + if (ioctl(cfd, CIOCGSESSION, &sess) < 0 + || ioctl(cfd, CIOCFSESSION, &sess.ses) < 0) + continue; + +- if ((known_cipher_methods[i] = ++ if ((known_cipher_methods[i] = + EVP_CIPHER_meth_new(cipher_data[i].nid, + cipher_mode == EVP_CIPH_CTR_MODE ? 1 : + cipher_data[i].blocksize, +@@ -574,7 +619,7 @@ static void prepare_cipher_methods(void) + || !EVP_CIPHER_meth_set_init(known_cipher_methods[i], init) + || !EVP_CIPHER_meth_set_do_cipher(known_cipher_methods[i], + do_cipher) +- /* AEAD Support to be added. */ ++ /* AEAD Support to be added. */ + || !EVP_CIPHER_meth_set_ctrl(known_cipher_methods[i], ctrl) + || !EVP_CIPHER_meth_set_cleanup(known_cipher_methods[i], + cipher_cleanup) +@@ -587,9 +632,11 @@ static void prepare_cipher_methods(void) + cipher_data[i].nid; + } + +- if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 +- || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1) +- EVP_add_cipher(known_cipher_methods[i]); ++ if (cipher_data[i].nid == NID_aes_128_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha1 ++ || cipher_data[i].nid == NID_aes_128_cbc_hmac_sha256 ++ || cipher_data[i].nid == NID_aes_256_cbc_hmac_sha256) ++ EVP_add_cipher(known_cipher_methods[i]); + } + } + +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh deleted file mode 100644 index 6620fdcb..00000000 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/openssl-c_rehash.sh +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/sh -# -# Ben Secrest -# -# sh c_rehash script, scan all files in a directory -# and add symbolic links to their hash values. -# -# based on the c_rehash perl script distributed with openssl -# -# LICENSE: See OpenSSL license -# ^^acceptable?^^ -# - -# default certificate location -DIR=/etc/openssl - -# for filetype bitfield -IS_CERT=$(( 1 << 0 )) -IS_CRL=$(( 1 << 1 )) - - -# check to see if a file is a certificate file or a CRL file -# arguments: -# 1. the filename to be scanned -# returns: -# bitfield of file type; uses ${IS_CERT} and ${IS_CRL} -# -check_file() -{ - local IS_TYPE=0 - - # make IFS a newline so we can process grep output line by line - local OLDIFS=${IFS} - IFS=$( printf "\n" ) - - # XXX: could be more efficient to have two 'grep -m' but is -m portable? - for LINE in $( grep '^-----BEGIN .*-----' ${1} ) - do - if echo ${LINE} \ - | grep -q -E '^-----BEGIN (X509 |TRUSTED )?CERTIFICATE-----' - then - IS_TYPE=$(( ${IS_TYPE} | ${IS_CERT} )) - - if [ $(( ${IS_TYPE} & ${IS_CRL} )) -ne 0 ] - then - break - fi - elif echo ${LINE} | grep -q '^-----BEGIN X509 CRL-----' - then - IS_TYPE=$(( ${IS_TYPE} | ${IS_CRL} )) - - if [ $(( ${IS_TYPE} & ${IS_CERT} )) -ne 0 ] - then - break - fi - fi - done - - # restore IFS - IFS=${OLDIFS} - - return ${IS_TYPE} -} - - -# -# use openssl to fingerprint a file -# arguments: -# 1. the filename to fingerprint -# 2. the method to use (x509, crl) -# returns: -# none -# assumptions: -# user will capture output from last stage of pipeline -# -fingerprint() -{ - ${SSL_CMD} ${2} -fingerprint -noout -in ${1} | sed 's/^.*=//' | tr -d ':' -} - - -# -# link_hash - create links to certificate files -# arguments: -# 1. the filename to create a link for -# 2. the type of certificate being linked (x509, crl) -# returns: -# 0 on success, 1 otherwise -# -link_hash() -{ - local FINGERPRINT=$( fingerprint ${1} ${2} ) - local HASH=$( ${SSL_CMD} ${2} -hash -noout -in ${1} ) - local SUFFIX=0 - local LINKFILE='' - local TAG='' - - if [ ${2} = "crl" ] - then - TAG='r' - fi - - LINKFILE=${HASH}.${TAG}${SUFFIX} - - while [ -f ${LINKFILE} ] - do - if [ ${FINGERPRINT} = $( fingerprint ${LINKFILE} ${2} ) ] - then - echo "NOTE: Skipping duplicate file ${1}" >&2 - return 1 - fi - - SUFFIX=$(( ${SUFFIX} + 1 )) - LINKFILE=${HASH}.${TAG}${SUFFIX} - done - - echo "${3} => ${LINKFILE}" - - # assume any system with a POSIX shell will either support symlinks or - # do something to handle this gracefully - ln -s ${3} ${LINKFILE} - - return 0 -} - - -# hash_dir create hash links in a given directory -hash_dir() -{ - echo "Doing ${1}" - - cd ${1} - - ls -1 * 2>/dev/null | while read FILE - do - if echo ${FILE} | grep -q -E '^[[:xdigit:]]{8}\.r?[[:digit:]]+$' \ - && [ -h "${FILE}" ] - then - rm ${FILE} - fi - done - - ls -1 *.pem *.cer *.crt *.crl 2>/dev/null | while read FILE - do - REAL_FILE=${FILE} - # if we run on build host then get to the real files in rootfs - if [ -n "${SYSROOT}" -a -h ${FILE} ] - then - FILE=$( readlink ${FILE} ) - # check the symlink is absolute (or dangling in other word) - if [ "x/" = "x$( echo ${FILE} | cut -c1 -)" ] - then - REAL_FILE=${SYSROOT}/${FILE} - fi - fi - - check_file ${REAL_FILE} - local FILE_TYPE=${?} - local TYPE_STR='' - - if [ $(( ${FILE_TYPE} & ${IS_CERT} )) -ne 0 ] - then - TYPE_STR='x509' - elif [ $(( ${FILE_TYPE} & ${IS_CRL} )) -ne 0 ] - then - TYPE_STR='crl' - else - echo "NOTE: ${FILE} does not contain a certificate or CRL: skipping" >&2 - continue - fi - - link_hash ${REAL_FILE} ${TYPE_STR} ${FILE} - done -} - - -# choose the name of an ssl application -if [ -n "${OPENSSL}" ] -then - SSL_CMD=$(which ${OPENSSL} 2>/dev/null) -else - SSL_CMD=/usr/bin/openssl - OPENSSL=${SSL_CMD} - export OPENSSL -fi - -# fix paths -PATH=${PATH}:${DIR}/bin -export PATH - -# confirm existance/executability of ssl command -if ! [ -x ${SSL_CMD} ] -then - echo "${0}: rehashing skipped ('openssl' program not available)" >&2 - exit 0 -fi - -# determine which directories to process -old_IFS=$IFS -if [ ${#} -gt 0 ] -then - IFS=':' - DIRLIST=${*} -elif [ -n "${SSL_CERT_DIR}" ] -then - DIRLIST=$SSL_CERT_DIR -else - DIRLIST=${DIR}/certs -fi - -IFS=':' - -# process directories -for CERT_DIR in ${DIRLIST} -do - if [ -d ${CERT_DIR} -a -w ${CERT_DIR} ] - then - IFS=$old_IFS - hash_dir ${CERT_DIR} - IFS=':' - fi -done diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/run-ptest b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/run-ptest index 65c6cc7b..3fb22471 100644 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/run-ptest +++ b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq/run-ptest @@ -1,4 +1,12 @@ #!/bin/sh -cd test -OPENSSL_ENGINES=../engines BLDTOP=.. SRCTOP=.. perl run_tests.pl -cd .. + +set -e + +# Optional arguments are 'list' to lists all tests, or the test name (base name +# ie test_evp, not 03_test_evp.t). + +export TOP=. +# OPENSSL_ENGINES is relative from the test binaries +export OPENSSL_ENGINES=../engines + +perl ./test/run_tests.pl $* | perl -0pe 's#(.*) \.*.ok#PASS: \1#g; s#(.*) \.*.skipped: (.*)#SKIP: \1 (\2)#g; s#(.*) \.*.\nDubious#FAIL: \1#;' diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb b/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb deleted file mode 100644 index 7a4897fd..00000000 --- a/bsp/meta-freescale/recipes-connectivity/openssl/openssl-qoriq_1.1.0g.bb +++ /dev/null @@ -1,186 +0,0 @@ -SUMMARY = "Secure Socket Layer" -DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." -HOMEPAGE = "http://www.openssl.org/" -BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html" -SECTION = "libs/network" - -DISABLE_STATIC = "" - -# "openssl | SSLeay" dual license -LICENSE = "openssl" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cae6da10f4ffd9703214776d2aabce32" - -DEPENDS += "cryptodev-linux" -DEPENDS_append_class-target = " openssl-native" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/openssl;nobranch=1 \ - file://run-ptest \ - file://openssl-c_rehash.sh \ - file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \ - file://0001-Remove-test-that-requires-running-as-non-root.patch \ - file://0001-aes-asm-aes-armv4-bsaes-armv7-.pl-make-it-work-with-.patch \ - " - -SRCREV = "c2300d1fdb30a439f555b07f228d3bce498238d5" - -PROVIDES = "openssl" - -python() { - pkgs = d.getVar('PACKAGES', True).split() - for p in pkgs: - if 'openssl-qoriq' in p: - d.appendVar("RPROVIDES_%s" % p, p.replace('openssl-qoriq', 'openssl')) - d.appendVar("RCONFLICTS_%s" % p, p.replace('openssl-qoriq', 'openssl')) - d.appendVar("RREPLACES_%s" % p, p.replace('openssl-qoriq', 'openssl')) -} - -S = "${WORKDIR}/git" - -inherit lib_package multilib_header ptest - -do_configure () { - os=${HOST_OS} - case $os in - linux-uclibc |\ - linux-uclibceabi |\ - linux-gnueabi |\ - linux-uclibcspe |\ - linux-gnuspe |\ - linux-musl*) - os=linux - ;; - *) - ;; - esac - target="$os-${HOST_ARCH}" - case $target in - linux-arm) - target=linux-armv4 - ;; - linux-armeb) - target=linux-armv4 - ;; - linux-aarch64*) - target=linux-aarch64 - ;; - linux-sh3) - target=linux-generic32 - ;; - linux-sh4) - target=linux-generic32 - ;; - linux-i486) - target=linux-elf - ;; - linux-i586 | linux-viac3) - target=linux-elf - ;; - linux-i686) - target=linux-elf - ;; - linux-gnux32-x86_64) - target=linux-x32 - ;; - linux-gnu64-x86_64) - target=linux-x86_64 - ;; - linux-mips) - # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-mipsel) - target="linux-mips32 ${TARGET_CC_ARCH}" - ;; - linux-gnun32-mips*) - target=linux-mips64 - ;; - linux-*-mips64 | linux-mips64) - target=linux64-mips64 - ;; - linux-*-mips64el | linux-mips64el) - target=linux64-mips64 - ;; - linux-microblaze*|linux-nios2*) - target=linux-generic32 - ;; - linux-powerpc) - target=linux-ppc - ;; - linux-powerpc64) - target=linux-ppc64 - ;; - linux-riscv64) - target=linux-generic64 - ;; - linux-riscv32) - target=linux-generic32 - ;; - linux-supersparc) - target=linux-sparcv9 - ;; - linux-sparc) - target=linux-sparcv9 - ;; - darwin-i386) - target=darwin-i386-cc - ;; - esac - useprefix=${prefix} - if [ "x$useprefix" = "x" ]; then - useprefix=/ - fi - libdirleaf="$(echo ${libdir} | sed s:$useprefix::)" - perl ./Configure -DHAVE_CRYPTODEV ${EXTRA_OECONF} --prefix=$useprefix --openssldir=${libdir}/ssl-1.1 --libdir=${libdirleaf} $target -} - -#| engines/afalg/e_afalg.c: In function 'eventfd': -#| engines/afalg/e_afalg.c:110:20: error: '__NR_eventfd' undeclared (first use in this function) -#| return syscall(__NR_eventfd, n); -#| ^~~~~~~~~~~~ -EXTRA_OECONF_aarch64 += "no-afalgeng" - -#| ./libcrypto.so: undefined reference to `getcontext' -#| ./libcrypto.so: undefined reference to `setcontext' -#| ./libcrypto.so: undefined reference to `makecontext' -EXTRA_OECONF_libc-musl += "-DOPENSSL_NO_ASYNC" - -do_install () { - oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install - oe_multilib_header openssl/opensslconf.h -} - -do_install_append_class-native () { - # Install a custom version of c_rehash that can handle sysroots properly. - # This version is used for example when installing ca-certificates during - # image creation. - install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash - sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash -} - -do_install_ptest() { - cp -r * ${D}${PTEST_PATH} - - # Putting .so files in ptest package will mess up the dependencies of the main openssl package - # so we rename them to .so.ptest and patch the test accordingly - mv ${D}${PTEST_PATH}/libcrypto.so ${D}${PTEST_PATH}/libcrypto.so.ptest - mv ${D}${PTEST_PATH}/libssl.so ${D}${PTEST_PATH}/libssl.so.ptest - sed -i 's/$target{shared_extension_simple}/".so.ptest"/' ${D}${PTEST_PATH}/test/recipes/90-test_shlibload.t -} - -RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" -RRECOMMENDS_libcrypto += "openssl-conf" -RDEPENDS_${PN}-bin = "perl" -RDEPENDS_${PN}-misc = "perl" - -FILES_${PN} =+ " ${libdir}/ssl-1.1/*" - -PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" -FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}" -FILES_libssl = "${libdir}/libssl${SOLIBS}" -FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" -FILES_${PN}-engines = "${libdir}/engines-1.1" -FILES_${PN}-misc = "${libdir}/ssl-1.1/misc" - -RPROVIDES_openssl-conf = "openssl10-conf" -RREPLACES_openssl-conf = "openssl10-conf" -RCONFLICTS_openssl-conf = "openssl10-conf" diff --git a/bsp/meta-freescale/recipes-connectivity/openssl/openssl_%.bbappend b/bsp/meta-freescale/recipes-connectivity/openssl/openssl_%.bbappend new file mode 100644 index 00000000..182925e0 --- /dev/null +++ b/bsp/meta-freescale/recipes-connectivity/openssl/openssl_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_append := "${THISDIR}/${PN}-qoriq:" + +SRC_URI_append_qoriq = " \ + file://0001-eng_devcrypto-add-support-for-TLS-algorithms-offload.patch \ + file://0002-eng_devcrypto-add-support-for-TLS1.2-algorithms-offl.patch \ +" diff --git a/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq.bb b/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq.bb index deeedab8..c328f4cc 100644 --- a/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq.bb +++ b/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq.bb @@ -7,6 +7,7 @@ SRC_URI = "\ file://72-fsl-dpaa-persistent-networking.rules \ file://73-fsl-dpaa-persistent-networking.rules \ file://74-ls1046a-xfi2-networking.rules \ + file://73-fsl-enetc-networking.rules \ " S = "${WORKDIR}" @@ -14,7 +15,9 @@ RULE = "71-fsl-dpaa-persistent-networking.rules" RULE_e6500 = "72-fsl-dpaa-persistent-networking.rules" RULE_e6500-64b = "72-fsl-dpaa-persistent-networking.rules" RULE_t1024 = "72-fsl-dpaa-persistent-networking.rules" -RULE_ls1043a = "73-fsl-dpaa-persistent-networking.rules" +RULE_qoriq-arm64 = "73-fsl-dpaa-persistent-networking.rules \ + 73-fsl-enetc-networking.rules \ +" RULE_ls1046a = "73-fsl-dpaa-persistent-networking.rules \ 74-ls1046a-xfi2-networking.rules \ " diff --git a/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq/73-fsl-enetc-networking.rules b/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq/73-fsl-enetc-networking.rules new file mode 100644 index 00000000..19f41634 --- /dev/null +++ b/bsp/meta-freescale/recipes-core/udev/udev-rules-qoriq/73-fsl-enetc-networking.rules @@ -0,0 +1,16 @@ +# ENETC rules +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.0", DRIVERS=="fsl_enetc", NAME:="eno0" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.1", DRIVERS=="fsl_enetc", NAME:="eno1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.2", DRIVERS=="fsl_enetc", NAME:="eno2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.6", DRIVERS=="fsl_enetc", NAME:="eno3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.0", DRIVERS=="fsl_enetc_vf", NAME:="eno0vf0" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.1", DRIVERS=="fsl_enetc_vf", NAME:="eno0vf1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.2", DRIVERS=="fsl_enetc_vf", NAME:="eno1vf0" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.3", DRIVERS=="fsl_enetc_vf", NAME:="eno1vf1" +# LS1028 switch rules +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p0", NAME="swp0" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p1", NAME="swp1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p2", NAME="swp2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p3", NAME="swp3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p4", NAME="swp4" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p5", NAME="swp5" diff --git a/bsp/meta-freescale/recipes-daemons/ptpd/ptpd-qoriq.bb b/bsp/meta-freescale/recipes-daemons/ptpd/ptpd-qoriq.bb index cb047fd2..569deed5 100644 --- a/bsp/meta-freescale/recipes-daemons/ptpd/ptpd-qoriq.bb +++ b/bsp/meta-freescale/recipes-daemons/ptpd/ptpd-qoriq.bb @@ -17,7 +17,7 @@ PROVIDES = "ptpd" inherit autotools pkgconfig systemd python() { - pkgs = d.getVar('PACKAGES', True).split() + pkgs = d.getVar('PACKAGES').split() for p in pkgs: if 'ptpd-qoriq' in p: d.appendVar("RPROVIDES_%s" % p, p.replace('ptpd-qoriq', 'ptpd')) diff --git a/bsp/meta-freescale/recipes-devtools/cst/cst/0001-tools-Mark-struct-input_field-file_field-extern.patch b/bsp/meta-freescale/recipes-devtools/cst/cst/0001-tools-Mark-struct-input_field-file_field-extern.patch new file mode 100644 index 00000000..d25675aa --- /dev/null +++ b/bsp/meta-freescale/recipes-devtools/cst/cst/0001-tools-Mark-struct-input_field-file_field-extern.patch @@ -0,0 +1,43 @@ +From 81ec65e72f357fb2c395e40c5195434bbaddf7f7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 16 May 2020 08:21:52 -0700 +Subject: [PATCH] tools: Mark struct input_field file_field extern + +This struct is already defined in common/parse_utils.c + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + tools/header_generation/create_hdr_common.c | 2 +- + tools/pbi_creation/create_pbi_common.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/header_generation/create_hdr_common.c b/tools/header_generation/create_hdr_common.c +index bfa90a3..edf632c 100644 +--- a/tools/header_generation/create_hdr_common.c ++++ b/tools/header_generation/create_hdr_common.c +@@ -39,7 +39,7 @@ + #include + + extern struct g_data_t gd; +-struct input_field file_field; ++extern struct input_field file_field; + + extern char line_data[]; + static struct option long_options[] = { +diff --git a/tools/pbi_creation/create_pbi_common.c b/tools/pbi_creation/create_pbi_common.c +index ff2ed84..bd976da 100644 +--- a/tools/pbi_creation/create_pbi_common.c ++++ b/tools/pbi_creation/create_pbi_common.c +@@ -57,7 +57,7 @@ static char *parse_list[] = { + + extern struct g_data_t gd; + extern char line_data[]; +-struct input_field file_field; ++extern struct input_field file_field; + + #define NUM_PARSE_LIST (sizeof(parse_list) / sizeof(char *)) + +-- +2.26.2 + diff --git a/bsp/meta-freescale/recipes-devtools/cst/cst_git.bb b/bsp/meta-freescale/recipes-devtools/cst/cst_git.bb index 05d2d4c7..fef0fbcf 100644 --- a/bsp/meta-freescale/recipes-devtools/cst/cst_git.bb +++ b/bsp/meta-freescale/recipes-devtools/cst/cst_git.bb @@ -4,14 +4,22 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=e959d5d617e33779d0e90ce1d9043eff" -DEPENDS += "openssl" +DEPENDS += "openssl cst-native" RDEPENDS_${PN} = "bash" +GENKEYS ?= "${STAGING_BINDIR_NATIVE}/cst/gen_keys" +GENKEYS_class-native = "./gen_keys" + inherit kernel-arch +# specify the non default keys pair for secure boot if needed +#SECURE_PRI_KEY = "/path/srk.pri" +#SECURE_PUB_KEY = "/path/srk.pub" + SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cst;nobranch=1 \ + file://0001-tools-Mark-struct-input_field-file_field-extern.patch \ " -SRCREV = "f599f6126ae1a382a581dcd75e9ad2e34c79a183" +SRCREV = "9aafbdf2441858ceca2779279b6876c6bdc2d3ed" S = "${WORKDIR}/git" @@ -21,6 +29,13 @@ PARALLEL_MAKE = "" do_install () { oe_runmake install DESTDIR=${D} BIN_DEST_DIR=${bindir} + + if [ -n "${SECURE_PRI_KEY}" ]; then + cp -f ${SECURE_PRI_KEY} ${D}/${bindir}/cst/srk.pri + cp -f ${SECURE_PUB_KEY} ${D}/${bindir}/cst/srk.pub + elif [ ! -f ${D}/${bindir}/cst/srk.pri -o ! ${D}/${bindir}/cst/srk.pub ]; then + cd ${D}/${bindir}/cst && ${GENKEYS} 1024 + fi } FILES_${PN}-dbg += "${bindir}/cst/.debug" diff --git a/bsp/meta-freescale/recipes-devtools/devregs/devregs_git.bb b/bsp/meta-freescale/recipes-devtools/devregs/devregs_git.bb index 3bac55a4..7f158fd8 100644 --- a/bsp/meta-freescale/recipes-devtools/devregs/devregs_git.bb +++ b/bsp/meta-freescale/recipes-devtools/devregs/devregs_git.bb @@ -3,7 +3,7 @@ SECTION = "devel" LICENSE = "GPL-1" LIC_FILES_CHKSUM = "file://COPYING;md5=5003fa041d799dd5dd5f646b74e36924" -SRCREV = "34ed402b92920864b89e0fd1e76bae3aa340baaa" +SRCREV = "d5f6223027f4d6ae71bd5d432f5611486e0e6074" SRC_URI = "git://github.com/boundarydevices/devregs.git;protocol=http" PV = "1.0+${SRCPV}" diff --git a/bsp/meta-freescale/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb b/bsp/meta-freescale/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb index a1f9c4d8..c5f51983 100644 --- a/bsp/meta-freescale/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb +++ b/bsp/meta-freescale/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS = "libusb1" -SRCREV = "e5394615dd413c3823d5bd1de340933e16a8c07c" +SRCREV = "f009770d841468204ab104bf7d3b0c5bc8425dbb" SRC_URI = "git://github.com/boundarydevices/imx_usb_loader.git;protocol=http" PV = "1.0+${SRCPV}" diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch new file mode 100644 index 00000000..2d3bd7e0 --- /dev/null +++ b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch @@ -0,0 +1,67 @@ +From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001 +From: Laurent Vivier +Date: Tue, 12 Nov 2019 15:25:56 +0100 +Subject: [PATCH] linux-user: remove host stime() syscall + +stime() has been withdrawn from glibc +(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.") + +Implement the target stime() syscall using host +clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc. + +Tested qemu-ppc/x86_64 with: + + #include + #include + + int main(void) + { + time_t t; + int ret; + + /* date -u -d"2019-11-12T15:11:00" "+%s" */ + t = 1573571460; + ret = stime(&t); + printf("ret %d\n", ret); + return 0; + } + + # date; ./stime; date + Tue Nov 12 14:18:32 UTC 2019 + ret 0 + Tue Nov 12 15:11:00 UTC 2019 + +Upstream-Status: Backport + +Buglink: https://bugs.launchpad.net/qemu/+bug/1852115 +Reported-by: Cole Robinson +Signed-off-by: Laurent Vivier +Reviewed-by: Peter Maydell +Message-Id: <20191112142556.6335-1-laurent@vivier.eu> +--- + linux-user/syscall.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 4e97bcf1e5..ce399a55f0 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -7764,10 +7764,12 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, + #ifdef TARGET_NR_stime /* not on alpha */ + case TARGET_NR_stime: + { +- time_t host_time; +- if (get_user_sal(host_time, arg1)) ++ struct timespec ts; ++ ts.tv_nsec = 0; ++ if (get_user_sal(ts.tv_sec, arg1)) { + return -TARGET_EFAULT; +- return get_errno(stime(&host_time)); ++ } ++ return get_errno(clock_settime(CLOCK_REALTIME, &ts)); + } + #endif + #ifdef TARGET_NR_alarm /* not on alpha */ +-- +2.24.0 + diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch new file mode 100644 index 00000000..7f7da510 --- /dev/null +++ b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch @@ -0,0 +1,33 @@ +From 8ee6281516bd9210e75e91d705da8916bab3bf51 Mon Sep 17 00:00:00 2001 +From: Juro Bystricky +Date: Thu, 31 Aug 2017 11:06:56 -0700 +Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for + qemu. + +Upstream-Status: Pending + +Signed-off-by: Kai Kang + +Signed-off-by: Juro Bystricky + +--- + tests/Makefile.include | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tests/Makefile.include b/tests/Makefile.include +index 8566f5f1..52d0320b 100644 +--- a/tests/Makefile.include ++++ b/tests/Makefile.include +@@ -1210,4 +1210,12 @@ all: $(QEMU_IOTESTS_HELPERS-y) + -include $(wildcard tests/*.d) + -include $(wildcard tests/libqos/*.d) + ++buildtest-TESTS: $(check-unit-y) ++ ++runtest-TESTS: ++ for f in $(check-unit-y); do \ ++ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \ ++ $$nf; \ ++ done ++ + endif diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/memfd.patch b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/memfd.patch deleted file mode 100644 index d9e7a455..00000000 --- a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/memfd.patch +++ /dev/null @@ -1,41 +0,0 @@ -From d60ecdd94f4054aa0ec615824d5efdb4cebc7db9 Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Thu, 19 Apr 2018 11:47:16 +0800 -Subject: [PATCH] memfd - ---- - configure | 2 +- - util/memfd.c | 4 +--- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/configure b/configure -index be4d326..cb5197c 100755 ---- a/configure -+++ b/configure -@@ -3735,7 +3735,7 @@ fi - # check if memfd is supported - memfd=no - cat > $TMPC << EOF --#include -+#include - - int main(void) - { -diff --git a/util/memfd.c b/util/memfd.c -index 4571d1a..412e94a 100644 ---- a/util/memfd.c -+++ b/util/memfd.c -@@ -31,9 +31,7 @@ - - #include "qemu/memfd.h" - --#ifdef CONFIG_MEMFD --#include --#elif defined CONFIG_LINUX -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD - #include - #include - --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/run-ptest b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/run-ptest index 2206b319..b25a792d 100644 --- a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/run-ptest +++ b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq/run-ptest @@ -7,4 +7,4 @@ ptestdir=$(dirname "$(readlink -f "$0")") export SRC_PATH=$ptestdir cd $ptestdir/tests -make -f Makefile.include -k runtest-TESTS | sed '/: OK/ s/^/PASS: /g' +make -f Makefile.include -k runtest-TESTS | sed '/^ok /s/ok /PASS: /g' diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb new file mode 100644 index 00000000..a281170c --- /dev/null +++ b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb @@ -0,0 +1,53 @@ +BBCLASSEXTEND = "" + +require recipes-devtools/qemu/qemu.inc + +COMPATIBLE_MACHINE = "(qoriq)" + +DEPENDS = "glib-2.0 zlib pixman bison-native" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" + +SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;nobranch=1 \ + file://powerpc_rom.bin \ + file://run-ptest \ + file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ + file://0001-linux-user-remove-host-stime-syscall.patch \ + " + +SRCREV = "521a0dcf59f1ca11e7d9e2f4e1ef3d2dfaebc0e4" + +S = "${WORKDIR}/git" + +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', '')) +} + +RDEPENDS_${PN}_class-target += "bash" + +EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" +EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" + +do_install_append_class-nativesdk() { + ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} +} + +PACKAGECONFIG ??= " \ + fdt sdl kvm aio libusb \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ +" +PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm" + +PACKAGECONFIG[xkbcommon] = ",," +PACKAGECONFIG[libudev] = ",," + +DISABLE_STATIC = "" + diff --git a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_git.bb b/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_git.bb deleted file mode 100644 index 7423b542..00000000 --- a/bsp/meta-freescale/recipes-devtools/qemu/qemu-qoriq_git.bb +++ /dev/null @@ -1,72 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -require recipes-devtools/qemu/qemu.inc - -inherit ptest - -RDEPENDS_${PN}-ptest = "bash make" - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/qemu;nobranch=1 \ - file://powerpc_rom.bin \ - file://run-ptest \ - file://memfd.patch \ - " - -SRCREV = "6c297a7ddd355d499ddd31353a763d57a092f851" - -S = "${WORKDIR}/git" - -COMPATIBLE_HOST_mipsarchn32 = "null" -COMPATIBLE_HOST_mipsarchn64 = "null" - -PROVIDES = "qemu" - -python() { - pkgs = d.getVar('PACKAGES', True).split() - for p in pkgs: - if 'qemu-qoriq' in p: - d.appendVar("RPROVIDES_%s" % p, p.replace('qemu-qoriq', 'qemu')) - d.appendVar("RCONFLICTS_%s" % p, p.replace('qemu-qoriq', 'qemu')) - d.appendVar("RREPLACES_%s" % p, p.replace('qemu-qoriq', 'qemu')) -} - -PPC_OECONF = '--enable-fdt --enable-kvm --with-system-pixman --disable-werror' -EXTRA_OECONF_qoriq-arm64 = "--prefix=${prefix} --target-list=aarch64-softmmu --enable-fdt --enable-kvm --with-system-pixman --disable-werror" -EXTRA_OECONF_qoriq-arm = "--prefix=${prefix} --target-list=arm-softmmu --enable-fdt --enable-kvm --with-system-pixman --disable-werror" -EXTRA_OECONF_e5500-64b = "--prefix=${prefix} --target-list=ppc64-softmmu ${PPC_OECONF}" -EXTRA_OECONF_e6500-64b = "--prefix=${prefix} --target-list=ppc64-softmmu ${PPC_OECONF}" -EXTRA_OECONF_e6500 = "--prefix=${prefix} --target-list=ppc64-softmmu ${PPC_OECONF}" -EXTRA_OECONF_e5500 = "--prefix=${prefix} --target-list=ppc64-softmmu ${PPC_OECONF}" -EXTRA_OECONF_e500v2 = "--prefix=${prefix} --target-list=ppc-softmmu ${PPC_OECONF}" -EXTRA_OECONF_e500mc = "--prefix=${prefix} --target-list=ppc-softmmu ${PPC_OECONF}" - -DISABLE_STATIC = "" - -do_install_append() { - # Prevent QA warnings about installed ${localstatedir}/run - if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi - install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu -} - -do_compile_ptest() { - make buildtest-TESTS -} - -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 -} - -INSANE_SKIP_${PN} += "already-stripped" -FILES_${PN} += "/usr/share/qemu/* /usr/var/*" - -# FIXME: Avoid WARNING due missing patch for native/nativesdk -BBCLASSEXTEND = "" diff --git a/bsp/meta-freescale/recipes-dpaa/eth-config/eth-config_git.bb b/bsp/meta-freescale/recipes-dpaa/eth-config/eth-config_git.bb index 5255bd02..cfeae114 100644 --- a/bsp/meta-freescale/recipes-dpaa/eth-config/eth-config_git.bb +++ b/bsp/meta-freescale/recipes-dpaa/eth-config/eth-config_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=47716bd5b656aa5e298a132a64d2d1e4" PR = "r2" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/eth-config;nobranch=1" -SRCREV = "eefb06353c8c3db34d22c26825b66e921bce617d" +SRCREV = "6164664070e45810c793f112781ebcedc979e132" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/bsp/meta-freescale/recipes-dpaa/fm-ucode/fm-ucode_git.bb index 1db1acd0..39e4f9d0 100644 --- a/bsp/meta-freescale/recipes-dpaa/fm-ucode/fm-ucode_git.bb +++ b/bsp/meta-freescale/recipes-dpaa/fm-ucode/fm-ucode_git.bb @@ -5,9 +5,9 @@ LIC_FILES_CHKSUM = "file://Freescale-Binary-EULA;md5=b784c031868ba1bd5ebc5de372c PR = "r1" -inherit deploy fsl-eula-unpack +inherit deploy -SRC_URI = "git://github.com/NXP/qoriq-fm-ucode.git;fsl-eula=true;nobranch=1" +SRC_URI = "git://github.com/NXP/qoriq-fm-ucode.git;nobranch=1" SRCREV = "c275e91392e2adab1ed22f3867b8269ca3c54014" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-dpaa/fmlib/fmlib_git.bb b/bsp/meta-freescale/recipes-dpaa/fmlib/fmlib_git.bb index 69768130..880d768b 100644 --- a/bsp/meta-freescale/recipes-dpaa/fmlib/fmlib_git.bb +++ b/bsp/meta-freescale/recipes-dpaa/fmlib/fmlib_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9c7bd5e45d066db084bdb3543d55b1ac" PR = "r1" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/fmlib;nobranch=1" -SRCREV = "82d89adae917397324c5d74108305f6c9bae8d00" +SRCREV = "69a70474cd8411d5a099c34f40760b6567d781d6" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-dpaa2/aiopsl/aiopsl_git.bb b/bsp/meta-freescale/recipes-dpaa2/aiopsl/aiopsl_git.bb index 9ba12816..a1b00289 100644 --- a/bsp/meta-freescale/recipes-dpaa2/aiopsl/aiopsl_git.bb +++ b/bsp/meta-freescale/recipes-dpaa2/aiopsl/aiopsl_git.bb @@ -8,7 +8,7 @@ BASEDEPENDS = "" S = "${WORKDIR}/git" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/aiopsl;nobranch=1" -SRCREV = "ec0e50b9bfe794b78bf0d91789f2a77dc4e8ceb4" +SRCREV = "87d83d8e99770325cc7ad9e10965c9959e7cb828" do_configure[noexec] = "1" do_compile[noexec] = "1" @@ -18,11 +18,10 @@ DEMOS_PATH_ls1088a = "LS1088A" do_install () { install -d ${D}/usr/aiop/bin - install -d ${D}/usr/aiop/scripts - install -d ${D}/usr/aiop/traffic_files - install -m 755 ${S}/demos/images/${DEMOS_PATH}/*.elf ${D}/usr/aiop/bin - install -m 755 ${S}/misc/setup/scripts/dynamic_aiop_*.sh ${D}/usr/aiop/scripts - install -m 644 ${S}/misc/setup/traffic_files/classifier.pcap ${D}/usr/aiop/traffic_files + install -d ${D}/usr/aiop/ + cp -rf ${S}/demos/images/* ${D}/usr/aiop/bin + cp -rf ${S}/misc/setup/scripts ${D}/usr/aiop/ + cp -rf ${S}/misc/setup/traffic_files/ ${D}/usr/aiop/ } FILES_${PN} += "/usr/aiop/*" diff --git a/bsp/meta-freescale/recipes-dpaa2/dce/dce_git.bb b/bsp/meta-freescale/recipes-dpaa2/dce/dce_git.bb index 7313ca73..0e31a3c4 100644 --- a/bsp/meta-freescale/recipes-dpaa2/dce/dce_git.bb +++ b/bsp/meta-freescale/recipes-dpaa2/dce/dce_git.bb @@ -1,13 +1,13 @@ DESCRIPTION = "Decompression Compression Engine Userspace Utils" SECTION = "dpaa2" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=338308e2a663929309c9929ab9495bb5" +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 = "49389aa57cc94e0503f53c6b33e4b358ccf42eb5" -SRCREV_qbman = "383ceac0c09b1e38f2a8b1cf42822686b4cf15f3" +SRCREV = "0ec35ad12ad04b5dadfa9f8c8a718c715bde41db" +SRCREV_qbman = "a1af1e1528fe2e1ce0df1e6d9170b6c239c8ab4f" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-dpaa2/dpl-examples/dpl-examples_git.bb b/bsp/meta-freescale/recipes-dpaa2/dpl-examples/dpl-examples_git.bb deleted file mode 100644 index aca35a84..00000000 --- a/bsp/meta-freescale/recipes-dpaa2/dpl-examples/dpl-examples_git.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Datapath layout examples" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987" - -DEPENDS = "dtc-native" - -inherit deploy fsl-eula-unpack - -SRC_URI = "git://github.com/qoriq-open-source/dpl-examples.git;fsl-eula=true;nobranch=1" -SRCREV = "a6c83759c0d9c02822eec89e86357a0998ef51d4" - -S = "${WORKDIR}/git" - -REGLEX_ls2088a = "ls2088a" -REGLEX_ls1088a = "ls1088a" - -do_install () { - install -d ${D}/boot - install -m 644 ${S}/${REGLEX}/RDB/*.dtb ${D}/boot - install -m 644 ${S}/${REGLEX}/RDB/custom/*.dtb ${D}/boot -} - -do_deploy () { - install -d ${DEPLOYDIR}/dpl-examples - install -m 644 ${S}/${REGLEX}/RDB/*.dtb ${DEPLOYDIR}/dpl-examples - install -m 644 ${S}/${REGLEX}/RDB/custom/*.dtb ${DEPLOYDIR}/dpl-examples -} -addtask deploy before do_build after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" - -COMPATIBLE_MACHINE = "(ls2080ardb|ls2088a|ls1088a)" -PACKAGE_ARCH = "${MACHINE_ARCH}" - diff --git a/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.12.0.bb b/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.12.0.bb deleted file mode 100644 index 6b5d0a87..00000000 --- a/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.12.0.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "DPAA2 Management Complex Firmware" -LICENSE = "NXP-Binary-EULA" -LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=afcb1213054384820390d410ab62105f" - -inherit deploy fsl-eula-unpack - -INHIBIT_DEFAULT_DEPS = "1" - -SRC_URI = "git://github.com/nxp/qoriq-mc-binary;fsl-eula=true;nobranch=1" -SRCREV = "cdb5af4b25ec1ee3e9d26ece41efaa1556b28bac" - -S = "${WORKDIR}/git" - -REGLEX_ls2088a = "ls2088a" -REGLEX_ls1088a = "ls1088a" -REGLEX_lx2160a = "lx2160a" - -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 `ls ${DEPLOYDIR}/mc_app |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/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.14.1.bb b/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.14.1.bb new file mode 100644 index 00000000..ddb305c1 --- /dev/null +++ b/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.14.1.bb @@ -0,0 +1,41 @@ +SUMMARY = "DPAA2 Management Complex Firmware" +LICENSE = "NXP-Binary-EULA" +LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=afcb1213054384820390d410ab62105f" + +inherit deploy + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1" +SRCREV = "408110ee632f6291545b0b156cd74e7e3b4612cc" + +S = "${WORKDIR}/git" + +REGLEX_ls2088a = "ls2088a" +REGLEX_ls2080a = "ls2080a" +REGLEX_ls1088a = "ls1088a" +REGLEX_lx2160a = "lx2160a" + +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/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.20.4.bb b/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.20.4.bb new file mode 100644 index 00000000..3e14a26e --- /dev/null +++ b/bsp/meta-freescale/recipes-dpaa2/management-complex/management-complex_10.20.4.bb @@ -0,0 +1,41 @@ +SUMMARY = "DPAA2 Management Complex Firmware" +LICENSE = "NXP-Binary-EULA" +LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=73d4b970c18882e229e4bf1ada5bb8d6" + +inherit deploy + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1" +SRCREV = "f73683596a7b72124d67b62e64f3dc2bb36b9321" + +S = "${WORKDIR}/git" + +REGLEX_ls2088a = "ls2088a" +REGLEX_ls2080a = "ls2080a" +REGLEX_ls1088a = "ls1088a" +REGLEX_lx2160a = "lx2160a" + +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/bsp/meta-freescale/recipes-dpaa2/restool/restool_git.bb b/bsp/meta-freescale/recipes-dpaa2/restool/restool_git.bb index 382e3144..0211c779 100644 --- a/bsp/meta-freescale/recipes-dpaa2/restool/restool_git.bb +++ b/bsp/meta-freescale/recipes-dpaa2/restool/restool_git.bb @@ -7,7 +7,7 @@ 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 = "2b4dd211d5c584d5f81cfa530a3a93854dc1d490" +SRCREV = "f0cec094e4c6d1c975b377203a3bf994ba9325a9" S = "${WORKDIR}/git" @@ -17,6 +17,6 @@ do_install () { oe_runmake install DESTDIR=${D} } -COMPATIBLE_MACHINE = "(ls2080ardb|ls2088ardb|ls1088ardb|ls1043ardb|ls1046ardb)" +COMPATIBLE_MACHINE = "(qoriq-arm64)" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-freescale/recipes-dpaa2/spc/spc_git.bb b/bsp/meta-freescale/recipes-dpaa2/spc/spc_git.bb index eceabf91..e9bf1427 100644 --- a/bsp/meta-freescale/recipes-dpaa2/spc/spc_git.bb +++ b/bsp/meta-freescale/recipes-dpaa2/spc/spc_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=163b09a1c249a6ff2b28da1ceca2e0a8" DEPENDS = "libxml2 fmlib tclap" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1" -SRCREV = "1a414247ad3228bf60bfb53995a28930a8a29acc" +SRCREV = "be7dd8e346a934aae1e4bdd6b579f2aa4bb5cd86" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-extended/crconf/crconf/0001-Modify-the-Makefile-for-cross-compile.patch b/bsp/meta-freescale/recipes-extended/crconf/crconf/0001-Modify-the-Makefile-for-cross-compile.patch new file mode 100644 index 00000000..4459c370 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/crconf/crconf/0001-Modify-the-Makefile-for-cross-compile.patch @@ -0,0 +1,30 @@ +From 2c260c8c437c7f72f093b6c157a38b93443bde1d Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Mon, 11 Dec 2017 15:45:05 +0800 +Subject: [PATCH] Modify the Makefile for cross compile + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Chunrong Guo +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index c7bfee2..d6421f3 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,8 +4,8 @@ LIBDIR=/usr/lib + SBINDIR=/sbin + MANDIR=/share/man + +-CC = gcc +-HOSTCC = gcc ++CC ?= gcc ++HOSTCC ?= gcc + CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall + CFLAGS = $(CCOPTS) -I../include + +-- +2.7.4 + diff --git a/bsp/meta-freescale/recipes-extended/crconf/crconf_git.bb b/bsp/meta-freescale/recipes-extended/crconf/crconf_git.bb new file mode 100644 index 00000000..7dc92776 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/crconf/crconf_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "crconf -Linux crypto layer configuraton tool" +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" + +S = "${WORKDIR}/git" + +do_install () { + oe_runmake install DESTDIR=${D} +} + +FILES_${PN} += "/share/man/* ${libdir}/* ${sbindir}/*" diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk.inc b/bsp/meta-freescale/recipes-extended/dpdk/dpdk.inc new file mode 100644 index 00000000..f5793a19 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk.inc @@ -0,0 +1,119 @@ +DESCRIPTION = "Data Plane Development Kit" +HOMEPAGE = "http://dpdk.org" +LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2" + +DEPENDS = "virtual/kernel openssl" +DEPENDS_append_x86-64 = " numactl" +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +inherit module + +COMPATIBLE_HOST = '(aarch64|arm|i.86|x86_64).*-linux' +COMPATIBLE_HOST_libc-musl = 'null' +COMPATIBLE_HOST_armv4 = 'null' +COMPATIBLE_HOST_armv5 = 'null' +COMPATIBLE_HOST_armv6 = 'null' + +COMPATIBLE_MACHINE = "(imx|qoriq)" + +DPDK_RTE_TARGET_x86-64 = "x86_64-native-linuxapp-gcc" +DPDK_RTE_TARGET_x86 = "i686-native-linuxapp-gcc" +DPDK_RTE_TARGET_armv7a = "${ARCH}-armv7a-linuxapp-gcc" +DPDK_RTE_TARGET_armv7ve = "${ARCH}-armv7a-linuxapp-gcc" +DPDK_RTE_TARGET ?= "${ARCH}-dpaa-linuxapp-gcc" + +export RTE_TARGET = "${DPDK_RTE_TARGET}" +export RTE_OUTPUT = "${S}/${RTE_TARGET}" +export MODULE_DIR = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \ + OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ + RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \ +' +do_configure () { + ############################################################# + ### default value for prefix is "usr", unsetting it, so it + ### will not be concatenated in ${RTE_TARGET}/Makefile + ### which will cause compilation failure + ############################################################# + unset prefix + oe_runmake O=$RTE_TARGET T=$RTE_TARGET config +} + +do_compile () { + unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS + + cd ${S}/${RTE_TARGET} + oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \ + CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \ + EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \ + EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ + CROSS="${TARGET_PREFIX}" \ + prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1 + + cd ${S}/examples/ + for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do + temp=`basename ${APP}` + if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then + oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ + EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ + CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}" + else + oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ + EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ + CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/" + fi + done + +} + +do_install () { + oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} + oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR} + oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} + + # Install examples + install -d 0644 ${D}/${datadir}/dpdk/cmdif/include + install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib + install -d 0644 ${D}/${datadir}/dpdk/examples + cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \ + examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include + cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib + install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw + cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw + cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk + cp -r ${S}/examples/cmdif/cmdif_demo/${DPDK_RTE_TARGET}/cmdif_demo ${D}/${datadir}/dpdk/examples + cp -r ${S}/examples/vhost/vhost-switch ${D}/${datadir}/dpdk/examples + for APP in l2fwd l3fwd l2fwd-qdma l2fwd-crypto ipsec-secgw kni ip_fragmentation ip_reassembly; do + cp -r ${S}/examples/${APP}/${APP} ${D}/${datadir}/dpdk/examples + done +} + +PACKAGES += "${PN}-examples" + +FILES_${PN}-dbg += " \ + ${datadir}/dpdk/.debug \ + ${datadir}/dpdk/examples/*/.debug \ + " +FILES_${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \ +" +FILES_${PN}-dev += " \ + ${datadir}/dpdk/${RTE_TARGET}/.config \ + ${includedir} \ + ${includedir}/exec-env \ + ${datadir}/dpdk/buildtools/ \ + ${datadir}/dpdk/${RTE_TARGET}/include \ + ${datadir}/dpdk/${RTE_TARGET}/lib \ + ${datadir}/dpdk/mk \ + " + +FILES_${PN} += " ${datadir}/ \ + ${prefix}/sbin/ \ + ${prefix}/bin/ \ + ${libdir}/ \ + " +FILES_${PN}-examples += " \ + ${datadir}/examples/* \ + " diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch new file mode 100644 index 00000000..5ee48a59 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch @@ -0,0 +1,26 @@ +From 9c2b840a1c8ac0fbb638b5cd481909a3f832eed4 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Wed, 3 Jul 2019 08:50:45 +0200 +Subject: [PATCH] Add RTE_KERNELDIR_OUT + +Signed-off-by: C.r. Guo +--- + kernel/linux/kni/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile +index 595bac261..28a31f36a 100644 +--- a/kernel/linux/kni/Makefile ++++ b/kernel/linux/kni/Makefile +@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror + + ifeq ($(DISTRIB_ID),Ubuntu) + MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE)) +-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \ ++UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \ + | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1) + MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))" + endif +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch new file mode 100644 index 00000000..fa0eda87 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch @@ -0,0 +1,26 @@ +From 354c2d1570ddf83a99c4ac711c884644c6dd1cef Mon Sep 17 00:00:00 2001 +From: "C.r. Guo" +Date: Wed, 27 Mar 2019 09:35:43 +0100 +Subject: [PATCH] add -Wno-cast-function-type + +Upstream-Status: Inappropriate [configuration] +--- + examples/cmdif/lib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile +index 235c3adbf..230f17b0a 100644 +--- a/examples/cmdif/lib/Makefile ++++ b/examples/cmdif/lib/Makefile +@@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c + SRCS-y += shbp/shbp.c + + CFLAGS += -O3 +-CFLAGS += $(WERROR_FLAGS) ++CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes + CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib + CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client + CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch new file mode 100644 index 00000000..3b5a2b3a --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch @@ -0,0 +1,53 @@ +From 6fe3e96ab6e92f8faca9784a46bc33d92790c2b8 Mon Sep 17 00:00:00 2001 +From: Kevin Traynor +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 +Signed-off-by: Kevin Traynor +Acked-by: Konstantin Ananyev +Signed-off-by: Jens Rehsack +--- + 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/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch deleted file mode 100644 index 51987b53..00000000 --- a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0001-fix-gcc-8-build-error.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 7409d0b89f80a72d91e02dc9ec688a01723c3c66 Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Wed, 4 Jul 2018 17:12:39 +0800 -Subject: [PATCH] fix gcc-8 build error - -Signed-off-by: Chunrong Guo ---- - examples/ipsec-secgw/parser.c | 6 ++---- - mk/toolchain/gcc/rte.vars.mk | 2 +- - 2 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c -index 9d0ea46..b2b30e4 100644 ---- a/examples/ipsec-secgw/parser.c -+++ b/examples/ipsec-secgw/parser.c -@@ -544,8 +544,7 @@ parse_cfg_file(const char *cfg_filename) - goto error_exit; - } - -- strncpy(str + strlen(str), oneline, -- strlen(oneline)); -+ strcpy(str + strlen(str), oneline); - - continue; - } -@@ -557,8 +556,7 @@ parse_cfg_file(const char *cfg_filename) - cfg_filename, line_num); - goto error_exit; - } -- strncpy(str + strlen(str), oneline, -- strlen(oneline)); -+ strcpy(str + strlen(str), oneline); - - str[strlen(str)] = '\n'; - if (cmdline_parse(cl, str) < 0) { -diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk -index 3b907e2..cc63da8 100644 ---- a/mk/toolchain/gcc/rte.vars.mk -+++ b/mk/toolchain/gcc/rte.vars.mk -@@ -75,7 +75,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes - WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith - WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual - WERROR_FLAGS += -Wformat-nonliteral -Wformat-security --WERROR_FLAGS += -Wundef -Wwrite-strings -+WERROR_FLAGS += -Wundef -Wwrite-strings -Wno-cast-function-type - - ifeq ($(RTE_DEVEL_BUILD),y) - WERROR_FLAGS += -Werror --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch new file mode 100644 index 00000000..61467377 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch @@ -0,0 +1,39 @@ +From aa97b9162b68780ca912a226b5045a3ddab41d3c Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Thu, 4 Jul 2019 08:03:56 +0200 +Subject: [PATCH] update WERROR_FLAGS + +Signed-off-by: C.r. Guo +--- + 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/bsp/meta-freescale/recipes-extended/dpdk/dpdk_17.11.bb b/bsp/meta-freescale/recipes-extended/dpdk/dpdk_17.11.bb deleted file mode 100644 index f9fe91e8..00000000 --- a/bsp/meta-freescale/recipes-extended/dpdk/dpdk_17.11.bb +++ /dev/null @@ -1,104 +0,0 @@ -DESCRIPTION = "Data Plane Development Kit" -HOMEPAGE = "http://dpdk.org" -LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2" -LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492" - -DEPENDS += "virtual/kernel openssl" -RDEPENDS_${PN} = "bash python" -RDEPENDS_${PN}-examples = "bash python-core" - -inherit module - -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-fix-gcc-8-build-error.patch \ -" -SRCREV = "f451d2beff458833f4da6682694ebc5c03d595c6" - -S = "${WORKDIR}/git" - -DPAA_VER ?= "dpaa" -export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc" -export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/" - -EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \ - CPU_CFLAGS="-fPIC --sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \ - OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ - RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \ -' - -do_configure[noexec] = "1" - -do_compile[depends] += "virtual/kernel:do_shared_workdir" -do_compile() { - oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" config -} - -do_install() { - unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS - - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" WERROR_FLAGS="-w" V=1 T="${RTE_TARGET}" DESTDIR="${D}" install CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y CONFIG_RTE_LIBRTE_PMD_OPENSSL=y - - # Build and install the DPDK examples - for APP in examples/l2fwd examples/l3fwd examples/l2fwd-qdma examples/l2fwd-crypto examples/ipsec-secgw examples/kni examples/ip_fragmentation examples/ip_reassembly; do - temp=`basename ${APP}` - if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y - else - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" -C ${APP} - fi - - [ ! -d ${D}/${bindir}/dpdk-example ] && install -d 0644 ${D}/${bindir}/dpdk-example - install -m 0755 ${S}/examples/`basename ${APP}`/build/`basename ${APP}` \ - ${D}/${bindir}/dpdk-example/ - done - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C examples/vhost - install -m 0755 ${S}/examples/vhost/build/vhost-switch ${D}/${bindir}/dpdk-example/ - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" -C examples/cmdif - - install -d 0644 ${D}/usr/share/dpdk/cmdif/include - install -d 0644 ${D}/usr/share/dpdk/cmdif/lib - cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \ - examples/cmdif/lib/shbp/fsl_shbp.h ${D}/usr/share/dpdk/cmdif/include - cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/usr/share/dpdk/cmdif/lib - - install -m 0755 ${S}/${RTE_TARGET}/app/testpmd ${D}/${bindir}/dpdk-example/ - rm -fr ${D}/lib/modules/* - install -d ${D}/lib/modules/${KERNEL_VERSION}/dpdk - install -m 0755 ${S}/${RTE_TARGET}/kmod/rte_kni.ko ${D}/lib/modules/${KERNEL_VERSION}/dpdk/ - install -d ${D}/${bindir}/dpdk-example/extras - cp -rf ${S}/nxp/* ${D}/${bindir}/dpdk-example/extras/ - rm ${D}/${datadir}/${RTE_TARGET}/app/dpdk-pmdinfogen - - chown root:root -R ${D} -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -PACKAGES += "${PN}-examples" - -FILES_${PN} += "${datadir}/* ${bindir}/* ${sbindir}/* /usr/share/dpdk/cmdif/include/*" -FILES_${PN}-dbg += "${bindir}/dpdk-example/.debug \ - ${datadir}/examples/kni/build/.debug \ - ${datadir}/examples/kni/build/app/.debug \ - ${datadir}/examples/l2fwd/build/.debug \ - ${datadir}/examples/l2fwd/build/app/.debug \ - ${datadir}/examples/l2fwd-crypto/build/.debug \ - ${datadir}/examples/l2fwd-crypto/build/app/.debug \ - ${datadir}/examples/l3fwd/build/.debug \ - ${datadir}/examples/l3fwd/build/app/.debug \ - ${datadir}/examples/ipsec-secgw/build/.debug \ - ${datadir}/examples/ipsec-secgw/build/app/.debug \ - ${datadir}/examples/ip_fragmentation/build/.debug \ - ${datadir}/examples/ip_fragmentation/build/app/.debug \ - ${datadir}/examples/ip_reassembly/build/.debug \ - ${datadir}/examples/ip_reassembly/build/app/.debug \ -" -FILES_${PN}-dev += "${datadir}/mk ${datadir}/scripts \ - ${datadir}/${RTE_TARGET} \ - ${includedir} \ -" -FILES_${PN}-examples += "${datadir}/examples" - -FILES_${PN}-staticdev += "/usr/share/dpdk/cmdif/lib/*.a" -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-extended/dpdk/dpdk_19.11-20.04.bb b/bsp/meta-freescale/recipes-extended/dpdk/dpdk_19.11-20.04.bb new file mode 100644 index 00000000..398d2ec4 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/dpdk/dpdk_19.11-20.04.bb @@ -0,0 +1,19 @@ +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/bsp/meta-freescale/recipes-extended/hyperrelay/hyperrelay_git.bb b/bsp/meta-freescale/recipes-extended/hyperrelay/hyperrelay_git.bb deleted file mode 100644 index 29056c55..00000000 --- a/bsp/meta-freescale/recipes-extended/hyperrelay/hyperrelay_git.bb +++ /dev/null @@ -1,36 +0,0 @@ -DESCRIPTION = "Userspace proxy agent for Code Warrrior HyperTrk" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://EULA;md5=c9ae442cf1f9dd6c13dfad64b0ffe73f" - -inherit fsl-eula-unpack - -SRC_URI = "git://git.freescale.com/ppc/sdk/hyperrelay.git;fsl-eula=true;branch=sdk-v2.0.x" -SRCREV = "925af97359c2b86399561f1f97f2cb6ca0ccd344" - -S = "${WORKDIR}/git" - -CFLAGS += "\ - -Wall \ - -Wundef \ - -Wstrict-prototypes \ - -Wno-trigraphs \ - -fno-strict-aliasing \ - -fno-common \ - -O2 \ - -g \ - -fmessage-length=0 \ - -MMD \ - -MP \ - -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" \ -" - -LDFLAGS_prepend = " -lpthread " - -do_install() { - install -d ${D}${bindir} - oe_runmake install DESTDIR=${D} -} - -COMPATIBLE_MACHINE = "(qoriq-ppc)" -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -INSANE_SKIP_${PN} = "ldflags" diff --git a/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch b/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch new file mode 100644 index 00000000..df2f37ad --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch @@ -0,0 +1,69 @@ +From f07cd0e5f32a00a4091fa964d0dae0cd46c17554 Mon Sep 17 00:00:00 2001 +From: Cristinel Panfir +Date: Sat, 23 May 2020 08:51:31 +0000 +Subject: [PATCH] tools/scripts: update shebang to python3 + +Upstream-Status: Pending + +Signed-off-by: Cristinel Panfir +--- + scripts/arm64-parsedump.py | 2 +- + tools/jailhouse-cell-linux | 2 +- + tools/jailhouse-cell-stats | 2 +- + tools/jailhouse-config-create | 2 +- + tools/jailhouse-hardware-check | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/scripts/arm64-parsedump.py b/scripts/arm64-parsedump.py +index 9519eb5..c695706 100755 +--- a/scripts/arm64-parsedump.py ++++ b/scripts/arm64-parsedump.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux +index 215932a..bcbb902 100755 +--- a/tools/jailhouse-cell-linux ++++ b/tools/jailhouse-cell-linux +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats +index 2f7e966..4c5289f 100755 +--- a/tools/jailhouse-cell-stats ++++ b/tools/jailhouse-cell-stats +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create +index 55601a6..9869b94 100755 +--- a/tools/jailhouse-config-create ++++ b/tools/jailhouse-config-create +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check +index b86756a..0c8fb42 100755 +--- a/tools/jailhouse-hardware-check ++++ b/tools/jailhouse-hardware-check +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +-- +2.7.4 + diff --git a/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse_0.11.bb b/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse_0.11.bb new file mode 100644 index 00000000..32a4f92f --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/jailhouse/jailhouse_0.11.bb @@ -0,0 +1,122 @@ +SUMMARY = "Jailhouse, i.MX fork" +HOMEPAGE = "https://github.com/siemens/jailhouse" +SECTION = "jailhouse" +LICENSE = "GPL-2.0" + +LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ + file://tools/root-cell-config.c.tmpl;beginline=6;endline=33;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://include/jailhouse/hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://include/jailhouse/cell-config.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://include/arch/arm/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://include/arch/arm64/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://include/arch/x86/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ + file://driver/jailhouse.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ +" + +SRCBRANCH = "lf-5.4.y" +SRCREV = "82d5698945eafaffa58bab3b4d6da320bf56289c" + +SRC_URI = "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \ + file://0001-tools-scripts-update-shebang-to-python3.patch \ +" + +DEPENDS = " \ + make-native \ + python3-mako-native \ + python3-mako \ + dtc-native \ +" + +inherit module python3native bash-completion deploy setuptools3 + +S = "${WORKDIR}/git" +B = "${S}" + +JH_ARCH = "arm64" +JH_DATADIR ?= "${datadir}/jailhouse" +CELL_DIR ?= "${JH_DATADIR}/cells" +CELLCONF_DIR ?= "${JH_DATADIR}/configs" +INMATES_DIR ?= "${JH_DATADIR}/inmates" + +JH_CONFIG ?= "${S}/ci/jailhouse-config-x86.h" +JH_CONFIG_x86 ?= "${S}/ci/jailhouse-config-x86.h" +JH_CONFIG_x86-64 ?= "${S}/ci/jailhouse-config-x86.h" +JH_CONFIG_arm ?= "${S}/ci/jailhouse-config-banana-pi.h" + +do_configure() { + if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; + then + cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/${ARCH}/ + fi +} + +USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ + -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \ + -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \ + -I../driver' + +TOOLS_SRC_DIR = "${S}/tools" +TOOLS_OBJ_DIR = "${S}/tools" + +do_compile() { + unset LDFLAGS + oe_runmake V=1 CC="${CC}" \ + ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} \ + KDIR=${STAGING_KERNEL_BUILDDIR} + + cd ${TOOLS_SRC_DIR} + export JAILHOUSE_VERSION=$(cat ../VERSION) + oe_runmake V=1 \ + CFLAGS="${USER_SPACE_CFLAGS}" \ + src=${TOOLS_SRC_DIR} obj=${TOOLS_OBJ_DIR} \ + ${TOOLS_OBJ_DIR}/jailhouse-config-collect ${TOOLS_OBJ_DIR}/jailhouse +} + +do_install() { + oe_runmake \ + PYTHON=python3 \ + V=1 \ + LDFLAGS="" \ + CC="${CC}" \ + ARCH=${JH_ARCH} \ + CROSS_COMPILE=${TARGET_PREFIX} \ + KDIR=${STAGING_KERNEL_BUILDDIR} \ + DESTDIR=${D} install + + install -d ${D}${CELL_DIR} + install ${B}/configs/${JH_ARCH}/*.cell ${D}${CELL_DIR}/ + + install -d ${D}${INMATES_DIR}/tools/${JH_ARCH} + install ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR} + + install -d ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-cell-linux ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-cell-stats ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-config-collect ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-config-create ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-gcov-extract ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-hardware-check ${D}${JH_DATADIR}/tools + install ${B}/inmates/tools/${JH_ARCH}/linux-loader.bin ${D}${INMATES_DIR}/tools/${JH_ARCH} +} + +PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse" + +FILES_${PN} += "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" +FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" + +RDEPENDS_${PN} += " \ + python3-curses \ + python3-datetime \ + python3-mmap \ +" + +RDEPENDS_pyjailhouse = " \ + python3-core \ + python3-ctypes \ + python3-fcntl \ + python3-shell \ +" + +INSANE_SKIP_${PN} = "ldflags" + +COMPATIBLE_MACHINE = "(mx8m)" diff --git a/bsp/meta-freescale/recipes-extended/libpkcs11/libpkcs11_git.bb b/bsp/meta-freescale/recipes-extended/libpkcs11/libpkcs11_git.bb index 2a579c7b..33c27ecd 100644 --- a/bsp/meta-freescale/recipes-extended/libpkcs11/libpkcs11_git.bb +++ b/bsp/meta-freescale/recipes-extended/libpkcs11/libpkcs11_git.bb @@ -3,7 +3,7 @@ LICENSE = "GPLv2 & BSD" LIC_FILES_CHKSUM = "file://LICENSE;md5=803852533e29eb1d6d5e55ad3078b625" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1" -SRCREV = "efd15b9fb6ecc453eb933ac28ef1741b989f842d" +SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb" DEPENDS = "openssl secure-obj" @@ -28,7 +28,7 @@ do_install(){ mkdir -p ${D}/${includedir} ${D}/${bindir} cp ${S}/out/export/lib/libpkcs11.so ${D}/${libdir} cp ${S}/out/export/include/*.h ${D}/${includedir} - cp ${S}/out/export/app/pkcs11_app ${D}/${bindir} + cp ${S}/out/export/app/* ${D}/${bindir} } PARALLEL_MAKE = "" diff --git a/bsp/meta-freescale/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch b/bsp/meta-freescale/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch new file mode 100644 index 00000000..71b2b58c --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/ovs-dpdk/files/0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch @@ -0,0 +1,34 @@ +From 95c5c42b9581f595881df11ca8393dc6925f7d7d Mon Sep 17 00:00:00 2001 +From: Nipun Gupta +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 +--- + 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/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb b/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb new file mode 100644 index 00000000..9b5d2516 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb @@ -0,0 +1,50 @@ +DESCRIPTION = "OVS DPDK" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" + +DEPENDS = "dpdk python3-six-native coreutils-native" +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" + +S = "${WORKDIR}/git" + +DPAA_VER ?= "dpaa" +export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc" + +EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \ + CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \ + OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ + RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \ +' + +do_configure() { + export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} + ${S}/boot.sh + ${S}/configure --host aarch64-fsl-linux --with-dpdk=${SYSROOT_DPDK}/usr/share/${RTE_TARGET} --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" +} + +do_compile() { + oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" +} + +do_install() { + install -d ${D}${bindir}/ovs-dpdk + cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk + cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk + cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk + cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk + cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk + cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk + chmod 777 -R ${D}${bindir}/ovs-dpdk/* +} + +ALLOW_EMPTY_${PN} = "1" +INHIBIT_PACKAGE_STRIP = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.9.bb b/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.9.bb deleted file mode 100644 index ab351f6c..00000000 --- a/bsp/meta-freescale/recipes-extended/ovs-dpdk/ovs-dpdk_2.9.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "OVS DPDK" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35" - -DEPENDS = "dpdk python-six-native coreutils-native" -RDEPENDS_${PN} = "bash libcrypto libssl python" - -inherit pythonnative - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1" -SRCREV = "24eec4133f03b0a5a8f903577bc87603577150c0" - -S = "${WORKDIR}/git" - -DPAA_VER ?= "dpaa" -export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc" - -EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \ - CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \ - OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ - RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \ -' - -do_configure() { - export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} - ${S}/boot.sh - ${S}/configure --host aarch64-fsl-linux --with-dpdk=${SYSROOT_DPDK}/usr/share/${RTE_TARGET} --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" -} - -do_compile() { - oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" -} - -do_install() { - install -d ${D}${bindir}/ovs-dpdk - cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk - cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk - cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk - cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk - cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk - cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk - chmod 777 -R ${D}${bindir}/ovs-dpdk/* -} - -ALLOW_EMPTY_${PN} = "1" -INHIBIT_PACKAGE_STRIP = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(ls2080ardb|ls2084ardb|ls2088a|ls1043a|ls1046a|ls1088a)" diff --git a/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb b/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb new file mode 100644 index 00000000..f3a73c35 --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "PKTGEN DPDK" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=30ac8fa65a07ea7cc1c7ee84e1c80294" + +DEPENDS += "libpcap dpdk lua lua-native" + +SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \ +" +SRCREV = "7a61e4dfcdf037c31460b6c9bcb301797813036a" + +S = "${WORKDIR}/git" + +DPAA_VER ?= "dpaa" +export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" +export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/" + +EXTRA_OEMAKE += 'CC="${CC}" LD="${LD}" RTE_SDK="${RECIPE_SYSROOT}/usr/share/" RTE_TARGET="arm64-${DPAA_VER}-linuxapp-gcc"' + +do_compile() { + oe_runmake +} + +do_install() { + install -d ${D}${bindir}/ + cp -f ${S}/app/arm64-dpaa-linuxapp-gcc/pktgen ${D}${bindir}/ + cp -f ${S}/Pktgen.lua ${D}${bindir}/ +} + +INSANE_SKIP_${PN} = "ldflags" +INHIBIT_PACKAGE_STRIP = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +PARALLEL_MAKE = "" +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_git.bb b/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_git.bb deleted file mode 100644 index 0a6d97de..00000000 --- a/bsp/meta-freescale/recipes-extended/pktgen-dpdk/pktgen-dpdk_git.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "PKTGEN DPDK" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8120b89a783571da3cb492c35ac6b1f9" - -DEPENDS += "libpcap dpdk" - -SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=http;nobranch=1" -SRCREV = "ffbe7becf8dd75fd7d46b97b10374531878cb9c5" - -S = "${WORKDIR}/git" - -DPAA_VER ?= "dpaa" -export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" -export RTE_SDK = "${RECIPE_SYSROOT}/usr/share" - -EXTRA_OEMAKE += 'CC="${CC}" LD="${LD}" RTE_SDK="${RECIPE_SYSROOT}/usr/share" RTE_TARGET="arm64-${DPAA_VER}-linuxapp-gcc"' - -do_compile() { - unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS - oe_runmake -} - -do_install() { - install -d ${D}${bindir}/ - cp -f ${S}/app/arm64-dpaa-linuxapp-gcc/pktgen ${D}${bindir}/ - cp -f ${S}/Pktgen.lua ${D}${bindir}/ -} - -INSANE_SKIP_${PN} = "ldflags" -INHIBIT_PACKAGE_STRIP = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -PARALLEL_MAKE = "" -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj.inc b/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj.inc index 20341261..617601ac 100644 --- a/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj.inc +++ b/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj.inc @@ -2,17 +2,17 @@ DESCRIPTION = "Secure Object" LICENSE = "BSD" DEPENDS = "openssl optee-os-qoriq optee-client-qoriq" -RDEPENDS_${PN} = "bash libcrypto libssl python" +RDEPENDS_${PN} = "bash libcrypto libssl" -DEPENDS += "python-pycrypto-native" +DEPENDS += "python3-pycrypto-native" -inherit pythonnative +inherit python3native LDFLAGS += "${TOOLCHAIN_OPTIONS}" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \ " -SRCREV = "bc0553a3c7a02555eb6bf46803854f6b49227a26" +SRCREV = "fb179a861e8e9bfed85ac5ef8387bdd30de48db9" WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/" diff --git a/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj_git.bb b/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj_git.bb index d85d7298..2d723738 100644 --- a/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj_git.bb +++ b/bsp/meta-freescale/recipes-extended/secure-obj/secure-obj_git.bb @@ -34,9 +34,11 @@ do_install() { cp ${S}/secure_storage_ta/ta/b05bcf48-9732-4efa-a9e0-141c7c888c34.ta ${D}${base_libdir}/optee_armtz cp ${S}/securekey_lib/out/export/lib/libsecure_obj.so ${D}${libdir} cp ${S}/secure_obj-openssl-engine/libeng_secure_obj.so ${D}${libdir}/${ARCH}-linux-gnu/openssl-1.0.0/engines - cp ${S}/securekey_lib/out/export/app/* ${D}${bindir} + cp ${S}/securekey_lib/out/export/app/*_app ${D}${bindir} + cp ${S}/securekey_lib/out/export/app/mp_verify ${D}${bindir} cp ${S}/secure_obj-openssl-engine/app/sobj_eng_app ${D}${bindir} cp ${S}/securekey_lib/out/export/include/* ${D}${includedir} + rm -rf ${D}${bindir}/test } FILES_${PN} += "${base_libdir}/optee_armtz ${libdir}/${ARCH}-linux-gnu/openssl-1.0.0/engines" diff --git a/bsp/meta-freescale/recipes-extended/skmm-ep/skmm-ep_git.bb b/bsp/meta-freescale/recipes-extended/skmm-ep/skmm-ep_git.bb index 94649477..b75c0feb 100644 --- a/bsp/meta-freescale/recipes-extended/skmm-ep/skmm-ep_git.bb +++ b/bsp/meta-freescale/recipes-extended/skmm-ep/skmm-ep_git.bb @@ -7,7 +7,7 @@ DEPENDS = "libedit openssl virtual/kernel" PACKAGE_ARCH = "${MACHINE_ARCH}" -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;branch=sdk-v2.0.x \ +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/skmm-ep;protocol=https;nobranch=1 \ file://add-two-missing-header-files.patch \ " SRCREV = "de6816c7d66129683bc62229b482ac3cf585d896" diff --git a/bsp/meta-freescale/recipes-extended/tsntool/tsntool_git.bb b/bsp/meta-freescale/recipes-extended/tsntool/tsntool_git.bb new file mode 100644 index 00000000..5694e91c --- /dev/null +++ b/bsp/meta-freescale/recipes-extended/tsntool/tsntool_git.bb @@ -0,0 +1,31 @@ +SUMMARY = "Configure TSN funtionalitie" +DESCRIPTION = "A tool to configure TSN funtionalities in user space" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ef58f855337069acd375717db0dbbb6d" + +DEPENDS = "cjson libnl readline" + +inherit pkgconfig + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1" +SRCREV = "ca2d8fb348bb54960d706177108c43ae213e0063" + +S = "${WORKDIR}/git" + +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +do_compile_prepend() { + mkdir -p ${S}/include/linux + cp -r ${STAGING_KERNEL_DIR}/include/uapi/linux/tsn.h ${S}/include/linux +} +do_install() { + install -d ${D}${bindir} ${D}${libdir} + install -m 0755 ${S}/tsntool ${D}${bindir} + install -m 0755 ${S}/libtsn.so ${D}${libdir} +} + +PACKAGES = "${PN}-dbg ${PN}" +FILES_${PN} = "${libdir}/libtsn.so ${bindir}/*" +INSANE_SKIP_${PN} += "file-rdeps rpaths dev-so" +COMPATIBLE_MACHINE = "(qoriq)" +PARALLEL_MAKE = "" diff --git a/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-GCC-above-5.4-fails-when-we-specify-arch-funattribut.patch b/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-GCC-above-5.4-fails-when-we-specify-arch-funattribut.patch deleted file mode 100644 index 7f838476..00000000 --- a/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-GCC-above-5.4-fails-when-we-specify-arch-funattribut.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 6dab3ad3f91ebcdb16eb9bbb37383718793b675a Mon Sep 17 00:00:00 2001 -From: babak sarashki -Date: Sat, 29 Sep 2018 09:57:05 -0700 -Subject: [PATCH] GCC above 5.4 fails when we specify arch funattribute. - -Here we are as a workaround setting target. ---- - src/vppinfra/cpu.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h -index 110815c..618276c 100644 ---- a/src/vppinfra/cpu.h -+++ b/src/vppinfra/cpu.h -@@ -27,7 +27,7 @@ - - #if __x86_64__ && CLIB_DEBUG == 0 - #define foreach_march_variant(macro, x) \ -- macro(avx2, x, "arch=core-avx2") -+ macro(avx2, x, "avx2") - #else - #define foreach_march_variant(macro, x) - #endif --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-Link-vpp-api-with-shared-libs-if-static-is-disabled.patch b/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-Link-vpp-api-with-shared-libs-if-static-is-disabled.patch deleted file mode 100644 index ae1c9cbc..00000000 --- a/bsp/meta-freescale/recipes-extended/vpp-core/files/0001-Link-vpp-api-with-shared-libs-if-static-is-disabled.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7005c075cab39c8018d224c2fe56ad2e4f2db340 Mon Sep 17 00:00:00 2001 -From: babak sarashki -Date: Tue, 11 Sep 2018 14:08:51 -0700 -Subject: [PATCH] Link vpp-api with shared libs if static is disabled - -TODO: this is not complete ---- - src/vpp-api.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/vpp-api.am b/src/vpp-api.am -index 553eafa..30dfe9d 100644 ---- a/src/vpp-api.am -+++ b/src/vpp-api.am -@@ -23,8 +23,8 @@ libvppapiclient_la_LIBADD = \ - -lpthread -lm -lrt - - libvppapiclient_la_LDFLAGS = \ -- -Wl,-L$(top_builddir)/.libs,--whole-archive,-l:libsvm.a,-l:libvppinfra.a,-l:libvlibmemoryclient.a,--no-whole-archive \ -- -Wl,--version-script=$(srcdir)/vpp-api/client/libvppapiclient.map,-lrt -+ -L$(top_builddir)/.libs -lsvm -lvppinfra -lvlibmemoryclient \ -+ -Wl,--version-script=$(srcdir)/vpp-api/client/libvppapiclient.map,-lrt - - libvppapiclient_la_DEPENDENCIES = libvppinfra.la libvlibmemoryclient.la libsvm.la - --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-extended/vpp-core/files/config.h b/bsp/meta-freescale/recipes-extended/vpp-core/files/config.h deleted file mode 100644 index 2d617618..00000000 --- a/bsp/meta-freescale/recipes-extended/vpp-core/files/config.h +++ /dev/null @@ -1 +0,0 @@ -#define __PRE_DATA_SIZE 128 diff --git a/bsp/meta-freescale/recipes-extended/vpp-core/vpp-core.bb b/bsp/meta-freescale/recipes-extended/vpp-core/vpp-core.bb deleted file mode 100644 index 2bfbba88..00000000 --- a/bsp/meta-freescale/recipes-extended/vpp-core/vpp-core.bb +++ /dev/null @@ -1,65 +0,0 @@ -DESCRIPTION = "Vector Packet Processing" - -S = "${WORKDIR}/git" -PV = "18.01" - -LICENSE = "Apache-2.0" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e" - -AUTOTOOLS_SCRIPT_PATH = "${S}/src" - -SRCREV = "d3111f07682585079069b91666afffbc73c79cd8" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/vpp;nobranch=1 \ - file://0001-Link-vpp-api-with-shared-libs-if-static-is-disabled.patch \ - file://0001-GCC-above-5.4-fails-when-we-specify-arch-funattribut.patch \ - file://config.h \ - " -DEPENDS = "dpdk openssl numactl bison-native vpp-core-native" -DEPENDS_class-native = "bison-native openssl-native" - -inherit autotools -inherit pkgconfig -inherit python-dir - -export ARCH="arm64" - -EXTRA_OECONF = " \ - --disable-dependency-tracking \ - --with-libtool-sysroot=${SYSROOT} \ - --srcdir=${S}/src \ - --enable-perftool \ - --disable-papi \ - --disable-japi \ - --disable-static \ - --with-pre-data=128 \ - --disable-flowprobe-plugin --disable-ixge-plugin \ - --disable-memif-plugin --disable-sixrd-plugin --disable-gtpu-plugin \ - --disable-ioam-plugin --disable-lb-plugin --disable-ila-plugin \ - --disable-nat-plugin --disable-l2e-plugin --disable-stn-plugin \ - --disable-pppoe-plugin --disable-kubeproxy-plugin \ - --disable-vom --disable-dpdk-plugin \ -" - -EXTRA_OECONF_append_class-native = " --disable-vlib" - - -include vpp-pkgs.inc - - -do_configure_append () { - ( cd ${B} && mkdir -p vppinfra vpp/app ) - cp ${WORKDIR}/config.h ${S}/src/vlib/config.h -} - -do_install_append() { - mkdir -p ${D}/etc/vpp - cp ${S}/src/vpp/conf/startup.conf ${D}/etc/vpp/startup.conf -} - - -BBCLASSEXTEND = "native nativesdk" - -COMPATIBLE_MACHINE_class-target = "(qoriq)" - diff --git a/bsp/meta-freescale/recipes-extended/vpp-core/vpp-pkgs.inc b/bsp/meta-freescale/recipes-extended/vpp-core/vpp-pkgs.inc deleted file mode 100644 index 0dc76092..00000000 --- a/bsp/meta-freescale/recipes-extended/vpp-core/vpp-pkgs.inc +++ /dev/null @@ -1,227 +0,0 @@ - -PACKAGES += "vpp-core-data vpp-core-plugin-igmp vpp-core-plugin-gtpu vpp-core-plugin-gbp \ - vpp-core-plugin-lb vpp-core-plugin-avf vpp-core-plugin-cdp vpp-core-plugin-map vpp-core-plugin-srv6as \ - vpp-core-plugin-l2e vpp-core-plugin-acl vpp-core-plugin-flowprobe vpp-core-plugin-abf \ - vpp-core-plugin-pppoe vpp-core-plugin-lacp vpp-core-plugin-ioam vpp-core-plugin-memif \ - vpp-core-plugin-stn vpp-core-plugin-srv6ad vpp-core-plugin-mactime vpp-core-plugin-unittest \ - vpp-core-plugin-nat vpp-core-plugin-srv6am vpp-core-plugin-lb_test \ - vpp-core-plugin-ioam_vxlan_gpe_test vpp-core-plugin-map_test vpp-core-plugin-avf_test \ - vpp-core-plugin-mactime_test vpp-core-plugin-udp_ping_test vpp-core-plugin-ioam_trace_test \ - vpp-core-plugin-lacp_test vpp-core-plugin-stn_test vpp-core-plugin-memif_test \ - vpp-core-plugin-nat_test vpp-core-plugin-acl_test vpp-core-plugin-ioam_export_test \ - vpp-core-plugin-flowprobe_test vpp-core-plugin-ioam_pot_test \ - vpp-core-plugin-vxlan_gpe_ioam_export_test vpp-core-plugin-pppoe_test vpp-core-plugin-gtpu_test \ - vpp-core-plugin-cdp_test vpp-core-plugin-dpdk vpp-core-plugin-dpdk_test vpp-core-test \ - vpp-core-plugin-tlsopenssl vpp-core-plugin-ixge vpp-core-plugin-ila vpp-core-plugin-data \ - " - -#vpp-core-python -#FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR} \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/requires.txt \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/PKG-INFO \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/top_level.txt \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/dependency_links.txt \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/zip-safe \ -# ${PYTHON_SITEPACKAGES_DIR}/vpp_papi-1.6.1-py2.7.egg-info/SOURCES.txt \ -# " - -FILES_${PN}-test = " ${bindir}/vpp_json_test " -FILES_${PN}-plugin-igmp = " ${libdir}/vpp_plugins/igmp_plugin.so " -FILES_${PN}-plugin-gtpu = " ${libdir}/vpp_plugins/gtpu_plugin.so " -FILES_${PN}-plugin-gbp = " ${libdir}/vpp_plugins/gbp_plugin.so " -FILES_${PN}-plugin-lb = " ${libdir}/vpp_plugins/lb_plugin.so " -FILES_${PN}-plugin-avf = " ${libdir}/vpp_plugins/avf_plugin.so " -FILES_${PN}-plugin-cdp = " ${libdir}/vpp_plugins/cdp_plugin.so " -FILES_${PN}-plugin-map = " ${libdir}/vpp_plugins/map_plugin.so " -FILES_${PN}-plugin-srv6as = " ${libdir}/vpp_plugins/srv6as_plugin.so " -FILES_${PN}-plugin-tlsopenssl = " ${libdir}/vpp_plugins/tlsopenssl_plugin.so " -FILES_${PN}-plugin-ixge = " ${libdir}/vpp_plugins/ixge_plugin.so " -FILES_${PN}-plugin-l2e = " ${libdir}/vpp_plugins/l2e_plugin.so " -FILES_${PN}-plugin-acl = " ${libdir}/vpp_plugins/acl_plugin.so " -FILES_${PN}-plugin-flowprobe = " ${libdir}/vpp_plugins/flowprobe_plugin.so " -FILES_${PN}-plugin-abf = " ${libdir}/vpp_plugins/abf_plugin.so " -FILES_${PN}-plugin-pppoe = " ${libdir}/vpp_plugins/pppoe_plugin.so " -FILES_${PN}-plugin-lacp = " ${libdir}/vpp_plugins/lacp_plugin.so " -FILES_${PN}-plugin-ioam = " ${libdir}/vpp_plugins/ioam_plugin.so " -FILES_${PN}-plugin-memif = " ${libdir}/vpp_plugins/memif_plugin.so " -FILES_${PN}-plugin-stn = " ${libdir}/vpp_plugins/stn_plugin.so " -FILES_${PN}-plugin-srv6ad = " ${libdir}/vpp_plugins/srv6ad_plugin.so " -FILES_${PN}-plugin-mactime = " ${libdir}/vpp_plugins/mactime_plugin.so " -FILES_${PN}-plugin-unittest = " ${libdir}/vpp_plugins/unittest_plugin.so " -FILES_${PN}-plugin-nat = " ${libdir}/vpp_plugins/nat_plugin.so " -FILES_${PN}-plugin-srv6am = " ${libdir}/vpp_plugins/srv6am_plugin.so " -FILES_${PN}-plugin-dpdk = " ${libdir}/vpp_plugins/dpdk_plugin.so " -FILES_${PN}-plugin-ila = " ${libdir}/vpp_plugins/ila_plugin.so " - -FILES_${PN}-plugin-lb_test = " ${libdir}/vpp_api_test_plugins/lb_test_plugin.so " -FILES_${PN}-plugin-ioam_vxlan_gpe_test = " ${libdir}/vpp_api_test_plugins/ioam_vxlan_gpe_test_plugin.so " -FILES_${PN}-plugin-map_test = " ${libdir}/vpp_api_test_plugins/map_test_plugin.so " -FILES_${PN}-plugin-avf_test = " ${libdir}/vpp_api_test_plugins/avf_test_plugin.so " -FILES_${PN}-plugin-mactime_test = " ${libdir}/vpp_api_test_plugins/mactime_test_plugin.so " -FILES_${PN}-plugin-udp_ping_test = " ${libdir}/vpp_api_test_plugins/udp_ping_test_plugin.so " -FILES_${PN}-plugin-ioam_trace_test = " ${libdir}/vpp_api_test_plugins/ioam_trace_test_plugin.so " -FILES_${PN}-plugin-lacp_test = " ${libdir}/vpp_api_test_plugins/lacp_test_plugin.so " -FILES_${PN}-plugin-stn_test = " ${libdir}/vpp_api_test_plugins/stn_test_plugin.so " -FILES_${PN}-plugin-memif_test = " ${libdir}/vpp_api_test_plugins/memif_test_plugin.so " -FILES_${PN}-plugin-nat_test = " ${libdir}/vpp_api_test_plugins/nat_test_plugin.so " -FILES_${PN}-plugin-acl_test = " ${libdir}/vpp_api_test_plugins/acl_test_plugin.so " -FILES_${PN}-plugin-ioam_export_test = " ${libdir}/vpp_api_test_plugins/ioam_export_test_plugin.so " -FILES_${PN}-plugin-flowprobe_test = " ${libdir}/vpp_api_test_plugins/flowprobe_test_plugin.so " -FILES_${PN}-plugin-ioam_pot_test = " ${libdir}/vpp_api_test_plugins/ioam_pot_test_plugin.so " -FILES_${PN}-plugin-vxlan_gpe_ioam_export_test = " ${libdir}/vpp_api_test_plugins/vxlan_gpe_ioam_export_test_plugin.so " -FILES_${PN}-plugin-pppoe_test = " ${libdir}/vpp_api_test_plugins/pppoe_test_plugin.so " -FILES_${PN}-plugin-gtpu_test = " ${libdir}/vpp_api_test_plugins/gtpu_test_plugin.so " -FILES_${PN}-plugin-cdp_test = " ${libdir}/vpp_api_test_plugins/cdp_test_plugin.so " -FILES_${PN}-plugin-dpdk_test = " ${libdir}/vpp_api_test_plugins/dpdk_test_plugin.so " - -FILES_${PN}-data = " \ - ${datadir}/vpp/api/core/sctp.api.json \ - ${datadir}/vpp/api/core/sr.api.json \ - ${datadir}/vpp/api/core/gre.api.json \ - ${datadir}/vpp/api/core/lisp.api.json \ - ${datadir}/vpp/api/core/netmap.api.json \ - ${datadir}/vpp/api/core/tcp.api.json \ - ${datadir}/vpp/api/core/ipsec_gre.api.json \ - ${datadir}/vpp/api/core/bfd.api.json \ - ${datadir}/vpp/api/core/tap.api.json \ - ${datadir}/vpp/api/core/oam.api.json \ - ${datadir}/vpp/api/core/vpe.api.json \ - ${datadir}/vpp/api/core/bier.api.json \ - ${datadir}/vpp/api/core/ipsec.api.json \ - ${datadir}/vpp/api/core/af_packet.api.json \ - ${datadir}/vpp/api/core/vxlan_gpe.api.json \ - ${datadir}/vpp/api/core/session.api.json \ - ${datadir}/vpp/api/core/one.api.json \ - ${datadir}/vpp/api/core/sr_mpls.api.json \ - ${datadir}/vpp/api/core/feature.api.json \ - ${datadir}/vpp/api/core/p2p_ethernet.api.json \ - ${datadir}/vpp/api/core/memclnt.api.json \ - ${datadir}/vpp/api/core/pg.api.json \ - ${datadir}/vpp/api/core/l2.api.json \ - ${datadir}/vpp/api/core/punt.api.json \ - ${datadir}/vpp/api/core/classify.api.json \ - ${datadir}/vpp/api/core/policer.api.json \ - ${datadir}/vpp/api/core/span.api.json \ - ${datadir}/vpp/api/core/udp.api.json \ - ${datadir}/vpp/api/core/vxlan.api.json \ - ${datadir}/vpp/api/core/mpls.api.json \ - ${datadir}/vpp/api/core/qos.api.json \ - ${datadir}/vpp/api/core/ip.api.json \ - ${datadir}/vpp/api/core/ipip.api.json \ - ${datadir}/vpp/api/core/bond.api.json \ - ${datadir}/vpp/api/core/dns.api.json \ - ${datadir}/vpp/api/core/tapv2.api.json \ - ${datadir}/vpp/api/core/pipe.api.json \ - ${datadir}/vpp/api/core/dhcp6_pd_client_cp.api.json \ - ${datadir}/vpp/api/core/l2tp.api.json \ - ${datadir}/vpp/api/core/lisp_gpe.api.json \ - ${datadir}/vpp/api/core/cop.api.json \ - ${datadir}/vpp/api/core/geneve.api.json \ - ${datadir}/vpp/api/core/stats.api.json \ - ${datadir}/vpp/api/core/rd_cp.api.json \ - ${datadir}/vpp/api/core/dhcp.api.json \ - ${datadir}/vpp/api/core/lldp.api.json \ - ${datadir}/vpp/api/core/dhcp6_ia_na_client_cp.api.json \ - ${datadir}/vpp/api/core/ipfix_export.api.json \ - ${datadir}/vpp/api/core/vhost_user.api.json \ - ${datadir}/vpp/api/core/interface.api.json \ - ${datadir}/vpp/C.py \ - ${datadir}/vpp/api/core/flow.api.json \ - ${datadir}/vpp/api/core/map.api.json \ - ${datadir}/vpp/api/core/dpdk.api.json \ - ${datadir}/vpp/JSON.py " - - -FILES_${PN} = " \ - ${sysconfdir}/vpp \ - ${sysconfdir}/vpp/startup.conf \ - ${sysconfdir}/vpp/startup.conf.dflt \ - ${sysconfdir}/rc.local \ - ${bindir}/svmdbtool \ - ${bindir}/svmtool \ - ${bindir}/vppapigen \ - ${bindir}/elftool \ - ${bindir}/cpelatency \ - ${bindir}/cpelinreg \ - ${bindir}/elog_merge \ - ${bindir}/c2cpel \ - ${bindir}/cpelstate \ - ${bindir}/cpeldump \ - ${bindir}/vpp \ - ${bindir}/vpp_api_test \ - ${bindir}/vpp_get_metrics \ - ${bindir}/vpp_restart \ - ${bindir}/vppctl \ - ${libdir}/libcperf.so.0.0.0 \ - ${libdir}/libcperf.so.0 \ - ${libdir}/libsvm.so.0 \ - ${libdir}/libsvm.so.0.0.0 \ - ${libdir}/libsvmdb.so.0 \ - ${libdir}/libsvmdb.so.0.0.0 \ - ${libdir}/libvapiclient.so.0 \ - ${libdir}/libvapiclient.so.0.0.0 \ - ${libdir}/libvatplugin.so.0 \ - ${libdir}/libvatplugin.so.0.0.0 \ - ${libdir}/libvcl_ldpreload.so.0 \ - ${libdir}/libvcl_ldpreload.so.0.0.0 \ - ${libdir}/libvlib.so.0 \ - ${libdir}/libvlib.so.0.0.0 \ - ${libdir}/libvlibmemory.so.0 \ - ${libdir}/libvlibmemory.so.0.0.0 \ - ${libdir}/libvlibmemoryclient.so.0 \ - ${libdir}/libvlibmemoryclient.so.0.0.0 \ - ${libdir}/libvnet.so.0 \ - ${libdir}/libvnet.so.0.0.0 \ - ${libdir}/libvppapiclient.so.0 \ - ${libdir}/libvppapiclient.so.0.0.0 \ - ${libdir}/libvppcom.so.0 \ - ${libdir}/libvppcom.so.0.0.0 \ - ${libdir}/libvppinfra.so.0 \ - ${libdir}/libvppinfra.so.0.0.0 \ - " - -FILES_${PN}-plugin-data = " \ - ${datadir}/vpp/api/plugins/pot.api.json \ - ${datadir}/vpp/api/plugins/pppoe.api.json \ - ${datadir}/vpp/api/plugins/igmp.api.json \ - ${datadir}/vpp/api/plugins/avf.api.json \ - ${datadir}/vpp/api/plugins/mactime.api.json \ - ${datadir}/vpp/api/plugins/gbp.api.json \ - ${datadir}/vpp/api/plugins/map.api.json \ - ${datadir}/vpp/api/plugins/udp_ping.api.json \ - ${datadir}/vpp/api/plugins/l2e.api.json \ - ${datadir}/vpp/api/plugins/ioam_export.api.json \ - ${datadir}/vpp/api/plugins/lb.api.json \ - ${datadir}/vpp/api/plugins/vxlan_gpe_ioam_export.api.json \ - ${datadir}/vpp/api/plugins/ioam_vxlan_gpe.api.json \ - ${datadir}/vpp/api/plugins/acl.api.json \ - ${datadir}/vpp/api/plugins/ioam_cache.api.json \ - ${datadir}/vpp/api/plugins/stn.api.json \ - ${datadir}/vpp/api/plugins/abf.api.json \ - ${datadir}/vpp/api/plugins/nat.api.json \ - ${datadir}/vpp/api/plugins/flowprobe.api.json \ - ${datadir}/vpp/api/plugins/memif.api.json \ - ${datadir}/vpp/api/plugins/lacp.api.json \ - ${datadir}/vpp/api/plugins/gtpu.api.json \ - ${datadir}/vpp/api/plugins/trace.api.json \ - ${datadir}/vpp/api/plugins/dpdk.api.json \ - ${datadir}/vpp/api/plugins/cdp.api.json " - -FILES_${PN}-dev = " \ - ${includedir}/* \ - ${libdir}/libvcl_ldpreload.so \ - ${libdir}/libvppapiclient.so \ - ${libdir}/libvppcom.so \ - ${libdir}/libvlib.so \ - ${libdir}/libsvm.so \ - ${libdir}/libsvmdb.so \ - ${libdir}/libvatplugin.so \ - ${libdir}/libvlibmemory.so \ - ${libdir}/libvapiclient.so \ - ${libdir}/libvnet.so \ - ${libdir}/libvppinfra.so \ - ${libdir}/libcperf.so \ - ${libdir}/libvlibmemoryclient.so " - diff --git a/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-mfgtool.bb b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-mfgtool.bb index ab378cf5..968642bf 100644 --- a/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-mfgtool.bb +++ b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-mfgtool.bb @@ -46,4 +46,4 @@ RDEPENDS_${PN}-extfs = " \ e2fsprogs-mke2fs \ e2fsprogs-e2fsck \ " -COMPATIBLE_MACHINE = "(imx)" +COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca6174.bb b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca6174.bb new file mode 100644 index 00000000..aeba7623 --- /dev/null +++ b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca6174.bb @@ -0,0 +1,13 @@ +# Copyright 2019 NXP + +SUMMARY = "Qualcomm Wi-Fi support" + +inherit packagegroup + +RDEPENDS_${PN} = " \ + kernel-module-qca6174 \ + firmware-qca6174 \ +" + +COMPATIBLE_HOST = '(aarch64|arm).*-linux' +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca9377.bb b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca9377.bb new file mode 100644 index 00000000..43df5a70 --- /dev/null +++ b/bsp/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-qca9377.bb @@ -0,0 +1,12 @@ +# Copyright 2019 NXP + +SUMMARY = "Qualcomm Wi-Fi support" + +inherit packagegroup + +RDEPENDS_${PN} = " \ + kernel-module-qca9377 \ + firmware-qca9377 \ +" +COMPATIBLE_HOST = '(aarch64|arm).*-linux' +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm-armada_git.bb b/bsp/meta-freescale/recipes-graphics/drm/libdrm-armada_git.bb index 0a14e371..a47987a5 100644 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm-armada_git.bb +++ b/bsp/meta-freescale/recipes-graphics/drm/libdrm-armada_git.bb @@ -14,4 +14,4 @@ inherit autotools pkgconfig S = "${WORKDIR}/git" -COMPATIBLE_MACHINE ?= "(imx)" +COMPATIBLE_MACHINE ?= "(imx|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch deleted file mode 100644 index fa7b218e..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 9be904a70e6b7e6b3cc4e1b270bca02d14a4179b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Mon, 5 Sep 2016 14:41:37 +0300 -Subject: [PATCH] configure.ac: Allow explicit enabling of cunit tests - -Add --with-cunit to make it easier to do reproducible builds. Default -is still to probe cunit and build opportunistically. - -Signed-off-by: Jussi Kukkonen -Upstream-Status: Submitted [mailing list] - ---- - configure.ac | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1341f51..bef46e0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -168,6 +168,12 @@ AC_ARG_ENABLE(install-test-programs, - [Install test programs (default: no)]), - [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no]) - -+AC_ARG_WITH([cunit], -+ [AS_HELP_STRING([--with-cunit], -+ [Build tests that use cunit (default: auto)])], -+ [], -+ [with_cunit=auto]) -+ - dnl =========================================================================== - dnl check compiler flags - AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ -@@ -416,7 +422,7 @@ else - AC_DEFINE(HAVE_RADEON, 0) - fi - --if test "x$AMDGPU" != xno; then -+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then - # Detect cunit library - PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) - # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We -@@ -441,7 +447,11 @@ if test "x$AMDGPU" = xyes; then - AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support]) - - if test "x$have_cunit" = "xno"; then -- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ if test "x$with_cunit" = "xyes"; then -+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given]) -+ elif test "x$with_cunit" = "xauto"; then -+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ fi - fi - else - AC_DEFINE(HAVE_AMDGPU, 0) diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch new file mode 100644 index 00000000..ae6b0ab7 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/drm/libdrm/0001-meson-add-libdrm-vivante-to-the-meson-meta-data.patch @@ -0,0 +1,140 @@ +From 45f48f8a5de59c04b0510c23853772bc970f411e Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +Date: Thu, 9 Jan 2020 01:01:35 +0000 +Subject: [PATCH] meson: add libdrm-vivante to the meson meta data + +Upstream libdrm added the option to use meason as the buildsystem. +Integrate Vivante into the relevant meson build information. + +Upstream-Status: Pending + +Signed-off-by: Max Krummenacher +--- + meson.build | 14 +++++++++++++ + meson_options.txt | 7 +++++++ + vivante/meson.build | 50 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 71 insertions(+) + create mode 100644 vivante/meson.build + +diff --git a/meson.build b/meson.build +index e292554a..f4740634 100644 +--- a/meson.build ++++ b/meson.build +@@ -157,6 +157,15 @@ if _vc4 != 'false' + with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family()) + endif + ++with_vivante = false ++_vivante = get_option('vivante') ++if _vivante == 'true' ++ if not with_atomics ++ error('libdrm_vivante requires atomics.') ++ endif ++ with_vivante = true ++endif ++ + # XXX: Apparently only freebsd and dragonfly bsd actually need this (and + # gnu/kfreebsd), not openbsd and netbsd + with_libkms = false +@@ -312,6 +321,7 @@ install_headers( + 'include/drm/savage_drm.h', 'include/drm/sis_drm.h', + 'include/drm/tegra_drm.h', 'include/drm/vc4_drm.h', + 'include/drm/via_drm.h', 'include/drm/virtgpu_drm.h', ++ 'include/drm/vivante_drm.h', + subdir : 'libdrm', + ) + if with_vmwgfx +@@ -362,6 +372,9 @@ endif + if with_etnaviv + subdir('etnaviv') + endif ++if with_vivante ++ subdir('vivante') ++endif + if with_man_pages + subdir('man') + endif +@@ -382,5 +395,6 @@ message(' EXYNOS API @0@'.format(with_exynos)) + message(' Freedreno API @0@ (kgsl: @1@)'.format(with_freedreno, with_freedreno_kgsl)) + message(' Tegra API @0@'.format(with_tegra)) + message(' VC4 API @0@'.format(with_vc4)) ++message(' Vivante API @0@'.format(with_etnaviv)) + message(' Etnaviv API @0@'.format(with_etnaviv)) + message('') +diff --git a/meson_options.txt b/meson_options.txt +index 8af33f1c..dc69563d 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -95,6 +95,13 @@ option( + choices : ['true', 'false', 'auto'], + description : '''Enable support for vc4's KMS API.''', + ) ++option( ++ 'vivante', ++ type : 'combo', ++ value : 'false', ++ choices : ['true', 'false', 'auto'], ++ description : '''Enable support for vivante's propriatary experimental KMS API.''', ++) + option( + 'etnaviv', + type : 'combo', +diff --git a/vivante/meson.build b/vivante/meson.build +new file mode 100644 +index 00000000..f6adb598 +--- /dev/null ++++ b/vivante/meson.build +@@ -0,0 +1,50 @@ ++# Copyright © 2017-2018 Intel Corporation ++ ++# 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. ++ ++ ++libdrm_vivante = shared_library( ++ 'drm_vivante', ++ [ ++ files( ++ 'vivante_bo.c', ++ ), ++ config_file ++ ], ++ include_directories : [inc_root, inc_drm], ++ link_with : libdrm, ++ c_args : libdrm_c_args, ++ dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], ++ version : '1.0.0', ++ install : true, ++) ++ ++pkg.generate( ++ name : 'libdrm_vivante', ++ libraries : libdrm_vivante, ++ subdirs : ['.', 'libdrm'], ++ version : meson.project_version(), ++ requires_private : 'libdrm', ++ description : 'Userspace interface to Vivante kernel DRM services', ++) ++ ++ext_libdrm_vivante = declare_dependency( ++ link_with : [libdrm, libdrm_vivante], ++ include_directories : [inc_drm, include_directories('.')], ++) +-- +2.20.1 + diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch deleted file mode 100644 index 4708bf1e..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch +++ /dev/null @@ -1,24 +0,0 @@ -drmdevice.c: define _GNU_SOURCE - -Include config.h to fix this build error with uclibc: - -libdrm-2.4.66/tests/drmdevice.c: In function 'main': -libdrm-2.4.66/tests/drmdevice.c:96:60: error: -'O_CLOEXEC' undeclared (first use in this function) -fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0); - -Upstream-Status: Pending - -Signed-off-by: Maxin B. John ---- -diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c ---- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200 -+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200 -@@ -21,6 +21,7 @@ - * - */ - -+#include - #include - #include - #include diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/installtests.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/installtests.patch deleted file mode 100644 index ec1fb023..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm/installtests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Tue, 21 Feb 2017 14:37:52 +0200 -Subject: [PATCH] tests: also install test apps - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Yu Ke -Signed-off-by: Jussi Kukkonen ---- - tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0355a92..b4882cd 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -45,3 +45,4 @@ TESTS = \ - check_PROGRAMS = \ - $(TESTS) \ - drmdevice -+bin_PROGRAMS = $(check_PROGRAMS) --- -2.1.4 - diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/musl-ioctl.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/musl-ioctl.patch new file mode 100644 index 00000000..e3d6c5b8 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/drm/libdrm/musl-ioctl.patch @@ -0,0 +1,35 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton + +From 46c0fd6c827a8cb4d04e067bf04fab579ac4712e Mon Sep 17 00:00:00 2001 +From: Ross Burton +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/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch deleted file mode 100644 index 1160cd10..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch +++ /dev/null @@ -1,35 +0,0 @@ -Add ARM support into xf86arm.h. This provides support for Xorg interface. -Without this the vivante samples will hang during close requiring a reboot - -Upstream-Status: Pending - -Signed-off-by: Lauren Post -Signed-off-by: Evan Kotara - -diff --git a/xf86drm.h b/xf86drm.h ---- a/xf86drm.h -+++ b/xf86drm.h -@@ -461,6 +461,23 @@ do { register unsigned int __old __asm(" - : "cr0", "memory"); \ - } while (0) - -+#elif defined(__arm__) -+ #undef DRM_DEV_MODE -+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -+ -+ #define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ __asm__ __volatile__ ( \ -+ "1: ldrex %0, [%1]\n" \ -+ " teq %0, %2\n" \ -+ " ite eq\n" \ -+ " strexeq %0, %3, [%1]\n" \ -+ " movne %0, #1\n" \ -+ : "=&r" (__ret) \ -+ : "r" (lock), "r" (old), "r" (new) \ -+ : "cc","memory"); \ -+ } while (0) -+ - #endif /* architecture */ - #endif /* __GNUC__ >= 2 */ - diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch deleted file mode 100644 index 1160cd10..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch +++ /dev/null @@ -1,35 +0,0 @@ -Add ARM support into xf86arm.h. This provides support for Xorg interface. -Without this the vivante samples will hang during close requiring a reboot - -Upstream-Status: Pending - -Signed-off-by: Lauren Post -Signed-off-by: Evan Kotara - -diff --git a/xf86drm.h b/xf86drm.h ---- a/xf86drm.h -+++ b/xf86drm.h -@@ -461,6 +461,23 @@ do { register unsigned int __old __asm(" - : "cr0", "memory"); \ - } while (0) - -+#elif defined(__arm__) -+ #undef DRM_DEV_MODE -+ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -+ -+ #define DRM_CAS(lock,old,new,__ret) \ -+ do { \ -+ __asm__ __volatile__ ( \ -+ "1: ldrex %0, [%1]\n" \ -+ " teq %0, %2\n" \ -+ " ite eq\n" \ -+ " strexeq %0, %3, [%1]\n" \ -+ " movne %0, #1\n" \ -+ : "=&r" (__ret) \ -+ : "r" (lock), "r" (old), "r" (new) \ -+ : "cc","memory"); \ -+ } while (0) -+ - #endif /* architecture */ - #endif /* __GNUC__ >= 2 */ - diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm_%.bbappend b/bsp/meta-freescale/recipes-graphics/drm/libdrm_%.bbappend deleted file mode 100644 index 97b6df92..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_imxgpu2d = " file://drm-update-arm.patch" - -PACKAGE_ARCH_imxgpu2d = "${MACHINE_SOCARCH}" diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.91.imx.bb b/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.91.imx.bb deleted file mode 100644 index 31f24d32..00000000 --- a/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.91.imx.bb +++ /dev/null @@ -1,65 +0,0 @@ -SUMMARY = "Userspace interface to the kernel DRM services" -DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ -stands for \"Direct Rendering Manager\", which is the kernel portion of the \ -\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ -accelerated OpenGL drivers." -HOMEPAGE = "http://dri.freedesktop.org" -SECTION = "x11/base" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" -PROVIDES = "drm" -DEPENDS = "libpthread-stubs libpciaccess" - -IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" -IMX_LIBDRM_BRANCH = "libdrm-imx-2.4.91" -SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \ - file://installtests.patch \ - file://fix_O_CLOEXEC_undeclared.patch \ - file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \ - " -SRC_URI_remove = "file://drm-update-arm.patch" -SRCREV = "e8e9cf8a66be11508c39f1cc31b8a5e7eb758875" -S = "${WORKDIR}/git" - -DEFAULT_PREFERENCE = "-1" - -inherit autotools pkgconfig manpages - -EXTRA_OECONF += "--disable-cairo-tests \ - --without-cunit \ - --enable-omap-experimental-api \ - --enable-etnaviv-experimental-api \ - --enable-install-test-programs \ - --disable-valgrind \ - " -PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" - -ALLOW_EMPTY_${PN}-drivers = "1" -PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ - ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ - ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -FILES_${PN}-tests = "${bindir}/*" -FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" -FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" -FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" -FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" -FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" -FILES_${PN}-kms = "${libdir}/libkms*.so.*" -FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" -FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" -FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" - -EXTRA_OECONF_append_imxgpu = " --enable-vivante-experimental-api" - -PACKAGES_prepend_imxgpu = "${PN}-vivante " - -RRECOMMENDS_${PN}-drivers_append_imxgpu = " ${PN}-vivante" - -FILES_${PN}-vivante = "${libdir}/libdrm_vivante.so.*" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.99.imx.bb b/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.99.imx.bb new file mode 100644 index 00000000..dc2aa8a9 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/drm/libdrm_2.4.99.imx.bb @@ -0,0 +1,73 @@ +SUMMARY = "Userspace interface to the kernel DRM services" +DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ +stands for \"Direct Rendering Manager\", which is the kernel portion of the \ +\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ +accelerated OpenGL drivers." +HOMEPAGE = "http://dri.freedesktop.org" +SECTION = "x11/base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" +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" +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" +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE = "-1" + +inherit meson pkgconfig manpages + +PACKAGECONFIG ??= "libkms intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv install-test-programs" +PACKAGECONFIG[libkms] = "-Dlibkms=true,-Dlibkms=false" +PACKAGECONFIG[intel] = "-Dintel=true,-Dintel=false,libpciaccess" +PACKAGECONFIG[radeon] = "-Dradeon=true,-Dradeon=false" +PACKAGECONFIG[amdgpu] = "-Damdgpu=true,-Damdgpu=false" +PACKAGECONFIG[nouveau] = "-Dnouveau=true,-Dnouveau=false" +PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=true,-Dvmwgfx=false" +PACKAGECONFIG[omap] = "-Domap=true,-Domap=false" +PACKAGECONFIG[exynos] = "-Dexynos=true,-Dexynos=false" +PACKAGECONFIG[freedreno] = "-Dfreedreno=true,-Dfreedreno=false" +PACKAGECONFIG[tegra] = "-Dtegra=true,-Dtegra=false" +PACKAGECONFIG[vc4] = "-Dvc4=true,-Dvc4=false" +PACKAGECONFIG[etnaviv] = "-Detnaviv=true,-Detnaviv=false" +PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false" +PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind" +PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false" +PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false" +PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev" +PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native" + +ALLOW_EMPTY_${PN}-drivers = "1" +PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ + ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \ + ${PN}-etnaviv" + +RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ + ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ + ${PN}-etnaviv" + +FILES_${PN}-tests = "${bindir}/*" +FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" +FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" +FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" +FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" +FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" +FILES_${PN}-kms = "${libdir}/libkms*.so.*" +FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" +FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids" +FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES_prepend_imxgpu = "${PN}-vivante " +RRECOMMENDS_${PN}-drivers_append_imxgpu = " ${PN}-vivante" +FILES_${PN}-vivante = "${libdir}/libdrm_vivante.so.*" +PACKAGECONFIG_append_imxgpu = " vivante" +PACKAGECONFIG[vivante] = "-Dvivante=true,-Dvivante=false" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch b/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch deleted file mode 100644 index 7c315c83..00000000 --- a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb/0001-Replace-vendor-specific-header-with-generic.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fdb3add3dfd53c539c3c79e4fbf9eedb1dc1e440 Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj -Date: Fri, 26 Feb 2016 11:29:54 -0600 -Subject: [PATCH] Use generic eglplatform.h rather than vendor specifc - (eglvivante.h) EGL headers. - -Upstream-Status: Pending - ---- - wscript | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/wscript b/wscript -index 195e247..d08bc29 100644 ---- a/wscript -+++ b/wscript -@@ -219,7 +219,7 @@ def check_vivante_egl(conf, egl_extra_defines): - extra_defines += egl_extra_defines - extra_cxxflags = map(lambda x: conf.env['DEFINES_ST'] % x, extra_defines) - conf.env['CXXFLAGS'] += extra_cxxflags -- conf.check_cxx(mandatory = 1, header_name = 'EGL/eglvivante.h', uselib_store = 'EGL') -+ conf.check_cxx(mandatory = 1, header_name = 'EGL/eglplatform.h', uselib_store = 'EGL') - conf.check_cxx(mandatory = 1, header_name = 'EGL/egl.h', uselib_store = 'EGL') - conf.env['CXXFLAGS_EGL'] += extra_cxxflags - conf.env['CXXFLAGS'] = old_cxxflags --- -2.7.0 - diff --git a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend b/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend deleted file mode 100644 index f130d23c..00000000 --- a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_imxgpu3d = " \ - file://0001-Replace-vendor-specific-header-with-generic.patch \ -" - -# Set i.MX specific dependencies and device type -EGLINFO_DEVICE_imxgpu3d = "imx6" diff --git a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend b/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend deleted file mode 100644 index 7aa0e50f..00000000 --- a/bsp/meta-freescale/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Set i.MX specific dependencies and device type -EGLINFO_DEVICE_imxgpu3d = "imx6" diff --git a/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb b/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb deleted file mode 100644 index 1e204b00..00000000 --- a/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.4.8.bb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -RDEPENDS_${PN} = "libgal-imx libdrm" - -PROVIDES += "virtual/libg2d" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" - -S="${WORKDIR}/${PN}-${PV}" - -inherit fsl-eula-unpack - -SRC_URI[md5sum] = "5a14e335d329dbc33edb89f675821d5a" -SRC_URI[sha256sum] = "e8f27247b068f4f31e235e98f0eacf11eb0bb25cc6b710e5ca7f8f96d323004f" - -do_install () { - - install -d ${D}${libdir} - install -d ${D}${includedir} - - cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -INSANE_SKIP_${PN} += "ldflags" - -FILES_${PN} = "${libdir}/libg2d* /opt" -FILES_${PN}-dev = "${libdir}/libg2d${SOLIBSDEV} ${includedir}" - -COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb b/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb new file mode 100644 index 00000000..4465ee7e --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb @@ -0,0 +1,30 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2019 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d" +PROVIDES += "virtual/libg2d" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" +SRC_URI[md5sum] = "57a0a0a7d20e4ea1a0d2dcd162abfa79" +SRC_URI[sha256sum] = "f8bc83e23263e179bd66492dafaeb104a3967337d76325d0ec97993ae846fb13" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp -r ${S}/g2d/usr/lib/*.so* ${D}${libdir} + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} + cp -r ${S}/gpu-demos/opt ${D} +} + +FILES_${PN} = "${libdir}/libg2d* /opt" +FILES_${PN}-dev = "${libdir}/libg2d${SOLIBSDEV} ${includedir}" +INSANE_SKIP_${PN} += "ldflags" + +RDEPENDS_${PN} = "libgal-imx libdrm" + +COMPATIBLE_MACHINE = "(imxdpu)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch new file mode 100644 index 00000000..27382c34 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch @@ -0,0 +1,10004 @@ +From bfa1b7c7e675f198f4573325f1252e91f80f0b4d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Piotr=20Podsiad=C5=82y?= +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 +--- + 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 MappingKey;' +- print 'static std::map _maps;' +- print ++ print('// Swizzling mapping for lock addresses') ++ print('typedef std::pair MappingKey;') ++ print('static std::map _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 ' +- print +- print r'#include ' +- print +- print r'#include "d3dretrace.hpp"' +- print ++ print(r'#include ') ++ print() ++ print(r'#include ') ++ 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 d3d9Dumper;''' +- print '''static d3dretrace::D3DDumper d3d9scDumper;''' +- print ++ print() ++ print('''static d3dretrace::D3DDumper d3d9Dumper;''') ++ print('''static d3dretrace::D3DDumper 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 d3d8Dumper;''' +- print ++ print() ++ print('''static d3dretrace::D3DDumper 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 _maps;' +- print ++ print('// Swizzling mapping for lock addresses') ++ print('static std::map _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 ' +- print +- print r'#include ' +- print +- print r'#include "d3dretrace.hpp"' +- print ++ print(r'#include ') ++ print() ++ print(r'#include ') ++ 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 d3d7Dumper;''' +- print ++ print() ++ print('''static d3dretrace::D3DDumper 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 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 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::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::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 ' +- print +- print r'#include ' +- 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 dxgiDumper;''' +- print '''static d3dretrace::D3DDumper d3d10Dumper;''' +- print '''static d3dretrace::D3DDumper d3d11Dumper;''' +- print ++ print(r'#define INITGUID') ++ print() ++ print(r'#include ') ++ print() ++ print(r'#include ') ++ 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 dxgiDumper;''') ++ print('''static d3dretrace::D3DDumper d3d10Dumper;''') ++ print('''static d3dretrace::D3DDumper 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(%s)) {' % switchExpr ++ print(' switch (static_cast(%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(max_samples)) {' +- print ' samples = static_cast(max_samples);' +- print ' }' ++ print(' GLint max_samples = 0;') ++ print(' glGetIntegerv(GL_MAX_RASTER_SAMPLES_EXT, &max_samples);') ++ print(' if (samples > static_cast(max_samples)) {') ++ print(' samples = static_cast(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 + + #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 ' +- print '#include ' +- 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 ') ++ print('#include ') ++ 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(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(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("") ++ ++ 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 ' +- print '#include ' +- 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 ') ++ print('#include ') ++ 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 >::iterator it = _MappedData.find(Level);' +- print ' if (it != _MappedData.end()) {' ++ print(' std::map >::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(pData), DataSize);' +- print r' } else {' ++ print(r' if (%s == WKPDID_D3DDebugObjectName) {' % iid) ++ print(r' trace::localWriter.writeString(static_cast(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 ' +- print '#include ' +- 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 _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 ') ++ print('#include ') ++ 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 _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 ' +- print +- print '#include "gltrace.hpp"' +- print ++ print('#include ') ++ 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' +- print 'static inline bool' +- print 'is_symbolic_param(T param) {' +- print ' return static_cast(static_cast(param)) == param;' +- print '}' +- print ++ print('template') ++ print('static inline bool') ++ print('is_symbolic_param(T param) {') ++ print(' return static_cast(static_cast(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 ' +- print '#include ' +- 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 ') ++ print('#include ') ++ 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 // alloca' +- print '# ifndef alloca' +- print '# define alloca _alloca' +- print '# endif' +- print '#else' +- print '# include // alloca' +- print '#endif' +- print +- print +- print 'static std::map g_WrappedObjects;' ++ print('#ifdef _WIN32') ++ print('# include // alloca') ++ print('# ifndef alloca') ++ print('# define alloca _alloca') ++ print('# endif') ++ print('#else') ++ print('# include // alloca') ++ print('#endif') ++ print() ++ print() ++ print('static std::map 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::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::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(*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(*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(%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 ' +- print '#include ' +- 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 ') ++ print('#include ') ++ print() ++ print('#include ') ++ 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/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch new file mode 100644 index 00000000..25141602 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch @@ -0,0 +1,169 @@ +From a8791e3dca61500a382be84dc96973639b8bd182 Mon Sep 17 00:00:00 2001 +From: Jose Fonseca +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 +--- + 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/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch new file mode 100644 index 00000000..e30273d5 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch @@ -0,0 +1,276 @@ +From 8ba82a1ef77e60bd614cca1e583e1a0c25b4f281 Mon Sep 17 00:00:00 2001 +From: Jose Fonseca +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 +--- + 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/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch new file mode 100644 index 00000000..8974e5db --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch @@ -0,0 +1,62 @@ +From aa8e341e73c288b77a5187e3676a2bbb6588b705 Mon Sep 17 00:00:00 2001 +From: Jose Fonseca +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 +--- + 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/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch new file mode 100644 index 00000000..6bff7e92 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch @@ -0,0 +1,60 @@ +From 8b3afcaeebdd87962f2f3fef36973090621d116b Mon Sep 17 00:00:00 2001 +From: Max Krummenacher +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 +--- + 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/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb deleted file mode 100644 index a5a9cdfe..00000000 --- a/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2018 (C) O.S. Systems Software LTDA. -SUMMARY = "Samples for OpenGL ES" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50" -DEPENDS = "imx-gpu-viv zlib libpng procps" - -SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_7.1" -SRCREV = "438c29f7b43c8dd82275f2bac00075f77b9e9699" - -S = "${WORKDIR}/git" - -inherit cmake lib_package pkgconfig perlnative pythonnative - -PACKAGECONFIG ??= "" -PACKAGECONFIG_append = \ - "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', \ - '', d), d)}" -PACKAGECONFIG_append_imxgpu2d = " vivante" -# For 8M, which has 3D but no 2D, eglretrace is not available -# on Wayland except through X11 and waffle. -PACKAGECONFIG_IMXGPU3D = \ - "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', ' waffle x11 x11-egl', '', d)}" -PACKAGECONFIG_IMXGPU3D_imxgpu2d = "" -PACKAGECONFIG_append_imxgpu3d = "${PACKAGECONFIG_IMXGPU3D}" - -PACKAGECONFIG[multiarch] = "-DENABLE_MULTIARCH=ON,-DENABLE_MULTIARCH=OFF" -PACKAGECONFIG[waffle] = "-DENABLE_WAFFLE=ON,-DENABLE_WAFFLE=OFF,waffle" -PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF" -PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=ON,-Dwaffle_has_x11_egl=OFF" -PACKAGECONFIG[vivante] = "-DENABLE_VIVANTE=ON,-DENABLE_VIVANTE=OFF,virtual/libg2d" - -FILES_${PN} = "${bindir} ${libdir}" -FILES_${PN}-dbg += "${libdir}/*/*/.debug" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb new file mode 100644 index 00000000..9461a34d --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb @@ -0,0 +1,36 @@ +# Copyright 2018 (C) O.S. Systems Software LTDA. +SUMMARY = "Samples for OpenGL ES" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50" +DEPENDS = "imx-gpu-viv zlib libpng procps" + +SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_9.0" +SRCREV = "8636fa989d8e914a7986916b058878761a981a6f" + +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[egl] = "-DENABLE_EGL=ON,-DENABLE_EGL=OFF,virtual/egl" +PACKAGECONFIG[gui] = "-DENABLE_GUI=ON,-DENABLE_GUI=OFF" +PACKAGECONFIG[multiarch] = "-DENABLE_MULTIARCH=ON,-DENABLE_MULTIARCH=OFF" +PACKAGECONFIG[waffle] = "-DENABLE_WAFFLE=ON,-DENABLE_WAFFLE=OFF,waffle" +PACKAGECONFIG[x11] = "-DENABLE_X11=ON,-DENABLE_X11=OFF" +PACKAGECONFIG[vivante] = "-DENABLE_VIVANTE=ON,-DENABLE_VIVANTE=OFF,virtual/libg2d" + +SOLIBS = ".so" +FILES_SOLIBSDEV = "" +FILES_${PN} += " \ + ${libdir}/apitrace/scripts/* \ + ${libdir}/apitrace/wrappers/* \ +" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb deleted file mode 100644 index ab712377..00000000 --- a/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p1.8.bb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and no DPU" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -DEPENDS += "libgal-imx" -PROVIDES += "virtual/libg2d" - -# FIXME: arm packages are mis-labeled with aarch32 suffix -FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" -FSLBIN_NAME_arm = "${PN}-${PV}-aarch32" - -SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" -SRC_URI[arm.md5sum] = "ab7e43c997d3a84764fc3cc72d3b397c" -SRC_URI[arm.sha256sum] = "88b3af3dd109e7c9c457d19441dbb668e7c395d29340d724db3cc42dc04ae87b" -SRC_URI[aarch64.md5sum] = "287f2de4bd407b2eb484d332ae6de157" -SRC_URI[aarch64.sha256sum] = "77f191135f2be6052eabc8cca50b4ea7b5eaec015488cc108fb3f9656a3a1367" - -S = "${WORKDIR}/${FSLBIN_NAME}" - -inherit fsl-eula-unpack - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir} - cp ${S}/g2d/usr/lib/*.so* ${D}${libdir} - cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} - cp -r ${S}/gpu-demos/opt ${D} -} - -FILES_${PN} = "${libdir}/libg2d* /opt" -FILES_${PN}-dev = "${includedir}" -INSANE_SKIP_${PN} = "ldflags" - -RDEPENDS_${PN} = "libgal-imx" - -COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb new file mode 100644 index 00000000..8de2c35f --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb @@ -0,0 +1,39 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and no DPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d" + +DEPENDS += "libgal-imx" +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" + +S = "${WORKDIR}/${FSLBIN_NAME}" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D}${libdir} + install -d ${D}${includedir} + cp ${S}/g2d/usr/lib/*.so* ${D}${libdir} + cp -Pr ${S}/g2d/usr/include/* ${D}${includedir} + cp -r ${S}/gpu-demos/opt ${D} +} + +FILES_${PN} = "${libdir}/libg2d* /opt" +FILES_${PN}-dev = "${includedir}" +INSANE_SKIP_${PN} = "ldflags" + +RDEPENDS_${PN} = "libgal-imx" + +COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 45f257e6..5c25eec6 100644 --- a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc @@ -1,12 +1,12 @@ # Copyright (C) 2012-2016 Freescale Semiconductor # Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP +# Copyright 2017-2020 NXP # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "GPU driver and apps for i.MX" SECTION = "libs" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d" DEPENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -18,6 +18,7 @@ DEPENDS += " \ '', d)} \ " DEPENDS_append_imxdrm = " libdrm wayland" +DEPENDS_append_mx8 = " patchelf-native" # imx-gpu-viv does not provide everything it needs to for virtual/libgl # on x11 backend or on Wayland backend with XWayland support. @@ -26,16 +27,18 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" EXTRA_PROVIDES = "" EXTRA_PROVIDES_append_imxgpu3d = " \ - virtual/libgl \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'virtual/libgl', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libgl', \ + '', d), d)} \ virtual/libgles1 \ virtual/libgles2 \ " EXTRA_PROVIDES_append_mx8 = " \ virtual/libgbm \ " -EXTRA_PROVIDES_append_mx8qm = " \ - virtual/libopenvx \ -" +PROVIDES_OPENVX = "" +PROVIDES_OPENVX_mx8 = "virtual/libopenvx" +PROVIDES_OPENVX_mx8mm = "" PROVIDES += " \ imx-gpu-viv \ libgal-imx \ @@ -44,6 +47,7 @@ PROVIDES += " \ virtual/libopenvg \ virtual/opencl-headers \ virtual/opencl-icd \ + ${PROVIDES_OPENVX} \ ${EXTRA_PROVIDES} \ " @@ -51,11 +55,11 @@ RPROVIDES_${PN}_imxgpu3d += "imx-gpu-viv" PE = "1" -inherit fsl-eula-unpack distro_features_check +inherit fsl-eula-unpack features_check REQUIRED_DISTRO_FEATURES_mx8 = "wayland" -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below IMX_PACKAGES_GBM = "" @@ -80,9 +84,10 @@ PACKAGES =+ "libclc-imx libclc-imx-dev \ imx-gpu-viv-demos \ libvulkan-imx libvulkan-imx-dev \ libopenvx-imx libopenvx-imx-dev \ + libnn-imx libnn-imx-dev \ " python __anonymous () { - has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT', True) or '0') + has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT') or '0') if has_vivante_kernel_driver_support != '1': raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.') } @@ -93,6 +98,7 @@ USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" # Inhibit warnings about files being stripped. INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INSANE_SKIP_${BPN} += "already-stripped" # FIXME: The provided binary doesn't provide soname. If in future BSP # release the libraries are fixed, we can drop this hack. @@ -102,7 +108,7 @@ SOLIBS = "${SOLIBSDEV}" python __anonymous() { # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have # the source we cannot fix it. Disable the insane check for now. - packages = d.getVar('PACKAGES', True).split() + packages = d.getVar('PACKAGES').split() for p in packages: d.appendVar("INSANE_SKIP_%s" % p, " ldflags") @@ -139,8 +145,9 @@ HAS_GBM = "false" HAS_GBM_mx8 = "true" GLES3_HEADER_REMOVALS = "gl31.h gl32.h" -GLES3_HEADER_REMOVALS_mx8mq = "gl32.h" -GLES3_HEADER_REMOVALS_mx8qxp = "gl32.h" +GLES3_HEADER_REMOVALS_mx8m = "gl32.h" +GLES3_HEADER_REMOVALS_mx8mm = "gl31.h gl32.h" +GLES3_HEADER_REMOVALS_mx8qxp = "" GLES3_HEADER_REMOVALS_mx8qm = "" do_install () { @@ -153,7 +160,7 @@ do_install () { cp -r ${S}/gpu-demos/opt ${D} cp -r ${S}/gpu-tools/gmem-info/usr/bin/* ${D}${bindir} - # Use vulkan header from vulkan recipe to support vkmark + # Use vulkan header from vulkan-headers recipe to support vkmark rm -rf ${D}${includedir}/vulkan/ install -d ${D}${libdir}/pkgconfig @@ -207,10 +214,12 @@ do_install () { # We'll only have one backend here so we rename it to generic name # and avoid rework in other packages, when possible - mv ${D}${libdir}/libGL.so.1.2 ${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 + 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 @@ -233,12 +242,10 @@ do_install () { ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so if [ "${IS_MX8}" = "1" ]; then - # Install the vulkan driver in a sub-folder. When installed in the same - # folder as the vulkan loader layer library, an incorrect linkage is - # created from libvulkan.so.1 to our library instead of the loader - # layer library. - install -d ${D}${libdir}/vulkan - mv ${D}${libdir}/libvulkan-${backend}.so ${D}${libdir}/vulkan/libvulkan_VSI.so + # 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 fi for header in ${GLES3_HEADER_REMOVALS}; do rm -f ${D}${includedir}/GLES3/${header} @@ -283,10 +290,6 @@ do_install () { ALLOW_EMPTY_${PN} = "1" -# FIXME: Remove the following lines after adding libopenvx package -INSANE_SKIP_imx-gpu-viv-dev += "dev-elf" -INSANE_SKIP_libclc-imx += "dev-deps" - FILES_libclc-imx = "${libdir}/libCLC${SOLIBS}" FILES_libclc-imx-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}" @@ -298,21 +301,26 @@ 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" RPROVIDES_libgal-imx += "libgal-imx" INSANE_SKIP_libgal-imx += "build-deps" FILES_libvsc-imx = "${libdir}/libVSC${SOLIBS}" -FILES_libgbm-imx_mx8 = "${libdir}/libgbm${SOLIBS} ${libdir}/gbm_viv${SOLIBS}" +FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${SOLIBS}" FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}" RDEPENDS_libgbm-imx_append_mx8 = " libdrm" -FILES_libvulkan-imx = "${libdir}/vulkan/libvulkan_VSI${SOLIBS}" -FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/vulkan/libvulkan_VSI${SOLIBSDEV}" -INSANE_SKIP_libvulkan-imx += "dev-deps dev-so" +FILES_libvulkan-imx = "${libdir}/libvulkan_VSI${SOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" +FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}" -FILES_libopenvx-imx = "${libdir}/libOpenVX${SOLIBS} ${libdir}/libOpenVXC${SOLIBS} ${libdir}/libOpenVXU${SOLIBS}" -FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libopenVX${SOLIBSDEV}" +FILES_libopenvx-imx = " \ + ${libdir}/libOpenVX*${SOLIBS} \ + ${libdir}/libOvx*${SOLIBS} \ + ${libdir}/libovx*${SOLIBS} \ + " +FILES_libopenvx-imx-dev = "${includedir}/VX ${includedir}/OVXLIB" +RDEPENDS_libopenvx-imx = "libnn-imx" FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}" FILES_libgl-imx-dev = "${libdir}/libGL${SOLIBSDEV} ${includedir}/GL" @@ -340,6 +348,7 @@ FILES_libglslc-imx-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}" FILES_libopencl-imx = "${libdir}/libOpenCL${SOLIBS} \ ${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" @@ -369,4 +378,7 @@ FILES_imx-gpu-viv-tools = "${bindir}/gmem_info" FILES_imx-gpu-viv-demos = "/opt" INSANE_SKIP_imx-gpu-viv-demos += "rpaths dev-deps" +FILES_libnn-imx = "${libdir}/libNN*${SOLIBS} ${libdir}/libnn*${SOLIBS} ${libdir}/libneuralnetworks${SOLIBS}" +FILES_libnn-imx-dev = "${includedir}/nnrt" + # COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx8)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb deleted file mode 100644 index 3564aab0..00000000 --- a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch32.bb +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc -SRC_URI[md5sum] = "ef9e0b5fcb140c72b63dcf8b8da0be6b" -SRC_URI[sha256sum] = "7c31d1c7b45309ff7ca667b4d69b7c3b5fa320dcdcd90f2eb895f66f826f422b" - -PACKAGE_FP_TYPE = "hardfp" - -COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb deleted file mode 100644 index 004cdcb2..00000000 --- a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p1.8-aarch64.bb +++ /dev/null @@ -1,6 +0,0 @@ -require imx-gpu-viv-6.inc - -SRC_URI[md5sum] = "89cd1ad71128bc1b200c18a5a8db95b0" -SRC_URI[sha256sum] = "bf27b753b45777e90a158819d80d91f5226b34d71dc4ec4eea40f2c10c46159a" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb new file mode 100644 index 00000000..d1b82f6e --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb @@ -0,0 +1,10 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# 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 + +SRC_URI[md5sum] = "4544b0c874914dfbc47ec93855bd04a7" +SRC_URI[sha256sum] = "bae4099119259a303a265eb02d9f0d63348bbf3f8637de6cb892e209171b4c97" + +COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb new file mode 100644 index 00000000..b46c6115 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb @@ -0,0 +1,6 @@ +require imx-gpu-viv-6.inc + +SRC_URI[md5sum] = "f4005a4a2dba6a79d8f25547612aa3b9" +SRC_URI[sha256sum] = "148e1b1a9e382a8159d5763dd2b08caad008eb931f3d925ac901c2438440d508" + +COMPATIBLE_MACHINE = "(mx8)" diff --git a/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch b/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch deleted file mode 100644 index 180a9d84..00000000 --- a/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj -Date: Tue, 7 Apr 2015 17:58:45 -0500 -Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling - -Upstream Status: Pending - -Signed-off-by: Prabhu Sundararaj ---- - src/egl/eglut/eglut_wayland.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c -index 968b33f..5664d35 100644 ---- a/src/egl/eglut/eglut_wayland.c -+++ b/src/egl/eglut/eglut_wayland.c -@@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time) - - if (win->display_cb) - win->display_cb(); -- eglSwapBuffers(_eglut->dpy, win->surface); -+ /*eglSwapBuffers(_eglut->dpy, win->surface);*/ - - if (callback) - wl_callback_destroy(callback); --- -2.3.5 - diff --git a/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos_%.bbappend b/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos_%.bbappend index 94db4157..301f1b59 100644 --- a/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/bsp/meta-freescale/recipes-graphics/mesa/mesa-demos_%.bbappend @@ -2,21 +2,25 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI_append_imxgpu = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ file://fix-clear-build-break.patch \ - file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \ file://Add-OpenVG-demos-to-support-wayland.patch" -PACKAGECONFIG_IMX_TO_REMOVE_GLES = "" -PACKAGECONFIG_IMX_TO_REMOVE_GLES_imxgpu2d = "gles1 gles2" -PACKAGECONFIG_IMX_TO_REMOVE_GLES_imxgpu3d = "" -PACKAGECONFIG_IMX_TO_REMOVE = "${PACKAGECONFIG_IMX_TO_REMOVE_GLES}" -PACKAGECONFIG_IMX_TO_REMOVE_append_imxgpu = " \ +PACKAGECONFIG_REMOVE_IF_2D_ONLY = "" +PACKAGECONFIG_REMOVE_IF_2D_ONLY_imxgpu2d = "gles1 gles2" +PACKAGECONFIG_REMOVE_IF_2D_ONLY_imxgpu3d = "" +PACKAGECONFIG_REMOVE_IF_GPU = "" +PACKAGECONFIG_REMOVE_IF_GPU_imxgpu = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'glu x11', '', d)} \ " -PACKAGECONFIG_remove = "${PACKAGECONFIG_IMX_TO_REMOVE}" +PACKAGECONFIG_remove = " \ + ${PACKAGECONFIG_REMOVE_IF_2D_ONLY} \ + ${PACKAGECONFIG_REMOVE_IF_GPU} \ +" -PACKAGECONFIG_IMX_TO_APPEND = "" -PACKAGECONFIG_IMX_TO_APPEND_append_imxgpu = " \ +PACKAGECONFIG_APPEND_IF_GPU = "" +PACKAGECONFIG_APPEND_IF_GPU_imxgpu = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glut', '', d)} \ " -PACKAGECONFIG_append = "${PACKAGECONFIG_IMX_TO_APPEND}" +PACKAGECONFIG_append = " \ + ${PACKAGECONFIG_APPEND_IF_GPU} \ +" diff --git a/bsp/meta-freescale/recipes-graphics/mesa/mesa-gl_%.bbappend b/bsp/meta-freescale/recipes-graphics/mesa/mesa-gl_%.bbappend index 465c8932..ca1c8f46 100644 --- a/bsp/meta-freescale/recipes-graphics/mesa/mesa-gl_%.bbappend +++ b/bsp/meta-freescale/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -1 +1 @@ -COMPATIBLE_MACHINE_imxgpu2d = "(-)" +COMPATIBLE_MACHINE_imxgpu = "(-)" diff --git a/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend index 5ead6251..8d429abf 100644 --- a/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend @@ -6,7 +6,7 @@ PACKAGECONFIG_remove_imxgpu3d = "gles" # FIXME: mesa should support 'x11-no-tls' option python () { - overrides = d.getVar("OVERRIDES", True).split(":") + overrides = d.getVar("OVERRIDES").split(":") if "imxgpu2d" not in overrides: return @@ -14,9 +14,20 @@ python () { d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx")) } -# Enable Etnaviv support -PACKAGECONFIG_append_use-mainline-bsp = " gallium" -GALLIUMDRIVERS_append_use-mainline-bsp = ",etnaviv,imx" +# 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)}" BACKEND = \ "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -27,6 +38,7 @@ BACKEND = \ do_install_append_imxgpu3d () { rm -f ${D}${libdir}/libGL.* \ ${D}${includedir}/GL/gl.h \ + ${D}${includedir}/GL/glcorearb.h \ ${D}${includedir}/GL/glext.h \ ${D}${includedir}/GL/glx.h \ ${D}${includedir}/GL/glxext.h diff --git a/bsp/meta-freescale/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch b/bsp/meta-freescale/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch new file mode 100644 index 00000000..b5225693 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch @@ -0,0 +1,47 @@ +From 87fc7761cff5931a58984c7f7e78f421a0660e0e Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Apr 2020 13:40:04 -0500 +Subject: [PATCH] meson: Add missing wayland dependency on EGL + +The build was not finding egl.pc due to this +missing dependency. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein + +--- + meson.build | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index ca8b127..efb51f4 100644 +--- a/meson.build ++++ b/meson.build +@@ -65,6 +65,7 @@ dep_gl = _dep_null + dep_egl = _dep_null + dep_wayland_client = _dep_null + dep_wayland_egl = _dep_null ++dep_wayland_wayland_egl = _dep_null + dep_x11_xcb = _dep_null + dep_gbm = _dep_null + dep_udev = _dep_null +@@ -90,7 +91,8 @@ else + dep_wayland_client = dependency( + 'wayland-client', version : '>= 1.10', required : get_option('wayland'), + ) +- dep_wayland_egl = dependency( ++ dep_wayland_egl = dependency('egl', required : get_option('wayland')) ++ dep_wayland_wayland_egl = dependency( + 'wayland-egl', version : '>= 9.1', required : get_option('wayland'), + ) + dep_x11_xcb = dependency('x11-xcb', required : get_option('glx')) +@@ -101,7 +103,7 @@ else + dep_udev = dependency('libudev', required : get_option('gbm')) + + build_x11_egl = dep_egl.found() +- build_wayland = dep_wayland_client.found() and dep_wayland_egl.found() ++ build_wayland = dep_wayland_client.found() and dep_wayland_egl.found() and dep_wayland_wayland_egl.found() + build_glx = dep_gl.found() + build_gbm = dep_gbm.found() and dep_udev.found() + build_surfaceless = dep_egl.found() diff --git a/bsp/meta-freescale/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch b/bsp/meta-freescale/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch new file mode 100644 index 00000000..9d5003e2 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch @@ -0,0 +1,44 @@ +From 12ac4372cc6a66e83b61f8510bdaa4f11c72113d Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Apr 2020 14:08:36 -0500 +Subject: [PATCH] meson: Separate surfaceless option from x11 + +Allow surfaceless build separate from the x11 option. +Also require gbm for surfaceless build. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein + +--- + meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index efb51f4..0ee3ee5 100644 +--- a/meson.build ++++ b/meson.build +@@ -72,6 +72,7 @@ dep_udev = _dep_null + dep_cocoa = _dep_null + dep_core_foundation = _dep_null + dep_gl_headers = _dep_null ++dep_surfaceless = _dep_null + + # Get dependencies + if build_wgl +@@ -101,12 +102,14 @@ else + endif + dep_gbm = dependency('gbm', required : get_option('gbm')) + dep_udev = dependency('libudev', required : get_option('gbm')) ++ dep_surfaceless_egl = dependency('egl', required : get_option('surfaceless_egl')) ++ dep_surfaceless_gbm = dependency('gbm', required : get_option('surfaceless_egl')) + + build_x11_egl = dep_egl.found() + build_wayland = dep_wayland_client.found() and dep_wayland_egl.found() and dep_wayland_wayland_egl.found() + build_glx = dep_gl.found() + build_gbm = dep_gbm.found() and dep_udev.found() +- build_surfaceless = dep_egl.found() ++ build_surfaceless = dep_surfaceless_egl.found() and dep_surfaceless_gbm.found() + endif + + dep_bash = dependency('bash-completion', required : false) diff --git a/bsp/meta-freescale/recipes-graphics/waffle/waffle_%.bbappend b/bsp/meta-freescale/recipes-graphics/waffle/waffle_%.bbappend index 9a9de0ed..9d090bcf 100644 --- a/bsp/meta-freescale/recipes-graphics/waffle/waffle_%.bbappend +++ b/bsp/meta-freescale/recipes-graphics/waffle/waffle_%.bbappend @@ -1,7 +1,18 @@ -PACKAGECONFIG_X11 = "" -PACKAGECONFIG_X11_append_imxgpu3d = " x11-egl glx" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-meson-Add-missing-wayland-dependency-on-EGL.patch \ + file://0002-meson-Separate-surfaceless-option-from-x11.patch \ +" + +PACKAGECONFIG_IMXGPU_X11 = "" +PACKAGECONFIG_IMXGPU_X11_imxgpu3d = "x11-egl glx" +PACKAGECONFIG_IMXGPU_GBM = "gbm" +PACKAGECONFIG_IMXGPU_GBM_mx6 = "" +PACKAGECONFIG_IMXGPU_GBM_mx7 = "" PACKAGECONFIG_imxgpu = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'gbm', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_X11}', \ - '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', '${PACKAGECONFIG_IMXGPU_X11}', \ + '', d), d)} \ + ${PACKAGECONFIG_IMXGPU_GBM} \ " diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch deleted file mode 100644 index 10dc2198..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch +++ /dev/null @@ -1,195 +0,0 @@ -From b4be5e338be2301f83f4dfdc0cbb740f0a783464 Mon Sep 17 00:00:00 2001 -From: Haihua Hu -Date: Thu, 14 Jun 2018 13:54:08 +0800 -Subject: [PATCH 1/2] unstable: Add alpha-compositing protocol - -It's based on the Chromium Wayland protocol of the same name ([1]) -and Alexandros's modified version ([2])with a few changes -made to the blending_equation enumeration. - -Add one more blending_equation "src_alpha / src_alpha" - -[1] https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -[2] https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.html - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu ---- - Makefile.am | 1 + - unstable/alpha-compositing/README | 6 + - .../alpha-compositing-unstable-v1.xml | 136 +++++++++++++++++++++ - 3 files changed, 143 insertions(+) - create mode 100644 unstable/alpha-compositing/README - create mode 100644 unstable/alpha-compositing/alpha-compositing-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index 4b9a901..e6c44ec 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -17,6 +17,7 @@ unstable_protocols = \ - unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \ - unstable/xdg-output/xdg-output-unstable-v1.xml \ - unstable/input-timestamps/input-timestamps-unstable-v1.xml \ -+ unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/alpha-compositing/README b/unstable/alpha-compositing/README -new file mode 100644 -index 0000000..d874156 ---- /dev/null -+++ b/unstable/alpha-compositing/README -@@ -0,0 +1,6 @@ -+Alpha compositing protocol -+ -+Maintainers: -+David Reveman -+Alexandros Frantzis -+Jared Hu -diff --git a/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -new file mode 100644 -index 0000000..0844b3f ---- /dev/null -+++ b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -@@ -0,0 +1,136 @@ -+ -+ -+ -+ -+ Copyright 2016 The Chromium Authors. -+ Copyright 2017 Collabora Ltd -+ Copyright 2018 NXP -+ -+ 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 (including the next -+ paragraph) 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. -+ -+ -+ -+ This protocol specifies a set of interfaces used to control the alpha -+ compositing and blending of surface contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ -+ -+ -+ -+ The global interface exposing compositing and blending capabilities is -+ used to instantiate an interface extension for a wl_surface object. -+ This extended interface will then allow the client to specify the -+ blending equation and alpha value used for compositing the wl_surface. -+ -+ -+ -+ -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects, -+ blending objects included. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Instantiate an interface extension for the given wl_surface to -+ provide surface blending. If the given wl_surface already has -+ a blending object associated, the blending_exists protocol error -+ is raised. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ An additional interface to a wl_surface object, which allows the -+ client to specify the blending equation used for compositing and -+ an alpha value applied to the whole surface. -+ -+ When the blending object is created its blending equation is -+ 'none' and its alpha is 1.0, i.e., it's inactive by default. Clients -+ can activate it by setting the blending equation and alpha value. -+ -+ If the wl_surface associated with the blending object is destroyed, -+ the blending object becomes inert. -+ -+ If the blending object is destroyed, the blending state is removed -+ from the wl_surface. The change will be applied on the next -+ wl_surface.commit. -+ -+ -+ -+ -+ The associated wl_surface's blending state is removed. -+ The change is applied on the next wl_surface.commit. -+ -+ -+ -+ -+ -+ Blending equations that can be used when compositing a surface. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Set the blending equation for compositing the wl_surface. -+ -+ The blending equation state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ -+ -+ -+ -+ -+ -+ Set the alpha value applied to the whole surface for compositing. -+ -+ The alpha value state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ -+ -+ -+ -+ -+ -\ No newline at end of file --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch deleted file mode 100644 index 654e8b09..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 54e847c10a75ec7bd6fbb8fbdd700d085145cdce Mon Sep 17 00:00:00 2001 -From: Haihua Hu -Date: Tue, 26 Jun 2018 15:30:18 +0800 -Subject: [PATCH 2/2] unstable: Add hdr10-metadata protocol - -this protocol is used to support hdr10 video playback. -HDR10 metadata is passed to compositor via this interface - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu ---- - Makefile.am | 1 + - unstable/hdr10-metadata/README | 4 ++ - .../hdr10-metadata/hdr10-metadata-unstable-v1.xml | 84 ++++++++++++++++++++++ - 3 files changed, 89 insertions(+) - create mode 100644 unstable/hdr10-metadata/README - create mode 100644 unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index e6c44ec..b8206c7 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -18,6 +18,7 @@ unstable_protocols = \ - unstable/xdg-output/xdg-output-unstable-v1.xml \ - unstable/input-timestamps/input-timestamps-unstable-v1.xml \ - unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ -+ unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/hdr10-metadata/README b/unstable/hdr10-metadata/README -new file mode 100644 -index 0000000..58a82f8 ---- /dev/null -+++ b/unstable/hdr10-metadata/README -@@ -0,0 +1,4 @@ -+hdr10 metadata protocol -+ -+Maintainers: -+Jared Hu -diff --git a/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -new file mode 100644 -index 0000000..5b1bac4 ---- /dev/null -+++ b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -@@ -0,0 +1,84 @@ -+ -+ -+ -+ -+ Copyright 2018 NXP -+ -+ 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 (including the next -+ paragraph) 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. -+ -+ -+ -+ This protocol specifies a set of interfaces used to set and control -+ hdr10 metadata of video contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ -+ -+ -+ -+ The global interface exposing hdr10 metadata capabilities is -+ used to instantiate an interface extension for compositor. -+ This extended interface will then allow the client to pass hdr10 metadata -+ to compositor and send to display driver if supported. -+ -+ -+ -+ -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ client can use this interface pass hdr10 metadata to server. Server need -+ use the recived metadata to enable hdr mode. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb deleted file mode 100644 index 9e087432..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Collection of additional Wayland protocols" -DESCRIPTION = "Wayland protocols that add functionality not \ -available in the Wayland core protocol. Such protocols either add \ -completely new functionality, or extend the functionality of some other \ -protocol either in Wayland core, or some other protocol in \ -wayland-protocols." -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ - file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" - -ARCHIVE_NAME = "${BPN}-1.13" -SRC_URI = "https://wayland.freedesktop.org/releases/${ARCHIVE_NAME}.tar.xz \ - file://0001-unstable-Add-alpha-compositing-protocol.patch \ - file://0002-unstable-Add-hdr10-metadata-protocol.patch" -SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d" -SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38" -S = "${WORKDIR}/${ARCHIVE_NAME}" - -inherit autotools pkgconfig - -PACKAGES = "${PN}" -FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb new file mode 100644 index 00000000..7f15bdb3 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb @@ -0,0 +1,22 @@ +SUMMARY = "Collection of additional Wayland protocols" +DESCRIPTION = "Wayland protocols that add functionality not \ +available in the Wayland core protocol. Such protocols either add \ +completely new functionality, or extend the functionality of some other \ +protocol either in Wayland core, or some other protocol in \ +wayland-protocols." +HOMEPAGE = "http://wayland.freedesktop.org" +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" +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +PACKAGES = "${PN}" +FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend index 76aadf94..ba68761f 100644 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend @@ -6,20 +6,39 @@ IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl" IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = "" REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}" +SRC_URI_append_mx6sl = " file://weston.config" -HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" -HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" +# To customize weston.ini, start by setting the desired assignment in weston.ini, +# commented out. For example: +# #xwayland=true +# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. +INI_UNCOMMENT_ASSIGNMENTS_append_imx = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland=true', '', d)} \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ + gbm-format=argb8888 \ + \\[shell\\] \ + size=1920x1080 \ +" + +uncomment() { + if ! (grep "^#$1" $2); then + bbfatal "Commented setting '#$1' not found in file $2" + fi + sed -i -e 's,^#'"$1"','"$1"',g' $2 +} do_install_append() { - if ${HAS_SYSTEMD}; then - sed -i \ - -e 's,/usr/bin,${bindir},g' \ - -e 's,/etc,${sysconfdir},g' \ - -e 's,/var,${localstatedir},g' \ - ${D}${systemd_system_unitdir}/weston.service - if ${HAS_XWAYLAND}; then - install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston - fi + if [ -f "${WORKDIR}/weston.config" ]; then + install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi + for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do + uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini + done } diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config deleted file mode 100644 index 5693d6cb..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config new file mode 100755 index 00000000..6456cd24 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config @@ -0,0 +1 @@ +FB_MULTI_BUFFER=1 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config deleted file mode 100644 index eb990e40..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland --use-g2d=1" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config deleted file mode 100644 index 7c92cf11..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..d9094b1f --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,25 @@ +[core] +#gbm-format=argb8888 +idle-time=0 +#use-g2d=1 +#xwayland=true + +#[shell] +#size=1920x1080 + +#[output] +#name=HDMI-A-1 +#mode=1920x1080@60 +#transform=90 + +#[output] +#name=HDMI-A-2 +#mode=off +# WIDTHxHEIGHT Resolution size width and height in pixels +# off Disables the output +# preferred Uses the preferred mode +# current Uses the current crt controller mode +#transform=90 + +[screen-share] +command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service deleted file mode 100644 index 44c5a82f..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,38 +0,0 @@ -[Unit] -Description=Weston Wayland Compositor (on tty7) -RequiresMountsFor=/run -Conflicts=getty@tty7.service plymouth-quit.service -After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service - -[Service] -User=root -PermissionsStartOnly=true - -# Log us in via PAM so we get our XDG & co. environment and -# are treated as logged in so we can use the tty: -PAMName=login - -# Grab tty7 -UtmpIdentifier=tty7 -TTYPath=/dev/tty7 -TTYReset=yes -TTYVHangup=yes -TTYVTDisallocate=yes - -# stderr to journal so our logging doesn't get thrown into /dev/null -StandardOutput=tty -StandardInput=tty -StandardError=journal - -EnvironmentFile=-/etc/default/weston - -# Weston does not successfully change VT, nor does systemd place us on -# the VT it just activated for us. Switch manually: -ExecStartPre=/usr/bin/chvt 7 -ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS - -IgnoreSIGPIPE=no - -[Install] -WantedBy=multi-user.target - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch deleted file mode 100644 index 6f676048..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Mon, 29 Oct 2018 21:40:32 +0000 -Subject: [PATCH] g2d-renderer: Fix open function build break - -| from ../git/libweston/g2d-renderer.c:40: -| In function 'open', -| inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2: -| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe- sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit h O_CREAT or O_TMPFILE in second argument needs 3 arguments -| __open_missing_mode (); -| ^~~~~~~~~~~~~~~~~~~~~~ -| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed - -Upstream-Status: Inappropriate [i.MX-specific] - -Signed-off-by: Tom Hochstein ---- - libweston/g2d-renderer.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/libweston/g2d-renderer.c -=================================================================== ---- git.orig/libweston/g2d-renderer.c -+++ git/libweston/g2d-renderer.c -@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compos - path = malloc(strlen(dir) + 40); - strcpy(path, dir); - strcat(path, "/use-g2d-renderer"); -- close(open(path, O_CREAT | O_RDWR)); -+ close(open(path, O_CREAT | O_RDWR, 0600)); - free(path); - - return 0; diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted file mode 100644 index 09ec1559..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 May 2015 20:56:00 -0700 -Subject: [PATCH] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj - ---- - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/configure.ac b/configure.ac -index 7aebbdb..dc9c802 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include ]]) - AC_CHECK_HEADERS([execinfo.h]) - -+AC_CHECK_HEADERS([error.h]) -+ - AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - - # check for libdrm as a build-time dependency only -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/weston-error.h -@@ -0,0 +1,20 @@ -+#ifndef _WESTON_ERROR_H -+#define _WESTON_ERROR_H -+ -+#if defined(HAVE_ERROR_H) -+#include -+#else -+#include -+#include -+#define _weston_error(S, E, F, ...) do { \ -+ if (E) \ -+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ -+ else \ -+ err(S, F, ##__VA_ARGS__); \ -+} while(0) -+ -+#define error _weston_error -+#endif -+ -+#endif -+ -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 1adcf21..166bf3b 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include - #include - --#include - #include - - #include -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index d648538b..62b864c1 100644 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 +From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 22 Feb 2017 15:53:30 +0200 -Subject: [PATCH] weston-launch: Provide a default version that doesn't require PAM +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. @@ -14,46 +15,49 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein Signed-off-by: Jussi Kukkonen Signed-off-by: Denys Dmytriyenko +Signed-off-by: Ming Liu --- - configure.ac | 9 +++++++-- - libweston/weston-launch.c | 20 ++++++++++++++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) -diff --git a/configure.ac b/configure.ac -index dc9c802..48cf5cb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, - AS_IF([test "x$enable_resize_optimization" = "xyes"], - [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) - -+AC_ARG_WITH(pam, -+ AS_HELP_STRING([--with-pam], [Use PAM]), -+ [use_pam=$withval], [use_pam=yes]) - AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) - AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) --if test x$enable_weston_launch = xyes; then -+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then - WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) - if test x$have_pam = xno; then -- AC_ERROR([weston-launch requires pam]) -+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) - fi -+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) - fi - - AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -702,6 +706,7 @@ AC_MSG_RESULT([ - Enable developer documentation ${enable_devdocs} - - weston-launch utility ${enable_weston_launch} -+ PAM support ${use_pam} - systemd-login support ${have_systemd_login} - systemd notify support ${enable_systemd_notify} - +diff --git a/libweston/meson.build b/libweston/meson.build +index 08d23ec..cb9fd3f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( + ) + + if get_option('weston-launch') +- dep_pam = cc.find_library('pam') ++ deps_weston_launch = [systemd_dep, dep_libdrm] + +- if not cc.has_function('pam_open_session', dependencies: dep_pam) +- error('pam_open_session not found for weston-launch') ++ if get_option('pam') ++ dep_pam = cc.find_library('pam') ++ if not cc.has_function('pam_open_session', dependencies: dep_pam) ++ error('pam_open_session not found for weston-launch') ++ endif ++ ++ if dep_pam.found() ++ deps_weston_launch += dep_pam ++ config_h.set('HAVE_PAM', '1') ++ endif + endif + + executable( + 'weston-launch', + 'weston-launch.c', +- dependencies: [dep_pam, systemd_dep, dep_libdrm], ++ dependencies: deps_weston_launch, + include_directories: common_inc, + install: true + ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 166bf3b..6fb9232 100644 +index 8a711b4..54c567a 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -66,7 +70,7 @@ index 166bf3b..6fb9232 100644 #ifdef HAVE_SYSTEMD_LOGIN #include -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch { @@ -77,7 +81,7 @@ index 166bf3b..6fb9232 100644 int tty; int ttynr; int sock[2]; -@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -85,7 +89,7 @@ index 166bf3b..6fb9232 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -93,7 +97,7 @@ index 166bf3b..6fb9232 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -101,7 +105,7 @@ index 166bf3b..6fb9232 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -109,7 +113,7 @@ index 166bf3b..6fb9232 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -117,7 +121,7 @@ index 166bf3b..6fb9232 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -125,7 +129,7 @@ index 166bf3b..6fb9232 100644 /* * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ static void +@@ -745,8 +755,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -136,7 +140,7 @@ index 166bf3b..6fb9232 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"); -@@ -698,7 +710,9 @@ main(int argc, char *argv[]) +@@ -760,7 +772,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -146,21 +150,24 @@ index 166bf3b..6fb9232 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ main(int argc, char *argv[]) +@@ -772,11 +786,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': +#ifdef HAVE_PAM wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } +#else -+ error(1, 0, "-u is unsupported in this weston-launch build"); ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); +#endif break; case 't': tty = optarg; -@@ -753,8 +771,10 @@ main(int argc, char *argv[]) +@@ -828,8 +847,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -171,3 +178,21 @@ index 166bf3b..6fb9232 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index c862ecc..73ef2c3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( + ) + + option( ++ 'pam', ++ type: 'boolean', ++ value: true, ++ description: 'Define if PAM is available' ++) ++ ++option( + 'xwayland', + type: 'boolean', + value: true, diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini deleted file mode 100644 index d6ad40df..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini +++ /dev/null @@ -1,20 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini deleted file mode 100644 index d1597a42..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini +++ /dev/null @@ -1,24 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 -gbm-format=argb8888 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -[shell] -size=1920x1080 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb deleted file mode 100644 index e8d74fd4..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, i.MX fork" -DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" -HOMEPAGE = "http://wayland.freedesktop.org" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ - file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38" - -DEFAULT_PREFERENCE = "-1" - -SRCBRANCH = "weston-imx-4.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.ini \ - file://weston.png \ - file://weston.desktop \ - file://0001-make-error-portable.patch \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ - file://0001-g2d-renderer-Fix-open-function-build-break.patch \ -" -SRCREV = "866072b52751e5023651dd9322baa513e1f74fe6" -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit autotools pkgconfig useradd distro_features_check - -# Disable OpenGL for parts with GPU support for 2D but not 3D -REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_imxgpu2d = "" -REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" -PACKAGECONFIG_OPENGL = "opengl" -PACKAGECONFIG_OPENGL_imxgpu2d = "" -PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" - -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" -DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" - -WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" - -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - " -EXTRA_OECONF_append_qemux86 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_qemux86-64 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_imxfbdev = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL} pam systemd x11', d)} \ - clients launch" -PACKAGECONFIG_remove_imxfbdev = "kms" -PACKAGECONFIG_append_imxgpu = " imxgpu" -PACKAGECONFIG_append_imxgpu2d = " imxg2d" -PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" -# -# Compositor choices -# -# Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" -# Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" -# Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" -# Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" -# Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" -# weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" -# VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" -# Weston with EGL support -PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" -# Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" -# Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" -# colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" -# Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" -# Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" -# Weston with i.MX GPU support -PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" -# Weston with i.MX G2D renderer -PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" -# Weston with OpenGL support -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" - -do_install_append() { - # Weston doesn't need the .la files to load modules, so wipe them - rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la - - # If X11, ship a desktop file to launch it - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then - install -d ${D}${datadir}/applications - install ${WORKDIR}/weston.desktop ${D}${datadir}/applications - - install -d ${D}${datadir}/icons/hicolor/48x48/apps - install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps - fi - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then - install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland - fi - - # install default weston.ini - install -D -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini -} - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" - -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir} ${sysconfdir}/xdg/weston" - -FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" -SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." - -FILES_${PN}-examples = "${bindir}/*" - -FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" -RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" - -RDEPENDS_${PN} += "xkeyboard-config" -RRECOMMENDS_${PN} = "liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb new file mode 100644 index 00000000..a021a54d --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb @@ -0,0 +1,168 @@ +# This recipe is for the i.MX fork of weston. 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. + +########### OE-core copy ################## +# Upstream hash: 9b1d30810eeecb46b977c8eed68be69aef891312 + +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" +SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd features_check +# depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ + ${@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" +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# 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" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES_${PN}-examples = "${bindir}/*" + +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" + +DEFAULT_PREFERENCE = "-1" + +SRCBRANCH = "weston-imx-8.0" +SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRCREV = "f6a7d35650121fbe7c20d4cbe0eaac730fab3b2a" +S = "${WORKDIR}/git" + +# Disable OpenGL for parts with GPU support for 2D but not 3D +REQUIRED_DISTRO_FEATURES = "opengl" +REQUIRED_DISTRO_FEATURES_imxgpu2d = "" +REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" +PACKAGECONFIG_OPENGL = "opengl" +PACKAGECONFIG_OPENGL_imxgpu2d = "" +PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" + +PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" + +PACKAGECONFIG_remove_imxfbdev = "kms" +PACKAGECONFIG_append_imxfbdev = " fbdev clients" +PACKAGECONFIG_append_imxgpu = " imxgpu" +PACKAGECONFIG_append_imxgpu2d = " imxg2d" + +# Clients support +SIMPLE_CLIENTS = "all" +SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" +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" +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" + +########### End of i.MX overrides ######### diff --git a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-armada_git.bb b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-armada_git.bb index 30372eff..0aba8e5a 100644 --- a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-armada_git.bb +++ b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-armada_git.bb @@ -45,4 +45,4 @@ EXTRA_OECONF = "--disable-etnaviv \ --with-etnaviv-source=${WORKDIR}/etna_viv \ " -COMPATIBLE_MACHINE = "(imx)" +COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb deleted file mode 100644 index 996a9c7f..00000000 --- a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -require recipes-graphics/xorg-driver/xorg-driver-video.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" - -DESCRIPTION = "X.Org X server -- fbdev display driver" -PE = "1" -PR = "${INC_PR}.1" - -DEPENDS += "virtual/xserver" - -SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074" -SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5" diff --git a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb deleted file mode 100644 index 670ade64..00000000 --- a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -PE = "3" - -inherit autotools-brokensep update-rc.d pkgconfig - -DEPENDS += "virtual/xserver virtual/libx11 libgal-imx imx-gpu-viv virtual/libg2d pixman" - -LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3" - -SRCREV = "b765c3ffc0dcc4246afa659aa0d59f78a6736b08" -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/" - -INITSCRIPT_PACKAGES = "xserver-xorg-extension-viv-autohdmi" -INITSCRIPT_NAME = "rc.autohdmi" -INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." - -EXTRA_OEMAKE += "prefix=${exec_prefix} \ - sysroot=${STAGING_DIR_TARGET} \ - SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ - BUSID_HAS_NUMBER=1 \ - BUILD_IN_YOCTO=1 \ - XSERVER_GREATER_THAN_13=1" -TARGET_CC_ARCH += "${LDFLAGS}" - -PACKAGES =+ "xserver-xorg-extension-viv-autohdmi" - -do_install_append () { - install -d ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_priv.h ${D}${includedir} - cp -axr ${S}/EXA/src/vivante_gal/vivante_gal.h ${D}${includedir} - - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${WORKDIR}/rc.autohdmi ${D}/${sysconfdir}/init.d/rc.autohdmi - - find ${D}${includedir} -type f -exec chmod 660 {} \; -} - -RDEPENDS_${PN} += "libvivante-dri-imx \ - xserver-xorg-module-exa \ - mesa-driver-swrast \ - xserver-xorg-extension-dri \ - xserver-xorg-extension-dri2 \ - xserver-xorg-extension-glx" - -REALSOLIBS := "${SOLIBS}" -SOLIBS = "${SOLIBSDEV}" - -FILES_${PN} = "${libdir}/*/*/*/vivante_drv${SOLIBS}" -FILES_${PN}-dev = "${includedir} /usr/src ${libdir}/libfsl_x11_ext${SOLIBSDEV}" -FILES_${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/.debug/autohdmi" - -FILES_xserver-xorg-extension-viv-autohdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d/rc.autohdmi" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7ulp)" diff --git a/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb new file mode 100644 index 00000000..9268b11e --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb @@ -0,0 +1,65 @@ +# Copyright (C) 2012-2016 Freescale Semiconductor +# Copyright (C) 2012-2018 O.S. Systems Software LTDA. +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require recipes-graphics/xorg-driver/xorg-driver-video.inc + +PE = "3" + +inherit autotools-brokensep update-rc.d pkgconfig + +DEPENDS += "virtual/xserver virtual/libx11 libgal-imx imx-gpu-viv virtual/libg2d pixman" + +LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3" + +SRCREV = "c828e8a7c38743e960967e7bb78c134cec31c102" +SRCBRANCH = "imx_exa_viv6_g2d" +SRC_URI = "git://source.codeaurora.org/external/imx/xf86-video-imx-vivante.git;protocol=https;branch=${SRCBRANCH} \ + file://rc.autohdmi" + +S = "${WORKDIR}/git/" + +INITSCRIPT_PACKAGES = "xserver-xorg-extension-viv-autohdmi" +INITSCRIPT_NAME = "rc.autohdmi" +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." + +EXTRA_OEMAKE += "prefix=${exec_prefix} \ + sysroot=${STAGING_DIR_TARGET} \ + SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ + BUSID_HAS_NUMBER=1 \ + BUILD_IN_YOCTO=1 \ + XSERVER_GREATER_THAN_13=1" +TARGET_CC_ARCH += "${LDFLAGS}" + +PACKAGES =+ "xserver-xorg-extension-viv-autohdmi" + +do_install_append () { + install -d ${D}${includedir} + cp -axr ${S}/EXA/src/vivante_gal/vivante_priv.h ${D}${includedir} + cp -axr ${S}/EXA/src/vivante_gal/vivante_gal.h ${D}${includedir} + + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${WORKDIR}/rc.autohdmi ${D}/${sysconfdir}/init.d/rc.autohdmi + + find ${D}${includedir} -type f -exec chmod 660 {} \; +} + +RDEPENDS_${PN} += "libvivante-dri-imx \ + xserver-xorg-module-exa \ + mesa-driver-swrast \ + xserver-xorg-extension-dri \ + xserver-xorg-extension-dri2 \ + xserver-xorg-extension-glx" + +REALSOLIBS := "${SOLIBS}" +SOLIBS = "${SOLIBSDEV}" + +FILES_${PN} = "${libdir}/*/*/*/vivante_drv${SOLIBS}" +FILES_${PN}-dev = "${includedir} /usr/src ${libdir}/libfsl_x11_ext${SOLIBSDEV}" +FILES_${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/.debug/autohdmi" + +FILES_xserver-xorg-extension-viv-autohdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d/rc.autohdmi" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(mx6|mx7ulp)" diff --git a/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf new file mode 100644 index 00000000..79b6c0fc --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xf86-config/mx6ull/xorg.conf @@ -0,0 +1,12 @@ +Section "Device" + Identifier "Kernel Framebuffer Device" + Driver "fbdev" + Option "fbdev" "/dev/fb0" +EndSection + +Section "ServerFlags" + Option "BlankTime" "0" + Option "StandbyTime" "0" + Option "SuspendTime" "0" + Option "OffTime" "0" +EndSection diff --git a/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch new file mode 100644 index 00000000..beed6cb4 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch @@ -0,0 +1,47 @@ +From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Mon, 30 Jan 2017 16:32:06 -0600 +Subject: [PATCH] Remove check for useSIGIO option + +Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO +option. + +As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO +and OsReleaseSIGIO. + +No longer the check for useSIGIO is needed + +Upstream-Status: Pending + +Signed-off-by: Prabhu Sundararaj +--- + hw/xfree86/os-support/shared/sigio.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c +index 884a71c..be76498 100644 +--- a/hw/xfree86/os-support/shared/sigio.c ++++ b/hw/xfree86/os-support/shared/sigio.c +@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) + int i; + int installed = FALSE; + +- if (!xf86Info.useSIGIO) +- return 0; +- + for (i = 0; i < MAX_FUNCS; i++) { + if (!xf86SigIOFuncs[i].f) { + if (xf86IsPipe(fd)) +@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) + int max; + int ret; + +- if (!xf86Info.useSIGIO) +- return 0; +- + max = 0; + ret = 0; + for (i = 0; i < MAX_FUNCS; i++) { +-- +2.7.4 + diff --git a/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index e3c59040..84b69075 100644 --- a/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/bsp/meta-freescale/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -3,3 +3,6 @@ IMX_OPENGL_PKGCONFIGS_REMOVE_imxgpu = "glamor" OPENGL_PKGCONFIGS_remove_mx6 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" OPENGL_PKGCONFIGS_remove_mx7 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" OPENGL_PKGCONFIGS_remove_mx8 = "${IMX_OPENGL_PKGCONFIGS_REMOVE}" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append_imxgpu2d = " file://0003-Remove-check-for-useSIGIO-option.patch" diff --git a/bsp/meta-freescale/recipes-kernel/ceetm/ceetm/0001-Makefile-update-CFLAGS.patch b/bsp/meta-freescale/recipes-kernel/ceetm/ceetm/0001-Makefile-update-CFLAGS.patch new file mode 100644 index 00000000..13697886 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/ceetm/ceetm/0001-Makefile-update-CFLAGS.patch @@ -0,0 +1,31 @@ +From fb1fe93a2bab083652a65804be5ddd37a7e86a9f Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Wed, 14 Aug 2019 04:05:14 +0200 +Subject: [PATCH] Makefile: update CFLAGS + +*fix the below error: +|error: json_print.h: No such file or directory + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: C.r. Guo +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f89700c..49243d8 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ LDFLAGS += -Wl,-export-dynamic + # if you are not using flex-builder. Download the iproute2 sources for the + # desired version and point to those instead. + ifneq ($(IPROUTE2_DIR),) +-CFLAGS += -I$(IPROUTE2_DIR) -I$(IPROUTE2_DIR)/include ++CFLAGS += -I$(IPROUTE2_DIR) -I$(IPROUTE2_DIR)/include -I$(IPROUTE2_DIR)/usr/include/ -I$(IPROUTE2_DIR)/usr/include/include + endif + + MODDESTDIR := $(DESTDIR)/usr/lib/tc +-- +2.7.4 + diff --git a/bsp/meta-freescale/recipes-kernel/ceetm/ceetm_git.bb b/bsp/meta-freescale/recipes-kernel/ceetm/ceetm_git.bb index 57fbbe42..68fb67e0 100644 --- a/bsp/meta-freescale/recipes-kernel/ceetm/ceetm_git.bb +++ b/bsp/meta-freescale/recipes-kernel/ceetm/ceetm_git.bb @@ -4,12 +4,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bac620b9883d38a84dfb73ca7122d915" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ceetm;nobranch=1" SRCREV = "6a7f2ec2091df2f4380cb8d25a36c399aed5af1b" - +SRC_URI_append = " file://0001-Makefile-update-CFLAGS.patch \ +" DEPENDS = "iproute2" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" IPROUTE2_DIR="{STAGING_DIR_TARGET}"' +export IPROUTE2_DIR="${STAGING_DIR_TARGET}" +WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" +export CROSS_COMPILE="${WRAP_TARGET_PREFIX}" + +LDFLAGS += "${TOOLCHAIN_OPTIONS}" do_install(){ mkdir -p ${D}/${libdir}/tc diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc new file mode 100644 index 00000000..bb785831 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc @@ -0,0 +1,21 @@ +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/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb new file mode 100644 index 00000000..c2cbc71b --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.10.bb @@ -0,0 +1,5 @@ +require recipes-kernel/cryptodev/cryptodev-linux_${PV}.bb +require cryptodev-qoriq-${PV}.inc + +BBCLASSEXTEND = "" +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.9.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.9.bb deleted file mode 100644 index 58db5053..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.9.bb +++ /dev/null @@ -1,16 +0,0 @@ -require cryptodev-qoriq_${PV}.inc - -SUMMARY = "A /dev/crypto device driver header file" - -PROVIDES = "cryptodev-linux" - -do_compile[noexec] = "1" - -# Just install cryptodev.h which is the only header file needed to be exported -do_install() { - install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h -} - -ALLOW_EMPTY_${PN} = "1" - -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb new file mode 100644 index 00000000..86078c57 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.10.bb @@ -0,0 +1,10 @@ +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/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.9.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.9.bb deleted file mode 100644 index 412bb0e5..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.9.bb +++ /dev/null @@ -1,21 +0,0 @@ -require cryptodev-qoriq_${PV}.inc - -SUMMARY = "A /dev/crypto device driver kernel module" - -PROVIDES = "cryptodev-module" - -inherit module qoriq_build_64bit_kernel - -# Header file provided by a separate package -DEPENDS += "cryptodev-linux" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" DESTDIR="${D}"' - -SRC_URI_append = " \ -file://0001-Disable-installing-header-file-provided-by-another-p.patch \ -" - -RCONFLICTS_${PN} = "ocf-linux" -RREPLACES_${PN} = "ocf-linux" - -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb new file mode 100644 index 00000000..784c38b7 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.10.bb @@ -0,0 +1,8 @@ +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/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.9.bb b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.9.bb deleted file mode 100644 index f7d0b61b..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.9.bb +++ /dev/null @@ -1,26 +0,0 @@ -require cryptodev-qoriq_${PV}.inc - -SUMMARY = "A test suite for /dev/crypto device driver" - -DEPENDS = "openssl" - -PROVIDES = "cryptodev-tests" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" DESTDIR="${D}"' - -SRC_URI_append = " \ -file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ -" - -do_compile() { - oe_runmake testprogs -} - -do_install() { - oe_runmake install_tests -} - -FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" -FILES_${PN} = "${bindir}/tests_cryptodev/*" - -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq_1.9.inc b/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq_1.9.inc deleted file mode 100644 index 0d7249fd..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/cryptodev-qoriq_1.9.inc +++ /dev/null @@ -1,26 +0,0 @@ -HOMEPAGE = "http://cryptodev-linux.org/" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -python() { - pkgs = d.getVar('PACKAGES', True).split() - for p in pkgs: - if 'cryptodev-qoriq' in p: - d.appendVar("RPROVIDES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) - d.appendVar("RCONFLICTS_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) - d.appendVar("RREPLACES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) -} - -FILESEXTRAPATHS_prepend := "${THISDIR}/yocto_patches:" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux;nobranch=1" -SRCREV = "479e6e7f071e252c0c37ea38d38fdb4cd808f496" - -# NOTE: remove this patch and all traces of DISTRO_FEATURE c29x_pkc -# if pkc-host does not need customized cryptodev patches anymore -#SRC_URI_append = "${@bb.utils.contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}" - -S = "${WORKDIR}/git" - -CLEANBROKEN = "1" diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch new file mode 100644 index 00000000..84fd27e6 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch @@ -0,0 +1,66 @@ +From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 +From: Yu Zongchun +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 + +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/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch new file mode 100644 index 00000000..885b5823 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch @@ -0,0 +1,24 @@ +From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sun, 6 Apr 2014 19:51:39 -0400 +Subject: [PATCH] Disable installing header file provided by another package + +Signed-off-by: Denys Dmytriyenko + +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/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch deleted file mode 100644 index 1e7f5843..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 03257bf2aff37b78496ccc1b58a87e7baaea042a Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Mon, 22 Feb 2016 12:17:52 +0200 -Subject: [PATCH 2/2] Add the compile and install rules for cryptodev tests - -(original patch Signed-off-by: Yu Zongchun ) -Signed-off-by: Cristian Stoica - -Upstream-Status: Inappropriate [ OE specific ] ---- - Makefile | 6 ++++++ - tests/Makefile | 4 ++-- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 06202bd..a598b12 100644 ---- a/Makefile -+++ b/Makefile -@@ -42,6 +42,12 @@ clean: - check: - CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests check - -+testprogs: -+ KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C tests all -+ -+install_tests: -+ $(MAKE) -C tests install -+ - CPOPTS = - ifneq ($(SHOW_TYPES),) - CPOPTS += --show-types -diff --git a/tests/Makefile b/tests/Makefile -index 5e3111d..cda971c 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -35,9 +35,9 @@ check: $(hostprogs) - ./cipher-aead - - install: -- install -d $(DESTDIR)/$(bindir) -+ install -d $(DESTDIR)/$(bindir)/tests_cryptodev - for prog in $(hostprogs); do \ -- install -m 755 $$prog $(DESTDIR)/$(bindir); \ -+ install -m 755 $$prog $(DESTDIR)/$(bindir)/tests_cryptodev/; \ - done - - clean: --- -2.7.0 - diff --git a/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Disable-installing-header-file-provided-by-another-p.patch b/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Disable-installing-header-file-provided-by-another-p.patch deleted file mode 100644 index 35aad600..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0001-Disable-installing-header-file-provided-by-another-p.patch +++ /dev/null @@ -1,22 +0,0 @@ -From eedfa57953d2d6255d53cb098c3f81cbde9187f7 Mon Sep 17 00:00:00 2001 -From: Cristian Stoica -Date: Mon, 22 Feb 2016 11:47:27 +0200 -Subject: [PATCH 1/2] Disable installing header file provided by another - package - -(original patch Signed-off-by: Denys Dmytriyenko ) -Signed-off-by: Cristian Stoica - -Upstream-Status: Inappropriate [ OE specific ] - - ---- a/Makefileold 2017-04-18 14:54:40.588438842 +0800 -+++ b/Makefile 2017-04-18 14:55:40.308436774 +0800 -@@ -33,7 +33,6 @@ - - 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/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0003-update-the-install-path-for-cryptodev-tests.patch b/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0003-update-the-install-path-for-cryptodev-tests.patch deleted file mode 100644 index 4f92dbab..00000000 --- a/bsp/meta-freescale/recipes-kernel/cryptodev/yocto_patches/0003-update-the-install-path-for-cryptodev-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 5b0d2cf5abaaa3bffb4a9e874dba88bdab15b69d Mon Sep 17 00:00:00 2001 -From: Ting Liu -Date: Mon, 20 Feb 2017 22:43:00 +0800 -Subject: [PATCH] update the install path for cryptodev tests - -Signed-off-by: Ting Liu ---- - tests/Makefile | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/Makefile b/tests/Makefile -index dd7d5ff..e1c5039 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -37,8 +37,8 @@ install: - for prog in $(hostprogs); do \ - install -m 755 $$prog $(DESTDIR)/$(bindir)/tests_cryptodev/; \ - done -- install -m 755 speed_multi.sh $(DESTDIR)/$(bindir) -- install -m 755 run_crypto_tests.sh $(DESTDIR)/$(bindir) -+ install -m 755 speed_multi.sh $(DESTDIR)/$(bindir)/tests_cryptodev/ -+ install -m 755 run_crypto_tests.sh $(DESTDIR)/$(bindir)/tests_cryptodev/ - - clean: - rm -f *.o *~ $(hostprogs) --- -1.9.2 - diff --git a/bsp/meta-freescale/recipes-kernel/dtc/dtc-145_git.bb b/bsp/meta-freescale/recipes-kernel/dtc/dtc-145_git.bb deleted file mode 100644 index 2d4097bb..00000000 --- a/bsp/meta-freescale/recipes-kernel/dtc/dtc-145_git.bb +++ /dev/null @@ -1,20 +0,0 @@ -require recipes-kernel/dtc/dtc.inc - -LIC_FILES_CHKSUM = " \ - file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c \ -" - -SRCREV = "22a65c5331c22979d416738eb756b9541672e00d" - -SRC_URI += "file://0001-Fix-compiler-warnings-seen-with-musl.patch \ - " -S = "${WORKDIR}/git" - -# only install the dtc binary renamed to dtc-145 -do_install () { - install -d ${D}/${bindir} - install -m 755 dtc ${D}/${bindir}/dtc-145 -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-freescale/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch b/bsp/meta-freescale/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch deleted file mode 100644 index 418a6498..00000000 --- a/bsp/meta-freescale/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 50034ca2600ae07203f397af6d78e2e9ff16bc02 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 6 Oct 2018 18:12:23 -0700 -Subject: [PATCH] Fix compiler warnings seen with musl - -Fixes - -checks.c:975:16: error: format '%ld' expects argument of type 'long -int', but argument 6 has type 'unsigned int' [-Werror=format=] - FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple -of %ld in node %s", - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - prop->name, prop->val.len, sizeof(cell_t), node->fullpath); - ~~~~~~~~~~~~~~ -checks.c:96:23: note: in definition of macro 'FAIL' - check_msg((c), dti, __VA_ARGS__); \ - ^~~~~~~~~~~ -checks.c: In function 'check_interrupts_property': -checks.c:1166:16: error: format '%ld' expects argument of type 'long -int', but argument 6 has type 'unsigned int' [-Werror=format=] - FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple -of %ld in node %s", - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - irq_prop->name, irq_prop->val.len, sizeof(cell_t), - ~~~~~~~~~~~~~~ - -Upstream-Status: Backport [adapted from an upstream fix] - -Signed-off-by: Khem Raj ---- - checks.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/checks.c b/checks.c -index 902f2e3..08a3a29 100644 ---- a/checks.c -+++ b/checks.c -@@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c, - int cell, cellsize = 0; - - if (prop->val.len % sizeof(cell_t)) { -- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", -+ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", - prop->name, prop->val.len, sizeof(cell_t), node->fullpath); - return; - } -@@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c, - return; - - if (irq_prop->val.len % sizeof(cell_t)) -- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", -+ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", - irq_prop->name, irq_prop->val.len, sizeof(cell_t), - node->fullpath); - diff --git a/bsp/meta-freescale/recipes-kernel/dtc/files/make_install.patch b/bsp/meta-freescale/recipes-kernel/dtc/files/make_install.patch deleted file mode 100644 index ccf17b38..00000000 --- a/bsp/meta-freescale/recipes-kernel/dtc/files/make_install.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -Index: git/Makefile -=================================================================== ---- git.orig/Makefile -+++ git/Makefile -@@ -168,8 +168,8 @@ install-bin: all $(SCRIPTS) - install-lib: all - @$(VECHO) INSTALL-LIB - $(INSTALL) -d $(DESTDIR)$(LIBDIR) -- $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) -- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) -+ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) - ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) - $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) - diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.8.bb b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.8.bb deleted file mode 100644 index 9201dd27..00000000 --- a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.4.p1.8.bb +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2015-2016 Freescale Semiconductor -# Copyright 2017-2018 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" - -SRCBRANCH = "imx_4.9.123_imx8mm_ga" -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 = "6a71cbc089755afd6a86c005c22a1af6eab24a70" - -S = "${WORKDIR}/git" - -inherit module - -EXTRA_OEMAKE += "CONFIG_MXC_GPU_VIV=m" - -KERNEL_MODULE_AUTOLOAD = "galcore" -COMPATIBLE_MACHINE = "(imx)" diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb new file mode 100644 index 00000000..4c9015e9 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb @@ -0,0 +1,26 @@ +# Copyright (C) 2015-2016 Freescale Semiconductor +# Copyright 2017-2018 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" + +SRCBRANCH = "lf-5.4.y" +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" + +S = "${WORKDIR}/git" + +inherit module + +EXTRA_OEMAKE += "CONFIG_MXC_GPU_VIV=m" + +KERNEL_MODULE_AUTOLOAD = "galcore" +COMPATIBLE_MACHINE = "(imx)" diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-ipc.inc b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-ipc.inc index e3c92f3a..350ba186 100644 --- a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-ipc.inc +++ b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-ipc.inc @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" inherit module qoriq_build_64bit_kernel -SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;branch=sdk-v2.0.x" +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/ipc;protocol=https;nobranch=1" SRCREV = "74d662707558290f070f9589177db730444bc435" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca6174_3.0.bb b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca6174_3.0.bb new file mode 100644 index 00000000..f78a4c5b --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca6174_3.0.bb @@ -0,0 +1,14 @@ +require kernel-module-qcacld-lea.inc + +SUMMARY = "Qualcomm WiFi driver for QCA module 6174" + +EXTRA_OEMAKE += " \ + CONFIG_ROME_IF=pci \ + CONFIG_WLAN_FEATURE_11W=y \ + CONFIG_WLAN_FEATURE_FILS=y \ + CONFIG_WLAN_WAPI_MODE_11AC_DISABLE=y \ + MODNAME=qca6174 \ + CONFIG_WLAN_FEATURE_DSRC=y \ +" + +RDEPENDS_${PN} += "firmware-qca6174" diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb new file mode 100644 index 00000000..fbc87ea2 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb @@ -0,0 +1,17 @@ +require kernel-module-qcacld-lea.inc + +SUMMARY = "Qualcomm WiFi driver for QCA module 9377" + +EXTRA_OEMAKE += " \ + CONFIG_CLD_HL_SDIO_CORE=y \ + CONFIG_FEATURE_COEX_PTA_CONFIG_ENABLE=y \ + CONFIG_PER_VDEV_TX_DESC_POOL=1 \ + CONFIG_QCA_LL_TX_FLOW_CT=1 \ + CONFIG_QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK=y \ + CONFIG_WLAN_FEATURE_FILS=y \ + CONFIG_WLAN_WAPI_MODE_11AC_DISABLE=y \ + MODNAME=qca9377 \ + SAP_AUTH_OFFLOAD=1 \ +" + +RDEPENDS_${PN} += "firmware-qca9377" diff --git a/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc new file mode 100644 index 00000000..0b23a47c --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc @@ -0,0 +1,23 @@ +SUMMARY = "Qualcomm WiFi driver for QCA module 9377 and 6174" +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://CORE/HDD/src/wlan_hdd_main.c;beginline=1;endline=20;md5=ec8d62116b13db773825ebf7cf91be1d;" + +QCACLD_SRC ?= "git://source.codeaurora.org/external/imx/qcacld-2.0-imx.git;protocol=https" +SRC_URI = "${QCACLD_SRC};branch=IMX_CNSS.LEA.NRT_3.0_KRL5.4" +SRCREV = "7dc91e5977f31d60741c55682564788c0f930163" + +S = "${WORKDIR}/git" + +inherit module + +EXTRA_OEMAKE += " \ + CONFIG_CFG80211_INTERNAL_REGDB=y \ + CONFIG_HDD_WLAN_WAIT_TIME=10000 \ + CONFIG_LINUX_QCMBR=y \ + CONFIG_NON_QC_PLATFORM=y \ + CONFIG_PMF_SUPPORT=y \ + TARGET_BUILD_VARIANT=user \ +" + +COMPATIBLE_MACHINE = "(imx)" +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0001-fix-build.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0001-fix-build.patch deleted file mode 100644 index 4be4066d..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0001-fix-build.patch +++ /dev/null @@ -1,71 +0,0 @@ -Fix build errors when RT patch is applied - -Upstream-Status: Inappropriate [other] -Freescale does not support the RT patch - -Signed-off-by: Jacob Kroon -Signed-off-by: Dominic Sacré [updated for 3.14.28] - -diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c -index 2ec98dc..5d0b7df 100644 ---- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c -+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c -@@ -7344,7 +7344,7 @@ gckOS_WaitSignal( - - might_sleep(); - -- spin_lock_irq(&signal->obj.wait.lock); -+ raw_spin_lock_irq(&signal->obj.wait.lock); - - if (signal->obj.done) - { -@@ -7366,9 +7366,8 @@ gckOS_WaitSignal( - ? MAX_SCHEDULE_TIMEOUT - : Wait * HZ / 1000; - -- DECLARE_WAITQUEUE(wait, current); -- wait.flags |= WQ_FLAG_EXCLUSIVE; -- __add_wait_queue_tail(&signal->obj.wait, &wait); -+ DEFINE_SWAITER(wait); -+ swait_prepare_locked(&signal->obj.wait, &wait); - - while (gcvTRUE) - { -@@ -7380,9 +7379,9 @@ gckOS_WaitSignal( - } - - __set_current_state(TASK_INTERRUPTIBLE); -- spin_unlock_irq(&signal->obj.wait.lock); -+ raw_spin_unlock_irq(&signal->obj.wait.lock); - timeout = schedule_timeout(timeout); -- spin_lock_irq(&signal->obj.wait.lock); -+ raw_spin_lock_irq(&signal->obj.wait.lock); - - if (signal->obj.done) - { -@@ -7403,10 +7402,10 @@ gckOS_WaitSignal( - } - } - -- __remove_wait_queue(&signal->obj.wait, &wait); -+ swait_finish_locked(&signal->obj.wait, &wait); - } - -- spin_unlock_irq(&signal->obj.wait.lock); -+ raw_spin_unlock_irq(&signal->obj.wait.lock); - - OnError: - /* Return status. */ -diff --git a/include/linux/imx_sema4.h b/include/linux/imx_sema4.h -index 9787980..3586199 100644 ---- a/include/linux/imx_sema4.h -+++ b/include/linux/imx_sema4.h -@@ -9,6 +9,8 @@ - #ifndef __LINUX_IMX_SEMA4_H__ - #define __LINUX_IMX_SEMA4_H__ - -+#include -+ - #define SEMA4_NUM_DEVICES 1 - #define SEMA4_NUM_GATES 16 - diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0002-no-split-ptlocks.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0002-no-split-ptlocks.patch deleted file mode 100644 index 40c012a5..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0002-no-split-ptlocks.patch +++ /dev/null @@ -1,85 +0,0 @@ -Work around the oops below by disabling split ptlocks - -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Jacob Kroon -Signed-off-by: Dominic Sacré [updated for 3.14.28] - -Unable to handle kernel NULL pointer dereference at virtual address 00000000 -pgd = ac5a8000 -[00000000] *pgd=3c8db831, *pte=00000000, *ppte=00000000 -Internal error: Oops: 17 [#1] PREEMPT SMP ARM -Modules linked in: -CPU: 1 PID: 277 Comm: test-qt5 Not tainted 3.10.17-rt12-monkey+gec1af9f #2 -task: ac65df80 ti: ac968000 task.ti: ac968000 -PC is at _raw_spin_lock+0x10/0x4c -LR is at get_parent_ip+0x10/0x2c -pc : [<80623fd4>] lr : [<8004ef18>] psr: 60010013 -sp : ac969c38 ip : 80c44404 fp : 00000000 -r10: ac65df80 r9 : ac969cd8 r8 : 00000000 -r7 : 00000054 r6 : afffe000 r5 : 00000000 r4 : 00000000 -r3 : ac65df80 r2 : 00000001 r1 : 00000000 r0 : 00000000 -Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user -Control: 10c53c7d Table: 3c5a804a DAC: 00000015 -Process test-qt5 (pid: 277, stack limit = 0xac968238) -Stack: (0xac969c38 to 0xac96a000) -9c20: b00549a8 806235e0 -9c40: 00000000 ac968000 812f9a00 80017cec ac969c74 fffffffe 00000000 00005000 -9c60: 00000000 80017e6c ac968000 ac65df80 00000000 00000000 00000001 ac968001 -9c80: ac65df80 b00549a8 00000000 afffe000 00000054 00000000 ac969cd8 afffe150 -9ca0: b0054bf8 8044e540 ac969cd8 b00549a8 ac0b8180 00000230 ac8fd000 00000230 -9cc0: 00000000 8044f6f4 ac155700 ac969cf4 ac155700 804605b8 ac155700 ac969d8c -9ce0: 00000002 ac969d24 b0054bf8 804607f4 7ef1fcd0 80450078 ac0b8180 ac155700 -9d00: ac969d8c 00000002 ac8fd000 8045f1a0 ac969d24 00000000 ac8fd01c b00549a8 -9d20: b0050000 00000008 ac969d98 ac0b8300 ac969d8c 00000115 ac969d98 ac969e00 -9d40: ac155600 ac3985f0 7ef1fcd0 8045661c 00000115 00000000 00000001 00000000 -9d60: 00007530 80454144 80c32e18 00000001 81518e18 806237dc 00000001 ac968038 -9d80: 00000000 00000000 00000000 00000000 00000115 806237dc ac6f5688 ac968018 -9da0: 812e1640 00000000 00000001 ac968000 ac969dc4 8004efe4 ac968008 ac39a000 -9dc0: ac744400 ac968020 00007530 ac968000 ac968000 ac3985f0 7ef1fcd0 8044d374 -9de0: 7ef1fd20 00000000 000000f8 00000000 7ef1fd20 00000000 000000f8 00000000 -9e00: 00000028 00000002 00000000 6437d1dd 7ef1fddc 76f9c030 7ef1fd88 76fb9abc -9e20: 00000320 00005007 e02c7eca c1399eff 020fb2db 00000000 00000000 00000000 -9e40: 00000001 00000040 00000400 00000004 00000010 00000400 00000002 00000100 -9e60: 00000100 00000008 00000008 00000000 ffffffff 00000000 7588e180 76fb1000 -9e80: 08000000 00000000 00000000 76fb11b8 000000af 760b6cd8 ffffffff 7431d4c0 -9ea0: 000cb1ac 75889000 00000000 00000001 000000b0 00000000 00000000 76fa0da0 -9ec0: 00000000 00000001 00000001 00000000 00000000 7588cb40 00000001 75957ecc -9ee0: 00000001 7ef1fe7c 75953e94 7ef1fedc 00000002 76fa789c 00007530 ac6813c0 -9f00: 00000000 7ef1fcd0 ac6813c0 ac968000 ac3985f0 800d68fc 00000001 ac968000 -9f20: ac969f34 8004efe4 ac4f71d4 6c31d000 00000000 80623fd4 00000000 80623578 -9f40: ac4f71d4 800a3d40 00000001 00000000 ac969f5c 00000003 ac6813c8 00000000 -9f60: 00000001 00007530 00000003 00000000 7ef1fcd0 ac6813c0 ac968000 00000000 -9f80: 00000000 800d6afc ac4f7180 00000000 00002710 00007530 75957e40 00000036 -9fa0: 8000e2c4 8000e140 00002710 00007530 00000003 00007530 7ef1fcd0 01bc3008 -9fc0: 00002710 00007530 75957e40 00000036 01bd2e70 00000001 7ef1fd20 00000000 -9fe0: 759540c4 7ef1fcbc 7593f698 760a0ccc 20010010 00000003 00000000 00000000 -[<80623fd4>] (_raw_spin_lock+0x10/0x4c) from [<806235e0>] (rt_spin_lock_slowlock+0x34/0x29c) -[<806235e0>] (rt_spin_lock_slowlock+0x34/0x29c) from [<8044e540>] (_QueryProcessPageTable+0x8c/0xdc) -[<8044e540>] (_QueryProcessPageTable+0x8c/0xdc) from [<8044f6f4>] (gckOS_GetPhysicalAddress+0x20/0x58) -[<8044f6f4>] (gckOS_GetPhysicalAddress+0x20/0x58) from [<804605b8>] (gckHARDWARE_ConvertLogical+0x2c/0x90) -[<804605b8>] (gckHARDWARE_ConvertLogical+0x2c/0x90) from [<804607f4>] (gckHARDWARE_Link+0x60/0x104) -[<804607f4>] (gckHARDWARE_Link+0x60/0x104) from [<8045f1a0>] (gckCONTEXT_Construct+0x264/0x2bc) -[<8045f1a0>] (gckCONTEXT_Construct+0x264/0x2bc) from [<8045661c>] (gckCOMMAND_Attach+0x44/0x88) -[<8045661c>] (gckCOMMAND_Attach+0x44/0x88) from [<80454144>] (gckKERNEL_Dispatch+0x358/0x12c8) -[<80454144>] (gckKERNEL_Dispatch+0x358/0x12c8) from [<8044d374>] (drv_ioctl+0x120/0x284) -[<8044d374>] (drv_ioctl+0x120/0x284) from [<800d68fc>] (do_vfs_ioctl+0x408/0x5d0) -[<800d68fc>] (do_vfs_ioctl+0x408/0x5d0) from [<800d6afc>] (SyS_ioctl+0x38/0x64) -[<800d6afc>] (SyS_ioctl+0x38/0x64) from [<8000e140>] (ret_fast_syscall+0x0/0x30) -Code: e92d4010 e1a04000 e3a00001 ebe8abd7 (e1943f9f) ----[ end trace 0000000000000002 ]--- -note: test-qt5[277] exited with preempt_count 1 - -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 6c1dc6c..8c00faf 100644 ---- a/include/linux/mm_types.h -+++ b/include/linux/mm_types.h -@@ -24,7 +24,7 @@ - - struct address_space; - --#define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) -+#define USE_SPLIT_PTE_PTLOCKS (0) - #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \ - IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK)) - #define ALLOC_SPLIT_PTLOCKS (SPINLOCK_SIZE > BITS_PER_LONG/8) diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch deleted file mode 100644 index 93200c62..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch +++ /dev/null @@ -1,126 +0,0 @@ -From f7cba8d49a980909cea48c5b9dcfefc6e13fef0b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dominic=20Sacr=C3=A9?= -Date: Fri, 29 Apr 2016 15:48:40 +0200 -Subject: [PATCH] Work around CPU stalls in the imx-sdma driver -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Replace spinlocks with raw spinlocks. This prevents preemption during -the spinlock's critical section, as is the case on non PREEMPT_RT kernels. - -Without this patch, the following error can occur, for example when -using the audio codec on an i.MX6Q SabreSD board: - -INFO: rcu_preempt self-detected stall on CPU { 0} (t=2100 jiffies g=106 c=105 q=93) -CPU: 0 PID: 120 Comm: irq/34-sdma Not tainted 3.14.28-rt25-1.0.0_ga+g91cf351 #1 -[<80014a8c>] (unwind_backtrace) from [<8001173c>] (show_stack+0x10/0x14) -[<8001173c>] (show_stack) from [<806ee750>] (dump_stack+0x7c/0xc8) -[<806ee750>] (dump_stack) from [<800771c8>] (rcu_check_callbacks+0x454/0x888) -[<800771c8>] (rcu_check_callbacks) from [<80037f28>] (update_process_times+0x40/0x5c) -[<80037f28>] (update_process_times) from [<80082230>] (tick_sched_timer+0x4c/0x78) -[<80082230>] (tick_sched_timer) from [<8004bf30>] (__run_hrtimer.isra.34+0x74/0x124) -[<8004bf30>] (__run_hrtimer.isra.34) from [<8004cbb0>] (hrtimer_interrupt+0x154/0x3ac) -[<8004cbb0>] (hrtimer_interrupt) from [<80014464>] (twd_handler+0x30/0x38) -[<80014464>] (twd_handler) from [<8006fa2c>] (handle_percpu_devid_irq+0x6c/0x84) -[<8006fa2c>] (handle_percpu_devid_irq) from [<8006bc64>] (generic_handle_irq+0x2c/0x3c) -[<8006bc64>] (generic_handle_irq) from [<8000ed8c>] (handle_IRQ+0x40/0x90) -[<8000ed8c>] (handle_IRQ) from [<8000856c>] (gic_handle_irq+0x2c/0x5c) -[<8000856c>] (gic_handle_irq) from [<80012240>] (__irq_svc+0x40/0x84) -Exception stack(0xa840feb8 to 0xa840ff00) -fea0: a8007a28 00000002 -fec0: 00000001 0000a6a6 a80079c0 a8007a28 a83ea080 00000000 a80079c0 a83ea080 -fee0: 285190f0 00000000 00000000 a840ff00 8006d04c 806f3070 20030113 ffffffff -[<80012240>] (__irq_svc) from [<806f3070>] (_raw_spin_unlock_irq+0x20/0x60) -[<806f3070>] (_raw_spin_unlock_irq) from [<8006d04c>] (irq_finalize_oneshot.part.37+0x70/0xcc) -[<8006d04c>] (irq_finalize_oneshot.part.37) from [<8006d148>] (irq_forced_thread_fn+0x60/0x64) -[<8006d148>] (irq_forced_thread_fn) from [<8006d3dc>] (irq_thread+0x138/0x1a4) -[<8006d3dc>] (irq_thread) from [<8004913c>] (kthread+0xbc/0xd4) -[<8004913c>] (kthread) from [<8000e538>] (ret_from_fork+0x14/0x3c) - -Upstream-Status: Pending - -Signed-off-by: Dominic Sacré ---- - drivers/dma/imx-sdma.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c -index 31b7fed..bb7d6aa 100644 ---- a/drivers/dma/imx-sdma.c -+++ b/drivers/dma/imx-sdma.c -@@ -408,7 +408,7 @@ struct sdma_engine { - struct dma_device dma_device; - struct clk *clk_ipg; - struct clk *clk_ahb; -- spinlock_t channel_0_lock; -+ raw_spinlock_t channel_0_lock; - u32 script_number; - struct sdma_script_start_addrs *script_addrs; - const struct sdma_driver_data *drvdata; -@@ -700,7 +700,7 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, - return -ENOMEM; - } - -- spin_lock_irqsave(&sdma->channel_0_lock, flags); -+ raw_spin_lock_irqsave(&sdma->channel_0_lock, flags); - - bd0->mode.command = C0_SETPM; - bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; -@@ -712,7 +712,7 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size, - - ret = sdma_run_channel0(sdma); - -- spin_unlock_irqrestore(&sdma->channel_0_lock, flags); -+ raw_spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - - if (use_iram) - gen_pool_free(sdma->iram_pool, (unsigned long)buf_virt, size); -@@ -979,7 +979,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) - dev_dbg(sdma->dev, "event_mask0 = 0x%08x\n", (u32)sdmac->event_mask[0]); - dev_dbg(sdma->dev, "event_mask1 = 0x%08x\n", (u32)sdmac->event_mask[1]); - -- spin_lock_irqsave(&sdma->channel_0_lock, flags); -+ raw_spin_lock_irqsave(&sdma->channel_0_lock, flags); - - memset(context, 0, sizeof(*context)); - context->channel_state.pc = load_address; -@@ -1005,7 +1005,7 @@ static int sdma_load_context(struct sdma_channel *sdmac) - bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * channel; - ret = sdma_run_channel0(sdma); - -- spin_unlock_irqrestore(&sdma->channel_0_lock, flags); -+ raw_spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - - sdmac->context_loaded = true; - -@@ -1019,7 +1019,7 @@ static int sdma_save_restore_context(struct sdma_engine *sdma, bool save) - unsigned long flags; - int ret; - -- spin_lock_irqsave(&sdma->channel_0_lock, flags); -+ raw_spin_lock_irqsave(&sdma->channel_0_lock, flags); - - if (save) - bd0->mode.command = C0_GETDM; -@@ -1032,7 +1032,7 @@ static int sdma_save_restore_context(struct sdma_engine *sdma, bool save) - bd0->ext_buffer_addr = 2048; - ret = sdma_run_channel0(sdma); - -- spin_unlock_irqrestore(&sdma->channel_0_lock, flags); -+ raw_spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - - return ret; - } -@@ -2152,7 +2152,7 @@ static int sdma_probe(struct platform_device *pdev) - if (!sdma) - return -ENOMEM; - -- spin_lock_init(&sdma->channel_0_lock); -+ raw_spin_lock_init(&sdma->channel_0_lock); - - sdma->dev = &pdev->dev; - sdma->drvdata = drvdata; --- -2.8.1 - diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0004-export-swait-locked-functions.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0004-export-swait-locked-functions.patch deleted file mode 100644 index 1a616aa3..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/0004-export-swait-locked-functions.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2460dd985b0cf477f74396de92d1bc5df496abdc Mon Sep 17 00:00:00 2001 -From: Julio Cruz -Date: Wed, 20 Jan 2016 19:26:44 +0800 -Subject: [PATCH] Export symbols for iMX-GPU-VIV module - ---- - kernel/sched/wait-simple.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/kernel/sched/wait-simple.c b/kernel/sched/wait-simple.c -index 7dfa86d..a3776ee 100644 ---- a/kernel/sched/wait-simple.c -+++ b/kernel/sched/wait-simple.c -@@ -40,6 +40,7 @@ void swait_prepare_locked(struct swait_head *head, struct swaiter *w) - if (list_empty(&w->node)) - __swait_enqueue(head, w); - } -+EXPORT_SYMBOL(swait_prepare_locked); - - void swait_prepare(struct swait_head *head, struct swaiter *w, int state) - { -@@ -58,6 +59,7 @@ void swait_finish_locked(struct swait_head *head, struct swaiter *w) - if (w->task) - __swait_dequeue(w); - } -+EXPORT_SYMBOL(swait_finish_locked); - - void swait_finish(struct swait_head *head, struct swaiter *w) - { --- -2.1.0 diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/defconfig deleted file mode 100644 index 34ee14d1..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt/defconfig +++ /dev/null @@ -1,439 +0,0 @@ -CONFIG_LOCALVERSION="-fslc" -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX50=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_IMX6ULL=y -CONFIG_SOC_IMX7D=y -CONFIG_SOC_VF610=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_HAVE_ARM_ARCH_TIMER=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT_RT_FULL=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -CONFIG_IPV6=y -CONFIG_VLAN_8021Q=y -CONFIG_LLC2=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CAN_M_CAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIBCM203X=y -CONFIG_BT_ATH3K=y -CONFIG_CFG80211=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_SPI_NOR=y -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=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_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -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_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_MICREL_PHY=y -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_CDC_EEM=m -CONFIG_BCMDHD=y -CONFIG_BCMDHD_SDIO=y -CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcm/ZP_BCM4339/fw_bcmdhd.bin" -CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcm/ZP_BCM4339/bcmdhd.ZP.OOB.cal" -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_ELAN_TS=y -CONFIG_TOUCHSCREEN_MAX11801=y -CONFIG_TOUCHSCREEN_IMX6UL_TSC=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_TOUCHSCREEN_TSC2007=y -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_INPUT_MPL3115=y -CONFIG_SENSOR_FXLS8471=y -CONFIG_INPUT_ISL29023=y -CONFIG_SERIO_SERPORT=m -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -CONFIG_HW_RANDOM_IMX_RNG=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_IMX=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_74X164=y -CONFIG_POWER_SUPPLY=y -CONFIG_SABRESD_MAX8903=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_SENSORS_MAX17135=y -CONFIG_SENSORS_MAG3110=y -CONFIG_THERMAL=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_MFD_MAX17135=y -CONFIG_MFD_SI476X_CORE=y -CONFIG_MFD_STMPE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX17135=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_RC_DEVICES=y -CONFIG_IR_GPIO_CIR=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_MXC_MIPI_CSI=m -CONFIG_MXC_CAMERA_OV5647_MIPI=m -CONFIG_SOC_CAMERA=y -CONFIG_VIDEO_MX3=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -CONFIG_RADIO_SI476X=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_FB_MXS_SII902X=y -CONFIG_FB_MXC_DCIC=m -CONFIG_HANNSTAR_CABC=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_FB_MXC_EINK_V2_PANEL=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_SII902X=y -CONFIG_SND_SOC_IMX_WM8958=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_SND_SOC_IMX_SI476X=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_USB=y -CONFIG_USB_OTG_WHITELIST=y -CONFIG_USB_OTG_FSM=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_HCD_TEST_MODE=y -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -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_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_IPU_V3_PRE=y -CONFIG_MXC_GPU_VIV=y -CONFIG_MXC_SIM=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_HDMI_CEC=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_DMATEST=m -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_IIO=y -CONFIG_IMX7D_ADC=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_TWOFISH=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt_4.1-2.0.x.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt_4.1-2.0.x.bb deleted file mode 100644 index 621023b4..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx-rt_4.1-2.0.x.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Realtime version of the FSL Community BSP i.MX6 Linux kernel with backported features and fixes" -DESCRIPTION = "Linux kernel based on NXP 4.1-2.0.0 GA release, used by FSL Community BSP in order to \ -provide support for i.MX6 based platforms and include official Linux kernel stable updates, backported \ -features and fixes coming from the vendors, kernel community or FSL Community itself. \ -In addition, this kernel has the realtime patch (PREEMPT_RT) applied." - -include linux-fslc.inc - -PV .= "+git${SRCPV}" - -SRCBRANCH = "4.1-2.0.x-imx" -SRCREV = "ee67fc7e072df596577e3a4e4fce7b51816d4b0a" - -SRC_URI += " \ - ${KERNELORG_MIRROR}/linux/kernel/projects/rt/4.1/older/patch-4.1.38-rt45.patch.gz;name=rt-patch \ - file://0001-fix-build.patch \ - file://0002-no-split-ptlocks.patch \ - file://0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch \ - file://0004-export-swait-locked-functions.patch \ -" - -SRC_URI[rt-patch.md5sum] = "6e86714997e190a45fb5b9c951d2c179" -SRC_URI[rt-patch.sha256sum] = "12aa4947ee656fa724e17d8971dcb3634a058c18afe59a472adfcd6f11d17f67" - - -COMPATIBLE_MACHINE = "(mx6|mx7)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/defconfig deleted file mode 100644 index f9e53a6a..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/defconfig +++ /dev/null @@ -1,426 +0,0 @@ -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX50=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_IMX6ULL=y -CONFIG_SOC_IMX7D=y -CONFIG_SOC_IMX6SLL=y -CONFIG_SOC_VF610=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_VLAN_8021Q=y -CONFIG_LLC2=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CAN_M_CAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIBCM203X=y -CONFIG_BT_ATH3K=y -CONFIG_CFG80211=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_SPI_NOR=y -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=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_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -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_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_MICREL_PHY=y -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_CDC_EEM=m -CONFIG_BCMDHD=y -CONFIG_BCMDHD_SDIO=y -CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcm/ZP_BCM4339/fw_bcmdhd.bin" -CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcm/ZP_BCM4339/bcmdhd.ZP.OOB.cal" -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_ELAN_TS=y -CONFIG_TOUCHSCREEN_MAX11801=y -CONFIG_TOUCHSCREEN_IMX6UL_TSC=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_TOUCHSCREEN_TSC2007=y -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_INPUT_MPL3115=y -CONFIG_SENSOR_FXLS8471=y -CONFIG_INPUT_ISL29023=y -CONFIG_SERIO_SERPORT=m -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -CONFIG_HW_RANDOM_IMX_RNG=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_IMX=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_74X164=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_POWER_SUPPLY=y -CONFIG_SABRESD_MAX8903=y -CONFIG_SENSORS_MAX17135=y -CONFIG_SENSORS_MAG3110=y -CONFIG_THERMAL=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_MFD_MAX17135=y -CONFIG_MFD_SI476X_CORE=y -CONFIG_MFD_STMPE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX17135=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_RC_DEVICES=y -CONFIG_IR_GPIO_CIR=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_MXC_MIPI_CSI=m -CONFIG_MXC_CAMERA_OV5647_MIPI=m -CONFIG_SOC_CAMERA=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -CONFIG_RADIO_SI476X=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_FB_MXS_SII902X=y -CONFIG_FB_MXC_DCIC=m -CONFIG_HANNSTAR_CABC=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_FB_MXC_EINK_V2_PANEL=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_SII902X=y -CONFIG_SND_SOC_IMX_WM8958=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_SND_SOC_IMX_SI476X=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_SND_SIMPLE_CARD=y -CONFIG_USB=y -CONFIG_USB_OTG_WHITELIST=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_HCD_TEST_MODE=y -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -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_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_IPU_V3_PRE=y -CONFIG_MXC_GPU_VIV=y -CONFIG_MXC_SIM=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_HDMI_CEC=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_DMADEVICES=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -CONFIG_DMATEST=m -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_IIO=y -CONFIG_IMX7D_ADC=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_FUNCTION_TRACER=y -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig new file mode 100644 index 00000000..622e5430 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig @@ -0,0 +1,552 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX50=y +CONFIG_SOC_IMX51=y +CONFIG_SOC_IMX53=y +CONFIG_SOC_IMX6Q=y +CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SLL=y +CONFIG_SOC_IMX6SX=y +CONFIG_SOC_IMX6UL=y +CONFIG_SOC_IMX7D=y +CONFIG_SOC_IMX7ULP=y +CONFIG_SOC_VF610=y +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +CONFIG_ARM_PSCI=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y +CONFIG_ARM_IMX7ULP_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_BINFMT_MISC=m +CONFIG_CMA=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_NETFILTER=y +CONFIG_VLAN_8021Q=m +CONFIG_LLC2=y +CONFIG_CAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_BT_HCIBTUSB=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_MRVL=y +CONFIG_BT_HCIVHCI=y +CONFIG_BT_MRVL=y +CONFIG_BT_MRVL_SDIO=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_IMX6=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +CONFIG_FW_LOADER_USER_HELPER=y +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=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_GPMI_NAND=y +CONFIG_MTD_NAND_VF610_NFC=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=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_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_PATA_IMX=y +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_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_AT803X_PHY=y +CONFIG_MICREL_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_MCS7830=y +CONFIG_BRCMFMAC=m +CONFIG_HOSTAP=y +CONFIG_WL12XX=m +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +# CONFIG_WILINK_PLATFORM_DATA is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=m +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_RPMSG=y +CONFIG_KEYBOARD_IMX=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=y +CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_ELAN_TS=y +CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_MAX11801=y +CONFIG_TOUCHSCREEN_IMX6UL_TSC=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_TOUCHSCREEN_MC13783=y +CONFIG_TOUCHSCREEN_TSC2004=y +CONFIG_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_SX8654=y +CONFIG_TOUCHSCREEN_COLIBRI_VF50=y +CONFIG_TOUCHSCREEN_FTS=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MMA8450=y +CONFIG_INPUT_MPL3115=y +CONFIG_SENSOR_FXLS8471=y +CONFIG_SENSOR_IMX_RPMSG=y +CONFIG_INPUT_ISL29023=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_I2C_IMX_LPI2C=y +CONFIG_SPI=y +CONFIG_SPI_FSL_LPSPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPI_SLAVE=y +CONFIG_SPI_SLAVE_TIME=y +CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_SIOX=m +CONFIG_GPIO_IMX_RPMSG=y +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCF857X=y +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +CONFIG_SABRESD_MAX8903=y +CONFIG_SENSORS_MC13783_ADC=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_MAX17135=y +CONFIG_SENSORS_MAG3110=y +CONFIG_THERMAL=y +CONFIG_THERMAL_STATISTICS=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_DA9063_WATCHDOG=m +CONFIG_DA9062_WATCHDOG=y +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 +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_MAX17135=y +CONFIG_MFD_RN5T618=y +CONFIG_MFD_SI476X_CORE=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_DA9063=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_MAX17135=y +CONFIG_REGULATOR_MC13783=y +CONFIG_REGULATOR_MC13892=y +CONFIG_REGULATOR_PF1550_RPMSG=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_RN5T618=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MUX=y +CONFIG_VIDEO_MXC_CAPTURE=m +CONFIG_VIDEO_MXC_OUTPUT=y +CONFIG_VIDEO_MXC_CSI_CAMERA=m +CONFIG_MXC_VADC=m +CONFIG_MXC_MIPI_CSI=m +CONFIG_MXC_CAMERA_OV5640=m +CONFIG_MXC_CAMERA_OV5640_V2=m +CONFIG_MXC_CAMERA_OV5640_MIPI=m +CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m +CONFIG_MXC_TVIN_ADV7180=m +CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m +CONFIG_VIDEO_MXC_IPU_OUTPUT=y +CONFIG_VIDEO_MXC_PXP_V4L2=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=m +CONFIG_VIDEO_IMX_PXP=y +CONFIG_RADIO_SI476X=y +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_OV5645=m +CONFIG_DRM=y +CONFIG_DRM_MSM=y +CONFIG_DRM_PANEL_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_SEIKO_43WVF1G=y +CONFIG_FB_MXS=y +CONFIG_FB_MXC_SYNC_PANEL=y +CONFIG_FB_MXC_OVERLAY=y +CONFIG_FB_MXC_MIPI_DSI_NORTHWEST=y +CONFIG_FB_MXC_ADV7535=y +CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y +CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y +CONFIG_FB_MXC_RK_PANEL_RK055AHD042=y +CONFIG_FB_MXC_RK_PANEL_RK055IQH042=y +CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y +CONFIG_FB_MXC_MIPI_DSI=y +CONFIG_FB_MXC_LDB=y +CONFIG_FB_MXC_EINK_PANEL=y +CONFIG_FB_MXC_EINK_V2_PANEL=y +CONFIG_FB_MXC_HDMI=y +CONFIG_FB_MXS_SII902X=y +CONFIG_FB_MXC_DCIC=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_WM8960=y +CONFIG_SND_SOC_IMX_SII902X=y +CONFIG_SND_SOC_IMX_WM8958=y +CONFIG_SND_SOC_IMX_CS42888=y +CONFIG_SND_SOC_IMX_WM8962=y +CONFIG_SND_SOC_IMX_RPMSG=y +CONFIG_SND_SOC_IMX_ES8328=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_MC13783=y +CONFIG_SND_SOC_IMX_SI476X=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_SND_SOC_AC97_CODEC=y +CONFIG_SND_SOC_TLV320AIC3X=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_HCD_TEST_MODE=y +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +CONFIG_USB_FSL_USB2=y +CONFIG_USB_CONFIGFS=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_DA9063=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_RTC_DRV_MXC_V2=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_RTC_DRV_IMX_RPMSG=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_IMX_SDMA=y +CONFIG_MXS_DMA=y +CONFIG_MXC_PXP_V2=y +CONFIG_MXC_PXP_V3=y +CONFIG_DMATEST=m +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_MAILBOX=y +CONFIG_IMX_MBOX=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_PWM=y +CONFIG_PWM_FSL_FTM=y +CONFIG_PWM_IMX27=y +CONFIG_PWM_IMX_TPM=y +CONFIG_PHY_MIXEL_LVDS=y +CONFIG_PHY_MIXEL_LVDS_COMBO=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_VF610_OCOTP=y +CONFIG_NVMEM_SNVS_LPGPR=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_MUX_MMIO=y +CONFIG_SIOX=m +CONFIG_SIOX_BUS_GPIO=m +CONFIG_MXC_SIM=y +CONFIG_MXC_IPU=y +CONFIG_MXC_SIMv2=y +CONFIG_MXC_MLB150=y +CONFIG_MXC_IPU_V3_PRE=y +CONFIG_MXC_HDMI_CEC=y +CONFIG_MXC_MIPI_CSI2=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_ECHAINIV=m +CONFIG_CRYPTO_TLS=m +CONFIG_CRYPTO_CFB=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_OFB=m +CONFIG_CRYPTO_XTS=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_SHA3=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TWOFISH=m +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_SAHARA=y +CONFIG_CRYPTO_DEV_MXS_DCP=y +CONFIG_CRC_CCITT=m +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_DMA_CMA=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig new file mode 100644 index 00000000..469ee0ef --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig @@ -0,0 +1,797 @@ +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_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=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_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_LAYERSCAPE=y +CONFIG_ARCH_MXC=y +CONFIG_ARCH_S32=y +CONFIG_SOC_S32V234=y +CONFIG_ARM64_VA_BITS_48=y +CONFIG_SCHED_MC=y +CONFIG_NUMA=y +CONFIG_SECCOMP=y +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y +CONFIG_XEN=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_COMPAT=y +CONFIG_RANDOMIZE_BASE=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPUFREQ_DT=y +CONFIG_ACPI_CPPC_CPUFREQ=m +CONFIG_ARM_SCPI_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y +CONFIG_QORIQ_CPUFREQ=y +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_EFI_CAPSULE_LOADER=y +CONFIG_IMX_DSP=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_MODVERSIONS=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_SIT=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_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +CONFIG_LLC2=y +CONFIG_TSN=y +CONFIG_NET_SWITCHDEV=y +CONFIG_BPF_JIT=y +CONFIG_CAN=m +CONFIG_CAN_FLEXCAN=m +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +# 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=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIUART_QCA=y +CONFIG_BT_HCIVHCI=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_LEDS=y +CONFIG_NET_9P=y +CONFIG_NET_9P_VIRTIO=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_IOV=y +CONFIG_HOTPLUG_PCI=y +CONFIG_HOTPLUG_PCI_ACPI=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_PCI_IMX6=y +CONFIG_PCI_LAYERSCAPE=y +CONFIG_PCI_HISI=y +CONFIG_PCIE_KIRIN=y +CONFIG_PCIE_LAYERSCAPE_GEN4=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FW_LOADER_USER_HELPER=y +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +CONFIG_BRCMSTB_GISB_ARB=y +CONFIG_SIMPLE_PM_BUS=y +CONFIG_VEXPRESS_CONFIG=y +CONFIG_FSL_MC_BUS=y +CONFIG_FSL_MC_UAPI_SUPPORT=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=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_GPMI_NAND=y +CONFIG_MTD_NAND_FSL_IFC=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +CONFIG_XEN_BLKDEV_BACKEND=m +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_NVME=y +CONFIG_SENSORS_FXOS8700=y +CONFIG_SENSORS_FXAS2100X=y +CONFIG_SRAM=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=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_SCSI_MPT3SAS=m +CONFIG_SCSI_UFSHCD=y +CONFIG_SCSI_UFSHCD_PLATFORM=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_AHCI_CEVA=y +CONFIG_AHCI_XGENE=y +CONFIG_AHCI_QORIQ=y +CONFIG_SATA_SIL24=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_AMD_XGBE=y +CONFIG_ATL1C=m +CONFIG_BNX2X=m +CONFIG_MACB=y +CONFIG_THUNDER_NIC_PF=y +CONFIG_FEC=y +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 +CONFIG_HNS3=y +CONFIG_HNS3_HCLGE=y +CONFIG_HNS3_ENET=y +CONFIG_E1000=y +CONFIG_E1000E=y +CONFIG_IGB=y +CONFIG_IGBVF=y +CONFIG_MVMDIO=y +CONFIG_SKY2=y +CONFIG_MLX4_EN=m +CONFIG_MLX5_CORE=m +CONFIG_MLX5_CORE_EN=y +CONFIG_MSCC_OCELOT_SWITCH=y +CONFIG_QCOM_EMAC=m +CONFIG_SMC91X=y +CONFIG_SMSC911X=y +CONFIG_STMMAC_ETH=m +CONFIG_MDIO_BITBANG=y +CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y +CONFIG_AQUANTIA_PHY=y +CONFIG_AT803X_PHY=y +CONFIG_INPHI_PHY=y +CONFIG_MARVELL_PHY=m +CONFIG_MARVELL_10G_PHY=m +CONFIG_MICREL_PHY=y +CONFIG_MICROSEMI_PHY=y +CONFIG_NXP_TJA11XX_PHY=y +CONFIG_REALTEK_PHY=y +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_BRCMFMAC=m +CONFIG_BRCMFMAC_PCIE=y +CONFIG_HOSTAP=y +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +CONFIG_IVSHMEM_NET=m +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_ADC=m +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_SNVS_PWRKEY=y +CONFIG_KEYBOARD_IMX_SC_PWRKEY=y +CONFIG_KEYBOARD_CROS_EC=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MPL3115=y +CONFIG_INPUT_ISL29023=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_DW=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_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_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_DESIGNWARE_PLATFORM=y +CONFIG_I2C_GPIO=m +CONFIG_I2C_IMX=y +CONFIG_I2C_IMX_LPI2C=y +CONFIG_I2C_RK3X=y +CONFIG_I2C_RPBUS=y +CONFIG_I2C_CROS_EC_TUNNEL=y +CONFIG_I2C_SLAVE=y +CONFIG_SPI=y +CONFIG_SPI_FSL_LPSPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_NXP_FLEXSPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_SPI_PL022=y +CONFIG_SPI_ROCKCHIP=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPI_SLAVE=y +CONFIG_SPI_SLAVE_TIME=y +CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y +CONFIG_SPMI=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_MAX77620=y +CONFIG_PINCTRL_IMX8MM=y +CONFIG_PINCTRL_IMX8MN=y +CONFIG_PINCTRL_IMX8MQ=y +CONFIG_PINCTRL_IMX8QM=y +CONFIG_PINCTRL_IMX8QXP=y +CONFIG_PINCTRL_S32V234=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_DWAPB=y +CONFIG_GPIO_MB86S7X=y +CONFIG_GPIO_MPC8XXX=y +CONFIG_GPIO_PL061=y +CONFIG_GPIO_XGENE=y +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_MAX77620=y +CONFIG_POWER_AVS=y +CONFIG_POWER_RESET_BRCMSTB=y +CONFIG_POWER_RESET_VEXPRESS=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_INA2XX=m +CONFIG_SENSORS_INA3221=m +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y +CONFIG_CPU_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_IMX_SC_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_IMX8MM_THERMAL=y +CONFIG_QORIQ_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y +CONFIG_ARM_SBSA_WATCHDOG=y +CONFIG_DW_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_IMX_SC_WDT=y +CONFIG_MFD_BD9571MWV=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MFD_HI6421_PMIC=y +CONFIG_MFD_MAX77620=y +CONFIG_MFD_RK808=y +CONFIG_MFD_SEC_CORE=y +CONFIG_MFD_ROHM_BD718XX=y +CONFIG_MFD_PCA9450=y +CONFIG_REGULATOR=y +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_MAX77620=y +CONFIG_REGULATOR_MAX8973=y +CONFIG_REGULATOR_PCA9450=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_PWM=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_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +# CONFIG_DVB_NET is not set +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MX8_CAPTURE=y +CONFIG_VIDEO_MXC_CAPTURE=y +CONFIG_VIDEO_MXC_CSI_CAMERA=y +CONFIG_MXC_MIPI_CSI=y +CONFIG_MXC_CAMERA_OV5640_MIPI_V2=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_OV5640=y +CONFIG_IMX_DPU_CORE=y +CONFIG_IMX_LCDIF_CORE=y +CONFIG_DRM=y +CONFIG_DRM_I2C_NXP_TDA998X=m +CONFIG_DRM_MALI_DISPLAY=m +CONFIG_DRM_NOUVEAU=m +CONFIG_DRM_RCAR_LVDS=m +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RAYDIUM_RM67191=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_ITE_IT6263=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_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_ETNAVIV=m +CONFIG_DRM_HISI_HIBMC=m +CONFIG_DRM_HISI_KIRIN=m +CONFIG_DRM_MXSFB=y +CONFIG_DRM_PL111=m +CONFIG_DRM_LIMA=m +CONFIG_DRM_PANFROST=m +CONFIG_FB_ARMCLCD=y +CONFIG_FB_EFI=y +CONFIG_BACKLIGHT_GENERIC=m +CONFIG_BACKLIGHT_PWM=y +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_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 +CONFIG_SND_SOC_IMX_AK5558=y +CONFIG_SND_SOC_IMX_AK4497=y +CONFIG_SND_SOC_IMX_WM8960=y +CONFIG_SND_SOC_IMX_WM8524=y +CONFIG_SND_SOC_IMX_CS42888=y +CONFIG_SND_SOC_IMX_MICFIL=y +CONFIG_SND_SOC_IMX_RPMSG=y +CONFIG_SND_SOC_IMX_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y +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_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_AK4613=m +CONFIG_SND_SOC_DMIC=m +CONFIG_SND_SOC_ES7134=m +CONFIG_SND_SOC_ES7241=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_PCM3168A_I2C=m +CONFIG_SND_SOC_SGTL5000=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_TAS571X=m +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_AUDIO_GRAPH_CARD=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_HCD_TEST_MODE=y +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +CONFIG_USB_MUSB_HDRC=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_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_USB_HSIC_USB3503=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_SNP_UDC_PLAT=y +CONFIG_USB_BDC_UDC=y +CONFIG_USB_CONFIGFS=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_TYPEC=y +CONFIG_TYPEC_TCPM=y +CONFIG_TYPEC_TCPCI=y +CONFIG_TYPEC_SWITCH_GPIO=y +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_F_SDH30=y +CONFIG_MMC_SPI=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_EXYNOS=y +CONFIG_MMC_DW_HI3798CV200=y +CONFIG_MMC_DW_K3=y +CONFIG_MMC_SDHCI_XENON=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_SYSCON=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=y +CONFIG_RTC_DRV_MAX77686=y +CONFIG_RTC_DRV_RK808=m +CONFIG_RTC_DRV_PCF85363=y +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_S5M=y +CONFIG_RTC_DRV_DS3232=y +CONFIG_RTC_DRV_PCF2127=y +CONFIG_RTC_DRV_EFI=y +CONFIG_RTC_DRV_CROS_EC=y +CONFIG_RTC_DRV_PL031=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_RTC_DRV_IMX_SC=y +CONFIG_DMADEVICES=y +CONFIG_BCM_SBA_RAID=m +CONFIG_FSL_EDMA=y +CONFIG_FSL_EDMA_V3=y +CONFIG_IMX_SDMA=y +CONFIG_MV_XOR_V2=y +CONFIG_MXS_DMA=y +CONFIG_PL330_DMA=y +CONFIG_QCOM_HIDMA_MGMT=y +CONFIG_QCOM_HIDMA=y +CONFIG_DMATEST=y +CONFIG_UIO=y +CONFIG_UIO_PCI_GENERIC=y +CONFIG_VFIO=y +CONFIG_VFIO_PCI=y +CONFIG_VFIO_FSL_MC=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_MMIO=y +CONFIG_XEN_GNTDEV=y +CONFIG_XEN_GRANT_DEV_ALLOC=y +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_IMX_CAPTURE=y +CONFIG_ION=y +CONFIG_ION_SYSTEM_HEAP=y +CONFIG_ION_CMA_HEAP=y +CONFIG_FSL_DPAA2=y +CONFIG_FSL_DPAA2_ETHSW=y +CONFIG_FSL_DPAA2_MAC=y +CONFIG_FSL_SDK_DPA=y +CONFIG_FSL_PPFE=y +CONFIG_FSL_PPFE_UTIL_DISABLED=y +CONFIG_MFD_CROS_EC=y +CONFIG_CROS_EC_I2C=y +CONFIG_CROS_EC_SPI=y +CONFIG_COMMON_CLK_VERSATILE=y +CONFIG_CLK_SP810=y +CONFIG_CLK_VEXPRESS_OSC=y +CONFIG_COMMON_CLK_RK808=y +CONFIG_COMMON_CLK_SCPI=y +CONFIG_COMMON_CLK_CS2000_CP=y +CONFIG_COMMON_CLK_S2MPS11=y +CONFIG_COMMON_CLK_XGENE=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_CLK_IMX8MM=y +CONFIG_CLK_IMX8MN=y +CONFIG_CLK_IMX8MQ=y +CONFIG_CLK_IMX8QXP=y +CONFIG_HWSPINLOCK=y +CONFIG_ARM_MHU=y +CONFIG_IMX_MBOX=y +CONFIG_PLATFORM_MHU=y +CONFIG_ARM_SMMU=y +CONFIG_ARM_SMMU_V3=y +CONFIG_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_SOC_TI=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_EXTCON_USBC_CROS_EC=y +CONFIG_IIO=y +CONFIG_IMX8QXP_ADC=y +CONFIG_IIO_CROS_EC_SENSORS_CORE=m +CONFIG_IIO_CROS_EC_SENSORS=m +CONFIG_IIO_CROS_EC_LIGHT_PROX=m +CONFIG_IIO_CROS_EC_BARO=m +CONFIG_PWM=y +CONFIG_PWM_CROS_EC=m +CONFIG_PWM_IMX27=y +CONFIG_PHY_XGENE=y +CONFIG_PHY_MIXEL_MIPI_DPHY=y +CONFIG_PHY_QCOM_USB_HS=y +CONFIG_PHY_SAMSUNG_USB2=y +CONFIG_FSL_IMX8_DDR_PMU=m +CONFIG_HISI_PMU=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_IMX_OCOTP_SCU=y +CONFIG_FPGA=y +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_MUX_MMIO=y +CONFIG_MXC_SIM=y +CONFIG_MXC_EMVSIM=y +CONFIG_MXC_MLB150=y +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_EFIVAR_FS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_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_USER=y +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_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_ANSI_CPRNG=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 +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=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 diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb deleted file mode 100644 index aff27bbf..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_4.9-1.0.x.bb +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2015, 2017 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "FSL Community BSP i.MX Linux kernel with backported features and fixes" -DESCRIPTION = "Linux kernel based on NXP 4.9.11-1.0.0 GA release, used by FSL Community BSP in order to \ -provide support for i.MX based platforms and include official Linux kernel stable updates, backported \ -features and fixes coming from the vendors, kernel community or FSL Community itself." - -include linux-fslc.inc - -PV .= "+git${SRCPV}" - -SRCBRANCH = "4.9-1.0.x-imx" -SRCREV = "953c6e30c9701fda69ef08e2476c541dc4fb1453" - -COMPATIBLE_MACHINE = "(mx6|mx7)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb new file mode 100644 index 00000000..ef3a7d52 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-imx_5.4.bb @@ -0,0 +1,86 @@ +# Released under the MIT license (see COPYING.MIT for the terms) +# +# SPDX-License-Identifier: MIT +# + +SUMMARY = "Linux Kernel provided by NXP and supported by Community" +DESCRIPTION = "Linux Kernel provided by NXP as the part of release distribution. \ +Main focus is set on i.MX Family Reference Boards. \ +It includes support for many NXP Proprietary IPs (GPU, VPU, IPU). \ +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; +# 3. Critical patches, which are not (yet) integrated into either of 2 above +# sources, but are required to be applied to the kernel tree. +# +# Therefore, there is a need to keep track on the patches which are introduced +# from every source. This could be achieved in this recipe by filling the +# below list with the information once the update is performed from any source. +# +# Once the critical patch gets merged into the stable branch, or NXP-specific +# patches would be covered by the tag - individual entries from sections below +# could be removed. +# +# ------------------------------------------------------------------------------ +# 1. Stable (tag or SHA(s)) +# ------------------------------------------------------------------------------ +# tag: v5.4.51 +# +# ------------------------------------------------------------------------------ +# 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 +# +# ------------------------------------------------------------------------------ +# 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 +# +# NOTE to upgraders: +# This recipe should NOT collect individual patches, they should be applied to +# the linux-fslc kernel tree on the corresponding branch, and tracking +# information should be properly filled in above. +############################################################################### + +include linux-fslc.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +SRCBRANCH = "5.4-1.0.0-imx" +SRCREV = "9fb52fae75909b9ca83b2a04e824f97d2df85302" + +# 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" + +# Local version indicates the branch name in the NXP kernel tree where patches are collected from. +LOCALVERSION = "-lf-5.4.y" + +DEFAULT_PREFERENCE = "1" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19.bb new file mode 100644 index 00000000..41b09347 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19.bb @@ -0,0 +1,19 @@ +# Copyright (C) 2012-2020 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "FSL Community BSP Linux mainline based kernel with backported features and fixes" +DESCRIPTION = "Linux kernel based on mainline kernel used by FSL Community BSP in order to \ +provide support for some backported features and fixes, or because it was applied in linux-next \ +and takes some time to become part of a stable version, or because it is not applicable for \ +upstreaming." + +include linux-fslc.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +PV = "4.19.125+git${SRCPV}" + +SRCBRANCH = "4.19.x+fslc" +SRCREV = "d839dc0169b3c568813f2ee2abc30720f5244b89" + +COMPATIBLE_MACHINE = "(mxs|mx5|mx6|vf|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/defconfig new file mode 100644 index 00000000..bab877b9 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/defconfig @@ -0,0 +1,451 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_NAMESPACES=y +CONFIG_NET_NS=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG 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_IMX50=y +CONFIG_SOC_IMX51=y +CONFIG_SOC_IMX53=y +CONFIG_SOC_IMX6Q=y +CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SLL=y +CONFIG_SOC_IMX6SX=y +CONFIG_SOC_IMX6UL=y +CONFIG_SOC_IMX7D=y +CONFIG_SOC_VF610=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_IMX6=y +CONFIG_SMP=y +CONFIG_ARM_PSCI=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_BINFMT_MISC=m +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_NETFILTER=y +CONFIG_CAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_BT=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_BNEP=m +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_FW_LOADER_USER_HELPER=y +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SST25L=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_NAND_VF610_NFC=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_SPI_NOR=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_PATA_IMX=y +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_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_AT803X_PHY=y +CONFIG_MICREL_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_BRCMFMAC=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MWIFIEX_PCIE=m +CONFIG_WL12XX=m +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +# CONFIG_WILINK_PLATFORM_DATA is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_SNVS_PWRKEY=y +CONFIG_KEYBOARD_IMX=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=y +CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_MAX11801=y +CONFIG_TOUCHSCREEN_IMX6UL_TSC=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_TOUCHSCREEN_MC13783=y +CONFIG_TOUCHSCREEN_TSC2004=y +CONFIG_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_SX8654=y +CONFIG_TOUCHSCREEN_COLIBRI_VF50=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MMA8450=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_MC9S08DZ60=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_DA9062_WATCHDOG=y +CONFIG_RN5T618_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_DA9052_I2C=y +CONFIG_MFD_DA9062=y +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_RN5T618=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_MC13783=y +CONFIG_REGULATOR_MC13892=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_RN5T618=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +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_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_OV5640=m +CONFIG_IMX_IPUV3_CORE=y +CONFIG_DRM=y +CONFIG_DRM_PANEL_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_SEIKO_43WVF1G=y +CONFIG_DRM_DW_HDMI_AHB_AUDIO=m +CONFIG_DRM_DW_HDMI_CEC=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_LDB=y +CONFIG_DRM_IMX_HDMI=y +CONFIG_DRM_ETNAVIV=y +CONFIG_DRM_MXSFB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_FSL_ASRC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_PHYCORE_AC97=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_ES8328=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_MC13783=y +CONFIG_SND_SOC_FSL_ASOC_CARD=y +CONFIG_SND_SOC_AC97_CODEC=y +CONFIG_SND_SOC_CS42XX8_I2C=y +CONFIG_SND_SOC_TLV320AIC3X=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_SOC_WM8962=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_PRINTER=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +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_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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_DA9063=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_RTC_DRV_MXC_V2=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_IMX_SDMA=y +CONFIG_MXS_DMA=y +CONFIG_DMATEST=m +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_IMX_MEDIA=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_IIO=y +CONFIG_MMA8452=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_SENSORS_ISL29018=y +CONFIG_MAG3110=y +CONFIG_MPL3115=y +CONFIG_PWM=y +CONFIG_PWM_FSL_FTM=y +CONFIG_PWM_IMX=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_VF610_OCOTP=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_MUX_MMIO=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_PROVE_LOCKING=y +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_FUNCTION_TRACER=y +# CONFIG_ARM_UNWIND is not set +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_SAHARA=y +CONFIG_CRC_CCITT=m +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_USER_NS=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_FQ_CODEL=y +CONFIG_NET_SCH_FIFO=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mx25/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mx25/defconfig new file mode 100644 index 00000000..4cd2f4a2 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mx25/defconfig @@ -0,0 +1,189 @@ +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +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_ARCH_MULTI_V4T=y +CONFIG_ARCH_MULTI_V5=y +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MXC=y +CONFIG_MACH_MX21ADS=y +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_PREEMPT=y +CONFIG_AEABI=y +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_PM_DEBUG=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_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_IMX_WEIM=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set +# CONFIG_MTD_CFI_I2 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_UBI=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_PATA_IMX=y +CONFIG_NETDEVICES=y +CONFIG_CS89x0=y +CONFIG_CS89x0_PLATFORM=y +CONFIG_DM9000=y +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +CONFIG_SMSC_PHY=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_IMX=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_MX25=y +CONFIG_TOUCHSCREEN_MC13783=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=m +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_SPIDEV=y +CONFIG_GPIO_SYSFS=y +CONFIG_W1=y +CONFIG_W1_MASTER_MXC=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_HWMON=m +CONFIG_SENSORS_MC13783_ADC=m +CONFIG_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MX25_TSADC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_MC13783=y +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 +CONFIG_FB_IMX=y +CONFIG_LCD_L4F00242T03=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_MX27VIS_AIC32X4=y +CONFIG_SND_SOC_PHYCORE_AC97=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_MC13783=y +CONFIG_SND_SOC_FSL_ASOC_CARD=y +CONFIG_SND_SOC_SGTL5000=y +CONFIG_USB_HID=m +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_CHIPIDEA_ULPI=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_USB_ULPI_BUS=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_MMC_MXC=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_MC13783=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_IMXDI=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_DMADEVICES=y +CONFIG_IMX_DMA=y +CONFIG_IMX_SDMA=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_FSL_MX25_ADC=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_VFAT_FS=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_FONTS=y +CONFIG_FONT_8x8=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mxs/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mxs/defconfig new file mode 100644 index 00000000..7b821285 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mxs/defconfig @@ -0,0 +1,180 @@ +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_CGROUPS=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_PERF_EVENTS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +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_ARCH_MULTI_V7 is not set +CONFIG_ARCH_MXS=y +# CONFIG_ARM_THUMB is not set +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_AEABI=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_SYN_COOKIES=y +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_CAN=m +CONFIG_CAN_FLEXCAN=m +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SST25L=y +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +# CONFIG_BLK_DEV is not set +CONFIG_EEPROM_AT24=y +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_NETDEVICES=y +CONFIG_ENC28J60=y +CONFIG_ICPLUS_PHY=y +CONFIG_MICREL_PHY=y +CONFIG_REALTEK_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_SMSC95XX=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_MXS_LRADC=y +CONFIG_TOUCHSCREEN_TSC2007=m +# CONFIG_SERIO is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MXS_AUART=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MXS=y +CONFIG_SPI=y +CONFIG_SPI_GPIO=m +CONFIG_SPI_MXS=y +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_STMP3XXX_RTC_WATCHDOG=y +CONFIG_MFD_MXS_LRADC=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_DRM=y +CONFIG_DRM_PANEL_SEIKO_43WVF1G=y +CONFIG_DRM_MXSFB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_MXS_SOC=y +CONFIG_SND_SOC_MXS_SGTL5000=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +CONFIG_USB_ETH=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_MMC=y +CONFIG_MMC_MXS=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_STMP=y +CONFIG_DMADEVICES=y +CONFIG_MXS_DMA=y +CONFIG_IIO=y +CONFIG_MXS_LRADC_ADC=y +CONFIG_IIO_SYSFS_TRIGGER=y +CONFIG_PWM=y +CONFIG_PWM_MXS=y +CONFIG_NVMEM_MXS_OCOTP=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_FSCACHE=m +CONFIG_FSCACHE_STATS=y +CONFIG_CACHEFILES=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RUBIN=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_WARN=2048 +CONFIG_UNUSED_SYMBOLS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_PROVE_LOCKING=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_STRICT_DEVMEM=y +CONFIG_DEBUG_USER=y +CONFIG_CRYPTO_DEV_MXS_DCP=y +CONFIG_CRC_ITU_T=m +CONFIG_CRC7=m +CONFIG_FONTS=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb new file mode 100644 index 00000000..3ce5c1b6 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb @@ -0,0 +1,17 @@ +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Mainline/LTS rebased NXP/QorIQ patches + FSLC patches." +DESCRIPTION = "Linux kernel based on LTS kernel used by FSL Community BSP in order to \ +provide support for some backported features and fixes, or because it was applied in linux-next \ +and takes some time to become part of a stable version, or because it is not applicable for \ +upstreaming." + +require recipes-kernel/linux/linux-qoriq.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +LINUX_VERSION = "5.4.51" + +SRCBRANCH = "5.4.y+qoriq+fslc" +SRCREV = "c34b53c0927fcefcdea3be16cc1fb9fdcbedbe40" +SRC_URI := "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH}" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/defconfig index 6985d61e..dbb2387c 100644 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/defconfig +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/defconfig @@ -38,6 +38,7 @@ CONFIG_SOC_IMX6SLL=y CONFIG_SOC_IMX6SX=y CONFIG_SOC_IMX6UL=y CONFIG_SOC_IMX7D=y +CONFIG_SOC_IMX7ULP=y CONFIG_SOC_VF610=y CONFIG_PCI=y CONFIG_PCI_MSI=y @@ -56,8 +57,10 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPUFREQ_DT=y CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y CONFIG_CPU_IDLE=y CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_PM_DEBUG=y @@ -81,6 +84,7 @@ CONFIG_NETFILTER=y CONFIG_CAN=y CONFIG_CAN_FLEXCAN=y CONFIG_BT=y +CONFIG_BT_BNEP=m CONFIG_BT_HCIUART=y CONFIG_BT_HCIUART_LL=y CONFIG_CFG80211=y @@ -108,7 +112,7 @@ CONFIG_MTD_PHYSMAP_OF=y CONFIG_MTD_DATAFLASH=y CONFIG_MTD_M25P80=y CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y +CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_GPMI_NAND=y CONFIG_MTD_NAND_VF610_NFC=y CONFIG_MTD_NAND_MXC=y @@ -175,6 +179,7 @@ CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_ADS7846=y CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_GOODIX=y CONFIG_TOUCHSCREEN_MAX11801=y CONFIG_TOUCHSCREEN_IMX6UL_TSC=y CONFIG_TOUCHSCREEN_EDT_FT5X06=y @@ -207,9 +212,11 @@ CONFIG_SPI_GPIO=y CONFIG_SPI_IMX=y CONFIG_SPI_FSL_DSPI=y CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_SIOX=m CONFIG_GPIO_MAX732X=y CONFIG_GPIO_MC9S08DZ60=y CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCF857X=y CONFIG_GPIO_STMPE=y CONFIG_GPIO_74X164=y CONFIG_POWER_RESET=y @@ -219,15 +226,18 @@ CONFIG_POWER_SUPPLY=y CONFIG_SENSORS_MC13783_ADC=y CONFIG_SENSORS_GPIO_FAN=y CONFIG_SENSORS_IIO_HWMON=y +CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_CPU_THERMAL=y CONFIG_IMX_THERMAL=y CONFIG_WATCHDOG=y CONFIG_DA9062_WATCHDOG=y +CONFIG_DA9063_WATCHDOG=m CONFIG_RN5T618_WATCHDOG=y CONFIG_IMX2_WDT=y CONFIG_MFD_DA9052_I2C=y CONFIG_MFD_DA9062=y +CONFIG_MFD_DA9063=y CONFIG_MFD_MC13XXX_SPI=y CONFIG_MFD_MC13XXX_I2C=y CONFIG_MFD_RN5T618=y @@ -237,6 +247,7 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_ANATOP=y CONFIG_REGULATOR_DA9052=y CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_DA9063=y CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y @@ -256,11 +267,15 @@ CONFIG_VIDEO_MUX=y CONFIG_SOC_CAMERA=y CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_CODA=m +CONFIG_VIDEO_IMX_PXP=y # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_OV2680=m CONFIG_VIDEO_OV5640=m +CONFIG_VIDEO_OV5645=m CONFIG_IMX_IPUV3_CORE=y CONFIG_DRM=y +CONFIG_DRM_MSM=y CONFIG_DRM_PANEL_LVDS=y CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_SEIKO_43WVF1G=y @@ -302,6 +317,7 @@ CONFIG_SND_SOC_WM8962=y CONFIG_SND_SIMPLE_CARD=y CONFIG_HID_MULTITOUCH=y CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_MXC=y CONFIG_USB_STORAGE=y @@ -389,12 +405,16 @@ CONFIG_MAG3110=y CONFIG_MPL3115=y CONFIG_PWM=y CONFIG_PWM_FSL_FTM=y -CONFIG_PWM_IMX=y +CONFIG_PWM_IMX27=y +CONFIG_PWM_IMX_TPM=y CONFIG_NVMEM_IMX_OCOTP=y CONFIG_NVMEM_VF610_OCOTP=y +CONFIG_NVMEM_SNVS_LPGPR=y CONFIG_TEE=y CONFIG_OPTEE=y CONFIG_MUX_MMIO=y +CONFIG_SIOX=m +CONFIG_SIOX_BUS_GPIO=m CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y @@ -429,6 +449,7 @@ CONFIG_NLS_UTF8=y CONFIG_SECURITYFS=y CONFIG_CRYPTO_DEV_FSL_CAAM=y CONFIG_CRYPTO_DEV_SAHARA=y +CONFIG_CRYPTO_DEV_MXS_DCP=y CONFIG_CRC_CCITT=m CONFIG_CRC_T10DIF=y CONFIG_CRC7=m @@ -438,7 +459,11 @@ CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y CONFIG_PRINTK_TIME=y CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_FS=y # CONFIG_SCHED_DEBUG is not set 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 diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig index 8661dd9b..2b2d617e 100644 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig @@ -47,7 +47,6 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_DIAG is not set # CONFIG_IPV6 is not set CONFIG_NETFILTER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_IMX_WEIM=y @@ -61,7 +60,7 @@ CONFIG_MTD_CFI_GEOMETRY=y # CONFIG_MTD_CFI_I2 is not set CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_NAND=y +CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_MXC=y CONFIG_MTD_UBI=y CONFIG_EEPROM_AT24=y @@ -170,6 +169,9 @@ CONFIG_IMX_SDMA=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_IIO=y CONFIG_FSL_MX25_ADC=y +CONFIG_PWM=y +CONFIG_PWM_IMX1=y +CONFIG_PWM_IMX27=y CONFIG_EXT4_FS=y # CONFIG_DNOTIFY is not set CONFIG_VFAT_FS=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig index 38480596..2773899c 100644 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig @@ -50,7 +50,7 @@ CONFIG_MTD_BLOCK=y CONFIG_MTD_DATAFLASH=y CONFIG_MTD_M25P80=y CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y +CONFIG_MTD_RAW_NAND=y CONFIG_MTD_NAND_GPMI_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_UBI=y @@ -96,7 +96,6 @@ CONFIG_DRM=y CONFIG_DRM_PANEL_SEIKO_43WVF1G=y CONFIG_DRM_MXSFB=y CONFIG_FB_MODE_HELPERS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_PWM=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_4.20.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_4.20.bb deleted file mode 100644 index d7bf4b7a..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_4.20.bb +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2012-2019 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "FSL Community BSP Linux mainline based kernel with backported features and fixes" -DESCRIPTION = "Linux kernel based on mainline kernel used by FSL Community BSP in order to \ -provide support for some backported features and fixes, or because it was applied in linux-next \ -and takes some time to become part of a stable version, or because it is not applicable for \ -upstreaming." - -include linux-fslc.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -PV = "4.20+git${SRCPV}" - -SRCBRANCH = "4.20.x+fslc" -SRCREV = "bf414f71d71348bf549d320fa6518b04738dbaa1" - -COMPATIBLE_MACHINE = "(mxs|mx5|mx6|vf|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_5.4.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_5.4.bb new file mode 100644 index 00000000..cd7fb7a8 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-fslc_5.4.bb @@ -0,0 +1,27 @@ +# Copyright (C) 2012-2019 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) +# +# SPDX-License-Identifier: MIT +# + +SUMMARY = "FSL Community BSP Linux mainline based kernel with backported features and fixes" +DESCRIPTION = "Linux kernel based on mainline kernel used by FSL Community BSP in order to \ +provide support for some backported features and fixes, or because it was applied in linux-next \ +and takes some time to become part of a stable version, or because it is not applicable for \ +upstreaming." + +include linux-fslc.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +# 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" + +SRCBRANCH = "5.4.x+fslc" +SRCREV = "d051c7c9af6fa0bb57603ec927ea2674521167c8" + +COMPATIBLE_MACHINE = "(mxs|mx5|mx6|vf|use-mainline-bsp)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/imx/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/imx/defconfig deleted file mode 100644 index 85410638..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/imx/defconfig +++ /dev/null @@ -1,466 +0,0 @@ -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX50=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_IMX6ULL=y -CONFIG_SOC_IMX7D=y -CONFIG_SOC_IMX6SLL=y -CONFIG_SOC_IMX7ULP=y -CONFIG_SOC_VF610=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_ARM_PSCI=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_ARM_IMX7ULP_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_VLAN_8021Q=y -CONFIG_LLC2=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CAN_M_CAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIBCM203X=y -CONFIG_BT_ATH3K=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_SPI_NOR=y -# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=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_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -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_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_MICREL_PHY=y -CONFIG_USB_KAWETH=y -CONFIG_USB_PEGASUS=y -CONFIG_USB_RTL8150=y -CONFIG_USB_RTL8152=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_CDC_EEM=m -CONFIG_BCMDHD=y -CONFIG_BCMDHD_SDIO=y -CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcm/ZP_BCM4339/fw_bcmdhd.bin" -CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcm/ZP_BCM4339/bcmdhd.ZP.OOB.cal" -CONFIG_HOSTAP=y -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_RPMSG=y -CONFIG_KEYBOARD_PF1550_ONKEY=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_ELAN_TS=y -CONFIG_TOUCHSCREEN_MAX11801=y -CONFIG_TOUCHSCREEN_IMX6UL_TSC=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_TOUCHSCREEN_TSC2007=y -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_TOUCHSCREEN_FTS=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_INPUT_MPL3115=y -CONFIG_SENSOR_FXLS8471=y -CONFIG_SENSOR_IMX_RPMSG=y -CONFIG_INPUT_ISL29023=y -CONFIG_SERIO_SERPORT=m -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -CONFIG_HW_RANDOM_IMX_RNG=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_I2C_IMX_LPI2C=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_IMX=y -CONFIG_SPI_FSL_LPSPI=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_IMX_RPMSG=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_74X164=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_POWER_SUPPLY=y -CONFIG_CHARGER_PF1550=y -CONFIG_SABRESD_MAX8903=y -CONFIG_SENSORS_MAX17135=y -CONFIG_SENSORS_MAG3110=y -CONFIG_THERMAL=y -CONFIG_THERMAL_WRITABLE_TRIPS=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_IMX7ULP_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_MFD_PF1550=y -CONFIG_MFD_MAX17135=y -CONFIG_MFD_SI476X_CORE=y -CONFIG_MFD_STMPE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX17135=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_REGULATOR_PF1550=y -CONFIG_REGULATOR_PF1550_RPMSG=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_RC_DEVICES=y -CONFIG_IR_GPIO_CIR=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_MXC_MIPI_CSI=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5640_V2=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m -CONFIG_MXC_CAMERA_OV5647_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_SOC_CAMERA=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -CONFIG_RADIO_SI476X=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_OVERLAY=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y -CONFIG_FB_MXC_MIPI_DSI_NORTHWEST=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_FB_MXS_SII902X=y -CONFIG_FB_MXC_DCIC=m -CONFIG_FB_MXC_ADV7535=y -CONFIG_HANNSTAR_CABC=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_FB_MXC_EINK_V2_PANEL=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_BACKLIGHT_GPIO=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_SII902X=y -CONFIG_SND_SOC_IMX_WM8958=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_RPMSG=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_SND_SOC_IMX_SI476X=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_USB=y -CONFIG_USB_OTG_WHITELIST=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_HCD_TEST_MODE=y -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_TEST=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_CONFIGFS=y -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_FSL_UTP=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_IPU_V3_PRE=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_HDMI_CEC=y -CONFIG_MXC_SIM=y -CONFIG_MXC_SIMv2=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_RTC_DRV_IMX_RPMSG=y -CONFIG_DMADEVICES=y -CONFIG_FSL_EDMA=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -CONFIG_DMATEST=m -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -CONFIG_ION=y -CONFIG_ION_MXC=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXTCON_USB_GPIO=y -CONFIG_IIO=y -CONFIG_IMX7D_ADC=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_PWM_TPM=y -CONFIG_TEE=y -CONFIG_OPTEE=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/mx8/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/mx8/defconfig deleted file mode 100644 index f7df110b..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-4.9.123/mx8/defconfig +++ /dev/null @@ -1,679 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_AUDIT=y -CONFIG_NO_HZ_IDLE=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -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_NAMESPACES=y -CONFIG_USER_NS=y -CONFIG_SCHED_AUTOGROUP=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_COMPAT_BRK is not set -CONFIG_PROFILING=y -CONFIG_JUMP_LABEL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_ARCH_SUNXI=y -CONFIG_ARCH_ALPINE=y -CONFIG_ARCH_BCM_IPROC=y -CONFIG_ARCH_BERLIN=y -CONFIG_ARCH_EXYNOS=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_QCOM=y -CONFIG_ARCH_ROCKCHIP=y -CONFIG_ARCH_SEATTLE=y -CONFIG_ARCH_RENESAS=y -CONFIG_ARCH_R8A7795=y -CONFIG_ARCH_R8A7796=y -CONFIG_ARCH_STRATIX10=y -CONFIG_ARCH_TEGRA=y -CONFIG_ARCH_SPRD=y -CONFIG_ARCH_THUNDER=y -CONFIG_ARCH_UNIPHIER=y -CONFIG_ARCH_VEXPRESS=y -CONFIG_ARCH_VULCAN=y -CONFIG_ARCH_XGENE=y -CONFIG_ARCH_ZX=y -CONFIG_ARCH_ZYNQMP=y -CONFIG_ARCH_FSL_IMX8QM=y -CONFIG_ARCH_FSL_IMX8QP=y -CONFIG_ARCH_FSL_IMX8QXP=y -CONFIG_ARCH_FSL_IMX8MQ=y -CONFIG_ARCH_FSL_IMX8MM=y -CONFIG_PCI=y -CONFIG_PCI_IOV=y -CONFIG_PCI_AARDVARK=y -CONFIG_PCI_IMX6=y -CONFIG_PCIE_RCAR=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_PCI_XGENE=y -CONFIG_PCI_HISI=y -CONFIG_ARM64_VA_BITS_48=y -CONFIG_SCHED_MC=y -CONFIG_PREEMPT=y -CONFIG_KSM=y -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_CMA=y -CONFIG_SECCOMP=y -CONFIG_KEXEC=y -CONFIG_XEN=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_COMPAT=y -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_ARM_CPUIDLE=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_CPUFREQ_DT=y -CONFIG_ARM_BIG_LITTLE_CPUFREQ=y -CONFIG_ARM_IMX8_CPUFREQ=y -CONFIG_ARM_IMX8MQ_CPUFREQ=y -CONFIG_ARM_SCPI_CPUFREQ=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_NF_CONNTRACK_IPV4=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_NF_CONNTRACK_IPV6=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_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_VLAN_8021Q_MVRP=y -CONFIG_LLC2=y -CONFIG_BPF_JIT=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_LEDS=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_3WIRE=y -CONFIG_BT_HCIUART_BCM=y -CONFIG_BT_HCIUART_QCA=y -CONFIG_BT_HCIVHCI=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_MAC80211_LEDS=y -CONFIG_NET_9P=y -CONFIG_NET_9P_VIRTIO=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=320 -CONFIG_ARM_CCI400_PMU=y -CONFIG_ARM_CCI5xx_PMU=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_RAM=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SLRAM=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_SPI_NOR=y -# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_SPI_FSL_FLEXSPI=y -CONFIG_MTD_UBI=y -CONFIG_OF_OVERLAY=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_NBD=m -CONFIG_XEN_BLKDEV_BACKEND=y -CONFIG_VIRTIO_BLK=y -CONFIG_SENSORS_FXOS8700=y -CONFIG_SENSORS_FXAS2100X=y -CONFIG_SRAM=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_SAS_ATA=y -CONFIG_SCSI_HISI_SAS=y -CONFIG_ATA=y -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=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_NETDEVICES=y -CONFIG_MACVLAN=m -CONFIG_MACVTAP=m -CONFIG_TUN=y -CONFIG_VETH=m -CONFIG_VIRTIO_NET=y -CONFIG_AMD_XGBE=y -CONFIG_NET_XGENE=y -CONFIG_MACB=y -CONFIG_HNS_DSAF=y -CONFIG_HNS_ENET=y -CONFIG_E1000E=y -CONFIG_IGB=y -CONFIG_IGBVF=y -CONFIG_SKY2=y -CONFIG_RAVB=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -CONFIG_STMMAC_ETH=m -CONFIG_AT803X_PHY=y -CONFIG_MICREL_PHY=y -CONFIG_NXP_TJA110X_PHY=y -CONFIG_REALTEK_PHY=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=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_WLAN_VENDOR_ATH is not set -CONFIG_BCMDHD_1363=y -CONFIG_BCMDHD_PCIE=y -CONFIG_HOSTAP=y -CONFIG_RTL_CARDS=m -# CONFIG_WLAN_VENDOR_TI is not set -CONFIG_XEN_NETDEV_BACKEND=m -CONFIG_IVSHMEM_NET=y -CONFIG_INPUT_POLLDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_IMX_SC_PWRKEY=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PM8941_PWRKEY=y -CONFIG_INPUT_HISI_POWERKEY=y -CONFIG_INPUT_MPL3115=y -CONFIG_INPUT_ISL29023=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_DW=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_IMX_CONSOLE=y -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=11 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_SERIAL_MSM=y -CONFIG_SERIAL_MSM_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_MVEBU_UART=y -CONFIG_VIRTIO_CONSOLE=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX_PCA954x=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -CONFIG_I2C_IMX=y -CONFIG_I2C_IMX_LPI2C=y -CONFIG_I2C_MESON=y -CONFIG_I2C_MV64XXX=y -CONFIG_I2C_QUP=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_IMX=y -CONFIG_SPI_FSL_LPSPI=y -CONFIG_SPI_MESON_SPIFC=m -CONFIG_SPI_ORION=y -CONFIG_SPI_PL022=y -CONFIG_SPI_QUP=y -CONFIG_SPI_S3C64XX=y -CONFIG_SPI_SPIDEV=m -CONFIG_SPMI=y -CONFIG_PINCTRL_SINGLE=y -CONFIG_PINCTRL_MAX77620=y -CONFIG_PINCTRL_MSM8916=y -CONFIG_PINCTRL_MSM8996=y -CONFIG_PINCTRL_QDF2XXX=y -CONFIG_PINCTRL_QCOM_SPMI_PMIC=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_DWAPB=y -CONFIG_GPIO_PL061=y -CONFIG_GPIO_RCAR=y -CONFIG_GPIO_XGENE=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_MAX77620=y -CONFIG_POWER_AVS=y -CONFIG_ROCKCHIP_IODOMAIN=y -CONFIG_POWER_RESET_MSM=y -CONFIG_POWER_RESET_XGENE=y -CONFIG_POWER_RESET_SYSCON=y -CONFIG_BATTERY_BQ27XXX=y -CONFIG_SENSORS_ARM_SCPI=y -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_INA2XX=m -# CONFIG_MXC_MMA8451 is not set -CONFIG_THERMAL_WRITABLE_TRIPS=y -CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y -CONFIG_CPU_THERMAL=y -CONFIG_THERMAL_EMULATION=y -CONFIG_IMX8M_THERMAL=y -CONFIG_IMX8MM_THERMAL=y -CONFIG_IMX_SC_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_EXYNOS_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_S3C2410_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_IMX8_WDT=y -CONFIG_MESON_GXBB_WATCHDOG=m -CONFIG_MESON_WATCHDOG=m -CONFIG_RENESAS_WDT=y -CONFIG_MFD_CROS_EC=y -CONFIG_MFD_CROS_EC_I2C=y -CONFIG_MFD_HI655X_PMIC=y -CONFIG_MFD_MAX77620=y -CONFIG_MFD_SPMI_PMIC=y -CONFIG_MFD_SEC_CORE=y -CONFIG_MFD_BD71837=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_HI655X=y -CONFIG_REGULATOR_MAX77620=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_REGULATOR_PWM=y -CONFIG_REGULATOR_QCOM_SMD_RPM=y -CONFIG_REGULATOR_QCOM_SPMI=y -CONFIG_REGULATOR_S2MPS11=y -CONFIG_REGULATOR_BD71837=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_CAPTURE=y -CONFIG_VIDEO_MX8_CAPTURE=y -CONFIG_GMSL_MAX9286=y -CONFIG_VIDEO_MXC_CSI_CAMERA=y -CONFIG_MXC_MIPI_CSI=y -CONFIG_MXC_CAMERA_OV5640_MIPI_V2=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_IMX_DPU_CORE=y -CONFIG_IMX_DCSS_CORE=y -CONFIG_IMX_LCDIF_CORE=y -CONFIG_DRM=y -CONFIG_DRM_NOUVEAU=m -CONFIG_DRM_VIVANTE=m -CONFIG_DRM_MSM=m -CONFIG_DRM_TEGRA=m -CONFIG_DRM_PANEL_SIMPLE=y -CONFIG_DRM_PANEL_RAYDIUM_RM67191=y -CONFIG_DRM_I2C_ADV7511=y -CONFIG_DRM_ITE_IT6263=y -CONFIG_DRM_IMX_PARALLEL_DISPLAY=y -CONFIG_DRM_IMX_TVE=y -CONFIG_DRM_IMX_LDB=y -CONFIG_DRM_IMX_HDMI=y -CONFIG_DRM_IMX_NWL_DSI=y -CONFIG_DRM_IMX_SEC_DSIM=y -CONFIG_DRM_IMX_HDP=y -CONFIG_IMX_HDP_CEC=y -CONFIG_DRM_HISI_KIRIN=m -CONFIG_DRM_MXSFB=y -CONFIG_FB_IMX64=y -CONFIG_FB_IMX64_DEBUG=y -CONFIG_FB_ARMCLCD=y -CONFIG_FB_MXC_DISP_FRAMEWORK=y -CONFIG_BACKLIGHT_GENERIC=m -CONFIG_BACKLIGHT_PWM=y -CONFIG_BACKLIGHT_LP855X=m -CONFIG_FRAMEBUFFER_CONSOLE=y -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_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_SOC_FSL_ACM=y -CONFIG_SND_SOC_FSL_DSP=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_IMX_AK4458=y -CONFIG_SND_SOC_IMX_AK5558=y -CONFIG_SND_SOC_IMX_AK4497=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_WM8524=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_MICFIL=y -CONFIG_SND_SOC_IMX_RPMSG=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_AMIX=y -CONFIG_SND_SOC_IMX_CDNHDMI=y -CONFIG_SND_SOC_SAMSUNG=y -CONFIG_SND_SOC_RCAR=y -CONFIG_SND_SOC_AK4613=y -CONFIG_HID_A4TECH=y -CONFIG_HID_APPLE=y -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -CONFIG_HID_CYPRESS=y -CONFIG_HID_EZKEY=y -CONFIG_HID_KENSINGTON=y -CONFIG_HID_LOGITECH=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -CONFIG_HID_MULTITOUCH=y -CONFIG_USB=y -CONFIG_USB_OTG=y -CONFIG_USB_OTG_WHITELIST=y -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_TEGRA=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MSM=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_HCD_TEST_MODE=y -CONFIG_USB_RENESAS_USBHS=m -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=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_ISP1760_HOST_ROLE=y -CONFIG_USB_CDNS3=y -CONFIG_USB_CDNS3_GADGET=y -CONFIG_USB_CDNS3_HOST=y -CONFIG_USB_TEST=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_USB_HSIC_USB3503=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_GPIO_VBUS=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_ULPI=y -CONFIG_USB_GADGET=y -CONFIG_USB_RENESAS_USBHS_UDC=m -CONFIG_USB_CONFIGFS=y -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_FSL_UTP=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_CONFIGFS_F_UAC1=y -CONFIG_USB_CONFIGFS_F_UAC2=y -CONFIG_USB_CONFIGFS_F_MIDI=y -CONFIG_USB_CONFIGFS_F_HID=y -CONFIG_USB_ZERO=m -CONFIG_USB_AUDIO=m -CONFIG_GADGET_UAC1=y -CONFIG_USB_ETH=m -CONFIG_USB_ETH_EEM=y -CONFIG_USB_G_NCM=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=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_ESDHC_IMX=y -# CONFIG_MMC_SDHCI_IPROC is not set -CONFIG_MMC_SPI=y -CONFIG_MMC_SDHI=y -CONFIG_MXC_SIM=y -CONFIG_MXC_EMVSIM=y -CONFIG_MXC_MLB150=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_SYSCON=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_MAX77686=y -CONFIG_RTC_DRV_S5M=y -CONFIG_RTC_DRV_DS3232=y -CONFIG_RTC_DRV_EFI=y -CONFIG_RTC_DRV_S3C=y -CONFIG_RTC_DRV_PL031=y -CONFIG_RTC_DRV_TEGRA=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_RTC_DRV_IMX_SC=y -CONFIG_RTC_DRV_XGENE=y -CONFIG_DMADEVICES=y -CONFIG_FSL_EDMA_V3=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_PL330_DMA=y -CONFIG_TEGRA20_APB_DMA=y -CONFIG_QCOM_BAM_DMA=y -CONFIG_QCOM_HIDMA_MGMT=y -CONFIG_QCOM_HIDMA=y -CONFIG_RCAR_DMAC=y -CONFIG_UIO=y -CONFIG_UIO_PCI_GENERIC=y -CONFIG_VIRTIO_PCI=y -CONFIG_VIRTIO_BALLOON=y -CONFIG_VIRTIO_MMIO=y -CONFIG_XEN_GNTDEV=y -CONFIG_XEN_GRANT_DEV_ALLOC=y -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -CONFIG_MEDIA_CEC=y -CONFIG_ION=y -CONFIG_ION_MXC=y -CONFIG_TYPEC_TCPM=y -CONFIG_TYPEC_TCPCI=y -CONFIG_COMMON_CLK_SCPI=y -CONFIG_COMMON_CLK_CS2000_CP=y -CONFIG_COMMON_CLK_S2MPS11=y -CONFIG_CLK_QORIQ=y -CONFIG_COMMON_CLK_QCOM=y -CONFIG_MSM_GCC_8916=y -CONFIG_MSM_MMCC_8996=y -CONFIG_HWSPINLOCK_QCOM=y -CONFIG_CLKSRC_IMX_SYS_CNT=y -CONFIG_MAILBOX=y -CONFIG_ARM_MHU=y -CONFIG_HI6220_MBOX=y -CONFIG_ARM_SMMU=y -CONFIG_ARCH_MXC_ARM64=y -CONFIG_QCOM_SMEM=y -CONFIG_QCOM_SMD=y -CONFIG_QCOM_SMD_RPM=y -CONFIG_ARCH_TEGRA_132_SOC=y -CONFIG_ARCH_TEGRA_210_SOC=y -CONFIG_EXTCON_PTN5150=y -CONFIG_IIO=y -CONFIG_EXYNOS_ADC=y -CONFIG_IMX8QXP_ADC=y -CONFIG_PWM=y -CONFIG_PWM_FSL_FTM=y -CONFIG_PWM_IMX=y -CONFIG_PWM_SAMSUNG=y -CONFIG_PWM_TEGRA=m -CONFIG_PHY_HI6220_USB=y -CONFIG_PHY_XGENE=y -CONFIG_PHY_TEGRA_XUSB=y -CONFIG_IMX8_DDR_PERF=y -CONFIG_NVMEM=y -CONFIG_NVMEM_IMX_OCOTP=y -CONFIG_NVMEM_IMX_SCU_OCOTP=y -CONFIG_TEE=y -CONFIG_OPTEE=y -CONFIG_ARM_SCPI_PROTOCOL=y -CONFIG_ACPI=y -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_EFIVAR_FS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_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_KVM=y -CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_LOCKUP_DETECTOR=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_FTRACE is not set -CONFIG_MEMTEST=y -CONFIG_SECURITY=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CHACHA20POLY1305=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_SHA3=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_CAST5=y -CONFIG_CRYPTO_CAST6=y -CONFIG_CRYPTO_SERPENT=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_ANSI_CPRNG=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_ARM64_CRYPTO=y -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SHA2_ARM64_CE=y -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_CRC32_ARM64=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch deleted file mode 100644 index fd842bf1..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers-4.9.123/0001-uapi-Install-custom-headers.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 33c85073a35e697e080583ca8edb31400b45de60 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein -Date: Wed, 3 Oct 2018 18:02:43 -0500 -Subject: [PATCH] uapi: Install custom headers - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Tom Hochstein ---- - include/uapi/linux/Kbuild | 2 ++ - 1 file changed, 2 insertions(+) - -Index: git/include/uapi/linux/Kbuild -=================================================================== ---- git.orig/include/uapi/linux/Kbuild -+++ git/include/uapi/linux/Kbuild -@@ -104,6 +104,7 @@ header-y += dlm_device.h - header-y += dlm.h - header-y += dlm_netlink.h - header-y += dlm_plock.h -+header-y += dma-buf.h - header-y += dm-ioctl.h - header-y += dm-log-userspace.h - header-y += dn.h -@@ -144,6 +145,7 @@ header-y += gigaset_dev.h - header-y += gpio.h - header-y += gsmmux.h - header-y += gtp.h -+header-y += hantrodec.h - header-y += hdlcdrv.h - header-y += hdlc.h - header-y += hdreg.h -@@ -152,6 +154,7 @@ header-y += hid.h - header-y += hidraw.h - header-y += hpet.h - header-y += hsr_netlink.h -+header-y += hx280enc.h - header-y += hyperv.h - header-y += hysdn_if.h - header-y += i2c-dev.h diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_4.9.123.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_4.9.123.bb deleted file mode 100644 index 44bce42a..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_4.9.123.bb +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Installs i.MX-specific kernel headers" -DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \ -New headers are installed in ${includedir}/imx." -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -SRCBRANCH = "imx_4.9.123_imx8mm_ga" -LOCALVERSION = "-imx" -SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://0001-uapi-Install-custom-headers.patch" -SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70" - -S = "${WORKDIR}/git" - -do_compile[noexec] = "1" - -IMX_UAPI_HEADERS = " \ - dma-buf.h \ - hantrodec.h \ - hx280enc.h \ - ion.h \ - ipu.h \ - isl29023.h \ - mxc_asrc.h \ - mxc_dcic.h \ - mxc_mlb.h \ - mxc_sim_interface.h \ - mxc_v4l2.h \ - mxcfb.h \ - pxp_device.h \ - pxp_dma.h \ - version.h \ - videodev2.h \ -" - -do_install() { - # We install all headers inside of B so we can copy only the - # whitelisted ones, and there is no risk of a new header to be - # installed by mistake. - oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} - - # FIXME: The ion.h is still on staging so "promote" it for now - cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux - - # Install whitelisted headers only - for h in ${IMX_UAPI_HEADERS}; do - install -D -m 0644 ${B}${includedir}/linux/$h \ - ${D}${includedir}/imx/linux/$h - done -} - -ALLOW_EMPTY_${PN} = "1" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_HOST_imx = ".*" -COMPATIBLE_HOST ?= "(none)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_5.4.3.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_5.4.3.bb new file mode 100644 index 00000000..4257c41a --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-headers_5.4.3.bb @@ -0,0 +1,78 @@ +# Copyright 2017-2019 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Installs i.MX-specific kernel headers" +DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \ +New headers are installed in ${includedir}/imx." +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +SRCBRANCH = "lf-5.4.y" +LOCALVERSION = "-1.0.0" +SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}" +SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466" + +S = "${WORKDIR}/git" + +do_configure[noexec] = "1" + +do_compile[noexec] = "1" + +IMX_UAPI_HEADERS = " \ + dma-buf.h \ + hantrodec.h \ + hx280enc.h \ + ion.h \ + ipu.h \ + isl29023.h \ + mxc_asrc.h \ + mxc_dcic.h \ + mxc_mlb.h \ + mxc_sim_interface.h \ + mxc_v4l2.h \ + mxcfb.h \ + pxp_device.h \ + pxp_dma.h \ + version.h \ + videodev2.h \ +" + +do_install() { + # We install all headers inside of B so we can copy only the + # whitelisted ones, and there is no risk of a new header to be + # installed by mistake. + oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix} + + # Kernel should not be exporting this header + rm -f ${D}${exec_prefix}/include/scsi/scsi.h + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f + + # FIXME: The ion.h is still on staging so "promote" it for now + cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux + + # Install whitelisted headers only + for h in ${IMX_UAPI_HEADERS}; do + install -D -m 0644 ${B}${includedir}/linux/$h \ + ${D}${includedir}/imx/linux/$h + done +} + +# Allow to build empty main package, this is required in order for -dev package +# to be propagated into the SDK +# +# Without this setting the RDEPENDS in other recipes fails to find this +# package, therefore causing the -dev package also to be skipped effectively not +# populating it into SDK +ALLOW_EMPTY_${PN} = "1" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS += "unifdef-native bison-native rsync-native" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + +# Restrict this recipe to NXP BSP only, this recipe is not compatible +# with mainline BSP +COMPATIBLE_HOST = '(null)' +COMPATIBLE_HOST_use-nxp-bsp = '.*' diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool-4.9.123/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool-4.9.123/defconfig deleted file mode 100644 index 85410638..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool-4.9.123/defconfig +++ /dev/null @@ -1,466 +0,0 @@ -CONFIG_KERNEL_LZO=y -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 -CONFIG_CGROUPS=y -CONFIG_RELAY=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -CONFIG_KALLSYMS_ALL=y -CONFIG_PERF_EVENTS=y -# CONFIG_SLUB_DEBUG is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_MXC=y -CONFIG_SOC_IMX50=y -CONFIG_SOC_IMX53=y -CONFIG_SOC_IMX6Q=y -CONFIG_SOC_IMX6SL=y -CONFIG_SOC_IMX6SX=y -CONFIG_SOC_IMX6ULL=y -CONFIG_SOC_IMX7D=y -CONFIG_SOC_IMX6SLL=y -CONFIG_SOC_IMX7ULP=y -CONFIG_SOC_VF610=y -# CONFIG_SWP_EMULATE is not set -CONFIG_SMP=y -CONFIG_VMSPLIT_2G=y -CONFIG_ARM_PSCI=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_HIGHMEM=y -CONFIG_CMA=y -CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_INTERACTIVE=y -CONFIG_ARM_IMX6Q_CPUFREQ=y -CONFIG_ARM_IMX7D_CPUFREQ=y -CONFIG_ARM_IMX7ULP_CPUFREQ=y -CONFIG_CPU_IDLE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=m -CONFIG_PM_DEBUG=y -CONFIG_PM_TEST_SUSPEND=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -CONFIG_VLAN_8021Q=y -CONFIG_LLC2=y -CONFIG_CAN=y -CONFIG_CAN_FLEXCAN=y -CONFIG_CAN_M_CAN=y -CONFIG_BT=y -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=y -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=y -CONFIG_BT_HCIBTUSB=y -CONFIG_BT_HCIUART=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIBCM203X=y -CONFIG_BT_ATH3K=y -CONFIG_CFG80211=y -CONFIG_NL80211_TESTMODE=y -CONFIG_CFG80211_INTERNAL_REGDB=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -CONFIG_DMA_CMA=y -CONFIG_CMA_SIZE_MBYTES=0 -CONFIG_IMX_WEIM=y -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_CFI_STAA=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_M25P80=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_NAND_MXC=y -CONFIG_MTD_SPI_NOR=y -# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set -CONFIG_SPI_FSL_QUADSPI=y -CONFIG_MTD_UBI=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_EEPROM_AT24=y -CONFIG_EEPROM_AT25=y -# CONFIG_SCSI_PROC_FS is not set -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y -CONFIG_SCSI_SCAN_ASYNC=y -# CONFIG_SCSI_LOWLEVEL is not set -CONFIG_ATA=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_AHCI_IMX=y -CONFIG_PATA_IMX=y -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_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICREL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_SEEQ is not set -CONFIG_SMC91X=y -CONFIG_SMC911X=y -CONFIG_SMSC911X=y -# CONFIG_NET_VENDOR_STMICRO is not set -CONFIG_MICREL_PHY=y -CONFIG_USB_KAWETH=y -CONFIG_USB_PEGASUS=y -CONFIG_USB_RTL8150=y -CONFIG_USB_RTL8152=y -CONFIG_USB_USBNET=y -CONFIG_USB_NET_CDC_EEM=m -CONFIG_BCMDHD=y -CONFIG_BCMDHD_SDIO=y -CONFIG_BCMDHD_FW_PATH="/lib/firmware/bcm/ZP_BCM4339/fw_bcmdhd.bin" -CONFIG_BCMDHD_NVRAM_PATH="/lib/firmware/bcm/ZP_BCM4339/bcmdhd.ZP.OOB.cal" -CONFIG_HOSTAP=y -# CONFIG_RTL_CARDS is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_RPMSG=y -CONFIG_KEYBOARD_PF1550_ONKEY=y -CONFIG_KEYBOARD_IMX=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_PS2_ELANTECH=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_TOUCHSCREEN_EGALAX=y -CONFIG_TOUCHSCREEN_ELAN_TS=y -CONFIG_TOUCHSCREEN_MAX11801=y -CONFIG_TOUCHSCREEN_IMX6UL_TSC=y -CONFIG_TOUCHSCREEN_MC13783=y -CONFIG_TOUCHSCREEN_TSC2007=y -CONFIG_TOUCHSCREEN_STMPE=y -CONFIG_TOUCHSCREEN_FTS=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_MMA8450=y -CONFIG_INPUT_MPL3115=y -CONFIG_SENSOR_FXLS8471=y -CONFIG_SENSOR_IMX_RPMSG=y -CONFIG_INPUT_ISL29023=y -CONFIG_SERIO_SERPORT=m -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_FSL_LPUART=y -CONFIG_SERIAL_FSL_LPUART_CONSOLE=y -CONFIG_FSL_OTP=y -CONFIG_HW_RANDOM_IMX_RNG=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m -CONFIG_I2C_IMX=y -CONFIG_I2C_IMX_LPI2C=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=y -CONFIG_SPI_IMX=y -CONFIG_SPI_FSL_LPSPI=y -CONFIG_SPI_SPIDEV=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_IMX_RPMSG=y -CONFIG_GPIO_MAX732X=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_74X164=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_POWER_SUPPLY=y -CONFIG_CHARGER_PF1550=y -CONFIG_SABRESD_MAX8903=y -CONFIG_SENSORS_MAX17135=y -CONFIG_SENSORS_MAG3110=y -CONFIG_THERMAL=y -CONFIG_THERMAL_WRITABLE_TRIPS=y -CONFIG_CPU_THERMAL=y -CONFIG_IMX_THERMAL=y -CONFIG_DEVICE_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_IMX2_WDT=y -CONFIG_IMX7ULP_WDT=y -CONFIG_MFD_DA9052_I2C=y -CONFIG_MFD_MC13XXX_SPI=y -CONFIG_MFD_MC13XXX_I2C=y -CONFIG_MFD_PF1550=y -CONFIG_MFD_MAX17135=y -CONFIG_MFD_SI476X_CORE=y -CONFIG_MFD_STMPE=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_DA9052=y -CONFIG_REGULATOR_GPIO=y -CONFIG_REGULATOR_MAX17135=y -CONFIG_REGULATOR_MC13783=y -CONFIG_REGULATOR_MC13892=y -CONFIG_REGULATOR_PFUZE100=y -CONFIG_REGULATOR_PF1550=y -CONFIG_REGULATOR_PF1550_RPMSG=y -CONFIG_MEDIA_SUPPORT=y -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_RADIO_SUPPORT=y -CONFIG_MEDIA_RC_SUPPORT=y -CONFIG_RC_DEVICES=y -CONFIG_IR_GPIO_CIR=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_MXC_OUTPUT=y -CONFIG_VIDEO_MXC_CAPTURE=m -CONFIG_VIDEO_MXC_CSI_CAMERA=m -CONFIG_MXC_VADC=m -CONFIG_MXC_MIPI_CSI=m -CONFIG_MXC_CAMERA_OV5640=m -CONFIG_MXC_CAMERA_OV5640_V2=m -CONFIG_MXC_CAMERA_OV5642=m -CONFIG_MXC_CAMERA_OV5640_MIPI=m -CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m -CONFIG_MXC_CAMERA_OV5647_MIPI=m -CONFIG_MXC_TVIN_ADV7180=m -CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m -CONFIG_VIDEO_MXC_IPU_OUTPUT=y -CONFIG_VIDEO_MXC_PXP_V4L2=y -CONFIG_SOC_CAMERA=y -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_CODA=y -CONFIG_RADIO_SI476X=y -CONFIG_SOC_CAMERA_OV2640=y -CONFIG_DRM=y -CONFIG_DRM_VIVANTE=y -CONFIG_FB_MXS=y -CONFIG_FB_MXC_SYNC_PANEL=y -CONFIG_FB_MXC_OVERLAY=y -CONFIG_FB_MXC_MIPI_DSI=y -CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y -CONFIG_FB_MXC_MIPI_DSI_NORTHWEST=y -CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5079E=y -CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y -CONFIG_FB_MXC_LDB=y -CONFIG_FB_MXC_HDMI=y -CONFIG_FB_MXS_SII902X=y -CONFIG_FB_MXC_DCIC=m -CONFIG_FB_MXC_ADV7535=y -CONFIG_HANNSTAR_CABC=y -CONFIG_FB_MXC_EINK_PANEL=y -CONFIG_FB_MXC_EINK_V2_PANEL=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_L4F00242T03=y -CONFIG_LCD_PLATFORM=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_BACKLIGHT_GPIO=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_SOC=y -CONFIG_SND_IMX_SOC=y -CONFIG_SND_SOC_EUKREA_TLV320=y -CONFIG_SND_SOC_IMX_WM8960=y -CONFIG_SND_SOC_IMX_SII902X=y -CONFIG_SND_SOC_IMX_WM8958=y -CONFIG_SND_SOC_IMX_CS42888=y -CONFIG_SND_SOC_IMX_WM8962=y -CONFIG_SND_SOC_IMX_RPMSG=y -CONFIG_SND_SOC_IMX_SGTL5000=y -CONFIG_SND_SOC_IMX_MQS=y -CONFIG_SND_SOC_IMX_SPDIF=y -CONFIG_SND_SOC_IMX_MC13783=y -CONFIG_SND_SOC_IMX_SI476X=y -CONFIG_SND_SOC_IMX_HDMI=y -CONFIG_USB=y -CONFIG_USB_OTG_WHITELIST=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_MXC=y -CONFIG_USB_HCD_TEST_MODE=y -CONFIG_USB_ACM=m -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_TEST=m -CONFIG_USB_EHSET_TEST_FIXTURE=y -CONFIG_NOP_USB_XCEIV=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_GADGET=y -CONFIG_USB_CONFIGFS=y -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_FSL_UTP=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m -CONFIG_USB_MASS_STORAGE=m -CONFIG_USB_G_SERIAL=m -CONFIG_MMC=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MXC_IPU=y -CONFIG_MXC_IPU_V3_PRE=y -CONFIG_MXC_MIPI_CSI2=y -CONFIG_MXC_HDMI_CEC=y -CONFIG_MXC_SIM=y -CONFIG_MXC_SIMv2=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -CONFIG_RTC_DRV_MC13XXX=y -CONFIG_RTC_DRV_MXC=y -CONFIG_RTC_DRV_SNVS=y -CONFIG_RTC_DRV_IMX_RPMSG=y -CONFIG_DMADEVICES=y -CONFIG_FSL_EDMA=y -CONFIG_IMX_SDMA=y -CONFIG_MXS_DMA=y -CONFIG_MXC_PXP_V2=y -CONFIG_MXC_PXP_V3=y -CONFIG_DMATEST=m -CONFIG_STAGING=y -CONFIG_STAGING_MEDIA=y -CONFIG_ION=y -CONFIG_ION_MXC=y -# CONFIG_IOMMU_SUPPORT is not set -CONFIG_EXTCON_USB_GPIO=y -CONFIG_IIO=y -CONFIG_IMX7D_ADC=y -CONFIG_VF610_ADC=y -CONFIG_PWM=y -CONFIG_PWM_IMX=y -CONFIG_PWM_TPM=y -CONFIG_TEE=y -CONFIG_OPTEE=y -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_QUOTA=y -CONFIG_QUOTA_NETLINK_INTERFACE=y -# CONFIG_PRINT_QUOTA_WARNING is not set -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=y -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_UDF_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_UBIFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_UTF8=y -CONFIG_DEBUG_FS=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_SCHED_DEBUG is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_FTRACE is not set -CONFIG_SECURITYFS=y -CONFIG_CRYPTO_USER=y -CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_LRW=y -CONFIG_CRYPTO_XTS=y -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_RMD128=y -CONFIG_CRYPTO_RMD160=y -CONFIG_CRYPTO_RMD256=y -CONFIG_CRYPTO_RMD320=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_TGR192=y -CONFIG_CRYPTO_WP512=y -CONFIG_CRYPTO_BLOWFISH=y -CONFIG_CRYPTO_CAMELLIA=y -CONFIG_CRYPTO_TWOFISH=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y -CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=m -CONFIG_CRC_T10DIF=y -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_4.9.123.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_4.9.123.bb deleted file mode 100644 index f7ead721..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_4.9.123.bb +++ /dev/null @@ -1,13 +0,0 @@ -# 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 Freescale that produces a \ -Manufacturing Tool compatible Linux Kernel to be used in updater environment" - -require linux-imx_${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/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb new file mode 100644 index 00000000..0a9f5259 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb @@ -0,0 +1,14 @@ +# 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 Freescale that produces a \ +Manufacturing Tool compatible Linux Kernel to be used in updater environment" + +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-imx:" +require linux-imx_${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/bsp/meta-freescale/recipes-kernel/linux/linux-imx.inc b/bsp/meta-freescale/recipes-kernel/linux/linux-imx.inc index 9a8a035f..d508a727 100644 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx.inc +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx.inc @@ -4,19 +4,36 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -inherit kernel fsl-kernel-localversion fsl-vivante-kernel-driver-handler +inherit kernel-yocto kernel fsl-kernel-localversion fsl-vivante-kernel-driver-handler # Put a local version until we have a true SRCREV to point to LOCALVERSION ?= "" SCMVERSION ?= "y" SRCBRANCH ?= "" +# Set the PV to the correct kernel version to satisfy the kernel version sanity check +PV = "${LINUX_VERSION}+git${SRCPV}" + SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx;protocol=https;branch=${SRCBRANCH} \ file://defconfig \ " S = "${WORKDIR}/git" +# Tell to kernel class that we would like to use our defconfig to configure the kernel. +# Otherwise, the --allnoconfig would be used per default which leads to mis-configured +# kernel. +# +# This behavior happens when a defconfig is provided, the kernel-yocto configuration +# uses the filename as a trigger to use a 'allnoconfig' baseline before merging +# the defconfig into the build. +# +# If the defconfig file was created with make_savedefconfig, not all options are +# specified, and should be restored with their defaults, not set to 'n'. +# To properly expand a defconfig like this, we need to specify: KCONFIG_MODE="--alldefconfig" +# in the kernel recipe include. +KCONFIG_MODE="--alldefconfig" + # We need to pass it as param since kernel might support more then one # machine, with different entry points KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch new file mode 100644 index 00000000..e3df8084 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch @@ -0,0 +1,63 @@ +From 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Mon Sep 17 00:00:00 2001 +From: Changbin Du +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_ 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 +Acked-by: Jiri Olsa +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Andrey Zhizhikin +--- + 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/bsp/meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig new file mode 100644 index 00000000..622e5430 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig @@ -0,0 +1,552 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PERF_EVENTS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX50=y +CONFIG_SOC_IMX51=y +CONFIG_SOC_IMX53=y +CONFIG_SOC_IMX6Q=y +CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SLL=y +CONFIG_SOC_IMX6SX=y +CONFIG_SOC_IMX6UL=y +CONFIG_SOC_IMX7D=y +CONFIG_SOC_IMX7ULP=y +CONFIG_SOC_VF610=y +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +CONFIG_ARM_PSCI=y +CONFIG_HIGHMEM=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y +CONFIG_ARM_IMX7ULP_CPUFREQ=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_BINFMT_MISC=m +CONFIG_CMA=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_NETFILTER=y +CONFIG_VLAN_8021Q=m +CONFIG_LLC2=y +CONFIG_CAN=y +CONFIG_CAN_FLEXCAN=y +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +CONFIG_BT_HCIBTUSB=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_MRVL=y +CONFIG_BT_HCIVHCI=y +CONFIG_BT_MRVL=y +CONFIG_BT_MRVL_SDIO=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_IMX6=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +CONFIG_FW_LOADER_USER_HELPER=y +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=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_GPMI_NAND=y +CONFIG_MTD_NAND_VF610_NFC=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=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_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_PATA_IMX=y +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_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_AT803X_PHY=y +CONFIG_MICREL_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_MCS7830=y +CONFIG_BRCMFMAC=m +CONFIG_HOSTAP=y +CONFIG_WL12XX=m +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +# CONFIG_WILINK_PLATFORM_DATA is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=m +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_RPMSG=y +CONFIG_KEYBOARD_IMX=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=y +CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_ELAN_TS=y +CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_MAX11801=y +CONFIG_TOUCHSCREEN_IMX6UL_TSC=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_TOUCHSCREEN_MC13783=y +CONFIG_TOUCHSCREEN_TSC2004=y +CONFIG_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_SX8654=y +CONFIG_TOUCHSCREEN_COLIBRI_VF50=y +CONFIG_TOUCHSCREEN_FTS=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MMA8450=y +CONFIG_INPUT_MPL3115=y +CONFIG_SENSOR_FXLS8471=y +CONFIG_SENSOR_IMX_RPMSG=y +CONFIG_INPUT_ISL29023=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_I2C_IMX_LPI2C=y +CONFIG_SPI=y +CONFIG_SPI_FSL_LPSPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPI_SLAVE=y +CONFIG_SPI_SLAVE_TIME=y +CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_SIOX=m +CONFIG_GPIO_IMX_RPMSG=y +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCF857X=y +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +CONFIG_SABRESD_MAX8903=y +CONFIG_SENSORS_MC13783_ADC=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_MAX17135=y +CONFIG_SENSORS_MAG3110=y +CONFIG_THERMAL=y +CONFIG_THERMAL_STATISTICS=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_DA9063_WATCHDOG=m +CONFIG_DA9062_WATCHDOG=y +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 +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_MAX17135=y +CONFIG_MFD_RN5T618=y +CONFIG_MFD_SI476X_CORE=y +CONFIG_MFD_STMPE=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_DA9063=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_MAX17135=y +CONFIG_REGULATOR_MC13783=y +CONFIG_REGULATOR_MC13892=y +CONFIG_REGULATOR_PF1550_RPMSG=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_RN5T618=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MUX=y +CONFIG_VIDEO_MXC_CAPTURE=m +CONFIG_VIDEO_MXC_OUTPUT=y +CONFIG_VIDEO_MXC_CSI_CAMERA=m +CONFIG_MXC_VADC=m +CONFIG_MXC_MIPI_CSI=m +CONFIG_MXC_CAMERA_OV5640=m +CONFIG_MXC_CAMERA_OV5640_V2=m +CONFIG_MXC_CAMERA_OV5640_MIPI=m +CONFIG_MXC_CAMERA_OV5640_MIPI_V2=m +CONFIG_MXC_TVIN_ADV7180=m +CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m +CONFIG_VIDEO_MXC_IPU_OUTPUT=y +CONFIG_VIDEO_MXC_PXP_V4L2=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=m +CONFIG_VIDEO_IMX_PXP=y +CONFIG_RADIO_SI476X=y +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_OV5645=m +CONFIG_DRM=y +CONFIG_DRM_MSM=y +CONFIG_DRM_PANEL_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_SEIKO_43WVF1G=y +CONFIG_FB_MXS=y +CONFIG_FB_MXC_SYNC_PANEL=y +CONFIG_FB_MXC_OVERLAY=y +CONFIG_FB_MXC_MIPI_DSI_NORTHWEST=y +CONFIG_FB_MXC_ADV7535=y +CONFIG_FB_MXC_TRULY_PANEL_TFT3P5581E=y +CONFIG_FB_MXC_TRULY_WVGA_SYNC_PANEL=y +CONFIG_FB_MXC_RK_PANEL_RK055AHD042=y +CONFIG_FB_MXC_RK_PANEL_RK055IQH042=y +CONFIG_FB_MXC_MIPI_DSI_SAMSUNG=y +CONFIG_FB_MXC_MIPI_DSI=y +CONFIG_FB_MXC_LDB=y +CONFIG_FB_MXC_EINK_PANEL=y +CONFIG_FB_MXC_EINK_V2_PANEL=y +CONFIG_FB_MXC_HDMI=y +CONFIG_FB_MXS_SII902X=y +CONFIG_FB_MXC_DCIC=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_WM8960=y +CONFIG_SND_SOC_IMX_SII902X=y +CONFIG_SND_SOC_IMX_WM8958=y +CONFIG_SND_SOC_IMX_CS42888=y +CONFIG_SND_SOC_IMX_WM8962=y +CONFIG_SND_SOC_IMX_RPMSG=y +CONFIG_SND_SOC_IMX_ES8328=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_MC13783=y +CONFIG_SND_SOC_IMX_SI476X=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_SND_SOC_AC97_CODEC=y +CONFIG_SND_SOC_TLV320AIC3X=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MXC=y +CONFIG_USB_HCD_TEST_MODE=y +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +CONFIG_USB_FSL_USB2=y +CONFIG_USB_CONFIGFS=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_DA9063=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_RTC_DRV_MXC_V2=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_RTC_DRV_IMX_RPMSG=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_IMX_SDMA=y +CONFIG_MXS_DMA=y +CONFIG_MXC_PXP_V2=y +CONFIG_MXC_PXP_V3=y +CONFIG_DMATEST=m +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_MAILBOX=y +CONFIG_IMX_MBOX=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_IMX7D_ADC=y +CONFIG_VF610_ADC=y +CONFIG_PWM=y +CONFIG_PWM_FSL_FTM=y +CONFIG_PWM_IMX27=y +CONFIG_PWM_IMX_TPM=y +CONFIG_PHY_MIXEL_LVDS=y +CONFIG_PHY_MIXEL_LVDS_COMBO=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_VF610_OCOTP=y +CONFIG_NVMEM_SNVS_LPGPR=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_MUX_MMIO=y +CONFIG_SIOX=m +CONFIG_SIOX_BUS_GPIO=m +CONFIG_MXC_SIM=y +CONFIG_MXC_IPU=y +CONFIG_MXC_SIMv2=y +CONFIG_MXC_MLB150=y +CONFIG_MXC_IPU_V3_PRE=y +CONFIG_MXC_HDMI_CEC=y +CONFIG_MXC_MIPI_CSI2=y +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_ECHAINIV=m +CONFIG_CRYPTO_TLS=m +CONFIG_CRYPTO_CFB=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_OFB=m +CONFIG_CRYPTO_XTS=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_SHA3=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TWOFISH=m +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_SAHARA=y +CONFIG_CRYPTO_DEV_MXS_DCP=y +CONFIG_CRC_CCITT=m +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_DMA_CMA=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FTRACE is not set diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig new file mode 100644 index 00000000..469ee0ef --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig @@ -0,0 +1,797 @@ +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_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=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_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_LAYERSCAPE=y +CONFIG_ARCH_MXC=y +CONFIG_ARCH_S32=y +CONFIG_SOC_S32V234=y +CONFIG_ARM64_VA_BITS_48=y +CONFIG_SCHED_MC=y +CONFIG_NUMA=y +CONFIG_SECCOMP=y +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y +CONFIG_XEN=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_COMPAT=y +CONFIG_RANDOMIZE_BASE=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPUFREQ_DT=y +CONFIG_ACPI_CPPC_CPUFREQ=m +CONFIG_ARM_SCPI_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y +CONFIG_QORIQ_CPUFREQ=y +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_EFI_CAPSULE_LOADER=y +CONFIG_IMX_DSP=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_MODVERSIONS=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_SIT=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_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +CONFIG_LLC2=y +CONFIG_TSN=y +CONFIG_NET_SWITCHDEV=y +CONFIG_BPF_JIT=y +CONFIG_CAN=m +CONFIG_CAN_FLEXCAN=m +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y +# 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=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIUART_QCA=y +CONFIG_BT_HCIVHCI=y +CONFIG_CFG80211=y +CONFIG_NL80211_TESTMODE=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_LEDS=y +CONFIG_NET_9P=y +CONFIG_NET_9P_VIRTIO=y +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_IOV=y +CONFIG_HOTPLUG_PCI=y +CONFIG_HOTPLUG_PCI_ACPI=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_PCI_IMX6=y +CONFIG_PCI_LAYERSCAPE=y +CONFIG_PCI_HISI=y +CONFIG_PCIE_KIRIN=y +CONFIG_PCIE_LAYERSCAPE_GEN4=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_FW_LOADER_USER_HELPER=y +CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +CONFIG_BRCMSTB_GISB_ARB=y +CONFIG_SIMPLE_PM_BUS=y +CONFIG_VEXPRESS_CONFIG=y +CONFIG_FSL_MC_BUS=y +CONFIG_FSL_MC_UAPI_SUPPORT=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=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_GPMI_NAND=y +CONFIG_MTD_NAND_FSL_IFC=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_MTD_UBI=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=m +CONFIG_XEN_BLKDEV_BACKEND=m +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_NVME=y +CONFIG_SENSORS_FXOS8700=y +CONFIG_SENSORS_FXAS2100X=y +CONFIG_SRAM=y +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=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_SCSI_MPT3SAS=m +CONFIG_SCSI_UFSHCD=y +CONFIG_SCSI_UFSHCD_PLATFORM=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_AHCI_CEVA=y +CONFIG_AHCI_XGENE=y +CONFIG_AHCI_QORIQ=y +CONFIG_SATA_SIL24=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_AMD_XGBE=y +CONFIG_ATL1C=m +CONFIG_BNX2X=m +CONFIG_MACB=y +CONFIG_THUNDER_NIC_PF=y +CONFIG_FEC=y +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 +CONFIG_HNS3=y +CONFIG_HNS3_HCLGE=y +CONFIG_HNS3_ENET=y +CONFIG_E1000=y +CONFIG_E1000E=y +CONFIG_IGB=y +CONFIG_IGBVF=y +CONFIG_MVMDIO=y +CONFIG_SKY2=y +CONFIG_MLX4_EN=m +CONFIG_MLX5_CORE=m +CONFIG_MLX5_CORE_EN=y +CONFIG_MSCC_OCELOT_SWITCH=y +CONFIG_QCOM_EMAC=m +CONFIG_SMC91X=y +CONFIG_SMSC911X=y +CONFIG_STMMAC_ETH=m +CONFIG_MDIO_BITBANG=y +CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y +CONFIG_AQUANTIA_PHY=y +CONFIG_AT803X_PHY=y +CONFIG_INPHI_PHY=y +CONFIG_MARVELL_PHY=m +CONFIG_MARVELL_10G_PHY=m +CONFIG_MICREL_PHY=y +CONFIG_MICROSEMI_PHY=y +CONFIG_NXP_TJA11XX_PHY=y +CONFIG_REALTEK_PHY=y +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_BRCMFMAC=m +CONFIG_BRCMFMAC_PCIE=y +CONFIG_HOSTAP=y +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +CONFIG_IVSHMEM_NET=m +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_ADC=m +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_SNVS_PWRKEY=y +CONFIG_KEYBOARD_IMX_SC_PWRKEY=y +CONFIG_KEYBOARD_CROS_EC=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=m +CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MPL3115=y +CONFIG_INPUT_ISL29023=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_DW=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_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_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_DESIGNWARE_PLATFORM=y +CONFIG_I2C_GPIO=m +CONFIG_I2C_IMX=y +CONFIG_I2C_IMX_LPI2C=y +CONFIG_I2C_RK3X=y +CONFIG_I2C_RPBUS=y +CONFIG_I2C_CROS_EC_TUNNEL=y +CONFIG_I2C_SLAVE=y +CONFIG_SPI=y +CONFIG_SPI_FSL_LPSPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_NXP_FLEXSPI=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_SPI_PL022=y +CONFIG_SPI_ROCKCHIP=y +CONFIG_SPI_SPIDEV=y +CONFIG_SPI_SLAVE=y +CONFIG_SPI_SLAVE_TIME=y +CONFIG_SPI_SLAVE_SYSTEM_CONTROL=y +CONFIG_SPMI=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_PINCTRL_MAX77620=y +CONFIG_PINCTRL_IMX8MM=y +CONFIG_PINCTRL_IMX8MN=y +CONFIG_PINCTRL_IMX8MQ=y +CONFIG_PINCTRL_IMX8QM=y +CONFIG_PINCTRL_IMX8QXP=y +CONFIG_PINCTRL_S32V234=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_DWAPB=y +CONFIG_GPIO_MB86S7X=y +CONFIG_GPIO_MPC8XXX=y +CONFIG_GPIO_PL061=y +CONFIG_GPIO_XGENE=y +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_MAX77620=y +CONFIG_POWER_AVS=y +CONFIG_POWER_RESET_BRCMSTB=y +CONFIG_POWER_RESET_VEXPRESS=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_INA2XX=m +CONFIG_SENSORS_INA3221=m +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y +CONFIG_CPU_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_IMX_SC_THERMAL=y +CONFIG_DEVICE_THERMAL=y +CONFIG_IMX8MM_THERMAL=y +CONFIG_QORIQ_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_ARM_SP805_WATCHDOG=y +CONFIG_ARM_SBSA_WATCHDOG=y +CONFIG_DW_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_IMX_SC_WDT=y +CONFIG_MFD_BD9571MWV=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MFD_HI6421_PMIC=y +CONFIG_MFD_MAX77620=y +CONFIG_MFD_RK808=y +CONFIG_MFD_SEC_CORE=y +CONFIG_MFD_ROHM_BD718XX=y +CONFIG_MFD_PCA9450=y +CONFIG_REGULATOR=y +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_MAX77620=y +CONFIG_REGULATOR_MAX8973=y +CONFIG_REGULATOR_PCA9450=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_PWM=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_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +# CONFIG_DVB_NET is not set +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_MX8_CAPTURE=y +CONFIG_VIDEO_MXC_CAPTURE=y +CONFIG_VIDEO_MXC_CSI_CAMERA=y +CONFIG_MXC_MIPI_CSI=y +CONFIG_MXC_CAMERA_OV5640_MIPI_V2=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_OV5640=y +CONFIG_IMX_DPU_CORE=y +CONFIG_IMX_LCDIF_CORE=y +CONFIG_DRM=y +CONFIG_DRM_I2C_NXP_TDA998X=m +CONFIG_DRM_MALI_DISPLAY=m +CONFIG_DRM_NOUVEAU=m +CONFIG_DRM_RCAR_LVDS=m +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RAYDIUM_RM67191=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_ITE_IT6263=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_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_ETNAVIV=m +CONFIG_DRM_HISI_HIBMC=m +CONFIG_DRM_HISI_KIRIN=m +CONFIG_DRM_MXSFB=y +CONFIG_DRM_PL111=m +CONFIG_DRM_LIMA=m +CONFIG_DRM_PANFROST=m +CONFIG_FB_ARMCLCD=y +CONFIG_FB_EFI=y +CONFIG_BACKLIGHT_GENERIC=m +CONFIG_BACKLIGHT_PWM=y +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_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 +CONFIG_SND_SOC_IMX_AK5558=y +CONFIG_SND_SOC_IMX_AK4497=y +CONFIG_SND_SOC_IMX_WM8960=y +CONFIG_SND_SOC_IMX_WM8524=y +CONFIG_SND_SOC_IMX_CS42888=y +CONFIG_SND_SOC_IMX_MICFIL=y +CONFIG_SND_SOC_IMX_RPMSG=y +CONFIG_SND_SOC_IMX_MQS=y +CONFIG_SND_SOC_IMX_SPDIF=y +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_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_AK4613=m +CONFIG_SND_SOC_DMIC=m +CONFIG_SND_SOC_ES7134=m +CONFIG_SND_SOC_ES7241=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_PCM3168A_I2C=m +CONFIG_SND_SOC_SGTL5000=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_TAS571X=m +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_AUDIO_GRAPH_CARD=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_OTG=y +CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_HCD_TEST_MODE=y +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CDNS3=y +CONFIG_USB_CDNS3_GADGET=y +CONFIG_USB_CDNS3_HOST=y +CONFIG_USB_MUSB_HDRC=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_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_USB_HSIC_USB3503=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_ULPI=y +CONFIG_USB_GADGET=y +CONFIG_USB_SNP_UDC_PLAT=y +CONFIG_USB_BDC_UDC=y +CONFIG_USB_CONFIGFS=y +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_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_TYPEC=y +CONFIG_TYPEC_TCPM=y +CONFIG_TYPEC_TCPCI=y +CONFIG_TYPEC_SWITCH_GPIO=y +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_F_SDH30=y +CONFIG_MMC_SPI=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_EXYNOS=y +CONFIG_MMC_DW_HI3798CV200=y +CONFIG_MMC_DW_K3=y +CONFIG_MMC_SDHCI_XENON=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_SYSCON=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=y +CONFIG_RTC_DRV_MAX77686=y +CONFIG_RTC_DRV_RK808=m +CONFIG_RTC_DRV_PCF85363=y +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_S5M=y +CONFIG_RTC_DRV_DS3232=y +CONFIG_RTC_DRV_PCF2127=y +CONFIG_RTC_DRV_EFI=y +CONFIG_RTC_DRV_CROS_EC=y +CONFIG_RTC_DRV_PL031=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_RTC_DRV_IMX_SC=y +CONFIG_DMADEVICES=y +CONFIG_BCM_SBA_RAID=m +CONFIG_FSL_EDMA=y +CONFIG_FSL_EDMA_V3=y +CONFIG_IMX_SDMA=y +CONFIG_MV_XOR_V2=y +CONFIG_MXS_DMA=y +CONFIG_PL330_DMA=y +CONFIG_QCOM_HIDMA_MGMT=y +CONFIG_QCOM_HIDMA=y +CONFIG_DMATEST=y +CONFIG_UIO=y +CONFIG_UIO_PCI_GENERIC=y +CONFIG_VFIO=y +CONFIG_VFIO_PCI=y +CONFIG_VFIO_FSL_MC=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_MMIO=y +CONFIG_XEN_GNTDEV=y +CONFIG_XEN_GRANT_DEV_ALLOC=y +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_IMX_CAPTURE=y +CONFIG_ION=y +CONFIG_ION_SYSTEM_HEAP=y +CONFIG_ION_CMA_HEAP=y +CONFIG_FSL_DPAA2=y +CONFIG_FSL_DPAA2_ETHSW=y +CONFIG_FSL_DPAA2_MAC=y +CONFIG_FSL_SDK_DPA=y +CONFIG_FSL_PPFE=y +CONFIG_FSL_PPFE_UTIL_DISABLED=y +CONFIG_MFD_CROS_EC=y +CONFIG_CROS_EC_I2C=y +CONFIG_CROS_EC_SPI=y +CONFIG_COMMON_CLK_VERSATILE=y +CONFIG_CLK_SP810=y +CONFIG_CLK_VEXPRESS_OSC=y +CONFIG_COMMON_CLK_RK808=y +CONFIG_COMMON_CLK_SCPI=y +CONFIG_COMMON_CLK_CS2000_CP=y +CONFIG_COMMON_CLK_S2MPS11=y +CONFIG_COMMON_CLK_XGENE=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_CLK_IMX8MM=y +CONFIG_CLK_IMX8MN=y +CONFIG_CLK_IMX8MQ=y +CONFIG_CLK_IMX8QXP=y +CONFIG_HWSPINLOCK=y +CONFIG_ARM_MHU=y +CONFIG_IMX_MBOX=y +CONFIG_PLATFORM_MHU=y +CONFIG_ARM_SMMU=y +CONFIG_ARM_SMMU_V3=y +CONFIG_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_SOC_TI=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_EXTCON_USBC_CROS_EC=y +CONFIG_IIO=y +CONFIG_IMX8QXP_ADC=y +CONFIG_IIO_CROS_EC_SENSORS_CORE=m +CONFIG_IIO_CROS_EC_SENSORS=m +CONFIG_IIO_CROS_EC_LIGHT_PROX=m +CONFIG_IIO_CROS_EC_BARO=m +CONFIG_PWM=y +CONFIG_PWM_CROS_EC=m +CONFIG_PWM_IMX27=y +CONFIG_PHY_XGENE=y +CONFIG_PHY_MIXEL_MIPI_DPHY=y +CONFIG_PHY_QCOM_USB_HS=y +CONFIG_PHY_SAMSUNG_USB2=y +CONFIG_FSL_IMX8_DDR_PMU=m +CONFIG_HISI_PMU=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_IMX_OCOTP_SCU=y +CONFIG_FPGA=y +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_MUX_MMIO=y +CONFIG_MXC_SIM=y +CONFIG_MXC_EMVSIM=y +CONFIG_MXC_MLB150=y +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_EFIVAR_FS=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_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_USER=y +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_MD4=m +CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_ANSI_CPRNG=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 +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=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 diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx_4.9.123.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx_4.9.123.bb deleted file mode 100644 index bc47f2db..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-imx_4.9.123.bb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "Linux Kernel provided and supported by NXP" -DESCRIPTION = "Linux Kernel provided and supported by NXP with focus on \ -i.MX Family Reference Boards. It includes support for many IPs such as GPU, VPU and IPU." - -require recipes-kernel/linux/linux-imx.inc - -DEPENDS += "lzop-native bc-native" - -SRCBRANCH = "imx_4.9.123_imx8mm_ga" -LOCALVERSION = "-imx" -SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70" - -DEFAULT_PREFERENCE = "1" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb new file mode 100644 index 00000000..6c042184 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb @@ -0,0 +1,35 @@ +# Copyright 2013-2016 (C) Freescale Semiconductor +# Copyright 2017-2019 (C) NXP +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) +# +# SPDX-License-Identifier: MIT +# + +SUMMARY = "Linux Kernel provided and supported by NXP" +DESCRIPTION = "Linux Kernel provided and supported by NXP with focus on \ +i.MX Family Reference Boards. It includes support for many IPs such as GPU, VPU and IPU." + +require recipes-kernel/linux/linux-imx.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +DEPENDS += "lzop-native bc-native" + +SRCBRANCH = "lf-5.4.y" +LOCALVERSION = "-1.0.0" +SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466" + +# 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" + +DEFAULT_PREFERENCE = "1" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq.inc b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq.inc new file mode 100644 index 00000000..dcf28401 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq.inc @@ -0,0 +1,68 @@ +inherit kernel qoriq_build_64bit_kernel siteinfo +inherit fsl-kernel-localversion + +SUMMARY = "Linux Kernel for NXP QorIQ platforms" +SECTION = "kernel" +LICENSE = "GPLv2" + +S = "${WORKDIR}/git" + +DEPENDS_append = " libgcc" +# not put Images into /boot of rootfs, install kernel-image if needed +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" + +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" + +# Set the PV to the correct kernel version to satisfy the kernel version sanity check +PV = "${LINUX_VERSION}+git${SRCPV}" + +SCMVERSION ?= "y" +LOCALVERSION = "" +DELTA_KERNEL_DEFCONFIG ?= "" +DELTA_KERNEL_DEFCONFIG_prepend_qoriq-arm64 = "lsdk.config " +DELTA_KERNEL_DEFCONFIG_prepend_fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " +DELTA_KERNEL_DEFCONFIG_prepend_ls102xa = "multi_v7_lpae.config lsdk.config " + +do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot" +do_merge_delta_config[dirs] = "${B}" + +do_merge_delta_config() { + # create config with make config + oe_runmake -C ${S} O=${B} ${KERNEL_DEFCONFIG} + + # check if bigendian is enabled + if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then + echo "CONFIG_CPU_BIG_ENDIAN=y" >> .config + echo "CONFIG_MTD_CFI_BE_BYTE_SWAP=y" >> .config + fi + + # add config fragments + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do + if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then + oe_runmake -C ${S} O=${B} ${deltacfg} + elif [ -f "${WORKDIR}/${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} + elif [ -f "${deltacfg}" ]; then + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} + fi + done + cp .config ${WORKDIR}/defconfig +} +addtask merge_delta_config before do_preconfigure after do_patch + +# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) +do_compile_prepend_fsl-lsch2-32b() { + ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale +} + +do_install_prepend_fsl-lsch2-32b() { + rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale +} + +FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makefile-fix-gcc-8-build-error.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makefile-fix-gcc-8-build-error.patch deleted file mode 100644 index b4c4aed8..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makefile-fix-gcc-8-build-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5066b8f46b0f2348881923491b93825ac04d13d2 Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Sat, 29 Sep 2018 14:12:34 +0800 -Subject: [PATCH] Makefile: fix gcc-8 build error - -Signed-off-by: BJ DevOps Team ---- - Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile b/Makefile -index 53d57ac..b7c5fd4 100644 ---- a/Makefile -+++ b/Makefile -@@ -395,6 +395,7 @@ LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE)) - KBUILD_AFLAGS := -D__ASSEMBLY__ - KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ -+ -Wno-packed-not-aligned -Wno-tautological-compare \ - -Werror-implicit-function-declaration \ - -Wno-format-security \ - -std=gnu89 --- -1.8.3.1 - diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch new file mode 100644 index 00000000..b6c21d06 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch @@ -0,0 +1,26 @@ +From 6cf92b25d63ff9e2b77ce0fbf62f4d5d040ef5db Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Tue, 12 Mar 2019 03:52:03 +0100 +Subject: [PATCH] Makfefile: linux-5.4 add warning cflags on LSDK-20.04 + +Signed-off-by: C.r. Guo +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 07998b60d56c..7ec8fcb73e17 100644 +--- a/Makefile ++++ b/Makefile +@@ -458,7 +458,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE + KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ + -Werror=implicit-function-declaration -Werror=implicit-int \ +- -Wno-format-security \ ++ -Wno-address-of-packed-member -Wno-format-security \ + -std=gnu89 + KBUILD_CPPFLAGS := -D__KERNEL__ + KBUILD_AFLAGS_KERNEL := +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-fix-gcc8-build-error.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-fix-gcc8-build-error.patch deleted file mode 100644 index 3cd25014..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-fix-gcc8-build-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 844ce11967bca7b7f68c6cb459e02c9a10f32574 Mon Sep 17 00:00:00 2001 -From: BJ DevOps Team -Date: Tue, 3 Jul 2018 15:06:29 +0800 -Subject: [PATCH] fix gcc8 build error - ---- - Makefile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Makefile b/Makefile -index d6db01a..85d9d6c 100644 ---- a/Makefile -+++ b/Makefile -@@ -422,6 +422,8 @@ LINUXINCLUDE := \ - KBUILD_AFLAGS := -D__ASSEMBLY__ - KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common -fshort-wchar \ -+ -Wno-packed-not-aligned \ -+ -Wno-tautological-compare \ - -Werror-implicit-function-declaration \ - -Wno-format-security \ - -std=gnu89 --- -1.8.3.1 - diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch new file mode 100644 index 00000000..e3df8084 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch @@ -0,0 +1,63 @@ +From 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Mon Sep 17 00:00:00 2001 +From: Changbin Du +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_ 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 +Acked-by: Jiri Olsa +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Andrey Zhizhikin +--- + 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/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.14.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.14.bb deleted file mode 100644 index cb06ae43..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.14.bb +++ /dev/null @@ -1,70 +0,0 @@ -inherit kernel qoriq_build_64bit_kernel siteinfo -inherit fsl-kernel-localversion - -SUMMARY = "Linux Kernel for NXP QorIQ platforms" -SECTION = "kernel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ - file://0001-fix-gcc8-build-error.patch \ -" -SRCREV = "7e0006ca696756b867abbeb7a4ed97ffe9caf725" - -S = "${WORKDIR}/git" - -DEPENDS_append = " libgcc" -# not put Images into /boot of rootfs, install kernel-image if needed -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" - -KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" - -ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" -ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" - -SCMVERSION ?= "y" -LOCALVERSION = "" -DELTA_KERNEL_DEFCONFIG ?= "" -DELTA_KERNEL_DEFCONFIG_prepend_qoriq-arm64 = "lsdk.config " -DELTA_KERNEL_DEFCONFIG_prepend_fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " -DELTA_KERNEL_DEFCONFIG_prepend_ls102xa = "multi_v7_lpae.config lsdk.config " - -do_merge_delta_config[dirs] = "${B}" - -do_merge_delta_config() { - # create config with make config - oe_runmake -C ${S} O=${B} ${KERNEL_DEFCONFIG} - - # check if bigendian is enabled - if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then - echo "CONFIG_CPU_BIG_ENDIAN=y" >> .config - echo "CONFIG_MTD_CFI_BE_BYTE_SWAP=y" >> .config - fi - - # add config fragments - for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do - if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then - oe_runmake -C ${S} O=${B} ${deltacfg} - elif [ -f "${WORKDIR}/${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} - elif [ -f "${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} - fi - done - cp .config ${WORKDIR}/defconfig -} -addtask merge_delta_config before do_preconfigure after do_patch - -# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) -do_compile_prepend_fsl-lsch2-32b() { - ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale -} - -do_install_prepend_fsl-lsch2-32b() { - rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale -} - -FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.9.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.9.bb deleted file mode 100644 index 04ff7b96..00000000 --- a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_4.9.bb +++ /dev/null @@ -1,71 +0,0 @@ -inherit kernel qoriq_build_64bit_kernel siteinfo -inherit fsl-kernel-localversion - -SUMMARY = "Linux Kernel for Freescale QorIQ platforms" -SECTION = "kernel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ - file://0001-Makefile-fix-gcc-8-build-error.patch \ -" -SRCREV = "e8b01fb24fb8eb1adee9667eba2cae702b5892e9" - -S = "${WORKDIR}/git" - -DEPENDS_append = " libgcc" -# not put Images into /boot of rootfs, install kernel-image if needed -RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" - -KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}" -KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" - -ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" -ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME" - -SCMVERSION ?= "y" -LOCALVERSION = "" -DELTA_KERNEL_DEFCONFIG ?= "" -DELTA_KERNEL_DEFCONFIG_prepend_qoriq-arm64 = "lsdk.config " -DELTA_KERNEL_DEFCONFIG_prepend_fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " -DELTA_KERNEL_DEFCONFIG_prepend_ls102xa = "multi_v7_lpae.config lsdk.config " - -do_merge_delta_config[dirs] = "${B}" - -do_merge_delta_config() { - # create .config with make config - oe_runmake -C ${S} O=${B} ${KERNEL_DEFCONFIG} - - # check if bigendian is enabled - if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then - echo "CONFIG_CPU_BIG_ENDIAN=y" >> .config - echo "CONFIG_MTD_CFI_BE_BYTE_SWAP=y" >> .config - fi - - # add config fragments - for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do - if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then - oe_runmake -C ${S} O=${B} ${deltacfg} - elif [ -f "${WORKDIR}/${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} - elif [ -f "${deltacfg}" ]; then - ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} - fi - done - cp .config ${WORKDIR}/defconfig -} -addtask merge_delta_config before do_preconfigure after do_patch - -# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) -do_compile_prepend_fsl-lsch2-32b() { - ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale -} - -do_install_append_qoriq-arm() { - install -m 0644 arch/${ARCH}/boot/zImage ${D}/boot/zImage-${KERNEL_VERSION} - ln -sf zImage-${KERNEL_VERSION} ${D}/boot/zImage -} - -FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb new file mode 100644 index 00000000..d1b979f9 --- /dev/null +++ b/bsp/meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb @@ -0,0 +1,11 @@ +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +LINUX_VERSION = "5.4.3" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ + 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 \ +" +SRCREV = "134788b16485dd9fa81988681d2365ee38633fa2" + +require recipes-kernel/linux/linux-qoriq.inc diff --git a/bsp/meta-freescale/recipes-kernel/skmm-host/skmm-host_git.bb b/bsp/meta-freescale/recipes-kernel/skmm-host/skmm-host_git.bb index 4c7a371a..4b111b5d 100644 --- a/bsp/meta-freescale/recipes-kernel/skmm-host/skmm-host_git.bb +++ b/bsp/meta-freescale/recipes-kernel/skmm-host/skmm-host_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=99803d8e9a595c0bdb45ca710f353813" inherit module qoriq_build_64bit_kernel -SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-host.git;branch=sdk-v2.0.x" +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/skmm-host;protocol=https;nobranch=1" SRCREV = "d5912ebdb8d3b29b1e2df52710e8821d1ce3eb80" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb b/bsp/meta-freescale/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb index 94c3f4a7..db2f71fd 100644 --- a/bsp/meta-freescale/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb +++ b/bsp/meta-freescale/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb @@ -17,9 +17,9 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f" inherit autotools pkgconfig use-imx-headers -SRCBRANCH = "nxp/master" +SRCBRANCH = "MM_04.05.01_1909_L4.19.35" SRC_URI = "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "9a63071e7734bd164017f3761b8d1944c017611f" +SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch deleted file mode 100644 index 67a872cd..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ /dev/null @@ -1,35 +0,0 @@ -From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 25 Jan 2018 17:55:02 +0200 -Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall - through to system plugin scanner - -If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. - -Falling through to the one installed on the system is problamatic in cross-compilation -environemnts, regardless of whether one pointed to by the env var succeeded or failed. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin ---- - gst/gstpluginloader.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c -index 430829d..3a75731 100644 ---- a/gst/gstpluginloader.c -+++ b/gst/gstpluginloader.c -@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - helper_bin = g_strdup (env); - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -- } -- -- if (!res) { -+ } else { - GST_LOG ("Trying installed plugin scanner"); - - #ifdef G_OS_WIN32 --- -2.15.1 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch deleted file mode 100644 index 2cab87f9..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 24 Nov 2015 16:46:27 +0200 -Subject: [PATCH] introspection.m4: prefix pkgconfig paths with - PKG_CONFIG_SYSROOT_DIR - -We can't use our tweaked introspection.m4 from gobject-introspection tarball -because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which -is later supplied to g-ir-scanner. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin ---- - common/m4/introspection.m4 | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4 -index 162be57..217a6ae 100644 ---- a/common/m4/introspection.m4 -+++ b/common/m4/introspection.m4 -@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], - INTROSPECTION_GIRDIR= - INTROSPECTION_TYPELIBDIR= - if test "x$found_introspection" = "xyes"; then -- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` -- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection - INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);" - fi - AC_SUBST(INTROSPECTION_SCANNER) --- -2.6.2 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch deleted file mode 100644 index d86c78d7..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Wed, 20 Dec 2017 13:03:03 +0000 -Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc - -Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient -binaries instead of libtool wrapper or running them directly. - -Also substitute a bogus plugin scanner, as trying to run the real one is causing -issues during build on x86_64. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton - ---- - common/gtk-doc.mak | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak -index 3f83491..e5cb0d1 100644 ---- a/common/gtk-doc.mak -+++ b/common/gtk-doc.mak -@@ -6,11 +6,11 @@ - if GTK_DOC_USE_LIBTOOL - GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) --GTKDOC_RUN = $(LIBTOOL) --mode=execute -+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper - else - GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) --GTKDOC_RUN = -+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper - endif - - # We set GPATH here; this gives us semantics for GNU make -@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - GST_PLUGIN_PATH_1_0= \ - GST_REGISTRY_1_0=doc-registry.xml \ - $(GTKDOC_EXTRA_ENVIRONMENT) \ -+ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ - CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ - LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ --- -2.15.1 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch new file mode 100644 index 00000000..1d99ad12 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch @@ -0,0 +1,33 @@ +From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani +Date: Sat, 6 Apr 2013 01:22:22 +0200 +Subject: [PATCH] Disable yasm for libav when --disable-yasm + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Shane Wang +Signed-off-by: Carlos Rafael Giani +--- + configure.ac | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 22ede88..ef3c050 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -305,6 +305,12 @@ else + emblibav_configure_args="$emblibav_configure_args --enable-gpl" + fi + ++ AC_ARG_ENABLE(yasm, ++ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])]) ++ if test "x$enable_yasm" = "xno"; then ++ emblibav_configure_args="$emblibav_configure_args --disable-yasm" ++ fi ++ + # if we are cross-compiling, tell libav so + case $host in + *android*) +-- +1.8.2 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch new file mode 100644 index 00000000..b80d0739 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch @@ -0,0 +1,35 @@ +From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 20 Apr 2017 10:38:18 -0700 +Subject: [PATCH] configure: check for armv7ve variant + +OE passes -mcpu and -march via cmdline and if +package tries to detect one of it own then it +should be compatible otherwise, newer gcc7+ will +error out + +Check for relevant preprocessor macro to determine +armv7ve architecture + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gst-libs/ext/libav/configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure +index 4a5e477..727818e 100755 +--- a/gst-libs/ext/libav/configure ++++ b/gst-libs/ext/libav/configure +@@ -4295,6 +4295,7 @@ elif enabled arm; then + elif check_arm_arch 6Z; then echo armv6z + elif check_arm_arch 6ZK; then echo armv6zk + elif check_arm_arch 6T2; then echo armv6t2 ++ elif check_arm_arch EXT_IDIV; then echo armv7ve + elif check_arm_arch 7; then echo armv7 + elif check_arm_arch 7A 7_A; then echo armv7-a + elif check_arm_arch 7S; then echo armv7-a +-- +2.12.2 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch new file mode 100644 index 00000000..120c0798 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch @@ -0,0 +1,36 @@ +From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Wed, 11 Apr 2018 17:14:55 +0800 +Subject: [PATCH] Prevent host contamination + +Remove reference to host $(libdir) from .la files. + +Upstream-Status: Inappropriate [cross-compile specific] + +Signed-off-by: Anuj Mittal +--- + gst-libs/ext/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am +index 6cdc048..a19d255 100644 +--- a/gst-libs/ext/Makefile.am ++++ b/gst-libs/ext/Makefile.am +@@ -49,7 +49,7 @@ echo " GEN $1.la" && \ + echo "library_names=''" && \ + echo "old_library='$1.a'" && \ + echo "inherited_linker_flags=''" && \ +- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ ++ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ + echo "weak_library_names=''" && \ + echo "current=" && \ + echo "age=" && \ +@@ -58,7 +58,7 @@ echo " GEN $1.la" && \ + echo "shouldnotlink=no" && \ + echo "dlopen=''" && \ + echo "dlpreopen=''" && \ +- echo "libdir='$(libdir)'") > $1.la ++ echo "libdir=''") > $1.la + endef + + libavutil.la: diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch new file mode 100644 index 00000000..7a0b4488 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch @@ -0,0 +1,32 @@ +It will add -mips64r6 and -mips64r2 to cmdline which will +cause conflicts + +in OE we user mips32r2 and mips64r2 for mips arch versions +so there is no benefit of detecting it automatically by +poking at tools especially in cross env + +Fixes errors like + +linking -mnan=2008 module with previous -mnan=legacy modules +failed to merge target specific data of file + +-Khem +Upstream-Status: Inappropriate [OE-Specific] + +Index: gst-libav-1.10.1/gst-libs/ext/libav/configure +=================================================================== +--- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure ++++ gst-libav-1.10.1/gst-libs/ext/libav/configure +@@ -5269,12 +5269,9 @@ elif enabled mips; then + + # Enable minimum ISA based on selected options + if enabled mips64; then +- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6' + enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' + disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' + else +- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6' +- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5' + enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' + disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' + fi diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch new file mode 100644 index 00000000..36abf860 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch @@ -0,0 +1,26 @@ +Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset +Author: Bernhard Übelacker + +--- +Bug-Debian: https://bugs.debian.org/783082 +Last-Update: 2015-04-28 + +Upstream-Status: Backport [debian] + +Signed-off-by: Robert Yang + +--- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c ++++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c +@@ -2020,7 +2020,11 @@ decode_intra_mb: + // In deblocking, the quantizer is 0 + h->cur_pic.qscale_table[mb_xy] = 0; + // All coeffs are present +- memset(h->non_zero_count[mb_xy], 16, 48); ++ /*memset(h->non_zero_count[mb_xy], 16, 48);*/ ++ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */ ++ for (size_t i = 0; i < 48; i++) { ++ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16; ++ } + h->cur_pic.mb_type[mb_xy] = mb_type; + sl->last_qscale_diff = 0; + return 0; diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb new file mode 100644 index 00000000..3f1ec99d --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.0.bb @@ -0,0 +1,70 @@ +SUMMARY = "Libav-based GStreamer 1.x plugin" +HOMEPAGE = "http://gstreamer.freedesktop.org/" +SECTION = "multimedia" + +LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ + file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ + file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ + file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ + file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ + file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ + file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ + file://mips64_cpu_detection.patch \ + file://0001-configure-check-for-armv7ve-variant.patch \ + file://0001-fix-host-contamination.patch \ + " +SRC_URI[md5sum] = "e3a201a45985ddc1327cd496046ca818" +SRC_URI[sha256sum] = "dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a" + +S = "${WORKDIR}/gst-libav-${PV}" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz" + +inherit autotools pkgconfig upstream-version-is-even gtk-doc + +# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time, +# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the +# libav copy included in the gst-libav package. +PACKAGECONFIG ??= "orc yasm" + +PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl," +PACKAGECONFIG[libav] = "--with-system-libav,,libav" +PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc" +PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native" +PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" + +GSTREAMER_1_0_DEBUG ?= "--disable-debug" + +LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure" + +LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ + --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ + --ranlib='${RANLIB}' \ + ${GSTREAMER_1_0_DEBUG} \ + --cross-prefix='${HOST_PREFIX}'" + +# Disable assembly optimizations for X32, as this libav lacks the support +PACKAGECONFIG_remove_linux-gnux32 = "yasm" +LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm" + +LIBAV_EXTRA_CONFIGURE_COMMON = \ +'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"' + +EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}" + +FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" +FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" + +# http://errors.yoctoproject.org/Errors/Details/20493/ +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +# ffmpeg/libav disables PIC on some platforms (e.g. x86-32) +INSANE_SKIP_${PN} = "textrel" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index 355341e4..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c890afb8a542a272acb398e8fc289b790afa08e4 Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Sat, 21 Apr 2018 00:51:12 +0800 -Subject: [PATCH] Makefile.am: don't hardcode libtool name when running - introspection tools - -Do refine base on commit: 7592e793b3906355d76ca9a59f8fea2749ea2a4e - -Upstream-Status: Pending [review on oe-core list] - -Signed-off-by: Yuqing Zhu ---- - gst-libs/gst/insertbin/Makefile.am | 2 +- - gst-libs/gst/mpegts/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am -index 1f8ea30..4b98ef6 100644 ---- a/gst-libs/gst/insertbin/Makefile.am -+++ b/gst-libs/gst/insertbin/Makefile.am -@@ -45,7 +45,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS - --library=libgstinsertbin-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am -index f264e33..9934a4d 100644 ---- a/gst-libs/gst/mpegts/Makefile.am -+++ b/gst-libs/gst/mpegts/Makefile.am -@@ -82,7 +82,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \ - --library=libgstmpegts-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ - --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \ --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/configure-allow-to-disable-libssh2.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/configure-allow-to-disable-libssh2.patch deleted file mode 100644 index ad863298..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.imx/configure-allow-to-disable-libssh2.patch +++ /dev/null @@ -1,61 +0,0 @@ -From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001 -From: Wenzong Fan -Date: Thu, 18 Sep 2014 02:24:07 -0400 -Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2 - -libssh2 is automatically linked to if present, this undetermined -dependency may cause build errors like: - - .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2 - -libssh2 isn't an oe-core recipe, so allow to disable it from -configure. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan ---- - configure.ac | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -Index: gst-plugins-bad-1.12.3/configure.ac -=================================================================== ---- gst-plugins-bad-1.12.3.orig/configure.ac -+++ gst-plugins-bad-1.12.3/configure.ac -@@ -2139,6 +2139,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom - ]) - - dnl *** Curl *** -+AC_ARG_ENABLE([libssh2], -+ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_SSH2=yes ;; -+ no) NEED_SSH2=no ;; -+ auto) NEED_SSH2=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;; -+ esac],[NEED_SSH2=auto]) -+ - translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) - AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [ -@@ -2161,12 +2170,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin] - ]) - AC_SUBST(CURL_CFLAGS) - AC_SUBST(CURL_LIBS) -- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -- HAVE_SSH2="yes" -- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -- ], [ -- HAVE_SSH2="no" -- ]) -+ if test "x$NEED_SSH2" != "xno"; then -+ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -+ HAVE_SSH2="yes" -+ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -+ ], [ -+ HAVE_SSH2="no" -+ ]) -+ fi - AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes") - AC_SUBST(SSH2_CFLAGS) - AC_SUBST(SSH2_LIBS) diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch new file mode 100644 index 00000000..088976d8 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch @@ -0,0 +1,60 @@ +From e637d9f6bb961afcecb74faa6dff38562f6ce796 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +Date: Sun, 26 Jan 2020 10:45:28 +0000 +Subject: [PATCH] ext/wayland: fix meson build in nxp fork + +- Add Wayland protocols, which are not enabled in upstream +- Add missing compilation unit, which in NXP-specific + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin +--- + 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 +--- a/ext/wayland/meson.build ++++ b/ext/wayland/meson.build +@@ -8,6 +8,11 @@ wl_sources = [ + 'wllinuxdmabuf.c' + ] + ++imx_wl_sources = [ ++ 'wlutils.c', ++] ++wl_sources += imx_wl_sources ++ + if use_wayland + protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir') + +@@ -19,6 +24,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'], + ] ++ ++ imx_protocol_defs = [ ++ [ ++ '/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml', ++ 'alpha-compositing-unstable-v1-protocol.c', ++ 'alpha-compositing-unstable-v1-client-protocol.h' ++ ], ++ ['/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml', ++ 'hdr10-metadata-unstable-v1-protocol.c', ++ 'hdr10-metadata-unstable-v1-client-protocol.h' ++ ], ++ [ ++ '/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml', ++ 'linux-explicit-synchronization-unstable-v1-protocol.c', ++ 'linux-explicit-synchronization-unstable-v1-client-protocol.h' ++ ], ++ ] ++ protocol_defs += imx_protocol_defs ++ + protocols_files = [] + + foreach protodef: protocol_defs +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..13218520 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +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 + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19] + +Signed-off-by: Carlos Rafael Giani +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 67aeeb4d0..7b3314bd9 100644 +--- a/meson.build ++++ b/meson.build +@@ -411,7 +411,7 @@ python3 = import('python').find_installation() + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + 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/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch new file mode 100644 index 00000000..874b8abc --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch @@ -0,0 +1,45 @@ +From f41f356aebee916910453031c06c111000f2f261 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter +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 +--- + 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/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch new file mode 100644 index 00000000..a9e1bd00 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch @@ -0,0 +1,34 @@ +From cfb196925312b3c3d7a19dbb9a3ce64d20d66409 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +--- + 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/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch deleted file mode 100644 index 5c53e8e5..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-fix-build-for-opencv-3-4-2.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c247745faaf885fd3fa094198fc0ea288e295dbf Mon Sep 17 00:00:00 2001 -From: Thibault Saunier -Date: Fri, 13 Jul 2018 14:42:28 -0400 -Subject: [PATCH] opencv: Fix build for opencv >= 3.4.2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The `CV_RGB` macro is now in `imgproc.hpp`. - -Fixes: - - ../subprojects/gst-plugins-bad/ext/opencv/gsthanddetect.cpp:497:40: error: ‘CV_RGB’ was not declared in this scope - cvCircle (img, center, radius, CV_RGB (0, 0, 200), 1, 8, 0); - ^~~~~~ ---- - ext/opencv/MotionCells.cpp | 3 +++ - ext/opencv/gsthanddetect.cpp | 3 +++ - ext/opencv/gsttemplatematch.cpp | 3 +++ - 3 files changed, 9 insertions(+) - -diff --git a/ext/opencv/MotionCells.cpp b/ext/opencv/MotionCells.cpp -index f85989e117..175ec901b2 100644 ---- a/ext/opencv/MotionCells.cpp -+++ b/ext/opencv/MotionCells.cpp -@@ -51,6 +51,9 @@ - - #include - #include "MotionCells.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include -+#endif - #include - - MotionCells::MotionCells () -diff --git a/ext/opencv/gsthanddetect.cpp b/ext/opencv/gsthanddetect.cpp -index 60fd5be72b..47203fd0ea 100644 ---- a/ext/opencv/gsthanddetect.cpp -+++ b/ext/opencv/gsthanddetect.cpp -@@ -62,6 +62,9 @@ - - /* element header */ - #include "gsthanddetect.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include -+#endif - #include - - GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug); -diff --git a/ext/opencv/gsttemplatematch.cpp b/ext/opencv/gsttemplatematch.cpp -index f39208dc28..ec0b56af88 100644 ---- a/ext/opencv/gsttemplatematch.cpp -+++ b/ext/opencv/gsttemplatematch.cpp -@@ -63,6 +63,9 @@ - - #include "../../gst-libs/gst/gst-i18n-plugin.h" - #include "gsttemplatematch.h" -+#if (CV_MAJOR_VERSION >= 3) -+#include -+#endif - #include - - GST_DEBUG_CATEGORY_STATIC (gst_template_match_debug); diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch new file mode 100644 index 00000000..32261279 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch @@ -0,0 +1,30 @@ +From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Wed, 3 Feb 2016 18:05:41 -0800 +Subject: [PATCH] avoid including directly + +musl libc generates warnings if is included directly. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +--- + 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 +--- a/sys/dvb/gstdvbsrc.c ++++ b/sys/dvb/gstdvbsrc.c +@@ -97,7 +97,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +-- +1.9.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch new file mode 100644 index 00000000..2d5389d9 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch @@ -0,0 +1,85 @@ +From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Tue, 9 Feb 2016 14:00:00 -0800 +Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc + +For GStreamer functions declared with G_GNUC_NULL_TERMINATED, +ie __attribute__((__sentinel__)), gcc will generate a warning if the +last parameter passed to the function is not NULL (where a valid NULL +in this context is defined as zero with any pointer type). + +The C callers to such functions within gst-plugins-bad use the C NULL +definition (ie ((void*)0)), which is a valid sentinel. + +However the C++ NULL definition (ie 0L), is not a valid sentinel +without an explicit cast to a pointer type. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +--- + 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 + "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, + "interlace-mode", G_TYPE_STRING, + mode->interlaced ? "interleaved" : "progressive", +- "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL); ++ "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void*)NULL); + + if (input && mode->interlaced) { + if (mode->tff) +@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck + case bmdFormat8BitYUV: /* '2vuy' */ + gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", + "colorimetry", G_TYPE_STRING, mode->colorimetry, +- "chroma-site", G_TYPE_STRING, "mpeg2", NULL); ++ "chroma-site", G_TYPE_STRING, "mpeg2", (void*)NULL); + break; + case bmdFormat10BitYUV: /* 'v210' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void*)NULL); + break; + case bmdFormat8BitARGB: /* 'ARGB' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void*)NULL); + break; + case bmdFormat8BitBGRA: /* 'BGRA' */ +- gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL); ++ gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void*)NULL); + 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 + g_mutex_unlock (&self->input->lock); + + if (videosrc) { +- g_object_get (videosrc, "connection", &vconn, NULL); ++ g_object_get (videosrc, "connection", &vconn, (void *) NULL); + 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 + gpointer user_data) + { + gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, +- G_MAXINT, 1, NULL); ++ G_MAXINT, 1, (void *) NULL); + + return TRUE; + } diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch new file mode 100644 index 00000000..73681f10 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch @@ -0,0 +1,28 @@ +From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Tue, 26 Jan 2016 15:16:01 -0800 +Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +--- + 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 +--- 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, + GstVC1SeqLayer * seqlayer) + { + guint32 tmp; +- guint8 tmp8; ++ guint8 tmp8 = 0; + guint8 structA[8] = { 0, }; + guint8 structB[12] = { 0, }; + GstBitReader br; +-- +1.9.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch new file mode 100644 index 00000000..3fe3f649 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -0,0 +1,49 @@ +From 5830de9b1c8965683025082aeed7ccaf1dd85969 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +Date: Sun, 26 Jan 2020 19:55:06 +0000 +Subject: [PATCH 2/2] 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 +path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR +in order for the 'test' utility to pick up the absolute path. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andrey Zhizhikin +--- + ext/opencv/meson.build | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build +index f38b55dfe..a26403482 100644 +--- a/ext/opencv/meson.build ++++ b/ext/opencv/meson.build +@@ -78,20 +78,21 @@ else + endif + + if opencv_found ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() + opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix') + gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] + + # Check the data dir used by opencv for its xml data files + # Use prefix from pkg-config to be compatible with cross-compilation +- r = run_command('test', '-d', opencv_prefix + '/share/opencv') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/opencv4') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"' + else +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb deleted file mode 100644 index 2e3f3469..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb +++ /dev/null @@ -1,174 +0,0 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 " - -DEPENDS_append_imxgpu2d = " virtual/libg2d" -DEPENDS_append_mx8 = " libdrm" - -PACKAGECONFIG_append_mx6q = " opencv" -PACKAGECONFIG_append_mx6qp = " opencv" -PACKAGECONFIG_append_mx8 = " opencv kms" - -PACKAGECONFIG[wayland] = "--enable-wayland --disable-x11,--disable-wayland,wayland-native wayland wayland-protocols libdrm" - -# Disable introspection to fix [GstGL-1.0.gir] Error -EXTRA_OECONF_append = " --disable-introspection" - - -GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" -SRCBRANCH = "MM_04.04.02_1808_L4.9.123_MX8MM_GA" - -SRC_URI = " \ - ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ - file://configure-allow-to-disable-libssh2.patch \ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ - file://0001-opencv-fix-build-for-opencv-3-4-2.patch \ -" - -SRCREV = "03e6ef6a371a0578a9629abde8e9c83e66f34b11" - -DEFAULT_PREFERENCE = "-1" - -# This remove "--exclude=autopoint" option from autoreconf argument to avoid -# configure.ac:30: error: required file './ABOUT-NLS' not found -EXTRA_AUTORECONF = "" - -# include fragment shaders -FILES_${PN}-opengl += "/usr/share/*.fs" - -PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}" -PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" - -S = "${WORKDIR}/git" - -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" - -DEPENDS += "gstreamer1.0-plugins-base jpeg" - -inherit gettext bluetooth - -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)} \ - bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \ -" - -# the gl packageconfig enables OpenGL elements that haven't been ported -# 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[assrender] = "--enable-assrender,--disable-assrender,libass" -PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" -PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2" -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2" -PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" -PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb" -PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl" -PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" -PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2" -PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa" -PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" -PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle" -PACKAGECONFIG[gl] = "--enable-gl,--disable-gl," -PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm" -PACKAGECONFIG[libde265] = "--enable-libde265,--disable-libde265,libde265" -PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" -PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" -PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" -PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon" -PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" -PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" -PACKAGECONFIG[openh264] = "--enable-openh264,--disable-openh264,openh264" -PACKAGECONFIG[openjpeg] = "--enable-openjpeg,--disable-openjpeg,openjpeg" -# the opus encoder/decoder elements are now in the -base package, -# but the opus parser remains in -bad -PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav" -PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg" -PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" -PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc" -PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2" -PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" -PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp" -PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa" -PACKAGECONFIG[ttml] = "--enable-ttml,--disable-ttml,libxml2 pango cairo" -PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev" -PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc" -PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc" -PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm" -PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" -PACKAGECONFIG[webrtc] = "--enable-webrtc,--disable-webrtc,libnice" -PACKAGECONFIG[webrtcdsp] = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing" - -# these plugins have no corresponding library in OE-core or meta-openembedded: -# openni2 winks direct3d directsound winscreencap acm apple_media iqa -# android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa -# lv2 mpeg2enc mplex msdk musepack nvenc ofa openmpt opensles soundtouch -# spandsp spc teletextdec vdpau wasapi x265 zbar - -EXTRA_OECONF += " \ - --enable-decklink \ - --enable-dvb \ - --enable-fbdev \ - --enable-ipcpipeline \ - --enable-netsim \ - --enable-shm \ - --enable-vcd \ - --disable-acm \ - --disable-android_media \ - --disable-aom \ - --disable-apple_media \ - --disable-avc \ - --disable-bs2b \ - --disable-chromaprint \ - --disable-daala \ - --disable-direct3d \ - --disable-directsound \ - --disable-dts \ - --disable-fdk_aac \ - --disable-gme \ - --disable-gsm \ - --disable-iqa \ - --disable-kate \ - --disable-ladspa \ - --disable-lv2 \ - --disable-mpeg2enc \ - --disable-mplex \ - --disable-msdk \ - --disable-musepack \ - --disable-nvenc \ - --disable-ofa \ - --disable-openexr \ - --disable-openmpt \ - --disable-openni2 \ - --disable-opensles \ - --disable-soundtouch \ - --disable-spandsp \ - --disable-spc \ - --disable-srt \ - --disable-teletextdec \ - --disable-vdpau \ - --disable-wasapi \ - --disable-wildmidi \ - --disable-winks \ - --disable-winscreencap \ - --disable-x265 \ - --disable-zbar \ - ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \ -" -export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs" -FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*" -FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb new file mode 100644 index 00000000..59aeca11 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb @@ -0,0 +1,173 @@ +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" + +DEFAULT_PREFERENCE = "-1" + +PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}" +PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}" + +GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" +SRCBRANCH = "MM_04.05.03_1911_L5.4.0" + +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://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" + +S = "${WORKDIR}/git" + +LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ + file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 " + +DEPENDS += "gstreamer1.0-plugins-base" + +inherit gobject-introspection + +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)} \ + bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \ + ttml uvch264 webp \ +" + +PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" +PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5" +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo" +PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" +PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2" +PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394" +PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb" +PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl" +PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" +PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" +PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" +PACKAGECONFIG[hls] = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabled,nettle" +# the gl packageconfig enables OpenGL elements that haven't been ported +# 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[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm" +PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265" +PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms" +PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2" +PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" +PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk" +PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon" +PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" +PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv" +PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264" +PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg" +PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt" +# the opus encoder/decoder elements are now in the -base package, +# but the opus parser remains in -bad +PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav" +PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg" +PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump" +PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc" +PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled,usrsctp" +PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" +PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" +PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" +PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" +PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" +PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader" +PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" +PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice" +PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" +PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" + +# Following package config in not available in NXP fork: +#PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms" + +# these plugins currently have no corresponding library in OE-core or meta-openembedded: +# aom androidmedia applemedia bs2b chromaprint d3dvideosink +# directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc +# mplex musepack nvdec nvenc ofa openexr openni2 opensles +# soundtouch spandsp srt teletext vdpau wasapi wildmidi winks +# winscreencap wpe x265 + +EXTRA_OEMESON += " \ + -Ddecklink=enabled \ + -Ddvb=enabled \ + -Dfbdev=enabled \ + -Dipcpipeline=enabled \ + -Dnetsim=enabled \ + -Dshm=enabled \ + -Daom=disabled \ + -Dandroidmedia=disabled \ + -Dapplemedia=disabled \ + -Dbs2b=disabled \ + -Dchromaprint=disabled \ + -Dd3dvideosink=disabled \ + -Ddirectsound=disabled \ + -Ddts=disabled \ + -Dfdkaac=disabled \ + -Dflite=disabled \ + -Dgme=disabled \ + -Dgsm=disabled \ + -Diqa=disabled \ + -Dkate=disabled \ + -Dladspa=disabled \ + -Dlv2=disabled \ + -Dmpeg2enc=disabled \ + -Dmplex=disabled \ + -Dmsdk=disabled \ + -Dmusepack=disabled \ + -Dnvdec=disabled \ + -Dnvenc=disabled \ + -Dofa=disabled \ + -Dopenexr=disabled \ + -Dopenmpt=disabled \ + -Dopenni2=disabled \ + -Dopensles=disabled \ + -Dsoundtouch=disabled \ + -Dspandsp=disabled \ + -Dsrt=disabled \ + -Dteletext=disabled \ + -Dvdpau=disabled \ + -Dwasapi=disabled \ + -Dwildmidi=disabled \ + -Dwinks=disabled \ + -Dwinscreencap=disabled \ + -Dwpe=disabled \ + -Dx265=disabled \ + -Dzbar=disabled \ + ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-Dyadif=disabled", "", d)} \ +" + +export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +FILES_${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" +FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" +FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs" +# include fragment shaders +FILES_${PN}-opengl += "/usr/share/*.fs" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index a1cc7d3d..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,171 +0,0 @@ -From a049bb15839557594713cb32e7d6bfe0e2127392 Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Fri, 20 Apr 2018 22:46:46 +0800 -Subject: [PATCH] Makefile.am: don't hardcode libtool name when running - introspection tools - -Do patch refine basing on commit: f1d9652351e7754c63003104eceb526af424c7e0 - -Upstream-Status: Pending [review on oe-core maillist] - -Signed-off-by: Yuqing Zhu ---- - gst-libs/gst/allocators/Makefile.am | 2 +- - gst-libs/gst/app/Makefile.am | 2 +- - gst-libs/gst/audio/Makefile.am | 2 +- - gst-libs/gst/gl/Makefile.am | 2 +- - gst-libs/gst/pbutils/Makefile.am | 2 +- - gst-libs/gst/riff/Makefile.am | 2 +- - gst-libs/gst/rtp/Makefile.am | 2 +- - gst-libs/gst/rtsp/Makefile.am | 2 +- - gst-libs/gst/sdp/Makefile.am | 2 +- - gst-libs/gst/tag/Makefile.am | 2 +- - gst-libs/gst/video/Makefile.am | 2 +- - 11 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index 0edc0ae..d0d425d 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -58,7 +58,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-allocators-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index 52f6ad3..5bfd606 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -56,7 +56,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-app-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 2922245..7fb65f2 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -184,7 +184,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ - --include=GstTag-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am -index b04187f..576bf1c 100644 ---- a/gst-libs/gst/gl/Makefile.am -+++ b/gst-libs/gst/gl/Makefile.am -@@ -205,7 +205,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ - --include=GstVideo-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index ae51993..35a6e44 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -103,7 +103,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --include=GstTag-@GST_API_VERSION@ \ - --include=GstVideo-@GST_API_VERSION@ \ - --include=GstAudio-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-tag-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index fb53f06..e66ef4f 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -49,7 +49,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ - # --include=Gst-@GST_API_VERSION@ \ --# --libtool="$(top_builddir)/libtool" \ -+# --libtool="$(LIBTOOL)" \ - # --pkg gstreamer-@GST_API_VERSION@ \ - # --pkg gstreamer-tag-@GST_API_VERSION@ \ - # --pkg gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index a6f971d..77ebeeb 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -69,7 +69,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index ceb07f4..db9d0fd 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -76,7 +76,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstSdp-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-sdp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index e197e9b..6e05cc7 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -34,7 +34,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-sdp-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index 0247c33..c86515b 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -66,7 +66,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-tag-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index 1b74f37..0f7c07e 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -126,7 +126,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-video-@GST_API_VERSION@ \ --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-gstreamer1.0-plugins-base-Fix-ion.h-header-inclusion.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-gstreamer1.0-plugins-base-Fix-ion.h-header-inclusion.patch deleted file mode 100644 index d3822cfc..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0001-gstreamer1.0-plugins-base-Fix-ion.h-header-inclusion.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 84f693a70e6f3084ca67063a6336aaf3287abb49 Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Thu, 27 Sep 2018 13:53:49 +0800 -Subject: [PATCH] gstreamer1.0-plugins-base: Fix ion.h header inclusion to be - standard - -NXP "solution" was to manually copy the header to include/linux. -Let's point the Makefile to the proper (mainline) location instead: -https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h - -Signed-off-by: Yuqing Zhu ---- - configure.ac | 2 +- - gst-libs/gst/allocators/gstionmemory.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 51272df..4bea0dd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -678,7 +678,7 @@ AG_GST_CHECK_FEATURE(CDPARANOIA, [CDParanoia], cdparanoia, [ - dnl check for ion - translit(dnm, m, l) AM_CONDITIONAL(USE_ION, true) - AG_GST_CHECK_FEATURE(ION, [ion], ion, [ -- AC_CHECK_HEADER(linux/ion.h, HAVE_ION="yes", HAVE_ION="no") -+ AC_CHECK_HEADER(ion.h, HAVE_ION="yes", HAVE_ION="no") - ]) - - dnl FIXME : add second check somehow if that is necessary -diff --git a/gst-libs/gst/allocators/gstionmemory.c b/gst-libs/gst/allocators/gstionmemory.c -index 5e0455c..a285f09 100644 ---- a/gst-libs/gst/allocators/gstionmemory.c -+++ b/gst-libs/gst/allocators/gstionmemory.c -@@ -26,7 +26,7 @@ - #include - #include - #include --#include -+#include - #include - #include - --- -1.9.1 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch deleted file mode 100644 index 4b6cfdd6..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch +++ /dev/null @@ -1,289 +0,0 @@ -From e3f28d15e38f7633d8ed4023fe883b8377c0597e Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Fri, 20 Apr 2018 02:03:57 +0800 -Subject: [PATCH] Makefile.am: prefix calls to pkg-config with - PKG_CONFIG_SYSROOT_DIR - -Do patch refine base on commit: 990b653c7b6de1937ec759019982d6c5f15770f7 - -Upstream-Status: Pending [review on oe-core maillist] - -Signed-off-by: Yuqing Zhu ---- - gst-libs/gst/allocators/Makefile.am | 4 ++-- - gst-libs/gst/app/Makefile.am | 8 ++++---- - gst-libs/gst/audio/Makefile.am | 12 ++++++------ - gst-libs/gst/pbutils/Makefile.am | 12 ++++++------ - gst-libs/gst/riff/Makefile.am | 8 ++++---- - gst-libs/gst/rtp/Makefile.am | 8 ++++---- - gst-libs/gst/rtsp/Makefile.am | 4 ++-- - gst-libs/gst/sdp/Makefile.am | 4 ++-- - gst-libs/gst/tag/Makefile.am | 8 ++++---- - gst-libs/gst/video/Makefile.am | 8 ++++---- - 10 files changed, 38 insertions(+), 38 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index c4412a1..9f9d14d 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -59,7 +59,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --c-include "gst/allocators/allocators.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -83,7 +83,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index 5bfd606..c231267 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -51,8 +51,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --c-include "gst/app/app.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -79,8 +79,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 7fb65f2..5379f79 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -174,12 +174,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - --c-include "gst/audio/audio.h" \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library=libgstaudio-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -208,8 +208,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index 35a6e44..49d6894 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -88,14 +88,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --c-include "gst/pbutils/pbutils.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/video/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/audio/" \ - --library=libgstpbutils-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library-path="$(top_builddir)/gst-libs/gst/video/" \ - --library-path="$(top_builddir)/gst-libs/gst/audio/" \ -@@ -128,8 +128,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ - --includedir="$(top_builddir)/gst-libs/gst/video/" \ - --includedir="$(top_builddir)/gst-libs/gst/audio/" \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index e66ef4f..c8c588a 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -43,8 +43,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --c-include "gst/riff/riff.h" \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # --library=libgstriff-@GST_API_VERSION@.la \ - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ -@@ -75,8 +75,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --includedir=$(builddir) \ - # --includedir=$(builddir)/../tag \ - # --includedir=$(builddir)/../audio \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - # - #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index 77ebeeb..9aee788 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -64,8 +64,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --c-include "gst/rtp/rtp.h" \ - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -92,8 +92,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index db9d0fd..79027cb 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ - --add-include-path=$(builddir)/../sdp \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstrtsp-@GST_API_VERSION@.la \ - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ -@@ -101,7 +101,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir=$(builddir)/../sdp \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index 6e05cc7..c7cf514 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --warn-all \ - --c-include "gst/sdp/sdp.h" \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -55,7 +55,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index c86515b..363e6d2 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -61,8 +61,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --c-include "gst/tag/tag.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -89,8 +89,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index 0f7c07e..d642267 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -121,8 +121,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --c-include "gst/video/video.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -149,8 +149,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0003-riff-add-missing-include-directories-when-calling-in.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0003-riff-add-missing-include-directories-when-calling-in.patch deleted file mode 100644 index 9b66f7f4..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0003-riff-add-missing-include-directories-when-calling-in.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3c2c2d5dd08aa30ed0e8acd8566ec99412bb8209 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 26 Oct 2015 17:29:37 +0200 -Subject: [PATCH 3/4] riff: add missing include directories when calling - introspection scanner - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/riff/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index 0a115cc..5057a58 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -39,6 +39,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --strip-prefix=Gst \ - # --warn-all \ - # --c-include "gst/riff/riff.h" \ -+# -I$(top_srcdir)/gst-libs \ -+# -I$(top_builddir)/gst-libs \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ - # --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --- -2.6.2 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch deleted file mode 100644 index 4adf6054..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 26 Oct 2015 17:30:14 +0200 -Subject: [PATCH 4/4] rtsp: drop incorrect reference to gstreamer-sdp in - Makefile.am - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin ---- - gst-libs/gst/rtsp/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index 4f6d9f8..0afa370 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -75,7 +75,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ -- --pkg gstreamer-sdp-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \ - --add-init-section="$(INTROSPECTION_INIT)" \ - --output $@ \ --- -2.6.2 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/make-gio_unix_2_0-dependency-configurable.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/make-gio_unix_2_0-dependency-configurable.patch deleted file mode 100644 index 23950b67..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.14.imx/make-gio_unix_2_0-dependency-configurable.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7ffa6e3d00e1d8a060f3f4c2bb9a72691af05d79 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Wed, 20 Jan 2016 13:00:00 -0800 -Subject: [PATCH] make gio_unix_2_0 dependency configurable - -Prior to 1.7.1, gst-plugins-base accepted a configure option to -disable gio_unix_2_0, however it was implemented incorrectly using -AG_GST_CHECK_FEATURE. That was fixed in 1.7.1 by making the -dependency unconditional. - - http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=aadefefba88afe4acbe64454650f24e7ce7c8d70 - -To make builds deterministic, re-instate support for ---disable-gio_unix_2_0, but implement it using the AC_ARG_ENABLE -instead of AG_GST_CHECK_FEATURE. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy - ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 12807bc..35a0bf3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -806,9 +806,16 @@ AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes") - AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes") - - dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c *** -+AC_ARG_ENABLE([gio_unix_2_0], -+ [AS_HELP_STRING([--disable-gio_unix_2_0],[disable use of gio_unix_2_0])], -+ [], -+ [enable_gio_unix_2_0=yes]) -+ -+if test "x${enable_gio_unix_2_0}" != "xno"; then - PKG_CHECK_MODULES(GIO_UNIX_2_0, gio-unix-2.0 >= 2.24, - HAVE_GIO_UNIX_2_0="yes", - HAVE_GIO_UNIX_2_0="no") -+fi - AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes") - - dnl *** finalize CFLAGS, LDFLAGS, LIBS diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch new file mode 100644 index 00000000..61baf2f9 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gst-libs-gst-gl-wayland-fix-meson-build.patch @@ -0,0 +1,36 @@ +From a145a129a8122f21c1e243b3dc2e5708f4c13bef Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +Date: Thu, 23 Jan 2020 12:54:10 +0000 +Subject: [PATCH] gst-libs gst gl wayland: fix meson build + +Since introduction of meson build system, modifications introduced in +NXP fork are breaking the build, where xdg-shell-client-protocol.h +is searched via relative path. This code is only present in NXP fork and +should be removed. + +This reverts commit [48bde732b00fb42df636ebbaf3b06e5e7971c206] +("wayland: fix build break in yocto") from upstream. + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin +--- + gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h +index d1795591f..89dedd9b5 100644 +--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h ++++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h +@@ -22,7 +22,7 @@ + #define __GST_GL_WINDOW_WAYLAND_EGL_H__ + + #include +-#include ++#include "xdg-shell-client-protocol.h" + #include + #include + +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch new file mode 100644 index 00000000..da152531 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch @@ -0,0 +1,220 @@ +From def285f623bc30b9d1acede00393188e693cc741 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +Date: Sat, 22 Feb 2020 13:22:57 +0000 +Subject: [PATCH] gstreamer-plugins-base: fix meson build in nxp fork + +- Add missing IMX header file into istall target; +- Allocator's meta data files are missing in meson.build, bring them back; +- Add ION NXP-specific allocator to meson.build; +- Introduce additional configuration option to pass extra include paths, + which are required to build ION allocator; +- Some video sources are missing, bring them also into the build; + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin +--- + gst-libs/gst/allocators/meson.build | 30 +++++++++++++++++++++++++++-- + gst-libs/gst/gl/gstglconfig.h.meson | 2 ++ + gst-libs/gst/gl/meson.build | 20 +++++++++++++++++++ + gst-libs/gst/meson.build | 6 ++++++ + gst-libs/gst/video/meson.build | 11 +++++++++++ + meson.build | 3 +++ + meson_options.txt | 4 ++++ + 7 files changed, 74 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build +index 364baeebf..30b1495c9 100644 +--- a/gst-libs/gst/allocators/meson.build ++++ b/gst-libs/gst/allocators/meson.build +@@ -5,18 +5,44 @@ gst_allocators_headers = [ + 'gstphysmemory.h', + 'gstdmabuf.h', + ] ++ ++imx_gst_allocators_headers = [ ++ 'gstphymemmeta.h', ++ 'gstdmabufmeta.h', ++ 'gstallocatorphymem.h', ++] ++ ++if cc.has_header('linux/ion.h', include_directories : imx_includes) ++ imx_gst_allocators_headers += [ ++ 'gstionmemory.h', ++ ] ++endif ++ ++gst_allocators_headers += imx_gst_allocators_headers ++ + install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/') + + gst_allocators_sources = [ 'gstdmabuf.c', 'gstfdmemory.c', 'gstphysmemory.c'] ++ ++imx_gst_allocators_sources = ['gstdmabufmeta.c', 'gstphymemmeta.c', 'gstallocatorphymem.c'] ++ ++if cc.has_header('linux/ion.h', include_directories : imx_includes) ++ imx_gst_allocators_sources += [ ++ 'gstionmemory.c', ++ ] ++endif ++ ++gst_allocators_sources += imx_gst_allocators_sources ++ + gstallocators = library('gstallocators-@0@'.format(api_version), + gst_allocators_sources, + c_args : gst_plugins_base_args + ['-DBUILDING_GST_ALLOCATORS'], +- include_directories: [configinc, libsinc], ++ include_directories: [configinc, libsinc, imx_includes], + version : libversion, + soversion : soversion, + darwin_versions : osxversion, + install : true, +- dependencies : [gst_dep], ++ dependencies : [video_dep, gst_dep], + ) + + allocators_gen_sources = [] +diff --git a/gst-libs/gst/gl/gstglconfig.h.meson b/gst-libs/gst/gl/gstglconfig.h.meson +index 11795c16c..66cd54a7e 100644 +--- a/gst-libs/gst/gl/gstglconfig.h.meson ++++ b/gst-libs/gst/gl/gstglconfig.h.meson +@@ -32,8 +32,10 @@ G_BEGIN_DECLS + #mesondefine GST_GL_HAVE_PLATFORM_CGL + #mesondefine GST_GL_HAVE_PLATFORM_EAGL + ++#mesondefine GST_GL_HAVE_IONDMA + #mesondefine GST_GL_HAVE_DMABUF + #mesondefine GST_GL_HAVE_VIV_DIRECTVIV ++#mesondefine GST_GL_HAVE_PHYMEM + + #mesondefine GST_GL_HAVE_GLEGLIMAGEOES + #mesondefine GST_GL_HAVE_GLCHAR +diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build +index 0e0ba1b7d..6f6c6866d 100644 +--- a/gst-libs/gst/gl/meson.build ++++ b/gst-libs/gst/gl/meson.build +@@ -123,8 +123,10 @@ glconf_options = [ + 'GST_GL_HAVE_PLATFORM_CGL', + 'GST_GL_HAVE_PLATFORM_EAGL', + ++ 'GST_GL_HAVE_IONDMA', + 'GST_GL_HAVE_DMABUF', + 'GST_GL_HAVE_VIV_DIRECTVIV', ++ 'GST_GL_HAVE_PHYMEM', + + 'GST_GL_HAVE_GLEGLIMAGEOES', + 'GST_GL_HAVE_GLCHAR', +@@ -146,6 +148,18 @@ if unneeded_dep.found() + error ('Found unfindable dependency') + endif + ++if cc.has_header('linux/ion.h', include_directories : imx_includes) ++ glconf.set10('GST_GL_HAVE_IONDMA', 1) ++ gl_sources += [ ++ 'gstglmemorydma.c', ++ ] ++ gl_headers += [ ++ 'gstglmemorydma.h', ++ ] ++else ++ error('i.MX platform requires ION support to be enabled!') ++endif ++ + # OpenGL/GLES2 libraries + gl_lib_deps = [] + # GL platform - EGL, GLX, CGL, WGL, etc +@@ -501,6 +515,7 @@ if need_platform_egl != 'no' + glconf.set10('GST_GL_HAVE_DMABUF', 1) + endif + ++ + egl_includes = ''' + #include + #include +@@ -808,9 +823,14 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no' + enabled_gl_winsys += 'viv-fb' + glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1) + glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1) ++ glconf.set10('GST_GL_HAVE_PHYMEM', 1) + gl_sources += [ + 'viv-fb/gstgldisplay_viv_fb.c', + 'viv-fb/gstglwindow_viv_fb_egl.c', ++ 'gstglphymemory.c', ++ ] ++ gl_headers += [ ++ 'gstglphymemory.h', + ] + gl_cpp_args += ['-DEGL_API_FB'] + endif +diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build +index cd3b5b043..1935f46e5 100644 +--- a/gst-libs/gst/meson.build ++++ b/gst-libs/gst/meson.build +@@ -11,3 +11,9 @@ subdir('app') + subdir('allocators') + # FIXME: gl deps are automagic + subdir('gl') ++ ++# Install dangling imx header, required by other plugins ++gst_imx_header = [ ++ 'gstimxcommon.h', ++] ++install_headers(gst_imx_header, subdir : 'gstreamer-1.0/') +diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build +index b4dfcdf65..d8531f199 100644 +--- a/gst-libs/gst/video/meson.build ++++ b/gst-libs/gst/video/meson.build +@@ -35,6 +35,11 @@ video_sources = [ + 'videooverlay.c', + ] + ++imx_video_sources = [ ++ 'gstvideohdr10meta.c', ++] ++video_sources += imx_video_sources ++ + video_headers = [ + 'colorbalance.h', + 'colorbalancechannel.h', +@@ -70,6 +75,12 @@ video_headers = [ + 'video-overlay-composition.h', + 'video-multiview.h', + ] ++ ++imx_video_headers = [ ++ 'gstvideohdr10meta.h', ++] ++video_headers += imx_video_headers ++ + install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/') + + video_mkenum_headers = [ +diff --git a/meson.build b/meson.build +index 2fca28205..7781934cd 100644 +--- a/meson.build ++++ b/meson.build +@@ -103,6 +103,9 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev) + add_project_arguments('-DG_DISABLE_CHECKS', language: 'c') + endif + ++# Define i.MX-specific include path as variable from options ++imx_includes = include_directories(get_option('extra_imx_incdir')) ++ + check_headers = [ + ['HAVE_DLFCN_H', 'dlfcn.h'], + ['HAVE_EMMINTRIN_H', 'emmintrin.h'], +diff --git a/meson_options.txt b/meson_options.txt +index e7af4dd45..d44401ca6 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -85,3 +85,7 @@ option('package-name', type : 'string', yield : true, + description : 'package name to use in plugins') + option('package-origin', type : 'string', value : 'Unknown package origin', yield : true, + description : 'package origin URL to use in plugins') ++ ++# NXP specific options ++option('extra_imx_incdir', type : 'string', yield : true, description : 'i.MX specific header include path') ++ +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..55871883 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,34 @@ +From f82db8496df8ffb8352248e895258c19f8f4776b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Thu, 17 Oct 2019 20:06:24 +0100 +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 +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [30672ba7d134553e59935ddc875104adba26f25c] + +Signed-off-by: Carlos Rafael Giani + +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 2fca28205..2714af718 100644 +--- a/meson.build ++++ b/meson.build +@@ -355,7 +355,7 @@ endif + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch new file mode 100644 index 00000000..9494f622 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch @@ -0,0 +1,233 @@ +From 7a21c86a3facfc7fe8285e764324839b2e55df8a Mon Sep 17 00:00:00 2001 +From: Thibault Saunier +Date: Mon, 22 Oct 2018 11:44:37 +0200 +Subject: [PATCH] meson: Add variables for gir files + +And flatten list of sources for dependencies + +Upstream-Status: Backport [685731e989dc074a4b0d48b6c8062e2738f09719] + +Signed-off-by: Carlos Rafael Giani + +--- + gst-libs/gst/allocators/meson.build | 5 +++-- + gst-libs/gst/app/meson.build | 6 ++++-- + gst-libs/gst/audio/meson.build | 5 +++-- + gst-libs/gst/pbutils/meson.build | 5 +++-- + gst-libs/gst/rtp/meson.build | 6 ++++-- + gst-libs/gst/rtsp/meson.build | 5 +++-- + gst-libs/gst/sdp/meson.build | 6 ++++-- + gst-libs/gst/tag/meson.build | 5 +++-- + gst-libs/gst/video/meson.build | 5 +++-- + 9 files changed, 30 insertions(+), 18 deletions(-) + +diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build +index 364baeebf..56f156dc3 100644 +--- a/gst-libs/gst/allocators/meson.build ++++ b/gst-libs/gst/allocators/meson.build +@@ -22,7 +22,7 @@ gstallocators = library('gstallocators-@0@'.format(api_version), + allocators_gen_sources = [] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ] +- allocators_gen_sources += [gnome.generate_gir(gstallocators, ++ allocators_gir = gnome.generate_gir(gstallocators, + sources : gst_allocators_sources + gst_allocators_headers, + namespace : 'GstAllocators', + nsversion : api_version, +@@ -33,7 +33,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : [gst_dep] +- )] ++ ) ++ allocators_gen_sources += allocators_gir + endif + + allocators_dep = declare_dependency(link_with: gstallocators, +diff --git a/gst-libs/gst/app/meson.build b/gst-libs/gst/app/meson.build +index 81dd0f42c..7a90f5e10 100644 +--- a/gst-libs/gst/app/meson.build ++++ b/gst-libs/gst/app/meson.build +@@ -32,7 +32,7 @@ gstapp = library('gstapp-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ] +- app_gen_sources += [gnome.generate_gir(gstapp, ++ app_gir = gnome.generate_gir(gstapp, + sources : app_sources + app_headers + [gstapp_c] + [gstapp_h], + namespace : 'GstApp', + nsversion : api_version, +@@ -43,7 +43,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : [gst_dep, gst_base_dep] +- )] ++ ) ++ ++ app_gen_sources += app_gir + endif + + app_dep = declare_dependency(link_with: gstapp, +diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build +index 0e4efab2e..2a449d4bf 100644 +--- a/gst-libs/gst/audio/meson.build ++++ b/gst-libs/gst/audio/meson.build +@@ -153,7 +153,7 @@ gstaudio = library('gstaudio-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ] +- audio_gen_sources += [gnome.generate_gir(gstaudio, ++ audio_gir = gnome.generate_gir(gstaudio, + sources : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h], + namespace : 'GstAudio', + nsversion : api_version, +@@ -164,7 +164,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstaudio_deps +- )] ++ ) ++ audio_gen_sources += [audio_gir] + endif + + audio_dep = declare_dependency(link_with : gstaudio, +diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build +index 2faf62622..0e96722fd 100644 +--- a/gst-libs/gst/pbutils/meson.build ++++ b/gst-libs/gst/pbutils/meson.build +@@ -63,7 +63,7 @@ pbutils = library('gstpbutils-@0@'.format(api_version), + pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ] +- pbutils_gen_sources += [gnome.generate_gir(pbutils, ++ pbutils_gir = gnome.generate_gir(pbutils, + sources : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h], + namespace : 'GstPbutils', + nsversion : api_version, +@@ -74,7 +74,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstpbutils_deps +- )] ++ ) ++ pbutils_gen_sources += [pbutils_gir] + endif + + pbutils_dep = declare_dependency(link_with : pbutils, +diff --git a/gst-libs/gst/rtp/meson.build b/gst-libs/gst/rtp/meson.build +index f47ec6592..7ea6658d5 100644 +--- a/gst-libs/gst/rtp/meson.build ++++ b/gst-libs/gst/rtp/meson.build +@@ -49,7 +49,7 @@ gst_rtp = library('gstrtp-@0@'.format(api_version), + rtp_gen_sources = [gstrtp_enum_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ] +- rtp_gen_sources += [gnome.generate_gir(gst_rtp, ++ rtp_gir = gnome.generate_gir(gst_rtp, + sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h], + namespace : 'GstRtp', + nsversion : api_version, +@@ -60,7 +60,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstrtp_deps +- )] ++ ) ++ ++ rtp_gen_sources += [rtp_gir] + endif + + +diff --git a/gst-libs/gst/rtsp/meson.build b/gst-libs/gst/rtsp/meson.build +index 27e309d5a..3632adceb 100644 +--- a/gst-libs/gst/rtsp/meson.build ++++ b/gst-libs/gst/rtsp/meson.build +@@ -54,7 +54,7 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version), + rtsp_gen_sources = [gstrtsp_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ] +- rtsp_gen_sources += [gnome.generate_gir(gst_rtsp, ++ rtsp_gir = gnome.generate_gir(gst_rtsp, + sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h], + namespace : 'GstRtsp', + nsversion : api_version, +@@ -65,7 +65,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstrtsp_deps + [sdp_dep] +- )] ++ ) ++ rtsp_gen_sources += [rtsp_gir] + endif + + rtsp_dep = declare_dependency(link_with : gst_rtsp, +diff --git a/gst-libs/gst/sdp/meson.build b/gst-libs/gst/sdp/meson.build +index 62c18b732..24cdb5293 100644 +--- a/gst-libs/gst/sdp/meson.build ++++ b/gst-libs/gst/sdp/meson.build +@@ -23,7 +23,7 @@ gstsdp = library('gstsdp-@0@'.format(api_version), + sdp_gen_sources = [] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ] +- sdp_gen_sources += [gnome.generate_gir(gstsdp, ++ sdp_gir = gnome.generate_gir(gstsdp, + sources : gst_sdp_sources + gst_sdp_headers, + namespace : 'GstSdp', + nsversion : api_version, +@@ -34,7 +34,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : rtsp_deps +- )] ++ ) ++ ++ sdp_gen_sources += [sdp_gir] + endif + + sdp_dep = declare_dependency(link_with: gstsdp, +diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build +index 27e66fd63..5ec37392a 100644 +--- a/gst-libs/gst/tag/meson.build ++++ b/gst-libs/gst/tag/meson.build +@@ -93,7 +93,7 @@ gsttag = library('gsttag-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ] +- tag_gen_sources += [gnome.generate_gir(gsttag, ++ tag_gir = gnome.generate_gir(gsttag, + sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c], + namespace : 'GstTag', + nsversion : api_version, +@@ -104,7 +104,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : tag_deps +- )] ++ ) ++ tag_gen_sources += [tag_gir] + endif + + tag_dep = declare_dependency(link_with: gsttag, +diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build +index b4dfcdf65..036c3a6a7 100644 +--- a/gst-libs/gst/video/meson.build ++++ b/gst-libs/gst/video/meson.build +@@ -135,7 +135,7 @@ gstvideo = library('gstvideo-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ] +- video_gen_sources += [gnome.generate_gir(gstvideo, ++ video_gir = gnome.generate_gir(gstvideo, + sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h], + namespace : 'GstVideo', + nsversion : api_version, +@@ -146,7 +146,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstvideo_deps +- )] ++ ) ++ video_gen_sources += [video_gir] + endif + + video_dep = declare_dependency(link_with : gstvideo, diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch new file mode 100644 index 00000000..731ba873 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch @@ -0,0 +1,30 @@ +From 616cf194dfd26818ed7b776321582b8e0ff9b3f1 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani +Date: Tue, 21 May 2019 14:01:11 +0200 +Subject: [PATCH] viv-fb: Make sure config.h is included + +This prevents build errors due to missing GST_API_* symbols + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani + +--- + gst-libs/gst/gl/gl-prelude.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h +index 05e1f6229..96ce5e685 100644 +--- a/gst-libs/gst/gl/gl-prelude.h ++++ b/gst-libs/gst/gl/gl-prelude.h +@@ -22,6 +22,10 @@ + #ifndef __GST_GL_PRELUDE_H__ + #define __GST_GL_PRELUDE_H__ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include + + #ifdef BUILDING_GST_GL diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch new file mode 100644 index 00000000..fc67a486 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch @@ -0,0 +1,30 @@ +From f18f1206ec44f4154e60546ecb82823f7a6569d7 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 24 Sep 2015 19:47:32 +0300 +Subject: [PATCH] glimagesink: Downrank to marginal + +On desktop, where there is good OpenGL, xvimagesink will come up first, +on other platforms, OpenGL can't be trusted because it's either software (like +in a VM) or broken (like on embedded)., so let ximagesink come above. + +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684] + +Signed-off-by: Alexander Kanavin + +--- + ext/gl/gstopengl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c +index 302e8452c..463be9cd8 100644 +--- a/ext/gl/gstopengl.c ++++ b/ext/gl/gstopengl.c +@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) + #endif + + if (!gst_element_register (plugin, "glimagesink", +- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) { ++ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) { + return FALSE; + } + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.%.bbappend b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.%.bbappend deleted file mode 100644 index 8565c6a5..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" -PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" -PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb deleted file mode 100644 index 0da9a2ea..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb +++ /dev/null @@ -1,76 +0,0 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" - -DEPENDS += "iso-codes util-linux" - -GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" -SRCBRANCH = "MM_04.04.02_1808_L4.9.123_MX8MM_GA" - -SRC_URI = " \ - ${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://make-gio_unix_2_0-dependency-configurable.patch \ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ - file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \ - file://0003-riff-add-missing-include-directories-when-calling-in.patch \ - file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \ -" -SRCREV = "e1f90437939b147658efed4d86c3f99d5e606968" - -DEFAULT_PREFERENCE = "-1" - -EXTRA_AUTORECONF = "" - -S = "${WORKDIR}/git" - -# Enable pango lib -PACKAGECONFIG_append = " pango " - -# Disable introspection to fix [GstGL-1.0.gir] Error -EXTRA_OECONF_append = " --disable-introspection --disable-opengl --enable-wayland" - -inherit gettext use-imx-headers - -PACKAGES_DYNAMIC =+ "^libgst.*" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ - ogg pango theora vorbis \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxv" -X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm" -X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm" - -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" -PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia" -PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor" -PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg" -PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango" -PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora" -PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual" -PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" - -EXTRA_OECONF += " \ - --enable-zlib \ - CPPFLAGS="-I${STAGING_INCDIR_IMX}" \ -" - -CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no" - -FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs" -} - -FILES_${PN} += "${libdir}/gstreamer-1.0/include" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend new file mode 100644 index 00000000..d92bdf3c --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.%.bbappend @@ -0,0 +1,5 @@ +PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" +PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" + +# For mainline BSP we need to enable 'gbm' Window system +PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb new file mode 100644 index 00000000..ae372729 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb @@ -0,0 +1,100 @@ +require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc + +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" + +GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" +SRCBRANCH = "MM_04.05.03_1911_L5.4.0" +SRCREV = "289e06a129224b530d23b6d41f0a65cc341109c5" +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 \ + file://0002-meson-Add-variables-for-gir-files.patch \ + 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 \ + " + +S = "${WORKDIR}/git" + +DEPENDS += "iso-codes util-linux zlib" +DEPENDS_append_imxgpu2d = " virtual/libg2d" + +inherit use-imx-headers gobject-introspection gtk-doc + +DEFAULT_PREFERENCE = "-1" + +PACKAGES_DYNAMIC =+ "^libgst.*" + +# opengl packageconfig factored out to make it easy for distros +# and BSP layers to choose OpenGL APIs/platforms/window systems +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ + ogg pango png theora vorbis \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ +" + +OPENGL_APIS = 'opengl gles2' +OPENGL_PLATFORMS = 'egl' +OPENGL_WINSYS = 'x11 wayland gbm' + +X11DEPENDS = "virtual/libx11 libsm libxrender libxv" +X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" +X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" + +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" +PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" +PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" +PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" +PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" +PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" +PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +# OpenGL API packageconfigs +PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" +PACKAGECONFIG[gles2] = ",,virtual/libgles2" + +# OpenGL platform packageconfigs +PACKAGECONFIG[egl] = ",,virtual/egl" + +# OpenGL window systems (except for X11) +PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" +PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" + +EXTRA_OEMESON += " \ + -Dgl-graphene=disabled \ + ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ + ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ + ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ + -Dextra_imx_incdir=${STAGING_INCDIR_IMX} \ +" + +GTKDOC_MESON_OPTION = "gtk_doc" +GTKDOC_MESON_ENABLE_FLAG = "enabled" +GTKDOC_MESON_DISABLE_FLAG = "disabled" + +FILES_${PN} += "${libdir}/gstreamer-1.0/include" +FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" + +def get_opengl_cmdline_list(switch_name, options, d): + selected_options = [] + if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): + for option in options.split(): + if bb.utils.contains('PACKAGECONFIG', option, True, False, d): + selected_options += [option] + if selected_options: + return '-D' + switch_name + '=' + ','.join(selected_options) + else: + return '' diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.%.bbappend b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.%.bbappend deleted file mode 100644 index 8565c6a5..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" -PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" -PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb deleted file mode 100644 index d527073b..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb +++ /dev/null @@ -1,71 +0,0 @@ -require recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https" -SRCBRANCH = "MM_04.04.02_1808_L4.9.123_MX8MM_GA" - -SRC_URI = " \ - ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ -" -SRCREV = "f25cda9043fee159197898bb810d6e64f2a11140" - -DEFAULT_PREFERENCE = "-1" - -EXTRA_AUTORECONF = "" - -S = "${WORKDIR}/git" - -DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2" -RPROVIDES_${PN}-soup += "${PN}-souphttpsrc" - -inherit gettext - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ - cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" - -PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo" -PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394" -PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" -PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf" -PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" -PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng" -PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils" -PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" -PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4" -PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" -PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib" -PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2,libdrm" -PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx" -PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" -PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}" - -EXTRA_OECONF += " \ - --enable-bz2 \ - --enable-oss \ - --enable-zlib \ - --disable-aalib \ - --disable-aalibtest \ - --disable-directsound \ - --disable-libcaca \ - --disable-libdv \ - --disable-oss4 \ - --disable-osx_audio \ - --disable-osx_video \ - --disable-shout2 \ - --disable-waveform \ -" - -FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend new file mode 100644 index 00000000..8565c6a5 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.%.bbappend @@ -0,0 +1,3 @@ +PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}" +PACKAGECONFIG_GL_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_GL_use-mainline-bsp = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb new file mode 100644 index 00000000..6134789d --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb @@ -0,0 +1,79 @@ +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" + +SRC_URI = " \ + ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ +" +SRCREV = "3bcc85705695ee629ac3fb687411bb196d231918" + +DEFAULT_PREFERENCE = "-1" + +S = "${WORKDIR}/git" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ + file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" + +DEPENDS += "gstreamer1.0-plugins-base libcap zlib" +RPROVIDES_${PN}-pulseaudio += "${PN}-pulse" +RPROVIDES_${PN}-soup += "${PN}-souphttpsrc" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ + bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \ +" + +X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" +X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled" +X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled" + +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" +PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394" +PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" +PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf" +PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3" +PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" +PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" +PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng" +PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils" +PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" +PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio" +PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4" +PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex" +PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false,libdrm" +PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx" +PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +# qt5 support is disabled, because it is not present in OE core, and requires more work than +# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths). +# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig +# in a gstreamer1.0-plugins-good bbappend). + +EXTRA_OEMESON += " \ + -Daalib=disabled \ + -Ddirectsound=disabled \ + -Ddv=disabled \ + -Dlibcaca=disabled \ + -Doss=enabled \ + -Doss4=disabled \ + -Dosxaudio=disabled \ + -Dosxvideo=disabled \ + -Dqt5=disabled \ + -Dshout2=disabled \ + -Dtwolame=disabled \ + -Dwaveform=disabled \ +" + +FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb new file mode 100644 index 00000000..35996337 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb @@ -0,0 +1,71 @@ +# Copyright (C) 2018 O.S. Systems Software LTDA. +DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" +SECTION = "multimedia" +# gstreamer1.0-plugins-bad is in DEPENDS because the build script scans for the +# GstPhotography headers and libraries +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" +# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers +# for the uniaudio decoder, videoparsersbad for the VPU video decoder +# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is +# build (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS) +RDEPENDS_gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good" +RDEPENDS_gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers" +RDEPENDS_gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "805987bff74af13fcb14ff111955206f1c92554d" +SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH}" + +S = "${WORKDIR}/git" + +inherit pkgconfig waf use-imx-headers + +# configure the eglvivsink element to use the appropriate EGL platform code +# Wayland if 'wayland' is present in DISTRO_FEATURES, if not, +# X11 if x11 is present in DISTRO_FEATURES, +# Framebuffer otherwise +EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ + 'fb', d),d)}" + +EGL_PLATFORM_CONF = "--egl-platform=${EGLVIVSINK_PLATFORM}" + +EXTRA_OECONF = "--kernel-headers=${STAGING_INCDIR_IMX} ${PACKAGECONFIG_CONFARGS}" + +EGLVIVSINK_DEPENDS = " \ + virtual/egl virtual/libgles2 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', \ + '', d), d)} \ +" + +PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src v4l2sink" +PACKAGECONFIG_append_imxgpu3d = " eglvivsink" +PACKAGECONFIG_append_imxgpu2d = " g2d g2dpango" +PACKAGECONFIG_append_imxipu = " ipu" +PACKAGECONFIG_append_imxvpu = " vpu" +PACKAGECONFIG_append_imxpxp = " pxp" + +PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-g2d" +PACKAGECONFIG[g2dpango] = ",--disable-g2dpango,imx-gpu-g2d pango" +PACKAGECONFIG[pxp] = ",--disable-pxp," +PACKAGECONFIG[ipu] = ",--disable-ipu," +PACKAGECONFIG[vpu] = ",--disable-vpu,libimxvpuapi" +PACKAGECONFIG[eglvivsink] = "${EGL_PLATFORM_CONF},--disable-eglvivsink,${EGLVIVSINK_DEPENDS}" +PACKAGECONFIG[v4l2src] = ",--disable-imxv4l2videosrc," +PACKAGECONFIG[v4l2sink] = ",--disable-imxv4l2videosink," +PACKAGECONFIG[uniaudiodec] = ",--disable-uniaudiodec,imx-codec" +PACKAGECONFIG[mp3encoder] = ",--disable-mp3encoder,imx-codec" + +# LIBV is used by gst-plugins-package.inc to specify the GStreamer version (0.10 vs 1.0) +LIBV = "1.0" +require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc + +# the following line is required to produce one package for each plugin +PACKAGES_DYNAMIC = "^${PN}-.*" + +COMPATIBLE_MACHINE = "(mx6dl|mx6q|mx6sl|mx6sx|mx6ul|mx6ull|mx7d)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb deleted file mode 100644 index a74ff64b..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_git.bb +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (C) 2018 O.S. Systems Software LTDA. -DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms" -LICENSE = "LGPLv2+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" -SECTION = "multimedia" -# gstreamer1.0-plugins-bad is in DEPENDS because the build script scans for the -# GstPhotography headers and libraries -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers -# for the uniaudio decoder, videoparsersbad for the VPU video decoder -# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is -# build (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS) -RDEPENDS_gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good" -RDEPENDS_gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers" -RDEPENDS_gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad" - -PV = "0.13.0+git${SRCPV}" - -SRCBRANCH ?= "master" -SRCREV = "963aea60b135d40236411357eb0b2de15eac9af5" -SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH}" - -S = "${WORKDIR}/git" - -inherit pkgconfig waf use-imx-headers - -# configure the eglvivsink element to use the appropriate EGL platform code -# Wayland if 'wayland' is present in DISTRO_FEATURES, if not, -# X11 if x11 is present in DISTRO_FEATURES, -# Framebuffer otherwise -EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ - 'fb', d),d)}" - -EGL_PLATFORM_CONF = "--egl-platform=${EGLVIVSINK_PLATFORM}" - -EXTRA_OECONF = "--kernel-headers=${STAGING_INCDIR_IMX} ${PACKAGECONFIG_CONFARGS}" - -EGLVIVSINK_DEPENDS = " \ - virtual/egl virtual/libgles2 \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', \ - '', d), d)} \ -" - -PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src v4l2sink" -PACKAGECONFIG_append_imxgpu3d = " eglvivsink" -PACKAGECONFIG_append_imxgpu2d = " g2d g2dpango" -PACKAGECONFIG_append_imxipu = " ipu" -PACKAGECONFIG_append_imxvpu = " vpu" -PACKAGECONFIG_append_imxpxp = " pxp" - -PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv" -PACKAGECONFIG[g2dpango] = ",--disable-g2dpango,imx-gpu-viv pango" -PACKAGECONFIG[pxp] = ",--disable-pxp," -PACKAGECONFIG[ipu] = ",--disable-ipu," -PACKAGECONFIG[vpu] = ",--disable-vpu,libimxvpuapi" -PACKAGECONFIG[eglvivsink] = "${EGL_PLATFORM_CONF},--disable-eglvivsink,${EGLVIVSINK_DEPENDS}" -PACKAGECONFIG[v4l2src] = ",--disable-imxv4l2videosrc," -PACKAGECONFIG[v4l2sink] = ",--disable-imxv4l2videosink," -PACKAGECONFIG[uniaudiodec] = ",--disable-uniaudiodec,imx-codec" -PACKAGECONFIG[mp3encoder] = ",--disable-mp3encoder,imx-codec" - -# LIBV is used by gst-plugins-package.inc to specify the GStreamer version (0.10 vs 1.0) -LIBV = "1.0" -require recipes-multimedia/gstreamer/gst-plugins-package.inc - -# the following line is required to produce one package for each plugin -PACKAGES_DYNAMIC = "^${PN}-.*" - -COMPATIBLE_MACHINE = "(mx6dl|mx6q|mx6sl|mx6sx|mx6ul|mx6ull|mx7d)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb new file mode 100644 index 00000000..2a1cc3fd --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.0.bb @@ -0,0 +1,39 @@ +require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" + +LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" +LICENSE_FLAGS = "commercial" + +SRC_URI = " \ + http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ + " +SRC_URI[md5sum] = "1ec343c58d4b17d682f7befa8453c11c" +SRC_URI[sha256sum] = "e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2" + +S = "${WORKDIR}/gst-plugins-ugly-${PV}" + +DEPENDS += "gstreamer1.0-plugins-base" + +GST_PLUGIN_SET_HAS_EXAMPLES = "0" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + a52dec mpeg2dec \ +" + +PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" +PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" +PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr" +PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio" +PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread" +PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec" +PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" + +EXTRA_OEMESON += " \ + -Dsidplay=disabled \ +" + +FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" +FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..6962a50d --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Fri, 18 Oct 2019 00:42:12 +0100 +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 +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47] + +Signed-off-by: Carlos Rafael Giani +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index e1e3b1d..3f45f0e 100644 +--- a/meson.build ++++ b/meson.build +@@ -173,7 +173,7 @@ endif + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + 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/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb new file mode 100644 index 00000000..0a3c35ff --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "A library on top of GStreamer for building an RTSP server" +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" +SECTION = "multimedia" +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" + +PNREAL = "gst-rtsp-server" + +SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ + file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + " + +SRC_URI[md5sum] = "adc4460239ec2eccf58ad9752ce53bfd" +SRC_URI[sha256sum] = "198e9eec1a3e32dc810d3fbf3a714850a22c6288d4a5c8e802c5ff984af03f19" + +S = "${WORKDIR}/${PNREAL}-${PV}" + +inherit meson pkgconfig upstream-version-is-even gobject-introspection + +EXTRA_OEMESON += " \ + -Dexamples=disabled \ + -Dtests=disabled \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well +LIBV = "1.0" +require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch new file mode 100644 index 00000000..67a872cd --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch @@ -0,0 +1,35 @@ +From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 25 Jan 2018 17:55:02 +0200 +Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall + through to system plugin scanner + +If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. + +Falling through to the one installed on the system is problamatic in cross-compilation +environemnts, regardless of whether one pointed to by the env var succeeded or failed. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + gst/gstpluginloader.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c +index 430829d..3a75731 100644 +--- a/gst/gstpluginloader.c ++++ b/gst/gstpluginloader.c +@@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) + helper_bin = g_strdup (env); + res = gst_plugin_loader_try_helper (loader, helper_bin); + g_free (helper_bin); +- } +- +- if (!res) { ++ } else { + GST_LOG ("Trying installed plugin scanner"); + + #ifdef G_OS_WIN32 +-- +2.15.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..1ed7198a --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Thu, 17 Oct 2019 12:13:35 +0100 +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 +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +Fixes #454 and #381. + +Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8] + +Signed-off-by: Carlos Rafael Giani +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 90d98d8eb..a47e7f34e 100644 +--- a/meson.build ++++ b/meson.build +@@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false) + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') + +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch new file mode 100644 index 00000000..f553340f --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch @@ -0,0 +1,74 @@ +From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani +Date: Sun, 20 Oct 2019 10:36:44 +0200 +Subject: [PATCH] meson: Add valgrind feature + +This allows for enabling/disabling Valgrind support. Since Valgrind is +an external dependency, such a feature is needed by build environemnts +such as Yocto to make sure builds are deterministic. These changes also +add more Valgrind specific configure log output. + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani +--- + meson.build | 23 ++++++++++++++++++++++- + meson_options.txt | 1 + + 2 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b55ecc5..4751761 100644 +--- a/meson.build ++++ b/meson.build +@@ -199,7 +199,6 @@ check_headers = [ + 'sys/wait.h', + 'ucontext.h', + 'unistd.h', +- 'valgrind/valgrind.h', + 'sys/resource.h', + ] + +@@ -214,6 +213,28 @@ foreach h : check_headers + endif + endforeach + ++valgrind_option = get_option('valgrind') ++if valgrind_option.disabled() ++ message('Valgrind support not requested; disabled.') ++else ++ valgrind_header = 'valgrind/valgrind.h' ++ has_valgrind_header = cc.has_header(valgrind_header) ++ if has_valgrind_header ++ message('Valgrind support requested, and header ' + valgrind_header + \ ++ ' found. Enabled Valgrind support.') ++ define = 'HAVE_' + valgrind_header.underscorify().to_upper() ++ cdata.set(define, 1) ++ else ++ if valgrind_option.enabled() ++ error('Valgrind support requested and set as required, but header ' + \ ++ valgrind_header + ' not found.') ++ else ++ message('Valgrind support requested, but header ' + valgrind_header + \ ++ ' not found. Disabling Valgrind support.') ++ endif ++ endif ++endif ++ + if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include ') + cdata.set('HAVE_TM_GMTOFF', 1) + endif +diff --git a/meson_options.txt b/meson_options.txt +index e7ff7ba..8afde39 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo', + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') ++option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support') + option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces') + option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') + option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch new file mode 100644 index 00000000..0e6c44ea --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch @@ -0,0 +1,257 @@ +From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani +Date: Fri, 25 Oct 2019 00:06:26 +0200 +Subject: [PATCH] meson: Add option for installed tests + +This adds an option for producing installed versions of the unit tests. +These versions don't need meson to run (only a small shell script). This +makes it easier to run cross compiled tests on a target machine. + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani +--- + build-aux/gen-installed-test-desc.py | 18 ++++++ + build-aux/gen-installed-test-shscript.py | 25 ++++++++ + meson_options.txt | 2 + + tests/check/meson.build | 46 +++++++++++++- + tests/files/testfile | 80 ++++++++++++++++++++++++ + 5 files changed, 170 insertions(+), 1 deletion(-) + create mode 100644 build-aux/gen-installed-test-desc.py + create mode 100644 build-aux/gen-installed-test-shscript.py + create mode 100644 tests/files/testfile + +diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py +new file mode 100644 +index 0000000..69e8a0f +--- /dev/null ++++ b/build-aux/gen-installed-test-desc.py +@@ -0,0 +1,18 @@ ++import sys ++import os ++import argparse ++ ++def write_template(filename, data): ++ with open(filename, 'w') as f: ++ f.write(data) ++ ++def build_template(testdir, testname): ++ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname)) ++ ++argparser = argparse.ArgumentParser(description='Generate installed-test data.') ++argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') ++argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') ++argparser.add_argument('--output', metavar='file', required=True, help='Output file') ++args = argparser.parse_args() ++ ++write_template(args.output, build_template(args.test_execdir, args.testname)) +diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py +new file mode 100644 +index 0000000..5da86fb +--- /dev/null ++++ b/build-aux/gen-installed-test-shscript.py +@@ -0,0 +1,25 @@ ++import sys ++import os ++import argparse ++ ++def write_template(filename, data): ++ with open(filename, 'w') as f: ++ f.write(data) ++ ++def build_template(testdir, testname): ++ return ''.join([ ++ "#!/usr/bin/env sh\n", ++ "export GST_STATE_IGNORE_ELEMENTS=''\n", ++ "export CK_DEFAULT_TIMEOUT=20\n", ++ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n", ++ "{}\n".format(os.path.join(testdir, testname)), ++ ]) ++ ++argparser = argparse.ArgumentParser(description='Generate installed-test data.') ++argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') ++argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') ++argparser.add_argument('--output', metavar='file', required=True, help='Output file') ++args = argparser.parse_args() ++ ++write_template(args.output, build_template(args.test_execdir, args.testname)) ++os.chmod(args.output, 0o755) +diff --git a/meson_options.txt b/meson_options.txt +index 8afde39..8884dcc 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso + option('memory-alignment', type: 'combo', + choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], + value: 'malloc') ++option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests') ++option('test-files-path', type : 'string', description : 'Path where to find test files') + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 04da83f..2db7f76 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -118,11 +118,17 @@ if add_languages('cpp', required : false) + ] + endif + ++test_files_path = get_option('test-files-path') ++if test_files_path == '' ++ test_files_path = meson.current_source_dir() + '/../files' ++endif ++message('Using path "@0@" as the path to read test files from'.format(test_files_path)) ++ + test_defines = [ + '-UG_DISABLE_ASSERT', + '-UG_DISABLE_CAST_CHECKS', + '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', +- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', ++ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'), + '-DGST_USE_UNSTABLE_API', + '-DGST_DISABLE_DEPRECATED', + ] +@@ -137,6 +143,14 @@ endif + glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep] + gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep] + ++installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0') ++installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0') ++installed_tests_enabled = get_option('installed-tests') ++ ++python = import('python').find_installation() ++gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py') ++gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py') ++ + foreach t : core_tests + fname = t[0] + test_name = fname.split('.')[0].underscorify() +@@ -150,8 +164,38 @@ foreach t : core_tests + include_directories : [configinc], + link_with : link_with_libs, + dependencies : test_deps + glib_deps + gst_deps, ++ install_dir: installed_tests_execdir, ++ install: installed_tests_enabled + ) + ++ if installed_tests_enabled ++ installed_test_shscript = test_name + '.sh' ++ shscript = custom_target (test_name + '_shscript', ++ output: installed_test_shscript, ++ command: [ ++ python, ++ gen_installed_test_shscript, ++ '--test-execdir=@0@'.format(installed_tests_execdir), ++ '--testname=@0@'.format(test_name), ++ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)), ++ ], ++ install: true, ++ install_dir: installed_tests_execdir) ++ ++ installed_test_desc = test_name + '.test' ++ data = custom_target(test_name + '_desc', ++ output: installed_test_desc, ++ command: [ ++ python, ++ gen_installed_test_desc, ++ '--test-execdir=@0@'.format(installed_tests_execdir), ++ '--testname=@0@'.format(installed_test_shscript), ++ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)), ++ ], ++ install: true, ++ install_dir: installed_tests_datadir) ++ endif ++ + env = environment() + env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) + env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') +diff --git a/tests/files/testfile b/tests/files/testfile +new file mode 100644 +index 0000000..89954e0 +--- /dev/null ++++ b/tests/files/testfile +@@ -0,0 +1,80 @@ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ +-- +2.17.1 + diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch new file mode 100644 index 00000000..7ca3d5ad --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch @@ -0,0 +1,37 @@ +Currently gstreamer configuration depends on whether setcap is found on the host +system. Turn this into a configure option to make builds deterinistic. + +RP 2020/2/19 +Signed-off-by: Richard Purdie +Upstream-Status: Pending + +Index: gstreamer-1.16.1/libs/gst/helpers/meson.build +=================================================================== +--- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build ++++ gstreamer-1.16.1/libs/gst/helpers/meson.build +@@ -73,7 +73,12 @@ if have_ptp + endif + endif + +- setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) ++ setcap_feature = get_option('setcap') ++ if setcap_feature.disabled() ++ setcap = find_program('dontexist', required : false) ++ else ++ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) ++ endif + + # user/group to change to in gst-ptp-helper + ptp_helper_setuid_user = get_option('ptp-helper-setuid-user') +Index: gstreamer-1.16.1/meson_options.txt +=================================================================== +--- gstreamer-1.16.1.orig/meson_options.txt ++++ gstreamer-1.16.1/meson_options.txt +@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va + option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') + option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') + option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files') ++option('setcap', type : 'feature', value : 'auto', description : 'Use setcap') + + # Common feature options + option('examples', type : 'feature', value : 'auto', yield : true) diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb deleted file mode 100644 index 30a6c03a..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "GStreamer 1.0 multimedia framework" -DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ -It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" -LICENSE = "LGPLv2+" - -DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native elfutils" - -inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc - -# This way common/m4/introspection.m4 will come first -# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file) -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -# Use i.MX fork of GST for customizations -GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" -SRCBRANCH = "MM_04.04.02_1808_L4.9.123_MX8MM_GA" - -SRC_URI = " \ - ${GST1.0_SRC};branch=${SRCBRANCH} \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://gtk-doc-tweaks.patch \ - file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ -" -SRCREV = "f4e127a5e9a1eb977e023532d6636d939c8ccbc8" - -DEFAULT_PREFERENCE = "-1" - -EXTRA_AUTORECONF = "" - -PACKAGECONFIG ??= "" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," -PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks," - -EXTRA_OECONF = " \ - --disable-dependency-tracking \ - --disable-examples \ -" - -CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no" - -# musl libc generates warnings if is included directly -CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no" - -PACKAGES += "${PN}-bash-completion" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" -FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" - -RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" -RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true - rm -f "${S}/common/m4/gtk-doc.m4" -} - -do_configure[prefuncs] += "delete_pkg_m4_file" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs" -} - -S = "${WORKDIR}/git" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb new file mode 100644 index 00000000..f344db2d --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb @@ -0,0 +1,84 @@ +SUMMARY = "GStreamer 1.0 multimedia framework" +DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ +It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." +HOMEPAGE = "http://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" +LICENSE = "LGPLv2+" + +DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" + +inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc + +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" + +# Use i.MX fork of GST for customizations +GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" +SRCBRANCH = "MM_04.05.03_1911_L5.4.0" + +SRC_URI = " \ + ${GST1.0_SRC};branch=${SRCBRANCH} \ + file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ + file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + file://0003-meson-Add-valgrind-feature.patch \ + file://0004-meson-Add-option-for-installed-tests.patch \ + file://capfix.patch \ +" +SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259" + +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE = "-1" + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ + check \ + debug \ + tools" + +PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" +PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" +PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" +PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" +PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind," +PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" +PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" +PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" +PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" +PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" + +# TODO: put this in a gettext.bbclass patch +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +EXTRA_OEMESON += " \ + -Dexamples=disabled \ + -Ddbghelp=disabled \ + ${@gettext_oemeson(d)} \ +" + +GTKDOC_MESON_OPTION = "gtk_doc" +GTKDOC_MESON_ENABLE_FLAG = "enabled" +GTKDOC_MESON_DISABLE_FLAG = "disabled" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +PACKAGES += "${PN}-bash-completion" + +# Add the core element plugins to the main package +FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" +FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" +FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb ${datadir}/glib-2.0/gdb" + +CVE_PRODUCT = "gstreamer" + +require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Fix-ion.h-header-inclusion-to-be-s.patch b/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Fix-ion.h-header-inclusion-to-be-s.patch deleted file mode 100644 index 4e861a5d..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Fix-ion.h-header-inclusion-to-be-s.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e4c96421700ecd008814bceceaf03f0ee9323c02 Mon Sep 17 00:00:00 2001 -From: Yuqing Zhu -Date: Thu, 27 Sep 2018 16:00:55 +0800 -Subject: [PATCH] imx-gst1.0-plugin: Fix ion.h header inclusion to be standard - -NXP "solution" was to manually copy the header to include/linux. -Let's point the Makefile to the proper (mainline) location instead: -https://elixir.bootlin.com/linux/v4.17/source/drivers/staging/android/uapi/ion.h - -Signed-off-by: Yuqing Zhu ---- - configure.ac | 2 +- - libs/gstimxcommon.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7b2709d..d94e3a8 100755 ---- a/configure.ac -+++ b/configure.ac -@@ -216,7 +216,7 @@ dnl check ion allocator headfile - old_CFLAGS=$CFLAGS - PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= 1.14, CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gstreamer-allocators-1.0`",\ - CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gstreamer-bad-allocators-1.0`") --AC_CHECK_HEADERS([linux/ion.h gst/allocators/gstionmemory.h], HAVE_ION="yes", HAVE_ION="no") -+AC_CHECK_HEADERS([ion.h gst/allocators/gstionmemory.h], HAVE_ION="yes", HAVE_ION="no") - AM_CONDITIONAL(USE_ION, test "x$HAVE_ION" = "xyes") - CFLAGS=$old_CFLAGS - -diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c -index eb808b9..c02ab5f 100644 ---- a/libs/gstimxcommon.c -+++ b/libs/gstimxcommon.c -@@ -26,7 +26,7 @@ - #include - #include - #ifdef USE_ION --#include -+#include - #endif - const char *dev_ion = "/dev/ion"; - --- -1.9.1 - diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.2.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.2.bb deleted file mode 100644 index 986d4a1d..00000000 --- a/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.2.bb +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (C) 2014,2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright (C) 2012-2015 O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Gstreamer freescale plugins" -LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1" -SECTION = "multimedia" - -DEPENDS = "imx-codec imx-parser gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -DEPENDS_append_mx6 = " imx-lib" -DEPENDS_append_mx7 = " imx-lib" -DEPENDS_append_imxvpu = " imx-vpuwrap libdrm" - -# For backwards compatibility -RREPLACES_${PN} = "gst1.0-fsl-plugin" -RPROVIDES_${PN} = "gst1.0-fsl-plugin" -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.04.02_1808_L4.9.123_MX8MM_GA" - -SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}" -SRCREV = "23dd0315c7087e1c8eba836b9a458d7906187c7e" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig use-imx-headers - -PLATFORM_mx6 = "MX6" -PLATFORM_mx6sl = "MX6SL" -PLATFORM_mx6sx = "MX6SX" -PLATFORM_mx6ul = "MX6UL" -PLATFORM_mx6sll = "MX6SLL" -PLATFORM_mx7= "MX7D" -PLATFORM_mx7ulp= "MX7ULP" -PLATFORM_mx8 = "MX8" - -# Todo add a mechanism to map possible build targets -EXTRA_OECONF = "PLATFORM=${PLATFORM} \ - CPPFLAGS="-I${STAGING_INCDIR_IMX}" \ - CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', bb.utils.contains('DISTRO_FEATURES', 'x11', '--disable-x11', '', d), '', d)}" - -PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" - -# Add codec list that the beep plugin run-time depended -BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis" -RDEPENDS_${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux " - -# overlaysink rely on G2D, -# cannot be supported on i.MX6SLL & i.MX6UL & i.MX6ULL & i.MX7D -PACKAGECONFIG ?= "" -PACKAGECONFIG_imxgpu2d = "overlaysink" - - -# FIXME: Add all features -# feature from excluded mm packages -PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec" -# feature from special mm packages -PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec" -MSDEPENDS = "imx-msparser imx-mscodec" -PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}" -PACKAGECONFIG[wma8enc] += "--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}" -OVDEPENDS = "virtual/libg2d" -PACKAGECONFIG[overlaysink] += "--enable-overlaysink,--disable-overlaysink, ${OVDEPENDS}" - -FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" - -FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" -FILES_${PN}-gplay = "${bindir}/gplay-1.0" -FILES_${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}" -FILES_${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}" -FILES_${PN}-grecorder = "${bindir}/grecorder-1.0" -FILES_${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}" -FILES_${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb b/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb new file mode 100644 index 00000000..4e244715 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb @@ -0,0 +1,83 @@ +# Copyright (C) 2014,2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Copyright (C) 2012-2015 O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Gstreamer freescale plugins" +LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1" +SECTION = "multimedia" + +DEPENDS = "imx-codec imx-parser gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" +DEPENDS_append_mx6 = " imx-lib" +DEPENDS_append_mx7 = " imx-lib" +DEPENDS_append_imxvpu = " imx-vpuwrap libdrm" + +# For backwards compatibility +RREPLACES_${PN} = "gst1.0-fsl-plugin" +RPROVIDES_${PN} = "gst1.0-fsl-plugin" +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" + +SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}" +SRCREV = "190b80c50aa06d2fe32423f6e36d76374bb530b2" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig use-imx-headers + +PLATFORM_mx6 = "MX6" +PLATFORM_mx6sl = "MX6SL" +PLATFORM_mx6sx = "MX6SX" +PLATFORM_mx6ul = "MX6UL" +PLATFORM_mx6sll = "MX6SLL" +PLATFORM_mx7= "MX7D" +PLATFORM_mx7ulp= "MX7ULP" +PLATFORM_mx8 = "MX8" + +# Todo add a mechanism to map possible build targets +EXTRA_OECONF = "PLATFORM=${PLATFORM} \ + CPPFLAGS="-I${STAGING_INCDIR_IMX}" \ + CROSS_ROOT=${PKG_CONFIG_SYSROOT_DIR} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', bb.utils.contains('DISTRO_FEATURES', 'x11', '--disable-x11', '', d), '', d)}" + +PACKAGES =+ "${PN}-gplay ${PN}-libgplaycore ${PN}-libgstfsl ${PN}-grecorder ${PN}-librecorder-engine ${PN}-libplayengine" + +# Add codec list that the beep plugin run-time depended +BEEP_RDEPENDS = "imx-codec-aac imx-codec-mp3 imx-codec-oggvorbis" +RDEPENDS_${PN} += "imx-parser ${BEEP_RDEPENDS} gstreamer1.0-plugins-good-id3demux " + +# overlaysink rely on G2D, +# cannot be supported on i.MX6SLL & i.MX6UL & i.MX6ULL & i.MX7D +PACKAGECONFIG ?= "" +PACKAGECONFIG_imxgpu2d = "overlaysink" + + +# FIXME: Add all features +# feature from excluded mm packages +PACKAGECONFIG[ac3] += ",,imx-ac3codec,imx-ac3codec" +# feature from special mm packages +PACKAGECONFIG[aacp] += ",,imx-aacpcodec,imx-aacpcodec" +MSDEPENDS = "imx-msparser imx-mscodec" +PACKAGECONFIG[wma10dec] += ",,${MSDEPENDS},${MSDEPENDS}" +PACKAGECONFIG[wma8enc] += "--enable-wma8enc,--disable-wma8enc,${MSDEPENDS},${MSDEPENDS}" +OVDEPENDS = "virtual/libg2d" +PACKAGECONFIG[overlaysink] += "--enable-overlaysink,--disable-overlaysink, ${OVDEPENDS}" + +FILES_${PN} = "${libdir}/gstreamer-1.0/*.so ${datadir}" + +FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/pkgconfig/*.pc" +FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" +FILES_${PN}-gplay = "${bindir}/gplay-1.0" +FILES_${PN}-libgplaycore = "${libdir}/libgplaycore-1.0${SOLIBS}" +FILES_${PN}-libgstfsl = "${libdir}/libgstfsl-1.0${SOLIBS}" +FILES_${PN}-grecorder = "${bindir}/grecorder-1.0" +FILES_${PN}-librecorder-engine = "${libdir}/librecorder_engine-1.0${SOLIBS}" +FILES_${PN}-libplayengine = "${libdir}/libplayengine-1.0${SOLIBS}" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.4.2.bb b/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.4.2.bb deleted file mode 100644 index 60a3717e..00000000 --- a/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.4.2.bb +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright 2017 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# Released under the MIT license (see COPYING.MIT for the terms) -DESCRIPTION = "Freescale Multimedia codec libs" -LICENSE = "Proprietary" -SECTION = "multimedia" -LIC_FILES_CHKSUM = "file://COPYING;md5=5ab1a30d0cd181e3408077727ea5a2db" - -# Backward compatibility -PROVIDES += "libfslcodec" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "6087fbac97002b7d8c5dd061e6b36417" -SRC_URI[sha256sum] = "f225968d8efcdb8f1843adae162360df04166e91acea2c32388cf699f410bdda" - -inherit fsl-eula-unpack autotools pkgconfig - -# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point -EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ - bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}" - -PACKAGECONFIG ?= "" -PACKAGECONFIG_imxvpu = "vpu" - -PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu" - -do_install_append() { - # FIXME: This link points to nowhere - if [ -e ${D}${libdir}/imx-mm/audio-codec/lib_src_ppp_arm11_elinux.so ]; then - rm ${D}${libdir}/imx-mm/audio-codec/lib_src_ppp_arm11_elinux.so - fi - - # LTIB move the files around or gst-fsl-plugin won't find them - for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do - mv $p ${D}${libdir} - done - rmdir ${D}${libdir}/imx-mm/video-codec - -} - -python __set_insane_skip() { - # Ensure we have PACKAGES expanded - bb.build.exec_func("read_subpackage_metadata", d) - - for p in d.getVar('PACKAGES', True).split(): - # Even though we are packaging libraries those are plugins so we - # shouldn't rename the packages to follow its sonames. - d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1") - - # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have - # the source we cannot fix it. Disable the insane check for now. - if p == 'imx-codec-test-bin': - # FIXME: includes the DUT .so files so we need to deploy those - d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir file-rdeps") - else: - d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel") -} - -do_package_qa[prefuncs] += "__set_insane_skip" - -python __split_libfslcodec_plugins() { - codecdir = bb.data.expand('${libdir}', d) - do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*', - aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*', - output_pattern='imx-codec-%s', - description='Freescale i.MX Codec (%s)', - extra_depends='') - pkgs = d.getVar('PACKAGES', True).split() - for pkg in pkgs: - meta = pkg[10:] - if meta != '': - d.setVar('RREPLACES_%s' % pkg, ' libfslcodec-%s' % meta) - d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec-%s' % meta) - d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec-%s' % meta) - else : - d.setVar('RREPLACES_%s' % pkg, ' libfslcodec') - d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec') - d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec') -} - -python __set_metapkg_rdepends() { - # Allow addition of all codecs in a image; useful specially for - # debugging. - codec_pkgs = oe.utils.packages_filter_out_system(d) - codec_pkgs = filter(lambda x: x not in ['imx-codec-test-bin', 'imx-codec-test-source'], - codec_pkgs) - d.appendVar('RDEPENDS_imx-codec-meta', ' ' + ' '.join(codec_pkgs)) -} - -PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" - -PACKAGES_DYNAMIC = "${PN}-*" -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source" - -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-meta = "1" - -# Ensure we get warnings if we miss something -FILES_${PN} = "" - -FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \ - ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \ - ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*" - -FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin" - -FILES_${PN}-test-source += "${datadir}/imx-mm/*" - -# FIXME: The wrap and lib names does not match -FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*" -FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*" -FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb b/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb new file mode 100644 index 00000000..e41469f3 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb @@ -0,0 +1,119 @@ +# Copyright (C) 2012-2016 Freescale Semiconductor +# Copyright 2017 NXP +# Copyright 2018 (C) O.S. Systems Software LTDA. +# Released under the MIT license (see COPYING.MIT for the terms) +DESCRIPTION = "Freescale Multimedia codec libs" +LICENSE = "Proprietary" +SECTION = "multimedia" +LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d" + +# Backward compatibility +PROVIDES += "libfslcodec" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" +SRC_URI[md5sum] = "a0413b390a473aee862806dd25a4a366" +SRC_URI[sha256sum] = "ecaecb4afb646efad9a81d67a1a5e50a9e06ed49fa8ea947064465a085b2c578" + +inherit fsl-eula-unpack autotools pkgconfig + +# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point +EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ + bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d), d)}" + +PACKAGECONFIG ?= "" +PACKAGECONFIG_imxvpu = "vpu" + +# We need to ensure we don't have '-src' package overrided +PACKAGE_DEBUG_SPLIT_STYLE = 'debug-without-src' + +PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,virtual/imxvpu" + +do_install_append() { + # LTIB move the files around or gst-fsl-plugin won't find them + for p in $(find ${D}${libdir}/imx-mm -mindepth 2 -maxdepth 2 -not -type d); do + mv $p ${D}${libdir} + done + rmdir ${D}${libdir}/imx-mm/video-codec + + # Fixup ownership of files + chown -R root:root ${D} +} + +python __set_insane_skip() { + # Ensure we have PACKAGES expanded + bb.build.exec_func("read_subpackage_metadata", d) + + for p in d.getVar('PACKAGES').split(): + # Even though we are packaging libraries those are plugins so we + # shouldn't rename the packages to follow its sonames. + d.setVar("DEBIAN_NOAUTONAME_%s" % p, "1") + + # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have + # the source we cannot fix it. Disable the insane check for now. + if p == 'imx-codec-test-bin': + # FIXME: includes the DUT .so files so we need to deploy those + d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel libdir file-rdeps") + else: + d.setVar("INSANE_SKIP_%s" % p, "ldflags textrel") +} + +do_package_qa[prefuncs] += "__set_insane_skip" + +python __split_libfslcodec_plugins() { + codecdir = bb.data.expand('${libdir}', d) + do_split_packages(d, codecdir, '^lib_([^_]*).*_arm.*_elinux\.so\..*', + aux_files_pattern='${libdir}/imx-mm/audio-codec/wrap/lib_%sd_wrap_arm*_elinux.so.*', + output_pattern='imx-codec-%s', + description='Freescale i.MX Codec (%s)', + extra_depends='') + pkgs = d.getVar('PACKAGES').split() + for pkg in pkgs: + meta = pkg[10:] + if meta != '': + d.setVar('RREPLACES_%s' % pkg, ' libfslcodec-%s' % meta) + d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec-%s' % meta) + d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec-%s' % meta) + else : + d.setVar('RREPLACES_%s' % pkg, ' libfslcodec') + d.setVar('RPROVIDES_%s' % pkg, ' libfslcodec') + d.setVar('RCONFLICTS_%s' % pkg, ' libfslcodec') +} + +python __set_metapkg_rdepends() { + # Allow addition of all codecs in a image; useful specially for + # debugging. + codec_pkgs = oe.utils.packages_filter_out_system(d) + codec_pkgs = filter(lambda x: x not in ['imx-codec-test-bin', 'imx-codec-test-source'], + codec_pkgs) + d.appendVar('RDEPENDS_imx-codec-meta', ' ' + ' '.join(codec_pkgs)) +} + +PACKAGESPLITFUNCS =+ "__split_libfslcodec_plugins __set_metapkg_rdepends" + +PACKAGES_DYNAMIC = "${PN}-*" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +PACKAGES += "${PN}-meta ${PN}-test-bin ${PN}-test-source" + +ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY_${PN}-meta = "1" + +# Ensure we get warnings if we miss something +FILES_${PN} = "" + +FILES_${PN}-dev += "${libdir}/imx-mm/*/*${SOLIBSDEV} \ + ${libdir}/imx-mm/*/*/*${SOLIBSDEV} \ + ${libdir}/pkgconfig/*.pc ${includedir}/imx-mm/*" + +FILES_${PN}-test-bin += "${datadir}/imx-mm/*/examples/*/bin" + +FILES_${PN}-test-source += "${datadir}/imx-mm/*" + +# FIXME: The wrap and lib names does not match +FILES_${PN}-oggvorbis += "${libdir}/imx-mm/audio-codec/wrap/lib_vorbisd_wrap_arm*_elinux.so.*" +FILES_${PN}-nb += "${libdir}/imx-mm/audio-codec/wrap/lib_nbamrd_wrap_arm*_elinux.so.*" +FILES_${PN}-wb += "${libdir}/imx-mm/audio-codec/wrap/lib_wbamrd_wrap_arm*_elinux.so.*" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb b/bsp/meta-freescale/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb new file mode 100644 index 00000000..d9fd8458 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/imx-dspc-asrc/imx-dspc-asrc_1.0.1.bb @@ -0,0 +1,22 @@ +# Copyright 2019 NXP +DESCRIPTION = "NXP Asynchronous Sample Rate Converter" +LICENSE = "Proprietary" +SECTION = "multimedia" +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" + +SRC_URI[md5sum] = "d46005ee29ca603caa2e1b1e82953ff1" +SRC_URI[sha256sum] = "e79cbf4788a86a0068bbe80c37317e3332ae76e3d5c3ff2eabd71f03121fab6a" + +inherit fsl-eula-unpack autotools pkgconfig + +EXTRA_OECONF = "--enable-armv8 --libdir=${libdir} --bindir=/unit_tests" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +FILES_${PN} += "/unit_tests ${datadir}/imx-mm" + +COMPATIBLE_MACHINE = "(mx8)" diff --git a/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.4.2.bb b/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.4.2.bb deleted file mode 100644 index 492ab893..00000000 --- a/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.4.2.bb +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2012-2018 O.S. Systems Software LTDA. -# Copyright (C) 2012-2016 Freescale Semiconductor -# Copyright 2017 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=5ab1a30d0cd181e3408077727ea5a2db" - -# For backwards compatibility -PROVIDES += "libfslparser" -RREPLACES_${PN} = "libfslparser" -RPROVIDES_${PN} = "libfslparser" -RCONFLICTS_${PN} = "libfslparser" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "0e425e143900f980c6fe7f735a679829" -SRC_URI[sha256sum] = "21d1066dcdc6f0eb7efc56910ee9b116883456a013837506a0632153baedcbf3" - -inherit fsl-eula-unpack autotools pkgconfig - -# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point -EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ - bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '--enable-fsw', d), d)}" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -python __set_insane_skip() { - # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have - # the source we cannot fix it. Disable the insane check for now. - # FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those - for p in d.getVar('PACKAGES', True).split(): - d.setVar("INSANE_SKIP_%s" % p, "ldflags dev-so textrel") -} - -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/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb b/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb new file mode 100644 index 00000000..ee0243dd --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb @@ -0,0 +1,46 @@ +# Copyright (C) 2012-2018 O.S. Systems Software LTDA. +# Copyright (C) 2012-2016 Freescale Semiconductor +# Copyright 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" + +# For backwards compatibility +PROVIDES += "libfslparser" +RREPLACES_${PN} = "libfslparser" +RPROVIDES_${PN} = "libfslparser" +RCONFLICTS_${PN} = "libfslparser" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" +SRC_URI[md5sum] = "9659678b1a07a14558d55ed7e23e04d3" +SRC_URI[sha256sum] = "c6cb8a06acad73f50052d18cda02be729616218472f93974390622d6acea768e" + +inherit fsl-eula-unpack autotools pkgconfig + +# Choose between 32-bit and 64-bit binaries and between Soft Float-Point and Hard Float-Point +EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--enable-armv8', \ + bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '--enable-fsw', d), d)}" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +python __set_insane_skip() { + # FIXME: All binaries lack GNU_HASH in elf binary but as we don't have + # the source we cannot fix it. Disable the insane check for now. + # FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those + for p in d.getVar('PACKAGES').split(): + d.setVar("INSANE_SKIP_%s" % p, "ldflags dev-so textrel") +} + +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/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.4.2.bb b/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.4.2.bb deleted file mode 100644 index c23c7fc9..00000000 --- a/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.4.2.bb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017 NXP -# Copyright 2018 (C) O.S. Systems Software LTDA. -# 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=5ab1a30d0cd181e3408077727ea5a2db" - -# For backwards compatibility -PROVIDES += "libfslvpuwrap" -RREPLACES_${PN} = "libfslvpuwrap" -RPROVIDES_${PN} = "libfslvpuwrap" -RCONFLICTS_${PN} = "libfslvpuwrap" - -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" - -SRC_URI[md5sum] = "86d1829ef62ab51e187479bfea686874" -SRC_URI[sha256sum] = "85f01ebdf55e4bd7a7cc21eb5203dfcaa7b663f03ecdb8d5e54fbb995e3dc761" - -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/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb b/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb new file mode 100644 index 00000000..3dcfcef8 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb @@ -0,0 +1,32 @@ +# 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/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb b/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb new file mode 100644 index 00000000..9a4497d8 --- /dev/null +++ b/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "frontend for the i.MX6 / i.MX8 VPU hardware video engines" +HOMEPAGE = "https://github.com/Freescale/libimxvpuapi" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324" +SECTION = "multimedia" +DEPENDS = "virtual/imxvpu libimxdmabuffer" + +PV .= "+git${SRCPV}" + +SRCBRANCH ?= "master" +SRCREV = "9a5e84af53e6765c4f0ea299df264a4e32a13ea7" +SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}" + +S = "${WORKDIR}/git" + +inherit waf pkgconfig use-imx-headers + +IMX_PLATFORM_mx6 = "imx6" +IMX_PLATFORM_mx8mq = "imx8m" +IMX_PLATFORM_mx8mm = "imx8mm" + +EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(imxvpu)" diff --git a/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb b/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb index 540565f6..2d0f8571 100644 --- a/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb +++ b/bsp/meta-freescale/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb @@ -8,8 +8,8 @@ DEPENDS = "imx-vpu" PV = "0.10.3+${SRCPV}" -SRCBRANCH ?= "master" -SRCREV = "4afb52f97e28c731c903a8538bf99e4a6d155b42" +SRCBRANCH ?= "v1" +SRCREV = "3a1ee3a54fe93813868d38c3d32ea065b59e227e" SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}" S = "${WORKDIR}/git" diff --git a/bsp/meta-freescale/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch new file mode 100644 index 00000000..86c360f2 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch @@ -0,0 +1,54 @@ +From 6a600c5637c5446ab3d11eb4304a1dd473ec503e Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +Reviewed-by: Jerome Forissier +Reviewed-by: Joakim Bech +--- + 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/bsp/meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service b/bsp/meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service new file mode 100644 index 00000000..0e2b4f6b --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-client/tee-supplicant.service @@ -0,0 +1,11 @@ +[Unit] +Description=TEE Supplicant + +[Service] +User=root +EnvironmentFile=-/etc/default/tee-supplicant +ExecStart=/usr/bin/tee-supplicant $OPTARGS + +[Install] +WantedBy=basic.target + diff --git a/bsp/meta-freescale/recipes-security/optee-imx/optee-client_3.2.0.imx.bb b/bsp/meta-freescale/recipes-security/optee-imx/optee-client_3.2.0.imx.bb new file mode 100644 index 00000000..19770849 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-client_3.2.0.imx.bb @@ -0,0 +1,52 @@ +# Copyright (C) 2017-2018 NXP + +SUMMARY = "OPTEE Client libs" +HOMEPAGE = "http://www.optee.org/" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" + +inherit python3native systemd + +SRCBRANCH = "lf-5.4.y" +OPTEE_CLIENT_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https" +SRC_URI = "${OPTEE_CLIENT_SRC};branch=${SRCBRANCH}" + +SRCREV = "71a9bef78fff2d5d4db8a2307d3b91e2aa671dc9" + +SRC_URI += "file://tee-supplicant.service \ + file://0001-flags-do-not-override-CFLAGS-from-host.patch \ +" + +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}" + +do_install () { + oe_runmake install + + 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 + + install -D -p -m0755 ${S}/out/export/bin/tee-supplicant ${D}${bindir}/tee-supplicant + + cp -a ${S}/out/export/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 +} + +PACKAGES += "tee-supplicant" +FILES_${PN} += "${libdir}/* ${includedir}/*" +FILES_tee-supplicant += "${bindir}/tee-supplicant" + +INSANE_SKIP_${PN} = "ldflags dev-elf" +INSANE_SKIP_${PN}-dev = "ldflags dev-elf" +INSANE_SKIP_tee-supplicant = "ldflags" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch new file mode 100644 index 00000000..509c7fb6 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch @@ -0,0 +1,158 @@ +From 027a3b9a33fbb23e1d1d7ed6411d4d112d2a55a1 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +--- + 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/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch new file mode 100644 index 00000000..9621cf6c --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch @@ -0,0 +1,427 @@ +From 0d4941123b5a88351f5954f6de00892f85ed5abc Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +--- + 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(' [...]".format( \ +- sys.argv[0]) ++ print("Usage: {0}
[...]".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/bsp/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb b/bsp/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb new file mode 100644 index 00000000..d2c82940 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-os_3.2.0.imx.bb @@ -0,0 +1,96 @@ +# 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/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch new file mode 100644 index 00000000..20f190af --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0001-use-python3-instead-of-python.patch @@ -0,0 +1,48 @@ +From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001 +From: Scott Branden +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 +Reviewed-by: Jerome Forissier +Tested-by: Jerome Forissier (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/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch new file mode 100644 index 00000000..d32a8eb7 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch @@ -0,0 +1,41 @@ +From dc8cd1c43edeedb9f7335020537c4ffdddd683f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= +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 to [-Werror=cpp] +| #warning redirecting incorrect #include to +| ^~~~~~~ + +Just remove the needless include. + +Signed-off-by: André Draszik +Acked-by: Jens Wiklander +Reviewed-by: Jerome Forissier +--- +Signed-off-by: André Draszik +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 + #include + #include +-#include + #include + #include + +-- +2.23.0.rc1 + diff --git a/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch new file mode 100644 index 00000000..ed45df60 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0004-build-ignore-declaration-after-statement-warnings.patch @@ -0,0 +1,62 @@ +From 1401b89684ee81bf0b3d3dea06e2926b24ba3f97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= +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 +Acked-by: Jens Wiklander +Reviewed-by: Jerome Forissier +--- +Signed-off-by: André Draszik +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/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch new file mode 100644 index 00000000..58734aa4 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch @@ -0,0 +1,57 @@ +From f74e9f339a8e8cb97fc8ea03bef51d7e3862a60a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= +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 +Acked-by: Jens Wiklander +Reviewed-by: Jerome Forissier +--- +Signed-off-by: André Draszik +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/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch new file mode 100644 index 00000000..1a5c4044 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test/0006-regression_8100-use-null-terminated-strings-with-fil.patch @@ -0,0 +1,88 @@ +From 7d566ed585d1e13f444d48fde5705b5be54de4af Mon Sep 17 00:00:00 2001 +From: Ricardo Salveti +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 +Acked-by: Jens Wiklander +--- +Signed-off-by: André Draszik +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/bsp/meta-freescale/recipes-security/optee-imx/optee-test_3.2.0.imx.bb b/bsp/meta-freescale/recipes-security/optee-imx/optee-test_3.2.0.imx.bb new file mode 100644 index 00000000..c78f9816 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee-imx/optee-test_3.2.0.imx.bb @@ -0,0 +1,58 @@ +# 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/bsp/meta-freescale/recipes-security/optee/optee-client-qoriq.bb b/bsp/meta-freescale/recipes-security/optee/optee-client-qoriq.bb index 6aaf714c..af5fc095 100644 --- a/bsp/meta-freescale/recipes-security/optee/optee-client-qoriq.bb +++ b/bsp/meta-freescale/recipes-security/optee/optee-client-qoriq.bb @@ -4,15 +4,13 @@ HOMEPAGE = "https://github.com/qoriq-open-source/optee_client" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" -inherit pythonnative systemd +inherit python3native systemd SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client;nobranch=1 \ - file://0001-GCC-8-format-truncation-error.patch \ - file://0001-flags-CFLAGS-add-Wno-cpp.patch \ " S = "${WORKDIR}/git" -SRCREV = "ab3c79ccd3ea9323e236d30037977c0a19944dbd" +SRCREV = "08428734c67fb559e420d87fa52fd74a955ea1bd" EXTRA_OEMAKE = "ARCH=arm64" diff --git a/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch new file mode 100644 index 00000000..e22bd6c0 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch @@ -0,0 +1,148 @@ +From b2dd8747125be413f9b8b7fd7e52f457cabd709c Mon Sep 17 00:00:00 2001 +From: Jens Wiklander +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 +Tested-by: Joakim Bech (QEMU v8) +Acked-by: Jerome Forissier +Signed-off-by: Jens Wiklander +--- + 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/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch new file mode 100644 index 00000000..6ecc6152 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq/0001-use-python3-instead-of-python.patch @@ -0,0 +1,80 @@ +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/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb index c8ebe2bf..6ffe8298 100644 --- a/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb +++ b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb @@ -4,17 +4,21 @@ DESCRIPTION = "OPTEE OS" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" -DEPENDS = "python-pycrypto-native" +DEPENDS = "python3-pycrypto-native" -inherit deploy pythonnative +inherit deploy python3native -SRCREV = "e93f053213c574ec1b97f9e56b2f31692cd3723c" +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 \ " S = "${WORKDIR}/git" OPTEEMACHINE ?= "${MACHINE}" +OPTEEMACHINE_ls1088ardb-pb = "ls1088ardb" +OPTEEMACHINE_ls1046afrwy = "ls1046ardb" EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \ ARCH=arm \ diff --git a/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch deleted file mode 100644 index bad7c5e0..00000000 --- a/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-8.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d877fddcef79e856193b9b0a3a3089c22151047f Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Fri, 29 Jun 2018 15:49:34 +0800 -Subject: [PATCH] fix build failure with GCC 8 - -Signed-off-by: BJ DevOps Team ---- - host/xtest/Makefile | 2 ++ - host/xtest/adbg/src/adbg_run.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/host/xtest/Makefile b/host/xtest/Makefile -index 832cba2..d95899d 100644 ---- a/host/xtest/Makefile -+++ b/host/xtest/Makefile -@@ -139,6 +139,8 @@ CFLAGS += -Wall -Wcast-align -Werror \ - -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ - -Wshadow -Wstrict-prototypes -Wswitch-default \ - -Wwrite-strings \ -+ -Wno-stringop-overflow \ -+ -Wno-array-bounds \ - -Wno-missing-field-initializers -Wno-format-zero-length - endif - -diff --git a/host/xtest/adbg/src/adbg_run.c b/host/xtest/adbg/src/adbg_run.c -index 406e429..3b57bbb 100644 ---- a/host/xtest/adbg/src/adbg_run.c -+++ b/host/xtest/adbg/src/adbg_run.c -@@ -100,7 +100,7 @@ int Do_ADBG_AppendToSuite( - snprintf(p, size, "%s+%s", Dest_p->SuiteID_p, - Source_p->SuiteID_p); - else -- strncpy(p, Source_p->SuiteID_p, size); -+ memcpy(p, Source_p->SuiteID_p, size); - free((void *)Dest_p->SuiteID_p); - Dest_p->SuiteID_p = p; - --- -1.8.3.1 - diff --git a/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch new file mode 100644 index 00000000..9b912777 --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch @@ -0,0 +1,28 @@ +From 79330c8383e02e91a355964a3cc7b932d03c2517 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +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 +--- + 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/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch new file mode 100644 index 00000000..20f190af --- /dev/null +++ b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch @@ -0,0 +1,48 @@ +From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001 +From: Scott Branden +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 +Reviewed-by: Jerome Forissier +Tested-by: Jerome Forissier (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/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq_git.bb b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq_git.bb index a9aaffc7..b66725c7 100644 --- a/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq_git.bb +++ b/bsp/meta-freescale/recipes-security/optee/optee-test-qoriq_git.bb @@ -4,16 +4,17 @@ HOMEPAGE = "https://github.com/qoriq-open-source/optee_test" LICENSE = "BSD & GPLv2" LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" -DEPENDS = "optee-client-qoriq optee-os-qoriq python-pycrypto-native" +DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycrypto-native" -inherit pythonnative +inherit python3native SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \ - file://0001-fix-build-failure-with-GCC-8.patch \ + file://0001-fix-build-failure-with-GCC-9.patch \ + file://0001-use-python3-instead-of-python.patch \ " S = "${WORKDIR}/git" -SRCREV = "83c87d9b368c33545688c7aad27432ff9a22868f" +SRCREV = "669058459e4a544be12f37dab103ee4c2b32e31d" OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" diff --git a/bsp/meta-freescale/wic/imx-imx-boot-bootpart.wks.in b/bsp/meta-freescale/wic/imx-imx-boot-bootpart.wks.in index 601b9340..b50364d1 100644 --- a/bsp/meta-freescale/wic/imx-imx-boot-bootpart.wks.in +++ b/bsp/meta-freescale/wic/imx-imx-boot-bootpart.wks.in @@ -6,16 +6,15 @@ # # The disk layout used is: # - ---------- -------------- -------------- -# | | imx-boot | boot | rootfs | +# | | imx-boot | boot | rootfs | # - ---------- -------------- -------------- -# ^ ^ ^ ^ -# | | | | -# 0 | 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) +# ^ ^ ^ ^ ^ +# | | | | | +# 0 | 8MiB 72MiB 72MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) # ${IMX_BOOT_SEEK} 32 or 33kiB, see reference manual # part u-boot --source rawcopy --sourceparams="file=imx-boot" --ondisk mmcblk --no-table --align ${IMX_BOOT_SEEK} -part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 +part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 8192 --size 64 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 8192 bootloader --ptable msdos - diff --git a/bsp/meta-freescale/wic/imx-uboot-bootpart.wks b/bsp/meta-freescale/wic/imx-uboot-bootpart.wks deleted file mode 100644 index a5e0137b..00000000 --- a/bsp/meta-freescale/wic/imx-uboot-bootpart.wks +++ /dev/null @@ -1,19 +0,0 @@ -# short-description: Create SD card image with a boot partition -# long-description: -# Create an image that can be written onto a SD card using dd for use -# with i.MX SoC family -# It uses u-boot -# -# The disk layout used is: -# - --------- -------------- -------------- -# | | u-boot | boot | rootfs | -# - --------- -------------- -------------- -# ^ ^ ^ ^ -# | | | | -# 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) -# -part u-boot --source rawcopy --sourceparams="file=u-boot.imx" --ondisk mmcblk --no-table --align 1 -part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 - -bootloader --ptable msdos diff --git a/bsp/meta-freescale/wic/imx-uboot-bootpart.wks.in b/bsp/meta-freescale/wic/imx-uboot-bootpart.wks.in new file mode 100644 index 00000000..8fe019c0 --- /dev/null +++ b/bsp/meta-freescale/wic/imx-uboot-bootpart.wks.in @@ -0,0 +1,19 @@ +# short-description: Create SD card image with a boot partition +# long-description: +# Create an image that can be written onto a SD card using dd for use +# with i.MX SoC family +# It uses u-boot +# +# The disk layout used is: +# - --------- -------------- -------------- +# | | u-boot | boot | rootfs | +# - --------- -------------- -------------- +# ^ ^ ^ ^ +# | | | | +# 0 1kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) +# +part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 1 +part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 + +bootloader --ptable msdos diff --git a/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks b/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks deleted file mode 100644 index 4e16ec35..00000000 --- a/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks +++ /dev/null @@ -1,20 +0,0 @@ -# short-description: Create SD card image with a boot partition -# long-description: -# Create an image that can be written onto a SD card using dd for use -# with i.MX SoC family. -# It uses SPL and u-boot -# -# The disk layout used is: -# - ----- --------- -------------- -------------- -# | | SPL | u-boot | boot | rootfs | -# - ----- --------- -------------- -------------- -# ^ ^ ^ ^ ^ -# | | | | | -# 0 1kiB 69kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) -# -part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1 -part u-boot --source rawcopy --sourceparams="file=u-boot.img" --ondisk mmcblk --no-table --align 69 -part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 - -bootloader --ptable msdos diff --git a/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks.in b/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks.in new file mode 100644 index 00000000..8062c51e --- /dev/null +++ b/bsp/meta-freescale/wic/imx-uboot-spl-bootpart.wks.in @@ -0,0 +1,20 @@ +# short-description: Create SD card image with a boot partition +# long-description: +# Create an image that can be written onto a SD card using dd for use +# with i.MX SoC family. +# It uses SPL and u-boot +# +# The disk layout used is: +# - ----- --------- -------------- -------------- +# | | SPL | u-boot | boot | rootfs | +# - ----- --------- -------------- -------------- +# ^ ^ ^ ^ ^ +# | | | | | +# 0 1kiB 69kiB 4MiB 16MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) +# +part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1 +part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 69 +part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 16 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 + +bootloader --ptable msdos diff --git a/bsp/meta-freescale/wic/imx-uboot-spl.wks b/bsp/meta-freescale/wic/imx-uboot-spl.wks deleted file mode 100644 index e7b3beed..00000000 --- a/bsp/meta-freescale/wic/imx-uboot-spl.wks +++ /dev/null @@ -1,19 +0,0 @@ -# short-description: Create SD card image with a boot partition -# long-description: -# Create an image that can be written onto a SD card using dd for use -# with i.MX SoC family. -# It uses SPL and u-boot -# -# The disk layout used is: -# - ----- --------- -------------- -# | | SPL | u-boot | rootfs | -# - ----- --------- -------------- -# ^ ^ ^ ^ ^ -# | | | | | -# 0 1kiB 69kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) -# -part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1 -part u-boot --source rawcopy --sourceparams="file=u-boot.img" --ondisk mmcblk --no-table --align 69 -part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 - -bootloader --ptable msdos diff --git a/bsp/meta-freescale/wic/imx-uboot-spl.wks.in b/bsp/meta-freescale/wic/imx-uboot-spl.wks.in new file mode 100644 index 00000000..db2f89dd --- /dev/null +++ b/bsp/meta-freescale/wic/imx-uboot-spl.wks.in @@ -0,0 +1,19 @@ +# short-description: Create SD card image with a boot partition +# long-description: +# Create an image that can be written onto a SD card using dd for use +# with i.MX SoC family. +# It uses SPL and u-boot +# +# The disk layout used is: +# - ----- --------- -------------- +# | | SPL | u-boot | rootfs | +# - ----- --------- -------------- +# ^ ^ ^ ^ ^ +# | | | | | +# 0 1kiB 69kiB 4MiB + rootfs + IMAGE_EXTRA_SPACE (default 10MiB) +# +part SPL --source rawcopy --sourceparams="file=SPL" --ondisk mmcblk --no-table --align 1 +part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 69 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 + +bootloader --ptable msdos diff --git a/bsp/meta-intel/.gitignore b/bsp/meta-intel/.gitignore deleted file mode 100644 index ae174429..00000000 --- a/bsp/meta-intel/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.pyc -*.pyo -*.swp -*.orig -*.rej -*~ diff --git a/bsp/meta-intel/CHANGELOG b/bsp/meta-intel/CHANGELOG deleted file mode 100644 index a99cbb1f..00000000 --- a/bsp/meta-intel/CHANGELOG +++ /dev/null @@ -1,87 +0,0 @@ -This file will only list major changes that occur within a release. -For a full list of changes, view the git log of the repository. - -Rocko Release 11/2017 -===================== - -Moved qat support to separate layer ------------------------------------ -Quick Assist Technology (QAT) is more middleware and should not be part of the -core BSP. The new layer can be found here: -https://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-qat/ - -Moved dpdk support to separate layer ------------------------------------- -We had some requests to make DPDK standalone so that it could be included -without bringing in anything else from meta-intel, as it is not specific to -Intel(R) hardware. The new layer is located here: -https://git.yoctoproject.org/cgit/cgit.cgi/meta-dpdk/ - -Added support for out-of-tree iwlwifi drivers ---------------------------------------------- -Backport-iwlwifi out-of-tree wifi modules are now available via meta-intel. -Backport-iwlwifi brings the latest iwlwifi drivers to almost any kernel -Note that mac80211 and cfg80211 backports are also necessary, which will most -likely cause incompatibility with other in-tree wifi drivers. -See https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi for more info. - -Added support for out-of-tree ixgbe drivers -------------------------------------------- -The out-of-tree ixgbe drivers bring ixgbe support to nearly any kernel. See -here: http://www.intel.com/network/connectivity/products/server_adapters.htm - -Added an implementation of Secure Boot --------------------------------------- -meta-intel now supports a simple Secure Boot implementation. This implementation -consists of a single binary consisting of an EFI stub, the kernel, an -initrd, and a kernel command line. The binary is then signed via keys defined by -the variables SECUREBOOT_SIGNING_KEY and SECUREBOOT_SIGNING_CERT. These keys -should match the keys embedded in your hardware's firmware. -See documentation/secureboot/README for more information on this feature. - -Improved Yocto Project Compatibility status -------------------------------------------- -The common layer should now be considered Yocto Project compatible - it should -no longer modify OE-core values when adding the layer to your bblayers.conf. -The meta-tlk layer is still not Yocto Project compatible, however. - -Pyro Release 5/2017 -=================== - -Changed default kernel provider from linux-yocto to linux-intel. ----------------------------------------------------------------- -Linux-intel is an Intel(R)-maintained kernel based on the latest stable -branch, along with backports from upstream to better support Intel(R) -hardware. The intel-linux kernel also has a branch with the preempt-rt -patches applied, providing a preempt-rt kernel with no additional work. - -Added QEMU support. -------------------- -We now build several virtio drivers into the kernel by default, and -have qemuboot.conf files for intel-corei7-64 and intel-core2-32 -targets. This allows one to do basic testing on meta-intel images -without having to use hardware. The virtio drivers are added via -KERNEL_FEATURES_INTEL_COMMON. This prevents them from being added to -custom kernels by default. They can be removed by adding the -following to a conf or kernel bbappend file: - KERNEL_FEATURES_INTEL_COMMON_remove = “cfg/virtio.scc†-OVMF firmware is also built and can be used in order to emulate a UEFI -environment. A full runqemu command line for intel-corei7-64 could look -like this: - runqemu core-image-minimal intel-corei7-64 wic ovmf - -Musl support ------------- -Meta-intel is now compatible with the musl C library. You can specify musl -As your C library by adding the following to your local.conf: - TCLIBC = “musl†-Note: there is a known failure with DPDK. - -X32 support ------------ -The meta-intel layer can now build with the x32 tune settings in a multi-lib -setting, it will not work in as the primary MACHINE tune as the bootloader needs -to be built as a 64bit binary. The setup for this would be as follows: - require conf/multilib.conf - MULTILIBS = "multilib:libx32 - DEFAULTTUNE_virtclass-multilib-libx32 = "corei7-64-x32" diff --git a/bsp/meta-intel/COPYING.MIT b/bsp/meta-intel/COPYING.MIT deleted file mode 100644 index fb950dc6..00000000 --- a/bsp/meta-intel/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -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. diff --git a/bsp/meta-intel/LICENSE b/bsp/meta-intel/LICENSE deleted file mode 100644 index e57d3b90..00000000 --- a/bsp/meta-intel/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -All metadata files (including, but not limited to bb, bbappend, -bbclass, inc and conf files) are MIT licensed unless otherwise stated. -Source code included in tree for individual recipes is under the -LICENSE stated in the associated recipe (.bb file) unless otherwise -stated. diff --git a/bsp/meta-intel/MAINTAINERS b/bsp/meta-intel/MAINTAINERS deleted file mode 100644 index 880481e8..00000000 --- a/bsp/meta-intel/MAINTAINERS +++ /dev/null @@ -1,38 +0,0 @@ -This file contains a list of BSP maintainers for the BSPs contained in -the meta-intel repository. - -The purpose of this file is to provide contact information for -specific BSPs and other code contained within meta-intel. You should -address questions and patches for a particular BSP or other code to -the appropriate maintainer listed in this file, cc'ing the meta-intel -mailing list. This ensures that your question or patch will be -addressed by the appropriate person, and that it will be seen by other -users who may be facing similar problems or questions. - -Please see the top-level README file for guidelines relating to the -details of submitting patches, reporting problems, or asking questions -about any of the BSPs or other recipes contained within meta-intel. - -Descriptions of section entries: - - M: Mail patches to: FullName - F: Files and directories with wildcard patterns. - A trailing slash includes all files and subdirectory files. - F: common/ all files in and below common - F: common/* all files in common, but not below - One pattern per line. Multiple F: lines acceptable. - -Please keep this list in alphabetical order. - -Maintainers List (try to look for most precise areas first) - - ----------------------------------- - -M: California Sullivan -F: * - -M: Juro Bystricky -F: * - -M: Anuj Mittal -F: * diff --git a/bsp/meta-intel/README b/bsp/meta-intel/README deleted file mode 100644 index 24d6a682..00000000 --- a/bsp/meta-intel/README +++ /dev/null @@ -1,432 +0,0 @@ -meta-intel -========== - -This README file contains information on building and booting -meta-intel BSP layers. Please see the corresponding sections below -for details. - - -Yocto Project Compatible -======================== - -The BSPs contained in this layer are compatible with the Yocto Project -as per the requirements listed here: - - https://www.yoctoproject.org/webform/yocto-project-compatible-registration - - -Dependencies -============ - -This layer depends on: - - URI: git://git.openembedded.org/bitbake - branch: 1.40 - - URI: git://git.openembedded.org/openembedded-core - layers: meta - branch: thud - - -Table of Contents -================= - - I. Overview - II. Building and booting meta-intel BSP layers - a. Building the intel-common BSP layers - b. Booting the intel-common BSP images - III. Technical Miscellany - Benefits of using meta-intel - The intel-common kernel package architecture - Intel-specific machine features - IV. Tested Hardware - V. Guidelines for submitting patches - - -I. Overview -=========== - -This is the location for Intel-maintained BSPs. - -For details on the intel-common, see the information below. - -For all others, please see the README files contained in the -individual BSP layers for BSP-specific information. - -If you have problems with or questions about a particular BSP, please -contact the maintainer listed in the MAINTAINERS file directly (cc:ing -the Yocto mailing list puts it in the archive and helps other people -who might have the same questions in the future), but please try to do -the following first: - - - look in the Yocto Project Bugzilla - (http://bugzilla.yoctoproject.org/) to see if a problem has - already been reported - - - look through recent entries of the meta-intel - (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto - (https://lists.yoctoproject.org/pipermail/yocto/) mailing list - archives to see if other people have run into similar problems or - had similar questions answered. - -If you believe you have encountered a bug, you can open a new bug and -enter the details in the Yocto Project Bugzilla -(http://bugzilla.yoctoproject.org/). If you're relatively certain -that it's a bug against the BSP itself, please use the 'Yocto Project -Components: BSPs | meta-intel' category for the bug; otherwise, please -submit the bug against the most likely category for the problem - if -you're wrong, it's not a big deal and the bug will be recategorized -upon triage. - - -II. Building and booting meta-intel BSP layers -============================================== - -The following sections contain information on building and booting the -BSPs contained in the meta-intel layer. - -Note that these instructions specifically cover the intel-common, which -may or may not be applicable to other BSPs contained in this layer - if -a given BSP contains its own README, that version should be used instead, -and these instructions can be ignored. - -a. Building the intel-common BSP layers -------------------------------------------------- - -In order to build an image with BSP support for a given release, you -need to download the corresponding BSP tarball from the 'Board Support -Package (BSP) Downloads' page of the Yocto Project website (or -equivalently, check out the appropriate branch from the meta-intel git -repository, see below). For the intel-common BSPs, those tarballs would -correspond to the following choices in the BSP downloads section: - - - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32) - - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64) - -The intel-* BSPs, also known as the intel-common BSPs, provide a few -carefully selected tune options and generic hardware support to cover -the majority of current Intel CPUs and devices. The naming follows the -convention of intel--, where TUNE is the gcc cpu-type -(used with mtune and march typically) and BITS is either 32 bit or 64 -bit. - -Having done that, and assuming you extracted the BSP tarball contents -at the top-level of your yocto build tree, you can build a BSP image -by adding the location of the meta-intel layer to bblayers.conf e.g.: - - yocto/meta-intel \ - -To enable a particular machine, you need to add a MACHINE line naming -the BSP to the local.conf file: - - MACHINE ?= "xxx" - -where 'xxx' is replaced by one of the following BSP names: - - - intel-core2-32 - - This BSP is optimized for the Core2 family of CPUs as well as all - Atom CPUs prior to the Silvermont core. - - - intel-corei7-64 - - This BSP is optimized for Nehalem and later Core and Xeon CPUs as - well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. - -You should then be able to build an image as such: - - $ source oe-init-build-env - $ bitbake core-image-sato - -At the end of a successful build, you should have an image that -you can boot from a USB flash drive (see instructions on how to do -that below, in the section 'Booting the intel-common BSP images'). - -As an alternative to downloading the BSP tarball, you can also work -directly from the meta-intel git repository. For each BSP in the -'meta-intel' repository, there are multiple branches, one -corresponding to each major release starting with 'laverne' (0.90), in -addition to the latest code which tracks the current master (note that -not all BSPs are present in every release). Instead of extracting -a BSP tarball at the top level of your yocto build tree, you can -equivalently check out the appropriate branch from the meta-intel -repository at the same location. - -b. Booting the intel-common BSP images --------------------------------------- - -If you've built your own image, either from the downloaded BSP layer -or from the meta-intel git repository, you'll find the bootable -image in the build/tmp/deploy/images/xxx directory, where again -'xxx' refers to the machine name used in the build. - -Under Linux, insert a USB flash drive. Assuming the USB flash drive -takes device /dev/sdf, use dd to copy the image to it. Before the image -can be burned onto a USB drive, it should be un-mounted. Some Linux distros -may automatically mount a USB drive when it is plugged in. Using USB device -/dev/sdf as an example, find all mounted partitions: - - $ mount | grep sdf - -and un-mount those that are mounted, for example: - - $ umount /dev/sdf1 - $ umount /dev/sdf2 - -Now burn the image onto the USB drive: - - $ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress - $ sync - $ eject /dev/sdf - -This should give you a bootable USB flash device. Insert the device -into a bootable USB socket on the target, and power on. This should -result in a system booted to the Sato graphical desktop. - -If you want a terminal, use the arrows at the top of the UI to move to -different pages of available applications, one of which is named -'Terminal'. Clicking that should give you a root terminal. - -If you want to ssh into the system, you can use the root terminal to -ifconfig the IP address and use that to ssh in. The root password is -empty, so to log in type 'root' for the user name and hit 'Enter' at -the Password prompt: and you should be in. - -If you find you're getting corrupt images on the USB (it doesn't show -the syslinux boot: prompt, or the boot: prompt contains strange -characters), try doing this first: - - $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 - -III. Technical Miscellany -========================= - -Benefits of using meta-intel ----------------------------- - -Using meta-intel has the following benefits over a generic BSP: - -tune flags -++++++++++ -intel-* MACHINEs each have different compilation flags appropriate for their -targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern -64-bit Intel Core i microarchitecture, and includes instruction sets up to -SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2 -microarchitecture, and includes instruction sets up to SSE3. - -linux-intel kernel -++++++++++++++++++ -The linux-intel kernel is an initiative to bring better Intel(R) hardware -support to the current LTS linux kernel. It contains a base LTS kernel with -additional backports from upstream Intel drivers. In addition, a default kernel -config containing most features found on Intel boards is supplied via the -yocto-kernel-cache. - -graphics stack -++++++++++++++ -Meta-intel provides the latest Intel Graphics Linux Stack drivers to support -Intel hardware as defined by the https://01.org/linuxgraphics. - -Other software -++++++++++++++ - * intel ucode - provides the latest microcode updates for Intel processors - - * thermald - which proactively controls thermal, using P-states, T-states, and -the Intel power clamp driver. -(https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) - -The intel-common kernel package architecture --------------------------------------------- - -These BSPs use what we call the intel-common Linux kernel package -architecture. This includes core2-32-intel-common and -corei7-64-intel-common. These kernel packages can also be used by any -of the BSPs in meta-intel that choose to include the -intel-common-pkgarch.inc file. - -To minimize the proliferation of vendor trees, reduce the sources we -must support, and consolidate QA efforts, all BSP maintainers are -encouraged to make use of the intel-common Linux kernel package -architecture. - -Intel-specific machine features -------------------------------- - -The meta-intel layer makes some additional machine features available -to BSPs. These machine features can be used in a BSP layer in the -same way that machine features are used in other layers based on -oe-core, via the MACHINE_FEATURES variable. - -Requirements -++++++++++++ - -The meta-intel-specific machine features are only available to a BSP -when the meta-intel layer is included in the build configuration, and -the meta-intel.inc file is included in the machine configuration of -that BSP. - -To make these features available for your machine, you will need to: - - 1. include a configuration line such as the below in bblayers.conf - BBLAYERS += "/meta-intel" - 2. include the following line in the machine configuration file - require conf/machine/include/meta-intel.inc - -Once the above requirements are met, the machine features provided by -the meta-intel layer will be available for the BSP to use. - -Available machine features -++++++++++++++++++++++++++ - -Currently, the meta-intel layer makes the following set of -Intel-specific machine features available: - - * intel-ucode - -These machine features can be included by listing them in the -MACHINE_FEATURES variable in the machine configuration file. For -example: - - MACHINE_FEATURES += "intel-ucode" - -Machine feature details -+++++++++++++++++++++++ - - * intel-ucode - - This feature provides support for microcode updates to Intel - processors. The intel-ucode feature runs at early boot and uses - the microcode data file added by the feature into the BSP's - initrd. It also puts the userland microcode-updating tool, - iucode_tool, into the target images along with the microcode data - file. - - Q. Why might a user want to enable the intel-ucode feature? - - A. Intel releases microcode updates to correct processor behavior - as documented in the respective processor specification - updates. While the normal approach to getting such microcode - updates is via a BIOS upgrade, this can be an administrative - hassle and not always possible in the field. The intel-ucode - feature enables the microcode update capability present in the - Linux kernel. It provides an easy path for upgrading processor - microcode without the need to change the BIOS. If the feature - is enabled, it is also possible to update the existing target - images with a newer microcode update in the future. - - Q. How would a user bundle only target-specific microcode in the - target image? - - A. The Intel microcode data file released by Intel contains - microcode updates for multiple processors. If the BSP image is - meant to run on only a certain subset of processor types, a - processor-specific subset of microcode can be bundled into the - target image via the UCODE_FILTER_PARAMETERS variable. This - works by listing a sequence of iucode-tool parameters in the - UCODE_FILTER_PARAMETERS variable, which in this case will - select only the specific microcode relevant to the BSP. For - more information on the underlying parameters refer to the - iucode-tool manual page at http://manned.org/iucode-tool - - To define a set of parameters for microcode-filtering via the - UCODE_FILTER_PARAMETERS variable, one needs to identify the - cpuid signatures of all the processors the BSP is meant to run - on. One way to determine the cpuid signature for a specific - processor is to build and run an intel-ucode-feature-enabled - image on the target hardware, without first assigning any value - to the UCODE_FILTER_PARAMETERS variable, and then once the - image is booted, run the "ucode_tool -S" command to have the - ucode tool scan the system for processor signatures. These - signatures can then be used in the UCODE_FILTER_PARAMETERS - variable in conjunction with -s parameter. For example, for - the fri2 BSP, the cpuid can be determined as such: - - [root@fri2 ~]# iucode_tool -S - iucode_tool: system has processor(s) with signature 0x00020661 - - Given that output, a suitable UCODE_FILTER_PARAMETERS variable - definition could be specified in the machine configuration as - such: - - UCODE_FILTER_PARAMETERS = "-s 0x00020661" - - Q. Are there any reasons a user might want to disable the - intel-ucode feature? - - A. The microcode data file and associated tools occupy a small - amount of space (a few KB) on the target image. BSPs which are - highly sensitive to target image size and which are not - experiencing microcode-related issues might consider not - enabling this feature. - - -IV. Tested Hardware -=================== - -The following undergo regular basic testing with their respective MACHINE types. -Note that both 64-bit and 32-bit firmware is available for the MinnowBoard -Turbot, so it is tested against both intel-corei7-64 and intel-core2-32. - -intel-corei7-64: - NUC6i5SYH - MinnowBoard Turbot - -intel-core2-32: - MinnowBoard Turbot - - -V. Guidelines for submitting patches -==================================== - -Please submit any patches against meta-intel BSPs to the meta-intel -mailing list (meta-intel@yoctoproject.org). Also, if your patches are -available via a public git repository, please also include a URL to -the repo and branch containing your patches as that makes it easier -for maintainers to grab and test your patches. - -There are patch submission scripts available that will, among other -things, automatically include the repo URL and branch as mentioned. -Please see the Yocto Project Development Manual sections entitled -'Using Scripts to Push a Change Upstream and Request a Pull' and -'Using Email to Submit a Patch' for details. - -Regardless of how you submit a patch or patchset, the patches should -at minimum follow the suggestions outlined in the 'Submitting a Change -to the Yocto Project' section in the Yocto Project Development Manual. -Specifically, they should: - - - Include a 'Signed-off-by:' line. A commit can't legally be pulled - in without this. - - - Provide a single-line, short summary of the change. This short - description should be prefixed by the BSP or recipe name, as - appropriate, followed by a colon. Capitalize the first character - of the summary (following the colon). - - - For the body of the commit message, provide detailed information - that describes what you changed, why you made the change, and the - approach you used. - - - If the change addresses a specific bug or issue that is associated - with a bug-tracking ID, include a reference to that ID in your - detailed description in the following format: [YOCTO #]. - - - Pay attention to line length - please don't allow any particular - line in the commit message to stretch past 72 characters. - - - For any non-trivial patch, provide information about how you - tested the patch, and for any non-trivial or non-obvious testing - setup, provide details of that setup. - -Doing a quick 'git log' in meta-intel will provide you with many -examples of good example commits if you have questions about any -aspect of the preferred format. - -The meta-intel maintainers will do their best to review and/or pull in -a patch or patchset within 24 hours of the time it was posted. For -larger and/or more involved patches and patchsets, the review process -may take longer. - -Please see the meta-intel/MAINTAINERS file for the list of maintainers -and their specific areas; it's also a good idea to cc: the specific -maintainer, if applicable. diff --git a/bsp/meta-intel/README.sources b/bsp/meta-intel/README.sources deleted file mode 100644 index 1ef5e4e0..00000000 --- a/bsp/meta-intel/README.sources +++ /dev/null @@ -1,17 +0,0 @@ -The sources for the packages comprising the images shipped with this -BSP can be found at the following location: - -http://downloads.yoctoproject.org/mirror/sources/ - -The metadata used to generate the images shipped with this BSP, in -addition to the code contained in this BSP, can be found at the -following location: - -http://downloads.yoctoproject.org/releases/yocto/yocto-2.6.1/poky-thud-20.0.1.tar.bz2 - -The metadata used to generate the images shipped with this BSP, in -addition to the code contained in this BSP, can also be found at the -following locations: - -git://git.yoctoproject.org/poky.git -git://git.yoctoproject.org/meta-intel diff --git a/bsp/meta-intel/classes/uefi-comboapp.bbclass b/bsp/meta-intel/classes/uefi-comboapp.bbclass deleted file mode 100644 index 4ecc5535..00000000 --- a/bsp/meta-intel/classes/uefi-comboapp.bbclass +++ /dev/null @@ -1,151 +0,0 @@ -# This class brings a more generic version of the UEFI combo app from refkit to meta-intel. -# It uses a combo file, containing kernel, initramfs and -# command line, presented to the BIOS as UEFI application, by prepending -# it with the efi stub obtained from systemd-boot. - -# Don't add syslinux or build an ISO -PCBIOS_forcevariable = "0" -NOISO_forcevariable = "1" - -# image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. -# We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so -# we default INITRD_LIVE to the INITRD_IMAGE as well. -INITRD_IMAGE ?= "core-image-minimal-initramfs" -INITRD_LIVE ?= " ${@ ('${DEPLOY_DIR_IMAGE}/' + d.getVar('INITRD_IMAGE', expand=True) + '-${MACHINE}.cpio.gz') if d.getVar('INITRD_IMAGE', True) else ''}" - -do_uefiapp[depends] += " \ - intel-microcode:do_deploy \ - systemd-boot:do_deploy \ - virtual/kernel:do_deploy \ - " - -# INITRD_IMAGE is added to INITRD_LIVE, which we use to create our initrd, so depend on it if it is set -do_uefiapp[depends] += "${@ '${INITRD_IMAGE}:do_image_complete' if d.getVar('INITRD_IMAGE') else ''}" - -# The image does without traditional bootloader. -# In its place, instead, it uses a single UEFI executable binary, which is -# composed by: -# - an UEFI stub -# The linux kernel can generate a UEFI stub, however the one from systemd-boot can fetch -# the command line from a separate section of the EFI application, avoiding the need to -# rebuild the kernel. -# - the kernel -# - an initramfs (optional) - -def create_uefiapp(d, uuid=None, app_suffix=''): - import glob, re - from subprocess import check_call - - build_dir = d.getVar('B') - deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') - image_link_name = d.getVar('IMAGE_LINK_NAME') - - cmdline = '%s/cmdline.txt' % build_dir - linux = '%s/%s' % (deploy_dir_image, d.getVar('KERNEL_IMAGETYPE')) - initrd = '%s/initrd' % build_dir - - stub_path = '%s/linux*.efi.stub' % deploy_dir_image - stub = glob.glob(stub_path)[0] - m = re.match(r"\S*(ia32|x64)(.efi)\S*", os.path.basename(stub)) - app = "boot%s%s%s" % (m.group(1), app_suffix, m.group(2)) - executable = '%s/%s.%s' % (deploy_dir_image, image_link_name, app) - - if d.getVar('INITRD_LIVE'): - with open(initrd, 'wb') as dst: - for cpio in d.getVar('INITRD_LIVE').split(): - with open(cpio, 'rb') as src: - dst.write(src.read()) - initrd_cmd = "--add-section .initrd=%s --change-section-vma .initrd=0x3000000 " % initrd - else: - initrd_cmd = "" - - root = 'root=PARTUUID=%s' % uuid if uuid else '' - - with open(cmdline, 'w') as f: - f.write('%s %s' % (d.getVar('APPEND'), root)) - - objcopy_cmd = ("objcopy " - "--add-section .cmdline=%s --change-section-vma .cmdline=0x30000 " - "--add-section .linux=%s --change-section-vma .linux=0x40000 " - "%s %s %s") % \ - (cmdline, linux, initrd_cmd, stub, executable) - - check_call(objcopy_cmd, shell=True) - -python create_uefiapps () { - # We must clean up anything that matches the expected output pattern, to ensure that - # the next steps do not accidentally use old files. - import glob - pattern = d.expand('${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi') - for old_efi in glob.glob(pattern): - os.unlink(old_efi) - uuid = d.getVar('DISK_SIGNATURE_UUID') - create_uefiapp(d, uuid=uuid) -} - -# This is intentionally split into different parts. This way, derived -# classes or images can extend the individual parts. We can also use -# whatever language (shell script or Python) is more suitable. -python do_uefiapp() { - bb.build.exec_func('create_uefiapps', d) -} - -do_uefiapp[vardeps] += "APPEND DISK_SIGNATURE_UUID INITRD_LIVE KERNEL_IMAGETYPE IMAGE_LINK_NAME" - -uefiapp_deploy_at() { - dest=$1 - for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do - target=`basename $i` - target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` - cp --preserve=timestamps -r $i $dest/$target - done -} - -fakeroot do_uefiapp_deploy() { - rm -rf ${IMAGE_ROOTFS}/boot/* - dest=${IMAGE_ROOTFS}/boot/EFI/BOOT - mkdir -p $dest - uefiapp_deploy_at $dest -} - -do_uefiapp_deploy[depends] += "${PN}:do_uefiapp virtual/fakeroot-native:do_populate_sysroot" - - -# This decides when/how we add our tasks to the image -python () { - image_fstypes = d.getVar('IMAGE_FSTYPES', True) - initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) - - # Don't add any of these tasks to initramfs images - if initramfs_fstypes not in image_fstypes: - bb.build.addtask('uefiapp', 'do_image', 'do_rootfs', d) - bb.build.addtask('uefiapp_deploy', 'do_image', 'do_rootfs', d) -} - -SIGN_AFTER ?= "do_uefiapp" -SIGN_BEFORE ?= "do_uefiapp_deploy" -SIGNING_DIR ?= "${DEPLOY_DIR_IMAGE}" -SIGNING_BINARIES ?= "${IMAGE_LINK_NAME}.boot*.efi" -inherit uefi-sign - -# Legacy hddimg support below this line -efi_hddimg_populate() { - uefiapp_deploy_at "$1" -} - -build_efi_cfg() { - # The command line is built into the combo app, so this is a null op - : -} - -populate_kernel_append() { - # The kernel and initrd are built into the app, so we don't need these - if [ -f $dest/initrd ]; then - rm $dest/initrd - fi - if [ -f $dest/vmlinuz ]; then - rm $dest/vmlinuz - fi -} - -IMAGE_FEATURES[validitems] += "secureboot" diff --git a/bsp/meta-intel/classes/uefi-sign.bbclass b/bsp/meta-intel/classes/uefi-sign.bbclass deleted file mode 100644 index e8f203b9..00000000 --- a/bsp/meta-intel/classes/uefi-sign.bbclass +++ /dev/null @@ -1,50 +0,0 @@ -# By default, sign all .efi binaries in ${B} after compiling and before deploying -SIGNING_DIR ?= "${B}" -SIGNING_BINARIES ?= "*.efi" -SIGN_AFTER ?= "do_compile" -SIGN_BEFORE ?= "do_deploy" - -python () { - import os - import hashlib - - # Ensure that if the signing key or cert change, we rerun the uefiapp process - if bb.utils.contains('IMAGE_FEATURES', 'secureboot', True, False, d): - for varname in ('SECURE_BOOT_SIGNING_CERT', 'SECURE_BOOT_SIGNING_KEY'): - filename = d.getVar(varname) - if filename is None: - bb.fatal('%s is not set.' % varname) - if not os.path.isfile(filename): - bb.fatal('%s=%s is not a file.' % (varname, filename)) - with open(filename, 'rb') as f: - data = f.read() - hash = hashlib.sha256(data).hexdigest() - d.setVar('%s_HASH' % varname, hash) - - # Must reparse and thus rehash on file changes. - bb.parse.mark_dependency(d, filename) - - bb.build.addtask('uefi_sign', d.getVar('SIGN_BEFORE'), d.getVar('SIGN_AFTER'), d) - - # Original binary needs to be regenerated if the hash changes since we overwrite it - # SIGN_AFTER isn't necessarily when it gets generated, but its our best guess - d.appendVarFlag(d.getVar('SIGN_AFTER'), 'vardeps', 'SECURE_BOOT_SIGNING_CERT_HASH SECURE_BOOT_SIGNING_KEY_HASH') -} - -do_uefi_sign() { - if [ -f ${SECURE_BOOT_SIGNING_KEY} ] && [ -f ${SECURE_BOOT_SIGNING_CERT} ]; then - for i in `find ${SIGNING_DIR}/ -name '${SIGNING_BINARIES}'`; do - sbsign --key ${SECURE_BOOT_SIGNING_KEY} --cert ${SECURE_BOOT_SIGNING_CERT} $i - sbverify --cert ${SECURE_BOOT_SIGNING_CERT} $i.signed - mv $i.signed $i - done - fi -} - -do_uefi_sign[depends] += "sbsigntool-native:do_populate_sysroot" - -do_uefi_sign[vardeps] += "SECURE_BOOT_SIGNING_CERT_HASH \ - SECURE_BOOT_SIGNING_KEY_HASH \ - SIGNING_BINARIES SIGNING_DIR \ - SIGN_BEFORE SIGN_AFTER \ - " diff --git a/bsp/meta-intel/conf/include/maintainers.inc b/bsp/meta-intel/conf/include/maintainers.inc deleted file mode 100644 index 3ddd1e7d..00000000 --- a/bsp/meta-intel/conf/include/maintainers.inc +++ /dev/null @@ -1,16 +0,0 @@ -# This file contains a list of recipe maintainers for meta-intel - -RECIPE_MAINTAINER_pn-core-image-rt = "Anuj Mittal " -RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Anuj Mittal " -RECIPE_MAINTAINER_pn-gma500-gfx-check = "Anuj Mittal " -RECIPE_MAINTAINER_pn-intel-gpu-tools = "Anuj Mittal " -RECIPE_MAINTAINER_pn-intel-microcode = "Anuj Mittal " -RECIPE_MAINTAINER_pn-core-image-minimal-initramfs = "Anuj Mittal " -RECIPE_MAINTAINER_pn-iucode-tool = "Anuj Mittal " -RECIPE_MAINTAINER_pn-intel-vaapi-driver = "Anuj Mittal " -RECIPE_MAINTAINER_pn-libyami = "Anuj Mittal " -RECIPE_MAINTAINER_pn-libyami-utils = "Anuj Mittal " -RECIPE_MAINTAINER_pn-linux-intel = "Anuj Mittal " -RECIPE_MAINTAINER_pn-linux-intel-rt = "Anuj Mittal " -RECIPE_MAINTAINER_pn-thermald = "Anuj Mittal " -RECIPE_MAINTAINER_pn-xf86-video-ast = "Anuj Mittal " diff --git a/bsp/meta-intel/conf/layer.conf b/bsp/meta-intel/conf/layer.conf deleted file mode 100644 index 63e9e5ea..00000000 --- a/bsp/meta-intel/conf/layer.conf +++ /dev/null @@ -1,24 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "intel" -BBFILE_PATTERN_intel := "^${LAYERDIR}/" -BBFILE_PRIORITY_intel = "5" - -# Additional license directories. -LICENSE_PATH += "${LAYERDIR}/custom-licenses" - -LAYERDEPENDS_intel = "core" -LAYERRECOMMENDS_intel = "dpdk intel-qat" - -# This should only be incremented on significant changes that will -# cause compatibility issues with other layers -LAYERVERSION_intel = "5" -LAYERSERIES_COMPAT_intel = "thud" - - -require ${LAYERDIR}/conf/include/maintainers.inc diff --git a/bsp/meta-intel/conf/machine/include/intel-common-pkgarch.inc b/bsp/meta-intel/conf/machine/include/intel-common-pkgarch.inc deleted file mode 100644 index d0f208bd..00000000 --- a/bsp/meta-intel/conf/machine/include/intel-common-pkgarch.inc +++ /dev/null @@ -1,15 +0,0 @@ -INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common" -PACKAGE_ARCH_pn-linux-intel = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-intel-rt = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-intel-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-intel-dev = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-yocto-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-backport-iwlwifi = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-ixgbe = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_ARCH_pn-ixgbevf = "${INTEL_COMMON_PACKAGE_ARCH}" -PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}" -MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:" diff --git a/bsp/meta-intel/conf/machine/include/intel-core2-32-common.inc b/bsp/meta-intel/conf/machine/include/intel-core2-32-common.inc deleted file mode 100644 index 8c469499..00000000 --- a/bsp/meta-intel/conf/machine/include/intel-core2-32-common.inc +++ /dev/null @@ -1,7 +0,0 @@ -# -# Common configuration for all MACHINEs of the intel-core2 type -# - -DEFAULTTUNE ?= "core2-32" -require conf/machine/include/tune-core2.inc -require conf/machine/include/x86-base.inc diff --git a/bsp/meta-intel/conf/machine/include/intel-corei7-64-common.inc b/bsp/meta-intel/conf/machine/include/intel-corei7-64-common.inc deleted file mode 100644 index 00282569..00000000 --- a/bsp/meta-intel/conf/machine/include/intel-corei7-64-common.inc +++ /dev/null @@ -1,7 +0,0 @@ -# -# Common configuration for all MACHINES of the intel-corei7-64 type -# - -DEFAULTTUNE ?= "corei7-64" -require conf/machine/include/tune-corei7.inc -require conf/machine/include/x86-base.inc diff --git a/bsp/meta-intel/conf/machine/include/meta-intel.inc b/bsp/meta-intel/conf/machine/include/meta-intel.inc deleted file mode 100644 index 78f44fc8..00000000 --- a/bsp/meta-intel/conf/machine/include/meta-intel.inc +++ /dev/null @@ -1,39 +0,0 @@ -# -# BSP variables and settings specific to the meta-intel layer. -# You must include the meta-intel layer in your bblayers.conf -# to use them. -# - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" -PREFERRED_PROVIDER_virtual/kernel_poky-tiny ?= "linux-intel" -PREFERRED_VERSION_linux-intel_linuxstdbase ?= "4.9%" -PREFERRED_VERSION_linux-intel ?= "4.14%" -PREFERRED_VERSION_linux-intel-rt ?= "4.14%" - -XSERVER_X86_ASPEED_AST = "xf86-video-ast \ - " - -# include the user space intel microcode loading support in the generated images. -MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)} thermald" - -# recommended extra packages common to all intel machines -MACHINE_EXTRA_RRECOMMENDS_append = " kernel-modules linux-firmware" - -# for the early boot time kernel microcode loading support, -# merge the microcode data in the final initrd image. -INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" - -DISK_SIGNATURE_UUID ??= "deadbeef-dead-beef-dead-beefdeadbeef" - -EFI_PROVIDER ?= "systemd-boot" -EFI_PROVIDER_x86-x32 = "grub-efi" - -# Add general MACHINEOVERRIDE for meta-intel -MACHINEOVERRIDES =. "intel-x86-common:" - -# Definition of (more or less) suitable virtual machines. -require conf/machine/include/qemuboot-intel.inc - -# Ensure that the extra tools needed by qemu are built when building images -# and tweak machine definition to make the result more usable under qemu. -require conf/machine/include/qemu-intel.inc diff --git a/bsp/meta-intel/conf/machine/include/qemu-intel.inc b/bsp/meta-intel/conf/machine/include/qemu-intel.inc deleted file mode 100644 index 81510404..00000000 --- a/bsp/meta-intel/conf/machine/include/qemu-intel.inc +++ /dev/null @@ -1,19 +0,0 @@ -# Similar to meta/conf/machine/include/qemu.inc but influences the -# distro content (in particular the kernel) less than qemu.inc. - -# Ensure that qemu gets built when building images. -EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" - -# Build ovmf firmware for uefi support in qemu. -EXTRA_IMAGEDEPENDS += "ovmf" - -# runqemu uses virtio, so we have to enable the corresponding -# kernel drivers. -KERNEL_FEATURES_INTEL_COMMON += "cfg/virtio.scc" - -# Other useful extensions which are not enabled by default: -# rng-tools to take advantage of qemu's virtio-rng-pci device. -# MACHINE_EXTRA_RRECOMMENDS += "rng-tools" - -# Creates the necessary .qemuboot.conf file for each image. -IMAGE_CLASSES += "qemuboot" diff --git a/bsp/meta-intel/conf/machine/include/qemuboot-intel.inc b/bsp/meta-intel/conf/machine/include/qemuboot-intel.inc deleted file mode 100644 index 6586cf09..00000000 --- a/bsp/meta-intel/conf/machine/include/qemuboot-intel.inc +++ /dev/null @@ -1,15 +0,0 @@ -# For runqemu -IMAGE_CLASSES += "qemuboot" -QB_SYSTEM_NAME_intel-core2-32 = "qemu-system-i386" -QB_CPU_intel-core2-32 = "-cpu coreduo" -QB_CPU_KVM_intel-core2-32 = "-cpu kvm32" - -QB_SYSTEM_NAME_intel-corei7-64 = "qemu-system-x86_64" -QB_CPU_intel-corei7-64 = "-cpu Nehalem" -QB_CPU_KVM_intel-corei7-64 = "-cpu kvm64" - -QB_AUDIO_DRV = "alsa" -QB_AUDIO_OPT = "-soundhw ac97,es1370" -QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1" -# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy -QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci" diff --git a/bsp/meta-intel/conf/machine/intel-core2-32.conf b/bsp/meta-intel/conf/machine/intel-core2-32.conf deleted file mode 100644 index 570685aa..00000000 --- a/bsp/meta-intel/conf/machine/intel-core2-32.conf +++ /dev/null @@ -1,37 +0,0 @@ -#@TYPE: Machine -#@NAME: intel-core2-32 - -#@DESCRIPTION: Machine configuration for 32 bit Intel Core 2 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. - -require conf/machine/include/meta-intel.inc -require conf/machine/include/intel-core2-32-common.inc -require conf/machine/include/intel-common-pkgarch.inc - -MACHINE_FEATURES += "pcbios efi" -MACHINE_FEATURES += "wifi 3g nfc" -MACHINE_FEATURES += "intel-ucode" - -MACHINE_HWCODECS ?= "intel-vaapi-driver gstreamer1.0-vaapi" - -MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check" - -# Enable optional QAT items: -COMPATIBLE_MACHINE_pn-qat17 = "intel-core2-32" - -XSERVER ?= "${XSERVER_X86_BASE} \ - ${XSERVER_X86_EXT} \ - ${XSERVER_X86_FBDEV} \ - ${XSERVER_X86_I915} \ - ${XSERVER_X86_I965} \ - ${XSERVER_X86_MODESETTING} \ - ${XSERVER_X86_VESA} \ - ${XSERVER_X86_ASPEED_AST} \ - " - -SYSLINUX_OPTS = "serial 0 115200" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyPCH0" -APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0" - -IMAGE_FSTYPES += "wic" -WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}" -WKS_FILE_DEPENDS_append = " intel-microcode" diff --git a/bsp/meta-intel/conf/machine/intel-corei7-64.conf b/bsp/meta-intel/conf/machine/intel-corei7-64.conf deleted file mode 100644 index 9ce21a84..00000000 --- a/bsp/meta-intel/conf/machine/intel-corei7-64.conf +++ /dev/null @@ -1,41 +0,0 @@ -#@TYPE: Machine -#@NAME: intel-corei7-64 - -#@DESCRIPTION: Machine configuration for 64 bit Intel Core i7 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. - -require conf/machine/include/meta-intel.inc -require conf/machine/include/intel-corei7-64-common.inc -require conf/machine/include/intel-common-pkgarch.inc - -MACHINE_FEATURES += "pcbios efi" -MACHINE_FEATURES += "wifi 3g nfc" -MACHINE_FEATURES += "intel-ucode" - -MACHINE_HWCODECS ?= "intel-vaapi-driver gstreamer1.0-vaapi" - -# Enable optional dpdk: -COMPATIBLE_MACHINE_pn-dpdk = "intel-corei7-64" -COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "intel-corei7-64" - -# Enable optional QAT items: -COMPATIBLE_MACHINE_pn-qat16 = "intel-corei7-64" -COMPATIBLE_MACHINE_pn-qat17 = "intel-corei7-64" -COMPATIBLE_MACHINE_pn-zlib-qat = "intel-corei7-64" - -XSERVER ?= "${XSERVER_X86_BASE} \ - ${XSERVER_X86_EXT} \ - ${XSERVER_X86_FBDEV} \ - ${XSERVER_X86_I915} \ - ${XSERVER_X86_I965} \ - ${XSERVER_X86_MODESETTING} \ - ${XSERVER_X86_VESA} \ - ${XSERVER_X86_ASPEED_AST} \ - " - -SYSLINUX_OPTS = "serial 0 115200" -SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2" -APPEND += "rootwait console=ttyS0,115200 console=tty0" - -IMAGE_FSTYPES += "wic" -WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks", "grub-bootdisk-microcode.wks", d)}" -WKS_FILE_DEPENDS_append = " intel-microcode" diff --git a/bsp/meta-intel/custom-licenses/BSD_LMS b/bsp/meta-intel/custom-licenses/BSD_LMS deleted file mode 100755 index 2ea28ff4..00000000 --- a/bsp/meta-intel/custom-licenses/BSD_LMS +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (C) 2004-2012 Intel Corporation. All rights reserved. - -• This license covers the sources of the Local Manageability Service (LMS). -For licensing information for the LMS build scripts, please refer to the file build_script_license.txt. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - - Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - - Neither the name of Intel Corporation. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/bsp/meta-intel/custom-licenses/Intel-Microcode-License b/bsp/meta-intel/custom-licenses/Intel-Microcode-License deleted file mode 100644 index 214abddc..00000000 --- a/bsp/meta-intel/custom-licenses/Intel-Microcode-License +++ /dev/null @@ -1,37 +0,0 @@ -Copyright (c) 2018-2019 Intel Corporation. -All rights reserved. - -Redistribution. - -Redistribution and use in binary form, without modification, are permitted, -provided that the following conditions are met: - -1. Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials provided - with the distribution. - -2. Neither the name of Intel Corporation nor the names of its suppliers may - be used to endorse or promote products derived from this software without - specific prior written permission. - -3. No reverse engineering, decompilation, or disassembly of this software - is permitted. - - -"Binary form" includes any format that is commonly used for electronic -conveyance that is a reversible, bit-exact translation of binary -representation to ASCII or ISO text, for example "uuencode". - -DISCLAIMER. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/bsp/meta-intel/documentation/secureboot/README b/bsp/meta-intel/documentation/secureboot/README deleted file mode 100644 index 3d5703bb..00000000 --- a/bsp/meta-intel/documentation/secureboot/README +++ /dev/null @@ -1,38 +0,0 @@ -Currently, only one implementation of Secure Boot is available out of the box, -which is using a single signed EFI application to directly boot the kernel with -an optional initramfs. - -This can be added to your build either through local.conf, or via your own -custom image recipe. - -If you are adding it via local.conf, set the following variables: - -IMAGE_FEATURES += "secureboot" -WKS_FILE = "generic-bootdisk.wks.in" -SECURE_BOOT_SIGNING_KEY = "/path/to/your/signing/key" -SECURE_BOOT_SIGNING_CERT = "/path/to/your/signing/cert" -IMAGE_CLASSES += "uefi-comboapp" - -If working with an image recipe, you can inherit uefi-comboapp directly instead -of using the IMAGE_CLASSES variable. - -The signing keys and certs can be created via openssl commands. Here's an -example: -openssl req -new -x509 -newkey rsa:2048 -subj "/CN=your-subject/" -keyout \ -your-key.key -out your-key.crt -days 365 -nodes -sha256 -openssl x509 -in your-key.crt -out your-key.cer -outform DER - -The .crt file is your SECURE_BOOT_SIGNING_CERT, and the .key file is your -SECURE_BOOT_SIGNING_KEY. - -You should enroll the .crt key in your firmware under the PK, KEK, and DB -options (methods are different depending on your firmware). If a key should ever -become invalid, enroll it under DBX to blacklist it. - -The comboapp can be further manipulated in a number of ways. You can modify the -kernel command line via the APPEND variable, you can change the default UUID via -the DISK_SIGNATURE_UUID variable, and you can modify the contents of the -initramfs via the INITRD_IMAGE or INITRD_LIVE variables. - -A simple Secure Boot enabled image used for testing can be viewed at: -common/recipes-selftest/images/secureboot-selftest-image-signed.bb diff --git a/bsp/meta-intel/lib/oeqa/selftest/cases/secureboot.py b/bsp/meta-intel/lib/oeqa/selftest/cases/secureboot.py deleted file mode 100644 index 4c059e25..00000000 --- a/bsp/meta-intel/lib/oeqa/selftest/cases/secureboot.py +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env python -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- -# -# Copyright (c) 2017, Intel Corporation. -# All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# AUTHORS -# Mikko Ylinen -# -# Based on meta/lib/oeqa/selftest/* and meta-refkit/lib/oeqa/selftest/* - -"""Test cases for secure boot with QEMU running OVMF.""" - -import os -import unittest -import re -import glob -from shutil import rmtree, copy - -from oeqa.core.decorator.depends import OETestDepends -from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu - -class SecureBootTests(OESelftestTestCase): - """Secure Boot test class.""" - - ovmf_keys_enrolled = False - ovmf_qemuparams = '' - ovmf_dir = '' - test_image_unsigned = 'secureboot-selftest-image-unsigned' - test_image_signed = 'secureboot-selftest-image-signed' - correct_key = 'refkit-db' - incorrect_key = 'incorrect' - - @classmethod - def setUpLocal(self): - - if not SecureBootTests.ovmf_keys_enrolled: - bitbake('ovmf ovmf-shell-image-enrollkeys', output_log=self.logger) - - bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_IMAGE']) - - SecureBootTests.ovmf_dir = os.path.join(bb_vars['TMPDIR'], 'oeselftest', 'secureboot', 'ovmf') - bb.utils.mkdirhier(SecureBootTests.ovmf_dir) - - # Copy (all) OVMF in a temporary location - for src in glob.glob('%s/ovmf.*' % bb_vars['DEPLOY_DIR_IMAGE']): - copy(src, SecureBootTests.ovmf_dir) - - SecureBootTests.ovmf_qemuparams = '-drive if=pflash,format=qcow2,file=%s/ovmf.secboot.qcow2' % SecureBootTests.ovmf_dir - - cmd = ("runqemu " - "qemuparams='%s' " - "ovmf-shell-image-enrollkeys wic intel-corei7-64 " - "nographic slirp") % SecureBootTests.ovmf_qemuparams - print('Running "%s"' % cmd) - status = runCmd(cmd) - - if not re.search('info: success', status.output, re.M): - self.fail('Failed to enroll keys. EFI shell log:\n%s' % status.output) - else: - # keys enrolled in ovmf.secboot.vars - SecureBootTests.ovmf_keys_enrolled = True - - @classmethod - def tearDownLocal(self): - # Seems this is mandatory between the tests (a signed image is booted - # when running test_boot_unsigned_image after test_boot_signed_image). - # bitbake('-c clean %s' % test_image, output_log=self.logger) - # - # Whatever the problem was, it no longer seems to be necessary, so - # we can skip the time-consuming clean + full rebuild (5:04 min instead - # of 6:55min here). - pass - - @classmethod - def tearDownClass(self): - bitbake('ovmf-shell-image-enrollkeys:do_cleanall', output_log=self.logger) - rmtree(self.ovmf_dir, ignore_errors=True) - - def secureboot_with_image(self, boot_timeout=300, signing_key=None): - """Boot the image with UEFI SecureBoot enabled and see the result. """ - - config = "" - - if signing_key: - test_image = self.test_image_signed - config += 'SECURE_BOOT_SIGNING_KEY = "${THISDIR}/files/%s.key"\n' % signing_key - config += 'SECURE_BOOT_SIGNING_CERT = "${THISDIR}/files/%s.crt"\n' % signing_key - else: - test_image = self.test_image_unsigned - - self.write_config(config) - bitbake(test_image, output_log=self.logger) - self.remove_config(config) - - # Some of the cases depend on the timeout to expire. Allow overrides - # so that we don't have to wait 1000s which is the default. - overrides = { - 'TEST_QEMUBOOT_TIMEOUT': boot_timeout, - } - - print('Booting %s' % test_image) - - try: - with runqemu(test_image, ssh=False, - runqemuparams='nographic slirp', - qemuparams=self.ovmf_qemuparams, - overrides=overrides, - image_fstype='wic') as qemu: - - cmd = 'uname -a' - - status, output = qemu.run_serial(cmd) - - self.assertTrue(status, 'Could not run \'uname -a\' (status=%s):\n%s' % (status, output)) - - # if we got this far without a correctly signed image, something went wrong - if signing_key != self.correct_key: - self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) - - - except Exception: - - # Currently runqemu() fails if 'login:' prompt is not seen and it's - # not possible to login as 'root'. Those conditions aren't met when - # booting to EFI shell (See [YOCTO #11438]). We catch the failure - # and parse the boot log to determine the success. Note: the - # timeout triggers verbose bb.error() but that's normal with some - # of the test cases. - - workdir = get_bb_var('WORKDIR', test_image) - bootlog = "%s/testimage/qemu_boot_log" % workdir - - with open(bootlog, "r") as log: - - # This isn't right but all we can do at this point. The right - # approach would run commands in the EFI shell to determine - # the BIOS rejects unsigned and/or images signed with keys in - # dbx key store but that needs changes in oeqa framework. - - output = log.read() - - # PASS if we see a security violation on unsigned or incorrectly signed images, otherwise fail - if signing_key == self.correct_key: - self.fail('Correctly signed image failed to boot. Boot log:\n%s' % output) - elif not re.search('Security Violation', output): - self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) - - def test_boot_unsigned_image(self): - """ Boot unsigned image with secureboot enabled in UEFI.""" - self.secureboot_with_image(boot_timeout=120, signing_key=None) - - @OETestDepends(['secureboot.SecureBootTests.test_boot_unsigned_image']) - def test_boot_incorrectly_signed_image(self): - """ Boot (correctly) signed image with secureboot enabled in UEFI.""" - self.secureboot_with_image(boot_timeout=120, signing_key=self.incorrect_key) - - @OETestDepends(['secureboot.SecureBootTests.test_boot_incorrectly_signed_image']) - def test_boot_correctly_signed_image(self): - """ Boot (correctly) signed image with secureboot enabled in UEFI.""" - self.secureboot_with_image(boot_timeout=150, signing_key=self.correct_key) diff --git a/bsp/meta-intel/recipes-bsp/formfactor/formfactor/machconfig b/bsp/meta-intel/recipes-bsp/formfactor/formfactor/machconfig deleted file mode 100644 index 73695fac..00000000 --- a/bsp/meta-intel/recipes-bsp/formfactor/formfactor/machconfig +++ /dev/null @@ -1,39 +0,0 @@ -# Note: superuser permission is required to run usbhid-dump -# successfully. - -# HEX keys are according to the USB HID spec and USB HID usage table -# We can add more keys as needed in the future. - -# This test may not be very accurate, as we only look for the first -# two lines of a descriptor section. Example: -# -# 001:003:000:DESCRIPTOR 1460501386.337809 -# 05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 03 -# 15 00 25 01 95 03 75 01 81 02 .. .. .. .. .. .. -# .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. -# -# By doing so we eliminate false matches when HEX keys are in the lines -# in the middle of the whole descriptor section. - -if type usbhid-dump &>/dev/null; then - if USBHID_DUMP_OUTPUT=$(usbhid-dump -e descriptor 2>/dev/null|grep -A1 DESCRIPTOR); then - # checker for generic USB HID keyboard - USBHID_KBD_CMD="grep -E '^ 05 01 09 06'" - - # checker for touch screen - USBHID_TS_CMD="grep -E '^ 05 0D 09 04'" - - if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_TS_CMD &>/dev/null; then - HAVE_TOUCHSCREEN=1 - fi - - if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_KBD_CMD &>/dev/null; then - HAVE_KEYBOARD=1 - else - # config script in OE will set HAVE_KEYBOARD=1 - # if we don't set any value. We have to explicitly - # tell it when keyboard is not detected. - HAVE_KEYBOARD=0 - fi - fi -fi diff --git a/bsp/meta-intel/recipes-bsp/formfactor/formfactor_0.0.bbappend b/bsp/meta-intel/recipes-bsp/formfactor/formfactor_0.0.bbappend deleted file mode 100644 index 6dd422ae..00000000 --- a/bsp/meta-intel/recipes-bsp/formfactor/formfactor_0.0.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" diff --git a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf deleted file mode 100644 index 74d33c87..00000000 --- a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Mimic modprobe's install funcitonality with busybox's modprobe -install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; } diff --git a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh deleted file mode 100644 index 75cda99f..00000000 --- a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Check for devices we wish to avoid gma500_gfx for -DEVICES="0x8119 0x4108" - -# Checked flag to avoid infinite modprobe -echo "gma500_gfx_checked" >> /dev/kmsg; - -for DEVICE in $DEVICES; do - if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then - echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg; - exit 0 - fi -done -exit 1 diff --git a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb deleted file mode 100644 index 7b08064b..00000000 --- a/bsp/meta-intel/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Intel gma500_gfx fix for certain hardware" -DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices." -LICENSE="GPLv2" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -SRC_URI = "file://gma500-gfx-check.conf \ - file://gma500-gfx-check.sh " - -do_install(){ - install -d ${D}${sysconfdir}/modprobe.d/ - install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh - install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf -} - -FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \ - ${sysconfdir}/modprobe.d/gma500-gfx-check.sh" - -COMPATIBLE_MACHINE = "intel-core2-32" diff --git a/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch b/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch deleted file mode 100644 index 8d0b6149..00000000 --- a/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 58669ad764767afea4de53f8a97357773b1855ef Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Tue, 25 Oct 2016 12:54:08 -0700 -Subject: [PATCH] efi/boot.c: workaround for Joule BIOS hang - -This patch should be removed when the BIOS is fixed - -Authored-by: Steve Sakoman - -Upstream-Status: Inappropriate [machine specific workaround] -Signed-off-by: Saul Wold ---- - src/boot/efi/boot.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c -index 3dcd9a5..3c6ed8c 100644 ---- a/src/boot/efi/boot.c -+++ b/src/boot/efi/boot.c -@@ -649,7 +649,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load - } - - /* timeout disabled, wait for next key */ -- wait = TRUE; -+ wait = FALSE; - continue; - } - --- -2.7.4 - diff --git a/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot_%.bbappend deleted file mode 100644 index d46ef410..00000000 --- a/bsp/meta-intel/recipes-bsp/systemd-boot/systemd-boot_%.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/systemd-boot:" - -SRC_URI_append_intel-x86-common = " \ - file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \ - " - -PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}" - -do_compile_append_intel-x86-common() { - ninja src/boot/efi/linux${SYSTEMD_BOOT_EFI_ARCH}.efi.stub -} - -do_deploy_append_intel-x86-common() { - install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR} -} diff --git a/bsp/meta-intel/recipes-bsp/thermald/thermald/0001-Use-correct-format-specifier-for-size_t.patch b/bsp/meta-intel/recipes-bsp/thermald/thermald/0001-Use-correct-format-specifier-for-size_t.patch deleted file mode 100644 index 6897ffc1..00000000 --- a/bsp/meta-intel/recipes-bsp/thermald/thermald/0001-Use-correct-format-specifier-for-size_t.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bb7631163c8f3f44d0dc83690765cdb799664fd5 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Wed, 26 Sep 2018 10:34:15 +0800 -Subject: [PATCH] Use correct format specifier for size_t - -%zu instead of %lu, otherwise on 32 bit: - -| ../git/src/thd_zone.cpp: In member function 'void cthd_zone::sort_and_update_poll_trip()': -| ../git/src/thd_zone.cpp:106:16: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'std::vector::size_type' {aka 'unsigned int'} [-Werror=format=] -| thd_log_debug("sort_and_update_poll_trip: trip_points_size =%lu\n", -| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| trip_points.size()); - -Upstream-Status: Submitted -[https://github.com/intel/thermal_daemon/pull/165] - -Signed-off-by: Anuj Mittal ---- - src/thd_zone.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/thd_zone.cpp b/src/thd_zone.cpp -index b7edf9e..cb7b8e8 100644 ---- a/src/thd_zone.cpp -+++ b/src/thd_zone.cpp -@@ -103,7 +103,7 @@ int cthd_zone::read_user_set_psv_temp() { - } - - void cthd_zone::sort_and_update_poll_trip() { -- thd_log_debug("sort_and_update_poll_trip: trip_points_size =%lu\n", -+ thd_log_debug("sort_and_update_poll_trip: trip_points_size =%zu\n", - trip_points.size()); - if (trip_points.size()) { - unsigned int polling_trip = 0; --- -2.17.1 - diff --git a/bsp/meta-intel/recipes-bsp/thermald/thermald_1.8.bb b/bsp/meta-intel/recipes-bsp/thermald/thermald_1.8.bb deleted file mode 100644 index f7725f31..00000000 --- a/bsp/meta-intel/recipes-bsp/thermald/thermald_1.8.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Linux thermal daemon" - -DESCRIPTION = "Thermal Daemon is a Linux daemon used to prevent the \ -overheating of platforms. This daemon monitors temperature and applies \ -compensation using available cooling methods." - -HOMEPAGE = "https://github.com/01org/thermal_daemon" - -DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" -DEPENDS_append_libc-musl = " argp-standalone" -DEPENDS_append_toolchain-clang = " openmp" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" - -SRC_URI = "git://github.com/intel/thermal_daemon/ \ - file://0001-Use-correct-format-specifier-for-size_t.patch \ - " -SRCREV = "517c0e5f92d49aeeef3a22b04caf40d588216827" -S = "${WORKDIR}/git" - -inherit pkgconfig autotools systemd - -FILES_${PN} += "${datadir}/dbus-1/system-services/*.service" - -SYSTEMD_SERVICE_${PN} = "thermald.service" - -COMPATIBLE_HOST = '(i.86|x86_64).*-linux' - -CONFFILES_${PN} = " \ - ${sysconfdir}/thermald/thermal-conf.xml \ - ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \ - " - -UPSTREAM_CHECK_URI = "https://github.com/01org/thermal_daemon/releases" diff --git a/bsp/meta-intel/recipes-core/images/core-image-minimal-initramfs.bbappend b/bsp/meta-intel/recipes-core/images/core-image-minimal-initramfs.bbappend deleted file mode 100644 index 132f15b5..00000000 --- a/bsp/meta-intel/recipes-core/images/core-image-minimal-initramfs.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Add i915 graphics firmware -PACKAGE_INSTALL_append_intel-x86-common = " linux-firmware-i915" diff --git a/bsp/meta-intel/recipes-core/images/core-image-tiny.bb b/bsp/meta-intel/recipes-core/images/core-image-tiny.bb deleted file mode 100644 index 6b09b0c2..00000000 --- a/bsp/meta-intel/recipes-core/images/core-image-tiny.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "A tiny image just capable of allowing a device to boot from RAM, \ -this image recipe generates an image file which rather boots from initrd than \ -from storage, it achieves this by using wic to pick up the artifacts generated \ -by the core-image-tiny-initramfs image" - -# The actual rootfs/initrd will be the one from core-image-tiny-initramfs, so -# we reset IMAGE_INSTALL to avoid building other things that will be pointless -IMAGE_INSTALL = "" - -# Do not pollute the initrd image with rootfs features -IMAGE_FEATURES = "" - -IMAGE_LINGUAS = " " - -LICENSE = "MIT" - -IMAGE_ROOTFS_SIZE ?= "8192" - -IMAGE_FSTYPES = "wic" -inherit core-image - -# We get some parts from image-live that we need in order to boot from initrd -INITRD_IMAGE_LIVE ?= "core-image-tiny-initramfs" - -python() { - image_b = d.getVar('IMAGE_BASENAME') - initrd_i = d.getVar('INITRD_IMAGE_LIVE') - if image_b == initrd_i: - bb.error('INITRD_IMAGE_LIVE %s cannot use the requested IMAGE_FSTYPE' % initrd_i) - bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.') - elif initrd_i: - d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i) -} - -WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in" -WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in" diff --git a/bsp/meta-intel/recipes-core/microcode/intel-microcode_20190514a.bb b/bsp/meta-intel/recipes-core/microcode/intel-microcode_20190514a.bb deleted file mode 100644 index 6e97e90c..00000000 --- a/bsp/meta-intel/recipes-core/microcode/intel-microcode_20190514a.bb +++ /dev/null @@ -1,66 +0,0 @@ -SUMMARY = "Intel Processor Microcode Datafile for Linux" -HOMEPAGE = "http://www.intel.com/" -DESCRIPTION = "The microcode data file contains the latest microcode\ - definitions for all Intel processors. Intel releases microcode updates\ - to correct processor behavior as documented in the respective processor\ - specification updates. While the regular approach to getting this microcode\ - update is via a BIOS upgrade, Intel realizes that this can be an\ - administrative hassle. The Linux operating system and VMware ESX\ - products have a mechanism to update the microcode after booting.\ - For example, this file will be used by the operating system mechanism\ - if the file is placed in the /etc/firmware directory of the Linux system." - -LICENSE = "Intel-Microcode-License" -LIC_FILES_CHKSUM = "file://license;md5=99b296eb12723fd1eeb52e24971eed84" - -SRC_URI = "git://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git;protocol=https \ - " - -SRCREV = "1dd14da6d1ea5cfbd95923653f31c04aac3aa655" - -DEPENDS = "iucode-tool-native" -S = "${WORKDIR}/git" - -COMPATIBLE_HOST = "(i.86|x86_64).*-linux" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit deploy - -# Use any of the iucode_tool parameters to filter specific microcodes from the data file -# For further information, check the iucode-tool's manpage : http://manned.org/iucode-tool -UCODE_FILTER_PARAMETERS ?= "" - -do_compile() { - ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ - ${UCODE_FILTER_PARAMETERS} \ - --overwrite \ - --write-to=${WORKDIR}/microcode_${PV}.bin \ - ${S}/intel-ucode/* ${S}/intel-ucode-with-caveats/* - - ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ - ${UCODE_FILTER_PARAMETERS} \ - --overwrite \ - --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \ - ${S}/intel-ucode/* ${S}/intel-ucode-with-caveats/* -} - -do_install() { - install -d ${D}${base_libdir}/firmware/intel-ucode/ - install ${WORKDIR}/microcode_${PV}.bin ${D}${base_libdir}/firmware/intel-ucode/ - cd ${D}${base_libdir}/firmware/intel-ucode/ - ln -sf microcode_${PV}.bin microcode.bin -} - -do_deploy() { - install -d ${DEPLOYDIR} - install ${WORKDIR}/microcode_${PV}.cpio ${DEPLOYDIR}/ - cd ${DEPLOYDIR} - rm -f microcode.cpio - ln -sf microcode_${PV}.cpio microcode.cpio -} - -addtask deploy before do_build after do_compile - -PACKAGES = "${PN}" - -FILES_${PN} = "${base_libdir}" diff --git a/bsp/meta-intel/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch b/bsp/meta-intel/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch deleted file mode 100644 index ca97d2ab..00000000 --- a/bsp/meta-intel/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5f6826b3a59dedf508d5a6122362d69a4813e8e6 Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Fri, 3 Feb 2017 16:08:51 -0800 -Subject: [PATCH] Makefile.am: Add arg-parse library for MUSL support - -iucode-tool needs argp-standalone when used with MUSL, so add this -patch to the Makefile to link with argp - -Upstream-Status: Pending -Signed-off-by: Saul Wold ---- - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.am b/Makefile.am -index 415a241..764fb61 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -5,6 +5,7 @@ - sbin_PROGRAMS = iucode_tool - man_MANS = iucode_tool.8 - -+iucode_tool_LDADD = -largp - iucode_tool_SOURCES = intel_microcode.h intel_microcode.c iucode_tool.c - EXTRA_DIST = autogen.sh CONTRIBUTING - --- -2.7.4 - diff --git a/bsp/meta-intel/recipes-core/microcode/iucode-tool_2.3.1.bb b/bsp/meta-intel/recipes-core/microcode/iucode-tool_2.3.1.bb deleted file mode 100644 index df74a8e9..00000000 --- a/bsp/meta-intel/recipes-core/microcode/iucode-tool_2.3.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "Update Intel CPU microcode" - -DESCRIPTION = "iucode_tool is a program to manipulate Intel i686 and X86-64\ - processor microcode update collections, and to use the kernel facilities to\ - update the microcode on Intel system processors. It can load microcode data\ - files in text and binary format, sort, list and filter the microcode updates\ - contained in these files, write selected microcode updates to a new file in\ - binary format, or upload them to the kernel. \ - It operates on microcode data downloaded directly from Intel:\ - http://feeds.downloadcenter.intel.com/rss/?p=2371\ -" -HOMEPAGE = "https://gitlab.com/iucode-tool/" -BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ - file://iucode_tool.c;beginline=1;endline=15;md5=71eeab3190360ff0267101b570874756" - -DEPENDS_append_libc-musl = " argp-standalone" - -SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz" -SRC_URI_append_libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch" - -SRC_URI[md5sum] = "63b33cc0ea1f8c73b443412abbf39d6f" -SRC_URI[sha256sum] = "12b88efa4d0d95af08db05a50b3dcb217c0eb2bfc67b483779e33d498ddb2f95" - -inherit autotools - -BBCLASSEXTEND = "native" - -COMPATIBLE_HOST = "(i.86|x86_64).*-linux" - -UPSTREAM_CHECK_URI = "https://gitlab.com/iucode-tool/releases" diff --git a/bsp/meta-intel/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/bsp/meta-intel/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch deleted file mode 100644 index 62db0633..00000000 --- a/bsp/meta-intel/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 48e511481d83c1614cd00a5a2edcf6b5d746b9c4 Mon Sep 17 00:00:00 2001 -From: Mikko Ylinen -Date: Fri, 7 Apr 2017 12:06:14 +0300 -Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot - -This patch adds refkit-db.cer (via xxd -i) in OVMF's db -signature database when used with EnrollDefaultKeys EFI -application. It's used for testing purposes only. - -Images signed with refkit-db keys are allowed to boot. - -Signed-off-by: Mikko Ylinen ---- - OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 68 +++++++++++++++++++++++++++ - 1 file changed, 68 insertions(+) - -diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c -index 24ab977..a3c12ba 100644 ---- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c -+++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c -@@ -516,6 +516,73 @@ STATIC CONST UINT8 MicrosoftUefiCA[] = { - 0x07, 0x92, 0x9b, 0xf5, 0xa6, 0xbc, 0x59, 0x83, 0x58 - }; - -+STATIC CONST UINT8 RefkitTestCA[] = { -+ 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, -+ 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, -+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, -+ 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, -+ 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, -+ 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, -+ 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, -+ 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, -+ 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, -+ 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, -+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, -+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, -+ 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, -+ 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, -+ 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, -+ 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, -+ 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f, -+ 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c, -+ 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9, -+ 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95, -+ 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd, -+ 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96, -+ 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51, -+ 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8, -+ 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86, -+ 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2, -+ 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81, -+ 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb, -+ 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d, -+ 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1, -+ 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c, -+ 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47, -+ 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39, -+ 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00, -+ 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, -+ 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, -+ 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, -+ 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, -+ 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46, -+ 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06, -+ 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, -+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, -+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43, -+ 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52, -+ 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68, -+ 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9, -+ 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33, -+ 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85, -+ 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71, -+ 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd, -+ 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba, -+ 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35, -+ 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37, -+ 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38, -+ 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d, -+ 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c, -+ 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14, -+ 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25, -+ 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10, -+ 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b, -+ 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92, -+ 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba, -+ 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d, -+ 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3 -+}; -+ - // - // The most important thing about the variable payload is that it is a list of - // lists, where the element size of any given *inner* list is constant. -@@ -908,6 +975,7 @@ ShellAppMain ( - &gEfiImageSecurityDatabaseGuid, - MicrosoftPCA, sizeof MicrosoftPCA, &gEfiCallerIdGuid, - MicrosoftUefiCA, sizeof MicrosoftUefiCA, &gEfiCallerIdGuid, -+ RefkitTestCA, sizeof RefkitTestCA, &gEfiCallerIdGuid, - NULL); - if (EFI_ERROR (Status)) { - return 1; --- -2.1.4 - diff --git a/bsp/meta-intel/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/bsp/meta-intel/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb deleted file mode 100644 index b20f6e58..00000000 --- a/bsp/meta-intel/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb +++ /dev/null @@ -1,13 +0,0 @@ -require recipes-core/ovmf/ovmf-shell-image.bb - -WKS_SEARCH_PATH_append = ":${COREBASE}/meta/recipes-core/ovmf" - -QB_DRIVE_TYPE = "/dev/vd" - -do_image_append() { - cat > ${IMAGE_ROOTFS}/startup.nsh << EOF -EnrollDefaultKeys -reset -EOF - -} diff --git a/bsp/meta-intel/recipes-core/ovmf/ovmf_%.bbappend b/bsp/meta-intel/recipes-core/ovmf/ovmf_%.bbappend deleted file mode 100644 index bbf5fa32..00000000 --- a/bsp/meta-intel/recipes-core/ovmf/ovmf_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" - -SRC_URI_append_intel-x86-common = " \ - file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ -" -PACKAGECONFIG_append_intel-x86-common = " secureboot" diff --git a/bsp/meta-intel/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb b/bsp/meta-intel/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb deleted file mode 100644 index 9fe2950a..00000000 --- a/bsp/meta-intel/recipes-graphics/igt-gpu-tools/igt-gpu-tools_1.23.bb +++ /dev/null @@ -1,42 +0,0 @@ -require ${COREBASE}/meta/recipes-graphics/xorg-app/xorg-app-common.inc - -SUMMARY = "Intel GPU tools" -DESCRIPTION = "Variety of small tools for testing intel graphics." - -LIC_FILES_CHKSUM = "file://COPYING;md5=e4b3dd344780e0400593b21b115a6947" - -LICENSE_append = " & ISC" - -inherit autotools gtk-doc - -SRC_URI = "${XORG_MIRROR}/individual/app/${BP}.tar.xz" - -DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps libunwind kmod openssl" -RDEPENDS_${PN} += "bash" -RDEPENDS_${PN}-tests += "bash" - -PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests" - -SRC_URI[md5sum] = "04c1f10d6fd85e079271540b0ea786e9" -SRC_URI[sha256sum] = "4d4b086c513bace5c23d0889de3f42ac3ebd3d968c64dedae6e28e006a499ad0" - -EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger" -COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" -COMPATIBLE_HOST_libc-musl_class-target = "null" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[audio] = "--enable-audio,--disable-audio,alsa-lib gsl" - -gputools_sysroot_preprocess() { - rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc -} -SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess" - -FILES_${PN} += "${libdir}/intel_aubdump.so" -FILES_${PN}-benchmarks += "${libexecdir}/${BPN}/benchmarks" -FILES_${PN}-tests += "\ - ${libexecdir}/${BPN}/*\ - ${datadir}/${BPN}/1080p-right.png\ - ${datadir}/${BPN}/1080p-left.png\ - ${datadir}/${BPN}/pass.png\ - ${datadir}/${BPN}/test-list.txt" diff --git a/bsp/meta-intel/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb b/bsp/meta-intel/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb deleted file mode 100644 index 090efd62..00000000 --- a/bsp/meta-intel/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb +++ /dev/null @@ -1,12 +0,0 @@ -require recipes-graphics/xorg-driver/xorg-driver-video.inc - -SUMMARY = "X.Org X server -- ASpeed Technologies graphics driver" - -DESCRIPTION = "ast is an Xorg driver for ASpeed Technologies video cards" - -LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" - -DEPENDS += "libpciaccess" - -SRC_URI[md5sum] = "4f85febe48d51e53624550a96fc9e9ee" -SRC_URI[sha256sum] = "1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de" diff --git a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch deleted file mode 100644 index 353126fe..00000000 --- a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Sat, 1 Apr 2017 11:43:31 -0700 -Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API - -This change forces the newer API, as the linux-intel 4.9-LTS kernel -backported the 4.10 API change in the page handling code. - -Signed-off-by: Saul Wold ---- - zc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/zc.c b/zc.c -index ae464ff..b2759ce 100644 ---- a/zc.c -+++ b/zc.c -@@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, - #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) - ret = get_user_pages_remote(task, mm, - (unsigned long)addr, pgcount, write, 0, pg, NULL); --#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) -+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0) - ret = get_user_pages_remote(task, mm, - (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, - pg, NULL); diff --git a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend deleted file mode 100644 index c59ddb2f..00000000 --- a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" - -python() { - # When we add more kernels for linux-intel, we may have to add a Version check - if (d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel"): - src_uri = d.getVar("SRC_URI") - d.setVar("SRC_URI", src_uri + - " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch") -} diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch deleted file mode 100644 index 0041af57..00000000 --- a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5f87ef7ed60bc9762467184ed0a6d000b80713d9 Mon Sep 17 00:00:00 2001 -From: sweeaun -Date: Sun, 8 Apr 2018 17:21:52 +0800 -Subject: [PATCH] ixgbe: skip host depmod - -Upstream-Status: Inappropriate [Cross-Compile] - -Depmod during do_install is irrelevant when cross-compiling. -Remove the depmod steps during do_install. - -Signed-off-by: sweeaun ---- - Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 545489a..07e422f 100644 ---- a/Makefile -+++ b/Makefile -@@ -141,8 +141,6 @@ install: default manfile - @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz - @echo "Installing modules..." - @+$(call devkernelbuild,modules_install) -- @echo "Running depmod..." -- @$(call cmd_depmod) - - uninstall: - rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko; --- -2.7.4 - diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb deleted file mode 100644 index 28d5e980..00000000 --- a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE" -DESCRIPTION="The ixgbe driver supports 82598- and 82599-based \ -PCI Express* 10 Gigabit Network Connections." - -HOMEPAGE = "https://sourceforge.net/projects/e1000/" -SECTION = "kernel/network" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db560e9a8417" - -SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \ - file://0001-ixgbe-skip-host-depmod.patch \ - " - -SRC_URI[md5sum] = "678514cb0e24f1c11d53d156a9845e64" -SRC_URI[sha256sum] = "1c1386e4eb0b4526d2edeb04cac657e1d74c2e5cef3f2d00a26a23926744ef1a" - -S = "${WORKDIR}/${BP}/src" -MODULES_INSTALL_TARGET = "install" - -EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' - -KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbe" -KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbe" - -inherit module - -do_install_append () { - # Install scripts/set_irq_affinity - install -d ${D}${sysconfdir}/network - install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network - - rm -rf ${D}${prefix}/man -} - -PACKAGES += "${PN}-script" - -FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity" diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch deleted file mode 100644 index 49a59496..00000000 --- a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b1d7f46442e50458311573443a5c78637874f62b Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Thu, 12 Apr 2018 11:46:15 +0800 -Subject: [PATCH] Makefile: check for CONFIG_IXGBEVF instead - -Check for the correct config, otherwise it won't build with kbuild. - -Upstream-Status: Pending - -Signed-off-by: Anuj Mittal ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 968ef5e..e3cb81b 100644 ---- a/Makefile -+++ b/Makefile -@@ -28,7 +28,7 @@ ifneq ($(KERNELRELEASE),) - # Makefile for the Intel(R) 10GbE PCI Express Virtual Function Driver - # - --obj-$(CONFIG_IXGBE) += ixgbevf.o -+obj-$(CONFIG_IXGBEVF) += ixgbevf.o - - define ixgbevf-y - ixgbevf_main.o diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch deleted file mode 100644 index 656a897d..00000000 --- a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9677d09f5c3984997ac8e7d90b5d4b11fb9ce277 Mon Sep 17 00:00:00 2001 -From: sweeaun -Date: Sat, 7 Oct 2017 20:56:35 -0700 -Subject: [PATCH] ixgbevf: skip host depmod - -Upstream-Status: Inappropriate [Cross-Compile] - -Depmod during do_install is irrelevant when cross-compiling. -Remove the depmod steps during do_install. - -Signed-off-by: sweeaun ---- - Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/Makefile b/Makefile -index 91df705..1dcf350 100644 ---- a/Makefile -+++ b/Makefile -@@ -104,8 +104,6 @@ modules_install: default manfile - @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz - @echo "Installing modules..." - @+$(call kernelbuild,modules_install) -- @echo "Running depmod..." -- @$(call cmd_depmod) - - uninstall: - rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko; --- -2.7.4 - diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb deleted file mode 100644 index 2a793508..00000000 --- a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY="ixgbevf kernel driver for Intel Magnolia Park 10GbE" -DESCRIPTION="This virtual function driver supports kernel versions 2.6.x and newer \ -This driver supports 82599, X540, X550, and X552-based virtual function devices \ -that can only be activated on kernels that support SR-IOV. \ -SR-IOV requires the correct platform and OS support. \ -The guest OS loading this driver must support MSI-X interrupts." - -HOMEPAGE = "https://sourceforge.net/projects/e1000/" -SECTION = "kernel/network" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \ - file://0001-ixgbevf-skip-host-depmod.patch \ - file://0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch \ - " - -SRC_URI[md5sum] = "fc53be00bf5e71939a9a39e9802d5b77" -SRC_URI[sha256sum] = "61ac4e93808fa4316b044bae40f2a1dc40e4d9ae9a1785a753cdfc79b515d695" - -S = "${WORKDIR}/${BP}/src" -MODULES_INSTALL_TARGET = "install" - -EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' - -KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbevf" -KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbevf" - -inherit module - -do_install_append () { - # Install scripts/set_irq_affinity - install -d ${D}${sysconfdir}/network - install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network - - rm -rf ${D}${prefix}/man -} - -PACKAGES += "${PN}-script" - -FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity" diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch deleted file mode 100644 index 1d4137ba..00000000 --- a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f69ff2fd27903ee052309179271f708d720a2f94 Mon Sep 17 00:00:00 2001 -From: Mikko Ylinen -Date: Thu, 10 Aug 2017 21:12:51 +0300 -Subject: [PATCH] Makefile.real: skip host install scripts - -The scripts run in install target are relevant (and working) -only if the driver installation is run on the build host. - -Skip the scripts when cross-compiling. - -Upstream-Status: Inappropriate [Cross-Compile] - -Signed-off-by: Mikko Ylinen ---- - Makefile.real | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/Makefile.real b/Makefile.real -index ba09f99..f5075de 100644 ---- a/Makefile.real -+++ b/Makefile.real -@@ -104,11 +104,6 @@ install: modules - @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ - INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \ - modules_install -- @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR) -- @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR) -- @./scripts/check_depmod.sh -- @/sbin/depmod -a -- @./scripts/update-initramfs.sh $(KLIB) - @echo - @echo Your backported driver modules should be installed now. - @echo Reboot. --- -2.1.4 - diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch deleted file mode 100644 index 4fdc36f7..00000000 --- a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch +++ /dev/null @@ -1,87 +0,0 @@ -From ecb29b78ce946c802058be0c46a0d20432f412e5 Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Thu, 28 Sep 2017 10:51:15 -0700 -Subject: [PATCH] hrtimer: fix version numbers because production kernel has - update - -Decrease the version check because the OTC production kernel which is -4.9 includes the HRTimer code that this is using. - -Upstream-Status: [Backport] It's been backported into the older kernel -Signed-off-by: Saul Wold ---- - backport-include/linux/hrtimer.h | 2 +- - drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- - drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +- - drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | 2 +- - net/mac80211/tx.c | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/backport-include/linux/hrtimer.h b/backport-include/linux/hrtimer.h -index bdcf106e1..ae128852d 100644 ---- a/backport-include/linux/hrtimer.h -+++ b/backport-include/linux/hrtimer.h -@@ -4,7 +4,7 @@ - #include_next - #include - --#if LINUX_VERSION_IS_LESS(4,10,0) -+#if LINUX_VERSION_IS_LESS(4,9,0) - static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time, - const enum hrtimer_mode mode) - { -diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c -index cf1f95a01..e6f1ff294 100644 ---- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c -+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c -@@ -1310,7 +1310,7 @@ static void iwl_mvm_tx_lat_add_ts_ack(struct sk_buff *skb) - s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; - s64 diff = temp - ts_1; - --#if LINUX_VERSION_IS_LESS(4,10,0) -+#if LINUX_VERSION_IS_LESS(4,9,0) - skb->tstamp.tv64 += diff; - #else - skb->tstamp += diff; -diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c -index df81bce25..ad664bacd 100644 ---- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c -+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c -@@ -1955,7 +1955,7 @@ static void iwl_trans_pci_tx_lat_add_ts_write(struct sk_buff *skb) - s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; - s64 diff = temp - ts_1; - --#if LINUX_VERSION_IS_LESS(4,10,0) -+#if LINUX_VERSION_IS_LESS(4,9,0) - skb->tstamp.tv64 += diff << 16; - #else - skb->tstamp += diff << 16; -diff --git a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c -index e4d45bcf7..cdd0ba9a2 100644 ---- a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c -+++ b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c -@@ -796,7 +796,7 @@ void iwl_slv_tx_lat_add_ts_write(struct iwl_trans_slv *trans_slv, - - ts_1 = ktime_to_ns(data_entry->skb->tstamp) >> 32; - diff = temp - ts_1; --#if LINUX_VERSION_IS_LESS(4,10,0) -+#if LINUX_VERSION_IS_LESS(4,9,0) - data_entry->skb->tstamp.tv64 += diff << 16; - #else - data_entry->skb->tstamp += diff << 16; -diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c -index 94a348688..0f226c413 100644 ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -2278,7 +2278,7 @@ static void ieee80211_tx_latency_start_msrmnt(struct ieee80211_local *local, - if (!tx_latency && !tx_consec && !tx_thrshld) - return; - temp = ktime_to_ms(ktime_get()); --#if LINUX_VERSION_IS_LESS(4,10,0) -+#if LINUX_VERSION_IS_LESS(4,9,0) - skb->tstamp.tv64 += temp << 32; - #else - skb->tstamp += temp << 32; --- -2.13.5 - diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf deleted file mode 100644 index a0e5f6ff..00000000 --- a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf +++ /dev/null @@ -1,12 +0,0 @@ -# /etc/modprobe.d/iwlwifi.conf -# iwlwifi will dynamically load either iwldvm or iwlmvm depending on the -# microcode file installed on the system. When removing iwlwifi, first -# remove the iwl?vm module and then iwlwifi. -remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211 - -#options iwlwifi lar_disable=1 -#options iwlwifi nvm_file="nvm-sfp-b2-open.bin" -options iwlmvm power_scheme=1 - -# PCI BUS - diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb deleted file mode 100644 index 1453f519..00000000 --- a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "Intel Wireless LinuxCore kernel driver" -DESCRIPTION = "Intel Wireless LinuxCore kernel driver" -SECTION = "kernel" -LICENSE = "GPLv2" - -REQUIRED_DISTRO_FEATURES = "wifi" - -LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -inherit module - -# For some iwfwifi LinuxCore supported wireless chips, the best/latest -# firmware blobs are found in the iwlwifi's linux-firmware.git fork. -# -# See: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release -# -# When updating this recipe, ensure that the proper firmware is included from -# either the linux-firmware or iwlwifi-firmware repos. - -PV = "30" -SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2" - -# Add a patch for Intel's Production Kernel as it's got a backport of HRTimers -PK_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0001-hrtimer-fix-version-numbers-because-production-kerne.patch','',d)}" - -SRC_URI = " \ - git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV} \ - file://0001-Makefile.real-skip-host-install-scripts.patch \ - ${PK_PATCH} \ - file://iwlwifi.conf \ - " - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" - -do_configure() { - CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} -} - -MODULES_INSTALL_TARGET="install" - -do_install_append() { - ## install configs and service scripts - install -d ${D}${sysconfdir}/modprobe.d - install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d -} - -RDEPENDS_${PN} = "linux-firmware-iwlwifi" - -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" - -KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi" - -EXCLUDE_FROM_WORLD = "1" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb deleted file mode 100644 index 6967ec25..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb +++ /dev/null @@ -1,24 +0,0 @@ -require linux-intel.inc - -# Skip processing of this recipe if it is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers, e.g. as dependency of -# core-image-rt-sdk, core-image-rt. -python () { - if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") -} - -KBRANCH = "4.14/preempt-rt" -KMETA_BRANCH = "yocto-4.14" - -# Fix for 32-bit perf issue. Remove when patch is backported to 4.14. -SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch" - -DEPENDS += "elfutils-native openssl-native util-linux-native" - -LINUX_VERSION ?= "4.14.134" -SRCREV_machine ?= "09a421a9b2ba044daf4ab9ea2f54a33cf7a2fac1" -SRCREV_meta ?= "bc35d5bd224ab031440a69f9806d839db382f05c" - -LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb deleted file mode 100644 index edf32af0..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb +++ /dev/null @@ -1,24 +0,0 @@ -require linux-intel.inc - -# Skip processing of this recipe if it is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers, e.g. as dependency of -# core-image-rt-sdk, core-image-rt. -python () { - if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") -} - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -SRC_URI_append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch" - -KBRANCH = "4.19/preempt-rt" -KMETA_BRANCH = "yocto-4.19" - -DEPENDS += "elfutils-native openssl-native util-linux-native" - -LINUX_VERSION ?= "4.19.59" -SRCREV_machine ?= "d6dc301c71aea6098e5e19ef3f265d0ba9981167" -SRCREV_meta ?= "960be4218436fbbb3500e019f7abf02fa94e6aac" - -LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb deleted file mode 100644 index 8f51c087..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb +++ /dev/null @@ -1,20 +0,0 @@ - -require linux-intel.inc - -# Skip processing of this recipe if it is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers, e.g. as dependency of -# core-image-rt-sdk, core-image-rt. -python () { - if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") -} - -KBRANCH = "4.9/yocto/base-rt" -KMETA_BRANCH = "yocto-4.9" - -LINUX_VERSION ?= "4.9.146" -SRCREV_machine ?= "bc2342621494c9c1b28ce29110fb95c80a17a1be" -SRCREV_meta ?= "bae5cc4e973f60baa35ed227ba0c3bdda4d16e87" - -LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc b/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc deleted file mode 100644 index f2ba0d13..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc +++ /dev/null @@ -1,25 +0,0 @@ -require recipes-kernel/linux/linux-yocto.inc -require recipes-kernel/linux/meta-intel-compat-kernel.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-intel:" - -KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}" - -SRC_URI = " \ - git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ - ${KERNEL_CONFIG_URI} \ - " - -SRC_URI_append_core2-32-intel-common = " file://disable_skylake_sound.cfg" - -LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -COMPATIBLE_MACHINE ?= "(intel-corei7-64|intel-core2-32)" - -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch deleted file mode 100644 index a9e9213b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001 -From: Jason Wessel -Date: Thu, 25 Sep 2014 11:26:49 -0700 -Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses - location - -In some cross build environments such as the Yocto Project build -environment it provides an ncurses library that is compiled -differently than the host's version. This causes display corruption -problems when the host's curses includes are used instead of the -includes from the provided compiler are overridden. There is a second -case where there is no curses libraries at all on the host system and -menuconfig will just fail entirely. - -The solution is simply to allow an override variable in -check-lxdialog.sh for environments such as the Yocto Project. Adding -a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing -compiling and linking against the right headers and libraries. - -Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103] - -Signed-off-by: Jason Wessel -cc: Michal Marek -cc: linux-kbuild@vger.kernel.org -Signed-off-by: Bruce Ashfield -Signed-off-by: California Sullivan ---- - scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++ - 1 file changed, 8 insertions(+) - mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh - -diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh -old mode 100755 -new mode 100644 -index 5075ebf2d3b9..ba9242101190 ---- a/scripts/kconfig/lxdialog/check-lxdialog.sh -+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh -@@ -4,6 +4,10 @@ - # What library to link - ldflags() - { -+ if [ "$CROSS_CURSES_LIB" != "" ]; then -+ echo "$CROSS_CURSES_LIB" -+ exit -+ fi - pkg-config --libs ncursesw 2>/dev/null && exit - pkg-config --libs ncurses 2>/dev/null && exit - for ext in so a dll.a dylib ; do -@@ -21,6 +25,10 @@ ldflags() - # Where is ncurses.h? - ccflags() - { -+ if [ x"$CROSS_CURSES_INC" != x ]; then -+ echo "$CROSS_CURSES_INC" -+ exit -+ fi - if pkg-config --cflags ncursesw 2>/dev/null; then - echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' - elif pkg-config --cflags ncurses 2>/dev/null; then --- -2.14.3 - diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch deleted file mode 100644 index 3dc71ff2..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch +++ /dev/null @@ -1,48 +0,0 @@ -From bebd63730a433ba62549a80114a9851328aa8897 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Mon, 2 Jul 2018 23:10:28 -0400 -Subject: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location - -In some cross build environments such as the Yocto Project build -environment it provides an ncurses library that is compiled -differently than the host's version. This causes display corruption -problems when the host's curses includes are used instead of the -includes from the provided compiler are overridden. There is a second -case where there is no curses libraries at all on the host system and -menuconfig will just fail entirely. - -The solution is simply to allow an override variable in -check-lxdialog.sh for environments such as the Yocto Project. Adding -a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing -compiling and linking against the right headers and libraries. - -Signed-off-by: Jason Wessel -cc: Michal Marek -cc: linux-kbuild@vger.kernel.org -Signed-off-by: Bruce Ashfield ---- - scripts/kconfig/mconf-cfg.sh | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh -index c812872d7f9d..42d20819025c 100755 ---- a/scripts/kconfig/mconf-cfg.sh -+++ b/scripts/kconfig/mconf-cfg.sh -@@ -4,6 +4,14 @@ - PKG="ncursesw" - PKG2="ncurses" - -+if [ "$CROSS_CURSES_LIB" != "" ]; then -+ echo libs=\'$CROSS_CURSES_LIB\' -+ if [ x"$CROSS_CURSES_INC" != x ]; then -+ echo cflags=\'$CROSS_CURSES_INC\' -+ fi -+ exit 0 -+fi -+ - if [ -n "$(command -v pkg-config)" ]; then - if pkg-config --exists $PKG; then - echo cflags=\"$(pkg-config --cflags $PKG)\" --- -2.17.1 - diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch deleted file mode 100644 index 5c8b27c7..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 57af599929263e7bb6f2f369c9e4bc1e440528a9 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Mon, 21 Aug 2017 13:52:53 -0400 -Subject: [PATCH 1/1] perf: x86-32: explicitly include - -Upstream-Status: submitted - -The 32bit x86 perf build does not find the system definitions of error -return values, hence we end up with: - -| In file included from util/libunwind/x86_32.c:32:0: -| util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id': -| util/libunwind/../../arch/x86/util/unwind-libunwind.c:109:11: error: 'EINVAL' undeclared (first use in this function); did you mean 'UNW_EINVAL'? -| return -EINVAL; -| ^~~~~~ -| UNW_EINVAL - -By explicitly including errno.h, we can fix this build without impacting -other architectures. - -Signed-off-by: Bruce Ashfield ---- - - tools/perf/util/libunwind/x86_32.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c -index 957ffff72428..d781f7bdeb88 100644 ---- a/tools/perf/util/libunwind/x86_32.c -+++ b/tools/perf/util/libunwind/x86_32.c -@@ -20,6 +20,7 @@ - #define LIBUNWIND__ARCH_REG_IP PERF_REG_X86_IP - #define LIBUNWIND__ARCH_REG_SP PERF_REG_X86_SP - -+#include - #include "unwind.h" - #include "debug.h" - #include "libunwind-x86.h" --- -2.14.3 - diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg b/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg deleted file mode 100644 index b38cf6c2..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# CONFIG_SND_SOC_INTEL_SKYLAKE is not set -# CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set -# CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set -# CONFIG_SND_SOC_INTEL_BXT_TDF8532_MACH is not set -# CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set -# CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set -# CONFIG_SND_SOC_INTEL_CNL_RT274_MACH is not set -# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set -# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set -# CONFIG_SND_SOC_INTEL_CNL_CS42L42_MACH is not set -# CONFIG_SND_SOC_INTEL_CNL_RT700_MACH is not set -# CONFIG_SND_SOC_INTEL_CNL_SVFPGA_MACH is not set diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb deleted file mode 100644 index e00eb88b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb +++ /dev/null @@ -1,22 +0,0 @@ -require linux-intel.inc - -KBRANCH = "4.14/base" -KMETA_BRANCH = "yocto-4.14" - -# Fix for 32-bit perf issue. Remove when patch is backported to 4.14. -SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch \ - file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ - " - -DEPENDS += "elfutils-native openssl-native util-linux-native" - -LINUX_VERSION ?= "4.14.138" -SRCREV_machine ?= "3f695bb28f52f6317f034efbf42b052c66dee0e6" -SRCREV_meta ?= "bc35d5bd224ab031440a69f9806d839db382f05c" - -# For Crystalforest and Romley -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb deleted file mode 100644 index eb2839bb..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb +++ /dev/null @@ -1,21 +0,0 @@ -require linux-intel.inc - -KBRANCH = "4.19/base" -KMETA_BRANCH = "yocto-4.19" - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -SRC_URI_append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch" - -DEPENDS += "elfutils-native openssl-native util-linux-native" - -LINUX_VERSION ?= "4.19.62" -SRCREV_machine ?= "c8c1c2f3f330f4f93279a8ad842f68d40ae6fb3d" -SRCREV_meta ?= "960be4218436fbbb3500e019f7abf02fa94e6aac" - -# For Crystalforest and Romley -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb deleted file mode 100644 index 8b467c4f..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb +++ /dev/null @@ -1,20 +0,0 @@ - -require linux-intel.inc - -KBRANCH = "4.9/yocto/base" -KMETA_BRANCH = "yocto-4.9" - -SRC_URI_append = " \ - file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ - " - -LINUX_VERSION ?= "4.9.195" -SRCREV_machine ?= "f1bbb927291ee709a47bb3124aa53e819e936e7b" -SRCREV_meta ?= "01eb2cf9a6626c65a4c117249d03a002f683222d" - -# For Crystalforest and Romley -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" - -# Functionality flags -KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend deleted file mode 100644 index 6173148c..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend +++ /dev/null @@ -1,21 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" - -COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" -KMACHINE_core2-32-intel-common = "intel-core2-32" -KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" - -COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" -KMACHINE_corei7-64-intel-common = "intel-corei7-64" -KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" - -# NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV -# and setting them here breaks the default mechanism to use AUTOREV if the -# default SRCREV is set and linux-yocto-dev is the preferred provider. - -# For Crystalforest and Romley -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" - -# For FRI2, NUC -KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" -KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend deleted file mode 100644 index daa7dd6b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend +++ /dev/null @@ -1 +0,0 @@ -require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend deleted file mode 100644 index daa7dd6b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend +++ /dev/null @@ -1 +0,0 @@ -require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index 7c29be14..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -# The kernel build is 64-bit regardless, so include both common overrides. -# Without this, the kernel will be missing vars that make it buildable for the -# intel-corei7-64 machine. -MACHINEOVERRIDES_prepend_corei7-64-x32-intel-common = "corei7-64-intel-common:" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend deleted file mode 100644 index daa7dd6b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend +++ /dev/null @@ -1 +0,0 @@ -require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend deleted file mode 100644 index daa7dd6b..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend +++ /dev/null @@ -1 +0,0 @@ -require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc b/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc deleted file mode 100644 index be5056c2..00000000 --- a/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc +++ /dev/null @@ -1,13 +0,0 @@ -# These are variables that should be added to any -# kernel compatible with meta-intel - -KERNEL_FEATURES_INTEL_COMMON ?= "" - -COMPATIBLE_MACHINE_intel-x86-common = "${MACHINE}" -KERNEL_FEATURES_intel-x86-common = "${KERNEL_FEATURES_INTEL_COMMON}" - -KMACHINE_corei7-64-intel-common = "intel-corei7-64" -KMACHINE_core2-32-intel-common = "intel-core2-32" - -INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915" -KERNEL_MODULE_AUTOLOAD_intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}" diff --git a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch deleted file mode 100644 index 32b49b8d..00000000 --- a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ebfdc8b8af17f9cf23c6878eb52476fde7b48e5c Mon Sep 17 00:00:00 2001 -From: Priyalee Kushwaha -Date: Fri, 22 Sep 2017 14:40:57 -0700 -Subject: [PATCH] lttng-modules: PKT 4.9 yocto build failed - -PKT 4.9 yocto kernel backports a patch from upstream and that -changes header include/linux/ktimer.h. Since this backported -patch is only relevant for PKT kernel, we need to carry this -patch. - -Upstream-Status: Backport -Signed-off-by: Kushwaha, Priyalee ---- - instrumentation/events/lttng-module/timer.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h -index d62fd25..59da988 100644 ---- a/instrumentation/events/lttng-module/timer.h -+++ b/instrumentation/events/lttng-module/timer.h -@@ -16,11 +16,11 @@ struct timer_list; - - #endif /* _TRACE_TIMER_DEF_ */ - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) - #define lttng_ktime_get_tv64(kt) (kt) --#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ -+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ - #define lttng_ktime_get_tv64(kt) ((kt).tv64) --#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ -+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ - - LTTNG_TRACEPOINT_EVENT_CLASS(timer_class, - --- -2.7.4 - diff --git a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend deleted file mode 100644 index dc1c4a74..00000000 --- a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" - - -LTTNG_PATCH = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel linux-intel-rt','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}" - -SRC_URI_append_intel-x86-common = " ${LTTNG_PATCH}" - diff --git a/bsp/meta-intel/recipes-multimedia/libva/intel-vaapi-driver_2.2.0.bb b/bsp/meta-intel/recipes-multimedia/libva/intel-vaapi-driver_2.2.0.bb deleted file mode 100644 index 9036f74e..00000000 --- a/bsp/meta-intel/recipes-multimedia/libva/intel-vaapi-driver_2.2.0.bb +++ /dev/null @@ -1,33 +0,0 @@ -SUMMARY = "VA driver for Intel G45 & HD Graphics family" -DESCRIPTION = "intel-vaapi-driver is the VA-API implementation \ -for Intel G45 chipsets and Intel HD Graphics for Intel Core \ -processor family." - -HOMEPAGE = "https://github.com/intel/intel-vaapi-driver" -BUGTRACKER = "https://github.com/intel/intel-vaapi-driver/issues" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" - -COMPATIBLE_HOST = '(i.86|x86_64).*-linux' - -DEPENDS = "libva libdrm" - -SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.bz2" -SRC_URI[md5sum] = "e296c52fa1cb5c3d53a6cc994ce0a66c" -SRC_URI[sha256sum] = "e8a5f54694eb76aad42653b591030b8a53b1513144c09a80defb3d8d8c875c18" - -UPSTREAM_CHECK_URI = "https://github.com/intel/intel-vaapi-driver/releases" - -inherit autotools pkgconfig distro_features_check - -REQUIRED_DISTRO_FEATURES = "opengl" - -PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "opengl wayland", "wayland", "", d)}" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native virtual/egl" - -FILES_${PN} += "${libdir}/dri/*.so" -FILES_${PN}-dev += "${libdir}/dri/*.la" -FILES_${PN}-dbg += "${libdir}/dri/.debug" diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch deleted file mode 100644 index f7de9d16..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch +++ /dev/null @@ -1,96 +0,0 @@ -From f2e6d2ecfea635ab952649156e31ca893d4b1a47 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 12 Aug 2017 08:49:20 -0700 -Subject: [PATCH] Fix build with clang - -Fix errors e.g. -error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] - -and - -psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain] - -Signed-off-by: Khem Raj -Upstream-Status: Pending - ---- - tests/decodehelp.cpp | 2 +- - tests/encodehelp.h | 2 +- - tests/vpp.cpp | 2 +- - tests/yamitranscode.cpp | 2 +- - testscripts/psnr.cpp | 4 ++-- - 5 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp -index b27b977..62cca63 100644 ---- a/tests/decodehelp.cpp -+++ b/tests/decodehelp.cpp -@@ -81,7 +81,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters) - { NULL, no_argument, NULL, 0 } - }; - -- char opt; -+ int opt; - while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){ - switch (opt) { - case 'h': -diff --git a/tests/encodehelp.h b/tests/encodehelp.h -index 63580a4..651ec08 100644 ---- a/tests/encodehelp.h -+++ b/tests/encodehelp.h -@@ -109,7 +109,7 @@ static VideoRateControl string_to_rc_mode(char *str) - - static bool process_cmdline(int argc, char *argv[]) - { -- char opt; -+ int opt; - const struct option long_opts[] = { - { "help", no_argument, NULL, 'h' }, - { "qp", required_argument, NULL, 0 }, -diff --git a/tests/vpp.cpp b/tests/vpp.cpp -index 5a60c0a..52da43b 100644 ---- a/tests/vpp.cpp -+++ b/tests/vpp.cpp -@@ -151,7 +151,7 @@ public: - private: - bool processCmdLine(int argc, char* argv[]) - { -- char opt; -+ int opt; - const struct option long_opts[] = { - { "help", no_argument, NULL, 'h' }, - { "sharpening", required_argument, NULL, 's' }, -diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp -index 6207209..00164ce 100755 ---- a/tests/yamitranscode.cpp -+++ b/tests/yamitranscode.cpp -@@ -100,7 +100,7 @@ static VideoRateControl string_to_rc_mode(char *str) - - static bool processCmdLine(int argc, char *argv[], TranscodeParams& para) - { -- char opt; -+ int opt; - const struct option long_opts[] = { - { "help", no_argument, NULL, 'h' }, - { "qp", required_argument, NULL, 0 }, -diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp -index 5cc24c9..68bd668 100644 ---- a/testscripts/psnr.cpp -+++ b/testscripts/psnr.cpp -@@ -215,14 +215,14 @@ int main(int argc, char *argv[]) - const char* psnrresult = "average_psnr.txt"; - int width=0,height=0; - int standardpsnr = NORMAL_PSNR; -- char opt; -+ int opt; - while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1) - { - switch (opt) { - case 'h': - case '?': - print_help(argv[0]); -- return false; -+ return -1; - case 'i': - filename1 = optarg; - break; diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils_1.3.1.bb b/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils_1.3.1.bb deleted file mode 100644 index ab1b83aa..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami-utils_1.3.1.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Applications and Scripts for libyami." -DESCRIPTION = "Applications and Scripts for libyami." - -HOMEPAGE = "https://github.com/intel/libyami-utils" -BUGTRACKER = "https://github.com/intel/libyami-utils/issues/new" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" - -SRC_URI = "git://github.com/intel/libyami-utils.git \ - file://0001-Fix-build-with-clang.patch \ - " -SRCREV = "7e801b5cc3066b176c2dccffda0af8d762184650" -S = "${WORKDIR}/git" - -DEPENDS = "libva libyami" - -inherit autotools pkgconfig distro_features_check - -REQUIRED_DISTRO_FEATURES = "opengl" - -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" - -# --enable-x11 needs libva-x11 -# gles-tests fail to build without x11: see https://github.com/intel/libyami-utils/issues/91 -PACKAGECONFIG[x11] = "--enable-x11 --enable-egl,--disable-x11 --disable-egl, virtual/libx11" diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch deleted file mode 100644 index a96c9b85..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 17:15:45 -0700 -Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - codecparsers/bitWriter.cpp | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp -index 9bcb14d..08469bf 100644 ---- a/codecparsers/bitWriter.cpp -+++ b/codecparsers/bitWriter.cpp -@@ -24,7 +24,6 @@ - - namespace YamiParser { - --const uint32_t CACHEBYTES = sizeof(unsigned long int); - const uint32_t CACHEBITS = sizeof(unsigned long int) * 8; - - // clip to keep lowest n bits --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch deleted file mode 100644 index a216566c..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 17:29:02 -0700 -Subject: [PATCH 2/9] typecast index from size_t to int - -size_t is not consistent across architectures e.g. on arm its unsigned int - -Fixes -error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - codecparsers/jpegParser.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp -index 2217028..6da5c36 100644 ---- a/codecparsers/jpegParser.cpp -+++ b/codecparsers/jpegParser.cpp -@@ -639,7 +639,7 @@ bool Parser::parseDAC() - - length -= 2; - -- if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) { -+ if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) { - ERROR("Invalid DAC Index"); - return false; - } -@@ -747,7 +747,7 @@ bool Parser::parseDHT() - huffTables = &m_dcHuffTables; - } - -- if (index < 0 || index >= NUM_HUFF_TBLS) { -+ if ((int)index < 0 || index >= NUM_HUFF_TBLS) { - ERROR("Bad Huff Table Index"); - return false; - } --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch deleted file mode 100644 index 17289602..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 17:49:43 -0700 -Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline - -clang++ is fussy about offsetof on non-POD types - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - codecparsers/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am -index 720bf81..d9226b3 100644 ---- a/codecparsers/Makefile.am -+++ b/codecparsers/Makefile.am -@@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \ - -Dvp8dx_start_decode=libyami_vp8dx_start_decode \ - -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \ - -I$(top_srcdir)/interface \ -+ -Wno-invalid-offsetof \ - $(extra_includes) \ - $(NULL) - --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch deleted file mode 100644 index 27eca39b..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 17:57:34 -0700 -Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t - -Fixes - -h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression -of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - codecparsers/h265Parser.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp -index 0dea3a6..c6cded2 100644 ---- a/codecparsers/h265Parser.cpp -+++ b/codecparsers/h265Parser.cpp -@@ -125,7 +125,7 @@ namespace H265 { - \ - CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]); \ - \ -- CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2); \ -+ CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2); \ - } \ - } - --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch deleted file mode 100644 index c9c74520..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 18:38:05 -0700 -Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using - - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - decoder/vaapidecoder_h264.h | 1 + - decoder/vaapidecoder_h265.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h -index 57e2c27..ea5c2f2 100644 ---- a/decoder/vaapidecoder_h264.h -+++ b/decoder/vaapidecoder_h264.h -@@ -30,6 +30,7 @@ namespace YamiMediaCodec { - - class VaapiDecPictureH264; - class VaapiDecoderH264 : public VaapiDecoderBase { -+using YamiMediaCodec::VaapiDecoderBase::createPicture; - public: - typedef SharedPtr PicturePtr; - typedef std::vector RefSet; -diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h -index f7e2303..159e25f 100644 ---- a/decoder/vaapidecoder_h265.h -+++ b/decoder/vaapidecoder_h265.h -@@ -38,6 +38,7 @@ namespace YamiMediaCodec { - - class VaapiDecPictureH265; - class VaapiDecoderH265:public VaapiDecoderBase { -+ using YamiMediaCodec::VaapiDecoderBase::createPicture; - typedef YamiParser::H265::SPS SPS; - typedef YamiParser::H265::SliceHeader SliceHeader; - typedef YamiParser::H265::NalUnit NalUnit; --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch deleted file mode 100644 index b80774c9..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch +++ /dev/null @@ -1,36 +0,0 @@ -From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 18:39:58 -0700 -Subject: [PATCH 7/9] Delete unused variables - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - decoder/vaapidecoder_vp8.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp -index 5fc89ec..ff5b896 100644 ---- a/decoder/vaapidecoder_vp8.cpp -+++ b/decoder/vaapidecoder_vp8.cpp -@@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr; - - // the following parameter apply to Intra-Predicted Macroblocks, - // $11.2 $11.4: key frame default probs --static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; --static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; -+//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; -+//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; - - // $16.1: non-key frame default probs --static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; --static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; -+//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; -+//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; - - static const uint32_t surfaceNumVP8 = 3; - --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch deleted file mode 100644 index 18b98be8..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 18:42:28 -0700 -Subject: [PATCH 8/9] NalUnit is declared in different namespace - -Fixes -vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class [-Werror,-Wmismatched-tags] struct NalUnit; - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - decoder/vaapidecoder_h265.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h -index 159e25f..674638f 100644 ---- a/decoder/vaapidecoder_h265.h -+++ b/decoder/vaapidecoder_h265.h -@@ -29,7 +29,7 @@ namespace YamiParser { - namespace H265 { - struct SPS; - struct SliceHeader; -- struct NalUnit; -+ class NalUnit; - class Parser; - }; - }; --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/bsp/meta-intel/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch deleted file mode 100644 index 08ef455b..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 11 Aug 2017 18:53:06 -0700 -Subject: [PATCH 9/9] Fix clang warnings - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - encoder/vaapiencoder_h264.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp -index 98bc2ed..94015cb 100644 ---- a/encoder/vaapiencoder_h264.cpp -+++ b/encoder/vaapiencoder_h264.cpp -@@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter, - } - /* vcl_hrd_parameters_present_flag */ - bitwriter->writeBits(0, 1); -- if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) { -+ if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) { - /* low_delay_hrd_flag */ - bitwriter->writeBits(0, 1); - } -@@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const - sliceParam->num_macroblocks = curSliceMbs; - sliceParam->macroblock_info = VA_INVALID_ID; - sliceParam->slice_type = h264_get_slice_type (picture->m_type); -- assert (sliceParam->slice_type != -1); -+ assert ((int)sliceParam->slice_type != -1); - sliceParam->idr_pic_id = m_idrNum; - sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt; - --- -2.14.1 - diff --git a/bsp/meta-intel/recipes-multimedia/libyami/libyami_1.3.1.bb b/bsp/meta-intel/recipes-multimedia/libyami/libyami_1.3.1.bb deleted file mode 100644 index 58895c81..00000000 --- a/bsp/meta-intel/recipes-multimedia/libyami/libyami_1.3.1.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Yami is media infrastructure base on libva" -DESCRIPTION = "Yet Another Media Infrastructure \ -light weight hardware codec library base on VA-API " - -HOMEPAGE = "https://github.com/intel/libyami" -BUGTRACKER = "https://github.com/intel/libyami/issues/new" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI = "git://github.com/intel/libyami.git;branch=apache \ - file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \ - file://0002-typecast-index-from-size_t-to-int.patch \ - file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \ - file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \ - file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \ - file://0007-Delete-unused-variables.patch \ - file://0008-NalUnit-is-declared-in-different-namespace.patch \ - file://0009-Fix-clang-warnings.patch \ -" -SRCREV = "fb48083de91f837ddbf599dd4b5ad1eb1239e1cf" -S = "${WORKDIR}/git" - -PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" - -DEPENDS = "libva" -inherit autotools pkgconfig distro_features_check - -REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/bsp/meta-intel/recipes-rt/images/core-image-rt-sdk.bb b/bsp/meta-intel/recipes-rt/images/core-image-rt-sdk.bb deleted file mode 100644 index 920c4cee..00000000 --- a/bsp/meta-intel/recipes-rt/images/core-image-rt-sdk.bb +++ /dev/null @@ -1,20 +0,0 @@ -require recipes-core/images/core-image-minimal.bb - -# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers. -python () { - if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") -} - -DESCRIPTION = "Small image capable of booting a device with a test suite and \ -tools for real-time use. It includes the full meta-toolchain, development \ -headers and libraries to form a standalone SDK." -DEPENDS += "linux-intel-rt" - -IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" - -IMAGE_INSTALL += "rt-tests hwlatdetect kernel-dev" - -LICENSE = "MIT" diff --git a/bsp/meta-intel/recipes-rt/images/core-image-rt.bb b/bsp/meta-intel/recipes-rt/images/core-image-rt.bb deleted file mode 100644 index 1578c9e6..00000000 --- a/bsp/meta-intel/recipes-rt/images/core-image-rt.bb +++ /dev/null @@ -1,17 +0,0 @@ -require recipes-core/images/core-image-minimal.bb - -# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the -# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying -# to build multiple virtual/kernel providers. -python () { - if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": - raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") -} - -DESCRIPTION = "A small image just capable of allowing a device to boot plus a \ -real-time test suite and tools appropriate for real-time use." -DEPENDS += "linux-intel-rt" - -IMAGE_INSTALL += "rt-tests hwlatdetect" - -LICENSE = "MIT" diff --git a/bsp/meta-intel/recipes-selftest/images/files/incorrect.crt b/bsp/meta-intel/recipes-selftest/images/files/incorrect.crt deleted file mode 100644 index 3a2411ab..00000000 --- a/bsp/meta-intel/recipes-selftest/images/files/incorrect.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDCTCCAfGgAwIBAgIJAIYXAHv3cQNjMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV -BAMMEFRlc3QgWW9jdG8gdGhpbmcwHhcNMTcwMTI1MjI1MjI3WhcNMTgwMTI1MjI1 -MjI3WjAbMRkwFwYDVQQDDBBUZXN0IFlvY3RvIHRoaW5nMIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXD -SwDVXNWfiKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoeh -T51gkuTfv7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE -31hLOkCFb+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk -/6q5kqNhyrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4 -GqpqeFOPqxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABo1AwTjAdBgNV -HQ4EFgQURA8KbgpiGfS2+7MT0H5AvpxeYLowHwYDVR0jBBgwFoAURA8KbgpiGfS2 -+7MT0H5AvpxeYLowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAK9n+ -9T+hlM2kEpsUgtyihEJbGHzbw+Pj11b0ICntCVuPKewtBMveYp8lejrQwMFNGRMt -ZQe1LFb9HcLeM3MLUz9Lm4BJIjkey3Jfq1AskROYk/bJnFIJIx6P3U9gBa20P46X -LH3g6yub1HR7KZC9nfBsak3FPoJR/SYTJs0HsMeL4878+2IbETA4BL0kbKW48FFW -jF4f6don0eiaF8b4KkfbWKrCaEm+LMxbyBEQ6fIb1cmGY8A9A5houjmgi6YWSkoi -SLpOC9TZ2R51fO9rRsv7XwLK0V9o9YaEYPBg6V/TeJl5nxAZBeVTKVTQbBGZY+l2 -nzN0pKsl7RXLf3SRYA== ------END CERTIFICATE----- diff --git a/bsp/meta-intel/recipes-selftest/images/files/incorrect.key b/bsp/meta-intel/recipes-selftest/images/files/incorrect.key deleted file mode 100644 index d05475b6..00000000 --- a/bsp/meta-intel/recipes-selftest/images/files/incorrect.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXDSwDVXNWf -iKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoehT51gkuTf -v7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE31hLOkCF -b+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk/6q5kqNh -yrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4GqpqeFOP -qxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABAoIBAQCEtAox86s9N6d2 -164z3998Zmj3UyL+7K9x6JI2YvMabBSYGOeaLOLRj6fjQxdC63H8brBM958p4di7 -Z82XMco4Dok6yoOeJ+hMLYv+gfGvTJxy7DhyVXsSwok99axg9vUsV3TYw3wSdpNF -EKLkcUldpu0W2ADBHUr4sLI85xctHH3Kt0sNDzhgADFa5rDYACXTKHtFOhEqBIwN -FmbuRQirnErUkI3Pczgl2Xy1MlaozH9CB+bLAb5q2FYu4DKgjl4UorC+w2HV41KH -XoL7L36XXqLRHBfEAwOWb8yro+TK8T7gW7aagTI1wgsbbQkjQmOHxclmJACdMOiJ -DjPeR0GBAoGBAO7i2eaEoKa9QlKokN+93uOJD/F6DBi6jF0vGOqWlF8AVTj3kGL3 -X8fY/avrSlg7hKZWdei+Q5PyZViKxqmHjq781ZisKck52Tqz4s7ylqRXSgStinZr -UqrkShCqZ3g1W91gIeVPQz0/b+gBskoHzQ5WQHfV5v9S1PaxjzcYtCrRAoGBAMea -LcA2jjuEjqxa5v5fh8ygcHasJMRKJxW1OCKiQ94DjjzPsdVqZ1sJZChLW/N3nxe7 -wHlNJmsGbJ2w1zD5+qkkPjLq5Q4B5KAd62NNrWaEHFdEc/PPkn4xP7Zkfuu5K+m2 -7z/MF4ibvVh9PvD3HY8FWKEtkqB4rfD8AoUOVd4ZAoGAXxXAsfa8k2Hl0kzyTXyg -CWV3CSERS46FbFngyw9gw2e4hFJWEG5ym3ONlS60iuY16JelmxyQfYUQPewPI0+n -xZMx2fE9OLFj+++6KbF5sLRl6/K/mF8jqo3vxS5uvPRQOo+XLlUcaHalrm1ub/Um -87v1MT3dEmgACKmoXb/hhuECgYAZluiapePiOYJZEmZe4jx0vXTtofAswhz0qYEC -3663vdj0buQrqjKJ91BB4jdtpT5eOpHYe02blv1B0jQkcUfze1QGDxtCineXF37g -Aktiwzkm7v22mjv7tbCnX4buDZVVp0BQ+4dg2iaSO6xgFC5T8amFMGSF8jLKnGRu -ToIvsQKBgADBTse2vnI85NRsYq48ztQuIU2zlGXIAcoPSvGb8Vhty/joc0jWcI5P -raGXBARbuVlcEapK3mDRfO0CQjDaTPK4EYYJwGp8k33Hkkcbgs4kfm308jRsclMr -YeMwQsYyOv45x4iPCwrqZEhpPDvACBi7DB6QvZ0++vJbobTt1jyi ------END RSA PRIVATE KEY----- diff --git a/bsp/meta-intel/recipes-selftest/images/files/refkit-db.crt b/bsp/meta-intel/recipes-selftest/images/files/refkit-db.crt deleted file mode 100644 index 22ad6a89..00000000 --- a/bsp/meta-intel/recipes-selftest/images/files/refkit-db.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC+zCCAeOgAwIBAgIJANT2SMJoGZGsMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV -BAMMCXJlZmtpdC1kYjAeFw0xNzA0MjAxMjA2MzJaFw0xODA0MjAxMjA2MzJaMBQx -EjAQBgNVBAMMCXJlZmtpdC1kYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBALQcIqYiAVfN8U+vcuPZAYBQVe8CXuuZNct/Knn/tT7sXZIGMCDnla2khC4/ -+tdG3Umo6ON5SfaPCx3+Y6jRY6PWDU5sZlzWZibRJpjUT3bJZUhYEwgxvOVHJWWV -OYlfAvHFBhdYygn99h7Fl9qjThpIvs+WJwRLt21ntlAYBHNR0mot3zur8i2V16i4 -qDChq4uSK2A+OuWGQHHBPy0ukOfW7MzCC3mDcW32o6lMzUaB3O/sUb6BKvF4c0Hb -VM58zqLjkE9FGvk9iPwO7dNpIkz6CmnRSMCqqTqzjxA6dqgMej3Yec4clmL0Bu5H -6OBpka7qNM/aqLQ5XvN60IhIR2kCAwEAAaNQME4wHQYDVR0OBBYEFGhgESWFFHgb -Gp9GEuYh5O/7O6rdMB8GA1UdIwQYMBaAFGhgESWFFHgbGp9GEuYh5O/7O6rdMAwG -A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI/ShHxDR8pr/YeD0O910yBS -cxiqMnH7pfTJEaNoTbed5tlGJNzHwjv5sJj87jRuEJs9RG4zCRG4KdYtBs9nj5aF -nWNyv2RfDePJYxlx1H1MnHdG2iCXbbzdwh/zQDge58xVBXK6JE+zipMMMGDan281 -9vuwH7MA3cSmvOI3waPv2aGG+eukpUU4/06HSkHPbml+l74tIryNoBohj0tykAFc -uqWcLdclJPz/XFgURjAJfFVkgwu5388l7uz3y9vRW5OTyIoQRriwNRxsDY8Dao8b -NmjzU4k2WyGA3uOSUpSXnUmJfT7eKVG6Efe6Afer6sGnLqNNZf1AcfHiP2woy9M= ------END CERTIFICATE----- diff --git a/bsp/meta-intel/recipes-selftest/images/files/refkit-db.key b/bsp/meta-intel/recipes-selftest/images/files/refkit-db.key deleted file mode 100644 index 4b54587e..00000000 --- a/bsp/meta-intel/recipes-selftest/images/files/refkit-db.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0HCKmIgFXzfFP -r3Lj2QGAUFXvAl7rmTXLfyp5/7U+7F2SBjAg55WtpIQuP/rXRt1JqOjjeUn2jwsd -/mOo0WOj1g1ObGZc1mYm0SaY1E92yWVIWBMIMbzlRyVllTmJXwLxxQYXWMoJ/fYe -xZfao04aSL7PlicES7dtZ7ZQGARzUdJqLd87q/ItldeouKgwoauLkitgPjrlhkBx -wT8tLpDn1uzMwgt5g3Ft9qOpTM1Ggdzv7FG+gSrxeHNB21TOfM6i45BPRRr5PYj8 -Du3TaSJM+gpp0UjAqqk6s48QOnaoDHo92HnOHJZi9AbuR+jgaZGu6jTP2qi0OV7z -etCISEdpAgMBAAECggEAbtXplKbUgL4hQ9JKN2Cxhc7qMv0YgI92BVaqQw1S8ffu -1Q+tynH5MDRPi06gBJ59SvkA6AsZsvrv8nM7zQWd9ZKh+aLHk1X04upOgDoW9JiX -FV/txlslTUrs/ohIMfsgCrweNXvUSTXZobIi8s8QHyipE4HpXMFjjZYHIV7GTlgA -PRgGu3NygbWfR8hcx5JtzVz/jka7FFFSbk/pMr0TeJHXP55VfqWLeeSBQmWwooj2 -QcRfqMXgLKgu6uEggaP5HMcfTuWgWNhbke/596CgsUtQ5Gg64Q6v7cKcPy0/lgn1 -PnvfT9uhgEFDLNFkSBxV3ImrNYo73Nqmbp3w5tK9SQKBgQDs/HW7pNnB0LD51qok -pkX0SBvyKxDT1QuU4z0FY9GT7OKOg8Xa0ZGyErt+ZbyFiyUGF5Axc3rJ3DyGslgu -5O+AqcpCQOlOyovGQ6ST9x/gEeVcRnZn1MV4vMxwaOSXtY7u0IGyaDlFn1QWHWCN -imv8OR6YuhivwBIXGzJ16oEqDwKBgQDCj3ls7tlPrLvUQIh8gfjCoInU8fRAqtAe -Ab/OximLsKQPKLDma6xd+X2Fk8Dowdb88GNT99x3VZjHqVJM9URDkiOGKAXA/rBp -jAXhnQwahT8YCzOUHqDYNMMQrXHvbiHqLodGrrO2WjYNmH69prQAk8WYAIwl+hdx -BS70LGLPBwKBgQDU9RinAkBcFjiyieBjBreeCJ50Q5bfhHbf2EOhcE2IbDo6bteB -Bwmxx3uM3cdHCf6/NrVweqFAfBQ3xlPP8BH4wJrsZoBBOWnZRDfEbzHJnMtK3FbS -fzTkhmQAL4Ibgh9rIxspQtcUZVSees+k4VqgUIPaIoDEjgizktEJfS2MqQKBgQDA -rOFtVaRz2PYyHq6LzxMRe3bEIdDn8cEk1kqjdW9TXV07feqiZmNOtXLvRAG4/63u -1Akp8L6ul2Az6qUMfaBa4nC3vQ7lr9P40qhIZATGhsqS/xTXTPWw55999qZsnL6N -cgKZpw1mOzRohmqNWnfMUotOGsywF1n7nUyAlyxLJQKBgElTaNTFYF3MbGfhl1He -fnDXlf8OCOK1i5oIzMLqverb2UN/qp6p0b3SAtcw5cUXcaPlajHrfYgacF/0Qyua -Cerey9GLEdJ7saDWhz0GyJ8yyEXy8CVs0svVaLPWI0s2B7/obzP9+gTb/WE9qZqu -bNoVEpJ/wZhk+IL4+KPmqphu ------END PRIVATE KEY----- diff --git a/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-signed.bb b/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-signed.bb deleted file mode 100644 index 3ce11f32..00000000 --- a/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-signed.bb +++ /dev/null @@ -1,6 +0,0 @@ -require secureboot-selftest-image-unsigned.bb - -IMAGE_FEATURES += "secureboot" - -SECURE_BOOT_SIGNING_KEY ?= "${THISDIR}/files/refkit-db.key" -SECURE_BOOT_SIGNING_CERT ?= "${THISDIR}/files/refkit-db.crt" diff --git a/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-unsigned.bb deleted file mode 100644 index e03e7b47..00000000 --- a/bsp/meta-intel/recipes-selftest/images/secureboot-selftest-image-unsigned.bb +++ /dev/null @@ -1,20 +0,0 @@ -require recipes-core/images/core-image-minimal.bb - -DEPENDS_remove = "grub-efi" - -inherit uefi-comboapp - -WKS_FILE = "generic-bootdisk.wks.in" - -do_uefiapp_deploy_append() { - for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do - target=`basename $i` - target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` - - cat > ${IMAGE_ROOTFS}/boot/startup.nsh << EOF -$target -reset -EOF - break - done -} diff --git a/bsp/meta-intel/recipes-support/sbsigntool/sbsigntool-native_git.bb b/bsp/meta-intel/recipes-support/sbsigntool/sbsigntool-native_git.bb deleted file mode 100644 index 430a6a78..00000000 --- a/bsp/meta-intel/recipes-support/sbsigntool/sbsigntool-native_git.bb +++ /dev/null @@ -1,77 +0,0 @@ -DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" -LICENSE = "GPLv3 & LGPL-2.1 & LGPL-3.0 & MIT" - -# sbsigntool statically links to libccan.a which is built with modules -# passed to "create-ccan-tree" (and their dependencies). Therefore, -# we also keep track of all the ccan module licenses. -LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ - file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ - file://lib/ccan.git/ccan/endian/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/htable/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/list/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/read_write_all/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/talloc/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/typesafe_cb/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ - file://lib/ccan.git/ccan/failtest/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://lib/ccan.git/ccan/tlist/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ - file://lib/ccan.git/ccan/time/LICENSE;md5=838c366f69b72c5df05c96dff79b35f2 \ -" - -# The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has -# not been maintained and many patches have been backported in this repo. -SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools \ - git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan \ - " - -SRCREV_sbsigntools ?= "efbb550858e7bd3f43e64228d22aea440ef6a14d" -SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" -SRCREV_FORMAT = "sbsigntools_ccan" - -DEPENDS = "binutils-native gnu-efi-native help2man-native openssl10-native util-linux-native" - -PV = "0.8-git${SRCPV}" - -S = "${WORKDIR}/git" - -inherit native autotools pkgconfig - -do_configure_prepend() { - cd ${S} - - if [ ! -e lib/ccan ]; then - - # Use empty SCOREDIR because 'make scores' is not run. - # The default setting depends on (non-whitelisted) host tools. - sed -i -e 's#^\(SCOREDIR=\).*#\1#' lib/ccan.git/Makefile - - lib/ccan.git/tools/create-ccan-tree \ - --build-type=automake lib/ccan \ - talloc read_write_all build_assert array_size endian - fi - - # Create generatable docs from git - ( - echo "Authors of sbsigntool:" - echo - git log --format='%an' | sort -u | sed 's,^,\t,' - ) > AUTHORS - - # Generate simple ChangeLog - git log --date=short --format='%ad %t %an <%ae>%n%n * %s%n' > ChangeLog - - cd ${B} -} - -def efi_arch(d): - import re - harch = d.getVar("HOST_ARCH") - if re.match("i[3456789]86", harch): - return "ia32" - return harch - -EXTRA_OEMAKE = "\ - INCLUDES+='-I${S}/lib/ccan.git/ \ - -I${STAGING_INCDIR_NATIVE}/efi \ - -I${STAGING_INCDIR_NATIVE} \ - -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ - " diff --git a/bsp/meta-intel/wic/core-image-tiny.wks.in b/bsp/meta-intel/wic/core-image-tiny.wks.in deleted file mode 100644 index b0decae6..00000000 --- a/bsp/meta-intel/wic/core-image-tiny.wks.in +++ /dev/null @@ -1,14 +0,0 @@ -# short-description: Create an EFI disk image with systemd-boot and corei7-64/core2-32 -# long-description: Creates a partitioned EFI disk image that the user -# can directly dd to boot media. The selected bootloader is systemd-boot. -# This disk image is meant to be used by corei7-64/core2-32 and core-image-tiny-initramfs - -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-${MACHINE}.cpio.gz" --ondisk sda --label msdos --active --align 1024 - -bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5" - -# Some devices require different console parameters, the console parameter can be given repeatedly, input is taken -# only from the last listed console, for example on the Minnowboard MAX, the previously listed setting would show -# a login prompt on its video output and not on the serial terminal. -# -# See http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html diff --git a/bsp/meta-intel/wic/generic-bootdisk.wks.in b/bsp/meta-intel/wic/generic-bootdisk.wks.in deleted file mode 100644 index 31c708bc..00000000 --- a/bsp/meta-intel/wic/generic-bootdisk.wks.in +++ /dev/null @@ -1,6 +0,0 @@ -# based off of refkit's refkit-directdisk.wks.in kickstart template -# uses the image's boot directory to populate a vfat boot partition, -# which works with EFI. -bootloader --ptable gpt -part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label msdos --active --align 1024 --use-uuid -part / --source rootfs --fstype=ext4 --label root --align 1024 --uuid ${DISK_SIGNATURE_UUID} diff --git a/bsp/meta-intel/wic/grub-bootdisk-microcode.wks b/bsp/meta-intel/wic/grub-bootdisk-microcode.wks deleted file mode 100644 index 7eda3766..00000000 --- a/bsp/meta-intel/wic/grub-bootdisk-microcode.wks +++ /dev/null @@ -1,12 +0,0 @@ -# short-description: Create an EFI disk image with grub-efi -# long-description: Creates a partitioned EFI disk image that the user -# can directly dd to boot media. The selected bootloader is grub-efi. -# It also includes intel-microcode as an initrd for early update support. - -part /boot --source bootimg-efi --sourceparams="loader=grub-efi,initrd=microcode.cpio" --ondisk sda --label msdos --active --align 1024 --use-uuid - -part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid - -part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid - -bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0" diff --git a/bsp/meta-intel/wic/systemd-bootdisk-microcode.wks b/bsp/meta-intel/wic/systemd-bootdisk-microcode.wks deleted file mode 100644 index c171fd8e..00000000 --- a/bsp/meta-intel/wic/systemd-bootdisk-microcode.wks +++ /dev/null @@ -1,13 +0,0 @@ -# short-description: Create an EFI disk image with systemd-boot -# long-description: Creates a partitioned EFI disk image that the user -# can directly dd to boot media. The selected bootloader is systemd-boot. -# It also includes intel-microcode as an initrd for early update support. -# Based on OE-core's systemd-bootdisk.wks file. - -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label msdos --active --align 1024 --use-uuid - -part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid - -part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid - -bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0" diff --git a/bsp/meta-qcom/conf/layer.conf b/bsp/meta-qcom/conf/layer.conf index 57ddb93a..5f3db02c 100644 --- a/bsp/meta-qcom/conf/layer.conf +++ b/bsp/meta-qcom/conf/layer.conf @@ -8,9 +8,11 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "qcom" BBFILE_PATTERN_qcom := "^${LAYERDIR}/" BBFILE_PRIORITY_qcom = "5" -LAYERSERIES_COMPAT_qcom = "sumo thud" +LAYERSERIES_COMPAT_qcom = "dunfell" BBFILES_DYNAMIC += " \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ " diff --git a/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf b/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf index 859bbfd7..8d732ed3 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf @@ -15,7 +15,6 @@ RDEPENDS_kernel-base = "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-dragonboard410c \ " diff --git a/bsp/meta-qcom/conf/machine/dragonboard-410c.conf b/bsp/meta-qcom/conf/machine/dragonboard-410c.conf index c8e7fc5d..6ecfc60e 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-410c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-410c.conf @@ -3,7 +3,7 @@ #@DESCRIPTION: Machine configuration for the DragonBoard 410c (96boards), with Qualcomm Snapdragon 410 APQ8016. require conf/machine/include/qcom-apq8016.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/tune-cortexa53.inc MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" @@ -14,13 +14,13 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a3xx mesa-driver-msm', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-dragonboard410c \ + linux-firmware-qcom-venus-1.8 \ " -QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p10" +QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p14" # Define rootfs partiton (kernel argument) SD_QCOM_BOOTIMG_ROOTFS ?= "mmcblk1p7" diff --git a/bsp/meta-qcom/conf/machine/dragonboard-820c.conf b/bsp/meta-qcom/conf/machine/dragonboard-820c.conf index 8e3670e8..347d2e10 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-820c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-820c.conf @@ -14,8 +14,9 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ firmware-qcom-dragonboard820c \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a530 mesa-driver-msm', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k', '', d)} \ + linux-firmware-qcom-venus-4.2 \ " QCOM_BOOTIMG_ROOTFS ?= "sda1" diff --git a/bsp/meta-qcom/conf/machine/dragonboard-845c.conf b/bsp/meta-qcom/conf/machine/dragonboard-845c.conf index 8cd10d41..b9dde332 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-845c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-845c.conf @@ -12,13 +12,17 @@ KERNEL_DEVICETREE ?= "qcom/sdm845-db845c.dtb" SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + firmware-qcom-dragonboard845c \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k linux-firmware-qcom-sdm845-modem', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca linux-firmware-qcom-sdm845-modem', '', d)} \ + linux-firmware-qcom-sdm845-audio \ + linux-firmware-qcom-sdm845-compute \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a630 mesa-driver-msm', '', d)} \ " -# XXX: The sda10 is userdata we need to create an Linux gpt to have more space -# and use rootfs -QCOM_BOOTIMG_ROOTFS ?= "sda10" +# /dev/sda1 is 'rootfs' partition after installing the latest bootloader package from linaro +QCOM_BOOTIMG_ROOTFS ?= "sda1" # UFS partitions setup with 4096 logical sector size EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf b/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf new file mode 100644 index 00000000..9664bed8 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@NAME: evb4k-qcs404 +#@DESCRIPTION: Machine configuration for the EVB-4K QCS404 with Qualcomm QCS404. + +require conf/machine/include/qcom-qcs404.inc +require conf/machine/include/tune-cortexa53.inc + +MACHINE_FEATURES = "usbhost usbgadget ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/qcs404-evb-4000.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ +" + +QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p27" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc b/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc index bd861ae3..2688b203 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc @@ -23,16 +23,17 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ - qrtr-apps \ + qrtr \ rmtfs \ " +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + # Fastboot expects an ext4 image, which needs to be 4096 aligned IMAGE_FSTYPES ?= "ext4.gz" IMAGE_ROOTFS_ALIGNMENT = "4096" QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" QCOM_BOOTIMG_PAGE_SIZE ?= "2048" - -KERNEL_MODULE_PROBECONF += "qcom_q6v5_pil" -module_conf_qcom_q6v5_pil = "blacklist qcom_q6v5_pil" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc b/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc index b50cf8d8..3a6a08b9 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc @@ -1,6 +1,6 @@ SOC_FAMILY = "apq8096" require conf/machine/include/soc-family.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/arm/arch-armv8a.inc XSERVER_OPENGL ?= " \ xf86-video-modesetting \ @@ -24,10 +24,14 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ - qrtr-apps \ + qrtr \ rmtfs \ " +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + # Fastboot expects an ext4 image, which needs to be 4096 aligned IMAGE_FSTYPES ?= "ext4.gz" IMAGE_ROOTFS_ALIGNMENT = "4096" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc b/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc new file mode 100644 index 00000000..9c556d37 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc @@ -0,0 +1,16 @@ +SOC_FAMILY = "qcs404" +require conf/machine/include/soc-family.inc +require conf/machine/include/arm/arch-armv8a.inc + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + qrtr \ +" + +# Fastboot expects an ext4 image, which needs to be 4096 aligned +IMAGE_FSTYPES ?= "ext4.gz" +IMAGE_ROOTFS_ALIGNMENT = "4096" + +QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" +QCOM_BOOTIMG_PAGE_SIZE ?= "4096" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc b/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc index 4e2ab05b..e3839b13 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc @@ -1,6 +1,6 @@ SOC_FAMILY = "sdm845" require conf/machine/include/soc-family.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/arm/arch-armv8a.inc XSERVER_OPENGL ?= " \ xf86-video-modesetting \ @@ -24,6 +24,14 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + pd-mapper \ + qrtr \ + rmtfs \ + tqftpserv \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ " IMAGE_FSTYPES ?= "ext4.gz" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc b/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc new file mode 100644 index 00000000..5039ba0d --- /dev/null +++ b/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc @@ -0,0 +1,41 @@ +SOC_FAMILY = "sm8250" +require conf/machine/include/soc-family.inc +require conf/machine/include/arm/arch-armv8a.inc + +XSERVER_OPENGL ?= " \ + xf86-video-modesetting \ + xserver-xorg-extension-glx \ +" + +XSERVER ?= " \ + xserver-xorg \ + xserver-xorg-module-libint10 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ +" + +PREFERRED_PROVIDER_virtual/egl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + pd-mapper \ + qrtr \ + rmtfs \ + tqftpserv \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + +IMAGE_FSTYPES ?= "ext4.gz" +IMAGE_ROOTFS_ALIGNMENT = "4096" + +QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" +QCOM_BOOTIMG_PAGE_SIZE ?= "4096" diff --git a/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf b/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf new file mode 100644 index 00000000..447c8897 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@NAME: RB5 Robotics platform +#@DESCRIPTION: Machine configuration for the RB5 development board, with Qualcomm Snapdragon 865 QRB5165. + +require conf/machine/include/qcom-sm8250.inc + +MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/qrb5165-rb5.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ +" +# linux-firmware-qcom-adreno-a650 + +# /dev/sda15 is 'userdata' partition, so wipe it and use for our build +QCOM_BOOTIMG_ROOTFS ?= "sda15" + +# UFS partitions setup with 4096 logical sector size +EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/conf/machine/sd-600eval.conf b/bsp/meta-qcom/conf/machine/sd-600eval.conf index f7da0720..f4ed1cb2 100644 --- a/bsp/meta-qcom/conf/machine/sd-600eval.conf +++ b/bsp/meta-qcom/conf/machine/sd-600eval.conf @@ -9,7 +9,6 @@ MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" MACHINE_EXTRA_RRECOMMENDS = " \ kernel-modules \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-sd-600eval \ " diff --git a/bsp/meta-qcom/conf/machine/sm8250-mtp.conf b/bsp/meta-qcom/conf/machine/sm8250-mtp.conf new file mode 100644 index 00000000..d5f7eeee --- /dev/null +++ b/bsp/meta-qcom/conf/machine/sm8250-mtp.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@NAME: SM8250-MTP +#@DESCRIPTION: Machine configuration for the SM8250-MTP development board, with Qualcomm Snapdragon 865 SM8250. + +require conf/machine/include/qcom-sm8250.inc + +MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/sm8250-mtp.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ +" +# linux-firmware-qcom-adreno-a650 + +# /dev/sda15 is 'userdata' partition, so wipe it and use for our build +QCOM_BOOTIMG_ROOTFS ?= "sda15" + +# UFS partitions setup with 4096 logical sector size +EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend b/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend new file mode 100644 index 00000000..bd946f87 --- /dev/null +++ b/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend @@ -0,0 +1,5 @@ +PACKAGE_INSTALL += " \ + iperf2 \ + iperf3 \ + tcpdump \ +" diff --git a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb new file mode 100644 index 00000000..9376de1a --- /dev/null +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb @@ -0,0 +1,30 @@ +SUMMARY = "Basic X11 graphics image" + +IMAGE_FEATURES += "splash package-management debug-tweaks ssh-server-openssh hwcodecs x11 tools-debug" + +LICENSE = "MIT" + +inherit core-image features_check extrausers + +# let's make sure we have a good image.. +REQUIRED_DISTRO_FEATURES = "x11" + +# make sure we boot to desktop +# by default and without x11-base in IMAGE_FEATURES we default to multi-user.target +SYSTEMD_DEFAULT_TARGET = "graphical.target" + +CORE_IMAGE_BASE_INSTALL += " \ + alsa-utils-aplay \ + coreutils \ + glmark2 \ + gptfdisk \ + gstreamer1.0-plugins-bad-meta \ + gstreamer1.0-plugins-base-meta \ + gstreamer1.0-plugins-good-meta \ + gtkperf \ + kernel-modules \ + kmscube \ + mesa-demos \ + openbox \ + rsync \ +" diff --git a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch index aae427e5..15c5c469 100644 --- a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch @@ -1,7 +1,10 @@ -From 4854806fdbd53b4b25d18f966f273c8f32d57c35 Mon Sep 17 00:00:00 2001 +From fd6199f456c7c5dcb4cb782e4af63111d22079bf Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Wed, 4 Apr 2018 04:29:09 +0000 Subject: [PATCH] Introduce Qualcomm PDS service support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit The Qualcomm PDS service provides location data on a wide range of Qualcomm platforms. It used QMI encoded messages sent over a shared @@ -28,32 +31,33 @@ a numerical identifier of the node in the AF_QIPCRTR network or the string "any". Signed-off-by: Bjorn Andersson +Signed-off-by: Aníbal Limón --- SConstruct | 10 ++ - driver_pds.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++ + driver_pds.c | 325 +++++++++++++++++++++++++++++++++++++++++++++++++ driver_pds.h | 20 +++ drivers.c | 5 + - gpsd.h | 20 ++- - libgpsd_core.c | 15 +- - 6 files changed, 424 insertions(+), 7 deletions(-) + gpsd.h | 2 + + libgpsd_core.c | 15 ++- + 6 files changed, 376 insertions(+), 1 deletion(-) create mode 100644 driver_pds.c create mode 100644 driver_pds.h diff --git a/SConstruct b/SConstruct -index d9d75653..6f53fef3 100644 +index 5160481a7..31545b07f 100644 --- a/SConstruct +++ b/SConstruct -@@ -155,6 +155,7 @@ boolopts = ( +@@ -191,6 +191,7 @@ boolopts = ( + ("tripmate", True, "DeLorme TripMate support"), + ("tsip", True, "Trimble TSIP support"), ("ublox", True, "u-blox Protocol support"), - ("fury", True, "Jackson Labs Fury and Firefly support"), - ("nmea2000", True, "NMEA2000/CAN support"), + ("pds", True, "Qualcomm PDS support"), # Non-GPS protocols ("aivdm", True, "AIVDM support"), ("gpsclock", True, "GPSClock support"), -@@ -778,6 +779,14 @@ else: +@@ -923,6 +924,14 @@ else: announce("You do not have kernel CANbus available.") - env["nmea2000"] = False + config.env["nmea2000"] = False + if config.CheckHeader(["bits/sockaddr.h", "linux/qrtr.h"]): + confdefs.append("#define HAVE_LINUX_QRTR_H 1\n") @@ -65,21 +69,21 @@ index d9d75653..6f53fef3 100644 + # check for C11 or better, and __STDC__NO_ATOMICS__ is not defined # before looking for stdatomic.h - if ((config.CheckC11() -@@ -1121,6 +1130,7 @@ libgpsd_sources = [ + if ((config.CheckC11() and +@@ -1295,6 +1304,7 @@ libgpsd_sources = [ "driver_nmea0183.c", "driver_nmea2000.c", "driver_oncore.c", + "driver_pds.c", "driver_rtcm2.c", "driver_rtcm3.c", - "driver_sirf.c", + "drivers.c", diff --git a/driver_pds.c b/driver_pds.c new file mode 100644 -index 00000000..62464323 +index 000000000..7fe9e5339 --- /dev/null +++ b/driver_pds.c -@@ -0,0 +1,361 @@ +@@ -0,0 +1,325 @@ +#include +#include +#include @@ -94,43 +98,7 @@ index 00000000..62464323 +#include + +#define QMI_PDS_SERVICE_ID 0x10 -+#define QMI_PDS_INSTANCE_ID 0x2 -+ -+#ifndef QRTR_PORT_CTRL -+#define QRTR_PORT_CTRL 0xfffffffeu -+ -+enum qrtr_pkt_type { -+ QRTR_TYPE_DATA = 1, -+ QRTR_TYPE_HELLO = 2, -+ QRTR_TYPE_BYE = 3, -+ QRTR_TYPE_NEW_SERVER = 4, -+ QRTR_TYPE_DEL_SERVER = 5, -+ QRTR_TYPE_DEL_CLIENT = 6, -+ QRTR_TYPE_RESUME_TX = 7, -+ QRTR_TYPE_EXIT = 8, -+ QRTR_TYPE_PING = 9, -+ QRTR_TYPE_NEW_LOOKUP = 10, -+ QRTR_TYPE_DEL_LOOKUP = 11, -+}; -+ -+struct qrtr_ctrl_pkt { -+ __le32 cmd; -+ -+ union { -+ struct { -+ __le32 service; -+ __le32 instance; -+ __le32 node; -+ __le32 port; -+ } server; -+ -+ struct { -+ __le32 node; -+ __le32 port; -+ } client; -+ }; -+} __packed; -+#endif /* of ifndef QRTR_PORT_CTRL */ ++#define QMI_PDS_VERSION 0x2 + +struct qmi_header { + uint8_t type; @@ -181,13 +149,9 @@ index 00000000..62464323 + return -1; + } + -+ session->lexer.type = QMI_PDS_PACKET; ++ /* TODO: Validate sq to be our peer */ + -+ if (sq.sq_node != session->driver.pds.node || -+ sq.sq_port != session->driver.pds.port) { -+ session->lexer.outbuflen = 0; -+ return ret; -+ } ++ session->lexer.type = QMI_PDS_PACKET; + + hdr = buf; + if (hdr->type != QMI_INDICATION || @@ -223,36 +187,31 @@ index 00000000..62464323 + +static void qmi_pds_event_hook(struct gps_device_t *session, event_t event) +{ -+ struct sockaddr_qrtr sq; + struct qmi_header *hdr; + struct qmi_tlv *tlv; + static int txn_id; + char buf[128]; ++ char *ptr; + int sock = session->gpsdata.gps_fd; + int ret; + -+ session->driver.pds.node = 0; -+ session->driver.pds.port = 14; -+ -+ sq.sq_family = AF_QIPCRTR; -+ sq.sq_node = session->driver.pds.node; -+ sq.sq_port = session->driver.pds.port; -+ + switch (event) { + case event_deactivate: -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_STOP; + hdr->len = sizeof(*tlv) + sizeof(uint8_t); ++ ptr += sizeof(*hdr); + -+ tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); ++ tlv = (struct qmi_tlv *)ptr; + tlv->key = QMI_TLV_SESSION_ID; + tlv->len = sizeof(uint8_t); + *(uint8_t*)tlv->value = 1; ++ ptr += sizeof(*tlv) + sizeof(uint8_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send STOP request.\n"); @@ -260,38 +219,42 @@ index 00000000..62464323 + } + break; + case event_reactivate: -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_REG_EVENTS; + hdr->len = sizeof(*tlv) + sizeof(uint64_t); ++ ptr += sizeof(*hdr); + -+ tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); ++ tlv = (struct qmi_tlv *)ptr; + tlv->key = QMI_TLV_EVENT_MASK; + tlv->len = sizeof(uint64_t); + *(uint64_t*)tlv->value = QMI_EVENT_MASK_NMEA; ++ ptr += sizeof(*tlv) + sizeof(uint64_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send REG_EVENTS request.\n"); + return; + } + -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_START; + hdr->len = sizeof(*tlv) + sizeof(uint8_t); ++ ptr += sizeof(*hdr); + + tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); + tlv->key = QMI_TLV_SESSION_ID; + tlv->len = sizeof(uint8_t); + *(uint8_t*)tlv->value = 1; ++ ptr += sizeof(*tlv) + sizeof(uint8_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send START request.\n"); @@ -349,7 +312,7 @@ index 00000000..62464323 + memset(&pkt, 0, sizeof(pkt)); + pkt.cmd = QRTR_TYPE_NEW_LOOKUP; + pkt.server.service = QMI_PDS_SERVICE_ID; -+ pkt.server.instance = QMI_PDS_INSTANCE_ID; ++ pkt.server.instance = QMI_PDS_VERSION; + + sq_ctrl.sq_port = QRTR_PORT_CTRL; + ret = sendto(sock, &pkt, sizeof(pkt), 0, (struct sockaddr *)&sq_ctrl, sizeof(sq_ctrl)); @@ -387,7 +350,7 @@ index 00000000..62464323 + break; + + /* Filter results based on specified node */ -+ if (hostid != -1 && hostid != pkt.server.node) ++ if (hostid != -1 && hostid != (int)pkt.server.node) + continue; + + pds_node = pkt.server.node; @@ -408,14 +371,22 @@ index 00000000..62464323 + gpsd_log(&session->context->errout, LOG_INF, + "QRTR open: Found PDS at %d %d.\n", pds_node, pds_port); + ++ sq.sq_family = AF_QIPCRTR; ++ sq.sq_node = pds_node; ++ sq.sq_port = pds_port; ++ ret = connect(sock, (struct sockaddr *)&sq, sizeof(sq)); ++ if (ret < 0) { ++ gpsd_log(&session->context->errout, LOG_ERROR, ++ "QRTR open: Failed to connect socket.\n"); ++ close(sock); ++ return -1; ++ } ++ + gpsd_switch_driver(session, "Qualcomm PDS"); + session->gpsdata.gps_fd = sock; + session->sourcetype = source_qrtr; + session->servicetype = service_sensor; + -+ session->driver.pds.node = pds_node; -+ session->driver.pds.port = pds_port; -+ + return session->gpsdata.gps_fd; +} + @@ -425,9 +396,6 @@ index 00000000..62464323 + close(session->gpsdata.gps_fd); + INVALIDATE_SOCKET(session->gpsdata.gps_fd); + } -+ -+ session->driver.pds.node = 0; -+ session->driver.pds.port = 0; +} + +const struct gps_type_t driver_pds = { @@ -443,7 +411,7 @@ index 00000000..62464323 +#endif /* of defined(PDS_ENABLE) */ diff --git a/driver_pds.h b/driver_pds.h new file mode 100644 -index 00000000..3b373743 +index 000000000..3b373743d --- /dev/null +++ b/driver_pds.h @@ -0,0 +1,20 @@ @@ -468,10 +436,10 @@ index 00000000..3b373743 +#endif /* of defined(PDS_ENABLE) */ +#endif /* of ifndef _DRIVER_PDS_H_ */ diff --git a/drivers.c b/drivers.c -index eda1fd61..92d7eba8 100644 +index f49ba0a93..a2be4d9ad 100644 --- a/drivers.c +++ b/drivers.c -@@ -1744,6 +1744,7 @@ extern const struct gps_type_t driver_geostar; +@@ -1766,6 +1766,7 @@ extern const struct gps_type_t driver_greis; extern const struct gps_type_t driver_italk; extern const struct gps_type_t driver_navcom; extern const struct gps_type_t driver_nmea2000; @@ -479,7 +447,7 @@ index eda1fd61..92d7eba8 100644 extern const struct gps_type_t driver_oncore; extern const struct gps_type_t driver_sirf; extern const struct gps_type_t driver_skytraq; -@@ -1838,6 +1839,10 @@ static const struct gps_type_t *gpsd_driver_array[] = { +@@ -1863,6 +1864,10 @@ static const struct gps_type_t *gpsd_driver_array[] = { &driver_nmea2000, #endif /* NMEA2000_ENABLE */ @@ -491,30 +459,18 @@ index eda1fd61..92d7eba8 100644 &driver_rtcm104v2, #endif /* RTCM104V2_ENABLE */ diff --git a/gpsd.h b/gpsd.h -index 2bd5f4c0..b24c6e65 100644 +index e78afd4c3..fdbbd8f4c 100644 --- a/gpsd.h +++ b/gpsd.h -@@ -163,12 +163,13 @@ struct gps_lexer_t { - #define ONCORE_PACKET 13 +@@ -191,6 +191,7 @@ struct gps_lexer_t { #define GEOSTAR_PACKET 14 #define NMEA2000_PACKET 15 --#define MAX_GPSPACKET_TYPE 15 /* increment this as necessary */ --#define RTCM2_PACKET 16 --#define RTCM3_PACKET 17 --#define JSON_PACKET 18 --#define PACKET_TYPES 19 /* increment this as necessary */ --#define SKY_PACKET 20 + #define GREIS_PACKET 16 +#define QMI_PDS_PACKET 16 -+#define MAX_GPSPACKET_TYPE 16 /* increment this as necessary */ -+#define RTCM2_PACKET 17 -+#define RTCM3_PACKET 18 -+#define JSON_PACKET 19 -+#define PACKET_TYPES 20 /* increment this as necessary */ -+#define SKY_PACKET 21 - #define TEXTUAL_PACKET_TYPE(n) ((((n)>=NMEA_PACKET) && ((n)<=MAX_TEXTUAL_TYPE)) || (n)==JSON_PACKET) - #define GPS_PACKET_TYPE(n) (((n)>=NMEA_PACKET) && ((n)<=MAX_GPSPACKET_TYPE)) - #define LOSSLESS_PACKET_TYPE(n) (((n)>=RTCM2_PACKET) && ((n)<=RTCM3_PACKET)) -@@ -411,6 +412,7 @@ typedef enum {source_unknown, + #define MAX_GPSPACKET_TYPE 16 /* increment this as necessary */ + #define RTCM2_PACKET 17 + #define RTCM3_PACKET 18 +@@ -439,6 +440,7 @@ typedef enum {source_unknown, source_usb, /* potential GPS source, discoverable */ source_bluetooth, /* potential GPS source, discoverable */ source_can, /* potential GPS source, fixed CAN format */ @@ -522,24 +478,11 @@ index 2bd5f4c0..b24c6e65 100644 source_pty, /* PTY: we don't require exclusive access */ source_tcp, /* TCP/IP stream: case detected but not used */ source_udp, /* UDP stream: case detected but not used */ -@@ -699,6 +701,12 @@ struct gps_device_t { - unsigned char sid[8]; - } nmea2000; - #endif /* NMEA2000_ENABLE */ -+#ifdef PDS_ENABLE -+ struct { -+ unsigned int node; -+ unsigned int port; -+ } pds; -+#endif /* PDS_ENABLE */ - /* - * This is not conditionalized on RTCM104_ENABLE because we need to - * be able to build gpsdecode even when RTCM support is not diff --git a/libgpsd_core.c b/libgpsd_core.c -index 85b8d86a..4f6a11ed 100644 +index 3bf420c3e..848da6aeb 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c -@@ -48,6 +48,9 @@ +@@ -39,6 +39,9 @@ #if defined(NMEA2000_ENABLE) #include "driver_nmea2000.h" #endif /* defined(NMEA2000_ENABLE) */ @@ -561,7 +504,7 @@ index 85b8d86a..4f6a11ed 100644 (void)gpsd_close(session); if (session->mode == O_OPTIMIZE) gpsd_run_device_hook(&session->context->errout, -@@ -547,6 +555,11 @@ int gpsd_open(struct gps_device_t *session) +@@ -549,6 +557,11 @@ int gpsd_open(struct gps_device_t *session) return nmea2000_open(session); } #endif /* defined(NMEA2000_ENABLE) */ @@ -573,7 +516,7 @@ index 85b8d86a..4f6a11ed 100644 /* fall through to plain serial open */ /* could be a naked /dev/ppsX */ return gpsd_serial_open(session); -@@ -575,7 +588,7 @@ int gpsd_activate(struct gps_device_t *session, const int mode) +@@ -577,7 +590,7 @@ int gpsd_activate(struct gps_device_t *session, const int mode) #ifdef NON_NMEA0183_ENABLE /* if it's a sensor, it must be probed */ if ((session->servicetype == service_sensor) && @@ -583,5 +526,5 @@ index 85b8d86a..4f6a11ed 100644 for (dp = gpsd_drivers; *dp; dp++) { -- -2.17.0 +2.23.0 diff --git a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend new file mode 100644 index 00000000..16f4e3c9 --- /dev/null +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend @@ -0,0 +1,3 @@ +PACKAGE_INSTALL += " \ + devmem2 \ +" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb index b65ac463..ecdbed94 100644 --- a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb @@ -20,36 +20,25 @@ do_compile() { do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ + install -d ${D}/boot - cp -r ./proprietary-linux/* ${D}${nonarch_base_libdir}/firmware/ cp ./efs-seed/fs_image_linux.tar.gz.mbn.img ${D}/boot/modem_fsg - MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \ - ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/ + cp -r ./proprietary-linux/wlan ${D}${nonarch_base_libdir}/firmware/ - # Venus firmware have been merged in linux-firmware in a different location than - # what we've been using for now. Let's add symlinks for now, until we switch to linux-firmware - install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-1.8/ - for f in ${D}${nonarch_base_libdir}/firmware/venus.*; do - f=$(basename $f) - ln -s ${nonarch_base_libdir}/firmware/$f ${D}${nonarch_base_libdir}/firmware/qcom/venus-1.8/$f - done + install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8916 + MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \ + ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8916 install -d ${D}${sysconfdir}/ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE } -FILES_${PN} += "${nonarch_base_libdir}/firmware/*" FILES_${PN} += "/boot/modem_fsg" -INSANE_SKIP_${PN} += "arch" - -RPROVIDES_${PN} += "linux-firmware-qcom-adreno-a3xx" -RREPLACES_${PN} += "linux-firmware-qcom-adreno-a3xx" -RCONFLICTS_${PN} += "linux-firmware-qcom-adreno-a3xx" +FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*" +FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*" -RPROVIDES_${PN} += "linux-firmware-qcom-venus-1.8" -RREPLACES_${PN} += "linux-firmware-qcom-venus-1.8" -RCONFLICTS_${PN} += "linux-firmware-qcom-venus-1.8" +INSANE_SKIP_${PN} += "arch" RPROVIDES_${PN} += "linux-firmware-qcom-license" RREPLACES_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb index dc81dcd2..952f574a 100644 --- a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb @@ -18,11 +18,9 @@ do_compile() { do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ - install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-4.2/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ - install -m 0444 ./proprietary-linux/a530*.* ${D}${nonarch_base_libdir}/firmware/ - install -m 0444 ./proprietary-linux/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-4.2/ - install -m 0444 ./proprietary-linux/adsp.* ${D}${nonarch_base_libdir}/firmware/ + install -m 0444 ./proprietary-linux/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ install -d ${D}${sysconfdir}/ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE @@ -31,14 +29,6 @@ do_install() { FILES_${PN} += "${nonarch_base_libdir}/firmware/*" INSANE_SKIP_${PN} += "arch" -RPROVIDES_${PN} += "linux-firmware-qcom-adreno-a530" -RREPLACES_${PN} += "linux-firmware-qcom-adreno-a530" -RCONFLICTS_${PN} += "linux-firmware-qcom-adreno-a530" - -RPROVIDES_${PN} += "linux-firmware-qcom-venus-4.2" -RREPLACES_${PN} += "linux-firmware-qcom-venus-4.2" -RCONFLICTS_${PN} += "linux-firmware-qcom-venus-4.2" - RPROVIDES_${PN} += "linux-firmware-qcom-license" RREPLACES_${PN} += "linux-firmware-qcom-license" RCONFLICTS_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh new file mode 100644 index 00000000..3a1d5324 --- /dev/null +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh @@ -0,0 +1,23 @@ +JSON="$2" + +iter=0 +echo "[" > "${JSON}" +for file in $1/bdwlan.*; do + [[ $file == *.txt ]] && continue + + iter=$((iter+1)) + [ $iter -ne 1 ] && echo " }," >> "${JSON}" + + echo " {" >> "${JSON}" + echo " \"data\": \"$file\"," >> "${JSON}" + if [[ $file == */bdwlan.bin ]]; then + file_ext="ff" + else + file_ext="$(printf '%x\n' "$(basename "${file}" | sed -E 's:^.*\.b?([0-9a-f]*)$:0x\1:')")" + fi + echo " \"names\": [\"bus=snoc,qmi-board-id=${file_ext}\"]" >> "${JSON}" +done + +echo " }" >> "${JSON}" +echo "]" >> "${JSON}" + diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb new file mode 100644 index 00000000..88a1a6c3 --- /dev/null +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb @@ -0,0 +1,55 @@ +DESCRIPTION = "QCOM Firmware for DragonBoard 845c" + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000" + +SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip \ + git://github.com/alimon/qca-swiss-army-knife \ + file://generate_board-2_json.sh" +SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62" +SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3" +SRCREV = "0c01a2abc3e9855b71f0fbea2c335011104d9ec0" + +COMPATIBLE_MACHINE = "(dragonboard-845c)" +PACKAGE_ARCH = "${MACHINE_ARCH}" +DEPENDS += "bash-native" +inherit python3native + +S = "${WORKDIR}" + +do_compile() { + # Build board-2.bin needed by WiFi + mkdir -p bdf + cp ./38-bdwlan_split/bdwlan*.* bdf + bash generate_board-2_json.sh bdf board-2.json + python3 git/tools/scripts/ath10k/ath10k-bdencoder -c board-2.json -o board-2.bin +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + + install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/ + install -m 0444 ./18-adreno-fw/a630_zap*.* ${D}${nonarch_base_libdir}/firmware/qcom/ + install -m 0444 ./20-adsp_split/firmware/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + install -m 0444 ./21-cdsp_split/firmware/cdsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + install -m 0444 ./33-venus_split/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/ + + install -d ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/ + install -m 0444 ./board-2.bin ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/ + + install -d ${D}${sysconfdir}/ + install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE +} + +FILES_${PN} += "${nonarch_base_libdir}/firmware/*" +INSANE_SKIP_${PN} += "arch" + +RPROVIDES_${PN} += "linux-firmware-qcom-venus-5.2" +RREPLACES_${PN} += "linux-firmware-qcom-venus-5.2" +RCONFLICTS_${PN} += "linux-firmware-qcom-venus-5.2" + +RPROVIDES_${PN} += "linux-firmware-qcom-license" +RREPLACES_${PN} += "linux-firmware-qcom-license" +RCONFLICTS_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb b/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb deleted file mode 100644 index 79711ad8..00000000 --- a/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "WLAN and BT configuration files for QCOM WCN" -HOMEPAGE = "https://git.linaro.org/landing-teams/working/qualcomm/wcnss-config.git" -SECTION = "devel" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=9ffc7d99f148b53a339cd4374c5c431f" - -# TAG:debian/1.13 -SRCREV = "655a59f30915bed785d39cc90130dc06b44d7f6f" -SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/wcnss-config.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit systemd allarch - -PACKAGES =+ "wcnss-start" - -do_install () { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/debian/wcnss-start.service ${D}${systemd_unitdir}/system - - install -d ${D}${sbindir} - install -m 0755 ${S}/wcnss-start ${D}${sbindir} -} - -# They are empty, and would break dev-pkgs image feature. -PACKAGES_remove = "${PN}-dev ${PN}-staticdev" - -FILES_wcnss-start = "${sbindir}/wcnss-start ${systemd_unitdir}/system/wcnss-start.service" - -SYSTEMD_PACKAGES = "wcnss-start" -SYSTEMD_SERVICE_wcnss-start = "wcnss-start.service" diff --git a/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch b/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch new file mode 100644 index 00000000..2aca1811 --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch @@ -0,0 +1,35 @@ +From d0ecd95e8935a9fe3e94921d10bfb153f5e0ce52 Mon Sep 17 00:00:00 2001 +From: Nicolas Dechesne +Date: Wed, 28 Aug 2019 17:54:50 +0200 +Subject: [PATCH] Makefile: Use pkg-config for libxml2 detection. + +xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Nicolas Dechesne +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,14 @@ + OUT := qdl + +-CFLAGS := -O2 -Wall -g `xml2-config --cflags` +-LDFLAGS := `xml2-config --libs` -ludev +-prefix := /usr/local ++CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0` ++LDFLAGS += `pkg-config --libs libxml-2.0` -ludev ++prefix ?= /usr/local + + SRCS := firehose.c qdl.c sahara.c util.c patch.c program.c ufs.c + OBJS := $(SRCS:.c=.o) + + $(OUT): $(OBJS) +- $(CC) -o $@ $^ $(LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + + clean: + rm -f $(OUT) $(OBJS) diff --git a/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb b/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb new file mode 100644 index 00000000..aba3cec1 --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "QDL flasing tool" +HOMEPAGE = "https://github.com/andersson/qdl.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://qdl.c;beginline=1;endline=31;md5=1c7d712d897368d3d3c161e5493efc6a" + +DEPENDS = "libxml2" +DEPENDS_append_class-target = " udev " + +inherit pkgconfig + +SRCREV = "760b3dffb03d2b7dfb82c6eac652a092f51c572d" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-Makefile-Use-pkg-config-for-libxml2-detection.patch" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch b/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch new file mode 100644 index 00000000..2abac7df --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch @@ -0,0 +1,23 @@ +From aadbb5dd64abc2efbb5548d1d0b168d476875157 Mon Sep 17 00:00:00 2001 +From: Peter Griffin +Date: Wed, 29 Jan 2020 22:55:41 +0100 +Subject: [PATCH 2/2] mkbootimg: use python3 + +Signed-off-by: Peter Griffin +--- + mkbootimg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkbootimg b/mkbootimg +index c0e7dcb..adfc54b 100755 +--- a/mkbootimg ++++ b/mkbootimg +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python3 + # + # Copyright (c) 2013, The Linux Foundation. All rights reserved. + # +-- +2.7.4 + diff --git a/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb b/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb index 71928e86..782d20ca 100644 --- a/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb +++ b/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb @@ -6,19 +6,18 @@ SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://mkbootimg;beginline=3;endline=29;md5=114b84083e657f3886bfa2c1e5de7deb" -DEPENDS = "python dtc" - SRCREV = "6eac9e943de53c4aaaede3697e9226a47686fe25" PV = "1.5.0+git${SRCPV}" -SRC_URI = "git://codeaurora.org/quic/kernel/skales" +SRC_URI = "git://source.codeaurora.org/quic/kernel/skales;protocol=http \ + file://0002-mkbootimg-use-python3.patch \ + " S = "${WORKDIR}/git" do_install () { install -d ${D}${bindir}/skales install -m 0755 ${S}/mkbootimg ${D}${bindir}/skales - install -m 0755 ${S}/dtbTool ${D}${bindir}/skales } BBCLASSEXTEND = "native" diff --git a/bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb b/bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb deleted file mode 100644 index 48eed256..00000000 --- a/bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Basic X11 graphics image" - -IMAGE_FEATURES += "splash package-management debug-tweaks ssh-server-openssh hwcodecs x11 tools-debug" - -LICENSE = "MIT" - -inherit core-image distro_features_check extrausers - -# let's make sure we have a good image.. -REQUIRED_DISTRO_FEATURES = "x11" - -# make sure we boot to desktop -# by default and without x11-base in IMAGE_FEATURES we default to multi-user.target -SYSTEMD_DEFAULT_TARGET = "graphical.target" - -CORE_IMAGE_BASE_INSTALL += " \ - alsa-utils-aplay \ - coreutils \ - glmark2 \ - gptfdisk \ - gstreamer1.0-plugins-bad-meta \ - gstreamer1.0-plugins-base-meta \ - gstreamer1.0-plugins-good-meta \ - gtkperf \ - kernel-modules \ - kmscube \ - mesa-demos \ - openbox \ - rsync \ -" diff --git a/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch b/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch deleted file mode 100644 index 57ebd8f9..00000000 --- a/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch +++ /dev/null @@ -1,101 +0,0 @@ -From c4bee1a1b3fb224002fe8c263bedbce1b705ed49 Mon Sep 17 00:00:00 2001 -From: Peter Griffin -Date: Mon, 13 May 2019 19:18:56 +0100 -Subject: [PATCH] freedreno: add query for dmabuf modifiers - -Backport of mesa 7c4b9510d by Fritz Koenig. Tested with Weston -and weston-simple-dmabuf-drm client. - -Upstream-Status: Backport from 19.0 - -Signed-off-by: Peter Griffin ---- - src/gallium/drivers/freedreno/freedreno_screen.c | 43 ++++++++++++++++++++++++ - src/gallium/drivers/freedreno/freedreno_screen.h | 3 ++ - 2 files changed, 46 insertions(+) - -diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c -index f338d75..cbb5b8a 100644 ---- a/src/gallium/drivers/freedreno/freedreno_screen.c -+++ b/src/gallium/drivers/freedreno/freedreno_screen.c -@@ -40,6 +40,7 @@ - - #include "util/os_time.h" - -+#include - #include - #include - #include -@@ -732,6 +733,37 @@ fd_screen_bo_get_handle(struct pipe_screen *pscreen, - } - } - -+static void -+fd_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen, -+ enum pipe_format format, -+ int max, uint64_t *modifiers, -+ unsigned int *external_only, -+ int *count) -+{ -+ struct fd_screen *screen = fd_screen(pscreen); -+ int i, num = 0; -+ -+ max = MIN2(max, screen->num_supported_modifiers); -+ -+ if (!max) { -+ max = screen->num_supported_modifiers; -+ external_only = NULL; -+ modifiers = NULL; -+ } -+ -+ for (i = 0; i < max; i++) { -+ if (modifiers) -+ modifiers[num] = screen->supported_modifiers[i]; -+ -+ if (external_only) -+ external_only[num] = 0; -+ -+ num++; -+ } -+ -+ *count = num; -+} -+ - struct fd_bo * - fd_screen_bo_from_handle(struct pipe_screen *pscreen, - struct winsys_handle *whandle) -@@ -921,6 +953,17 @@ fd_screen_create(struct fd_device *dev) - pscreen->fence_finish = fd_fence_finish; - pscreen->fence_get_fd = fd_fence_get_fd; - -+ pscreen->query_dmabuf_modifiers = fd_screen_query_dmabuf_modifiers; -+ -+ if (!screen->supported_modifiers) { -+ static const uint64_t supported_modifiers[] = { -+ DRM_FORMAT_MOD_LINEAR, -+ }; -+ -+ screen->supported_modifiers = supported_modifiers; -+ screen->num_supported_modifiers = ARRAY_SIZE(supported_modifiers); -+ } -+ - slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16); - - return pscreen; -diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h -index 6be739a..5558066 100644 ---- a/src/gallium/drivers/freedreno/freedreno_screen.h -+++ b/src/gallium/drivers/freedreno/freedreno_screen.h -@@ -89,6 +89,9 @@ struct fd_screen { - struct fd_batch_cache batch_cache; - - bool reorder; -+ -+ unsigned num_supported_modifiers; -+ const uint64_t *supported_modifiers; - }; - - static inline struct fd_screen * --- -2.7.4 - diff --git a/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch b/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch new file mode 100644 index 00000000..2d4aa000 --- /dev/null +++ b/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch @@ -0,0 +1,94 @@ +From 3c4e3006ef3318c1afe65341a1f92cf332ce0d81 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Sat, 23 May 2020 10:52:52 -0700 +Subject: [PATCH] freedreno: clear last_fence after resource tracking + +The resource tracking in the clear/draw_vbo/blit paths could itself +trigger a flush. Which would update last_fence. So we need to clear +last_fence *after* all the dependency tracking. + +Fixes: ddb7fadaf8b ("freedreno: avoid no-op flushes by re-using last-fence") +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2992 +Signed-off-by: Rob Clark +--- + src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 8 ++++++-- + src/gallium/drivers/freedreno/freedreno_draw.c | 16 ++++++++++++---- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +index f812aab37a6..21900312ae7 100644 +--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c ++++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +@@ -632,8 +632,6 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + if (!can_do_blit(info)) + return false; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true); + + fd6_emit_restore(batch, batch->draw); +@@ -646,6 +644,12 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_write()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + emit_setup(batch); + + if ((info->src.resource->target == PIPE_BUFFER) && +diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c +index 94e2aae9e68..e2a0a1260fa 100644 +--- a/src/gallium/drivers/freedreno/freedreno_draw.c ++++ b/src/gallium/drivers/freedreno/freedreno_draw.c +@@ -93,8 +93,6 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + return; + } + +- fd_fence_ref(&ctx->last_fence, NULL); +- + /* Upload a user index buffer. */ + struct pipe_resource *indexbuf = NULL; + unsigned index_offset = 0; +@@ -282,6 +280,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + /* and any buffers used, need to be resolved: */ + batch->resolve |= buffers; + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u num_draws=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, batch->num_draws, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +@@ -318,8 +322,6 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + if (!fd_render_condition_check(pctx)) + return; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + if (ctx->in_blit) { + fd_batch_reset(batch); + fd_context_all_dirty(ctx); +@@ -366,6 +368,12 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, depth, stencil, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend index 7ad44bdc..fd40c398 100644 --- a/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend @@ -1,13 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append = " \ + file://0001-freedreno-clear-last_fence-after-resource-tracking.patch \ +" + # Enable freedreno driver GALLIUMDRIVERS_append_apq8064 = ",freedreno" GALLIUMDRIVERS_append_apq8016 = ",freedreno" GALLIUMDRIVERS_append_apq8096 = ",freedreno" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append_apq8064 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" -SRC_URI_append_apq8016 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" -SRC_URI_append_apq8096 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" +GALLIUMDRIVERS_append_sdm845 = ",freedreno" PACKAGECONFIG_append_apq8064 = " \ gallium \ @@ -23,3 +23,8 @@ PACKAGECONFIG_append_apq8096 = " \ gallium \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \ " + +PACKAGECONFIG_append_sdm845 = " \ + gallium \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \ +" diff --git a/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 0d8fc578..04856c99 100644 --- a/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -3,3 +3,4 @@ PACKAGECONFIG_append_apq8064 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" PACKAGECONFIG_append_apq8016 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" PACKAGECONFIG_append_apq8096 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" +PACKAGECONFIG_append_sdm845 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" diff --git a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 00000000..9a1115c3 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -0,0 +1,7 @@ + +do_install_append() { + rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2 + rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.4 +} + + diff --git a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index ff4b3c1b..00000000 --- a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# XXX: Checkout previous ath10k stable firmware for dragonboard820c, -# RM.4.4.1.c2-00057-QCARMSWP-1 causes a HW reboot use RM.4.4.1-00079-QCARMSWPZ-1 -do_install_dragonboard-820c_prepend() { - linux_firmware_ath10k_stable="1d1dd4be21cde408b0fb12774d477293bc8d4cc2" - cd "${S}" - git checkout "${linux_firmware_ath10k_stable}" -- ath10k/QCA6174 -} diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch new file mode 100644 index 00000000..2975a2a4 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch @@ -0,0 +1,207 @@ +From e4a349e3fce09e441f6568ca318be66709386514 Mon Sep 17 00:00:00 2001 +From: Jonathan Marek +Date: Tue, 9 Jun 2020 15:40:24 -0400 +Subject: [PATCH] arm64: dts: qcom: sm8250: Add USB and PHY device nodes + +Add device nodes for the USB3 controller, QMP SS PHY and +SNPS HS PHY. + +Signed-off-by: Jonathan Marek +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 180 +++++++++++++++++++++++++++ + 1 file changed, 180 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index cc6c65883d88..68f9a3ce9760 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -1097,6 +1097,186 @@ intc: interrupt-controller@17a00000 { + interrupts = ; + }; + ++ usb_1_hsphy: phy@88e3000 { ++ compatible = "qcom,sm8250-usb-hs-phy", ++ "qcom,usb-snps-hs-7nm-phy"; ++ reg = <0 0x088e3000 0 0x400>; ++ status = "disabled"; ++ #phy-cells = <0>; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "ref"; ++ ++ resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; ++ }; ++ ++ usb_2_hsphy: phy@88e4000 { ++ compatible = "qcom,sm8250-usb-hs-phy", ++ "qcom,usb-snps-hs-7nm-phy"; ++ reg = <0 0x088e4000 0 0x400>; ++ status = "disabled"; ++ #phy-cells = <0>; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "ref"; ++ ++ resets = <&gcc GCC_QUSB2PHY_SEC_BCR>; ++ }; ++ ++ usb_1_qmpphy: phy@88e9000 { ++ compatible = "qcom,sm8250-qmp-usb3-phy"; ++ reg = <0 0x088e9000 0 0x200>, ++ <0 0x088e8000 0 0x20>; ++ reg-names = "reg-base", "dp_com"; ++ status = "disabled"; ++ #clock-cells = <1>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, ++ <&rpmhcc RPMH_CXO_CLK>, ++ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; ++ clock-names = "aux", "ref_clk_src", "com_aux"; ++ ++ resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, ++ <&gcc GCC_USB3_PHY_PRIM_BCR>; ++ reset-names = "phy", "common"; ++ ++ usb_1_ssphy: lanes@88e9200 { ++ reg = <0 0x088e9200 0 0x200>, ++ <0 0x088e9400 0 0x200>, ++ <0 0x088e9c00 0 0x400>, ++ <0 0x088e9600 0 0x200>, ++ <0 0x088e9800 0 0x200>, ++ <0 0x088e9a00 0 0x100>; ++ #phy-cells = <0>; ++ clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; ++ clock-names = "pipe0"; ++ clock-output-names = "usb3_phy_pipe_clk_src"; ++ }; ++ }; ++ ++ usb_2_qmpphy: phy@88eb000 { ++ compatible = "qcom,sm8250-qmp-usb3-uni-phy"; ++ reg = <0 0x088eb000 0 0x200>; ++ status = "disabled"; ++ #clock-cells = <1>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, ++ <&rpmhcc RPMH_CXO_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>, ++ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; ++ clock-names = "aux", "ref_clk_src", "ref", "com_aux"; ++ ++ resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, ++ <&gcc GCC_USB3_PHY_SEC_BCR>; ++ reset-names = "phy", "common"; ++ ++ usb_2_ssphy: lane@88eb200 { ++ reg = <0 0x088eb200 0 0x200>, ++ <0 0x088eb400 0 0x200>, ++ <0 0x088eb800 0 0x800>; ++ #phy-cells = <0>; ++ clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; ++ clock-names = "pipe0"; ++ clock-output-names = "usb3_uni_phy_pipe_clk_src"; ++ }; ++ }; ++ ++ usb_1: usb@a6f8800 { ++ compatible = "qcom,sm8250-dwc3", "qcom,dwc3"; ++ reg = <0 0x0a6f8800 0 0x400>; ++ status = "disabled"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ dma-ranges; ++ ++ clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, ++ <&gcc GCC_USB30_PRIM_MASTER_CLK>, ++ <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>, ++ <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_PRIM_SLEEP_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>; ++ clock-names = "cfg_noc", "core", "iface", "mock_utmi", ++ "sleep", "xo"; ++ ++ assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_PRIM_MASTER_CLK>; ++ assigned-clock-rates = <19200000>, <200000000>; ++ ++ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, ++ <&pdc 14 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 15 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "hs_phy_irq", "dp_hs_phy_irq", ++ "dm_hs_phy_irq", "ss_phy_irq"; ++ ++ power-domains = <&gcc USB30_PRIM_GDSC>; ++ ++ resets = <&gcc GCC_USB30_PRIM_BCR>; ++ ++ usb_1_dwc3: dwc3@a600000 { ++ compatible = "snps,dwc3"; ++ reg = <0 0x0a600000 0 0xcd00>; ++ interrupts = ; ++ //iommus = <&apps_smmu 0x0 0x0>; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_enblslpm_quirk; ++ phys = <&usb_1_hsphy>, <&usb_1_ssphy>; ++ phy-names = "usb2-phy", "usb3-phy"; ++ }; ++ }; ++ ++ usb_2: usb@a8f8800 { ++ compatible = "qcom,sm8250-dwc3", "qcom,dwc3"; ++ reg = <0 0x0a8f8800 0 0x400>; ++ status = "disabled"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ dma-ranges; ++ ++ clocks = <&gcc GCC_CFG_NOC_USB3_SEC_AXI_CLK>, ++ <&gcc GCC_USB30_SEC_MASTER_CLK>, ++ <&gcc GCC_AGGRE_USB3_SEC_AXI_CLK>, ++ <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_SEC_SLEEP_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>; ++ clock-names = "cfg_noc", "core", "iface", "mock_utmi", ++ "sleep", "xo"; ++ ++ assigned-clocks = <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_SEC_MASTER_CLK>; ++ assigned-clock-rates = <19200000>, <200000000>; ++ ++ interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, ++ <&pdc 12 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 13 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "hs_phy_irq", "dp_hs_phy_irq", ++ "dm_hs_phy_irq", "ss_phy_irq"; ++ ++ power-domains = <&gcc USB30_SEC_GDSC>; ++ ++ resets = <&gcc GCC_USB30_SEC_BCR>; ++ ++ usb_2_dwc3: dwc3@a800000 { ++ compatible = "snps,dwc3"; ++ reg = <0 0x0a800000 0 0xcd00>; ++ interrupts = ; ++ //iommus = <&apps_smmu 0x20 0>; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_enblslpm_quirk; ++ phys = <&usb_2_hsphy>, <&usb_2_ssphy>; ++ phy-names = "usb2-phy", "usb3-phy"; ++ }; ++ }; ++ + pdc: interrupt-controller@b220000 { + compatible = "qcom,sm8250-pdc", "qcom,pdc"; + reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x60>; +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch new file mode 100644 index 00000000..b5e15c52 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch @@ -0,0 +1,45 @@ +From a1b05da240efec1780dc654dd12efe518e4a5068 Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam +Date: Tue, 9 Jun 2020 11:10:58 +0530 +Subject: [PATCH] arm64: dts: qcom: sm8250: Add support for SDC2 + +Add support for SDC2 which can be used to interface uSD card. + +Signed-off-by: Manivannan Sadhasivam +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 68f9a3ce9760..8e4abe5aa01f 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -983,6 +983,25 @@ ufs_mem_phy_lanes: lanes@1d87400 { + }; + }; + ++ sdhc_2: sdhci@8804000 { ++ compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"; ++ reg = <0 0x08804000 0 0x1000>; ++ ++ interrupts = , ++ ; ++ interrupt-names = "hc_irq", "pwr_irq"; ++ ++ clocks = <&gcc GCC_SDCC2_AHB_CLK>, ++ <&gcc GCC_SDCC2_APPS_CLK>; ++ clock-names = "iface", "core"; ++ //iommus = <&apps_smmu 0xa0 0xf>; ++ qcom,dll-config = <0x0007642c>; ++ qcom,ddr-config = <0x80040868>; ++ power-domains = <&rpmhpd SM8250_CX>; ++ ++ status = "disabled"; ++ }; ++ + intc: interrupt-controller@17a00000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch new file mode 100644 index 00000000..6eb26cdd --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch @@ -0,0 +1,74 @@ +From 7239ad605113c0945c94f0f75cfbeb3b1a38deb7 Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam +Date: Mon, 29 Jun 2020 21:09:02 +0530 +Subject: [PATCH] arm64: dts: qcom: sm8250: Rename UART2 node to UART12 + +The UART12 node has been mistakenly mentioned as UART2. Let's fix that +for both SM8250 SoC and MTP board and also add pinctrl definition for +it. + +Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") +Signed-off-by: Manivannan Sadhasivam +--- + arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 4 ++-- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 11 ++++++++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +index e9acda9f5b83..e844da89e688 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts ++++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +@@ -13,7 +13,7 @@ / { + compatible = "qcom,sm8250-mtp"; + + aliases { +- serial0 = &uart2; ++ serial0 = &uart12; + }; + + chosen { +@@ -359,7 +359,7 @@ &tlmm { + gpio-reserved-ranges = <28 4>, <40 4>; + }; + +-&uart2 { ++&uart12 { + status = "okay"; + }; + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 3ecc780a005d..ba8e8b8a90d2 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -865,11 +865,13 @@ spi12: spi@a90000 { + status = "disabled"; + }; + +- uart2: serial@a90000 { ++ uart12: serial@a90000 { + compatible = "qcom,geni-debug-uart"; + reg = <0x0 0x00a90000 0x0 0x4000>; + clock-names = "se"; + clocks = <&gcc 113>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_uart12_default>; + interrupts = ; + status = "disabled"; + }; +@@ -1839,6 +1841,13 @@ config { + bias-disable; + }; + }; ++ ++ qup_uart12_default: qup-uart12-default { ++ mux { ++ pins = "gpio34", "gpio35"; ++ function = "qup12"; ++ }; ++ }; + }; + + timer@17c20000 { +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch new file mode 100644 index 00000000..81832861 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch @@ -0,0 +1,1202 @@ +From ba21e7e0130be07dadf415e277524b6544680656 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Wed, 3 Jun 2020 18:42:42 +0300 +Subject: [PATCH] arm64: dts: qcom: sm8250: add I2C and SPI nodes + +Much like SDM845 each serial engine has 4 pins attached. Add all +possible I2C and SPI nodes for all 20 serial engines. + +Signed-off-by: Dmitry Baryshkov +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 1147 ++++++++++++++++++++++++++ + 1 file changed, 1147 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 384839cb036c..37d3abeabf87 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -15,6 +15,49 @@ / { + #address-cells = <2>; + #size-cells = <2>; + ++ aliases { ++ i2c0 = &i2c0; ++ i2c1 = &i2c1; ++ i2c2 = &i2c2; ++ i2c3 = &i2c3; ++ i2c4 = &i2c4; ++ i2c5 = &i2c5; ++ i2c6 = &i2c6; ++ i2c7 = &i2c7; ++ i2c8 = &i2c8; ++ i2c9 = &i2c9; ++ i2c10 = &i2c10; ++ i2c11 = &i2c11; ++ i2c12 = &i2c12; ++ i2c13 = &i2c13; ++ i2c14 = &i2c14; ++ i2c15 = &i2c15; ++ i2c16 = &i2c16; ++ i2c17 = &i2c17; ++ i2c18 = &i2c18; ++ i2c19 = &i2c19; ++ spi0 = &spi0; ++ spi1 = &spi1; ++ spi2 = &spi2; ++ spi3 = &spi3; ++ spi4 = &spi4; ++ spi5 = &spi5; ++ spi6 = &spi6; ++ spi7 = &spi7; ++ spi8 = &spi8; ++ spi9 = &spi9; ++ spi10 = &spi10; ++ spi11 = &spi11; ++ spi12 = &spi12; ++ spi13 = &spi13; ++ spi14 = &spi14; ++ spi15 = &spi15; ++ spi16 = &spi16; ++ spi17 = &spi17; ++ spi18 = &spi18; ++ spi19 = &spi19; ++ }; ++ + chosen { }; + + clocks { +@@ -294,6 +337,394 @@ gcc: clock-controller@100000 { + clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>; + }; + ++ qupv3_id_2: geniqup@8c0000 { ++ compatible = "qcom,geni-se-qup"; ++ reg = <0x0 0x008c0000 0x0 0x6000>; ++ clock-names = "m-ahb", "s-ahb"; ++ clocks = <&gcc GCC_QUPV3_WRAP_2_M_AHB_CLK>, ++ <&gcc GCC_QUPV3_WRAP_2_S_AHB_CLK>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ status = "disabled"; ++ ++ i2c14: i2c@880000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00880000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c14_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi14: spi@880000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00880000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi14_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c15: i2c@884000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00884000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c15_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi15: spi@884000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00884000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi15_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c16: i2c@888000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00888000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c16_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi16: spi@888000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00888000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi16_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c17: i2c@88c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0088c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c17_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi17: spi@88c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0088c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi17_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c18: i2c@890000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00890000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c18_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi18: spi@890000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00890000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi18_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c19: i2c@894000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00894000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c19_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi19: spi@894000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00894000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi19_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ ++ qupv3_id_0: geniqup@9c0000 { ++ compatible = "qcom,geni-se-qup"; ++ reg = <0x0 0x009c0000 0x0 0x6000>; ++ clock-names = "m-ahb", "s-ahb"; ++ clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>, ++ <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ status = "disabled"; ++ ++ i2c0: i2c@980000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00980000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c0_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi0: spi@980000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00980000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi0_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c1: i2c@984000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00984000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c1_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi1: spi@984000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00984000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi1_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c2: i2c@988000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00988000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c2_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi2: spi@988000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00988000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi2_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c3: i2c@98c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0098c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c3_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi3: spi@98c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0098c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi3_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c4: i2c@990000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00990000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c4_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi4: spi@990000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00990000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi4_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c5: i2c@994000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00994000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c5_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi5: spi@994000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00994000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi5_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c6: i2c@998000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00998000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c6_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi6: spi@998000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00998000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi6_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c7: i2c@99c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0099c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c7_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi7: spi@99c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0099c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi7_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ + qupv3_id_1: geniqup@ac0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x0 0x00ac0000 0x0 0x6000>; +@@ -304,6 +735,136 @@ qupv3_id_1: geniqup@ac0000 { + ranges; + status = "disabled"; + ++ i2c8: i2c@a80000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a80000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c8_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi8: spi@a80000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a80000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi8_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c9: i2c@a84000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a84000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c9_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi9: spi@a84000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a84000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi9_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c10: i2c@a88000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a88000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c10_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi10: spi@a88000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a88000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi10_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c11: i2c@a8c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a8c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c11_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi11: spi@a8c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a8c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi11_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c12: i2c@a90000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a90000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c12_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi12: spi@a90000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a90000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi12_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + uart2: serial@a90000 { + compatible = "qcom,geni-debug-uart"; + reg = <0x0 0x00a90000 0x0 0x4000>; +@@ -312,6 +873,32 @@ uart2: serial@a90000 { + interrupts = ; + status = "disabled"; + }; ++ ++ i2c13: i2c@a94000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a94000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c13_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi13: spi@a94000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a94000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi13_default>; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; + }; + + ufs_mem_hc: ufshc@1d84000 { +@@ -512,6 +1099,566 @@ tlmm: pinctrl@f100000 { + #interrupt-cells = <2>; + gpio-ranges = <&tlmm 0 0 180>; + wakeup-parent = <&pdc>; ++ ++ qup_i2c0_default: qup-i2c0-default { ++ mux { ++ pins = "gpio28", "gpio29"; ++ function = "qup0"; ++ }; ++ ++ config { ++ pins = "gpio28", "gpio29"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c1_default: qup-i2c1-default { ++ pinmux { ++ pins = "gpio4", "gpio5"; ++ function = "qup1"; ++ }; ++ ++ config { ++ pins = "gpio4", "gpio5"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c2_default: qup-i2c2-default { ++ mux { ++ pins = "gpio115", "gpio116"; ++ function = "qup2"; ++ }; ++ ++ config { ++ pins = "gpio115", "gpio116"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c3_default: qup-i2c3-default { ++ mux { ++ pins = "gpio119", "gpio120"; ++ function = "qup3"; ++ }; ++ ++ config { ++ pins = "gpio119", "gpio120"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c4_default: qup-i2c4-default { ++ mux { ++ pins = "gpio8", "gpio9"; ++ function = "qup4"; ++ }; ++ ++ config { ++ pins = "gpio8", "gpio9"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c5_default: qup-i2c5-default { ++ mux { ++ pins = "gpio12", "gpio13"; ++ function = "qup5"; ++ }; ++ ++ config { ++ pins = "gpio12", "gpio13"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c6_default: qup-i2c6-default { ++ mux { ++ pins = "gpio16", "gpio17"; ++ function = "qup6"; ++ }; ++ ++ config { ++ pins = "gpio16", "gpio17"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c7_default: qup-i2c7-default { ++ mux { ++ pins = "gpio20", "gpio21"; ++ function = "qup7"; ++ }; ++ ++ config { ++ pins = "gpio20", "gpio21"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c8_default: qup-i2c8-default { ++ mux { ++ pins = "gpio24", "gpio25"; ++ function = "qup8"; ++ }; ++ ++ config { ++ pins = "gpio24", "gpio25"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c9_default: qup-i2c9-default { ++ mux { ++ pins = "gpio125", "gpio126"; ++ function = "qup9"; ++ }; ++ ++ config { ++ pins = "gpio125", "gpio126"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c10_default: qup-i2c10-default { ++ mux { ++ pins = "gpio129", "gpio130"; ++ function = "qup10"; ++ }; ++ ++ config { ++ pins = "gpio129", "gpio130"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c11_default: qup-i2c11-default { ++ mux { ++ pins = "gpio60", "gpio61"; ++ function = "qup11"; ++ }; ++ ++ config { ++ pins = "gpio60", "gpio61"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c12_default: qup-i2c12-default { ++ mux { ++ pins = "gpio32", "gpio33"; ++ function = "qup12"; ++ }; ++ ++ config { ++ pins = "gpio32", "gpio33"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c13_default: qup-i2c13-default { ++ mux { ++ pins = "gpio36", "gpio37"; ++ function = "qup13"; ++ }; ++ ++ config { ++ pins = "gpio36", "gpio37"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c14_default: qup-i2c14-default { ++ mux { ++ pins = "gpio40", "gpio41"; ++ function = "qup14"; ++ }; ++ ++ config { ++ pins = "gpio40", "gpio41"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c15_default: qup-i2c15-default { ++ mux { ++ pins = "gpio44", "gpio45"; ++ function = "qup15"; ++ }; ++ ++ config { ++ pins = "gpio44", "gpio45"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c16_default: qup-i2c16-default { ++ mux { ++ pins = "gpio48", "gpio49"; ++ function = "qup16"; ++ }; ++ ++ config { ++ pins = "gpio48", "gpio49"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c17_default: qup-i2c17-default { ++ mux { ++ pins = "gpio52", "gpio53"; ++ function = "qup17"; ++ }; ++ ++ config { ++ pins = "gpio52", "gpio53"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c18_default: qup-i2c18-default { ++ mux { ++ pins = "gpio56", "gpio57"; ++ function = "qup18"; ++ }; ++ ++ config { ++ pins = "gpio56", "gpio57"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c19_default: qup-i2c19-default { ++ mux { ++ pins = "gpio0", "gpio1"; ++ function = "qup19"; ++ }; ++ ++ config { ++ pins = "gpio0", "gpio1"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi0_default: qup-spi0-default { ++ mux { ++ pins = "gpio28", "gpio29", ++ "gpio30", "gpio31"; ++ function = "qup0"; ++ }; ++ ++ config { ++ pins = "gpio28", "gpio29", ++ "gpio30", "gpio31"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi1_default: qup-spi1-default { ++ mux { ++ pins = "gpio4", "gpio5", ++ "gpio6", "gpio7"; ++ function = "qup1"; ++ }; ++ ++ config { ++ pins = "gpio4", "gpio5", ++ "gpio6", "gpio7"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi2_default: qup-spi2-default { ++ mux { ++ pins = "gpio115", "gpio116", ++ "gpio117", "gpio118"; ++ function = "qup2"; ++ }; ++ ++ config { ++ pins = "gpio115", "gpio116", ++ "gpio117", "gpio118"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi3_default: qup-spi3-default { ++ mux { ++ pins = "gpio119", "gpio120", ++ "gpio121", "gpio122"; ++ function = "qup3"; ++ }; ++ ++ config { ++ pins = "gpio119", "gpio120", ++ "gpio121", "gpio122"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi4_default: qup-spi4-default { ++ mux { ++ pins = "gpio8", "gpio9", ++ "gpio10", "gpio11"; ++ function = "qup4"; ++ }; ++ ++ config { ++ pins = "gpio8", "gpio9", ++ "gpio10", "gpio11"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi5_default: qup-spi5-default { ++ mux { ++ pins = "gpio12", "gpio13", ++ "gpio14", "gpio15"; ++ function = "qup5"; ++ }; ++ ++ config { ++ pins = "gpio12", "gpio13", ++ "gpio14", "gpio15"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi6_default: qup-spi6-default { ++ mux { ++ pins = "gpio16", "gpio17", ++ "gpio18", "gpio19"; ++ function = "qup6"; ++ }; ++ ++ config { ++ pins = "gpio16", "gpio17", ++ "gpio18", "gpio19"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi7_default: qup-spi7-default { ++ mux { ++ pins = "gpio20", "gpio21", ++ "gpio22", "gpio23"; ++ function = "qup7"; ++ }; ++ ++ config { ++ pins = "gpio20", "gpio21", ++ "gpio22", "gpio23"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi8_default: qup-spi8-default { ++ mux { ++ pins = "gpio24", "gpio25", ++ "gpio26", "gpio27"; ++ function = "qup8"; ++ }; ++ ++ config { ++ pins = "gpio24", "gpio25", ++ "gpio26", "gpio27"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi9_default: qup-spi9-default { ++ mux { ++ pins = "gpio125", "gpio126", ++ "gpio127", "gpio128"; ++ function = "qup9"; ++ }; ++ ++ config { ++ pins = "gpio125", "gpio126", ++ "gpio127", "gpio128"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi10_default: qup-spi10-default { ++ mux { ++ pins = "gpio129", "gpio130", ++ "gpio131", "gpio132"; ++ function = "qup10"; ++ }; ++ ++ config { ++ pins = "gpio129", "gpio130", ++ "gpio131", "gpio132"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi11_default: qup-spi11-default { ++ mux { ++ pins = "gpio60", "gpio61", ++ "gpio62", "gpio63"; ++ function = "qup11"; ++ }; ++ ++ config { ++ pins = "gpio60", "gpio61", ++ "gpio62", "gpio63"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi12_default: qup-spi12-default { ++ mux { ++ pins = "gpio32", "gpio33", ++ "gpio34", "gpio35"; ++ function = "qup12"; ++ }; ++ ++ config { ++ pins = "gpio32", "gpio33", ++ "gpio34", "gpio35"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi13_default: qup-spi13-default { ++ mux { ++ pins = "gpio36", "gpio37", ++ "gpio38", "gpio39"; ++ function = "qup13"; ++ }; ++ ++ config { ++ pins = "gpio36", "gpio37", ++ "gpio38", "gpio39"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi14_default: qup-spi14-default { ++ mux { ++ pins = "gpio40", "gpio41", ++ "gpio42", "gpio43"; ++ function = "qup14"; ++ }; ++ ++ config { ++ pins = "gpio40", "gpio41", ++ "gpio42", "gpio43"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi15_default: qup-spi15-default { ++ mux { ++ pins = "gpio44", "gpio45", ++ "gpio46", "gpio47"; ++ function = "qup15"; ++ }; ++ ++ config { ++ pins = "gpio44", "gpio45", ++ "gpio46", "gpio47"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi16_default: qup-spi16-default { ++ mux { ++ pins = "gpio48", "gpio49", ++ "gpio50", "gpio51"; ++ function = "qup16"; ++ }; ++ ++ config { ++ pins = "gpio48", "gpio49", ++ "gpio50", "gpio51"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi17_default: qup-spi17-default { ++ mux { ++ pins = "gpio52", "gpio53", ++ "gpio54", "gpio55"; ++ function = "qup17"; ++ }; ++ ++ config { ++ pins = "gpio52", "gpio53", ++ "gpio54", "gpio55"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi18_default: qup-spi18-default { ++ mux { ++ pins = "gpio56", "gpio57", ++ "gpio58", "gpio59"; ++ function = "qup18"; ++ }; ++ ++ config { ++ pins = "gpio56", "gpio57", ++ "gpio58", "gpio59"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi19_default: qup-spi19-default { ++ mux { ++ pins = "gpio0", "gpio1", ++ "gpio2", "gpio3"; ++ function = "qup19"; ++ }; ++ ++ config { ++ pins = "gpio0", "gpio1", ++ "gpio2", "gpio3"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; + }; + + timer@17c20000 { +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch new file mode 100644 index 00000000..1913a6f3 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch @@ -0,0 +1,29 @@ +From 6cdc941e6bf4df72844bd8b0fef2eff65d2c0726 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Thu, 4 Jun 2020 00:41:53 +0300 +Subject: [PATCH] arm64: dts: qcom: sm8250: change spmi node label + +PMIC dtsi files (pm8150*.dtsi) expect to have spmi_bus label, rather +than just spmi. Rename spmi label accordingly. + +Signed-off-by: Dmitry Baryshkov +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 1e2862bbfb11..9dd27aecdfda 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -991,7 +991,7 @@ pdc: interrupt-controller@b220000 { + interrupt-controller; + }; + +- spmi: qcom,spmi@c440000 { ++ spmi_bus: qcom,spmi@c440000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0x0 0x0c440000 0x0 0x0001100>, + <0x0 0x0c600000 0x0 0x2000000>, +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch new file mode 100644 index 00000000..278c9e58 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch @@ -0,0 +1,9 @@ +Index: git/arch/arm64/boot/dts/qcom/Makefile +=================================================================== +--- git.orig/arch/arm64/boot/dts/qcom/Makefile ++++ git/arch/arm64/boot/dts/qcom/Makefile +@@ -26,3 +26,4 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8150-mtp.dt + dtb-$(CONFIG_ARCH_QCOM) += sm8250-mtp.dtb + dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-1000.dtb + dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-4000.dtb ++dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5.dtb diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts new file mode 100644 index 00000000..09003dab --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts @@ -0,0 +1,760 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2020, Linaro Ltd. + */ + +/dts-v1/; + +#include +#include +#include "sm8250.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Robotics RB5"; + compatible = "qcom,qrb5165-rb5", "qcom,sm8250"; + + aliases { + serial0 = &uart12; + sdhc2 = &sdhc_2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + dc12v: dc12v-regulator { + compatible = "regulator-fixed"; + regulator-name = "DC12V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; + }; + + leds { + compatible = "gpio-leds"; + + user4 { + label = "green:user4"; + gpios = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "panic-indicator"; + default-state = "off"; + }; + + wlan { + label = "yellow:wlan"; + gpios = <&pm8150_gpios 9 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + + bt { + label = "blue:bt"; + gpios = <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "bluetooth-power"; + default-state = "off"; + }; + + }; + + vbat: vbat-regulator { + compatible = "regulator-fixed"; + regulator-name = "VBAT"; + + vin-supply = <&dc12v>; + regulator-min-microvolt = <4200000>; + regulator-max-microvolt = <4200000>; + regulator-always-on; + }; + + vbat_som: vbat-som-regulator { + compatible = "regulator-fixed"; + regulator-name = "VBAT_SOM"; + + vin-supply = <&dc12v>; + regulator-min-microvolt = <4200000>; + regulator-max-microvolt = <4200000>; + regulator-always-on; + }; + + vdc_3v3: vdc-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "VDC_3V3"; + vin-supply = <&dc12v>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdc_5v: vdc-5v-regulator { + compatible = "regulator-fixed"; + regulator-name = "VDC_5V"; + + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <500000>; + regulator-always-on; + vin-supply = <&vreg_l11c_3p3>; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + vreg_s4a_1p8: vreg-s4a-1p8 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <&vph_pwr>; + }; + + vreg_s6c_0p88: smpc6-regulator { + compatible = "regulator-fixed"; + regulator-name = "vreg_s6c_0p88"; + + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <&vph_pwr>; + }; +}; + +&apps_rsc { + pm8150-rpmh-regulators { + compatible = "qcom,pm8150-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-l2-l10-supply = <&vreg_bob>; + vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>; + vdd-l6-l9-supply = <&vreg_s8c_1p3>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>; + vdd-l13-l16-l17-supply = <&vreg_bob>; + + vreg_s5a_1p9: smps5 { + regulator-name = "vreg_s5a_1p9"; + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + }; + + vreg_s6a_0p95: smps6 { + regulator-name = "vreg_s6a_0p95"; + regulator-min-microvolt = <920000>; + regulator-max-microvolt = <1128000>; + regulator-initial-mode = ; + }; + + vreg_l2a_3p1: ldo2 { + regulator-name = "vreg_l2a_3p1"; + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = ; + }; + + vreg_l3a_0p9: ldo3 { + regulator-name = "vreg_l3a_0p9"; + regulator-min-microvolt = <928000>; + regulator-max-microvolt = <932000>; + regulator-initial-mode = ; + }; + + vreg_l5a_0p875: ldo5 { + regulator-name = "vreg_l5a_0p875"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = ; + }; + + vreg_l6a_1p2: ldo6 { + regulator-name = "vreg_l6a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l7a_1p7: ldo7 { + regulator-name = "vreg_l7a_1p7"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l9a_1p2: ldo9 { + regulator-name = "vreg_l9a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l10a_1p8: ldo10 { + regulator-name = "vreg_l10a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l12a_1p8: ldo12 { + regulator-name = "vreg_l12a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l13a_ts_3p0: ldo13 { + regulator-name = "vreg_l13a_ts_3p0"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + vreg_l14a_1p8: ldo14 { + regulator-name = "vreg_l14a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1880000>; + regulator-initial-mode = ; + }; + + vreg_l15a_11ad_io_1p8: ldo15 { + regulator-name = "vreg_l15a_11ad_io_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l16a_2p7: ldo16 { + regulator-name = "vreg_l16a_2p7"; + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l17a_3p0: ldo17 { + regulator-name = "vreg_l17a_3p0"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + + vreg_l18a_0p92: ldo18 { + regulator-name = "vreg_l18a_0p92"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <912000>; + regulator-initial-mode = ; + }; + }; + + pm8150l-rpmh-regulators { + compatible = "qcom,pm8150l-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-l1-l8-supply = <&vreg_s4a_1p8>; + vdd-l2-l3-supply = <&vreg_s8c_1p3>; + vdd-l4-l5-l6-supply = <&vreg_bob>; + vdd-l7-l11-supply = <&vreg_bob>; + vdd-l9-l10-supply = <&vreg_bob>; + vdd-bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-name = "vreg_bob"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <4000000>; + regulator-initial-mode = ; + }; + + vreg_s8c_1p3: smps8 { + regulator-name = "vreg_s8c_1p3"; + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + regulator-initial-mode = ; + }; + + vreg_l1c_1p8: ldo1 { + regulator-name = "vreg_l1c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l2c_1p2: ldo2 { + regulator-name = "vreg_l2c_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l3c_0p92: ldo3 { + regulator-name = "vreg_l3c_0p92"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = ; + }; + + vreg_l4c_1p7: ldo4 { + regulator-name = "vreg_l4c_1p7"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = ; + }; + + vreg_l5c_1p8: ldo5 { + regulator-name = "vreg_l5c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = ; + }; + + vreg_l6c_2p9: ldo6 { + regulator-name = "vreg_l6c_2p9"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l7c_cam_vcm0_2p85: ldo7 { + regulator-name = "vreg_l7c_cam_vcm0_2p85"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3104000>; + regulator-initial-mode = ; + }; + + vreg_l8c_1p8: ldo8 { + regulator-name = "vreg_l8c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l9c_2p9: ldo9 { + regulator-name = "vreg_l9c_2p9"; + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l10c_3p0: ldo10 { + regulator-name = "vreg_l10c_3p0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + }; + + vreg_l11c_3p3: ldo11 { + regulator-name = "vreg_l11c_3p3"; + regulator-min-microvolt = <3296000>; + regulator-max-microvolt = <3296000>; + regulator-initial-mode = ; + regulator-always-on; + }; + }; + + pm8009-rpmh-regulators { + compatible = "qcom,pm8009-rpmh-regulators"; + qcom,pmic-id = "f"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-l2-supply = <&vreg_s8c_1p3>; + vdd-l5-l6-supply = <&vreg_bob>; + vdd-l7-supply = <&vreg_s4a_1p8>; + + vreg_l1f_cam_dvdd1_1p1: ldo1 { + regulator-name = "vreg_l1f_cam_dvdd1_1p1"; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + regulator-initial-mode = ; + }; + + vreg_l2f_cam_dvdd0_1p2: ldo2 { + regulator-name = "vreg_l2f_cam_dvdd0_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l3f_cam_dvdd2_1p05: ldo3 { + regulator-name = "vreg_l3f_cam_dvdd2_1p05"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + regulator-initial-mode = ; + }; + + vreg_l5f_cam_avdd0_2p85: ldo5 { + regulator-name = "vreg_l5f_cam_avdd0_2p85"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-initial-mode = ; + }; + + vreg_l6f_cam_avdd1_2p85: ldo6 { + regulator-name = "vreg_l6f_cam_avdd1_2p85"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <2856000>; + regulator-initial-mode = ; + }; + + vreg_l7f_1p8: ldo7 { + regulator-name = "vreg_l7f_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + }; +}; + +/* LS-I2C0 */ +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; +}; + +/* LS-I2C1 */ +&i2c15 { + status = "okay"; +}; + +&pm8150_gpios { + gpio-reserved-ranges = <1 1>, <3 2>, <7 1>; + gpio-line-names = + "NC", + "OPTION2", + "PM_GPIO-F", + "PM_SLP_CLK_IN", + "OPTION1", + "VOL_UP_N", + "PM8250_GPIO7", /* Blue LED */ + "SP_ARI_PWR_ALARM", + "GPIO_9_P", /* Yellow LED */ + "GPIO_10_P"; /* Green LED */ +}; + +&pm8150b_gpios { + gpio-line-names = + "NC", + "NC", + "NC", + "NC", + "HAP_BOOST_EN", /* SOM */ + "SMB_STAT", /* SOM */ + "NC", + "NC", + "SDM_FORCE_USB_BOOT", + "NC", + "NC", + "NC"; +}; + +&pm8150l_gpios { + gpio-line-names = + "NC", + "PM3003A_EN", + "NC", + "NC", + "PM_GPIO5", /* HDMI RST_N */ + "PM_GPIO-A", /* PWM */ + "PM_GPIO7", + "NC", + "NC", + "PM_GPIO-B", + "NC", + "PM3003A_MODE"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +/* CAN */ +&spi0 { + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <40 4>; + gpio-line-names = + "GPIO-MM", + "GPIO-NN", + "GPIO-OO", + "GPIO-PP", + "GPIO-A", + "GPIO-C", + "GPIO-E", + "GPIO-D", + "I2C0-SDA", + "I2C0-SCL", + "GPIO-TT", /* GPIO_10 */ + "NC", + "GPIO_12_I2C_SDA", + "GPIO_13_I2C_SCL", + "GPIO-X", + "GPIO_15_RGMII_INT", + "HST_BT_UART_CTS", + "HST_BT_UART_RFR", + "HST_BT_UART_TX", + "HST_BT_UART_RX", + "HST_WLAN_EN", /* GPIO_20 */ + "HST_BT_EN", + "GPIO-AAA", + "GPIO-BBB", + "GPIO-CCC", + "GPIO-Z", + "GPIO-DDD", + "GPIO-BB", + "GPIO_28_CAN_SPI_MISO", + "GPIO_29_CAN_SPI_MOSI", + "GPIO_30_CAN_SPI_CLK", /* GPIO_30 */ + "GPIO_31_CAN_SPI_CS", + "GPIO-UU", + "NC", + "UART1_TXD_SOM", + "UART1_RXD_SOM", + "UART0_CTS", + "UART0_RTS", + "UART0_TXD", + "UART0_RXD", + "SPI1_MISO", /* GPIO_40 */ + "SPI1_MOSI", + "SPI1_CLK", + "SPI1_CS", + "I2C1_SDA", + "I2C1_SCL", + "GPIO-F", + "GPIO-JJ", + "Board_ID1", + "Board_ID2", + "NC", /* GPIO_50 */ + "NC", + "SPI0_MISO", + "SPI0_MOSI", + "SPI0_SCLK", + "SPI0_CS", + "GPIO-QQ", + "GPIO-RR", + "USB2LAN_RESET", + "USB2LAN_EXTWAKE", + "NC", /* GPIO_60 */ + "NC", + "NC", + "LT9611_INT", + "GPIO-AA", + "USB_CC_DIR", + "GPIO-G", + "GPIO-LL", + "USB_DP_HPD_1P8", + "NC", + "NC", /* GPIO_70 */ + "SD_CMD", + "SD_DAT3", + "SD_SCLK", + "SD_DAT2", + "SD_DAT1", + "SD_DAT0", /* BOOT_CFG3 */ + "SD_UFS_CARD_DET_N", + "GPIO-II", + "PCIE0_RST_N", + "PCIE0_CLK_REQ_N", /* GPIO_80 */ + "PCIE0_WAKE_N", + "GPIO-CC", + "GPIO-DD", + "GPIO-EE", + "GPIO-FF", + "GPIO-GG", + "GPIO-HH", + "GPIO-VV", + "GPIO-WW", + "NC", /* GPIO_90 */ + "NC", + "GPIO-K", + "GPIO-I", + "CSI0_MCLK", + "CSI1_MCLK", + "CSI2_MCLK", + "CSI3_MCLK", + "GPIO-AA", /* CSI4_MCLK */ + "GPIO-BB", /* CSI5_MCLK */ + "GPIO-KK", /* GPIO_100 */ + "CCI_I2C_SDA0", + "CCI_I2C_SCL0", + "CCI_I2C_SDA1", + "CCI_I2C_SCL1", + "CCI_I2C_SDA2", + "CCI_I2C_SCL2", + "CCI_I2C_SDA3", + "CCI_I2C_SCL3", + "GPIO-L", + "NC", /* GPIO_110 */ + "NC", + "ACCEL_INT", + "GYRO_INT", + "GPIO-J", + "GPIO-YY", + "GPIO-H", + "GPIO-ZZ", + "NC", + "NC", + "NC", /* GPIO_120 */ + "NC", + "MAG_INT", + "MAG_DRDY_INT", + "HST_SW_CTRL", + "GPIO-M", + "GPIO-N", + "GPIO-O", + "GPIO-P", + "PS_INT", + "WSA1_EN", /* GPIO_130 */ + "USB_HUB_RESET", + "SDM_FORCE_USB_BOOT", + "I2S1_CLK_HDMI", + "I2S1_DATA0_HDMI", + "I2S1_WS_HDMI", + "GPIO-B", + "GPIO_137", /* To LT9611_I2S_MCLK_3V3 */ + "PCM_CLK", + "PCM_DI", + "PCM_DO", /* GPIO_140 */ + "PCM_FS", + "HST_SLIM_CLK", + "HST_SLIM_DATA", + "GPIO-U", + "GPIO-Y", + "GPIO-R", + "GPIO-Q", + "GPIO-S", + "GPIO-T", + "GPIO-V", /* GPIO_150 */ + "GPIO-W", + "DMIC_CLK1", + "DMIC_DATA1", + "DMIC_CLK2", + "DMIC_DATA2", + "WSA_SWR_CLK", + "WSA_SWR_DATA", + "DMIC_CLK3", + "DMIC_DATA3", + "I2C4_SDA", /* GPIO_160 */ + "I2C4_SCL", + "SPI3_CS1", + "SPI3_CS2", + "SPI2_MISO_LS3", + "SPI2_MOSI_LS3", + "SPI2_CLK_LS3", + "SPI2_ACCEL_CS_LS3", + "SPI2_CS1", + "NC", + "GPIO-SS", /* GPIO_170 */ + "GPIO-XX", + "SPI3_MISO", + "SPI3_MOSI", + "SPI3_CLK", + "SPI3_CS", + "HST_BLE_SNS_UART_TX", + "HST_BLE_SNS_UART_RX", + "HST_WLAN_UART_TX", + "HST_WLAN_UART_RX"; +}; + +&uart12 { + status = "okay"; +}; + +&ufs_mem_hc { + status = "okay"; + + vcc-supply = <&vreg_l17a_3p0>; + vcc-max-microamp = <800000>; + vccq-supply = <&vreg_l6a_1p2>; + vccq-max-microamp = <800000>; + vccq2-supply = <&vreg_s4a_1p8>; + vccq2-max-microamp = <800000>; +}; + +&ufs_mem_phy { + status = "okay"; + + vdda-phy-supply = <&vreg_l5a_0p875>; + vdda-max-microamp = <89900>; + vdda-pll-supply = <&vreg_l9a_1p2>; + vdda-pll-max-microamp = <18800>; +}; + +&usb_1 { + status = "okay"; +}; + +&usb_1_dwc3 { + dr_mode = "peripheral"; +}; + +&usb_1_hsphy { + status = "okay"; + + vdda-pll-supply = <&vreg_l5a_0p875>; + vdda33-supply = <&vreg_l2a_3p1>; + vdda18-supply = <&vreg_l12a_1p8>; +}; + +&usb_1_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vreg_l9a_1p2>; + vdda-pll-supply = <&vreg_l18a_0p92>; +}; + +&usb_2 { + status = "okay"; +}; + +&usb_2_dwc3 { + dr_mode = "host"; +}; + +&usb_2_hsphy { + status = "okay"; + + vdda-pll-supply = <&vreg_l5a_0p875>; + vdda33-supply = <&vreg_l2a_3p1>; + vdda18-supply = <&vreg_l12a_1p8>; +}; + +&usb_2_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vreg_l9a_1p2>; + vdda-pll-supply = <&vreg_l18a_0p92>; +}; diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb new file mode 100644 index 00000000..82cf263b --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb @@ -0,0 +1,24 @@ +# Copyright (C) 2014-2020 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) +# +# This recipe is disabled by default. +# To enable it add the following line to conf/local.conf: +# PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-qcomlt-dev" + +DESCRIPTION = "Linaro Qualcomm Landing team Integration Kernel ${PV}" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +SRCBRANCH ?= "integration-linux-qcomlt" +SRCREV ?= "${AUTOREV}" + +LINUX_VERSION = "5.8-rc+" +PV = "${LINUX_VERSION}+git${SRCPV}" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" + +# Disable by default +DEFAULT_PREFERENCE = "-1" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb index 40b202f4..1cc27c72 100644 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb @@ -4,8 +4,6 @@ DESCRIPTION = "Linaro Qualcomm Landing team 4.14 Kernel" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -inherit pythonnative - require recipes-kernel/linux/linux-linaro-qcom.inc require recipes-kernel/linux/linux-qcom-bootimg.inc diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb deleted file mode 100644 index 5f915b64..00000000 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2014-2019 Linaro -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Linaro Qualcomm Landing team 5.1 Kernel" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -inherit pythonnative - -require recipes-kernel/linux/linux-linaro-qcom.inc -require recipes-kernel/linux/linux-qcom-bootimg.inc - -LOCALVERSION ?= "-linaro-lt-qcom" -SRCBRANCH ?= "release/db845c/qcomlt-5.1" -SRCREV ?= "5f45ef7de008123ffcc5d2433545e97861e19bcf" - -COMPATIBLE_MACHINE = "(sdm845)" - -# Wifi firmware has a recognizable arch :( -ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb new file mode 100644 index 00000000..77dfbcde --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb @@ -0,0 +1,17 @@ +# Copyright (C) 2014-2019 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Linaro Qualcomm Landing team 5.2 Kernel" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +LOCALVERSION ?= "-linaro-lt-qcom" +SRCBRANCH ?= "release/db845c/qcomlt-5.2" +SRCREV ?= "13e8268d9b5cf3980b6e2766bf00439001c363fd" + +COMPATIBLE_MACHINE = "(sdm845|qcs404)" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb new file mode 100644 index 00000000..83074c10 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb @@ -0,0 +1,17 @@ +# Copyright (C) 2014-2019 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Linaro Qualcomm Landing team 5.4 Kernel" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +LOCALVERSION ?= "-linaro-lt-qcom" +SRCBRANCH ?= "release/qcomlt-5.4" +SRCREV ?= "e2db8e82634bd73bce5ce1e447720756777ca432" + +COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845)" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb new file mode 100644 index 00000000..cfc879e9 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb @@ -0,0 +1,29 @@ +# Copyright (C) 2014-2019 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Linaro Qualcomm Landing team 5.7 Kernel" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit python3native + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +SRC_URI_append_qrb5165-rb5 = " \ + file://qrb5165-rb5.dts;subdir=git/arch/arm64/boot/dts/qcom \ + file://qrb5165-rb5-enable.patch \ + file://0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch \ + file://0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch \ + file://0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch \ + file://0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch \ + file://0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch \ +" + +LOCALVERSION ?= "-linaro-lt-qcom" +SRCBRANCH ?= "release/qcomlt-5.7" +SRCREV ?= "21bb88052948b35bdce926f301f2ba7970040812" + +COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845|sm8250)" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc b/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc index 7290f27a..5177feb1 100644 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc @@ -4,12 +4,12 @@ QCOM_BOOTIMG_ROOTFS ?= "undefined" SD_QCOM_BOOTIMG_ROOTFS ?= "undefined" # set output file names -DT_IMAGE_BASE_NAME = "dt-${KERNEL_IMAGE_NAME}" -DT_IMAGE_SYMLINK_NAME = "dt-${KERNEL_IMAGE_LINK_NAME}" BOOT_IMAGE_BASE_NAME = "boot-${KERNEL_IMAGE_NAME}" BOOT_IMAGE_SYMLINK_NAME = "boot-${KERNEL_IMAGE_LINK_NAME}" SD_BOOT_IMAGE_BASE_NAME = "boot-sd${KERNEL_IMAGE_NAME}" SD_BOOT_IMAGE_SYMLINK_NAME = "boot-sd-${KERNEL_IMAGE_LINK_NAME}" +KERNEL_CMDLINE = "root=/dev/${1} rw rootwait console=${ttydev},${baudrate}n8" +KERNEL_CMDLINE_append_dragonboard-845c = " clk_ignore_unused pd_ignore_unused" # param ${1} partition where rootfs is located # param ${2} output boot image file name @@ -17,23 +17,13 @@ priv_make_image() { ${STAGING_BINDIR_NATIVE}/skales/mkbootimg --kernel ${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} \ --ramdisk ${B}/initrd.img \ --output ${DEPLOYDIR}/${2}.img \ - $mkbootimg_dtarg \ --pagesize ${QCOM_BOOTIMG_PAGE_SIZE} \ --base ${QCOM_BOOTIMG_KERNEL_BASE} \ - --cmdline \ - "root=/dev/${1} rw rootwait console=${ttydev},${baudrate}n8" + --cmdline "${KERNEL_CMDLINE}" } do_deploy_append() { - mkbootimg_dtarg="" - if [ "${QCOM_BOOTIMG_BUNDLE_DT}" = "1" ]; then - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${STAGING_LIBDIR_NATIVE}" - ${STAGING_BINDIR_NATIVE}/skales/dtbTool -o ${DEPLOYDIR}/${DT_IMAGE_BASE_NAME}.img -s ${QCOM_BOOTIMG_PAGE_SIZE} ${B}/arch/${ARCH}/boot/dts/qcom/ - mkbootimg_dtarg="--dt ${DEPLOYDIR}/${DT_IMAGE_BASE_NAME}.img" - ln -sf ${DT_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${DT_IMAGE_SYMLINK_NAME}.img - fi - tmp="${SERIAL_CONSOLES}" baudrate=`echo $tmp | sed 's/\;.*//'` ttydev=`echo $tmp | sed -e 's/^[0-9]*\;//' -e 's/\s.*//' -e 's/\;.*//'` diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch new file mode 100644 index 00000000..d8bd3a36 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch @@ -0,0 +1,123 @@ +From 816bd950c67f114068761cb311a8185cd2c3f6dd Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 15:12:57 +0100 +Subject: [PATCH 1/4] ucm2: codecs: wcd934x: Add Codec sequences. + +Add WCD934x codec sequences to be used by other platforms like DB845c +and Lenovo YOGA C630 + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/codecs/wcd934x/DefaultDisableSeq.conf | 5 +++++ + ucm2/codecs/wcd934x/DefaultEnableSeq.conf | 14 ++++++++++++++ + ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf | 6 ++++++ + ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf | 6 ++++++ + ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf | 2 ++ + ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf | 3 +++ + ucm2/codecs/wcd934x/SpeakerDisableSeq.conf | 4 ++++ + ucm2/codecs/wcd934x/SpeakerEnableSeq.conf | 4 ++++ + 8 files changed, 44 insertions(+) + create mode 100644 ucm2/codecs/wcd934x/DefaultDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/DefaultEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/SpeakerDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/SpeakerEnableSeq.conf + +diff --git a/ucm2/codecs/wcd934x/DefaultDisableSeq.conf b/ucm2/codecs/wcd934x/DefaultDisableSeq.conf +new file mode 100644 +index 0000000..88d82a3 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/DefaultDisableSeq.conf +@@ -0,0 +1,5 @@ ++cset "name='RX INT7_1 MIX1 INP0' ZERO" ++cset "name='RX INT8_1 MIX1 INP0' ZERO" ++cset "name='RX INT1_2 MUX' ZERO" ++cset "name='RX INT2_2 MUX' ZERO" ++cset "name='CDC_IF TX0 MUX' ZERO" +diff --git a/ucm2/codecs/wcd934x/DefaultEnableSeq.conf b/ucm2/codecs/wcd934x/DefaultEnableSeq.conf +new file mode 100644 +index 0000000..e5bdbbd +--- /dev/null ++++ b/ucm2/codecs/wcd934x/DefaultEnableSeq.conf +@@ -0,0 +1,14 @@ ++cset "name='SLIM RX1 MUX' AIF1_PB" ++cset "name='SLIM RX2 MUX' AIF1_PB" ++cset "name='SLIM RX6 MUX' ZERO" ++cset "name='SLIM RX7 MUX' ZERO" ++cset "name='SLIM RX3 MUX' ZERO" ++cset "name='SLIM RX4 MUX' ZERO" ++cset "name='SLIM RX5 MUX' ZERO" ++cset "name='AIF1_CAP Mixer SLIM TX0' 1" ++ ++cset "name='RX INT7_1 MIX1 INP0' RX1" ++cset "name='RX INT8_1 MIX1 INP0' RX2" ++cset "name='RX INT1_2 MUX' RX1" ++cset "name='RX INT2_2 MUX' RX2" ++cset "name='CDC_IF TX0 MUX' DEC0" +diff --git a/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf +new file mode 100644 +index 0000000..0206e87 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf +@@ -0,0 +1,6 @@ ++cset "name='COMP1 Switch' 0" ++cset "name='COMP2 Switch' 0" ++cset "name='RX1 Digital Volume' 0" ++cset "name='RX2 Digital Volume' 0" ++cset "name='RX INT1 DEM MUX' ZERO" ++cset "name='RX INT2 DEM MUX' ZERO" +diff --git a/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf +new file mode 100644 +index 0000000..5ce7950 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf +@@ -0,0 +1,6 @@ ++cset "name='COMP1 Switch' 1" ++cset "name='COMP2 Switch' 1" ++cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT" ++cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT" ++cset "name='RX1 Digital Volume' 68" ++cset "name='RX2 Digital Volume' 68" +diff --git a/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf +new file mode 100644 +index 0000000..5558446 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf +@@ -0,0 +1,2 @@ ++cset "name='AMIC MUX0' ZERO" ++cset "name='ADC2 Volume' 0" +diff --git a/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf +new file mode 100644 +index 0000000..ad43830 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf +@@ -0,0 +1,3 @@ ++cset "name='AMIC MUX0' ADC2" ++cset "name='ADC2 Volume' 12" ++cset "name='ADC MUX0' AMIC" +diff --git a/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf b/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf +new file mode 100644 +index 0000000..3c977c8 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf +@@ -0,0 +1,4 @@ ++cset "name='RX7 Digital Volume' 0" ++cset "name='RX8 Digital Volume' 0" ++cset "name='COMP7 Switch' 0" ++cset "name='COMP8 Switch' 0" +diff --git a/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf b/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf +new file mode 100644 +index 0000000..2d9a3d8 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf +@@ -0,0 +1,4 @@ ++cset "name='COMP7 Switch' 1" ++cset "name='COMP8 Switch' 1" ++cset "name='RX7 Digital Volume' 80" ++cset "name='RX8 Digital Volume' 80" +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch new file mode 100644 index 00000000..6bdeeb96 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch @@ -0,0 +1,64 @@ +From 81689f1b4b8b511cc51a7dee4a3151b6fcb8cd2c Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 15:12:58 +0100 +Subject: [PATCH 2/4] ucm2: codecs: wsa881x: add codec sequences + +Add default, enable/disable codec sequence for wsa881x codec + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/codecs/wsa881x/DefaultEnableSeq.conf | 8 ++++++++ + ucm2/codecs/wsa881x/SpeakerDisableSeq.conf | 8 ++++++++ + ucm2/codecs/wsa881x/SpeakerEnableSeq.conf | 10 ++++++++++ + 3 files changed, 26 insertions(+) + create mode 100644 ucm2/codecs/wsa881x/DefaultEnableSeq.conf + create mode 100644 ucm2/codecs/wsa881x/SpeakerDisableSeq.conf + create mode 100644 ucm2/codecs/wsa881x/SpeakerEnableSeq.conf + +diff --git a/ucm2/codecs/wsa881x/DefaultEnableSeq.conf b/ucm2/codecs/wsa881x/DefaultEnableSeq.conf +new file mode 100644 +index 0000000..499342b +--- /dev/null ++++ b/ucm2/codecs/wsa881x/DefaultEnableSeq.conf +@@ -0,0 +1,8 @@ ++cset "name='SpkrLeft COMP Switch' 1" ++cset "name='SpkrLeft BOOST Switch' 1" ++cset "name='SpkrLeft DAC Switch' 1" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrRight COMP Switch' 1" ++cset "name='SpkrRight BOOST Switch' 1" ++cset "name='SpkrRight DAC Switch' 1" ++cset "name='SpkrRight VISENSE Switch' 0" +diff --git a/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf b/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf +new file mode 100644 +index 0000000..9614422 +--- /dev/null ++++ b/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf +@@ -0,0 +1,8 @@ ++cset "name='SpkrLeft COMP Switch' 0" ++cset "name='SpkrLeft BOOST Switch' 0" ++cset "name='SpkrLeft DAC Switch' 0" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrRight COMP Switch' 0" ++cset "name='SpkrRight BOOST Switch' 0" ++cset "name='SpkrRight DAC Switch' 0" ++cset "name='SpkrRight VISENSE Switch' 0" +diff --git a/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf b/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf +new file mode 100644 +index 0000000..31c27f3 +--- /dev/null ++++ b/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf +@@ -0,0 +1,10 @@ ++cset "name='SpkrLeft COMP Switch' 1" ++cset "name='SpkrLeft BOOST Switch' 1" ++cset "name='SpkrLeft DAC Switch' 1" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrLeft PA Volume' 12" ++cset "name='SpkrRight COMP Switch' 1" ++cset "name='SpkrRight BOOST Switch' 1" ++cset "name='SpkrRight DAC Switch' 1" ++cset "name='SpkrRight VISENSE Switch' 0" ++cset "name='SpkrRight PA Volume' 12" +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch new file mode 100644 index 00000000..caa67419 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch @@ -0,0 +1,129 @@ +From b225c35639a76b07f90c4bc310b9d4c057d8ae42 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 15:12:59 +0100 +Subject: [PATCH 3/4] ucm2: DB845c: Add ucm for DB845c board + +DB845c board by default has two WSA881x speakers and HDMI +audio connections. + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/DB845c/DB845c.conf | 11 ++++++++++ + ucm2/DB845c/HDMI.conf | 33 +++++++++++++++++++++++++++++ + ucm2/DB845c/HiFi.conf | 46 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 90 insertions(+) + create mode 100644 ucm2/DB845c/DB845c.conf + create mode 100644 ucm2/DB845c/HDMI.conf + create mode 100644 ucm2/DB845c/HiFi.conf + +diff --git a/ucm2/DB845c/DB845c.conf b/ucm2/DB845c/DB845c.conf +new file mode 100644 +index 0000000..bfd1ee5 +--- /dev/null ++++ b/ucm2/DB845c/DB845c.conf +@@ -0,0 +1,11 @@ ++Syntax 2 ++ ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "HiFi quality Music." ++} ++ ++SectionUseCase."HDMI" { ++ File "HDMI.conf" ++ Comment "HDMI output." ++} +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +new file mode 100644 +index 0000000..fe1045c +--- /dev/null ++++ b/ucm2/DB845c/HDMI.conf +@@ -0,0 +1,33 @@ ++# Use case configuration for DB845c board. ++# Author: Srinivas Kandagatla ++ ++SectionVerb { ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1" ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 0" ++ ] ++ Value { ++ TQ "HiFi" ++ PlaybackPCM "hw:${CardId}" ++ } ++} ++ ++SectionDevice."HDMI-stereo" { ++ #Name "HDMI-stereo" ++ Comment "HDMI Digital Stereo Output" ++ ++ EnableSequence [ ++ ] ++ ++ DisableSequence [ ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ } ++} +diff --git a/ucm2/DB845c/HiFi.conf b/ucm2/DB845c/HiFi.conf +new file mode 100644 +index 0000000..f88e8ec +--- /dev/null ++++ b/ucm2/DB845c/HiFi.conf +@@ -0,0 +1,46 @@ ++# Use case configuration for DB845c. ++# Author: Srinivas Kandagatla ++ ++SectionVerb { ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 1" ++ ++ ++ ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 0" ++ ] ++ ++ Value { ++ TQ "HiFi" ++ } ++} ++ ++SectionDevice."Speaker" { ++ Comment "Speaker playback" ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ ++ ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ ++ ++ ] ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId},1" ++ PlaybackVolume "RX1 Digital Volume" ++ PlaybackVolume "RX2 Digital Volume" ++ } ++} +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch new file mode 100644 index 00000000..c415af73 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch @@ -0,0 +1,135 @@ +From 0c817e5a484960787d4cf46ba18cfcbca40ff8b2 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 15:13:00 +0100 +Subject: [PATCH 4/4] ucm2: Add ucm for Lenovo-YOGA-C630-13Q50 laptop + +This laptop has by 2 WSA Smart speakers over Soundwire and 3.5mm +headset audio connection. + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf | 98 +++++++++++++++++++ + .../Lenovo-YOGA-C630-13Q50.conf | 6 ++ + 2 files changed, 104 insertions(+) + create mode 100644 ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf + create mode 100644 ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf + +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +new file mode 100644 +index 0000000..0bd68f0 +--- /dev/null ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +@@ -0,0 +1,98 @@ ++# Use case configuration for LenovoYOGAC6301. ++# Author: Srinivas Kandagatla ++ ++SectionVerb { ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1" ++ cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 1" ++ ++ ++ ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0" ++ cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 0" ++ ] ++ ++ Value { ++ TQ "HiFi" ++ } ++} ++ ++SectionDevice."Speaker" { ++ Comment "Speaker playback" ++ ++ ConflictingDevice [ ++ "Headphones" ++ ] ++ ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ ++ ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ ++ ++ ] ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId}" ++ PlaybackVolume "RX7 Digital Volume" ++ PlaybackVolume "RX8 Digital Volume" ++ } ++} ++ ++SectionDevice."Headphones" { ++ Comment "Headphones playback" ++ ++ ConflictingDevice [ ++ "Speaker" ++ ] ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ PlaybackVolume "RX1 Digital Volume" ++ PlaybackVolume "RX2 Digital Volume" ++ } ++} ++ ++SectionDevice."Mic" { ++ Comment "Mic" ++ ++ EnableSequence [ ++ ++ ] ++ ++ DisableSequence [ ++ ++ cset "name='AMIC MUX0' ZERO" ++ cset "name='ADC2 Volume' 0" ++ ] ++ ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId},1" ++ CaptureVolume "ADC2 Volume" ++ } ++} +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf b/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf +new file mode 100644 +index 0000000..114466a +--- /dev/null ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf +@@ -0,0 +1,6 @@ ++Syntax 2 ++ ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "HiFi Music." ++} +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch new file mode 100644 index 00000000..56682a38 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch @@ -0,0 +1,61 @@ +From 9353445dab6c863dd031161fa37009e4bba31821 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 17:20:26 +0100 +Subject: [PATCH 5/6] ucm2: Lenovo-YOGA-C630: remove cdev which is already + present in ucm2 + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +index 0bd68f0..39e91f4 100644 +--- a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +@@ -4,7 +4,6 @@ + SectionVerb { + + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1" + cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 1" + +@@ -13,7 +12,6 @@ SectionVerb { + ] + + DisableSequence [ +- cdev "hw:${CardId}" + + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0" + cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 0" +@@ -33,13 +31,11 @@ SectionDevice."Speaker" { + + + EnableSequence [ +- cdev "hw:${CardId}" + + + ] + + DisableSequence [ +- cdev "hw:${CardId}" + + + ] +@@ -60,12 +56,10 @@ SectionDevice."Headphones" { + ] + + EnableSequence [ +- cdev "hw:${CardId}" + + ] + + DisableSequence [ +- cdev "hw:${CardId}" + + ] + +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch new file mode 100644 index 00000000..6ed85d4b --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch @@ -0,0 +1,66 @@ +From 604914c07ffb10946711c2e5ca95d3a9bb6ad399 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Mon, 1 Jun 2020 17:20:25 +0100 +Subject: [PATCH 6/6] ucm2: DB845c: remove cdev which is already present in + ucm2 + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/DB845c/HDMI.conf | 2 -- + ucm2/DB845c/HiFi.conf | 4 ---- + 2 files changed, 6 deletions(-) + +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +index fe1045c..5a0a933 100644 +--- a/ucm2/DB845c/HDMI.conf ++++ b/ucm2/DB845c/HDMI.conf +@@ -3,12 +3,10 @@ + + SectionVerb { + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1" + ] + + DisableSequence [ +- cdev "hw:${CardId}" + cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 0" + ] + Value { +diff --git a/ucm2/DB845c/HiFi.conf b/ucm2/DB845c/HiFi.conf +index f88e8ec..ef7c341 100644 +--- a/ucm2/DB845c/HiFi.conf ++++ b/ucm2/DB845c/HiFi.conf +@@ -4,7 +4,6 @@ + SectionVerb { + + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 1" + + +@@ -12,7 +11,6 @@ SectionVerb { + ] + + DisableSequence [ +- cdev "hw:${CardId}" + + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 0" + ] +@@ -26,13 +24,11 @@ SectionDevice."Speaker" { + Comment "Speaker playback" + + EnableSequence [ +- cdev "hw:${CardId}" + + + ] + + DisableSequence [ +- cdev "hw:${CardId}" + + + ] +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch new file mode 100644 index 00000000..b148078a --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch @@ -0,0 +1,33 @@ +From 1448e9df35c7773e197c868a9463e9edfc7b1998 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla +Date: Tue, 2 Jun 2020 10:23:54 +0100 +Subject: [PATCH 7/7] ucm2: DB845c: HDMI: update cdev to correct value + +Signed-off-by: Srinivas Kandagatla +--- + ucm2/DB845c/HDMI.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +index 5a0a933..c233cef 100644 +--- a/ucm2/DB845c/HDMI.conf ++++ b/ucm2/DB845c/HDMI.conf +@@ -11,7 +11,6 @@ SectionVerb { + ] + Value { + TQ "HiFi" +- PlaybackPCM "hw:${CardId}" + } + } + +@@ -26,6 +25,7 @@ SectionDevice."HDMI-stereo" { + ] + + Value { ++ PlaybackPCM "hw:${CardId},0" + PlaybackPriority 200 + } + } +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend new file mode 100644 index 00000000..0c346e47 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_sdm845 = " \ + file://0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch \ + file://0002-ucm2-codecs-wsa881x-add-codec-sequences.patch \ + file://0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch \ + file://0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch \ + file://0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch \ + file://0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch \ + file://0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch \ +" diff --git a/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..44a86ff9 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,3 @@ +do_install_append() { + sed -i "s|^load-module module-udev-detect|load-module module-udev-detect tsched=0|" ${D}${sysconfdir}/pulse/default.pa +} diff --git a/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb b/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb new file mode 100644 index 00000000..3aa67a79 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb @@ -0,0 +1,15 @@ +HOMEPAGE = "https://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git" +SUMMARY = "Qualcomm FastRPC applications and library" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://src/fastrpc_apps_user.c;beginline=1;endline=29;md5=f94f3a7beba14ae2f59f817e9634f891" + +SRCREV = "388d868b3146fa7ccbeb6aa8c71485ebbbf5e1b9" +SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +inherit autotools diff --git a/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..de3fea87 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,29 @@ +From 874dadf1168f8a1b2b1bd4ab5bb4a20097147ab0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 28 May 2020 08:01:37 -0700 +Subject: [PATCH] pd-mapper: Include limits.h for PATH_MAX + +Fixes +pd-mapper.c:199:22: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? + +Upstream-Status: Submitted [https://github.com/andersson/pd-mapper/pull/4] +Signed-off-by: Khem Raj +--- + pd-mapper.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pd-mapper.c b/pd-mapper.c +index 45177ae..f5d45ee 100644 +--- a/pd-mapper.c ++++ b/pd-mapper.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.26.2 + diff --git a/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb new file mode 100644 index 00000000..9e5ca116 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Qualcomm pd-mapper application" +HOMEPAGE = "https://github.com/andersson/pd-mapper.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c5d4ab97bca4e843c5afdbf78aa5fdee" + +DEPENDS = "qrtr" + +inherit systemd + +SRCREV = "ab5074fdd5e4130578aa4c99b00d44527a79636f" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch \ +" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS} -Wl,-lqrtr'" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system +} + +SYSTEMD_SERVICE_${PN} = "pd-mapper.service" +RDEPENDS_${PN} += "qrtr" diff --git a/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service b/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service deleted file mode 100644 index e2f1952a..00000000 --- a/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=QRTR service -After=systemd-remount-fs.service - -[Service] -ExecStartPre=/usr/bin/qrtr-cfg 1 -ExecStart=/usr/bin/qrtr-ns -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb b/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb index e5e74636..51c342b0 100644 --- a/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb +++ b/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb @@ -7,9 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=15329706fbfcb5fc5edcc1bc7c139da5" inherit systemd -SRCREV = "a1694a1c938fdcd047553841370ebe2cd7384299" +SRCREV = "7bd5cf302437755b0d741c9dc1805395a9654597" SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https" -SRC_URI += "file://qrtr.service" PV = "0.0+${SRCPV}" @@ -18,14 +17,7 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS}'" do_install () { - oe_runmake install DESTDIR=${D} - - sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/qrtr.service - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/qrtr.service ${D}${systemd_unitdir}/system + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system } -SYSTEMD_SERVICE_${PN} = "qrtr.service" - -PACKAGES =+ "qrtr-apps" -FILES_qrtr-apps = "${bindir}/*" +SYSTEMD_SERVICE_${PN} = "qrtr-ns.service" diff --git a/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service b/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service deleted file mode 100644 index 2002fd6d..00000000 --- a/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=RMTFS setup -After=systemd-remount-fs.service qrtr.service -Requires=qrtr.service - -[Service] -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs1 ] && dd if=/dev/zero of=/boot/modem_fs1 bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs2 ] && dd if=/dev/zero of=/boot/modem_fs2 bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsc ] && dd if=/dev/zero of=/boot/modem_fsc bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsg ] && dd if=/dev/zero of=/boot/modem_fsg bs=1M count=2 || :" -ExecStart=/usr/bin/rmtfs -v -ExecStartPost=/bin/sh -c "[ -d /sys/bus/platform/devices/*.hexagon ] && modprobe qcom_q6v5_pil" - -[Install] -WantedBy=multi-user.target diff --git a/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb b/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb index 2e79bc04..86553467 100644 --- a/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb +++ b/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb @@ -7,23 +7,18 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ca25dbf5ebfc1a058bfc657c895aac2f" inherit systemd -SRCREV = "0d3c49ec5aa27517afec9f18a3afc4b0800e6cbb" +SRCREV = "dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1" SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https" -SRC_URI += "file://rmtfs.service" DEPENDS = "qmic-native qrtr udev" PV = "0.0+${SRCPV}" S = "${WORKDIR}/git" -EXTRA_OEMAKE = "'LDFLAGS=${TARGET_LDFLAGS} -L${STAGING_LIBDIR} -lqrtr -ludev'" +EXTRA_OEMAKE = "'LDFLAGS=${TARGET_LDFLAGS} -L${STAGING_LIBDIR} -lqrtr -ludev -lpthread'" do_install () { - oe_runmake install DESTDIR=${D} prefix=${prefix} - - sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/rmtfs.service - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/rmtfs.service ${D}${systemd_unitdir}/system + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system } SYSTEMD_SERVICE_${PN} = "rmtfs.service" diff --git a/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..5a58c586 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,25 @@ +From c21250e08cc5e6815340244693437e6372b5eca4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 Nov 2019 17:52:33 -0800 +Subject: [PATCH] include limits.h for PATH_MAX + +Signed-off-by: Khem Raj +--- + translate.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/translate.c b/translate.c +index 34c419e..e95dee5 100644 +--- a/translate.c ++++ b/translate.c +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.24.0 + diff --git a/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb new file mode 100644 index 00000000..8973434b --- /dev/null +++ b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Qualcomm tqftpserv application" +HOMEPAGE = "https://github.com/andersson/tqftpserv.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=424e013ed97b36284f3b9ce27bb16a56" + +DEPENDS = "qrtr" + +inherit systemd + +SRCREV = "fe53d2a810abe0e1ee7cc0bb20fd520dc6605ecb" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-include-limits.h-for-PATH_MAX.patch \ +" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS} -Wl,-lqrtr'" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system +} + +SYSTEMD_SERVICE_${PN} = "tqftpserv.service" +RDEPENDS_${PN} += "qrtr" diff --git a/bsp/meta-qcom/recipes-test/diag/diag_git.bb b/bsp/meta-qcom/recipes-test/diag/diag_git.bb index 3fa45293..a0e90233 100644 --- a/bsp/meta-qcom/recipes-test/diag/diag_git.bb +++ b/bsp/meta-qcom/recipes-test/diag/diag_git.bb @@ -7,7 +7,7 @@ SRC_URI = "git://github.com/andersson/diag.git;protocol=https \ " PV = "0.0+git${SRCPV}" -SRCREV = "5ef6b6b0c50047be3dd456d91d9a6dd730ba99e2" +SRCREV = "cc5dc0dec3f584d4a500fa36b983e6e77a98e478" S = "${WORKDIR}/git" diff --git a/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb b/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb index 83ef315b..8497ec5a 100644 --- a/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb +++ b/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb @@ -2,20 +2,28 @@ DESCRIPTION = "Small ramdisk image for running tests (bootrr, etc)" PACKAGE_INSTALL = " \ ${ROOTFS_BOOTSTRAP_INSTALL} \ + bluez5 \ busybox \ base-passwd \ - devmem2 \ + dhcp-client \ diag \ + e2fsprogs \ + e2fsprogs-e2fsck \ + e2fsprogs-mke2fs \ + e2fsprogs-resize2fs \ + e2fsprogs-tune2fs \ ethtool \ gptfdisk \ - iperf2 \ - iperf3 \ lava-test-shell \ packagegroup-core-boot \ - qrtr-apps \ + pciutils \ + pd-mapper \ + qrtr \ rmtfs \ - tcpdump \ + tqftpserv \ udev \ + usbutils \ + wpa-supplicant \ " # Do not pollute the initrd image with rootfs features diff --git a/bsp/meta-raspberrypi/README.md b/bsp/meta-raspberrypi/README.md index b49405b2..898426d8 100644 --- a/bsp/meta-raspberrypi/README.md +++ b/bsp/meta-raspberrypi/README.md @@ -5,7 +5,9 @@ Yocto BSP layer for the Raspberry Pi boards - . [![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi1/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi1) [![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi2/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi2) [![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi3/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi3) -[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/agherzan/meta-raspberrypi) +[![Build Status](https://yocto-ci.resin.io/job/meta-raspberrypi4/badge/icon)](https://yocto-ci.resin.io/job/meta-raspberrypi4) +[![Documentation Status](https://readthedocs.org/projects/meta-raspberrypi/badge/?version=latest)](https://meta-raspberrypi.readthedocs.io/en/latest/?badge=latest) +[![Matrix](https://img.shields.io/matrix/meta-raspberrypi:cub.icu.svg?server_fqdn=matrix.cub.icu)](https://matrix.to/#/#meta-raspberrypi:cub.icu) ## Quick links @@ -48,8 +50,30 @@ This layer depends on: 2. Add this layer to bblayers.conf and the dependencies above 3. Set MACHINE in local.conf to one of the supported boards 4. bitbake core-image-base -5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) -6. Boot your RPI. +5. Use bmaptool to copy the generated .wic.bz2 file to the SD card +6. Boot your RPI + +## Quick Start with kas + +1. Install kas build tool from PyPi (sudo pip3 install kas) +2. kas build meta-raspberrypi/kas-poky-rpi.yml +3. Use bmaptool to copy the generated .wic.bz2 file to the SD card +4. Boot your RPI + +To adjust the build configuration with specific options (I2C, SPI, ...), simply add +a section as follows: + +``` +local_conf_header: + rpi-specific: | + ENABLE_I2C = "1" + RPI_EXTRA_CONFIG = "dtoverlay=pi3-disable-bt" +``` + +To configure the machine, you have to update the `machine` variable. +And the same for the `distro`. + +For further information, you can read more at ## Maintainers diff --git a/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass index d63a2402..1d876e4a 100644 --- a/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass +++ b/bsp/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -26,7 +26,7 @@ inherit image_types IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" # Set kernel and boot loader -IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" +IMAGE_BOOTLOADER ?= "bootfiles" # Kernel image name SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" @@ -55,21 +55,16 @@ do_image_rpi_sdimg[depends] = " \ dosfstools-native:do_populate_sysroot \ virtual/kernel:do_deploy \ ${IMAGE_BOOTLOADER}:do_deploy \ + rpi-config:do_deploy \ + ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ - ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'rpi-u-boot-scr:do_deploy', '',d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ " do_image_rpi_sdimg[recrdeps] = "do_build" # SD card image name -SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg" - -# Compression method to apply to SDIMG after it has been created. Supported -# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file -# is kept and a new compressed file is created if one of these compression -# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is -# silently ignored. -#SDIMG_COMPRESSION ?= "" +SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" @@ -119,48 +114,51 @@ IMAGE_CMD_rpi-sdimg () { BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') rm -f ${WORKDIR}/boot.img mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* into boot.img" + if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" + fi if test -n "${DTS}"; then # Copy board device trees to root folder for dtbf in ${@split_overlays(d, True)}; do dtb=`basename $dtbf` - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" done # Copy device tree overlays to dedicated folder mmd -i ${WORKDIR}/boot.img overlays for dtbf in ${@split_overlays(d, False)}; do dtb=`basename $dtbf` - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" done fi if [ "${RPI_USE_U_BOOT}" = "1" ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/u-boot.bin into boot.img" + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/boot.scr into boot.img" if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE} + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" else - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" fi else if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE} + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" else - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" fi fi - if [ -n ${FATPAYLOAD} ] ; then + if [ -n "${FATPAYLOAD}" ] ; then echo "Copying payload into VFAT" for entry in ${FATPAYLOAD} ; do - # add the || true to stop aborting on vfat issues like not supporting .~lock files - mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true + # use bbwarn instead of bbfatal to stop aborting on vfat issues like not supporting .~lock files + mcopy -v -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}$entry :: || bbwarn "mcopy cannot copy ${IMAGE_ROOTFS}$entry into boot.img" done fi # Add stamp file echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: + mcopy -v -i ${WORKDIR}/boot.img ${WORKDIR}/image-version-info :: || bbfatal "mcopy cannot copy ${WORKDIR}/image-version-info into boot.img" # Deploy vfat partition if [ "${SDIMG_VFAT_DEPLOY}" = "1" ]; then @@ -177,19 +175,6 @@ IMAGE_CMD_rpi-sdimg () { else dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) fi - - # Optionally apply compression - case "${SDIMG_COMPRESSION}" in - "gzip") - gzip -k9 "${SDIMG}" - ;; - "bzip2") - bzip2 -k9 "${SDIMG}" - ;; - "xz") - xz -k "${SDIMG}" - ;; - esac } ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " diff --git a/bsp/meta-raspberrypi/conf/layer.conf b/bsp/meta-raspberrypi/conf/layer.conf index 67eb98ff..4ed79591 100644 --- a/bsp/meta-raspberrypi/conf/layer.conf +++ b/bsp/meta-raspberrypi/conf/layer.conf @@ -9,7 +9,7 @@ BBFILE_COLLECTIONS += "raspberrypi" BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/" BBFILE_PRIORITY_raspberrypi = "9" -LAYERSERIES_COMPAT_raspberrypi = "sumo thud" +LAYERSERIES_COMPAT_raspberrypi = "sumo thud warrior zeus dunfell" # Additional license directories. LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" @@ -27,6 +27,11 @@ BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer BBFILES_DYNAMIC += " \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \ qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \ " + +DEFAULT_TEST_SUITES_remove_rpi = "parselogs" +DEFAULT_TEST_SUITES_append_rpi = " parselogs_rpi" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc index 4bbd576b..47a482fb 100644 --- a/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -5,7 +5,7 @@ include conf/machine/include/rpi-default-providers.inc SOC_FAMILY = "rpi" include conf/machine/include/soc-family.inc -IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg" +IMAGE_FSTYPES ?= "tar.bz2 ext3 wic.bz2 wic.bmap" WKS_FILE ?= "sdimage-raspberrypi.wks" XSERVER = " \ @@ -16,6 +16,7 @@ XSERVER = " \ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/at86rf233.dtbo \ + overlays/disable-bt.dtbo \ overlays/dwc2.dtbo \ overlays/gpio-key.dtbo \ overlays/hifiberry-amp.dtbo \ @@ -25,27 +26,31 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/i2c-rtc.dtbo \ overlays/iqaudio-dac.dtbo \ overlays/iqaudio-dacplus.dtbo \ - overlays/lirc-rpi.dtbo \ - overlays/pi3-disable-bt.dtbo \ - overlays/pi3-miniuart-bt.dtbo \ + overlays/miniuart-bt.dtbo \ + overlays/mcp2515-can0.dtbo \ overlays/pitft22.dtbo \ overlays/pitft28-resistive.dtbo \ + overlays/pitft28-capacitive.dtbo \ overlays/pitft35-resistive.dtbo \ overlays/pps-gpio.dtbo \ overlays/rpi-ft5406.dtbo \ overlays/rpi-poe.dtbo \ overlays/vc4-kms-v3d.dtbo \ + overlays/vc4-fkms-v3d.dtbo \ overlays/w1-gpio-pullup.dtbo \ overlays/w1-gpio.dtbo \ + overlays/gpio-ir.dtbo \ + overlays/gpio-ir-tx.dtbo \ " RPI_KERNEL_DEVICETREE ?= " \ - bcm2708-rpi-0-w.dtb \ + bcm2708-rpi-zero-w.dtb \ bcm2708-rpi-b.dtb \ bcm2708-rpi-b-plus.dtb \ bcm2709-rpi-2-b.dtb \ bcm2710-rpi-3-b.dtb \ bcm2710-rpi-3-b-plus.dtb \ + bcm2711-rpi-4-b.dtb \ bcm2708-rpi-cm.dtb \ bcm2710-rpi-cm3.dtb \ " @@ -68,12 +73,20 @@ KERNEL_IMAGETYPE_DIRECT ??= "zImage" KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ '${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}" -MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio" +MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}" # Raspberry Pi has no hardware clock MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc" -MACHINE_EXTRA_RRECOMMENDS += " kernel-modules udev-rules-rpi" +MACHINE_EXTRA_RRECOMMENDS += "kernel-modules udev-rules-rpi" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "${@oe.utils.conditional('ENABLE_I2C', '1', 'kernel-module-i2c-dev kernel-module-i2c-bcm2708', '', d)}" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "${@oe.utils.conditional('ENABLE_IR', '1', 'kernel-module-gpio-ir kernel-module-gpio-ir-tx', '', d)}" + +SERIAL_CONSOLES_CHECK ??= "${SERIAL_CONSOLES}" + +# The name of the deploy directory for raspberry pi boot files. +# This variable is referred to by recipes fetching / generating the files. +BOOTFILES_DIR_NAME ?= "bootfiles" # Set Raspberrypi splash image SPLASH = "psplash-raspberrypi" @@ -101,14 +114,14 @@ def make_dtb_boot_files(d): return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) -IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \ +IMAGE_BOOT_FILES ?= "${BOOTFILES_DIR_NAME}/* \ ${@make_dtb_boot_files(d)} \ ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ " do_image_wic[depends] += " \ - bcm2835-bootfiles:do_deploy \ + bootfiles:do_deploy \ ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ " diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc index 5231a84e..181b9364 100644 --- a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc @@ -8,3 +8,8 @@ PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "v PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_virtual/libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_jpeg ?= "jpeg" + +PREFERRED_PROVIDER_virtual/libomxil ?= "userland" +VIRTUAL-RUNTIME_libomxil = "userland" + +PREFERRED_PROVIDER_u-boot-default-script ??= "rpi-u-boot-scr" diff --git a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc index a5fe6d70..9983b61a 100644 --- a/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc +++ b/bsp/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc @@ -1,3 +1,3 @@ # RaspberryPi BSP default versions -PREFERRED_VERSION_linux-raspberrypi ??= "4.14.%" +PREFERRED_VERSION_linux-raspberrypi ??= "4.19.%" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf index 2da7d50b..f9371df6 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm.conf @@ -4,3 +4,5 @@ MACHINEOVERRIDES = "raspberrypi:${MACHINE}" include conf/machine/raspberrypi.conf + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf index c8677b4f..f1b81519 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf @@ -6,7 +6,8 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" require conf/machine/include/tune-cortexa7.inc include conf/machine/include/rpi-base.inc -KBUILD_DEFCONFIG ?= "bcm2709_defconfig" SDIMG_KERNELIMAGE ?= "kernel7.img" UBOOT_MACHINE = "rpi_3_32b_config" SERIAL_CONSOLES ?= "115200;ttyAMA0" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf index e94ad867..b23687b2 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi.conf @@ -10,3 +10,5 @@ include conf/machine/include/rpi-base.inc SERIAL_CONSOLES ?= "115200;ttyAMA0" UBOOT_MACHINE = "rpi_config" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf index 2c4f760e..8689bca9 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf @@ -14,3 +14,5 @@ MACHINE_EXTRA_RRECOMMENDS += "\ SDIMG_KERNELIMAGE ?= "kernel.img" UBOOT_MACHINE ?= "rpi_0_w_defconfig" SERIAL_CONSOLES ?= "115200;ttyS0" + +ARMSTUB ?= "armstub.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf index bd191c3f..505c6f2f 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi2.conf @@ -10,3 +10,5 @@ include conf/machine/include/rpi-base.inc SERIAL_CONSOLES ?= "115200;ttyAMA0" UBOOT_MACHINE = "rpi_2_config" + +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf index 635e4f67..65e3302c 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi3-64.conf @@ -11,7 +11,7 @@ MACHINE_EXTRA_RRECOMMENDS += "\ bluez-firmware-rpidistro-bcm4345c0-hcd \ " -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/tune-cortexa53.inc include conf/machine/include/rpi-base.inc RPI_KERNEL_DEVICETREE = " \ @@ -23,7 +23,6 @@ RPI_KERNEL_DEVICETREE = " \ SERIAL_CONSOLES ?= "115200;ttyS0" UBOOT_MACHINE = "rpi_3_config" -MACHINE_FEATURES_append = " vc4graphics" # When u-boot is enabled we need to use the "Image" format and the "booti" # command to load the kernel @@ -31,3 +30,6 @@ KERNEL_IMAGETYPE_UBOOT ?= "Image" # "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet KERNEL_IMAGETYPE_DIRECT ?= "Image" KERNEL_BOOTCMD ?= "booti" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub8.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf index df64cbb7..dafb66e5 100644 --- a/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi3.conf @@ -1,6 +1,6 @@ #@TYPE: Machine -#@NAME: RaspberryPi 3 Development Board -#@DESCRIPTION: Machine configuration for the RaspberryPi 3 +#@NAME: RaspberryPi 3 Development Board (32bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 32 bits mode DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" require conf/machine/include/tune-cortexa7.inc @@ -16,3 +16,6 @@ MACHINE_EXTRA_RRECOMMENDS += "\ SDIMG_KERNELIMAGE ?= "kernel7.img" UBOOT_MACHINE = "rpi_3_32b_config" SERIAL_CONSOLES ?= "115200;ttyS0" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf new file mode 100644 index 00000000..633d1880 --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi4-64.conf @@ -0,0 +1,36 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 4 Development Board (64bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode + +MACHINEOVERRIDES = "raspberrypi4:${MACHINE}" + +MACHINE_FEATURES += "pci" +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +require conf/machine/include/tune-cortexa72.inc +include conf/machine/include/rpi-base.inc + +RPI_KERNEL_DEVICETREE = " \ + broadcom/bcm2711-rpi-4-b.dtb \ +" + +SDIMG_KERNELIMAGE ?= "kernel8.img" +SERIAL_CONSOLES ?= "115200;ttyS0" + +UBOOT_MACHINE = "rpi_4_config" + +VC4DTBO ?= "vc4-fkms-v3d" + +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet +KERNEL_IMAGETYPE_DIRECT ?= "Image" +KERNEL_BOOTCMD ?= "booti" + +RPI_EXTRA_CONFIG ?= "\n# Force arm in 64bit mode. See: https://github.com/raspberrypi/firmware/issues/1193.\narm_64bit=1" + +ARMSTUB ?= "armstub8-gic.bin" diff --git a/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf b/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf new file mode 100644 index 00000000..d6b1d1bd --- /dev/null +++ b/bsp/meta-raspberrypi/conf/machine/raspberrypi4.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 4 Development Board (32bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 32 bit mode + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +MACHINE_FEATURES += "pci" +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ +" + +# 'l' stands for LPAE +SDIMG_KERNELIMAGE ?= "kernel7l.img" +UBOOT_MACHINE = "rpi_4_32b_config" +SERIAL_CONSOLES ?= "115200;ttyS0" + +VC4DTBO ?= "vc4-fkms-v3d" +ARMSTUB ?= "armstub7.bin" diff --git a/bsp/meta-raspberrypi/docs/extra-build-config.md b/bsp/meta-raspberrypi/docs/extra-build-config.md index 732c1020..d92cf4ee 100644 --- a/bsp/meta-raspberrypi/docs/extra-build-config.md +++ b/bsp/meta-raspberrypi/docs/extra-build-config.md @@ -13,9 +13,6 @@ specific to it. For the rest please check: 2. Overwrite SDIMG_ROOTFS_TYPE in local.conf * `SDIMG_ROOTFS_TYPE = "ext3.xz"` -3. Overwrite SDIMG_COMPRESSION in local.conf - * `SDIMG_COMPRESSION = "xz"` - Accommodate the values above to your own needs (ex: ext3 / ext4). ## GPU memory @@ -34,6 +31,10 @@ Accommodate the values above to your own needs (ex: ext3 / ext4). See: +## VC4 + +By default, each machine uses `vc4` for graphics. This will in turn sets mesa as provider for `gl` libraries. `DISABLE_VC4GRAPHICS` can be set to `1` to disable this behaviour falling back to using `userland`. Be aware that `userland` has not support for 64-bit arch. If you disable `vc4` on a 64-bit Raspberry Pi machine, expect build breakage. + ## Add purchased license codecs To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in @@ -183,6 +184,10 @@ When using device tree kernels, set this variable to enable I2C: ENABLE_I2C = "1" +Furthermore, to auto-load I2C kernel modules set: + + KERNEL_MODULE_AUTOLOAD_rpi += "i2c-dev i2c-bcm2708" + ## Enable PiTFT support Basic support for using PiTFT screens can be enabled by adding below in @@ -203,6 +208,7 @@ modelname should be added as a MACHINE_FEATURES in local.conf like below: List of currently supported models: * pitft22 * pitft28r +* pitft28c * pitft35r ## Misc. display @@ -222,7 +228,7 @@ needs a fixed core frequency and enable_uart wil set it to the minimum. Certain operations - 60fps h264 decode, high quality deinterlace - which aren't performed on the ARM may be affected, and we wouldn't want to do that to users who don't want to use the serial port. Users who want serial console support on -RaspberryPi3 will have to explicitly set in local.conf: +RaspberryPi 0 Wifi or 3 will have to explicitly set in local.conf: ENABLE_UART = "1" @@ -246,6 +252,27 @@ When using device tree kernels, set this variable to enable the 802.15.4 hat: See: +## Enable CAN with Pican2 + +In order to use Pican2 CAN module, set the following variables: + + ENABLE_SPI_BUS = "1" + ENABLE_CAN = "1" + +See: + +## Enable infrared + +Users who want to enable infrared support, for example for using LIRC (Linux +Infrared Remote Control), have to explicitly set in local.conf: + + ENABLE_IR = "1" + +This will add device tree overlays gpio-ir and gpio-ir-tx to config.txt. +Appropriate kernel modules will be also included in the image. By default the +GPIO pin for gpio-ir is set to 18 and the pin for gpio-ir-tx is 17. Both pins +can be easily changed by modifying variables `GPIO_IR` and `GPIO_IR_TX`. + ## Manual additions to config.txt The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to diff --git a/bsp/meta-raspberrypi/docs/layer-contents.md b/bsp/meta-raspberrypi/docs/layer-contents.md index 14e6b996..5483708d 100644 --- a/bsp/meta-raspberrypi/docs/layer-contents.md +++ b/bsp/meta-raspberrypi/docs/layer-contents.md @@ -8,6 +8,8 @@ * raspberrypi2 * raspberrypi3 * raspberrypi3-64 (64 bit kernel & userspace) +* raspberrypi4 +* raspberrypi4-64 (64 bit kernel & userspace) * raspberrypi-cm (dummy alias for raspberrypi) * raspberrypi-cm3 diff --git a/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend b/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend new file mode 100644 index 00000000..933aaf6c --- /dev/null +++ b/bsp/meta-raspberrypi/dynamic-layers/networking-layer/recipes-support/drbd/drbd_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_rpi = "(null)" diff --git a/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-kernel/linux/bpftool.bbappend b/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-kernel/linux/bpftool.bbappend deleted file mode 100644 index 7536f390..00000000 --- a/bsp/meta-raspberrypi/dynamic-layers/openembedded-layer/recipes-kernel/linux/bpftool.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -# remove it when we upgrade to kernel > 4.14 -# -COMPATIBLE_HOST_rpi = "null" diff --git a/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend index 58b7b471..8275c6d2 100644 --- a/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +++ b/bsp/meta-raspberrypi/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -1,9 +1,10 @@ PACKAGECONFIG_GL_rpi = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'gl', \ bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglfs gles2', \ '', d), d)}" -PACKAGECONFIG_GL_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' gbm kms', '', d)}" +PACKAGECONFIG_GL_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' kms', '', d)}" +PACKAGECONFIG_GL_append_rpi = " gbm" PACKAGECONFIG_FONTS_rpi = "fontconfig" -PACKAGECONFIG_append_rpi = " libinput examples tslib xkb xkbcommon-evdev" +PACKAGECONFIG_append_rpi = " libinput examples tslib xkb xkbcommon" PACKAGECONFIG_remove_rpi = "tests" OE_QTBASE_EGLFS_DEVICE_INTEGRATION_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'eglfs_brcm', d)}" @@ -14,4 +15,5 @@ do_configure_prepend_rpi() { echo "EGLFS_DEVICE_INTEGRATION = ${OE_QTBASE_EGLFS_DEVICE_INTEGRATION}" >> ${S}/mkspecs/oe-device-extra.pri fi } -RDEPENDS_${PN}_append_rpi = " userland" +RDEPENDS_${PN}_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" +DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" diff --git a/bsp/meta-raspberrypi/files/custom-licenses/Broadcom b/bsp/meta-raspberrypi/files/custom-licenses/Broadcom deleted file mode 100644 index 25826816..00000000 --- a/bsp/meta-raspberrypi/files/custom-licenses/Broadcom +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi b/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi new file mode 100644 index 00000000..6f3baa0c --- /dev/null +++ b/bsp/meta-raspberrypi/files/custom-licenses/Broadcom-RPi @@ -0,0 +1,29 @@ +Copyright (c) 2006, Broadcom Corporation. +Copyright (c) 2015, Raspberry Pi (Trading) Ltd +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* This software may only be used for the purposes of developing for, + running or using a Raspberry Pi device. +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Broadcom Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/bsp/meta-raspberrypi/kas-poky-rpi.yml b/bsp/meta-raspberrypi/kas-poky-rpi.yml new file mode 100644 index 00000000..2d80a57e --- /dev/null +++ b/bsp/meta-raspberrypi/kas-poky-rpi.yml @@ -0,0 +1,58 @@ +header: + version: 8 + +machine: raspberrypi4 +distro: poky +target: + - core-image-base + +repos: + meta-raspberry: + + poky: + url: https://git.yoctoproject.org/git/poky + refspec: master + layers: + meta: + meta-poky: + meta-yocto-bsp: + + meta-openembedded: + url: http://git.openembedded.org/meta-openembedded + refspec: master + layers: + meta-oe: + meta-python: + meta-networking: + meta-perl: + + meta-qt5: + url: https://github.com/meta-qt5/meta-qt5/ + refspec: master + +bblayers_conf_header: + standard: | + POKY_BBLAYERS_CONF_VERSION = "2" + BBPATH = "${TOPDIR}" + BBFILES ?= "" +local_conf_header: + reduce_diskspace: | + INHERIT += "rm_work_and_downloads" + standard: | + CONF_VERSION = "1" + PACKAGE_CLASSES = "package_rpm" + SDKMACHINE = "x86_64" + USER_CLASSES = "buildstats image-mklibs image-prelink" + PATCHRESOLVE = "noop" + debug-tweaks: | + EXTRA_IMAGE_FEATURES = "debug-tweaks" + diskmon: | + BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" diff --git a/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py b/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py new file mode 100644 index 00000000..5cf9af17 --- /dev/null +++ b/bsp/meta-raspberrypi/lib/oeqa/runtime/cases/parselogs_rpi.py @@ -0,0 +1,15 @@ +from oeqa.runtime.cases.parselogs import * + +rpi_errors = [ + 'bcmgenet fd580000.genet: failed to get enet-eee clock', + 'bcmgenet fd580000.genet: failed to get enet-wol clock', + 'bcmgenet fd580000.genet: failed to get enet clock', +] + +ignore_errors['raspberrypi4'] = rpi_errors + common_errors +ignore_errors['raspberrypi4-64'] = rpi_errors + common_errors +ignore_errors['raspberrypi3'] = rpi_errors + common_errors +ignore_errors['raspberrypi3-64'] = rpi_errors + common_errors + +class ParseLogsTestRpi(ParseLogsTest): + pass diff --git a/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb new file mode 100644 index 00000000..d8f3fe70 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/armstubs/armstubs.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e" + +inherit deploy nopackages + +include recipes-bsp/common/raspberrypi-tools.inc + +COMPATIBLE_MACHINE = "^rpi$" + +S = "${RPITOOLS_S}/armstubs" + +export CC7="${CC}" +export LD7="${LD}" +export OBJCOPY7="${OBJCOPY}" +export OBJDUMP7="${OBJDUMP}" +export CC8="${CC}" +export LD8="${LD}" +export OBJCOPY8="${OBJCOPY}" +export OBJDUMP8="${OBJDUMP} -maarch64" + +do_compile() { + [ -z "${ARMSTUB}" ] && bbfatal "No ARMSTUB defined for your machine." + oe_runmake ${ARMSTUB} +} + +do_deploy() { + install -d ${DEPLOYDIR}/${PN} + cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN} +} + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${PN}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb deleted file mode 100644 index 466f4438..00000000 --- a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835." -LICENSE = "Proprietary" - -LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1" - -inherit deploy nopackages - -include recipes-bsp/common/firmware.inc - -INHIBIT_DEFAULT_DEPS = "1" - -DEPENDS = "rpi-config" - -COMPATIBLE_MACHINE = "^rpi$" - -S = "${RPIFW_S}/boot" - -PR = "r3" - -do_deploy() { - install -d ${DEPLOYDIR}/${PN} - - for i in ${S}/*.elf ; do - cp $i ${DEPLOYDIR}/${PN} - done - for i in ${S}/*.dat ; do - cp $i ${DEPLOYDIR}/${PN} - done - for i in ${S}/*.bin ; do - cp $i ${DEPLOYDIR}/${PN} - done - - # Add stamp in deploy directory - touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp -} - -addtask deploy before do_build after do_install -do_deploy[dirs] += "${DEPLOYDIR}/${PN}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb new file mode 100644 index 00000000..80e226d4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Closed source binary files to help boot all raspberry pi devices." +LICENSE = "Broadcom-RPi" + +LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=c403841ff2837657b2ed8e5bb474ac8d" + +inherit deploy nopackages + +include recipes-bsp/common/raspberrypi-firmware.inc + +INHIBIT_DEFAULT_DEPS = "1" + +DEPENDS = "rpi-config" + +COMPATIBLE_MACHINE = "^rpi$" + +S = "${RPIFW_S}/boot" + +PR = "r3" + +do_deploy() { + install -d ${DEPLOYDIR}/${PN} + + for i in ${S}/*.elf ; do + cp $i ${DEPLOYDIR}/${PN} + done + for i in ${S}/*.dat ; do + cp $i ${DEPLOYDIR}/${PN} + done + for i in ${S}/*.bin ; do + cp $i ${DEPLOYDIR}/${PN} + done + + # Add stamp in deploy directory + touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp +} + +do_deploy[depends] += "rpi-config:do_deploy" + +addtask deploy before do_build after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${PN}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb index fcc7771b..67c166a0 100644 --- a/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -20,182 +20,214 @@ INHIBIT_DEFAULT_DEPS = "1" PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" +PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}" PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" VC4DTBO ?= "vc4-kms-v3d" +GPIO_IR ?= "18" +GPIO_IR_TX ?= "17" inherit deploy nopackages do_deploy() { - install -d ${DEPLOYDIR}/bcm2835-bootfiles + install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} - cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/ + cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/ if [ -n "${KEY_DECODE_MPG2}" ]; then - sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${KEY_DECODE_WVC1}" ]; then - sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${DISABLE_OVERSCAN}" ]; then - sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi - if [ -n "${DISABLE_SPLASH}" ]; then - sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + if [ "${DISABLE_SPLASH}" = "1" ]; then + sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Set overclocking options if [ -n "${ARM_FREQ}" ]; then - sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${GPU_FREQ}" ]; then - sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${CORE_FREQ}" ]; then - sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${SDRAM_FREQ}" ]; then - sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${OVER_VOLTAGE}" ]; then - sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # GPU memory if [ -n "${GPU_MEM}" ]; then - sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${GPU_MEM_256}" ]; then - sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${GPU_MEM_512}" ]; then - sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${GPU_MEM_1024}" ]; then - sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Set boot delay if [ -n "${BOOT_DELAY}" ]; then - sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${BOOT_DELAY_MS}" ]; then - sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Set HDMI and composite video options if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then - sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${HDMI_DRIVE}" ]; then - sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${HDMI_GROUP}" ]; then - sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${HDMI_MODE}" ]; then - sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${CONFIG_HDMI_BOOST}" ]; then - sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${SDTV_MODE}" ]; then - sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${SDTV_ASPECT}" ]; then - sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ -n "${DISPLAY_ROTATE}" ]; then - sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Video camera support - if [ -n "${VIDEO_CAMERA}" ]; then - echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + if [ "${VIDEO_CAMERA}" = "1" ]; then + echo "# Enable video camera" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "start_x=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Offline compositing support - if [ -n "${DISPMANX_OFFLINE}" ]; then - echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + if [ "${DISPMANX_OFFLINE}" = "1" ]; then + echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # SPI bus support - if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then - echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then + echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # I2C support - if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then - echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then + echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # PiTFT22 display support if [ "${PITFT22}" = "1" ]; then - echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ "${PITFT28r}" = "1" ]; then - echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + fi + if [ "${PITFT28c}" = "1" ]; then + echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi if [ "${PITFT35r}" = "1" ]; then - echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # UART support if [ "${ENABLE_UART}" = "1" ]; then - echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + fi + + # Infrared support + if [ "${ENABLE_IR}" = "1" ]; then + echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # VC4 Graphics support if [ "${VC4GRAPHICS}" = "1" ]; then - echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then - echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # DWC2 USB peripheral support if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then - echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # AT86RF23X support if [ "${ENABLE_AT86RF}" = "1" ]; then - echo "# Enable AT86RF23X" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + fi + + # ENABLE CAN + if [ "${ENABLE_CAN}" = "1" ]; then + echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt fi # Append extra config if the user has provided any - printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + + # Handle setup with armstub file + if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then + echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + case "${ARMSTUB}" in + *-gic.bin) + echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + ;; + esac + fi } do_deploy_append_raspberrypi3-64() { - echo "# have a properly sized image" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "disable_overscan=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt - echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt - echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt + echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt } addtask deploy before do_build after do_install -do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" +do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc b/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc deleted file mode 100644 index 37cd343f..00000000 --- a/bsp/meta-raspberrypi/recipes-bsp/common/firmware.inc +++ /dev/null @@ -1,11 +0,0 @@ -RPIFW_DATE ?= "20190212" -SRCREV ?= "83977fe3b6ef54c1d29c83b0a778d330f523441f" -RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" -RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}" - -SRC_URI = "${RPIFW_SRC_URI}" -SRC_URI[md5sum] = "5ccdb5447cbdd3ee0158a514f7b76cb9" -SRC_URI[sha256sum] = "9a34ccc4a51695a33206cc6c8534f615ba5a30fcbce5fa3add400ecc6b80ad8a" - - -PV = "${RPIFW_DATE}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc new file mode 100644 index 00000000..d4d2e3ca --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-firmware.inc @@ -0,0 +1,10 @@ +RPIFW_DATE ?= "20200713" +SRCREV ?= "7e74bcb4f9706f36f752d1c3d3164628ccf2aae5" +RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" +RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}" + +SRC_URI = "${RPIFW_SRC_URI}" +SRC_URI[md5sum] = "46a19d68b81f388443394492dd6a873c" +SRC_URI[sha256sum] = "f987cafcbc72179493673191e3e4aa8c1f18eccf871546be5d26156abbf8eff1" + +PV = "${RPIFW_DATE}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc new file mode 100644 index 00000000..0d4c627c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/common/raspberrypi-tools.inc @@ -0,0 +1,9 @@ +SRCREV ?= "b0c869bc929587a7e1d20a98e2dc828a24ca396a" +RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz" +RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}" + +SRC_URI = "${RPITOOLS_SRC_URI}" +SRC_URI[md5sum] = "fd999aad4424088b5e8746a9d946bb56" +SRC_URI[sha256sum] = "a0a8aff308d9302318442e6bcd2df14cbbb3b633f12ca6b9c43c4ab69bf45bb1" + +PV = "0.0+git${SRCREV}" diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in index ad54cd06..627d1815 100644 --- a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in +++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in @@ -1,3 +1,4 @@ fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@ +if test ! -e mmc 0:1 uboot.env; then saveenv; fi; @@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr} diff --git a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb index 593fc903..4cb8978e 100644 --- a/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb +++ b/bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb @@ -24,3 +24,5 @@ do_deploy() { } addtask do_deploy after do_compile before do_build + +PROVIDES += "u-boot-default-script" diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config new file mode 100644 index 00000000..d00df0cb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/files/fw_env.config @@ -0,0 +1 @@ +/boot/uboot.env 0x0000 0x4000 diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend new file mode 100644 index 00000000..22d1bdc4 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/libubootenv_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_rpi = " \ + file://fw_env.config \ +" + +DEPENDS_append_rpi = " rpi-u-boot-scr" + +do_install_append_rpi () { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config +} diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch new file mode 100644 index 00000000..996ad107 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot/0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch @@ -0,0 +1,51 @@ +From 336d86ebd146905cf4384912f4f27699b6e37c72 Mon Sep 17 00:00:00 2001 +From: Simon Glass +Date: Sun, 29 Dec 2019 21:19:17 -0700 +Subject: [PATCH] dm: core: Move ofdata_to_platdata() call earlier + +This method is supposed to extract platform data from the device tree. It +should be done before the device itself is probed. Move it earlier in the +device_probe() function. + +Upstream-Status: Backport + +Signed-off-by: Simon Glass +--- + drivers/core/device.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/core/device.c b/drivers/core/device.c +index 4e03708..291ff4c 100644 +--- a/drivers/core/device.c ++++ b/drivers/core/device.c +@@ -375,6 +375,13 @@ int device_probe(struct udevice *dev) + return 0; + } + ++ if (drv->ofdata_to_platdata && ++ (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { ++ ret = drv->ofdata_to_platdata(dev); ++ if (ret) ++ goto fail; ++ } ++ + seq = uclass_resolve_seq(dev); + if (seq < 0) { + ret = seq; +@@ -411,13 +418,6 @@ int device_probe(struct udevice *dev) + goto fail; + } + +- if (drv->ofdata_to_platdata && +- (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { +- ret = drv->ofdata_to_platdata(dev); +- if (ret) +- goto fail; +- } +- + /* Only handle devices that have a valid ofnode */ + if (dev_of_valid(dev)) { + /* +-- +2.7.4 + diff --git a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend index 95015f49..40b4fc0a 100644 --- a/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1 +1,5 @@ -DEPENDS_append_rpi = " rpi-u-boot-scr" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS_append_rpi = " u-boot-default-script" + +SRC_URI_append_raspberrypi-cm3 = " file://0001-dm-core-Move-ofdata_to_platdata-call-earlier.patch" diff --git a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend index 6651fb8d..d1a07a46 100644 --- a/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend @@ -1,16 +1,10 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:" -BCM_BT_SOURCES = " \ +SRC_URI_append_rpi = "\ file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \ file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \ file://0003-Increase-firmware-load-timeout-to-30s.patch \ file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \ " -BCM_BT_RDEPENDS = "pi-bluetooth" - -SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}" -SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}" - -RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}" -RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}" +RDEPENDS_${PN}_append_rpi = " pi-bluetooth" diff --git a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch index 45839053..45b43c72 100644 --- a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch +++ b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth/0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch @@ -1,16 +1,18 @@ -From af91c96951a11f81f5cea88a0010161592c89310 Mon Sep 17 00:00:00 2001 +From a73bbed89fb049ac424c211629935b26013e2573 Mon Sep 17 00:00:00 2001 From: "Peter A. Bigot" Date: Wed, 14 Nov 2018 09:19:51 -0600 Subject: [PATCH] bthelper: correct path for hciconfig under Yocto Upstream-Status: Inapproprate [OE-specific] Signed-off-by: Peter A. Bigot +Signed-off-by: Andrei Gherzan + --- usr/bin/bthelper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/bthelper b/usr/bin/bthelper -index 255fdeb..4e1a1a4 100755 +index af597e5..5de84f6 100755 --- a/usr/bin/bthelper +++ b/usr/bin/bthelper @@ -10,7 +10,7 @@ fi @@ -18,11 +20,8 @@ index 255fdeb..4e1a1a4 100755 dev="$1" # Need to bring hci up before looking at MAC as it can be all zeros during init -/bin/hciconfig "$dev" up --/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0 +-/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0 +/usr/bin/hciconfig "$dev" up -+/usr/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0 ++/usr/bin/hciconfig "$dev" | grep -qE "BD Address: (B8:27:EB|DC:A6:32):" || exit 0 /usr/bin/hcitool -i "$dev" cmd 0x3f 0x1c 0x01 0x02 0x00 0x01 0x01 > /dev/null --- -2.17.1 - diff --git a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb new file mode 100644 index 00000000..ccf714ba --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_0.1.12.bb @@ -0,0 +1,47 @@ +SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" +HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" +SECTION = "kernel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "\ + file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ +" + +SRC_URI = "\ + git://github.com/RPi-Distro/pi-bluetooth \ + file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \ +" +SRCREV = "cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace" + +S = "${WORKDIR}/git" + +# hciuart.service replaces what was brcm43438.service +inherit systemd +SYSTEMD_SERVICE_${PN} = "\ + hciuart.service \ + bthelper@.service \ +" + +do_install() { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d + + install -d ${D}${bindir} + install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir} + install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service + install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service + fi +} + +FILES_${PN} = "\ + ${bindir} \ + ${sysconfdir} \ + ${systemd_unitdir}/system \ +" + +RDEPENDS_${PN} += " \ + udev-rules-rpi \ +" diff --git a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb b/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb deleted file mode 100644 index b2401b93..00000000 --- a/bsp/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb +++ /dev/null @@ -1,46 +0,0 @@ -SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" -HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" -SECTION = "kernel" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "\ - file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ -" - -SRC_URI = "\ - git://github.com/RPi-Distro/pi-bluetooth \ - file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \ -" -SRCREV = "2e1a393955910aea67bbf3c921be35a66e8a8fbe" -PV = "1.1+git${SRCPV}" - -S = "${WORKDIR}/git" - -# hciuart.service replaces what was brcm43438.service -inherit systemd -SYSTEMD_SERVICE_${PN} = "\ - hciuart.service \ - bthelper@.service \ -" - -inherit allarch - -do_install() { - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d - - install -d ${D}${bindir} - install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir} - install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service - install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service - fi -} - -FILES_${PN} = "\ - ${bindir} \ - ${sysconfdir} \ - ${systemd_unitdir}/system \ -" diff --git a/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb index 91593469..87de3558 100644 --- a/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb +++ b/bsp/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb @@ -2,6 +2,8 @@ DESCRIPTION = "RaspberryPi Test Packagegroup" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +PACKAGE_ARCH = "${MACHINE_ARCH}" + inherit packagegroup COMPATIBLE_MACHINE = "^rpi$" @@ -11,21 +13,18 @@ OMXPLAYER = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'omxpl RDEPENDS_${PN} = "\ ${OMXPLAYER} \ bcm2835-tests \ - wiringpi \ rpio \ rpi-gpio \ pi-blaster \ - python-rtimu \ - python-sense-hat \ + python3-rtimu \ + python3-sense-hat \ connman \ connman-client \ - crda \ + wireless-regdb-static \ bluez5 \ " RRECOMMENDS_${PN} = "\ - bigbuckbunny-1080p \ - bigbuckbunny-480p \ - bigbuckbunny-720p \ + ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-multimedia", "bigbuckbunny-1080p bigbuckbunny-480p bigbuckbunny-720p", "", d)} \ ${MACHINE_EXTRA_RRECOMMENDS} \ " diff --git a/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend b/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend index 09e3ec9d..41622aa5 100644 --- a/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend @@ -1,3 +1,2 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" -ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "200" +SPLASH_IMAGES_rpi = "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb index edef0db9..42cfcdd4 100644 --- a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb @@ -2,7 +2,10 @@ DESCRIPTION = "udev rules for Raspberry Pi Boards" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -SRC_URI = " file://99-com.rules" +SRC_URI = " \ + file://99-com.rules \ + file://can.rules \ + " S = "${WORKDIR}" @@ -11,4 +14,5 @@ INHIBIT_DEFAULT_DEPS = "1" do_install () { install -d ${D}${sysconfdir}/udev/rules.d install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/ + install -m 0644 ${WORKDIR}/can.rules ${D}${sysconfdir}/udev/rules.d/ } diff --git a/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules new file mode 100644 index 00000000..a47d57de --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-core/udev/udev-rules-rpi/can.rules @@ -0,0 +1 @@ +SUBSYSTEM=="net", DEVPATH=="/devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.0/net/can0", RUN+="/sbin/ip link set can0 up type can bitrate 500000" diff --git a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch deleted file mode 100644 index b4bc4b28..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/files/0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6a6b705ff5cba960c54bdb4d4bcdaa3b00a854a2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 11 Aug 2018 10:24:24 -0700 -Subject: [PATCH] pi-blaster: Include sys/sysmacros.h for makedev() - -In glibc 2.28+ this header is not included indirectly anymore - -fixes - -ld: pi-blaster.o: in function `mbox_open': -pi-blaster.c:(.text+0x28): undefined reference to `makedev' -collect2: error: ld returned 1 exit status - -Upstream-Status: Submitted [https://github.com/sarfata/pi-blaster/pull/100] - -Signed-off-by: Khem Raj ---- - pi-blaster.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/pi-blaster.c b/pi-blaster.c -index 6cfd010..fc4e686 100644 ---- a/pi-blaster.c -+++ b/pi-blaster.c -@@ -41,6 +41,7 @@ static char VERSION[] = "SNAPSHOT"; - #include - #include - #include -+#include - #include - #include - #include "mailbox.h" diff --git a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb index 9cedf5ec..fdaf16c8 100644 --- a/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb +++ b/bsp/meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb @@ -2,16 +2,15 @@ DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspbe HOMEPAGE = "https://github.com/sarfata/pi-blaster/" SECTION = "devel/libs" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://README.md;beginline=244;endline=268;md5=86d10e4bcf4b4014d306dde7c1d2a80d" +LIC_FILES_CHKSUM = "file://README.md;beginline=268;endline=292;md5=86d10e4bcf4b4014d306dde7c1d2a80d" SRC_URI = "git://github.com/sarfata/pi-blaster \ file://remove-initscript-lsb-dependency.patch \ - file://0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch \ " S = "${WORKDIR}/git" -SRCREV = "e981aa5d7624c75a4d4afcddcbd235f25e32ffe4" +SRCREV = "befd8ef36e5066e4d444ef47fe4020787e541248" inherit update-rc.d autotools diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch b/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch deleted file mode 100644 index 4a93a1ce..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 30 Jan 2016 16:07:14 -0800 -Subject: [PATCH] include asm/ioctl.h for ioctl() define - -also fixes errors e.g. - -../../RTIMULib/RTIMUHal.cpp:208:29: error: '_IOC_SIZEBITS' was not -declared in this scope - return ioctl(m_SPI, SPI_IOC_MESSAGE(1), &wrIOC); - -Signed-off-by: Khem Raj ---- -Upstream-Status: Submitted - - RTIMULib/RTIMUHal.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/RTIMULib/RTIMUHal.cpp b/RTIMULib/RTIMUHal.cpp -index f9c3d15..d968326 100644 ---- a/RTIMULib/RTIMUHal.cpp -+++ b/RTIMULib/RTIMUHal.cpp -@@ -29,6 +29,7 @@ - #if !defined(WIN32) && !defined(__APPLE__) - - #include -+#include - - RTIMUHal::RTIMUHal() - { --- -2.7.0 - diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb deleted file mode 100644 index 63c92b38..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to use 9-dof and \ -10-dof IMUs with embedded Linux systems" -HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e" - -SRC_URI = "git://github.com/RPi-Distro/RTIMULib.git;protocol=http;branch=master \ - file://0001-include-asm-ioctl.h-for-ioctl-define.patch;patchdir=../.. \ - " -SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178" - -S = "${WORKDIR}/git/Linux/python/" - -inherit setuptools diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb deleted file mode 100644 index f7c4e349..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in the Astro Pi mission" -HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat" -SECTION = "devel/python" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda" - -inherit setuptools pypi - -PYPI_PACKAGE = "sense-hat" - -SRC_URI[md5sum] = "69929250cb72349a8a82edf2584b1d83" -SRC_URI[sha256sum] = "f000998d042d96ed722d459312e1bebd0107f9f3015cd34b3e4fabcab9c800af" - -DEPENDS += " \ - jpeg \ - zlib \ - freetype \ - " - -RDEPENDS_${PN} += " \ - python-numpy \ - python-rtimu \ - python-imaging \ - " diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch new file mode 100644 index 00000000..4a93a1ce --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu/0001-include-asm-ioctl.h-for-ioctl-define.patch @@ -0,0 +1,33 @@ +From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 30 Jan 2016 16:07:14 -0800 +Subject: [PATCH] include asm/ioctl.h for ioctl() define + +also fixes errors e.g. + +../../RTIMULib/RTIMUHal.cpp:208:29: error: '_IOC_SIZEBITS' was not +declared in this scope + return ioctl(m_SPI, SPI_IOC_MESSAGE(1), &wrIOC); + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + RTIMULib/RTIMUHal.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/RTIMULib/RTIMUHal.cpp b/RTIMULib/RTIMUHal.cpp +index f9c3d15..d968326 100644 +--- a/RTIMULib/RTIMUHal.cpp ++++ b/RTIMULib/RTIMUHal.cpp +@@ -29,6 +29,7 @@ + #if !defined(WIN32) && !defined(__APPLE__) + + #include ++#include + + RTIMUHal::RTIMUHal() + { +-- +2.7.0 + diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb new file mode 100644 index 00000000..c0cb3110 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-rtimu_git.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to use 9-dof and \ +10-dof IMUs with embedded Linux systems" +HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e" + +SRC_URI = "git://github.com/RPi-Distro/RTIMULib.git;protocol=http;branch=master \ + file://0001-include-asm-ioctl.h-for-ioctl-define.patch;patchdir=../.. \ + " +SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178" + +S = "${WORKDIR}/git/Linux/python/" + +inherit setuptools3 diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/python3-sense-hat_2.2.0.bb b/bsp/meta-raspberrypi/recipes-devtools/python/python3-sense-hat_2.2.0.bb new file mode 100644 index 00000000..5ea00142 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/python3-sense-hat_2.2.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in the Astro Pi mission" +HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda" + +inherit setuptools3 pypi + +PYPI_PACKAGE = "sense-hat" + +SRC_URI[md5sum] = "69929250cb72349a8a82edf2584b1d83" +SRC_URI[sha256sum] = "f000998d042d96ed722d459312e1bebd0107f9f3015cd34b3e4fabcab9c800af" + +DEPENDS += " \ + jpeg \ + zlib \ + freetype \ + " + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-numpy \ + ${PYTHON_PN}-rtimu \ + ${PYTHON_PN}-imaging \ + " diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch index bd971793..5c94bc24 100644 --- a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch +++ b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio/0001-Remove-nested-functions.patch @@ -30,6 +30,8 @@ silence this warning uint32_t peri_base; Signed-off-by: Khem Raj +[Pierre-Jean: update for version 0.7.0] +Signed-off-by: Pierre-Jean Texier --- Upstream-Status: Submitted @@ -37,37 +39,6 @@ Upstream-Status: Submitted source/py_gpio.c | 135 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 71 insertions(+), 70 deletions(-) -diff --git a/source/c_gpio.c b/source/c_gpio.c -index c96a2b0..b69880f 100644 ---- a/source/c_gpio.c -+++ b/source/c_gpio.c -@@ -61,7 +61,7 @@ int setup(void) - { - int mem_fd; - uint8_t *gpio_mem; -- uint32_t peri_base; -+ uint32_t peri_base = 0; - uint32_t gpio_base; - unsigned char buf[4]; - FILE *fp; -@@ -73,7 +73,7 @@ int setup(void) - if ((mem_fd = open("/dev/gpiomem", O_RDWR|O_SYNC)) > 0) - { - gpio_map = (uint32_t *)mmap(NULL, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 0); -- if ((uint32_t)gpio_map < 0) { -+ if (gpio_map == MAP_FAILED) { - return SETUP_MMAP_FAIL; - } else { - return SETUP_OK; -@@ -127,7 +127,7 @@ int setup(void) - - gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, gpio_base); - -- if ((uint32_t)gpio_map < 0) -+ if (gpio_map == MAP_FAILED) - return SETUP_MMAP_FAIL; - - return SETUP_OK; diff --git a/source/py_gpio.c b/source/py_gpio.c index d54cc7f..007bad5 100644 --- a/source/py_gpio.c diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb deleted file mode 100644 index d0ff00af..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb +++ /dev/null @@ -1,14 +0,0 @@ -DESCRIPTION = "A module to control Raspberry Pi GPIO channels" -HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7" - -PYPI_PACKAGE = "RPi.GPIO" -inherit pypi distutils - -SRC_URI += "file://0001-Remove-nested-functions.patch" -SRC_URI[md5sum] = "e4abe1cfb5eacebe53078032256eb837" -SRC_URI[sha256sum] = "a5fc0eb5e401963b6c0a03650da6b42c4005f02d962b81241d96c98d0a578516" - -COMPATIBLE_MACHINE = "^rpi$" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.7.0.bb b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.7.0.bb new file mode 100644 index 00000000..fcce88f8 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.7.0.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "A module to control Raspberry Pi GPIO channels" +HOMEPAGE = "https://sourceforge.net/projects/raspberry-gpio-python/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7" + +PYPI_PACKAGE = "RPi.GPIO" +inherit pypi distutils3 + +SRC_URI += "file://0001-Remove-nested-functions.patch" +SRC_URI[md5sum] = "777617f9dea9a1680f9af43db0cf150e" +SRC_URI[sha256sum] = "7424bc6c205466764f30f666c18187a0824077daf20b295c42f08aea2cb87d3f" + +COMPATIBLE_MACHINE = "^rpi$" diff --git a/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb b/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb index c3254bcf..d5653cb0 100644 --- a/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb +++ b/bsp/meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb @@ -10,13 +10,13 @@ inherit pypi SRC_URI += "file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch" -inherit setuptools +inherit setuptools3 COMPATIBLE_MACHINE = "^rpi$" RDEPENDS_${PN} = "\ - python-logging \ - python-threading \ + python3-logging \ + python3-threading \ " SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4" diff --git a/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb b/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb index 0de775c7..02a3f558 100644 --- a/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb +++ b/bsp/meta-raspberrypi/recipes-devtools/raspi-gpio/raspi-gpio_git.bb @@ -8,7 +8,7 @@ COMPATIBLE_MACHINE = "^rpi$" inherit autotools -SRCREV = "2df7b8684e2e36b080cda315d78d5ba16f8f18b0" +SRCREV = "4edfde183ff3ac9ed66cdc015ae25e45f3a5502d" SRC_URI = "git://github.com/RPi-Distro/raspi-gpio.git;protocol=https;branch=master \ " diff --git a/bsp/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch b/bsp/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch deleted file mode 100644 index be3d9eeb..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch +++ /dev/null @@ -1,415 +0,0 @@ -From 32f3cad3c41161693659a902062fa0c01c0338ed Mon Sep 17 00:00:00 2001 -From: ErikHH -Date: Thu, 20 Dec 2018 15:33:45 +0100 -Subject: [PATCH 1/1] Add initial cross compile support - -Signed-off-by: ErikHH ---- - devLib/Makefile | 55 +++++++++++++++++++++---------------- - examples/Gertboard/Makefile | 22 +++++++++------ - examples/Makefile | 22 +++++++++------ - examples/PiFace/Makefile | 22 +++++++++------ - examples/PiGlow/Makefile | 4 +-- - examples/q2w/Makefile | 4 +-- - gpio/Makefile | 29 +++++++++---------- - wiringPi/Makefile | 47 +++++++++++++++++-------------- - 8 files changed, 119 insertions(+), 86 deletions(-) - -diff --git a/devLib/Makefile b/devLib/Makefile -index cf665d6..d193a9d 100644 ---- a/devLib/Makefile -+++ b/devLib/Makefile -@@ -22,6 +22,7 @@ - ################################################################################# - - VERSION=$(shell cat ../VERSION) -+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION))) - DESTDIR?=/usr - PREFIX?=/local - -@@ -31,15 +32,19 @@ ifneq ($V,1) - Q ?= @ - endif - --STATIC=libwiringPiDev.a --DYNAMIC=libwiringPiDev.so.$(VERSION) -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I. --DEFS = -D_GNU_SOURCE --CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC -+BASE_NAME=libwiringPiDev -+STATIC=$(BASE_NAME).a -+DYNAMIC=$(BASE_NAME).so.$(VERSION) -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I. -+DEFS ?= -D_GNU_SOURCE -+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC - - LIBS = - -@@ -68,16 +73,16 @@ $(STATIC): $(OBJ) - - $(DYNAMIC): $(OBJ) - $Q echo "[Link (Dynamic)]" -- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) -+ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) - - .c.o: - $Q echo [Compile] $< -- $Q $(CC) -c $(CFLAGS) $< -o $@ -+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ - - .PHONY: clean - clean: - $Q echo "[Clean]" -- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* -+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a - - .PHONY: tags - tags: $(SRC) -@@ -88,22 +93,22 @@ tags: $(SRC) - .PHONY: install - install: $(DYNAMIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Dynamic Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) -- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so -- $Q $(LDCONFIG) -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - .PHONY: install-static - install-static: $(STATIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Static Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(STATIC) $(LIB_DIR) - - .PHONY: install-deb - install-deb: $(DYNAMIC) -@@ -118,9 +123,11 @@ install-deb: $(DYNAMIC) - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) -- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.* -- $Q $(LDCONFIG) -+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) -+ $Q rm -f $(LIB_DIR)/$(STATIC) -+ $Q rm -f $(LIB_DIR)/$(DYNAMIC) -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - - .PHONY: depend -diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile -index 1939ad6..98d1415 100644 ---- a/examples/Gertboard/Makefile -+++ b/examples/Gertboard/Makefile -@@ -9,14 +9,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/Makefile b/examples/Makefile -index 6d87885..8623816 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -26,14 +26,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile -index f937c14..ad030b3 100644 ---- a/examples/PiFace/Makefile -+++ b/examples/PiFace/Makefile -@@ -26,14 +26,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile -index f182db7..d1ea74f 100644 ---- a/examples/PiGlow/Makefile -+++ b/examples/PiGlow/Makefile -@@ -29,10 +29,10 @@ endif - #DEBUG = -g -O0 - DEBUG = -O3 - CC = gcc --INCLUDE = -I/usr/local/include -+INCLUDE = -I../wiringPi -I../wiringPiDev - CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe - --LDFLAGS = -L/usr/local/lib -+LDFLAGS = -L../wiringPi -L../wiringPiDev - LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line -diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile -index 8f773bf..14aa6e4 100644 ---- a/examples/q2w/Makefile -+++ b/examples/q2w/Makefile -@@ -29,10 +29,10 @@ endif - #DEBUG = -g -O0 - DEBUG = -O3 - CC = gcc --INCLUDE = -I/usr/local/include -+INCLUDE = -I../wiringPi -I../devLib - CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe - --LDFLAGS = -L/usr/local/lib -+LDFLAGS = -L../wiringPi -L../devLib - LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm - - ############################################################################### -diff --git a/gpio/Makefile b/gpio/Makefile -index 9ec160d..a294242 100644 ---- a/gpio/Makefile -+++ b/gpio/Makefile -@@ -30,13 +30,17 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I$(DESTDIR)$(PREFIX)/include --CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+BIN_DIR?=$(DESTDIR)$(PREFIX)/bin - --LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) - LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt - - # May not need to alter anything below this line -@@ -72,13 +76,10 @@ tags: $(SRC) - .PHONY: install - install: gpio - $Q echo "[Install]" -- $Q cp gpio $(DESTDIR)$(PREFIX)/bin --ifneq ($(WIRINGPI_SUID),0) -- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio -- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio --endif -- $Q mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 -- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 -+ $Q install -d $(BIN_DIR) -+ $Q install -m 4755 -o root -g root gpio $(BIN_DIR) -+ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1 -+ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 - - .PHONY: install-deb - install-deb: gpio -@@ -91,7 +92,7 @@ install-deb: gpio - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio -+ $Q rm -f $(BIN_DIR)/gpio - $Q rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gpio.1 - - .PHONY: depend -diff --git a/wiringPi/Makefile b/wiringPi/Makefile -index 287fa58..3423d3f 100644 ---- a/wiringPi/Makefile -+++ b/wiringPi/Makefile -@@ -22,25 +22,30 @@ - ################################################################################# - - VERSION=$(shell cat ../VERSION) -+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION))) - DESTDIR?=/usr - PREFIX?=/local - -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ - LDCONFIG?=ldconfig - - ifneq ($V,1) - Q ?= @ - endif - --STATIC=libwiringPi.a --DYNAMIC=libwiringPi.so.$(VERSION) -+BASE_NAME=libwiringPi -+STATIC=$(BASE_NAME).a -+DYNAMIC=$(BASE_NAME).so.$(VERSION) - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I. -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I. - DEFS = -D_GNU_SOURCE --CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC --#CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC -+CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC -+#CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Wconversion -Winline -pipe -fPIC - - LIBS = -lm -lpthread -lrt -lcrypt - -@@ -75,17 +80,17 @@ static: - - $(DYNAMIC): $(OBJ) - $Q echo "[Link (Dynamic)]" -- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ) -+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS) - - .c.o: - $Q echo [Compile] $< -- $Q $(CC) -c $(CFLAGS) $< -o $@ -+ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@ - - - .PHONY: clean - clean: - $Q echo "[Clean]" -- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.* -+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a - - .PHONY: tags - tags: $(SRC) -@@ -96,13 +101,13 @@ tags: $(SRC) - .PHONY: install - install: $(DYNAMIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Dynamic Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) -- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so -- $Q $(LDCONFIG) -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - .PHONY: install-deb - install-deb: $(DYNAMIC) -@@ -117,9 +122,11 @@ install-deb: $(DYNAMIC) - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) -- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.* -- $Q $(LDCONFIG) -+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) -+ $Q rm -f $(LIB_DIR)/$(STATIC) -+ $Q rm -f $(LIB_DIR)/$(DYNAMIC) -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - - .PHONY: depend --- -2.19.1 - diff --git a/bsp/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb b/bsp/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb deleted file mode 100644 index e78c58a2..00000000 --- a/bsp/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb +++ /dev/null @@ -1,35 +0,0 @@ -DESCRIPTION = "A library to control Raspberry Pi GPIO channels" -HOMEPAGE = "https://projects.drogon.net/raspberry-pi/wiringpi/" -SECTION = "devel/libs" -LICENSE = "LGPLv3+" -LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" - -DEPENDS += "virtual/crypt" - -# tag 2.46 -SRCREV = "8d188fa0e00bb8c6ff6eddd07bf92857e9bd533a" - -S = "${WORKDIR}/git" - -SRC_URI = "git://git.drogon.net/wiringPi \ - file://0001-Add-initial-cross-compile-support.patch \ - " - -COMPATIBLE_MACHINE = "^rpi$" - -CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib " - -EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'" -EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'" - -do_compile() { - oe_runmake -C devLib - oe_runmake -C wiringPi - oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi -L${S}/devLib' -} - -do_install() { - oe_runmake -C devLib install - oe_runmake -C wiringPi install - oe_runmake -C gpio install -} diff --git a/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend new file mode 100644 index 00000000..7ba13e20 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/cairo/cairo_%.bbappend @@ -0,0 +1,3 @@ +PACKAGECONFIG_GLESV2 = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'glesv2', d)}" + +PACKAGECONFIG_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' egl ${PACKAGECONFIG_GLESV2}', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend deleted file mode 100644 index c152bd97..00000000 --- a/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -EGLINFO_DEVICE_rpi = "raspberrypi" -COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend deleted file mode 100644 index 2d720baa..00000000 --- a/bsp/meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -EGLINFO_DEVICE_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'generic', 'raspberrypi', d)}" -ASNEEDED = "" diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch b/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch new file mode 100644 index 00000000..0bda0145 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-dri2-query-dma-buf-modifiers.patch @@ -0,0 +1,43 @@ +mesa: querying dma_buf_modifiers for specific formats + +mesa wl_drm protocol is the backend for wayland server side which requires +the dmabuf modifiers for some DRM formats on specific devices like RPI. +Currently there is no support of giving any dmabuf modifiers on wl_drm protocol. +This dma_buf modifiers allows EGL implementations to add extra attributes +to drm_fourcc format. + +Upstream-Status: Pending + +Signed-off-by: Balaji Velmurugan + +--- a/src/gallium/state_trackers/dri/dri2.c ++++ b/src/gallium/state_trackers/dri/dri2.c +@@ -1366,14 +1366,28 @@ dri2_from_planar(__DRIimage *image, int + return img; + } + ++static boolean ++dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max, ++ uint64_t *modifiers, unsigned int *external_only, ++ int *count); + static __DRIimage * + dri2_from_fds(__DRIscreen *screen, int width, int height, int fourcc, + int *fds, int num_fds, int *strides, int *offsets, + void *loaderPrivate) + { ++ uint64_t modifier= DRM_FORMAT_MOD_INVALID; ++ unsigned int external_only= 0; ++ int count= 0; ++ boolean result; ++ result= dri2_query_dma_buf_modifiers( screen, fourcc, 1, &modifier, &external_only, &count); ++ return dri2_create_image_from_fd(screen, width, height, fourcc, ++ modifier, fds, num_fds, ++ strides, offsets, NULL, loaderPrivate); ++ #if 0 + return dri2_create_image_from_fd(screen, width, height, fourcc, + DRM_FORMAT_MOD_INVALID, fds, num_fds, + strides, offsets, NULL, loaderPrivate); ++ #endif + } + + static boolean diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend index 7897125b..08ec1c59 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -1 +1,6 @@ PACKAGECONFIG_append_rpi = " gbm" +PROVIDES_append_rpi = " virtual/libgbm" + +do_install_append_rpi() { + rm -rf ${D}${includedir}/KHR/khrplatform.h +} diff --git a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend index 8152cc3e..d3435e72 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend @@ -1,7 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # DRI3 note: # With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set # as default. To state out clearly that Raspi needs dri3 and to avoid surprises # in case oe-core changes this default, we set dri3 explicitly. -PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}" -GALLIUMDRIVERS_append_rpi = ",vc4" -DRIDRIVERS_rpi = "" + +SRC_URI_append_rpi = " file://0001-dri2-query-dma-buf-modifiers.patch " + +PACKAGECONFIG_append_rpi = " gallium vc4 v3d kmsro ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}" +DRIDRIVERS_class-target_rpi = "" diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch index d6b2abb2..ca39b78c 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch @@ -1,7 +1,7 @@ -From 08d56c1174e27573ae8df2a7b9e6632afd0bfe86 Mon Sep 17 00:00:00 2001 +From d0956d198ceaf611314d61a0835fb5924b8a3577 Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Tue, 9 Jul 2013 09:26:26 -0400 -Subject: [PATCH 01/18] Allow applications to set next resource handle +Subject: [PATCH 01/21] Allow applications to set next resource handle This patch adds provisions in userland to let apps callers set the next rendereing dispmanx resource. @@ -204,5 +204,5 @@ index 8a5734c..51b3580 100644 FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data)) -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch index c41cde77..d2d9b497 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch @@ -1,7 +1,7 @@ -From da60a2a34a48e2b324fceae608964814488cc8fb Mon Sep 17 00:00:00 2001 +From 75eb8ab4bec3e462607214d2e14c9f2eef73435f Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 1 Oct 2013 13:19:20 +0200 -Subject: [PATCH 02/18] wayland: Add support for the Wayland winsys +Subject: [PATCH 02/21] wayland: Add support for the Wayland winsys * Adds EGL_WL_bind_wayland_display extension * Adds wayland-egl library @@ -69,7 +69,7 @@ index 63570f1..1459436 100644 *.mkv +*~ diff --git a/CMakeLists.txt b/CMakeLists.txt -index cfc8ae5..673a5ad 100644 +index fe67fc8..80337b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,17 @@ include(makefiles/cmake/global_settings.cmake) @@ -91,22 +91,22 @@ index cfc8ae5..673a5ad 100644 # Global include paths diff --git a/README.md b/README.md -index 94b93b8..50b90b1 100644 +index 404e4d4..97a6b8f 100644 --- a/README.md +++ b/README.md -@@ -6,3 +6,7 @@ Use buildme to build. It requires cmake to be installed and an arm cross compile - https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian +@@ -8,3 +8,7 @@ https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linu + Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option ```--aarch64``` to the buildme command. - Note that this repository does not contain the source for the edid_parser and vcdbg binaries due to licensing restrictions. + Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions. + +To build support for the Wayland winsys in EGL, execute the buildme script like this: + +$ BUILD_WAYLAND=1 ./buildme. diff --git a/buildme b/buildme -index b8fd440..a780bb6 100755 +index 9e2d405..7b8c0d6 100755 --- a/buildme +++ b/buildme -@@ -8,6 +8,10 @@ fi +@@ -17,6 +17,10 @@ fi BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`; @@ -114,10 +114,10 @@ index b8fd440..a780bb6 100755 + WAYLAND_VARS="-DBUILD_WAYLAND=TRUE" +fi + - if [ "armv6l" = `arch` ] || [ "armv7l" = `arch` ]; then + if [ $ARCH = "armv6l" ] || [ $ARCH = "armv7l" ] || [ $ARCH = "aarch64" ]; then # Native compile on the Raspberry Pi mkdir -p build/raspberry/$BUILDSUBDIR -@@ -32,9 +36,13 @@ elif [ "$1" = "--native" ]; then +@@ -41,9 +45,13 @@ elif [ "$1" = "--native" ]; then make -j `nproc` $* else # Cross compile on a more capable machine @@ -127,24 +127,24 @@ index b8fd440..a780bb6 100755 + fi mkdir -p build/arm-linux/$BUILDSUBDIR pushd build/arm-linux/$BUILDSUBDIR -- cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../.. -+ cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $WAYLAND_VARS ../../.. +- cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 ../../.. ++ cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 $WAYLAND_VARS ../../.. make -j `nproc` if [ "$1" != "" ]; then diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt -index 42636e8..d47ad55 100644 +index eb1ef7c..5aeeb2e 100644 --- a/host_applications/linux/apps/raspicam/CMakeLists.txt +++ b/host_applications/linux/apps/raspicam/CMakeLists.txt -@@ -33,7 +33,7 @@ add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c) +@@ -61,7 +61,7 @@ add_executable(raspivid ${COMMON_SOURCES} RaspiVid.c) + add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c) set (MMAL_LIBS mmal_core mmal_util mmal_vc_client) - --target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m dl) -+target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m dl ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES}) - target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host) - target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host) - target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host) +-target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host ${EGL_LIBS} m dl) ++target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host ${EGL_LIBS} m dl ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES}) + target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host m) + target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host m) + target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host m) diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt index 9ad615b..95c0e11 100644 --- a/interface/khronos/CMakeLists.txt @@ -1551,12 +1551,12 @@ index 0000000..8bafc15 +Libs: -L${libdir} -lwayland-egl +Cflags: -I${includedir} diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index fde18da..6718215 100755 +index 4a914a7..c202204 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt -@@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing) - - include_directories(${VMCS_TARGET}/vcfiled) +@@ -7,13 +7,24 @@ + # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response + add_definitions(-fno-strict-aliasing) -add_library(vchostif - ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c @@ -1582,8 +1582,8 @@ index fde18da..6718215 100755 +add_library(vchostif ${VCHOSTIF_SOURCE}) + #add_library(bufman vc_vchi_bufman.c ) + set(INSTALL_TARGETS vchostif) - # OpenMAX/IL component service diff --git a/interface/vmcs_host/vc_dispmanx.h b/interface/vmcs_host/vc_dispmanx.h index 37fdae1..fe3619a 100755 --- a/interface/vmcs_host/vc_dispmanx.h @@ -1894,5 +1894,5 @@ index 0000000..ad90d30 + set(${_sources} ${${_sources}} PARENT_SCOPE) +endfunction() -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch index d83a9e50..59fc366e 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch @@ -1,17 +1,17 @@ -From 976cc9355fe18487cd84e313e76f397ab47a4bf8 Mon Sep 17 00:00:00 2001 +From 3b568db9460c0359e8bda8256aa2161e5aafe07c Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 1 Oct 2013 13:19:20 +0200 -Subject: [PATCH 03/18] wayland: Add Wayland example +Subject: [PATCH 03/21] wayland: Add Wayland example --- .../linux/apps/hello_pi/CMakeLists.txt | 1 + + .../linux/apps/hello_pi/Makefile | 2 + .../hello_pi/hello_wayland/CMakeLists.txt | 8 + .../hello_pi/hello_wayland/Djenne_128_128.raw | 3 + .../apps/hello_pi/hello_wayland/Makefile | 5 + .../hello_wayland/cube_texture_and_coords.h | 100 +++ .../apps/hello_pi/hello_wayland/triangle.c | 666 ++++++++++++++++++ - .../linux/apps/hello_pi/rebuild.sh | 3 +- - 7 files changed, 785 insertions(+), 1 deletion(-) + 7 files changed, 785 insertions(+) create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/Makefile @@ -19,10 +19,10 @@ Subject: [PATCH 03/18] wayland: Add Wayland example create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/triangle.c diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt -index f2c6aef..0df78f7 100644 +index b28a94a..2849fad 100644 --- a/host_applications/linux/apps/hello_pi/CMakeLists.txt +++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt -@@ -21,6 +21,7 @@ add_subdirectory(hello_encode) +@@ -25,6 +25,7 @@ add_subdirectory(hello_encode) add_subdirectory(hello_jpeg) add_subdirectory(hello_videocube) add_subdirectory(hello_teapot) @@ -30,6 +30,24 @@ index f2c6aef..0df78f7 100644 if(BUILD_FONT) set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c) +diff --git a/host_applications/linux/apps/hello_pi/Makefile b/host_applications/linux/apps/hello_pi/Makefile +index 4c2b2ef..d2b2555 100644 +--- a/host_applications/linux/apps/hello_pi/Makefile ++++ b/host_applications/linux/apps/hello_pi/Makefile +@@ -24,6 +24,7 @@ apps: libs/ilclient/libilclient.a libs/vgfont/libvgfont.a libs/revision/librevis + $(MAKE) -C hello_teapot + $(MAKE) -C hello_fft + $(MAKE) -C hello_mmal_encode ++ $(MAKE) -C hello_wayland + + clean: + $(MAKE) -C libs/ilclient clean +@@ -43,4 +44,5 @@ clean: + $(MAKE) -C hello_teapot clean + $(MAKE) -C hello_fft clean + $(MAKE) -C hello_mmal_encode clean ++ $(MAKE) -C hello_wayland clean + diff --git a/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt b/host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt new file mode 100644 index 0000000..9a2f75c @@ -843,24 +861,6 @@ index 0000000..1a7bfc4 + return 0; +} + -diff --git a/host_applications/linux/apps/hello_pi/rebuild.sh b/host_applications/linux/apps/hello_pi/rebuild.sh -index 8225dd5..0be6ce7 100755 ---- a/host_applications/linux/apps/hello_pi/rebuild.sh -+++ b/host_applications/linux/apps/hello_pi/rebuild.sh -@@ -14,6 +14,7 @@ make -C hello_videocube clean - make -C hello_teapot clean - make -C hello_fft clean - make -C hello_mmal_encode clean -+make -C hello_wayland clean - - make -C libs/ilclient - make -C libs/vgfont -@@ -31,4 +32,4 @@ make -C hello_videocube - make -C hello_teapot - make -C hello_fft - make -C hello_mmal_encode -- -+make -C hello_wayland -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch index a42aa144..ac4c5135 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch @@ -1,7 +1,7 @@ -From c379bd2dc575256084d9e36fc11a347e20660130 Mon Sep 17 00:00:00 2001 +From 3ce83fc1d4974d4db15ff72b4e856a29c60dbb83 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 10 Aug 2015 02:38:27 -0700 -Subject: [PATCH 04/18] wayland-egl: Add bcm_host to dependencies +Subject: [PATCH 04/21] wayland-egl: Add bcm_host to dependencies It uses headers like vcos_platform_types.h but does not depend on module which should add the required include paths @@ -24,5 +24,5 @@ index 8bafc15..fd259c9 100644 Libs: -L${libdir} -lwayland-egl Cflags: -I${includedir} -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch index bbaaddad..33d4a553 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch @@ -1,7 +1,7 @@ -From bd940c32878d401f311215270579ff513c2f3999 Mon Sep 17 00:00:00 2001 +From cf4d2dba7150aad7f85eb7f5df0b0cfa9389da57 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 24 Jan 2015 22:07:19 +0100 -Subject: [PATCH 05/18] interface: remove faulty assert() to make weston happy +Subject: [PATCH 05/21] interface: remove faulty assert() to make weston happy at runtime This was removed after a discussion on IRC with the weston guys @@ -25,5 +25,5 @@ index eab146e..29e0dee 100755 } } else { -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch index 1a5e14f0..690d51da 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch @@ -1,7 +1,7 @@ -From 466f28ce302f68ac39be750f4b55285791f43ab1 Mon Sep 17 00:00:00 2001 +From ce90048cb25a0c2c49c585ce3a4cd8c73a8ff55b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2016 11:10:47 -0800 -Subject: [PATCH 06/18] zero-out wl buffers in egl_surface_free +Subject: [PATCH 06/21] zero-out wl buffers in egl_surface_free origins from buildroot @@ -29,5 +29,5 @@ index 42350bf..1f923d9 100644 #endif } -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch index 72264e4f..d964ed5a 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch @@ -1,7 +1,7 @@ -From b4a2967513f7d0f5f3caee8cf6cbc7a7a085ebac Mon Sep 17 00:00:00 2001 +From 7f7e5b87104134b6710985c5f1c5936a59cccc98 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2016 11:11:41 -0800 -Subject: [PATCH 07/18] initialize front back wayland buffers +Subject: [PATCH 07/21] initialize front back wayland buffers origins from metrological wayland support @@ -30,5 +30,5 @@ index 1f923d9..9a9582c 100644 } #endif -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch index a100e395..d9aba5e9 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch @@ -1,7 +1,7 @@ -From 14c22987dfa9fec02794856cd15b2d64b4b81c32 Mon Sep 17 00:00:00 2001 +From 2291cf20017c297e6ed3afd56945cf8768c9901e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2016 11:09:18 -0800 -Subject: [PATCH 08/18] Remove RPC_FLUSH +Subject: [PATCH 08/21] Remove RPC_FLUSH Origins from buildroot @@ -23,5 +23,5 @@ index f9b7287..b04ffef 100644 } #endif -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch index 4609455a..898408b6 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch @@ -1,7 +1,7 @@ -From e510be221276d06e630ab93452ecb712d3921790 Mon Sep 17 00:00:00 2001 +From 736f489743b4a761afc928cbac197b28b3209bf1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 6 Feb 2016 13:12:47 -0800 -Subject: [PATCH 09/18] fix cmake dependency race +Subject: [PATCH 09/21] fix cmake dependency race Fixes errors like @@ -42,10 +42,10 @@ index 1d81ca3..d6cd415 100644 add_library (vcos SHARED ${SOURCES}) target_link_libraries (vcos pthread dl rt) diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index 6718215..c415176 100755 +index c202204..16d3184 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt -@@ -17,14 +17,6 @@ set(VCHOSTIF_SOURCE +@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE # ${VMCS_TARGET}/vmcs_main.c # vc_vchi_haud.c @@ -74,5 +74,5 @@ index f0bae30..8c44c58 100644 struct wl_resource *resource; struct wl_dispmanx *dispmanx; -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch index dd0b95ed..37f6abbf 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch @@ -1,7 +1,7 @@ -From 8e6cde08077eadfe563dc17c19995ebc48e30b97 Mon Sep 17 00:00:00 2001 +From 450341ccd98801be1c3dc648e18211177f81a60d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 29 Mar 2016 20:38:30 -0700 -Subject: [PATCH 10/18] Fix for framerate with nested composition +Subject: [PATCH 10/21] Fix for framerate with nested composition frame rate appears irregular and lower than expected when using nested composition. @@ -56,5 +56,5 @@ index 03fe67b..13a110c 100644 #ifdef ANDROID CLIENT_UNLOCK(); -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch index 4bd53208..77f9ccb9 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch @@ -1,7 +1,7 @@ -From 9a97d60262999093d6ce8cb688279506c210d802 Mon Sep 17 00:00:00 2001 +From 13f2a4d1c6b6e79389ac3aa64512d78882a11b2f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 2 Apr 2016 10:37:24 -0700 -Subject: [PATCH 11/18] build shared library for vchostif +Subject: [PATCH 11/21] build shared library for vchostif Fixes #149 @@ -11,10 +11,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt -index c415176..d0cca1a 100755 +index 16d3184..e54f046 100755 --- a/interface/vmcs_host/CMakeLists.txt +++ b/interface/vmcs_host/CMakeLists.txt -@@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE +@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE # ${VMCS_TARGET}/vmcs_main.c # vc_vchi_haud.c @@ -22,7 +22,7 @@ index c415176..d0cca1a 100755 +add_library(vchostif SHARED ${VCHOSTIF_SOURCE}) #add_library(bufman vc_vchi_bufman.c ) - + set(INSTALL_TARGETS vchostif) -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch index 9684b4cf..53403d7d 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch @@ -1,7 +1,7 @@ -From fedd7668152049c15ed58c7058e5f4a9c1fac7cb Mon Sep 17 00:00:00 2001 +From a09feea5ceb0af717c17a3a7df8a638f8e858f52 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 2 Apr 2016 10:54:59 -0700 -Subject: [PATCH 12/18] implement buffer wrapping interface for dispmanx +Subject: [PATCH 12/21] implement buffer wrapping interface for dispmanx Courtesy: Zan Dobersek @@ -88,5 +88,5 @@ index c18626d..11ed1ef 100644 -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch index 3052168c..d5702cbc 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch @@ -1,7 +1,7 @@ -From 65f8bca55aead676cd06fc3210aeffef1f2158c6 Mon Sep 17 00:00:00 2001 +From dd8017ebccfa9c439a4e8dd501872e2052016f10 Mon Sep 17 00:00:00 2001 From: Jeff Wannamaker Date: Thu, 19 Jan 2017 18:56:07 +0000 -Subject: [PATCH 13/18] Implement triple buffering for wayland +Subject: [PATCH 13/21] Implement triple buffering for wayland Change from double to triple buffering for wayland. This enables higher frame rates without tearing artifacts @@ -86,5 +86,5 @@ index e328b77..58a3184 100644 back_wl_buffer -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch index 037d7083..52f03159 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch @@ -1,7 +1,7 @@ -From dc1d07d835e1fe70c957a655d6fbb8cde65775af Mon Sep 17 00:00:00 2001 +From afe3917b1a236c08b1ed01053e3da9ab283db1ec Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 10 May 2017 06:39:34 +0000 -Subject: [PATCH 14/18] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT +Subject: [PATCH 14/21] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT weston code uses these defines Upstream-Status: Pending @@ -31,5 +31,5 @@ index 4eacf7f..b1acc9f 100644 #ifndef GL_EXT_texture_type_2_10_10_10_REV #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch index 02cecb83..964d0ece 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch @@ -1,7 +1,7 @@ -From b5fa294c0d8fcb6dd5bfbfb96a0885dd9f3ae609 Mon Sep 17 00:00:00 2001 +From 47972590947e5da25d77cae0ce060f7b8d022a10 Mon Sep 17 00:00:00 2001 From: Andrea Galbusera Date: Fri, 14 Jul 2017 09:52:54 +0200 -Subject: [PATCH 15/18] EGL/glplatform.h: define EGL_CAST +Subject: [PATCH 15/21] EGL/glplatform.h: define EGL_CAST C++ / C typecast macros for special EGL handle values: used by libepoxy code The definition comes from the updated version of this header in mesa. @@ -28,5 +28,5 @@ index 1f7c930..c39d425 100644 + #endif /* __eglplatform_h */ -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch index 34ad90cd..3790f80e 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch @@ -1,7 +1,7 @@ -From bff03f92c0d8bae113e0c7234c719f8385808b38 Mon Sep 17 00:00:00 2001 +From 1eb8bdb4d45e3de9582145c120b0d3ede187c7a9 Mon Sep 17 00:00:00 2001 From: Jeff Wannamaker Date: Sat, 27 Jan 2018 12:28:31 -0500 -Subject: [PATCH 16/18] Allow multiple wayland compositor state data per +Subject: [PATCH 16/21] Allow multiple wayland compositor state data per process When eglBindWaylandDisplayWL is called store the wl_global @@ -141,5 +141,5 @@ index 9ef89cd..abd5ab3 100644 CLIENT_UNLOCK(); -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch index 546cd588..c3457cde 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch @@ -1,7 +1,7 @@ -From 8efd81e96bdd3be68063a6fd32be4755225e93b2 Mon Sep 17 00:00:00 2001 +From 99a210c93019d37dd7f044102c4314c8cb988ed4 Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Sun, 13 May 2018 10:49:04 +0100 -Subject: [PATCH 17/18] khronos: backport typedef for +Subject: [PATCH 17/21] khronos: backport typedef for EGL_EXT_image_dma_buf_import The `gstreamer1.0-plugins-base` package version `1.14` uses `EGL_EXT_image_dma_buf_import`, which @@ -34,5 +34,5 @@ index d7e5ba7..dcc90ce 100755 #ifndef EGL_WL_bind_wayland_display #define EGL_WL_bind_wayland_display 1 -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch index f4d865e6..5317c60e 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch @@ -1,7 +1,7 @@ -From 9cfea4761ba68776fd9bfac671b74c7174f99029 Mon Sep 17 00:00:00 2001 +From 82cf4bc5623c5220dfa1c096ea192f2509837782 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 15 Jul 2018 00:48:38 -0700 -Subject: [PATCH 18/18] Add EGL_IMG_context_priority related defines +Subject: [PATCH 18/21] Add EGL_IMG_context_priority related defines These defines are needed for compiling weston 4.x taken from Khronos headers @@ -31,5 +31,5 @@ index dcc90ce..6842bf9 100755 #define EGL_KHR_vg_parent_image 1 #define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ -- -2.19.1 +2.27.0 diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch new file mode 100644 index 00000000..cd6306bb --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0019-libfdt-Undefine-__wordsize-if-already-defined.patch @@ -0,0 +1,31 @@ +From 1112539d9fde6428c1230b4fc9ea479623e9f968 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2019 23:30:27 -0700 +Subject: [PATCH 19/21] libfdt: Undefine __wordsize if already defined + +glibc 2.30+ defines __wordsize, which is same so its easier to compile +for multiple versions of glibc even ones which does not have this define + +Signed-off-by: Khem Raj +--- + opensrc/helpers/libfdt/libfdt_env.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/opensrc/helpers/libfdt/libfdt_env.h b/opensrc/helpers/libfdt/libfdt_env.h +index f4608be..5e83a27 100644 +--- a/opensrc/helpers/libfdt/libfdt_env.h ++++ b/opensrc/helpers/libfdt/libfdt_env.h +@@ -18,6 +18,10 @@ + #include + #include + ++#ifdef __bitwise ++#undef __bitwise ++#endif ++ + #ifdef __CHECKER__ + #define FDT_FORCE __attribute__((force)) + #define FDT_BITWISE __attribute__((bitwise)) +-- +2.27.0 + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch new file mode 100644 index 00000000..e9d9da6f --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0020-openmaxil-add-pkg-config-file.patch @@ -0,0 +1,43 @@ +From 488916a6b366bfa5da2907b5892798eb2306a17d Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 13 Jun 2018 18:22:22 +0000 +Subject: [PATCH 20/21] openmaxil: add pkg-config file + +--- + CMakeLists.txt | 2 +- + pkgconfig/openmaxil.pc.in | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + create mode 100644 pkgconfig/openmaxil.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80337b2..3e3c90e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,7 +133,7 @@ include_directories("${PROJECT_BINARY_DIR}") + include(FindPkgConfig QUIET) + if(PKG_CONFIG_FOUND) + # Produce a pkg-config file +- foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc) ++ foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc openmaxil.pc) + configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +diff --git a/pkgconfig/openmaxil.pc.in b/pkgconfig/openmaxil.pc.in +new file mode 100644 +index 0000000..8793a61 +--- /dev/null ++++ b/pkgconfig/openmaxil.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: openmaxil ++Description: Broadcom openmaxil library ++Version: 1 ++Libs: -L${libdir} -lopenmaxil -lvcos -lvchiq_arm -pthread ++Cflags: -I${includedir} -I${includedir}/IL -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM +-- +2.27.0 + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch new file mode 100644 index 00000000..c762a9fc --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/files/0021-cmake-Disable-format-overflow-warning-as-error.patch @@ -0,0 +1,37 @@ +From ee842886f3c0589d6df5a0687973beb18a3be524 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 31 Mar 2020 11:51:02 -0700 +Subject: [PATCH 21/21] cmake: Disable format-overflow warning as error + +gcc10 complains about a check which could potentially be null + +build/inc/interface/vcos/vcos_logging.h:234:88: error: '%s' directive argument is null [-Werror=format-overflow=] + 234 | # define _VCOS_LOG_X(cat, _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A potential fix would be to check for fmt not being null but lets leave +that to experts + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt +index a863cb6..f358135 100644 +--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt ++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt +@@ -3,7 +3,7 @@ if (WIN32) + set(VCOS_PLATFORM win32) + else () + set(VCOS_PLATFORM pthreads) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall -Werror -Wno-error=format-overflow) + endif () + + # set this as we want all the source of vchostif to be available in libbcm_host +-- +2.27.0 + diff --git a/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb b/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb index f5c803e4..1138da86 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb +++ b/bsp/meta-raspberrypi/recipes-graphics/userland/userland_git.bb @@ -6,17 +6,18 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196" PROVIDES += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "virtual/libgles2 virtual/egl", d)}" +PROVIDES += "virtual/libomxil" RPROVIDES_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "libgles2 egl libegl libegl1 libglesv2-2", d)}" COMPATIBLE_MACHINE = "^rpi$" SRCBRANCH = "master" SRCFORK = "raspberrypi" -SRCREV = "d574b51a60a075baefe863670466ee24e6c4256e" +SRCREV = "188d3bfe4a0ac36b119a2cee35a6be8d0c68e09e" # Use the date of the above commit as the package version. Update this when # SRCREV is changed. -PV = "20181120" +PV = "20200624" SRC_URI = "\ git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ @@ -38,6 +39,9 @@ SRC_URI = "\ file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \ file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \ file://0018-Add-EGL_IMG_context_priority-related-defines.patch \ + file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \ + file://0020-openmaxil-add-pkg-config-file.patch \ + file://0021-cmake-Disable-format-overflow-warning-as-error.patch \ " S = "${WORKDIR}/git" @@ -64,6 +68,7 @@ do_install_append () { sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f} sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f} done + rm -rf ${D}${prefix}${sysconfdir} if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then rm -rf ${D}${libdir}/libEGL* rm -rf ${D}${libdir}/libGLES* @@ -71,6 +76,10 @@ do_install_append () { rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \ ${D}${libdir}/pkgconfig/wayland-egl.pc rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR + else + ln -sf brcmglesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc + ln -sf brcmegl.pc ${D}${libdir}/pkgconfig/egl.pc + ln -sf brcmvg.pc ${D}${libdir}/pkgconfig/vg.pc fi } @@ -88,7 +97,5 @@ FILES_${PN}-dev += "${includedir} \ FILES_${PN}-doc += "${datadir}/install" FILES_${PN}-dbg += "${libdir}/plugins/.debug" -PACKAGE_ARCH = "${MACHINE_ARCH}" - RDEPENDS_${PN} += "bash" RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}" diff --git a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc index cd0d57b2..540e2895 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc +++ b/bsp/meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc @@ -1,5 +1,5 @@ DESCRIPTION = "Graphics libraries for BCM2835." -LICENSE = "Proprietary" +LICENSE = "Broadcom-RPi" LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" @@ -8,7 +8,7 @@ COMPATIBLE_MACHINE = "^rpi$" INHIBIT_DEFAULT_DEPS = "1" -include recipes-bsp/common/firmware.inc +include recipes-bsp/common/raspberrypi-firmware.inc SRC_URI += " \ file://egl.pc \ @@ -25,9 +25,6 @@ do_install () { install -d ${D}${bindir} cp -R bin/* ${D}${bindir} - install -d ${D}${sbindir} - cp -R sbin/* ${D}${sbindir} - install -d ${D}${libdir} # note: -H option to deref symlinked .so cp -R -H lib/* ${D}${libdir} @@ -49,7 +46,6 @@ INITSCRIPT_NAME = "vchiq.sh" INITSCRIPT_PARAMS = "start 03 S ." FILES_${PN} = "${bindir}/* \ - ${sbindir}/* \ ${libdir}/lib*.so \ ${sysconfdir}/init.d \ ${libdir}/plugins" diff --git a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index a5a6af3f..fba16321 100644 --- a/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -1,9 +1 @@ -OPENGL_PKGCFG = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'dri3 xshmfence glamor', '', d)}" - -# slightly modified to oe-core's default: add ${OPENGL_PKGCFG} -PACKAGECONFIG_rpi ?= " \ - dri2 udev ${XORG_CRYPTO} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx ${OPENGL_PKGCFG}', '', d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \ -" +OPENGL_PKGCONFIGS_rpi = "dri glx ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'dri3 xshmfence glamor', '', d)}" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb index 1f63c329..833f8f68 100644 --- a/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb +++ b/bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb @@ -25,7 +25,7 @@ LICENSE = "\ " LIC_FILES_CHKSUM = "\ file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ - file://WHENCE;md5=a9c2c217f513c20e1d16b384b3e2c12d \ + file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \ " # These are not common licenses, set NO_GENERIC_LICENSE for them @@ -34,8 +34,9 @@ NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm4 NO_GENERIC_LICENSE[WHENCE] = "WHENCE" SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree" -SRCREV = "b518de45ced519e8f7a499f4778100173402ae43" -PV = "0.0+git${SRCPV}" + +SRCREV = "616fc2dd4df421e3974179d9e46d45e7006aeb28" +PV = "20190114-1+rpt6" S = "${WORKDIR}/git" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch new file mode 100644 index 00000000..66efde13 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch @@ -0,0 +1,35 @@ +From 754e3030788702c1f013a88a4fc8546742d84e27 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 18 Jun 2020 13:45:04 -0700 +Subject: [PATCH] Revert "selftests/bpf: Skip perf hw events test if the setup + disabled it" + +This reverts commit da43712a7262891317883d4b3a909fb18dac4b1d. + +Signed-off-by: Khem Raj +--- + .../selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +index 437cb93e72ac..f62aa0eb959b 100644 +--- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c ++++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c +@@ -49,12 +49,8 @@ void test_stacktrace_build_id_nmi(void) + pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, + 0 /* cpu 0 */, -1 /* group id */, + 0 /* flags */); +- if (pmu_fd < 0 && errno == ENOENT) { +- printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__); +- test__skip(); +- goto close_prog; +- } +- if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n", ++ if (CHECK(pmu_fd < 0, "perf_event_open", ++ "err %d errno %d. Does the test host support PERF_COUNT_HW_CPU_CYCLES?\n", + pmu_fd, errno)) + goto close_prog; + +-- +2.27.0 + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch new file mode 100644 index 00000000..e0e7b858 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch @@ -0,0 +1,57 @@ +From e66a0be4fac135d67ab228a6fd1453b9e36a3644 Mon Sep 17 00:00:00 2001 +From: Changbin Du +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_ 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. + +Signed-off-by: Changbin Du +Acked-by: Jiri Olsa +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com +Signed-off-by: Arnaldo Carvalho de Melo +--- + 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 af3f9b9f1e8b..b8e77617fdc4 100644 +--- a/tools/perf/util/srcline.c ++++ b/tools/perf/util/srcline.c +@@ -191,16 +191,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; diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch new file mode 100644 index 00000000..18289348 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch @@ -0,0 +1,40 @@ +From 4cd12df48b83cef9cc7d6b80b128afbf68746718 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 14 Mar 2020 07:31:34 -0700 +Subject: [PATCH] selftest/bpf: Use CHECK macro instead of RET_IF + +backporting 634efb750435d0a489dc58477d4fcb88b2692942 causes build +failures because RET_IF is defined in 7ee0d4e97b889c0478af9c1a6e5af658b181423f +but that is not backported + +Upstream-Status: Submitted +Signed-off-by: Khem Raj +Cc: Jakub Sitnicki +Cc: Alexei Starovoitov +Signed-off-by: Bruce Ashfield +--- + tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c +index 079d0f5a2909..7e4c91f2238d 100644 +--- a/tools/testing/selftests/bpf/test_select_reuseport.c ++++ b/tools/testing/selftests/bpf/test_select_reuseport.c +@@ -668,12 +668,12 @@ static void cleanup_per_test(void) + + for (i = 0; i < NR_RESULTS; i++) { + err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY); +- RET_IF(err, "reset elem in result_map", ++ CHECK(err, "reset elem in result_map", + "i:%u err:%d errno:%d\n", i, err, errno); + } + + err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY); +- RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n", ++ CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n", + err, errno); + + for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++) +-- +2.26.0 + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch new file mode 100644 index 00000000..d18b942b --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch @@ -0,0 +1,94 @@ +From 366487b86a8c87954fb4ab7bd88ab49a929a32f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Apr 2020 11:25:58 -0700 +Subject: [PATCH 2/2] Revert "selftests/bpf: Fix perf_buffer test on systems w/ + offline CPUs" + +This reverts commit 77bb53cb094828a31cd3c5b402899810f63073c1. +--- + .../selftests/bpf/prog_tests/perf_buffer.c | 29 ++++--------------- + 1 file changed, 5 insertions(+), 24 deletions(-) + +diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +index cf6c87936c69..3003fddc0613 100644 +--- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c ++++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include "libbpf_internal.h" + + static void on_sample(void *ctx, int cpu, void *data, __u32 size) + { +@@ -20,7 +19,7 @@ static void on_sample(void *ctx, int cpu, void *data, __u32 size) + + void test_perf_buffer(void) + { +- int err, prog_fd, on_len, nr_on_cpus = 0, nr_cpus, i, duration = 0; ++ int err, prog_fd, nr_cpus, i, duration = 0; + const char *prog_name = "kprobe/sys_nanosleep"; + const char *file = "./test_perf_buffer.o"; + struct perf_buffer_opts pb_opts = {}; +@@ -30,27 +29,15 @@ void test_perf_buffer(void) + struct bpf_object *obj; + struct perf_buffer *pb; + struct bpf_link *link; +- bool *online; + + nr_cpus = libbpf_num_possible_cpus(); + if (CHECK(nr_cpus < 0, "nr_cpus", "err %d\n", nr_cpus)) + return; + +- err = parse_cpu_mask_file("/sys/devices/system/cpu/online", +- &online, &on_len); +- if (CHECK(err, "nr_on_cpus", "err %d\n", err)) +- return; +- +- for (i = 0; i < on_len; i++) +- if (online[i]) +- nr_on_cpus++; +- + /* load program */ + err = bpf_prog_load(file, BPF_PROG_TYPE_KPROBE, &obj, &prog_fd); +- if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) { +- obj = NULL; +- goto out_close; +- } ++ if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) ++ return; + + prog = bpf_object__find_program_by_title(obj, prog_name); + if (CHECK(!prog, "find_probe", "prog '%s' not found\n", prog_name)) +@@ -77,11 +64,6 @@ void test_perf_buffer(void) + /* trigger kprobe on every CPU */ + CPU_ZERO(&cpu_seen); + for (i = 0; i < nr_cpus; i++) { +- if (i >= on_len || !online[i]) { +- printf("skipping offline CPU #%d\n", i); +- continue; +- } +- + CPU_ZERO(&cpu_set); + CPU_SET(i, &cpu_set); + +@@ -99,8 +81,8 @@ void test_perf_buffer(void) + if (CHECK(err < 0, "perf_buffer__poll", "err %d\n", err)) + goto out_free_pb; + +- if (CHECK(CPU_COUNT(&cpu_seen) != nr_on_cpus, "seen_cpu_cnt", +- "expect %d, seen %d\n", nr_on_cpus, CPU_COUNT(&cpu_seen))) ++ if (CHECK(CPU_COUNT(&cpu_seen) != nr_cpus, "seen_cpu_cnt", ++ "expect %d, seen %d\n", nr_cpus, CPU_COUNT(&cpu_seen))) + goto out_free_pb; + + out_free_pb: +@@ -109,5 +91,4 @@ void test_perf_buffer(void) + bpf_link__destroy(link); + out_close: + bpf_object__close(obj); +- free(online); + } +-- +2.26.0 + diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg new file mode 100644 index 00000000..9c48eff1 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/powersave.cfg @@ -0,0 +1,13 @@ +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HIBERNATE_CALLBACKS=y +CONFIG_HIBERNATION=y +CONFIG_PM_STD_PARTITION="/dev/mmcblk0p2" +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_ARCH_HIBERNATION_HEADER=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg b/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg new file mode 100644 index 00000000..fd97ed71 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg @@ -0,0 +1,2 @@ +# see emmc node +CONFIG_MMC_SDHCI_IPROC=y diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb index 4a7db1a4..bb4a64ef 100644 --- a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb @@ -7,16 +7,17 @@ python __anonymous() { FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" -LINUX_VERSION ?= "4.16" -LINUX_RPI_DEV_BRANCH ?= "rpi-4.16.y" +LINUX_VERSION ?= "4.19" +LINUX_RPI_BRANCH ?= "rpi-4.19.y" SRCREV = "${AUTOREV}" SRC_URI = " \ - git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \ - file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ + git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \ " require linux-raspberrypi.inc # Disable version check so that we don't have to edit this recipe every time # upstream bumps the version KERNEL_VERSION_SANITY_SKIP = "1" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb index 1a990fe0..224bc6dd 100644 --- a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb @@ -1,6 +1,6 @@ -LINUX_VERSION ?= "4.14.81" +LINUX_VERSION ?= "4.14.91" -SRCREV = "acf578d07d57480674d5361df9171fe9528765cb" +SRCREV = "0b520d5f1f580d36a742a9457a5673fa1578fff3" SRC_URI = " \ git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y-rt \ file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb new file mode 100644 index 00000000..2d9363f5 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb @@ -0,0 +1,6 @@ +LINUX_VERSION ?= "4.19.71" +LINUX_RPI_BRANCH ?= "rpi-4.19.y-rt" + +SRCREV = "e2e9cec6fb061ba58304fd391ef76747f2963557" + +require linux-raspberrypi_4.19.inc diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc index 01f2425e..f7dee770 100644 --- a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc @@ -16,9 +16,14 @@ SRC_URI += "file://rpi-kernel-misc.cfg" KCONFIG_MODE = "--alldefconfig" KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig" KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG_raspberrypi-cm3 ?= "bcm2709_defconfig" KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig" KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" +KBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig" + +LINUX_VERSION_EXTENSION ?= "" # CMDLINE for raspberrypi SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}" @@ -96,9 +101,6 @@ do_configure_prepend() { mv -f ${B}/.config ${B}/.config.patched CONF_SED_SCRIPT="" - # Localversion - kernel_configure_variable LOCALVERSION "\"\"" - if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then kernel_configure_variable OVERLAY_FS y kernel_configure_variable SQUASHFS y @@ -120,17 +122,19 @@ do_configure_prepend() { rm -f ${B}/.config.patched } -do_compile_append_raspberrypi3-64() { - cc_extra=$(get_cc_option) - oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} +do_compile_append() { + if [ "${SITEINFO_BITS}" = "64" ]; then + cc_extra=$(get_cc_option) + oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + fi } do_deploy_append() { # Deploy cmdline.txt - install -d ${DEPLOYDIR}/bcm2835-bootfiles + install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" if [ ${PITFT} = "1" ]; then PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8" fi - echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt + echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/cmdline.txt } diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb index 6563918c..03710edf 100644 --- a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb @@ -1,6 +1,6 @@ -LINUX_VERSION ?= "4.14.112" +LINUX_VERSION ?= "4.14.114" -SRCREV = "6b5c4a2508403839af29ef44059d04acbe0ee204" +SRCREV = "7688b39276ff9952df381d79de63b258e73971ce" SRC_URI = " \ git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y \ file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb new file mode 100644 index 00000000..93a29f00 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb @@ -0,0 +1,10 @@ +LINUX_VERSION ?= "4.19.126" +LINUX_RPI_BRANCH ?= "rpi-4.19.y" + +SRCREV = "f6b3ac28f0a9137d4c24c0b8832e693bbd16f5b7" + +require linux-raspberrypi_4.19.inc + +SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch \ + file://0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch \ + " diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.inc b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.inc new file mode 100644 index 00000000..d6c1223c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.inc @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;branch=${LINUX_RPI_BRANCH} \ + " +SRC_URI_append_raspberrypi4-64 = " file://rpi4-64-kernel-misc.cfg" + +require linux-raspberrypi.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +KERNEL_EXTRA_ARGS_append_rpi = " DTC_FLAGS='-@ -H epapr'" diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb deleted file mode 100644 index b3f32482..00000000 --- a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -LINUX_VERSION ?= "4.9.80" - -SRCREV = "7f9c648dad6473469b4133898fa6bb8d818ecff9" -SRC_URI = " \ - git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y \ - file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ - " - -require linux-raspberrypi.inc diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb new file mode 100644 index 00000000..e039c088 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bb @@ -0,0 +1,11 @@ +LINUX_VERSION ?= "5.4.51" +LINUX_RPI_BRANCH ?= "rpi-5.4.y" + +SRCREV = "95a969f451f6ed61029741411c1c9aa44023e465" + +require linux-raspberrypi_5.4.inc + +SRC_URI += "file://0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch \ + file://0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch \ + file://powersave.cfg \ + " diff --git a/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.inc b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.inc new file mode 100644 index 00000000..232f8a97 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.inc @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;branch=${LINUX_RPI_BRANCH} \ + " +SRC_URI_remove = "file://rpi-kernel-misc.cfg" + +require linux-raspberrypi.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +KERNEL_EXTRA_ARGS_append_rpi = " DTC_FLAGS='-@ -H epapr'" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch deleted file mode 100644 index 85fea67b..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch +++ /dev/null @@ -1,46 +0,0 @@ -From cfb432fcd8868c7a4f32010c61e47e2bf0ff80c6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= -Date: Mon, 25 May 2015 14:53:35 +0200 -Subject: [PATCH] Don't try to acquire buffer when src pad isn't active - -This solves a race condition when setting the pipeline from PAUSE to -NULL while the decoder loop is still running. Without this patch, the -thread which interacts with the decode sink pad gets blocked here: - - gst_element_change_state() - gst_element_change_state_func() - gst_element_pads_activate() --> Deactivating pads - activate_pads() - gst_pad_set_active() - gst_pad_activate_mode() - post_activate() - GST_PAD_STREAM_LOCK() - -while gst_omx_port_acquire_buffer() gets stalled forever in -gst_omx_component_wait_message() waiting for a message that will never -arrive: - - gst_omx_video_dec_loop() - gst_omx_port_acquire_buffer() - gst_omx_component_wait_message() - ---- - omx/gstomxvideodec.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index d12ee8f..fb0100a 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -1250,6 +1250,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) - GstClockTimeDiff deadline; - OMX_ERRORTYPE err; - -+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { -+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); -+ goto flushing; -+ } -+ - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) - port = self->eglimage ? self->egl_out_port : self->dec_out_port; - #else diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-config-files-path.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-config-files-path.patch deleted file mode 100644 index 6903c177..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0001-config-files-path.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 11 Feb 2016 12:53:20 -0800 - ---- - config/bellagio/gstomx.conf | 8 ++++---- - config/rpi/gstomx.conf | 22 +++++++++++----------- - 2 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf -index 5ca8ba6..8931255 100644 ---- a/config/bellagio/gstomx.conf -+++ b/config/bellagio/gstomx.conf -@@ -1,6 +1,6 @@ - [omxmpeg4videodec] - type-name=GstOMXMPEG4VideoDec --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_decoder.mpeg4 - rank=257 - in-port-index=0 -@@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang - - [omxh264dec] - type-name=GstOMXH264Dec --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_decoder.avc - rank=257 - in-port-index=0 -@@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang - - [omxmpeg4videoenc] - type-name=GstOMXMPEG4VideoEnc --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.video_encoder.mpeg4 - rank=0 - in-port-index=0 -@@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s - - [omxaacenc] - type-name=GstOMXAACEnc --core-name=/usr/local/lib/libomxil-bellagio.so.0 -+core-name=/usr/lib/libomxil-bellagio.so.0 - component-name=OMX.st.audio_encoder.aac - rank=0 - in-port-index=0 -diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf -index d3ea56a..2508dae 100644 ---- a/config/rpi/gstomx.conf -+++ b/config/rpi/gstomx.conf -@@ -1,6 +1,6 @@ - [omxmpeg2videodec] - type-name=GstOMXMPEG2VideoDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -9,7 +9,7 @@ hacks=no-component-role - - [omxmpeg4videodec] - type-name=GstOMXMPEG4VideoDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -18,7 +18,7 @@ hacks=no-component-role - - [omxh263dec] - type-name=GstOMXH263Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -27,7 +27,7 @@ hacks=no-component-role - - [omxh264dec] - type-name=GstOMXH264Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos - - [omxtheoradec] - type-name=GstOMXTheoraDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -45,7 +45,7 @@ hacks=no-component-role - - [omxvp8dec] - type-name=GstOMXVP8Dec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -54,7 +54,7 @@ hacks=no-component-role - - [omxmjpegdec] - type-name=GstOMXMJPEGDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -63,7 +63,7 @@ hacks=no-component-role - - [omxvc1dec] - type-name=GstOMXWMVDec --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_decode - rank=257 - in-port-index=130 -@@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt - - [omxh264enc] - type-name=GstOMXH264Enc --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.video_encode - rank=257 - in-port-index=200 -@@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure - - [omxanalogaudiosink] - type-name=GstOMXAnalogAudioSink --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.audio_render - rank=257 - in-port-index=100 -@@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter - - [omxhdmiaudiosink] - type-name=GstOMXHdmiAudioSink --core-name=/opt/vc/lib/libopenmaxil.so -+core-name=/usr/lib/libopenmaxil.so - component-name=OMX.broadcom.audio_render - rank=258 - in-port-index=100 diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0003-no-timeout-on-get-state.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0003-no-timeout-on-get-state.patch deleted file mode 100644 index 4124bccf..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0003-no-timeout-on-get-state.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 02e49cba402a783fa1b30e445b83a5c280949c1e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 13 Feb 2016 11:42:29 -0800 - ---- - omx/gstomxvideodec.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c -index fb0100a..bad6335 100644 ---- a/omx/gstomxvideodec.c -+++ b/omx/gstomxvideodec.c -@@ -1713,9 +1713,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) - g_cond_broadcast (&self->drain_cond); - g_mutex_unlock (&self->drain_lock); - -- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); -+ gst_omx_component_get_state (self->dec, 0); - #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); -+ gst_omx_component_get_state (self->egl_render, 0); - #endif - - gst_buffer_replace (&self->codec_data, NULL); diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0004-Properly-handle-drain-requests-while-flushing.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0004-Properly-handle-drain-requests-while-flushing.patch deleted file mode 100644 index 3c9dd2c8..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0004-Properly-handle-drain-requests-while-flushing.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f00912f0628aff15e882bdc1619f5de1ddf5c720 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= -Date: Tue, 17 Nov 2015 16:51:27 +0000 -Subject: [PATCH] Properly handle drain requests while flushing - -Without this commit the decoder streaming thread stops without ever attending -the drain request, leaving the decoder input thread waiting forever. - ---- - omx/gstomx.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -Index: gst-omx-1.14.0/omx/gstomx.c -=================================================================== ---- gst-omx-1.14.0.orig/omx/gstomx.c -+++ gst-omx-1.14.0/omx/gstomx.c -@@ -837,6 +837,13 @@ gst_omx_component_new (GstObject * paren - - g_mutex_lock (&comp->lock); - gst_omx_component_handle_messages (comp); -+ -+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { -+ GST_ERROR_OBJECT (comp->parent, -+ "Last operation returned an error. Setting last_error manually."); -+ comp->last_error = err; -+ } -+ - g_mutex_unlock (&comp->lock); - - return comp; diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch deleted file mode 100644 index ed8645e9..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.14/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= -Date: Fri, 4 Dec 2015 18:39:59 +0100 -Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a - timeout releasing the buffers taken by the egl_render out port - ---- - omx/gstomxvideodec.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -Index: gst-omx-1.14.0/omx/gstomxvideodec.c -=================================================================== ---- gst-omx-1.14.0.orig/omx/gstomxvideodec.c -+++ gst-omx-1.14.0/omx/gstomxvideodec.c -@@ -2214,7 +2214,9 @@ gst_omx_video_dec_disable (GstOMXVideoDe - return FALSE; - if (gst_omx_port_wait_buffers_released (out_port, - 1 * GST_SECOND) != OMX_ErrorNone) -+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) - return FALSE; -+#endif - if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone) - return FALSE; - if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch new file mode 100644 index 00000000..c8af7da0 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch @@ -0,0 +1,48 @@ +From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 11 Feb 2016 12:53:20 -0800 +Subject: [PATCH] Don't try to acquire buffer when src pad isn't active + +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +This solves a race condition when setting the pipeline from PAUSE to +NULL while the decoder loop is still running. Without this patch, the +thread which interacts with the decode sink pad gets blocked here: + + gst_element_change_state() + gst_element_change_state_func() + gst_element_pads_activate() --> Deactivating pads + activate_pads() + gst_pad_set_active() + gst_pad_activate_mode() + post_activate() + GST_PAD_STREAM_LOCK() + +while gst_omx_port_acquire_buffer() gets stalled forever in +gst_omx_component_wait_message() waiting for a message that will never +arrive: + + gst_omx_video_dec_loop() + gst_omx_port_acquire_buffer() + gst_omx_component_wait_message() + +--- + omx/gstomxvideodec.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index abe6e30..c4dc33f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) + GstOMXAcquireBufferReturn acq_return; + OMX_ERRORTYPE err; + ++ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) { ++ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead"); ++ goto flushing; ++ } ++ + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) + port = self->eglimage ? self->egl_out_port : self->dec_out_port; + #else diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch new file mode 100644 index 00000000..6903c177 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch @@ -0,0 +1,150 @@ +From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 11 Feb 2016 12:53:20 -0800 + +--- + config/bellagio/gstomx.conf | 8 ++++---- + config/rpi/gstomx.conf | 22 +++++++++++----------- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf +index 5ca8ba6..8931255 100644 +--- a/config/bellagio/gstomx.conf ++++ b/config/bellagio/gstomx.conf +@@ -1,6 +1,6 @@ + [omxmpeg4videodec] + type-name=GstOMXMPEG4VideoDec +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_decoder.mpeg4 + rank=257 + in-port-index=0 +@@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang + + [omxh264dec] + type-name=GstOMXH264Dec +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_decoder.avc + rank=257 + in-port-index=0 +@@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang + + [omxmpeg4videoenc] + type-name=GstOMXMPEG4VideoEnc +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.video_encoder.mpeg4 + rank=0 + in-port-index=0 +@@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s + + [omxaacenc] + type-name=GstOMXAACEnc +-core-name=/usr/local/lib/libomxil-bellagio.so.0 ++core-name=/usr/lib/libomxil-bellagio.so.0 + component-name=OMX.st.audio_encoder.aac + rank=0 + in-port-index=0 +diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf +index d3ea56a..2508dae 100644 +--- a/config/rpi/gstomx.conf ++++ b/config/rpi/gstomx.conf +@@ -1,6 +1,6 @@ + [omxmpeg2videodec] + type-name=GstOMXMPEG2VideoDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -9,7 +9,7 @@ hacks=no-component-role + + [omxmpeg4videodec] + type-name=GstOMXMPEG4VideoDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -18,7 +18,7 @@ hacks=no-component-role + + [omxh263dec] + type-name=GstOMXH263Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -27,7 +27,7 @@ hacks=no-component-role + + [omxh264dec] + type-name=GstOMXH264Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos + + [omxtheoradec] + type-name=GstOMXTheoraDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -45,7 +45,7 @@ hacks=no-component-role + + [omxvp8dec] + type-name=GstOMXVP8Dec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -54,7 +54,7 @@ hacks=no-component-role + + [omxmjpegdec] + type-name=GstOMXMJPEGDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -63,7 +63,7 @@ hacks=no-component-role + + [omxvc1dec] + type-name=GstOMXWMVDec +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_decode + rank=257 + in-port-index=130 +@@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt + + [omxh264enc] + type-name=GstOMXH264Enc +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.video_encode + rank=257 + in-port-index=200 +@@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure + + [omxanalogaudiosink] + type-name=GstOMXAnalogAudioSink +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.audio_render + rank=257 + in-port-index=100 +@@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter + + [omxhdmiaudiosink] + type-name=GstOMXHdmiAudioSink +-core-name=/opt/vc/lib/libopenmaxil.so ++core-name=/usr/lib/libopenmaxil.so + component-name=OMX.broadcom.audio_render + rank=258 + in-port-index=100 diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch new file mode 100644 index 00000000..43423266 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch @@ -0,0 +1,24 @@ +From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 13 Feb 2016 11:42:29 -0800 + +--- + omx/gstomxvideodec.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index c4dc33f..ba5304f 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) + g_cond_broadcast (&self->drain_cond); + g_mutex_unlock (&self->drain_lock); + +- gst_omx_component_get_state (self->dec, 5 * GST_SECOND); ++ gst_omx_component_get_state (self->dec, 0); + #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) +- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND); ++ gst_omx_component_get_state (self->egl_render, 0); + #endif + + gst_buffer_replace (&self->codec_data, NULL); diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch new file mode 100644 index 00000000..144ced6a --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch @@ -0,0 +1,30 @@ +From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= +Date: Tue, 17 Nov 2015 16:51:27 +0000 +Subject: [PATCH] Properly handle drain requests while flushing + +Without this commit the decoder streaming thread stops without ever attending +the drain request, leaving the decoder input thread waiting forever. + +--- + omx/gstomx.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/omx/gstomx.c b/omx/gstomx.c +index 038ce32..5202d33 100644 +--- a/omx/gstomx.c ++++ b/omx/gstomx.c +@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name, + + g_mutex_lock (&comp->lock); + gst_omx_component_handle_messages (comp); ++ ++ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) { ++ GST_ERROR_OBJECT (comp->parent, ++ "Last operation returned an error. Setting last_error manually."); ++ comp->last_error = err; ++ } ++ + g_mutex_unlock (&comp->lock); + + return comp; diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch new file mode 100644 index 00000000..3245294e --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch @@ -0,0 +1,36 @@ +From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Tue, 28 May 2019 18:02:24 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a + timeout releasing the buffers taken by the egl_render out port + +From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= + +Date: Fri, 4 Dec 2015 18:39:59 +0100 +Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a +timeout releasing the buffers taken by the egl_render out port + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan +--- + omx/gstomxvideodec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c +index ba5304f..8bd5d3d 100644 +--- a/omx/gstomxvideodec.c ++++ b/omx/gstomxvideodec.c +@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self) + return FALSE; + if (gst_omx_port_wait_buffers_released (out_port, + 1 * GST_SECOND) != OMX_ErrorNone) ++#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)) + return FALSE; ++#endif + if (!gst_omx_video_dec_deallocate_output_buffers (self)) + return FALSE; + if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone) +-- +2.17.1 + diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend index f892c66e..a7aa8d9c 100644 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend @@ -1,9 +1,8 @@ -DEPENDS_append_rpi = " userland" GSTREAMER_1_0_OMX_TARGET_rpi = "rpi" GSTREAMER_1_0_OMX_CORE_NAME_rpi = "${libdir}/libopenmaxil.so" -# How to make this RPI specific? -EXTRA_OECONF_append_rpi = " CFLAGS="$CFLAGS -I${STAGING_DIR_TARGET}/usr/include/IL -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux"" -#examples only build with GL but not GLES, so disable it for RPI -EXTRA_OECONF_append_rpi = " --disable-examples" - -RDEPENDS_${PN}_append_rpi = " userland" +EXTRA_OEMESON_append_rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include" +CFLAGS_append_rpi = " \ + -I${STAGING_DIR_TARGET}/usr/include/IL \ + -I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads \ + -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux \ +" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14%.bbappend deleted file mode 100644 index cb7986bb..00000000 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -# -# Need to make this conditional to gstreamer1 -# -SRC_URI_append_rpi = " \ - file://0001-config-files-path.patch \ - file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ - file://0003-no-timeout-on-get-state.patch \ - file://0004-Properly-handle-drain-requests-while-flushing.patch \ - file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ -" - -FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.14:" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16%.bbappend new file mode 100644 index 00000000..79b35c41 --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16%.bbappend @@ -0,0 +1,12 @@ +# +# Need to make this conditional to gstreamer1 +# +SRC_URI_append_rpi = " \ + file://0001-config-files-path.patch \ + file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \ + file://0003-no-timeout-on-get-state.patch \ + file://0004-Properly-handle-drain-requests-while-flushing.patch \ + file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \ +" + +FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.16:" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index 899a2d40..8ab1510d 100644 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend @@ -1 +1,2 @@ -PACKAGECONFIG_append_rpi = " hls libmms faad" +PACKAGECONFIG_append_rpi = " hls libmms \ + ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'faad', '', d)}" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index 9e86c008..bfbce49f 100644 --- a/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -2,9 +2,8 @@ EXTRA_OECONF_append_rpi = " CPPFLAGS='-I${STAGING_INCDIR}/interface/vcos/pthread -I${STAGING_INCDIR}/interface/vmcs_host/linux'" # if using bcm driver enable dispmanx not when using VC4 driver - PACKAGECONFIG_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' dispmanx', d)}" +DEPENDS_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}" -PACKAGECONFIG_GL_rpi = "egl gles2" - -PACKAGECONFIG[dispmanx] = "--enable-dispmanx,--disable-dispmanx,userland" +PACKAGECONFIG_GL_VC4GRAPHICS = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" +PACKAGECONFIG_GL_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '${PACKAGECONFIG_GL_VC4GRAPHICS}', 'egl gles2', d)}" diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch index 383cdf7c..d137592c 100644 --- a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch @@ -20,7 +20,7 @@ Index: git/Makefile.ffmpeg @@ -1,5 +1,7 @@ CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT -+FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog ++FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) + WORK=$(PWD) @@ -29,7 +29,7 @@ Index: git/Makefile.ffmpeg CFLAGS="$(CFLAGS) ${INCLUDES}" \ LDFLAGS="" \ ./configure \ -- --extra-cflags="-mfpu=vfp -mfloat-abi=hard -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \ +- --extra-cflags="-mfpu=vfp -mfloat-abi=hard" \ + --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \ + --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \ --enable-shared \ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch new file mode 100644 index 00000000..a8c51d5c --- /dev/null +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0007-Remove-Makefile-hardcoded-arch-tune.patch @@ -0,0 +1,8 @@ +--- a/Makefile 2019-06-20 15:04:53.390282996 +0200 ++++ b/Makefile 2019-06-20 15:03:45.538763872 +0200 +@@ -1,4 +1,4 @@ +-CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -g ++CFLAGS+= -fomit-frame-pointer -mabi=aapcs-linux -Wno-psabi -g + CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST + + LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/ diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb index aad2fed0..55e5a1c8 100644 --- a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb +++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb @@ -5,13 +5,13 @@ HOMEPAGE = "https://github.com/popcornmix/omxplayer" SECTION = "console/utils" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6" -DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native userland" +DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland" -PR = "r4" +PR = "r5" -SRCREV_default = "b4bbef8fac5e8c2ddafa895f98456ba715b39c6b" +SRCREV_default = "f543a0d0e707ab56415f17b0ca6d397394ee8b63" # omxplayer builds its own copy of ffmpeg from source instead of using the # system's ffmpeg library. This isn't ideal but it's ok for now. We do however @@ -33,6 +33,7 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \ file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \ file://cross-crompile-ffmpeg.patch \ + file://0007-Remove-Makefile-hardcoded-arch-tune.patch \ " SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}" @@ -40,6 +41,7 @@ SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file S = "${WORKDIR}/git" COMPATIBLE_MACHINE = "^rpi$" +COMPATIBLE_HOST_aarch64 = "null" def cpu(d): for arg in (d.getVar('TUNE_CCARGS') or '').split(): diff --git a/bsp/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend b/bsp/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend deleted file mode 100644 index a4cc96ee..00000000 --- a/bsp/meta-raspberrypi/recipes-sato/webkitgtk/webkitgtk_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -EXTRA_OECMAKE_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' -DUSE_GSTREAMER_GL=OFF ', '', d)}" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/conf/layer.conf b/bsp/meta-rcar/meta-rcar-gen3-adas/conf/layer.conf index 9c1cabad..befdb200 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/conf/layer.conf +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/conf/layer.conf @@ -11,7 +11,7 @@ BBFILE_COLLECTIONS += "rcar-gen3-adas" BBFILE_PATTERN_rcar-gen3-adas := "^${LAYERDIR}/" BBFILE_PRIORITY_rcar-gen3-adas = "7" -LAYERSERIES_COMPAT_rcar-gen3-adas = "thud" +LAYERSERIES_COMPAT_rcar-gen3-adas = "dunfell" # Distro features needed for all boards DISTRO_FEATURES_remove = "x11" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0003-plat-renesas-rcar-Add-R-Car-V3M-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0003-plat-renesas-rcar-Add-R-Car-V3M-support.patch index 08b0cd4a..d6a6f6d5 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0003-plat-renesas-rcar-Add-R-Car-V3M-support.patch +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0003-plat-renesas-rcar-Add-R-Car-V3M-support.patch @@ -123,7 +123,7 @@ index 2377cd2..32a6746 100644 case RCAR_PRODUCT_M3N: bl2_realtime_cpg_init_m3n(); break; -+ case RCAR_PRODUCT_v3m: ++ case RCAR_PRODUCT_V3M: + bl2_realtime_cpg_init_v3m(); + break; default: diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0004-plat-renesas-rcar-Add-R-Car-V3H-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0004-plat-renesas-rcar-Add-R-Car-V3H-support.patch index 9d2c7b95..841db094 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0004-plat-renesas-rcar-Add-R-Car-V3H-support.patch +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/arm-trusted-firmware/files/0004-plat-renesas-rcar-Add-R-Car-V3H-support.patch @@ -110,10 +110,10 @@ index 32a6746..1481029 100644 { uint32_t modemr; @@ -454,6 +512,9 @@ void bl2_cpg_init(void) - case RCAR_PRODUCT_v3m: + case RCAR_PRODUCT_V3M: bl2_realtime_cpg_init_v3m(); break; -+ case RCAR_PRODUCT_v3h: ++ case RCAR_PRODUCT_V3H: + bl2_realtime_cpg_init_v3h(); + break; default: diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_20200122.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_20200122.bbappend new file mode 100644 index 00000000..fdee4b08 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_20200122.bbappend @@ -0,0 +1,15 @@ +LICENSE_${PN}-rtl8188eu = "Firmware-rtlwifi_firmware" + +FILES_${PN}-rtl8188eu = " \ + /lib/firmware/rtlwifi/rtl8188eufw*.bin \ +" + +RDEPENDS_${PN}-rtl8188eu += "${PN}-rtl-license" + +PACKAGES =+ " ${PN}-rtl8188eu" + +FILES_${PN}-ath9k += " \ + /lib/firmware/ath9k_htc/htc*.fw \ +" + + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index fdee4b08..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -LICENSE_${PN}-rtl8188eu = "Firmware-rtlwifi_firmware" - -FILES_${PN}-rtl8188eu = " \ - /lib/firmware/rtlwifi/rtl8188eufw*.bin \ -" - -RDEPENDS_${PN}-rtl8188eu += "${PN}-rtl-license" - -PACKAGES =+ " ${PN}-rtl8188eu" - -FILES_${PN}-ath9k += " \ - /lib/firmware/ath9k_htc/htc*.fw \ -" - - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/most-tools/files/most-tools.tar.gz b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/most-tools/files/most-tools.tar.gz index f1eaacb7..e13d1343 100644 Binary files a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/most-tools/files/most-tools.tar.gz and b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/most-tools/files/most-tools.tar.gz differ diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0022-arm-dts-r8a77970-Disable-RPC-on-all-R-Car-V3M-boards.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0022-arm-dts-r8a77970-Disable-RPC-on-all-R-Car-V3M-boards.patch new file mode 100644 index 00000000..c756eafe --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0022-arm-dts-r8a77970-Disable-RPC-on-all-R-Car-V3M-boards.patch @@ -0,0 +1,58 @@ +From a807c19c45eb347a2d5b4391ff396b94a875d9dc Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Tue, 26 Nov 2019 21:52:37 +0300 +Subject: [PATCH 1/2] arm: dts: r8a77970: Disable RPC on all R-Car V3M boards + +This disables RPC device on all R-Car V3M boards. + +Signed-off-by: Valentine Barshak +--- + arch/arm/dts/r8a77970-eagle-u-boot.dts | 4 ++-- + arch/arm/dts/r8a77970-v3msk-u-boot.dts | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/dts/r8a77970-eagle-u-boot.dts b/arch/arm/dts/r8a77970-eagle-u-boot.dts +index 5b17f1d..6c910c2 100644 +--- a/arch/arm/dts/r8a77970-eagle-u-boot.dts ++++ b/arch/arm/dts/r8a77970-eagle-u-boot.dts +@@ -36,7 +36,7 @@ + + &rpc { + num-cs = <1>; +- status = "okay"; ++ status = "disabled"; + spi-max-frequency = <50000000>; + #address-cells = <1>; + #size-cells = <0>; +@@ -49,6 +49,6 @@ + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + reg = <0>; +- status = "okay"; ++ status = "disabled"; + }; + }; +diff --git a/arch/arm/dts/r8a77970-v3msk-u-boot.dts b/arch/arm/dts/r8a77970-v3msk-u-boot.dts +index 6ee06d7..5ae02ae 100644 +--- a/arch/arm/dts/r8a77970-v3msk-u-boot.dts ++++ b/arch/arm/dts/r8a77970-v3msk-u-boot.dts +@@ -47,7 +47,7 @@ + + &rpc { + num-cs = <1>; +- status = "okay"; ++ status = "disabled"; + spi-max-frequency = <50000000>; + #address-cells = <1>; + #size-cells = <0>; +@@ -60,6 +60,6 @@ + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + reg = <0>; +- status = "okay"; ++ status = "disabled"; + }; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0023-arm-dts-r8a77980-Disable-RPC-on-all-R-Car-V3H-boards.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0023-arm-dts-r8a77980-Disable-RPC-on-all-R-Car-V3H-boards.patch new file mode 100644 index 00000000..1819c8d9 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0023-arm-dts-r8a77980-Disable-RPC-on-all-R-Car-V3H-boards.patch @@ -0,0 +1,59 @@ +From 076a4721fde3f02eca24e4e3a218b35c62127cb9 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Tue, 26 Nov 2019 21:53:28 +0300 +Subject: [PATCH 2/2] arm: dts: r8a77980: Disable RPC on all R-Car V3H boards + +This disables RPC device on all R-Car V3H boards. + +Signed-off-by: Valentine Barshak +--- + arch/arm/dts/r8a77980-condor-u-boot.dts | 4 ++-- + arch/arm/dts/r8a77980-v3hsk-u-boot.dts | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/dts/r8a77980-condor-u-boot.dts b/arch/arm/dts/r8a77980-condor-u-boot.dts +index 68897ed..8a101bf 100644 +--- a/arch/arm/dts/r8a77980-condor-u-boot.dts ++++ b/arch/arm/dts/r8a77980-condor-u-boot.dts +@@ -16,7 +16,7 @@ + + &rpc { + num-cs = <1>; +- status = "okay"; ++ status = "disabled"; + spi-max-frequency = <50000000>; + #address-cells = <1>; + #size-cells = <0>; +@@ -29,6 +29,6 @@ + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + reg = <0>; +- status = "okay"; ++ status = "disabled"; + }; + }; +diff --git a/arch/arm/dts/r8a77980-v3hsk-u-boot.dts b/arch/arm/dts/r8a77980-v3hsk-u-boot.dts +index d083df6..4842314 100644 +--- a/arch/arm/dts/r8a77980-v3hsk-u-boot.dts ++++ b/arch/arm/dts/r8a77980-v3hsk-u-boot.dts +@@ -16,7 +16,7 @@ + + &rpc { + num-cs = <1>; +- status = "okay"; ++ status = "disabled"; + spi-max-frequency = <50000000>; + #address-cells = <1>; + #size-cells = <0>; +@@ -29,7 +29,7 @@ + spi-tx-bus-width = <1>; + spi-rx-bus-width = <1>; + reg = <0>; +- status = "okay"; ++ status = "disabled"; + }; + }; + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0024-mmc-mmc-Set-clock-when-reverting-to-safe-bus-mode.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0024-mmc-mmc-Set-clock-when-reverting-to-safe-bus-mode.patch new file mode 100644 index 00000000..3f695c74 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0024-mmc-mmc-Set-clock-when-reverting-to-safe-bus-mode.patch @@ -0,0 +1,29 @@ +From d299ca847ab26f76fcd49eb14aecff9ea37b1bc8 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 25 Oct 2019 01:06:46 +0300 +Subject: [PATCH] mmc: mmc: Set clock when reverting to safe bus mode + +Set MMC clock when reverting to safe bus mode and speed +in case current MMC mode fails. Otherwise, trying out +the other modes may fail as well. + +Signed-off-by: Valentine Barshak +--- + drivers/mmc/mmc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +index 0cecb10..b3f29ee 100644 +--- a/drivers/mmc/mmc.c ++++ b/drivers/mmc/mmc.c +@@ -2033,6 +2033,7 @@ error: + mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_BUS_WIDTH, EXT_CSD_BUS_WIDTH_1); + mmc_select_mode(mmc, MMC_LEGACY); ++ mmc_set_clock(mmc, mmc->tran_speed, MMC_CLK_ENABLE); + mmc_set_bus_width(mmc, 1); + } + } +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0025-net-Add-an-accessor-to-know-if-waiting-for-ARP.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0025-net-Add-an-accessor-to-know-if-waiting-for-ARP.patch new file mode 100644 index 00000000..96cac426 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0025-net-Add-an-accessor-to-know-if-waiting-for-ARP.patch @@ -0,0 +1,66 @@ +From 3ce40bb31bf1785bfa541805ada5f5f872a683a6 Mon Sep 17 00:00:00 2001 +From: Joe Hershberger +Date: Wed, 26 Sep 2018 16:48:58 -0500 +Subject: [PATCH 1/2] net: Add an accessor to know if waiting for ARP + +This single-sources the state of the ARP. + +Signed-off-by: Joe Hershberger +Reviewed-by: Simon Glass +Reviewed-by: Bin Meng + +(cherry picked from commit 3f02c98bd1000fc26ee2700fd5a75112cdeaca6c) +Signed-off-by: Valentine Barshak +--- + include/net.h | 1 + + net/arp.c | 11 ++++++++--- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/include/net.h b/include/net.h +index 2b2deb5..259c4a7 100644 +--- a/include/net.h ++++ b/include/net.h +@@ -635,6 +635,7 @@ rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */ + void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */ + rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */ + void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */ ++bool arp_is_waiting(void); /* Waiting for ARP reply? */ + void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ + void net_set_timeout_handler(ulong, thand_f *);/* Set timeout handler */ + +diff --git a/net/arp.c b/net/arp.c +index b8a7168..ea685d9 100644 +--- a/net/arp.c ++++ b/net/arp.c +@@ -100,7 +100,7 @@ int arp_timeout_check(void) + { + ulong t; + +- if (!net_arp_wait_packet_ip.s_addr) ++ if (!arp_is_waiting()) + return 0; + + t = get_timer(0); +@@ -187,8 +187,8 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + return; + + case ARPOP_REPLY: /* arp reply */ +- /* are we waiting for a reply */ +- if (!net_arp_wait_packet_ip.s_addr) ++ /* are we waiting for a reply? */ ++ if (!arp_is_waiting()) + break; + + #ifdef CONFIG_KEEP_SERVERADDR +@@ -233,3 +233,8 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + return; + } + } ++ ++bool arp_is_waiting(void) ++{ ++ return !!net_arp_wait_packet_ip.s_addr; ++} +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0026-net-Don-t-overwrite-waiting-packets-with-asynchronou.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0026-net-Don-t-overwrite-waiting-packets-with-asynchronou.patch new file mode 100644 index 00000000..3456ac1f --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0026-net-Don-t-overwrite-waiting-packets-with-asynchronou.patch @@ -0,0 +1,158 @@ +From c8ecac854c314fa4bf8955991ca59c178ced8a64 Mon Sep 17 00:00:00 2001 +From: Joe Hershberger +Date: Wed, 26 Sep 2018 16:49:02 -0500 +Subject: [PATCH 2/2] net: Don't overwrite waiting packets with asynchronous + replies + +Peter originally sent a fix, but it breaks a number of other things. +This addresses the original reported issue in a different way. + +That report was: + +> U-Boot has 1 common buffer to send Ethernet frames, pointed to by +> net_tx_packet. When sending to an IP address without knowing the MAC +> address, U-Boot makes an ARP request (using the arp_tx_packet buffer) +> to find out the MAC address of the IP addressr. When a matching ARP +> reply is received, U-Boot continues sending the frame stored in the +> net_tx_packet buffer. +> +> However, in the mean time, if U-Boot needs to send out any network +> packets (e.g. replying ping packets or ARP requests for its own IP +> address etc.), it will use the net_tx_packet buffer to prepare the +> new packet. Thus this buffer is no longer the original packet meant +> to be transmitted after the ARP reply. The original packet will be +> lost. + +This instead uses the ARP tx buffer to send async replies in the case +where we are actively waiting for an ARP reply. + +Signed-off-by: Joe Hershberger + +Reported-by: Tran Tien Dat +Reviewed-by: Simon Glass +Reviewed-by: Bin Meng +Tested-by: Bin Meng + +(cherry picked from commit ac3f26cc15ad7e3e9efc2b0b0e18c6e84d93af77) +[valentine.barshak: removed test/dm/eth.c part as not applicable] +Signed-off-by: Valentine Barshak +--- + include/net.h | 8 ++++++++ + net/arp.c | 9 +++++---- + net/arp.h | 1 + + net/net.c | 8 ++++++++ + net/ping.c | 7 +++++-- + 5 files changed, 27 insertions(+), 6 deletions(-) + +diff --git a/include/net.h b/include/net.h +index 259c4a7..a789a38 100644 +--- a/include/net.h ++++ b/include/net.h +@@ -654,6 +654,14 @@ static inline void net_set_state(enum net_loop_state state) + net_state = state; + } + ++/* ++ * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for ++ * sending an asynchronous reply ++ * ++ * returns - ptr to packet buffer ++ */ ++uchar * net_get_async_tx_pkt_buf(void); ++ + /* Transmit a packet */ + static inline void net_send_packet(uchar *pkt, int len) + { +diff --git a/net/arp.c b/net/arp.c +index ea685d9..b49c3d3 100644 +--- a/net/arp.c ++++ b/net/arp.c +@@ -34,8 +34,7 @@ uchar *arp_wait_packet_ethaddr; + int arp_wait_tx_packet_size; + ulong arp_wait_timer_start; + int arp_wait_try; +- +-static uchar *arp_tx_packet; /* THE ARP transmit packet */ ++uchar *arp_tx_packet; /* THE ARP transmit packet */ + static uchar arp_tx_packet_buf[PKTSIZE_ALIGN + PKTALIGN]; + + void arp_init(void) +@@ -126,6 +125,7 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + struct arp_hdr *arp; + struct in_addr reply_ip_addr; + int eth_hdr_size; ++ uchar *tx_packet; + + /* + * We have to deal with two types of ARP packets: +@@ -182,8 +182,9 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + (net_read_ip(&arp->ar_spa).s_addr & net_netmask.s_addr)) + udelay(5000); + #endif +- memcpy(net_tx_packet, et, eth_hdr_size + ARP_HDR_SIZE); +- net_send_packet(net_tx_packet, eth_hdr_size + ARP_HDR_SIZE); ++ tx_packet = net_get_async_tx_pkt_buf(); ++ memcpy(tx_packet, et, eth_hdr_size + ARP_HDR_SIZE); ++ net_send_packet(tx_packet, eth_hdr_size + ARP_HDR_SIZE); + return; + + case ARPOP_REPLY: /* arp reply */ +diff --git a/net/arp.h b/net/arp.h +index afb8695..25b3c00 100644 +--- a/net/arp.h ++++ b/net/arp.h +@@ -20,6 +20,7 @@ extern uchar *arp_wait_packet_ethaddr; + extern int arp_wait_tx_packet_size; + extern ulong arp_wait_timer_start; + extern int arp_wait_try; ++extern uchar *arp_tx_packet; + + void arp_init(void); + void arp_request(void); +diff --git a/net/net.c b/net/net.c +index 31cf306..77a7141 100644 +--- a/net/net.c ++++ b/net/net.c +@@ -799,6 +799,14 @@ void net_set_timeout_handler(ulong iv, thand_f *f) + } + } + ++uchar *net_get_async_tx_pkt_buf(void) ++{ ++ if (arp_is_waiting()) ++ return arp_tx_packet; /* If we are waiting, we already sent */ ++ else ++ return net_tx_packet; ++} ++ + int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, int sport, + int payload_len) + { +diff --git a/net/ping.c b/net/ping.c +index 3e5461a..821d35d 100644 +--- a/net/ping.c ++++ b/net/ping.c +@@ -84,6 +84,7 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src; + struct in_addr src_ip; + int eth_hdr_size; ++ uchar *tx_packet; + + switch (icmph->type) { + case ICMP_ECHO_REPLY: +@@ -107,8 +108,10 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) + icmph->type = ICMP_ECHO_REPLY; + icmph->checksum = 0; + icmph->checksum = compute_ip_checksum(icmph, len - IP_HDR_SIZE); +- memcpy(net_tx_packet, et, eth_hdr_size + len); +- net_send_packet(net_tx_packet, eth_hdr_size + len); ++ ++ tx_packet = net_get_async_tx_pkt_buf(); ++ memcpy(tx_packet, et, eth_hdr_size + len); ++ net_send_packet(tx_packet, eth_hdr_size + len); + return; + /* default: + return;*/ +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0027-net-sh_eth-Keep-phy-running.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0027-net-sh_eth-Keep-phy-running.patch new file mode 100644 index 00000000..38f7f0e0 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0027-net-sh_eth-Keep-phy-running.patch @@ -0,0 +1,126 @@ +From 04b535af397c8302f306952e09d531fc96fe523e Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Wed, 27 Nov 2019 03:46:52 +0300 +Subject: [PATCH 1/4] net: sh_eth: Keep phy running + +This doesn't stop the PHY, and disable the clock once the Ethernet +transfer is complete. We need PHY initialized for the "mii" console +commands to work. This also reduces Ethernet start time since we +don't have to reinitialize the PHY and restart auto-negotiation +every time an Ethernet command is issued. + +Signed-off-by: Valentine Barshak +--- + drivers/net/sh_eth.c | 52 +++++++++++++++++++++++++++------------------------- + 1 file changed, 27 insertions(+), 25 deletions(-) + +diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c +index be8c3d2..b120977 100644 +--- a/drivers/net/sh_eth.c ++++ b/drivers/net/sh_eth.c +@@ -778,35 +778,17 @@ static int sh_eth_phy_config(struct udevice *dev) + static int sh_ether_start(struct udevice *dev) + { + struct sh_ether_priv *priv = dev_get_priv(dev); +- struct eth_pdata *pdata = dev_get_platdata(dev); + struct sh_eth_dev *eth = &priv->shdev; ++ struct sh_eth_info *port_info = ð->port_info[eth->port]; + int ret; + +- ret = clk_enable(&priv->clk); +- if (ret) +- return ret; +- +- ret = sh_eth_init_common(eth, pdata->enetaddr); +- if (ret) +- goto err_clk; +- +- ret = sh_eth_phy_config(dev); ++ ret = phy_startup(port_info->phydev); + if (ret) { +- printf(SHETHER_NAME ": phy config timeout\n"); +- goto err_start; ++ printf(SHETHER_NAME ": phy startup failure\n"); ++ return ret; + } + + ret = sh_eth_start_common(eth); +- if (ret) +- goto err_start; +- +- return 0; +- +-err_start: +- sh_eth_tx_desc_free(eth); +- sh_eth_rx_desc_free(eth); +-err_clk: +- clk_disable(&priv->clk); + return ret; + } + +@@ -815,7 +797,6 @@ static void sh_ether_stop(struct udevice *dev) + struct sh_ether_priv *priv = dev_get_priv(dev); + + sh_eth_stop(&priv->shdev); +- clk_disable(&priv->clk); + } + + static int sh_ether_probe(struct udevice *udev) +@@ -857,7 +838,7 @@ static int sh_ether_probe(struct udevice *udev) + + ret = mdio_register(mdiodev); + if (ret < 0) +- goto err_mdio_register; ++ goto err_mdio; + + priv->bus = miiphy_get_dev_by_name(udev->name); + +@@ -866,9 +847,25 @@ static int sh_ether_probe(struct udevice *udev) + eth->port_info[eth->port].iobase = + (void __iomem *)(BASE_IO_ADDR + 0x800 * eth->port); + ++ ret = clk_enable(&priv->clk); ++ if (ret) ++ goto err_mdio; ++ ++ ret = sh_eth_init_common(eth, pdata->enetaddr); ++ if (ret) ++ goto err_clk; ++ ++ ret = sh_eth_phy_config(udev); ++ if (ret) { ++ printf(SHETHER_NAME ": phy config timeout\n"); ++ goto err_clk; ++ } ++ + return 0; + +-err_mdio_register: ++err_clk: ++ clk_disable(&priv->clk); ++err_mdio: + mdio_free(mdiodev); + return ret; + } +@@ -879,13 +876,18 @@ static int sh_ether_remove(struct udevice *udev) + struct sh_eth_dev *eth = &priv->shdev; + struct sh_eth_info *port_info = ð->port_info[eth->port]; + ++ sh_eth_tx_desc_free(eth); ++ sh_eth_rx_desc_free(eth); ++ + free(port_info->phydev); ++ + mdio_unregister(priv->bus); + mdio_free(priv->bus); + + if (dm_gpio_is_valid(&priv->reset_gpio)) + dm_gpio_free(udev, &priv->reset_gpio); + ++ clk_disable(&priv->clk); + return 0; + } + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0028-net-sh_eth-Fix-compilation-warnings.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0028-net-sh_eth-Fix-compilation-warnings.patch new file mode 100644 index 00000000..2e878538 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0028-net-sh_eth-Fix-compilation-warnings.patch @@ -0,0 +1,135 @@ +From 4d00819431c519c143242b230f6afaf59dc57051 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 2 Dec 2019 01:08:01 +0300 +Subject: [PATCH 2/4] net: sh_eth: Fix compilation warnings + +This fixes multiple type cast warnings: + "warning: cast to pointer from integer of different size" + +In most cases we use uintptr_t type instead of int or u32. +Also, use iobase address obtained from the device tree +instead of hard-coded macro for the phy address. + +Signed-off-by: Valentine Barshak +--- + drivers/net/sh_eth.c | 24 ++++++++++++------------ + drivers/net/sh_eth.h | 8 ++++---- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c +index b120977..fbae6ce 100644 +--- a/drivers/net/sh_eth.c ++++ b/drivers/net/sh_eth.c +@@ -36,8 +36,8 @@ + + #if defined(CONFIG_SH_ETHER_CACHE_WRITEBACK) && !defined(CONFIG_SYS_DCACHE_OFF) + #define flush_cache_wback(addr, len) \ +- flush_dcache_range((u32)addr, \ +- (u32)(addr + ALIGN(len, CONFIG_SH_ETHER_ALIGNE_SIZE))) ++ flush_dcache_range((uintptr_t)(addr), \ ++ (uintptr_t)(addr) + ALIGN((len), CONFIG_SH_ETHER_ALIGNE_SIZE)) + #else + #define flush_cache_wback(...) + #endif +@@ -45,11 +45,11 @@ + #if defined(CONFIG_SH_ETHER_CACHE_INVALIDATE) && defined(CONFIG_ARM) + #define invalidate_cache(addr, len) \ + { \ +- u32 line_size = CONFIG_SH_ETHER_ALIGNE_SIZE; \ +- u32 start, end; \ ++ uintptr_t line_size = CONFIG_SH_ETHER_ALIGNE_SIZE; \ ++ uintptr_t start, end; \ + \ +- start = (u32)addr; \ +- end = start + len; \ ++ start = (uintptr_t)(addr); \ ++ end = start + (len); \ + start &= ~(line_size - 1); \ + end = ((end + line_size - 1) & ~(line_size - 1)); \ + \ +@@ -73,7 +73,7 @@ static int sh_eth_send_common(struct sh_eth_dev *eth, void *packet, int len) + } + + /* packet must be a 4 byte boundary */ +- if ((int)packet & 3) { ++ if ((uintptr_t)packet & 3) { + printf(SHETHER_NAME ": %s: packet not 4 byte aligned\n" + , __func__); + ret = -EFAULT; +@@ -210,7 +210,7 @@ static int sh_eth_tx_desc_init(struct sh_eth_dev *eth) + + /* Make sure we use a P2 address (non-cacheable) */ + port_info->tx_desc_base = +- (struct tx_desc_s *)ADDR_TO_P2((u32)port_info->tx_desc_alloc); ++ (struct tx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->tx_desc_alloc); + port_info->tx_desc_cur = port_info->tx_desc_base; + + /* Initialize all descriptors */ +@@ -264,7 +264,7 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth) + + /* Make sure we use a P2 address (non-cacheable) */ + port_info->rx_desc_base = +- (struct rx_desc_s *)ADDR_TO_P2((u32)port_info->rx_desc_alloc); ++ (struct rx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->rx_desc_alloc); + + port_info->rx_desc_cur = port_info->rx_desc_base; + +@@ -280,7 +280,7 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth) + goto err_buf_alloc; + } + +- port_info->rx_buf_base = (u8 *)ADDR_TO_P2((u32)port_info->rx_buf_alloc); ++ port_info->rx_buf_base = (u8 *)ADDR_TO_P2((uintptr_t)port_info->rx_buf_alloc); + + /* Initialize all descriptors */ + for (cur_rx_desc = port_info->rx_desc_base, +@@ -699,7 +699,7 @@ static int sh_ether_recv(struct udevice *dev, int flags, uchar **packetp) + struct sh_ether_priv *priv = dev_get_priv(dev); + struct sh_eth_dev *eth = &priv->shdev; + struct sh_eth_info *port_info = ð->port_info[eth->port]; +- uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); ++ uchar *packet = (uchar *)ADDR_TO_P2((uintptr_t)port_info->rx_desc_cur->rd2); + int len; + + len = sh_eth_recv_start(eth); +@@ -845,7 +845,7 @@ static int sh_ether_probe(struct udevice *udev) + eth->port = CONFIG_SH_ETHER_USE_PORT; + eth->port_info[eth->port].phy_addr = CONFIG_SH_ETHER_PHY_ADDR; + eth->port_info[eth->port].iobase = +- (void __iomem *)(BASE_IO_ADDR + 0x800 * eth->port); ++ (void __iomem *)(priv->iobase + 0x800 * eth->port); + + ret = clk_enable(&priv->clk); + if (ret) +diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h +index 1fa38e7..61fe0c9 100644 +--- a/drivers/net/sh_eth.h ++++ b/drivers/net/sh_eth.h +@@ -15,20 +15,20 @@ + #if defined(CONFIG_SH) + /* Malloc returns addresses in the P1 area (cacheable). However we need to + use area P2 (non-cacheable) */ +-#define ADDR_TO_P2(addr) ((((int)(addr) & ~0xe0000000) | 0xa0000000)) ++#define ADDR_TO_P2(addr) ((((uintptr_t)(addr) & ~0xe0000000) | 0xa0000000)) + + /* The ethernet controller needs to use physical addresses */ + #if defined(CONFIG_SH_32BIT) +-#define ADDR_TO_PHY(addr) ((((int)(addr) & ~0xe0000000) | 0x40000000)) ++#define ADDR_TO_PHY(addr) ((((uintptr_t)(addr) & ~0xe0000000) | 0x40000000)) + #else +-#define ADDR_TO_PHY(addr) ((int)(addr) & ~0xe0000000) ++#define ADDR_TO_PHY(addr) ((uintptr_t)(addr) & ~0xe0000000) + #endif + #elif defined(CONFIG_ARM) + #ifndef inl + #define inl readl + #define outl writel + #endif +-#define ADDR_TO_PHY(addr) ((int)(addr)) ++#define ADDR_TO_PHY(addr) ((uintptr_t)(addr)) + #define ADDR_TO_P2(addr) (addr) + #endif /* defined(CONFIG_SH) */ + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0029-net-sh_eth-Workaround-cache-issues.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0029-net-sh_eth-Workaround-cache-issues.patch new file mode 100644 index 00000000..79eba33b --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0029-net-sh_eth-Workaround-cache-issues.patch @@ -0,0 +1,74 @@ +From 869da2f4ee518558382f4a929ca302d1b2f91274 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 2 Dec 2019 01:13:19 +0300 +Subject: [PATCH 3/4] net: sh_eth: Workaround cache issues + +U-Boot writes to RX packets when constructing replies. +This can cause stale cached data to be written to RX +buffer while we're receiving a packet. This causes RX +packet corruption because we invalidate the cache right +before processing the packet. Invalidate packet buffer +cache when preparing RX descriptor as well. This seems +to fix RX packet drops with high RX traffic. + +While at it flush the descriptors right before enabling +RX/TX in sh_eth_tx_desc_init/sh_eth_rx_desc_init callbacks +when they are ready instead of flushing after allocation. + +Signed-off-by: Valentine Barshak +--- + drivers/net/sh_eth.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c +index fbae6ce..5df078d 100644 +--- a/drivers/net/sh_eth.c ++++ b/drivers/net/sh_eth.c +@@ -138,6 +138,8 @@ static void sh_eth_recv_finish(struct sh_eth_dev *eth) + { + struct sh_eth_info *port_info = ð->port_info[eth->port]; + ++ invalidate_cache(ADDR_TO_P2(port_info->rx_desc_cur->rd2), MAX_BUF_SIZE); ++ + /* Make current descriptor available again */ + if (port_info->rx_desc_cur->rd0 & RD_RDLE) + port_info->rx_desc_cur->rd0 = RD_RACT | RD_RDLE; +@@ -206,8 +208,6 @@ static int sh_eth_tx_desc_init(struct sh_eth_dev *eth) + goto err; + } + +- flush_cache_wback(port_info->tx_desc_alloc, alloc_desc_size); +- + /* Make sure we use a P2 address (non-cacheable) */ + port_info->tx_desc_base = + (struct tx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->tx_desc_alloc); +@@ -225,6 +225,7 @@ static int sh_eth_tx_desc_init(struct sh_eth_dev *eth) + cur_tx_desc--; + cur_tx_desc->td0 |= TD_TDLE; + ++ flush_cache_wback(port_info->tx_desc_alloc, alloc_desc_size); + /* + * Point the controller to the tx descriptor list. Must use physical + * addresses +@@ -260,8 +261,6 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth) + goto err; + } + +- flush_cache_wback(port_info->rx_desc_alloc, alloc_desc_size); +- + /* Make sure we use a P2 address (non-cacheable) */ + port_info->rx_desc_base = + (struct rx_desc_s *)ADDR_TO_P2((uintptr_t)port_info->rx_desc_alloc); +@@ -295,6 +294,9 @@ static int sh_eth_rx_desc_init(struct sh_eth_dev *eth) + cur_rx_desc--; + cur_rx_desc->rd0 |= RD_RDLE; + ++ invalidate_cache(port_info->rx_buf_alloc, NUM_RX_DESC * MAX_BUF_SIZE); ++ flush_cache_wback(port_info->rx_desc_alloc, alloc_desc_size); ++ + /* Point the controller to the rx descriptor list */ + sh_eth_write(port_info, ADDR_TO_PHY(port_info->rx_desc_base), RDLAR); + #if defined(SH_ETH_TYPE_GETHER) || defined(SH_ETH_TYPE_RZ) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0030-net-sh_eth-Fix-RX-error-handling.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0030-net-sh_eth-Fix-RX-error-handling.patch new file mode 100644 index 00000000..a93ce617 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0030-net-sh_eth-Fix-RX-error-handling.patch @@ -0,0 +1,73 @@ +From d71076d2f04dace4483f184899e365a27a74d07d Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 2 Dec 2019 01:20:34 +0300 +Subject: [PATCH 4/4] net: sh_eth: Fix RX error handling + +In case RX error occurs, and the RD_RFE bit is set, the descriptor +is never returned back to the queue. Make sh_eth_recv_start return +zero length in this case so that the descriptor can be released +and pushed back to the list. Also return the more appropriate +-EAGAIN instead of -EINVAL if the descriptor is not ready yet. + +Signed-off-by: Valentine Barshak +--- + drivers/net/sh_eth.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c +index 5df078d..eeb1d32 100644 +--- a/drivers/net/sh_eth.c ++++ b/drivers/net/sh_eth.c +@@ -125,11 +125,11 @@ static int sh_eth_recv_start(struct sh_eth_dev *eth) + /* Check if the rx descriptor is ready */ + invalidate_cache(port_info->rx_desc_cur, sizeof(struct rx_desc_s)); + if (port_info->rx_desc_cur->rd0 & RD_RACT) +- return -EINVAL; ++ return -EAGAIN; + + /* Check for errors */ + if (port_info->rx_desc_cur->rd0 & RD_RFE) +- return -EINVAL; ++ return 0; + + return port_info->rx_desc_cur->rd1 & 0xffff; + } +@@ -553,9 +553,11 @@ static int sh_eth_recv_common(struct sh_eth_dev *eth) + uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); + + len = sh_eth_recv_start(eth); +- if (len > 0) { +- invalidate_cache(packet, len); +- net_process_received_packet(packet, len); ++ if (len >= 0) { ++ if (len > 0) { ++ invalidate_cache(packet, len); ++ net_process_received_packet(packet, len); ++ } + sh_eth_recv_finish(eth); + } else + len = 0; +@@ -710,15 +712,13 @@ static int sh_ether_recv(struct udevice *dev, int flags, uchar **packetp) + *packetp = packet; + + return len; +- } else { +- len = 0; ++ } + +- /* Restart the receiver if disabled */ +- if (!(sh_eth_read(port_info, EDRRR) & EDRRR_R)) +- sh_eth_write(port_info, EDRRR_R, EDRRR); ++ /* Restart the receiver if disabled */ ++ if (!(sh_eth_read(port_info, EDRRR) & EDRRR_R)) ++ sh_eth_write(port_info, EDRRR_R, EDRRR); + +- return -EAGAIN; +- } ++ return len; + } + + static int sh_ether_free_pkt(struct udevice *dev, uchar *packet, int length) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2018.09.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2018.09.bbappend index 6e28e5e9..ebc38928 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2018.09.bbappend +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2018.09.bbappend @@ -1,5 +1,15 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +RPC_ENABLED = " \ + file://0022-arm-renesas-Enable-RPC-HF-MTD-support-for-all-Salvat.patch \ + file://0023-arm-renesas-Enable-RPC-HF-MTD-support-for-all-ULCB-b.patch \ +" + +RPC_DISABLED = " \ + file://0022-arm-dts-r8a77970-Disable-RPC-on-all-R-Car-V3M-boards.patch \ + file://0023-arm-dts-r8a77980-Disable-RPC-on-all-R-Car-V3H-boards.patch \ +" + SRC_URI_append = " \ file://0001-uboot-ravb-remove-APSR-quirk.patch \ file://0002-net-ravb-fix-unsafe-phy-access.patch \ @@ -22,6 +32,12 @@ SRC_URI_append = " \ file://0019-ARM-rmobile-Add-R8A7795-H3ULCB-HAD-board-support.patch \ file://0020-arm-renesas-v3msk-Add-CPLD-support.patch \ file://0021-arm-renesas-v3hsk-Add-CPLD-support.patch \ - file://0022-arm-renesas-Enable-RPC-HF-MTD-support-for-all-Salvat.patch \ - file://0023-arm-renesas-Enable-RPC-HF-MTD-support-for-all-ULCB-b.patch \ + ${@oe.utils.conditional("DISABLE_RPC_ACCESS", "1", "${RPC_DISABLED}", "${RPC_ENABLED}", d)} \ + file://0024-mmc-mmc-Set-clock-when-reverting-to-safe-bus-mode.patch \ + file://0025-net-Add-an-accessor-to-know-if-waiting-for-ARP.patch \ + file://0026-net-Don-t-overwrite-waiting-packets-with-asynchronou.patch \ + file://0027-net-sh_eth-Keep-phy-running.patch \ + file://0028-net-sh_eth-Fix-compilation-warnings.patch \ + file://0029-net-sh_eth-Workaround-cache-issues.patch \ + file://0030-net-sh_eth-Fix-RX-error-handling.patch \ " diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb index 7b834ce9..945a2b08 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb @@ -7,7 +7,7 @@ S = "${WORKDIR}/git" BRANCH = "rcar_gen3" SRC_URI = "git://github.com/CogentEmbedded/utest-cam-imr-drm.git;branch=${BRANCH}" -SRCREV = "27e5984c05357194759a1f81d0ffa20d523d0103" +SRCREV = "fd160edb99b34223f2c49fecbef3cca3daddbe59" PV = "v1.0+renesas+git" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-dummy0.network b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-dummy0.network new file mode 100644 index 00000000..054e17bb --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-dummy0.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy0 + +[Network] +DHCP=no + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-eth0.network b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-eth0.network new file mode 100644 index 00000000..74951b47 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/70-eth0.network @@ -0,0 +1,8 @@ +[Match] +Name=eth0 + +[Network] +DHCP=ipv4 + +[DHCP] +CriticalConnection=true diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/dummy0.network b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/dummy0.network deleted file mode 100644 index 054e17bb..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/dummy0.network +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy0 - -[Network] -DHCP=no - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/eth0.network b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/eth0.network deleted file mode 100644 index 74951b47..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd/eth0.network +++ /dev/null @@ -1,8 +0,0 @@ -[Match] -Name=eth0 - -[Network] -DHCP=ipv4 - -[DHCP] -CriticalConnection=true diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd_%.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd_%.bbappend index 5aded79b..ed91218c 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd_%.bbappend +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-core/systemd/systemd_%.bbappend @@ -1,10 +1,9 @@ FILESEXTRAPATHS_append := '${THISDIR}/${PN}:' -SRC_URI_append = "file://eth0.network" - -SRC_URI_append= '${@ " \ - file://dummy0.network \ -" if 'surroundview' in '${DISTRO_FEATURES}' else ""}' +SRC_URI_append = " \ + file://70-eth0.network \ + ${@bb.utils.contains("DISTRO_FEATURES", "surroundview", "file://70-dummy0.network", "", d)} \ +" FILES_${PN} += "${sysconfdir}/systemd/network/*" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/gcc/gcc-sanitizers_%.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/gcc/gcc-sanitizers_%.bbappend new file mode 100644 index 00000000..f422a78d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/gcc/gcc-sanitizers_%.bbappend @@ -0,0 +1 @@ +COMPATIBLE_HOST_aarch64 = 'aarch64.*-linux' diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.5.3.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.5.3.bb index 91c35c3f..c84d11cb 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.5.3.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.5.3.bb @@ -8,15 +8,16 @@ DEPENDS = "boost" PR = "r0" -S = "${WORKDIR}/yaml-cpp-release-${PV}" +S = "${WORKDIR}/git" -SRC_URI = "https://github.com/jbeder/yaml-cpp/archive/release-${PV}.tar.gz" -SRC_URI[md5sum] = "64200ca0bf5e0af065804d8d3e8f6d42" -SRC_URI[sha256sum] = "ac50a27a201d16dc69a881b80ad39a7be66c4d755eda1f76c3a68781b922af8f" +SRC_URI = "git://github.com/jbeder/${BPN}.git" + +# tag: yaml-cpp-0.5.3 +SRCREV = "b57efe94e7d445713c29f863adb8c23438eaa217" inherit cmake -EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TESTS=OFF -DLIB_SUFFIX=64" +EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TESTS=OFF" FILES_${PN}-dev += "${libdir}/cmake" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.6.2.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.6.2.bb index 8c8d5aa6..a2a9d90e 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.6.2.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-devtools/yaml-cpp/yaml-cpp_0.6.2.bb @@ -8,11 +8,12 @@ DEPENDS = "boost" PR = "r0" -S = "${WORKDIR}/yaml-cpp-${PN}-${PV}" +S = "${WORKDIR}/git" -SRC_URI = "https://github.com/jbeder/yaml-cpp/archive/${PN}-${PV}.tar.gz" -SRC_URI[md5sum] = "5b943e9af0060d0811148b037449ef82" -SRC_URI[sha256sum] = "e4d8560e163c3d875fd5d9e5542b5fd5bec810febdcba61481fe5fc4e6b1fd05" +SRC_URI = "git://github.com/jbeder/${BPN}.git" + +# tag: yaml-cpp-0.6.2 +SRCREV = "562aefc114938e388457e6a531ed7b54d9dc1b62" inherit cmake diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend deleted file mode 100644 index fa555a8d..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -require include/gles-control.inc - -PACKAGECONFIG_pn-cairo_append = "${@' egl glesv2' if '${USE_GLES_WAYLAND}' == '1' else ''}" -PACKAGECONFIG_pn-cairo_append += "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.16.0.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.16.0.bbappend new file mode 100644 index 00000000..17c4e718 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.16.0.bbappend @@ -0,0 +1,2 @@ +PACKAGECONFIG_pn-cairo_append = "${@' egl glesv2' if '${USE_GLES_WAYLAND}' == '1' else ''}" +PACKAGECONFIG_pn-cairo_append += "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch deleted file mode 100644 index b20183b3..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch +++ /dev/null @@ -1,112 +0,0 @@ -From b1d208891b9f6ae3968730b120a5d0dcbba679d0 Mon Sep 17 00:00:00 2001 -From: Jonathan Viney -Date: Sun, 19 Nov 2017 07:08:41 +1300 -Subject: [PATCH] Merge pull request #10011 from jviney:master - -Fix build with FFmpeg master. Some deprecated APIs have been removed. (#10011) - -* Fix build with FFmpeg master. - -* ffmpeg: update AVFMT_RAWPICTURE support removal ---- - modules/videoio/src/cap_ffmpeg_impl.hpp | 37 +++++++++++++++++++++++++-------- - 1 file changed, 28 insertions(+), 9 deletions(-) - -diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp -index 5f51e65..4646148 100644 ---- a/modules/videoio/src/cap_ffmpeg_impl.hpp -+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp -@@ -149,6 +149,10 @@ extern "C" { - #define AV_PIX_FMT_GRAY16BE PIX_FMT_GRAY16BE - #endif - -+#ifndef PKT_FLAG_KEY -+#define PKT_FLAG_KEY AV_PKT_FLAG_KEY -+#endif -+ - #if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 \ - ? CALC_FFMPEG_VERSION(52, 38, 100) : CALC_FFMPEG_VERSION(52, 13, 0)) - #define USE_AV_FRAME_GET_BUFFER 1 -@@ -1570,7 +1574,11 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc, - // some formats want stream headers to be seperate - if(oc->oformat->flags & AVFMT_GLOBALHEADER) - { -+#if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0) -+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+#else - c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+#endif - } - #endif - -@@ -1598,23 +1606,24 @@ static int icv_av_write_frame_FFMPEG( AVFormatContext * oc, AVStream * video_st, - #endif - int ret = OPENCV_NO_FRAMES_WRITTEN_CODE; - -- if (oc->oformat->flags & AVFMT_RAWPICTURE) { -+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) -+ if (oc->oformat->flags & AVFMT_RAWPICTURE) -+ { - /* raw video case. The API will change slightly in the near - futur for that */ - AVPacket pkt; - av_init_packet(&pkt); - --#ifndef PKT_FLAG_KEY --#define PKT_FLAG_KEY AV_PKT_FLAG_KEY --#endif -- - pkt.flags |= PKT_FLAG_KEY; - pkt.stream_index= video_st->index; - pkt.data= (uint8_t *)picture; - pkt.size= sizeof(AVPicture); - - ret = av_write_frame(oc, &pkt); -- } else { -+ } -+ else -+#endif -+ { - /* encode the image */ - AVPacket pkt; - av_init_packet(&pkt); -@@ -1772,7 +1781,9 @@ void CvVideoWriter_FFMPEG::close() - /* write the trailer, if any */ - if(ok && oc) - { -- if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 ) -+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) -+ if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) -+#endif - { - for(;;) - { -@@ -2071,7 +2082,11 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, - - outbuf = NULL; - -- if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) { -+ -+#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0) -+ if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) -+#endif -+ { - /* allocate output buffer */ - /* assume we will never get codec output with more than 4 bytes per pixel... */ - outbuf_size = width*height*4; -@@ -2376,7 +2391,11 @@ AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC - // some formats want stream headers to be seperate - if (oc->oformat->flags & AVFMT_GLOBALHEADER) - { -- c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ #if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0) -+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; -+ #else -+ c->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ #endif - } - #endif - --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb index 602b1b45..4c63f961 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb @@ -44,7 +44,9 @@ PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1. PACKAGECONFIG[opengl] = "-DWITH_OPENGL=ON,-DWITH_OPENGL=OFF,," PACKAGECONFIG[qt5] = "-DWITH_QT=ON,-DWITH_QT=OFF,qtbase," -inherit distutils-base pkgconfig cmake ${@bb.utils.contains( 'DISTRO_FEATURES', 'qt5', 'cmake_qt5','', d)} +inherit pkgconfig cmake ${@bb.utils.contains( 'DISTRO_FEATURES', 'qt5', 'cmake_qt5','', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)} +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)} export BUILD_SYS export HOST_SYS diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb index 01ed0210..682aebd4 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb @@ -30,7 +30,6 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ file://uselocalxfeatures.patch;patchdir=../contrib/ \ file://useoeprotobuf.patch;patchdir=../contrib/ \ file://0001-Revert-cuda-fix-fp16-compilation.patch \ - file://0001-Merge-pull-request-10011-from-jviney-master.patch \ " # file://0002-Revert-check-FP16-build-condition-correctly.patch \ # diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch deleted file mode 100644 index d453103e..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 980b48bc279d46559465665e94e546f661d1d427 Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Fri, 17 Feb 2017 03:06:27 +0300 -Subject: [PATCH 1/7] Allow to boot without input device - ---- - libweston/libinput-seat.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/libweston/libinput-seat.c b/libweston/libinput-seat.c -index ac1e8e9..b7f601a 100644 ---- a/libweston/libinput-seat.c -+++ b/libweston/libinput-seat.c -@@ -302,7 +302,6 @@ udev_input_enable(struct udev_input *input) - "\t- seats misconfigured " - "(Weston backend option 'seat', " - "udev device property ID_SEAT)\n"); -- return -1; - } - - return 0; --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch deleted file mode 100644 index a641cb30..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch +++ /dev/null @@ -1,1577 +0,0 @@ -From 6e0aeaec800a9155a09c8b94c33705acc420ab1b Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Tue, 13 Jun 2017 23:51:22 +0300 -Subject: [PATCH 2/7] Share toytoolkit lib - ---- - Makefile.am | 35 +++ - clients/toytoolkit.h | 741 +++++++++++++++++++++++++++++++++++++++++++++++++++ - clients/window.h | 714 +------------------------------------------------ - configure.ac | 2 +- - 4 files changed, 778 insertions(+), 714 deletions(-) - create mode 100644 clients/toytoolkit.h - -diff --git a/Makefile.am b/Makefile.am -index 83bb253..9433362 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -8,6 +8,7 @@ module_LTLIBRARIES = - libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR) - libweston_module_LTLIBRARIES = - noinst_LTLIBRARIES = -+lib_LTLIBRARIES = - BUILT_SOURCES = - - AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install -@@ -101,6 +102,7 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ - shared/matrix.h \ - shared/timespec-util.h \ - shared/zalloc.h \ -+ clients/toytoolkit.h \ - shared/platform.h \ - shared/weston-egl-ext.h - -@@ -279,6 +281,7 @@ dist_wayland_session_DATA = compositor/weston.desktop - - libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR} - libwestoninclude_HEADERS = \ -+ clients/toytoolkit.h \ - libweston/version.h \ - libweston/compositor.h \ - libweston/compositor-drm.h \ -@@ -655,6 +658,7 @@ noinst_LTLIBRARIES += libtoytoolkit.la - libtoytoolkit_la_SOURCES = \ - clients/window.c \ - clients/window.h \ -+ clients/toytoolkit.h \ - shared/helpers.h - - nodist_libtoytoolkit_la_SOURCES = \ -@@ -680,6 +684,37 @@ libtoytoolkit_la_LIBADD = \ - libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm - libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) - -+lib_LTLIBRARIES += libweston-toytoolkit.la -+ -+libweston_toytoolkit_la_SOURCES = \ -+ clients/window.c \ -+ clients/window.h \ -+ clients/toytoolkit.h \ -+ protocol/text-cursor-position-protocol.c \ -+ protocol/text-cursor-position-client-protocol.h \ -+ protocol/viewporter-client-protocol.h \ -+ protocol/viewporter-protocol.c \ -+ protocol/xdg-shell-unstable-v6-protocol.c \ -+ protocol/xdg-shell-unstable-v6-client-protocol.h \ -+ \ -+ \ -+ protocol/ivi-application-protocol.c \ -+ protocol/ivi-application-client-protocol.h -+ -+BUILT_SOURCES += $(libweston_toytoolkit_la_SOURCES) -+ -+libweston_toytoolkit_la_CFLAGS = \ -+ $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) \ -+ $(GCC_CFLAGS) -pthread -fvisibility=default -+libweston_toytoolkit_la_LIBADD = \ -+ $(CLIENT_LIBS) \ -+ $(CAIRO_EGL_LIBS) \ -+ libshared-cairo.la -lrt -lm -+libweston_toytoolkit_la_LDFLAGS = -version-info 1:0:1 -+ -+ -+ -+ - weston_flower_SOURCES = clients/flower.c - weston_flower_LDADD = libtoytoolkit.la - weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) -diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h -new file mode 100644 -index 0000000..1c0b77d ---- /dev/null -+++ b/clients/toytoolkit.h -@@ -0,0 +1,741 @@ -+/* -+ * Copyright © 2008 Kristian Høgsberg -+ * -+ * 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 (including the next -+ * paragraph) 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. -+ */ -+ -+#ifndef _TOYTOOLKIT_H_ -+#define _TOYTOOLKIT_H_ -+ -+#include -+#include -+#include -+#include -+ -+struct window; -+struct widget; -+struct display; -+struct input; -+struct output; -+ -+struct task { -+ void (*run)(struct task *task, uint32_t events); -+ struct wl_list link; -+}; -+ -+struct rectangle { -+ int32_t x; -+ int32_t y; -+ int32_t width; -+ int32_t height; -+}; -+ -+struct display * -+display_create(int *argc, char *argv[]); -+ -+void -+display_destroy(struct display *display); -+ -+void -+display_set_user_data(struct display *display, void *data); -+ -+void * -+display_get_user_data(struct display *display); -+ -+struct wl_display * -+display_get_display(struct display *display); -+ -+int -+display_has_subcompositor(struct display *display); -+ -+cairo_device_t * -+display_get_cairo_device(struct display *display); -+ -+struct wl_compositor * -+display_get_compositor(struct display *display); -+ -+struct output * -+display_get_output(struct display *display); -+ -+uint32_t -+display_get_serial(struct display *display); -+ -+typedef void (*display_global_handler_t)(struct display *display, -+ uint32_t name, -+ const char *interface, -+ uint32_t version, void *data); -+ -+void -+display_set_global_handler(struct display *display, -+ display_global_handler_t handler); -+void -+display_set_global_handler_remove(struct display *display, -+ display_global_handler_t remove_handler); -+void * -+display_bind(struct display *display, uint32_t name, -+ const struct wl_interface *interface, uint32_t version); -+ -+typedef void (*display_output_handler_t)(struct output *output, void *data); -+ -+/* -+ * The output configure handler is called, when a new output is connected -+ * and we know its current mode, or when the current mode changes. -+ * Test and set the output user data in your handler to know, if the -+ * output is new. Note: 'data' in the configure handler is the display -+ * user data. -+ */ -+void -+display_set_output_configure_handler(struct display *display, -+ display_output_handler_t handler); -+ -+struct wl_data_source * -+display_create_data_source(struct display *display); -+ -+#ifdef EGL_NO_DISPLAY -+EGLDisplay -+display_get_egl_display(struct display *d); -+ -+EGLConfig -+display_get_argb_egl_config(struct display *d); -+ -+int -+display_acquire_window_surface(struct display *display, -+ struct window *window, -+ EGLContext ctx); -+void -+display_release_window_surface(struct display *display, -+ struct window *window); -+#endif -+ -+#define SURFACE_OPAQUE 0x01 -+#define SURFACE_SHM 0x02 -+ -+#define SURFACE_HINT_RESIZE 0x10 -+ -+#define SURFACE_HINT_RGB565 0x100 -+ -+cairo_surface_t * -+display_create_surface(struct display *display, -+ struct wl_surface *surface, -+ struct rectangle *rectangle, -+ uint32_t flags); -+ -+struct wl_buffer * -+display_get_buffer_for_surface(struct display *display, -+ cairo_surface_t *surface); -+ -+struct wl_cursor_image * -+display_get_pointer_image(struct display *display, int pointer); -+ -+void -+display_defer(struct display *display, struct task *task); -+ -+void -+display_watch_fd(struct display *display, -+ int fd, uint32_t events, struct task *task); -+ -+void -+display_unwatch_fd(struct display *display, int fd); -+ -+void -+display_run(struct display *d); -+ -+void -+display_exit(struct display *d); -+ -+int -+display_get_data_device_manager_version(struct display *d); -+ -+enum cursor_type { -+ CURSOR_BOTTOM_LEFT, -+ CURSOR_BOTTOM_RIGHT, -+ CURSOR_BOTTOM, -+ CURSOR_DRAGGING, -+ CURSOR_LEFT_PTR, -+ CURSOR_LEFT, -+ CURSOR_RIGHT, -+ CURSOR_TOP_LEFT, -+ CURSOR_TOP_RIGHT, -+ CURSOR_TOP, -+ CURSOR_IBEAM, -+ CURSOR_HAND1, -+ CURSOR_WATCH, -+ CURSOR_DND_MOVE, -+ CURSOR_DND_COPY, -+ CURSOR_DND_FORBIDDEN, -+ -+ CURSOR_BLANK -+}; -+ -+typedef void (*window_key_handler_t)(struct window *window, struct input *input, -+ uint32_t time, uint32_t key, uint32_t unicode, -+ enum wl_keyboard_key_state state, void *data); -+ -+typedef void (*window_keyboard_focus_handler_t)(struct window *window, -+ struct input *device, void *data); -+ -+typedef void (*window_data_handler_t)(struct window *window, -+ struct input *input, -+ float x, float y, -+ const char **types, -+ void *data); -+ -+typedef void (*window_drop_handler_t)(struct window *window, -+ struct input *input, -+ int32_t x, int32_t y, void *data); -+ -+typedef void (*window_close_handler_t)(void *data); -+typedef void (*window_fullscreen_handler_t)(struct window *window, void *data); -+ -+typedef void (*window_output_handler_t)(struct window *window, struct output *output, -+ int enter, void *data); -+typedef void (*window_state_changed_handler_t)(struct window *window, -+ void *data); -+ -+ -+typedef void (*window_locked_pointer_motion_handler_t)(struct window *window, -+ struct input *input, -+ uint32_t time, -+ float x, float y, -+ void *data); -+ -+typedef void (*locked_pointer_locked_handler_t)(struct window *window, -+ struct input *input, -+ void *data); -+ -+typedef void (*locked_pointer_unlocked_handler_t)(struct window *window, -+ struct input *input, -+ void *data); -+ -+typedef void (*confined_pointer_confined_handler_t)(struct window *window, -+ struct input *input, -+ void *data); -+ -+typedef void (*confined_pointer_unconfined_handler_t)(struct window *window, -+ struct input *input, -+ void *data); -+ -+typedef void (*widget_resize_handler_t)(struct widget *widget, -+ int32_t width, int32_t height, -+ void *data); -+typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data); -+ -+typedef int (*widget_enter_handler_t)(struct widget *widget, -+ struct input *input, -+ float x, float y, void *data); -+typedef void (*widget_leave_handler_t)(struct widget *widget, -+ struct input *input, void *data); -+typedef int (*widget_motion_handler_t)(struct widget *widget, -+ struct input *input, uint32_t time, -+ float x, float y, void *data); -+typedef void (*widget_button_handler_t)(struct widget *widget, -+ struct input *input, uint32_t time, -+ uint32_t button, -+ enum wl_pointer_button_state state, -+ void *data); -+typedef void (*widget_touch_down_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t serial, -+ uint32_t time, -+ int32_t id, -+ float x, -+ float y, -+ void *data); -+typedef void (*widget_touch_up_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t serial, -+ uint32_t time, -+ int32_t id, -+ void *data); -+typedef void (*widget_touch_motion_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t time, -+ int32_t id, -+ float x, -+ float y, -+ void *data); -+typedef void (*widget_touch_frame_handler_t)(struct widget *widget, -+ struct input *input, void *data); -+typedef void (*widget_touch_cancel_handler_t)(struct widget *widget, -+ struct input *input, void *data); -+typedef void (*widget_axis_handler_t)(struct widget *widget, -+ struct input *input, uint32_t time, -+ uint32_t axis, -+ wl_fixed_t value, -+ void *data); -+ -+typedef void (*widget_pointer_frame_handler_t)(struct widget *widget, -+ struct input *input, -+ void *data); -+ -+typedef void (*widget_axis_source_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t source, -+ void *data); -+ -+typedef void (*widget_axis_stop_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t time, -+ uint32_t axis, -+ void *data); -+ -+typedef void (*widget_axis_discrete_handler_t)(struct widget *widget, -+ struct input *input, -+ uint32_t axis, -+ int32_t discrete, -+ void *data); -+ -+struct window * -+window_create(struct display *display); -+struct window * -+window_create_custom(struct display *display); -+ -+void -+window_set_parent(struct window *window, struct window *parent_window); -+struct window * -+window_get_parent(struct window *window); -+ -+int -+window_has_focus(struct window *window); -+ -+typedef void (*menu_func_t)(void *data, struct input *input, int index); -+ -+void -+window_show_menu(struct display *display, -+ struct input *input, uint32_t time, struct window *parent, -+ int32_t x, int32_t y, -+ menu_func_t func, const char **entries, int count); -+ -+void -+window_show_frame_menu(struct window *window, -+ struct input *input, uint32_t time); -+ -+int -+window_get_buffer_transform(struct window *window); -+ -+void -+window_set_buffer_transform(struct window *window, -+ enum wl_output_transform transform); -+ -+uint32_t -+window_get_buffer_scale(struct window *window); -+ -+void -+window_set_buffer_scale(struct window *window, -+ int32_t scale); -+ -+uint32_t -+window_get_output_scale(struct window *window); -+ -+void -+window_destroy(struct window *window); -+ -+struct widget * -+window_add_widget(struct window *window, void *data); -+ -+enum subsurface_mode { -+ SUBSURFACE_SYNCHRONIZED, -+ SUBSURFACE_DESYNCHRONIZED -+}; -+ -+struct widget * -+window_add_subsurface(struct window *window, void *data, -+ enum subsurface_mode default_mode); -+ -+typedef void (*data_func_t)(void *data, size_t len, -+ int32_t x, int32_t y, void *user_data); -+ -+struct display * -+window_get_display(struct window *window); -+void -+window_move(struct window *window, struct input *input, uint32_t time); -+void -+window_get_allocation(struct window *window, struct rectangle *allocation); -+void -+window_schedule_redraw(struct window *window); -+void -+window_schedule_resize(struct window *window, int width, int height); -+ -+int -+window_lock_pointer(struct window *window, struct input *input); -+ -+void -+window_unlock_pointer(struct window *window); -+ -+void -+widget_set_locked_pointer_cursor_hint(struct widget *widget, -+ float x, float y); -+ -+int -+window_confine_pointer_to_rectangles(struct window *window, -+ struct input *input, -+ struct rectangle *rectangles, -+ int num_rectangles); -+ -+void -+window_update_confine_rectangles(struct window *window, -+ struct rectangle *rectangles, -+ int num_rectangles); -+ -+int -+window_confine_pointer_to_widget(struct window *window, -+ struct widget *widget, -+ struct input *input); -+ -+void -+window_unconfine_pointer(struct window *window); -+ -+cairo_surface_t * -+window_get_surface(struct window *window); -+ -+struct wl_surface * -+window_get_wl_surface(struct window *window); -+ -+struct wl_subsurface * -+widget_get_wl_subsurface(struct widget *widget); -+ -+enum window_buffer_type { -+ WINDOW_BUFFER_TYPE_EGL_WINDOW, -+ WINDOW_BUFFER_TYPE_SHM, -+}; -+ -+void -+display_surface_damage(struct display *display, cairo_surface_t *cairo_surface, -+ int32_t x, int32_t y, int32_t width, int32_t height); -+ -+void -+window_set_buffer_type(struct window *window, enum window_buffer_type type); -+ -+enum window_buffer_type -+window_get_buffer_type(struct window *window); -+ -+int -+window_is_fullscreen(struct window *window); -+ -+void -+window_set_fullscreen(struct window *window, int fullscreen); -+ -+int -+window_is_maximized(struct window *window); -+ -+void -+window_set_maximized(struct window *window, int maximized); -+ -+int -+window_is_resizing(struct window *window); -+ -+void -+window_set_minimized(struct window *window); -+ -+void -+window_set_user_data(struct window *window, void *data); -+ -+void * -+window_get_user_data(struct window *window); -+ -+void -+window_set_key_handler(struct window *window, -+ window_key_handler_t handler); -+ -+void -+window_set_keyboard_focus_handler(struct window *window, -+ window_keyboard_focus_handler_t handler); -+ -+void -+window_set_data_handler(struct window *window, -+ window_data_handler_t handler); -+ -+void -+window_set_drop_handler(struct window *window, -+ window_drop_handler_t handler); -+ -+void -+window_set_close_handler(struct window *window, -+ window_close_handler_t handler); -+void -+window_set_fullscreen_handler(struct window *window, -+ window_fullscreen_handler_t handler); -+void -+window_set_output_handler(struct window *window, -+ window_output_handler_t handler); -+void -+window_set_state_changed_handler(struct window *window, -+ window_state_changed_handler_t handler); -+ -+void -+window_set_pointer_locked_handler(struct window *window, -+ locked_pointer_locked_handler_t locked, -+ locked_pointer_unlocked_handler_t unlocked); -+ -+void -+window_set_pointer_confined_handler(struct window *window, -+ confined_pointer_confined_handler_t confined, -+ confined_pointer_unconfined_handler_t unconfined); -+ -+void -+window_set_locked_pointer_motion_handler( -+ struct window *window, window_locked_pointer_motion_handler_t handler); -+ -+void -+window_set_title(struct window *window, const char *title); -+ -+const char * -+window_get_title(struct window *window); -+ -+void -+window_set_text_cursor_position(struct window *window, int32_t x, int32_t y); -+ -+enum preferred_format { -+ WINDOW_PREFERRED_FORMAT_NONE, -+ WINDOW_PREFERRED_FORMAT_RGB565 -+}; -+ -+void -+window_set_preferred_format(struct window *window, -+ enum preferred_format format); -+ -+int -+widget_set_tooltip(struct widget *parent, char *entry, float x, float y); -+ -+void -+widget_destroy_tooltip(struct widget *parent); -+ -+struct widget * -+widget_add_widget(struct widget *parent, void *data); -+ -+void -+widget_destroy(struct widget *widget); -+void -+widget_set_default_cursor(struct widget *widget, int cursor); -+void -+widget_get_allocation(struct widget *widget, struct rectangle *allocation); -+ -+void -+widget_set_allocation(struct widget *widget, -+ int32_t x, int32_t y, int32_t width, int32_t height); -+void -+widget_set_size(struct widget *widget, int32_t width, int32_t height); -+void -+widget_set_transparent(struct widget *widget, int transparent); -+void -+widget_schedule_resize(struct widget *widget, int32_t width, int32_t height); -+ -+void * -+widget_get_user_data(struct widget *widget); -+ -+cairo_t * -+widget_cairo_create(struct widget *widget); -+ -+struct wl_surface * -+widget_get_wl_surface(struct widget *widget); -+ -+uint32_t -+widget_get_last_time(struct widget *widget); -+ -+void -+widget_input_region_add(struct widget *widget, const struct rectangle *rect); -+ -+void -+widget_set_redraw_handler(struct widget *widget, -+ widget_redraw_handler_t handler); -+void -+widget_set_resize_handler(struct widget *widget, -+ widget_resize_handler_t handler); -+void -+widget_set_enter_handler(struct widget *widget, -+ widget_enter_handler_t handler); -+void -+widget_set_leave_handler(struct widget *widget, -+ widget_leave_handler_t handler); -+void -+widget_set_motion_handler(struct widget *widget, -+ widget_motion_handler_t handler); -+void -+widget_set_button_handler(struct widget *widget, -+ widget_button_handler_t handler); -+void -+widget_set_touch_down_handler(struct widget *widget, -+ widget_touch_down_handler_t handler); -+void -+widget_set_touch_up_handler(struct widget *widget, -+ widget_touch_up_handler_t handler); -+void -+widget_set_touch_motion_handler(struct widget *widget, -+ widget_touch_motion_handler_t handler); -+void -+widget_set_touch_frame_handler(struct widget *widget, -+ widget_touch_frame_handler_t handler); -+void -+widget_set_touch_cancel_handler(struct widget *widget, -+ widget_touch_cancel_handler_t handler); -+void -+widget_set_axis_handler(struct widget *widget, -+ widget_axis_handler_t handler); -+void -+widget_set_pointer_frame_handler(struct widget *widget, -+ widget_pointer_frame_handler_t handler); -+void -+widget_set_axis_handlers(struct widget *widget, -+ widget_axis_handler_t axis_handler, -+ widget_axis_source_handler_t axis_source_handler, -+ widget_axis_stop_handler_t axis_stop_handler, -+ widget_axis_discrete_handler_t axis_discrete_handler); -+ -+void -+window_inhibit_redraw(struct window *window); -+void -+window_uninhibit_redraw(struct window *window); -+void -+widget_schedule_redraw(struct widget *widget); -+void -+widget_set_use_cairo(struct widget *widget, int use_cairo); -+ -+struct widget * -+window_frame_create(struct window *window, void *data); -+ -+void -+window_frame_set_child_size(struct widget *widget, int child_width, -+ int child_height); -+ -+void -+input_set_pointer_image(struct input *input, int pointer); -+ -+void -+input_get_position(struct input *input, int32_t *x, int32_t *y); -+ -+int -+input_get_touch(struct input *input, int32_t id, float *x, float *y); -+ -+#define MOD_SHIFT_MASK 0x01 -+#define MOD_ALT_MASK 0x02 -+#define MOD_CONTROL_MASK 0x04 -+ -+uint32_t -+input_get_modifiers(struct input *input); -+ -+void -+touch_grab(struct input *input, int32_t touch_id); -+ -+void -+touch_ungrab(struct input *input); -+ -+void -+input_grab(struct input *input, struct widget *widget, uint32_t button); -+ -+void -+input_ungrab(struct input *input); -+ -+struct widget * -+input_get_focus_widget(struct input *input); -+ -+struct display * -+input_get_display(struct input *input); -+ -+struct wl_seat * -+input_get_seat(struct input *input); -+ -+struct wl_data_device * -+input_get_data_device(struct input *input); -+ -+void -+input_set_selection(struct input *input, -+ struct wl_data_source *source, uint32_t time); -+ -+void -+input_accept(struct input *input, const char *type); -+ -+ -+void -+input_receive_drag_data(struct input *input, const char *mime_type, -+ data_func_t func, void *user_data); -+int -+input_receive_drag_data_to_fd(struct input *input, -+ const char *mime_type, int fd); -+ -+int -+input_receive_selection_data(struct input *input, const char *mime_type, -+ data_func_t func, void *data); -+int -+input_receive_selection_data_to_fd(struct input *input, -+ const char *mime_type, int fd); -+ -+void -+output_set_user_data(struct output *output, void *data); -+ -+void * -+output_get_user_data(struct output *output); -+ -+void -+output_set_destroy_handler(struct output *output, -+ display_output_handler_t handler); -+ -+void -+output_get_allocation(struct output *output, struct rectangle *allocation); -+ -+struct wl_output * -+output_get_wl_output(struct output *output); -+ -+enum wl_output_transform -+output_get_transform(struct output *output); -+ -+uint32_t -+output_get_scale(struct output *output); -+ -+const char * -+output_get_make(struct output *output); -+ -+const char * -+output_get_model(struct output *output); -+ -+void -+keysym_modifiers_add(struct wl_array *modifiers_map, -+ const char *name); -+ -+xkb_mod_mask_t -+keysym_modifiers_get_mask(struct wl_array *modifiers_map, -+ const char *name); -+ -+struct toytimer; -+typedef void (*toytimer_cb)(struct toytimer *); -+ -+struct toytimer { -+ struct display *display; -+ struct task tsk; -+ int fd; -+ toytimer_cb callback; -+}; -+ -+void -+toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display, -+ toytimer_cb callback); -+ -+void -+toytimer_fini(struct toytimer *tt); -+ -+void -+toytimer_arm(struct toytimer *tt, const struct itimerspec *its); -+ -+void -+toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec); -+ -+void -+toytimer_disarm(struct toytimer *tt); -+ -+#endif -diff --git a/clients/window.h b/clients/window.h -index fde5c2f..fea173f 100644 ---- a/clients/window.h -+++ b/clients/window.h -@@ -27,721 +27,9 @@ - #include "config.h" - - #include --#include --#include --#include --#include -+#include "toytoolkit.h" - #include "shared/config-parser.h" - #include "shared/zalloc.h" - #include "shared/platform.h" - --struct window; --struct widget; --struct display; --struct input; --struct output; -- --struct task { -- void (*run)(struct task *task, uint32_t events); -- struct wl_list link; --}; -- --struct rectangle { -- int32_t x; -- int32_t y; -- int32_t width; -- int32_t height; --}; -- --struct display * --display_create(int *argc, char *argv[]); -- --void --display_destroy(struct display *display); -- --void --display_set_user_data(struct display *display, void *data); -- --void * --display_get_user_data(struct display *display); -- --struct wl_display * --display_get_display(struct display *display); -- --int --display_has_subcompositor(struct display *display); -- --cairo_device_t * --display_get_cairo_device(struct display *display); -- --struct wl_compositor * --display_get_compositor(struct display *display); -- --struct output * --display_get_output(struct display *display); -- --uint32_t --display_get_serial(struct display *display); -- --typedef void (*display_global_handler_t)(struct display *display, -- uint32_t name, -- const char *interface, -- uint32_t version, void *data); -- --void --display_set_global_handler(struct display *display, -- display_global_handler_t handler); --void --display_set_global_handler_remove(struct display *display, -- display_global_handler_t remove_handler); --void * --display_bind(struct display *display, uint32_t name, -- const struct wl_interface *interface, uint32_t version); -- --typedef void (*display_output_handler_t)(struct output *output, void *data); -- --/* -- * The output configure handler is called, when a new output is connected -- * and we know its current mode, or when the current mode changes. -- * Test and set the output user data in your handler to know, if the -- * output is new. Note: 'data' in the configure handler is the display -- * user data. -- */ --void --display_set_output_configure_handler(struct display *display, -- display_output_handler_t handler); -- --struct wl_data_source * --display_create_data_source(struct display *display); -- --#ifdef EGL_NO_DISPLAY --EGLDisplay --display_get_egl_display(struct display *d); -- --EGLConfig --display_get_argb_egl_config(struct display *d); -- --int --display_acquire_window_surface(struct display *display, -- struct window *window, -- EGLContext ctx); --void --display_release_window_surface(struct display *display, -- struct window *window); --#endif -- --#define SURFACE_OPAQUE 0x01 --#define SURFACE_SHM 0x02 -- --#define SURFACE_HINT_RESIZE 0x10 -- --#define SURFACE_HINT_RGB565 0x100 -- --cairo_surface_t * --display_create_surface(struct display *display, -- struct wl_surface *surface, -- struct rectangle *rectangle, -- uint32_t flags); -- --struct wl_buffer * --display_get_buffer_for_surface(struct display *display, -- cairo_surface_t *surface); -- --struct wl_cursor_image * --display_get_pointer_image(struct display *display, int pointer); -- --void --display_defer(struct display *display, struct task *task); -- --void --display_watch_fd(struct display *display, -- int fd, uint32_t events, struct task *task); -- --void --display_unwatch_fd(struct display *display, int fd); -- --void --display_run(struct display *d); -- --void --display_exit(struct display *d); -- --int --display_get_data_device_manager_version(struct display *d); -- --enum cursor_type { -- CURSOR_BOTTOM_LEFT, -- CURSOR_BOTTOM_RIGHT, -- CURSOR_BOTTOM, -- CURSOR_DRAGGING, -- CURSOR_LEFT_PTR, -- CURSOR_LEFT, -- CURSOR_RIGHT, -- CURSOR_TOP_LEFT, -- CURSOR_TOP_RIGHT, -- CURSOR_TOP, -- CURSOR_IBEAM, -- CURSOR_HAND1, -- CURSOR_WATCH, -- CURSOR_DND_MOVE, -- CURSOR_DND_COPY, -- CURSOR_DND_FORBIDDEN, -- -- CURSOR_BLANK --}; -- --typedef void (*window_key_handler_t)(struct window *window, struct input *input, -- uint32_t time, uint32_t key, uint32_t unicode, -- enum wl_keyboard_key_state state, void *data); -- --typedef void (*window_keyboard_focus_handler_t)(struct window *window, -- struct input *device, void *data); -- --typedef void (*window_data_handler_t)(struct window *window, -- struct input *input, -- float x, float y, -- const char **types, -- void *data); -- --typedef void (*window_drop_handler_t)(struct window *window, -- struct input *input, -- int32_t x, int32_t y, void *data); -- --typedef void (*window_close_handler_t)(void *data); --typedef void (*window_fullscreen_handler_t)(struct window *window, void *data); -- --typedef void (*window_output_handler_t)(struct window *window, struct output *output, -- int enter, void *data); --typedef void (*window_state_changed_handler_t)(struct window *window, -- void *data); -- -- --typedef void (*window_locked_pointer_motion_handler_t)(struct window *window, -- struct input *input, -- uint32_t time, -- float x, float y, -- void *data); -- --typedef void (*locked_pointer_locked_handler_t)(struct window *window, -- struct input *input, -- void *data); -- --typedef void (*locked_pointer_unlocked_handler_t)(struct window *window, -- struct input *input, -- void *data); -- --typedef void (*confined_pointer_confined_handler_t)(struct window *window, -- struct input *input, -- void *data); -- --typedef void (*confined_pointer_unconfined_handler_t)(struct window *window, -- struct input *input, -- void *data); -- --typedef void (*widget_resize_handler_t)(struct widget *widget, -- int32_t width, int32_t height, -- void *data); --typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data); -- --typedef int (*widget_enter_handler_t)(struct widget *widget, -- struct input *input, -- float x, float y, void *data); --typedef void (*widget_leave_handler_t)(struct widget *widget, -- struct input *input, void *data); --typedef int (*widget_motion_handler_t)(struct widget *widget, -- struct input *input, uint32_t time, -- float x, float y, void *data); --typedef void (*widget_button_handler_t)(struct widget *widget, -- struct input *input, uint32_t time, -- uint32_t button, -- enum wl_pointer_button_state state, -- void *data); --typedef void (*widget_touch_down_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t serial, -- uint32_t time, -- int32_t id, -- float x, -- float y, -- void *data); --typedef void (*widget_touch_up_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t serial, -- uint32_t time, -- int32_t id, -- void *data); --typedef void (*widget_touch_motion_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t time, -- int32_t id, -- float x, -- float y, -- void *data); --typedef void (*widget_touch_frame_handler_t)(struct widget *widget, -- struct input *input, void *data); --typedef void (*widget_touch_cancel_handler_t)(struct widget *widget, -- struct input *input, void *data); --typedef void (*widget_axis_handler_t)(struct widget *widget, -- struct input *input, uint32_t time, -- uint32_t axis, -- wl_fixed_t value, -- void *data); -- --typedef void (*widget_pointer_frame_handler_t)(struct widget *widget, -- struct input *input, -- void *data); -- --typedef void (*widget_axis_source_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t source, -- void *data); -- --typedef void (*widget_axis_stop_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t time, -- uint32_t axis, -- void *data); -- --typedef void (*widget_axis_discrete_handler_t)(struct widget *widget, -- struct input *input, -- uint32_t axis, -- int32_t discrete, -- void *data); -- --struct window * --window_create(struct display *display); --struct window * --window_create_custom(struct display *display); -- --void --window_set_parent(struct window *window, struct window *parent_window); --struct window * --window_get_parent(struct window *window); -- --int --window_has_focus(struct window *window); -- --typedef void (*menu_func_t)(void *data, struct input *input, int index); -- --void --window_show_menu(struct display *display, -- struct input *input, uint32_t time, struct window *parent, -- int32_t x, int32_t y, -- menu_func_t func, const char **entries, int count); -- --void --window_show_frame_menu(struct window *window, -- struct input *input, uint32_t time); -- --int --window_get_buffer_transform(struct window *window); -- --void --window_set_buffer_transform(struct window *window, -- enum wl_output_transform transform); -- --uint32_t --window_get_buffer_scale(struct window *window); -- --void --window_set_buffer_scale(struct window *window, -- int32_t scale); -- --uint32_t --window_get_output_scale(struct window *window); -- --void --window_destroy(struct window *window); -- --struct widget * --window_add_widget(struct window *window, void *data); -- --enum subsurface_mode { -- SUBSURFACE_SYNCHRONIZED, -- SUBSURFACE_DESYNCHRONIZED --}; -- --struct widget * --window_add_subsurface(struct window *window, void *data, -- enum subsurface_mode default_mode); -- --typedef void (*data_func_t)(void *data, size_t len, -- int32_t x, int32_t y, void *user_data); -- --struct display * --window_get_display(struct window *window); --void --window_move(struct window *window, struct input *input, uint32_t time); --void --window_get_allocation(struct window *window, struct rectangle *allocation); --void --window_schedule_redraw(struct window *window); --void --window_schedule_resize(struct window *window, int width, int height); -- --int --window_lock_pointer(struct window *window, struct input *input); -- --void --window_unlock_pointer(struct window *window); -- --void --widget_set_locked_pointer_cursor_hint(struct widget *widget, -- float x, float y); -- --int --window_confine_pointer_to_rectangles(struct window *window, -- struct input *input, -- struct rectangle *rectangles, -- int num_rectangles); -- --void --window_update_confine_rectangles(struct window *window, -- struct rectangle *rectangles, -- int num_rectangles); -- --int --window_confine_pointer_to_widget(struct window *window, -- struct widget *widget, -- struct input *input); -- --void --window_unconfine_pointer(struct window *window); -- --cairo_surface_t * --window_get_surface(struct window *window); -- --struct wl_surface * --window_get_wl_surface(struct window *window); -- --struct wl_subsurface * --widget_get_wl_subsurface(struct widget *widget); -- --enum window_buffer_type { -- WINDOW_BUFFER_TYPE_EGL_WINDOW, -- WINDOW_BUFFER_TYPE_SHM, --}; -- --void --display_surface_damage(struct display *display, cairo_surface_t *cairo_surface, -- int32_t x, int32_t y, int32_t width, int32_t height); -- --void --window_set_buffer_type(struct window *window, enum window_buffer_type type); -- --enum window_buffer_type --window_get_buffer_type(struct window *window); -- --int --window_is_fullscreen(struct window *window); -- --void --window_set_fullscreen(struct window *window, int fullscreen); -- --int --window_is_maximized(struct window *window); -- --void --window_set_maximized(struct window *window, int maximized); -- --int --window_is_resizing(struct window *window); -- --void --window_set_minimized(struct window *window); -- --void --window_set_user_data(struct window *window, void *data); -- --void * --window_get_user_data(struct window *window); -- --void --window_set_key_handler(struct window *window, -- window_key_handler_t handler); -- --void --window_set_keyboard_focus_handler(struct window *window, -- window_keyboard_focus_handler_t handler); -- --void --window_set_data_handler(struct window *window, -- window_data_handler_t handler); -- --void --window_set_drop_handler(struct window *window, -- window_drop_handler_t handler); -- --void --window_set_close_handler(struct window *window, -- window_close_handler_t handler); --void --window_set_fullscreen_handler(struct window *window, -- window_fullscreen_handler_t handler); --void --window_set_output_handler(struct window *window, -- window_output_handler_t handler); --void --window_set_state_changed_handler(struct window *window, -- window_state_changed_handler_t handler); -- --void --window_set_pointer_locked_handler(struct window *window, -- locked_pointer_locked_handler_t locked, -- locked_pointer_unlocked_handler_t unlocked); -- --void --window_set_pointer_confined_handler(struct window *window, -- confined_pointer_confined_handler_t confined, -- confined_pointer_unconfined_handler_t unconfined); -- --void --window_set_locked_pointer_motion_handler( -- struct window *window, window_locked_pointer_motion_handler_t handler); -- --void --window_set_title(struct window *window, const char *title); -- --const char * --window_get_title(struct window *window); -- --void --window_set_text_cursor_position(struct window *window, int32_t x, int32_t y); -- --enum preferred_format { -- WINDOW_PREFERRED_FORMAT_NONE, -- WINDOW_PREFERRED_FORMAT_RGB565 --}; -- --void --window_set_preferred_format(struct window *window, -- enum preferred_format format); -- --int --widget_set_tooltip(struct widget *parent, char *entry, float x, float y); -- --void --widget_destroy_tooltip(struct widget *parent); -- --struct widget * --widget_add_widget(struct widget *parent, void *data); -- --void --widget_destroy(struct widget *widget); --void --widget_set_default_cursor(struct widget *widget, int cursor); --void --widget_get_allocation(struct widget *widget, struct rectangle *allocation); -- --void --widget_set_allocation(struct widget *widget, -- int32_t x, int32_t y, int32_t width, int32_t height); --void --widget_set_size(struct widget *widget, int32_t width, int32_t height); --void --widget_set_transparent(struct widget *widget, int transparent); --void --widget_schedule_resize(struct widget *widget, int32_t width, int32_t height); -- --void * --widget_get_user_data(struct widget *widget); -- --cairo_t * --widget_cairo_create(struct widget *widget); -- --struct wl_surface * --widget_get_wl_surface(struct widget *widget); -- --uint32_t --widget_get_last_time(struct widget *widget); -- --void --widget_input_region_add(struct widget *widget, const struct rectangle *rect); -- --void --widget_set_redraw_handler(struct widget *widget, -- widget_redraw_handler_t handler); --void --widget_set_resize_handler(struct widget *widget, -- widget_resize_handler_t handler); --void --widget_set_enter_handler(struct widget *widget, -- widget_enter_handler_t handler); --void --widget_set_leave_handler(struct widget *widget, -- widget_leave_handler_t handler); --void --widget_set_motion_handler(struct widget *widget, -- widget_motion_handler_t handler); --void --widget_set_button_handler(struct widget *widget, -- widget_button_handler_t handler); --void --widget_set_touch_down_handler(struct widget *widget, -- widget_touch_down_handler_t handler); --void --widget_set_touch_up_handler(struct widget *widget, -- widget_touch_up_handler_t handler); --void --widget_set_touch_motion_handler(struct widget *widget, -- widget_touch_motion_handler_t handler); --void --widget_set_touch_frame_handler(struct widget *widget, -- widget_touch_frame_handler_t handler); --void --widget_set_touch_cancel_handler(struct widget *widget, -- widget_touch_cancel_handler_t handler); --void --widget_set_axis_handler(struct widget *widget, -- widget_axis_handler_t handler); --void --widget_set_pointer_frame_handler(struct widget *widget, -- widget_pointer_frame_handler_t handler); --void --widget_set_axis_handlers(struct widget *widget, -- widget_axis_handler_t axis_handler, -- widget_axis_source_handler_t axis_source_handler, -- widget_axis_stop_handler_t axis_stop_handler, -- widget_axis_discrete_handler_t axis_discrete_handler); -- --void --window_inhibit_redraw(struct window *window); --void --window_uninhibit_redraw(struct window *window); --void --widget_schedule_redraw(struct widget *widget); --void --widget_set_use_cairo(struct widget *widget, int use_cairo); -- --struct widget * --window_frame_create(struct window *window, void *data); -- --void --window_frame_set_child_size(struct widget *widget, int child_width, -- int child_height); -- --void --input_set_pointer_image(struct input *input, int pointer); -- --void --input_get_position(struct input *input, int32_t *x, int32_t *y); -- --int --input_get_touch(struct input *input, int32_t id, float *x, float *y); -- --#define MOD_SHIFT_MASK 0x01 --#define MOD_ALT_MASK 0x02 --#define MOD_CONTROL_MASK 0x04 -- --uint32_t --input_get_modifiers(struct input *input); -- --void --touch_grab(struct input *input, int32_t touch_id); -- --void --touch_ungrab(struct input *input); -- --void --input_grab(struct input *input, struct widget *widget, uint32_t button); -- --void --input_ungrab(struct input *input); -- --struct widget * --input_get_focus_widget(struct input *input); -- --struct display * --input_get_display(struct input *input); -- --struct wl_seat * --input_get_seat(struct input *input); -- --struct wl_data_device * --input_get_data_device(struct input *input); -- --void --input_set_selection(struct input *input, -- struct wl_data_source *source, uint32_t time); -- --void --input_accept(struct input *input, const char *type); -- -- --void --input_receive_drag_data(struct input *input, const char *mime_type, -- data_func_t func, void *user_data); --int --input_receive_drag_data_to_fd(struct input *input, -- const char *mime_type, int fd); -- --int --input_receive_selection_data(struct input *input, const char *mime_type, -- data_func_t func, void *data); --int --input_receive_selection_data_to_fd(struct input *input, -- const char *mime_type, int fd); -- --void --output_set_user_data(struct output *output, void *data); -- --void * --output_get_user_data(struct output *output); -- --void --output_set_destroy_handler(struct output *output, -- display_output_handler_t handler); -- --void --output_get_allocation(struct output *output, struct rectangle *allocation); -- --struct wl_output * --output_get_wl_output(struct output *output); -- --enum wl_output_transform --output_get_transform(struct output *output); -- --uint32_t --output_get_scale(struct output *output); -- --const char * --output_get_make(struct output *output); -- --const char * --output_get_model(struct output *output); -- --void --keysym_modifiers_add(struct wl_array *modifiers_map, -- const char *name); -- --xkb_mod_mask_t --keysym_modifiers_get_mask(struct wl_array *modifiers_map, -- const char *name); -- --struct toytimer; --typedef void (*toytimer_cb)(struct toytimer *); -- --struct toytimer { -- struct display *display; -- struct task tsk; -- int fd; -- toytimer_cb callback; --}; -- --void --toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display, -- toytimer_cb callback); -- --void --toytimer_fini(struct toytimer *tt); -- --void --toytimer_arm(struct toytimer *tt, const struct itimerspec *its); -- --void --toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec); -- --void --toytimer_disarm(struct toytimer *tt); -- - #endif -diff --git a/configure.ac b/configure.ac -index 96acf75..d3fa5af 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -82,7 +82,7 @@ AC_PROG_SED - - # Initialize libtool - LT_PREREQ([2.2]) --LT_INIT([disable-static]) -+LT_INIT([shared static]) - - AC_ARG_VAR([WESTON_NATIVE_BACKEND], - [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@]) --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch deleted file mode 100644 index bf3ef82c..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 91ccb8d7fa92a55fd3d14da8f7fa883e951ae49a Mon Sep 17 00:00:00 2001 -From: Valentine Barshak -Date: Wed, 6 Mar 2019 00:17:31 +0300 -Subject: [PATCH 3/7] add window_set_fullscreen_at_output - ---- - clients/toytoolkit.h | 9 +++++++++ - clients/window.c | 38 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 47 insertions(+) - -diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h -index 1c0b77d..2bcecc1 100644 ---- a/clients/toytoolkit.h -+++ b/clients/toytoolkit.h -@@ -74,6 +74,12 @@ display_get_compositor(struct display *display); - struct output * - display_get_output(struct display *display); - -+unsigned int -+display_get_outputs_number(struct display *display); -+ -+struct output * -+display_get_output_by_index(struct display *display, unsigned int index); -+ - uint32_t - display_get_serial(struct display *display); - -@@ -432,6 +438,9 @@ window_is_fullscreen(struct window *window); - void - window_set_fullscreen(struct window *window, int fullscreen); - -+void -+window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output); -+ - int - window_is_maximized(struct window *window); - -diff --git a/clients/window.c b/clients/window.c -index b64e96c..43f20e2 100644 ---- a/clients/window.c -+++ b/clients/window.c -@@ -4597,6 +4597,21 @@ window_set_fullscreen(struct window *window, int fullscreen) - zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel); - } - -+void -+window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output) -+{ -+ if (!window->xdg_toplevel) -+ return; -+ -+ if (window->fullscreen == fullscreen) -+ return; -+ -+ if (fullscreen) -+ zxdg_toplevel_v6_set_fullscreen(window->xdg_toplevel, output ? output_get_wl_output(output) : NULL); -+ else -+ zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel); -+} -+ - int - window_is_maximized(struct window *window) - { -@@ -6328,6 +6343,29 @@ display_get_output(struct display *display) - return container_of(display->output_list.next, struct output, link); - } - -+unsigned int -+display_get_outputs_number(struct display *display) -+{ -+ return wl_list_length(&display->output_list); -+} -+ -+struct output * -+display_get_output_by_index(struct display *display, unsigned int index) -+{ -+ int i; -+ int n = wl_list_length(&display->output_list); -+ struct wl_list *item; -+ -+ if (index >= n) -+ return NULL; -+ -+ item = display->output_list.next; -+ for (i = 0; i < index; i++) -+ item = item->next; -+ -+ return container_of(item, struct output, link); -+} -+ - struct wl_compositor * - display_get_compositor(struct display *display) - { --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch deleted file mode 100644 index b171271a..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 5dfdbc46524919521c9b3cc485100a54c0908016 Mon Sep 17 00:00:00 2001 -From: Valentine Barshak -Date: Wed, 6 Mar 2019 00:19:06 +0300 -Subject: [PATCH 4/7] Add display_poll function - ---- - clients/toytoolkit.h | 3 +++ - clients/window.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 55 insertions(+) - -diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h -index 2bcecc1..a77eda3 100644 ---- a/clients/toytoolkit.h -+++ b/clients/toytoolkit.h -@@ -163,6 +163,9 @@ display_unwatch_fd(struct display *display, int fd); - void - display_run(struct display *d); - -+int -+display_poll(struct display *display, int timeout); -+ - void - display_exit(struct display *d); - -diff --git a/clients/window.c b/clients/window.c -index 43f20e2..9cd0e8e 100644 ---- a/clients/window.c -+++ b/clients/window.c -@@ -6490,6 +6490,58 @@ display_run(struct display *display) - } - } - -+int -+display_poll(struct display *display, int timeout) -+{ -+ struct task *task; -+ struct epoll_event ep[16]; -+ int i, count, ret; -+ -+ display->running = 1; -+ while (!wl_list_empty(&display->deferred_list)) { -+ task = container_of(display->deferred_list.prev, -+ struct task, link); -+ wl_list_remove(&task->link); -+ task->run(task, 0); -+ } -+ -+ /* ...prepare for a reading */ -+ while (wl_display_prepare_read(display->display) != 0) -+ { -+ /* ...dispatch all pending events and repeat attempt */ -+ wl_display_dispatch_pending(display->display); -+ } -+ -+ /* ...flush all outstanding commands to a display */ -+ if (wl_display_flush(display->display) < 0) { -+ return -1; -+ } -+ -+ if (!display->running) -+ return -1; -+ -+ count = epoll_wait(display->epoll_fd, ep, ARRAY_LENGTH(ep), timeout); -+ if (!count) { -+ wl_display_cancel_read(display->display); -+ return 0; -+ } -+ -+ if (count > 0) { -+ /* ...read display events (if any) before we do any drawing */ -+ if (wl_display_read_events(display->display) < 0) { -+ return -1; -+ } -+ -+ /* ...process pending display events (if any) */ -+ if (wl_display_dispatch_pending(display->display) < 0) { -+ return -1; -+ } -+ } else if (count < 0) { -+ wl_display_cancel_read(display->display); -+ return count; -+ } -+} -+ - void - display_exit(struct display *display) - { --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch deleted file mode 100644 index 563f2a2a..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 5009db4e22545def833be7e2946419d209026bd6 Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Tue, 13 Jun 2017 23:58:37 +0300 -Subject: [PATCH 5/7] Add wl ivi shell surface creating support - ---- - ivi-shell/ivi-layout-export.h | 19 +++++++++++++++++++ - ivi-shell/ivi-layout.c | 2 ++ - 2 files changed, 21 insertions(+) - -diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h -index 016d8b5..29d84dc 100644 ---- a/ivi-shell/ivi-layout-export.h -+++ b/ivi-shell/ivi-layout-export.h -@@ -154,6 +154,25 @@ struct ivi_layout_interface { - */ - int32_t (*commit_changes)(void); - -+ /** -+ * \brief Creates an ivi_layout_surface. -+ * -+ * \return IVI_SUCCEEDED if the method call was successful -+ * \return IVI_FAILED if the method call was failed -+ */ -+ struct ivi_layout_surface* (*surface_create)( -+ struct weston_surface *wl_surface, -+ uint32_t id_surface); -+ -+ /** -+ * \brief Configure an ivi_layout_surface -+ * -+ * \return IVI_SUCCEEDED if the method call was successful -+ * \return IVI_FAILED if the method call was failed -+ */ -+ void (*surface_configure)(struct ivi_layout_surface *ivisurf, -+ int32_t width, int32_t height); -+ - /** - * surface controller interface - */ -diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c -index d9a0c2d..968819f 100644 ---- a/ivi-shell/ivi-layout.c -+++ b/ivi-shell/ivi-layout.c -@@ -1950,6 +1950,8 @@ static struct ivi_layout_interface ivi_layout_interface = { - * commit all changes - */ - .commit_changes = ivi_layout_commit_changes, -+ .surface_create = ivi_layout_surface_create, -+ .surface_configure = ivi_layout_surface_configure, - - /** - * surface controller interfaces --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch deleted file mode 100644 index 21f68ce5..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a74be0a8f1b71ae24e43e337d44f215d33fe012c Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Tue, 13 Dec 2016 00:43:11 +0300 -Subject: [PATCH 6/7] Add widget_set_surface_allocation func - ---- - clients/toytoolkit.h | 3 +++ - clients/window.c | 12 ++++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h -index a77eda3..0f6145d 100644 ---- a/clients/toytoolkit.h -+++ b/clients/toytoolkit.h -@@ -543,6 +543,9 @@ void - widget_set_allocation(struct widget *widget, - int32_t x, int32_t y, int32_t width, int32_t height); - void -+widget_set_surface_allocation(struct widget *widget, -+ int32_t x, int32_t y, int32_t width, int32_t height); -+void - widget_set_size(struct widget *widget, int32_t width, int32_t height); - void - widget_set_transparent(struct widget *widget, int transparent); -diff --git a/clients/window.c b/clients/window.c -index 9cd0e8e..d0e2ece 100644 ---- a/clients/window.c -+++ b/clients/window.c -@@ -1744,6 +1744,18 @@ widget_set_allocation(struct widget *widget, - } - - void -+widget_set_surface_allocation(struct widget *widget, -+ int32_t x, int32_t y, int32_t width, int32_t height) -+{ -+ if (widget->surface) { -+ widget->surface->allocation.x = x; -+ widget->surface->allocation.y = y; -+ widget->surface->allocation.width = width; -+ widget->surface->allocation.height = height; -+ } -+} -+ -+void - widget_set_transparent(struct widget *widget, int transparent) - { - widget->opaque = !transparent; --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch deleted file mode 100644 index 86daf5c4..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 48c11b3d668383cb964fa41a73e6b666f30fea57 Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Tue, 13 Dec 2016 18:20:11 +0300 -Subject: [PATCH 7/7] Add call for setting fullscreen with IVI - ---- - clients/toytoolkit.h | 3 +++ - clients/window.c | 6 ++++++ - 2 files changed, 9 insertions(+) - -diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h -index 0f6145d..7058c41 100644 ---- a/clients/toytoolkit.h -+++ b/clients/toytoolkit.h -@@ -444,6 +444,9 @@ window_set_fullscreen(struct window *window, int fullscreen); - void - window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output); - -+void -+window_set_fullscreen_hack(struct window *window, int fullscreen); -+ - int - window_is_maximized(struct window *window); - -diff --git a/clients/window.c b/clients/window.c -index d0e2ece..81fb674 100644 ---- a/clients/window.c -+++ b/clients/window.c -@@ -4624,6 +4624,12 @@ window_set_fullscreen_at_output(struct window *window, int fullscreen, struct ou - zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel); - } - -+void -+window_set_fullscreen_hack(struct window *window, int fullscreen) -+{ -+ window->fullscreen = fullscreen; -+} -+ - int - window_is_maximized(struct window *window) - { --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0001-Allow-to-boot-without-input-device.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0001-Allow-to-boot-without-input-device.patch new file mode 100644 index 00000000..5636c23d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0001-Allow-to-boot-without-input-device.patch @@ -0,0 +1,24 @@ +From d04c556bc8eac439cc87c7cdf9b4446d4a9cecaa Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Fri, 17 Feb 2017 03:06:27 +0300 +Subject: [PATCH] Allow to boot without input device + +--- + libweston/libinput-seat.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/libweston/libinput-seat.c b/libweston/libinput-seat.c +index 9801551..190acfd 100644 +--- a/libweston/libinput-seat.c ++++ b/libweston/libinput-seat.c +@@ -305,7 +305,6 @@ udev_input_enable(struct udev_input *input) + "\t- seats misconfigured " + "(Weston backend option 'seat', " + "udev device property ID_SEAT)\n"); +- return -1; + } + + return 0; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0002-Share-toytoolkit-lib.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0002-Share-toytoolkit-lib.patch new file mode 100644 index 00000000..e799649a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0002-Share-toytoolkit-lib.patch @@ -0,0 +1,1512 @@ +From 32bb2f9f31945fda4d3a530c7e48632f3249d3a6 Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Jun 2017 23:51:22 +0300 +Subject: [PATCH 1/4] Share toytoolkit lib + +--- + clients/meson.build | 11 + + clients/toytoolkit.h | 738 +++++++++++++++++++++++++++++++++++++++++++++++++++ + clients/window.h | 711 +------------------------------------------------ + 3 files changed, 750 insertions(+), 710 deletions(-) + create mode 100644 clients/toytoolkit.h + +diff --git a/clients/meson.build b/clients/meson.build +index bdc5d44..c48e522 100644 +--- a/clients/meson.build ++++ b/clients/meson.build +@@ -24,6 +24,7 @@ deps_toytoolkit = [ + dependency('wayland-cursor'), + cc.find_library('util'), + ] ++ + lib_toytoolkit = static_library( + 'toytoolkit', + srcs_toytoolkit, +@@ -31,6 +32,16 @@ lib_toytoolkit = static_library( + dependencies: deps_toytoolkit, + install: false, + ) ++ ++lib_toytoolkit_shared = shared_library( ++ 'weston-toytoolkit-@0@'.format(libweston_major), ++ srcs_toytoolkit, ++ include_directories: include_directories('..', '../shared'), ++ dependencies: deps_toytoolkit, ++ version: '0.0.@0@'.format(libweston_revision), ++ install: true, ++) ++ + dep_toytoolkit = declare_dependency( + link_with: lib_toytoolkit, + dependencies: deps_toytoolkit, +diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h +new file mode 100644 +index 0000000..cd5455e +--- /dev/null ++++ b/clients/toytoolkit.h +@@ -0,0 +1,738 @@ ++/* ++ * Copyright © 2008 Kristian Høgsberg ++ * ++ * 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 (including the next ++ * paragraph) 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. ++ */ ++ ++#ifndef _TOYTOOLKIT_H_ ++#define _TOYTOOLKIT_H_ ++ ++#include ++#include ++#include ++#include ++ ++struct window; ++struct widget; ++struct display; ++struct input; ++struct output; ++ ++struct task { ++ void (*run)(struct task *task, uint32_t events); ++ struct wl_list link; ++}; ++ ++struct rectangle { ++ int32_t x; ++ int32_t y; ++ int32_t width; ++ int32_t height; ++}; ++ ++struct display * ++display_create(int *argc, char *argv[]); ++ ++void ++display_destroy(struct display *display); ++ ++void ++display_set_user_data(struct display *display, void *data); ++ ++void * ++display_get_user_data(struct display *display); ++ ++struct wl_display * ++display_get_display(struct display *display); ++ ++int ++display_has_subcompositor(struct display *display); ++ ++cairo_device_t * ++display_get_cairo_device(struct display *display); ++ ++struct wl_compositor * ++display_get_compositor(struct display *display); ++ ++struct output * ++display_get_output(struct display *display); ++ ++uint32_t ++display_get_serial(struct display *display); ++ ++typedef void (*display_global_handler_t)(struct display *display, ++ uint32_t name, ++ const char *interface, ++ uint32_t version, void *data); ++ ++void ++display_set_global_handler(struct display *display, ++ display_global_handler_t handler); ++void ++display_set_global_handler_remove(struct display *display, ++ display_global_handler_t remove_handler); ++void * ++display_bind(struct display *display, uint32_t name, ++ const struct wl_interface *interface, uint32_t version); ++ ++typedef void (*display_output_handler_t)(struct output *output, void *data); ++ ++/* ++ * The output configure handler is called, when a new output is connected ++ * and we know its current mode, or when the current mode changes. ++ * Test and set the output user data in your handler to know, if the ++ * output is new. Note: 'data' in the configure handler is the display ++ * user data. ++ */ ++void ++display_set_output_configure_handler(struct display *display, ++ display_output_handler_t handler); ++ ++struct wl_data_source * ++display_create_data_source(struct display *display); ++ ++#ifdef EGL_NO_DISPLAY ++EGLDisplay ++display_get_egl_display(struct display *d); ++ ++EGLConfig ++display_get_argb_egl_config(struct display *d); ++ ++int ++display_acquire_window_surface(struct display *display, ++ struct window *window, ++ EGLContext ctx); ++void ++display_release_window_surface(struct display *display, ++ struct window *window); ++#endif ++ ++#define SURFACE_OPAQUE 0x01 ++#define SURFACE_SHM 0x02 ++ ++#define SURFACE_HINT_RESIZE 0x10 ++ ++cairo_surface_t * ++display_create_surface(struct display *display, ++ struct wl_surface *surface, ++ struct rectangle *rectangle, ++ uint32_t flags); ++ ++struct wl_buffer * ++display_get_buffer_for_surface(struct display *display, ++ cairo_surface_t *surface); ++ ++struct wl_cursor_image * ++display_get_pointer_image(struct display *display, int pointer); ++ ++void ++display_defer(struct display *display, struct task *task); ++ ++void ++display_watch_fd(struct display *display, ++ int fd, uint32_t events, struct task *task); ++ ++void ++display_unwatch_fd(struct display *display, int fd); ++ ++void ++display_run(struct display *d); ++ ++void ++display_exit(struct display *d); ++ ++int ++display_get_data_device_manager_version(struct display *d); ++ ++enum cursor_type { ++ CURSOR_BOTTOM_LEFT, ++ CURSOR_BOTTOM_RIGHT, ++ CURSOR_BOTTOM, ++ CURSOR_DRAGGING, ++ CURSOR_LEFT_PTR, ++ CURSOR_LEFT, ++ CURSOR_RIGHT, ++ CURSOR_TOP_LEFT, ++ CURSOR_TOP_RIGHT, ++ CURSOR_TOP, ++ CURSOR_IBEAM, ++ CURSOR_HAND1, ++ CURSOR_WATCH, ++ CURSOR_DND_MOVE, ++ CURSOR_DND_COPY, ++ CURSOR_DND_FORBIDDEN, ++ ++ CURSOR_BLANK ++}; ++ ++typedef void (*window_key_handler_t)(struct window *window, struct input *input, ++ uint32_t time, uint32_t key, uint32_t unicode, ++ enum wl_keyboard_key_state state, void *data); ++ ++typedef void (*window_keyboard_focus_handler_t)(struct window *window, ++ struct input *device, void *data); ++ ++typedef void (*window_data_handler_t)(struct window *window, ++ struct input *input, ++ float x, float y, ++ const char **types, ++ void *data); ++ ++typedef void (*window_drop_handler_t)(struct window *window, ++ struct input *input, ++ int32_t x, int32_t y, void *data); ++ ++typedef void (*window_close_handler_t)(void *data); ++typedef void (*window_fullscreen_handler_t)(struct window *window, void *data); ++ ++typedef void (*window_output_handler_t)(struct window *window, struct output *output, ++ int enter, void *data); ++typedef void (*window_state_changed_handler_t)(struct window *window, ++ void *data); ++ ++ ++typedef void (*window_locked_pointer_motion_handler_t)(struct window *window, ++ struct input *input, ++ uint32_t time, ++ float x, float y, ++ void *data); ++ ++typedef void (*locked_pointer_locked_handler_t)(struct window *window, ++ struct input *input, ++ void *data); ++ ++typedef void (*locked_pointer_unlocked_handler_t)(struct window *window, ++ struct input *input, ++ void *data); ++ ++typedef void (*confined_pointer_confined_handler_t)(struct window *window, ++ struct input *input, ++ void *data); ++ ++typedef void (*confined_pointer_unconfined_handler_t)(struct window *window, ++ struct input *input, ++ void *data); ++ ++typedef void (*widget_resize_handler_t)(struct widget *widget, ++ int32_t width, int32_t height, ++ void *data); ++typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data); ++ ++typedef int (*widget_enter_handler_t)(struct widget *widget, ++ struct input *input, ++ float x, float y, void *data); ++typedef void (*widget_leave_handler_t)(struct widget *widget, ++ struct input *input, void *data); ++typedef int (*widget_motion_handler_t)(struct widget *widget, ++ struct input *input, uint32_t time, ++ float x, float y, void *data); ++typedef void (*widget_button_handler_t)(struct widget *widget, ++ struct input *input, uint32_t time, ++ uint32_t button, ++ enum wl_pointer_button_state state, ++ void *data); ++typedef void (*widget_touch_down_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t serial, ++ uint32_t time, ++ int32_t id, ++ float x, ++ float y, ++ void *data); ++typedef void (*widget_touch_up_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t serial, ++ uint32_t time, ++ int32_t id, ++ void *data); ++typedef void (*widget_touch_motion_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t time, ++ int32_t id, ++ float x, ++ float y, ++ void *data); ++typedef void (*widget_touch_frame_handler_t)(struct widget *widget, ++ struct input *input, void *data); ++typedef void (*widget_touch_cancel_handler_t)(struct widget *widget, ++ struct input *input, void *data); ++typedef void (*widget_axis_handler_t)(struct widget *widget, ++ struct input *input, uint32_t time, ++ uint32_t axis, ++ wl_fixed_t value, ++ void *data); ++ ++typedef void (*widget_pointer_frame_handler_t)(struct widget *widget, ++ struct input *input, ++ void *data); ++ ++typedef void (*widget_axis_source_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t source, ++ void *data); ++ ++typedef void (*widget_axis_stop_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t time, ++ uint32_t axis, ++ void *data); ++ ++typedef void (*widget_axis_discrete_handler_t)(struct widget *widget, ++ struct input *input, ++ uint32_t axis, ++ int32_t discrete, ++ void *data); ++ ++struct window * ++window_create(struct display *display); ++struct window * ++window_create_custom(struct display *display); ++ ++void ++window_set_parent(struct window *window, struct window *parent_window); ++struct window * ++window_get_parent(struct window *window); ++ ++int ++window_has_focus(struct window *window); ++ ++typedef void (*menu_func_t)(void *data, struct input *input, int index); ++ ++void ++window_show_menu(struct display *display, ++ struct input *input, uint32_t time, struct window *parent, ++ int32_t x, int32_t y, ++ menu_func_t func, const char **entries, int count); ++ ++void ++window_show_frame_menu(struct window *window, ++ struct input *input, uint32_t time); ++ ++int ++window_get_buffer_transform(struct window *window); ++ ++void ++window_set_buffer_transform(struct window *window, ++ enum wl_output_transform transform); ++ ++uint32_t ++window_get_buffer_scale(struct window *window); ++ ++void ++window_set_buffer_scale(struct window *window, ++ int32_t scale); ++ ++uint32_t ++window_get_output_scale(struct window *window); ++ ++void ++window_destroy(struct window *window); ++ ++struct widget * ++window_add_widget(struct window *window, void *data); ++ ++enum subsurface_mode { ++ SUBSURFACE_SYNCHRONIZED, ++ SUBSURFACE_DESYNCHRONIZED ++}; ++ ++struct widget * ++window_add_subsurface(struct window *window, void *data, ++ enum subsurface_mode default_mode); ++ ++typedef void (*data_func_t)(void *data, size_t len, ++ int32_t x, int32_t y, void *user_data); ++ ++struct display * ++window_get_display(struct window *window); ++void ++window_move(struct window *window, struct input *input, uint32_t time); ++void ++window_get_allocation(struct window *window, struct rectangle *allocation); ++void ++window_schedule_redraw(struct window *window); ++void ++window_schedule_resize(struct window *window, int width, int height); ++ ++int ++window_lock_pointer(struct window *window, struct input *input); ++ ++void ++window_unlock_pointer(struct window *window); ++ ++void ++widget_set_locked_pointer_cursor_hint(struct widget *widget, ++ float x, float y); ++ ++int ++window_confine_pointer_to_rectangles(struct window *window, ++ struct input *input, ++ struct rectangle *rectangles, ++ int num_rectangles); ++ ++void ++window_update_confine_rectangles(struct window *window, ++ struct rectangle *rectangles, ++ int num_rectangles); ++ ++int ++window_confine_pointer_to_widget(struct window *window, ++ struct widget *widget, ++ struct input *input); ++ ++void ++window_unconfine_pointer(struct window *window); ++ ++cairo_surface_t * ++window_get_surface(struct window *window); ++ ++struct wl_surface * ++window_get_wl_surface(struct window *window); ++ ++struct wl_subsurface * ++widget_get_wl_subsurface(struct widget *widget); ++ ++enum window_buffer_type { ++ WINDOW_BUFFER_TYPE_EGL_WINDOW, ++ WINDOW_BUFFER_TYPE_SHM, ++}; ++ ++void ++display_surface_damage(struct display *display, cairo_surface_t *cairo_surface, ++ int32_t x, int32_t y, int32_t width, int32_t height); ++ ++void ++window_set_buffer_type(struct window *window, enum window_buffer_type type); ++ ++enum window_buffer_type ++window_get_buffer_type(struct window *window); ++ ++int ++window_is_fullscreen(struct window *window); ++ ++void ++window_set_fullscreen(struct window *window, int fullscreen); ++ ++int ++window_is_maximized(struct window *window); ++ ++void ++window_set_maximized(struct window *window, int maximized); ++ ++int ++window_is_resizing(struct window *window); ++ ++void ++window_set_minimized(struct window *window); ++ ++void ++window_set_user_data(struct window *window, void *data); ++ ++void * ++window_get_user_data(struct window *window); ++ ++void ++window_set_key_handler(struct window *window, ++ window_key_handler_t handler); ++ ++void ++window_set_keyboard_focus_handler(struct window *window, ++ window_keyboard_focus_handler_t handler); ++ ++void ++window_set_data_handler(struct window *window, ++ window_data_handler_t handler); ++ ++void ++window_set_drop_handler(struct window *window, ++ window_drop_handler_t handler); ++ ++void ++window_set_close_handler(struct window *window, ++ window_close_handler_t handler); ++void ++window_set_fullscreen_handler(struct window *window, ++ window_fullscreen_handler_t handler); ++void ++window_set_output_handler(struct window *window, ++ window_output_handler_t handler); ++void ++window_set_state_changed_handler(struct window *window, ++ window_state_changed_handler_t handler); ++ ++void ++window_set_pointer_locked_handler(struct window *window, ++ locked_pointer_locked_handler_t locked, ++ locked_pointer_unlocked_handler_t unlocked); ++ ++void ++window_set_pointer_confined_handler(struct window *window, ++ confined_pointer_confined_handler_t confined, ++ confined_pointer_unconfined_handler_t unconfined); ++ ++void ++window_set_locked_pointer_motion_handler( ++ struct window *window, window_locked_pointer_motion_handler_t handler); ++ ++void ++window_set_title(struct window *window, const char *title); ++ ++const char * ++window_get_title(struct window *window); ++ ++void ++window_set_text_cursor_position(struct window *window, int32_t x, int32_t y); ++ ++int ++widget_set_tooltip(struct widget *parent, char *entry, float x, float y); ++ ++void ++widget_destroy_tooltip(struct widget *parent); ++ ++struct widget * ++widget_add_widget(struct widget *parent, void *data); ++ ++void ++widget_destroy(struct widget *widget); ++void ++widget_set_default_cursor(struct widget *widget, int cursor); ++void ++widget_get_allocation(struct widget *widget, struct rectangle *allocation); ++ ++void ++widget_set_allocation(struct widget *widget, ++ int32_t x, int32_t y, int32_t width, int32_t height); ++void ++widget_set_size(struct widget *widget, int32_t width, int32_t height); ++void ++widget_set_transparent(struct widget *widget, int transparent); ++void ++widget_schedule_resize(struct widget *widget, int32_t width, int32_t height); ++ ++void * ++widget_get_user_data(struct widget *widget); ++ ++cairo_t * ++widget_cairo_create(struct widget *widget); ++ ++struct wl_surface * ++widget_get_wl_surface(struct widget *widget); ++ ++uint32_t ++widget_get_last_time(struct widget *widget); ++ ++void ++widget_input_region_add(struct widget *widget, const struct rectangle *rect); ++ ++void ++widget_set_redraw_handler(struct widget *widget, ++ widget_redraw_handler_t handler); ++void ++widget_set_resize_handler(struct widget *widget, ++ widget_resize_handler_t handler); ++void ++widget_set_enter_handler(struct widget *widget, ++ widget_enter_handler_t handler); ++void ++widget_set_leave_handler(struct widget *widget, ++ widget_leave_handler_t handler); ++void ++widget_set_motion_handler(struct widget *widget, ++ widget_motion_handler_t handler); ++void ++widget_set_button_handler(struct widget *widget, ++ widget_button_handler_t handler); ++void ++widget_set_touch_down_handler(struct widget *widget, ++ widget_touch_down_handler_t handler); ++void ++widget_set_touch_up_handler(struct widget *widget, ++ widget_touch_up_handler_t handler); ++void ++widget_set_touch_motion_handler(struct widget *widget, ++ widget_touch_motion_handler_t handler); ++void ++widget_set_touch_frame_handler(struct widget *widget, ++ widget_touch_frame_handler_t handler); ++void ++widget_set_touch_cancel_handler(struct widget *widget, ++ widget_touch_cancel_handler_t handler); ++void ++widget_set_axis_handler(struct widget *widget, ++ widget_axis_handler_t handler); ++void ++widget_set_pointer_frame_handler(struct widget *widget, ++ widget_pointer_frame_handler_t handler); ++void ++widget_set_axis_handlers(struct widget *widget, ++ widget_axis_handler_t axis_handler, ++ widget_axis_source_handler_t axis_source_handler, ++ widget_axis_stop_handler_t axis_stop_handler, ++ widget_axis_discrete_handler_t axis_discrete_handler); ++ ++void ++window_inhibit_redraw(struct window *window); ++void ++window_uninhibit_redraw(struct window *window); ++void ++widget_schedule_redraw(struct widget *widget); ++void ++widget_set_use_cairo(struct widget *widget, int use_cairo); ++ ++/* ++ * Sets the viewport destination for the widget's surface ++ * return 0 on success and -1 on failure. Set width and height to ++ * -1 to reset the viewport. ++ */ ++int ++widget_set_viewport_destination(struct widget *widget, int width, int height); ++ ++struct widget * ++window_frame_create(struct window *window, void *data); ++ ++void ++window_frame_set_child_size(struct widget *widget, int child_width, ++ int child_height); ++ ++void ++input_set_pointer_image(struct input *input, int pointer); ++ ++void ++input_get_position(struct input *input, int32_t *x, int32_t *y); ++ ++int ++input_get_touch(struct input *input, int32_t id, float *x, float *y); ++ ++#define MOD_SHIFT_MASK 0x01 ++#define MOD_ALT_MASK 0x02 ++#define MOD_CONTROL_MASK 0x04 ++ ++uint32_t ++input_get_modifiers(struct input *input); ++ ++void ++touch_grab(struct input *input, int32_t touch_id); ++ ++void ++touch_ungrab(struct input *input); ++ ++void ++input_grab(struct input *input, struct widget *widget, uint32_t button); ++ ++void ++input_ungrab(struct input *input); ++ ++struct widget * ++input_get_focus_widget(struct input *input); ++ ++struct display * ++input_get_display(struct input *input); ++ ++struct wl_seat * ++input_get_seat(struct input *input); ++ ++struct wl_data_device * ++input_get_data_device(struct input *input); ++ ++void ++input_set_selection(struct input *input, ++ struct wl_data_source *source, uint32_t time); ++ ++void ++input_accept(struct input *input, const char *type); ++ ++ ++void ++input_receive_drag_data(struct input *input, const char *mime_type, ++ data_func_t func, void *user_data); ++int ++input_receive_drag_data_to_fd(struct input *input, ++ const char *mime_type, int fd); ++ ++int ++input_receive_selection_data(struct input *input, const char *mime_type, ++ data_func_t func, void *data); ++int ++input_receive_selection_data_to_fd(struct input *input, ++ const char *mime_type, int fd); ++ ++void ++output_set_user_data(struct output *output, void *data); ++ ++void * ++output_get_user_data(struct output *output); ++ ++void ++output_set_destroy_handler(struct output *output, ++ display_output_handler_t handler); ++ ++void ++output_get_allocation(struct output *output, struct rectangle *allocation); ++ ++struct wl_output * ++output_get_wl_output(struct output *output); ++ ++enum wl_output_transform ++output_get_transform(struct output *output); ++ ++uint32_t ++output_get_scale(struct output *output); ++ ++const char * ++output_get_make(struct output *output); ++ ++const char * ++output_get_model(struct output *output); ++ ++void ++keysym_modifiers_add(struct wl_array *modifiers_map, ++ const char *name); ++ ++xkb_mod_mask_t ++keysym_modifiers_get_mask(struct wl_array *modifiers_map, ++ const char *name); ++ ++struct toytimer; ++typedef void (*toytimer_cb)(struct toytimer *); ++ ++struct toytimer { ++ struct display *display; ++ struct task tsk; ++ int fd; ++ toytimer_cb callback; ++}; ++ ++void ++toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display, ++ toytimer_cb callback); ++ ++void ++toytimer_fini(struct toytimer *tt); ++ ++void ++toytimer_arm(struct toytimer *tt, const struct itimerspec *its); ++ ++void ++toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec); ++ ++void ++toytimer_disarm(struct toytimer *tt); ++ ++#endif +diff --git a/clients/window.h b/clients/window.h +index c66dd06..f07d711 100644 +--- a/clients/window.h ++++ b/clients/window.h +@@ -27,718 +27,9 @@ + #include "config.h" + + #include +-#include +-#include +-#include +-#include ++#include "toytoolkit.h" + #include + #include + #include "shared/platform.h" + +-struct window; +-struct widget; +-struct display; +-struct input; +-struct output; +- +-struct task { +- void (*run)(struct task *task, uint32_t events); +- struct wl_list link; +-}; +- +-struct rectangle { +- int32_t x; +- int32_t y; +- int32_t width; +- int32_t height; +-}; +- +-struct display * +-display_create(int *argc, char *argv[]); +- +-void +-display_destroy(struct display *display); +- +-void +-display_set_user_data(struct display *display, void *data); +- +-void * +-display_get_user_data(struct display *display); +- +-struct wl_display * +-display_get_display(struct display *display); +- +-int +-display_has_subcompositor(struct display *display); +- +-cairo_device_t * +-display_get_cairo_device(struct display *display); +- +-struct wl_compositor * +-display_get_compositor(struct display *display); +- +-struct output * +-display_get_output(struct display *display); +- +-uint32_t +-display_get_serial(struct display *display); +- +-typedef void (*display_global_handler_t)(struct display *display, +- uint32_t name, +- const char *interface, +- uint32_t version, void *data); +- +-void +-display_set_global_handler(struct display *display, +- display_global_handler_t handler); +-void +-display_set_global_handler_remove(struct display *display, +- display_global_handler_t remove_handler); +-void * +-display_bind(struct display *display, uint32_t name, +- const struct wl_interface *interface, uint32_t version); +- +-typedef void (*display_output_handler_t)(struct output *output, void *data); +- +-/* +- * The output configure handler is called, when a new output is connected +- * and we know its current mode, or when the current mode changes. +- * Test and set the output user data in your handler to know, if the +- * output is new. Note: 'data' in the configure handler is the display +- * user data. +- */ +-void +-display_set_output_configure_handler(struct display *display, +- display_output_handler_t handler); +- +-struct wl_data_source * +-display_create_data_source(struct display *display); +- +-#ifdef EGL_NO_DISPLAY +-EGLDisplay +-display_get_egl_display(struct display *d); +- +-EGLConfig +-display_get_argb_egl_config(struct display *d); +- +-int +-display_acquire_window_surface(struct display *display, +- struct window *window, +- EGLContext ctx); +-void +-display_release_window_surface(struct display *display, +- struct window *window); +-#endif +- +-#define SURFACE_OPAQUE 0x01 +-#define SURFACE_SHM 0x02 +- +-#define SURFACE_HINT_RESIZE 0x10 +- +-cairo_surface_t * +-display_create_surface(struct display *display, +- struct wl_surface *surface, +- struct rectangle *rectangle, +- uint32_t flags); +- +-struct wl_buffer * +-display_get_buffer_for_surface(struct display *display, +- cairo_surface_t *surface); +- +-struct wl_cursor_image * +-display_get_pointer_image(struct display *display, int pointer); +- +-void +-display_defer(struct display *display, struct task *task); +- +-void +-display_watch_fd(struct display *display, +- int fd, uint32_t events, struct task *task); +- +-void +-display_unwatch_fd(struct display *display, int fd); +- +-void +-display_run(struct display *d); +- +-void +-display_exit(struct display *d); +- +-int +-display_get_data_device_manager_version(struct display *d); +- +-enum cursor_type { +- CURSOR_BOTTOM_LEFT, +- CURSOR_BOTTOM_RIGHT, +- CURSOR_BOTTOM, +- CURSOR_DRAGGING, +- CURSOR_LEFT_PTR, +- CURSOR_LEFT, +- CURSOR_RIGHT, +- CURSOR_TOP_LEFT, +- CURSOR_TOP_RIGHT, +- CURSOR_TOP, +- CURSOR_IBEAM, +- CURSOR_HAND1, +- CURSOR_WATCH, +- CURSOR_DND_MOVE, +- CURSOR_DND_COPY, +- CURSOR_DND_FORBIDDEN, +- +- CURSOR_BLANK +-}; +- +-typedef void (*window_key_handler_t)(struct window *window, struct input *input, +- uint32_t time, uint32_t key, uint32_t unicode, +- enum wl_keyboard_key_state state, void *data); +- +-typedef void (*window_keyboard_focus_handler_t)(struct window *window, +- struct input *device, void *data); +- +-typedef void (*window_data_handler_t)(struct window *window, +- struct input *input, +- float x, float y, +- const char **types, +- void *data); +- +-typedef void (*window_drop_handler_t)(struct window *window, +- struct input *input, +- int32_t x, int32_t y, void *data); +- +-typedef void (*window_close_handler_t)(void *data); +-typedef void (*window_fullscreen_handler_t)(struct window *window, void *data); +- +-typedef void (*window_output_handler_t)(struct window *window, struct output *output, +- int enter, void *data); +-typedef void (*window_state_changed_handler_t)(struct window *window, +- void *data); +- +- +-typedef void (*window_locked_pointer_motion_handler_t)(struct window *window, +- struct input *input, +- uint32_t time, +- float x, float y, +- void *data); +- +-typedef void (*locked_pointer_locked_handler_t)(struct window *window, +- struct input *input, +- void *data); +- +-typedef void (*locked_pointer_unlocked_handler_t)(struct window *window, +- struct input *input, +- void *data); +- +-typedef void (*confined_pointer_confined_handler_t)(struct window *window, +- struct input *input, +- void *data); +- +-typedef void (*confined_pointer_unconfined_handler_t)(struct window *window, +- struct input *input, +- void *data); +- +-typedef void (*widget_resize_handler_t)(struct widget *widget, +- int32_t width, int32_t height, +- void *data); +-typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data); +- +-typedef int (*widget_enter_handler_t)(struct widget *widget, +- struct input *input, +- float x, float y, void *data); +-typedef void (*widget_leave_handler_t)(struct widget *widget, +- struct input *input, void *data); +-typedef int (*widget_motion_handler_t)(struct widget *widget, +- struct input *input, uint32_t time, +- float x, float y, void *data); +-typedef void (*widget_button_handler_t)(struct widget *widget, +- struct input *input, uint32_t time, +- uint32_t button, +- enum wl_pointer_button_state state, +- void *data); +-typedef void (*widget_touch_down_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t serial, +- uint32_t time, +- int32_t id, +- float x, +- float y, +- void *data); +-typedef void (*widget_touch_up_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t serial, +- uint32_t time, +- int32_t id, +- void *data); +-typedef void (*widget_touch_motion_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t time, +- int32_t id, +- float x, +- float y, +- void *data); +-typedef void (*widget_touch_frame_handler_t)(struct widget *widget, +- struct input *input, void *data); +-typedef void (*widget_touch_cancel_handler_t)(struct widget *widget, +- struct input *input, void *data); +-typedef void (*widget_axis_handler_t)(struct widget *widget, +- struct input *input, uint32_t time, +- uint32_t axis, +- wl_fixed_t value, +- void *data); +- +-typedef void (*widget_pointer_frame_handler_t)(struct widget *widget, +- struct input *input, +- void *data); +- +-typedef void (*widget_axis_source_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t source, +- void *data); +- +-typedef void (*widget_axis_stop_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t time, +- uint32_t axis, +- void *data); +- +-typedef void (*widget_axis_discrete_handler_t)(struct widget *widget, +- struct input *input, +- uint32_t axis, +- int32_t discrete, +- void *data); +- +-struct window * +-window_create(struct display *display); +-struct window * +-window_create_custom(struct display *display); +- +-void +-window_set_parent(struct window *window, struct window *parent_window); +-struct window * +-window_get_parent(struct window *window); +- +-int +-window_has_focus(struct window *window); +- +-typedef void (*menu_func_t)(void *data, struct input *input, int index); +- +-void +-window_show_menu(struct display *display, +- struct input *input, uint32_t time, struct window *parent, +- int32_t x, int32_t y, +- menu_func_t func, const char **entries, int count); +- +-void +-window_show_frame_menu(struct window *window, +- struct input *input, uint32_t time); +- +-int +-window_get_buffer_transform(struct window *window); +- +-void +-window_set_buffer_transform(struct window *window, +- enum wl_output_transform transform); +- +-uint32_t +-window_get_buffer_scale(struct window *window); +- +-void +-window_set_buffer_scale(struct window *window, +- int32_t scale); +- +-uint32_t +-window_get_output_scale(struct window *window); +- +-void +-window_destroy(struct window *window); +- +-struct widget * +-window_add_widget(struct window *window, void *data); +- +-enum subsurface_mode { +- SUBSURFACE_SYNCHRONIZED, +- SUBSURFACE_DESYNCHRONIZED +-}; +- +-struct widget * +-window_add_subsurface(struct window *window, void *data, +- enum subsurface_mode default_mode); +- +-typedef void (*data_func_t)(void *data, size_t len, +- int32_t x, int32_t y, void *user_data); +- +-struct display * +-window_get_display(struct window *window); +-void +-window_move(struct window *window, struct input *input, uint32_t time); +-void +-window_get_allocation(struct window *window, struct rectangle *allocation); +-void +-window_schedule_redraw(struct window *window); +-void +-window_schedule_resize(struct window *window, int width, int height); +- +-int +-window_lock_pointer(struct window *window, struct input *input); +- +-void +-window_unlock_pointer(struct window *window); +- +-void +-widget_set_locked_pointer_cursor_hint(struct widget *widget, +- float x, float y); +- +-int +-window_confine_pointer_to_rectangles(struct window *window, +- struct input *input, +- struct rectangle *rectangles, +- int num_rectangles); +- +-void +-window_update_confine_rectangles(struct window *window, +- struct rectangle *rectangles, +- int num_rectangles); +- +-int +-window_confine_pointer_to_widget(struct window *window, +- struct widget *widget, +- struct input *input); +- +-void +-window_unconfine_pointer(struct window *window); +- +-cairo_surface_t * +-window_get_surface(struct window *window); +- +-struct wl_surface * +-window_get_wl_surface(struct window *window); +- +-struct wl_subsurface * +-widget_get_wl_subsurface(struct widget *widget); +- +-enum window_buffer_type { +- WINDOW_BUFFER_TYPE_EGL_WINDOW, +- WINDOW_BUFFER_TYPE_SHM, +-}; +- +-void +-display_surface_damage(struct display *display, cairo_surface_t *cairo_surface, +- int32_t x, int32_t y, int32_t width, int32_t height); +- +-void +-window_set_buffer_type(struct window *window, enum window_buffer_type type); +- +-enum window_buffer_type +-window_get_buffer_type(struct window *window); +- +-int +-window_is_fullscreen(struct window *window); +- +-void +-window_set_fullscreen(struct window *window, int fullscreen); +- +-int +-window_is_maximized(struct window *window); +- +-void +-window_set_maximized(struct window *window, int maximized); +- +-int +-window_is_resizing(struct window *window); +- +-void +-window_set_minimized(struct window *window); +- +-void +-window_set_user_data(struct window *window, void *data); +- +-void * +-window_get_user_data(struct window *window); +- +-void +-window_set_key_handler(struct window *window, +- window_key_handler_t handler); +- +-void +-window_set_keyboard_focus_handler(struct window *window, +- window_keyboard_focus_handler_t handler); +- +-void +-window_set_data_handler(struct window *window, +- window_data_handler_t handler); +- +-void +-window_set_drop_handler(struct window *window, +- window_drop_handler_t handler); +- +-void +-window_set_close_handler(struct window *window, +- window_close_handler_t handler); +-void +-window_set_fullscreen_handler(struct window *window, +- window_fullscreen_handler_t handler); +-void +-window_set_output_handler(struct window *window, +- window_output_handler_t handler); +-void +-window_set_state_changed_handler(struct window *window, +- window_state_changed_handler_t handler); +- +-void +-window_set_pointer_locked_handler(struct window *window, +- locked_pointer_locked_handler_t locked, +- locked_pointer_unlocked_handler_t unlocked); +- +-void +-window_set_pointer_confined_handler(struct window *window, +- confined_pointer_confined_handler_t confined, +- confined_pointer_unconfined_handler_t unconfined); +- +-void +-window_set_locked_pointer_motion_handler( +- struct window *window, window_locked_pointer_motion_handler_t handler); +- +-void +-window_set_title(struct window *window, const char *title); +- +-const char * +-window_get_title(struct window *window); +- +-void +-window_set_text_cursor_position(struct window *window, int32_t x, int32_t y); +- +-int +-widget_set_tooltip(struct widget *parent, char *entry, float x, float y); +- +-void +-widget_destroy_tooltip(struct widget *parent); +- +-struct widget * +-widget_add_widget(struct widget *parent, void *data); +- +-void +-widget_destroy(struct widget *widget); +-void +-widget_set_default_cursor(struct widget *widget, int cursor); +-void +-widget_get_allocation(struct widget *widget, struct rectangle *allocation); +- +-void +-widget_set_allocation(struct widget *widget, +- int32_t x, int32_t y, int32_t width, int32_t height); +-void +-widget_set_size(struct widget *widget, int32_t width, int32_t height); +-void +-widget_set_transparent(struct widget *widget, int transparent); +-void +-widget_schedule_resize(struct widget *widget, int32_t width, int32_t height); +- +-void * +-widget_get_user_data(struct widget *widget); +- +-cairo_t * +-widget_cairo_create(struct widget *widget); +- +-struct wl_surface * +-widget_get_wl_surface(struct widget *widget); +- +-uint32_t +-widget_get_last_time(struct widget *widget); +- +-void +-widget_input_region_add(struct widget *widget, const struct rectangle *rect); +- +-void +-widget_set_redraw_handler(struct widget *widget, +- widget_redraw_handler_t handler); +-void +-widget_set_resize_handler(struct widget *widget, +- widget_resize_handler_t handler); +-void +-widget_set_enter_handler(struct widget *widget, +- widget_enter_handler_t handler); +-void +-widget_set_leave_handler(struct widget *widget, +- widget_leave_handler_t handler); +-void +-widget_set_motion_handler(struct widget *widget, +- widget_motion_handler_t handler); +-void +-widget_set_button_handler(struct widget *widget, +- widget_button_handler_t handler); +-void +-widget_set_touch_down_handler(struct widget *widget, +- widget_touch_down_handler_t handler); +-void +-widget_set_touch_up_handler(struct widget *widget, +- widget_touch_up_handler_t handler); +-void +-widget_set_touch_motion_handler(struct widget *widget, +- widget_touch_motion_handler_t handler); +-void +-widget_set_touch_frame_handler(struct widget *widget, +- widget_touch_frame_handler_t handler); +-void +-widget_set_touch_cancel_handler(struct widget *widget, +- widget_touch_cancel_handler_t handler); +-void +-widget_set_axis_handler(struct widget *widget, +- widget_axis_handler_t handler); +-void +-widget_set_pointer_frame_handler(struct widget *widget, +- widget_pointer_frame_handler_t handler); +-void +-widget_set_axis_handlers(struct widget *widget, +- widget_axis_handler_t axis_handler, +- widget_axis_source_handler_t axis_source_handler, +- widget_axis_stop_handler_t axis_stop_handler, +- widget_axis_discrete_handler_t axis_discrete_handler); +- +-void +-window_inhibit_redraw(struct window *window); +-void +-window_uninhibit_redraw(struct window *window); +-void +-widget_schedule_redraw(struct widget *widget); +-void +-widget_set_use_cairo(struct widget *widget, int use_cairo); +- +-/* +- * Sets the viewport destination for the widget's surface +- * return 0 on success and -1 on failure. Set width and height to +- * -1 to reset the viewport. +- */ +-int +-widget_set_viewport_destination(struct widget *widget, int width, int height); +- +-struct widget * +-window_frame_create(struct window *window, void *data); +- +-void +-window_frame_set_child_size(struct widget *widget, int child_width, +- int child_height); +- +-void +-input_set_pointer_image(struct input *input, int pointer); +- +-void +-input_get_position(struct input *input, int32_t *x, int32_t *y); +- +-int +-input_get_touch(struct input *input, int32_t id, float *x, float *y); +- +-#define MOD_SHIFT_MASK 0x01 +-#define MOD_ALT_MASK 0x02 +-#define MOD_CONTROL_MASK 0x04 +- +-uint32_t +-input_get_modifiers(struct input *input); +- +-void +-touch_grab(struct input *input, int32_t touch_id); +- +-void +-touch_ungrab(struct input *input); +- +-void +-input_grab(struct input *input, struct widget *widget, uint32_t button); +- +-void +-input_ungrab(struct input *input); +- +-struct widget * +-input_get_focus_widget(struct input *input); +- +-struct display * +-input_get_display(struct input *input); +- +-struct wl_seat * +-input_get_seat(struct input *input); +- +-struct wl_data_device * +-input_get_data_device(struct input *input); +- +-void +-input_set_selection(struct input *input, +- struct wl_data_source *source, uint32_t time); +- +-void +-input_accept(struct input *input, const char *type); +- +- +-void +-input_receive_drag_data(struct input *input, const char *mime_type, +- data_func_t func, void *user_data); +-int +-input_receive_drag_data_to_fd(struct input *input, +- const char *mime_type, int fd); +- +-int +-input_receive_selection_data(struct input *input, const char *mime_type, +- data_func_t func, void *data); +-int +-input_receive_selection_data_to_fd(struct input *input, +- const char *mime_type, int fd); +- +-void +-output_set_user_data(struct output *output, void *data); +- +-void * +-output_get_user_data(struct output *output); +- +-void +-output_set_destroy_handler(struct output *output, +- display_output_handler_t handler); +- +-void +-output_get_allocation(struct output *output, struct rectangle *allocation); +- +-struct wl_output * +-output_get_wl_output(struct output *output); +- +-enum wl_output_transform +-output_get_transform(struct output *output); +- +-uint32_t +-output_get_scale(struct output *output); +- +-const char * +-output_get_make(struct output *output); +- +-const char * +-output_get_model(struct output *output); +- +-void +-keysym_modifiers_add(struct wl_array *modifiers_map, +- const char *name); +- +-xkb_mod_mask_t +-keysym_modifiers_get_mask(struct wl_array *modifiers_map, +- const char *name); +- +-struct toytimer; +-typedef void (*toytimer_cb)(struct toytimer *); +- +-struct toytimer { +- struct display *display; +- struct task tsk; +- int fd; +- toytimer_cb callback; +-}; +- +-void +-toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display, +- toytimer_cb callback); +- +-void +-toytimer_fini(struct toytimer *tt); +- +-void +-toytimer_arm(struct toytimer *tt, const struct itimerspec *its); +- +-void +-toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec); +- +-void +-toytimer_disarm(struct toytimer *tt); +- + #endif +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0003-add-window_set_fullscreen_at_output.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0003-add-window_set_fullscreen_at_output.patch new file mode 100644 index 00000000..478f7929 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0003-add-window_set_fullscreen_at_output.patch @@ -0,0 +1,96 @@ +From 96bcbcc000541653e8937ff51b9ba945290d354d Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Jun 2017 23:51:22 +0300 +Subject: [PATCH 2/4] add window_set_fullscreen_at_output + +--- + clients/toytoolkit.h | 9 +++++++++ + clients/window.c | 38 ++++++++++++++++++++++++++++++++++++++ + 2 files changed, 47 insertions(+) + +diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h +index cd5455e..b99b6f1 100644 +--- a/clients/toytoolkit.h ++++ b/clients/toytoolkit.h +@@ -74,6 +74,12 @@ display_get_compositor(struct display *display); + struct output * + display_get_output(struct display *display); + ++unsigned int ++display_get_outputs_number(struct display *display); ++ ++struct output * ++display_get_output_by_index(struct display *display, unsigned int index); ++ + uint32_t + display_get_serial(struct display *display); + +@@ -430,6 +436,9 @@ window_is_fullscreen(struct window *window); + void + window_set_fullscreen(struct window *window, int fullscreen); + ++void ++window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output); ++ + int + window_is_maximized(struct window *window); + +diff --git a/clients/window.c b/clients/window.c +index 2bd303e..34645b2 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -4672,6 +4672,21 @@ window_set_fullscreen(struct window *window, int fullscreen) + xdg_toplevel_unset_fullscreen(window->xdg_toplevel); + } + ++void ++window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output) ++{ ++ if (!window->xdg_toplevel) ++ return; ++ ++ if (window->fullscreen == fullscreen) ++ return; ++ ++ if (fullscreen) ++ xdg_toplevel_set_fullscreen(window->xdg_toplevel, output ? output_get_wl_output(output) : NULL); ++ else ++ xdg_toplevel_unset_fullscreen(window->xdg_toplevel); ++} ++ + int + window_is_maximized(struct window *window) + { +@@ -6397,6 +6412,29 @@ display_get_output(struct display *display) + return container_of(display->output_list.next, struct output, link); + } + ++unsigned int ++display_get_outputs_number(struct display *display) ++{ ++ return wl_list_length(&display->output_list); ++} ++ ++struct output * ++display_get_output_by_index(struct display *display, unsigned int index) ++{ ++ int i; ++ int n = wl_list_length(&display->output_list); ++ struct wl_list *item; ++ ++ if (index >= n) ++ return NULL; ++ ++ item = display->output_list.next; ++ for (i = 0; i < index; i++) ++ item = item->next; ++ ++ return container_of(item, struct output, link); ++} ++ + struct wl_compositor * + display_get_compositor(struct display *display) + { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0004-Add-display_poll-function.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0004-Add-display_poll-function.patch new file mode 100644 index 00000000..e0ffa92a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0004-Add-display_poll-function.patch @@ -0,0 +1,90 @@ +From 1d64f24383749038ccc8c5f273a279698b2a9662 Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Jun 2017 23:51:22 +0300 +Subject: [PATCH 3/4] Add display_poll function + +--- + clients/toytoolkit.h | 3 +++ + clients/window.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 55 insertions(+) + +diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h +index b99b6f1..67c2720 100644 +--- a/clients/toytoolkit.h ++++ b/clients/toytoolkit.h +@@ -161,6 +161,9 @@ display_unwatch_fd(struct display *display, int fd); + void + display_run(struct display *d); + ++int ++display_poll(struct display *display, int timeout); ++ + void + display_exit(struct display *d); + +diff --git a/clients/window.c b/clients/window.c +index 34645b2..3b7def3 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -6559,6 +6559,58 @@ display_run(struct display *display) + } + } + ++int ++display_poll(struct display *display, int timeout) ++{ ++ struct task *task; ++ struct epoll_event ep[16]; ++ int i, count, ret; ++ ++ display->running = 1; ++ while (!wl_list_empty(&display->deferred_list)) { ++ task = container_of(display->deferred_list.prev, ++ struct task, link); ++ wl_list_remove(&task->link); ++ task->run(task, 0); ++ } ++ ++ /* ...prepare for a reading */ ++ while (wl_display_prepare_read(display->display) != 0) ++ { ++ /* ...dispatch all pending events and repeat attempt */ ++ wl_display_dispatch_pending(display->display); ++ } ++ ++ /* ...flush all outstanding commands to a display */ ++ if (wl_display_flush(display->display) < 0) { ++ return -1; ++ } ++ ++ if (!display->running) ++ return -1; ++ ++ count = epoll_wait(display->epoll_fd, ep, ARRAY_LENGTH(ep), timeout); ++ if (!count) { ++ wl_display_cancel_read(display->display); ++ return 0; ++ } ++ ++ if (count > 0) { ++ /* ...read display events (if any) before we do any drawing */ ++ if (wl_display_read_events(display->display) < 0) { ++ return -1; ++ } ++ ++ /* ...process pending display events (if any) */ ++ if (wl_display_dispatch_pending(display->display) < 0) { ++ return -1; ++ } ++ } else if (count < 0) { ++ wl_display_cancel_read(display->display); ++ return count; ++ } ++} ++ + void + display_exit(struct display *display) + { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch new file mode 100644 index 00000000..7163cb36 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch @@ -0,0 +1,56 @@ +From 626341e48f4159d91ff39af2d0dc7bc720521121 Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Jun 2017 23:58:37 +0300 +Subject: [PATCH 4/4] Add wl ivi shell sirface creating support + +--- + ivi-shell/ivi-layout-export.h | 19 +++++++++++++++++++ + ivi-shell/ivi-layout.c | 2 ++ + 2 files changed, 21 insertions(+) + +diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h +index 740e1ac..bd97d4a 100644 +--- a/ivi-shell/ivi-layout-export.h ++++ b/ivi-shell/ivi-layout-export.h +@@ -156,6 +156,25 @@ struct ivi_layout_interface { + */ + int32_t (*commit_changes)(void); + ++ /** ++ * \brief Creates an ivi_layout_surface. ++ * ++ * \return IVI_SUCCEEDED if the method call was successful ++ * \return IVI_FAILED if the method call was failed ++ */ ++ struct ivi_layout_surface* (*surface_create)( ++ struct weston_surface *wl_surface, ++ uint32_t id_surface); ++ ++ /** ++ * \brief Configure an ivi_layout_surface ++ * ++ * \return IVI_SUCCEEDED if the method call was successful ++ * \return IVI_FAILED if the method call was failed ++ */ ++ void (*surface_configure)(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height); ++ + /** + * surface controller interface + */ +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index 7cec79d..615c026 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -2054,6 +2054,8 @@ static struct ivi_layout_interface ivi_layout_interface = { + * commit all changes + */ + .commit_changes = ivi_layout_commit_changes, ++ .surface_create = ivi_layout_surface_create, ++ .surface_configure = ivi_layout_surface_configure, + + /** + * surface controller interfaces +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0006-Add-widget_set_surface_allocation-func.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0006-Add-widget_set_surface_allocation-func.patch new file mode 100644 index 00000000..2992a37f --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0006-Add-widget_set_surface_allocation-func.patch @@ -0,0 +1,50 @@ +From e513edbcb6d870c9ce956f0a092d01540073b750 Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Dec 2016 00:43:11 +0300 +Subject: [PATCH] Add widget_set_surface_allocation func + +--- + clients/toytoolkit.h | 3 +++ + clients/window.c | 12 ++++++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h +index 67c2720..45d322a 100644 +--- a/clients/toytoolkit.h ++++ b/clients/toytoolkit.h +@@ -532,6 +532,9 @@ void + widget_set_allocation(struct widget *widget, + int32_t x, int32_t y, int32_t width, int32_t height); + void ++widget_set_surface_allocation(struct widget *widget, ++ int32_t x, int32_t y, int32_t width, int32_t height); ++void + widget_set_size(struct widget *widget, int32_t width, int32_t height); + void + widget_set_transparent(struct widget *widget, int transparent); +diff --git a/clients/window.c b/clients/window.c +index 3b7def3..c0b25e8 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -1761,6 +1761,18 @@ widget_set_allocation(struct widget *widget, + } + + void ++widget_set_surface_allocation(struct widget *widget, ++ int32_t x, int32_t y, int32_t width, int32_t height) ++{ ++ if (widget->surface) { ++ widget->surface->allocation.x = x; ++ widget->surface->allocation.y = y; ++ widget->surface->allocation.width = width; ++ widget->surface->allocation.height = height; ++ } ++} ++ ++void + widget_set_transparent(struct widget *widget, int transparent) + { + widget->opaque = !transparent; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch new file mode 100644 index 00000000..90893cde --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-8.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch @@ -0,0 +1,44 @@ +From 9f1228fad3e549fd0ead4fd37573e02b874d1661 Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Tue, 13 Dec 2016 18:20:11 +0300 +Subject: [PATCH] Add call for setting fullscreen with IVI + +--- + clients/toytoolkit.h | 3 +++ + clients/window.c | 6 ++++++ + 2 files changed, 9 insertions(+) + +diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h +index 45d322a..481bfe1 100644 +--- a/clients/toytoolkit.h ++++ b/clients/toytoolkit.h +@@ -442,6 +442,9 @@ window_set_fullscreen(struct window *window, int fullscreen); + void + window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output); + ++void ++window_set_fullscreen_hack(struct window *window, int fullscreen); ++ + int + window_is_maximized(struct window *window); + +diff --git a/clients/window.c b/clients/window.c +index c0b25e8..0ba9307 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -4699,6 +4699,12 @@ window_set_fullscreen_at_output(struct window *window, int fullscreen, struct ou + xdg_toplevel_unset_fullscreen(window->xdg_toplevel); + } + ++void ++window_set_fullscreen_hack(struct window *window, int fullscreen) ++{ ++ window->fullscreen = fullscreen; ++} ++ + int + window_is_maximized(struct window *window) + { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend deleted file mode 100644 index 96e48aba..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -FILESEXTRAPATHS_prepend := '${THISDIR}/${PN}-${PV}:' - -SRC_URI_append = " \ - file://0001-Allow-to-boot-without-input-device.patch \ - file://0002-Share-toytoolkit-lib.patch \ - file://0003-add-window-set-fullscreen-at-output.patch \ - file://0004-Add-display_poll-function.patch \ - file://0005-Add-wl-ivi-shell-surface-creating-support.patch \ - file://0006-Add-widget_set_surface_allocation-func.patch \ - file://0007-Add-call-for-setting-fullscreen-with-IVI.patch \ -" - -FILES_${PN} += " ${libdir}/libweston-toytoolkit*" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_8.0.0.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_8.0.0.bbappend new file mode 100644 index 00000000..9521606c --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_8.0.0.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := '${THISDIR}/${PN}-${PV}:' + +SRC_URI_append = " \ + file://0001-Allow-to-boot-without-input-device.patch \ + file://0002-Share-toytoolkit-lib.patch \ + file://0003-add-window_set_fullscreen_at_output.patch \ + file://0004-Add-display_poll-function.patch \ + file://0005-Add-wl-ivi-shell-surface-creating-support.patch \ + file://0006-Add-widget_set_surface_allocation-func.patch \ + file://0007-Add-call-for-setting-fullscreen-with-IVI.patch \ +" + +FILES_${PN} += " ${libdir}/libweston-toytoolkit*" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0104-media-vsp1-extend-DRM-VSP1-interface.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0104-media-vsp1-extend-DRM-VSP1-interface.patch index 2f6fa35f..4b800adc 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0104-media-vsp1-extend-DRM-VSP1-interface.patch +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0104-media-vsp1-extend-DRM-VSP1-interface.patch @@ -262,7 +262,7 @@ index ff25470..2cce294 100644 - if ((fmtinfo->alpha) && + dev_dbg(vsp1->dev, "rpf#%d: alpha=%x, fourcc=%x\n", rpf->entity.index, fmtinfo->alpha, fmtinfo->fourcc); + -+ if (0 && (fmtinfo->alpha) && ++ if (fmtinfo->alpha && (fmtinfo->fourcc != V4L2_PIX_FMT_ARGB555)) { /* When the input contains an alpha channel enable the * alpha multiplier. If the input is premultiplied we diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0285-iommu-ipmmu-vmsa-Add-r8a779-7-8-0-whitelist.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0285-iommu-ipmmu-vmsa-Add-r8a779-7-8-0-whitelist.patch index 8ec4be85..08fa2038 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0285-iommu-ipmmu-vmsa-Add-r8a779-7-8-0-whitelist.patch +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0285-iommu-ipmmu-vmsa-Add-r8a779-7-8-0-whitelist.patch @@ -19,12 +19,12 @@ index cdbfc53..52e292a 100644 NULL, /* Terminator */ }; -+/* R-Car E3 (R8A77970) */ ++/* R-Car V3M (R8A77970) */ +static struct ipmmu_whitelist *r8a77970_whitelist[] = { + NULL, /* Terminator */ +}; + -+/* R-Car E3 (R8A77980) */ ++/* R-Car V3H (R8A77980) */ +static struct ipmmu_whitelist *r8a77980_whitelist[] = { + NULL, /* Terminator */ +}; diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch index 538ca4a6..5e455335 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch @@ -14,9 +14,9 @@ Signed-off-by: Valentine Barshak drivers/gpu/drm/rcar-du/rcar_du_kms.c | 38 ++++++ drivers/gpu/drm/rcar-du/rcar_du_plane.c | 2 + drivers/gpu/drm/rcar-du/rcar_du_plane.h | 5 + - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 228 +++++++++++++++++++++++++++----- + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 229 ++++++++++++++++++++++++++------ drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 7 +- - 7 files changed, 249 insertions(+), 37 deletions(-) + 7 files changed, 249 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 9c0152d..5f1a175 100644 @@ -110,7 +110,7 @@ index d66ae53..f74bc6a 100644 } diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c -index 1b70db3..e934b4c 100644 +index 5818c59..74e0bb1 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c @@ -11,6 +11,7 @@ @@ -146,7 +146,7 @@ index e0ddecf..3e9dfdb 100644 static inline struct rcar_du_plane_state * diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c -index c44d336..2b076cf 100644 +index 0c352a0..e53c20e 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -11,6 +11,7 @@ @@ -492,34 +492,33 @@ index c44d336..2b076cf 100644 else return -EINVAL; -@@ -633,8 +777,10 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, +@@ -633,7 +777,8 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, drm_plane_helper_add(&plane->plane, &rcar_du_vsp_plane_helper_funcs); -+#if 0 // ...use same set of properties for all planes - if (type == DRM_PLANE_TYPE_PRIMARY) - continue; -+#endif - - drm_object_attach_property(&plane->plane.base, - rcdu->props.alpha, 255); -@@ -647,6 +793,16 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, +- if (type == DRM_PLANE_TYPE_PRIMARY) { ++ // ...use same set of properties for all planes ++ if (0 && type == DRM_PLANE_TYPE_PRIMARY) { + drm_plane_create_zpos_immutable_property(&plane->plane, + 0); + } else { +@@ -648,6 +793,16 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, 0); - drm_plane_create_zpos_property(&plane->plane, 1, 1, + drm_plane_create_zpos_property(&plane->plane, 1, 1, vsp->num_planes - 1); -+ drm_object_attach_property(&plane->plane.base, -+ rcdu->props.alphaplane, 0); -+ drm_object_attach_property(&plane->plane.base, -+ rcdu->props.blend, 0); -+ drm_object_attach_property(&plane->plane.base, -+ rcdu->props.ckey, 0); -+ drm_object_attach_property(&plane->plane.base, -+ rcdu->props.ckey_set0, 0); -+ drm_object_attach_property(&plane->plane.base, -+ rcdu->props.ckey_set1, 0); ++ drm_object_attach_property(&plane->plane.base, ++ rcdu->props.alphaplane, 0); ++ drm_object_attach_property(&plane->plane.base, ++ rcdu->props.blend, 0); ++ drm_object_attach_property(&plane->plane.base, ++ rcdu->props.ckey, 0); ++ drm_object_attach_property(&plane->plane.base, ++ rcdu->props.ckey_set0, 0); ++ drm_object_attach_property(&plane->plane.base, ++ rcdu->props.ckey_set1, 0); + } } - return 0; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h b/drivers/gpu/drm/rcar-du/rcar_du_vsp.h index 93dbb9e..083d065 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.h diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0420-media-i2c-ov2311-fix-otp-id-read.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0420-media-i2c-ov2311-fix-otp-id-read.patch new file mode 100644 index 00000000..9557ae91 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0420-media-i2c-ov2311-fix-otp-id-read.patch @@ -0,0 +1,51 @@ +From 3ef8db409fb567da880f15a08df5cea08f3f2a45 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 18 Sep 2019 14:18:49 +0300 +Subject: [PATCH] media: i2c: ov2311: fix otp id read + +The OTP ID may fail if power rail comes early and imager +get into lpm mode. +Hence read otp id after full setup and stream enable + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov2311.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov2311.c b/drivers/media/i2c/soc_camera/ov2311.c +index f04f271..c61059d 100644 +--- a/drivers/media/i2c/soc_camera/ov2311.c ++++ b/drivers/media/i2c/soc_camera/ov2311.c +@@ -376,7 +376,6 @@ static void ov2311_otp_id_read(struct i2c_client *client) + struct ov2311_priv *priv = to_ov2311(client); + int i; + +- reg16_write(client, 0x100, 1); + reg16_write(client, 0x3d81, 1); + usleep_range(25000, 25500); /* wait 25 ms */ + +@@ -384,8 +383,6 @@ static void ov2311_otp_id_read(struct i2c_client *client) + /* first 6 bytes are equal on all ov2311 */ + reg16_read(client, 0x7000 + i + 6, &priv->id[i]); + } +- +- reg16_write(client, 0x100, 0); + } + + static ssize_t ov2311_otp_id_show(struct device *dev, +@@ -432,10 +429,10 @@ static int ov2311_initialize(struct i2c_client *client) + + /* check revision */ + reg16_read(client, OV2311_REV, &rev); +- /* Read OTP IDs */ +- ov2311_otp_id_read(client); + /* Program wizard registers */ + ov2311_set_regs(client, ov2311_regs_wizard_r1c, ARRAY_SIZE(ov2311_regs_wizard_r1c)); ++ /* Read OTP IDs */ ++ ov2311_otp_id_read(client); + + dev_info(&client->dev, "ov2311 PID %x (rev %x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, rev, OV2311_MAX_WIDTH, OV2311_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0421-media-i2c-imx390-add-user-defined-size-for-register-.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0421-media-i2c-imx390-add-user-defined-size-for-register-.patch new file mode 100644 index 00000000..bbae277a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0421-media-i2c-imx390-add-user-defined-size-for-register-.patch @@ -0,0 +1,197 @@ +From 5dc710a5cfcaf038155e2a6c6c1a5becfb684a41 Mon Sep 17 00:00:00 2001 +From: Petr Nechaev +Date: Thu, 3 Oct 2019 14:04:23 +0300 +Subject: [PATCH] media: i2c: imx390: add user defined size for register access + +This adds user defined size during VIDIOC_DBG_G/S_REGISTER + +Signed-off-by: Petr Nechaev +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imx390.c | 20 +++++++---- + drivers/media/i2c/soc_camera/max9286.h | 61 ++++++++++++++++++++++++++++++++++ + drivers/media/i2c/soc_camera/ti9x4.h | 48 ++++++++++++++++++++++++++ + 3 files changed, 123 insertions(+), 6 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imx390.c b/drivers/media/i2c/soc_camera/imx390.c +index 87279d0..b1df1ba 100644 +--- a/drivers/media/i2c/soc_camera/imx390.c ++++ b/drivers/media/i2c/soc_camera/imx390.c +@@ -213,16 +213,18 @@ static int imx390_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 s = reg->size; + int ret; +- u8 val = 0; + +- ret = reg16_read(client, (u16)reg->reg, &val); ++ if (!s) ++ s = 4; ++ if (s > sizeof(reg->val)) ++ s = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)®->val, s); + if (ret < 0) + return ret; + +- reg->val = val; +- reg->size = sizeof(u8); +- + return 0; + } + +@@ -230,8 +232,14 @@ static int imx390_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 s = reg->size; ++ ++ if (!s) ++ s = 4; ++ if (s > sizeof(reg->val)) ++ s = sizeof(reg->val); + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ return reg16_write_n(client, (u16)reg->reg, (u8*)®->val, s); + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/max9286.h b/drivers/media/i2c/soc_camera/max9286.h +index 2875b3c..b53ac27 100644 +--- a/drivers/media/i2c/soc_camera/max9286.h ++++ b/drivers/media/i2c/soc_camera/max9286.h +@@ -131,6 +131,67 @@ static inline int reg16_write(struct i2c_client *client, u16 reg, u8 val) + return ret < 0 ? ret : 0; + } + ++static inline int reg16_read_n(struct i2c_client *client, u16 reg, u8 *val, int n) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, val, n); ++ if (ret == n) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x registers 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write_n(struct i2c_client *client, u16 reg, const u8* val, int n) ++{ ++ int ret, retries; ++ u8 buf[2 + n]; ++ ++ buf[0] = reg >> 8; ++ buf[1] = reg & 0xff; ++ memcpy(&buf[2], val, n); ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2 + n); ++ if (ret == 2 + n) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } else { ++#ifdef WRITE_VERIFY ++ u8 val2[n]; ++ ret = reg16_read_n(client, reg, val2, n); ++ if (ret < 0) ++ return ret; ++ ++ if (memcmp(val, val2, n)) { ++ dev_err(&client->dev, ++ "write verify mismatch: chip 0x%x reg=0x%x-0x%x " ++ "'%*phN'->'%*phN'\n", client->addr, reg, reg + n, ++ n, val, n, val2); ++ ret = -EBADE; ++ } ++#endif ++ } ++ ++ return ret < 0 ? ret : 0; ++} + + static inline int reg16_read16(struct i2c_client *client, u16 reg, u16 *val) + { +diff --git a/drivers/media/i2c/soc_camera/ti9x4.h b/drivers/media/i2c/soc_camera/ti9x4.h +index b53b4c6..6825f8a 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.h ++++ b/drivers/media/i2c/soc_camera/ti9x4.h +@@ -109,6 +109,53 @@ static inline int reg16_write(struct i2c_client *client, u16 reg, u8 val) + return ret < 0 ? ret : 0; + } + ++static inline int reg16_read_n(struct i2c_client *client, u16 reg, u8 *val, int n) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, val, n); ++ if (ret == n) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x registers 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write_n(struct i2c_client *client, u16 reg, const u8* val, int n) ++{ ++ int ret, retries; ++ u8 buf[2 + n]; ++ ++ buf[0] = reg >> 8; ++ buf[1] = reg & 0xff; ++ memcpy(&buf[2], val, n); ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2 + n); ++ if (ret == 2 + n) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ + static inline int reg16_read16(struct i2c_client *client, u16 reg, u16 *val) + { + int ret, retries; +@@ -154,3 +201,4 @@ static inline int reg16_write16(struct i2c_client *client, u16 reg, u16 val) + return ret < 0 ? ret : 0; + } + #endif /* _TI9X4_H */ ++ +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0422-mmc-core-mmc-Try-other-timings-if-the-higher-one-fai.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0422-mmc-core-mmc-Try-other-timings-if-the-higher-one-fai.patch new file mode 100644 index 00000000..2225db0d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0422-mmc-core-mmc-Try-other-timings-if-the-higher-one-fai.patch @@ -0,0 +1,45 @@ +From b0b23fee0c630e00e5a117a1fc48cf11de356822 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 25 Oct 2019 00:59:49 +0300 +Subject: [PATCH] mmc: core: mmc: Try other timings if the higher one fails + +Do not bail out in case the higher supported timing +setup fails. Try other supported timings as well. + +Signed-off-by: Valentine Barshak +--- + drivers/mmc/core/mmc.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c +index bad5c1b..c7c1c54 100644 +--- a/drivers/mmc/core/mmc.c ++++ b/drivers/mmc/core/mmc.c +@@ -1473,12 +1473,21 @@ static int mmc_select_timing(struct mmc_card *card) + if (!mmc_can_ext_csd(card)) + goto bus_speed; + +- if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES) ++ if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES) { + err = mmc_select_hs400es(card); +- else if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS200) ++ if (!err) ++ goto bus_speed; ++ } ++ if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS200) { + err = mmc_select_hs200(card); +- else if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS) ++ if (!err) ++ goto bus_speed; ++ } ++ if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS) { + err = mmc_select_hs(card); ++ if (!err) ++ goto bus_speed; ++ } + + if (err && err != -EBADMSG) + return err; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0423-media-i2c-ap0101_ar014x-add-AP0102-chip.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0423-media-i2c-ap0101_ar014x-add-AP0102-chip.patch new file mode 100644 index 00000000..9928e879 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0423-media-i2c-ap0101_ar014x-add-AP0102-chip.patch @@ -0,0 +1,77 @@ +From 45e394a4669fa60e5e0837f68148907af7b757eb Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 1 Nov 2019 21:46:47 +0300 +Subject: [PATCH] media: i2c: ap0101_ar014x: add AP0102 chip + +This add AP0102 ISP support + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ap0101_ar014x.c | 31 ++++++++++++++++------------ + 1 file changed, 18 insertions(+), 13 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +index c35e5a0..4df5793 100644 +--- a/drivers/media/i2c/soc_camera/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +@@ -1,7 +1,7 @@ + /* +- * ON Semiconductor AP0101-AR014X sensor camera driver ++ * ON Semiconductor AP010X-AR014X sensor camera driver + * +- * Copyright (C) 2018 Cogent Embedded, Inc. ++ * Copyright (C) 2018-2019 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -26,6 +26,7 @@ static const int ap0101_i2c_addr[] = {0x5d, 0x48}; + + #define AP0101_PID 0x0000 + #define AP0101_VERSION_REG 0x0160 ++#define AP0102_VERSION_REG 0x0064 + + #define AP0101_MEDIA_BUS_FMT MEDIA_BUS_FMT_YUYV8_2X8 + +@@ -432,24 +433,28 @@ static int ap0101_initialize(struct i2c_client *client) + /* check model ID */ + reg16_read16(client, AP0101_PID, &pid); + +- if (pid == AP0101_VERSION_REG) ++ if (pid == AP0101_VERSION_REG || pid == AP0102_VERSION_REG) + break; + } + +- /* check and show model ID */ +- reg16_read16(client, AP0101_PID, &pid); +- +- if (pid != AP0101_VERSION_REG) { +- dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ if (pid != AP0101_VERSION_REG && pid != AP0102_VERSION_REG) { ++ dev_err(&client->dev, "Product ID error %x\n", pid); + ret = -ENODEV; + goto err; + } + #if 1 +- /* read resolution used by current firmware */ +- reg16_read16(client, 0xca90, &val); +- priv->max_width = val; +- reg16_read16(client, 0xca92, &val); +- priv->max_height = val; ++ if (pid == AP0101_VERSION_REG) { ++ /* read resolution used by current firmware */ ++ reg16_read16(client, 0xca90, &val); ++ priv->max_width = val; ++ reg16_read16(client, 0xca92, &val); ++ priv->max_height = val; ++ } else if (pid == AP0102_VERSION_REG) { ++ reg16_read16(client, 0xcae4, &val); ++ priv->max_width = val; ++ reg16_read16(client, 0xcae6, &val); ++ priv->max_height = val; ++ } + #else + priv->max_width = AP0101_MAX_WIDTH; + priv->max_height = AP0101_MAX_HEIGHT; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0424-arm64-dts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0424-arm64-dts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch new file mode 100644 index 00000000..7de384e3 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0424-arm64-dts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch @@ -0,0 +1,304 @@ +From 291865bff36306d70c6975e73eb299d977abbc2c Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Tue, 5 Nov 2019 19:40:06 +0300 +Subject: [PATCH] arm64: dts: renesas: ulcb-vb: Fix lvds0 port routing + +This fixes LVDS port routing on all H3ULCB VideoBox +boards which is needed for the FDPLink output. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb2.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vbm.dts | 8 +++++--- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vbm.dts | 8 +++++--- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.dts | 11 +++++++++-- + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vbm.dts | 8 +++++--- + arch/arm64/boot/dts/renesas/ulcb-vb.dtsi | 2 +- + arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi | 2 +- + arch/arm64/boot/dts/renesas/ulcb-vbm.dtsi | 2 +- + 14 files changed, 90 insertions(+), 28 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts +index db9f80f..310d2df 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts +@@ -34,8 +34,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb2.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb2.dts +index 6d51ffd..65b9aa5 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb2.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vb2.dts +@@ -40,8 +40,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vbm.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vbm.dts +index 64815d4..a3b51da 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vbm.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-vbm.dts +@@ -15,10 +15,12 @@ + model = "Renesas H3ULCB Videobox Mini board based on r8a7795"; + }; + +-&du { ++&lvds0 { ++ status = "okay"; ++ + ports { +- port@3 { +- endpoint { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb.dts +index ce16cab..1f8c229 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1.dts +index 1a9d0be..aa99875 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.dts +index 1351c6f..fb45133 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vbm.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vbm.dts +index 352cc0d..b415e88 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vbm.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vbm.dts +@@ -15,10 +15,12 @@ + model = "Renesas H3ULCB with 8GiB (4 x 2 GiB) Videobox Mini board based on r8a7795"; + }; + +-&du { ++&lvds0 { ++ status = "okay"; ++ + ports { +- port@3 { +- endpoint { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts +index 26c15f4..9517ff0 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1.dts +index 43c20b0..5f97b60 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.dts +index 816c7da..56d43d07 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.dts +@@ -33,8 +33,15 @@ + remote-endpoint = <&rcar_dw_hdmi1_in>; + }; + }; +- port@3 { +- endpoint { ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vbm.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vbm.dts +index 053a60e..7fcf527 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vbm.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vbm.dts +@@ -15,10 +15,12 @@ + model = "Renesas H3ULCB Videobox Mini board based on r8a7795"; + }; + +-&du { ++&lvds0 { ++ status = "okay"; ++ + ports { +- port@3 { +- endpoint { ++ port@1 { ++ lvds0_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb.dtsi +index 67903db..6fb2b38 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb-vb.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb.dtsi +@@ -145,7 +145,7 @@ + + port { + lvds_in: endpoint { +- remote-endpoint = <&du_out_lvds0>; ++ remote-endpoint = <&lvds0_out>; + }; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi +index 50cdfd8..1a73059 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi +@@ -137,7 +137,7 @@ + + port { + lvds_in: endpoint { +- remote-endpoint = <&du_out_lvds0>; ++ remote-endpoint = <&lvds0_out>; + }; + }; + }; +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vbm.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vbm.dtsi +index 067607a..b7e3817 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb-vbm.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb-vbm.dtsi +@@ -36,7 +36,7 @@ + + port { + lvds_in: endpoint { +- remote-endpoint = <&du_out_lvds0>; ++ remote-endpoint = <&lvds0_out>; + }; + }; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0425-arm64-dts-r8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0425-arm64-dts-r8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch new file mode 100644 index 00000000..a2809257 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0425-arm64-dts-r8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch @@ -0,0 +1,44 @@ +From 7cd42e725a0221bb9c0443b15311fe3f5d37ed97 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 9 Oct 2019 18:34:48 +0300 +Subject: [PATCH] arm64: dts: r8a7798-v3hsk-vb-4/8ch: change i2c rate to 400khz + +Change i2c rate to 400kHz for bus with cameras. +This speeds up the cameras backchannel transactions. +The restriction of 100khz for cs2300 looks not needed for rev C1 chip. + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts +index 12ef357..4ca62c6 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts +@@ -142,7 +142,7 @@ + pinctrl-names = "default"; + status = "okay"; + +- clock-frequency = <100000>; ++ clock-frequency = <400000>; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts +index 861b90f..b635132 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts +@@ -142,7 +142,7 @@ + pinctrl-names = "default"; + status = "okay"; + +- clock-frequency = <100000>; ++ clock-frequency = <400000>; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0426-media-i2c-ov106xx-change-order.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0426-media-i2c-ov106xx-change-order.patch new file mode 100644 index 00000000..6a89c310 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0426-media-i2c-ov106xx-change-order.patch @@ -0,0 +1,90 @@ +From a9fc14847d14cb2dabad47064b1821928e8a743a Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 6 Nov 2019 15:17:50 +0300 +Subject: [PATCH] media: i2c: ov106xx: change order + +Put OV2775, OX03A tail becase they force change serilzier gpios. +Becase of this chagne the further autodetection becomes broken. + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov106xx.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index c7f1bbe..624f0be 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -79,6 +79,12 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + ++ ret = ap0101_probe(client, did); ++ if (!ret) { ++ chip_id = ID_AP0101_AR014X; ++ goto out; ++ } ++ + ret = ov495_probe(client, did); + if (!ret) { + chip_id = ID_OV495_OV2775; +@@ -139,12 +145,6 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = ap0101_probe(client, did); +- if (!ret) { +- chip_id = ID_AP0101_AR014X; +- goto out; +- } +- + ret = gw4200_probe(client, did); + if (!ret) { + chip_id = ID_GW4200_AR014X; +@@ -157,33 +157,33 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = ov2775_probe(client, did); ++ ret = imx390_probe(client, did); + if (!ret) { +- chip_id = ID_OV2775; ++ chip_id = ID_IMX390; + goto out; + } + +- ret = imx390_probe(client, did); ++ ret = isx016_probe(client, did); + if (!ret) { +- chip_id = ID_IMX390; ++ chip_id = ID_ISX016; + goto out; + } + +- ret = ox03a_probe(client, did); ++ ret = isx019_probe(client, did); + if (!ret) { +- chip_id = ID_OX03A; ++ chip_id = ID_ISX019; + goto out; + } + +- ret = isx016_probe(client, did); ++ ret = ov2775_probe(client, did); + if (!ret) { +- chip_id = ID_ISX016; ++ chip_id = ID_OV2775; + goto out; + } + +- ret = isx019_probe(client, did); ++ ret = ox03a_probe(client, did); + if (!ret) { +- chip_id = ID_ISX019; ++ chip_id = ID_OX03A; + goto out; + } + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0427-media-i2c-gw5200-fix-imager-hang.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0427-media-i2c-gw5200-fix-imager-hang.patch new file mode 100644 index 00000000..c4c74b51 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0427-media-i2c-gw5200-fix-imager-hang.patch @@ -0,0 +1,60 @@ +From 424d69732e6085cc527c66fef8e2bea5584ebc4f Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 7 Nov 2019 20:31:27 +0300 +Subject: [PATCH] media: i2c: gw5200: fix imager hang + +The LI-GW5200-IMX390 firmare may hang on any of 16bit i2c transaction. +Since the GW5200 is forceed detection then no problem to put it head + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gw5200_imx390.c | 2 +- + drivers/media/i2c/soc_camera/ov106xx.c | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gw5200_imx390.c b/drivers/media/i2c/soc_camera/gw5200_imx390.c +index e750a85..2fcfced 100644 +--- a/drivers/media/i2c/soc_camera/gw5200_imx390.c ++++ b/drivers/media/i2c/soc_camera/gw5200_imx390.c +@@ -22,7 +22,7 @@ + + #include "gw5200_imx390.h" + +-static const int gw5200_i2c_addr[] = {0x6d}; ++static const int gw5200_i2c_addr[] = {0x6c}; + + #define GW5200_PID 0x00 + #define GW5200_VERSION_REG 0x00 +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 624f0be..208267c 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -61,6 +61,12 @@ static int ov106xx_probe(struct i2c_client *client, + int ret = -1; + chip_id = -EINVAL; + ++ ret = gw5200_probe(client, did); ++ if (!ret) { ++ chip_id = ID_GW5200_IMX390; ++ goto out; ++ } ++ + ret = ar0231_probe(client, did); + if (!ret) { + chip_id = ID_AR0231; +@@ -151,12 +157,6 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = gw5200_probe(client, did); +- if (!ret) { +- chip_id = ID_GW5200_IMX390; +- goto out; +- } +- + ret = imx390_probe(client, did); + if (!ret) { + chip_id = ID_IMX390; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0428-arch64-dts-renesas-r8a77970-Fix-IPMMU-probe-order.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0428-arch64-dts-renesas-r8a77970-Fix-IPMMU-probe-order.patch new file mode 100644 index 00000000..ec40f20d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0428-arch64-dts-renesas-r8a77970-Fix-IPMMU-probe-order.patch @@ -0,0 +1,53 @@ +From 63a0c5c8fef06c0894a81d6e31b2b3eeec452f74 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Sat, 9 Nov 2019 20:22:31 +0300 +Subject: [PATCH 1/2] arch64: dts: renesas: r8a77970: Fix IPMMU probe order + +This moves the main IPMMU node in front of all the other IPMMU +nodes to prevent PROBE_DEFER errors and late initialization +of the slave IPMMU devices. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a77970.dtsi | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi +index 7ecbc01..456eeb6 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi +@@ -1121,6 +1121,15 @@ + <&ipmmu_ds1 22>, <&ipmmu_ds1 23>; + }; + ++ ipmmu_mm: mmu@e67b0000 { ++ compatible = "renesas,ipmmu-r8a77970"; ++ reg = <0 0xe67b0000 0 0x1000>; ++ interrupts = , ++ ; ++ power-domains = <&sysc R8A77970_PD_ALWAYS_ON>; ++ #iommu-cells = <1>; ++ }; ++ + ipmmu_ds1: mmu@e7740000 { + compatible = "renesas,ipmmu-r8a77970"; + reg = <0 0xe7740000 0 0x1000>; +@@ -1137,15 +1146,6 @@ + #iommu-cells = <1>; + }; + +- ipmmu_mm: mmu@e67b0000 { +- compatible = "renesas,ipmmu-r8a77970"; +- reg = <0 0xe67b0000 0 0x1000>; +- interrupts = , +- ; +- power-domains = <&sysc R8A77970_PD_ALWAYS_ON>; +- #iommu-cells = <1>; +- }; +- + ipmmu_rt: mmu@ffc80000 { + compatible = "renesas,ipmmu-r8a77970"; + reg = <0 0xffc80000 0 0x1000>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0429-arch64-dts-renesas-r8a77980-Fix-IPMMU-probe-order.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0429-arch64-dts-renesas-r8a77980-Fix-IPMMU-probe-order.patch new file mode 100644 index 00000000..634576cc --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0429-arch64-dts-renesas-r8a77980-Fix-IPMMU-probe-order.patch @@ -0,0 +1,53 @@ +From 86a07c0c042acb9f06c11c9319294d83d6ecbb59 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Sat, 9 Nov 2019 20:33:36 +0300 +Subject: [PATCH 2/2] arch64: dts: renesas: r8a77980: Fix IPMMU probe order + +This moves the main IPMMU node in front of all the other IPMMU +nodes to prevent PROBE_DEFER errors and late initialization +of the slave IPMMU devices. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a77980.dtsi | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi +index 045b517..0d25b35 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi +@@ -1636,6 +1636,15 @@ + status = "disabled"; + }; + ++ ipmmu_mm: mmu@e67b0000 { ++ compatible = "renesas,ipmmu-r8a77980"; ++ reg = <0 0xe67b0000 0 0x1000>; ++ interrupts = , ++ ; ++ power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; ++ #iommu-cells = <1>; ++ }; ++ + ipmmu_ds1: mmu@e7740000 { + compatible = "renesas,ipmmu-r8a77980"; + reg = <0 0xe7740000 0 0x1000>; +@@ -1652,15 +1661,6 @@ + #iommu-cells = <1>; + }; + +- ipmmu_mm: mmu@e67b0000 { +- compatible = "renesas,ipmmu-r8a77980"; +- reg = <0 0xe67b0000 0 0x1000>; +- interrupts = , +- ; +- power-domains = <&sysc R8A77980_PD_ALWAYS_ON>; +- #iommu-cells = <1>; +- }; +- + ipmmu_rt: mmu@ffc80000 { + compatible = "renesas,ipmmu-r8a77980"; + reg = <0 0xffc80000 0 0x1000>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0430-media-i2c-ar0140-update-driver-to-use-rGPIO-and-dyna.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0430-media-i2c-ar0140-update-driver-to-use-rGPIO-and-dyna.patch new file mode 100644 index 00000000..cdec2996 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0430-media-i2c-ar0140-update-driver-to-use-rGPIO-and-dyna.patch @@ -0,0 +1,162 @@ +From 8eb36a5043bfb90974d3149f29197cb7f72df171 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 12 Nov 2019 22:57:34 +0300 +Subject: [PATCH] media: i2c: ar0140: update driver to use rGPIO and dynamic + i2c + +This fix driver to use remote gpio from deserizlier and dynamic +i2c probing + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0140.c | 36 +++++++++++++++++++++------------- + drivers/media/i2c/soc_camera/ar0140.h | 4 +--- + drivers/media/i2c/soc_camera/ov106xx.c | 22 ++++++++++----------- + 3 files changed, 34 insertions(+), 28 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0140.c b/drivers/media/i2c/soc_camera/ar0140.c +index b156fc5..ec2b2e5 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.c ++++ b/drivers/media/i2c/soc_camera/ar0140.c +@@ -22,7 +22,7 @@ + + #include "ar0140.h" + +-#define AR0140_I2C_ADDR 0x10 ++static const int ar0140_i2c_addr[] = {0x10, 0x20}; + + #define AR0140_PID 0x3000 + #define AR0140_VERSION_REG 0x0051 +@@ -407,15 +407,30 @@ static DEVICE_ATTR(otp_id_ar0140, S_IRUGO, ar0140_otp_id_show, NULL); + static int ar0140_initialize(struct i2c_client *client) + { + struct ar0140_priv *priv = to_ar0140(client); +- u16 val = 0; +- u16 pid = 0; ++ u16 val = 0, pid = 0; + int ret = 0; +- int tmp_addr; ++ int tmp_addr, i; + +- ar0140_s_port(client, 1); ++ for (i = 0; i < ARRAY_SIZE(ar0140_i2c_addr); i++) { ++ tmp_addr = client->addr; ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x4_addr; ++ reg8_write(client, 0x5d, ar0140_i2c_addr[i] << 1); /* Sensor native I2C address */ ++ usleep_range(2000, 2500); ++ } ++ if (priv->max9286_addr) { ++ client->addr = priv->max9271_addr; ++ reg8_write(client, 0x0a, ar0140_i2c_addr[i] << 1); /* Sensor native I2C address */ ++ usleep_range(2000, 2500); ++ }; ++ client->addr = tmp_addr; + +- /* check and show model ID */ +- reg16_read16(client, AR0140_PID, &pid); ++ /* check model ID */ ++ reg16_read16(client, AR0140_PID, &pid); ++ ++ if (pid == AR0140_VERSION_REG) ++ break; ++ } + + if (pid != AR0140_VERSION_REG) { + dev_dbg(&client->dev, "Product ID error %x\n", pid); +@@ -452,7 +467,6 @@ static int ar0140_initialize(struct i2c_client *client) + pid, AR0140_MAX_WIDTH, AR0140_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + err: + ar0140_s_port(client, 0); +- + return ret; + } + +@@ -499,7 +513,6 @@ static int ar0140_parse_dt(struct device_node *np, struct ar0140_priv *priv) + client->addr = priv->max9271_addr; /* Serializer I2C address */ + + reg8_write(client, 0x09, tmp_addr << 1); /* Sensor translated I2C address */ +- reg8_write(client, 0x0A, AR0140_I2C_ADDR << 1); /* Sensor native I2C address */ + usleep_range(2000, 2500); /* wait 2ms */ + }; + if (priv->ti9x4_addr) { +@@ -508,14 +521,9 @@ static int ar0140_parse_dt(struct device_node *np, struct ar0140_priv *priv) + reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ + usleep_range(2000, 2500); /* wait 2ms */ + reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ +- reg8_write(client, 0x5d, AR0140_I2C_ADDR << 1); /* Sensor native I2C address */ +- +- reg8_write(client, 0x6e, 0x9a); /* GPIO0 - fsin, GPIO1 - reset */ + } + client->addr = tmp_addr; + +- mdelay(10); +- + return 0; + } + +diff --git a/drivers/media/i2c/soc_camera/ar0140.h b/drivers/media/i2c/soc_camera/ar0140.h +index f90762c..2993478 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.h ++++ b/drivers/media/i2c/soc_camera/ar0140.h +@@ -467,9 +467,7 @@ static const struct ar0140_reg ar0140_regs_wizard[] = { + // patch start + {0x3012, 0x0206}, // COARSE_INTEGRATION_TIME_: T1 exposure - max=0x400 + // patch end +-// enable trigger +-{0x340A, 0x0070}, // GPIO_CONTROL1: GPIO3 is trigger +-{0x340C, 0x0080}, // GPIO_CONTROL2: GPIO3 is trigger ++// enable trigger (trigger pin is dedicated) + {0x30CE, 0x0120}, // TRIGGER_MODE + //{0x30DC, 0x0120}, // TRIGGER_DELAY + }; +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 208267c..08d3816 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -67,6 +67,12 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + ++ ret = ar0140_probe(client, did); ++ if (!ret) { ++ chip_id = ID_AR0140; ++ goto out; ++ } ++ + ret = ar0231_probe(client, did); + if (!ret) { + chip_id = ID_AR0231; +@@ -85,11 +91,11 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = ap0101_probe(client, did); +- if (!ret) { +- chip_id = ID_AP0101_AR014X; +- goto out; +- } ++ ret = ap0101_probe(client, did); ++ if (!ret) { ++ chip_id = ID_AP0101_AR014X; ++ goto out; ++ } + + ret = ov495_probe(client, did); + if (!ret) { +@@ -127,12 +133,6 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = ar0140_probe(client, did); +- if (!ret) { +- chip_id = ID_AR0140; +- goto out; +- } +- + ret = ar0143_probe(client, did); + if (!ret) { + chip_id = ID_AR0143; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0431-media-i2c-ti9x4-update-remote-gpio-function.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0431-media-i2c-ti9x4-update-remote-gpio-function.patch new file mode 100644 index 00000000..79006e58 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0431-media-i2c-ti9x4-update-remote-gpio-function.patch @@ -0,0 +1,53 @@ +From 9098f3a6deac6fb81695cf7fbf97e32ac3e0c399 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 15 Nov 2019 14:31:52 +0300 +Subject: [PATCH] media: i2c: ti9x4: update remote gpio function + +Enable only FSIN for remote gpio, all permanent states (0 or 1) setup on serializer side: +this avoids intermittent remote gpio noise (f.e. reset or spuriouse fsin) caused by +unstable/bad link, hence unstable backchannel + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ti9x4.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +index 0cfcfaa..aa85d92 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/ti9x4.c +@@ -327,14 +327,29 @@ static int ti9x4_initialize(struct i2c_client *client) + reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ + usleep_range(1000, 1500); /* wait 1ms */ + ++ /* ++ * Enable only FSIN for remote gpio, all permanent states (0 or 1) setup on serializer side: ++ * this avoids intermittent remote gpio noise (f.e. reset or spuriouse fsin) caused by ++ * unstable/bad link, hence unstable backchannel ++ */ + client->addr = priv->ti9x3_addr_map[idx]; /* TI9X3 I2C addr */ + switch (priv->ser_id) { + case TI913_ID: + reg8_write(client, 0x0d, 0x55); /* Enable remote GPIO0/1 */ + break; + case TI953_ID: +- reg8_write(client, 0x0d, 0xf0); /* Enable all remote GPIOs */ +- reg8_write(client, 0x0e, 0xf0); /* Enable serializer GPIOs */ ++ reg8_write(client, 0x0d, (priv->gpio[0] & 0x1) << 0 | ++ (priv->gpio[1] & 0x1) << 1 | ++ (priv->gpio[2] & 0x1) << 2 | ++ (priv->gpio[3] & 0x1) << 3 | ++ (priv->gpio[0] & 0x2) << 3 | ++ (priv->gpio[1] & 0x2) << 4 | ++ (priv->gpio[2] & 0x2) << 5 | ++ (priv->gpio[3] & 0x2) << 6); /* Enable FSIN remote GPIOs and set local constant gpios */ ++ reg8_write(client, 0x0e, (!!priv->gpio[0] << 4) | ++ (!!priv->gpio[1] << 5) | ++ (!!priv->gpio[2] << 6) | ++ (!!priv->gpio[3] << 7)); /* Enable serializer GPIOs only for output */ + break; + } + client->addr = priv->des_addr; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0432-media-i2c-soc_camera-add-AR0220.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0432-media-i2c-soc_camera-add-AR0220.patch new file mode 100644 index 00000000..eb37d0a9 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0432-media-i2c-soc_camera-add-AR0220.patch @@ -0,0 +1,1689 @@ +From b79fd9163f868b78aea5ba634b52541d518f10a5 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 18 Nov 2019 19:07:21 +0300 +Subject: [PATCH] media: i2c: soc_camera: add AR0220 + +This adds AR0220 imager glue driver +The chip is appended to AR0233 glue for further rework of all AR0XXX chips + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0220.c | 539 ----------------------------- + drivers/media/i2c/soc_camera/ar0220.h | 39 +-- + drivers/media/i2c/soc_camera/ar0220_rev4.h | 370 ++++++++++++++++++++ + drivers/media/i2c/soc_camera/ar0233.c | 164 ++++++--- + drivers/media/i2c/soc_camera/ar0233.h | 7 - + drivers/media/i2c/soc_camera/ar0233_rev1.h | 26 +- + drivers/media/i2c/soc_camera/ar0233_rev2.h | 38 +- + drivers/media/i2c/soc_camera/ov106xx.c | 54 ++- + 8 files changed, 549 insertions(+), 688 deletions(-) + delete mode 100644 drivers/media/i2c/soc_camera/ar0220.c + create mode 100644 drivers/media/i2c/soc_camera/ar0220_rev4.h + +diff --git a/drivers/media/i2c/soc_camera/ar0220.c b/drivers/media/i2c/soc_camera/ar0220.c +deleted file mode 100644 +index b1ca101..0000000 +--- a/drivers/media/i2c/soc_camera/ar0220.c ++++ /dev/null +@@ -1,539 +0,0 @@ +-/* +- * ON Semiconductor AR0220 sensor camera driver +- * +- * Copyright (C) 2017-2018 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-#include "ar0220.h" +- +-#define AR0220_I2C_ADDR 0x10 +-//#define AR0220_I2C_ADDR 0x54 // eeprom +- +-#define AR0220_PID 0x3000 +-#define AR0220_VERSION_REG 0x0C54 +- +-#define AR0220_MEDIA_BUS_FMT MEDIA_BUS_FMT_SGRBG14_1X14 +- +-struct ar0220_priv { +- struct v4l2_subdev sd; +- struct v4l2_ctrl_handler hdl; +- struct media_pad pad; +- struct v4l2_rect rect; +- int init_complete; +- u8 id[6]; +- int exposure; +- int gain; +- int autogain; +- /* serializers */ +- int ti9x4_addr; +- int ti9x3_addr; +- int port; +- int gpio_resetb; +- int gpio_fsin; +-}; +- +-static inline struct ar0220_priv *to_ar0220(const struct i2c_client *client) +-{ +- return container_of(i2c_get_clientdata(client), struct ar0220_priv, sd); +-} +- +-static int ar0220_set_regs(struct i2c_client *client, +- const struct ar0220_reg *regs, int nr_regs) +-{ +- int i; +- +- for (i = 0; i < nr_regs; i++) { +- if (regs[i].reg == AR0220_DELAY) { +- mdelay(regs[i].val); +- continue; +- } +- +- reg16_write16(client, regs[i].reg, regs[i].val); +- } +- +- return 0; +-} +- +-static int ar0220_s_stream(struct v4l2_subdev *sd, int enable) +-{ +- return 0; +-} +- +-static int ar0220_get_fmt(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_format *format) +-{ +- struct v4l2_mbus_framefmt *mf = &format->format; +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- +- if (format->pad) +- return -EINVAL; +- +- mf->width = priv->rect.width; +- mf->height = priv->rect.height; +- mf->code = AR0220_MEDIA_BUS_FMT; +- mf->colorspace = V4L2_COLORSPACE_SMPTE170M; +- mf->field = V4L2_FIELD_NONE; +- +- return 0; +-} +- +-static int ar0220_set_fmt(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_format *format) +-{ +- struct v4l2_mbus_framefmt *mf = &format->format; +- +- mf->code = AR0220_MEDIA_BUS_FMT; +- mf->colorspace = V4L2_COLORSPACE_SMPTE170M; +- mf->field = V4L2_FIELD_NONE; +- +- if (format->which == V4L2_SUBDEV_FORMAT_TRY) +- cfg->try_fmt = *mf; +- +- return 0; +-} +- +-static int ar0220_enum_mbus_code(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_mbus_code_enum *code) +-{ +- if (code->pad || code->index > 0) +- return -EINVAL; +- +- code->code = AR0220_MEDIA_BUS_FMT; +- +- return 0; +-} +- +-static int ar0220_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- +- memcpy(edid->edid, priv->id, 6); +- +- edid->edid[6] = 0xff; +- edid->edid[7] = client->addr; +- edid->edid[8] = AR0220_VERSION_REG >> 8; +- edid->edid[9] = AR0220_VERSION_REG & 0xff; +- +- return 0; +-} +- +-static int ar0220_set_selection(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_selection *sel) +-{ +- struct v4l2_rect *rect = &sel->r; +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- +- if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || +- sel->target != V4L2_SEL_TGT_CROP) +- return -EINVAL; +- +- rect->left = ALIGN(rect->left, 2); +- rect->top = ALIGN(rect->top, 2); +- rect->width = ALIGN(rect->width, 2); +- rect->height = ALIGN(rect->height, 2); +- +- if ((rect->left + rect->width > AR0220_MAX_WIDTH) || +- (rect->top + rect->height > AR0220_MAX_HEIGHT)) +- *rect = priv->rect; +- +- priv->rect.left = rect->left; +- priv->rect.top = rect->top; +- priv->rect.width = rect->width; +- priv->rect.height = rect->height; +- +- return 0; +-} +- +-static int ar0220_get_selection(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_selection *sel) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- +- if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) +- return -EINVAL; +- +- switch (sel->target) { +- case V4L2_SEL_TGT_CROP_BOUNDS: +- sel->r.left = 0; +- sel->r.top = 0; +- sel->r.width = AR0220_MAX_WIDTH; +- sel->r.height = AR0220_MAX_HEIGHT; +- return 0; +- case V4L2_SEL_TGT_CROP_DEFAULT: +- sel->r.left = 0; +- sel->r.top = 0; +- sel->r.width = AR0220_MAX_WIDTH; +- sel->r.height = AR0220_MAX_HEIGHT; +- return 0; +- case V4L2_SEL_TGT_CROP: +- sel->r = priv->rect; +- return 0; +- default: +- return -EINVAL; +- } +-} +- +-static int ar0220_g_mbus_config(struct v4l2_subdev *sd, +- struct v4l2_mbus_config *cfg) +-{ +- cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | +- V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; +- cfg->type = V4L2_MBUS_CSI2; +- +- return 0; +-} +- +-#ifdef CONFIG_VIDEO_ADV_DEBUG +-static int ar0220_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- int ret; +- u16 val = 0; +- +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; +- +- reg->val = val; +- reg->size = sizeof(u16); +- +- return 0; +-} +- +-static int ar0220_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); +-} +-#endif +- +-static struct v4l2_subdev_core_ops ar0220_core_ops = { +-#ifdef CONFIG_VIDEO_ADV_DEBUG +- .g_register = ar0220_g_register, +- .s_register = ar0220_s_register, +-#endif +-}; +- +-static int ar0220_s_ctrl(struct v4l2_ctrl *ctrl) +-{ +- struct v4l2_subdev *sd = to_sd(ctrl); +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- int ret = -EINVAL; +- +- if (!priv->init_complete) +- return 0; +- +- switch (ctrl->id) { +- case V4L2_CID_BRIGHTNESS: +- case V4L2_CID_CONTRAST: +- case V4L2_CID_SATURATION: +- case V4L2_CID_HUE: +- case V4L2_CID_GAMMA: +- case V4L2_CID_SHARPNESS: +- case V4L2_CID_AUTOGAIN: +- case V4L2_CID_GAIN: +- case V4L2_CID_EXPOSURE: +- case V4L2_CID_HFLIP: +- case V4L2_CID_VFLIP: +- break; +- } +- +- return ret; +-} +- +-static const struct v4l2_ctrl_ops ar0220_ctrl_ops = { +- .s_ctrl = ar0220_s_ctrl, +-}; +- +-static struct v4l2_subdev_video_ops ar0220_video_ops = { +- .s_stream = ar0220_s_stream, +- .g_mbus_config = ar0220_g_mbus_config, +-}; +- +-static const struct v4l2_subdev_pad_ops ar0220_subdev_pad_ops = { +- .get_edid = ar0220_get_edid, +- .enum_mbus_code = ar0220_enum_mbus_code, +- .get_selection = ar0220_get_selection, +- .set_selection = ar0220_set_selection, +- .get_fmt = ar0220_get_fmt, +- .set_fmt = ar0220_set_fmt, +-}; +- +-static struct v4l2_subdev_ops ar0220_subdev_ops = { +- .core = &ar0220_core_ops, +- .video = &ar0220_video_ops, +- .pad = &ar0220_subdev_pad_ops, +-}; +- +-static void ar0220_otp_id_read(struct i2c_client *client) +-{ +-} +- +-static ssize_t ar0220_otp_id_show(struct device *dev, +- struct device_attribute *attr, char *buf) +-{ +- struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct ar0220_priv *priv = to_ar0220(client); +- +- return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", +- priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +-} +- +-static DEVICE_ATTR(otp_id_ar0220, S_IRUGO, ar0220_otp_id_show, NULL); +- +-static int ar0220_initialize(struct i2c_client *client) +-{ +- struct ar0220_priv *priv = to_ar0220(client); +- u16 val = 0; +- u16 pid = 0; +- int ret = 0; +- int tmp_addr; +- +- /* check and show model ID */ +- reg16_read16(client, AR0220_PID, &pid); +- +- if (pid != AR0220_VERSION_REG) { +- dev_dbg(&client->dev, "Product ID error %x\n", pid); +- ret = -ENODEV; +- goto err; +- } +- +- /* setup XCLK */ +- tmp_addr = client->addr; +- if (priv->ti9x4_addr) { +- /* CLK_OUT=22.5792*160*M/N/CLKDIV -> CLK_OUT=27MHz: CLKDIV=2, M=15, N=251: 22.5792*160/8*15/251=26.987MHz=CLK_OUT */ +- client->addr = priv->ti9x3_addr; /* Serializer I2C address */ +- reg8_write(client, 0x06, 0x6f); /* Set CLKDIV and M */ +- reg8_write(client, 0x07, 0xfb); /* Set N */ +- } +- client->addr = tmp_addr; +- +- /* Program wizard registers */ +- ar0220_set_regs(client, ar0220_regs_wizard, ARRAY_SIZE(ar0220_regs_wizard)); +- +- /* Enable stream */ +- reg16_read16(client, 0x301a, &val); // read inital reset_register value +- val |= (1 << 2); // Set streamOn bit +- reg16_write16(client, 0x301a, val); // Start Streaming +- +- /* Read OTP IDs */ +- ar0220_otp_id_read(client); +- +- dev_info(&client->dev, "ar0220 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", +- pid, AR0220_MAX_WIDTH, AR0220_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +-err: +- return ret; +-} +- +-static int ar0220_parse_dt(struct device_node *np, struct ar0220_priv *priv) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); +- int i; +- struct device_node *endpoint = NULL, *rendpoint = NULL; +- int tmp_addr = 0; +- +- for (i = 0; ; i++) { +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (!endpoint) +- break; +- +- +- rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); +- if (!rendpoint) +- continue; +- +- if (!of_property_read_u32(rendpoint, "ti9x3-addr", &priv->ti9x3_addr) && +- !of_property_match_string(rendpoint->parent->parent, "compatible", "ti,ti9x4") && +- !of_property_read_u32(rendpoint->parent->parent, "reg", &priv->ti9x4_addr) && +- !kstrtouint(strrchr(rendpoint->full_name, '@') + 1, 0, &priv->port)) +- break; +- } +- +- of_node_put(endpoint); +- +- if (!priv->ti9x4_addr) { +- dev_err(&client->dev, "deserializer does not present\n"); +- return -EINVAL; +- } +- +- /* setup I2C translator address */ +- tmp_addr = client->addr; +- if (priv->ti9x4_addr) { +- client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ +- +- reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ +- usleep_range(2000, 2500); /* wait 2ms */ +- reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ +- reg8_write(client, 0x5d, AR0220_I2C_ADDR << 1); /* Sensor native I2C address */ +- +-// reg8_write(client, 0x6e, 0xa9); /* GPIO0 - reset, GPIO1 - fsin */ +- } +- client->addr = tmp_addr; +- +- mdelay(10); +- +- return 0; +-} +- +-static int ar0220_probe(struct i2c_client *client, +- const struct i2c_device_id *did) +-{ +- struct ar0220_priv *priv; +- int ret; +- +- priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- v4l2_i2c_subdev_init(&priv->sd, client, &ar0220_subdev_ops); +- priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; +- +- priv->exposure = 0x100; +- priv->gain = 0x100; +- priv->autogain = 1; +- v4l2_ctrl_handler_init(&priv->hdl, 4); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_CONTRAST, 0, 16, 1, 7); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_SATURATION, 0, 7, 1, 2); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_HUE, 0, 23, 1, 12); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_GAMMA, -128, 128, 1, 0); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_SHARPNESS, 0, 10, 1, 3); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_GAIN, 0, 0xffff, 1, priv->gain); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_EXPOSURE, 0, 0xffff, 1, priv->exposure); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_HFLIP, 0, 1, 1, 1); +- v4l2_ctrl_new_std(&priv->hdl, &ar0220_ctrl_ops, +- V4L2_CID_VFLIP, 0, 1, 1, 0); +- priv->sd.ctrl_handler = &priv->hdl; +- +- ret = priv->hdl.error; +- if (ret) +- goto cleanup; +- +- v4l2_ctrl_handler_setup(&priv->hdl); +- +- priv->pad.flags = MEDIA_PAD_FL_SOURCE; +- priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; +- ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); +- if (ret < 0) +- goto cleanup; +- +- ret = ar0220_parse_dt(client->dev.of_node, priv); +- if (ret) +- goto cleanup; +- +- ret = ar0220_initialize(client); +- if (ret < 0) +- goto cleanup; +- +- priv->rect.left = 0; +- priv->rect.top = 0; +- priv->rect.width = AR0220_MAX_WIDTH; +- priv->rect.height = AR0220_MAX_HEIGHT; +- +- ret = v4l2_async_register_subdev(&priv->sd); +- if (ret) +- goto cleanup; +- +- if (device_create_file(&client->dev, &dev_attr_otp_id_ar0220) != 0) { +- dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); +- goto cleanup; +- } +- +- priv->init_complete = 1; +- +- return 0; +- +-cleanup: +- media_entity_cleanup(&priv->sd.entity); +- v4l2_ctrl_handler_free(&priv->hdl); +- v4l2_device_unregister_subdev(&priv->sd); +-#ifdef CONFIG_SOC_CAMERA_AR0220 +- v4l_err(client, "failed to probe @ 0x%02x (%s)\n", +- client->addr, client->adapter->name); +-#endif +- return ret; +-} +- +-static int ar0220_remove(struct i2c_client *client) +-{ +- struct ar0220_priv *priv = i2c_get_clientdata(client); +- +- device_remove_file(&client->dev, &dev_attr_otp_id_ar0220); +- v4l2_async_unregister_subdev(&priv->sd); +- media_entity_cleanup(&priv->sd.entity); +- v4l2_ctrl_handler_free(&priv->hdl); +- v4l2_device_unregister_subdev(&priv->sd); +- +- return 0; +-} +- +-#ifdef CONFIG_SOC_CAMERA_AR0220 +-static const struct i2c_device_id ar0220_id[] = { +- { "ar0220", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, ar0220_id); +- +-static const struct of_device_id ar0220_of_ids[] = { +- { .compatible = "aptina,ar0220", }, +- { } +-}; +-MODULE_DEVICE_TABLE(of, ar0220_of_ids); +- +-static struct i2c_driver ar0220_i2c_driver = { +- .driver = { +- .name = "ar0220", +- .of_match_table = ar0220_of_ids, +- }, +- .probe = ar0220_probe, +- .remove = ar0220_remove, +- .id_table = ar0220_id, +-}; +- +-module_i2c_driver(ar0220_i2c_driver); +- +-MODULE_DESCRIPTION("SoC Camera driver for AR0220"); +-MODULE_AUTHOR("Vladimir Barinov"); +-MODULE_LICENSE("GPL"); +-#endif +diff --git a/drivers/media/i2c/soc_camera/ar0220.h b/drivers/media/i2c/soc_camera/ar0220.h +index 205c351..e372a9c 100644 +--- a/drivers/media/i2c/soc_camera/ar0220.h ++++ b/drivers/media/i2c/soc_camera/ar0220.h +@@ -1,7 +1,7 @@ + /* +- * ON Semiconductor AR0220 sensor camera wizard 1820x940@44/RCCB/MIPI ++ * ON Semiconductor AR0220 sensor camera wizard 1848x948@30/BGGR/MIPI + * +- * Copyright (C) 2017 Cogent Embedded, Inc. ++ * Copyright (C) 2019 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -12,32 +12,15 @@ + //#define AR0220_DISPLAY_PATTERN_FIXED + //#define AR0220_DISPLAY_PATTERN_COLOR_BAR + +-#define AR0220_MAX_WIDTH 1820 +-#define AR0220_MAX_HEIGHT 944 ++#define AR0220_MAX_WIDTH 1828 ++#define AR0220_MAX_HEIGHT 948 + +-#define AR0220_DELAY 0xffff ++#define AR0220_SENSOR_WIDTH 1828 ++#define AR0220_SENSOR_HEIGHT 948 + +-struct ar0220_reg { +- u16 reg; +- u16 val; +-}; ++#define AR0220_X_START ((AR0220_SENSOR_WIDTH - AR0220_MAX_WIDTH) / 2) ++#define AR0220_Y_START ((AR0220_SENSOR_HEIGHT - AR0220_MAX_HEIGHT) / 2) ++#define AR0220_X_END (AR0220_X_START + AR0220_MAX_WIDTH - 1) ++#define AR0220_Y_END (AR0220_Y_START + AR0220_MAX_HEIGHT - 1) + +-static const struct ar0220_reg ar0220_regs_wizard[] = { +-{0x301A, 0x0018}, // RESET_REGISTER +-{AR0220_DELAY, 500}, // Wait 500ms +-{0x3070, 0x0000}, // 1: Solid color test pattern, +- // 2: Full color bar test pattern, +- // 3: Fade to grey color bar test pattern, +- //256: Walking 1 test pattern (12 bit) +-{0x3072, 0x0123}, // R +-{0x3074, 0x0456}, // G(GR row) +-{0x3076, 0x0abc}, // B +-{0x3078, 0x0def}, // G(GB row) +-#ifdef AR0220_DISPLAY_PATTERN_FIXED +-{0x3070, 0x0001}, +-#endif +-#ifdef AR0220_DISPLAY_PATTERN_COLOR_BAR +-{0x3070, 0x0002}, +-#endif +-{AR0220_DELAY, 100}, // Wait 100ms +-}; ++#include "ar0220_rev4.h" +diff --git a/drivers/media/i2c/soc_camera/ar0220_rev4.h b/drivers/media/i2c/soc_camera/ar0220_rev4.h +new file mode 100644 +index 0000000..55923a3 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ar0220_rev4.h +@@ -0,0 +1,370 @@ ++/* ++ * ON Semiconductor AR0220 sensor camera wizard 1848x944@30/BGGR/MIPI ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static const struct ar0xxx_reg ar0220_rev4_Reset[] = { ++{0x301A, 0x0018}, // Stream off and setup MIPI ++{AR_DELAY, 200}, ++{0x3070, 0x0000}, // 1: Solid color test pattern, ++ // 2: Full color bar test pattern, ++ // 3: Fade to grey color bar test pattern, ++ //256: Walking 1 test pattern (12 bit) ++{0x3072, 0x0123}, // R ++{0x3074, 0x0456}, // G(GR row) ++{0x3076, 0x0abc}, // B ++{0x3078, 0x0def}, // G(GB row) ++#ifdef AR0220_DISPLAY_PATTERN_FIXED ++{0x3070, 0x0001}, ++#endif ++#ifdef AR0220_DISPLAY_PATTERN_COLOR_BAR ++{0x3070, 0x0002}, ++#endif ++{AR_DELAY, 100}, ++{ } ++}; /* Reset */ ++ ++static const struct ar0xxx_reg ar0220_rev4_Recommended_Settings[] = { ++// Set the SREG_WRITE_ALL bit to remove potential higher current during intial standby ++{0x3500, 0x0100}, //This is a self clearing bit ++{AR_DELAY, 1}, //Delay => 4100 * Extclk ++ ++{0x3092, 0x0824}, // row noise dither enabled, dither scale=0 udpated 6/30/2017 ++{0x3096, 0x227C}, // row noise adjust top update 4/27/2017 with Jan-4 timing...YL ++{0x3098, 0x227C}, // row noise adjust bot update 4/27/2017 with Jan-4 timing...YL ++{0x3750, 0x227C}, // row noise adjust top gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x3752, 0x227C}, // row noise adjust btm gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x351C, 0x00B3}, // vaapix load cap=11, agnd load cap=3 updated 4/27 with Jan-4 timing...YL ++ ++{0x3364, 172}, // set dual conversion gain ratio (HCG/LCG) to 5.3x (~172/32) updated 3/29 ++{0x337A, 0x0BB8}, // dblc scale factor 0.733x, updated 4/25 ++ ++// DLO settings ++{0x3110, 0x0011}, // Pre-HDR gain enable; Pixel_width_enable ++// These settings match AR0138 REV3 settings ++{0x3100, 0x4000}, // dlo control. turn on dlo noise filter. set barrier dither select to 0 to match AR0138 ++{0x3102, 0x6060}, // "better" filter settings. This is S2=96 and range=6 ++{0x3104, 0x6060}, // T3 ++{0x3106, 0x6060}, // T4 ++ ++{0x32EC, 0x72A2}, // shut_ctrl2_t3_sh_adcance=2 ++{0x350E, 0x0F14}, // adc_pedestal_dither_en=15 (from 231) to minimize RTN periodical bumps... updated 8/9/17 ++ ++// boost settings ++// Load booster settings. Early CREV4 headboards and parts will require booster settings to be manually programmed, ++// while CREV4 ES samples have part-specific booster settings programmed in OTPM. Booster settings are instored in ++// following 4 registers: 0x3520, 0x3522, 0x3524, and 0x352C. (9/22/2017 Lin) ++// Remove soft trim booster settings for CRev3-1 sensors as they are boosters trimmed. (01/14/2018 Lin) ++//PYTHON= loadBoosterSettings() ++//{0x3520, 0x1288 // RSTHI=3.9v, use fine_code=18 and coarse_code=0, Casey's rec'd, updated 12/16, ++//{0x3522, 0x860C // ROWHI=3.6v, Vrst_lo for hcg_lg change from 8 to 6 for eclipse margin 9/27, HTOL updated 12/16, use fine_code=12 and coarse_code=0, Casey's rec'd ++//{0x3524, 0x0C12 // DCGHI=3.6v, TXHI=3.9v updated HTOL voltage 12/16 Casey's rec'd ++//{0x352c, 0x0012 // RSTWELLHI=3.9v using fine_code=18 and coarse_code=0 HTOL voltage updated 12/16 C. Hoekstra rec'd, ++//{0x3532, 0x826C // updated (12/14) ++{0x3528, 0x3633}, //update vtxlo for lcg_lg to 0.3V for blue blooming issue 6/1/2018 ++{0x3532, 0xAE6C}, // ECL settings updated (1/9 Lin) ++{0x353a, 0x9000}, // use AGND based boosters, enable continuous boost for RSTHI_WELL, TXHI_WELL (12/14) ++ ++{0x3540, 0xC63C}, // eclipse clamp updated 5/16 ++{0x3542, 0x4637}, // eclipse clamp updated 5/16 ++{0x3544, 0x3750}, // eclipse clamp updated 5/16 ++{0x3546, 0x5656}, // eclipse clamp updated 5/16 ++{0x3548, 0x5600}, // eclipse clamp updated 5/16 ++ ++//{0x3566, 0xBF38}, // col_mem settings, sa_park_en ++{0x3566, 0x3F28}, // col_mem settings, sa_park_en 5/2/2019 disable READOUT_PARK_ENABLE and SA_PARK_EN ++ ++{0x30BA, 0x0112}, // Add dither after delay buffer decompander ++{0x30BA, 0x0112}, //stop read back of dtest register from analog core to remove dark row on top 5/9 ++{ } ++}; /* Rev3 Recommended Settings */ ++ ++static const struct ar0xxx_reg ar0220_rev4_REV3_Optimized_Sequencer[] = { ++{0x2512, 0x8000}, ++{0x2510, 0x0905}, ++{0x2510, 0x3350}, ++{0x2510, 0x2004}, ++{0x2510, 0x1460}, ++{0x2510, 0x1578}, ++{0x2510, 0x1360}, ++{0x2510, 0x7B24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xEA24}, ++{0x2510, 0x1022}, ++{0x2510, 0x2410}, ++{0x2510, 0x155A}, ++{0x2510, 0x1342}, ++{0x2510, 0x1440}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24EA}, ++{0x2510, 0x2324}, ++{0x2510, 0x647A}, ++{0x2510, 0x2404}, ++{0x2510, 0x052C}, ++{0x2510, 0x400A}, ++{0x2510, 0xFF0A}, ++{0x2510, 0x850A}, ++{0x2510, 0x0608}, ++{0x2510, 0x3851}, ++{0x2510, 0x0905}, ++{0x2510, 0x15DC}, ++{0x2510, 0x134C}, ++{0x2510, 0x0004}, ++{0x2510, 0x0801}, ++{0x2510, 0x0408}, ++{0x2510, 0x1180}, ++{0x2510, 0x1002}, ++{0x2510, 0x1016}, ++{0x2510, 0x1181}, ++{0x2510, 0x1189}, ++{0x2510, 0x1056}, ++{0x2510, 0x1210}, ++{0x2510, 0x0D09}, ++{0x2510, 0x0714}, ++{0x2510, 0x4114}, ++{0x2510, 0x4009}, ++{0x2510, 0x0815}, ++{0x2510, 0xCC13}, ++{0x2510, 0xCC15}, ++{0x2510, 0x8813}, ++{0x2510, 0x8809}, ++{0x2510, 0x1111}, ++{0x2510, 0x9909}, ++{0x2510, 0x0B11}, ++{0x2510, 0xD909}, ++{0x2510, 0x0B12}, ++{0x2510, 0x1409}, ++{0x2510, 0x0112}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x1212}, ++{0x2510, 0x1011}, ++{0x2510, 0xDD11}, ++{0x2510, 0xD910}, ++{0x2510, 0x5609}, ++{0x2510, 0x1111}, ++{0x2510, 0xDB09}, ++{0x2510, 0x1D11}, ++{0x2510, 0xFB09}, ++{0x2510, 0x0911}, ++{0x2510, 0xBB12}, ++{0x2510, 0x1A12}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x5010}, ++{0x2510, 0xF610}, ++{0x2510, 0xE609}, ++{0x2510, 0x0315}, ++{0x2510, 0xAB13}, ++{0x2510, 0xAB12}, ++{0x2510, 0x4012}, ++{0x2510, 0x6009}, ++{0x2510, 0x2315}, ++{0x2510, 0x8809}, ++{0x2510, 0x0113}, ++{0x2510, 0x880B}, ++{0x2510, 0x0906}, ++{0x2510, 0x158D}, ++{0x2510, 0x138D}, ++{0x2510, 0x090B}, ++{0x2510, 0x1066}, ++{0x2510, 0x1588}, ++{0x2510, 0x1388}, ++{0x2510, 0x0C09}, ++{0x2510, 0x0410}, ++{0x2510, 0xE612}, ++{0x2510, 0x6212}, ++{0x2510, 0x6011}, ++{0x2510, 0xBF11}, ++{0x2510, 0xFB10}, ++{0x2510, 0x6609}, ++{0x2510, 0x3B11}, ++{0x2510, 0xBB12}, ++{0x2510, 0x6312}, ++{0x2510, 0x6009}, ++{0x2510, 0x0115}, ++{0x2510, 0x5A11}, ++{0x2510, 0xB812}, ++{0x2510, 0xA012}, ++{0x2510, 0x0010}, ++{0x2510, 0x2610}, ++{0x2510, 0x0013}, ++{0x2510, 0x0211}, ++{0x2510, 0x8014}, ++{0x2510, 0x007A}, ++{0x2510, 0x0611}, ++{0x2510, 0x0005}, ++{0x2510, 0x0708}, ++{0x2510, 0x4137}, ++{0x2510, 0x502C}, ++{0x2510, 0x2CFE}, ++{0x2510, 0x112C}, ++{AR_DELAY, 300}, ++ ++{0x1008, 0x02B6}, //fine_integration_time_min ++{0x100c, 0x0452}, //fine_integration_time2_min ++{0x100e, 0x05EE}, //fine_integration_time3_min ++{0x1010, 0x011A}, //fine_integration_time4_min ++ ++{0x3230, 0x0254}, //fine_correction ++{0x3232, 0x03F0}, //fine_correction2 ++{0x3234, 0x058C}, //fine_correction3 ++{0x3236, 0x00B8}, //fine_correction4 ++//{0x32e6, 0x009A}, //min_subrow ++{0x32e6, 0x00BC}, //min_subrow 188 2/6/2018 Lin ++{ } ++}; /* AR0220AT REV3 Optimized Sequencer */ ++ ++static const struct ar0xxx_reg ar0220_rev4_pll_23_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=23Mhz/2 *44/1/12 *2= 84Mhz - TI serializers */ ++{0x3030, 44}, //PLL_MULTIPLIER ++{0x302E, 2}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 23Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev4_pll_25_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=25Mhz/5 *102/1/12 *2= 85Mhz - IN-CAMERA REFCLK */ ++/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ ++{0x3030, 102}, //PLL_MULTIPLIER ++{0x302E, 5}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 25Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev4_pll_27_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=27Mhz/3 *56/1/12 *2= 84Mhz - IN-CAMERA REFCLK */ ++/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ ++{0x3030, 56}, //PLL_MULTIPLIER ++{0x302E, 3}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 27Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev4_Readout_Mode_Configuration[] = { ++{0x30A2, 1}, // x_odd_inc_ ++{0x30A6, 1}, // y_odd_inc_ ++{0x3040, 0}, // read_mode ++{ } ++}; /* Readout Mode Configuration */ ++ ++static const struct ar0xxx_reg ar0220_rev4_Full_Res_FOV[] = { ++{0x3004, AR0220_X_START}, // X_ADDR_START_ ++{0x3008, AR0220_X_END}, // X_ADDR_END_ ++{0x3002, AR0220_Y_START}, // Y_ADDR_START_ ++{0x3006, AR0220_Y_END}, // Y_ADDR_END_ ++{ } ++}; /* Full Res FOV */ ++ ++static const struct ar0xxx_reg ar0220_rev4_hdr_Timing_and_Exposure[] = { ++{0x3082, 0x8}, // operation_mode_ctrl ++{0x30BA, 0x1112}, // digital_ctrl: num_exp_max=2 ++#ifdef AR0231_EMBEDDED_LINE ++{0x3064, 0x1982}, // SMIA_TEST ++#else ++{0x3064, 0x1802}, // SMIA_TEST ++#endif ++//{0x33E0, 0xC80}, ++//{0x3180, 0x80}, ++//{0x33E4, 0x80}, ++ ++{0x306e, 9010}, // datapath_select,ime_mode,0 ++ ++{0x300A, AR0220_SENSOR_HEIGHT + 794}, // frame_length_lines_ (1742) ++{0x300C, AR0220_SENSOR_WIDTH/2 + 424}, // line_length_pck_ (1338) ++{0x3042, 0}, // extra_delay ++ ++{0x3238, 0x444}, // exposure_ratio ++{0x3012, 1000}, // coarse_integration_time_ ++{0x3014, 1526}, // fine_integration_time_ ++{0x321E, 1526}, // fine_integration_time2 ++{0x3222, 282}, // fine_integration_time3 ++{0x32EA, 0x3C0E}, ++//{0x32EC, 0x7151}, ++ ++{0x30B0, 0x800}, // enable_subrow_pair_reset ++{0x32E8, 637}, // max subrow margin for 3exp HDR ++{ } ++}; /* 3exp 36FPS Timing and Exposure */ ++ ++static const struct ar0xxx_reg ar0220_rev4_hdr_12bit_output[] = { ++{0x31D0, 1}, // companding ++{0x31AC, 0x140C}, // data_format_bits: RAW20, OUT12 ++{ } ++}; /* HDR Serial 4 lane 12 bit Output */ ++ ++static const struct ar0xxx_reg ar0220_rev4_mipi_12bit_4lane[] = { ++{0x31AE, 0x204}, // serial_format: MIPI 4 lanes ++//{0x3342, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x3346, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x334A, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x334E, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x3344, 0x0011}, // default, VC=0 ++//{0x3348, 0x0111}, // default, VC=1 ++//{0x334C, 0x0211}, // default, VC=2 ++//{0x3350, 0x0311}, // default, VC=3 ++{0x31B0, 0x46}, // frame_preamble ++{0x31B2, 0x31}, // line_preamble ++{0x31B4, 0x2144}, //MIPI_TIMING_0 update @504Mbps 12 bit, 04/17 ++{0x31B6, 0x3145}, //MIPI_TIMING_1 update @504Mbps 12 bit, 04/17 ++{0x31B8, 0x3147}, //MIPI_TIMING_2 update @504Mbps 12 bit, 04/17 ++{0x31BA, 0x0186}, //MIPI_TIMING_3 ++{0x31BC, 0x0785}, //MIPI_TIMING_4 ++{ } ++}; /* HDR MIPI 12 bit Settings */ ++ ++static const struct ar0xxx_reg ar0220_rev4_Recommended_HDR_Settings[] = { ++{ } ++}; /* Recommended HDR Settings */ ++ ++/* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ ++static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev4[] = { ++ ar0220_rev4_Reset, ++ ar0220_rev4_Recommended_Settings, ++ ar0220_rev4_pll_23_4lane_12b, ++ ar0220_rev4_Readout_Mode_Configuration, ++ ar0220_rev4_Full_Res_FOV, ++ ar0220_rev4_hdr_Timing_and_Exposure, ++ ar0220_rev4_hdr_12bit_output, ++ ar0220_rev4_mipi_12bit_4lane, ++ ar0220_rev4_Recommended_HDR_Settings, ++ NULL, ++}; ++ ++/* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ ++static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev3[] = { ++ ar0220_rev4_Reset, ++ ar0220_rev4_Recommended_Settings, ++ ar0220_rev4_REV3_Optimized_Sequencer, ++ ar0220_rev4_pll_23_4lane_12b, ++ ar0220_rev4_Readout_Mode_Configuration, ++ ar0220_rev4_Full_Res_FOV, ++ ar0220_rev4_hdr_Timing_and_Exposure, ++ ar0220_rev4_hdr_12bit_output, ++ ar0220_rev4_mipi_12bit_4lane, ++ ar0220_rev4_Recommended_HDR_Settings, ++ NULL, ++}; +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index 9294267..500fa75 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -1,7 +1,7 @@ + /* +- * ON Semiconductor AR0233 sensor camera driver ++ * ON Semiconductor AR0220/233 sensor camera driver + * +- * Copyright (C) 2018 Cogent Embedded, Inc. ++ * Copyright (C) 2018-2019 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -20,15 +20,33 @@ + #include + #include + ++#define AR_DELAY 0xffff ++static int AR_MAX_WIDTH; ++static int AR_MAX_HEIGHT; ++static int AR_X_START; ++static int AR_Y_START; ++static int AR_X_END; ++static int AR_Y_END; ++ ++struct ar0xxx_reg { ++ u16 reg; ++ u16 val; ++}; ++ ++#include "ar0220.h" + #include "ar0233.h" + + static const int ar0233_i2c_addr[] = {0x10, 0x20}; + +-#define AR0233_PID 0x3000 +-#define AR0233_REV 0x31FE +-#define AR0233_VERSION_REG 0x0956 ++#define AR_PID_REG 0x3000 ++#define AR_REV_REG 0x31FE + +-#define AR0233_MEDIA_BUS_FMT MEDIA_BUS_FMT_SGRBG12_1X12 ++enum { ++ AR0220_PID = 0x0C54, ++ AR0233_PID = 0x0956, ++} chipid; ++ ++#define AR_MEDIA_BUS_FMT MEDIA_BUS_FMT_SGRBG12_1X12 + + struct ar0233_priv { + struct v4l2_subdev sd; +@@ -57,9 +75,9 @@ static inline struct ar0233_priv *to_ar0233(const struct i2c_client *client) + return container_of(i2c_get_clientdata(client), struct ar0233_priv, sd); + } + +-static int ar0233_set_regs(struct i2c_client *client, const struct ar0233_reg **pregs) ++static int ar0233_set_regs(struct i2c_client *client, const struct ar0xxx_reg **pregs) + { +- const struct ar0233_reg *regs; ++ const struct ar0xxx_reg *regs; + int i, j; + + for (j = 0; ; j++) { +@@ -72,7 +90,7 @@ static int ar0233_set_regs(struct i2c_client *client, const struct ar0233_reg ** + if (!regs[i].reg && !regs[i].val) + break; + +- if (regs[i].reg == AR0233_DELAY) { ++ if (regs[i].reg == AR_DELAY) { + mdelay(regs[i].val); + continue; + } +@@ -97,13 +115,13 @@ static int ar0233_set_window(struct v4l2_subdev *sd) + dev_dbg(&client->dev, "L=%d T=%d %dx%d\n", priv->rect.left, priv->rect.top, priv->rect.width, priv->rect.height); + + /* horiz crop start */ +- reg16_write16(client, 0x3004, priv->rect.left + AR0233_X_START); ++ reg16_write16(client, 0x3004, priv->rect.left + AR_X_START); + /* horiz crop end */ +- reg16_write16(client, 0x3008, priv->rect.left + priv->rect.width - 1 + AR0233_X_START); ++ reg16_write16(client, 0x3008, priv->rect.left + priv->rect.width - 1 + AR_X_START); + /* vert crop start */ +- reg16_write16(client, 0x3002, priv->rect.top + AR0233_Y_START); ++ reg16_write16(client, 0x3002, priv->rect.top + AR_Y_START); + /* vert crop end */ +- reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR0233_Y_START); ++ reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR_Y_START); + + return 0; + }; +@@ -121,7 +139,7 @@ static int ar0233_get_fmt(struct v4l2_subdev *sd, + + mf->width = priv->rect.width; + mf->height = priv->rect.height; +- mf->code = AR0233_MEDIA_BUS_FMT; ++ mf->code = AR_MEDIA_BUS_FMT; + mf->colorspace = V4L2_COLORSPACE_SMPTE170M; + mf->field = V4L2_FIELD_NONE; + +@@ -134,7 +152,7 @@ static int ar0233_set_fmt(struct v4l2_subdev *sd, + { + struct v4l2_mbus_framefmt *mf = &format->format; + +- mf->code = AR0233_MEDIA_BUS_FMT; ++ mf->code = AR_MEDIA_BUS_FMT; + mf->colorspace = V4L2_COLORSPACE_SMPTE170M; + mf->field = V4L2_FIELD_NONE; + +@@ -151,7 +169,7 @@ static int ar0233_enum_mbus_code(struct v4l2_subdev *sd, + if (code->pad || code->index > 0) + return -EINVAL; + +- code->code = AR0233_MEDIA_BUS_FMT; ++ code->code = AR_MEDIA_BUS_FMT; + + return 0; + } +@@ -165,8 +183,8 @@ static int ar0233_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) + + edid->edid[6] = 0xff; + edid->edid[7] = client->addr; +- edid->edid[8] = AR0233_VERSION_REG >> 8; +- edid->edid[9] = AR0233_VERSION_REG & 0xff; ++ edid->edid[8] = chipid >> 8; ++ edid->edid[9] = chipid & 0xff; + + return 0; + } +@@ -188,8 +206,8 @@ static int ar0233_set_selection(struct v4l2_subdev *sd, + rect->width = ALIGN(rect->width, 2); + rect->height = ALIGN(rect->height, 2); + +- if ((rect->left + rect->width > AR0233_MAX_WIDTH) || +- (rect->top + rect->height > AR0233_MAX_HEIGHT)) ++ if ((rect->left + rect->width > AR_MAX_WIDTH) || ++ (rect->top + rect->height > AR_MAX_HEIGHT)) + *rect = priv->rect; + + priv->rect.left = rect->left; +@@ -216,14 +234,14 @@ static int ar0233_get_selection(struct v4l2_subdev *sd, + case V4L2_SEL_TGT_CROP_BOUNDS: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = AR0233_MAX_WIDTH; +- sel->r.height = AR0233_MAX_HEIGHT; ++ sel->r.width = AR_MAX_WIDTH; ++ sel->r.height = AR_MAX_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = AR0233_MAX_WIDTH; +- sel->r.height = AR0233_MAX_HEIGHT; ++ sel->r.width = AR_MAX_WIDTH; ++ sel->r.height = AR_MAX_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; +@@ -400,6 +418,7 @@ static DEVICE_ATTR(otp_id_ar0233, S_IRUGO, ar0233_otp_id_show, NULL); + static int ar0233_initialize(struct i2c_client *client) + { + struct ar0233_priv *priv = to_ar0233(client); ++ char chip_name[10] = "unknown"; + u16 val = 0; + u16 pid = 0, rev = 0; + int ret = 0; +@@ -416,42 +435,85 @@ static int ar0233_initialize(struct i2c_client *client) + client->addr = tmp_addr; + + /* check model ID */ +- reg16_read16(client, AR0233_PID, &pid); ++ reg16_read16(client, AR_PID_REG, &pid); + +- if (pid == AR0233_VERSION_REG) ++ if (pid == AR0220_PID || pid == AR0233_PID) + break; + } + +- if (pid != AR0233_VERSION_REG) { ++ if (pid != AR0220_PID && pid != AR0233_PID) { + dev_dbg(&client->dev, "Product ID error %x\n", pid); + ret = -ENODEV; + goto err; + } + + /* check revision */ +- reg16_read16(client, AR0233_REV, &rev); ++ reg16_read16(client, AR_REV_REG, &rev); + /* Read OTP IDs */ + ar0233_otp_id_read(client); +- /* Program wizard registers */ +- switch (rev & 0xf) { +- case 0x1: +- ar0233_set_regs(client, ar0233_regs_hdr_mipi_12bit_30fps_rev1); +- break; +- case 0x2: +- if (extclk == 27) { +- ar0233_regs_hdr_mipi_12bit_30fps_rev2[4] = ar0233_rev2_pll_27_102_4lane_12b; +- ar0233_regs_seplus_mipi_12bit_30fps_rev2[2] = ar0233_rev2_pll_27_102_4lane_12b; +- } + +- if (strcmp(mode, "hdr") == 0) +- ar0233_set_regs(client, ar0233_regs_hdr_mipi_12bit_30fps_rev2); +- else if (strcmp(mode, "seplus") == 0) +- ar0233_set_regs(client, ar0233_regs_seplus_mipi_12bit_30fps_rev2); +- else +- dev_err(&client->dev, "Unsupported mode %s\n", mode); +- break; +- default: +- dev_err(&client->dev, "Unsupported chip revision\n"); ++ switch (pid) { ++ case AR0220_PID: ++ chipid = ID_AR0220; ++ strncpy(chip_name, "AR0220", 10); ++ AR_MAX_WIDTH = AR0220_MAX_WIDTH; ++ AR_MAX_HEIGHT = AR0220_MAX_HEIGHT; ++ AR_X_START = AR0220_X_START; ++ AR_Y_START = AR0220_Y_START; ++ AR_X_END = AR0220_X_END; ++ AR_Y_END = AR0220_Y_END; ++ ++ switch (rev & 0xf) { ++ case 0x1: ++ case 0x2: ++ case 0x3: ++ if (extclk == 25) { ++ ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev4_pll_25_4lane_12b; ++ } ++ if (extclk == 27) { ++ ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev4_pll_27_4lane_12b; ++ } ++ ar0233_set_regs(client, ar0220_regs_hdr_mipi_12bit_36fps_rev3); ++ break; ++ case 0x4: ++ ar0233_set_regs(client, ar0220_regs_hdr_mipi_12bit_36fps_rev4); ++ break; ++ default: ++ dev_err(&client->dev, "Unsupported chip revision\n"); ++ } ++ break; ++ case AR0233_PID: ++ chipid = ID_AR0233; ++ strncpy(chip_name, "AR0233", 10); ++ AR_MAX_WIDTH = AR0233_MAX_WIDTH; ++ AR_MAX_HEIGHT = AR0233_MAX_HEIGHT; ++ AR_X_START = AR0233_X_START; ++ AR_Y_START = AR0233_Y_START; ++ AR_X_END = AR0233_X_END; ++ AR_Y_END = AR0233_Y_END; ++ ++ /* Program wizard registers */ ++ switch (rev & 0xf) { ++ case 0x1: ++ ar0233_set_regs(client, ar0233_regs_hdr_mipi_12bit_30fps_rev1); ++ break; ++ case 0x2: ++ if (extclk == 27) { ++ ar0233_regs_hdr_mipi_12bit_30fps_rev2[4] = ar0233_rev2_pll_27_102_4lane_12b; ++ ar0233_regs_seplus_mipi_12bit_30fps_rev2[2] = ar0233_rev2_pll_27_102_4lane_12b; ++ } ++ ++ if (strcmp(mode, "hdr") == 0) ++ ar0233_set_regs(client, ar0233_regs_hdr_mipi_12bit_30fps_rev2); ++ else if (strcmp(mode, "seplus") == 0) ++ ar0233_set_regs(client, ar0233_regs_seplus_mipi_12bit_30fps_rev2); ++ else ++ dev_err(&client->dev, "Unsupported mode %s\n", mode); ++ break; ++ default: ++ dev_err(&client->dev, "Unsupported chip revision\n"); ++ } ++ break; + } + + /* Enable trigger */ +@@ -468,8 +530,8 @@ static int ar0233_initialize(struct i2c_client *client) + val |= (1 << 2); // Set streamOn bit + reg16_write16(client, 0x301a, val); // Start Streaming + +- dev_info(&client->dev, "ar0233 PID %x (rev%x), res %dx%d, mode=%s, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", +- pid, rev & 0xf, AR0233_MAX_WIDTH, AR0233_MAX_HEIGHT, mode, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ dev_info(&client->dev, "%s PID %x (rev%x), res %dx%d, mode=%s, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", chip_name, ++ pid, rev & 0xf, AR_MAX_WIDTH, AR_MAX_HEIGHT, mode, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + err: + return ret; + } +@@ -586,8 +648,8 @@ static int ar0233_probe(struct i2c_client *client, + + priv->rect.left = 0; + priv->rect.top = 0; +- priv->rect.width = AR0233_MAX_WIDTH; +- priv->rect.height = AR0233_MAX_HEIGHT; ++ priv->rect.width = AR_MAX_WIDTH; ++ priv->rect.height = AR_MAX_HEIGHT; + + ret = v4l2_async_register_subdev(&priv->sd); + if (ret) +diff --git a/drivers/media/i2c/soc_camera/ar0233.h b/drivers/media/i2c/soc_camera/ar0233.h +index 5f2bada..33b661a 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.h ++++ b/drivers/media/i2c/soc_camera/ar0233.h +@@ -15,8 +15,6 @@ + #define AR0233_MAX_WIDTH 2048 + #define AR0233_MAX_HEIGHT 1280 + +-#define AR0233_DELAY 0xffff +- + #define AR0233_SENSOR_WIDTH 2072 + #define AR0233_SENSOR_HEIGHT 1296 + +@@ -25,10 +23,5 @@ + #define AR0233_X_END (AR0233_X_START + AR0233_MAX_WIDTH - 1) + #define AR0233_Y_END (AR0233_Y_START + AR0233_MAX_HEIGHT - 1) + +-struct ar0233_reg { +- u16 reg; +- u16 val; +-}; +- + #include "ar0233_rev1.h" + #include "ar0233_rev2.h" +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev1.h b/drivers/media/i2c/soc_camera/ar0233_rev1.h +index ddc1612..0389e51 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev1.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev1.h +@@ -9,9 +9,9 @@ + * option) any later version. + */ + +-static const struct ar0233_reg ar0233_rev1_Reset[] = { ++static const struct ar0xxx_reg ar0233_rev1_Reset[] = { + {0x301A, 0x0018}, // Stream off and setup MIPI +-{AR0233_DELAY, 200}, ++{AR_DELAY, 200}, + {0x3070, 0x0000}, // 1: Solid color test pattern, + // 2: Full color bar test pattern, + // 3: Fade to grey color bar test pattern, +@@ -26,11 +26,11 @@ static const struct ar0233_reg ar0233_rev1_Reset[] = { + #ifdef AR0233_DISPLAY_PATTERN_COLOR_BAR + {0x3070, 0x0002}, + #endif +-{AR0233_DELAY, 100}, ++{AR_DELAY, 100}, + { } + }; /* Reset */ + +-static const struct ar0233_reg ar0233_rev1_Sequencer_Settings[] = { ++static const struct ar0xxx_reg ar0233_rev1_Sequencer_Settings[] = { + /* Design_recommended_settings_v5 */ + {0x356C, 0xEA55}, //mte.Sensor.Register("DAC_LD_108_109").Value = 0xEA55& -- ADC write Memory delay 7 + {0x3566, 0x2407}, //mte.Sensor.Register("DAC_LD_102_103").Value = 0x2407& -- Enable column amp bypass for 1x +@@ -1095,12 +1095,12 @@ static const struct ar0233_reg ar0233_rev1_Sequencer_Settings[] = { + {0x2510, 0xffff}, + {0x2510, 0xffff}, + {0x2510, 0xffff}, +-{AR0233_DELAY, 100}, ++{AR_DELAY, 100}, + /* Sequencer_LFM_HDR_v6 */ + { } + }; /* Sequencer_Settings */ + +-static const struct ar0233_reg ar0233_rev1_HDR_3exp_12bit[] = { ++static const struct ar0xxx_reg ar0233_rev1_HDR_3exp_12bit[] = { + {0x3082, 0x8}, //num_exp = 3 + {0x3110, 0x11}, //Set bypass pix comb for HDR,Pre_hdr_gain_enable_07Jul + {0x30BA, 0x1122}, //num_exp_max =3 +@@ -1116,7 +1116,7 @@ static const struct ar0233_reg ar0233_rev1_HDR_3exp_12bit[] = { + { } + }; /* HDR_3exp_12bit */ + +-static const struct ar0233_reg ar0233_rev1_Serial_12bit_Timing_Setup_103p5[] = { ++static const struct ar0xxx_reg ar0233_rev1_Serial_12bit_Timing_Setup_103p5[] = { + /* PCLK=DES_REFCLK /PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 */ + /* PCLK=23MHz/2 *54/1/6= 103.5Mhz - TI serializers */ + {0x3030, 54}, //PLL_MULTIPLIER ; 0x3030 [11:0] +@@ -1129,7 +1129,7 @@ static const struct ar0233_reg ar0233_rev1_Serial_12bit_Timing_Setup_103p5[] = { + { } + }; /* Serial_12bit_Timing_Setup_103p5 */ + +-static const struct ar0233_reg ar0233_rev1_MIPI_4Lane_12BITS[] = { ++static const struct ar0xxx_reg ar0233_rev1_MIPI_4Lane_12BITS[] = { + {0x31AE, 0x204}, //MIPI enable, 4 lanes + {0x31B0, 0x4B}, //frame_preamble + {0x31B2, 0x33}, //line_preamble +@@ -1145,7 +1145,7 @@ static const struct ar0233_reg ar0233_rev1_MIPI_4Lane_12BITS[] = { + { } + }; /* MIPI_4Lane_12BITS */ + +-static const struct ar0233_reg ar0233_rev1_Full_resolution[] = { ++static const struct ar0xxx_reg ar0233_rev1_Full_resolution[] = { + {0x3004, AR0233_X_START}, // X_ADDR_START_ + {0x3008, AR0233_X_END}, // X_ADDR_END_ + {0x3002, AR0233_Y_START}, // Y_ADDR_START_ +@@ -1155,7 +1155,7 @@ static const struct ar0233_reg ar0233_rev1_Full_resolution[] = { + { } + }; /* Full_resolution */ + +-static const struct ar0233_reg ar0233_rev1_disable_embed_data_stat[] = { ++static const struct ar0xxx_reg ar0233_rev1_disable_embed_data_stat[] = { + {0x3040, 0xC000}, //Embedded stat2 and data2 rows, hflip/vflip=1 + #ifdef AR0233_EMBEDDED_LINE + {0x3064, 0x0180}, //Enable embedded data and stat +@@ -1165,7 +1165,7 @@ static const struct ar0233_reg ar0233_rev1_disable_embed_data_stat[] = { + { } + }; /* disable_embed_data_stat */ + +-static const struct ar0233_reg ar0233_rev1_Gain_3p28x[] = { ++static const struct ar0xxx_reg ar0233_rev1_Gain_3p28x[] = { + {0x3022, 0x01}, // GROUPED_PARAMETER_HOLD_ + {0x3362, 0x000F}, // DC_GAIN + {0x3366, 0x1111}, +@@ -1174,7 +1174,7 @@ static const struct ar0233_reg ar0233_rev1_Gain_3p28x[] = { + { } + }; /* Gain_3.28x */ + +-static const struct ar0233_reg ar0233_rev1_MEC_DLO_default[] = { ++static const struct ar0xxx_reg ar0233_rev1_MEC_DLO_default[] = { + {0x3D00, 0x6F73}, // control + {0x3D02, 0x0033}, + {0x3364, 0x068C}, // dcg_trim = 13.1 +@@ -1260,7 +1260,7 @@ static const struct ar0233_reg ar0233_rev1_MEC_DLO_default[] = { + }; /* MEC_DLO_default */ + + /* 3Exp HDR, 1280P, MIPI 4-lane 12-bit, 30fps, EXTCLK=23MHz (comes from deser) */ +-static const struct ar0233_reg *ar0233_regs_hdr_mipi_12bit_30fps_rev1[] = { ++static const struct ar0xxx_reg *ar0233_regs_hdr_mipi_12bit_30fps_rev1[] = { + ar0233_rev1_Reset, + ar0233_rev1_Sequencer_Settings, + ar0233_rev1_disable_embed_data_stat, +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev2.h b/drivers/media/i2c/soc_camera/ar0233_rev2.h +index 7085fbc..7f71056 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev2.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev2.h +@@ -9,9 +9,9 @@ + * option) any later version. + */ + +-static const struct ar0233_reg ar0233_rev2_Reset[] = { ++static const struct ar0xxx_reg ar0233_rev2_Reset[] = { + {0x301A, 0x0018}, // Stream off and setup MIPI +-{AR0233_DELAY, 200}, ++{AR_DELAY, 200}, + {0x3070, 0x0000}, // 1: Solid color test pattern, + // 2: Full color bar test pattern, + // 3: Fade to grey color bar test pattern, +@@ -26,11 +26,11 @@ static const struct ar0233_reg ar0233_rev2_Reset[] = { + #ifdef AR0233_DISPLAY_PATTERN_COLOR_BAR + {0x3070, 0x0002}, + #endif +-{AR0233_DELAY, 100}, ++{AR_DELAY, 100}, + { } + }; /* Reset */ + +-static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_LFM_HDR[] = { ++static const struct ar0xxx_reg ar0233_rev2_O1_Recommended_Defaults_LFM_HDR[] = { + /* Design_recommended_settings_REV2_V9 */ + {0x3C72, 0x0076}, + {0x3C74, 0x0031}, +@@ -1106,7 +1106,7 @@ static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_LFM_HDR[] = { + {0x2510, 0xffff}, + {0x2510, 0x3426}, + {0x2510, 0x3614}, +-{AR0233_DELAY, 100}, ++{AR_DELAY, 100}, + /* Sequence_hidy_ar0233_REV2_V13 */ + + /* Pre_hdr_gain_enable */ +@@ -1124,7 +1124,7 @@ static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_LFM_HDR[] = { + { } + }; /* O1_Recommended_Defaults_LFM_HDR */ + +-static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_SE_T1_LIN_T2[] = { ++static const struct ar0xxx_reg ar0233_rev2_O1_Recommended_Defaults_SE_T1_LIN_T2[] = { + /* Design_recommended_settings_REV2_seplus */ + {0x3086, 0x0000}, + {0x3092, 0x400C}, +@@ -2243,7 +2243,7 @@ static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_SE_T1_LIN_T2[ + {0x2510, 0xFFFF}, + {0x2510, 0xFFFF}, + {0x2510, 0xFFFF}, +-{AR0233_DELAY, 100}, ++{AR_DELAY, 100}, + /* Sequence_hidy_ar0233_REV2_seplus */ + + {0x3E14, 0x003F}, +@@ -2264,7 +2264,7 @@ static const struct ar0233_reg ar0233_rev2_O1_Recommended_Defaults_SE_T1_LIN_T2[ + { } + }; /* O1_Recommended_Defaults_SE_T1_LIN_T2 */ + +-static const struct ar0233_reg ar0233_rev2_disable_embed_data_stat[] = { ++static const struct ar0xxx_reg ar0233_rev2_disable_embed_data_stat[] = { + {0x3040, 0xC000}, //Embedded stat2 and data2 rows, hflip/vflip=1 + {0x350e, 0x2089}, // bit0 must be set for vflip=1 + #ifdef AR0233_EMBEDDED_LINE +@@ -2275,7 +2275,7 @@ static const struct ar0233_reg ar0233_rev2_disable_embed_data_stat[] = { + { } + }; /* disable_embed_data_stat */ + +-static const struct ar0233_reg ar0233_rev2_HDR_3exp_12bit[] = { ++static const struct ar0xxx_reg ar0233_rev2_HDR_3exp_12bit[] = { + {0x3082, 0x8}, //num_exp = 3 + {0x30BA, 0x1122}, //num_exp_max =3 + {0x31AC, 0x140C}, //12 bit output +@@ -2289,7 +2289,7 @@ static const struct ar0233_reg ar0233_rev2_HDR_3exp_12bit[] = { + { } + }; /* HDR_3exp_12bit */ + +-static const struct ar0233_reg ar0233_rev2_SEPLUS_12bit[] = { ++static const struct ar0xxx_reg ar0233_rev2_SEPLUS_12bit[] = { + {0x3082, 0x4}, //num_exp = 2 + {0x30BA, 0x1121}, //num_exp_max =2 + {0x31AC, 0x140C}, //12 bit output +@@ -2305,7 +2305,7 @@ static const struct ar0233_reg ar0233_rev2_SEPLUS_12bit[] = { + { } + }; /* HDR_3exp_12bit */ + +-static const struct ar0233_reg ar0233_rev2_pll_23_102_4lane_12b[] = { ++static const struct ar0xxx_reg ar0233_rev2_pll_23_102_4lane_12b[] = { + // serial_data_rate was *2 in REV1. but not in REV2 + /* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 */ + /* PCLK=23Mhz/0x3 *0x50/1/6= 102Mhz - TI serializers */ +@@ -2319,7 +2319,7 @@ static const struct ar0233_reg ar0233_rev2_pll_23_102_4lane_12b[] = { + { } + }; /* pll_23_102_4lane_12b */ + +-static const struct ar0233_reg ar0233_rev2_pll_27_102_4lane_12b[] = { ++static const struct ar0xxx_reg ar0233_rev2_pll_27_102_4lane_12b[] = { + // serial_data_rate was *2 in REV1. but not in REV2 + /* PCLK=27Mhz/0x3 *0x44/1/6= 102Mhz - TI serializers */ + {0x3030, 0x44}, //PLL_MULTIPLIER +@@ -2332,7 +2332,7 @@ static const struct ar0233_reg ar0233_rev2_pll_27_102_4lane_12b[] = { + { } + }; /* pll_27_102_4lane_12b */ + +-static const struct ar0233_reg ar0233_rev2_mipi_12bit_4lane[] = { ++static const struct ar0xxx_reg ar0233_rev2_mipi_12bit_4lane[] = { + {0x31AE, 0x204}, //serial type and lane + {0x31B0, 0x67}, //frame_preamble + {0x31B2, 0x30}, //line_preamble +@@ -2348,7 +2348,7 @@ static const struct ar0233_reg ar0233_rev2_mipi_12bit_4lane[] = { + { } + }; /* mipi_12bit_4lane */ + +-static const struct ar0233_reg ar0233_rev2_LUT_24_to_12[] = { ++static const struct ar0xxx_reg ar0233_rev2_LUT_24_to_12[] = { + {0x31AC, 0x180C}, + {0x31D0, 0x01}, //companding + {0x33DA, 0}, +@@ -2371,7 +2371,7 @@ static const struct ar0233_reg ar0233_rev2_LUT_24_to_12[] = { + { } + }; /* LUT_24_to_12 */ + +-static const struct ar0233_reg ar0233_rev2_Full_resolution[] = { ++static const struct ar0xxx_reg ar0233_rev2_Full_resolution[] = { + {0x3004, AR0233_X_START}, // X_ADDR_START_ + {0x3008, AR0233_X_END}, // X_ADDR_END_ + {0x3002, AR0233_Y_START}, // Y_ADDR_START_ +@@ -2381,14 +2381,14 @@ static const struct ar0233_reg ar0233_rev2_Full_resolution[] = { + { } + }; /* Full_resolution */ + +-static const struct ar0233_reg ar0233_rev2_HDR_ratio_gain_default[] = { ++static const struct ar0xxx_reg ar0233_rev2_HDR_ratio_gain_default[] = { + {0x3362, 0x000F}, //HCG + {0x3366, 0x1111}, //1x + {0x3238, 0x0444}, // Ratio 16x, Use retio setting + { } + }; /* HDR_ratio_gain_default */ + +-static const struct ar0233_reg ar0233_rev2_SEPLUS_ratio_gain_default[] = { ++static const struct ar0xxx_reg ar0233_rev2_SEPLUS_ratio_gain_default[] = { + {0x3362, 0x0001}, // DC_GAIN + {0x3238, 0x8446}, // EXPOSURE_RATIO + {0x562E, 0x0111}, // OCL_T1_GAIN_ +@@ -2401,7 +2401,7 @@ static const struct ar0233_reg ar0233_rev2_SEPLUS_ratio_gain_default[] = { + }; /* SEPLUS_ratio_gain_default */ + + /* 3Exp HDR, 1280P, MIPI 4-lane 12-bit, 30fps, EXTCLK=23MHz (comes from deser) */ +-static const struct ar0233_reg *ar0233_regs_hdr_mipi_12bit_30fps_rev2[] = { ++static const struct ar0xxx_reg *ar0233_regs_hdr_mipi_12bit_30fps_rev2[] = { + ar0233_rev2_Reset, + ar0233_rev2_O1_Recommended_Defaults_LFM_HDR, + ar0233_rev2_disable_embed_data_stat, +@@ -2415,7 +2415,7 @@ static const struct ar0233_reg *ar0233_regs_hdr_mipi_12bit_30fps_rev2[] = { + }; + + /* SE_T1 + Lin_T2, 1280P, MIPI 750MBPS 4-lane 12-bit, 30fps, EXTCLK=23MHz (comes from deser) */ +-static const struct ar0233_reg *ar0233_regs_seplus_mipi_12bit_30fps_rev2[] = { ++static const struct ar0xxx_reg *ar0233_regs_seplus_mipi_12bit_30fps_rev2[] = { + ar0233_rev2_Reset, + ar0233_rev2_Full_resolution, + ar0233_rev2_pll_23_102_4lane_12b, +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 08d3816..876b3c1 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -9,28 +9,6 @@ + * option) any later version. + */ + +-#include "ov10635.c" +-#include "ov10640.c" +-#include "ov490_ov10640.c" +-#include "ov495_ov2775.c" +-#include "ar0132.c" +-#include "ar0140.c" +-#include "ar0143.c" +-#include "ar0220.c" +-#include "ar0231.c" +-#include "ar0233.c" +-#include "ar0323.c" +-#include "ap0101_ar014x.c" +-#include "gw4200_ar014x.c" +-#include "gw5200_imx390.c" +-#include "ov2775.c" +-#include "imx390.c" +-#include "ox03a.c" +-#include "isx016.c" +-#include "isx019.c" +-#include "ov2311.c" +-#include "ar0147.c" +- + static enum { + ID_OV10635, + ID_OV10640, +@@ -55,6 +33,27 @@ static enum { + ID_OV2311, + } chip_id; + ++#include "ov10635.c" ++#include "ov10640.c" ++#include "ov490_ov10640.c" ++#include "ov495_ov2775.c" ++#include "ar0132.c" ++#include "ar0140.c" ++#include "ar0143.c" ++#include "ar0231.c" ++#include "ar0233.c" ++#include "ar0323.c" ++#include "ap0101_ar014x.c" ++#include "gw4200_ar014x.c" ++#include "gw5200_imx390.c" ++#include "ov2775.c" ++#include "imx390.c" ++#include "ox03a.c" ++#include "isx016.c" ++#include "isx019.c" ++#include "ov2311.c" ++#include "ar0147.c" ++ + static int ov106xx_probe(struct i2c_client *client, + const struct i2c_device_id *did) + { +@@ -145,12 +144,6 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + +- ret = ar0220_probe(client, did); +- if (!ret) { +- chip_id = ID_AR0220; +- goto out; +- } +- + ret = gw4200_probe(client, did); + if (!ret) { + chip_id = ID_GW4200_AR014X; +@@ -220,9 +213,6 @@ static int ov106xx_remove(struct i2c_client *client) + case ID_AR0147: + ar0147_remove(client); + break; +- case ID_AR0220: +- ar0220_remove(client); +- break; + case ID_AR0231: + ar0231_remove(client); + break; +@@ -259,6 +249,8 @@ static int ov106xx_remove(struct i2c_client *client) + case ID_OV2311: + ov2311_remove(client); + break; ++ default: ++ break; + }; + + return 0; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0433-media-i2c-ar0220-add-rev2-rev3.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0433-media-i2c-ar0220-add-rev2-rev3.patch new file mode 100644 index 00000000..96a30a14 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0433-media-i2c-ar0220-add-rev2-rev3.patch @@ -0,0 +1,1021 @@ +From 8bfe841bb241b2c0582a1f2a82aa3207efc9a282 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 18 Nov 2019 20:20:03 +0300 +Subject: [PATCH] media: i2c: ar0220: add rev2, rev3 + +This adds REV2, REV3 imager versions + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0220.h | 2 + + drivers/media/i2c/soc_camera/ar0220_rev2.h | 349 +++++++++++++++++++++++++++ + drivers/media/i2c/soc_camera/ar0220_rev3.h | 218 +++++++++++++++++ + drivers/media/i2c/soc_camera/ar0220_rev4.h | 364 +---------------------------- + drivers/media/i2c/soc_camera/ar0233.c | 19 +- + 5 files changed, 591 insertions(+), 361 deletions(-) + create mode 100644 drivers/media/i2c/soc_camera/ar0220_rev2.h + create mode 100644 drivers/media/i2c/soc_camera/ar0220_rev3.h + +diff --git a/drivers/media/i2c/soc_camera/ar0220.h b/drivers/media/i2c/soc_camera/ar0220.h +index e372a9c..59a949e 100644 +--- a/drivers/media/i2c/soc_camera/ar0220.h ++++ b/drivers/media/i2c/soc_camera/ar0220.h +@@ -23,4 +23,6 @@ + #define AR0220_X_END (AR0220_X_START + AR0220_MAX_WIDTH - 1) + #define AR0220_Y_END (AR0220_Y_START + AR0220_MAX_HEIGHT - 1) + ++#include "ar0220_rev2.h" ++#include "ar0220_rev3.h" + #include "ar0220_rev4.h" +diff --git a/drivers/media/i2c/soc_camera/ar0220_rev2.h b/drivers/media/i2c/soc_camera/ar0220_rev2.h +new file mode 100644 +index 0000000..c66872d +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ar0220_rev2.h +@@ -0,0 +1,349 @@ ++/* ++ * ON Semiconductor AR0220 sensor camera wizard 1848x944@30/BGGR/MIPI ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static const struct ar0xxx_reg ar0220_rev2_Reset[] = { ++{0x301A, 0x0018}, // Stream off and setup MIPI ++{AR_DELAY, 200}, ++{0x3070, 0x0000}, // 1: Solid color test pattern, ++ // 2: Full color bar test pattern, ++ // 3: Fade to grey color bar test pattern, ++ //256: Walking 1 test pattern (12 bit) ++{0x3072, 0x0123}, // R ++{0x3074, 0x0456}, // G(GR row) ++{0x3076, 0x0abc}, // B ++{0x3078, 0x0def}, // G(GB row) ++#ifdef AR0220_DISPLAY_PATTERN_FIXED ++{0x3070, 0x0001}, ++#endif ++#ifdef AR0220_DISPLAY_PATTERN_COLOR_BAR ++{0x3070, 0x0002}, ++#endif ++{AR_DELAY, 100}, ++{ } ++}; /* Reset */ ++ ++static const struct ar0xxx_reg ar0220_rev2_Recommended_Settings[] = { ++{0x3092, 0x0824}, // row noise dither enabled, dither scale=0 udpated 6/30/2017 ++{0x3096, 0x227C}, // row noise adjust top update 4/27/2017 with Jan-4 timing...YL ++{0x3098, 0x227C}, // row noise adjust bot update 4/27/2017 with Jan-4 timing...YL ++{0x3750, 0x227C}, // row noise adjust top gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x3752, 0x227C}, // row noise adjust btm gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x351C, 0x00B3}, // vaapix load cap=11, agnd load cap=3 updated 4/27 with Jan-4 timing...YL ++ ++{0x3364, 172}, // set dual conversion gain ratio (HCG/LCG) to 5.3x (~172/32) updated 3/29 ++{0x337A, 0x0BB8}, // dblc scale factor 0.733x, updated 4/25 ++ ++// DLO settings ++{0x3110, 0x0011}, // Pre-HDR gain enable; Pixel_width_enable ++// These settings match AR0138 REV3 settings ++{0x3100, 0x4000}, // dlo control. turn on dlo noise filter. set barrier dither select to 0 to match AR0138 ++{0x3102, 0x6060}, // "better" filter settings. This is S2=96 and range=6 ++{0x3104, 0x6060}, // T3 ++{0x3106, 0x6060}, // T4 ++ ++{0x32EC, 0x72A2}, // shut_ctrl2_t3_sh_adcance=2 ++{0x350E, 0x0F14}, // adc_pedestal_dither_en=15 (from 231) to minimize RTN periodical bumps... updated 8/9/17 ++ ++// boost settings ++// Load booster settings. Early CREV4 headboards and parts will require booster settings to be manually programmed, ++// while CREV4 ES samples have part-specific booster settings programmed in OTPM. Booster settings are instored in ++// following 4 registers: 0x3520, 0x3522, 0x3524, and 0x352C. (9/22/2017 Lin) ++// Remove soft trim booster settings for CRev3-1 sensors as they are boosters trimmed. (01/14/2018 Lin) ++//PYTHON= loadBoosterSettings() ++//{0x3520, 0x1288 // RSTHI=3.9v, use fine_code=18 and coarse_code=0, Casey's rec'd, updated 12/16, ++//{0x3522, 0x860C // ROWHI=3.6v, Vrst_lo for hcg_lg change from 8 to 6 for eclipse margin 9/27, HTOL updated 12/16, use fine_code=12 and coarse_code=0, Casey's rec'd ++//{0x3524, 0x0C12 // DCGHI=3.6v, TXHI=3.9v updated HTOL voltage 12/16 Casey's rec'd ++//{0x352c, 0x0012 // RSTWELLHI=3.9v using fine_code=18 and coarse_code=0 HTOL voltage updated 12/16 C. Hoekstra rec'd, ++{0x3532, 0x826C}, // updated (12/14) ++{0x3532, 0xAE6C}, // ECL settings updated (1/9 Lin) ++{0x353a, 0x9000}, // use AGND based boosters, enable continuous boost for RSTHI_WELL, TXHI_WELL (12/14) ++ ++{0x3540, 0xC63C}, // eclipse clamp updated 5/16 ++{0x3542, 0x4637}, // eclipse clamp updated 5/16 ++{0x3544, 0x3750}, // eclipse clamp updated 5/16 ++{0x3546, 0x5656}, // eclipse clamp updated 5/16 ++{0x3548, 0x5600}, // eclipse clamp updated 5/16 ++ ++{0x3566, 0xBF38}, // col_mem settings, sa_park_en ++ ++{0x30BA, 0x0112}, // Add dither after delay buffer decompander ++{0x30BA, 0x0112}, //stop read back of dtest register from analog core to remove dark row on top 5/9 ++{ } ++}; /* Rev2 Recommended Settings */ ++ ++static const struct ar0xxx_reg ar0220_rev2_REV2_Optimized_Sequencer[] = { ++{0x2512, 0x8000}, ++{0x2510, 0x0905}, ++{0x2510, 0x3350}, ++{0x2510, 0x2004}, ++{0x2510, 0x1460}, ++{0x2510, 0x1578}, ++{0x2510, 0x1360}, ++{0x2510, 0x7B24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xEA24}, ++{0x2510, 0x1022}, ++{0x2510, 0x2410}, ++{0x2510, 0x155A}, ++{0x2510, 0x1342}, ++{0x2510, 0x1440}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24EA}, ++{0x2510, 0x2324}, ++{0x2510, 0x647A}, ++{0x2510, 0x2404}, ++{0x2510, 0x052C}, ++{0x2510, 0x400A}, ++{0x2510, 0xFF0A}, ++{0x2510, 0x850A}, ++{0x2510, 0x0608}, ++{0x2510, 0x3851}, ++{0x2510, 0x0905}, ++{0x2510, 0x15DC}, ++{0x2510, 0x134C}, ++{0x2510, 0x0004}, ++{0x2510, 0x0801}, ++{0x2510, 0x0408}, ++{0x2510, 0x1180}, ++{0x2510, 0x1002}, ++{0x2510, 0x1016}, ++{0x2510, 0x1181}, ++{0x2510, 0x1189}, ++{0x2510, 0x1056}, ++{0x2510, 0x1210}, ++{0x2510, 0x0D09}, ++{0x2510, 0x0714}, ++{0x2510, 0x4114}, ++{0x2510, 0x4009}, ++{0x2510, 0x0815}, ++{0x2510, 0xCC13}, ++{0x2510, 0xCC15}, ++{0x2510, 0x8813}, ++{0x2510, 0x8809}, ++{0x2510, 0x1111}, ++{0x2510, 0x9909}, ++{0x2510, 0x0B11}, ++{0x2510, 0xD909}, ++{0x2510, 0x0B12}, ++{0x2510, 0x1409}, ++{0x2510, 0x0112}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x1212}, ++{0x2510, 0x1011}, ++{0x2510, 0xDD11}, ++{0x2510, 0xD910}, ++{0x2510, 0x5609}, ++{0x2510, 0x1111}, ++{0x2510, 0xDB09}, ++{0x2510, 0x1D11}, ++{0x2510, 0xFB09}, ++{0x2510, 0x0911}, ++{0x2510, 0xBB12}, ++{0x2510, 0x1A12}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x5010}, ++{0x2510, 0xF610}, ++{0x2510, 0xE609}, ++{0x2510, 0x0315}, ++{0x2510, 0xAB13}, ++{0x2510, 0xAB12}, ++{0x2510, 0x4012}, ++{0x2510, 0x6009}, ++{0x2510, 0x2315}, ++{0x2510, 0x8809}, ++{0x2510, 0x0113}, ++{0x2510, 0x880B}, ++{0x2510, 0x0906}, ++{0x2510, 0x158D}, ++{0x2510, 0x138D}, ++{0x2510, 0x090B}, ++{0x2510, 0x1066}, ++{0x2510, 0x1588}, ++{0x2510, 0x1388}, ++{0x2510, 0x0C09}, ++{0x2510, 0x0410}, ++{0x2510, 0xE612}, ++{0x2510, 0x6212}, ++{0x2510, 0x6011}, ++{0x2510, 0xBF11}, ++{0x2510, 0xFB10}, ++{0x2510, 0x6609}, ++{0x2510, 0x3B11}, ++{0x2510, 0xBB12}, ++{0x2510, 0x6312}, ++{0x2510, 0x6009}, ++{0x2510, 0x0115}, ++{0x2510, 0x5A11}, ++{0x2510, 0xB812}, ++{0x2510, 0xA012}, ++{0x2510, 0x0010}, ++{0x2510, 0x2610}, ++{0x2510, 0x0013}, ++{0x2510, 0x0211}, ++{0x2510, 0x8014}, ++{0x2510, 0x007A}, ++{0x2510, 0x0611}, ++{0x2510, 0x0005}, ++{0x2510, 0x0708}, ++{0x2510, 0x4137}, ++{0x2510, 0x502C}, ++{0x2510, 0x2CFE}, ++{0x2510, 0x112C}, ++{AR_DELAY, 300}, ++ ++{0x1008, 0x02B6}, //fine_integration_time_min ++{0x100c, 0x0452}, //fine_integration_time2_min ++{0x100e, 0x05EE}, //fine_integration_time3_min ++{0x1010, 0x011A}, //fine_integration_time4_min ++ ++{0x3230, 0x0254}, //fine_correction ++{0x3232, 0x03F0}, //fine_correction2 ++{0x3234, 0x058C}, //fine_correction3 ++{0x3236, 0x00B8}, //fine_correction4 ++{0x32e6, 0x009A}, //min_subrow ++{ } ++}; /* AR0220AT REV2 Optimized Sequencer */ ++ ++static const struct ar0xxx_reg ar0220_rev2_pll_23_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=23Mhz/2 *44/1/12 *2= 84Mhz - TI serializers */ ++{0x3030, 44}, //PLL_MULTIPLIER ++{0x302E, 2}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 23Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev2_pll_25_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=25Mhz/5 *102/1/12 *2= 85Mhz - IN-CAMERA REFCLK */ ++/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ ++{0x3030, 102}, //PLL_MULTIPLIER ++{0x302E, 5}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 25Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev2_pll_27_4lane_12b[] = { ++/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=27Mhz/3 *56/1/12 *2= 84Mhz - IN-CAMERA REFCLK */ ++/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ ++{0x3030, 56}, //PLL_MULTIPLIER ++{0x302E, 3}, //PRE_PLL_CLK_DIV ++{0x302C, 1}, //P1 divider (vt_sys_clk_div) ++{0x302A, 6}, //P2 divider (vt_pix_clk_div) ++{0x3038, 1}, //P3 divider (op_sys_clk_div) ++{0x3036, 12}, //P4 divider (op_word_clk_div) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++{ } ++}; /* PLL Setup Serial 4 lane 12-bit Output 27Mhz MCLK */ ++ ++static const struct ar0xxx_reg ar0220_rev2_Readout_Mode_Configuration[] = { ++{0x30A2, 1}, // x_odd_inc_ ++{0x30A6, 1}, // y_odd_inc_ ++{0x3040, 0}, // read_mode ++{ } ++}; /* Readout Mode Configuration */ ++ ++static const struct ar0xxx_reg ar0220_rev2_Full_Res_FOV[] = { ++{0x3004, AR0220_X_START}, // X_ADDR_START_ ++{0x3008, AR0220_X_END}, // X_ADDR_END_ ++{0x3002, AR0220_Y_START}, // Y_ADDR_START_ ++{0x3006, AR0220_Y_END}, // Y_ADDR_END_ ++{ } ++}; /* Full Res FOV */ ++ ++static const struct ar0xxx_reg ar0220_rev2_hdr_Timing_and_Exposure[] = { ++{0x3082, 0x8}, // operation_mode_ctrl ++{0x30BA, 0x1112}, // digital_ctrl: num_exp_max=2 ++#ifdef AR0231_EMBEDDED_LINE ++{0x3064, 0x1982}, // SMIA_TEST ++#else ++{0x3064, 0x1802}, // SMIA_TEST ++#endif ++//{0x33E0, 0xC80}, ++//{0x3180, 0x80}, ++//{0x33E4, 0x80}, ++ ++{0x306e, 9010}, // datapath_select,ime_mode,0 ++ ++{0x300A, AR0220_SENSOR_HEIGHT + 794}, // frame_length_lines_ (1742) ++{0x300C, AR0220_SENSOR_WIDTH/2 + 424}, // line_length_pck_ (1338) ++{0x3042, 0}, // extra_delay ++ ++{0x3238, 0x444}, // exposure_ratio ++{0x3012, 1000}, // coarse_integration_time_ ++{0x3014, 1526}, // fine_integration_time_ ++{0x321E, 1526}, // fine_integration_time2 ++{0x3222, 282}, // fine_integration_time3 ++{0x32EA, 0x3C0E}, ++//{0x32EC, 0x7151}, ++ ++{0x30B0, 0x800}, // enable_subrow_pair_reset ++{0x32E8, 637}, // max subrow margin for 3exp HDR ++{ } ++}; /* 3exp 36FPS Timing and Exposure */ ++ ++static const struct ar0xxx_reg ar0220_rev2_hdr_12bit_output[] = { ++{0x31D0, 1}, // companding ++{0x31AC, 0x140C}, // data_format_bits: RAW20, OUT12 ++{ } ++}; /* HDR Serial 4 lane 12 bit Output */ ++ ++static const struct ar0xxx_reg ar0220_rev2_mipi_12bit_4lane[] = { ++{0x31AE, 0x204}, // serial_format: MIPI 4 lanes ++//{0x3342, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x3346, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x334A, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x334E, 0x122C}, // default, DT=0x12, DT=0x2C ++//{0x3344, 0x0011}, // default, VC=0 ++//{0x3348, 0x0111}, // default, VC=1 ++//{0x334C, 0x0211}, // default, VC=2 ++//{0x3350, 0x0311}, // default, VC=3 ++{0x31B0, 0x46}, // frame_preamble ++{0x31B2, 0x31}, // line_preamble ++{0x31B4, 0x2144}, //MIPI_TIMING_0 update @504Mbps 12 bit, 04/17 ++{0x31B6, 0x3145}, //MIPI_TIMING_1 update @504Mbps 12 bit, 04/17 ++{0x31B8, 0x3147}, //MIPI_TIMING_2 update @504Mbps 12 bit, 04/17 ++{0x31BA, 0x0186}, //MIPI_TIMING_3 ++{0x31BC, 0x0785}, //MIPI_TIMING_4 ++{ } ++}; /* HDR MIPI 12 bit Settings */ ++ ++static const struct ar0xxx_reg ar0220_rev2_Recommended_HDR_Settings[] = { ++{ } ++}; /* Recommended HDR Settings */ ++ ++/* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ ++static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev2[] = { ++ ar0220_rev2_Reset, ++ ar0220_rev2_Recommended_Settings, ++ ar0220_rev2_REV2_Optimized_Sequencer, ++ ar0220_rev2_pll_23_4lane_12b, ++ ar0220_rev2_Readout_Mode_Configuration, ++ ar0220_rev2_Full_Res_FOV, ++ ar0220_rev2_hdr_Timing_and_Exposure, ++ ar0220_rev2_hdr_12bit_output, ++ ar0220_rev2_mipi_12bit_4lane, ++ ar0220_rev2_Recommended_HDR_Settings, ++ NULL, ++}; +diff --git a/drivers/media/i2c/soc_camera/ar0220_rev3.h b/drivers/media/i2c/soc_camera/ar0220_rev3.h +new file mode 100644 +index 0000000..6dad762 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ar0220_rev3.h +@@ -0,0 +1,218 @@ ++/* ++ * ON Semiconductor AR0220 sensor camera wizard 1848x944@30/BGGR/MIPI ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static const struct ar0xxx_reg ar0220_rev3_Recommended_Settings[] = { ++// Set the SREG_WRITE_ALL bit to remove potential higher current during intial standby ++{0x3500, 0x0100}, //This is a self clearing bit ++{AR_DELAY, 1}, //Delay => 4100 * Extclk ++ ++{0x3092, 0x0824}, // row noise dither enabled, dither scale=0 udpated 6/30/2017 ++{0x3096, 0x227C}, // row noise adjust top update 4/27/2017 with Jan-4 timing...YL ++{0x3098, 0x227C}, // row noise adjust bot update 4/27/2017 with Jan-4 timing...YL ++{0x3750, 0x227C}, // row noise adjust top gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x3752, 0x227C}, // row noise adjust btm gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL ++{0x351C, 0x00B3}, // vaapix load cap=11, agnd load cap=3 updated 4/27 with Jan-4 timing...YL ++ ++{0x3364, 172}, // set dual conversion gain ratio (HCG/LCG) to 5.3x (~172/32) updated 3/29 ++{0x337A, 0x0BB8}, // dblc scale factor 0.733x, updated 4/25 ++ ++// DLO settings ++{0x3110, 0x0011}, // Pre-HDR gain enable; Pixel_width_enable ++// These settings match AR0138 REV3 settings ++{0x3100, 0x4000}, // dlo control. turn on dlo noise filter. set barrier dither select to 0 to match AR0138 ++{0x3102, 0x6060}, // "better" filter settings. This is S2=96 and range=6 ++{0x3104, 0x6060}, // T3 ++{0x3106, 0x6060}, // T4 ++ ++{0x32EC, 0x72A2}, // shut_ctrl2_t3_sh_adcance=2 ++{0x350E, 0x0F14}, // adc_pedestal_dither_en=15 (from 231) to minimize RTN periodical bumps... updated 8/9/17 ++ ++// boost settings ++// Load booster settings. Early CREV4 headboards and parts will require booster settings to be manually programmed, ++// while CREV4 ES samples have part-specific booster settings programmed in OTPM. Booster settings are instored in ++// following 4 registers: 0x3520, 0x3522, 0x3524, and 0x352C. (9/22/2017 Lin) ++// Remove soft trim booster settings for CRev3-1 sensors as they are boosters trimmed. (01/14/2018 Lin) ++//PYTHON= loadBoosterSettings() ++//{0x3520, 0x1288 // RSTHI=3.9v, use fine_code=18 and coarse_code=0, Casey's rec'd, updated 12/16, ++//{0x3522, 0x860C // ROWHI=3.6v, Vrst_lo for hcg_lg change from 8 to 6 for eclipse margin 9/27, HTOL updated 12/16, use fine_code=12 and coarse_code=0, Casey's rec'd ++//{0x3524, 0x0C12 // DCGHI=3.6v, TXHI=3.9v updated HTOL voltage 12/16 Casey's rec'd ++//{0x352c, 0x0012 // RSTWELLHI=3.9v using fine_code=18 and coarse_code=0 HTOL voltage updated 12/16 C. Hoekstra rec'd, ++//{0x3532, 0x826C // updated (12/14) ++{0x3528, 0x3633}, //update vtxlo for lcg_lg to 0.3V for blue blooming issue 6/1/2018 ++{0x3532, 0xAE6C}, // ECL settings updated (1/9 Lin) ++{0x353a, 0x9000}, // use AGND based boosters, enable continuous boost for RSTHI_WELL, TXHI_WELL (12/14) ++ ++{0x3540, 0xC63C}, // eclipse clamp updated 5/16 ++{0x3542, 0x4637}, // eclipse clamp updated 5/16 ++{0x3544, 0x3750}, // eclipse clamp updated 5/16 ++{0x3546, 0x5656}, // eclipse clamp updated 5/16 ++{0x3548, 0x5600}, // eclipse clamp updated 5/16 ++ ++//{0x3566, 0xBF38}, // col_mem settings, sa_park_en ++{0x3566, 0x3F28}, // col_mem settings, sa_park_en 5/2/2019 disable READOUT_PARK_ENABLE and SA_PARK_EN ++ ++{0x30BA, 0x0112}, // Add dither after delay buffer decompander ++{0x30BA, 0x0112}, //stop read back of dtest register from analog core to remove dark row on top 5/9 ++{ } ++}; /* Rev3 Recommended Settings */ ++ ++static const struct ar0xxx_reg ar0220_rev3_REV3_Optimized_Sequencer[] = { ++{0x2512, 0x8000}, ++{0x2510, 0x0905}, ++{0x2510, 0x3350}, ++{0x2510, 0x2004}, ++{0x2510, 0x1460}, ++{0x2510, 0x1578}, ++{0x2510, 0x1360}, ++{0x2510, 0x7B24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xEA24}, ++{0x2510, 0x1022}, ++{0x2510, 0x2410}, ++{0x2510, 0x155A}, ++{0x2510, 0x1342}, ++{0x2510, 0x1440}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24EA}, ++{0x2510, 0x2324}, ++{0x2510, 0x647A}, ++{0x2510, 0x2404}, ++{0x2510, 0x052C}, ++{0x2510, 0x400A}, ++{0x2510, 0xFF0A}, ++{0x2510, 0x850A}, ++{0x2510, 0x0608}, ++{0x2510, 0x3851}, ++{0x2510, 0x0905}, ++{0x2510, 0x15DC}, ++{0x2510, 0x134C}, ++{0x2510, 0x0004}, ++{0x2510, 0x0801}, ++{0x2510, 0x0408}, ++{0x2510, 0x1180}, ++{0x2510, 0x1002}, ++{0x2510, 0x1016}, ++{0x2510, 0x1181}, ++{0x2510, 0x1189}, ++{0x2510, 0x1056}, ++{0x2510, 0x1210}, ++{0x2510, 0x0D09}, ++{0x2510, 0x0714}, ++{0x2510, 0x4114}, ++{0x2510, 0x4009}, ++{0x2510, 0x0815}, ++{0x2510, 0xCC13}, ++{0x2510, 0xCC15}, ++{0x2510, 0x8813}, ++{0x2510, 0x8809}, ++{0x2510, 0x1111}, ++{0x2510, 0x9909}, ++{0x2510, 0x0B11}, ++{0x2510, 0xD909}, ++{0x2510, 0x0B12}, ++{0x2510, 0x1409}, ++{0x2510, 0x0112}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x1212}, ++{0x2510, 0x1011}, ++{0x2510, 0xDD11}, ++{0x2510, 0xD910}, ++{0x2510, 0x5609}, ++{0x2510, 0x1111}, ++{0x2510, 0xDB09}, ++{0x2510, 0x1D11}, ++{0x2510, 0xFB09}, ++{0x2510, 0x0911}, ++{0x2510, 0xBB12}, ++{0x2510, 0x1A12}, ++{0x2510, 0x1010}, ++{0x2510, 0xD612}, ++{0x2510, 0x5010}, ++{0x2510, 0xF610}, ++{0x2510, 0xE609}, ++{0x2510, 0x0315}, ++{0x2510, 0xAB13}, ++{0x2510, 0xAB12}, ++{0x2510, 0x4012}, ++{0x2510, 0x6009}, ++{0x2510, 0x2315}, ++{0x2510, 0x8809}, ++{0x2510, 0x0113}, ++{0x2510, 0x880B}, ++{0x2510, 0x0906}, ++{0x2510, 0x158D}, ++{0x2510, 0x138D}, ++{0x2510, 0x090B}, ++{0x2510, 0x1066}, ++{0x2510, 0x1588}, ++{0x2510, 0x1388}, ++{0x2510, 0x0C09}, ++{0x2510, 0x0410}, ++{0x2510, 0xE612}, ++{0x2510, 0x6212}, ++{0x2510, 0x6011}, ++{0x2510, 0xBF11}, ++{0x2510, 0xFB10}, ++{0x2510, 0x6609}, ++{0x2510, 0x3B11}, ++{0x2510, 0xBB12}, ++{0x2510, 0x6312}, ++{0x2510, 0x6009}, ++{0x2510, 0x0115}, ++{0x2510, 0x5A11}, ++{0x2510, 0xB812}, ++{0x2510, 0xA012}, ++{0x2510, 0x0010}, ++{0x2510, 0x2610}, ++{0x2510, 0x0013}, ++{0x2510, 0x0211}, ++{0x2510, 0x8014}, ++{0x2510, 0x007A}, ++{0x2510, 0x0611}, ++{0x2510, 0x0005}, ++{0x2510, 0x0708}, ++{0x2510, 0x4137}, ++{0x2510, 0x502C}, ++{0x2510, 0x2CFE}, ++{0x2510, 0x112C}, ++{AR_DELAY, 300}, ++ ++{0x1008, 0x02B6}, //fine_integration_time_min ++{0x100c, 0x0452}, //fine_integration_time2_min ++{0x100e, 0x05EE}, //fine_integration_time3_min ++{0x1010, 0x011A}, //fine_integration_time4_min ++ ++{0x3230, 0x0254}, //fine_correction ++{0x3232, 0x03F0}, //fine_correction2 ++{0x3234, 0x058C}, //fine_correction3 ++{0x3236, 0x00B8}, //fine_correction4 ++//{0x32e6, 0x009A}, //min_subrow ++{0x32e6, 0x00BC}, //min_subrow 188 2/6/2018 Lin ++{ } ++}; /* AR0220AT REV3 Optimized Sequencer */ ++ ++/* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ ++static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev3[] = { ++ ar0220_rev2_Reset, ++ ar0220_rev3_Recommended_Settings, ++ ar0220_rev3_REV3_Optimized_Sequencer, ++ ar0220_rev2_pll_23_4lane_12b, ++ ar0220_rev2_Readout_Mode_Configuration, ++ ar0220_rev2_Full_Res_FOV, ++ ar0220_rev2_hdr_Timing_and_Exposure, ++ ar0220_rev2_hdr_12bit_output, ++ ar0220_rev2_mipi_12bit_4lane, ++ ar0220_rev2_Recommended_HDR_Settings, ++ NULL, ++}; +diff --git a/drivers/media/i2c/soc_camera/ar0220_rev4.h b/drivers/media/i2c/soc_camera/ar0220_rev4.h +index 55923a3..14dfe13 100644 +--- a/drivers/media/i2c/soc_camera/ar0220_rev4.h ++++ b/drivers/media/i2c/soc_camera/ar0220_rev4.h +@@ -9,362 +9,16 @@ + * option) any later version. + */ + +-static const struct ar0xxx_reg ar0220_rev4_Reset[] = { +-{0x301A, 0x0018}, // Stream off and setup MIPI +-{AR_DELAY, 200}, +-{0x3070, 0x0000}, // 1: Solid color test pattern, +- // 2: Full color bar test pattern, +- // 3: Fade to grey color bar test pattern, +- //256: Walking 1 test pattern (12 bit) +-{0x3072, 0x0123}, // R +-{0x3074, 0x0456}, // G(GR row) +-{0x3076, 0x0abc}, // B +-{0x3078, 0x0def}, // G(GB row) +-#ifdef AR0220_DISPLAY_PATTERN_FIXED +-{0x3070, 0x0001}, +-#endif +-#ifdef AR0220_DISPLAY_PATTERN_COLOR_BAR +-{0x3070, 0x0002}, +-#endif +-{AR_DELAY, 100}, +-{ } +-}; /* Reset */ +- +-static const struct ar0xxx_reg ar0220_rev4_Recommended_Settings[] = { +-// Set the SREG_WRITE_ALL bit to remove potential higher current during intial standby +-{0x3500, 0x0100}, //This is a self clearing bit +-{AR_DELAY, 1}, //Delay => 4100 * Extclk +- +-{0x3092, 0x0824}, // row noise dither enabled, dither scale=0 udpated 6/30/2017 +-{0x3096, 0x227C}, // row noise adjust top update 4/27/2017 with Jan-4 timing...YL +-{0x3098, 0x227C}, // row noise adjust bot update 4/27/2017 with Jan-4 timing...YL +-{0x3750, 0x227C}, // row noise adjust top gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL +-{0x3752, 0x227C}, // row noise adjust btm gain ... these are for T1, 4/27/2017 with Jan-4 timing...YL +-{0x351C, 0x00B3}, // vaapix load cap=11, agnd load cap=3 updated 4/27 with Jan-4 timing...YL +- +-{0x3364, 172}, // set dual conversion gain ratio (HCG/LCG) to 5.3x (~172/32) updated 3/29 +-{0x337A, 0x0BB8}, // dblc scale factor 0.733x, updated 4/25 +- +-// DLO settings +-{0x3110, 0x0011}, // Pre-HDR gain enable; Pixel_width_enable +-// These settings match AR0138 REV3 settings +-{0x3100, 0x4000}, // dlo control. turn on dlo noise filter. set barrier dither select to 0 to match AR0138 +-{0x3102, 0x6060}, // "better" filter settings. This is S2=96 and range=6 +-{0x3104, 0x6060}, // T3 +-{0x3106, 0x6060}, // T4 +- +-{0x32EC, 0x72A2}, // shut_ctrl2_t3_sh_adcance=2 +-{0x350E, 0x0F14}, // adc_pedestal_dither_en=15 (from 231) to minimize RTN periodical bumps... updated 8/9/17 +- +-// boost settings +-// Load booster settings. Early CREV4 headboards and parts will require booster settings to be manually programmed, +-// while CREV4 ES samples have part-specific booster settings programmed in OTPM. Booster settings are instored in +-// following 4 registers: 0x3520, 0x3522, 0x3524, and 0x352C. (9/22/2017 Lin) +-// Remove soft trim booster settings for CRev3-1 sensors as they are boosters trimmed. (01/14/2018 Lin) +-//PYTHON= loadBoosterSettings() +-//{0x3520, 0x1288 // RSTHI=3.9v, use fine_code=18 and coarse_code=0, Casey's rec'd, updated 12/16, +-//{0x3522, 0x860C // ROWHI=3.6v, Vrst_lo for hcg_lg change from 8 to 6 for eclipse margin 9/27, HTOL updated 12/16, use fine_code=12 and coarse_code=0, Casey's rec'd +-//{0x3524, 0x0C12 // DCGHI=3.6v, TXHI=3.9v updated HTOL voltage 12/16 Casey's rec'd +-//{0x352c, 0x0012 // RSTWELLHI=3.9v using fine_code=18 and coarse_code=0 HTOL voltage updated 12/16 C. Hoekstra rec'd, +-//{0x3532, 0x826C // updated (12/14) +-{0x3528, 0x3633}, //update vtxlo for lcg_lg to 0.3V for blue blooming issue 6/1/2018 +-{0x3532, 0xAE6C}, // ECL settings updated (1/9 Lin) +-{0x353a, 0x9000}, // use AGND based boosters, enable continuous boost for RSTHI_WELL, TXHI_WELL (12/14) +- +-{0x3540, 0xC63C}, // eclipse clamp updated 5/16 +-{0x3542, 0x4637}, // eclipse clamp updated 5/16 +-{0x3544, 0x3750}, // eclipse clamp updated 5/16 +-{0x3546, 0x5656}, // eclipse clamp updated 5/16 +-{0x3548, 0x5600}, // eclipse clamp updated 5/16 +- +-//{0x3566, 0xBF38}, // col_mem settings, sa_park_en +-{0x3566, 0x3F28}, // col_mem settings, sa_park_en 5/2/2019 disable READOUT_PARK_ENABLE and SA_PARK_EN +- +-{0x30BA, 0x0112}, // Add dither after delay buffer decompander +-{0x30BA, 0x0112}, //stop read back of dtest register from analog core to remove dark row on top 5/9 +-{ } +-}; /* Rev3 Recommended Settings */ +- +-static const struct ar0xxx_reg ar0220_rev4_REV3_Optimized_Sequencer[] = { +-{0x2512, 0x8000}, +-{0x2510, 0x0905}, +-{0x2510, 0x3350}, +-{0x2510, 0x2004}, +-{0x2510, 0x1460}, +-{0x2510, 0x1578}, +-{0x2510, 0x1360}, +-{0x2510, 0x7B24}, +-{0x2510, 0xFF24}, +-{0x2510, 0xFF24}, +-{0x2510, 0xEA24}, +-{0x2510, 0x1022}, +-{0x2510, 0x2410}, +-{0x2510, 0x155A}, +-{0x2510, 0x1342}, +-{0x2510, 0x1440}, +-{0x2510, 0x24FF}, +-{0x2510, 0x24FF}, +-{0x2510, 0x24EA}, +-{0x2510, 0x2324}, +-{0x2510, 0x647A}, +-{0x2510, 0x2404}, +-{0x2510, 0x052C}, +-{0x2510, 0x400A}, +-{0x2510, 0xFF0A}, +-{0x2510, 0x850A}, +-{0x2510, 0x0608}, +-{0x2510, 0x3851}, +-{0x2510, 0x0905}, +-{0x2510, 0x15DC}, +-{0x2510, 0x134C}, +-{0x2510, 0x0004}, +-{0x2510, 0x0801}, +-{0x2510, 0x0408}, +-{0x2510, 0x1180}, +-{0x2510, 0x1002}, +-{0x2510, 0x1016}, +-{0x2510, 0x1181}, +-{0x2510, 0x1189}, +-{0x2510, 0x1056}, +-{0x2510, 0x1210}, +-{0x2510, 0x0D09}, +-{0x2510, 0x0714}, +-{0x2510, 0x4114}, +-{0x2510, 0x4009}, +-{0x2510, 0x0815}, +-{0x2510, 0xCC13}, +-{0x2510, 0xCC15}, +-{0x2510, 0x8813}, +-{0x2510, 0x8809}, +-{0x2510, 0x1111}, +-{0x2510, 0x9909}, +-{0x2510, 0x0B11}, +-{0x2510, 0xD909}, +-{0x2510, 0x0B12}, +-{0x2510, 0x1409}, +-{0x2510, 0x0112}, +-{0x2510, 0x1010}, +-{0x2510, 0xD612}, +-{0x2510, 0x1212}, +-{0x2510, 0x1011}, +-{0x2510, 0xDD11}, +-{0x2510, 0xD910}, +-{0x2510, 0x5609}, +-{0x2510, 0x1111}, +-{0x2510, 0xDB09}, +-{0x2510, 0x1D11}, +-{0x2510, 0xFB09}, +-{0x2510, 0x0911}, +-{0x2510, 0xBB12}, +-{0x2510, 0x1A12}, +-{0x2510, 0x1010}, +-{0x2510, 0xD612}, +-{0x2510, 0x5010}, +-{0x2510, 0xF610}, +-{0x2510, 0xE609}, +-{0x2510, 0x0315}, +-{0x2510, 0xAB13}, +-{0x2510, 0xAB12}, +-{0x2510, 0x4012}, +-{0x2510, 0x6009}, +-{0x2510, 0x2315}, +-{0x2510, 0x8809}, +-{0x2510, 0x0113}, +-{0x2510, 0x880B}, +-{0x2510, 0x0906}, +-{0x2510, 0x158D}, +-{0x2510, 0x138D}, +-{0x2510, 0x090B}, +-{0x2510, 0x1066}, +-{0x2510, 0x1588}, +-{0x2510, 0x1388}, +-{0x2510, 0x0C09}, +-{0x2510, 0x0410}, +-{0x2510, 0xE612}, +-{0x2510, 0x6212}, +-{0x2510, 0x6011}, +-{0x2510, 0xBF11}, +-{0x2510, 0xFB10}, +-{0x2510, 0x6609}, +-{0x2510, 0x3B11}, +-{0x2510, 0xBB12}, +-{0x2510, 0x6312}, +-{0x2510, 0x6009}, +-{0x2510, 0x0115}, +-{0x2510, 0x5A11}, +-{0x2510, 0xB812}, +-{0x2510, 0xA012}, +-{0x2510, 0x0010}, +-{0x2510, 0x2610}, +-{0x2510, 0x0013}, +-{0x2510, 0x0211}, +-{0x2510, 0x8014}, +-{0x2510, 0x007A}, +-{0x2510, 0x0611}, +-{0x2510, 0x0005}, +-{0x2510, 0x0708}, +-{0x2510, 0x4137}, +-{0x2510, 0x502C}, +-{0x2510, 0x2CFE}, +-{0x2510, 0x112C}, +-{AR_DELAY, 300}, +- +-{0x1008, 0x02B6}, //fine_integration_time_min +-{0x100c, 0x0452}, //fine_integration_time2_min +-{0x100e, 0x05EE}, //fine_integration_time3_min +-{0x1010, 0x011A}, //fine_integration_time4_min +- +-{0x3230, 0x0254}, //fine_correction +-{0x3232, 0x03F0}, //fine_correction2 +-{0x3234, 0x058C}, //fine_correction3 +-{0x3236, 0x00B8}, //fine_correction4 +-//{0x32e6, 0x009A}, //min_subrow +-{0x32e6, 0x00BC}, //min_subrow 188 2/6/2018 Lin +-{ } +-}; /* AR0220AT REV3 Optimized Sequencer */ +- +-static const struct ar0xxx_reg ar0220_rev4_pll_23_4lane_12b[] = { +-/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ +-/* PCLK=23Mhz/2 *44/1/12 *2= 84Mhz - TI serializers */ +-{0x3030, 44}, //PLL_MULTIPLIER +-{0x302E, 2}, //PRE_PLL_CLK_DIV +-{0x302C, 1}, //P1 divider (vt_sys_clk_div) +-{0x302A, 6}, //P2 divider (vt_pix_clk_div) +-{0x3038, 1}, //P3 divider (op_sys_clk_div) +-{0x3036, 12}, //P4 divider (op_word_clk_div) +-{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 +-{ } +-}; /* PLL Setup Serial 4 lane 12-bit Output 23Mhz MCLK */ +- +-static const struct ar0xxx_reg ar0220_rev4_pll_25_4lane_12b[] = { +-/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ +-/* PCLK=25Mhz/5 *102/1/12 *2= 85Mhz - IN-CAMERA REFCLK */ +-/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ +-{0x3030, 102}, //PLL_MULTIPLIER +-{0x302E, 5}, //PRE_PLL_CLK_DIV +-{0x302C, 1}, //P1 divider (vt_sys_clk_div) +-{0x302A, 6}, //P2 divider (vt_pix_clk_div) +-{0x3038, 1}, //P3 divider (op_sys_clk_div) +-{0x3036, 12}, //P4 divider (op_word_clk_div) +-{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 +-{ } +-}; /* PLL Setup Serial 4 lane 12-bit Output 25Mhz MCLK */ +- +-static const struct ar0xxx_reg ar0220_rev4_pll_27_4lane_12b[] = { +-/* PCLK=DES_REFCLK/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ +-/* PCLK=27Mhz/3 *56/1/12 *2= 84Mhz - IN-CAMERA REFCLK */ +-/* PCLK=23Mhz/3 *56/1/12 *2= 71Mhz - TI serializers */ +-{0x3030, 56}, //PLL_MULTIPLIER +-{0x302E, 3}, //PRE_PLL_CLK_DIV +-{0x302C, 1}, //P1 divider (vt_sys_clk_div) +-{0x302A, 6}, //P2 divider (vt_pix_clk_div) +-{0x3038, 1}, //P3 divider (op_sys_clk_div) +-{0x3036, 12}, //P4 divider (op_word_clk_div) +-{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 +-{ } +-}; /* PLL Setup Serial 4 lane 12-bit Output 27Mhz MCLK */ +- +-static const struct ar0xxx_reg ar0220_rev4_Readout_Mode_Configuration[] = { +-{0x30A2, 1}, // x_odd_inc_ +-{0x30A6, 1}, // y_odd_inc_ +-{0x3040, 0}, // read_mode +-{ } +-}; /* Readout Mode Configuration */ +- +-static const struct ar0xxx_reg ar0220_rev4_Full_Res_FOV[] = { +-{0x3004, AR0220_X_START}, // X_ADDR_START_ +-{0x3008, AR0220_X_END}, // X_ADDR_END_ +-{0x3002, AR0220_Y_START}, // Y_ADDR_START_ +-{0x3006, AR0220_Y_END}, // Y_ADDR_END_ +-{ } +-}; /* Full Res FOV */ +- +-static const struct ar0xxx_reg ar0220_rev4_hdr_Timing_and_Exposure[] = { +-{0x3082, 0x8}, // operation_mode_ctrl +-{0x30BA, 0x1112}, // digital_ctrl: num_exp_max=2 +-#ifdef AR0231_EMBEDDED_LINE +-{0x3064, 0x1982}, // SMIA_TEST +-#else +-{0x3064, 0x1802}, // SMIA_TEST +-#endif +-//{0x33E0, 0xC80}, +-//{0x3180, 0x80}, +-//{0x33E4, 0x80}, +- +-{0x306e, 9010}, // datapath_select,ime_mode,0 +- +-{0x300A, AR0220_SENSOR_HEIGHT + 794}, // frame_length_lines_ (1742) +-{0x300C, AR0220_SENSOR_WIDTH/2 + 424}, // line_length_pck_ (1338) +-{0x3042, 0}, // extra_delay +- +-{0x3238, 0x444}, // exposure_ratio +-{0x3012, 1000}, // coarse_integration_time_ +-{0x3014, 1526}, // fine_integration_time_ +-{0x321E, 1526}, // fine_integration_time2 +-{0x3222, 282}, // fine_integration_time3 +-{0x32EA, 0x3C0E}, +-//{0x32EC, 0x7151}, +- +-{0x30B0, 0x800}, // enable_subrow_pair_reset +-{0x32E8, 637}, // max subrow margin for 3exp HDR +-{ } +-}; /* 3exp 36FPS Timing and Exposure */ +- +-static const struct ar0xxx_reg ar0220_rev4_hdr_12bit_output[] = { +-{0x31D0, 1}, // companding +-{0x31AC, 0x140C}, // data_format_bits: RAW20, OUT12 +-{ } +-}; /* HDR Serial 4 lane 12 bit Output */ +- +-static const struct ar0xxx_reg ar0220_rev4_mipi_12bit_4lane[] = { +-{0x31AE, 0x204}, // serial_format: MIPI 4 lanes +-//{0x3342, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x3346, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334A, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334E, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x3344, 0x0011}, // default, VC=0 +-//{0x3348, 0x0111}, // default, VC=1 +-//{0x334C, 0x0211}, // default, VC=2 +-//{0x3350, 0x0311}, // default, VC=3 +-{0x31B0, 0x46}, // frame_preamble +-{0x31B2, 0x31}, // line_preamble +-{0x31B4, 0x2144}, //MIPI_TIMING_0 update @504Mbps 12 bit, 04/17 +-{0x31B6, 0x3145}, //MIPI_TIMING_1 update @504Mbps 12 bit, 04/17 +-{0x31B8, 0x3147}, //MIPI_TIMING_2 update @504Mbps 12 bit, 04/17 +-{0x31BA, 0x0186}, //MIPI_TIMING_3 +-{0x31BC, 0x0785}, //MIPI_TIMING_4 +-{ } +-}; /* HDR MIPI 12 bit Settings */ +- +-static const struct ar0xxx_reg ar0220_rev4_Recommended_HDR_Settings[] = { +-{ } +-}; /* Recommended HDR Settings */ +- + /* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ + static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev4[] = { +- ar0220_rev4_Reset, +- ar0220_rev4_Recommended_Settings, +- ar0220_rev4_pll_23_4lane_12b, +- ar0220_rev4_Readout_Mode_Configuration, +- ar0220_rev4_Full_Res_FOV, +- ar0220_rev4_hdr_Timing_and_Exposure, +- ar0220_rev4_hdr_12bit_output, +- ar0220_rev4_mipi_12bit_4lane, +- ar0220_rev4_Recommended_HDR_Settings, +- NULL, +-}; +- +-/* 3exp HDR, Full Resolution, MIPI 4-lane 12-bit 36FPS, EXTCLK=23MHz (comes from deser) */ +-static const struct ar0xxx_reg *ar0220_regs_hdr_mipi_12bit_36fps_rev3[] = { +- ar0220_rev4_Reset, +- ar0220_rev4_Recommended_Settings, +- ar0220_rev4_REV3_Optimized_Sequencer, +- ar0220_rev4_pll_23_4lane_12b, +- ar0220_rev4_Readout_Mode_Configuration, +- ar0220_rev4_Full_Res_FOV, +- ar0220_rev4_hdr_Timing_and_Exposure, +- ar0220_rev4_hdr_12bit_output, +- ar0220_rev4_mipi_12bit_4lane, +- ar0220_rev4_Recommended_HDR_Settings, ++ ar0220_rev2_Reset, ++ ar0220_rev3_Recommended_Settings, ++ ar0220_rev2_pll_23_4lane_12b, ++ ar0220_rev2_Readout_Mode_Configuration, ++ ar0220_rev2_Full_Res_FOV, ++ ar0220_rev2_hdr_Timing_and_Exposure, ++ ar0220_rev2_hdr_12bit_output, ++ ar0220_rev2_mipi_12bit_4lane, ++ ar0220_rev2_Recommended_HDR_Settings, + NULL, + }; +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index 500fa75..312b9fe 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -463,16 +463,23 @@ static int ar0233_initialize(struct i2c_client *client) + AR_X_END = AR0220_X_END; + AR_Y_END = AR0220_Y_END; + ++ if (extclk == 25) { ++ ar0220_regs_hdr_mipi_12bit_36fps_rev2[3] = ar0220_rev2_pll_25_4lane_12b; ++ ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev2_pll_25_4lane_12b; ++ ar0220_regs_hdr_mipi_12bit_36fps_rev4[2] = ar0220_rev2_pll_25_4lane_12b; ++ } ++ if (extclk == 27) { ++ ar0220_regs_hdr_mipi_12bit_36fps_rev2[3] = ar0220_rev2_pll_27_4lane_12b; ++ ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev2_pll_27_4lane_12b; ++ ar0220_regs_hdr_mipi_12bit_36fps_rev4[2] = ar0220_rev2_pll_27_4lane_12b; ++ } ++ + switch (rev & 0xf) { + case 0x1: + case 0x2: ++ ar0233_set_regs(client, ar0220_regs_hdr_mipi_12bit_36fps_rev2); ++ break; + case 0x3: +- if (extclk == 25) { +- ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev4_pll_25_4lane_12b; +- } +- if (extclk == 27) { +- ar0220_regs_hdr_mipi_12bit_36fps_rev3[3] = ar0220_rev4_pll_27_4lane_12b; +- } + ar0233_set_regs(client, ar0220_regs_hdr_mipi_12bit_36fps_rev3); + break; + case 0x4: +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0434-media-i2c-max9286-parse-crossbard-from-cmdline.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0434-media-i2c-max9286-parse-crossbard-from-cmdline.patch new file mode 100644 index 00000000..2bd283b3 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0434-media-i2c-max9286-parse-crossbard-from-cmdline.patch @@ -0,0 +1,154 @@ +From 164a97c4370a29ee27145c5d1c44fe03ec2ce7b1 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 20 Nov 2019 16:41:12 +0300 +Subject: [PATCH] media: i2c: max9286: parse crossbard from cmdline + +This allows to change crossbar by command line parameter + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/max9286.c | 93 +++++++++++++++++++--------------- + 1 file changed, 51 insertions(+), 42 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index 3184ff1..b185566 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -56,6 +56,7 @@ struct max9286_priv { + int dbl; + int dt; + int hsgen; ++ char cb[16]; + int hts; + int vts; + int hts_delay; +@@ -140,6 +141,10 @@ static int switchin = 0; + module_param(switchin, int, 0644); + MODULE_PARM_DESC(switchin, " COAX SWITCH IN+ and IN- (default: 0 - not switched)"); + ++static long crossbar = 0xba9876543210; ++module_param(crossbar, long, 0644); ++MODULE_PARM_DESC(crossbar, " Crossbar setup (default: ba9876543210 - reversed)"); ++ + enum { + RGB888_DT = 0, + RGB565_DT, +@@ -421,54 +426,53 @@ static void max9286_gmsl_link_setup(struct i2c_client *client, int idx) + switch (priv->dt) { + case YUV8_DT: + /* setup crossbar for YUV8/RAW8: reverse DVP bus */ +- reg8_write(client, 0x20, 7); +- reg8_write(client, 0x21, 6); +- reg8_write(client, 0x22, 5); +- reg8_write(client, 0x23, 4); +- reg8_write(client, 0x24, 3); +- reg8_write(client, 0x25, 2); +- reg8_write(client, 0x26, 1); +- reg8_write(client, 0x27, 0); ++ reg8_write(client, 0x20, priv->cb[7]); ++ reg8_write(client, 0x21, priv->cb[6]); ++ reg8_write(client, 0x22, priv->cb[5]); ++ reg8_write(client, 0x23, priv->cb[4]); ++ reg8_write(client, 0x24, priv->cb[3]); ++ reg8_write(client, 0x25, priv->cb[2]); ++ reg8_write(client, 0x26, priv->cb[1]); ++ reg8_write(client, 0x27, priv->cb[0]); + + /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, 23); +- reg8_write(client, 0x31, 22); +- reg8_write(client, 0x32, 21); +- reg8_write(client, 0x33, 20); +- reg8_write(client, 0x34, 19); +- reg8_write(client, 0x35, 18); +- reg8_write(client, 0x36, 17); +- reg8_write(client, 0x37, 16); +- ++ reg8_write(client, 0x30, priv->cb[7] + 16); ++ reg8_write(client, 0x31, priv->cb[6] + 16); ++ reg8_write(client, 0x32, priv->cb[5] + 16); ++ reg8_write(client, 0x33, priv->cb[4] + 16); ++ reg8_write(client, 0x34, priv->cb[3] + 16); ++ reg8_write(client, 0x35, priv->cb[2] + 16); ++ reg8_write(client, 0x36, priv->cb[1] + 16); ++ reg8_write(client, 0x37, priv->cb[0] + 16); + break; + case RAW12_DT: + /* setup crossbar for RAW12: reverse DVP bus */ +- reg8_write(client, 0x20, 11); +- reg8_write(client, 0x21, 10); +- reg8_write(client, 0x22, 9); +- reg8_write(client, 0x23, 8); +- reg8_write(client, 0x24, 7); +- reg8_write(client, 0x25, 6); +- reg8_write(client, 0x26, 5); +- reg8_write(client, 0x27, 4); +- reg8_write(client, 0x28, 3); +- reg8_write(client, 0x29, 2); +- reg8_write(client, 0x2a, 1); +- reg8_write(client, 0x2b, 0); ++ reg8_write(client, 0x20, priv->cb[11]); ++ reg8_write(client, 0x21, priv->cb[10]); ++ reg8_write(client, 0x22, priv->cb[9]); ++ reg8_write(client, 0x23, priv->cb[8]); ++ reg8_write(client, 0x24, priv->cb[7]); ++ reg8_write(client, 0x25, priv->cb[6]); ++ reg8_write(client, 0x26, priv->cb[5]); ++ reg8_write(client, 0x27, priv->cb[4]); ++ reg8_write(client, 0x28, priv->cb[3]); ++ reg8_write(client, 0x29, priv->cb[2]); ++ reg8_write(client, 0x2a, priv->cb[1]); ++ reg8_write(client, 0x2b, priv->cb[0]); + + /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, 27); +- reg8_write(client, 0x31, 26); +- reg8_write(client, 0x32, 25); +- reg8_write(client, 0x33, 24); +- reg8_write(client, 0x34, 23); +- reg8_write(client, 0x35, 22); +- reg8_write(client, 0x36, 21); +- reg8_write(client, 0x37, 20); +- reg8_write(client, 0x38, 19); +- reg8_write(client, 0x39, 18); +- reg8_write(client, 0x3a, 17); +- reg8_write(client, 0x3b, 16); ++ reg8_write(client, 0x30, priv->cb[11] + 16); ++ reg8_write(client, 0x31, priv->cb[10] + 16); ++ reg8_write(client, 0x32, priv->cb[9] + 16); ++ reg8_write(client, 0x33, priv->cb[8] + 16); ++ reg8_write(client, 0x34, priv->cb[7] + 16); ++ reg8_write(client, 0x35, priv->cb[6] + 16); ++ reg8_write(client, 0x36, priv->cb[5] + 16); ++ reg8_write(client, 0x37, priv->cb[4] + 16); ++ reg8_write(client, 0x38, priv->cb[3] + 16); ++ reg8_write(client, 0x39, priv->cb[2] + 16); ++ reg8_write(client, 0x3a, priv->cb[1] + 16); ++ reg8_write(client, 0x3b, priv->cb[0] + 16); + + if (!priv->bws && priv->dbl) + dev_err(&client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); +@@ -733,7 +737,6 @@ static int max9286_parse_dt(struct i2c_client *client) + if (of_property_read_u32(np, "maxim,switchin", &priv->switchin)) + priv->switchin = 0; + +- + /* module params override dts */ + if (him) + priv->him = him; +@@ -766,6 +769,12 @@ static int max9286_parse_dt(struct i2c_client *client) + if (switchin) + priv->switchin = switchin; + ++ /* parse crossbar setup */ ++ for (i = 0; i < 16; i++) { ++ priv->cb[i] = crossbar % 16; ++ crossbar /= 16; ++ } ++ + for (i = 0; i < priv->links; i++) { + endpoint = of_graph_get_next_endpoint(np, endpoint); + if (!endpoint) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0435-clk-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0435-clk-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch new file mode 100644 index 00000000..d797cb9f --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0435-clk-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch @@ -0,0 +1,51 @@ +From a2f64f8aadc505509045f2bc5da0be93e302b244 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 00:58:51 +0300 +Subject: [PATCH 01/12] clk: renesas: r8a7795-cpg-mssr: Add RPC clocks + +This adds RPC clock support to the R8A7795 CPG MSSR driver. + +Signed-off-by: Valentine Barshak +--- + drivers/clk/renesas/r8a7795-cpg-mssr.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c +index bd5a73f..f20d47d 100644 +--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c ++++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c +@@ -47,6 +47,7 @@ enum clk_ids { + CLK_S3, + CLK_SDSRC, + CLK_SSPSRC, ++ CLK_RPCSRC, + CLK_RINT, + + /* Module Clocks */ +@@ -73,9 +74,15 @@ static struct cpg_core_clk r8a7795_core_clks[] __initdata = { + DEF_FIXED(".s2", CLK_S2, CLK_PLL1_DIV2, 4, 1), + DEF_FIXED(".s3", CLK_S3, CLK_PLL1_DIV2, 6, 1), + DEF_FIXED(".sdsrc", CLK_SDSRC, CLK_PLL1_DIV2, 2, 1), ++ DEF_BASE(".rpcsrc", CLK_RPCSRC, CLK_TYPE_GEN3_RPCSRC, CLK_PLL1), + + DEF_GEN3_OSC(".r", CLK_RINT, CLK_EXTAL, 32), + ++ DEF_BASE("rpc", R8A7795_CLK_RPC, CLK_TYPE_GEN3_RPC, ++ CLK_RPCSRC), ++ DEF_BASE("rpcd2", R8A7795_CLK_RPCD2, CLK_TYPE_GEN3_RPCD2, ++ R8A7795_CLK_RPC), ++ + /* Core Clock Outputs */ + DEF_GEN3_Z("z", R8A7795_CLK_Z, CLK_TYPE_GEN3_Z, CLK_PLL0, 2), + DEF_GEN3_Z("z2", R8A7795_CLK_Z2, CLK_TYPE_GEN3_Z2, CLK_PLL2, 2), +@@ -245,6 +252,7 @@ static struct mssr_mod_clk r8a7795_mod_clks[] __initdata = { + DEF_MOD("can-fd", 914, R8A7795_CLK_S3D2), + DEF_MOD("can-if1", 915, R8A7795_CLK_S3D4), + DEF_MOD("can-if0", 916, R8A7795_CLK_S3D4), ++ DEF_MOD("rpc-if", 917, R8A7795_CLK_RPCD2), + DEF_MOD("i2c6", 918, R8A7795_CLK_S0D6), + DEF_MOD("i2c5", 919, R8A7795_CLK_S0D6), + DEF_MOD("adg", 922, R8A7795_CLK_S0D1), +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0436-clk-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0436-clk-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch new file mode 100644 index 00000000..d65360f8 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0436-clk-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch @@ -0,0 +1,51 @@ +From ec658a740c059ebc224dcdd3da1461faa2ce71e9 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:00:14 +0300 +Subject: [PATCH 02/12] clk: renesas: r8a7796-cpg-mssr: Add RPC clocks + +This adds RPC clock support to the R8A7796 CPG MSSR driver. + +Signed-off-by: Valentine Barshak +--- + drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c +index f4f1350..069a53a 100644 +--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c ++++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c +@@ -48,6 +48,7 @@ enum clk_ids { + CLK_S3, + CLK_SDSRC, + CLK_SSPSRC, ++ CLK_RPCSRC, + CLK_RINT, + + /* Module Clocks */ +@@ -74,9 +75,15 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = { + DEF_FIXED(".s2", CLK_S2, CLK_PLL1_DIV2, 4, 1), + DEF_FIXED(".s3", CLK_S3, CLK_PLL1_DIV2, 6, 1), + DEF_FIXED(".sdsrc", CLK_SDSRC, CLK_PLL1_DIV2, 2, 1), ++ DEF_BASE(".rpcsrc", CLK_RPCSRC, CLK_TYPE_GEN3_RPCSRC, CLK_PLL1), + + DEF_GEN3_OSC(".r", CLK_RINT, CLK_EXTAL, 32), + ++ DEF_BASE("rpc", R8A7796_CLK_RPC, CLK_TYPE_GEN3_RPC, ++ CLK_RPCSRC), ++ DEF_BASE("rpcd2", R8A7796_CLK_RPCD2, CLK_TYPE_GEN3_RPCD2, ++ R8A7796_CLK_RPC), ++ + /* Core Clock Outputs */ + DEF_GEN3_Z("z", R8A7796_CLK_Z, CLK_TYPE_GEN3_Z, CLK_PLL0, 2), + DEF_GEN3_Z("z2", R8A7796_CLK_Z2, CLK_TYPE_GEN3_Z2, CLK_PLL2, 2), +@@ -218,6 +225,7 @@ static struct mssr_mod_clk r8a7796_mod_clks[] __initdata = { + DEF_MOD("can-fd", 914, R8A7796_CLK_S3D2), + DEF_MOD("can-if1", 915, R8A7796_CLK_S3D4), + DEF_MOD("can-if0", 916, R8A7796_CLK_S3D4), ++ DEF_MOD("rpc-if", 917, R8A7796_CLK_RPCD2), + DEF_MOD("i2c6", 918, R8A7796_CLK_S0D6), + DEF_MOD("i2c5", 919, R8A7796_CLK_S0D6), + DEF_MOD("adg", 922, R8A7796_CLK_S0D1), +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0437-clk-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0437-clk-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch new file mode 100644 index 00000000..c51385cc --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0437-clk-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch @@ -0,0 +1,51 @@ +From c76e22071bc721ccd05a7e1acbe9a0e4ea078385 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:00:35 +0300 +Subject: [PATCH 03/12] clk: renesas: r8a77965-cpg-mssr: Add RPC clocks + +This adds RPC clock support to the R8A77965 CPG MSSR driver. + +Signed-off-by: Valentine Barshak +--- + drivers/clk/renesas/r8a77965-cpg-mssr.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c +index 3d4fe53..dbcd320 100644 +--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c ++++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c +@@ -43,6 +43,7 @@ enum clk_ids { + CLK_S3, + CLK_SDSRC, + CLK_SSPSRC, ++ CLK_RPCSRC, + CLK_RINT, + + /* Module Clocks */ +@@ -68,9 +69,15 @@ static const struct cpg_core_clk r8a77965_core_clks[] __initconst = { + DEF_FIXED(".s2", CLK_S2, CLK_PLL1_DIV2, 4, 1), + DEF_FIXED(".s3", CLK_S3, CLK_PLL1_DIV2, 6, 1), + DEF_FIXED(".sdsrc", CLK_SDSRC, CLK_PLL1_DIV2, 2, 1), ++ DEF_BASE(".rpcsrc", CLK_RPCSRC, CLK_TYPE_GEN3_RPCSRC, CLK_PLL1), + + DEF_GEN3_OSC(".r", CLK_RINT, CLK_EXTAL, 32), + ++ DEF_BASE("rpc", R8A77965_CLK_RPC, CLK_TYPE_GEN3_RPC, ++ CLK_RPCSRC), ++ DEF_BASE("rpcd2", R8A77965_CLK_RPCD2, CLK_TYPE_GEN3_RPCD2, ++ R8A77965_CLK_RPC), ++ + /* Core Clock Outputs */ + DEF_GEN3_Z("z", R8A77965_CLK_Z, CLK_TYPE_GEN3_Z, CLK_PLL0, 2), + DEF_GEN3_Z("zg", R8A77965_CLK_ZG, CLK_TYPE_GEN3_ZG, CLK_PLL4, 4), +@@ -215,6 +222,7 @@ static const struct mssr_mod_clk r8a77965_mod_clks[] __initconst = { + DEF_MOD("can-fd", 914, R8A77965_CLK_S3D2), + DEF_MOD("can-if1", 915, R8A77965_CLK_S3D4), + DEF_MOD("can-if0", 916, R8A77965_CLK_S3D4), ++ DEF_MOD("rpc-if", 917, R8A77965_CLK_RPCD2), + DEF_MOD("i2c6", 918, R8A77965_CLK_S0D6), + DEF_MOD("i2c5", 919, R8A77965_CLK_S0D6), + DEF_MOD("adg", 922, R8A77965_CLK_S0D1), +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0438-clk-renesas-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0438-clk-renesas-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch new file mode 100644 index 00000000..dcf9de27 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0438-clk-renesas-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch @@ -0,0 +1,30 @@ +From 08560a298e3528a510e37f02553d4096445bfc3b Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 02:28:48 +0300 +Subject: [PATCH 04/12] clk: renesas: rcar-gen3-cpg: Allow to set RPCD2 clock + parent's rate + +This makes RPC clocks adjustable by allowing +the RPCD2 clock parent's rate changes. + +Signed-off-by: Valentine Barshak +--- + drivers/clk/renesas/rcar-gen3-cpg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c +index 5993dbd..9333d34 100644 +--- a/drivers/clk/renesas/rcar-gen3-cpg.c ++++ b/drivers/clk/renesas/rcar-gen3-cpg.c +@@ -814,7 +814,7 @@ static struct clk * __init cpg_rpcd2_clk_register(const char *name, + + clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL, + &rpcd2->fixed.hw, &clk_fixed_factor_ops, +- &rpcd2->gate.hw, &clk_gate_ops, 0); ++ &rpcd2->gate.hw, &clk_gate_ops, CLK_SET_RATE_PARENT); + if (IS_ERR(clk)) + kfree(rpcd2); + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0439-mtd-Consolidate-Renesas-RPC-drivers.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0439-mtd-Consolidate-Renesas-RPC-drivers.patch new file mode 100644 index 00000000..0b27c085 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0439-mtd-Consolidate-Renesas-RPC-drivers.patch @@ -0,0 +1,4450 @@ +From 596c2def7a2037f33973c6a064ed54d465a157f0 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:01:19 +0300 +Subject: [PATCH 05/12] mtd: Consolidate Renesas RPC drivers + +This consolidates RPC HyperFlash and SPI NOR drivers. +Flash device detection, and DMA read operation is done +by the renesas-rpc driver. The operation mode is selected +based on the child flash device node. If it's "jedec,spi-nor" +compatible, the "renesas-rpc-qspi" platform device is created. +If it's "cfi-flash" compatible, the "renesas-rpc-hyperflash" +device is created instead. + +The RPC device compatibility string is adjusted to match U-Boot. +The following configuration options are available: + + CONFIG_MTD_RENESAS_RPC: enables generic RPC support; + CONFIG_MTD_RENESAS_RPC_QSPI: enables SPI NOR support; + CONFIG_MTD_RENESAS_RPC_HYPERFLASH: enables HyperFlash support. + +Signed-off-by: Valentine Barshak +--- + drivers/mtd/Kconfig | 6 - + drivers/mtd/Makefile | 1 - + drivers/mtd/rpc_hyperflash.c | 976 ------------------ + drivers/mtd/spi-nor/Kconfig | 22 +- + drivers/mtd/spi-nor/Makefile | 4 +- + drivers/mtd/spi-nor/renesas-rpc-hyperflash.c | 742 ++++++++++++++ + drivers/mtd/spi-nor/renesas-rpc-qspi.c | 794 +++++++++++++++ + drivers/mtd/spi-nor/renesas-rpc.c | 1356 ++++---------------------- + drivers/mtd/spi-nor/renesas-rpc.h | 267 +++++ + 9 files changed, 1991 insertions(+), 2177 deletions(-) + delete mode 100644 drivers/mtd/rpc_hyperflash.c + create mode 100644 drivers/mtd/spi-nor/renesas-rpc-hyperflash.c + create mode 100644 drivers/mtd/spi-nor/renesas-rpc-qspi.c + create mode 100644 drivers/mtd/spi-nor/renesas-rpc.h + +diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig +index 0619e1f..89925b5 100644 +--- a/drivers/mtd/Kconfig ++++ b/drivers/mtd/Kconfig +@@ -11,12 +11,6 @@ menuconfig MTD + particular hardware and users of MTD devices. If unsure, say N. + + if MTD +-config MTD_RPC_HYPERFLASH +- tristate "MTD Renesas R-Car Gen3 RPC HyperFlash" +- depends on ARCH_R8A7795 +- ---help--- +- This option includes Renesas R-Car Gen3 RPC HyperFlash support. +- + config MTD_TESTS + tristate "MTD tests support (DANGEROUS)" + depends on m +diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile +index f3fb2b0..d6f8f62 100644 +--- a/drivers/mtd/Makefile ++++ b/drivers/mtd/Makefile +@@ -15,7 +15,6 @@ obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o + obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o + obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o + obj-y += parsers/ +-obj-$(CONFIG_MTD_RPC_HYPERFLASH) += rpc_hyperflash.o + + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o +diff --git a/drivers/mtd/rpc_hyperflash.c b/drivers/mtd/rpc_hyperflash.c +deleted file mode 100644 +index cf4d56e..0000000 +--- a/drivers/mtd/rpc_hyperflash.c ++++ /dev/null +@@ -1,976 +0,0 @@ +-/* +- * Linux driver for R-Car Gen3 RPC HyperFlash +- * +- * Copyright (C) 2016 Renesas Electronics Corporation +- * Copyright (C) 2016 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-/* RPC */ +-#define RPC_BASE 0xEE200000 +-#define RPC_SIZE 0x8100 +-#define RPC_FLASH_BASE 0x08000000 +-#define RPC_FLASH_SIZE 0x04000000 +- +-#define RPC_CMNCR 0x0000 /* R/W */ +-#define RPC_CMNCR_MD (0x1 << 31) +-#define RPC_CMNCR_MOIIO0(val) (((val) & 0x3) << 16) +-#define RPC_CMNCR_MOIIO1(val) (((val) & 0x3) << 18) +-#define RPC_CMNCR_MOIIO2(val) (((val) & 0x3) << 20) +-#define RPC_CMNCR_MOIIO3(val) (((val) & 0x3) << 22) +-#define RPC_CMNCR_MOIIO_HIZ (RPC_CMNCR_MOIIO0(3) | RPC_CMNCR_MOIIO1(3) | \ +- RPC_CMNCR_MOIIO2(3) | RPC_CMNCR_MOIIO3(3)) +-#define RPC_CMNCR_IO0FV(val) (((val) & 0x3) << 8) +-#define RPC_CMNCR_IO2FV(val) (((val) & 0x3) << 12) +-#define RPC_CMNCR_IO3FV(val) (((val) & 0x3) << 14) +-#define RPC_CMNCR_IOFV_HIZ (RPC_CMNCR_IO0FV(3) | RPC_CMNCR_IO2FV(3) | \ +- RPC_CMNCR_IO3FV(3)) +-#define RPC_CMNCR_BSZ(val) (((val) & 0x3) << 0) +- +-#define RPC_SSLDR 0x0004 /* R/W */ +-#define RPC_SSLDR_SPNDL(d) (((d) & 0x7) << 16) +-#define RPC_SSLDR_SLNDL(d) (((d) & 0x7) << 8) +-#define RPC_SSLDR_SCKDL(d) (((d) & 0x7) << 0) +- +-#define RPC_DRCR 0x000C /* R/W */ +-#define RPC_DRCR_SSLN (0x1 << 24) +-#define RPC_DRCR_RBURST(v) (((v) & 0x1F) << 16) +-#define RPC_DRCR_RCF (0x1 << 9) +-#define RPC_DRCR_RBE (0x1 << 8) +-#define RPC_DRCR_SSLE (0x1 << 0) +- +-#define RPC_DRCMR 0x0010 /* R/W */ +-#define RPC_DRCMR_CMD(c) (((c) & 0xFF) << 16) +-#define RPC_DRCMR_OCMD(c) (((c) & 0xFF) << 0) +- +-#define RPC_DREAR 0x0014 /* R/W */ +-#define RPC_DREAR_EAV(v) (((v) & 0xFF) << 16) +-#define RPC_DREAR_EAC(v) (((v) & 0x7) << 0) +- +-#define RPC_DROPR 0x0018 /* R/W */ +-#define RPC_DROPR_OPD3(o) (((o) & 0xFF) << 24) +-#define RPC_DROPR_OPD2(o) (((o) & 0xFF) << 16) +-#define RPC_DROPR_OPD1(o) (((o) & 0xFF) << 8) +-#define RPC_DROPR_OPD0(o) (((o) & 0xFF) << 0) +- +-#define RPC_DRENR 0x001C /* R/W */ +-#define RPC_DRENR_CDB(o) (((o) & 0x3) << 30) +-#define RPC_DRENR_OCDB(o) (((o) & 0x3) << 28) +-#define RPC_DRENR_ADB(o) (((o) & 0x3) << 24) +-#define RPC_DRENR_OPDB(o) (((o) & 0x3) << 20) +-#define RPC_DRENR_SPIDB(o) (((o) & 0x3) << 16) +-#define RPC_DRENR_DME (0x1 << 15) +-#define RPC_DRENR_CDE (0x1 << 14) +-#define RPC_DRENR_OCDE (0x1 << 12) +-#define RPC_DRENR_ADE(v) (((v) & 0xF) << 8) +-#define RPC_DRENR_OPDE(v) (((v) & 0xF) << 4) +- +-#define RPC_SMCR 0x0020 /* R/W */ +-#define RPC_SMCR_SSLKP (0x1 << 8) +-#define RPC_SMCR_SPIRE (0x1 << 2) +-#define RPC_SMCR_SPIWE (0x1 << 1) +-#define RPC_SMCR_SPIE (0x1 << 0) +- +-#define RPC_SMCMR 0x0024 /* R/W */ +-#define RPC_SMCMR_CMD(c) (((c) & 0xFF) << 16) +-#define RPC_SMCMR_OCMD(c) (((c) & 0xFF) << 0) +- +-#define RPC_SMADR 0x0028 /* R/W */ +-#define RPC_SMOPR 0x002C /* R/W */ +-#define RPC_SMOPR_OPD0(o) (((o) & 0xFF) << 0) +-#define RPC_SMOPR_OPD1(o) (((o) & 0xFF) << 8) +-#define RPC_SMOPR_OPD2(o) (((o) & 0xFF) << 16) +-#define RPC_SMOPR_OPD3(o) (((o) & 0xFF) << 24) +- +-#define RPC_SMENR 0x0030 /* R/W */ +-#define RPC_SMENR_CDB(o) (((o) & 0x3) << 30) +-#define RPC_SMENR_OCDB(o) (((o) & 0x3) << 28) +-#define RPC_SMENR_ADB(o) (((o) & 0x3) << 24) +-#define RPC_SMENR_OPDB(o) (((o) & 0x3) << 20) +-#define RPC_SMENR_SPIDB(o) (((o) & 0x3) << 16) +-#define RPC_SMENR_DME (0x1 << 15) +-#define RPC_SMENR_CDE (0x1 << 14) +-#define RPC_SMENR_OCDE (0x1 << 12) +-#define RPC_SMENR_ADE(v) (((v) & 0xF) << 8) +-#define RPC_SMENR_OPDE(v) (((v) & 0xF) << 4) +-#define RPC_SMENR_SPIDE(v) (((v) & 0xF) << 0) +- +-#define RPC_SMRDR0 0x0038 /* R */ +-#define RPC_SMRDR1 0x003C /* R */ +-#define RPC_SMWDR0 0x0040 /* R/W */ +-#define RPC_SMWDR1 0x0044 /* R/W */ +-#define RPC_CMNSR 0x0048 /* R */ +-#define RPC_CMNSR_SSLF (0x1 << 1) +-#define RPC_CMNSR_TEND (0x1 << 0) +- +-#define RPC_DRDMCR 0x0058 /* R/W */ +-#define RPC_DRDMCR_DMCYC(v) (((v) & 0xF) << 0) +- +-#define RPC_DRDRENR 0x005C /* R/W */ +-#define RPC_DRDRENR_HYPE (0x5 << 12) +-#define RPC_DRDRENR_ADDRE (0x1 << 0x8) +-#define RPC_DRDRENR_OPDRE (0x1 << 0x4) +-#define RPC_DRDRENR_DRDRE (0x1 << 0x0) +- +-#define RPC_SMDMCR 0x0060 /* R/W */ +-#define RPC_SMDMCR_DMCYC(v) (((v) & 0xF) << 0) +- +-#define RPC_SMDRENR 0x0064 /* R/W */ +-#define RPC_SMDRENR_HYPE (0x5 << 12) +-#define RPC_SMDRENR_ADDRE (0x1 << 0x8) +-#define RPC_SMDRENR_OPDRE (0x1 << 0x4) +-#define RPC_SMDRENR_SPIDRE (0x1 << 0x0) +- +-#define RPC_PHYCNT 0x007C /* R/W */ +-#define RPC_PHYCNT_CAL (0x1 << 31) +-#define PRC_PHYCNT_OCTA_AA (0x1 << 22) +-#define PRC_PHYCNT_OCTA_SA (0x2 << 22) +-#define PRC_PHYCNT_EXDS (0x1 << 21) +-#define RPC_PHYCNT_OCT (0x1 << 20) +-#define RPC_PHYCNT_WBUF2 (0x1 << 4) +-#define RPC_PHYCNT_WBUF (0x1 << 2) +-#define RPC_PHYCNT_MEM(v) (((v) & 0x3) << 0) +- +-#define RPC_PHYINT 0x0088 /* R/W */ +-#define RPC_PHYINT_RSTEN (0x1 << 18) +-#define RPC_PHYINT_WPEN (0x1 << 17) +-#define RPC_PHYINT_INTEN (0x1 << 16) +-#define RPC_PHYINT_RST (0x1 << 2) +-#define RPC_PHYINT_WP (0x1 << 1) +-#define RPC_PHYINT_INT (0x1 << 0) +- +-#define RPC_WBUF 0x8000 /* R/W size=4/8/16/32/64Bytes */ +-#define RPC_WBUF_SIZE 0x100 +- +-struct rpc_info { +- struct rw_semaphore lock; +- void __iomem *rpc_base; +- void __iomem *flash_base; +- struct resource *rpc_res; +- struct resource *flash_res; +- u32 flash_id; +- struct mtd_info mtd; +-}; +- +-static inline void __iomem *rpc_addr(struct rpc_info *info, u32 offset) +-{ +- return info->rpc_base + offset; +-} +- +-static inline u32 rpc_readl(struct rpc_info *info, u32 offset) +-{ +- u32 val; +- +- val = readl(rpc_addr(info, offset)); +- return val; +-} +- +-static inline void rpc_writel(struct rpc_info *info, u32 offset, u32 val) +-{ +- writel(val, rpc_addr(info, offset)); +-} +- +-static inline void rpc_setl(struct rpc_info *info, u32 offset, u32 mask, u32 set) +-{ +- void __iomem *addr; +- u32 val; +- +- addr = rpc_addr(info, offset); +- val = readl(addr); +- val &= mask; +- val |= set; +- writel(val, addr); +-} +- +-static void rpc_wait_tend(struct rpc_info *info) +-{ +- while (!(rpc_readl(info, RPC_CMNSR) & RPC_CMNSR_TEND)) +- cpu_relax(); +-} +- +-/* RPC HyperFlash */ +-#define RPC_HF_CMD_CA47 (0x1 << 7) /* Read */ +-#define RPC_HF_CMD_CA46 (0x1 << 6) /* Register space */ +-#define RPC_HF_CMD_CA45 (0x1 << 5) /* Liner burst */ +- +-#define RPC_HF_CMD_READ_REG (RPC_HF_CMD_CA47 | RPC_HF_CMD_CA46) +-#define RPC_HF_CMD_READ_MEM RPC_HF_CMD_CA47 +-#define RPC_HF_CMD_WRITE_REG RPC_HF_CMD_CA46 +-#define RPC_HF_CMD_WRITE_MEM 0x0 +- +-#define RPC_HF_ERASE_SIZE 0x40000 +- +-#define RPC_CFI_STATUS_DRB (0x1 << 7) +-#define RPC_CFI_STATUS_ESSB (0x1 << 6) +-#define RPC_CFI_STATUS_ESB (0x1 << 5) +-#define RPC_CFI_STATUS_PSB (0x1 << 4) +-#define RPC_CFI_STATUS_WBASB (0x1 << 3) +-#define RPC_CFI_STATUS_PSSB (0x1 << 2) +-#define RPC_CFI_STATUS_SLSB (0x1 << 1) +-#define RPC_CFI_STATUS_ESTAT (0x1 << 0) +- +-#define RPC_CFI_UNLOCK1 (0x555 << 1) +-#define RPC_CFI_UNLOCK2 (0x2AA << 1) +- +-#define RPC_CFI_CMD_UNLOCK_START 0xAA +-#define RPC_CFI_CMD_UNLOCK_ACK 0x55 +-#define RPC_CFI_CMD_RESET 0xF0 +-#define RPC_CFI_CMD_READ_STATUS 0x70 +-#define RPC_CFI_CMD_READ_ID 0x90 +-#define RPC_CFI_CMD_WRITE 0xA0 +-#define RPC_CFI_CMD_ERASE_START 0x80 +-#define RPC_CFI_CMD_ERASE_SECTOR 0x30 +- +-#define RPC_CFI_ID_MASK 0x000F +-#define RPC_CFI_ID_MAN_SPANSION 0x0001 +-#define RPC_CFI_ID_TYPE_HYPERFLASH 0x000E +- +-enum rpc_hf_size { +- RPC_HF_SIZE_16BIT = RPC_SMENR_SPIDE(0x8), +- RPC_HF_SIZE_32BIT = RPC_SMENR_SPIDE(0xC), +- RPC_HF_SIZE_64BIT = RPC_SMENR_SPIDE(0xF), +-}; +- +-struct rpc_info *rpc_info; +- +-static void rpc_hf_mode_man(struct rpc_info *info) +-{ +- rpc_wait_tend(info); +- +- /* +- * RPC_PHYCNT = 0x80000263 +- * bit31 CAL = 1 : PHY calibration +- * bit1-0 PHYMEM[1:0] = 11 : HyperFlash +- */ +- rpc_setl(info, RPC_PHYCNT, +- ~(RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2 | +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)), +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); +- +- /* +- * RPC_CMNCR = 0x81FFF301 +- * bit31 MD = 1 : Manual mode +- * bit1-0 BSZ[1:0] = 01 : QSPI Flash x 2 or HyperFlash +- */ +- rpc_setl(info, RPC_CMNCR, +- ~(RPC_CMNCR_MD | RPC_CMNCR_BSZ(3)), +- RPC_CMNCR_MOIIO_HIZ | RPC_CMNCR_IOFV_HIZ | +- RPC_CMNCR_MD | RPC_CMNCR_BSZ(1)); +-} +- +-static void rpc_hf_mode_ext(struct rpc_info *info) +-{ +- rpc_wait_tend(info); +- +- /* +- * RPC_PHYCNT = 0x80000263 +- * bit31 CAL = 1 : PHY calibration +- * bit1-0 PHYMEM[1:0] = 11 : HyperFlash +- */ +- rpc_setl(info, RPC_PHYCNT, +- ~(RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2 | +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)), +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); +- +- /* +- * RPC_CMNCR = 0x81FFF301 +- * bit31 MD = 1 : Manual mode +- * bit1-0 BSZ[1:0] = 01 : QSPI Flash x 2 or HyperFlash +- */ +- rpc_setl(info, RPC_CMNCR, +- ~(RPC_CMNCR_MD | RPC_CMNCR_BSZ(3)), +- RPC_CMNCR_MOIIO_HIZ | RPC_CMNCR_IOFV_HIZ | +- RPC_CMNCR_BSZ(1)); +- +- /* +- * RPC_DRCR = 0x001F0100 +- * bit21-16 RBURST[4:0] = 11111 : Read burst 32 64-bit data units +- * bit9 RCF = 1 : Clear cache +- * bit8 RBE = 1 : Read burst enable +- */ +- rpc_writel(info, RPC_DRCR, +- RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RCF | RPC_DRCR_RBE); +- +- rpc_writel(info, RPC_DRCMR, RPC_DRCMR_CMD(0xA0)); +- rpc_writel(info, RPC_DRENR, +- RPC_DRENR_CDB(2) | RPC_DRENR_OCDB(2) | +- RPC_DRENR_ADB(2) | RPC_DRENR_SPIDB(2) | +- RPC_DRENR_CDE | RPC_DRENR_OCDE | RPC_DRENR_ADE(4)); +- rpc_writel(info, RPC_DRDMCR, RPC_DRDMCR_DMCYC(0xE)); +- rpc_writel(info, RPC_DRDRENR, +- RPC_DRDRENR_HYPE | RPC_DRDRENR_ADDRE | RPC_DRDRENR_DRDRE); +- +- /* Dummy read */ +- rpc_readl(info, RPC_DRCR); +-} +- +-static void rpc_hf_xfer(struct rpc_info *info, u32 addr, u16 *data, +- enum rpc_hf_size size, u8 cmd) +-{ +- u32 val; +- +- rpc_hf_mode_man(info); +- +- /* +- * bit23-21 CMD[7:5] : CA47-45 +- * CA47 = 0/1 : Write/Read +- * CA46 = 0/1 : Memory Space/Register Space +- * CA45 = 0/1 : Wrapped Burst/Linear Burst +- */ +- rpc_writel(info, RPC_SMCMR, RPC_SMCMR_CMD(cmd)); +- +- rpc_writel(info, RPC_SMADR, addr >> 1); +- +- rpc_writel(info, RPC_SMOPR, 0x0); +- +- /* +- * RPC_SMDRENR = 0x00005101 +- * bit14-12 HYPE = 101: Hyperflash mode +- * bit8 ADDRE = 1 : Address DDR transfer +- * bit0 SPIDRE = 1 : DATA DDR transfer +- */ +- rpc_writel(info, RPC_SMDRENR, +- RPC_SMDRENR_HYPE | RPC_SMDRENR_ADDRE | RPC_SMDRENR_SPIDRE); +- +- val = RPC_SMENR_CDB(2) | RPC_SMENR_OCDB(2) | +- RPC_SMENR_ADB(2) | RPC_SMENR_SPIDB(2) | +- RPC_SMENR_CDE | RPC_SMENR_OCDE | RPC_SMENR_ADE(4) | size; +- +- if (cmd & RPC_HF_CMD_CA47) +- goto read_transfer; +- +- /* +- * RPC_SMENR = 0xA222540x +- * bit31-30 CDB[1:0] = 10 : 4bit width command +- * bit25-24 ADB[1:0] = 10 : 4bit width address +- * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data +- * bit15 DME = 0 : dummy cycle disable +- * bit14 CDE = 1 : Command enable +- * bit12 OCDE = 1 : Option Command enable +- * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output +- * bit7-4 OPDE[3:0] = 0000 : Option data disable +- * bit3-0 SPIDE[3:0] = xxxx : Transfer size +- */ +- rpc_writel(info, RPC_SMENR, val); +- +- switch (size) { +- case RPC_HF_SIZE_64BIT: +- val = cmd & RPC_HF_CMD_CA46 ? +- cpu_to_be16(data[0]) | cpu_to_be16(data[1]) << 16 : +- data[0] | data[1] << 16; +- rpc_writel(info, RPC_SMWDR1, val); +- val = cmd & RPC_HF_CMD_CA46 ? +- cpu_to_be16(data[2]) | cpu_to_be16(data[3]) << 16 : +- data[2] | data[3] << 16; +- break; +- case RPC_HF_SIZE_32BIT: +- val = cmd & RPC_HF_CMD_CA46 ? +- cpu_to_be16(data[0]) | cpu_to_be16(data[1]) << 16 : +- data[0] | data[1] << 16; +- break; +- default: +- val = cmd & RPC_HF_CMD_CA46 ? +- cpu_to_be16(data[0]) << 16 : +- data[0] << 16; +- break; +- } +- +- rpc_writel(info, RPC_SMWDR0, val); +- /* +- * RPC_SMCR = 0x00000003 +- * bit1 SPIWE = 1 : Data write enable +- * bit0 SPIE = 1 : SPI transfer start +- */ +- rpc_writel(info, RPC_SMCR, RPC_SMCR_SPIWE | RPC_SMCR_SPIE); +- return; +- +-read_transfer: +- rpc_writel(info, RPC_SMDMCR, RPC_SMDMCR_DMCYC(0xE)); +- val |= RPC_SMENR_DME; +- +- /* +- * RPC_SMENR = 0xA222D40x +- * bit31-30 CDB[1:0] = 10 : 4bit width command +- * bit25-24 ADB[1:0] = 10 : 4bit width address +- * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data +- * bit15 DME = 1 : dummy cycle disable +- * bit14 CDE = 1 : Command enable +- * bit12 OCDE = 1 : Option Command enable +- * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output (24 Bit Address) +- * bit7-4 OPDE[3:0] = 0000 : Option data disable +- * bit3-0 SPIDE[3:0] = xxxx : Transfer size +- */ +- rpc_writel(info, RPC_SMENR, val); +- +- /* +- * RPC_SMCR = 0x00000005 +- * bit2 SPIRE = 1 : Data read disable +- * bit0 SPIE = 1 : SPI transfer start +- */ +- rpc_writel(info, RPC_SMCR, RPC_SMCR_SPIRE | RPC_SMCR_SPIE); +- +- rpc_wait_tend(info); +- val = rpc_readl(info, RPC_SMRDR0); +- +- /* +- * Read data from either register or memory space. +- * Register space is always big-endian. +- */ +- switch (size) { +- case RPC_HF_SIZE_64BIT: +- if (cmd & RPC_HF_CMD_CA46) { +- data[3] = be16_to_cpu((val >> 16) & 0xFFFF); +- data[2] = be16_to_cpu(val & 0xFFFF); +- } else { +- data[3] = (val >> 16) & 0xFFFF; +- data[2] = val & 0xFFFF; +- } +- val = rpc_readl(info, RPC_SMRDR1); +- if (cmd & RPC_HF_CMD_CA46) { +- data[1] = be16_to_cpu((val >> 16) & 0xFFFF); +- data[0] = be16_to_cpu(val & 0xFFFF); +- } else { +- data[1] = (val >> 16) & 0xFFFF; +- data[0] = val & 0xFFFF; +- } +- break; +- case RPC_HF_SIZE_32BIT: +- if (cmd & RPC_HF_CMD_CA46) { +- data[1] = be16_to_cpu((val >> 16) & 0xFFFF); +- data[0] = be16_to_cpu(val & 0xFFFF); +- } else { +- data[1] = (val >> 16) & 0xFFFF; +- data[0] = val & 0xFFFF; +- } +- break; +- default: +- data[0] = cmd & RPC_HF_CMD_CA46 ? +- be16_to_cpu((val >> 16) & 0xFFFF) : +- (val >> 16) & 0xFFFF; +- break; +- } +-} +- +-static void rpc_hf_wbuf_enable(struct rpc_info *info) +-{ +- rpc_wait_tend(info); +- +- /* +- * RPC_PHYCNT = 0x80000277 +- * bit31 CAL = 1 : PHY calibration +- * bit4 WBUF2 = 1 : Write buffer enable 2 +- * bit2 WBUF = 1 : Write buffer enable +- * bit1-0 PHYMEM[1:0] = 11 : HyperFlash +- */ +- rpc_setl(info, RPC_PHYCNT, +- ~(RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF | +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)), +- RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF | +- RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); +- +- /* +- * RPC_DRCR = 0x001F0100 +- * bit21-16 RBURST[4:0] = 11111 : Read burst 32 64-bit data units +- * bit9 RCF = 1 : Clear cache +- * bit8 RBE = 1 : Read burst enable +- */ +- rpc_writel(info, RPC_DRCR, +- RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RCF | RPC_DRCR_RBE); +- +- rpc_writel(info, RPC_SMCMR, RPC_SMCMR_CMD(RPC_HF_CMD_WRITE_MEM)); +- +- rpc_writel(info, RPC_SMOPR, 0x0); +- +- /* +- * RPC_SMDRENR = 0x00005101 +- * bit14-12 HYPE = 101:Hyperflash mode +- * bit8 ADDRE = 1 : Address DDR transfer +- * bit0 SPIDRE = 1 : DATA DDR transfer +- */ +- rpc_writel(info, RPC_SMDRENR, +- RPC_SMDRENR_HYPE | RPC_SMDRENR_ADDRE | RPC_SMDRENR_SPIDRE); +- +- /* +- * RPC_SMENR = 0xA222540F +- * bit31-30 CDB[1:0] = 10 : 4bit width command +- * bit25-24 ADB[1:0] = 10 : 4bit width address +- * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data +- * bit15 DME = 0 : dummy cycle disable +- * bit14 CDE = 1 : Command enable +- * bit12 OCDE = 1 : Option Command enable +- * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output (24 Bit Address) +- * bit7-4 OPDE[3:0] = 0000 : Option data disable +- * bit3-0 SPIDE[3:0] = 1111 : 64-bit transfer size +- */ +- rpc_writel(info, RPC_SMENR, +- RPC_SMENR_CDB(2) | RPC_SMENR_OCDB(2) | +- RPC_SMENR_ADB(2) | RPC_SMENR_SPIDB(2) | +- RPC_SMENR_CDE | RPC_SMENR_OCDE | +- RPC_SMENR_ADE(4) | RPC_HF_SIZE_64BIT); +- +- /* Dummy read */ +- rpc_readl(info, RPC_DRCR); +-} +- +-static inline void rpc_hf_write_cmd(struct rpc_info *info, u32 addr, u16 cmd) +-{ +- rpc_hf_xfer(info, addr, &cmd, RPC_HF_SIZE_16BIT, RPC_HF_CMD_WRITE_REG); +-} +- +-static inline void rpc_hf_read_reg(struct rpc_info *info, u32 addr, u16 *data, +- enum rpc_hf_size size) +-{ +- rpc_hf_xfer(info, addr, data, size, RPC_HF_CMD_READ_REG); +-} +- +-static inline void rpc_hf_write_reg(struct rpc_info *info, u32 addr, u16 *data, +- enum rpc_hf_size size) +-{ +- rpc_hf_xfer(info, addr, data, size, RPC_HF_CMD_WRITE_REG); +-} +- +-static inline void rpc_hf_read_mem(struct rpc_info *info, u32 addr, u16 *data, +- enum rpc_hf_size size) +-{ +- rpc_hf_xfer(info, addr, data, size, RPC_HF_CMD_READ_MEM); +-} +- +-static inline void rpc_hf_write_mem(struct rpc_info *info, u32 addr, u16 *data, +- enum rpc_hf_size size) +-{ +- rpc_hf_xfer(info, addr, data, size, RPC_HF_CMD_WRITE_MEM); +-} +- +-static void rpc_hf_wp(struct rpc_info *info, int enable) +-{ +- rpc_setl(info, RPC_PHYINT, ~RPC_PHYINT_WP, enable ? RPC_PHYINT_WP : 0); +-} +- +-static void rpc_hf_unlock(struct rpc_info *info, u32 addr) +-{ +- rpc_hf_write_cmd(info, addr + RPC_CFI_UNLOCK1, +- RPC_CFI_CMD_UNLOCK_START); +- rpc_hf_write_cmd(info, addr + RPC_CFI_UNLOCK2, +- RPC_CFI_CMD_UNLOCK_ACK); +-} +- +-static inline int rpc_hf_status(struct rpc_info *info, u32 addr, +- int iterations, int delay) +-{ +- int retval; +- u16 status = 0; +- +- while (iterations-- > 0) { +- rpc_hf_write_cmd(info, addr + RPC_CFI_UNLOCK1, RPC_CFI_CMD_READ_STATUS); +- rpc_hf_read_reg(info, addr, &status, RPC_HF_SIZE_16BIT); +- +- if (status & RPC_CFI_STATUS_DRB) +- break; +- +- if (delay < 10000) +- usleep_range(delay, delay * 2); +- else +- msleep(delay / 1000); +- } +- +- if (!(status & RPC_CFI_STATUS_DRB)) { +- retval = -ETIMEDOUT; +- goto out; +- } +- +- if (status & (RPC_CFI_STATUS_PSB | RPC_CFI_STATUS_ESB)) { +- retval = -EIO; +- goto out; +- } +- +- return 0; +- +-out: +- /* Reset the flash */ +- rpc_hf_write_cmd(info, 0, RPC_CFI_CMD_RESET); +- return retval; +-} +- +-static int rpc_hf_sector_erase(struct rpc_info *info, u32 addr) +-{ +- rpc_hf_unlock(info, addr); +- rpc_hf_write_cmd(info, addr + RPC_CFI_UNLOCK1, RPC_CFI_CMD_ERASE_START); +- rpc_hf_unlock(info, addr); +- rpc_hf_write_cmd(info, addr, RPC_CFI_CMD_ERASE_SECTOR); +- +- return rpc_hf_status(info, addr, 1000, 10000); +-} +- +-/* Flash read */ +-static int rpc_hf_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, +- size_t *retlen, u_char *buf) +-{ +- struct rpc_info *info = mtd->priv; +- +- down_read(&info->lock); +- memcpy_fromio(buf, info->flash_base + from, len); +- up_read(&info->lock); +- +- *retlen = len; +- return 0; +-} +- +-/* Flash erase */ +-static int rpc_hf_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) +-{ +- struct rpc_info *info = mtd->priv; +- u32 addr, end; +- int retval = 0; +- +- if (mtd_mod_by_eb(instr->addr, mtd)) { +- pr_debug("%s: unaligned address\n", __func__); +- return -EINVAL; +- } +- +- if (mtd_mod_by_eb(instr->len, mtd)) { +- pr_debug("%s: unaligned length\n", __func__); +- return -EINVAL; +- } +- +- end = instr->addr + instr->len; +- +- down_write(&info->lock); +- for (addr = instr->addr; addr < end; addr += mtd->erasesize) { +- retval = rpc_hf_sector_erase(info, addr); +- +- if (retval) +- break; +- } +- +- rpc_hf_mode_ext(info); +- up_write(&info->lock); +- +- instr->state = retval ? MTD_ERASE_FAILED : MTD_ERASE_DONE; +- mtd_erase_callback(instr); +- +- return retval; +-} +- +-/* Copy memory to flash */ +-static int rpc_hf_mtd_write(struct mtd_info *mtd, loff_t offset, size_t len, +- size_t *retlen, const u_char *src) +-{ +- struct rpc_info *info = mtd->priv; +- union { +- u8 b[4]; +- u16 w[2]; +- u32 d; +- } data; +- loff_t addr; +- size_t size, cnt; +- int retval, idx; +- u8 last; +- +- retval = 0; +- *retlen = 0; +- cnt = len; +- idx = 0; +- +- down_write(&info->lock); +- +- /* Handle unaligned start */ +- if (offset & 0x1) { +- offset--; +- data.b[idx] = readb(info->flash_base + offset); +- idx++; +- } +- +- /* Handle unaligned end */ +- addr = offset + idx + len; +- last = addr & 0x1 ? readb(info->flash_base + addr) : 0xFF; +- +- addr = offset - mtd_mod_by_eb(offset, mtd); +- size = mtd->erasesize - (offset - addr); +- +- while (cnt) { +- if (size > cnt) +- size = cnt; +- +- cnt -= size; +- while (size) { +- rpc_hf_unlock(info, addr); +- rpc_hf_write_cmd(info, +- addr + RPC_CFI_UNLOCK1, +- RPC_CFI_CMD_WRITE); +- +- if (size > 0x7) { +- u32 wbuf = RPC_WBUF; +- int block = size >= RPC_WBUF_SIZE ? +- RPC_WBUF_SIZE : size & ~0x7; +- +- rpc_hf_wbuf_enable(info); +- +- rpc_writel(info, RPC_SMADR, offset >> 1); +- offset += block; +- +- block >>= 3; +- while (block--) { +- while (idx < 4) { +- data.b[idx++] = *src++; +- size--; +- } +- rpc_writel(info, wbuf, data.d); +- wbuf += 4; +- +- idx = 0; +- while (idx < 4) { +- data.b[idx++] = *src++; +- size--; +- } +- rpc_writel(info, wbuf, data.d); +- wbuf += 4; +- +- idx = 0; +- } +- +- rpc_writel(info, RPC_SMCR, +- RPC_SMCR_SPIWE | RPC_SMCR_SPIE); +- } else { +- enum rpc_hf_size bits; +- +- while (idx < 4) { +- data.b[idx++] = *src++; +- size--; +- +- if (!size) +- break; +- } +- +- if (idx & 0x1) +- data.b[idx++] = last; +- +- switch (idx) { +- case 2: +- bits = RPC_HF_SIZE_16BIT; +- break; +- default: +- bits = RPC_HF_SIZE_32BIT; +- break; +- } +- +- rpc_hf_write_mem(info, offset, data.w, bits); +- offset += idx; +- idx = 0; +- } +- +- retval = rpc_hf_status(info, addr, 1000000, 10); +- if (retval) +- goto out; +- } +- +- size = mtd->erasesize; +- addr += size; +- offset = addr; +- *retlen = len - cnt; +- } +- +-out: +- rpc_hf_mode_ext(info); +- up_write(&info->lock); +- return retval; +-} +- +-static struct mtd_partition partition_info[]={ +- { +- .name = "bootparam", +- .offset = 0, +- .size = 0x40000, +- }, { +- .name = "bl2", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x140000 +- }, { +- .name = "cert_header", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x40000, +- }, { +- .name = "bl31", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x40000, +- }, { +- .name = "optee", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x440000, +- }, { +- .name = "u-boot", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x80000, +- }, { +- .name = "reserved", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x80000, +- }, { +- .name = "u-boot-env", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x40000, +- }, { +- .name = "dtb", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x80000, +- }, { +- .name = "kernel", +- .offset = MTDPART_OFS_APPEND, +- .size = 0x1000000, +- }, { +- .name = "user", +- .offset = MTDPART_OFS_APPEND, +- .size = MTDPART_SIZ_FULL, +- }, +-}; +- +-static int rpc_hf_init_mtd(struct rpc_info *info) +-{ +- struct mtd_info *mtd = &info->mtd; +- u16 data[2] = { 0, 0 }; +- u32 id, size; +- int retval; +- +- rpc_hf_mode_ext(info); +- +- rpc_hf_wp(info, 0); +- +- rpc_hf_unlock(info, 0); +- rpc_hf_write_cmd(info, RPC_CFI_UNLOCK1, RPC_CFI_CMD_READ_ID); +- +- rpc_hf_read_reg(info, 0x0, data, RPC_HF_SIZE_32BIT); +- if ((data[0] & RPC_CFI_ID_MASK) != RPC_CFI_ID_MAN_SPANSION || +- (data[1] & RPC_CFI_ID_MASK) != RPC_CFI_ID_TYPE_HYPERFLASH) { +- retval = -ENODEV; +- goto out; +- } +- +- id = data[0] | data[1] << 16; +- +- rpc_hf_read_reg(info, 0x27 << 1, data, RPC_HF_SIZE_16BIT); +- size = 1 << data[0]; +- +- if (size > resource_size(info->flash_res)) +- size = resource_size(info->flash_res); +- +- if (size & (RPC_HF_ERASE_SIZE - 1)) { +- retval = -EINVAL; +- goto out; +- } +- +- init_rwsem(&info->lock); +- info->flash_id = id; +- mtd->name = "HyperFlash"; +- mtd->type = MTD_NORFLASH; +- mtd->flags = MTD_CAP_NORFLASH; +- mtd->size = size; +- mtd->writesize = 1; +- mtd->writebufsize = RPC_WBUF_SIZE; +- mtd->erasesize = RPC_HF_ERASE_SIZE; +- mtd->owner = THIS_MODULE; +- mtd->priv = info; +- mtd->_erase = rpc_hf_mtd_erase; +- mtd->_write = rpc_hf_mtd_write; +- mtd->_read = rpc_hf_mtd_read; +- retval = mtd_device_register(mtd, partition_info, +- ARRAY_SIZE(partition_info)); +-out: +- rpc_hf_write_cmd(info, 0, RPC_CFI_CMD_RESET); +- rpc_hf_mode_ext(info); +- return retval; +-} +- +-static int rpc_flash_init(void) +-{ +- struct rpc_info *info; +- struct resource *res; +- void __iomem *base; +- int retval = -ENODEV; +- +- if (!of_machine_is_compatible("renesas,r8a7795")) +- return -ENODEV; +- +- info = kzalloc(sizeof(*info), GFP_KERNEL); +- if (!info) +- return -ENOMEM; +- +- res = request_mem_region(RPC_BASE, RPC_SIZE, "RPC"); +- if (!res) +- goto out_info; +- +- info->rpc_res = res; +- base = ioremap(res->start, resource_size(res)); +- if (!base) +- goto out_rpc_res; +- +- info->rpc_base = base; +- res = request_mem_region(RPC_FLASH_BASE, RPC_FLASH_SIZE, "RPC-ext"); +- if (!res) +- goto out_rpc_base; +- +- info->flash_res = res; +- base = ioremap(res->start, resource_size(res)); +- if (!base) +- goto out_flash_res; +- +- info->flash_base = base; +- retval = rpc_hf_init_mtd(info); +- if (retval) +- goto out_flash_base; +- +- pr_info("HyperFlash Id: %x\n", info->flash_id); +- +- rpc_info = info; +- return 0; +- +-out_flash_base: +- iounmap(info->flash_base); +-out_flash_res: +- release_mem_region(info->flash_res->start, +- resource_size(info->flash_res)); +-out_rpc_base: +- iounmap(info->rpc_base); +-out_rpc_res: +- release_mem_region(info->rpc_res->start, +- resource_size(info->rpc_res)); +-out_info: +- kfree(info); +- return retval; +-} +- +-static void rpc_flash_exit(void) +-{ +- struct rpc_info *info = rpc_info; +- +- if (!info) +- return; +- +- rpc_info = NULL; +- +- mtd_device_unregister(&info->mtd); +- +- iounmap(info->flash_base); +- release_mem_region(info->flash_res->start, +- resource_size(info->flash_res)); +- iounmap(info->rpc_base); +- release_mem_region(info->rpc_res->start, +- resource_size(info->rpc_res)); +- kfree(info); +-} +- +-module_init(rpc_flash_init); +-module_exit(rpc_flash_exit); +- +-MODULE_LICENSE("GPL v2"); +-MODULE_DESCRIPTION("Renesas RPC HyperFlash MTD driver"); +diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig +index 2c73adb..bd316fd 100644 +--- a/drivers/mtd/spi-nor/Kconfig ++++ b/drivers/mtd/spi-nor/Kconfig +@@ -8,12 +8,26 @@ menuconfig MTD_SPI_NOR + if MTD_SPI_NOR + + +-config SPI_RENESAS_RPC ++config MTD_RENESAS_RPC + tristate "Renesas RPC controller" +- depends on ARCH_R8A7795 || ARCH_R8A7796 || ARCH_R8A77970 || ARCH_R8A77980 || COMPILE_TEST ++ depends on ARCH_RENESAS || COMPILE_TEST + help +- QSPI driver for Renesas SPI Multi I/O Bus controller. This controller +- supports normal, dual and quad spi for one or two SPI NOR Flashes. ++ Renesas RPC interface driver. This controller support QSPI and HyperFlash ++ devices. ++ ++config MTD_RENESAS_RPC_HYPERFLASH ++ tristate "Renesas RPC HyperFlash" ++ depends on ARCH_RENESAS || COMPILE_TEST ++ select MTD_RENESAS_RPC ++ help ++ HyperFlash driver for Renesas RPC Multi I/O Bus controller controller. ++ ++config MTD_RENESAS_RPC_QSPI ++ tristate "Renesas RPC QSPI" ++ depends on ARCH_RENESAS || COMPILE_TEST ++ select MTD_RENESAS_RPC ++ help ++ QSPI driver for Renesas RPC Multi I/O Bus controller. + + config MTD_MT81xx_NOR + tristate "Mediatek MT81xx SPI NOR flash controller" +diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile +index 0c46c9c..a10c6ab 100644 +--- a/drivers/mtd/spi-nor/Makefile ++++ b/drivers/mtd/spi-nor/Makefile +@@ -7,8 +7,10 @@ obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o + obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o + obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o + obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o +-obj-$(CONFIG_SPI_RENESAS_RPC) += renesas-rpc.o + obj-$(CONFIG_SPI_INTEL_SPI) += intel-spi.o + obj-$(CONFIG_SPI_INTEL_SPI_PCI) += intel-spi-pci.o + obj-$(CONFIG_SPI_INTEL_SPI_PLATFORM) += intel-spi-platform.o + obj-$(CONFIG_SPI_STM32_QUADSPI) += stm32-quadspi.o ++obj-$(CONFIG_MTD_RENESAS_RPC) += renesas-rpc.o ++obj-$(CONFIG_MTD_RENESAS_RPC_QSPI) += renesas-rpc-qspi.o ++obj-$(CONFIG_MTD_RENESAS_RPC_HYPERFLASH) += renesas-rpc-hyperflash.o +diff --git a/drivers/mtd/spi-nor/renesas-rpc-hyperflash.c b/drivers/mtd/spi-nor/renesas-rpc-hyperflash.c +new file mode 100644 +index 0000000..aea42b6 +--- /dev/null ++++ b/drivers/mtd/spi-nor/renesas-rpc-hyperflash.c +@@ -0,0 +1,742 @@ ++/* ++ * Renesas RPC driver ++ * ++ * Copyright (C) 2018, Cogent Embedded Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++ ++#include "renesas-rpc.h" ++ ++/* RPC HyperFlash */ ++#define RPC_HF_CMD_CA47 (0x1 << 7) /* Read */ ++#define RPC_HF_CMD_CA46 (0x1 << 6) /* Register space */ ++#define RPC_HF_CMD_CA45 (0x1 << 5) /* Liner burst */ ++ ++#define RPC_HF_CMD_READ_REG (RPC_HF_CMD_CA47 | RPC_HF_CMD_CA46) ++#define RPC_HF_CMD_READ_MEM RPC_HF_CMD_CA47 ++#define RPC_HF_CMD_WRITE_REG RPC_HF_CMD_CA46 ++#define RPC_HF_CMD_WRITE_MEM 0x0 ++ ++#define RPC_HF_ERASE_SIZE 0x40000 ++ ++#define RPC_CFI_STATUS_DRB (0x1 << 7) ++#define RPC_CFI_STATUS_ESSB (0x1 << 6) ++#define RPC_CFI_STATUS_ESB (0x1 << 5) ++#define RPC_CFI_STATUS_PSB (0x1 << 4) ++#define RPC_CFI_STATUS_WBASB (0x1 << 3) ++#define RPC_CFI_STATUS_PSSB (0x1 << 2) ++#define RPC_CFI_STATUS_SLSB (0x1 << 1) ++#define RPC_CFI_STATUS_ESTAT (0x1 << 0) ++ ++#define RPC_CFI_UNLOCK1 (0x555 << 1) ++#define RPC_CFI_UNLOCK2 (0x2AA << 1) ++ ++#define RPC_CFI_CMD_UNLOCK_START 0xAA ++#define RPC_CFI_CMD_UNLOCK_ACK 0x55 ++#define RPC_CFI_CMD_RESET 0xF0 ++#define RPC_CFI_CMD_READ_STATUS 0x70 ++#define RPC_CFI_CMD_READ_ID 0x90 ++#define RPC_CFI_CMD_WRITE 0xA0 ++#define RPC_CFI_CMD_ERASE_START 0x80 ++#define RPC_CFI_CMD_ERASE_SECTOR 0x30 ++ ++#define RPC_CFI_ID_MASK 0x000F ++#define RPC_CFI_ID_MAN_SPANSION 0x0001 ++#define RPC_CFI_ID_TYPE_HYPERFLASH 0x000E ++ ++struct rpc_hf_info { ++ struct mtd_info mtd; ++ struct mutex lock; ++ void *priv; ++}; ++ ++static void rpc_hf_mode_man(struct rpc_info *rpc) ++{ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ /* ++ * RPC_PHYCNT = 0x80000263 ++ * bit31 CAL = 1 : PHY calibration ++ * bit1-0 PHYMEM[1:0] = 11 : HyperFlash ++ */ ++ rpc_clrsetl(rpc, RPC_PHYCNT, ++ RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2 | ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3), ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); ++ ++ /* ++ * RPC_CMNCR = 0x81FFF301 ++ * bit31 MD = 1 : Manual mode ++ * bit1-0 BSZ[1:0] = 01 : QSPI Flash x 2 or HyperFlash ++ */ ++ rpc_clrsetl(rpc, RPC_CMNCR, ++ RPC_CMNCR_MD | RPC_CMNCR_BSZ(3), ++ RPC_CMNCR_MOIIO_HIZ | RPC_CMNCR_IOFV_HIZ | ++ RPC_CMNCR_MD | RPC_CMNCR_BSZ(1)); ++} ++ ++static void rpc_hf_mode_ext(struct rpc_info *rpc) ++{ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ /* ++ * RPC_PHYCNT = 0x80000263 ++ * bit31 CAL = 1 : PHY calibration ++ * bit1-0 PHYMEM[1:0] = 11 : HyperFlash ++ */ ++ rpc_clrsetl(rpc, RPC_PHYCNT, ++ RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2 | ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3), ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); ++ ++ /* ++ * RPC_CMNCR = 0x81FFF301 ++ * bit31 MD = 1 : Manual mode ++ * bit1-0 BSZ[1:0] = 01 : QSPI Flash x 2 or HyperFlash ++ */ ++ rpc_clrsetl(rpc, RPC_CMNCR, ++ RPC_CMNCR_MD | RPC_CMNCR_BSZ(3), ++ RPC_CMNCR_MOIIO_HIZ | RPC_CMNCR_IOFV_HIZ | ++ RPC_CMNCR_BSZ(1)); ++ ++ /* ++ * RPC_DRCR = 0x001F0100 ++ * bit21-16 RBURST[4:0] = 11111 : Read burst 32 64-bit data units ++ * bit9 RCF = 1 : Clear cache ++ * bit8 RBE = 1 : Read burst enable ++ */ ++ rpc_writel(rpc, RPC_DRCR, ++ RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RCF | RPC_DRCR_RBE); ++ ++ rpc_writel(rpc, RPC_DRCMR, RPC_DRCMR_CMD(0xA0)); ++ rpc_writel(rpc, RPC_DRENR, ++ RPC_DRENR_CDB(2) | RPC_DRENR_OCDB(2) | ++ RPC_DRENR_ADB(2) | RPC_DRENR_DRDB(2) | ++ RPC_DRENR_CDE | RPC_DRENR_OCDE | ++ RPC_DRENR_DME | RPC_DRENR_ADE(4)); ++ rpc_writel(rpc, RPC_DRDMCR, RPC_DRDMCR_DMCYC(0xE)); ++ rpc_writel(rpc, RPC_DRDRENR, ++ RPC_DRDRENR_HYPE | RPC_DRDRENR_ADDRE | RPC_DRDRENR_DRDRE); ++ ++ /* Dummy read */ ++ rpc_readl(rpc, RPC_DRCR); ++} ++ ++static void rpc_hf_xfer(struct rpc_info *rpc, u32 addr, u16 *data, ++ enum rpc_size size, u8 cmd) ++{ ++ u32 val; ++ ++ rpc_hf_mode_man(rpc); ++ ++ /* ++ * bit23-21 CMD[7:5] : CA47-45 ++ * CA47 = 0/1 : Write/Read ++ * CA46 = 0/1 : Memory Space/Register Space ++ * CA45 = 0/1 : Wrapped Burst/Linear Burst ++ */ ++ rpc_writel(rpc, RPC_SMCMR, RPC_SMCMR_CMD(cmd)); ++ ++ rpc_writel(rpc, RPC_SMADR, addr >> 1); ++ ++ rpc_writel(rpc, RPC_SMOPR, 0x0); ++ ++ /* ++ * RPC_SMDRENR = 0x00005101 ++ * bit14-12 HYPE = 101: Hyperflash mode ++ * bit8 ADDRE = 1 : Address DDR transfer ++ * bit0 SPIDRE = 1 : DATA DDR transfer ++ */ ++ rpc_writel(rpc, RPC_SMDRENR, ++ RPC_SMDRENR_HYPE_HF | RPC_SMDRENR_ADDRE | RPC_SMDRENR_SPIDRE); ++ ++ val = RPC_SMENR_CDB(2) | RPC_SMENR_OCDB(2) | ++ RPC_SMENR_ADB(2) | RPC_SMENR_SPIDB(2) | ++ RPC_SMENR_CDE | RPC_SMENR_OCDE | RPC_SMENR_ADE(4) | size; ++ ++ if (cmd & RPC_HF_CMD_CA47) ++ goto read_transfer; ++ ++ /* ++ * RPC_SMENR = 0xA222540x ++ * bit31-30 CDB[1:0] = 10 : 4bit width command ++ * bit25-24 ADB[1:0] = 10 : 4bit width address ++ * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data ++ * bit15 DME = 0 : dummy cycle disable ++ * bit14 CDE = 1 : Command enable ++ * bit12 OCDE = 1 : Option Command enable ++ * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output ++ * bit7-4 OPDE[3:0] = 0000 : Option data disable ++ * bit3-0 SPIDE[3:0] = xxxx : Transfer size ++ */ ++ rpc_writel(rpc, RPC_SMENR, val); ++ ++ switch (size) { ++ case RPC_SIZE_DUAL_64BIT: ++ val = cmd & RPC_HF_CMD_CA46 ? ++ cpu_to_be16(data[0]) | cpu_to_be16(data[1]) << 16 : ++ data[0] | data[1] << 16; ++ rpc_writel(rpc, RPC_SMWDR1, val); ++ val = cmd & RPC_HF_CMD_CA46 ? ++ cpu_to_be16(data[2]) | cpu_to_be16(data[3]) << 16 : ++ data[2] | data[3] << 16; ++ break; ++ case RPC_SIZE_DUAL_32BIT: ++ val = cmd & RPC_HF_CMD_CA46 ? ++ cpu_to_be16(data[0]) | cpu_to_be16(data[1]) << 16 : ++ data[0] | data[1] << 16; ++ break; ++ default: ++ val = cmd & RPC_HF_CMD_CA46 ? ++ cpu_to_be16(data[0]) << 16 : ++ data[0] << 16; ++ break; ++ } ++ ++ rpc_writel(rpc, RPC_SMWDR0, val); ++ /* ++ * RPC_SMCR = 0x00000003 ++ * bit1 SPIWE = 1 : Data write enable ++ * bit0 SPIE = 1 : SPI transfer start ++ */ ++ rpc_writel(rpc, RPC_SMCR, RPC_SMCR_SPIWE | RPC_SMCR_SPIE); ++ return; ++ ++read_transfer: ++ rpc_writel(rpc, RPC_SMDMCR, RPC_SMDMCR_DMCYC(0xE)); ++ val |= RPC_SMENR_DME; ++ ++ /* ++ * RPC_SMENR = 0xA222D40x ++ * bit31-30 CDB[1:0] = 10 : 4bit width command ++ * bit25-24 ADB[1:0] = 10 : 4bit width address ++ * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data ++ * bit15 DME = 1 : dummy cycle disable ++ * bit14 CDE = 1 : Command enable ++ * bit12 OCDE = 1 : Option Command enable ++ * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output (24 Bit Address) ++ * bit7-4 OPDE[3:0] = 0000 : Option data disable ++ * bit3-0 SPIDE[3:0] = xxxx : Transfer size ++ */ ++ rpc_writel(rpc, RPC_SMENR, val); ++ ++ /* ++ * RPC_SMCR = 0x00000005 ++ * bit2 SPIRE = 1 : Data read disable ++ * bit0 SPIE = 1 : SPI transfer start ++ */ ++ rpc_writel(rpc, RPC_SMCR, RPC_SMCR_SPIRE | RPC_SMCR_SPIE); ++ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ val = rpc_readl(rpc, RPC_SMRDR0); ++ ++ /* ++ * Read data from either register or memory space. ++ * Register space is always big-endian. ++ */ ++ switch (size) { ++ case RPC_SIZE_DUAL_64BIT: ++ if (cmd & RPC_HF_CMD_CA46) { ++ data[3] = be16_to_cpu((val >> 16) & 0xFFFF); ++ data[2] = be16_to_cpu(val & 0xFFFF); ++ } else { ++ data[3] = (val >> 16) & 0xFFFF; ++ data[2] = val & 0xFFFF; ++ } ++ val = rpc_readl(rpc, RPC_SMRDR1); ++ if (cmd & RPC_HF_CMD_CA46) { ++ data[1] = be16_to_cpu((val >> 16) & 0xFFFF); ++ data[0] = be16_to_cpu(val & 0xFFFF); ++ } else { ++ data[1] = (val >> 16) & 0xFFFF; ++ data[0] = val & 0xFFFF; ++ } ++ break; ++ case RPC_SIZE_DUAL_32BIT: ++ if (cmd & RPC_HF_CMD_CA46) { ++ data[1] = be16_to_cpu((val >> 16) & 0xFFFF); ++ data[0] = be16_to_cpu(val & 0xFFFF); ++ } else { ++ data[1] = (val >> 16) & 0xFFFF; ++ data[0] = val & 0xFFFF; ++ } ++ break; ++ default: ++ data[0] = cmd & RPC_HF_CMD_CA46 ? ++ be16_to_cpu((val >> 16) & 0xFFFF) : ++ (val >> 16) & 0xFFFF; ++ break; ++ } ++} ++ ++static void rpc_hf_wbuf_enable(struct rpc_info *rpc, u32 addr) ++{ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ /* ++ * RPC_PHYCNT = 0x80000277 ++ * bit31 CAL = 1 : PHY calibration ++ * bit4 WBUF2 = 1 : Write buffer enable 2 ++ * bit2 WBUF = 1 : Write buffer enable ++ * bit1-0 PHYMEM[1:0] = 11 : HyperFlash ++ */ ++ rpc_clrsetl(rpc, RPC_PHYCNT, ++ RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF | ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3), ++ RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF | ++ RPC_PHYCNT_CAL | RPC_PHYCNT_MEM(3)); ++ ++ /* ++ * RPC_DRCR = 0x001F0100 ++ * bit21-16 RBURST[4:0] = 11111 : Read burst 32 64-bit data units ++ * bit9 RCF = 1 : Clear cache ++ * bit8 RBE = 1 : Read burst enable ++ */ ++ rpc_writel(rpc, RPC_DRCR, ++ RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RCF | RPC_DRCR_RBE); ++ ++ rpc_writel(rpc, RPC_SMCMR, RPC_SMCMR_CMD(RPC_HF_CMD_WRITE_MEM)); ++ ++ rpc_writel(rpc, RPC_SMADR, addr >> 1); ++ ++ rpc_writel(rpc, RPC_SMOPR, 0x0); ++ ++ /* ++ * RPC_SMDRENR = 0x00005101 ++ * bit14-12 HYPE = 101:Hyperflash mode ++ * bit8 ADDRE = 1 : Address DDR transfer ++ * bit0 SPIDRE = 1 : DATA DDR transfer ++ */ ++ rpc_writel(rpc, RPC_SMDRENR, ++ RPC_SMDRENR_HYPE_HF | RPC_SMDRENR_ADDRE | RPC_SMDRENR_SPIDRE); ++ ++ /* ++ * RPC_SMENR = 0xA222540F ++ * bit31-30 CDB[1:0] = 10 : 4bit width command ++ * bit25-24 ADB[1:0] = 10 : 4bit width address ++ * bit17-16 SPIDB[1:0] = 10 : 4bit width transfer data ++ * bit15 DME = 0 : dummy cycle disable ++ * bit14 CDE = 1 : Command enable ++ * bit12 OCDE = 1 : Option Command enable ++ * bit11-8 ADE[3:0] = 0100 : ADR[23:0] output (24 Bit Address) ++ * bit7-4 OPDE[3:0] = 0000 : Option data disable ++ * bit3-0 SPIDE[3:0] = 1111 : 64-bit transfer size ++ */ ++ rpc_writel(rpc, RPC_SMENR, ++ RPC_SMENR_CDB(2) | RPC_SMENR_OCDB(2) | ++ RPC_SMENR_ADB(2) | RPC_SMENR_SPIDB(2) | ++ RPC_SMENR_CDE | RPC_SMENR_OCDE | ++ RPC_SMENR_ADE(4) | RPC_SIZE_DUAL_64BIT); ++ ++ /* Dummy read */ ++ rpc_readl(rpc, RPC_DRCR); ++} ++ ++static inline void rpc_hf_write_cmd(struct rpc_info *rpc, u32 addr, u16 cmd) ++{ ++ rpc_hf_xfer(rpc, addr, &cmd, RPC_SIZE_DUAL_16BIT, RPC_HF_CMD_WRITE_REG); ++} ++ ++static inline void rpc_hf_read_reg(struct rpc_info *rpc, u32 addr, u16 *data, ++ enum rpc_size size) ++{ ++ rpc_hf_xfer(rpc, addr, data, size, RPC_HF_CMD_READ_REG); ++} ++ ++static inline void rpc_hf_write_reg(struct rpc_info *rpc, u32 addr, u16 *data, ++ enum rpc_size size) ++{ ++ rpc_hf_xfer(rpc, addr, data, size, RPC_HF_CMD_WRITE_REG); ++} ++ ++static inline void rpc_hf_read_mem(struct rpc_info *rpc, u32 addr, u16 *data, ++ enum rpc_size size) ++{ ++ rpc_hf_xfer(rpc, addr, data, size, RPC_HF_CMD_READ_MEM); ++} ++ ++static inline void rpc_hf_write_mem(struct rpc_info *rpc, u32 addr, u16 *data, ++ enum rpc_size size) ++{ ++ rpc_hf_xfer(rpc, addr, data, size, RPC_HF_CMD_WRITE_MEM); ++} ++ ++static void rpc_hf_wp(struct rpc_info *rpc, int enable) ++{ ++ rpc_clrsetl(rpc, RPC_PHYINT, RPC_PHYINT_WP, enable ? RPC_PHYINT_WP : 0); ++} ++ ++static void rpc_hf_unlock(struct rpc_info *rpc, u32 addr) ++{ ++ rpc_hf_write_cmd(rpc, addr + RPC_CFI_UNLOCK1, ++ RPC_CFI_CMD_UNLOCK_START); ++ rpc_hf_write_cmd(rpc, addr + RPC_CFI_UNLOCK2, ++ RPC_CFI_CMD_UNLOCK_ACK); ++} ++ ++static inline int rpc_hf_status(struct rpc_info *rpc, u32 addr, ++ int iterations, int delay) ++{ ++ int ret; ++ u16 status = 0; ++ ++ while (iterations-- > 0) { ++ rpc_hf_write_cmd(rpc, addr + RPC_CFI_UNLOCK1, ++ RPC_CFI_CMD_READ_STATUS); ++ rpc_hf_read_reg(rpc, addr, &status, RPC_SIZE_DUAL_16BIT); ++ ++ if (status & RPC_CFI_STATUS_DRB) ++ break; ++ ++ if (delay < 10000) ++ usleep_range(delay, delay * 2); ++ else ++ msleep(delay / 1000); ++ } ++ ++ if (!(status & RPC_CFI_STATUS_DRB)) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ if (status & (RPC_CFI_STATUS_PSB | RPC_CFI_STATUS_ESB)) { ++ ret = -EIO; ++ goto out; ++ } ++ ++ return 0; ++ ++out: ++ /* Reset the flash */ ++ rpc_hf_write_cmd(rpc, 0, RPC_CFI_CMD_RESET); ++ return ret; ++} ++ ++static int rpc_hf_sector_erase(struct rpc_info *rpc, u32 addr) ++{ ++ rpc_hf_unlock(rpc, addr); ++ rpc_hf_write_cmd(rpc, addr + RPC_CFI_UNLOCK1, RPC_CFI_CMD_ERASE_START); ++ rpc_hf_unlock(rpc, addr); ++ rpc_hf_write_cmd(rpc, addr, RPC_CFI_CMD_ERASE_SECTOR); ++ ++ return rpc_hf_status(rpc, addr, 1000, 10000); ++} ++ ++/* Flash read */ ++static int rpc_hf_mtd_read(struct mtd_info *mtd, loff_t from, size_t len, ++ size_t *retlen, u_char *buf) ++{ ++ struct rpc_hf_info *hf = mtd->priv; ++ struct rpc_info *rpc = hf->priv; ++ ++ mutex_lock(&hf->lock); ++ rpc_do_read_flash(rpc, from, len, buf, mtd->size > RPC_READ_ADDR_SIZE); ++ mutex_unlock(&hf->lock); ++ ++ *retlen = len; ++ return 0; ++} ++ ++/* Flash erase */ ++static int rpc_hf_mtd_erase(struct mtd_info *mtd, struct erase_info *instr) ++{ ++ struct rpc_hf_info *hf = mtd->priv; ++ struct rpc_info *rpc = hf->priv; ++ u32 addr, end; ++ int ret = 0; ++ ++ if (mtd_mod_by_eb(instr->addr, mtd)) { ++ dev_dbg(mtd->dev.parent, "%s: unaligned address\n", __func__); ++ return -EINVAL; ++ } ++ ++ if (mtd_mod_by_eb(instr->len, mtd)) { ++ dev_dbg(mtd->dev.parent, "%s: unaligned length\n", __func__); ++ return -EINVAL; ++ } ++ ++ end = instr->addr + instr->len; ++ ++ mutex_lock(&hf->lock); ++ for (addr = instr->addr; addr < end; addr += mtd->erasesize) { ++ ret = rpc_hf_sector_erase(rpc, addr); ++ ++ if (ret) ++ break; ++ } ++ ++ rpc_hf_mode_ext(rpc); ++ mutex_unlock(&hf->lock); ++ ++ instr->state = ret ? MTD_ERASE_FAILED : MTD_ERASE_DONE; ++ mtd_erase_callback(instr); ++ ++ return ret; ++} ++ ++/* Copy memory to flash */ ++static int rpc_hf_mtd_write(struct mtd_info *mtd, loff_t offset, size_t len, ++ size_t *retlen, const u_char *src) ++{ ++ struct rpc_hf_info *hf = mtd->priv; ++ struct rpc_info *rpc = hf->priv; ++ union { ++ u8 b[4]; ++ u16 w[2]; ++ u32 d; ++ } data; ++ loff_t addr; ++ size_t size, cnt; ++ int ret, idx; ++ u8 last; ++ ++ ret = 0; ++ *retlen = 0; ++ cnt = len; ++ idx = 0; ++ ++ mutex_lock(&hf->lock); ++ ++ /* Handle unaligned start */ ++ if (offset & 0x1) { ++ offset--; ++ data.b[idx] = readb(rpc->read_area + offset); ++ idx++; ++ } ++ ++ /* Handle unaligned end */ ++ addr = offset + idx + len; ++ last = addr & 0x1 ? readb(rpc->read_area + addr) : 0xFF; ++ ++ addr = offset - mtd_mod_by_eb(offset, mtd); ++ size = mtd->erasesize - (offset - addr); ++ ++ while (cnt) { ++ if (size > cnt) ++ size = cnt; ++ ++ cnt -= size; ++ while (size) { ++ rpc_hf_unlock(rpc, addr); ++ rpc_hf_write_cmd(rpc, ++ addr + RPC_CFI_UNLOCK1, ++ RPC_CFI_CMD_WRITE); ++ ++ if (rpc_wbuf_available(rpc) && (size > 0x7)) { ++ u32 wbuf = 0; ++ int block = size >= RPC_WBUF_SIZE ? ++ RPC_WBUF_SIZE : size & ~0x7; ++ ++ rpc_hf_wbuf_enable(rpc, offset); ++ offset += block; ++ ++ block >>= 3; ++ while (block--) { ++ while (idx < 4) { ++ data.b[idx++] = *src++; ++ size--; ++ } ++ rpc_wbuf_writel(rpc, wbuf, data.d); ++ wbuf += 4; ++ ++ idx = 0; ++ while (idx < 4) { ++ data.b[idx++] = *src++; ++ size--; ++ } ++ rpc_wbuf_writel(rpc, wbuf, data.d); ++ wbuf += 4; ++ ++ idx = 0; ++ } ++ ++ rpc_writel(rpc, RPC_SMCR, ++ RPC_SMCR_SPIWE | RPC_SMCR_SPIE); ++ } else { ++ enum rpc_size bits; ++ ++ while (idx < 4) { ++ data.b[idx++] = *src++; ++ size--; ++ ++ if (!size) ++ break; ++ } ++ ++ if (idx & 0x1) ++ data.b[idx++] = last; ++ ++ switch (idx) { ++ case 2: ++ bits = RPC_SIZE_DUAL_16BIT; ++ break; ++ default: ++ bits = RPC_SIZE_DUAL_32BIT; ++ break; ++ } ++ ++ rpc_hf_write_mem(rpc, offset, data.w, bits); ++ offset += idx; ++ idx = 0; ++ } ++ ++ ret = rpc_hf_status(rpc, addr, 1000000, 10); ++ if (ret) ++ goto out; ++ } ++ ++ size = mtd->erasesize; ++ addr += size; ++ offset = addr; ++ *retlen = len - cnt; ++ } ++ ++out: ++ rpc_hf_mode_ext(rpc); ++ mutex_unlock(&hf->lock); ++ return ret; ++} ++ ++static int rpc_hf_hw_init(struct rpc_info *rpc, u32 *id, u32 *size) ++{ ++ u16 data[2] = { 0, 0 }; ++ u32 sz; ++ int ret = 0; ++ ++ rpc_hf_mode_ext(rpc); ++ ++ rpc_hf_wp(rpc, 0); ++ ++ rpc_hf_unlock(rpc, 0); ++ rpc_hf_write_cmd(rpc, RPC_CFI_UNLOCK1, RPC_CFI_CMD_READ_ID); ++ ++ rpc_hf_read_reg(rpc, 0x0, data, RPC_SIZE_DUAL_32BIT); ++ if ((data[0] & RPC_CFI_ID_MASK) != RPC_CFI_ID_MAN_SPANSION || ++ (data[1] & RPC_CFI_ID_MASK) != RPC_CFI_ID_TYPE_HYPERFLASH) { ++ ret = -ENXIO; ++ goto out; ++ } ++ ++ if (id) ++ *id = data[0] | data[1] << 16; ++ ++ rpc_hf_read_reg(rpc, 0x27 << 1, data, RPC_SIZE_DUAL_16BIT); ++ sz = 1 << data[0]; ++ ++ if (sz & (RPC_HF_ERASE_SIZE - 1)) { ++ ret = -EINVAL; ++ goto out; ++ } ++ ++ if (size) ++ *size = sz; ++out: ++ rpc_hf_write_cmd(rpc, 0, RPC_CFI_CMD_RESET); ++ rpc_hf_mode_ext(rpc); ++ return ret; ++} ++ ++int rpc_hf_probe(struct platform_device *pdev) ++{ ++ struct rpc_info *rpc; ++ struct rpc_hf_info *hf; ++ struct mtd_info *mtd; ++ u32 flash_id, flash_size; ++ int ret; ++ ++ rpc = dev_get_drvdata(pdev->dev.parent); ++ if (!rpc) { ++ dev_err(&pdev->dev, "invalid data\n"); ++ return -EINVAL; ++ } ++ ++ hf = devm_kzalloc(&pdev->dev, sizeof(*hf), GFP_KERNEL); ++ if (!hf) { ++ dev_err(&pdev->dev, "allocation failed\n"); ++ return -ENOMEM; ++ } ++ ++ mutex_init(&hf->lock); ++ mtd_set_of_node(&hf->mtd, rpc->flash); ++ hf->priv = rpc; ++ ++ ret = clk_prepare_enable(rpc->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "cannot prepare clock\n"); ++ return ret; ++ } ++ ++ ret = rpc_hf_hw_init(rpc, &flash_id, &flash_size); ++ if (ret) { ++ dev_err(&pdev->dev, "initialization failed\n"); ++ goto error; ++ } ++ ++ mtd = &hf->mtd; ++ mtd->name = "HyperFlash"; ++ mtd->dev.parent = &pdev->dev; ++ mtd->type = MTD_NORFLASH; ++ mtd->flags = MTD_CAP_NORFLASH; ++ mtd->size = flash_size; ++ mtd->writesize = 1; ++ mtd->writebufsize = RPC_WBUF_SIZE; ++ mtd->erasesize = RPC_HF_ERASE_SIZE; ++ mtd->owner = THIS_MODULE; ++ mtd->priv = hf; ++ mtd->_erase = rpc_hf_mtd_erase; ++ mtd->_write = rpc_hf_mtd_write; ++ mtd->_read = rpc_hf_mtd_read; ++ ++ ret = mtd_device_register(mtd, NULL, 0); ++ if (ret) { ++ dev_err(&pdev->dev, "MTD registration failed\n"); ++ goto error; ++ } ++ ++ platform_set_drvdata(pdev, hf); ++ dev_info(&pdev->dev, "probed flash id:%x\n", flash_id); ++ return 0; ++ ++error: ++ clk_disable_unprepare(rpc->clk); ++ return ret; ++} ++ ++static int rpc_hf_remove(struct platform_device *pdev) ++{ ++ struct rpc_hf_info *hf = platform_get_drvdata(pdev); ++ struct rpc_info *rpc = hf->priv; ++ ++ mtd_device_unregister(&hf->mtd); ++ clk_disable_unprepare(rpc->clk); ++ return 0; ++} ++ ++/* platform driver interface */ ++static struct platform_driver rpc_hf_platform_driver = { ++ .probe = rpc_hf_probe, ++ .remove = rpc_hf_remove, ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "renesas-rpc-hyperflash", ++ }, ++}; ++ ++module_platform_driver(rpc_hf_platform_driver); ++ ++MODULE_ALIAS("renesas-rpc-hyperflash"); ++MODULE_AUTHOR("Cogent Embedded Inc. "); ++MODULE_DESCRIPTION("Renesas RPC HyperFlash Driver"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/mtd/spi-nor/renesas-rpc-qspi.c b/drivers/mtd/spi-nor/renesas-rpc-qspi.c +new file mode 100644 +index 0000000..3d2d5db +--- /dev/null ++++ b/drivers/mtd/spi-nor/renesas-rpc-qspi.c +@@ -0,0 +1,794 @@ ++/* ++ * Renesas RPC QSPI driver ++ * ++ * Copyright (C) 2019, Cogent Embedded Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "renesas-rpc.h" ++ ++static void rpc_endisable_write_buf(struct rpc_info *rpc, bool en) ++{ ++ rpc_clrsetl(rpc, RPC_PHYCNT, ++ RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2, ++ en ? RPC_PHYCNT_WBUF | RPC_PHYCNT_WBUF2 : 0); ++} ++ ++static int rpc_begin(struct rpc_info *rpc, ++ bool rx, bool tx, bool last) ++{ ++ u32 val = RPC_SMCR_SPIE; ++ ++ if (rx) ++ val |= RPC_SMCR_SPIRE; ++ ++ if (tx) ++ val |= RPC_SMCR_SPIWE; ++ ++ if (!last) ++ val |= RPC_SMCR_SSLKP; ++ ++ rpc_writel(rpc, RPC_SMCR, val); ++ ++ return 0; ++} ++ ++static int rpc_setup_reg_mode(struct rpc_info *rpc) ++{ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ rpc_endisable_write_buf(rpc, false); ++ ++ /* ...setup manual mode */ ++ rpc_clrsetl(rpc, RPC_CMNCR, 0, RPC_CMNCR_MD); ++ ++ /* disable ddr */ ++ rpc_clrsetl(rpc, RPC_SMDRENR, ++ RPC_SMDRENR_ADDRE | RPC_SMDRENR_OPDRE | RPC_SMDRENR_SPIDRE, ++ 0); ++ ++ /* enable 1bit command */ ++ rpc_clrsetl(rpc, RPC_SMENR, ++ RPC_SMENR_CDB(3) | RPC_SMENR_OCDB(3) | RPC_SMENR_DME | ++ RPC_SMENR_OCDE | RPC_SMENR_SPIDB(3) | ++ RPC_SMENR_ADE(0xF) | RPC_SMENR_ADB(3) | ++ RPC_SMENR_OPDE(0xF) | RPC_SMENR_SPIDE(0xF), ++ RPC_SMENR_CDB(0) | RPC_SMENR_CDE | RPC_SIZE_SINGLE_32BIT); ++ ++ return 0; ++} ++ ++static inline void rpc_flush_cache(struct rpc_info *rpc) ++{ ++ rpc_clrsetl(rpc, RPC_DRCR, 0, RPC_DRCR_RCF); ++} ++ ++static int rpc_setup_ext_mode(struct rpc_info *rpc) ++{ ++ u32 val; ++ u32 cmncr; ++ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ rpc_endisable_write_buf(rpc, false); ++ ++ /* ...setup ext mode */ ++ val = rpc_readl(rpc, RPC_CMNCR); ++ cmncr = val; ++ val &= ~(RPC_CMNCR_MD); ++ rpc_writel(rpc, RPC_CMNCR, val); ++ ++ /* ...enable burst and clear cache */ ++ val = rpc_readl(rpc, RPC_DRCR); ++ val &= ~(RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RBE | RPC_DRCR_SSLE); ++ val |= RPC_DRCR_RBURST(0x1F) | RPC_DRCR_RBE; ++ ++ if (cmncr & RPC_CMNCR_MD) ++ val |= RPC_DRCR_RCF; ++ ++ rpc_writel(rpc, RPC_DRCR, val); ++ ++ return 0; ++} ++ ++static int rpc_setup_data_size(struct rpc_info *rpc, u32 size, bool copy) ++{ ++ u32 val; ++ ++ val = rpc_readl(rpc, RPC_SMENR); ++ val &= ~(RPC_SMENR_SPIDE(0xF)); ++ ++ if (rpc->mtdtype == RPC_DUAL && !copy) ++ size >>= 1; ++ ++ switch (size) { ++ case 0: ++ break; ++ case 1: ++ val |= RPC_SIZE_SINGLE_8BIT; ++ break; ++ case 2: ++ val |= RPC_SIZE_SINGLE_16BIT; ++ break; ++ case 4: ++ val |= RPC_SIZE_SINGLE_32BIT; ++ break; ++ default: ++ dev_err(&rpc->pdev->dev, "Unsupported data width %d\n", size); ++ return -EINVAL; ++ } ++ rpc_writel(rpc, RPC_SMENR, val); ++ ++ return 0; ++} ++ ++static inline int rpc_get_read_addr_nbits(u8 opcode) ++{ ++ if (opcode == SPINOR_OP_READ_1_4_4_4B) ++ return 4; ++ return 1; ++} ++ ++#define RPC_NBITS_TO_VAL(v) ((v >> 1) & 3) ++static void rpc_setup_extmode_nbits(struct rpc_info *rpc, ++ int cnb, int anb, int dnb) ++{ ++ rpc_clrsetl(rpc, RPC_DRENR, ++ RPC_DRENR_CDB(3) | RPC_DRENR_ADB(3) | RPC_DRENR_DRDB(3), ++ RPC_DRENR_CDB(RPC_NBITS_TO_VAL(cnb)) | ++ RPC_DRENR_ADB(RPC_NBITS_TO_VAL(anb)) | ++ RPC_DRENR_DRDB(RPC_NBITS_TO_VAL(dnb))); ++} ++ ++static void rpc_setup_writemode_nbits(struct rpc_info *rpc, ++ int cnb, int anb, int dnb) ++{ ++ rpc_clrsetl(rpc, RPC_SMENR, ++ RPC_SMENR_CDB(3) | RPC_SMENR_ADB(3) | RPC_SMENR_SPIDB(3), ++ RPC_SMENR_CDB(RPC_NBITS_TO_VAL(cnb)) | ++ RPC_SMENR_ADB(RPC_NBITS_TO_VAL(anb)) | ++ RPC_SMENR_SPIDB(RPC_NBITS_TO_VAL(dnb))); ++} ++ ++static void rpc_setup_write_mode_command_and_adr(struct rpc_info *rpc, ++ int adr_width, bool ena) ++{ ++ u32 val; ++ ++ val = rpc_readl(rpc, RPC_SMENR); ++ val &= ~(RPC_SMENR_CDB(3) | RPC_SMENR_CDE | RPC_SMENR_ADE(0xF)); ++ ++ if (ena) { ++ /* enable 1bit command */ ++ val |= RPC_SMENR_CDB(0) | RPC_SMENR_CDE; ++ ++ if (adr_width == 4) ++ val |= RPC_SMENR_ADE(0xF); /* bits 31-0 */ ++ else ++ val |= RPC_SMENR_ADE(0x7); /* bits 23-0 */ ++ } ++ rpc_writel(rpc, RPC_SMENR, val); ++} ++ ++static void rpc_setup_write_mode(struct rpc_info *rpc, u8 opcode) ++{ ++ rpc_wait(rpc, RPC_TIMEOUT); ++ ++ rpc_endisable_write_buf(rpc, true); ++ ++ /* ...setup manual mode */ ++ rpc_clrsetl(rpc, RPC_CMNCR, 0, RPC_CMNCR_MD); ++ ++ /* disable ddr */ ++ rpc_clrsetl(rpc, RPC_SMDRENR, ++ RPC_SMDRENR_ADDRE | RPC_SMDRENR_OPDRE | RPC_SMDRENR_SPIDRE, ++ 0); ++ ++ rpc_clrsetl(rpc, RPC_SMENR, ++ RPC_SMENR_OCDB(3) | RPC_SMENR_DME | RPC_SMENR_OCDE | ++ RPC_SMENR_SPIDB(3) | RPC_SMENR_ADB(3) | ++ RPC_SMENR_OPDE(0xF) | RPC_SMENR_SPIDE(0xF), ++ opcode != SPINOR_OP_PP ? RPC_SIZE_SINGLE_32BIT : ++ RPC_SIZE_SINGLE_8BIT); ++} ++ ++static void rpc_read_manual_data(struct rpc_info *rpc, u32 *pv0, u32 *pv1) ++{ ++ u32 val0, val1, rd0, rd1; ++ ++ val0 = rpc_readl(rpc, RPC_SMRDR0); ++ val1 = rpc_readl(rpc, RPC_SMRDR1); ++ ++ if (rpc->mtdtype == RPC_DUAL) { ++ rd1 = (val0 & 0xFf000000) | ((val0 << 8) & 0xFf0000) | ++ ((val1 >> 16) & 0xff00) | ((val1 >> 8) & 0xff); ++ rd0 = ((val0 & 0xff0000) << 8) | ((val0 << 16) & 0xff0000) | ++ ((val1 >> 8) & 0xff00) | (val1 & 0xff); ++ } else ++ rd0 = val0; ++ ++ if (pv0) ++ *pv0 = rd0; ++ ++ if (pv1 && rpc->mtdtype == RPC_DUAL) ++ *pv1 = rd1; ++} ++ ++static int rpc_datalen2trancfersize(struct rpc_info *rpc, int len, bool copy) ++{ ++ int sz = len; ++ ++ if (len >= 2) ++ sz = 2; ++ ++ if (len >= 4) ++ sz = 4; ++ ++ if (rpc->mtdtype == RPC_DUAL && len >= 8 && !copy) ++ sz = 8; ++ ++ return sz; ++} ++ ++static int __rpc_write_data2reg(struct rpc_info *rpc, int off, ++ const u8 *buf, int sz) ++{ ++ const u32 *b32 = (const u32 *)buf; ++ const u16 *b16 = (const u16 *)buf; ++ ++ if (sz == 4) ++ rpc_writel(rpc, off, *b32); ++ else if (sz == 2) ++ writew(*b16, rpc->base + off); ++ else if (sz == 1) ++ writeb(*buf, rpc->base + off); ++ else if (sz != 0) { ++ dev_err(&rpc->pdev->dev, "incorrect data size %d\n", sz); ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++#define RPC_SETVAL(x) ((((x) & 0xff) << 8) | ((x) & 0xff)) ++static int rpc_write_data2reg(struct rpc_info *rpc, const u8 *buf, ++ int sz, bool copy) ++{ ++ int i, ret; ++ u32 v = 0; ++ ++ if (rpc->mtdtype == RPC_DUAL) { ++ if (copy) { ++ for (i = 0; i < sz && i < 2; i++) ++ v |= (RPC_SETVAL(buf[i]) << 16*i); ++ ++ ret = __rpc_write_data2reg(rpc, ++ sz == 4 ? RPC_SMWDR1 : RPC_SMWDR0, ++ (u8 *)&v, ++ sz == 4 ? sz : sz * 2); ++ if (ret) ++ return ret; ++ ++ v = 0; ++ for (; i < sz; i++) ++ v |= (RPC_SETVAL(buf[i]) << 16*i); ++ ++ ++ ret = __rpc_write_data2reg(rpc, ++ sz == 4 ? RPC_SMWDR0 : RPC_SMWDR1, ++ (u8 *)&v, ++ sz == 4 ? sz : sz * 2); ++ if (ret) ++ return ret; ++ ++ return 0; ++ } ++ ++ sz >>= 1; ++ ret = __rpc_write_data2reg(rpc, ++ sz == 4 ? RPC_SMWDR1 : RPC_SMWDR0, ++ buf, ++ sz == 4 ? sz : sz * 2); ++ if (ret) ++ return ret; ++ buf += sz; ++ ++ return __rpc_write_data2reg(rpc, ++ sz == 4 ? RPC_SMWDR0 : RPC_SMWDR1, ++ buf, sz == 4 ? sz : sz * 2); ++ } ++ ++ return __rpc_write_data2reg(rpc, RPC_SMWDR0, buf, sz); ++} ++ ++static ssize_t rpc_write_unaligned(struct spi_nor *nor, loff_t to, size_t len, ++ const u_char *buf, size_t fullen) ++{ ++ int ret = len, dsize; ++ struct rpc_info *rpc = nor->priv; ++ bool copy = false, last; ++ loff_t _to; ++ ++ rpc_endisable_write_buf(rpc, false); ++ ++ while (len > 0) { ++ _to = to; ++ if (rpc->mtdtype == RPC_DUAL) ++ _to >>= 1; ++ rpc_writel(rpc, RPC_SMADR, _to); ++ dsize = rpc_datalen2trancfersize(rpc, len, copy); ++ ++ if (rpc_setup_data_size(rpc, dsize, copy)) ++ return -EINVAL; ++ ++ rpc_write_data2reg(rpc, buf, dsize, copy); ++ ++ last = (len <= dsize && fullen <= ret); ++ rpc_begin(rpc, false, true, last); ++ if (rpc_wait(rpc, RPC_TIMEOUT)) ++ return -ETIMEDOUT; ++ ++ /* ...disable command */ ++ rpc_setup_write_mode_command_and_adr(rpc, ++ nor->addr_width, false); ++ ++ buf += dsize; ++ len -= dsize; ++ to += dsize; ++ } ++ ++ return ret; ++} ++ ++static ssize_t rpc_write_flash(struct spi_nor *nor, loff_t to, size_t len, ++ const u_char *buf) ++{ ++ ssize_t res = len, full = len; ++ u32 val; ++ u8 rval[2]; ++ struct rpc_info *rpc = nor->priv; ++ loff_t bo; ++ loff_t offset; ++ bool is_rounded = false; ++ ++ /* ...len should be rounded to 2 bytes */ ++ if (rpc->mtdtype == RPC_DUAL && (len & 1)) { ++ is_rounded = true; ++ len &= ~(1); ++ } ++ ++ bo = to & RPC_WBUF_MASK; ++ ++ rpc_flush_cache(rpc); ++ rpc_setup_write_mode(rpc, nor->program_opcode); ++ rpc_setup_write_mode_command_and_adr(rpc, nor->addr_width, true); ++ rpc_setup_writemode_nbits(rpc, 1, 1, 1); ++ ++ /* ...setup command */ ++ val = rpc_readl(rpc, RPC_SMCMR); ++ val &= ~RPC_SMCMR_CMD(0xFF); ++ val |= RPC_SMCMR_CMD(nor->program_opcode); ++ rpc_writel(rpc, RPC_SMCMR, val); ++ ++ offset = to & ~RPC_WBUF_MASK; ++ ++ /* ...write unaligned first bytes */ ++ if (bo) { ++ size_t min = (len < (RPC_WBUF_SIZE - bo)) ? len : (RPC_WBUF_SIZE - bo); ++ ++ rpc_write_unaligned(nor, to, min, buf, full); ++ rpc_setup_write_mode(rpc, nor->program_opcode); ++ ++ len -= min; ++ buf += min; ++ to += min; ++ full -= min; ++ } ++ ++ /* ++ * TODO: Unfortunately RPC does not write properly in write buf mode ++ * without transferring command. Investigate this. ++ */ ++ ++ if (len) { ++ rpc_write_unaligned(nor, to, len, buf, full); ++ buf += len; ++ to += len; ++ full -= len; ++ len = 0; ++ } ++ ++ if (is_rounded) { ++ rval[0] = *buf; ++ rval[1] = 0xFF; ++ rpc_write_unaligned(nor, to, 2, rval, full); ++ } ++ ++ rpc_flush_cache(rpc); ++ ++ return res; ++} ++ ++static inline unsigned int rpc_rx_nbits(struct spi_nor *nor) ++{ ++ return spi_nor_get_protocol_data_nbits(nor->read_proto); ++} ++ ++static ssize_t rpc_read_flash(struct spi_nor *nor, loff_t from, size_t len, ++ u_char *buf) ++{ ++ u32 val; ++ struct rpc_info *rpc = nor->priv; ++ int opcode_nbits = 1; ++ int addr_nbits = rpc_get_read_addr_nbits(nor->read_opcode); ++ int data_nbits = rpc_rx_nbits(nor); ++ int dummy = nor->read_dummy - 1; ++ ssize_t ret = len; ++ ++ rpc_setup_ext_mode(rpc); ++ /* ...setup n bits */ ++ rpc_setup_extmode_nbits(rpc, opcode_nbits, addr_nbits, data_nbits); ++ ++ /* TODO: setup DDR */ ++ ++ /* ...setup command */ ++ val = rpc_readl(rpc, RPC_DRCMR); ++ val &= ~RPC_DRCMR_CMD(0xFF); ++ val |= RPC_DRCMR_CMD(nor->read_opcode); ++ rpc_writel(rpc, RPC_DRCMR, val); ++ ++ /* ...setup dummy cycles */ ++ val = rpc_readl(rpc, RPC_DRDMCR); ++ val &= ~RPC_DRDMCR_DMCYC(0x1F); ++ val |= RPC_DRDMCR_DMCYC(dummy); ++ rpc_writel(rpc, RPC_DRDMCR, val); ++ ++ /* ...setup read sequence */ ++ val = rpc_readl(rpc, RPC_DRENR); ++ val |= RPC_DRENR_DME | RPC_DRENR_CDE; ++ rpc_writel(rpc, RPC_DRENR, val); ++ ++ rpc_do_read_flash(rpc, from, len, buf, nor->addr_width > 3); ++ ++ return ret; ++} ++ ++static int __rpc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) ++{ ++ u32 val; ++ u32 val2 = 0; ++ u32 *buf32; ++ int i; ++ u32 mask = 0, type; ++ struct rpc_info *rpc = nor->priv; ++ ++ type = rpc->mtdtype; ++ ++ rpc_setup_reg_mode(rpc); ++ val = rpc_readl(rpc, RPC_SMCMR); ++ val &= ~RPC_SMCMR_CMD(0xFF); ++ val |= RPC_SMCMR_CMD(opcode); ++ rpc_writel(rpc, RPC_SMCMR, val); ++ ++ rpc_begin(rpc, true, false, len <= 4); ++ if (rpc_wait(rpc, RPC_TIMEOUT)) ++ return -ETIMEDOUT; ++ ++ /* ...disable command */ ++ val = rpc_readl(rpc, RPC_SMENR); ++ val &= ~(RPC_SMENR_CDE); ++ rpc_writel(rpc, RPC_SMENR, val); ++ ++ buf32 = (u32 *)buf; ++ ++ while (len > 0) { ++ rpc_read_manual_data(rpc, &val, &val2); ++ ++ if (mask) { ++ dev_warn(&rpc->pdev->dev, ++ "Using mask workaround (0x%x)\n", mask); ++ val &= ~(mask); ++ val2 &= ~(mask); ++ } ++ ++ /* ... spi flashes should be the same */ ++ if (type == RPC_DUAL && val != val2) { ++ /* clear cs */ ++ rpc_begin(rpc, true, false, true); ++ return -EAGAIN; ++ } ++ ++ if (len > 4) { ++ *buf32 = val; ++ buf32++; ++ len -= 4; ++ } else { ++ buf = (u8 *)buf32; ++ for (i = 0; i < len; i++) { ++ *buf = (val >> (8 * i)) & 0x000000ff; ++ buf++; ++ } ++ len = 0; ++ } ++ ++ if (!len) ++ break; ++ ++ mask = 0xff; ++ ++ rpc_begin(rpc, true, false, len <= 4); ++ if (rpc_wait(rpc, RPC_TIMEOUT)) ++ return -ETIMEDOUT; ++ ++ } ++ ++ return 0; ++} ++ ++#define RPC_REPEAT_TIMEOUT 200 ++static int rpc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) ++{ ++ unsigned long end = jiffies + msecs_to_jiffies(RPC_REPEAT_TIMEOUT); ++ ++ /* A few read commands like read status can ++ * generate different answers. We repeat reading ++ * in that case ++ */ ++ while (true) { ++ int ret = __rpc_read_reg(nor, opcode, buf, len); ++ ++ if (!ret || ret != -EAGAIN) ++ return ret; ++ ++ if (time_after(jiffies, end)) ++ return -ETIMEDOUT; ++ ++ msleep(20); ++ } ++} ++ ++static int rpc_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) ++{ ++ struct rpc_info *rpc = nor->priv; ++ u32 val; ++ int dsize; ++ bool copy = true; ++ ++ rpc_setup_reg_mode(rpc); ++ ++ val = rpc_readl(rpc, RPC_SMCMR); ++ val &= ~RPC_SMCMR_CMD(0xFF); ++ val |= RPC_SMCMR_CMD(opcode); ++ rpc_writel(rpc, RPC_SMCMR, val); ++ ++ dsize = rpc_datalen2trancfersize(rpc, len, copy); ++ ++ if (rpc_setup_data_size(rpc, dsize, copy)) ++ return -EINVAL; ++ ++ if (rpc_write_data2reg(rpc, buf, dsize, copy)) ++ return -EINVAL; ++ buf += dsize; ++ len -= dsize; ++ rpc_begin(rpc, false, dsize > 0, len == 0); ++ ++ if (rpc_wait(rpc, RPC_TIMEOUT)) ++ return -ETIMEDOUT; ++ ++ /* ...disable command */ ++ val = rpc_readl(rpc, RPC_SMENR); ++ val &= ~(RPC_SMENR_CDE); ++ rpc_writel(rpc, RPC_SMENR, val); ++ ++ while (len > 0) { ++ dsize = rpc_datalen2trancfersize(rpc, len, copy); ++ if (rpc_setup_data_size(rpc, dsize, copy)) ++ return -EINVAL; ++ rpc_write_data2reg(rpc, buf, dsize, copy); ++ buf += dsize; ++ len -= dsize; ++ ++ rpc_begin(rpc, false, dsize, len == 0); ++ ++ if (rpc_wait(rpc, RPC_TIMEOUT)) ++ return -ETIMEDOUT; ++ ++ } ++ ++ return 0; ++} ++ ++/* hw init for spi-nor flashes */ ++static int rpc_spi_hw_init(struct rpc_info *rpc) ++{ ++ /* Exec calibration */ ++ rpc_clrsetl(rpc, RPC_PHYCNT, ++ RPC_PHYCNT_OCTA(3) | RPC_PHYCNT_EXDS | RPC_PHYCNT_OCT | ++ RPC_PHYCNT_DDRCAL | RPC_PHYCNT_HS | RPC_PHYCNT_STRTIM(7) | ++ RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF | RPC_PHYCNT_MEM(3), ++ RPC_PHYCNT_CAL | RPC_PHYCNT_STRTIM(6)); ++ ++ /* Disable RPC pins */ ++ rpc_clrsetl(rpc, RPC_PHYINT, ++ RPC_PHYINT_INTIE | RPC_PHYINT_RSTEN | ++ RPC_PHYINT_WPEN | RPC_PHYINT_INTEN, ++ 0); ++ ++ rpc_clrsetl(rpc, RPC_SMDRENR, ++ RPC_SMDRENR_HYPE(7), ++ RPC_SMDRENR_HYPE_SPI); ++ ++ rpc_clrsetl(rpc, RPC_CMNCR, ++ RPC_CMNCR_BSZ(3), ++ rpc->mtdtype != RPC_SINGLE ? ++ RPC_CMNCR_BSZ(1) : ++ RPC_CMNCR_BSZ(0)); ++ ++ rpc_clrsetl(rpc, RPC_PHYOFFSET1, ++ RPC_PHYOFFSET1_DDRTMG(3), ++ RPC_PHYOFFSET1_DDRTMG_SDR); ++ ++ rpc_writel(rpc, RPC_SSLDR, ++ RPC_SSLDR_SPNDL(0) | RPC_SSLDR_SLNDL(4) | ++ RPC_SSLDR_SCKDL(0)); ++ ++ return 0; ++} ++ ++static int rpc_erase_sector(struct spi_nor *nor, loff_t addr) ++{ ++ struct rpc_info *rpc = nor->priv; ++ u8 buf[6]; ++ int i; ++ ++ if (rpc->mtdtype == RPC_DUAL) ++ addr >>= 1; ++ ++ for (i = nor->addr_width - 1; i >= 0; i--) { ++ buf[i] = addr & 0xff; ++ addr >>= 8; ++ } ++ ++ return nor->write_reg(nor, nor->erase_opcode, buf, nor->addr_width); ++} ++ ++int rpc_qspi_probe(struct platform_device *pdev) ++{ ++ struct rpc_info *rpc; ++ struct spi_nor *nor; ++ struct spi_nor_hwcaps hwcaps = { ++ .mask = SNOR_HWCAPS_READ | ++ SNOR_HWCAPS_READ_FAST | ++ SNOR_HWCAPS_PP, ++ }; ++ u32 property; ++ int ret; ++ ++ rpc = dev_get_drvdata(pdev->dev.parent); ++ if (!rpc || !rpc->flash) { ++ dev_err(&pdev->dev, "invalid data\n"); ++ return -EINVAL; ++ } ++ ++ if (!of_property_read_u32(rpc->flash, "spi-rx-bus-width", &property)) { ++ switch (property) { ++ case 1: ++ break; ++ case 2: ++ hwcaps.mask |= SNOR_HWCAPS_READ_DUAL; ++ break; ++ case 4: ++ hwcaps.mask |= SNOR_HWCAPS_READ_QUAD; ++ break; ++ default: ++ dev_err(&pdev->dev, "unsupported rx-bus-width\n"); ++ return -EINVAL; ++ } ++ } ++ ++ /* ... setup nor hooks */ ++ nor = devm_kzalloc(&pdev->dev, sizeof(*nor), GFP_KERNEL); ++ if (!nor) { ++ dev_err(&pdev->dev, "allocation failed\n"); ++ return -ENOMEM; ++ } ++ ++ nor->dev = &pdev->dev; ++ spi_nor_set_flash_node(nor, rpc->flash); ++ nor->read = rpc_read_flash; ++ nor->write = rpc_write_flash; ++ nor->read_reg = rpc_read_reg; ++ nor->write_reg = rpc_write_reg; ++ nor->priv = rpc; ++ ++ /* ... enable clk */ ++ ret = clk_prepare_enable(rpc->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "cannot prepare clock\n"); ++ return ret; ++ } ++ ++ /* ...init device */ ++ ret = rpc_spi_hw_init(rpc); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "rpc_spi_hw_init error.\n"); ++ goto error; ++ } ++ ++ ret = spi_nor_scan(nor, NULL, &hwcaps); ++ if (ret) { ++ dev_err(&pdev->dev, "spi_nor_scan error.\n"); ++ goto error; ++ } ++ ++ /* Dual mode support */ ++ if (rpc->mtdtype == RPC_DUAL) { ++ nor->page_size <<= 1; ++ nor->mtd.erasesize <<= 1; ++ nor->mtd.size <<= 1; ++ nor->mtd.writebufsize <<= 1; ++ nor->erase = rpc_erase_sector; ++ } ++ ++ /* Workaround data size limitation */ ++ if (nor->page_size > RPC_WBUF_SIZE) { ++ nor->page_size = RPC_WBUF_SIZE; ++ nor->mtd.writebufsize = RPC_WBUF_SIZE; ++ } ++ ++ ret = mtd_device_register(&nor->mtd, NULL, 0); ++ if (ret) { ++ dev_err(&pdev->dev, "MTD registration failed\n"); ++ goto error; ++ } ++ ++ dev_info(&pdev->dev, "probed as %s\n", ++ rpc->mtdtype == RPC_SINGLE ? "single" : "dual"); ++ ++ platform_set_drvdata(pdev, nor); ++ return 0; ++ ++error: ++ clk_disable_unprepare(rpc->clk); ++ return ret; ++} ++ ++static int rpc_qspi_remove(struct platform_device *pdev) ++{ ++ struct spi_nor *nor = platform_get_drvdata(pdev); ++ struct rpc_info *rpc = nor->priv; ++ ++ mtd_device_unregister(&nor->mtd); ++ clk_disable_unprepare(rpc->clk); ++ return 0; ++} ++ ++/* platform driver interface */ ++static struct platform_driver rpc_qspi_platform_driver = { ++ .probe = rpc_qspi_probe, ++ .remove = rpc_qspi_remove, ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "renesas-rpc-qspi", ++ }, ++}; ++ ++module_platform_driver(rpc_qspi_platform_driver); ++ ++MODULE_ALIAS("renesas-rpc-qspi"); ++MODULE_AUTHOR("Cogent Embedded Inc. "); ++MODULE_DESCRIPTION("Renesas RPC QSPI Driver"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/mtd/spi-nor/renesas-rpc.c b/drivers/mtd/spi-nor/renesas-rpc.c +index 0026b99..3aea0ae 100644 +--- a/drivers/mtd/spi-nor/renesas-rpc.c ++++ b/drivers/mtd/spi-nor/renesas-rpc.c +@@ -1,7 +1,7 @@ + /* + * Renesas RPC driver + * +- * Copyright (C) 2018, Cogent Embedded Inc. ++ * Copyright (C) 2019, Cogent Embedded Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -13,268 +13,28 @@ + * GNU General Public License for more details. + */ + +-#include ++#include + #include +-#include +-#include +-#include +-#include + #include +-#include +-#include +-#include +- +-/* regs offsets */ +-#define CMNCR 0x0000 +-#define SSLDR 0x0004 +-#define DRCR 0x000C +-#define DRCMR 0x0010 +-#define DREAR 0x0014 +-#define DROPR 0x0018 +-#define DRENR 0x001C +-#define SMCR 0x0020 +-#define SMCMR 0x0024 +-#define SMADR 0x0028 +-#define SMOPR 0x002C +-#define SMENR 0x0030 +-#define SMRDR0 0x0038 +-#define SMRDR1 0x003C +-#define SMWDR0 0x0040 +-#define SMWDR1 0x0044 +-#define CMNSR 0x0048 +-#define DRDMCR 0x0058 +-#define DRDRENR 0x005C +-#define SMDMCR 0x0060 +-#define SMDRENR 0x0064 +-#define PHYCNT 0x007C +-#define PHYOFFSET1 0x0080 +-#define PHYOFFSET2 0x0084 +-#define PHYINT 0x0088 +-#define DIV_REG 0x00A8 +- +-/* CMNCR */ +-#define CMNCR_BSZ_MASK (0x03) +-#define CMNCR_BSZ_4x1 (0x0) +-#define CMNCR_BSZ_8x1 (0x1) +-#define CMNCR_BSZ_4x2 (0x1) +-#define CMNCR_MD (0x1 << 31) +-#define CMNCR_MOIIO3_MASK (0x3 << 22) +-#define CMNCR_MOIIO3_HIZ (0x3 << 22) +-#define CMNCR_MOIIO2_MASK (0x3 << 20) +-#define CMNCR_MOIIO2_HIZ (0x3 << 20) +-#define CMNCR_MOIIO1_MASK (0x3 << 18) +-#define CMNCR_MOIIO1_HIZ (0x3 << 18) +-#define CMNCR_MOIIO0_MASK (0x3 << 16) +-#define CMNCR_MOIIO0_HIZ (0x3 << 16) +-#define CMNCR_IO0FV_MASK (0x3 << 8) +-#define CMNCR_IO0FV_HIZ (0x3 << 8) +- +-/* DRCR */ +-#define DRCR_RBURST_MASK (0x1f << 16) +-#define DRCR_RBURST(v) (((v) & 0x1f) << 16) +-#define DRCR_SSLE (0x1) +-#define DRCR_RBE (0x1 << 8) +-#define DRCR_RCF (0x1 << 9) +-#define DRCR_RBURST_32 (0x1f) +- +-/* SMENR */ +-#define SMENR_CDB_MASK (0x03 << 30) +-#define SMENR_CDB(v) (((v) & 0x03) << 30) +-#define SMENR_CDB_1B (0) +-#define SMENR_CDB_2B (0x1 << 30) +-#define SMENR_CDB_4B (0x2 << 30) +-#define SMENR_OCDB_MASK (0x03 << 28) +-#define SMENR_OCDB_1B (0) +-#define SMENR_OCDB_2B (0x1 << 28) +-#define SMENR_OCDB_4B (0x2 << 28) +-#define SMENR_ADB_MASK (0x03 << 24) +-#define SMENR_ADB(v) (((v) & 0x03) << 24) +-#define SMENR_ADB_1B (0) +-#define SMENR_ADB_2B (0x1 << 24) +-#define SMENR_ADB_4B (0x2 << 24) +-#define SMENR_OPDB_MASK (0x03 << 20) +-#define SMENR_OPDB_1B (0) +-#define SMENR_OPDB_2B (0x1 << 20) +-#define SMENR_OPDB_4B (0x2 << 20) +-#define SMENR_SPIDB_MASK (0x03 << 16) +-#define SMENR_SPIDB(v) (((v) & 0x03) << 16) +-#define SMENR_SPIDB_1B (0) +-#define SMENR_SPIDB_2B (0x1 << 16) +-#define SMENR_SPIDB_4B (0x2 << 16) +-#define SMENR_OPDE_MASK (0xf << 4) +-#define SMENR_OPDE_DISABLE (0) +-#define SMENR_OPDE3 (0x8 << 4) +-#define SMENR_OPDE32 (0xC << 4) +-#define SMENR_OPDE321 (0xE << 4) +-#define SMENR_OPDE3210 (0xF << 4) +-#define SMENR_SPIDE_MASK (0x0F) +-#define SMENR_SPIDE_DISABLE (0) +-#define SMENR_SPIDE_8B (0x08) +-#define SMENR_SPIDE_16B (0x0C) +-#define SMENR_SPIDE_32B (0x0F) +-#define SMENR_DME (1<<15) +-#define SMENR_CDE (1<<14) +-#define SMENR_OCDE (1<<12) +-#define SMENR_ADE_MASK (0xf << 8) +-#define SMENR_ADE_DISABLE (0) +-#define SMENR_ADE_23_16 (0x4 << 8) +-#define SMENR_ADE_23_8 (0x6 << 8) +-#define SMENR_ADE_23_0 (0x7 << 8) +-#define SMENR_ADE_31_0 (0xf << 8) +- +-/* SMCMR */ +-#define SMCMR_CMD(cmd) (((cmd) & 0xff) << 16) +-#define SMCMR_CMD_MASK (0xff << 16) +-#define SMCMR_OCMD(cmd) (((cmd) & 0xff)) +-#define SMCMR_OCMD_MASK (0xff) +- +-/* SMDRENR */ +-#define SMDRENR_HYPE_MASK (0x7 << 12) +-#define SMDRENR_HYPE_SPI_FLASH (0x0) +-#define SMDRENR_ADDRE (0x1 << 8) +-#define SMDRENR_OPDRE (0x1 << 4) +-#define SMDRENR_SPIDRE (0x1) +- +-/* PHYCNT */ +-#define PHYCNT_CAL (0x1 << 31) +-#define PHYCNT_OCTA_MASK (0x3 << 22) +-#define PHYCNT_EXDS (0x1 << 21) +-#define PHYCNT_OCT (0x1 << 20) +-#define PHYCNT_DDRCAL (0x1 << 19) +-#define PHYCNT_HS (0x1 << 18) +-#define PHYCNT_STREAM_MASK (0x7 << 15) +-#define PHYCNT_STREAM(o) (((o) & 0x7) << 15) +-#define PHYCNT_WBUF2 (0x1 << 4) +-#define PHYCNT_WBUF (0x1 << 2) +-#define PHYCNT_PHYMEM_MASK (0x3) +- +-/* SMCR */ +-#define SMCR_SSLKP (0x1 << 8) +-#define SMCR_SPIRE (0x1 << 2) +-#define SMCR_SPIWE (0x1 << 1) +-#define SMCR_SPIE (0x1) +- +-/* CMNSR */ +-#define CMNSR_TEND (0x1 << 0) +- +-/* SSLDR */ +-#define SSLDR_SPNDL(v) (((v) & 0x7) << 16) +-#define SSLDR_SLNDL(v) ((((v) | 0x4) & 0x7) << 8) +-#define SSLDR_SCKDL(v) ((v) & 0x7) +- +-/* DREAR */ +-#define DREAR_EAV_MASK (0xff << 16) +-#define DREAR_EAV(v) (((v) & 0xff) << 16) +-#define DREAR_EAC_MASK (0x7) +-#define DREAR_24B (0) +-#define DREAR_25B (1) +- +-/* DRENR */ +-#define DRENR_CDB_MASK (0x03 << 30) +-#define DRENR_CDB(v) (((v) & 0x3) << 30) +-#define DRENR_CDB_1B (0) +-#define DRENR_CDB_2B (0x1 << 30) +-#define DRENR_CDB_4B (0x2 << 30) +-#define DRENR_OCDB_MASK (0x03 << 28) +-#define DRENR_OCDB_1B (0) +-#define DRENR_OCDB_2B (0x1 << 28) +-#define DRENR_OCDB_4B (0x2 << 28) +-#define DRENR_ADB_MASK (0x03 << 24) +-#define DRENR_ADB(v) (((v) & 0x3) << 24) +-#define DRENR_ADB_1B (0) +-#define DRENR_ADB_2B (0x1 << 24) +-#define DRENR_ADB_4B (0x2 << 24) +-#define DRENR_OPDB_MASK (0x03 << 20) +-#define DRENR_OPDB_1B (0) +-#define DRENR_OPDB_2B (0x1 << 20) +-#define DRENR_OPDB_4B (0x2 << 20) +-#define DRENR_DRDB_MASK (0x03 << 16) +-#define DRENR_DRDB(v) (((v) & 0x3) << 16) +-#define DRENR_DRDB_1B (0) +-#define DRENR_DRDB_2B (0x1 << 16) +-#define DRENR_DRDB_4B (0x2 << 16) +-#define DRENR_OPDE_MASK (0xf << 4) +-#define DRENR_OPDE_DISABLE (0) +-#define DRENR_OPDE3 (0x8 << 4) +-#define DRENR_OPDE32 (0xC << 4) +-#define DRENR_OPDE321 (0xE << 4) +-#define DRENR_OPDE3210 (0xF << 4) +-#define DRENR_DME (1<<15) +-#define DRENR_CDE (1<<14) +-#define DRENR_OCDE (1<<12) +-#define DRENR_ADE_MASK (0xf << 8) +-#define DRENR_ADE_DISABLE (0) +-#define DRENR_ADE_23_0 (0x7 << 8) +-#define DRENR_ADE_31_0 (0xf << 8) +- +-/* DRCMR */ +-#define DRCMR_CMD(cmd) (((cmd) & 0xff) << 16) +-#define DRCMR_CMD_MASK (0xff << 16) +-#define DRCMR_OCMD(cmd) (((cmd) & 0xff)) +-#define DRCMR_OCMD_MASK (0xff) +- +-/* DRCMR */ +-#define DRDMCR_DMCYC(v) ((v) & 0x1f) +-#define DRDMCR_DMCYC_MASK (0x1f) +- +-/* SMDMCR */ +-#define SMDMCR_DMCYC(v) ((v) & 0x0f) +-#define SMDMCR_DMCYC_MASK (0x0f) +- +-/* PHYOFFSET1 */ +-#define PHYOFFSET1_DDRTMG (1 << 28) +- +-/* DIVREG */ +-#define DIVREG_RATIO_MASK (0x03) +-#define DIVREG_RATIO(v) ((v) & 0x03) +-#define DIVREG_RATIO_MAX (0x2) +- +- +-#define DEFAULT_TO (100) +-#define WRITE_BUF_SIZE (0x100) +-#define WRITE_BUF_ADR_MASK (0xff) +- +-#define REPEAT_MAX (20) +-#define REPEAT_TIME (10) +- +-struct rpc_spi { +- struct platform_device *pdev; +- void __iomem *base; +- void __iomem *read_area; +- void __iomem *write_area; +- dma_addr_t read_area_dma; +- struct completion comp; +- struct dma_chan *dma_chan; +- struct clk *clk; +- unsigned int irq; +- struct spi_nor spi_nor; +- +-#define MTD_QSPI_1x 0 +-#define MTD_QSPI_2x 1 +- +- u32 mtdtype; +-}; +- +-/* IP block use it's own clock divigion register */ +-#define OWN_CLOCK_DIVIDER BIT(0) ++#include + +-#define RPC_DMA_BURST ((DRCR_RBURST_32 + 1) << 3) +-#define RPC_DMA_SIZE_MIN (RPC_DMA_BURST << 3) ++#include "renesas-rpc.h" + + static bool use_dma = true; + module_param(use_dma, bool, 0); + MODULE_PARM_DESC(use_dma, "DMA support. 0 = Disable, 1 = Enable"); + +-/* debug */ +-static void __maybe_unused regs_dump(struct rpc_spi *rpc) ++/* Debug */ ++#ifdef DEBUG ++void rpc_regs_dump(struct rpc_info *rpc) + { + static u32 regs[] = { +- CMNCR, SSLDR, DRCR, DRCMR, DREAR, +- DROPR, DRENR, SMCR, SMCMR, SMADR, +- SMOPR, SMENR, SMRDR0, SMRDR1, SMWDR0, +- SMWDR1, CMNSR, DRDMCR, DRDRENR, SMDMCR, +- SMDRENR, PHYCNT, PHYOFFSET1, PHYOFFSET2, +- PHYINT ++ RPC_CMNCR, RPC_SSLDR, RPC_DRCR, RPC_DRCMR, RPC_DREAR, ++ RPC_DROPR, RPC_DRENR, RPC_SMCR, RPC_SMCMR, RPC_SMADR, ++ RPC_SMOPR, RPC_SMENR, RPC_SMRDR0, RPC_SMRDR1, RPC_SMWDR0, ++ RPC_SMWDR1, RPC_CMNSR, RPC_DRDMCR, RPC_DRDRENR, RPC_SMDMCR, ++ RPC_SMDRENR, RPC_PHYCNT, RPC_PHYOFFSET1, RPC_PHYOFFSET2, ++ RPC_PHYINT + }; + + static const char *const names[] = { +@@ -291,23 +51,43 @@ static void __maybe_unused regs_dump(struct rpc_spi *rpc) + dev_dbg(&rpc->pdev->dev, "RPC regs dump:\n"); + for (i = 0; i < ARRAY_SIZE(regs); i++) + dev_dbg(&rpc->pdev->dev, "%s = 0x%08x\n", names[i], +- readl(rpc->base + regs[i])); ++ rpc_readl(rpc, regs[i])); ++} ++EXPORT_SYMBOL(rpc_regs_dump); ++#endif ++ ++/* Poll operation end */ ++int rpc_wait(struct rpc_info *rpc, int timeout) ++{ ++ unsigned long end = jiffies + msecs_to_jiffies(timeout); ++ ++ while (!(rpc_readl(rpc, RPC_CMNSR) & RPC_CMNSR_TEND)) { ++ if (time_after(jiffies, end)) { ++ dev_err(&rpc->pdev->dev, "timed out\n"); ++ return -ETIMEDOUT; ++ } ++ ++ cpu_relax(); ++ } ++ ++ return 0; + } ++EXPORT_SYMBOL(rpc_wait); + ++/* DMA support */ + static void rpc_dma_complete_func(void *completion) + { + complete(completion); + } + +-static int rpc_dma_read(struct rpc_spi *rpc, void *buf, +- loff_t from, ssize_t *plen) ++int rpc_dma_read(struct rpc_info *rpc, void *buf, loff_t from, ssize_t *plen) + { + struct dma_device *dma_dev; + enum dma_ctrl_flags flags; + dma_addr_t dma_dst_addr; + struct dma_async_tx_descriptor *tx = NULL; + dma_cookie_t cookie; +- int retval = 0; ++ int ret = 0; + ssize_t len; + + len = *plen; +@@ -322,7 +102,7 @@ static int rpc_dma_read(struct rpc_spi *rpc, void *buf, + + dma_dst_addr = dma_map_single(dma_dev->dev, buf, len, DMA_FROM_DEVICE); + if (dma_mapping_error(dma_dev->dev, dma_dst_addr)) { +- dev_err(&rpc->pdev->dev, "Failed to dma_map_single\n"); ++ dev_err(&rpc->pdev->dev, "DMA map single failed\n"); + return -ENXIO; + } + +@@ -331,8 +111,8 @@ static int rpc_dma_read(struct rpc_spi *rpc, void *buf, + rpc->read_area_dma + from, + len, flags); + if (!tx) { +- dev_err(&rpc->pdev->dev, "Failed to prepare DMA memcpy\n"); +- retval = -EIO; ++ dev_err(&rpc->pdev->dev, "DMA prepare memcpy failed\n"); ++ ret = -EIO; + goto out_dma; + } + +@@ -341,9 +121,9 @@ static int rpc_dma_read(struct rpc_spi *rpc, void *buf, + tx->callback_param = &rpc->comp; + + cookie = tx->tx_submit(tx); +- retval = dma_submit_error(cookie); +- if (retval) { +- dev_err(&rpc->pdev->dev, "Failed to do DMA tx_submit\n"); ++ ret = dma_submit_error(cookie); ++ if (ret) { ++ dev_err(&rpc->pdev->dev, "DMA tx submit failed\n"); + goto out_dma; + } + +@@ -355,968 +135,154 @@ static int rpc_dma_read(struct rpc_spi *rpc, void *buf, + + out_dma: + dma_unmap_single(dma_dev->dev, dma_dst_addr, len, DMA_FROM_DEVICE); +- return retval; +-} +- +-/* register acces */ +-static u32 rpc_read(struct rpc_spi *rpc, unsigned int reg) +-{ +- u32 val; +- +- val = readl(rpc->base + reg); +- return val; +-} +- +-static void rpc_write(struct rpc_spi *rpc, unsigned int reg, u32 val) +-{ +- writel(val, rpc->base + reg); +-} +- +-static int rpc_wait(struct rpc_spi *rpc, u32 to) +-{ +- u32 val; +- int i; +- +- for (i = 0; i < to; i++) { +- val = rpc_read(rpc, CMNSR); +- val &= CMNSR_TEND; +- if (val) +- break; +- +- udelay(100); +- } +- +- if (i == to) { +- dev_err(&rpc->pdev->dev, "timeout waiting for operation end %d\n", +- rpc_read(rpc, CMNSR)); +- return -ETIMEDOUT; +- } +- +- return 0; +-} +- +-static int rpc_setup_clk_ratio(struct rpc_spi *rpc, u32 max_clk_rate) +-{ +- unsigned long rate = clk_get_rate(rpc->clk); +- u32 ratio; +- u32 val; +- +- ratio = DIV_ROUND_UP(rate, max_clk_rate * 2) >> 1; +- if (ratio > DIVREG_RATIO_MAX) +- ratio = DIVREG_RATIO_MAX; +- +- val = rpc_read(rpc, DIV_REG); +- val &= DIVREG_RATIO_MASK; +- val |= DIVREG_RATIO(ratio); +- rpc_write(rpc, DIV_REG, val); +- +- return 0; +-} +- +-static int rpc_endisable_write_buf(struct rpc_spi *rpc, bool en) +-{ +- u32 val; +- +- val = rpc_read(rpc, PHYCNT); +- +- if (en) +- val |= PHYCNT_WBUF | PHYCNT_WBUF2; +- else +- val &= ~(PHYCNT_WBUF | PHYCNT_WBUF2); +- +- rpc_write(rpc, PHYCNT, val); +- +- return 0; +-} +- +-static int rpc_begin(struct rpc_spi *rpc, +- bool rx, bool tx, bool last) +-{ +- u32 val = SMCR_SPIE; +- +- if (rx) +- val |= SMCR_SPIRE; +- +- if (tx) +- val |= SMCR_SPIWE; +- +- if (!last) +- val |= SMCR_SSLKP; +- +- rpc_write(rpc, SMCR, val); +- +- return 0; +-} +- +-static int rpc_setup_reg_mode(struct rpc_spi *rpc) +-{ +- u32 val; +- +- rpc_wait(rpc, DEFAULT_TO); +- +- rpc_endisable_write_buf(rpc, false); +- +- /* ...setup manual mode */ +- val = rpc_read(rpc, CMNCR); +- val |= CMNCR_MD; +- rpc_write(rpc, CMNCR, val); +- +- /* disable ddr */ +- val = rpc_read(rpc, SMDRENR); +- val &= ~(SMDRENR_ADDRE | SMDRENR_OPDRE | SMDRENR_SPIDRE); +- rpc_write(rpc, SMDRENR, val); +- +- /* enable 1bit command */ +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_CDB_MASK | SMENR_OCDB_MASK | SMENR_DME +- | SMENR_OCDE | SMENR_SPIDB_MASK +- | SMENR_ADE_MASK | SMENR_ADB_MASK +- | SMENR_OPDE_MASK | SMENR_SPIDE_MASK); +- val |= SMENR_CDB_1B | SMENR_CDE | SMENR_SPIDE_32B; +- rpc_write(rpc, SMENR, val); +- +- +- return 0; +-} +- +-static void rpc_flush_cache(struct rpc_spi *rpc) +-{ +- u32 val; +- +- val = rpc_read(rpc, DRCR); +- val |= DRCR_RCF; +- rpc_write(rpc, DRCR, val); +-} +- +-static int rpc_setup_ext_mode(struct rpc_spi *rpc) +-{ +- u32 val; +- u32 cmncr; +- +- rpc_wait(rpc, DEFAULT_TO); +- +- rpc_endisable_write_buf(rpc, false); +- +- /* ...setup ext mode */ +- val = rpc_read(rpc, CMNCR); +- cmncr = val; +- val &= ~(CMNCR_MD); +- rpc_write(rpc, CMNCR, val); +- +- /* ...enable burst and clear cache */ +- val = rpc_read(rpc, DRCR); +- val &= ~(DRCR_RBURST_MASK | DRCR_RBE | DRCR_SSLE); +- val |= DRCR_RBURST(DRCR_RBURST_32) | DRCR_RBE; +- +- if (cmncr & CMNCR_MD) +- val |= DRCR_RCF; +- +- rpc_write(rpc, DRCR, val); +- +- return 0; +-} +- +-static int rpc_setup_data_size(struct rpc_spi *rpc, u32 size, bool copy) +-{ +- u32 val; +- +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_SPIDE_MASK); +- +- if (rpc->mtdtype == MTD_QSPI_2x && !copy) +- size >>= 1; +- +- switch (size) { +- case 0: +- break; +- case 1: +- val |= SMENR_SPIDE_8B; +- break; +- case 2: +- val |= SMENR_SPIDE_16B; +- break; +- case 4: +- val |= SMENR_SPIDE_32B; +- break; +- default: +- dev_err(&rpc->pdev->dev, "Unsupported data width %d\n", size); +- return -EINVAL; +- } +- rpc_write(rpc, SMENR, val); +- +- return 0; +-} +- +-static int rpc_setup_extmode_read_addr(struct rpc_spi *rpc, +- int adr_width, loff_t adr) +-{ +- u32 val; +- u32 v; +- +- val = rpc_read(rpc, DREAR); +- val &= ~(DREAR_EAV_MASK | DREAR_EAC_MASK); +- +- if (adr_width == 4) { +- v = adr >> 25; +- val |= DREAR_EAV(v) | DREAR_25B; +- } +- rpc_write(rpc, DREAR, val); +- +- val = rpc_read(rpc, DRENR); +- val &= ~(DRENR_ADE_MASK); +- if (adr_width == 4) +- val |= DRENR_ADE_31_0; +- else +- val |= DRENR_ADE_23_0; +- rpc_write(rpc, DRENR, val); +- +- return 0; +-} +- +-static inline int rpc_get_read_addr_nbits(u8 opcode) +-{ +- if (opcode == SPINOR_OP_READ_1_4_4_4B) +- return 4; +- return 1; +-} +- +-#define NBITS_TO_VAL(v) ((v >> 1) & 3) +-static int rpc_setup_extmode_nbits(struct rpc_spi *rpc, int cnb, +- int anb, int dnb) +-{ +- u32 val; +- +- val = rpc_read(rpc, DRENR); +- val &= ~(DRENR_CDB_MASK | DRENR_ADB_MASK | DRENR_DRDB_MASK); +- val |= DRENR_CDB(NBITS_TO_VAL(cnb)) +- | DRENR_ADB(NBITS_TO_VAL(anb)) +- | DRENR_DRDB(NBITS_TO_VAL(dnb)); +- rpc_write(rpc, DRENR, val); +- +- return 0; +-} +- +-static int rpc_setup_writemode_nbits(struct rpc_spi *rpc, int cnb, +- int anb, int dnb) +-{ +- u32 val; +- +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_CDB_MASK | SMENR_ADB_MASK | SMENR_SPIDB_MASK); +- val |= SMENR_CDB(NBITS_TO_VAL(cnb)) +- | SMENR_ADB(NBITS_TO_VAL(anb)) +- | SMENR_SPIDB(NBITS_TO_VAL(dnb)); +- rpc_write(rpc, SMENR, val); +- +- return 0; +-} +- +-static void rpc_setup_write_mode_command_and_adr(struct rpc_spi *rpc, +- int adr_width, bool ena) +-{ +- u32 val; +- +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_CDB_MASK | SMENR_CDE | SMENR_ADE_MASK); +- +- if (ena) { +- /* enable 1bit command */ +- val |= SMENR_CDB_1B | SMENR_CDE; +- +- if (adr_width == 4) +- val |= SMENR_ADE_31_0; +- else +- val |= SMENR_ADE_23_0; +- } +- rpc_write(rpc, SMENR, val); +-} +- +-static int rpc_setup_write_mode(struct rpc_spi *rpc, u8 opcode) +-{ +- u32 val; +- +- rpc_wait(rpc, DEFAULT_TO); +- +- rpc_endisable_write_buf(rpc, true); +- +- /* ...setup manual mode */ +- val = rpc_read(rpc, CMNCR); +- val |= CMNCR_MD; +- rpc_write(rpc, CMNCR, val); +- +- /* disable ddr */ +- val = rpc_read(rpc, SMDRENR); +- val &= ~(SMDRENR_ADDRE | SMDRENR_OPDRE | SMDRENR_SPIDRE); +- rpc_write(rpc, SMDRENR, val); +- +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_OCDB_MASK | SMENR_DME | SMENR_OCDE | SMENR_SPIDB_MASK +- | SMENR_ADB_MASK | SMENR_OPDE_MASK | SMENR_SPIDE_MASK); +- if (opcode != SPINOR_OP_PP) +- val |= SMENR_SPIDE_32B; +- else +- val |= SMENR_SPIDE_8B; +- +- rpc_write(rpc, SMENR, val); +- +- return 0; +-} +- +-static void rpc_read_manual_data(struct rpc_spi *rpc, u32 *pv0, u32 *pv1) +-{ +- u32 val0, val1, rd0, rd1; +- +- val0 = rpc_read(rpc, SMRDR0); +- val1 = rpc_read(rpc, SMRDR1); +- +- if (rpc->mtdtype == MTD_QSPI_2x) { +- rd1 = (val0 & 0xff000000) | ((val0 << 8) & 0xff0000) | +- ((val1 >> 16) & 0xff00) | ((val1 >> 8) & 0xff); +- rd0 = ((val0 & 0xff0000) << 8) | ((val0 << 16) & 0xff0000) | +- ((val1 >> 8) & 0xff00) | (val1 & 0xff); +- } else +- rd0 = val0; +- +- if (pv0) +- *pv0 = rd0; +- +- if (pv1 && rpc->mtdtype == MTD_QSPI_2x) +- *pv1 = rd1; +-} +- +-static int rpc_datalen2trancfersize(struct rpc_spi *rpc, int len, bool copy) +-{ +- int sz = len; +- +- if (len >= 2) +- sz = 2; +- +- if (len >= 4) +- sz = 4; +- +- if (rpc->mtdtype == MTD_QSPI_2x && len >= 8 && !copy) +- sz = 8; +- +- return sz; +-} +- +-static int __rpc_write_data2reg(struct rpc_spi *rpc, int off, +- const u8 *buf, int sz) +-{ +- const u32 *b32 = (const u32 *)buf; +- const u16 *b16 = (const u16 *)buf; +- +- if (sz == 4) +- rpc_write(rpc, off, *b32); +- else if (sz == 2) +- writew(*b16, rpc->base + off); +- else if (sz == 1) +- writeb(*buf, rpc->base + off); +- else if (sz != 0) { +- dev_err(&rpc->pdev->dev, "incorrect data size %d\n", sz); +- return -EINVAL; +- } +- +- return 0; +-} +- +-#define __SETVAL(x) ((((x) & 0xff) << 8) | ((x) & 0xff)) +-static int rpc_write_data2reg(struct rpc_spi *rpc, const u8 *buf, +- int sz, bool copy) +-{ +- int i, ret; +- u32 v = 0; +- +- if (rpc->mtdtype == MTD_QSPI_2x) { +- if (copy) { +- for (i = 0; i < sz && i < 2; i++) +- v |= (__SETVAL(buf[i]) << 16*i); +- +- ret = __rpc_write_data2reg(rpc, +- sz == 4 ? SMWDR1 : SMWDR0, +- (u8 *)&v, +- sz == 4 ? sz : sz * 2); +- if (ret) +- return ret; +- +- v = 0; +- for (; i < sz; i++) +- v |= (__SETVAL(buf[i]) << 16*i); +- +- +- ret = __rpc_write_data2reg(rpc, +- sz == 4 ? SMWDR0 : SMWDR1, +- (u8 *)&v, +- sz == 4 ? sz : sz * 2); +- if (ret) +- return ret; +- +- return 0; +- } +- +- sz >>= 1; +- ret = __rpc_write_data2reg(rpc, +- sz == 4 ? SMWDR1 : SMWDR0, +- buf, +- sz == 4 ? sz : sz * 2); +- if (ret) +- return ret; +- buf += sz; +- +- return __rpc_write_data2reg(rpc, +- sz == 4 ? SMWDR0 : SMWDR1, +- buf, sz == 4 ? sz : sz * 2); +- } +- +- return __rpc_write_data2reg(rpc, SMWDR0, buf, sz); +-} +- +-static ssize_t rpc_write_unaligned(struct spi_nor *nor, loff_t to, size_t len, +- const u_char *buf, size_t fullen) +-{ +- int ret = len, dsize; +- struct rpc_spi *rpc = nor->priv; +- bool copy = false, last; +- loff_t _to; +- +- rpc_endisable_write_buf(rpc, false); +- +- while (len > 0) { +- _to = to; +- if (rpc->mtdtype == MTD_QSPI_2x) +- _to >>= 1; +- rpc_write(rpc, SMADR, _to); +- dsize = rpc_datalen2trancfersize(rpc, len, copy); +- +- if (rpc_setup_data_size(rpc, dsize, copy)) +- return -EINVAL; +- +- rpc_write_data2reg(rpc, buf, dsize, copy); +- +- last = (len <= dsize && fullen <= ret); +- rpc_begin(rpc, false, true, last); +- if (rpc_wait(rpc, DEFAULT_TO)) +- return -ETIMEDOUT; +- +- /* ...disable command */ +- rpc_setup_write_mode_command_and_adr(rpc, +- nor->addr_width, false); +- +- buf += dsize; +- len -= dsize; +- to += dsize; +- } +- + return ret; + } ++EXPORT_SYMBOL(rpc_dma_read); + +-static ssize_t rpc_write_flash(struct spi_nor *nor, loff_t to, size_t len, +- const u_char *buf) +-{ +- ssize_t res = len, full = len; +- u32 val; +- u8 rval[2]; +- struct rpc_spi *rpc = nor->priv; +- loff_t bo; +- loff_t offset; +- bool is_rounded = false; +- +- /* ...len should be rounded to 2 bytes */ +- if (rpc->mtdtype == MTD_QSPI_2x && (len & 1)) { +- is_rounded = true; +- len &= ~(1); +- } +- +- bo = to & (WRITE_BUF_ADR_MASK); +- +- rpc_flush_cache(rpc); +- rpc_setup_write_mode(rpc, nor->program_opcode); +- rpc_setup_write_mode_command_and_adr(rpc, nor->addr_width, true); +- rpc_setup_writemode_nbits(rpc, 1, 1, 1); +- +- /* ...setup command */ +- val = rpc_read(rpc, SMCMR); +- val &= ~(SMCMR_CMD_MASK); +- val |= SMCMR_CMD(nor->program_opcode); +- rpc_write(rpc, SMCMR, val); +- +- offset = (to & (~WRITE_BUF_ADR_MASK)); +- +- /* ...write unaligned first bytes */ +- if (bo) { +- size_t min = (len < (WRITE_BUF_SIZE - bo)) ? len : (WRITE_BUF_SIZE - bo); +- +- rpc_write_unaligned(nor, to, min, buf, full); +- rpc_setup_write_mode(rpc, nor->program_opcode); +- +- len -= min; +- buf += min; +- to += min; +- full -= min; +- } +- +- /* +- * TODO: Unfortunately RPC does not write properly in write buf mode +- * without transferring command. Investigate this. +- */ +- +- if (len) { +- rpc_write_unaligned(nor, to, len, buf, full); +- buf += len; +- to += len; +- full -= len; +- len = 0; +- } +- +- if (is_rounded) { +- rval[0] = *buf; +- rval[1] = 0xFF; +- rpc_write_unaligned(nor, to, 2, rval, full); +- } +- +- rpc_flush_cache(rpc); +- +- return res; +-} +- +-static inline unsigned int rpc_rx_nbits(struct spi_nor *nor) +-{ +- return spi_nor_get_protocol_data_nbits(nor->read_proto); +-} +- +-#define READ_ADR_MASK (BIT(26) - 1) +-static ssize_t rpc_read_flash(struct spi_nor *nor, loff_t from, size_t len, +- u_char *buf) ++/* Read */ ++void rpc_do_read_flash(struct rpc_info *rpc, loff_t from, ++ size_t len, u_char *buf, bool addr32) + { +- u32 val; +- struct rpc_spi *rpc = nor->priv; +- int adr_width = nor->addr_width; +- int opcode_nbits = 1; +- int addr_nbits = rpc_get_read_addr_nbits(nor->read_opcode); +- int data_nbits = rpc_rx_nbits(nor); +- int dummy = nor->read_dummy - 1; +- ssize_t ret = len; +- ssize_t readlen; +- loff_t _from; +- +- rpc_setup_ext_mode(rpc); +- /* ...setup n bits */ +- rpc_setup_extmode_nbits(rpc, opcode_nbits, addr_nbits, data_nbits); +- +- /* TODO: setup DDR */ +- +- /* ...setup command */ +- val = rpc_read(rpc, DRCMR); +- val &= ~(DRCMR_CMD_MASK); +- val |= DRCMR_CMD(nor->read_opcode); +- rpc_write(rpc, DRCMR, val); +- +- /* ...setup dummy cycles */ +- val = rpc_read(rpc, DRDMCR); +- val &= ~(DRDMCR_DMCYC_MASK); +- val |= DRDMCR_DMCYC(dummy); +- rpc_write(rpc, DRDMCR, val); +- +- /* ...setup read sequence */ +- val = rpc_read(rpc, DRENR); +- val |= DRENR_DME | DRENR_CDE; +- rpc_write(rpc, DRENR, val); +- + while (len > 0) { +- int retval; +- +- /* ...setup address */ +- rpc_setup_extmode_read_addr(rpc, adr_width, from); +- /* ...use adr [25...0] */ +- _from = from & READ_ADR_MASK; +- +- readlen = READ_ADR_MASK - _from + 1; ++ ssize_t readlen; ++ loff_t _from; ++ int ret; ++ ++ /* Setup ext mode address */ ++ rpc_clrsetl(rpc, RPC_DREAR, ++ RPC_DREAR_EAV(0xFF) | RPC_DREAR_EAC(7), ++ addr32 ? ++ RPC_DREAR_EAV(from >> 25) | RPC_DREAR_EAC(1) : ++ 0); ++ ++ rpc_clrsetl(rpc, RPC_DRENR, ++ RPC_DRENR_ADE(0xF), ++ addr32 ? ++ /* bits 31-0 */ ++ RPC_DRENR_ADE(0xF) : ++ /* bits 23-0 */ ++ RPC_DRENR_ADE(0x7)); ++ ++ /* Use address bits [25...0] */ ++ _from = from & RPC_READ_ADDR_MASK; ++ ++ readlen = RPC_READ_ADDR_MASK - _from + 1; + readlen = readlen > len ? len : readlen; + +- retval = rpc_dma_read(rpc, buf, _from, &readlen); +- if (retval) ++ ret = rpc_dma_read(rpc, buf, _from, &readlen); ++ if (ret) + memcpy_fromio(buf, rpc->read_area + _from, readlen); + + buf += readlen; + from += readlen; + len -= readlen; + } +- +- return ret; +-} +- +-static int __rpc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +-{ +- u32 val; +- u32 val2 = 0; +- u32 *buf32; +- int i; +- u32 mask = 0, type; +- struct rpc_spi *rpc = nor->priv; +- +- type = rpc->mtdtype; +- +- rpc_setup_reg_mode(rpc); +- val = rpc_read(rpc, SMCMR); +- val &= ~(SMCMR_CMD_MASK); +- val |= SMCMR_CMD(opcode); +- rpc_write(rpc, SMCMR, val); +- +- rpc_begin(rpc, true, false, len <= 4); +- if (rpc_wait(rpc, DEFAULT_TO)) +- return -ETIMEDOUT; +- +- /* ...disable command */ +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_CDE); +- rpc_write(rpc, SMENR, val); +- +- buf32 = (u32 *)buf; +- +- while (len > 0) { +- rpc_read_manual_data(rpc, &val, &val2); +- +- if (mask) { +- dev_warn(&rpc->pdev->dev, +- "Using mask workaround (0x%x)\n", mask); +- val &= ~(mask); +- val2 &= ~(mask); +- } +- +- /* ... spi flashes should be the same */ +- if (type == MTD_QSPI_2x && val != val2) { +- /* clear cs */ +- rpc_begin(rpc, true, false, true); +- return -EAGAIN; +- } +- +- if (len > 4) { +- *buf32 = val; +- buf32++; +- len -= 4; +- } else { +- buf = (u8 *)buf32; +- for (i = 0; i < len; i++) { +- *buf = (val >> (8 * i)) & 0x000000ff; +- buf++; +- } +- len = 0; +- } +- +- if (!len) +- break; +- +- mask = 0xff; +- +- rpc_begin(rpc, true, false, len <= 4); +- if (rpc_wait(rpc, DEFAULT_TO)) +- return -ETIMEDOUT; +- +- } +- +- return 0; +-} +- +-static int rpc_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +-{ +- int i, ret; +- +- /* A few read commands like read status can +- * generate different answers. We repeat reading +- * in that case +- */ +- for (i = 0; i < REPEAT_MAX; i++) { +- ret = __rpc_read_reg(nor, opcode, buf, len); +- if (!ret || ret != -EAGAIN) +- break; +- mdelay(REPEAT_TIME); +- } +- +- return ret; +-} +- +-static int rpc_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len) +-{ +- struct rpc_spi *rpc = nor->priv; +- u32 val; +- int dsize; +- bool copy = true; +- +- rpc_setup_reg_mode(rpc); +- +- val = rpc_read(rpc, SMCMR); +- val &= ~(SMCMR_CMD_MASK); +- val |= SMCMR_CMD(opcode); +- rpc_write(rpc, SMCMR, val); +- +- dsize = rpc_datalen2trancfersize(rpc, len, copy); +- +- if (rpc_setup_data_size(rpc, dsize, copy)) +- return -EINVAL; +- +- if (rpc_write_data2reg(rpc, buf, dsize, copy)) +- return -EINVAL; +- buf += dsize; +- len -= dsize; +- rpc_begin(rpc, false, dsize > 0, len == 0); +- +- if (rpc_wait(rpc, DEFAULT_TO)) +- return -ETIMEDOUT; +- +- /* ...disable command */ +- val = rpc_read(rpc, SMENR); +- val &= ~(SMENR_CDE); +- rpc_write(rpc, SMENR, val); +- +- while (len > 0) { +- dsize = rpc_datalen2trancfersize(rpc, len, copy); +- if (rpc_setup_data_size(rpc, dsize, copy)) +- return -EINVAL; +- rpc_write_data2reg(rpc, buf, dsize, copy); +- buf += dsize; +- len -= dsize; +- +- rpc_begin(rpc, false, dsize, len == 0); +- +- if (rpc_wait(rpc, DEFAULT_TO)) +- return -ETIMEDOUT; +- +- } +- +- return 0; + } ++EXPORT_SYMBOL(rpc_do_read_flash); + +-/* hw init for spi-nor flashes */ +-static int rpc_hw_init_1x2x(struct rpc_spi *rpc) ++/* Own clock setup */ ++static int rpc_own_clk_set_rate(struct rpc_info *rpc, u32 max_clk_rate) + { +- u32 val; +- +- /* Exec calibration */ +- val = rpc_read(rpc, PHYCNT); +- val &= ~(PHYCNT_OCTA_MASK | PHYCNT_EXDS | PHYCNT_OCT +- | PHYCNT_DDRCAL | PHYCNT_HS | PHYCNT_STREAM_MASK +- | PHYCNT_WBUF2 | PHYCNT_WBUF | PHYCNT_PHYMEM_MASK); +- val |= (PHYCNT_CAL) | PHYCNT_STREAM(6); +- rpc_write(rpc, PHYCNT, val); +- +- /* disable rpc_* pins */ +- val = rpc_read(rpc, PHYINT); +- val &= ~((1<<24) | (7<<16)); +- rpc_write(rpc, PHYINT, val); +- +- val = rpc_read(rpc, SMDRENR); +- val &= ~(SMDRENR_HYPE_MASK); +- val |= SMDRENR_HYPE_SPI_FLASH; +- rpc_write(rpc, SMDRENR, val); +- +- val = rpc_read(rpc, CMNCR); +- val &= ~(CMNCR_BSZ_MASK); +- if (rpc->mtdtype != MTD_QSPI_1x) +- val |= CMNCR_BSZ_4x2; +- rpc_write(rpc, CMNCR, val); +- +- val = rpc_read(rpc, PHYOFFSET1); +- val |= PHYOFFSET1_DDRTMG; +- rpc_write(rpc, PHYOFFSET1, val); ++ unsigned long rate = clk_get_rate(rpc->clk); ++ u32 ratio; + +- val = SSLDR_SPNDL(0) | SSLDR_SLNDL(4) | SSLDR_SCKDL(0); +- rpc_write(rpc, SSLDR, val); ++ ratio = DIV_ROUND_UP(rate, max_clk_rate * 2) >> 1; ++ if (ratio > RPC_DIVREG_RATIO_MAX) ++ ratio = RPC_DIVREG_RATIO_MAX; + ++ rpc_clrsetl(rpc, RPC_DIVREG, ++ RPC_DIVREG_RATIO(0x3), ++ RPC_DIVREG_RATIO(ratio)); + return 0; + } + +-static int rpc_hw_init(struct rpc_spi *rpc) +-{ +- switch (rpc->mtdtype) { +- case MTD_QSPI_1x: +- case MTD_QSPI_2x: +- return rpc_hw_init_1x2x(rpc); +- +- default: +- dev_err(&rpc->pdev->dev, "Unsupported connection mode\n"); +- return -ENODEV; +- } +-} +- +-static int rpc_erase_sector(struct spi_nor *nor, loff_t addr) +-{ +- struct rpc_spi *rpc = nor->priv; +- u8 buf[6]; +- int i; +- +- if (rpc->mtdtype == MTD_QSPI_2x) +- addr >>= 1; +- +- for (i = nor->addr_width - 1; i >= 0; i--) { +- buf[i] = addr & 0xff; +- addr >>= 8; +- } +- +- return nor->write_reg(nor, nor->erase_opcode, buf, nor->addr_width); +-} +- +-static const struct of_device_id rpc_of_match[] = { +- { .compatible = "renesas,qspi-rpc-r8a77980" }, +- { .compatible = "renesas,qspi-rpc-r8a77970", .data = (void *)OWN_CLOCK_DIVIDER }, +- { }, +-}; +- +-MODULE_DEVICE_TABLE(of, rpc_of_match); +- +-static int rpc_spi_probe(struct platform_device *pdev) ++static int rpc_probe(struct platform_device *pdev) + { +- struct device_node *flash_np; +- struct spi_nor *nor; +- struct rpc_spi *rpc; ++ struct rpc_info *rpc; + struct resource *res; +- struct spi_nor_hwcaps hwcaps = { +- .mask = SNOR_HWCAPS_READ | +- SNOR_HWCAPS_READ_FAST | +- SNOR_HWCAPS_PP, +- }; +- u32 max_clk_rate = 50000000; +- u32 property; ++ const char *name = NULL; ++ u32 rate = 0; + int ret; +- int own_clk; +- +- +- flash_np = of_get_next_available_child(pdev->dev.of_node, NULL); +- if (!flash_np) { +- dev_err(&pdev->dev, "no SPI flash device to configure\n"); +- return -ENODEV; +- } +- +- if (!of_property_read_u32(flash_np, "spi-rx-bus-width", &property)) { +- switch (property) { +- case 1: +- break; +- case 2: +- hwcaps.mask |= SNOR_HWCAPS_READ_DUAL; +- break; +- case 4: +- hwcaps.mask |= SNOR_HWCAPS_READ_QUAD; +- break; +- default: +- dev_err(&pdev->dev, "unsupported rx-bus-width\n"); +- return -EINVAL; +- } +- } +- +- of_property_read_u32(flash_np, "spi-max-frequency", &max_clk_rate); +- own_clk = (of_device_get_match_data(&pdev->dev) == (void *)OWN_CLOCK_DIVIDER); + + rpc = devm_kzalloc(&pdev->dev, sizeof(*rpc), GFP_KERNEL); +- if (!rpc) ++ if (!rpc) { ++ dev_err(&pdev->dev, "allocation failed\n"); + return -ENOMEM; +- +- rpc->pdev = pdev; +- +- /* ... setup nor hooks */ +- nor = &rpc->spi_nor; +- nor->dev = &pdev->dev; +- spi_nor_set_flash_node(nor, flash_np); +- nor->read = rpc_read_flash; +- nor->write = rpc_write_flash; +- nor->read_reg = rpc_read_reg; +- nor->write_reg = rpc_write_reg; +- nor->priv = rpc; +- rpc->mtdtype = MTD_QSPI_1x; +- +- if (of_find_property(pdev->dev.of_node, "dual", NULL)) { +- rpc->mtdtype = MTD_QSPI_2x; +- nor->erase = rpc_erase_sector; + } + +- /* ...get memory */ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + rpc->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(rpc->base)) { +- dev_err(&pdev->dev, "cannot get resources\n"); +- ret = PTR_ERR(rpc->base); +- goto error; ++ dev_err(&pdev->dev, "cannot get base resource\n"); ++ return PTR_ERR(rpc->base); + } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); +- +- rpc->read_area_dma = res->start; + rpc->read_area = devm_ioremap_resource(&pdev->dev, res); +- if (IS_ERR(rpc->base)) { +- dev_err(&pdev->dev, "cannot get resources\n"); +- ret = PTR_ERR(rpc->base); +- goto error; ++ if (IS_ERR(rpc->read_area)) { ++ dev_err(&pdev->dev, "cannot get read resource\n"); ++ return PTR_ERR(rpc->read_area); ++ } ++ ++ if (resource_size(res) & RPC_READ_ADDR_MASK) { ++ dev_err(&pdev->dev, "invalid read resource\n"); ++ return -EINVAL; + } + +- /* ...get memory */ ++ rpc->read_area_dma = res->start; ++ + res = platform_get_resource(pdev, IORESOURCE_MEM, 2); + rpc->write_area = devm_ioremap_resource(&pdev->dev, res); +- if (IS_ERR(rpc->base)) { +- dev_err(&pdev->dev, "cannot get resources\n"); +- ret = PTR_ERR(rpc->base); +- goto error; ++ if (IS_ERR(rpc->write_area)) { ++ dev_warn(&pdev->dev, "cannot get write resource\n"); ++ rpc->write_area = NULL; + } + +- /* ...get clk */ + rpc->clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(rpc->clk)) { + dev_err(&pdev->dev, "cannot get clock\n"); +- ret = PTR_ERR(rpc->clk); +- goto error; ++ return PTR_ERR(rpc->clk); + } + +- /* ...set max clk rate */ +- if (!own_clk) { +- ret = clk_set_rate(rpc->clk, max_clk_rate); +- if (ret) { +- dev_err(&pdev->dev, "cannot set clock rate\n"); +- goto error; +- } ++ rpc->flash = of_get_next_available_child(pdev->dev.of_node, NULL); ++ if (!rpc->flash) { ++ dev_err(&pdev->dev, "no flash device to configure\n"); ++ return -ENOTSUPP; + } + +- /* ... enable clk */ +- ret = clk_prepare_enable(rpc->clk); +- if (ret) { +- dev_err(&pdev->dev, "cannot prepare clock\n"); +- goto error; ++ rpc->mtdtype = of_find_property(pdev->dev.of_node, "dual", NULL) ? ++ RPC_DUAL : RPC_SINGLE; ++ ++ of_property_read_u32(rpc->flash, "spi-max-frequency", &rate); ++ ++ if (of_device_is_compatible(rpc->flash, "jedec,spi-nor")) { ++ name = "renesas-rpc-qspi"; ++ if (!rate) ++ rate = 50000000; ++ } else if (of_device_is_compatible(rpc->flash, "cfi-flash")) { ++ rpc->mtdtype = RPC_DUAL; ++ name = "renesas-rpc-hyperflash"; ++ if (!rate) ++ rate = 80000000; + } + +- /* ...init device */ +- ret = rpc_hw_init(rpc); +- if (ret < 0) { +- dev_err(&pdev->dev, "rpc_hw_init error.\n"); +- goto error_clk_disable; ++ if (!name) { ++ dev_err(&pdev->dev, "no supported flash device detected\n"); ++ ret = -ENODEV; ++ goto error; + } + +- /* ...set clk ratio */ +- if (own_clk) { +- ret = rpc_setup_clk_ratio(rpc, max_clk_rate); ++ if (rate) { ++ ret = of_device_is_compatible(pdev->dev.of_node, ++ "renesas,rpc-r8a77970") ? ++ rpc_own_clk_set_rate(rpc, rate) : ++ clk_set_rate(rpc->clk, rate); + if (ret) { +- dev_err(&pdev->dev, "cannot set clock ratio\n"); ++ dev_err(&pdev->dev, "clock rate setup failed\n"); + goto error; + } + } + +- platform_set_drvdata(pdev, rpc); +- +- ret = spi_nor_scan(nor, NULL, &hwcaps); +- if (ret) { +- dev_err(&pdev->dev, "spi_nor_scan error.\n"); +- goto error_clk_disable; +- } +- +- /* Dual mode support */ +- if (rpc->mtdtype == MTD_QSPI_2x) { +- nor->page_size <<= 1; +- nor->mtd.erasesize <<= 1; +- nor->mtd.size <<= 1; +- nor->mtd.writebufsize <<= 1; +- } +- +- /* Workaround data size limitation */ +- if (nor->page_size > WRITE_BUF_SIZE) { +- nor->page_size = WRITE_BUF_SIZE; +- nor->mtd.writebufsize = WRITE_BUF_SIZE; +- } +- + if (use_dma) { + dma_cap_mask_t mask; + +@@ -1324,58 +290,70 @@ static int rpc_spi_probe(struct platform_device *pdev) + dma_cap_set(DMA_MEMCPY, mask); + rpc->dma_chan = dma_request_channel(mask, NULL, NULL); + if (!rpc->dma_chan) +- dev_warn(&pdev->dev, "Failed to request DMA channel\n"); ++ dev_warn(&pdev->dev, "DMA channel request failed\n"); + else +- dev_info(&pdev->dev, "Using DMA read (%s)\n", ++ dev_info(&pdev->dev, "using DMA read (%s)\n", + dma_chan_name(rpc->dma_chan)); + } + +- ret = mtd_device_register(&nor->mtd, NULL, 0); +- if (ret) { +- dev_err(&pdev->dev, "mtd_device_register error.\n"); +- goto error_dma; ++ platform_set_drvdata(pdev, rpc); ++ rpc->pdev = platform_device_register_data(&pdev->dev, name, -1, NULL, 0); ++ if (IS_ERR(rpc->pdev)) { ++ dev_err(&pdev->dev, "%s device registration failed\n", name); ++ ret = PTR_ERR(rpc->pdev); ++ goto error; + } + +- dev_info(&pdev->dev, "probed as %s\n", +- rpc->mtdtype == MTD_QSPI_1x ? "single" : "dual"); +- + return 0; + +-error_dma: ++error: + if (rpc->dma_chan) + dma_release_channel(rpc->dma_chan); +-error_clk_disable: +- clk_disable_unprepare(rpc->clk); +-error: ++ ++ of_node_put(rpc->flash); + return ret; + } + +-static int rpc_spi_remove(struct platform_device *pdev) ++static int rpc_remove(struct platform_device *pdev) + { +- struct rpc_spi *rpc = platform_get_drvdata(pdev); ++ struct rpc_info *rpc = platform_get_drvdata(pdev); + +- /* HW shutdown */ +- clk_disable_unprepare(rpc->clk); +- mtd_device_unregister(&rpc->spi_nor.mtd); ++ if (rpc->pdev) ++ platform_device_unregister(rpc->pdev); + if (rpc->dma_chan) + dma_release_channel(rpc->dma_chan); ++ if (rpc->flash) ++ of_node_put(rpc->flash); ++ + return 0; + } + ++static const struct of_device_id rpc_of_match[] = { ++ { .compatible = "renesas,rpc-r8a7795" }, ++ { .compatible = "renesas,rpc-r8a7796" }, ++ { .compatible = "renesas,rpc-r8a77965" }, ++ { ++ .compatible = "renesas,rpc-r8a77970", ++ .data = (void *)RPC_OWN_CLOCK_DIVIDER, ++ }, ++ { .compatible = "renesas,rpc-r8a77980" }, ++ { }, ++}; ++ + /* platform driver interface */ + static struct platform_driver rpc_platform_driver = { +- .probe = rpc_spi_probe, +- .remove = rpc_spi_remove, ++ .probe = rpc_probe, ++ .remove = rpc_remove, + .driver = { + .owner = THIS_MODULE, +- .name = "rpc", ++ .name = "renesas-rpc", + .of_match_table = of_match_ptr(rpc_of_match), + }, + }; + + module_platform_driver(rpc_platform_driver); + +-MODULE_ALIAS("rpc"); ++MODULE_ALIAS("renesas-rpc"); + MODULE_AUTHOR("Cogent Embedded Inc. "); + MODULE_DESCRIPTION("Renesas RPC Driver"); + MODULE_LICENSE("GPL"); +diff --git a/drivers/mtd/spi-nor/renesas-rpc.h b/drivers/mtd/spi-nor/renesas-rpc.h +new file mode 100644 +index 0000000..e500a62 +--- /dev/null ++++ b/drivers/mtd/spi-nor/renesas-rpc.h +@@ -0,0 +1,267 @@ ++/* ++ * Renesas RPC driver ++ * ++ * Copyright (C) 2019, Cogent Embedded Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#ifndef __RENESAS_RPC_H__ ++#define __RENESAS_RPC_H__ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* RPC */ ++#define RPC_CMNCR 0x0000 /* R/W */ ++#define RPC_CMNCR_MD (0x1 << 31) ++#define RPC_CMNCR_MOIIO0(val) (((val) & 0x3) << 16) ++#define RPC_CMNCR_MOIIO1(val) (((val) & 0x3) << 18) ++#define RPC_CMNCR_MOIIO2(val) (((val) & 0x3) << 20) ++#define RPC_CMNCR_MOIIO3(val) (((val) & 0x3) << 22) ++#define RPC_CMNCR_MOIIO_HIZ (RPC_CMNCR_MOIIO0(3) | RPC_CMNCR_MOIIO1(3) | \ ++ RPC_CMNCR_MOIIO2(3) | RPC_CMNCR_MOIIO3(3)) ++#define RPC_CMNCR_IO0FV(val) (((val) & 0x3) << 8) ++#define RPC_CMNCR_IO2FV(val) (((val) & 0x3) << 12) ++#define RPC_CMNCR_IO3FV(val) (((val) & 0x3) << 14) ++#define RPC_CMNCR_IOFV_HIZ (RPC_CMNCR_IO0FV(3) | RPC_CMNCR_IO2FV(3) | \ ++ RPC_CMNCR_IO3FV(3)) ++#define RPC_CMNCR_BSZ(val) (((val) & 0x3) << 0) ++ ++#define RPC_SSLDR 0x0004 /* R/W */ ++#define RPC_SSLDR_SPNDL(d) (((d) & 0x7) << 16) ++#define RPC_SSLDR_SLNDL(d) (((d) & 0x7) << 8) ++#define RPC_SSLDR_SCKDL(d) (((d) & 0x7) << 0) ++ ++#define RPC_DRCR 0x000C /* R/W */ ++#define RPC_DRCR_SSLN (0x1 << 24) ++#define RPC_DRCR_RBURST(v) (((v) & 0x1F) << 16) ++#define RPC_DRCR_RCF (0x1 << 9) ++#define RPC_DRCR_RBE (0x1 << 8) ++#define RPC_DRCR_SSLE (0x1 << 0) ++ ++#define RPC_DRCMR 0x0010 /* R/W */ ++#define RPC_DRCMR_CMD(c) (((c) & 0xFF) << 16) ++#define RPC_DRCMR_OCMD(c) (((c) & 0xFF) << 0) ++ ++#define RPC_DREAR 0x0014 /* R/W */ ++#define RPC_DREAR_EAV(v) (((v) & 0xFF) << 16) ++#define RPC_DREAR_EAC(v) (((v) & 0x7) << 0) ++ ++#define RPC_DROPR 0x0018 /* R/W */ ++#define RPC_DROPR_OPD3(o) (((o) & 0xFF) << 24) ++#define RPC_DROPR_OPD2(o) (((o) & 0xFF) << 16) ++#define RPC_DROPR_OPD1(o) (((o) & 0xFF) << 8) ++#define RPC_DROPR_OPD0(o) (((o) & 0xFF) << 0) ++ ++#define RPC_DRENR 0x001C /* R/W */ ++#define RPC_DRENR_CDB(o) (((o) & 0x3) << 30) ++#define RPC_DRENR_OCDB(o) (((o) & 0x3) << 28) ++#define RPC_DRENR_ADB(o) (((o) & 0x3) << 24) ++#define RPC_DRENR_OPDB(o) (((o) & 0x3) << 20) ++#define RPC_DRENR_DRDB(o) (((o) & 0x3) << 16) ++#define RPC_DRENR_DME (0x1 << 15) ++#define RPC_DRENR_CDE (0x1 << 14) ++#define RPC_DRENR_OCDE (0x1 << 12) ++#define RPC_DRENR_ADE(v) (((v) & 0xF) << 8) ++#define RPC_DRENR_OPDE(v) (((v) & 0xF) << 4) ++ ++#define RPC_SMCR 0x0020 /* R/W */ ++#define RPC_SMCR_SSLKP (0x1 << 8) ++#define RPC_SMCR_SPIRE (0x1 << 2) ++#define RPC_SMCR_SPIWE (0x1 << 1) ++#define RPC_SMCR_SPIE (0x1 << 0) ++ ++#define RPC_SMCMR 0x0024 /* R/W */ ++#define RPC_SMCMR_CMD(c) (((c) & 0xFF) << 16) ++#define RPC_SMCMR_OCMD(c) (((c) & 0xFF) << 0) ++ ++#define RPC_SMADR 0x0028 /* R/W */ ++#define RPC_SMOPR 0x002C /* R/W */ ++#define RPC_SMOPR_OPD0(o) (((o) & 0xFF) << 0) ++#define RPC_SMOPR_OPD1(o) (((o) & 0xFF) << 8) ++#define RPC_SMOPR_OPD2(o) (((o) & 0xFF) << 16) ++#define RPC_SMOPR_OPD3(o) (((o) & 0xFF) << 24) ++ ++#define RPC_SMENR 0x0030 /* R/W */ ++#define RPC_SMENR_CDB(o) (((o) & 0x3) << 30) ++#define RPC_SMENR_OCDB(o) (((o) & 0x3) << 28) ++#define RPC_SMENR_ADB(o) (((o) & 0x3) << 24) ++#define RPC_SMENR_OPDB(o) (((o) & 0x3) << 20) ++#define RPC_SMENR_SPIDB(o) (((o) & 0x3) << 16) ++#define RPC_SMENR_DME (0x1 << 15) ++#define RPC_SMENR_CDE (0x1 << 14) ++#define RPC_SMENR_OCDE (0x1 << 12) ++#define RPC_SMENR_ADE(v) (((v) & 0xF) << 8) ++#define RPC_SMENR_OPDE(v) (((v) & 0xF) << 4) ++#define RPC_SMENR_SPIDE(v) (((v) & 0xF) << 0) ++ ++#define RPC_SMRDR0 0x0038 /* R */ ++#define RPC_SMRDR1 0x003C /* R */ ++#define RPC_SMWDR0 0x0040 /* R/W */ ++#define RPC_SMWDR1 0x0044 /* R/W */ ++#define RPC_CMNSR 0x0048 /* R */ ++#define RPC_CMNSR_SSLF (0x1 << 1) ++#define RPC_CMNSR_TEND (0x1 << 0) ++ ++#define RPC_DRDMCR 0x0058 /* R/W */ ++#define RPC_DRDMCR_DMCYC(v) (((v) & 0xF) << 0) ++ ++#define RPC_DRDRENR 0x005C /* R/W */ ++#define RPC_DRDRENR_HYPE (0x5 << 12) ++#define RPC_DRDRENR_ADDRE (0x1 << 0x8) ++#define RPC_DRDRENR_OPDRE (0x1 << 0x4) ++#define RPC_DRDRENR_DRDRE (0x1 << 0x0) ++ ++#define RPC_SMDMCR 0x0060 /* R/W */ ++#define RPC_SMDMCR_DMCYC(v) (((v) & 0xF) << 0) ++ ++#define RPC_SMDRENR 0x0064 /* R/W */ ++#define RPC_SMDRENR_HYPE(v) (((v) & 0x7) << 12) ++#define RPC_SMDRENR_HYPE_HF RPC_SMDRENR_HYPE(0x5) ++#define RPC_SMDRENR_HYPE_SPI RPC_SMDRENR_HYPE(0) ++#define RPC_SMDRENR_ADDRE (0x1 << 0x8) ++#define RPC_SMDRENR_OPDRE (0x1 << 0x4) ++#define RPC_SMDRENR_SPIDRE (0x1 << 0x0) ++ ++#define RPC_PHYCNT 0x007C /* R/W */ ++#define RPC_PHYCNT_CAL (0x1 << 31) ++#define RPC_PHYCNT_OCTA(v) (((v) & 0x3) << 22) ++#define RPC_PHYCNT_OCTA_AA (0x1 << 22) ++#define RPC_PHYCNT_OCTA_SA (0x2 << 22) ++#define RPC_PHYCNT_EXDS (0x1 << 21) ++#define RPC_PHYCNT_OCT (0x1 << 20) ++#define RPC_PHYCNT_DDRCAL (0x1 << 19) ++#define RPC_PHYCNT_HS (0x1 << 18) ++#define RPC_PHYCNT_STRTIM(v) (((v) & 0x7) << 15) ++#define RPC_PHYCNT_WBUF2 (0x1 << 4) ++#define RPC_PHYCNT_WBUF (0x1 << 2) ++#define RPC_PHYCNT_MEM(v) (((v) & 0x3) << 0) ++ ++#define RPC_PHYINT 0x0088 /* R/W */ ++#define RPC_PHYINT_INTIE (0x1 << 24) ++#define RPC_PHYINT_RSTEN (0x1 << 18) ++#define RPC_PHYINT_WPEN (0x1 << 17) ++#define RPC_PHYINT_INTEN (0x1 << 16) ++#define RPC_PHYINT_RST (0x1 << 2) ++#define RPC_PHYINT_WP (0x1 << 1) ++#define RPC_PHYINT_INT (0x1 << 0) ++ ++#define RPC_PHYOFFSET1 0x0080 ++#define RPC_PHYOFFSET1_DDRTMG(v) (((v) & 0x3) << 28) ++#define RPC_PHYOFFSET1_DDRTMG_SDR RPC_PHYOFFSET1_DDRTMG(3) ++#define RPC_PHYOFFSET1_DDRTMG_DDR RPC_PHYOFFSET1_DDRTMG(2) ++ ++#define RPC_PHYOFFSET2 0x0084 ++#define RPC_PHYOFFSET2_OCTTMG(v) (((v) & 0x7) << 8) ++#define RPC_PHYOFFSET2_OCTAL RPC_PHYOFFSET2_OCTTMG(3) ++#define RPC_PHYOFFSET2_SERIAL RPC_PHYOFFSET2_OCTTMG(4) ++ ++#define RPC_DIVREG 0x00A8 ++#define RPC_DIVREG_RATIO(v) ((v) & 0x03) ++#define RPC_DIVREG_RATIO_MAX (0x2) ++ ++#define RPC_WBUF 0x8000 /* R/W size=4/8/16/32/64Bytes */ ++#define RPC_WBUF_SIZE 0x100 ++#define RPC_WBUF_MASK (RPC_WBUF_SIZE - 1) ++ ++/* DMA transfer */ ++#define RPC_DMA_BURST (0x20 << 3) ++#define RPC_DMA_SIZE_MIN (RPC_DMA_BURST << 3) ++ ++#define RPC_READ_ADDR_SIZE BIT(26) ++#define RPC_READ_ADDR_MASK (RPC_READ_ADDR_SIZE - 1) ++ ++/* Default timeout in mS */ ++#define RPC_TIMEOUT 5000 ++ ++/* Device flags */ ++#define RPC_OWN_CLOCK_DIVIDER BIT(0) ++ ++enum rpc_size { ++ /* singe flash: 8 bit; dual flash: 16 bit */ ++ RPC_SIZE_SINGLE_8BIT = RPC_SMENR_SPIDE(0x8), ++ RPC_SIZE_DUAL_16BIT = RPC_SMENR_SPIDE(0x8), ++ /* singe flash: 16 bit; dual flash: 32 bit */ ++ RPC_SIZE_SINGLE_16BIT = RPC_SMENR_SPIDE(0xC), ++ RPC_SIZE_DUAL_32BIT = RPC_SMENR_SPIDE(0xC), ++ /* singe flash: 32 bit; dual flash: 64 bit */ ++ RPC_SIZE_SINGLE_32BIT = RPC_SMENR_SPIDE(0xF), ++ RPC_SIZE_DUAL_64BIT = RPC_SMENR_SPIDE(0xF), ++}; ++ ++enum rpc_type { ++ RPC_SINGLE = 0, ++ RPC_DUAL, ++}; ++ ++struct rpc_info { ++ struct platform_device *pdev; ++ struct device_node *flash; ++ void __iomem *base; ++ void __iomem *read_area; ++ void __iomem *write_area; ++ dma_addr_t read_area_dma; ++ struct completion comp; ++ struct dma_chan *dma_chan; ++ struct clk *clk; ++ unsigned int irq; ++ enum rpc_type mtdtype; ++}; ++ ++/* Register access */ ++static inline u32 rpc_readl(struct rpc_info *rpc, u32 offset) ++{ ++ return readl(rpc->base + offset); ++} ++ ++static inline void rpc_writel(struct rpc_info *rpc, u32 offset, u32 val) ++{ ++ writel(val, rpc->base + offset); ++} ++ ++static inline void rpc_clrsetl(struct rpc_info *rpc, u32 offset, ++ u32 clr, u32 set) ++{ ++ void __iomem *addr = rpc->base + offset; ++ u32 val = readl(addr); ++ ++ val &= ~clr; ++ val |= set; ++ writel(val, addr); ++} ++ ++static inline void rpc_wbuf_writel(struct rpc_info *rpc, u32 offset, u32 val) ++{ ++ writel(val, rpc->write_area + offset); ++} ++ ++/* Check whether write buffer should be used */ ++static inline bool rpc_wbuf_available(struct rpc_info *rpc) ++{ ++ return rpc->write_area; ++} ++ ++#ifdef DEBUG ++extern void rpc_regs_dump(struct rpc_info *rpc); ++#else ++static inline void rpc_regs_dump(struct rpc_info *rpc) { } ++#endif ++ ++extern int rpc_wait(struct rpc_info *rpc, int timeout); ++extern int rpc_dma_read(struct rpc_info *rpc, void *buf, ++ loff_t from, ssize_t *plen); ++extern void rpc_do_read_flash(struct rpc_info *rpc, loff_t from, ++ size_t len, u_char *buf, bool addr32); ++#endif +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0440-arm64-dts-renesas-r8a77970-Update-RPC-device-nodes.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0440-arm64-dts-renesas-r8a77970-Update-RPC-device-nodes.patch new file mode 100644 index 00000000..fba99bf0 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0440-arm64-dts-renesas-r8a77970-Update-RPC-device-nodes.patch @@ -0,0 +1,72 @@ +From 0bfdc760d2cfb3e2c3800310018ac561df458337 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:11:03 +0300 +Subject: [PATCH 06/12] arm64: dts: renesas: r8a77970: Update RPC device nodes + +This updates RPC device nodes for the consolidated RPC driver. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77970-v3mzf.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77970.dtsi | 4 ++-- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts +index aa4c65a..5a736aa 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts +@@ -421,7 +421,7 @@ + }; + }; + +-&qspi0 { ++&rpc0 { + pinctrl-0 = <&qspi0_pins &qspi1_pins>; + pinctrl-names = "default"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts b/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts +index d6deffe..fad6654 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts +@@ -195,7 +195,7 @@ + }; + }; + +-&qspi0 { ++&rpc0 { + pinctrl-0 = <&qspi0_pins &qspi1_pins>; + pinctrl-names = "default"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970-v3mzf.dts b/arch/arm64/boot/dts/renesas/r8a77970-v3mzf.dts +index caecf8c..cabbb0f 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970-v3mzf.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77970-v3mzf.dts +@@ -399,7 +399,7 @@ + }; + }; + +-&qspi0 { ++&rpc0 { + pinctrl-0 = <&qspi0_pins &qspi1_pins>; + pinctrl-names = "default"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi +index 456eeb6..603efeb 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi +@@ -767,8 +767,8 @@ + status = "disabled"; + }; + +- qspi0: qspi@ee200000 { +- compatible = "renesas,qspi-rpc-r8a77970"; ++ rpc0: qspi@ee200000 { ++ compatible = "renesas,rpc-r8a77970"; + reg = <0 0xee200000 0 0x1f0>, + <0 0x08000000 0 0x04000000>, + <0 0xee208000 0 0x100>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0441-arm64-dts-renesas-r8a77980-Update-RPC-device-nodes.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0441-arm64-dts-renesas-r8a77980-Update-RPC-device-nodes.patch new file mode 100644 index 00000000..4268ffa4 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0441-arm64-dts-renesas-r8a77980-Update-RPC-device-nodes.patch @@ -0,0 +1,58 @@ +From a7ac55ef8c0a09f15977a5ea6d7d8558e6d23c93 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:22:47 +0300 +Subject: [PATCH 07/12] arm64: dts: renesas: r8a77980: Update RPC device nodes + +This updates RPC device nodes for the consolidated RPC driver. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a77980-condor.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77980.dtsi | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts +index a60482a..1ba48ad 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts +@@ -651,7 +651,7 @@ + }; + }; + +-&qspi0 { ++&rpc0 { + pinctrl-0 = <&qspi0_pins &qspi1_pins>; + pinctrl-names = "default"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts +index 5c8ded5..c8d94e4 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts +@@ -265,7 +265,7 @@ + }; + }; + +-&qspi0 { ++&rpc0 { + pinctrl-0 = <&qspi0_pins &qspi1_pins>; + pinctrl-names = "default"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi +index 0d25b35..23c39c1 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi +@@ -823,8 +823,8 @@ + status = "disabled"; + }; + +- qspi0: qspi@ee200000 { +- compatible = "renesas,qspi-rpc-r8a77980"; ++ rpc0: rpc0@ee200000 { ++ compatible = "renesas,rpc-r8a77980", "renesas,rpc"; + reg = <0 0xee200000 0 0x1f0>, + <0 0x08000000 0 0x04000000>, + <0 0xee208000 0 0x100>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0442-arm64-dts-renesas-r8a7795-Add-RPC-device-node.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0442-arm64-dts-renesas-r8a7795-Add-RPC-device-node.patch new file mode 100644 index 00000000..51300f63 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0442-arm64-dts-renesas-r8a7795-Add-RPC-device-node.patch @@ -0,0 +1,39 @@ +From 77361fe676437e194091d927125ec3821bfc9eea Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:24:39 +0300 +Subject: [PATCH 08/12] arm64: dts: renesas: r8a7795: Add RPC device node + +This adds RPC device node to the r8a7795.dtsi file. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +index e1b57e9..cc5844f 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +@@ -1947,6 +1947,19 @@ + status = "disabled"; + }; + ++ rpc0: rpc0@ee200000 { ++ compatible = "renesas,rpc-r8a7795", "renesas,rpc"; ++ reg = <0 0xee200000 0 0x1f0>, ++ <0 0x08000000 0 0x04000000>, ++ <0 0xee208000 0 0x100>; ++ interrupts = ; ++ clocks = <&cpg CPG_MOD 917>; ++ power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + vin0: video@e6ef0000 { + compatible = "renesas,vin-r8a7795"; + reg = <0 0xe6ef0000 0 0x1000>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0443-arm64-dts-renesas-r8a7796-Add-RPC-device-node.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0443-arm64-dts-renesas-r8a7796-Add-RPC-device-node.patch new file mode 100644 index 00000000..6b7e7543 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0443-arm64-dts-renesas-r8a7796-Add-RPC-device-node.patch @@ -0,0 +1,39 @@ +From 156743895046cd24f950a3f6790a19b5ba417f92 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:25:40 +0300 +Subject: [PATCH 09/12] arm64: dts: renesas: r8a7796: Add RPC device node + +This adds RPC device node to the r8a7796.dtsi file. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a7796.dtsi | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +index 7fcac8f..c50f5e9 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +@@ -1853,6 +1853,19 @@ + status = "disabled"; + }; + ++ rpc0: rpc0@ee200000 { ++ compatible = "renesas,rpc-r8a7796", "renesas,rpc"; ++ reg = <0 0xee200000 0 0x1f0>, ++ <0 0x08000000 0 0x04000000>, ++ <0 0xee208000 0 0x100>; ++ interrupts = ; ++ clocks = <&cpg CPG_MOD 917>; ++ power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + vin0: video@e6ef0000 { + compatible = "renesas,vin-r8a7796"; + reg = <0 0xe6ef0000 0 0x1000>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0444-arm64-dts-renesas-r8a77965-Add-RPC-device-node.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0444-arm64-dts-renesas-r8a77965-Add-RPC-device-node.patch new file mode 100644 index 00000000..e683e929 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0444-arm64-dts-renesas-r8a77965-Add-RPC-device-node.patch @@ -0,0 +1,39 @@ +From df5a5e4ee2a2059cc4fa06bf17a9e2c547afd540 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:25:58 +0300 +Subject: [PATCH 10/12] arm64: dts: renesas: r8a77965: Add RPC device node + +This adds RPC device node to the r8a77965.dtsi file. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/r8a77965.dtsi | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +index b5926ff..0a41a13 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +@@ -1267,6 +1267,19 @@ + status = "disabled"; + }; + ++ rpc0: rpc0@ee200000 { ++ compatible = "renesas,rpc-r8a77965", "renesas,rpc"; ++ reg = <0 0xee200000 0 0x1f0>, ++ <0 0x08000000 0 0x04000000>, ++ <0 0xee208000 0 0x100>; ++ interrupts = ; ++ clocks = <&cpg CPG_MOD 917>; ++ power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + vin0: video@e6ef0000 { + compatible = "renesas,vin-r8a77965"; + reg = <0 0xe6ef0000 0 0x1000>; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0445-arm64-dts-renesas-ulcb-Add-RPC-HyperFlash-device-nod.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0445-arm64-dts-renesas-ulcb-Add-RPC-HyperFlash-device-nod.patch new file mode 100644 index 00000000..52a08ec1 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0445-arm64-dts-renesas-ulcb-Add-RPC-HyperFlash-device-nod.patch @@ -0,0 +1,77 @@ +From 094c3d4eff875eee4009cac9c2fe0cc748a54394 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Mon, 4 Nov 2019 01:26:23 +0300 +Subject: [PATCH 11/12] arm64: dts: renesas: ulcb: Add RPC HyperFlash device + node + +This adds RPC HyperFlash device node along with +its partitions to the ULCB device tree. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/ulcb.dtsi | 49 +++++++++++++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) + +diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi +index 7e546d3..924b7a0 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi +@@ -422,6 +422,55 @@ + }; + }; + ++&rpc0 { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "cfi-flash"; ++ reg = <0>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ bootparam@0 { ++ reg = <0x00000000 0x040000>; ++ read-only; ++ }; ++ bl2@00040000 { ++ reg = <0x00040000 0x140000>; ++ read-only; ++ }; ++ cert_header_sa6@00180000 { ++ reg = <0x00180000 0x040000>; ++ read-only; ++ }; ++ bl31@001C0000 { ++ reg = <0x001C0000 0x480000>; ++ read-only; ++ }; ++ uboot@00640000 { ++ reg = <0x00640000 0x0C0000>; ++ read-only; ++ }; ++ uboot-env@00700000 { ++ reg = <0x00700000 0x040000>; ++ read-only; ++ }; ++ dtb@00740000 { ++ reg = <0x00740000 0x080000>; ++ }; ++ kernel@007C0000 { ++ reg = <0x007C0000 0x1400000>; ++ }; ++ user@01BC0000 { ++ reg = <0x01BC0000 0x2440000>; ++ }; ++ }; ++ }; ++}; ++ + &rwdt { + timeout-sec = <60>; + status = "okay"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0446-arm64-dts-renesas-salvator-common-Add-RPC-HyperFlash.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0446-arm64-dts-renesas-salvator-common-Add-RPC-HyperFlash.patch new file mode 100644 index 00000000..a4a8db97 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0446-arm64-dts-renesas-salvator-common-Add-RPC-HyperFlash.patch @@ -0,0 +1,77 @@ +From 02ad9fb42936a698726a824550305ea7e6dd9b14 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Wed, 6 Nov 2019 03:02:20 +0300 +Subject: [PATCH 12/12] arm64: dts: renesas: salvator-common: Add RPC + HyperFlash device node + +This adds RPC HyperFlash device node along with +its partitions to the common Salvator device tree. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/salvator-common.dtsi | 49 ++++++++++++++++++++++++ + 1 file changed, 49 insertions(+) + +diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +index 788d38f..6215545 100644 +--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi ++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +@@ -823,6 +823,55 @@ + }; + }; + ++&rpc0 { ++ status = "okay"; ++ ++ flash@0 { ++ compatible = "cfi-flash"; ++ reg = <0>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ bootparam@0 { ++ reg = <0x00000000 0x040000>; ++ read-only; ++ }; ++ bl2@00040000 { ++ reg = <0x00040000 0x140000>; ++ read-only; ++ }; ++ cert_header_sa6@00180000 { ++ reg = <0x00180000 0x040000>; ++ read-only; ++ }; ++ bl31@001C0000 { ++ reg = <0x001C0000 0x480000>; ++ read-only; ++ }; ++ uboot@00640000 { ++ reg = <0x00640000 0x0C0000>; ++ read-only; ++ }; ++ uboot-env@00700000 { ++ reg = <0x00700000 0x040000>; ++ read-only; ++ }; ++ dtb@00740000 { ++ reg = <0x00740000 0x080000>; ++ }; ++ kernel@007C0000 { ++ reg = <0x007C0000 0x1400000>; ++ }; ++ user@01BC0000 { ++ reg = <0x01BC0000 0x2440000>; ++ }; ++ }; ++ }; ++}; ++ + &rwdt { + timeout-sec = <60>; + status = "okay"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0447-media-soc_camera-rcar_vin-Fix-crash-when-the-module-.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0447-media-soc_camera-rcar_vin-Fix-crash-when-the-module-.patch new file mode 100644 index 00000000..c6b384e8 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0447-media-soc_camera-rcar_vin-Fix-crash-when-the-module-.patch @@ -0,0 +1,75 @@ +From b7b603c33d7cc369f1165773a0f3fa14f7f71baf Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Sun, 8 Dec 2019 01:30:38 +0300 +Subject: [PATCH] media: soc_camera: rcar_vin: Fix crash when the module is + removed + +The kernel may crash when removing rcar_csi2 or re-inserting +rcar_vin module after having removed it. This happens when +multiple ports are used. Multiple async clients are created +in this case. Each client registers a notifier which is added +to the notifier_list. However, only the last one, referenced +by the async_client pointer, is removed form the notifier_list +later when the rcar_vin module is removed. + +Fix this issue by using a linked list and removing all the +async clients in the list when removing rcar_vin device. + +Signed-off-by: Valentine Barshak +--- + drivers/media/platform/soc_camera/rcar_vin.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c +index 501598c..e13a046 100644 +--- a/drivers/media/platform/soc_camera/rcar_vin.c ++++ b/drivers/media/platform/soc_camera/rcar_vin.c +@@ -922,7 +922,7 @@ struct rcar_vin_priv { + bool deser_sync; + int lut_updated; + +- struct rcar_vin_async_client *async_client; ++ struct list_head async_client; + /* Asynchronous CSI2 linking */ + struct v4l2_subdev *csi2_sd; + /* Asynchronous Deserializer linking */ +@@ -3032,7 +3032,7 @@ static int rcar_vin_soc_of_bind(struct rcar_vin_priv *priv, + sasc->notifier.num_subdevs = 1; + sasc->notifier.ops = &rcar_vin_sensor_ops; + +- priv->async_client = sasc; ++ list_add(&sasc->list, &priv->async_client); + + client = of_find_i2c_device_by_node(remote); + +@@ -3368,6 +3368,7 @@ static int rcar_vin_probe(struct platform_device *pdev) + + spin_lock_init(&priv->lock); + INIT_LIST_HEAD(&priv->capture); ++ INIT_LIST_HEAD(&priv->async_client); + + priv->state = STOPPED; + +@@ -3417,11 +3418,16 @@ static int rcar_vin_remove(struct platform_device *pdev) + struct soc_camera_host *soc_host = to_soc_camera_host(&pdev->dev); + struct rcar_vin_priv *priv = container_of(soc_host, + struct rcar_vin_priv, ici); ++ struct rcar_vin_async_client *sasc, *tmp; + +- platform_device_del(priv->async_client->pdev); +- platform_device_put(priv->async_client->pdev); ++ list_for_each_entry_safe(sasc, tmp, &priv->async_client, list) { ++ v4l2_async_notifier_unregister(&sasc->notifier); ++ v4l2_async_notifier_cleanup(&sasc->notifier); ++ list_del(&sasc->list); + +- v4l2_async_notifier_unregister(&priv->async_client->notifier); ++ platform_device_del(sasc->pdev); ++ platform_device_put(sasc->pdev); ++ } + + soc_camera_host_unregister(soc_host); + pm_runtime_disable(&pdev->dev); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0448-media-i2c-ar0xxx-append-embedded-data-stats-into-frame.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0448-media-i2c-ar0xxx-append-embedded-data-stats-into-frame.patch new file mode 100644 index 00000000..b2ce7fe9 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0448-media-i2c-ar0xxx-append-embedded-data-stats-into-frame.patch @@ -0,0 +1,252 @@ +From 294a1931ebc209c2950120c0f2cf24419dd8a1af Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 13 Dec 2019 23:10:27 +0300 +Subject: [PATCH] media: i2c: ar0xxx: append embedded data/stats into frame + +This allows to append embedded data/stats into active frame +after setup via sysfs of valeu emb_enable + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0220_rev2.h | 8 ++-- + drivers/media/i2c/soc_camera/ar0231_rev7.h | 8 ++-- + drivers/media/i2c/soc_camera/ar0233.c | 60 +++++++++++++++++++++++++----- + drivers/media/i2c/soc_camera/ar0233_rev1.h | 8 ++-- + drivers/media/i2c/soc_camera/ar0233_rev2.h | 8 ++-- + drivers/media/i2c/soc_camera/ov106xx.c | 4 +- + 6 files changed, 67 insertions(+), 29 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0220_rev2.h b/drivers/media/i2c/soc_camera/ar0220_rev2.h +index c66872d..12845cd 100644 +--- a/drivers/media/i2c/soc_camera/ar0220_rev2.h ++++ b/drivers/media/i2c/soc_camera/ar0220_rev2.h +@@ -311,10 +311,10 @@ static const struct ar0xxx_reg ar0220_rev2_hdr_12bit_output[] = { + + static const struct ar0xxx_reg ar0220_rev2_mipi_12bit_4lane[] = { + {0x31AE, 0x204}, // serial_format: MIPI 4 lanes +-//{0x3342, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x3346, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334A, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334E, 0x122C}, // default, DT=0x12, DT=0x2C ++{0x3342, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x3346, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334A, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334E, 0x2c2c}, // default, DT=0x12, DT=0x2C + //{0x3344, 0x0011}, // default, VC=0 + //{0x3348, 0x0111}, // default, VC=1 + //{0x334C, 0x0211}, // default, VC=2 +diff --git a/drivers/media/i2c/soc_camera/ar0231_rev7.h b/drivers/media/i2c/soc_camera/ar0231_rev7.h +index 704024a..b4c11c3 100644 +--- a/drivers/media/i2c/soc_camera/ar0231_rev7.h ++++ b/drivers/media/i2c/soc_camera/ar0231_rev7.h +@@ -367,10 +367,10 @@ static const struct ar0231_reg ar0231_regs_wizard_rev7[] = { + + #if 1 /* MIPI 12 bit Settings */ + {0x31AE, 0x204}, // serial_format: MIPI 4 lanes +-//{0x3342, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x3346, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334A, 0x122C}, // default, DT=0x12, DT=0x2C +-//{0x334E, 0x122C}, // default, DT=0x12, DT=0x2C ++{0x3342, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x3346, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334A, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334E, 0x2c2c}, // default, DT=0x12, DT=0x2C + //{0x3344, 0x0011}, // default, VC=0 + //{0x3348, 0x0111}, // default, VC=1 + //{0x334C, 0x0211}, // default, VC=2 +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index 312b9fe..b62fb77 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -23,6 +23,7 @@ + #define AR_DELAY 0xffff + static int AR_MAX_WIDTH; + static int AR_MAX_HEIGHT; ++#define AR_MAX_HEIGHT_EMB (AR_MAX_HEIGHT + priv->emb_enable * 4) /* embedded data (SOF) and stats (EOF) */ + static int AR_X_START; + static int AR_Y_START; + static int AR_X_END; +@@ -55,6 +56,7 @@ struct ar0233_priv { + struct v4l2_rect rect; + int init_complete; + u8 id[6]; ++ bool emb_enable; + /* serializers */ + int ti9x4_addr; + int ti9x3_addr; +@@ -121,7 +123,8 @@ static int ar0233_set_window(struct v4l2_subdev *sd) + /* vert crop start */ + reg16_write16(client, 0x3002, priv->rect.top + AR_Y_START); + /* vert crop end */ +- reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR_Y_START); ++ /* limit window for embedded data/stats */ ++ reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR_Y_START - priv->emb_enable * 4); + + return 0; + }; +@@ -207,7 +210,7 @@ static int ar0233_set_selection(struct v4l2_subdev *sd, + rect->height = ALIGN(rect->height, 2); + + if ((rect->left + rect->width > AR_MAX_WIDTH) || +- (rect->top + rect->height > AR_MAX_HEIGHT)) ++ (rect->top + rect->height > AR_MAX_HEIGHT_EMB)) + *rect = priv->rect; + + priv->rect.left = rect->left; +@@ -235,13 +238,13 @@ static int ar0233_get_selection(struct v4l2_subdev *sd, + sel->r.left = 0; + sel->r.top = 0; + sel->r.width = AR_MAX_WIDTH; +- sel->r.height = AR_MAX_HEIGHT; ++ sel->r.height = AR_MAX_HEIGHT_EMB; + return 0; + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; + sel->r.width = AR_MAX_WIDTH; +- sel->r.height = AR_MAX_HEIGHT; ++ sel->r.height = AR_MAX_HEIGHT_EMB; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; +@@ -413,7 +416,42 @@ static ssize_t ar0233_otp_id_show(struct device *dev, + priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + } + +-static DEVICE_ATTR(otp_id_ar0233, S_IRUGO, ar0233_otp_id_show, NULL); ++static ssize_t ar0233_emb_enable_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, size_t count) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0233_priv *priv = to_ar0233(client); ++ u32 val; ++ ++ if (sscanf(buf, "%u\n", &val) != 1) ++ return -EINVAL; ++ priv->emb_enable = !!val; ++ ++ switch (chipid) { ++ case AR0220_PID: ++ reg16_write16(client, 0x3064, priv->emb_enable ? 0x1982 : 0x1802); break; ++ case AR0233_PID: ++ reg16_write16(client, 0x3064, priv->emb_enable ? 0x0180 : 0); break; ++ default: ++ return -EINVAL; ++ } ++ ++ return count; ++} ++ ++static ssize_t ar0233_emb_enable_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0233_priv *priv = to_ar0233(client); ++ ++ return snprintf(buf, 4, "%d\n", priv->emb_enable); ++} ++ ++static DEVICE_ATTR(otp_id, S_IRUGO, ar0233_otp_id_show, NULL); ++static DEVICE_ATTR(emb_enable, S_IRUGO|S_IWUSR, ar0233_emb_enable_show, ar0233_emb_enable_store); + + static int ar0233_initialize(struct i2c_client *client) + { +@@ -454,7 +492,7 @@ static int ar0233_initialize(struct i2c_client *client) + + switch (pid) { + case AR0220_PID: +- chipid = ID_AR0220; ++ chipid = AR0220_PID; + strncpy(chip_name, "AR0220", 10); + AR_MAX_WIDTH = AR0220_MAX_WIDTH; + AR_MAX_HEIGHT = AR0220_MAX_HEIGHT; +@@ -490,7 +528,7 @@ static int ar0233_initialize(struct i2c_client *client) + } + break; + case AR0233_PID: +- chipid = ID_AR0233; ++ chipid = AR0233_PID; + strncpy(chip_name, "AR0233", 10); + AR_MAX_WIDTH = AR0233_MAX_WIDTH; + AR_MAX_HEIGHT = AR0233_MAX_HEIGHT; +@@ -662,8 +700,9 @@ static int ar0233_probe(struct i2c_client *client, + if (ret) + goto cleanup; + +- if (device_create_file(&client->dev, &dev_attr_otp_id_ar0233) != 0) { +- dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ if (device_create_file(&client->dev, &dev_attr_otp_id) != 0 || ++ device_create_file(&client->dev, &dev_attr_emb_enable) != 0) { ++ dev_err(&client->dev, "sysfs entry creation failed\n"); + goto cleanup; + } + +@@ -686,7 +725,8 @@ static int ar0233_remove(struct i2c_client *client) + { + struct ar0233_priv *priv = i2c_get_clientdata(client); + +- device_remove_file(&client->dev, &dev_attr_otp_id_ar0233); ++ device_remove_file(&client->dev, &dev_attr_otp_id); ++ device_remove_file(&client->dev, &dev_attr_emb_enable); + v4l2_async_unregister_subdev(&priv->sd); + media_entity_cleanup(&priv->sd.entity); + v4l2_ctrl_handler_free(&priv->hdl); +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev1.h b/drivers/media/i2c/soc_camera/ar0233_rev1.h +index 0389e51..3ff944f 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev1.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev1.h +@@ -1138,10 +1138,10 @@ static const struct ar0xxx_reg ar0233_rev1_MIPI_4Lane_12BITS[] = { + {0x31B8, 0x4047}, //mipi_timing_2 + {0x31BA, 0x105}, //mipi_timing_3 + {0x31BC, 0x704}, //mipi_timing_4 +-{0x3342, 0x122C}, // MIPI_F1_PDT_EDT +-{0x3346, 0x122C}, // MIPI_F2_PDT_EDT +-{0x334A, 0x122C}, // MIPI_F3_PDT_EDT +-{0x334E, 0x122C}, // MIPI_F4_PDT_EDT ++{0x3342, 0x2c2c}, // MIPI_F1_PDT_EDT ++{0x3346, 0x2c2c}, // MIPI_F2_PDT_EDT ++{0x334A, 0x2c2c}, // MIPI_F3_PDT_EDT ++{0x334E, 0x2c2c}, // MIPI_F4_PDT_EDT + { } + }; /* MIPI_4Lane_12BITS */ + +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev2.h b/drivers/media/i2c/soc_camera/ar0233_rev2.h +index 7f71056..80572ff 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev2.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev2.h +@@ -2341,10 +2341,10 @@ static const struct ar0xxx_reg ar0233_rev2_mipi_12bit_4lane[] = { + {0x31B8, 0xB04D}, //mipi_timing_2 + {0x31BA, 0x411}, //mipi_timing_3 + {0x31BC, 0x940E}, //mipi_timing_4 +-{0x3342, 0x122C}, // MIPI_F1_PDT_EDT +-{0x3346, 0x122C}, // MIPI_F2_PDT_EDT +-{0x334A, 0x122C}, // MIPI_F3_PDT_EDT +-{0x334E, 0x122C}, // MIPI_F4_PDT_EDT ++{0x3342, 0x2c2c}, // MIPI_F1_PDT_EDT ++{0x3346, 0x2c2c}, // MIPI_F2_PDT_EDT ++{0x334A, 0x2c2c}, // MIPI_F3_PDT_EDT ++{0x334E, 0x2c2c}, // MIPI_F4_PDT_EDT + { } + }; /* mipi_12bit_4lane */ + +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 876b3c1..4d5e084 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -79,10 +79,8 @@ static int ov106xx_probe(struct i2c_client *client, + } + + ret = ar0233_probe(client, did); +- if (!ret) { +- chip_id = ID_AR0233; ++ if (!ret) + goto out; +- } + + ret = ar0323_probe(client, did); + if (!ret) { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0449-media-i2c-soc_camera-ov495_ov2775-Remove-early_param.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0449-media-i2c-soc_camera-ov495_ov2775-Remove-early_param.patch new file mode 100644 index 00000000..0c4c5335 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0449-media-i2c-soc_camera-ov495_ov2775-Remove-early_param.patch @@ -0,0 +1,55 @@ +From 63e509e237f058679dd4a04012f53c8c56aaafb0 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Thu, 19 Dec 2019 15:08:14 +0300 +Subject: [PATCH] media: i2c: soc_camera: ov495_ov2775: Remove early_param + parser +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use conf_link variable instead of force_conf_link, +and remove eaarly_param() parser altogether. +This fixes the following module compilation error: + + expected declaration specifiers or ‘...’ before ‘ov495_force_conf_link’ + +Signed-off-by: Vladimir Barinov +Signed-off-by: Valentine Barshak +--- + drivers/media/i2c/soc_camera/ov495_ov2775.c | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov495_ov2775.c b/drivers/media/i2c/soc_camera/ov495_ov2775.c +index aee8145..c40970c 100644 +--- a/drivers/media/i2c/soc_camera/ov495_ov2775.c ++++ b/drivers/media/i2c/soc_camera/ov495_ov2775.c +@@ -57,17 +57,6 @@ struct ov495_priv { + + }; + +-static int force_conf_link; +- +-static __init int ov495_force_conf_link(char *str) +-{ +- /* force configuration link */ +- /* used only if robust firmware flashing required (f.e. recovery) */ +- force_conf_link = 1; +- return 0; +-} +-early_param("force_conf_link", ov495_force_conf_link); +- + static inline struct ov495_priv *to_ov495(const struct i2c_client *client) + { + return container_of(i2c_get_clientdata(client), struct ov495_priv, sd); +@@ -429,7 +418,7 @@ static int ov495_initialize(struct i2c_client *client) + client->addr = tmp_addr; + #endif + +- if (unlikely(force_conf_link)) ++ if (unlikely(conf_link)) + goto out; + + #if 0 +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0450-arm64-dts-renesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0450-arm64-dts-renesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch new file mode 100644 index 00000000..a272501d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0450-arm64-dts-renesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch @@ -0,0 +1,33 @@ +From c70a41608dfebff4bcc98c5e164dc0bd24ecd37a Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 20 Dec 2019 00:30:53 +0300 +Subject: [PATCH 1/2] arm64: dts: renesas: ulcb: Add "tee" MTD RPC HyperFlash + partition + +This reduces "bl31" partition size, and inserts "tee" partition. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/ulcb.dtsi | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi +index 924b7a0..4b22551 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi +@@ -447,7 +447,11 @@ + read-only; + }; + bl31@001C0000 { +- reg = <0x001C0000 0x480000>; ++ reg = <0x001C0000 0x040000>; ++ read-only; ++ }; ++ tee@00200000 { ++ reg = <0x00200000 0x440000>; + read-only; + }; + uboot@00640000 { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0451-arm64-dts-renesas-salvator-common-Add-tee-MTD-RPC-Hy.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0451-arm64-dts-renesas-salvator-common-Add-tee-MTD-RPC-Hy.patch new file mode 100644 index 00000000..bf122dd1 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0451-arm64-dts-renesas-salvator-common-Add-tee-MTD-RPC-Hy.patch @@ -0,0 +1,33 @@ +From e88ff4d294af995c671760e2a0741a646a52edca Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 20 Dec 2019 00:34:16 +0300 +Subject: [PATCH 2/2] arm64: dts: renesas: salvator-common: Add "tee" MTD RPC + HyperFlash partition + +This reduces "bl31" partition size, and inserts "tee" partition. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +index 6215545..5083d92 100644 +--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi ++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +@@ -848,7 +848,11 @@ + read-only; + }; + bl31@001C0000 { +- reg = <0x001C0000 0x480000>; ++ reg = <0x001C0000 0x040000>; ++ read-only; ++ }; ++ tee@00200000 { ++ reg = <0x00200000 0x440000>; + read-only; + }; + uboot@00640000 { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0452-arm64-dts-renesas-ulcb-Increase-U-Boot-partition-siz.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0452-arm64-dts-renesas-ulcb-Increase-U-Boot-partition-siz.patch new file mode 100644 index 00000000..0ff0f918 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0452-arm64-dts-renesas-ulcb-Increase-U-Boot-partition-siz.patch @@ -0,0 +1,54 @@ +From b45d7c8d45ca94b4e0ac2ad6df8b4f9b56cf3b38 Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 20 Dec 2019 14:09:00 +0300 +Subject: [PATCH 1/2] arm64: dts: renesas: ulcb: Increase U-Boot partition size + +Increase U-Boot partition size according to its actual size. +This involves moving the "u-boot-env", "kernel", "dtb" and +"user" partitions further by one sector which is safe +at this point because they are not used yet. U-Boot +environment is located on the eMMC flash. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/ulcb.dtsi | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi +index 4b22551..f33027c 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi +@@ -455,21 +455,21 @@ + read-only; + }; + uboot@00640000 { +- reg = <0x00640000 0x0C0000>; ++ reg = <0x00640000 0x100000>; + read-only; + }; +- uboot-env@00700000 { +- reg = <0x00700000 0x040000>; ++ uboot-env@00740000 { ++ reg = <0x00740000 0x040000>; + read-only; + }; +- dtb@00740000 { +- reg = <0x00740000 0x080000>; ++ dtb@00780000 { ++ reg = <0x00780000 0x080000>; + }; +- kernel@007C0000 { +- reg = <0x007C0000 0x1400000>; ++ kernel@00800000 { ++ reg = <0x00800000 0x1400000>; + }; +- user@01BC0000 { +- reg = <0x01BC0000 0x2440000>; ++ user@01C00000 { ++ reg = <0x01C00000 0x2400000>; + }; + }; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0453-arm64-dts-renesas-salvator-common-Increase-U-Boot-pa.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0453-arm64-dts-renesas-salvator-common-Increase-U-Boot-pa.patch new file mode 100644 index 00000000..bfed8a06 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0453-arm64-dts-renesas-salvator-common-Increase-U-Boot-pa.patch @@ -0,0 +1,55 @@ +From 4bba9d3777068ee97982c4b6c60a5eb29d06baab Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Fri, 20 Dec 2019 14:05:20 +0300 +Subject: [PATCH 2/2] arm64: dts: renesas: salvator-common: Increase U-Boot + partition size + +Increase U-Boot partition size according to its actual size. +This involves moving the "u-boot-env", "kernel", "dtb" and +"user" partitions further by one sector which is safe +at this point because they are not used yet. U-Boot +environment is located on the eMMC flash. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/salvator-common.dtsi | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +index 5083d92..6bc9c6e 100644 +--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi ++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +@@ -856,21 +856,21 @@ + read-only; + }; + uboot@00640000 { +- reg = <0x00640000 0x0C0000>; ++ reg = <0x00640000 0x100000>; + read-only; + }; +- uboot-env@00700000 { +- reg = <0x00700000 0x040000>; ++ uboot-env@00740000 { ++ reg = <0x00740000 0x040000>; + read-only; + }; +- dtb@00740000 { +- reg = <0x00740000 0x080000>; ++ dtb@00780000 { ++ reg = <0x00780000 0x080000>; + }; +- kernel@007C0000 { +- reg = <0x007C0000 0x1400000>; ++ kernel@00800000 { ++ reg = <0x00800000 0x1400000>; + }; +- user@01BC0000 { +- reg = <0x01BC0000 0x2440000>; ++ user@01C00000 { ++ reg = <0x01C00000 0x2400000>; + }; + }; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0454-media-i2c-imx390-fix-refclk.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0454-media-i2c-imx390-fix-refclk.patch new file mode 100644 index 00000000..af31b486 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0454-media-i2c-imx390-fix-refclk.patch @@ -0,0 +1,47 @@ +From 602dbaa9bc1794fe50d522dbef5a2ffde9eea202 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Dec 2019 17:02:13 +0300 +Subject: [PATCH] media: i2c: imx390: fix refclk + +The rflck for IMX390 must be ether 24MHz or 27Mhz +The deserializer on Cogent ECU provides 23Mhz, hence use +serizlizer PLL to adjust refclk to 24MHz + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imx390.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imx390.c b/drivers/media/i2c/soc_camera/imx390.c +index b1df1ba..c1e5680 100644 +--- a/drivers/media/i2c/soc_camera/imx390.c ++++ b/drivers/media/i2c/soc_camera/imx390.c +@@ -428,17 +428,18 @@ static int imx390_initialize(struct i2c_client *client) + goto err; + } + +-#if 0 +- /* setup XCLK */ + tmp_addr = client->addr; + if (priv->ti9x4_addr) { +- /* CLK_OUT=22.5792*160*M/N/CLKDIV -> CLK_OUT=25MHz: CLKDIV=4, M=7, N=253: 22.5792*160/4*7/253=24.989MHz=CLK_OUT */ +- client->addr = priv->ti9x3_addr; /* Serializer I2C address */ +- reg8_write(client, 0x06, 0x47); /* Set CLKDIV and M */ +- reg8_write(client, 0x07, 0xfd); /* Set N */ ++ /* Setup XCLK: ++ CLK_OUT=23MHz*160*M/N/CLKDIV ++ CLK_OUT=24MHz (desired), CLKDIV=4, M=6, N=230 ++ 23*160/4*6/230 = 24MHz = CLK_OUT ++ */ ++ client->addr = priv->ti9x3_addr; ++ reg8_write(client, 0x06, 0x46); /* Set CLKDIV and M */ ++ reg8_write(client, 0x07, 0xe6); /* Set N */ + } + client->addr = tmp_addr; +-#endif + + /* Read OTP IDs */ + imx390_otp_id_read(client); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0455-media-i2c-ox01d10-add-imager-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0455-media-i2c-ox01d10-add-imager-support.patch new file mode 100644 index 00000000..3551d572 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0455-media-i2c-ox01d10-add-imager-support.patch @@ -0,0 +1,1162 @@ +From fc00b90bd8aa659028e73364f6bef6789da95cc6 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Dec 2019 21:03:24 +0300 +Subject: [PATCH] media: i2c: ox01d10: add imager support + +This adds OVT OX01D10 imager support + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov106xx.c | 8 + + drivers/media/i2c/soc_camera/ox01d10.c | 611 +++++++++++++++++++++++++++++++++ + drivers/media/i2c/soc_camera/ox01d10.h | 487 ++++++++++++++++++++++++++ + 3 files changed, 1106 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/ox01d10.c + create mode 100644 drivers/media/i2c/soc_camera/ox01d10.h + +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 4d5e084..841861c 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -27,6 +27,7 @@ static enum { + ID_GW5200_IMX390, + ID_OV2775, + ID_IMX390, ++ ID_OX01D10, + ID_OX03A, + ID_ISX016, + ID_ISX019, +@@ -48,6 +49,7 @@ static enum { + #include "gw5200_imx390.c" + #include "ov2775.c" + #include "imx390.c" ++#include "ox01d10.c" + #include "ox03a.c" + #include "isx016.c" + #include "isx019.c" +@@ -172,6 +174,12 @@ static int ov106xx_probe(struct i2c_client *client, + goto out; + } + ++ ret = ox01d10_probe(client, did); ++ if (!ret) { ++ chip_id = ID_OX01D10; ++ goto out; ++ } ++ + ret = ox03a_probe(client, did); + if (!ret) { + chip_id = ID_OX03A; +diff --git a/drivers/media/i2c/soc_camera/ox01d10.c b/drivers/media/i2c/soc_camera/ox01d10.c +new file mode 100644 +index 0000000..3ea3fef +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ox01d10.c +@@ -0,0 +1,611 @@ ++/* ++ * OmniVision OX01D10 sensor camera driver ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "ox01d10.h" ++ ++#define OX01D10_I2C_ADDR 0x36 ++ ++#define OX01D10_PID_REGA 0x300A ++#define OX01D10_PID_REGB 0x300B ++#define OX01D10_PID 0x5801 ++ ++#define OX01D10_MEDIA_BUS_FMT MEDIA_BUS_FMT_SBGGR12_1X12 ++ ++struct ox01d10_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int init_complete; ++ u8 id[6]; ++ int exposure; ++ int gain; ++ int again; ++ int autogain; ++ /* serializers */ ++ int ti9x4_addr; ++ int ti9x3_addr; ++ int port; ++ int gpio_resetb; ++ int gpio_fsin; ++}; ++ ++static inline struct ox01d10_priv *to_ox01d10(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ox01d10_priv, sd); ++} ++ ++static int ox01d10_set_regs(struct i2c_client *client, ++ const struct ox01d10_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == OX01D10_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ reg16_write(client, regs[i].reg, regs[i].val); ++ } ++ ++ return 0; ++} ++ ++static int ox01d10_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ox01d10_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = OX01D10_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ox01d10_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = OX01D10_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ox01d10_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = OX01D10_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int ox01d10_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = OX01D10_PID >> 8; ++ edid->edid[9] = OX01D10_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ox01d10_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > OX01D10_MAX_WIDTH) || ++ (rect->top + rect->height > OX01D10_MAX_HEIGHT)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int ox01d10_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OX01D10_MAX_WIDTH; ++ sel->r.height = OX01D10_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OX01D10_MAX_WIDTH; ++ sel->r.height = OX01D10_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ox01d10_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ox01d10_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ u8 val = 0; ++ ++ ret = reg16_read(client, (u16)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u8); ++ ++ return 0; ++} ++ ++static int ox01d10_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ ++ return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ox01d10_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ox01d10_g_register, ++ .s_register = ox01d10_s_register, ++#endif ++}; ++ ++static int ox01d10_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ int ret = -EINVAL; ++ u8 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ break; ++ case V4L2_CID_GAIN: ++ /* start recording group3 */ ++ ret = reg16_write(client, 0x3208, 0x03); ++ /* HCG digital gain */ ++ ret |= reg16_write(client, 0x350a, ctrl->val >> 8); ++ ret |= reg16_write(client, 0x350b, ctrl->val & 0xff); ++ /* LCG digital gain */ ++ ret |= reg16_write(client, 0x354a, ctrl->val/8 >> 8); ++ ret |= reg16_write(client, 0x354b, ctrl->val/8 & 0xff); ++ /* VS digital gain */ ++ ret |= reg16_write(client, 0x358a, ctrl->val/64 >> 8); ++ ret |= reg16_write(client, 0x358b, ctrl->val/64 & 0xff); ++ /* stop recording and launch group3 */ ++ ret |= reg16_write(client, 0x3208, 0x13); ++ ret |= reg16_write(client, 0x3208, 0xe3); ++ break; ++ case V4L2_CID_ANALOGUE_GAIN: ++ /* start recording group3 */ ++ ret = reg16_write(client, 0x3208, 0x03); ++ /* HCG real gain */ ++ ret |= reg16_write(client, 0x3508, ctrl->val >> 8); ++ ret |= reg16_write(client, 0x3509, ctrl->val & 0xff); ++ /* LCG real gain */ ++ ret |= reg16_write(client, 0x3548, ctrl->val/8 >> 8); ++ ret |= reg16_write(client, 0x3549, ctrl->val/8 & 0xff); ++ /* VS real gain */ ++ ret |= reg16_write(client, 0x3588, ctrl->val/64 >> 8); ++ ret |= reg16_write(client, 0x3589, ctrl->val/64 & 0xff); ++ /* stop recording and launch group3 */ ++ ret |= reg16_write(client, 0x3208, 0x13); ++ ret |= reg16_write(client, 0x3208, 0xe3); ++ break; ++ case V4L2_CID_EXPOSURE: ++ /* start recording group3 */ ++ ret = reg16_write(client, 0x3208, 0x03); ++ /* HCG (long) exposure time */ ++ ret |= reg16_write(client, 0x3501, ctrl->val >> 8); ++ ret |= reg16_write(client, 0x3502, ctrl->val & 0xff); ++ /* LCG (short) exposure time */ ++ ret |= reg16_write(client, 0x3541, ctrl->val/4 >> 8); ++ ret |= reg16_write(client, 0x3542, ctrl->val/4 & 0xff); ++ /* VS exposure time */ ++ ret |= reg16_write(client, 0x3581, ctrl->val/16 >> 8); ++ ret |= reg16_write(client, 0x3582, ctrl->val/16 & 0xff); ++ /* stop recording and launch group3 */ ++ ret |= reg16_write(client, 0x3208, 0x13); ++ ret |= reg16_write(client, 0x3208, 0xe3); ++ break; ++ case V4L2_CID_HFLIP: ++ /* start recording group3 */ ++ ret = reg16_write(client, 0x3208, 0x03); ++ ret = reg16_read(client, 0x3821, &val); ++ if (ctrl->val) ++ val |= 0x04; ++ else ++ val &= ~0x04; ++ ret |= reg16_write(client, 0x3821, val); ++ /* hflip channges CFA, hence compensate it by moving crop window over bayer matrix */ ++ ret |= reg16_read(client, 0x3811, &val); ++ if (ctrl->val) ++ val++; ++ else ++ val--; ++ ret |= reg16_write(client, 0x3811, val); ++ /* stop recording and launch group3 */ ++ ret |= reg16_write(client, 0x3208, 0x13); ++ ret |= reg16_write(client, 0x3208, 0xe3); ++ break; ++ case V4L2_CID_VFLIP: ++ ret = reg16_read(client, 0x3820, &val); ++ if (ctrl->val) ++ val |= 0x44; ++ else ++ val &= ~0x44; ++ ret |= reg16_write(client, 0x3820, val); ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ox01d10_ctrl_ops = { ++ .s_ctrl = ox01d10_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ox01d10_video_ops = { ++ .s_stream = ox01d10_s_stream, ++ .g_mbus_config = ox01d10_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ox01d10_subdev_pad_ops = { ++ .get_edid = ox01d10_get_edid, ++ .enum_mbus_code = ox01d10_enum_mbus_code, ++ .get_selection = ox01d10_get_selection, ++ .set_selection = ox01d10_set_selection, ++ .get_fmt = ox01d10_get_fmt, ++ .set_fmt = ox01d10_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ox01d10_subdev_ops = { ++ .core = &ox01d10_core_ops, ++ .video = &ox01d10_video_ops, ++ .pad = &ox01d10_subdev_pad_ops, ++}; ++ ++static void ox01d10_otp_id_read(struct i2c_client *client) ++{ ++} ++ ++static ssize_t ox01d10_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ox01d10, S_IRUGO, ox01d10_otp_id_show, NULL); ++ ++static int ox01d10_initialize(struct i2c_client *client) ++{ ++ struct ox01d10_priv *priv = to_ox01d10(client); ++ char chip_name[10] = "unknown"; ++ u8 val = 0; ++ u16 pid; ++ int ret = 0; ++ int tmp_addr = 0; ++ ++ /* check and show model ID */ ++ reg16_read(client, OX01D10_PID_REGA, &val); ++ pid = val; ++ reg16_read(client, OX01D10_PID_REGB, &val); ++ pid = (pid << 8) | val; ++ ++ if (pid != OX01D10_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ ret = -ENODEV; ++ goto err; ++ } ++ ++ tmp_addr = client->addr; ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x3_addr; ++ reg8_write(client, 0x02, 0x13); /* MIPI 2-lanes */ ++ ++ /* Setup XCLK: CLK_OUT=23MHz*160*M/N/CLKDIV, CLK_OUT=24MHz (desired), CLKDIV=4, M=6, N=230, 23*160/4*6/230 = 24MHz = CLK_OUT */ ++ reg8_write(client, 0x06, 0x46); /* Set CLKDIV and M */ ++ reg8_write(client, 0x07, 0xe6); /* Set N */ ++ } ++ client->addr = tmp_addr; ++ ++ /* Program wizard registers */ ++ ox01d10_set_regs(client, ox01d10_regs_wizard_r1b_hdr3, ARRAY_SIZE(ox01d10_regs_wizard_r1b_hdr3)); ++ /* Read OTP IDs */ ++ ox01d10_otp_id_read(client); ++ ++ dev_info(&client->dev, "ox01d10 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, OX01D10_MAX_WIDTH, OX01D10_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++err: ++ return ret; ++} ++ ++static int ox01d10_parse_dt(struct device_node *np, struct ox01d10_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ int i; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ int tmp_addr = 0; ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ if (!of_property_read_u32(rendpoint, "ti9x3-addr", &priv->ti9x3_addr) && ++ !of_property_match_string(rendpoint->parent->parent, "compatible", "ti,ti9x4") && ++ !of_property_read_u32(rendpoint->parent->parent, "reg", &priv->ti9x4_addr) && ++ !kstrtouint(strrchr(rendpoint->full_name, '@') + 1, 0, &priv->port)) ++ break; ++ } ++ ++ of_node_put(endpoint); ++ ++ if (!priv->ti9x4_addr) { ++ dev_err(&client->dev, "deserializer does not present\n"); ++ return -EINVAL; ++ } ++ ++ /* setup I2C translator address */ ++ tmp_addr = client->addr; ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ ++ reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ ++ reg8_write(client, 0x5d, OX01D10_I2C_ADDR << 1); /* Sensor native I2C address */ ++ } ++ client->addr = tmp_addr; ++ ++ mdelay(10); ++ ++ return 0; ++} ++ ++static int ox01d10_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ox01d10_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ox01d10_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ priv->exposure = 0x200; ++ priv->gain = 0x200; ++ priv->again = 0x200; ++ priv->autogain = 1; ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_GAIN, 1, 0xfff, 1, priv->gain); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 1, 0xfff, 1, priv->again); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_EXPOSURE, 1, 0xffff, 1, priv->exposure); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ox01d10_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 1); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ox01d10_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ox01d10_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = OX01D10_MAX_WIDTH; ++ priv->rect.height = OX01D10_MAX_HEIGHT; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ox01d10) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++#ifdef CONFIG_SOC_CAMERA_OX01D10 ++ v4l_err(client, "failed to probe @ 0x%02x (%s)\n", ++ client->addr, client->adapter->name); ++#endif ++ return ret; ++} ++ ++static int ox01d10_remove(struct i2c_client *client) ++{ ++ struct ox01d10_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ox01d10); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_SOC_CAMERA_OX01D10 ++static const struct i2c_device_id ox01d10_id[] = { ++ { "ox01d10", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ox01d10_id); ++ ++static const struct of_device_id ox01d10_of_ids[] = { ++ { .compatible = "ovti,ox01d10", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ox01d10_of_ids); ++ ++static struct i2c_driver ox01d10_i2c_driver = { ++ .driver = { ++ .name = "ox01d10", ++ .of_match_table = ox01d10_of_ids, ++ }, ++ .probe = ox01d10_probe, ++ .remove = ox01d10_remove, ++ .id_table = ox01d10_id, ++}; ++ ++module_i2c_driver(ox01d10_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for OX01D10"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); ++#endif +diff --git a/drivers/media/i2c/soc_camera/ox01d10.h b/drivers/media/i2c/soc_camera/ox01d10.h +new file mode 100644 +index 0000000..fd50e55 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ox01d10.h +@@ -0,0 +1,487 @@ ++/* ++ * OmniVision OX01D10 sensor camera wizard 1336x1036@30/RGGB/MIPI ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define OX01D10_DISPLAY_PATTERN_COLOR_BAR ++ ++#define OX01D10_MAX_WIDTH 1280 ++#define OX01D10_MAX_HEIGHT 960 ++ ++#define OX01D10_SENSOR_WIDTH 1336 ++#define OX01D10_SENSOR_HEIGHT 1036 ++ ++#define OX01D10_X_START ((OX01D10_SENSOR_WIDTH - OX01D10_MAX_WIDTH) / 2) ++#define OX01D10_Y_START ((OX01D10_SENSOR_HEIGHT - OX01D10_MAX_HEIGHT) / 2) ++#define OX01D10_X_END (OX01D10_X_START + OX01D10_MAX_WIDTH - 1) ++#define OX01D10_Y_END (OX01D10_Y_START + OX01D10_MAX_HEIGHT - 1) ++ ++#define OX01D10_DELAY 0xffff ++ ++struct ox01d10_reg { ++ u16 reg; ++ u8 val; ++}; ++ ++/* wizard: MIPI 1280x960 HDR3_COMB RAW 30fps A02 */ ++static const struct ox01d10_reg ox01d10_regs_wizard_r1b_hdr3[] = { ++{0x107, 0x01}, // s/w reset ++{OX01D10_DELAY, 100}, // Wait 10ms ++{0x3002, 0x00}, ++{0x3009, 0x26}, ++{0x3012, 0x21}, // MIPI, 2 lanes ++{0x3016, 0xd0}, ++{0x3018, 0x50}, ++{0x301a, 0xb0}, ++{0x301e, 0x30}, ++{0x301f, 0x61}, ++{0x3020, 0x01}, ++{0x3022, 0x88}, ++{0x3023, 0x80}, ++{0x3024, 0x80}, ++{0x3028, 0x10}, ++{0x3600, 0x02}, ++{0x3602, 0x42}, ++{0x3603, 0x13}, ++{0x3604, 0xb3}, ++{0x3605, 0xff}, ++{0x3606, 0x90}, ++{0x3607, 0x59}, ++{0x360d, 0x88}, ++{0x3611, 0x49}, ++{0x3612, 0x49}, ++{0x3613, 0xbe}, ++{0x3614, 0xa9}, ++{0x3615, 0x89}, ++{0x3619, 0x00}, ++{0x3620, 0x60}, ++{0x362a, 0x18}, ++{0x362b, 0x18}, ++{0x362c, 0x18}, ++{0x362d, 0x18}, ++{0x3643, 0x12}, ++{0x3644, 0x00}, ++{0x3645, 0x17}, ++{0x3646, 0x1c}, ++{0x3647, 0x12}, ++{0x3648, 0x00}, ++{0x3649, 0x17}, ++{0x364a, 0x1c}, ++{0x364c, 0x18}, ++{0x364d, 0x18}, ++{0x364e, 0x18}, ++{0x364f, 0x18}, ++{0x3652, 0xca}, ++{0x3660, 0x43}, ++{0x3661, 0x31}, ++{0x3662, 0x00}, ++{0x3663, 0x00}, ++{0x3665, 0x13}, ++{0x3668, 0x80}, ++{0x366f, 0x00}, ++{0x3671, 0xe7}, ++{0x3674, 0x80}, ++{0x3678, 0x00}, ++{0x303, 0x02}, ++{0x305, 0x50}, ++{0x306, 0x03}, ++{0x307, 0x00}, ++{0x308, 0x07}, ++{0x30a, 0x01}, ++{0x316, 0x00}, ++{0x317, 0x41}, ++{0x323, 0x04}, ++{0x325, 0x50}, ++{0x326, 0x00}, ++{0x327, 0x03}, ++{0x328, 0x07}, ++{0x329, 0x00}, ++{0x32a, 0x00}, ++{0x32b, 0x00}, ++{0x32c, 0x02}, ++{0x3106, 0x10}, ++{0x3d8a, 0x03}, ++{0x3d8b, 0xff}, ++{0x4580, 0xf8}, ++{0x4581, 0xc7}, ++{0x458f, 0x00}, ++{0x4590, 0x20}, ++{0x4d0a, 0x68}, ++{0x4d0b, 0x78}, ++{0x4d0c, 0xa6}, ++{0x4d0d, 0x0c}, ++{0x4f00, 0xfa}, ++{0x4f01, 0x3f}, ++{0x3501, 0x00}, ++{0x3502, 0x18}, ++{0x3504, 0x28}, ++{0x3508, 0x01}, ++{0x3509, 0x00}, ++{0x350a, 0x01}, ++{0x350b, 0x00}, ++{0x350c, 0x00}, ++{0x3541, 0x00}, ++{0x3542, 0x14}, ++{0x3544, 0x28}, ++{0x3548, 0x01}, ++{0x3549, 0x00}, ++{0x354a, 0x01}, ++{0x354b, 0x00}, ++{0x354c, 0x00}, ++{0x3581, 0x00}, ++{0x3582, 0x10}, ++{0x3584, 0x28}, ++{0x3586, 0x01}, ++{0x3587, 0x69}, ++{0x3588, 0x01}, ++{0x3589, 0x00}, ++{0x358a, 0x01}, ++{0x358b, 0x00}, ++{0x358c, 0x00}, ++{0x358d, 0x0c}, ++{0x3700, 0x16}, ++{0x3701, 0x2c}, ++{0x3703, 0x19}, ++{0x3705, 0x00}, ++{0x3706, 0x35}, ++{0x3707, 0x16}, ++{0x3709, 0x29}, ++{0x370a, 0x00}, ++{0x370b, 0x85}, ++{0x370d, 0x08}, ++{0x3717, 0x03}, ++{0x3718, 0x08}, ++{0x371a, 0x04}, ++{0x371b, 0x14}, ++{0x371d, 0x00}, ++{0x3720, 0x03}, ++{0x372c, 0x10}, ++{0x372d, 0x04}, ++{0x3738, 0x4f}, ++{0x3739, 0x4f}, ++{0x373a, 0x2b}, ++{0x373b, 0x24}, ++{0x373f, 0x49}, ++{0x3740, 0x49}, ++{0x3741, 0x25}, ++{0x3742, 0x20}, ++{0x3747, 0x16}, ++{0x3748, 0x16}, ++{0x374b, 0x03}, ++{0x374c, 0x14}, ++{0x3752, 0x03}, ++{0x3756, 0x10}, ++{0x3757, 0x2e}, ++{0x3758, 0x00}, ++{0x3759, 0x35}, ++{0x375a, 0x00}, ++{0x375b, 0x85}, ++{0x375e, 0x12}, ++{0x3760, 0x09}, ++{0x376c, 0x01}, ++{0x376d, 0x08}, ++{0x376e, 0x08}, ++{0x376f, 0x08}, ++{0x3771, 0x08}, ++{0x3773, 0x00}, ++{0x3777, 0x00}, ++{0x3779, 0x02}, ++{0x377a, 0x00}, ++{0x377b, 0x00}, ++{0x377c, 0xc8}, ++{0x3785, 0x08}, ++{0x3790, 0x10}, ++{0x3797, 0x00}, ++{0x3798, 0x00}, ++{0x3799, 0x00}, ++{0x379c, 0x01}, ++{0x379d, 0x00}, ++{0x37a2, 0x02}, ++{0x37a3, 0x02}, ++{0x37a4, 0x02}, ++{0x37a5, 0x09}, ++{0x37a6, 0x09}, ++{0x37a7, 0x09}, ++{0x37a8, 0x03}, ++{0x37a9, 0x03}, ++{0x37ab, 0x03}, ++{0x37ad, 0x05}, ++{0x37ae, 0x05}, ++{0x37b0, 0x05}, ++{0x37b2, 0x04}, ++{0x37b3, 0x04}, ++{0x37b4, 0x04}, ++{0x37b5, 0x03}, ++{0x37b6, 0x03}, ++{0x37b7, 0x03}, ++{0x37bd, 0x01}, ++{0x37be, 0x36}, ++{0x37c0, 0xd0}, ++{0x37c4, 0x57}, ++{0x37c5, 0x57}, ++{0x37c6, 0x33}, ++{0x37c7, 0x29}, ++{0x37ce, 0x01}, ++{0x37d0, 0x00}, ++{0x37d1, 0x35}, ++{0x37d2, 0x00}, ++{0x37d3, 0x85}, ++{0x37d4, 0x00}, ++{0x37d5, 0x35}, ++{0x37d6, 0x00}, ++{0x37d7, 0x85}, ++{0x37d8, 0x01}, ++{0x37da, 0x02}, ++{0x37db, 0x00}, ++{0x37dc, 0x4c}, ++{0x3c00, 0x04}, ++{0x3c0b, 0x26}, ++{0x3c12, 0x88}, ++{0x3c1f, 0x12}, ++{0x3c20, 0x04}, ++{0x3c24, 0x0f}, ++{0x3c25, 0x14}, ++{0x3c26, 0x07}, ++{0x3c27, 0x10}, ++{0x3c28, 0x06}, ++{0x3c29, 0x0b}, ++{0x3c2b, 0x09}, ++{0x3c2c, 0x0e}, ++{0x3c2d, 0x07}, ++{0x3c2e, 0x0a}, ++{0x3c2f, 0x05}, ++{0x3c30, 0x0c}, ++{0x3c31, 0x08}, ++{0x3c32, 0x0f}, ++{0x3c33, 0x0a}, ++{0x3c34, 0x0d}, ++{0x3c3c, 0x00}, ++{0x3c3d, 0x0b}, ++{0x3c53, 0xe8}, ++{0x3c55, 0x28}, ++{0x3c5b, 0x20}, ++{0x3ce0, 0x02}, ++{0x3ce1, 0x3a}, ++{0x3ce2, 0x00}, ++{0x3ce3, 0x03}, ++/* window start */ ++{0x3800, 0x00}, ++{0x3801, 0x14}, ++{0x3802, 0x00}, ++{0x3803, 0x22}, ++{0x3804, 0x05}, ++{0x3805, 0x23}, ++{0x3806, 0x03}, ++{0x3807, 0xf1}, ++{0x3808, OX01D10_MAX_WIDTH >> 8}, //0x508=1288 ++{0x3809, OX01D10_MAX_WIDTH & 0xff}, ++{0x380a, OX01D10_MAX_HEIGHT >> 8}, //0x3c8=968 ++{0x380b, OX01D10_MAX_HEIGHT & 0xff}, ++{0x380c, 0x06}, ++{0x380d, 0xa0}, ++{0x380e, 0x03}, // VTS=0x3f2 ++{0x380f, 0xf2}, // VTS ++{0x3810, 0x00}, ++{0x3811, 0x04}, ++{0x3812, 0x00}, ++{0x3813, 0x04}, ++/* window end */ ++{0x381c, 0x08}, ++{0x3820, 0x44}, /* VPLIP on */ ++{0x3821, 0x00}, /* HFLIP off */ ++{0x3832, 0x00}, ++{0x3834, 0x00}, ++{0x383c, 0x48}, ++{0x383d, 0x20}, ++{0x384c, 0x03}, ++{0x384d, 0x88}, ++{0x3850, 0x00}, ++{0x3851, 0x42}, ++{0x3852, 0x00}, ++{0x3853, 0x40}, ++{0x3856, 0x04}, ++{0x3857, 0x6b}, ++{0x3858, 0x04}, ++{0x385b, 0x04}, ++{0x385c, 0x6a}, ++{0x3861, 0x00}, ++{0x3862, 0x40}, ++{0x388c, 0x03}, ++{0x388d, 0x5c}, ++{0x4502, 0x00}, ++{0x4504, 0x01}, ++{0x4507, 0x10}, ++{0x450b, 0x14}, ++{0x450c, 0x04}, ++{0x3b84, 0x45}, ++{0x3b85, 0x00}, ++{0x3409, 0x02}, ++{0x3304, 0x04}, ++{0x3306, 0x03}, ++{0x3307, 0x00}, ++{0x3308, 0x00}, ++{0x3309, 0x00}, ++{0x330a, 0x00}, ++{0x330b, 0x00}, ++{0x330c, 0x00}, ++{0x330d, 0x00}, ++{0x330e, 0x00}, ++{0x330f, 0x00}, ++{0x3310, 0x06}, ++{0x3311, 0x05}, ++{0x3312, 0x55}, ++{0x3313, 0x02}, ++{0x3314, 0xaa}, ++{0x3315, 0x07}, ++{0x3316, 0xf0}, ++{0x3317, 0x00}, ++{0x4001, 0x2b}, ++{0x4004, 0x00}, ++{0x4005, 0x40}, ++{0x4008, 0x02}, ++{0x4009, 0x09}, ++{0x400a, 0x02}, ++{0x400b, 0x00}, ++{0x4020, 0x00}, ++{0x4021, 0x00}, ++{0x4022, 0x00}, ++{0x4023, 0x00}, ++{0x402e, 0x00}, ++{0x402f, 0x40}, ++{0x4030, 0x00}, ++{0x4031, 0x40}, ++{0x405c, 0x20}, ++{0x5000, 0x3d}, ++{0x5001, 0x05}, ++{0x5030, 0x00}, ++{0x5038, 0x10}, ++{0x5039, 0x04}, ++{0x503a, 0x04}, ++#ifdef OX01D10_DISPLAY_PATTERN_COLOR_BAR ++{0x5080, 0xc0}, /* Rolling test pattern for HCG */ ++{0x5083, 0x0f}, ++{0x50c0, 0xc0}, /* Rolling test pattern for LCG */ ++{0x50c3, 0x0f}, ++{0x5100, 0xc0}, /* Rolling test pattern for VS */ ++#else ++{0x5080, 0x00}, ++{0x5083, 0x0f}, ++{0x50c0, 0x00}, ++{0x50c3, 0x0f}, ++{0x5100, 0x00}, ++#endif ++{0x5103, 0x0f}, ++{0x5140, 0x10}, ++{0x5142, 0x10}, ++{0x5144, 0x10}, ++{0x5146, 0x10}, ++{0x5147, 0x08}, ++{0x5148, 0x08}, ++{0x5149, 0x08}, ++{0x514a, 0x08}, ++{0x514b, 0x10}, ++{0x514c, 0x10}, ++{0x514d, 0x08}, ++{0x514e, 0x00}, ++{0x5150, 0x08}, ++{0x5154, 0x00}, ++{0x5157, 0x10}, ++{0x5159, 0x08}, ++{0x515b, 0x08}, ++{0x515d, 0x10}, ++{0x5160, 0x10}, ++{0x5162, 0x10}, ++{0x5163, 0x10}, ++{0x5164, 0xaa}, ++{0x5165, 0xaa}, ++{0x5166, 0xaa}, ++{0x5167, 0xaa}, ++{0x5169, 0xaa}, ++{0x516c, 0x99}, ++{0x516d, 0xaa}, ++{0x516e, 0xaa}, ++{0x5174, 0x99}, ++{0x5176, 0x99}, ++{0x5179, 0xaa}, ++{0x517a, 0xaa}, ++{0x517d, 0x88}, ++{0x517e, 0x40}, ++{0x517f, 0x20}, ++{0x5182, 0x00}, ++{0x5183, 0xee}, ++{0x5184, 0x01}, ++{0x5185, 0x3d}, ++{0x5186, 0x01}, ++{0x5188, 0x00}, ++{0x5189, 0xd3}, ++{0x5220, 0x4b}, ++{0x5240, 0x4b}, ++{0x5260, 0x4b}, ++{0x5280, 0x00}, ++{0x5281, 0x5e}, ++{0x5282, 0x01}, ++{0x5283, 0xfd}, ++{0x5285, 0x01}, ++{0x5422, 0x10}, ++{0x54a2, 0x10}, ++{0x5522, 0x10}, ++{0x559e, 0x03}, ++{0x559f, 0x00}, ++{0x55a0, 0x40}, ++{0x6008, 0xcf}, ++{0x6009, 0x00}, ++{0x4903, 0x80}, ++{0x4601, 0x30}, ++{0x4602, 0x02}, ++{0x4603, 0x01}, ++{0x4605, 0x03}, ++{0x460a, 0x36}, ++{0x460c, 0x60}, ++{0x4800, 0x04}, ++{0x480e, 0x04}, ++{0x4813, 0x12}, // VC ++{0x481b, 0x50}, ++{0x481f, 0x30}, ++{0x482b, 0x04}, ++{0x482e, 0x34}, ++{0x4837, 0x10}, ++{0x484b, 0x27}, ++{0x4880, 0x00}, ++{0x4881, 0x00}, ++{0x4885, 0x03}, ++{0x4886, 0x00}, ++{0x4708, 0x00}, ++{0x470b, 0x0f}, ++{0x380e, 0x04}, // VTS=0x400 ++{0x380f, 0x00}, // ++/* patch start */ ++//{0x3208, 0x03}, // start recording group3 ++{0x3501, 0x02}, // HCG exposure integration time MSB ++{0x3502, 0x00}, // HCG exposure integration time LSB ++{0x3541, 0x00}, // LCG exposure integration time MSB ++{0x3542, 0x40}, // LCG exposure integration time LSB ++{0x3581, 0x00}, // VS exposure integration time MSB ++{0x3582, 0x08}, // VS exposure integration time LSB ++{0x3508, 0x02}, // HCG real gain MSB ++{0x3509, 0x00}, // HCG real gain LSB ++{0x350a, 0x02}, // HCG digital gain MSB ++{0x350b, 0x00}, // HCG digital gain LSB ++{0x3548, 0x00}, // LCG real gain MSB ++{0x3549, 0x40}, // LCG real gain LSB ++{0x354a, 0x00}, // LCG digital gain MSB ++{0x354b, 0x40}, // LCG digital gain LSB ++{0x3588, 0x00}, // VS real gain MSB ++{0x3589, 0x08}, // VS real gain LSB ++{0x358a, 0x00}, // VS digital gain ++{0x358b, 0x08}, // VS digital gain ++//{0x3208, 0x13}, // stop recording group3 ++//{0x3208, 0xe3}, // launch group3 ++/* patch2 end */ ++{0x100, 0x01}, ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0456-media-i2c-max9286-fix-resetb-handling.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0456-media-i2c-max9286-fix-resetb-handling.patch new file mode 100644 index 00000000..2cffe362 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0456-media-i2c-max9286-fix-resetb-handling.patch @@ -0,0 +1,36 @@ +From f3e07cec62fb10d0c09d4bb96309ebe01a8f3fae Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 26 Dec 2019 15:26:45 +0300 +Subject: [PATCH] media: i2c: max9286: fix resetb handling + +This fixed the RESETB handling for other then GPIOn=1 pins + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/max9286.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index b185566..f6c6b0a 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -232,10 +232,12 @@ static void max9286_sensor_reset(struct i2c_client *client, int addr, int reset_ + if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) + return; + +- /* sensor reset/unreset */ +- client->addr = addr; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | /* set GPIOn value to reset/unreset */ +- ((priv->active_low_resetb ? BIT(priv->gpio_resetb) : 0) ^ reset_on)); ++ if (priv->active_low_resetb) ++ reset_on = !reset_on; ++ ++ /* sensor reset/unreset using serializer gpio */ ++ client->addr = addr; ++ reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | (reset_on ? BIT(priv->gpio_resetb) : 0)); /* set GPIOn value */ + reg8_write(client, 0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ + } + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0457-media-i2c-ov10640-fix-dvp-order-and-soft-reset.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0457-media-i2c-ov10640-fix-dvp-order-and-soft-reset.patch new file mode 100644 index 00000000..71c116d2 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0457-media-i2c-ov10640-fix-dvp-order-and-soft-reset.patch @@ -0,0 +1,67 @@ +From f35b83dbb68c5c9d01b9c10f8afc95f436a0a40c Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 26 Dec 2019 15:27:34 +0300 +Subject: [PATCH] media: i2c: ov10640: fix dvp order and soft reset + +1) the s/w reset must be removed since some comeras have +serizlizer connected to imager gpio and the address of imager +may change after soft reset + +2) add dvp order + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.c | 6 ++++++ + drivers/media/i2c/soc_camera/ov10640.h | 6 +++--- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index 89dac1b..6414c6e 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -481,6 +481,8 @@ static int ov10640_initialize(struct i2c_client *client) + ov10640_otp_id_read(client); + /* Program wizard registers */ + ov10640_set_regs(client, ov10640_regs_wizard_r1e, ARRAY_SIZE(ov10640_regs_wizard_r1e)); ++ /* Set DVP bit swap */ ++ reg16_write(client, 0x3124, priv->dvp_order << 4); + + dev_info(&client->dev, "ov10640 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, OV10640_MAX_WIDTH, OV10640_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +@@ -552,6 +554,10 @@ static int ov10640_parse_dt(struct device_node *np, struct ov10640_priv *priv) + } + client->addr = tmp_addr; + ++ /* module params override dts */ ++ if (dvp_order != -1) ++ priv->dvp_order = dvp_order; ++ + return 0; + } + +diff --git a/drivers/media/i2c/soc_camera/ov10640.h b/drivers/media/i2c/soc_camera/ov10640.h +index dbc6c0b..32cdb2c 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.h ++++ b/drivers/media/i2c/soc_camera/ov10640.h +@@ -1,7 +1,7 @@ + /* +- * OmniVision ov10640 sensor camera wizard 1280x800@30/UYVY/BT601/8bit ++ * OmniVision ov10640 sensor camera wizard 1280x1080@30/BGGR/BT601/12bit + * +- * Copyright (C) 2015-2017 Cogent Embedded, Inc. ++ * Copyright (C) 2015-2019 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -1185,7 +1185,7 @@ static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { + /* DVP_1280x1080_COMB12_raw 30fps */ + static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { + /* ov10640_R1E_setting_3x12_1280x1080_MIPIin_4lane_raw */ +-{0x3013, 0x01}, ++//{0x3013, 0x01}, + {OV10640_DELAY, 10}, + {0x328a, 0x11}, + {0x313f, 0x80}, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0458-arm64-dts-renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0458-arm64-dts-renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch new file mode 100644 index 00000000..3d73bd27 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0458-arm64-dts-renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch @@ -0,0 +1,866 @@ +From 593e1916da8aa0ff0f4d8d25aa483358d190badb Mon Sep 17 00:00:00 2001 +From: Andrey Gusakov +Date: Wed, 25 Dec 2019 16:42:09 +0300 +Subject: [PATCH] arm64: dts: renesas: Add V3x VideoBox GMSL 8ch support + +Signed-off-by: Andrey Gusakov +--- + arch/arm64/boot/dts/renesas/Makefile | 1 + + .../renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts | 834 ++++++++++++++++++ + 2 files changed, 835 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index 05b164e09f0a..4b2f4fb73bed 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -41,5 +41,6 @@ dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v2.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v3.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-8ch.dtb r8a77980-v3hsk-vb-4ch.dtb ++dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl-8ch.dtb + + always := $(dtb-y) +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts +new file mode 100644 +index 000000000000..f90951d0e230 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts +@@ -0,0 +1,834 @@ ++/* ++ * Device Tree Source for the V3HSK Videobox Mini board on r8a7798 ++ * ++ * Copyright (C) 2018 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk.dts" ++#include ++/* FDPLink output */ ++//#include "vb-fdplink-output.dtsi" ++ ++/ { ++ model = "Renesas V3HSK 8ch GMSL Videobox board based on r8a7798"; ++ ++ aliases { ++ serial1 = &scif3; ++ ethernet1 = &avb; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led0 { ++ label = "board:status"; ++ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ }; ++ }; ++ ++ mpcie_1v8: regulator2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 1v8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ mpcie_3v3: regulator3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ common_3v3: regulator4 { ++ compatible = "regulator-fixed"; ++ regulator-name = "main 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++}; ++ ++&canfd { ++ pinctrl-0 = <&canfd0_pins &canfd1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ channel0 { ++ status = "okay"; ++ }; ++ ++ channel1 { ++ status = "okay"; ++ }; ++}; ++ ++&avb { ++ pinctrl-0 = <&avb_pins>; ++ pinctrl-names = "default"; ++ renesas,no-ether-link; ++ phy-handle = <&avb_phy0>; ++ status = "okay"; ++ phy-int-gpio = <&gpio1 17 GPIO_ACTIVE_LOW>; ++ ++ avb_phy0: eavb-phy@0 { ++ rxc-skew-ps = <1500>; ++ rxdv-skew-ps = <420>; /* default */ ++ rxd0-skew-ps = <420>; /* default */ ++ rxd1-skew-ps = <420>; /* default */ ++ rxd2-skew-ps = <420>; /* default */ ++ rxd3-skew-ps = <420>; /* default */ ++ txc-skew-ps = <900>; /* default */ ++ txen-skew-ps = <420>; /* default */ ++ txd0-skew-ps = <420>; /* default */ ++ txd1-skew-ps = <420>; /* default */ ++ txd2-skew-ps = <420>; /* default */ ++ txd3-skew-ps = <420>; /* default */ ++ reg = <3>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; ++ max-speed = <1000>; ++ }; ++}; ++ ++&csi40 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi40_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <700>; ++ }; ++ }; ++}; ++ ++&csi41 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi41_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <700>; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&i2c1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ clock-frequency = <400000>; ++ ++ i2cswitch1: i2c-switch@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; ++ ++ /* CTL0_SDA and CTL0_SCL */ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ gpio_exp: gpio_exp@76 { ++ compatible = "nxp,pca9539"; ++ reg = <0x76>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ des0_shdn { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Des0SHDN"; ++ }; ++ des1_shdn { ++ gpio-hog; ++ gpios = <0 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Des1SHDN"; ++ }; ++ cmr_pwen { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CmrPEN"; ++ }; ++ }; ++ ++ dac_vcam: dac_vcam@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ vdd-supply = <&common_3v3>; ++ }; ++ }; ++ ++ /* DS0_SDA and DS0_SCL */ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ /* Deser #0 nodes here */ ++ ov106xx@0 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x60>; ++ ++ port@0 { ++ ov106xx_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des0ep0: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep0>; ++ }; ++ }; ++ }; ++ ++ ov106xx@1 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x61>; ++ ++ port@0 { ++ ov106xx_in1: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin1ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des0ep1: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep1>; ++ }; ++ }; ++ }; ++ ++ ov106xx@2 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x62>; ++ ++ port@0 { ++ ov106xx_in2: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin2ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des0ep2: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep2>; ++ }; ++ }; ++ }; ++ ++ ov106xx@3 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x63>; ++ ++ port@0 { ++ ov106xx_in3: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin3ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des0ep3: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep3>; ++ }; ++ }; ++ }; ++ ++ max9286@0 { ++ compatible = "maxim,max9286"; ++ reg = <0x2c>; ++ maxim,links = <4>; ++ maxim,lanes = <4>; ++ maxim,resetb-gpio = <1>; ++ maxim,fsync-mode = "automatic"; ++ maxim,timeout = <100>; ++ ++ POC0-gpios = <&gpio_exp 11 GPIO_ACTIVE_HIGH>; ++ POC1-gpios = <&gpio_exp 10 GPIO_ACTIVE_HIGH>; ++ POC2-gpios = <&gpio_exp 8 GPIO_ACTIVE_HIGH>; ++ POC3-gpios = <&gpio_exp 9 GPIO_ACTIVE_HIGH>; ++ ++ port@0 { ++ max9286_des0ep0: endpoint@0 { ++ max9271-addr = <0x50>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in0>; ++ }; ++ max9286_des0ep1: endpoint@1 { ++ max9271-addr = <0x51>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in1>; ++ }; ++ max9286_des0ep2: endpoint@2 { ++ max9271-addr = <0x52>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in2>; ++ }; ++ max9286_des0ep3: endpoint@3 { ++ max9271-addr = <0x53>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in3>; ++ }; ++ }; ++ port@1 { ++ max9286_csi0ep0: endpoint { ++ csi-rate = <700>; ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ }; ++ }; ++ ++ /* DS1_SDA and DS1_SCL */ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ /* Deser #1 nodes here */ ++ ov106xx@4 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x60>; ++ ++ port@0 { ++ ov106xx_in4: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin4ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des1ep0: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep0>; ++ }; ++ }; ++ }; ++ ++ ov106xx@5 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x61>; ++ ++ port@0 { ++ ov106xx_in5: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin5ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des1ep1: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep1>; ++ }; ++ }; ++ }; ++ ++ ov106xx@6 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x62>; ++ ++ port@0 { ++ ov106xx_in6: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin6ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des1ep2: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep2>; ++ }; ++ }; ++ }; ++ ++ ov106xx@7 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x63>; ++ ++ port@0 { ++ ov106xx_in7: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin7ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des1ep3: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep3>; ++ }; ++ }; ++ }; ++ ++ max9286@0 { ++ compatible = "maxim,max9286"; ++ reg = <0x2c>; ++ maxim,links = <4>; ++ maxim,lanes = <4>; ++ maxim,resetb-gpio = <1>; ++ maxim,fsync-mode = "automatic"; ++ maxim,timeout = <100>; ++ ++ POC0-gpios = <&gpio_exp 15 GPIO_ACTIVE_HIGH>; ++ POC1-gpios = <&gpio_exp 14 GPIO_ACTIVE_HIGH>; ++ POC2-gpios = <&gpio_exp 12 GPIO_ACTIVE_HIGH>; ++ POC3-gpios = <&gpio_exp 13 GPIO_ACTIVE_HIGH>; ++ ++ port@0 { ++ max9286_des1ep0: endpoint@0 { ++ max9271-addr = <0x50>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in4>; ++ }; ++ max9286_des1ep1: endpoint@1 { ++ max9271-addr = <0x51>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in5>; ++ }; ++ max9286_des1ep2: endpoint@2 { ++ max9271-addr = <0x52>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in6>; ++ }; ++ max9286_des1ep3: endpoint@3 { ++ max9271-addr = <0x53>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in7>; ++ }; ++ }; ++ port@1 { ++ max9286_csi1ep0: endpoint { ++ csi-rate = <700>; ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ }; ++ }; ++ ++ /* ESDA and ESCL */ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ ++ /* fan node - lm96063 */ ++ fan_ctrl: lm96063@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ /* Disp_SDA and Disp_SCL */ ++ i2c@6 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <6>; ++ ++ /* ext I2C bus nodes */ ++ }; ++ ++ /* RTC_SDA and RTC_SCL */ ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ ++ rtc: mcp79411@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ }; ++ }; ++ ++ }; ++}; ++ ++&gpio0 { ++ wake_pin_8 { ++ gpio-hog; ++ gpios = <8 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 8"; ++ }; ++ ++ can0_load { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN0Loff"; ++ }; ++ ++ fpdl_shdn { ++ gpio-hog; ++ gpios = <21 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "FPDL_SHDN"; ++ }; ++}; ++ ++&gpio1 { ++ md_buf_en { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CPLD_If_En"; ++ }; ++}; ++ ++&gpio2 { ++ m2_rst { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 RST#"; ++ }; ++ ++ rst_vin01 { ++ gpio-hog; ++ gpios = <16 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CCTRL_RSTn_VIN01"; ++ }; ++ ++ can0_stby { ++ gpio-hog; ++ gpios = <27 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN0STBY"; ++ }; ++ ++ can1_load { ++ gpio-hog; ++ gpios = <29 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1Loff"; ++ }; ++ ++ can1_stby { ++ gpio-hog; ++ gpios = <22 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1STBY"; ++ }; ++ ++ wake_pin_7 { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 7"; ++ }; ++}; ++ ++&pcie_bus_clk { ++ clock-frequency = <100000000>; ++ status = "okay"; ++}; ++ ++&pciec { ++ pcie3v3-supply = <&mpcie_3v3>; ++ pcie1v8-supply = <&mpcie_1v8>; ++ status = "okay"; ++}; ++ ++&pcie_phy { ++ status = "okay"; ++}; ++ ++&pfc { ++ canfd0_pins: canfd0 { ++ groups = "canfd0_data_a"; ++ function = "canfd0"; ++ }; ++ ++ canfd1_pins: canfd1 { ++ groups = "canfd1_data"; ++ function = "canfd1"; ++ }; ++ ++ avb_pins: avb { ++ groups = "avb_mdio", "avb_rgmii"; ++ function = "avb"; ++ }; ++ ++ i2c1_pins: i2c1 { ++ groups = "i2c1"; ++ function = "i2c1"; ++ }; ++ ++ pwm0_pins: pwm0 { ++ groups = "pwm0_a"; ++ function = "pwm0"; ++ }; ++ ++ scif3_pins: scif3 { ++ groups = "scif3_data"; ++ function = "scif3"; ++ }; ++}; ++ ++&pwm0 { ++ pinctrl-0 = <&pwm0_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++}; ++ ++&scif3 { ++ pinctrl-0 = <&scif3_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&tpu { ++ status = "disabled"; ++}; ++ ++&vin0 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin0ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in0>; ++ }; ++ }; ++ port@1 { ++ csi0ep0: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin0_max9286_des0ep0: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin1ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in1>; ++ }; ++ }; ++ port@1 { ++ csi0ep1: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin1_max9286_des0ep1: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin2 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin2ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in2>; ++ }; ++ }; ++ port@1 { ++ csi0ep2: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin6_max9286_des0ep2: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin3 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin3ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in3>; ++ }; ++ }; ++ port@1 { ++ csi0ep3: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin7_max9286_des0ep3: endpoint@1 { ++ remote-endpoint = <&max9286_des0ep3>; ++ }; ++ }; ++ }; ++}; ++ ++&vin4 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin4ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in4>; ++ }; ++ }; ++ port@1 { ++ csi1ep0: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin4_max9286_des0ep0: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin5 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin5ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in5>; ++ }; ++ }; ++ port@1 { ++ csi1ep1: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin5_max9286_des1ep1: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin6 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin6ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in6>; ++ }; ++ }; ++ port@1 { ++ csi1ep2: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin6_max9286_des1ep2: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin7 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin7ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&ov106xx_in7>; ++ }; ++ }; ++ port@1 { ++ csi1ep3: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin7_max9286_des1ep3: endpoint@1 { ++ remote-endpoint = <&max9286_des1ep3>; ++ }; ++ }; ++ }; ++}; +-- +2.20.1 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0459-media-i2c-ov10640-support-different-revisions.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0459-media-i2c-ov10640-support-different-revisions.patch new file mode 100644 index 00000000..7df38d8c --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0459-media-i2c-ov10640-support-different-revisions.patch @@ -0,0 +1,6345 @@ +From a5fcfd1f74e05c70308262091be3d9035150bfc6 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Sun, 29 Dec 2019 04:12:59 +0300 +Subject: [PATCH] media: i2c: ov10640: support different revisions + +1) support r1d/r1e/r1f revisions +2) fix exposure/gain, add AEC/AEG +3) adjust ADV_DEBUG to support u8/u16/u32/u64 access + +Signed-off-by: Vladimir Barinov +Signed-off-by: Petr Nechaev +--- + drivers/media/i2c/soc_camera/ov10640.c | 134 +- + drivers/media/i2c/soc_camera/ov10640.h | 2378 +--------------------------- + drivers/media/i2c/soc_camera/ov10640_r1d.h | 1240 +++++++++++++++ + drivers/media/i2c/soc_camera/ov10640_r1e.h | 1235 +++++++++++++++ + drivers/media/i2c/soc_camera/ov10640_r1f.h | 1198 ++++++++++++++ + 5 files changed, 3752 insertions(+), 2433 deletions(-) + create mode 100644 drivers/media/i2c/soc_camera/ov10640_r1d.h + create mode 100644 drivers/media/i2c/soc_camera/ov10640_r1e.h + create mode 100644 drivers/media/i2c/soc_camera/ov10640_r1f.h + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index 6414c6e..40058b7 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -25,9 +25,10 @@ + + #define OV10640_I2C_ADDR 0x30 + +-#define OV10640_PID 0x300a +-#define OV10640_VER 0x300b +-#define OV10640_VERSION_REG 0xa640 ++#define OV10640_PIDA_REG 0x300a ++#define OV10640_PIDB_REG 0x300b ++#define OV10640_REV_REG 0x300d ++#define OV10640_PID 0xa640 + + #define OV10640_MEDIA_BUS_FMT MEDIA_BUS_FMT_SBGGR12_1X12 + +@@ -190,8 +191,8 @@ static int ov10640_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) + + edid->edid[6] = 0xff; + edid->edid[7] = client->addr; +- edid->edid[8] = OV10640_VERSION_REG >> 8; +- edid->edid[9] = OV10640_VERSION_REG & 0xff; ++ edid->edid[8] = OV10640_PID >> 8; ++ edid->edid[9] = OV10640_PID & 0xff; + + return 0; + } +@@ -274,24 +275,36 @@ static int ov10640_g_register(struct v4l2_subdev *sd, + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u8 val = 0; ++ __be64 be_val; + +- ret = reg16_read(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ov10640_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ __be64 be_val; + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); ++ ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ++ return reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); + } + #endif + +@@ -309,7 +322,7 @@ static int ov10640_s_ctrl(struct v4l2_ctrl *ctrl) + struct ov10640_priv *priv = to_ov10640(client); + int ret = -EINVAL; + u8 val = 0; +- u16 val16 = 0; ++ static char again[8] = {0, 1, 4, 2, 5, 3, 6, 7}; + + if (!priv->init_complete) + return 0; +@@ -321,38 +334,35 @@ static int ov10640_s_ctrl(struct v4l2_ctrl *ctrl) + case V4L2_CID_HUE: + case V4L2_CID_GAMMA: + break; ++ case V4L2_CID_AUTOGAIN: ++ /* automatic gain/exposure */ ++ reg16_read(client, 0x30FA, &val); ++ val &= ~(0x1 << 6); ++ val |= (ctrl->val << 6); ++ ret = reg16_write(client, 0x30FA, val); ++ break; + case V4L2_CID_GAIN: +- reg16_write(client, 0x30EC, ctrl->val); // L +- reg16_write(client, 0x30EE, ctrl->val); // S +- ret = reg16_write(client, 0x30F0, ctrl->val); // VS ++ reg16_write(client, 0x30EC, ctrl->val >> 8); // L ++ reg16_write(client, 0x30ED, ctrl->val & 0xff); // L ++ reg16_write(client, 0x30EE, ctrl->val >> 8); // S ++ reg16_write(client, 0x30EF, ctrl->val & 0xff); // S ++ reg16_write(client, 0x30F0, ctrl->val >> 8); // VS ++ ret = reg16_write(client, 0x30F1, ctrl->val & 0xff); // VS + break; + case V4L2_CID_ANALOGUE_GAIN: +- reg16_read(client, 0x30EB, &val); +- val &= ~(0x3f << 0); // VS, S, L - Gauss curve +- val |= ((ctrl->val / 2) << 0); // L +- val |= (ctrl->val << 2); // S +- val |= ((ctrl->val / 2) << 4); // VS ++ val = again[ctrl->val] & 0x4 ? 0xC0 : 0; // High conversion gain is x2.57, low conversion gain is x1 ++ val |= ((again[ctrl->val] & 0x3) << 0); // L ++ val |= ((again[ctrl->val] & 0x3) << 2); // S ++ val |= ((again[ctrl->val] & 0x3) << 4); // VS + ret = reg16_write(client, 0x30EB, val); + break; + case V4L2_CID_EXPOSURE: +- val16 = 0xfff - ctrl->val; +- +- reg16_write(client, 0x30E6, val16 >> 8); // L +- reg16_write(client, 0x30E7, val16 & 0xff); // L +- +- reg16_write(client, 0x30E8, val16 >> 8); // S +- ret = reg16_write(client, 0x30E9, val16 & 0xff);// S +- +-// ret = reg16_write(client, 0x30EA, val >> 8); // VS - fractional ... ++ reg16_write(client, 0x30E6, ctrl->val >> 8); // L ++ reg16_write(client, 0x30E7, ctrl->val & 0xff); // L ++ reg16_write(client, 0x30E8, ctrl->val/16 >> 8); // S ++ reg16_write(client, 0x30E9, ctrl->val/16 & 0xff);// S ++ ret = reg16_write(client, 0x30EA, ctrl->val/256 >> 8); // VS + break; +-#if 0 +- case V4L2_CID_EXPOSURE_AUTO: +- reg16_read(client, 0x30FA, &val); +- val &= ~(0x1 << 6); +- val |= (ctrl->val << 6); +- ret = reg16_write(client, 0x30FA, val); +- break; +-#endif + case V4L2_CID_HFLIP: + reg16_read(client, 0x3128, &val); + val &= ~(0x1 << 0); +@@ -460,19 +470,21 @@ static int ov10640_initialize(struct i2c_client *client) + { + struct ov10640_priv *priv = to_ov10640(client); + u16 pid; +- u8 val = 0; ++ u8 val = 0, rev; + int ret = 0; + + ov10640_s_port(client, 1); + + /* check and show product ID and manufacturer ID */ +- reg16_read(client, OV10640_PID, &val); ++ reg16_read(client, OV10640_PIDA_REG, &val); + pid = val; +- reg16_read(client, OV10640_VER, &val); ++ reg16_read(client, OV10640_PIDB_REG, &val); + pid = (pid << 8) | val; ++ reg16_read(client, OV10640_REV_REG, &val); ++ rev = 0x10 | ((val & 0xf) + 0xa); + +- if (pid != OV10640_VERSION_REG) { +- dev_err(&client->dev, "Product ID error %x\n", pid); ++ if (pid != OV10640_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); + ret = -ENODEV; + goto out; + } +@@ -480,12 +492,25 @@ static int ov10640_initialize(struct i2c_client *client) + /* Read OTP IDs */ + ov10640_otp_id_read(client); + /* Program wizard registers */ +- ov10640_set_regs(client, ov10640_regs_wizard_r1e, ARRAY_SIZE(ov10640_regs_wizard_r1e)); ++ switch (rev) { ++ case 0x1d: ++ ov10640_set_regs(client, ov10640_regs_wizard_r1d, ARRAY_SIZE(ov10640_regs_wizard_r1d)); ++ break; ++ case 0x1e: ++ ov10640_set_regs(client, ov10640_regs_wizard_r1e, ARRAY_SIZE(ov10640_regs_wizard_r1e)); ++ break; ++ case 0x1f: ++ ov10640_set_regs(client, ov10640_regs_wizard_r1f, ARRAY_SIZE(ov10640_regs_wizard_r1f)); ++ break; ++ default: ++ dev_err(&client->dev, "Unsupported chip revision\n"); ++ return -EINVAL; ++ } + /* Set DVP bit swap */ + reg16_write(client, 0x3124, priv->dvp_order << 4); + +- dev_info(&client->dev, "ov10640 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", +- pid, OV10640_MAX_WIDTH, OV10640_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ dev_info(&client->dev, "ov10640 PID %x (r%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, rev, OV10640_MAX_WIDTH, OV10640_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + out: + ov10640_s_port(client, 0); + +@@ -535,7 +560,6 @@ static int ov10640_parse_dt(struct device_node *np, struct ov10640_priv *priv) + tmp_addr = client->addr; + if (priv->max9286_addr) { + client->addr = priv->max9271_addr; /* Serializer I2C address */ +- + reg8_write(client, 0x09, tmp_addr << 1); /* Sensor translated I2C address */ + reg8_write(client, 0x0A, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ + usleep_range(2000, 2500); /* wait 2ms */ +@@ -543,14 +567,10 @@ static int ov10640_parse_dt(struct device_node *np, struct ov10640_priv *priv) + + if (priv->ti9x4_addr) { + client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ +- + reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ + usleep_range(2000, 2500); /* wait 2ms */ + reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ + reg8_write(client, 0x5d, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ +- +-// reg8_write(client, 0x6e, 0x9a); /* GPIO0 - fsin, GPIO1 - resetb */ +-// udelay(100); + } + client->addr = tmp_addr; + +@@ -592,15 +612,13 @@ static int ov10640_probe(struct i2c_client *client, + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_GAMMA, 0, 0xffff, 1, 0x233); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +- V4L2_CID_GAIN, 0, 0x3f, 1, 0x1); ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 0); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +- V4L2_CID_ANALOGUE_GAIN, 0, 3, 1, 1); ++ V4L2_CID_GAIN, 0, 0x3fff, 1, 0x100); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +- V4L2_CID_EXPOSURE, 0, 0xfff, 1, 0x448); +-#if 0 ++ V4L2_CID_ANALOGUE_GAIN, 0, 7, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +- V4L2_CID_EXPOSURE_AUTO, 0, 1, 1, 0); +-#endif ++ V4L2_CID_EXPOSURE, 0, 0xffff, 1, 0x400); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +diff --git a/drivers/media/i2c/soc_camera/ov10640.h b/drivers/media/i2c/soc_camera/ov10640.h +index 32cdb2c..3d2de3d 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.h ++++ b/drivers/media/i2c/soc_camera/ov10640.h +@@ -30,2378 +30,6 @@ struct ov10640_reg { + u8 val; + }; + +-/* DVP_1280x1080_COMB12_raw 60fps */ +-static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { +-{0x3013, 0x01}, +-{OV10640_DELAY, 10}, +-{0x31be, 0x01}, +-{0x3133, 0xb7}, +-{0x3134, 0xca}, +-{0x3135, 0xcc}, +-{0x313f, 0x80}, +-{0x3132, 0x24}, +-{0x3000, 0x03}, +-{0x3001, 0x62}, +-{0x3002, 0x07}, +-//{0x3002, 0x0f}, // for 30fps wizard +-{0x3004, 0x03}, +-#if 0 +-{0x3005, 0x62}, +-#else +-{0x3005, 0x48}, +-#endif +-{0x3006, 0x07}, +-{0x3007, 0x01}, +-{0x3023, 0x05}, +-{0x3032, 0x35}, +-{0x3033, 0x04}, +-{0x3054, 0x00}, +-{0x3055, 0x0f}, +-{0x3056, 0x01}, +-{0x3057, 0xff}, +-{0x3058, 0xaf}, +-{0x3059, 0x44}, +-{0x305a, 0x02}, +-{0x305b, 0x00}, +-{0x305c, 0x30}, +-{0x305d, 0x9e}, +-{0x305e, 0x19}, +-{0x305f, 0x18}, +-{0x3060, 0xf9}, +-{0x3061, 0xf0}, +-#ifdef OV10640_FSIN_ENABLE +-{0x308c, 0xb2}, +-#else +-{0x308c, 0x03}, +-#endif +-{0x308f, 0x10}, +-{0x3090, 0x00}, +-{0x3091, 0x00}, +-{0x30eb, 0x00}, +-{0x30a3, 0x08}, +-{0x30ad, 0x03}, +-{0x30ae, 0x80}, +-{0x30af, 0x80}, +-{0x30b0, 0xff}, +-{0x30b1, 0x3f}, +-{0x30b2, 0x22}, +-{0x30b9, 0x22}, +-{0x30bb, 0x00}, +-{0x30bc, 0x00}, +-{0x30bd, 0x00}, +-{0x30be, 0x00}, +-{0x30bf, 0x00}, +-{0x30c0, 0x00}, +-{0x30c1, 0x00}, +-{0x30c2, 0x00}, +-{0x30c3, 0x00}, +-{0x30c4, 0x80}, +-{0x30c5, 0x00}, +-{0x30c6, 0x80}, +-{0x30c7, 0x00}, +-{0x30c8, 0x80}, +-{0x3119, 0x44}, +-{0x311a, 0x01}, +-{0x311b, 0x4a}, +-{0x3074, 0x00}, +-{0x3075, 0x00}, +-{0x3076, 0x00}, +-{0x3077, 0x02}, +-{0x3078, 0x05}, +-{0x3079, 0x07}, +-{0x307a, 0x04}, +-{0x307b, 0x41}, +-{0x307c, 0x05}, +-{0x307d, 0x00}, +-{0x307e, 0x04}, +-{0x307f, 0x38}, +-#if 0 +-{0x3080, 0x05}, +-{0x3081, 0xbe}, +-#else +-{0x3080, 0x06}, // minimal VTS for FPDLINK3 +-{0x3081, 0xe0}, +-#endif +-{0x3082, 0x04}, +-{0x3083, 0x57}, +-{0x3084, 0x00}, +-{0x3085, 0x04}, +-{0x3086, 0x00}, +-{0x3087, 0x04}, +-{0x3088, 0x00}, +-{0x3089, 0x40}, +-{0x308d, 0x92}, +-{0x3094, 0xa5}, +-{0x30e6, 0x04}, +-{0x30e7, 0x48}, +-{0x30e8, 0x04}, +-{0x30e9, 0x48}, +-{0x30ea, 0x11}, +-{0x30ec, 0x01}, +-{0x30fa, 0x06}, +-{0x3120, 0x00}, +-{0x3121, 0x01}, +-{0x3122, 0x00}, +-{0x3127, 0x63}, +-{0x3128, 0xc0}, +-#ifdef OV10640_DISPLAY_PATTERN +-{0x3129, 0x80}, +-#else +-{0x3129, 0x00}, +-#endif +-{0x31be, 0x01}, +-{0x30a5, 0x78}, +-{0x30a6, 0x40}, +-{0x30a7, 0x78}, +-{0x30a8, 0x80}, +-{0x30a9, 0x79}, +-{0x30aa, 0x00}, +-{0x30ab, 0x79}, +-{0x30ac, 0xf8}, +-{0x3440, 0x04}, +-{0x3444, 0x28}, +-{0x344e, 0x2c}, +-{0x3457, 0x33}, +-{0x345e, 0x38}, +-{0x3461, 0xa8}, +-{0x7002, 0xaa}, +-{0x7001, 0xdf}, +-{0x7048, 0x00}, +-{0x7049, 0x02}, +-{0x704a, 0x02}, +-{0x704b, 0x00}, +-{0x704c, 0x01}, +-{0x704d, 0x00}, +-{0x7043, 0x04}, +-{0x7040, 0x3c}, +-{0x7047, 0x00}, +-{0x7044, 0x01}, +-{0x7000, 0x1f}, +-{0x7084, 0x01}, +-{0x7085, 0x03}, +-{0x7086, 0x02}, +-{0x7087, 0x40}, +-{0x7088, 0x01}, +-{0x7089, 0x20}, +-{0x707f, 0x04}, +-{0x707c, 0x3c}, +-{0x7083, 0x00}, +-{0x7080, 0x01}, +-{0x7003, 0xdf}, +-{0x70c0, 0x00}, +-{0x70c1, 0x02}, +-{0x70c2, 0x02}, +-{0x70c3, 0x00}, +-{0x70c4, 0x01}, +-{0x70c5, 0x00}, +-{0x70b8, 0x03}, +-{0x70b9, 0x98}, +-{0x70bc, 0x00}, +-{0x70bd, 0x80}, +-{0x7004, 0x02}, +-{0x7005, 0x00}, +-{0x7006, 0x01}, +-{0x7007, 0x80}, +-{0x7008, 0x02}, +-{0x7009, 0x00}, +-{0x700a, 0x04}, +-{0x700b, 0x00}, +-{0x700e, 0x00}, +-{0x700f, 0x60}, +-{0x701a, 0x02}, +-{0x701b, 0x00}, +-{0x701c, 0x01}, +-{0x701d, 0x80}, +-{0x701e, 0x02}, +-{0x701f, 0x00}, +-{0x7020, 0x04}, +-{0x7021, 0x00}, +-{0x7024, 0x00}, +-{0x7025, 0x60}, +-{0x70e7, 0x00}, +-{0x70e4, 0x10}, +-{0x70e5, 0x00}, +-{0x70e6, 0x00}, +-{0x70eb, 0x00}, +-{0x70e8, 0x10}, +-{0x70e9, 0x00}, +-{0x70ea, 0x00}, +-{0x70ef, 0x00}, +-{0x70ec, 0xfd}, +-{0x70ed, 0x00}, +-{0x70ee, 0x00}, +-{0x70eb, 0x00}, +-{0x70f0, 0xfd}, +-{0x70f1, 0x00}, +-{0x70f2, 0x00}, +-{0x30fb, 0x06}, +-{0x30fc, 0x80}, +-{0x30fd, 0x02}, +-{0x30fe, 0x93}, +-{0x6000, 0xc1}, +-{0x6001, 0xb9}, +-{0x6002, 0xba}, +-{0x6003, 0xa4}, +-{0x6004, 0xa4}, +-{0x6005, 0xb5}, +-{0x6006, 0xa0}, +-{0x6007, 0x82}, +-{0x6008, 0xa7}, +-{0x6009, 0xa7}, +-{0x600a, 0xb7}, +-{0x600b, 0x5c}, +-{0x600c, 0x9e}, +-{0x600d, 0xc0}, +-{0x600e, 0xd2}, +-{0x600f, 0x33}, +-{0x6010, 0xcc}, +-{0x6011, 0xe2}, +-{0x6012, 0xc1}, +-{0x6013, 0xab}, +-{0x6014, 0xab}, +-{0x6015, 0xb7}, +-{0x6016, 0x00}, +-{0x6017, 0x00}, +-{0x6018, 0x00}, +-{0x6019, 0x00}, +-{0x601a, 0x00}, +-{0x601b, 0x00}, +-{0x601c, 0x00}, +-{0x601d, 0x00}, +-{0x601e, 0x00}, +-{0x601f, 0x00}, +-{0x6020, 0x00}, +-{0x6021, 0x00}, +-{0x6022, 0x00}, +-{0x6023, 0x9c}, +-{0x6024, 0x94}, +-{0x6025, 0x90}, +-{0x6026, 0xc5}, +-{0x6027, 0x00}, +-{0x6028, 0x54}, +-{0x6029, 0x2a}, +-{0x602a, 0x61}, +-{0x602b, 0xd2}, +-{0x602c, 0xcc}, +-{0x602d, 0x04}, +-{0x602e, 0x35}, +-{0x602f, 0xb1}, +-{0x6030, 0xb2}, +-{0x6031, 0xb3}, +-{0x6032, 0xd2}, +-{0x6033, 0xd3}, +-{0x6034, 0x11}, +-{0x6035, 0x31}, +-{0x6036, 0xcc}, +-{0x6037, 0x06}, +-{0x6038, 0xd2}, +-{0x6039, 0x00}, +-{0x603a, 0xce}, +-{0x603b, 0x18}, +-{0x603c, 0xcf}, +-{0x603d, 0x1e}, +-{0x603e, 0xd0}, +-{0x603f, 0x24}, +-{0x6040, 0xc5}, +-{0x6041, 0xd2}, +-{0x6042, 0xbc}, +-{0x6043, 0xcc}, +-{0x6044, 0x52}, +-{0x6045, 0x2b}, +-{0x6046, 0xd2}, +-{0x6047, 0xd3}, +-{0x6048, 0x01}, +-{0x6049, 0xcc}, +-{0x604a, 0x0a}, +-{0x604b, 0xd2}, +-{0x604c, 0xd3}, +-{0x604d, 0x0f}, +-{0x604e, 0x1a}, +-{0x604f, 0x2a}, +-{0x6050, 0xd4}, +-{0x6051, 0xe3}, +-{0x6052, 0xba}, +-{0x6053, 0x56}, +-{0x6054, 0xd3}, +-{0x6055, 0x2e}, +-{0x6056, 0x54}, +-{0x6057, 0x26}, +-{0x6058, 0xd2}, +-{0x6059, 0xcc}, +-{0x605a, 0x60}, +-{0x605b, 0xd2}, +-{0x605c, 0xd3}, +-{0x605d, 0x27}, +-{0x605e, 0x27}, +-{0x605f, 0x08}, +-{0x6060, 0x1a}, +-{0x6061, 0xcc}, +-{0x6062, 0x88}, +-{0x6063, 0x00}, +-{0x6064, 0x12}, +-{0x6065, 0x2c}, +-{0x6066, 0x60}, +-{0x6067, 0xc2}, +-{0x6068, 0xb9}, +-{0x6069, 0xa5}, +-{0x606a, 0xa5}, +-{0x606b, 0xb5}, +-{0x606c, 0xa0}, +-{0x606d, 0x82}, +-{0x606e, 0x5c}, +-{0x606f, 0xd4}, +-{0x6070, 0xab}, +-{0x6071, 0xd4}, +-{0x6072, 0xab}, +-{0x6073, 0xd3}, +-{0x6074, 0x01}, +-{0x6075, 0x7c}, +-{0x6076, 0x74}, +-{0x6077, 0x00}, +-{0x6078, 0x61}, +-{0x6079, 0x2a}, +-{0x607a, 0xd2}, +-{0x607b, 0xcc}, +-{0x607c, 0xdf}, +-{0x607d, 0xc6}, +-{0x607e, 0x35}, +-{0x607f, 0xd2}, +-{0x6080, 0xcc}, +-{0x6081, 0x06}, +-{0x6082, 0x31}, +-{0x6083, 0xd2}, +-{0x6084, 0x00}, +-{0x6085, 0xbb}, +-{0x6086, 0xcc}, +-{0x6087, 0x18}, +-{0x6088, 0xc6}, +-{0x6089, 0xd2}, +-{0x608a, 0xbd}, +-{0x608b, 0xcc}, +-{0x608c, 0x52}, +-{0x608d, 0x2b}, +-{0x608e, 0xd2}, +-{0x608f, 0xd3}, +-{0x6090, 0x01}, +-{0x6091, 0xcc}, +-{0x6092, 0x0a}, +-{0x6093, 0xd2}, +-{0x6094, 0xd3}, +-{0x6095, 0x0f}, +-{0x6096, 0x1a}, +-{0x6097, 0x71}, +-{0x6098, 0x2a}, +-{0x6099, 0xd4}, +-{0x609a, 0xe3}, +-{0x609b, 0xd3}, +-{0x609c, 0x22}, +-{0x609d, 0x70}, +-{0x609e, 0xca}, +-{0x609f, 0x26}, +-{0x60a0, 0xd2}, +-{0x60a1, 0xcc}, +-{0x60a2, 0x60}, +-{0x60a3, 0xd2}, +-{0x60a4, 0xd3}, +-{0x60a5, 0x27}, +-{0x60a6, 0x27}, +-{0x60a7, 0x08}, +-{0x60a8, 0x1a}, +-{0x60a9, 0xcc}, +-{0x60aa, 0x88}, +-{0x60ab, 0x00}, +-{0x60ac, 0x12}, +-{0x60ad, 0x2c}, +-{0x60ae, 0x60}, +-{0x60af, 0x00}, +-{0x60b0, 0x00}, +-{0x60b1, 0xc0}, +-{0x60b2, 0xb9}, +-{0x60b3, 0xa3}, +-{0x60b4, 0xa3}, +-{0x60b5, 0xb5}, +-{0x60b6, 0x00}, +-{0x60b7, 0xa0}, +-{0x60b8, 0x82}, +-{0x60b9, 0x5c}, +-{0x60ba, 0xd4}, +-{0x60bb, 0x8b}, +-{0x60bc, 0x9d}, +-{0x60bd, 0xd3}, +-{0x60be, 0x21}, +-{0x60bf, 0xb0}, +-{0x60c0, 0xb0}, +-{0x60c1, 0xb7}, +-{0x60c2, 0x05}, +-{0x60c3, 0xd3}, +-{0x60c4, 0x0a}, +-{0x60c5, 0xd3}, +-{0x60c6, 0x10}, +-{0x60c7, 0x9c}, +-{0x60c8, 0x94}, +-{0x60c9, 0x90}, +-{0x60ca, 0xc8}, +-{0x60cb, 0xba}, +-{0x60cc, 0x7c}, +-{0x60cd, 0x74}, +-{0x60ce, 0x00}, +-{0x60cf, 0x61}, +-{0x60d0, 0x2a}, +-{0x60d1, 0x00}, +-{0x60d2, 0xd2}, +-{0x60d3, 0xcc}, +-{0x60d4, 0xdf}, +-{0x60d5, 0xc4}, +-{0x60d6, 0x35}, +-{0x60d7, 0xd3}, +-{0x60d8, 0x13}, +-{0x60d9, 0xd2}, +-{0x60da, 0xcc}, +-{0x60db, 0x06}, +-{0x60dc, 0x31}, +-{0x60dd, 0xd2}, +-{0x60de, 0xcc}, +-{0x60df, 0x15}, +-{0x60e0, 0xd2}, +-{0x60e1, 0xbb}, +-{0x60e2, 0xcc}, +-{0x60e3, 0x1a}, +-{0x60e4, 0xd2}, +-{0x60e5, 0xbe}, +-{0x60e6, 0xce}, +-{0x60e7, 0x52}, +-{0x60e8, 0xcf}, +-{0x60e9, 0x56}, +-{0x60ea, 0xd0}, +-{0x60eb, 0x5b}, +-{0x60ec, 0x2b}, +-{0x60ed, 0xd2}, +-{0x60ee, 0xd3}, +-{0x60ef, 0x01}, +-{0x60f0, 0xcc}, +-{0x60f1, 0x0a}, +-{0x60f2, 0xd2}, +-{0x60f3, 0xd3}, +-{0x60f4, 0x0f}, +-{0x60f5, 0xd9}, +-{0x60f6, 0xb4}, +-{0x60f7, 0xda}, +-{0x60f8, 0xbb}, +-{0x60f9, 0x1a}, +-{0x60fa, 0xd4}, +-{0x60fb, 0xe3}, +-{0x60fc, 0xd4}, +-{0x60fd, 0x96}, +-{0x60fe, 0x27}, +-{0x60ff, 0x00}, +-{0x6100, 0xd2}, +-{0x6101, 0xcc}, +-{0x6102, 0x60}, +-{0x6103, 0xd2}, +-{0x6104, 0xd3}, +-{0x6105, 0x2d}, +-{0x6106, 0xd9}, +-{0x6107, 0xcc}, +-{0x6108, 0xda}, +-{0x6109, 0xd2}, +-{0x610a, 0x1a}, +-{0x610b, 0x12}, +-{0x610c, 0xcc}, +-{0x610d, 0x88}, +-{0x610e, 0xd6}, +-{0x610f, 0x9e}, +-{0x6110, 0xb9}, +-{0x6111, 0xba}, +-{0x6112, 0xaf}, +-{0x6113, 0xdc}, +-{0x6114, 0x00}, +-{0x6115, 0xd5}, +-{0x6116, 0xba}, +-{0x6117, 0x00}, +-{0x6118, 0x00}, +-{0x6119, 0x00}, +-{0x611a, 0x00}, +-{0x611b, 0x00}, +-{0x611c, 0x00}, +-{0x611d, 0x00}, +-{0x611e, 0x00}, +-{0x611f, 0xaa}, +-{0x6120, 0xaa}, +-{0x6121, 0xb7}, +-{0x6122, 0x00}, +-{0x6123, 0x00}, +-{0x6124, 0x00}, +-{0x6125, 0x00}, +-{0x6126, 0x00}, +-{0x6127, 0xa6}, +-{0x6128, 0xa6}, +-{0x6129, 0xb7}, +-{0x612a, 0x00}, +-{0x612b, 0xd5}, +-{0x612c, 0x71}, +-{0x612d, 0xd3}, +-{0x612e, 0x30}, +-{0x612f, 0xba}, +-{0x6130, 0x00}, +-{0x6131, 0x00}, +-{0x6132, 0x00}, +-{0x6133, 0x00}, +-{0x6134, 0xd3}, +-{0x6135, 0x10}, +-{0x6136, 0x70}, +-{0x6137, 0x00}, +-{0x6138, 0x00}, +-{0x6139, 0x00}, +-{0x613a, 0x00}, +-{0x613b, 0xd5}, +-{0x613c, 0xba}, +-{0x613d, 0xb0}, +-{0x613e, 0xb0}, +-{0x613f, 0xb7}, +-{0x6140, 0x9d}, +-{0x6141, 0x02}, +-{0x6142, 0xd3}, +-{0x6143, 0x0a}, +-{0x6144, 0x9d}, +-{0x6145, 0x9d}, +-{0x6146, 0xd3}, +-{0x6147, 0x10}, +-{0x6148, 0x9c}, +-{0x6149, 0x94}, +-{0x614a, 0x90}, +-{0x614b, 0xc8}, +-{0x614c, 0xba}, +-{0x614d, 0xd2}, +-{0x614e, 0x60}, +-{0x614f, 0x2c}, +-{0x6150, 0x50}, +-{0x6151, 0x11}, +-{0x6152, 0xcc}, +-{0x6153, 0x00}, +-{0x6154, 0x30}, +-{0x6155, 0xd5}, +-{0x6156, 0xba}, +-{0x6157, 0xb0}, +-{0x6158, 0xb0}, +-{0x6159, 0xb7}, +-{0x615a, 0x9d}, +-{0x615b, 0x02}, +-{0x615c, 0xd3}, +-{0x615d, 0x0a}, +-{0x615e, 0x9d}, +-{0x615f, 0x9d}, +-{0x6160, 0xd3}, +-{0x6161, 0x10}, +-{0x6162, 0x9c}, +-{0x6163, 0x94}, +-{0x6164, 0x90}, +-{0x6165, 0xc8}, +-{0x6166, 0xba}, +-{0x6167, 0xd5}, +-{0x6168, 0x01}, +-{0x6169, 0x1a}, +-{0x616a, 0xcc}, +-{0x616b, 0x12}, +-{0x616c, 0x12}, +-{0x616d, 0x00}, +-{0x616e, 0xcc}, +-{0x616f, 0x9c}, +-{0x6170, 0xd2}, +-{0x6171, 0xcc}, +-{0x6172, 0x60}, +-{0x6173, 0xd2}, +-{0x6174, 0x04}, +-{0x6175, 0xd5}, +-{0x6176, 0x1a}, +-{0x6177, 0xcc}, +-{0x6178, 0x12}, +-{0x6179, 0x00}, +-{0x617a, 0x12}, +-{0x617b, 0xcc}, +-{0x617c, 0x9c}, +-{0x617d, 0xd2}, +-{0x617e, 0xcc}, +-{0x617f, 0x60}, +-{0x6180, 0xd2}, +-{0x6181, 0x1a}, +-{0x6182, 0xcc}, +-{0x6183, 0x12}, +-{0x6184, 0x00}, +-{0x6185, 0x12}, +-{0x6186, 0xcc}, +-{0x6187, 0x9c}, +-{0x6188, 0xd2}, +-{0x6189, 0xcc}, +-{0x618a, 0x60}, +-{0x618b, 0xd2}, +-{0x618c, 0x1a}, +-{0x618d, 0xcc}, +-{0x618e, 0x12}, +-{0x618f, 0x00}, +-{0x6190, 0x12}, +-{0x6191, 0xcc}, +-{0x6192, 0x9c}, +-{0x6193, 0xd2}, +-{0x6194, 0xcc}, +-{0x6195, 0x60}, +-{0x6196, 0xd2}, +-{0x6197, 0xd5}, +-{0x6198, 0x1a}, +-{0x6199, 0xcc}, +-{0x619a, 0x12}, +-{0x619b, 0x12}, +-{0x619c, 0x00}, +-{0x619d, 0xcc}, +-{0x619e, 0x8a}, +-{0x619f, 0xd2}, +-{0x61a0, 0xcc}, +-{0x61a1, 0x74}, +-{0x61a2, 0xd2}, +-{0x61a3, 0xd5}, +-{0x61a4, 0x1a}, +-{0x61a5, 0xcc}, +-{0x61a6, 0x12}, +-{0x61a7, 0x00}, +-{0x61a8, 0x12}, +-{0x61a9, 0xcc}, +-{0x61aa, 0x8a}, +-{0x61ab, 0xd2}, +-{0x61ac, 0xcc}, +-{0x61ad, 0x74}, +-{0x61ae, 0xd2}, +-{0x61af, 0x1a}, +-{0x61b0, 0xcc}, +-{0x61b1, 0x12}, +-{0x61b2, 0x00}, +-{0x61b3, 0x12}, +-{0x61b4, 0xcc}, +-{0x61b5, 0x8a}, +-{0x61b6, 0xd2}, +-{0x61b7, 0xcc}, +-{0x61b8, 0x74}, +-{0x61b9, 0xd2}, +-{0x61ba, 0x1a}, +-{0x61bb, 0xcc}, +-{0x61bc, 0x12}, +-{0x61bd, 0x00}, +-{0x61be, 0x12}, +-{0x61bf, 0xcc}, +-{0x61c0, 0x8a}, +-{0x61c1, 0xd2}, +-{0x61c2, 0xcc}, +-{0x61c3, 0x74}, +-{0x61c4, 0xd2}, +-{0x61c5, 0xd5}, +-{0x61c6, 0xcc}, +-{0x61c7, 0x12}, +-{0x61c8, 0x00}, +-{0x61c9, 0x12}, +-{0x61ca, 0xcc}, +-{0x61cb, 0x9c}, +-{0x61cc, 0xd5}, +-{0x6400, 0x04}, +-{0x6401, 0x04}, +-{0x6402, 0x00}, +-{0x6403, 0xff}, +-{0x6404, 0x00}, +-{0x6405, 0x08}, +-{0x6406, 0x00}, +-{0x6407, 0xff}, +-{0x6408, 0x04}, +-{0x6409, 0x70}, +-{0x640a, 0x00}, +-{0x640b, 0xff}, +-{0x640c, 0x05}, +-{0x640d, 0x14}, +-{0x640e, 0x04}, +-{0x640f, 0x71}, +-{0x6410, 0x05}, +-{0x6411, 0x74}, +-{0x6412, 0x00}, +-{0x6413, 0xff}, +-{0x6414, 0x05}, +-{0x6415, 0x54}, +-{0x6416, 0x05}, +-{0x6417, 0x44}, +-{0x6418, 0x04}, +-{0x6419, 0x30}, +-{0x641a, 0x05}, +-{0x641b, 0x46}, +-{0x641c, 0x00}, +-{0x641d, 0xff}, +-{0x641e, 0x04}, +-{0x641f, 0x31}, +-{0x6420, 0x04}, +-{0x6421, 0x30}, +-{0x6422, 0x00}, +-{0x6423, 0xff}, +-{0x6424, 0x04}, +-{0x6425, 0x20}, +-{0x6426, 0x05}, +-{0x6427, 0x06}, +-{0x6428, 0x00}, +-{0x6429, 0xff}, +-{0x642a, 0x08}, +-{0x642b, 0x2a}, +-{0x642c, 0x08}, +-{0x642d, 0x31}, +-{0x642e, 0x00}, +-{0x642f, 0xff}, +-{0x6430, 0x08}, +-{0x6431, 0x2a}, +-{0x6432, 0x08}, +-{0x6433, 0x31}, +-{0x6434, 0x06}, +-{0x6435, 0x20}, +-{0x6436, 0x07}, +-{0x6437, 0x00}, +-{0x6438, 0x08}, +-{0x6439, 0x40}, +-{0x643a, 0x00}, +-{0x643b, 0xff}, +-{0x643c, 0x08}, +-{0x643d, 0x2a}, +-{0x643e, 0x08}, +-{0x643f, 0x36}, +-{0x6440, 0x06}, +-{0x6441, 0x10}, +-{0x6442, 0x07}, +-{0x6443, 0x00}, +-{0x6444, 0x08}, +-{0x6445, 0x40}, +-{0x6446, 0x00}, +-{0x6447, 0xff}, +-{0x6448, 0x08}, +-{0x6449, 0x2a}, +-{0x644a, 0x08}, +-{0x644b, 0x3b}, +-{0x644c, 0x06}, +-{0x644d, 0x00}, +-{0x644e, 0x07}, +-{0x644f, 0x00}, +-{0x6450, 0x08}, +-{0x6451, 0x40}, +-{0x6452, 0x00}, +-{0x6453, 0xff}, +-{0x6454, 0x06}, +-{0x6455, 0x00}, +-{0x6456, 0x07}, +-{0x6457, 0x05}, +-{0x6458, 0x01}, +-{0x6459, 0xaf}, +-{0x645a, 0x01}, +-{0x645b, 0x0f}, +-{0x645c, 0x01}, +-{0x645d, 0x90}, +-{0x645e, 0x01}, +-{0x645f, 0xc8}, +-{0x6460, 0x00}, +-{0x6461, 0xff}, +-{0x6462, 0x01}, +-{0x6463, 0xac}, +-{0x6464, 0x01}, +-{0x6465, 0x0c}, +-{0x6466, 0x01}, +-{0x6467, 0x90}, +-{0x6468, 0x01}, +-{0x6469, 0xe8}, +-{0x646a, 0x00}, +-{0x646b, 0xff}, +-{0x646c, 0x01}, +-{0x646d, 0xad}, +-{0x646e, 0x01}, +-{0x646f, 0x0d}, +-{0x6470, 0x01}, +-{0x6471, 0x90}, +-{0x6472, 0x01}, +-{0x6473, 0xe8}, +-{0x6474, 0x00}, +-{0x6475, 0xff}, +-{0x6476, 0x01}, +-{0x6477, 0xae}, +-{0x6478, 0x01}, +-{0x6479, 0x0e}, +-{0x647a, 0x01}, +-{0x647b, 0x90}, +-{0x647c, 0x01}, +-{0x647d, 0xe8}, +-{0x647e, 0x00}, +-{0x647f, 0xff}, +-{0x6480, 0x01}, +-{0x6481, 0xb0}, +-{0x6482, 0x01}, +-{0x6483, 0xb1}, +-{0x6484, 0x01}, +-{0x6485, 0xb2}, +-{0x6486, 0x01}, +-{0x6487, 0xb3}, +-{0x6488, 0x01}, +-{0x6489, 0xb4}, +-{0x648a, 0x01}, +-{0x648b, 0xb5}, +-{0x648c, 0x01}, +-{0x648d, 0xb6}, +-{0x648e, 0x01}, +-{0x648f, 0xb7}, +-{0x6490, 0x01}, +-{0x6491, 0xb8}, +-{0x6492, 0x01}, +-{0x6493, 0xb9}, +-{0x6494, 0x01}, +-{0x6495, 0xba}, +-{0x6496, 0x01}, +-{0x6497, 0xbb}, +-{0x6498, 0x01}, +-{0x6499, 0xbc}, +-{0x649a, 0x01}, +-{0x649b, 0xbd}, +-{0x649c, 0x01}, +-{0x649d, 0xbe}, +-{0x649e, 0x01}, +-{0x649f, 0xbf}, +-{0x64a0, 0x01}, +-{0x64a1, 0xc0}, +-{0x64a2, 0x00}, +-{0x64a3, 0xff}, +-{0x64a4, 0x06}, +-{0x64a5, 0x00}, +-{0x64a6, 0x01}, +-{0x64a7, 0xf6}, +-{0x64a8, 0x04}, +-{0x64a9, 0x30}, +-{0x64aa, 0x00}, +-{0x64ab, 0xff}, +-{0x64ac, 0x06}, +-{0x64ad, 0x10}, +-{0x64ae, 0x01}, +-{0x64af, 0xf6}, +-{0x64b0, 0x04}, +-{0x64b1, 0x30}, +-{0x64b2, 0x06}, +-{0x64b3, 0x00}, +-{0x64b4, 0x00}, +-{0x64b5, 0xff}, +-{0x64b6, 0x06}, +-{0x64b7, 0x20}, +-{0x64b8, 0x01}, +-{0x64b9, 0xf6}, +-{0x64ba, 0x04}, +-{0x64bb, 0x30}, +-{0x64bc, 0x06}, +-{0x64bd, 0x00}, +-{0x64be, 0x00}, +-{0x64bf, 0xff}, +-{0x64c0, 0x04}, +-{0x64c1, 0x31}, +-{0x64c2, 0x04}, +-{0x64c3, 0x30}, +-{0x64c4, 0x01}, +-{0x64c5, 0x20}, +-{0x64c6, 0x01}, +-{0x64c7, 0x31}, +-{0x64c8, 0x01}, +-{0x64c9, 0x32}, +-{0x64ca, 0x01}, +-{0x64cb, 0x33}, +-{0x64cc, 0x01}, +-{0x64cd, 0x34}, +-{0x64ce, 0x01}, +-{0x64cf, 0x35}, +-{0x64d0, 0x01}, +-{0x64d1, 0x36}, +-{0x64d2, 0x01}, +-{0x64d3, 0x37}, +-{0x64d4, 0x01}, +-{0x64d5, 0x38}, +-{0x64d6, 0x01}, +-{0x64d7, 0x39}, +-{0x64d8, 0x01}, +-{0x64d9, 0x3a}, +-{0x64da, 0x01}, +-{0x64db, 0x3b}, +-{0x64dc, 0x01}, +-{0x64dd, 0x3c}, +-{0x64de, 0x01}, +-{0x64df, 0x3d}, +-{0x64e0, 0x01}, +-{0x64e1, 0x3e}, +-{0x64e2, 0x01}, +-{0x64e3, 0x3f}, +-{0x64e4, 0x02}, +-{0x64e5, 0xa0}, +-{0x64e6, 0x00}, +-{0x64e7, 0xff}, +-{0x64e8, 0x04}, +-{0x64e9, 0x31}, +-{0x64ea, 0x04}, +-{0x64eb, 0x30}, +-{0x64ec, 0x01}, +-{0x64ed, 0x00}, +-{0x64ee, 0x01}, +-{0x64ef, 0x11}, +-{0x64f0, 0x01}, +-{0x64f1, 0x12}, +-{0x64f2, 0x01}, +-{0x64f3, 0x13}, +-{0x64f4, 0x01}, +-{0x64f5, 0x14}, +-{0x64f6, 0x01}, +-{0x64f7, 0x15}, +-{0x64f8, 0x01}, +-{0x64f9, 0x16}, +-{0x64fa, 0x01}, +-{0x64fb, 0x17}, +-{0x64fc, 0x01}, +-{0x64fd, 0x18}, +-{0x64fe, 0x01}, +-{0x64ff, 0x19}, +-{0x6500, 0x01}, +-{0x6501, 0x1a}, +-{0x6502, 0x01}, +-{0x6503, 0x1b}, +-{0x6504, 0x01}, +-{0x6505, 0x1c}, +-{0x6506, 0x01}, +-{0x6507, 0x1d}, +-{0x6508, 0x01}, +-{0x6509, 0x1e}, +-{0x650a, 0x01}, +-{0x650b, 0x1f}, +-{0x650c, 0x02}, +-{0x650d, 0xa0}, +-{0x650e, 0x00}, +-{0x650f, 0xff}, +-{0x6510, 0x04}, +-{0x6511, 0x20}, +-{0x6512, 0x05}, +-{0x6513, 0x86}, +-{0x6514, 0x03}, +-{0x6515, 0x0b}, +-{0x6516, 0x05}, +-{0x6517, 0x86}, +-{0x6518, 0x00}, +-{0x6519, 0x00}, +-{0x651a, 0x05}, +-{0x651b, 0x06}, +-{0x651c, 0x00}, +-{0x651d, 0x04}, +-{0x651e, 0x05}, +-{0x651f, 0x04}, +-{0x6520, 0x00}, +-{0x6521, 0x04}, +-{0x6522, 0x05}, +-{0x6523, 0x00}, +-{0x6524, 0x05}, +-{0x6525, 0x0a}, +-{0x6526, 0x03}, +-{0x6527, 0x9a}, +-{0x6528, 0x05}, +-{0x6529, 0x86}, +-{0x652a, 0x00}, +-{0x652b, 0x00}, +-{0x652c, 0x05}, +-{0x652d, 0x06}, +-{0x652e, 0x00}, +-{0x652f, 0x01}, +-{0x6530, 0x05}, +-{0x6531, 0x04}, +-{0x6532, 0x00}, +-{0x6533, 0x04}, +-{0x6534, 0x05}, +-{0x6535, 0x00}, +-{0x6536, 0x05}, +-{0x6537, 0x0a}, +-{0x6538, 0x03}, +-{0x6539, 0x99}, +-{0x653a, 0x05}, +-{0x653b, 0x06}, +-{0x653c, 0x00}, +-{0x653d, 0x00}, +-{0x653e, 0x05}, +-{0x653f, 0x04}, +-{0x6540, 0x00}, +-{0x6541, 0x04}, +-{0x6542, 0x05}, +-{0x6543, 0x00}, +-{0x6544, 0x05}, +-{0x6545, 0x0a}, +-{0x6546, 0x03}, +-{0x6547, 0x98}, +-{0x6548, 0x05}, +-{0x6549, 0x06}, +-{0x654a, 0x00}, +-{0x654b, 0x00}, +-{0x654c, 0x05}, +-{0x654d, 0x04}, +-{0x654e, 0x00}, +-{0x654f, 0x04}, +-{0x6550, 0x05}, +-{0x6551, 0x00}, +-{0x6552, 0x05}, +-{0x6553, 0x0a}, +-{0x6554, 0x03}, +-{0x6555, 0x97}, +-{0x6556, 0x05}, +-{0x6557, 0x06}, +-{0x6558, 0x05}, +-{0x6559, 0x04}, +-{0x655a, 0x00}, +-{0x655b, 0x04}, +-{0x655c, 0x05}, +-{0x655d, 0x00}, +-{0x655e, 0x05}, +-{0x655f, 0x0a}, +-{0x6560, 0x03}, +-{0x6561, 0x96}, +-{0x6562, 0x05}, +-{0x6563, 0x06}, +-{0x6564, 0x05}, +-{0x6565, 0x04}, +-{0x6566, 0x00}, +-{0x6567, 0x04}, +-{0x6568, 0x05}, +-{0x6569, 0x00}, +-{0x656a, 0x05}, +-{0x656b, 0x0a}, +-{0x656c, 0x03}, +-{0x656d, 0x95}, +-{0x656e, 0x05}, +-{0x656f, 0x06}, +-{0x6570, 0x05}, +-{0x6571, 0x04}, +-{0x6572, 0x00}, +-{0x6573, 0x04}, +-{0x6574, 0x05}, +-{0x6575, 0x00}, +-{0x6576, 0x05}, +-{0x6577, 0x0a}, +-{0x6578, 0x03}, +-{0x6579, 0x94}, +-{0x657a, 0x05}, +-{0x657b, 0x06}, +-{0x657c, 0x00}, +-{0x657d, 0x00}, +-{0x657e, 0x05}, +-{0x657f, 0x04}, +-{0x6580, 0x00}, +-{0x6581, 0x04}, +-{0x6582, 0x05}, +-{0x6583, 0x00}, +-{0x6584, 0x05}, +-{0x6585, 0x0a}, +-{0x6586, 0x03}, +-{0x6587, 0x93}, +-{0x6588, 0x05}, +-{0x6589, 0x06}, +-{0x658a, 0x00}, +-{0x658b, 0x00}, +-{0x658c, 0x05}, +-{0x658d, 0x04}, +-{0x658e, 0x00}, +-{0x658f, 0x04}, +-{0x6590, 0x05}, +-{0x6591, 0x00}, +-{0x6592, 0x05}, +-{0x6593, 0x0a}, +-{0x6594, 0x03}, +-{0x6595, 0x92}, +-{0x6596, 0x05}, +-{0x6597, 0x06}, +-{0x6598, 0x05}, +-{0x6599, 0x04}, +-{0x659a, 0x00}, +-{0x659b, 0x04}, +-{0x659c, 0x05}, +-{0x659d, 0x00}, +-{0x659e, 0x05}, +-{0x659f, 0x0a}, +-{0x65a0, 0x03}, +-{0x65a1, 0x91}, +-{0x65a2, 0x05}, +-{0x65a3, 0x06}, +-{0x65a4, 0x05}, +-{0x65a5, 0x04}, +-{0x65a6, 0x00}, +-{0x65a7, 0x04}, +-{0x65a8, 0x05}, +-{0x65a9, 0x00}, +-{0x65aa, 0x05}, +-{0x65ab, 0x0a}, +-{0x65ac, 0x03}, +-{0x65ad, 0x90}, +-{0x65ae, 0x05}, +-{0x65af, 0x06}, +-{0x65b0, 0x05}, +-{0x65b1, 0x04}, +-{0x65b2, 0x00}, +-{0x65b3, 0x04}, +-{0x65b4, 0x05}, +-{0x65b5, 0x00}, +-{0x65b6, 0x05}, +-{0x65b7, 0x0a}, +-{0x65b8, 0x02}, +-{0x65b9, 0x90}, +-{0x65ba, 0x05}, +-{0x65bb, 0x06}, +-{0x65bc, 0x00}, +-{0x65bd, 0xff}, +-{0x65be, 0x04}, +-{0x65bf, 0x70}, +-{0x65c0, 0x08}, +-{0x65c1, 0x76}, +-{0x65c2, 0x00}, +-{0x65c3, 0xff}, +-{0x65c4, 0x08}, +-{0x65c5, 0x76}, +-{0x65c6, 0x04}, +-{0x65c7, 0x0c}, +-{0x65c8, 0x05}, +-{0x65c9, 0x07}, +-{0x65ca, 0x04}, +-{0x65cb, 0x04}, +-{0x65cc, 0x00}, +-{0x65cd, 0xff}, +-{0x65ce, 0x00}, +-{0x65cf, 0xff}, +-{0x65d0, 0x00}, +-{0x65d1, 0xff}, +-{0x30eb, 0x04}, +-{0x30ed, 0x5a}, +-{0x30ee, 0x01}, +-{0x30ef, 0x80}, +-{0x30f1, 0x5a}, +-{0x303a, 0x04}, +-{0x303b, 0x7f}, +-{0x303c, 0xfe}, +-{0x303d, 0x19}, +-{0x303e, 0xd7}, +-{0x303f, 0x09}, +-{0x3040, 0x78}, +-{0x3042, 0x05}, +-{0x328a, 0x10}, +-{0x3012, 0x01}, // stream on +-}; +- +-/* DVP_1280x1080_COMB12_raw 30fps */ +-static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { +-/* ov10640_R1E_setting_3x12_1280x1080_MIPIin_4lane_raw */ +-//{0x3013, 0x01}, +-{OV10640_DELAY, 10}, +-{0x328a, 0x11}, +-{0x313f, 0x80}, +-{0x3132, 0x24}, +- +-/* PLL settings */ +-{0x3000, 0x03}, +-{0x3001, 0x60}, +-{0x3002, 0x0f}, +-{0x3004, 0x03}, +-{0x3005, 0x44}, +-{0x3006, 0x07}, +-{0x3007, 0x01}, +- +-{0x3014, 0x03}, +-{0x3023, 0x05}, +-{0x3032, 0x35}, +-{0x3033, 0x04}, +-{0x3054, 0x00}, +-{0x3055, 0x03}, +-{0x3056, 0x01}, +-{0x3057, 0xff}, +-{0x3058, 0xaf}, +-{0x3059, 0x44}, +-{0x305a, 0x02}, +-{0x305b, 0x00}, +-{0x305c, 0x30}, +-{0x305d, 0x9c}, +-{0x305e, 0x19}, +-{0x305f, 0x18}, +-{0x3060, 0xf9}, +-{0x3061, 0xf0}, +-{0x308a, 0x00}, +-{0x308b, 0x00}, +-#ifdef OV10640_FSIN_ENABLE +-{0x308c, 0xb2}, +-#else +-{0x308c, 0x03}, +-#endif +-{0x308f, 0x10}, +-{0x3090, 0x04}, /* c:enable flip and mirror */ +-{0x3091, 0x00}, +-{0x30eb, 0x00}, +-{0x30a3, 0x08}, +-{0x30ad, 0x03}, +-{0x30ae, 0x80}, +-{0x30af, 0x80}, +-{0x30b0, 0xff}, +-{0x30b1, 0x3f}, +-{0x30b2, 0x22}, +-{0x30b9, 0x22}, +-{0x30bb, 0x00}, +-{0x30bc, 0x00}, +-{0x30bd, 0x00}, +-{0x30be, 0x00}, +-{0x30bf, 0x00}, +-{0x30c0, 0x00}, +-{0x30c1, 0x00}, +-{0x30c2, 0x00}, +-{0x30c3, 0x00}, +-{0x30c4, 0x80}, +-{0x30c5, 0x00}, +-{0x30c6, 0x80}, +-{0x30c7, 0x00}, +-{0x30c8, 0x80}, +-{0x3119, 0x49}, +-{0x311a, 0x01}, +-{0x311b, 0x4a}, +- +-/* Crop Setting */ +-{0x3074, 0x00}, // crop_h_start +-{0x3075, 0x00}, +-{0x3076, 0x00}, // crop_v_start +-{0x3077, 0xf0}, +-{0x3078, 0x05}, // crop_h_end +-{0x3079, 0x09}, +-{0x307a, 0x04}, // crop_v_end +-{0x307b, 0x18}, +-{0x307c, 0x05}, // dvp_h_size +-{0x307d, 0x08}, +-{0x307e, 0x03}, // dvp_v_size +-{0x307f, 0x28}, +-{0x3080, 0x07}, // hts +-{0x3081, 0x44}, +-{0x3082, 0x03}, // vts +-{0x3083, 0x5c}, +-{0x3084, 0x00}, // win_hoffs +-{0x3085, 0x00}, +-{0x3086, 0x00}, // win_voffs +-{0x3087, 0x00}, +- +-{0x3088, 0x00}, +-{0x3089, 0x40}, +-{0x308d, 0x92}, +-{0x3094, 0xa5}, +-{0x30e6, 0x04}, +-{0x30e7, 0x48}, +-{0x30e8, 0x04}, +-{0x30e9, 0x48}, +-{0x30e9, 0x05}, +-{0x30ec, 0x01}, +-{0x30fa, 0x06}, +-{0x3120, 0x00}, +-{0x3121, 0x20}, /* VSYNC delay */ +-{0x3122, 0x00}, +-{0x3127, 0x43}, /* 43 :dpc off, 63 */ +-{0x3128, 0xc0}, +-#ifdef OV10640_DISPLAY_PATTERN +-{0x3129, 0x80}, +-#else +-{0x3129, 0x00}, +-#endif +-{0x31be, 0x00}, +-{0x30a5, 0x78}, +-{0x30a6, 0x40}, +-{0x30a7, 0x78}, +-{0x30a8, 0x80}, +-{0x30a9, 0x78}, +-{0x30aa, 0xe0}, +-{0x30ab, 0xf9}, +-{0x30ac, 0xc0}, +-{0x3440, 0x04}, +-{0x3444, 0x28}, +-{0x344e, 0x2c}, +-{0x3457, 0x33}, +-{0x345e, 0x38}, +-{0x3461, 0xa8}, +-{0x7002, 0xaa}, +-{0x7001, 0xdf}, +-{0x7048, 0x00}, +-{0x7049, 0x02}, +-{0x704a, 0x02}, +-{0x704b, 0x00}, +-{0x704c, 0x01}, +-{0x704d, 0x00}, +-{0x7043, 0x04}, +-{0x7040, 0x3c}, +-{0x7047, 0x00}, +-{0x7044, 0x01}, +-{0x7000, 0x1f}, +-{0x7084, 0x01}, +-{0x7085, 0x03}, +-{0x7086, 0x02}, +-{0x7087, 0x40}, +-{0x7088, 0x01}, +-{0x7089, 0x20}, +-{0x707f, 0x04}, +-{0x707c, 0x3c}, +-{0x7083, 0x00}, +-{0x7080, 0x01}, +-{0x7003, 0xdf}, +-{0x70c0, 0x00}, +-{0x70c1, 0x02}, +-{0x70c2, 0x02}, +-{0x70c3, 0x00}, +-{0x70c4, 0x01}, +-{0x70c5, 0x00}, +-{0x70b8, 0x03}, +-{0x70b9, 0x98}, +-{0x70bc, 0x00}, +-{0x70bd, 0x80}, +-{0x7004, 0x02}, +-{0x7005, 0x00}, +-{0x7006, 0x01}, +-{0x7007, 0x80}, +-{0x7008, 0x02}, +-{0x7009, 0x00}, +-{0x700a, 0x04}, +-{0x700b, 0x00}, +-{0x700e, 0x00}, +-{0x700f, 0x60}, +-{0x701a, 0x02}, +-{0x701b, 0x00}, +-{0x701c, 0x01}, +-{0x701d, 0x80}, +-{0x701e, 0x02}, +-{0x701f, 0x00}, +-{0x7020, 0x04}, +-{0x7021, 0x00}, +-{0x7024, 0x00}, +-{0x7025, 0x60}, +-{0x70e7, 0x00}, +-{0x70e4, 0x10}, +-{0x70e5, 0x00}, +-{0x70e6, 0x00}, +-{0x70eb, 0x00}, +-{0x70e8, 0x10}, +-{0x70e9, 0x00}, +-{0x70ea, 0x00}, +-{0x70ef, 0x00}, +-{0x70ec, 0xfd}, +-{0x70ed, 0x00}, +-{0x70ee, 0x00}, +-{0x70eb, 0x00}, +-{0x70f0, 0xfd}, +-{0x70f1, 0x00}, +-{0x70f2, 0x00}, +-{0x30fb, 0x06}, +-{0x30fc, 0x80}, +-{0x30fd, 0x02}, +-{0x30fe, 0x93}, +-{0x6000, 0xc1}, +-{0x6001, 0xb9}, +-{0x6002, 0xba}, +-{0x6003, 0xa4}, +-{0x6004, 0xb5}, +-{0x6005, 0xa0}, +-{0x6006, 0x82}, +-{0x6007, 0xa7}, +-{0x6008, 0xb7}, +-{0x6009, 0x5c}, +-{0x600a, 0x9e}, +-{0x600b, 0xc0}, +-{0x600c, 0xd2}, +-{0x600d, 0x33}, +-{0x600e, 0xcc}, +-{0x600f, 0xe2}, +-{0x6010, 0xc1}, +-{0x6011, 0xab}, +-{0x6012, 0xb7}, +-{0x6013, 0x00}, +-{0x6014, 0x00}, +-{0x6015, 0x00}, +-{0x6016, 0x00}, +-{0x6017, 0x00}, +-{0x6018, 0x00}, +-{0x6019, 0x00}, +-{0x601a, 0x00}, +-{0x601b, 0x00}, +-{0x601c, 0x00}, +-{0x601d, 0x00}, +-{0x601e, 0x9c}, +-{0x601f, 0x94}, +-{0x6020, 0x90}, +-{0x6021, 0xc5}, +-{0x6022, 0x01}, +-{0x6023, 0x54}, +-{0x6024, 0x2a}, +-{0x6025, 0x61}, +-{0x6026, 0xd2}, +-{0x6027, 0xcc}, +-{0x6028, 0x04}, +-{0x6029, 0x35}, +-{0x602a, 0xb1}, +-{0x602b, 0xb2}, +-{0x602c, 0xb3}, +-{0x602d, 0xd2}, +-{0x602e, 0xd3}, +-{0x602f, 0x12}, +-{0x6030, 0x31}, +-{0x6031, 0xcc}, +-{0x6032, 0x06}, +-{0x6033, 0xd2}, +-{0x6034, 0xc4}, +-{0x6035, 0xce}, +-{0x6036, 0x18}, +-{0x6037, 0xcf}, +-{0x6038, 0x1e}, +-{0x6039, 0xd0}, +-{0x603a, 0x24}, +-{0x603b, 0xc5}, +-{0x603c, 0xd2}, +-{0x603d, 0xbc}, +-{0x603e, 0xcc}, +-{0x603f, 0x52}, +-{0x6040, 0x2b}, +-{0x6041, 0xd2}, +-{0x6042, 0xd3}, +-{0x6043, 0x02}, +-{0x6044, 0xcc}, +-{0x6045, 0x0a}, +-{0x6046, 0xd2}, +-{0x6047, 0xd3}, +-{0x6048, 0x0f}, +-{0x6049, 0x1a}, +-{0x604a, 0x2a}, +-{0x604b, 0xd4}, +-{0x604c, 0xf6}, +-{0x604d, 0xba}, +-{0x604e, 0x56}, +-{0x604f, 0xd3}, +-{0x6050, 0x2e}, +-{0x6051, 0x54}, +-{0x6052, 0x26}, +-{0x6053, 0xd2}, +-{0x6054, 0xcc}, +-{0x6055, 0x60}, +-{0x6056, 0xd2}, +-{0x6057, 0xd3}, +-{0x6058, 0x27}, +-{0x6059, 0x27}, +-{0x605a, 0x08}, +-{0x605b, 0x1a}, +-{0x605c, 0xcc}, +-{0x605d, 0x88}, +-{0x605e, 0x00}, +-{0x605f, 0x12}, +-{0x6060, 0x2c}, +-{0x6061, 0x60}, +-{0x6062, 0xc2}, +-{0x6063, 0xb9}, +-{0x6064, 0xa5}, +-{0x6065, 0xb5}, +-{0x6066, 0xa0}, +-{0x6067, 0x82}, +-{0x6068, 0x5c}, +-{0x6069, 0xd4}, +-{0x606a, 0xbe}, +-{0x606b, 0xd4}, +-{0x606c, 0xbe}, +-{0x606d, 0xd3}, +-{0x606e, 0x01}, +-{0x606f, 0x7c}, +-{0x6070, 0x74}, +-{0x6071, 0x00}, +-{0x6072, 0x61}, +-{0x6073, 0x2a}, +-{0x6074, 0xd2}, +-{0x6075, 0xcc}, +-{0x6076, 0xdf}, +-{0x6077, 0xc6}, +-{0x6078, 0x35}, +-{0x6079, 0xd2}, +-{0x607a, 0xcc}, +-{0x607b, 0x06}, +-{0x607c, 0x31}, +-{0x607d, 0xd2}, +-{0x607e, 0xc5}, +-{0x607f, 0xbb}, +-{0x6080, 0xcc}, +-{0x6081, 0x18}, +-{0x6082, 0xc6}, +-{0x6083, 0xd2}, +-{0x6084, 0xbd}, +-{0x6085, 0xcc}, +-{0x6086, 0x52}, +-{0x6087, 0x2b}, +-{0x6088, 0xd2}, +-{0x6089, 0xd3}, +-{0x608a, 0x01}, +-{0x608b, 0xcc}, +-{0x608c, 0x0a}, +-{0x608d, 0xd2}, +-{0x608e, 0xd3}, +-{0x608f, 0x0f}, +-{0x6090, 0x1a}, +-{0x6091, 0x71}, +-{0x6092, 0x2a}, +-{0x6093, 0xd4}, +-{0x6094, 0xf6}, +-{0x6095, 0xd3}, +-{0x6096, 0x22}, +-{0x6097, 0x70}, +-{0x6098, 0xca}, +-{0x6099, 0x26}, +-{0x609a, 0xd2}, +-{0x609b, 0xcc}, +-{0x609c, 0x60}, +-{0x609d, 0xd2}, +-{0x609e, 0xd3}, +-{0x609f, 0x27}, +-{0x60a0, 0x27}, +-{0x60a1, 0x08}, +-{0x60a2, 0x1a}, +-{0x60a3, 0xcc}, +-{0x60a4, 0x88}, +-{0x60a5, 0x12}, +-{0x60a6, 0x2c}, +-{0x60a7, 0x60}, +-{0x60a8, 0x00}, +-{0x60a9, 0x00}, +-{0x60aa, 0xc0}, +-{0x60ab, 0xb9}, +-{0x60ac, 0xa3}, +-{0x60ad, 0xb5}, +-{0x60ae, 0x00}, +-{0x60af, 0xa0}, +-{0x60b0, 0x82}, +-{0x60b1, 0x5c}, +-{0x60b2, 0xd4}, +-{0x60b3, 0xa0}, +-{0x60b4, 0x9d}, +-{0x60b5, 0xd3}, +-{0x60b6, 0x26}, +-{0x60b7, 0xb0}, +-{0x60b8, 0xb7}, +-{0x60b9, 0x00}, +-{0x60ba, 0xd3}, +-{0x60bb, 0x0a}, +-{0x60bc, 0xd3}, +-{0x60bd, 0x10}, +-{0x60be, 0x9c}, +-{0x60bf, 0x94}, +-{0x60c0, 0x90}, +-{0x60c1, 0xc8}, +-{0x60c2, 0xba}, +-{0x60c3, 0x7c}, +-{0x60c4, 0x74}, +-{0x60c5, 0x00}, +-{0x60c6, 0x61}, +-{0x60c7, 0x2a}, +-{0x60c8, 0x00}, +-{0x60c9, 0xd2}, +-{0x60ca, 0xcc}, +-{0x60cb, 0xdf}, +-{0x60cc, 0xc4}, +-{0x60cd, 0x35}, +-{0x60ce, 0xd2}, +-{0x60cf, 0xcc}, +-{0x60d0, 0x06}, +-{0x60d1, 0x31}, +-{0x60d2, 0xd2}, +-{0x60d3, 0xcc}, +-{0x60d4, 0x15}, +-{0x60d5, 0xd2}, +-{0x60d6, 0xbb}, +-{0x60d7, 0xcc}, +-{0x60d8, 0x1a}, +-{0x60d9, 0xd2}, +-{0x60da, 0xbe}, +-{0x60db, 0xce}, +-{0x60dc, 0x52}, +-{0x60dd, 0xcf}, +-{0x60de, 0x56}, +-{0x60df, 0xd0}, +-{0x60e0, 0x5b}, +-{0x60e1, 0x2b}, +-{0x60e2, 0xd2}, +-{0x60e3, 0xd3}, +-{0x60e4, 0x01}, +-{0x60e5, 0xcc}, +-{0x60e6, 0x0a}, +-{0x60e7, 0xd2}, +-{0x60e8, 0xd3}, +-{0x60e9, 0x0f}, +-{0x60ea, 0xd9}, +-{0x60eb, 0xc7}, +-{0x60ec, 0xda}, +-{0x60ed, 0xce}, +-{0x60ee, 0x1a}, +-{0x60ef, 0xd4}, +-{0x60f0, 0xf6}, +-{0x60f1, 0xd4}, +-{0x60f2, 0xa9}, +-{0x60f3, 0x27}, +-{0x60f4, 0x00}, +-{0x60f5, 0xd2}, +-{0x60f6, 0xcc}, +-{0x60f7, 0x60}, +-{0x60f8, 0xd2}, +-{0x60f9, 0xd3}, +-{0x60fa, 0x2d}, +-{0x60fb, 0xd9}, +-{0x60fc, 0xdf}, +-{0x60fd, 0xda}, +-{0x60fe, 0xe5}, +-{0x60ff, 0x1a}, +-{0x6100, 0x12}, +-{0x6101, 0xcc}, +-{0x6102, 0x88}, +-{0x6103, 0xd6}, +-{0x6104, 0xb1}, +-{0x6105, 0xb9}, +-{0x6106, 0xba}, +-{0x6107, 0xaf}, +-{0x6108, 0xdc}, +-{0x6109, 0x00}, +-{0x610a, 0xcb}, +-{0x610b, 0xc3}, +-{0x610c, 0xb9}, +-{0x610d, 0xa4}, +-{0x610e, 0xb5}, +-{0x610f, 0x5c}, +-{0x6110, 0x12}, +-{0x6111, 0x2a}, +-{0x6112, 0x61}, +-{0x6113, 0xd2}, +-{0x6114, 0xcc}, +-{0x6115, 0xdf}, +-{0x6116, 0xc7}, +-{0x6117, 0x35}, +-{0x6118, 0xd2}, +-{0x6119, 0xcc}, +-{0x611a, 0x06}, +-{0x611b, 0x31}, +-{0x611c, 0xc6}, +-{0x611d, 0xbb}, +-{0x611e, 0xd2}, +-{0x611f, 0xcc}, +-{0x6120, 0x18}, +-{0x6121, 0xd2}, +-{0x6122, 0xbe}, +-{0x6123, 0xcc}, +-{0x6124, 0x52}, +-{0x6125, 0xc7}, +-{0x6126, 0xd2}, +-{0x6127, 0xcc}, +-{0x6128, 0x0a}, +-{0x6129, 0xb4}, +-{0x612a, 0xb7}, +-{0x612b, 0x94}, +-{0x612c, 0xd2}, +-{0x612d, 0x12}, +-{0x612e, 0x26}, +-{0x612f, 0x42}, +-{0x6130, 0x46}, +-{0x6131, 0x42}, +-{0x6132, 0xd3}, +-{0x6133, 0x20}, +-{0x6134, 0x27}, +-{0x6135, 0x00}, +-{0x6136, 0x1a}, +-{0x6137, 0xcc}, +-{0x6138, 0x88}, +-{0x6139, 0x60}, +-{0x613a, 0x2c}, +-{0x613b, 0x12}, +-{0x613c, 0x40}, +-{0x613d, 0xb8}, +-{0x613e, 0x90}, +-{0x613f, 0xd5}, +-{0x6140, 0xba}, +-{0x6141, 0x00}, +-{0x6142, 0x00}, +-{0x6143, 0x00}, +-{0x6144, 0x00}, +-{0x6145, 0x00}, +-{0x6146, 0x00}, +-{0x6147, 0xaa}, +-{0x6148, 0xb7}, +-{0x6149, 0x00}, +-{0x614a, 0x00}, +-{0x614b, 0x00}, +-{0x614c, 0x00}, +-{0x614d, 0xa6}, +-{0x614e, 0xb7}, +-{0x614f, 0x00}, +-{0x6150, 0xd5}, +-{0x6151, 0x00}, +-{0x6152, 0x71}, +-{0x6153, 0xd3}, +-{0x6154, 0x30}, +-{0x6155, 0xba}, +-{0x6156, 0x00}, +-{0x6157, 0x00}, +-{0x6158, 0x00}, +-{0x6159, 0x00}, +-{0x615a, 0xd3}, +-{0x615b, 0x10}, +-{0x615c, 0x70}, +-{0x615d, 0x00}, +-{0x615e, 0x00}, +-{0x615f, 0x00}, +-{0x6160, 0x00}, +-{0x6161, 0xd5}, +-{0x6162, 0xba}, +-{0x6163, 0xb0}, +-{0x6164, 0xb7}, +-{0x6165, 0x00}, +-{0x6166, 0x9d}, +-{0x6167, 0xd3}, +-{0x6168, 0x0a}, +-{0x6169, 0x9d}, +-{0x616a, 0x9d}, +-{0x616b, 0xd3}, +-{0x616c, 0x10}, +-{0x616d, 0x9c}, +-{0x616e, 0x94}, +-{0x616f, 0x90}, +-{0x6170, 0xc8}, +-{0x6171, 0xba}, +-{0x6172, 0xd2}, +-{0x6173, 0x60}, +-{0x6174, 0x2c}, +-{0x6175, 0x50}, +-{0x6176, 0x11}, +-{0x6177, 0xcc}, +-{0x6178, 0x00}, +-{0x6179, 0x30}, +-{0x617a, 0xd5}, +-{0x617b, 0x00}, +-{0x617c, 0xba}, +-{0x617d, 0xb0}, +-{0x617e, 0xb7}, +-{0x617f, 0x00}, +-{0x6180, 0x9d}, +-{0x6181, 0xd3}, +-{0x6182, 0x0a}, +-{0x6183, 0x9d}, +-{0x6184, 0x9d}, +-{0x6185, 0xd3}, +-{0x6186, 0x10}, +-{0x6187, 0x9c}, +-{0x6188, 0x94}, +-{0x6189, 0x90}, +-{0x618a, 0xc8}, +-{0x618b, 0xba}, +-{0x618c, 0xd5}, +-{0x618d, 0x00}, +-{0x618e, 0x01}, +-{0x618f, 0x1a}, +-{0x6190, 0xcc}, +-{0x6191, 0x12}, +-{0x6192, 0x12}, +-{0x6193, 0x00}, +-{0x6194, 0xcc}, +-{0x6195, 0x9c}, +-{0x6196, 0xd2}, +-{0x6197, 0xcc}, +-{0x6198, 0x60}, +-{0x6199, 0xd2}, +-{0x619a, 0x04}, +-{0x619b, 0xd5}, +-{0x619c, 0x1a}, +-{0x619d, 0xcc}, +-{0x619e, 0x12}, +-{0x619f, 0x00}, +-{0x61a0, 0x12}, +-{0x61a1, 0xcc}, +-{0x61a2, 0x9c}, +-{0x61a3, 0xd2}, +-{0x61a4, 0xcc}, +-{0x61a5, 0x60}, +-{0x61a6, 0xd2}, +-{0x61a7, 0x1a}, +-{0x61a8, 0xcc}, +-{0x61a9, 0x12}, +-{0x61aa, 0x00}, +-{0x61ab, 0x12}, +-{0x61ac, 0xcc}, +-{0x61ad, 0x9c}, +-{0x61ae, 0xd2}, +-{0x61af, 0xcc}, +-{0x61b0, 0x60}, +-{0x61b1, 0xd2}, +-{0x61b2, 0x1a}, +-{0x61b3, 0xcc}, +-{0x61b4, 0x12}, +-{0x61b5, 0x00}, +-{0x61b6, 0x12}, +-{0x61b7, 0xcc}, +-{0x61b8, 0x9c}, +-{0x61b9, 0xd2}, +-{0x61ba, 0xcc}, +-{0x61bb, 0x60}, +-{0x61bc, 0xd2}, +-{0x61bd, 0xd5}, +-{0x61be, 0x1a}, +-{0x61bf, 0xcc}, +-{0x61c0, 0x12}, +-{0x61c1, 0x12}, +-{0x61c2, 0x00}, +-{0x61c3, 0xcc}, +-{0x61c4, 0x8a}, +-{0x61c5, 0xd2}, +-{0x61c6, 0xcc}, +-{0x61c7, 0x74}, +-{0x61c8, 0xd2}, +-{0x61c9, 0xd5}, +-{0x61ca, 0x1a}, +-{0x61cb, 0xcc}, +-{0x61cc, 0x12}, +-{0x61cd, 0x00}, +-{0x61ce, 0x12}, +-{0x61cf, 0xcc}, +-{0x61d0, 0x8a}, +-{0x61d1, 0xd2}, +-{0x61d2, 0xcc}, +-{0x61d3, 0x74}, +-{0x61d4, 0xd2}, +-{0x61d5, 0x1a}, +-{0x61d6, 0xcc}, +-{0x61d7, 0x12}, +-{0x61d8, 0x00}, +-{0x61d9, 0x12}, +-{0x61da, 0xcc}, +-{0x61db, 0x8a}, +-{0x61dc, 0xd2}, +-{0x61dd, 0xcc}, +-{0x61de, 0x74}, +-{0x61df, 0xd2}, +-{0x61e0, 0x1a}, +-{0x61e1, 0xcc}, +-{0x61e2, 0x12}, +-{0x61e3, 0x00}, +-{0x61e4, 0x12}, +-{0x61e5, 0xcc}, +-{0x61e6, 0x8a}, +-{0x61e7, 0xd2}, +-{0x61e8, 0xcc}, +-{0x61e9, 0x74}, +-{0x61ea, 0xd2}, +-{0x61eb, 0xd5}, +-{0x61ec, 0xcc}, +-{0x61ed, 0x12}, +-{0x61ee, 0x00}, +-{0x61ef, 0x12}, +-{0x61f0, 0xcc}, +-{0x61f1, 0x9c}, +-{0x61f2, 0xd5}, +-{0x6400, 0x04}, +-{0x6401, 0x04}, +-{0x6402, 0x00}, +-{0x6403, 0xff}, +-{0x6404, 0x00}, +-{0x6405, 0x08}, +-{0x6406, 0x00}, +-{0x6407, 0xff}, +-{0x6408, 0x04}, +-{0x6409, 0x70}, +-{0x640a, 0x00}, +-{0x640b, 0xff}, +-{0x640c, 0x05}, +-{0x640d, 0x14}, +-{0x640e, 0x04}, +-{0x640f, 0x71}, +-{0x6410, 0x05}, +-{0x6411, 0x74}, +-{0x6412, 0x00}, +-{0x6413, 0xff}, +-{0x6414, 0x05}, +-{0x6415, 0x54}, +-{0x6416, 0x05}, +-{0x6417, 0x44}, +-{0x6418, 0x04}, +-{0x6419, 0x30}, +-{0x641a, 0x05}, +-{0x641b, 0x46}, +-{0x641c, 0x00}, +-{0x641d, 0xff}, +-{0x641e, 0x04}, +-{0x641f, 0x31}, +-{0x6420, 0x04}, +-{0x6421, 0x30}, +-{0x6422, 0x00}, +-{0x6423, 0xff}, +-{0x6424, 0x04}, +-{0x6425, 0x20}, +-{0x6426, 0x05}, +-{0x6427, 0x06}, +-{0x6428, 0x00}, +-{0x6429, 0xff}, +-{0x642a, 0x08}, +-{0x642b, 0x2a}, +-{0x642c, 0x08}, +-{0x642d, 0x31}, +-{0x642e, 0x00}, +-{0x642f, 0xff}, +-{0x6430, 0x08}, +-{0x6431, 0x2a}, +-{0x6432, 0x08}, +-{0x6433, 0x31}, +-{0x6434, 0x06}, +-{0x6435, 0x20}, +-{0x6436, 0x07}, +-{0x6437, 0x00}, +-{0x6438, 0x08}, +-{0x6439, 0x40}, +-{0x643a, 0x00}, +-{0x643b, 0xff}, +-{0x643c, 0x08}, +-{0x643d, 0x2a}, +-{0x643e, 0x08}, +-{0x643f, 0x36}, +-{0x6440, 0x06}, +-{0x6441, 0x10}, +-{0x6442, 0x07}, +-{0x6443, 0x00}, +-{0x6444, 0x08}, +-{0x6445, 0x40}, +-{0x6446, 0x00}, +-{0x6447, 0xff}, +-{0x6448, 0x08}, +-{0x6449, 0x2a}, +-{0x644a, 0x08}, +-{0x644b, 0x3b}, +-{0x644c, 0x06}, +-{0x644d, 0x00}, +-{0x644e, 0x07}, +-{0x644f, 0x00}, +-{0x6450, 0x08}, +-{0x6451, 0x40}, +-{0x6452, 0x00}, +-{0x6453, 0xff}, +-{0x6454, 0x06}, +-{0x6455, 0x00}, +-{0x6456, 0x07}, +-{0x6457, 0x05}, +-{0x6458, 0x01}, +-{0x6459, 0xaf}, +-{0x645a, 0x01}, +-{0x645b, 0x0f}, +-{0x645c, 0x01}, +-{0x645d, 0x90}, +-{0x645e, 0x01}, +-{0x645f, 0xc8}, +-{0x6460, 0x00}, +-{0x6461, 0xff}, +-{0x6462, 0x01}, +-{0x6463, 0xac}, +-{0x6464, 0x01}, +-{0x6465, 0x0c}, +-{0x6466, 0x01}, +-{0x6467, 0x90}, +-{0x6468, 0x01}, +-{0x6469, 0xe8}, +-{0x646a, 0x00}, +-{0x646b, 0xff}, +-{0x646c, 0x01}, +-{0x646d, 0xad}, +-{0x646e, 0x01}, +-{0x646f, 0x0d}, +-{0x6470, 0x01}, +-{0x6471, 0x90}, +-{0x6472, 0x01}, +-{0x6473, 0xe8}, +-{0x6474, 0x00}, +-{0x6475, 0xff}, +-{0x6476, 0x01}, +-{0x6477, 0xae}, +-{0x6478, 0x01}, +-{0x6479, 0x0e}, +-{0x647a, 0x01}, +-{0x647b, 0x90}, +-{0x647c, 0x01}, +-{0x647d, 0xe8}, +-{0x647e, 0x00}, +-{0x647f, 0xff}, +-{0x6480, 0x01}, +-{0x6481, 0xb0}, +-{0x6482, 0x01}, +-{0x6483, 0xb1}, +-{0x6484, 0x01}, +-{0x6485, 0xb2}, +-{0x6486, 0x01}, +-{0x6487, 0xb3}, +-{0x6488, 0x01}, +-{0x6489, 0xb4}, +-{0x648a, 0x01}, +-{0x648b, 0xb5}, +-{0x648c, 0x01}, +-{0x648d, 0xb6}, +-{0x648e, 0x01}, +-{0x648f, 0xb7}, +-{0x6490, 0x01}, +-{0x6491, 0xb8}, +-{0x6492, 0x01}, +-{0x6493, 0xb9}, +-{0x6494, 0x01}, +-{0x6495, 0xba}, +-{0x6496, 0x01}, +-{0x6497, 0xbb}, +-{0x6498, 0x01}, +-{0x6499, 0xbc}, +-{0x649a, 0x01}, +-{0x649b, 0xbd}, +-{0x649c, 0x01}, +-{0x649d, 0xbe}, +-{0x649e, 0x01}, +-{0x649f, 0xbf}, +-{0x64a0, 0x01}, +-{0x64a1, 0xc0}, +-{0x64a2, 0x00}, +-{0x64a3, 0xff}, +-{0x64a4, 0x06}, +-{0x64a5, 0x00}, +-{0x64a6, 0x01}, +-{0x64a7, 0xf6}, +-{0x64a8, 0x04}, +-{0x64a9, 0x30}, +-{0x64aa, 0x00}, +-{0x64ab, 0xff}, +-{0x64ac, 0x06}, +-{0x64ad, 0x10}, +-{0x64ae, 0x01}, +-{0x64af, 0xf6}, +-{0x64b0, 0x04}, +-{0x64b1, 0x30}, +-{0x64b2, 0x06}, +-{0x64b3, 0x00}, +-{0x64b4, 0x00}, +-{0x64b5, 0xff}, +-{0x64b6, 0x06}, +-{0x64b7, 0x20}, +-{0x64b8, 0x01}, +-{0x64b9, 0xf6}, +-{0x64ba, 0x04}, +-{0x64bb, 0x30}, +-{0x64bc, 0x06}, +-{0x64bd, 0x00}, +-{0x64be, 0x00}, +-{0x64bf, 0xff}, +-{0x64c0, 0x04}, +-{0x64c1, 0x31}, +-{0x64c2, 0x04}, +-{0x64c3, 0x30}, +-{0x64c4, 0x01}, +-{0x64c5, 0x20}, +-{0x64c6, 0x01}, +-{0x64c7, 0x31}, +-{0x64c8, 0x01}, +-{0x64c9, 0x32}, +-{0x64ca, 0x01}, +-{0x64cb, 0x33}, +-{0x64cc, 0x01}, +-{0x64cd, 0x34}, +-{0x64ce, 0x01}, +-{0x64cf, 0x35}, +-{0x64d0, 0x01}, +-{0x64d1, 0x36}, +-{0x64d2, 0x01}, +-{0x64d3, 0x37}, +-{0x64d4, 0x01}, +-{0x64d5, 0x38}, +-{0x64d6, 0x01}, +-{0x64d7, 0x39}, +-{0x64d8, 0x01}, +-{0x64d9, 0x3a}, +-{0x64da, 0x01}, +-{0x64db, 0x3b}, +-{0x64dc, 0x01}, +-{0x64dd, 0x3c}, +-{0x64de, 0x01}, +-{0x64df, 0x3d}, +-{0x64e0, 0x01}, +-{0x64e1, 0x3e}, +-{0x64e2, 0x01}, +-{0x64e3, 0x3f}, +-{0x64e4, 0x02}, +-{0x64e5, 0xa0}, +-{0x64e6, 0x00}, +-{0x64e7, 0xff}, +-{0x64e8, 0x04}, +-{0x64e9, 0x31}, +-{0x64ea, 0x04}, +-{0x64eb, 0x30}, +-{0x64ec, 0x01}, +-{0x64ed, 0x00}, +-{0x64ee, 0x01}, +-{0x64ef, 0x11}, +-{0x64f0, 0x01}, +-{0x64f1, 0x12}, +-{0x64f2, 0x01}, +-{0x64f3, 0x13}, +-{0x64f4, 0x01}, +-{0x64f5, 0x14}, +-{0x64f6, 0x01}, +-{0x64f7, 0x15}, +-{0x64f8, 0x01}, +-{0x64f9, 0x16}, +-{0x64fa, 0x01}, +-{0x64fb, 0x17}, +-{0x64fc, 0x01}, +-{0x64fd, 0x18}, +-{0x64fe, 0x01}, +-{0x64ff, 0x19}, +-{0x6500, 0x01}, +-{0x6501, 0x1a}, +-{0x6502, 0x01}, +-{0x6503, 0x1b}, +-{0x6504, 0x01}, +-{0x6505, 0x1c}, +-{0x6506, 0x01}, +-{0x6507, 0x1d}, +-{0x6508, 0x01}, +-{0x6509, 0x1e}, +-{0x650a, 0x01}, +-{0x650b, 0x1f}, +-{0x650c, 0x02}, +-{0x650d, 0xa0}, +-{0x650e, 0x00}, +-{0x650f, 0xff}, +-{0x6510, 0x04}, +-{0x6511, 0x20}, +-{0x6512, 0x05}, +-{0x6513, 0x86}, +-{0x6514, 0x03}, +-{0x6515, 0x0b}, +-{0x6516, 0x05}, +-{0x6517, 0x86}, +-{0x6518, 0x00}, +-{0x6519, 0x00}, +-{0x651a, 0x05}, +-{0x651b, 0x06}, +-{0x651c, 0x00}, +-{0x651d, 0x04}, +-{0x651e, 0x05}, +-{0x651f, 0x04}, +-{0x6520, 0x00}, +-{0x6521, 0x04}, +-{0x6522, 0x05}, +-{0x6523, 0x00}, +-{0x6524, 0x05}, +-{0x6525, 0x0a}, +-{0x6526, 0x03}, +-{0x6527, 0x9a}, +-{0x6528, 0x05}, +-{0x6529, 0x86}, +-{0x652a, 0x00}, +-{0x652b, 0x00}, +-{0x652c, 0x05}, +-{0x652d, 0x06}, +-{0x652e, 0x00}, +-{0x652f, 0x01}, +-{0x6530, 0x05}, +-{0x6531, 0x04}, +-{0x6532, 0x00}, +-{0x6533, 0x04}, +-{0x6534, 0x05}, +-{0x6535, 0x00}, +-{0x6536, 0x05}, +-{0x6537, 0x0a}, +-{0x6538, 0x03}, +-{0x6539, 0x99}, +-{0x653a, 0x05}, +-{0x653b, 0x06}, +-{0x653c, 0x00}, +-{0x653d, 0x00}, +-{0x653e, 0x05}, +-{0x653f, 0x04}, +-{0x6540, 0x00}, +-{0x6541, 0x04}, +-{0x6542, 0x05}, +-{0x6543, 0x00}, +-{0x6544, 0x05}, +-{0x6545, 0x0a}, +-{0x6546, 0x03}, +-{0x6547, 0x98}, +-{0x6548, 0x05}, +-{0x6549, 0x06}, +-{0x654a, 0x00}, +-{0x654b, 0x00}, +-{0x654c, 0x05}, +-{0x654d, 0x04}, +-{0x654e, 0x00}, +-{0x654f, 0x04}, +-{0x6550, 0x05}, +-{0x6551, 0x00}, +-{0x6552, 0x05}, +-{0x6553, 0x0a}, +-{0x6554, 0x03}, +-{0x6555, 0x97}, +-{0x6556, 0x05}, +-{0x6557, 0x06}, +-{0x6558, 0x05}, +-{0x6559, 0x04}, +-{0x655a, 0x00}, +-{0x655b, 0x04}, +-{0x655c, 0x05}, +-{0x655d, 0x00}, +-{0x655e, 0x05}, +-{0x655f, 0x0a}, +-{0x6560, 0x03}, +-{0x6561, 0x96}, +-{0x6562, 0x05}, +-{0x6563, 0x06}, +-{0x6564, 0x05}, +-{0x6565, 0x04}, +-{0x6566, 0x00}, +-{0x6567, 0x04}, +-{0x6568, 0x05}, +-{0x6569, 0x00}, +-{0x656a, 0x05}, +-{0x656b, 0x0a}, +-{0x656c, 0x03}, +-{0x656d, 0x95}, +-{0x656e, 0x05}, +-{0x656f, 0x06}, +-{0x6570, 0x05}, +-{0x6571, 0x04}, +-{0x6572, 0x00}, +-{0x6573, 0x04}, +-{0x6574, 0x05}, +-{0x6575, 0x00}, +-{0x6576, 0x05}, +-{0x6577, 0x0a}, +-{0x6578, 0x03}, +-{0x6579, 0x94}, +-{0x657a, 0x05}, +-{0x657b, 0x06}, +-{0x657c, 0x00}, +-{0x657d, 0x00}, +-{0x657e, 0x05}, +-{0x657f, 0x04}, +-{0x6580, 0x00}, +-{0x6581, 0x04}, +-{0x6582, 0x05}, +-{0x6583, 0x00}, +-{0x6584, 0x05}, +-{0x6585, 0x0a}, +-{0x6586, 0x03}, +-{0x6587, 0x93}, +-{0x6588, 0x05}, +-{0x6589, 0x06}, +-{0x658a, 0x00}, +-{0x658b, 0x00}, +-{0x658c, 0x05}, +-{0x658d, 0x04}, +-{0x658e, 0x00}, +-{0x658f, 0x04}, +-{0x6590, 0x05}, +-{0x6591, 0x00}, +-{0x6592, 0x05}, +-{0x6593, 0x0a}, +-{0x6594, 0x03}, +-{0x6595, 0x92}, +-{0x6596, 0x05}, +-{0x6597, 0x06}, +-{0x6598, 0x05}, +-{0x6599, 0x04}, +-{0x659a, 0x00}, +-{0x659b, 0x04}, +-{0x659c, 0x05}, +-{0x659d, 0x00}, +-{0x659e, 0x05}, +-{0x659f, 0x0a}, +-{0x65a0, 0x03}, +-{0x65a1, 0x91}, +-{0x65a2, 0x05}, +-{0x65a3, 0x06}, +-{0x65a4, 0x05}, +-{0x65a5, 0x04}, +-{0x65a6, 0x00}, +-{0x65a7, 0x04}, +-{0x65a8, 0x05}, +-{0x65a9, 0x00}, +-{0x65aa, 0x05}, +-{0x65ab, 0x0a}, +-{0x65ac, 0x03}, +-{0x65ad, 0x90}, +-{0x65ae, 0x05}, +-{0x65af, 0x06}, +-{0x65b0, 0x05}, +-{0x65b1, 0x04}, +-{0x65b2, 0x00}, +-{0x65b3, 0x04}, +-{0x65b4, 0x05}, +-{0x65b5, 0x00}, +-{0x65b6, 0x05}, +-{0x65b7, 0x0a}, +-{0x65b8, 0x02}, +-{0x65b9, 0x90}, +-{0x65ba, 0x05}, +-{0x65bb, 0x06}, +-{0x65bc, 0x00}, +-{0x65bd, 0xff}, +-{0x65be, 0x04}, +-{0x65bf, 0x70}, +-{0x65c0, 0x08}, +-{0x65c1, 0x76}, +-{0x65c2, 0x00}, +-{0x65c3, 0xff}, +-{0x65c4, 0x08}, +-{0x65c5, 0x76}, +-{0x65c6, 0x04}, +-{0x65c7, 0x0c}, +-{0x65c8, 0x05}, +-{0x65c9, 0x07}, +-{0x65ca, 0x04}, +-{0x65cb, 0x04}, +-{0x65cc, 0x00}, +-{0x65cd, 0xff}, +-{0x65ce, 0x00}, +-{0x65cf, 0xff}, +-{0x65d0, 0x00}, +-{0x65d1, 0xff}, +-{0x30eb, 0x04}, +-{0x30ed, 0x5a}, +-{0x30ee, 0x01}, +-{0x30ef, 0x80}, +-{0x30f1, 0x5a}, +-{0x303a, 0x04}, +-{0x303b, 0x7f}, +-{0x303c, 0xfe}, +-{0x303d, 0x19}, +-{0x303e, 0xd7}, +-{0x303f, 0x09}, +-{0x3040, 0x78}, +-{0x3042, 0x05}, +-{0x328a, 0x10}, +- +-{0x3291, 0x03}, /* 7:enable flip and mirror offset may on 20150330 */ +- +-/* change settings to 1280x1080 COMB12 30 fps, 96MHz */ +-{0x3012, 0x0}, +-{0x3000, 0x3}, +-{0x3001, 0x50}, +-{0x3002, 0x0a}, +-{0x3004, 0x3}, +-{0x3005, 0x48}, +-{0x3006, 0x7}, +-{0x308f, 0x10}, +-{0x3127, 0x63}, +-{0x3074, OV10640_X_START >> 8}, +-{0x3075, OV10640_X_START & 0xff}, +-{0x3076, OV10640_Y_START >> 8}, +-{0x3077, OV10640_Y_START & 0xff}, +-{0x3078, OV10640_X_END >> 8}, +-{0x3079, OV10640_X_END & 0xff}, +-{0x307a, OV10640_Y_END >> 8}, +-{0x307b, OV10640_Y_END & 0xff}, +-{0x307c, OV10640_MAX_WIDTH >> 8}, +-{0x307d, OV10640_MAX_WIDTH & 0xff}, +-{0x307e, OV10640_MAX_HEIGHT >> 8}, +-{0x307f, OV10640_MAX_HEIGHT & 0xff}, +-{0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS +-{0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, +-{0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS +-{0x3083, (OV10640_SENSOR_HEIGHT + 208) & 0xff}, +-{0x3084, 0x0}, +-{0x3085, 0x0}, +-{0x3086, 0x0}, +-{0x3087, 0x0}, +-{0x346d, 0x14}, +-{0x3444, 0x28}, +-{0x3091, 0x0}, +-{0x3119, 0x44}, // COMB12 +-{0x3012, 0x1}, +-}; ++#include "ov10640_r1d.h" ++#include "ov10640_r1e.h" ++#include "ov10640_r1f.h" +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1d.h b/drivers/media/i2c/soc_camera/ov10640_r1d.h +new file mode 100644 +index 0000000..374b6d1 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ov10640_r1d.h +@@ -0,0 +1,1240 @@ ++/* ++ * OmniVision ov10640 sensor camera wizard 1280x1080@30/BGGR/BT601/12bit ++ * ++ * Copyright (C) 2015-2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++/* DVP_1280x960_COMB12_raw 30fps */ ++static const struct ov10640_reg ov10640_regs_wizard_r1d[] = { ++//{0x3013, 0x01}, ++//{OV10640_DELAY, 10}, ++{0x328a, 0x01}, ++{0x313f, 0x80}, ++{0x3132, 0x24}, ++{0x3000, 0x03}, ++{0x3001, 0x38}, ++{0x3002, 0x07}, ++{0x3004, 0x03}, ++{0x3005, 0x38}, ++{0x3006, 0x07}, ++{0x3007, 0x01}, ++{0x3014, 0x03}, ++{0x3023, 0x05}, ++{0x3032, 0x34}, ++{0x3033, 0xfb}, ++{0x3054, 0x00}, ++{0x3055, 0x0f}, ++{0x3056, 0x01}, ++{0x3057, 0xff}, ++{0x3058, 0xbf}, ++{0x3059, 0x44}, ++{0x305a, 0x02}, ++{0x305b, 0x00}, ++{0x305c, 0x30}, ++{0x305d, 0x1d}, ++{0x305e, 0x16}, ++{0x305f, 0x18}, ++{0x3060, 0xf9}, ++{0x3061, 0xf0}, ++#ifdef OV10640_FSIN_ENABLE ++{0x308c, 0xb2}, ++#else ++{0x308c, 0x03}, ++#endif ++{0x308f, 0x20}, ++{0x3090, 0x00}, ++{0x3091, 0x00}, ++{0x30eb, 0x00}, ++{0x30a3, 0x08}, ++{0x30ad, 0x03}, ++{0x30ae, 0x80}, ++{0x30af, 0x80}, ++{0x30b0, 0xff}, ++{0x30b1, 0x3f}, ++{0x30b2, 0x22}, ++{0x30b9, 0x22}, ++{0x30bb, 0x00}, ++{0x30bc, 0x00}, ++{0x30bd, 0x00}, ++{0x30be, 0x00}, ++{0x30bf, 0x00}, ++{0x30c0, 0x00}, ++{0x30c1, 0x00}, ++{0x30c2, 0x00}, ++{0x30c3, 0x00}, ++{0x30c4, 0x80}, ++{0x30c5, 0x00}, ++{0x30c6, 0x80}, ++{0x30c7, 0x00}, ++{0x30c8, 0x80}, ++{0x3119, 0x45}, ++{0x311a, 0x01}, ++{0x311b, 0x4a}, ++{0x3074, 0x00}, ++{0x3075, 0x00}, ++{0x3076, 0x00}, ++{0x3077, 0x3e}, ++{0x3078, 0x05}, ++{0x3079, 0x07}, ++{0x307a, 0x04}, ++{0x307b, 0x05}, ++{0x307c, 0x05}, ++{0x307d, 0x00}, ++{0x307e, 0x03}, ++{0x307f, 0xc0}, ++{0x3080, 0x07}, ++{0x3081, 0x43}, ++{0x3082, 0x03}, ++{0x3083, 0xec}, ++{0x3084, 0x00}, ++{0x3085, 0x02}, ++{0x3086, 0x00}, ++{0x3087, 0x04}, ++{0x3088, 0x00}, ++{0x3089, 0x40}, ++{0x308d, 0x92}, ++{0x3094, 0xa5}, ++{0x30e6, 0x03}, ++{0x30e7, 0xe8}, ++{0x30e8, 0x03}, ++{0x30e9, 0xe8}, ++{0x30e9, 0x05}, ++{0x30ec, 0x01}, ++{0x30fa, 0x06}, ++{0x3120, 0x00}, ++{0x3121, 0x01}, ++{0x3122, 0x00}, ++{0x3127, 0x63}, ++{0x3128, 0xc0}, ++#ifdef OV10640_DISPLAY_PATTERN ++{0x3129, 0x80}, ++#else ++{0x3129, 0x00}, ++#endif ++{0x31be, 0x00}, ++{0x30a5, 0x78}, ++{0x30a6, 0x40}, ++{0x30a7, 0x78}, ++{0x30a8, 0x80}, ++{0x30a9, 0x78}, ++{0x30aa, 0xe0}, ++{0x30ab, 0x79}, ++{0x30ac, 0xc0}, ++{0x3440, 0x04}, ++{0x3444, 0x28}, ++{0x344e, 0x2c}, ++{0x3457, 0x33}, ++{0x345e, 0x38}, ++{0x3461, 0xa8}, ++{0x7002, 0xaa}, ++{0x7001, 0xdf}, ++{0x7048, 0x00}, ++{0x7049, 0x02}, ++{0x704a, 0x02}, ++{0x704b, 0x00}, ++{0x704c, 0x01}, ++{0x704d, 0x00}, ++{0x7043, 0x04}, ++{0x7040, 0x3c}, ++{0x7047, 0x00}, ++{0x7044, 0x01}, ++{0x7000, 0x1f}, ++{0x7084, 0x01}, ++{0x7085, 0x03}, ++{0x7086, 0x02}, ++{0x7087, 0x40}, ++{0x7088, 0x01}, ++{0x7089, 0x20}, ++{0x707f, 0x04}, ++{0x707c, 0x3c}, ++{0x7083, 0x00}, ++{0x7080, 0x01}, ++{0x7003, 0xdf}, ++{0x70c0, 0x00}, ++{0x70c1, 0x02}, ++{0x70c2, 0x02}, ++{0x70c3, 0x00}, ++{0x70c4, 0x01}, ++{0x70c5, 0x00}, ++{0x70b8, 0x03}, ++{0x70b9, 0x98}, ++{0x70bc, 0x00}, ++{0x70bd, 0x80}, ++{0x7004, 0x02}, ++{0x7005, 0x00}, ++{0x7006, 0x01}, ++{0x7007, 0x80}, ++{0x7008, 0x02}, ++{0x7009, 0x00}, ++{0x700a, 0x04}, ++{0x700b, 0x00}, ++{0x700e, 0x00}, ++{0x700f, 0x60}, ++{0x701a, 0x02}, ++{0x701b, 0x00}, ++{0x701c, 0x01}, ++{0x701d, 0x80}, ++{0x701e, 0x02}, ++{0x701f, 0x00}, ++{0x7020, 0x04}, ++{0x7021, 0x00}, ++{0x7024, 0x00}, ++{0x7025, 0x60}, ++{0x70e7, 0x00}, ++{0x70e4, 0x10}, ++{0x70e5, 0x00}, ++{0x70e6, 0x00}, ++{0x70eb, 0x00}, ++{0x70e8, 0x10}, ++{0x70e9, 0x00}, ++{0x70ea, 0x00}, ++{0x70ef, 0x00}, ++{0x70ec, 0xfd}, ++{0x70ed, 0x00}, ++{0x70ee, 0x00}, ++{0x70eb, 0x00}, ++{0x70f0, 0xfd}, ++{0x70f1, 0x00}, ++{0x70f2, 0x00}, ++{0x30fb, 0x06}, ++{0x30fc, 0x80}, ++{0x30fd, 0x02}, ++{0x30fe, 0x93}, ++{0x6000, 0xc1}, ++{0x6001, 0xb9}, ++{0x6002, 0xba}, ++{0x6003, 0xa4}, ++{0x6004, 0xb5}, ++{0x6005, 0xa0}, ++{0x6006, 0x82}, ++{0x6007, 0xa7}, ++{0x6008, 0xb7}, ++{0x6009, 0x5c}, ++{0x600a, 0x9e}, ++{0x600b, 0xc0}, ++{0x600c, 0xd2}, ++{0x600d, 0x33}, ++{0x600e, 0xcc}, ++{0x600f, 0xde}, ++{0x6010, 0xc1}, ++{0x6011, 0xab}, ++{0x6012, 0xb7}, ++{0x6013, 0x00}, ++{0x6014, 0x00}, ++{0x6015, 0x00}, ++{0x6016, 0x00}, ++{0x6017, 0x00}, ++{0x6018, 0x00}, ++{0x6019, 0x00}, ++{0x601a, 0x00}, ++{0x601b, 0x00}, ++{0x601c, 0x00}, ++{0x601d, 0xc5}, ++{0x601e, 0x54}, ++{0x601f, 0x9c}, ++{0x6020, 0x94}, ++{0x6021, 0x90}, ++{0x6022, 0x2a}, ++{0x6023, 0x61}, ++{0x6024, 0xd2}, ++{0x6025, 0xcc}, ++{0x6026, 0x02}, ++{0x6027, 0x35}, ++{0x6028, 0xb1}, ++{0x6029, 0xb2}, ++{0x602a, 0xb3}, ++{0x602b, 0xd2}, ++{0x602c, 0xd3}, ++{0x602d, 0x0a}, ++{0x602e, 0x31}, ++{0x602f, 0xcc}, ++{0x6030, 0x05}, ++{0x6031, 0xc4}, ++{0x6032, 0xd2}, ++{0x6033, 0xce}, ++{0x6034, 0x17}, ++{0x6035, 0xcf}, ++{0x6036, 0x1d}, ++{0x6037, 0xd0}, ++{0x6038, 0x23}, ++{0x6039, 0xd2}, ++{0x603a, 0xbc}, ++{0x603b, 0xcc}, ++{0x603c, 0x51}, ++{0x603d, 0xc5}, ++{0x603e, 0xd2}, ++{0x603f, 0x00}, ++{0x6040, 0x2b}, ++{0x6041, 0xcc}, ++{0x6042, 0x09}, ++{0x6043, 0xd2}, ++{0x6044, 0x1a}, ++{0x6045, 0xcc}, ++{0x6046, 0xeb}, ++{0x6047, 0x12}, ++{0x6048, 0x2a}, ++{0x6049, 0xba}, ++{0x604a, 0x56}, ++{0x604b, 0xd3}, ++{0x604c, 0x27}, ++{0x604d, 0x54}, ++{0x604e, 0xd4}, ++{0x604f, 0xc1}, ++{0x6050, 0x26}, ++{0x6051, 0xd2}, ++{0x6052, 0x01}, ++{0x6053, 0xd3}, ++{0x6054, 0x2f}, ++{0x6055, 0x27}, ++{0x6056, 0x08}, ++{0x6057, 0x1a}, ++{0x6058, 0xcc}, ++{0x6059, 0xd9}, ++{0x605a, 0x12}, ++{0x605b, 0x2c}, ++{0x605c, 0x11}, ++{0x605d, 0x60}, ++{0x605e, 0x50}, ++{0x605f, 0xc2}, ++{0x6060, 0xb9}, ++{0x6061, 0xa5}, ++{0x6062, 0xb5}, ++{0x6063, 0xa0}, ++{0x6064, 0x82}, ++{0x6065, 0x5c}, ++{0x6066, 0xd4}, ++{0x6067, 0xc1}, ++{0x6068, 0xd4}, ++{0x6069, 0xc1}, ++{0x606a, 0xd3}, ++{0x606b, 0x01}, ++{0x606c, 0x7c}, ++{0x606d, 0x74}, ++{0x606e, 0x00}, ++{0x606f, 0x2a}, ++{0x6070, 0x61}, ++{0x6071, 0xd2}, ++{0x6072, 0xcc}, ++{0x6073, 0xde}, ++{0x6074, 0xc6}, ++{0x6075, 0xd2}, ++{0x6076, 0xcc}, ++{0x6077, 0x02}, ++{0x6078, 0x35}, ++{0x6079, 0xd3}, ++{0x607a, 0x0f}, ++{0x607b, 0x31}, ++{0x607c, 0xcc}, ++{0x607d, 0x05}, ++{0x607e, 0xc5}, ++{0x607f, 0xd2}, ++{0x6080, 0xbb}, ++{0x6081, 0xcc}, ++{0x6082, 0x17}, ++{0x6083, 0xd2}, ++{0x6084, 0xbd}, ++{0x6085, 0xcc}, ++{0x6086, 0x51}, ++{0x6087, 0xc6}, ++{0x6088, 0xd2}, ++{0x6089, 0x2b}, ++{0x608a, 0xcc}, ++{0x608b, 0x09}, ++{0x608c, 0xd2}, ++{0x608d, 0x1a}, ++{0x608e, 0xcc}, ++{0x608f, 0xeb}, ++{0x6090, 0x71}, ++{0x6091, 0x12}, ++{0x6092, 0x2a}, ++{0x6093, 0xd3}, ++{0x6094, 0x24}, ++{0x6095, 0x00}, ++{0x6096, 0x00}, ++{0x6097, 0x70}, ++{0x6098, 0xca}, ++{0x6099, 0x26}, ++{0x609a, 0xd2}, ++{0x609b, 0x01}, ++{0x609c, 0xd3}, ++{0x609d, 0x2f}, ++{0x609e, 0x27}, ++{0x609f, 0x08}, ++{0x60a0, 0x1a}, ++{0x60a1, 0x12}, ++{0x60a2, 0xcc}, ++{0x60a3, 0xd9}, ++{0x60a4, 0x60}, ++{0x60a5, 0x2c}, ++{0x60a6, 0x11}, ++{0x60a7, 0x50}, ++{0x60a8, 0x00}, ++{0x60a9, 0x00}, ++{0x60aa, 0xc0}, ++{0x60ab, 0xb9}, ++{0x60ac, 0xa3}, ++{0x60ad, 0xb5}, ++{0x60ae, 0xb5}, ++{0x60af, 0x00}, ++{0x60b0, 0xa0}, ++{0x60b1, 0x82}, ++{0x60b2, 0x5c}, ++{0x60b3, 0xd4}, ++{0x60b4, 0xa6}, ++{0x60b5, 0x9d}, ++{0x60b6, 0xd3}, ++{0x60b7, 0x34}, ++{0x60b8, 0xb0}, ++{0x60b9, 0xb7}, ++{0x60ba, 0x00}, ++{0x60bb, 0xd3}, ++{0x60bc, 0x0a}, ++{0x60bd, 0xd3}, ++{0x60be, 0x10}, ++{0x60bf, 0x9c}, ++{0x60c0, 0x94}, ++{0x60c1, 0x90}, ++{0x60c2, 0xc8}, ++{0x60c3, 0xba}, ++{0x60c4, 0x7c}, ++{0x60c5, 0x74}, ++{0x60c6, 0x00}, ++{0x60c7, 0x2a}, ++{0x60c8, 0x61}, ++{0x60c9, 0x00}, ++{0x60ca, 0xd2}, ++{0x60cb, 0xcc}, ++{0x60cc, 0xde}, ++{0x60cd, 0xc4}, ++{0x60ce, 0xd2}, ++{0x60cf, 0xcc}, ++{0x60d0, 0x02}, ++{0x60d1, 0x35}, ++{0x60d2, 0xd2}, ++{0x60d3, 0xcc}, ++{0x60d4, 0x14}, ++{0x60d5, 0xd3}, ++{0x60d6, 0x09}, ++{0x60d7, 0x31}, ++{0x60d8, 0xd2}, ++{0x60d9, 0xcc}, ++{0x60da, 0x05}, ++{0x60db, 0xd2}, ++{0x60dc, 0xbb}, ++{0x60dd, 0xcc}, ++{0x60de, 0x19}, ++{0x60df, 0xd2}, ++{0x60e0, 0xbe}, ++{0x60e1, 0xce}, ++{0x60e2, 0x51}, ++{0x60e3, 0xcf}, ++{0x60e4, 0x54}, ++{0x60e5, 0xd0}, ++{0x60e6, 0x58}, ++{0x60e7, 0xd3}, ++{0x60e8, 0x01}, ++{0x60e9, 0x2b}, ++{0x60ea, 0xcc}, ++{0x60eb, 0x09}, ++{0x60ec, 0xd2}, ++{0x60ed, 0xd9}, ++{0x60ee, 0xd3}, ++{0x60ef, 0xda}, ++{0x60f0, 0xd7}, ++{0x60f1, 0x1a}, ++{0x60f2, 0xcc}, ++{0x60f3, 0xeb}, ++{0x60f4, 0x12}, ++{0x60f5, 0xd4}, ++{0x60f6, 0xaf}, ++{0x60f7, 0x27}, ++{0x60f8, 0x00}, ++{0x60f9, 0xd2}, ++{0x60fa, 0xd3}, ++{0x60fb, 0x3b}, ++{0x60fc, 0xd9}, ++{0x60fd, 0xe0}, ++{0x60fe, 0xda}, ++{0x60ff, 0xe4}, ++{0x6100, 0x1a}, ++{0x6101, 0x12}, ++{0x6102, 0xcc}, ++{0x6103, 0xd9}, ++{0x6104, 0x60}, ++{0x6105, 0x10}, ++{0x6106, 0x2c}, ++{0x6107, 0x5d}, ++{0x6108, 0xd3}, ++{0x6109, 0x0a}, ++{0x610a, 0x5c}, ++{0x610b, 0x01}, ++{0x610c, 0x50}, ++{0x610d, 0x11}, ++{0x610e, 0xd6}, ++{0x610f, 0xb7}, ++{0x6110, 0xb9}, ++{0x6111, 0xba}, ++{0x6112, 0xaf}, ++{0x6113, 0xdc}, ++{0x6114, 0xcb}, ++{0x6115, 0xc3}, ++{0x6116, 0xb9}, ++{0x6117, 0xa4}, ++{0x6118, 0xb5}, ++{0x6119, 0x5c}, ++{0x611a, 0x12}, ++{0x611b, 0x2a}, ++{0x611c, 0x61}, ++{0x611d, 0xd2}, ++{0x611e, 0xcc}, ++{0x611f, 0xe2}, ++{0x6120, 0x35}, ++{0x6121, 0xc7}, ++{0x6122, 0xd2}, ++{0x6123, 0x31}, ++{0x6124, 0xcc}, ++{0x6125, 0x05}, ++{0x6126, 0xc6}, ++{0x6127, 0xbb}, ++{0x6128, 0xd2}, ++{0x6129, 0xcc}, ++{0x612a, 0x17}, ++{0x612b, 0xd2}, ++{0x612c, 0xbe}, ++{0x612d, 0xcc}, ++{0x612e, 0x51}, ++{0x612f, 0xc7}, ++{0x6130, 0xd2}, ++{0x6131, 0xcc}, ++{0x6132, 0x09}, ++{0x6133, 0xb4}, ++{0x6134, 0xb7}, ++{0x6135, 0x94}, ++{0x6136, 0xd2}, ++{0x6137, 0x12}, ++{0x6138, 0x26}, ++{0x6139, 0x42}, ++{0x613a, 0x46}, ++{0x613b, 0x42}, ++{0x613c, 0xd3}, ++{0x613d, 0x20}, ++{0x613e, 0x27}, ++{0x613f, 0x00}, ++{0x6140, 0x1a}, ++{0x6141, 0xcc}, ++{0x6142, 0xd9}, ++{0x6143, 0x60}, ++{0x6144, 0x2c}, ++{0x6145, 0x11}, ++{0x6146, 0x40}, ++{0x6147, 0x50}, ++{0x6148, 0xb8}, ++{0x6149, 0x90}, ++{0x614a, 0xd5}, ++{0x614b, 0x00}, ++{0x614c, 0xba}, ++{0x614d, 0x00}, ++{0x614e, 0x00}, ++{0x614f, 0x00}, ++{0x6150, 0x00}, ++{0x6151, 0x00}, ++{0x6152, 0x00}, ++{0x6153, 0xaa}, ++{0x6154, 0xb7}, ++{0x6155, 0x00}, ++{0x6156, 0x00}, ++{0x6157, 0x00}, ++{0x6158, 0x00}, ++{0x6159, 0xa6}, ++{0x615a, 0xb7}, ++{0x615b, 0x00}, ++{0x615c, 0xd5}, ++{0x615d, 0x00}, ++{0x615e, 0x71}, ++{0x615f, 0xd3}, ++{0x6160, 0x3e}, ++{0x6161, 0xba}, ++{0x6162, 0x00}, ++{0x6163, 0x00}, ++{0x6164, 0x00}, ++{0x6165, 0x00}, ++{0x6166, 0xd3}, ++{0x6167, 0x10}, ++{0x6168, 0x70}, ++{0x6169, 0x00}, ++{0x616a, 0x00}, ++{0x616b, 0x00}, ++{0x616c, 0x00}, ++{0x616d, 0xd5}, ++{0x616e, 0xba}, ++{0x616f, 0xb0}, ++{0x6170, 0xb7}, ++{0x6171, 0x00}, ++{0x6172, 0x9d}, ++{0x6173, 0xd3}, ++{0x6174, 0x0a}, ++{0x6175, 0x9d}, ++{0x6176, 0x9d}, ++{0x6177, 0xd3}, ++{0x6178, 0x10}, ++{0x6179, 0x9c}, ++{0x617a, 0x94}, ++{0x617b, 0x90}, ++{0x617c, 0xc8}, ++{0x617d, 0xba}, ++{0x617e, 0xd2}, ++{0x617f, 0x30}, ++{0x6180, 0xd5}, ++{0x6181, 0x00}, ++{0x6182, 0xba}, ++{0x6183, 0xb0}, ++{0x6184, 0xb7}, ++{0x6185, 0x00}, ++{0x6186, 0x9d}, ++{0x6187, 0xd3}, ++{0x6188, 0x0a}, ++{0x6189, 0x9d}, ++{0x618a, 0x9d}, ++{0x618b, 0xd3}, ++{0x618c, 0x10}, ++{0x618d, 0x9c}, ++{0x618e, 0x94}, ++{0x618f, 0x90}, ++{0x6190, 0xc8}, ++{0x6191, 0xba}, ++{0x6192, 0xd5}, ++{0x6193, 0x00}, ++{0x6194, 0xba}, ++{0x6195, 0xb0}, ++{0x6196, 0xb7}, ++{0x6197, 0x00}, ++{0x6198, 0x9d}, ++{0x6199, 0xd3}, ++{0x619a, 0x0a}, ++{0x619b, 0x9d}, ++{0x619c, 0x9d}, ++{0x619d, 0xd3}, ++{0x619e, 0x10}, ++{0x619f, 0x9c}, ++{0x61a0, 0x94}, ++{0x61a1, 0x90}, ++{0x61a2, 0xc9}, ++{0x61a3, 0xba}, ++{0x61a4, 0xd5}, ++{0x61a5, 0x00}, ++{0x61a6, 0x00}, ++{0x61a7, 0x1a}, ++{0x61a8, 0x12}, ++{0x61a9, 0xcc}, ++{0x61aa, 0xeb}, ++{0x61ab, 0xd2}, ++{0x61ac, 0xd5}, ++{0x61ad, 0x00}, ++{0x61ae, 0x00}, ++{0x61af, 0x1a}, ++{0x61b0, 0x12}, ++{0x61b1, 0xcc}, ++{0x61b2, 0xeb}, ++{0x61b3, 0xd2}, ++{0x61b4, 0x1a}, ++{0x61b5, 0x12}, ++{0x61b6, 0xcc}, ++{0x61b7, 0xeb}, ++{0x61b8, 0xd2}, ++{0x61b9, 0x1a}, ++{0x61ba, 0x12}, ++{0x61bb, 0xcc}, ++{0x61bc, 0xeb}, ++{0x61bd, 0xd2}, ++{0x61be, 0xd5}, ++{0x61bf, 0x00}, ++{0x61c0, 0x00}, ++{0x61c1, 0x1a}, ++{0x61c2, 0xcc}, ++{0x61c3, 0xf0}, ++{0x61c4, 0x12}, ++{0x61c5, 0xd2}, ++{0x61c6, 0xd5}, ++{0x61c7, 0x00}, ++{0x61c8, 0x00}, ++{0x61c9, 0x1a}, ++{0x61ca, 0xcc}, ++{0x61cb, 0xf0}, ++{0x61cc, 0x12}, ++{0x61cd, 0xd2}, ++{0x61ce, 0x1a}, ++{0x61cf, 0xcc}, ++{0x61d0, 0xf0}, ++{0x61d1, 0x12}, ++{0x61d2, 0xd2}, ++{0x61d3, 0x1a}, ++{0x61d4, 0xcc}, ++{0x61d5, 0xf0}, ++{0x61d6, 0x12}, ++{0x61d7, 0xd2}, ++{0x61d8, 0xd5}, ++{0x6400, 0x00}, ++{0x6401, 0x08}, ++{0x6402, 0x00}, ++{0x6403, 0xff}, ++{0x6404, 0x04}, ++{0x6405, 0x61}, ++{0x6406, 0x04}, ++{0x6407, 0x70}, ++{0x6408, 0x00}, ++{0x6409, 0xff}, ++{0x640a, 0x05}, ++{0x640b, 0x14}, ++{0x640c, 0x04}, ++{0x640d, 0x70}, ++{0x640e, 0x05}, ++{0x640f, 0x74}, ++{0x6410, 0x00}, ++{0x6411, 0xff}, ++{0x6412, 0x05}, ++{0x6413, 0x54}, ++{0x6414, 0x04}, ++{0x6415, 0x30}, ++{0x6416, 0x05}, ++{0x6417, 0x44}, ++{0x6418, 0x05}, ++{0x6419, 0x47}, ++{0x641a, 0x00}, ++{0x641b, 0xff}, ++{0x641c, 0x04}, ++{0x641d, 0x31}, ++{0x641e, 0x04}, ++{0x641f, 0x30}, ++{0x6420, 0x00}, ++{0x6421, 0xff}, ++{0x6422, 0x04}, ++{0x6423, 0x20}, ++{0x6424, 0x05}, ++{0x6425, 0x06}, ++{0x6426, 0x00}, ++{0x6427, 0xff}, ++{0x6428, 0x08}, ++{0x6429, 0x29}, ++{0x642a, 0x08}, ++{0x642b, 0x30}, ++{0x642c, 0x00}, ++{0x642d, 0xff}, ++{0x642e, 0x08}, ++{0x642f, 0x29}, ++{0x6430, 0x08}, ++{0x6431, 0x30}, ++{0x6432, 0x06}, ++{0x6433, 0x20}, ++{0x6434, 0x07}, ++{0x6435, 0x00}, ++{0x6436, 0x08}, ++{0x6437, 0x3f}, ++{0x6438, 0x00}, ++{0x6439, 0xff}, ++{0x643a, 0x08}, ++{0x643b, 0x29}, ++{0x643c, 0x08}, ++{0x643d, 0x35}, ++{0x643e, 0x06}, ++{0x643f, 0x10}, ++{0x6440, 0x07}, ++{0x6441, 0x00}, ++{0x6442, 0x08}, ++{0x6443, 0x3f}, ++{0x6444, 0x00}, ++{0x6445, 0xff}, ++{0x6446, 0x08}, ++{0x6447, 0x29}, ++{0x6448, 0x08}, ++{0x6449, 0x3a}, ++{0x644a, 0x06}, ++{0x644b, 0x00}, ++{0x644c, 0x07}, ++{0x644d, 0x00}, ++{0x644e, 0x08}, ++{0x644f, 0x3f}, ++{0x6450, 0x00}, ++{0x6451, 0xff}, ++{0x6452, 0x06}, ++{0x6453, 0x00}, ++{0x6454, 0x07}, ++{0x6455, 0x05}, ++{0x6456, 0x01}, ++{0x6457, 0xaf}, ++{0x6458, 0x01}, ++{0x6459, 0x0f}, ++{0x645a, 0x01}, ++{0x645b, 0x90}, ++{0x645c, 0x01}, ++{0x645d, 0xc8}, ++{0x645e, 0x00}, ++{0x645f, 0xff}, ++{0x6460, 0x01}, ++{0x6461, 0xac}, ++{0x6462, 0x01}, ++{0x6463, 0x0c}, ++{0x6464, 0x01}, ++{0x6465, 0x90}, ++{0x6466, 0x01}, ++{0x6467, 0xe8}, ++{0x6468, 0x00}, ++{0x6469, 0xff}, ++{0x646a, 0x01}, ++{0x646b, 0xad}, ++{0x646c, 0x01}, ++{0x646d, 0x0d}, ++{0x646e, 0x01}, ++{0x646f, 0x90}, ++{0x6470, 0x01}, ++{0x6471, 0xe8}, ++{0x6472, 0x00}, ++{0x6473, 0xff}, ++{0x6474, 0x01}, ++{0x6475, 0xae}, ++{0x6476, 0x01}, ++{0x6477, 0x0e}, ++{0x6478, 0x01}, ++{0x6479, 0x90}, ++{0x647a, 0x01}, ++{0x647b, 0xe8}, ++{0x647c, 0x00}, ++{0x647d, 0xff}, ++{0x647e, 0x01}, ++{0x647f, 0xb0}, ++{0x6480, 0x01}, ++{0x6481, 0xb1}, ++{0x6482, 0x01}, ++{0x6483, 0xb2}, ++{0x6484, 0x01}, ++{0x6485, 0xb3}, ++{0x6486, 0x01}, ++{0x6487, 0xb4}, ++{0x6488, 0x01}, ++{0x6489, 0xb5}, ++{0x648a, 0x01}, ++{0x648b, 0xb6}, ++{0x648c, 0x01}, ++{0x648d, 0xb7}, ++{0x648e, 0x01}, ++{0x648f, 0xb8}, ++{0x6490, 0x01}, ++{0x6491, 0xb9}, ++{0x6492, 0x01}, ++{0x6493, 0xba}, ++{0x6494, 0x01}, ++{0x6495, 0xbb}, ++{0x6496, 0x01}, ++{0x6497, 0xbc}, ++{0x6498, 0x01}, ++{0x6499, 0xbd}, ++{0x649a, 0x01}, ++{0x649b, 0xbe}, ++{0x649c, 0x01}, ++{0x649d, 0xbf}, ++{0x649e, 0x01}, ++{0x649f, 0xc0}, ++{0x64a0, 0x00}, ++{0x64a1, 0xff}, ++{0x64a2, 0x06}, ++{0x64a3, 0x00}, ++{0x64a4, 0x01}, ++{0x64a5, 0xf6}, ++{0x64a6, 0x00}, ++{0x64a7, 0xff}, ++{0x64a8, 0x06}, ++{0x64a9, 0x10}, ++{0x64aa, 0x01}, ++{0x64ab, 0xf6}, ++{0x64ac, 0x06}, ++{0x64ad, 0x00}, ++{0x64ae, 0x00}, ++{0x64af, 0xff}, ++{0x64b0, 0x06}, ++{0x64b1, 0x20}, ++{0x64b2, 0x01}, ++{0x64b3, 0xf6}, ++{0x64b4, 0x06}, ++{0x64b5, 0x00}, ++{0x64b6, 0x00}, ++{0x64b7, 0xff}, ++{0x64b8, 0x04}, ++{0x64b9, 0x31}, ++{0x64ba, 0x04}, ++{0x64bb, 0x30}, ++{0x64bc, 0x01}, ++{0x64bd, 0x20}, ++{0x64be, 0x01}, ++{0x64bf, 0x31}, ++{0x64c0, 0x01}, ++{0x64c1, 0x32}, ++{0x64c2, 0x01}, ++{0x64c3, 0x33}, ++{0x64c4, 0x01}, ++{0x64c5, 0x34}, ++{0x64c6, 0x01}, ++{0x64c7, 0x35}, ++{0x64c8, 0x01}, ++{0x64c9, 0x36}, ++{0x64ca, 0x01}, ++{0x64cb, 0x37}, ++{0x64cc, 0x01}, ++{0x64cd, 0x38}, ++{0x64ce, 0x01}, ++{0x64cf, 0x39}, ++{0x64d0, 0x01}, ++{0x64d1, 0x3a}, ++{0x64d2, 0x01}, ++{0x64d3, 0x3b}, ++{0x64d4, 0x01}, ++{0x64d5, 0x3c}, ++{0x64d6, 0x01}, ++{0x64d7, 0x3d}, ++{0x64d8, 0x01}, ++{0x64d9, 0x3e}, ++{0x64da, 0x01}, ++{0x64db, 0x3f}, ++{0x64dc, 0x02}, ++{0x64dd, 0xa0}, ++{0x64de, 0x00}, ++{0x64df, 0xff}, ++{0x64e0, 0x04}, ++{0x64e1, 0x31}, ++{0x64e2, 0x04}, ++{0x64e3, 0x30}, ++{0x64e4, 0x01}, ++{0x64e5, 0x00}, ++{0x64e6, 0x01}, ++{0x64e7, 0x11}, ++{0x64e8, 0x01}, ++{0x64e9, 0x12}, ++{0x64ea, 0x01}, ++{0x64eb, 0x13}, ++{0x64ec, 0x01}, ++{0x64ed, 0x14}, ++{0x64ee, 0x01}, ++{0x64ef, 0x15}, ++{0x64f0, 0x01}, ++{0x64f1, 0x16}, ++{0x64f2, 0x01}, ++{0x64f3, 0x17}, ++{0x64f4, 0x01}, ++{0x64f5, 0x18}, ++{0x64f6, 0x01}, ++{0x64f7, 0x19}, ++{0x64f8, 0x01}, ++{0x64f9, 0x1a}, ++{0x64fa, 0x01}, ++{0x64fb, 0x1b}, ++{0x64fc, 0x01}, ++{0x64fd, 0x1c}, ++{0x64fe, 0x01}, ++{0x64ff, 0x1d}, ++{0x6500, 0x01}, ++{0x6501, 0x1e}, ++{0x6502, 0x01}, ++{0x6503, 0x1f}, ++{0x6504, 0x02}, ++{0x6505, 0xa0}, ++{0x6506, 0x00}, ++{0x6507, 0xff}, ++{0x6508, 0x03}, ++{0x6509, 0x0b}, ++{0x650a, 0x05}, ++{0x650b, 0x86}, ++{0x650c, 0x00}, ++{0x650d, 0x00}, ++{0x650e, 0x05}, ++{0x650f, 0x06}, ++{0x6510, 0x00}, ++{0x6511, 0x04}, ++{0x6512, 0x05}, ++{0x6513, 0x04}, ++{0x6514, 0x00}, ++{0x6515, 0x04}, ++{0x6516, 0x05}, ++{0x6517, 0x00}, ++{0x6518, 0x05}, ++{0x6519, 0x08}, ++{0x651a, 0x03}, ++{0x651b, 0x9a}, ++{0x651c, 0x05}, ++{0x651d, 0x86}, ++{0x651e, 0x00}, ++{0x651f, 0x00}, ++{0x6520, 0x05}, ++{0x6521, 0x06}, ++{0x6522, 0x00}, ++{0x6523, 0x01}, ++{0x6524, 0x05}, ++{0x6525, 0x04}, ++{0x6526, 0x00}, ++{0x6527, 0x04}, ++{0x6528, 0x05}, ++{0x6529, 0x00}, ++{0x652a, 0x05}, ++{0x652b, 0x08}, ++{0x652c, 0x03}, ++{0x652d, 0x99}, ++{0x652e, 0x05}, ++{0x652f, 0x06}, ++{0x6530, 0x00}, ++{0x6531, 0x00}, ++{0x6532, 0x05}, ++{0x6533, 0x04}, ++{0x6534, 0x00}, ++{0x6535, 0x04}, ++{0x6536, 0x05}, ++{0x6537, 0x00}, ++{0x6538, 0x05}, ++{0x6539, 0x08}, ++{0x653a, 0x03}, ++{0x653b, 0x98}, ++{0x653c, 0x05}, ++{0x653d, 0x06}, ++{0x653e, 0x00}, ++{0x653f, 0x00}, ++{0x6540, 0x05}, ++{0x6541, 0x04}, ++{0x6542, 0x00}, ++{0x6543, 0x04}, ++{0x6544, 0x05}, ++{0x6545, 0x00}, ++{0x6546, 0x05}, ++{0x6547, 0x08}, ++{0x6548, 0x03}, ++{0x6549, 0x97}, ++{0x654a, 0x05}, ++{0x654b, 0x06}, ++{0x654c, 0x05}, ++{0x654d, 0x04}, ++{0x654e, 0x00}, ++{0x654f, 0x04}, ++{0x6550, 0x05}, ++{0x6551, 0x00}, ++{0x6552, 0x05}, ++{0x6553, 0x08}, ++{0x6554, 0x03}, ++{0x6555, 0x96}, ++{0x6556, 0x05}, ++{0x6557, 0x06}, ++{0x6558, 0x05}, ++{0x6559, 0x04}, ++{0x655a, 0x00}, ++{0x655b, 0x04}, ++{0x655c, 0x05}, ++{0x655d, 0x00}, ++{0x655e, 0x05}, ++{0x655f, 0x08}, ++{0x6560, 0x03}, ++{0x6561, 0x95}, ++{0x6562, 0x05}, ++{0x6563, 0x06}, ++{0x6564, 0x05}, ++{0x6565, 0x04}, ++{0x6566, 0x00}, ++{0x6567, 0x04}, ++{0x6568, 0x05}, ++{0x6569, 0x00}, ++{0x656a, 0x05}, ++{0x656b, 0x08}, ++{0x656c, 0x03}, ++{0x656d, 0x94}, ++{0x656e, 0x05}, ++{0x656f, 0x06}, ++{0x6570, 0x00}, ++{0x6571, 0x00}, ++{0x6572, 0x05}, ++{0x6573, 0x04}, ++{0x6574, 0x00}, ++{0x6575, 0x04}, ++{0x6576, 0x05}, ++{0x6577, 0x00}, ++{0x6578, 0x05}, ++{0x6579, 0x08}, ++{0x657a, 0x03}, ++{0x657b, 0x93}, ++{0x657c, 0x05}, ++{0x657d, 0x06}, ++{0x657e, 0x00}, ++{0x657f, 0x00}, ++{0x6580, 0x05}, ++{0x6581, 0x04}, ++{0x6582, 0x00}, ++{0x6583, 0x04}, ++{0x6584, 0x05}, ++{0x6585, 0x00}, ++{0x6586, 0x05}, ++{0x6587, 0x08}, ++{0x6588, 0x03}, ++{0x6589, 0x92}, ++{0x658a, 0x05}, ++{0x658b, 0x06}, ++{0x658c, 0x05}, ++{0x658d, 0x04}, ++{0x658e, 0x00}, ++{0x658f, 0x04}, ++{0x6590, 0x05}, ++{0x6591, 0x00}, ++{0x6592, 0x05}, ++{0x6593, 0x08}, ++{0x6594, 0x03}, ++{0x6595, 0x91}, ++{0x6596, 0x05}, ++{0x6597, 0x06}, ++{0x6598, 0x05}, ++{0x6599, 0x04}, ++{0x659a, 0x00}, ++{0x659b, 0x04}, ++{0x659c, 0x05}, ++{0x659d, 0x00}, ++{0x659e, 0x05}, ++{0x659f, 0x08}, ++{0x65a0, 0x03}, ++{0x65a1, 0x90}, ++{0x65a2, 0x05}, ++{0x65a3, 0x06}, ++{0x65a4, 0x05}, ++{0x65a5, 0x04}, ++{0x65a6, 0x00}, ++{0x65a7, 0x04}, ++{0x65a8, 0x05}, ++{0x65a9, 0x00}, ++{0x65aa, 0x05}, ++{0x65ab, 0x08}, ++{0x65ac, 0x02}, ++{0x65ad, 0x90}, ++{0x65ae, 0x05}, ++{0x65af, 0x06}, ++{0x65b0, 0x00}, ++{0x65b1, 0xff}, ++{0x65b2, 0x04}, ++{0x65b3, 0x20}, ++{0x65b4, 0x05}, ++{0x65b5, 0x06}, ++{0x65b6, 0x08}, ++{0x65b7, 0x84}, ++{0x65b8, 0x04}, ++{0x65b9, 0x04}, ++{0x65ba, 0x00}, ++{0x65bb, 0xff}, ++{0x65bc, 0x08}, ++{0x65bd, 0x72}, ++{0x65be, 0x04}, ++{0x65bf, 0x0c}, ++{0x65c0, 0x04}, ++{0x65c1, 0x04}, ++{0x65c2, 0x00}, ++{0x65c3, 0xff}, ++{0x65c4, 0x04}, ++{0x65c5, 0x45}, ++{0x65c6, 0x04}, ++{0x65c7, 0x54}, ++{0x65c8, 0x08}, ++{0x65c9, 0x72}, ++{0x65ca, 0x00}, ++{0x65cb, 0xff}, ++{0x65cc, 0x04}, ++{0x65cd, 0x20}, ++{0x65ce, 0x05}, ++{0x65cf, 0x06}, ++{0x65d0, 0x08}, ++{0x65d1, 0x96}, ++{0x65d2, 0x08}, ++{0x65d3, 0x5e}, ++{0x65d4, 0x00}, ++{0x65d5, 0xff}, ++{0x65d6, 0x04}, ++{0x65d7, 0x20}, ++{0x65d8, 0x05}, ++{0x65d9, 0x06}, ++{0x65da, 0x08}, ++{0x65db, 0x96}, ++{0x65dc, 0x08}, ++{0x65dd, 0x5c}, ++{0x65de, 0x00}, ++{0x65df, 0xff}, ++{0x65e0, 0x04}, ++{0x65e1, 0x20}, ++{0x65e2, 0x05}, ++{0x65e3, 0x06}, ++{0x65e4, 0x08}, ++{0x65e5, 0x84}, ++{0x65e6, 0x08}, ++{0x65e7, 0x70}, ++{0x65e8, 0x00}, ++{0x65e9, 0xff}, ++{0x65ea, 0x00}, ++{0x65eb, 0xff}, ++{0x65ec, 0x00}, ++{0x65ed, 0xff}, ++{0x30eb, 0x04}, ++{0x30ed, 0x5a}, ++{0x30ee, 0x01}, ++{0x30ef, 0x80}, ++{0x30f1, 0x5a}, ++{0x303a, 0x04}, ++{0x303b, 0x7f}, ++{0x303c, 0xfe}, ++{0x303d, 0x19}, ++{0x303e, 0xd7}, ++{0x303f, 0x09}, ++{0x3040, 0x78}, ++{0x3042, 0x05}, ++{0x328a, 0x00}, ++{0x31bf, 0x9f}, ++{0x31c0, 0xff}, ++#if 0 ++{0x3012, 0x01}, ++{0x3012, 0x00}, ++{0x3119, 0x44}, ++//;{0x3132, 0x24}, ++//;{0x3128, 0xc0}, ++//;{0x328a, 0x02}, ++{0x3012, 0x01}, ++#else ++/* HFLIP=1, VFLIP=0 */ ++{0x3128, 0xc0 | 0x1}, ++{0x3291, 0x01 | 0x2}, ++{0x3090, 0x4}, ++/* change settings to 1280x1080 COMB12 30 fps, 96MHz */ ++{0x3012, 0x0}, ++{0x3000, 0x3}, ++{0x3001, 0x50}, ++{0x3002, 0x0a}, ++{0x3004, 0x3}, ++{0x3005, 0x48}, ++{0x3006, 0x7}, ++{0x308f, 0x10}, ++{0x3127, 0x63}, ++{0x3074, OV10640_X_START >> 8}, ++{0x3075, OV10640_X_START & 0xff}, ++{0x3076, OV10640_Y_START >> 8}, ++{0x3077, OV10640_Y_START & 0xff}, ++{0x3078, OV10640_X_END >> 8}, ++{0x3079, OV10640_X_END & 0xff}, ++{0x307a, OV10640_Y_END >> 8}, ++{0x307b, OV10640_Y_END & 0xff}, ++{0x307c, OV10640_MAX_WIDTH >> 8}, ++{0x307d, OV10640_MAX_WIDTH & 0xff}, ++{0x307e, OV10640_MAX_HEIGHT >> 8}, ++{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS ++{0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, ++{0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS ++{0x3083, (OV10640_SENSOR_HEIGHT + 208) & 0xff}, ++{0x3084, 0x0}, ++{0x3085, 0x0}, ++{0x3086, 0x0}, ++{0x3087, 0x0}, ++{0x346d, 0x14}, ++{0x3444, 0x28}, ++{0x3091, 0x0}, ++{0x3119, 0x44}, // COMB12 ++{0x3012, 0x1}, ++#endif ++}; +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1e.h b/drivers/media/i2c/soc_camera/ov10640_r1e.h +new file mode 100644 +index 0000000..eeff330 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ov10640_r1e.h +@@ -0,0 +1,1235 @@ ++/* ++ * OmniVision ov10640 sensor camera wizard 1280x1080@30/BGGR/BT601/12bit ++ * ++ * Copyright (C) 2015-2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++/* DVP_1280x1080_COMB12_raw 60fps */ ++static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { ++//{0x3013, 0x01}, ++//{OV10640_DELAY, 10}, ++{0x328a, 0x11}, ++{0x313f, 0x80}, ++{0x3132, 0x24}, ++{0x3000, 0x03}, ++{0x3001, 0x62}, ++{0x3002, 0x07}, ++{0x3004, 0x03}, ++{0x3005, 0x62}, ++{0x3006, 0x07}, ++{0x3007, 0x01}, ++{0x3014, 0x03}, ++{0x3023, 0x05}, ++{0x3032, 0x35}, ++{0x3033, 0x04}, ++{0x3054, 0x00}, ++{0x3055, 0x08}, ++{0x3056, 0x01}, ++{0x3057, 0xff}, ++{0x3058, 0xaf}, ++{0x3059, 0x44}, ++{0x305a, 0x02}, ++{0x305b, 0x00}, ++{0x305c, 0x30}, ++{0x305d, 0x9e}, ++{0x305e, 0x19}, ++{0x305f, 0x18}, ++{0x3060, 0xf9}, ++{0x3061, 0xf0}, ++#ifdef OV10640_FSIN_ENABLE ++{0x308c, 0xb2}, ++#else ++{0x308c, 0x03}, ++#endif ++{0x308f, 0x10}, ++{0x3090, 0x00}, ++{0x3091, 0x00}, ++{0x30eb, 0x00}, ++{0x30a3, 0x08}, ++{0x30ad, 0x03}, ++{0x30ae, 0x80}, ++{0x30af, 0x80}, ++{0x30b0, 0xff}, ++{0x30b1, 0x3f}, ++{0x30b2, 0x22}, ++{0x30b9, 0x22}, ++{0x30bb, 0x00}, ++{0x30bc, 0x00}, ++{0x30bd, 0x00}, ++{0x30be, 0x00}, ++{0x30bf, 0x00}, ++{0x30c0, 0x00}, ++{0x30c1, 0x00}, ++{0x30c2, 0x00}, ++{0x30c3, 0x00}, ++{0x30c4, 0x80}, ++{0x30c5, 0x00}, ++{0x30c6, 0x80}, ++{0x30c7, 0x00}, ++{0x30c8, 0x80}, ++{0x3119, 0x45}, ++{0x311a, 0x01}, ++{0x311b, 0x4a}, ++{0x3074, 0x00}, ++{0x3075, 0x00}, ++{0x3076, 0x00}, ++{0x3077, 0x02}, ++{0x3078, 0x05}, ++{0x3079, 0x07}, ++{0x307a, 0x04}, ++{0x307b, 0x41}, ++{0x307c, 0x05}, ++{0x307d, 0x00}, ++{0x307e, 0x04}, ++{0x307f, 0x38}, ++{0x3080, 0x05}, ++{0x3081, 0xbe}, ++{0x3082, 0x04}, ++{0x3083, 0x57}, ++{0x3084, 0x00}, ++{0x3085, 0x04}, ++{0x3086, 0x00}, ++{0x3087, 0x04}, ++{0x3088, 0x00}, ++{0x3089, 0x40}, ++{0x308d, 0x92}, ++{0x3094, 0xa5}, ++{0x30e6, 0x04}, ++{0x30e7, 0x48}, ++{0x30e8, 0x04}, ++{0x30e9, 0x48}, ++{0x30e9, 0x05}, ++{0x30ec, 0x01}, ++{0x30fa, 0x06}, ++{0x3120, 0x00}, ++{0x3121, 0x01}, ++{0x3122, 0x00}, ++{0x3127, 0x63}, ++{0x3128, 0xc0}, ++#ifdef OV10640_DISPLAY_PATTERN ++{0x3129, 0x80}, ++#else ++{0x3129, 0x00}, ++#endif ++{0x31be, 0x00}, ++{0x30a5, 0x78}, ++{0x30a6, 0x40}, ++{0x30a7, 0x78}, ++{0x30a8, 0x80}, ++{0x30a9, 0x78}, ++{0x30aa, 0xe0}, ++{0x30ab, 0xf9}, ++{0x30ac, 0xc0}, ++{0x3440, 0x04}, ++{0x3444, 0x28}, ++{0x344e, 0x2c}, ++{0x3457, 0x33}, ++{0x345e, 0x38}, ++{0x3461, 0xa8}, ++{0x7002, 0xaa}, ++{0x7001, 0xdf}, ++{0x7048, 0x00}, ++{0x7049, 0x02}, ++{0x704a, 0x02}, ++{0x704b, 0x00}, ++{0x704c, 0x01}, ++{0x704d, 0x00}, ++{0x7043, 0x04}, ++{0x7040, 0x3c}, ++{0x7047, 0x00}, ++{0x7044, 0x01}, ++{0x7000, 0x1f}, ++{0x7084, 0x01}, ++{0x7085, 0x03}, ++{0x7086, 0x02}, ++{0x7087, 0x40}, ++{0x7088, 0x01}, ++{0x7089, 0x20}, ++{0x707f, 0x04}, ++{0x707c, 0x3c}, ++{0x7083, 0x00}, ++{0x7080, 0x01}, ++{0x7003, 0xdf}, ++{0x70c0, 0x00}, ++{0x70c1, 0x02}, ++{0x70c2, 0x02}, ++{0x70c3, 0x00}, ++{0x70c4, 0x01}, ++{0x70c5, 0x00}, ++{0x70b8, 0x03}, ++{0x70b9, 0x98}, ++{0x70bc, 0x00}, ++{0x70bd, 0x80}, ++{0x7004, 0x02}, ++{0x7005, 0x00}, ++{0x7006, 0x01}, ++{0x7007, 0x80}, ++{0x7008, 0x02}, ++{0x7009, 0x00}, ++{0x700a, 0x04}, ++{0x700b, 0x00}, ++{0x700e, 0x00}, ++{0x700f, 0x60}, ++{0x701a, 0x02}, ++{0x701b, 0x00}, ++{0x701c, 0x01}, ++{0x701d, 0x80}, ++{0x701e, 0x02}, ++{0x701f, 0x00}, ++{0x7020, 0x04}, ++{0x7021, 0x00}, ++{0x7024, 0x00}, ++{0x7025, 0x60}, ++{0x70e7, 0x00}, ++{0x70e4, 0x10}, ++{0x70e5, 0x00}, ++{0x70e6, 0x00}, ++{0x70eb, 0x00}, ++{0x70e8, 0x10}, ++{0x70e9, 0x00}, ++{0x70ea, 0x00}, ++{0x70ef, 0x00}, ++{0x70ec, 0xfd}, ++{0x70ed, 0x00}, ++{0x70ee, 0x00}, ++{0x70eb, 0x00}, ++{0x70f0, 0xfd}, ++{0x70f1, 0x00}, ++{0x70f2, 0x00}, ++{0x30fb, 0x06}, ++{0x30fc, 0x80}, ++{0x30fd, 0x02}, ++{0x30fe, 0x93}, ++{0x6000, 0xc1}, ++{0x6001, 0xb9}, ++{0x6002, 0xba}, ++{0x6003, 0xa4}, ++{0x6004, 0xb5}, ++{0x6005, 0xa0}, ++{0x6006, 0x82}, ++{0x6007, 0xa7}, ++{0x6008, 0xb7}, ++{0x6009, 0x5c}, ++{0x600a, 0x9e}, ++{0x600b, 0xc0}, ++{0x600c, 0xd2}, ++{0x600d, 0x33}, ++{0x600e, 0xcc}, ++{0x600f, 0xe2}, ++{0x6010, 0xc1}, ++{0x6011, 0xab}, ++{0x6012, 0xb7}, ++{0x6013, 0x00}, ++{0x6014, 0x00}, ++{0x6015, 0x00}, ++{0x6016, 0x00}, ++{0x6017, 0x00}, ++{0x6018, 0x00}, ++{0x6019, 0x00}, ++{0x601a, 0x00}, ++{0x601b, 0x00}, ++{0x601c, 0x00}, ++{0x601d, 0x00}, ++{0x601e, 0x9c}, ++{0x601f, 0x94}, ++{0x6020, 0x90}, ++{0x6021, 0xc5}, ++{0x6022, 0x01}, ++{0x6023, 0x54}, ++{0x6024, 0x2a}, ++{0x6025, 0x61}, ++{0x6026, 0xd2}, ++{0x6027, 0xcc}, ++{0x6028, 0x04}, ++{0x6029, 0x35}, ++{0x602a, 0xb1}, ++{0x602b, 0xb2}, ++{0x602c, 0xb3}, ++{0x602d, 0xd2}, ++{0x602e, 0xd3}, ++{0x602f, 0x12}, ++{0x6030, 0x31}, ++{0x6031, 0xcc}, ++{0x6032, 0x06}, ++{0x6033, 0xd2}, ++{0x6034, 0xc4}, ++{0x6035, 0xce}, ++{0x6036, 0x18}, ++{0x6037, 0xcf}, ++{0x6038, 0x1e}, ++{0x6039, 0xd0}, ++{0x603a, 0x24}, ++{0x603b, 0xc5}, ++{0x603c, 0xd2}, ++{0x603d, 0xbc}, ++{0x603e, 0xcc}, ++{0x603f, 0x52}, ++{0x6040, 0x2b}, ++{0x6041, 0xd2}, ++{0x6042, 0xd3}, ++{0x6043, 0x02}, ++{0x6044, 0xcc}, ++{0x6045, 0x0a}, ++{0x6046, 0xd2}, ++{0x6047, 0xd3}, ++{0x6048, 0x0f}, ++{0x6049, 0x1a}, ++{0x604a, 0x2a}, ++{0x604b, 0xd4}, ++{0x604c, 0xf6}, ++{0x604d, 0xba}, ++{0x604e, 0x56}, ++{0x604f, 0xd3}, ++{0x6050, 0x2e}, ++{0x6051, 0x54}, ++{0x6052, 0x26}, ++{0x6053, 0xd2}, ++{0x6054, 0xcc}, ++{0x6055, 0x60}, ++{0x6056, 0xd2}, ++{0x6057, 0xd3}, ++{0x6058, 0x27}, ++{0x6059, 0x27}, ++{0x605a, 0x08}, ++{0x605b, 0x1a}, ++{0x605c, 0xcc}, ++{0x605d, 0x88}, ++{0x605e, 0x00}, ++{0x605f, 0x12}, ++{0x6060, 0x2c}, ++{0x6061, 0x60}, ++{0x6062, 0xc2}, ++{0x6063, 0xb9}, ++{0x6064, 0xa5}, ++{0x6065, 0xb5}, ++{0x6066, 0xa0}, ++{0x6067, 0x82}, ++{0x6068, 0x5c}, ++{0x6069, 0xd4}, ++{0x606a, 0xbe}, ++{0x606b, 0xd4}, ++{0x606c, 0xbe}, ++{0x606d, 0xd3}, ++{0x606e, 0x01}, ++{0x606f, 0x7c}, ++{0x6070, 0x74}, ++{0x6071, 0x00}, ++{0x6072, 0x61}, ++{0x6073, 0x2a}, ++{0x6074, 0xd2}, ++{0x6075, 0xcc}, ++{0x6076, 0xdf}, ++{0x6077, 0xc6}, ++{0x6078, 0x35}, ++{0x6079, 0xd2}, ++{0x607a, 0xcc}, ++{0x607b, 0x06}, ++{0x607c, 0x31}, ++{0x607d, 0xd2}, ++{0x607e, 0xc5}, ++{0x607f, 0xbb}, ++{0x6080, 0xcc}, ++{0x6081, 0x18}, ++{0x6082, 0xc6}, ++{0x6083, 0xd2}, ++{0x6084, 0xbd}, ++{0x6085, 0xcc}, ++{0x6086, 0x52}, ++{0x6087, 0x2b}, ++{0x6088, 0xd2}, ++{0x6089, 0xd3}, ++{0x608a, 0x01}, ++{0x608b, 0xcc}, ++{0x608c, 0x0a}, ++{0x608d, 0xd2}, ++{0x608e, 0xd3}, ++{0x608f, 0x0f}, ++{0x6090, 0x1a}, ++{0x6091, 0x71}, ++{0x6092, 0x2a}, ++{0x6093, 0xd4}, ++{0x6094, 0xf6}, ++{0x6095, 0xd3}, ++{0x6096, 0x22}, ++{0x6097, 0x70}, ++{0x6098, 0xca}, ++{0x6099, 0x26}, ++{0x609a, 0xd2}, ++{0x609b, 0xcc}, ++{0x609c, 0x60}, ++{0x609d, 0xd2}, ++{0x609e, 0xd3}, ++{0x609f, 0x27}, ++{0x60a0, 0x27}, ++{0x60a1, 0x08}, ++{0x60a2, 0x1a}, ++{0x60a3, 0xcc}, ++{0x60a4, 0x88}, ++{0x60a5, 0x12}, ++{0x60a6, 0x2c}, ++{0x60a7, 0x60}, ++{0x60a8, 0x00}, ++{0x60a9, 0x00}, ++{0x60aa, 0xc0}, ++{0x60ab, 0xb9}, ++{0x60ac, 0xa3}, ++{0x60ad, 0xb5}, ++{0x60ae, 0x00}, ++{0x60af, 0xa0}, ++{0x60b0, 0x82}, ++{0x60b1, 0x5c}, ++{0x60b2, 0xd4}, ++{0x60b3, 0xa0}, ++{0x60b4, 0x9d}, ++{0x60b5, 0xd3}, ++{0x60b6, 0x26}, ++{0x60b7, 0xb0}, ++{0x60b8, 0xb7}, ++{0x60b9, 0x00}, ++{0x60ba, 0xd3}, ++{0x60bb, 0x0a}, ++{0x60bc, 0xd3}, ++{0x60bd, 0x10}, ++{0x60be, 0x9c}, ++{0x60bf, 0x94}, ++{0x60c0, 0x90}, ++{0x60c1, 0xc8}, ++{0x60c2, 0xba}, ++{0x60c3, 0x7c}, ++{0x60c4, 0x74}, ++{0x60c5, 0x00}, ++{0x60c6, 0x61}, ++{0x60c7, 0x2a}, ++{0x60c8, 0x00}, ++{0x60c9, 0xd2}, ++{0x60ca, 0xcc}, ++{0x60cb, 0xdf}, ++{0x60cc, 0xc4}, ++{0x60cd, 0x35}, ++{0x60ce, 0xd2}, ++{0x60cf, 0xcc}, ++{0x60d0, 0x06}, ++{0x60d1, 0x31}, ++{0x60d2, 0xd2}, ++{0x60d3, 0xcc}, ++{0x60d4, 0x15}, ++{0x60d5, 0xd2}, ++{0x60d6, 0xbb}, ++{0x60d7, 0xcc}, ++{0x60d8, 0x1a}, ++{0x60d9, 0xd2}, ++{0x60da, 0xbe}, ++{0x60db, 0xce}, ++{0x60dc, 0x52}, ++{0x60dd, 0xcf}, ++{0x60de, 0x56}, ++{0x60df, 0xd0}, ++{0x60e0, 0x5b}, ++{0x60e1, 0x2b}, ++{0x60e2, 0xd2}, ++{0x60e3, 0xd3}, ++{0x60e4, 0x01}, ++{0x60e5, 0xcc}, ++{0x60e6, 0x0a}, ++{0x60e7, 0xd2}, ++{0x60e8, 0xd3}, ++{0x60e9, 0x0f}, ++{0x60ea, 0xd9}, ++{0x60eb, 0xc7}, ++{0x60ec, 0xda}, ++{0x60ed, 0xce}, ++{0x60ee, 0x1a}, ++{0x60ef, 0xd4}, ++{0x60f0, 0xf6}, ++{0x60f1, 0xd4}, ++{0x60f2, 0xa9}, ++{0x60f3, 0x27}, ++{0x60f4, 0x00}, ++{0x60f5, 0xd2}, ++{0x60f6, 0xcc}, ++{0x60f7, 0x60}, ++{0x60f8, 0xd2}, ++{0x60f9, 0xd3}, ++{0x60fa, 0x2d}, ++{0x60fb, 0xd9}, ++{0x60fc, 0xdf}, ++{0x60fd, 0xda}, ++{0x60fe, 0xe5}, ++{0x60ff, 0x1a}, ++{0x6100, 0x12}, ++{0x6101, 0xcc}, ++{0x6102, 0x88}, ++{0x6103, 0xd6}, ++{0x6104, 0xb1}, ++{0x6105, 0xb9}, ++{0x6106, 0xba}, ++{0x6107, 0xaf}, ++{0x6108, 0xdc}, ++{0x6109, 0x00}, ++{0x610a, 0xcb}, ++{0x610b, 0xc3}, ++{0x610c, 0xb9}, ++{0x610d, 0xa4}, ++{0x610e, 0xb5}, ++{0x610f, 0x5c}, ++{0x6110, 0x12}, ++{0x6111, 0x2a}, ++{0x6112, 0x61}, ++{0x6113, 0xd2}, ++{0x6114, 0xcc}, ++{0x6115, 0xdf}, ++{0x6116, 0xc7}, ++{0x6117, 0x35}, ++{0x6118, 0xd2}, ++{0x6119, 0xcc}, ++{0x611a, 0x06}, ++{0x611b, 0x31}, ++{0x611c, 0xc6}, ++{0x611d, 0xbb}, ++{0x611e, 0xd2}, ++{0x611f, 0xcc}, ++{0x6120, 0x18}, ++{0x6121, 0xd2}, ++{0x6122, 0xbe}, ++{0x6123, 0xcc}, ++{0x6124, 0x52}, ++{0x6125, 0xc7}, ++{0x6126, 0xd2}, ++{0x6127, 0xcc}, ++{0x6128, 0x0a}, ++{0x6129, 0xb4}, ++{0x612a, 0xb7}, ++{0x612b, 0x94}, ++{0x612c, 0xd2}, ++{0x612d, 0x12}, ++{0x612e, 0x26}, ++{0x612f, 0x42}, ++{0x6130, 0x46}, ++{0x6131, 0x42}, ++{0x6132, 0xd3}, ++{0x6133, 0x20}, ++{0x6134, 0x27}, ++{0x6135, 0x00}, ++{0x6136, 0x1a}, ++{0x6137, 0xcc}, ++{0x6138, 0x88}, ++{0x6139, 0x60}, ++{0x613a, 0x2c}, ++{0x613b, 0x12}, ++{0x613c, 0x40}, ++{0x613d, 0xb8}, ++{0x613e, 0x90}, ++{0x613f, 0xd5}, ++{0x6140, 0xba}, ++{0x6141, 0x00}, ++{0x6142, 0x00}, ++{0x6143, 0x00}, ++{0x6144, 0x00}, ++{0x6145, 0x00}, ++{0x6146, 0x00}, ++{0x6147, 0xaa}, ++{0x6148, 0xb7}, ++{0x6149, 0x00}, ++{0x614a, 0x00}, ++{0x614b, 0x00}, ++{0x614c, 0x00}, ++{0x614d, 0xa6}, ++{0x614e, 0xb7}, ++{0x614f, 0x00}, ++{0x6150, 0xd5}, ++{0x6151, 0x00}, ++{0x6152, 0x71}, ++{0x6153, 0xd3}, ++{0x6154, 0x30}, ++{0x6155, 0xba}, ++{0x6156, 0x00}, ++{0x6157, 0x00}, ++{0x6158, 0x00}, ++{0x6159, 0x00}, ++{0x615a, 0xd3}, ++{0x615b, 0x10}, ++{0x615c, 0x70}, ++{0x615d, 0x00}, ++{0x615e, 0x00}, ++{0x615f, 0x00}, ++{0x6160, 0x00}, ++{0x6161, 0xd5}, ++{0x6162, 0xba}, ++{0x6163, 0xb0}, ++{0x6164, 0xb7}, ++{0x6165, 0x00}, ++{0x6166, 0x9d}, ++{0x6167, 0xd3}, ++{0x6168, 0x0a}, ++{0x6169, 0x9d}, ++{0x616a, 0x9d}, ++{0x616b, 0xd3}, ++{0x616c, 0x10}, ++{0x616d, 0x9c}, ++{0x616e, 0x94}, ++{0x616f, 0x90}, ++{0x6170, 0xc8}, ++{0x6171, 0xba}, ++{0x6172, 0xd2}, ++{0x6173, 0x60}, ++{0x6174, 0x2c}, ++{0x6175, 0x50}, ++{0x6176, 0x11}, ++{0x6177, 0xcc}, ++{0x6178, 0x00}, ++{0x6179, 0x30}, ++{0x617a, 0xd5}, ++{0x617b, 0x00}, ++{0x617c, 0xba}, ++{0x617d, 0xb0}, ++{0x617e, 0xb7}, ++{0x617f, 0x00}, ++{0x6180, 0x9d}, ++{0x6181, 0xd3}, ++{0x6182, 0x0a}, ++{0x6183, 0x9d}, ++{0x6184, 0x9d}, ++{0x6185, 0xd3}, ++{0x6186, 0x10}, ++{0x6187, 0x9c}, ++{0x6188, 0x94}, ++{0x6189, 0x90}, ++{0x618a, 0xc8}, ++{0x618b, 0xba}, ++{0x618c, 0xd5}, ++{0x618d, 0x00}, ++{0x618e, 0x01}, ++{0x618f, 0x1a}, ++{0x6190, 0xcc}, ++{0x6191, 0x12}, ++{0x6192, 0x12}, ++{0x6193, 0x00}, ++{0x6194, 0xcc}, ++{0x6195, 0x9c}, ++{0x6196, 0xd2}, ++{0x6197, 0xcc}, ++{0x6198, 0x60}, ++{0x6199, 0xd2}, ++{0x619a, 0x04}, ++{0x619b, 0xd5}, ++{0x619c, 0x1a}, ++{0x619d, 0xcc}, ++{0x619e, 0x12}, ++{0x619f, 0x00}, ++{0x61a0, 0x12}, ++{0x61a1, 0xcc}, ++{0x61a2, 0x9c}, ++{0x61a3, 0xd2}, ++{0x61a4, 0xcc}, ++{0x61a5, 0x60}, ++{0x61a6, 0xd2}, ++{0x61a7, 0x1a}, ++{0x61a8, 0xcc}, ++{0x61a9, 0x12}, ++{0x61aa, 0x00}, ++{0x61ab, 0x12}, ++{0x61ac, 0xcc}, ++{0x61ad, 0x9c}, ++{0x61ae, 0xd2}, ++{0x61af, 0xcc}, ++{0x61b0, 0x60}, ++{0x61b1, 0xd2}, ++{0x61b2, 0x1a}, ++{0x61b3, 0xcc}, ++{0x61b4, 0x12}, ++{0x61b5, 0x00}, ++{0x61b6, 0x12}, ++{0x61b7, 0xcc}, ++{0x61b8, 0x9c}, ++{0x61b9, 0xd2}, ++{0x61ba, 0xcc}, ++{0x61bb, 0x60}, ++{0x61bc, 0xd2}, ++{0x61bd, 0xd5}, ++{0x61be, 0x1a}, ++{0x61bf, 0xcc}, ++{0x61c0, 0x12}, ++{0x61c1, 0x12}, ++{0x61c2, 0x00}, ++{0x61c3, 0xcc}, ++{0x61c4, 0x8a}, ++{0x61c5, 0xd2}, ++{0x61c6, 0xcc}, ++{0x61c7, 0x74}, ++{0x61c8, 0xd2}, ++{0x61c9, 0xd5}, ++{0x61ca, 0x1a}, ++{0x61cb, 0xcc}, ++{0x61cc, 0x12}, ++{0x61cd, 0x00}, ++{0x61ce, 0x12}, ++{0x61cf, 0xcc}, ++{0x61d0, 0x8a}, ++{0x61d1, 0xd2}, ++{0x61d2, 0xcc}, ++{0x61d3, 0x74}, ++{0x61d4, 0xd2}, ++{0x61d5, 0x1a}, ++{0x61d6, 0xcc}, ++{0x61d7, 0x12}, ++{0x61d8, 0x00}, ++{0x61d9, 0x12}, ++{0x61da, 0xcc}, ++{0x61db, 0x8a}, ++{0x61dc, 0xd2}, ++{0x61dd, 0xcc}, ++{0x61de, 0x74}, ++{0x61df, 0xd2}, ++{0x61e0, 0x1a}, ++{0x61e1, 0xcc}, ++{0x61e2, 0x12}, ++{0x61e3, 0x00}, ++{0x61e4, 0x12}, ++{0x61e5, 0xcc}, ++{0x61e6, 0x8a}, ++{0x61e7, 0xd2}, ++{0x61e8, 0xcc}, ++{0x61e9, 0x74}, ++{0x61ea, 0xd2}, ++{0x61eb, 0xd5}, ++{0x61ec, 0xcc}, ++{0x61ed, 0x12}, ++{0x61ee, 0x00}, ++{0x61ef, 0x12}, ++{0x61f0, 0xcc}, ++{0x61f1, 0x9c}, ++{0x61f2, 0xd5}, ++{0x6400, 0x04}, ++{0x6401, 0x04}, ++{0x6402, 0x00}, ++{0x6403, 0xff}, ++{0x6404, 0x00}, ++{0x6405, 0x08}, ++{0x6406, 0x00}, ++{0x6407, 0xff}, ++{0x6408, 0x04}, ++{0x6409, 0x70}, ++{0x640a, 0x00}, ++{0x640b, 0xff}, ++{0x640c, 0x05}, ++{0x640d, 0x14}, ++{0x640e, 0x04}, ++{0x640f, 0x71}, ++{0x6410, 0x05}, ++{0x6411, 0x74}, ++{0x6412, 0x00}, ++{0x6413, 0xff}, ++{0x6414, 0x05}, ++{0x6415, 0x54}, ++{0x6416, 0x05}, ++{0x6417, 0x44}, ++{0x6418, 0x04}, ++{0x6419, 0x30}, ++{0x641a, 0x05}, ++{0x641b, 0x46}, ++{0x641c, 0x00}, ++{0x641d, 0xff}, ++{0x641e, 0x04}, ++{0x641f, 0x31}, ++{0x6420, 0x04}, ++{0x6421, 0x30}, ++{0x6422, 0x00}, ++{0x6423, 0xff}, ++{0x6424, 0x04}, ++{0x6425, 0x20}, ++{0x6426, 0x05}, ++{0x6427, 0x06}, ++{0x6428, 0x00}, ++{0x6429, 0xff}, ++{0x642a, 0x08}, ++{0x642b, 0x2a}, ++{0x642c, 0x08}, ++{0x642d, 0x31}, ++{0x642e, 0x00}, ++{0x642f, 0xff}, ++{0x6430, 0x08}, ++{0x6431, 0x2a}, ++{0x6432, 0x08}, ++{0x6433, 0x31}, ++{0x6434, 0x06}, ++{0x6435, 0x20}, ++{0x6436, 0x07}, ++{0x6437, 0x00}, ++{0x6438, 0x08}, ++{0x6439, 0x40}, ++{0x643a, 0x00}, ++{0x643b, 0xff}, ++{0x643c, 0x08}, ++{0x643d, 0x2a}, ++{0x643e, 0x08}, ++{0x643f, 0x36}, ++{0x6440, 0x06}, ++{0x6441, 0x10}, ++{0x6442, 0x07}, ++{0x6443, 0x00}, ++{0x6444, 0x08}, ++{0x6445, 0x40}, ++{0x6446, 0x00}, ++{0x6447, 0xff}, ++{0x6448, 0x08}, ++{0x6449, 0x2a}, ++{0x644a, 0x08}, ++{0x644b, 0x3b}, ++{0x644c, 0x06}, ++{0x644d, 0x00}, ++{0x644e, 0x07}, ++{0x644f, 0x00}, ++{0x6450, 0x08}, ++{0x6451, 0x40}, ++{0x6452, 0x00}, ++{0x6453, 0xff}, ++{0x6454, 0x06}, ++{0x6455, 0x00}, ++{0x6456, 0x07}, ++{0x6457, 0x05}, ++{0x6458, 0x01}, ++{0x6459, 0xaf}, ++{0x645a, 0x01}, ++{0x645b, 0x0f}, ++{0x645c, 0x01}, ++{0x645d, 0x90}, ++{0x645e, 0x01}, ++{0x645f, 0xc8}, ++{0x6460, 0x00}, ++{0x6461, 0xff}, ++{0x6462, 0x01}, ++{0x6463, 0xac}, ++{0x6464, 0x01}, ++{0x6465, 0x0c}, ++{0x6466, 0x01}, ++{0x6467, 0x90}, ++{0x6468, 0x01}, ++{0x6469, 0xe8}, ++{0x646a, 0x00}, ++{0x646b, 0xff}, ++{0x646c, 0x01}, ++{0x646d, 0xad}, ++{0x646e, 0x01}, ++{0x646f, 0x0d}, ++{0x6470, 0x01}, ++{0x6471, 0x90}, ++{0x6472, 0x01}, ++{0x6473, 0xe8}, ++{0x6474, 0x00}, ++{0x6475, 0xff}, ++{0x6476, 0x01}, ++{0x6477, 0xae}, ++{0x6478, 0x01}, ++{0x6479, 0x0e}, ++{0x647a, 0x01}, ++{0x647b, 0x90}, ++{0x647c, 0x01}, ++{0x647d, 0xe8}, ++{0x647e, 0x00}, ++{0x647f, 0xff}, ++{0x6480, 0x01}, ++{0x6481, 0xb0}, ++{0x6482, 0x01}, ++{0x6483, 0xb1}, ++{0x6484, 0x01}, ++{0x6485, 0xb2}, ++{0x6486, 0x01}, ++{0x6487, 0xb3}, ++{0x6488, 0x01}, ++{0x6489, 0xb4}, ++{0x648a, 0x01}, ++{0x648b, 0xb5}, ++{0x648c, 0x01}, ++{0x648d, 0xb6}, ++{0x648e, 0x01}, ++{0x648f, 0xb7}, ++{0x6490, 0x01}, ++{0x6491, 0xb8}, ++{0x6492, 0x01}, ++{0x6493, 0xb9}, ++{0x6494, 0x01}, ++{0x6495, 0xba}, ++{0x6496, 0x01}, ++{0x6497, 0xbb}, ++{0x6498, 0x01}, ++{0x6499, 0xbc}, ++{0x649a, 0x01}, ++{0x649b, 0xbd}, ++{0x649c, 0x01}, ++{0x649d, 0xbe}, ++{0x649e, 0x01}, ++{0x649f, 0xbf}, ++{0x64a0, 0x01}, ++{0x64a1, 0xc0}, ++{0x64a2, 0x00}, ++{0x64a3, 0xff}, ++{0x64a4, 0x06}, ++{0x64a5, 0x00}, ++{0x64a6, 0x01}, ++{0x64a7, 0xf6}, ++{0x64a8, 0x04}, ++{0x64a9, 0x30}, ++{0x64aa, 0x00}, ++{0x64ab, 0xff}, ++{0x64ac, 0x06}, ++{0x64ad, 0x10}, ++{0x64ae, 0x01}, ++{0x64af, 0xf6}, ++{0x64b0, 0x04}, ++{0x64b1, 0x30}, ++{0x64b2, 0x06}, ++{0x64b3, 0x00}, ++{0x64b4, 0x00}, ++{0x64b5, 0xff}, ++{0x64b6, 0x06}, ++{0x64b7, 0x20}, ++{0x64b8, 0x01}, ++{0x64b9, 0xf6}, ++{0x64ba, 0x04}, ++{0x64bb, 0x30}, ++{0x64bc, 0x06}, ++{0x64bd, 0x00}, ++{0x64be, 0x00}, ++{0x64bf, 0xff}, ++{0x64c0, 0x04}, ++{0x64c1, 0x31}, ++{0x64c2, 0x04}, ++{0x64c3, 0x30}, ++{0x64c4, 0x01}, ++{0x64c5, 0x20}, ++{0x64c6, 0x01}, ++{0x64c7, 0x31}, ++{0x64c8, 0x01}, ++{0x64c9, 0x32}, ++{0x64ca, 0x01}, ++{0x64cb, 0x33}, ++{0x64cc, 0x01}, ++{0x64cd, 0x34}, ++{0x64ce, 0x01}, ++{0x64cf, 0x35}, ++{0x64d0, 0x01}, ++{0x64d1, 0x36}, ++{0x64d2, 0x01}, ++{0x64d3, 0x37}, ++{0x64d4, 0x01}, ++{0x64d5, 0x38}, ++{0x64d6, 0x01}, ++{0x64d7, 0x39}, ++{0x64d8, 0x01}, ++{0x64d9, 0x3a}, ++{0x64da, 0x01}, ++{0x64db, 0x3b}, ++{0x64dc, 0x01}, ++{0x64dd, 0x3c}, ++{0x64de, 0x01}, ++{0x64df, 0x3d}, ++{0x64e0, 0x01}, ++{0x64e1, 0x3e}, ++{0x64e2, 0x01}, ++{0x64e3, 0x3f}, ++{0x64e4, 0x02}, ++{0x64e5, 0xa0}, ++{0x64e6, 0x00}, ++{0x64e7, 0xff}, ++{0x64e8, 0x04}, ++{0x64e9, 0x31}, ++{0x64ea, 0x04}, ++{0x64eb, 0x30}, ++{0x64ec, 0x01}, ++{0x64ed, 0x00}, ++{0x64ee, 0x01}, ++{0x64ef, 0x11}, ++{0x64f0, 0x01}, ++{0x64f1, 0x12}, ++{0x64f2, 0x01}, ++{0x64f3, 0x13}, ++{0x64f4, 0x01}, ++{0x64f5, 0x14}, ++{0x64f6, 0x01}, ++{0x64f7, 0x15}, ++{0x64f8, 0x01}, ++{0x64f9, 0x16}, ++{0x64fa, 0x01}, ++{0x64fb, 0x17}, ++{0x64fc, 0x01}, ++{0x64fd, 0x18}, ++{0x64fe, 0x01}, ++{0x64ff, 0x19}, ++{0x6500, 0x01}, ++{0x6501, 0x1a}, ++{0x6502, 0x01}, ++{0x6503, 0x1b}, ++{0x6504, 0x01}, ++{0x6505, 0x1c}, ++{0x6506, 0x01}, ++{0x6507, 0x1d}, ++{0x6508, 0x01}, ++{0x6509, 0x1e}, ++{0x650a, 0x01}, ++{0x650b, 0x1f}, ++{0x650c, 0x02}, ++{0x650d, 0xa0}, ++{0x650e, 0x00}, ++{0x650f, 0xff}, ++{0x6510, 0x04}, ++{0x6511, 0x20}, ++{0x6512, 0x05}, ++{0x6513, 0x86}, ++{0x6514, 0x03}, ++{0x6515, 0x0b}, ++{0x6516, 0x05}, ++{0x6517, 0x86}, ++{0x6518, 0x00}, ++{0x6519, 0x00}, ++{0x651a, 0x05}, ++{0x651b, 0x06}, ++{0x651c, 0x00}, ++{0x651d, 0x04}, ++{0x651e, 0x05}, ++{0x651f, 0x04}, ++{0x6520, 0x00}, ++{0x6521, 0x04}, ++{0x6522, 0x05}, ++{0x6523, 0x00}, ++{0x6524, 0x05}, ++{0x6525, 0x0a}, ++{0x6526, 0x03}, ++{0x6527, 0x9a}, ++{0x6528, 0x05}, ++{0x6529, 0x86}, ++{0x652a, 0x00}, ++{0x652b, 0x00}, ++{0x652c, 0x05}, ++{0x652d, 0x06}, ++{0x652e, 0x00}, ++{0x652f, 0x01}, ++{0x6530, 0x05}, ++{0x6531, 0x04}, ++{0x6532, 0x00}, ++{0x6533, 0x04}, ++{0x6534, 0x05}, ++{0x6535, 0x00}, ++{0x6536, 0x05}, ++{0x6537, 0x0a}, ++{0x6538, 0x03}, ++{0x6539, 0x99}, ++{0x653a, 0x05}, ++{0x653b, 0x06}, ++{0x653c, 0x00}, ++{0x653d, 0x00}, ++{0x653e, 0x05}, ++{0x653f, 0x04}, ++{0x6540, 0x00}, ++{0x6541, 0x04}, ++{0x6542, 0x05}, ++{0x6543, 0x00}, ++{0x6544, 0x05}, ++{0x6545, 0x0a}, ++{0x6546, 0x03}, ++{0x6547, 0x98}, ++{0x6548, 0x05}, ++{0x6549, 0x06}, ++{0x654a, 0x00}, ++{0x654b, 0x00}, ++{0x654c, 0x05}, ++{0x654d, 0x04}, ++{0x654e, 0x00}, ++{0x654f, 0x04}, ++{0x6550, 0x05}, ++{0x6551, 0x00}, ++{0x6552, 0x05}, ++{0x6553, 0x0a}, ++{0x6554, 0x03}, ++{0x6555, 0x97}, ++{0x6556, 0x05}, ++{0x6557, 0x06}, ++{0x6558, 0x05}, ++{0x6559, 0x04}, ++{0x655a, 0x00}, ++{0x655b, 0x04}, ++{0x655c, 0x05}, ++{0x655d, 0x00}, ++{0x655e, 0x05}, ++{0x655f, 0x0a}, ++{0x6560, 0x03}, ++{0x6561, 0x96}, ++{0x6562, 0x05}, ++{0x6563, 0x06}, ++{0x6564, 0x05}, ++{0x6565, 0x04}, ++{0x6566, 0x00}, ++{0x6567, 0x04}, ++{0x6568, 0x05}, ++{0x6569, 0x00}, ++{0x656a, 0x05}, ++{0x656b, 0x0a}, ++{0x656c, 0x03}, ++{0x656d, 0x95}, ++{0x656e, 0x05}, ++{0x656f, 0x06}, ++{0x6570, 0x05}, ++{0x6571, 0x04}, ++{0x6572, 0x00}, ++{0x6573, 0x04}, ++{0x6574, 0x05}, ++{0x6575, 0x00}, ++{0x6576, 0x05}, ++{0x6577, 0x0a}, ++{0x6578, 0x03}, ++{0x6579, 0x94}, ++{0x657a, 0x05}, ++{0x657b, 0x06}, ++{0x657c, 0x00}, ++{0x657d, 0x00}, ++{0x657e, 0x05}, ++{0x657f, 0x04}, ++{0x6580, 0x00}, ++{0x6581, 0x04}, ++{0x6582, 0x05}, ++{0x6583, 0x00}, ++{0x6584, 0x05}, ++{0x6585, 0x0a}, ++{0x6586, 0x03}, ++{0x6587, 0x93}, ++{0x6588, 0x05}, ++{0x6589, 0x06}, ++{0x658a, 0x00}, ++{0x658b, 0x00}, ++{0x658c, 0x05}, ++{0x658d, 0x04}, ++{0x658e, 0x00}, ++{0x658f, 0x04}, ++{0x6590, 0x05}, ++{0x6591, 0x00}, ++{0x6592, 0x05}, ++{0x6593, 0x0a}, ++{0x6594, 0x03}, ++{0x6595, 0x92}, ++{0x6596, 0x05}, ++{0x6597, 0x06}, ++{0x6598, 0x05}, ++{0x6599, 0x04}, ++{0x659a, 0x00}, ++{0x659b, 0x04}, ++{0x659c, 0x05}, ++{0x659d, 0x00}, ++{0x659e, 0x05}, ++{0x659f, 0x0a}, ++{0x65a0, 0x03}, ++{0x65a1, 0x91}, ++{0x65a2, 0x05}, ++{0x65a3, 0x06}, ++{0x65a4, 0x05}, ++{0x65a5, 0x04}, ++{0x65a6, 0x00}, ++{0x65a7, 0x04}, ++{0x65a8, 0x05}, ++{0x65a9, 0x00}, ++{0x65aa, 0x05}, ++{0x65ab, 0x0a}, ++{0x65ac, 0x03}, ++{0x65ad, 0x90}, ++{0x65ae, 0x05}, ++{0x65af, 0x06}, ++{0x65b0, 0x05}, ++{0x65b1, 0x04}, ++{0x65b2, 0x00}, ++{0x65b3, 0x04}, ++{0x65b4, 0x05}, ++{0x65b5, 0x00}, ++{0x65b6, 0x05}, ++{0x65b7, 0x0a}, ++{0x65b8, 0x02}, ++{0x65b9, 0x90}, ++{0x65ba, 0x05}, ++{0x65bb, 0x06}, ++{0x65bc, 0x00}, ++{0x65bd, 0xff}, ++{0x65be, 0x04}, ++{0x65bf, 0x70}, ++{0x65c0, 0x08}, ++{0x65c1, 0x76}, ++{0x65c2, 0x00}, ++{0x65c3, 0xff}, ++{0x65c4, 0x08}, ++{0x65c5, 0x76}, ++{0x65c6, 0x04}, ++{0x65c7, 0x0c}, ++{0x65c8, 0x05}, ++{0x65c9, 0x07}, ++{0x65ca, 0x04}, ++{0x65cb, 0x04}, ++{0x65cc, 0x00}, ++{0x65cd, 0xff}, ++{0x65ce, 0x00}, ++{0x65cf, 0xff}, ++{0x65d0, 0x00}, ++{0x65d1, 0xff}, ++{0x30eb, 0x04}, ++{0x30ed, 0x5a}, ++{0x30ee, 0x01}, ++{0x30ef, 0x80}, ++{0x30f1, 0x5a}, ++{0x303a, 0x04}, ++{0x303b, 0x7f}, ++{0x303c, 0xfe}, ++{0x303d, 0x19}, ++{0x303e, 0xd7}, ++{0x303f, 0x09}, ++{0x3040, 0x78}, ++{0x3042, 0x05}, ++{0x328a, 0x10}, ++#if 0 ++{0x3012, 0x01}, ++{0x3012, 0x00}, ++{0x3119, 0x44}, ++{0x328a, 0x10}, ++{0x3012, 0x01}, ++#else ++{0x328a, 0x10}, ++/* HFLIP=1, VFLIP=0 */ ++{0x3128, 0xc0 | 0x1}, ++{0x3291, 0x01 | 0x2}, ++{0x3090, 0x4}, ++/* change settings to 1280x1080 COMB12 30 fps, 96MHz */ ++{0x3012, 0x0}, ++{0x3000, 0x3}, ++{0x3001, 0x50}, ++{0x3002, 0x0a}, ++{0x3004, 0x3}, ++{0x3005, 0x48}, ++{0x3006, 0x7}, ++{0x308f, 0x10}, ++{0x3127, 0x63}, ++{0x3074, OV10640_X_START >> 8}, ++{0x3075, OV10640_X_START & 0xff}, ++{0x3076, OV10640_Y_START >> 8}, ++{0x3077, OV10640_Y_START & 0xff}, ++{0x3078, OV10640_X_END >> 8}, ++{0x3079, OV10640_X_END & 0xff}, ++{0x307a, OV10640_Y_END >> 8}, ++{0x307b, OV10640_Y_END & 0xff}, ++{0x307c, OV10640_MAX_WIDTH >> 8}, ++{0x307d, OV10640_MAX_WIDTH & 0xff}, ++{0x307e, OV10640_MAX_HEIGHT >> 8}, ++{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS ++{0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, ++{0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS ++{0x3083, (OV10640_SENSOR_HEIGHT + 208) & 0xff}, ++{0x3084, 0x0}, ++{0x3085, 0x0}, ++{0x3086, 0x0}, ++{0x3087, 0x0}, ++{0x346d, 0x14}, ++{0x3444, 0x28}, ++{0x3091, 0x0}, ++{0x3119, 0x44}, // COMB12 ++{0x3012, 0x1}, ++#endif ++}; +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1f.h b/drivers/media/i2c/soc_camera/ov10640_r1f.h +new file mode 100644 +index 0000000..ef866fa +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/ov10640_r1f.h +@@ -0,0 +1,1198 @@ ++/* ++ * OmniVision ov10640 sensor camera wizard 1280x1080@30/BGGR/BT601/12bit ++ * ++ * Copyright (C) 2015-2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++/* DVP_1280x1080_COMB12_raw 60fps */ ++static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { ++//{0x3013, 0x01}, ++//{OV10640_DELAY, 10}, ++{0x31be, 0x01}, ++{0x3133, 0xb7}, ++{0x3134, 0xca}, ++{0x3135, 0xcc}, ++{0x313f, 0x80}, ++{0x3132, 0x24}, ++{0x3000, 0x03}, ++{0x3001, 0x62}, ++{0x3002, 0x07}, ++{0x3004, 0x03}, ++{0x3005, 0x62}, ++{0x3006, 0x07}, ++{0x3007, 0x01}, ++{0x3023, 0x05}, ++{0x3032, 0x35}, ++{0x3033, 0x04}, ++{0x3054, 0x00}, ++{0x3055, 0x0f}, ++{0x3056, 0x01}, ++{0x3057, 0xff}, ++{0x3058, 0xaf}, ++{0x3059, 0x44}, ++{0x305a, 0x02}, ++{0x305b, 0x00}, ++{0x305c, 0x30}, ++{0x305d, 0x9e}, ++{0x305e, 0x19}, ++{0x305f, 0x18}, ++{0x3060, 0xf9}, ++{0x3061, 0xf0}, ++#ifdef OV10640_FSIN_ENABLE ++{0x308c, 0xb2}, ++#else ++{0x308c, 0x03}, ++#endif ++{0x308f, 0x10}, ++{0x3090, 0x00}, ++{0x3091, 0x00}, ++{0x30eb, 0x00}, ++{0x30a3, 0x08}, ++{0x30ad, 0x03}, ++{0x30ae, 0x80}, ++{0x30af, 0x80}, ++{0x30b0, 0xff}, ++{0x30b1, 0x3f}, ++{0x30b2, 0x22}, ++{0x30b9, 0x22}, ++{0x30bb, 0x00}, ++{0x30bc, 0x00}, ++{0x30bd, 0x00}, ++{0x30be, 0x00}, ++{0x30bf, 0x00}, ++{0x30c0, 0x00}, ++{0x30c1, 0x00}, ++{0x30c2, 0x00}, ++{0x30c3, 0x00}, ++{0x30c4, 0x80}, ++{0x30c5, 0x00}, ++{0x30c6, 0x80}, ++{0x30c7, 0x00}, ++{0x30c8, 0x80}, ++{0x3119, 0x44}, ++{0x311a, 0x01}, ++{0x311b, 0x4a}, ++{0x3074, 0x00}, ++{0x3075, 0x00}, ++{0x3076, 0x00}, ++{0x3077, 0x02}, ++{0x3078, 0x05}, ++{0x3079, 0x07}, ++{0x307a, 0x04}, ++{0x307b, 0x41}, ++{0x307c, 0x05}, ++{0x307d, 0x00}, ++{0x307e, 0x04}, ++{0x307f, 0x38}, ++{0x3080, 0x05}, ++{0x3081, 0xbe}, ++{0x3082, 0x04}, ++{0x3083, 0x57}, ++{0x3084, 0x00}, ++{0x3085, 0x04}, ++{0x3086, 0x00}, ++{0x3087, 0x04}, ++{0x3088, 0x00}, ++{0x3089, 0x40}, ++{0x308d, 0x92}, ++{0x3094, 0xa5}, ++{0x30e6, 0x04}, ++{0x30e7, 0x48}, ++{0x30e8, 0x04}, ++{0x30e9, 0x48}, ++{0x30ea, 0x11}, ++{0x30ec, 0x01}, ++{0x30fa, 0x06}, ++{0x3120, 0x00}, ++{0x3121, 0x01}, ++{0x3122, 0x00}, ++{0x3127, 0x63}, ++{0x3128, 0xc0}, ++#ifdef OV10640_DISPLAY_PATTERN ++{0x3129, 0x80}, ++#else ++{0x3129, 0x00}, ++#endif ++{0x31be, 0x01}, ++{0x30a5, 0x78}, ++{0x30a6, 0x40}, ++{0x30a7, 0x78}, ++{0x30a8, 0x80}, ++{0x30a9, 0x79}, ++{0x30aa, 0x00}, ++{0x30ab, 0x79}, ++{0x30ac, 0xf8}, ++{0x3440, 0x04}, ++{0x3444, 0x28}, ++{0x344e, 0x2c}, ++{0x3457, 0x33}, ++{0x345e, 0x38}, ++{0x3461, 0xa8}, ++{0x7002, 0xaa}, ++{0x7001, 0xdf}, ++{0x7048, 0x00}, ++{0x7049, 0x02}, ++{0x704a, 0x02}, ++{0x704b, 0x00}, ++{0x704c, 0x01}, ++{0x704d, 0x00}, ++{0x7043, 0x04}, ++{0x7040, 0x3c}, ++{0x7047, 0x00}, ++{0x7044, 0x01}, ++{0x7000, 0x1f}, ++{0x7084, 0x01}, ++{0x7085, 0x03}, ++{0x7086, 0x02}, ++{0x7087, 0x40}, ++{0x7088, 0x01}, ++{0x7089, 0x20}, ++{0x707f, 0x04}, ++{0x707c, 0x3c}, ++{0x7083, 0x00}, ++{0x7080, 0x01}, ++{0x7003, 0xdf}, ++{0x70c0, 0x00}, ++{0x70c1, 0x02}, ++{0x70c2, 0x02}, ++{0x70c3, 0x00}, ++{0x70c4, 0x01}, ++{0x70c5, 0x00}, ++{0x70b8, 0x03}, ++{0x70b9, 0x98}, ++{0x70bc, 0x00}, ++{0x70bd, 0x80}, ++{0x7004, 0x02}, ++{0x7005, 0x00}, ++{0x7006, 0x01}, ++{0x7007, 0x80}, ++{0x7008, 0x02}, ++{0x7009, 0x00}, ++{0x700a, 0x04}, ++{0x700b, 0x00}, ++{0x700e, 0x00}, ++{0x700f, 0x60}, ++{0x701a, 0x02}, ++{0x701b, 0x00}, ++{0x701c, 0x01}, ++{0x701d, 0x80}, ++{0x701e, 0x02}, ++{0x701f, 0x00}, ++{0x7020, 0x04}, ++{0x7021, 0x00}, ++{0x7024, 0x00}, ++{0x7025, 0x60}, ++{0x70e7, 0x00}, ++{0x70e4, 0x10}, ++{0x70e5, 0x00}, ++{0x70e6, 0x00}, ++{0x70eb, 0x00}, ++{0x70e8, 0x10}, ++{0x70e9, 0x00}, ++{0x70ea, 0x00}, ++{0x70ef, 0x00}, ++{0x70ec, 0xfd}, ++{0x70ed, 0x00}, ++{0x70ee, 0x00}, ++{0x70eb, 0x00}, ++{0x70f0, 0xfd}, ++{0x70f1, 0x00}, ++{0x70f2, 0x00}, ++{0x30fb, 0x06}, ++{0x30fc, 0x80}, ++{0x30fd, 0x02}, ++{0x30fe, 0x93}, ++{0x6000, 0xc1}, ++{0x6001, 0xb9}, ++{0x6002, 0xba}, ++{0x6003, 0xa4}, ++{0x6004, 0xa4}, ++{0x6005, 0xb5}, ++{0x6006, 0xa0}, ++{0x6007, 0x82}, ++{0x6008, 0xa7}, ++{0x6009, 0xa7}, ++{0x600a, 0xb7}, ++{0x600b, 0x5c}, ++{0x600c, 0x9e}, ++{0x600d, 0xc0}, ++{0x600e, 0xd2}, ++{0x600f, 0x33}, ++{0x6010, 0xcc}, ++{0x6011, 0xe2}, ++{0x6012, 0xc1}, ++{0x6013, 0xab}, ++{0x6014, 0xab}, ++{0x6015, 0xb7}, ++{0x6016, 0x00}, ++{0x6017, 0x00}, ++{0x6018, 0x00}, ++{0x6019, 0x00}, ++{0x601a, 0x00}, ++{0x601b, 0x00}, ++{0x601c, 0x00}, ++{0x601d, 0x00}, ++{0x601e, 0x00}, ++{0x601f, 0x00}, ++{0x6020, 0x00}, ++{0x6021, 0x00}, ++{0x6022, 0x00}, ++{0x6023, 0x9c}, ++{0x6024, 0x94}, ++{0x6025, 0x90}, ++{0x6026, 0xc5}, ++{0x6027, 0x00}, ++{0x6028, 0x54}, ++{0x6029, 0x2a}, ++{0x602a, 0x61}, ++{0x602b, 0xd2}, ++{0x602c, 0xcc}, ++{0x602d, 0x04}, ++{0x602e, 0x35}, ++{0x602f, 0xb1}, ++{0x6030, 0xb2}, ++{0x6031, 0xb3}, ++{0x6032, 0xd2}, ++{0x6033, 0xd3}, ++{0x6034, 0x11}, ++{0x6035, 0x31}, ++{0x6036, 0xcc}, ++{0x6037, 0x06}, ++{0x6038, 0xd2}, ++{0x6039, 0x00}, ++{0x603a, 0xce}, ++{0x603b, 0x18}, ++{0x603c, 0xcf}, ++{0x603d, 0x1e}, ++{0x603e, 0xd0}, ++{0x603f, 0x24}, ++{0x6040, 0xc5}, ++{0x6041, 0xd2}, ++{0x6042, 0xbc}, ++{0x6043, 0xcc}, ++{0x6044, 0x52}, ++{0x6045, 0x2b}, ++{0x6046, 0xd2}, ++{0x6047, 0xd3}, ++{0x6048, 0x01}, ++{0x6049, 0xcc}, ++{0x604a, 0x0a}, ++{0x604b, 0xd2}, ++{0x604c, 0xd3}, ++{0x604d, 0x0f}, ++{0x604e, 0x1a}, ++{0x604f, 0x2a}, ++{0x6050, 0xd4}, ++{0x6051, 0xe3}, ++{0x6052, 0xba}, ++{0x6053, 0x56}, ++{0x6054, 0xd3}, ++{0x6055, 0x2e}, ++{0x6056, 0x54}, ++{0x6057, 0x26}, ++{0x6058, 0xd2}, ++{0x6059, 0xcc}, ++{0x605a, 0x60}, ++{0x605b, 0xd2}, ++{0x605c, 0xd3}, ++{0x605d, 0x27}, ++{0x605e, 0x27}, ++{0x605f, 0x08}, ++{0x6060, 0x1a}, ++{0x6061, 0xcc}, ++{0x6062, 0x88}, ++{0x6063, 0x00}, ++{0x6064, 0x12}, ++{0x6065, 0x2c}, ++{0x6066, 0x60}, ++{0x6067, 0xc2}, ++{0x6068, 0xb9}, ++{0x6069, 0xa5}, ++{0x606a, 0xa5}, ++{0x606b, 0xb5}, ++{0x606c, 0xa0}, ++{0x606d, 0x82}, ++{0x606e, 0x5c}, ++{0x606f, 0xd4}, ++{0x6070, 0xab}, ++{0x6071, 0xd4}, ++{0x6072, 0xab}, ++{0x6073, 0xd3}, ++{0x6074, 0x01}, ++{0x6075, 0x7c}, ++{0x6076, 0x74}, ++{0x6077, 0x00}, ++{0x6078, 0x61}, ++{0x6079, 0x2a}, ++{0x607a, 0xd2}, ++{0x607b, 0xcc}, ++{0x607c, 0xdf}, ++{0x607d, 0xc6}, ++{0x607e, 0x35}, ++{0x607f, 0xd2}, ++{0x6080, 0xcc}, ++{0x6081, 0x06}, ++{0x6082, 0x31}, ++{0x6083, 0xd2}, ++{0x6084, 0x00}, ++{0x6085, 0xbb}, ++{0x6086, 0xcc}, ++{0x6087, 0x18}, ++{0x6088, 0xc6}, ++{0x6089, 0xd2}, ++{0x608a, 0xbd}, ++{0x608b, 0xcc}, ++{0x608c, 0x52}, ++{0x608d, 0x2b}, ++{0x608e, 0xd2}, ++{0x608f, 0xd3}, ++{0x6090, 0x01}, ++{0x6091, 0xcc}, ++{0x6092, 0x0a}, ++{0x6093, 0xd2}, ++{0x6094, 0xd3}, ++{0x6095, 0x0f}, ++{0x6096, 0x1a}, ++{0x6097, 0x71}, ++{0x6098, 0x2a}, ++{0x6099, 0xd4}, ++{0x609a, 0xe3}, ++{0x609b, 0xd3}, ++{0x609c, 0x22}, ++{0x609d, 0x70}, ++{0x609e, 0xca}, ++{0x609f, 0x26}, ++{0x60a0, 0xd2}, ++{0x60a1, 0xcc}, ++{0x60a2, 0x60}, ++{0x60a3, 0xd2}, ++{0x60a4, 0xd3}, ++{0x60a5, 0x27}, ++{0x60a6, 0x27}, ++{0x60a7, 0x08}, ++{0x60a8, 0x1a}, ++{0x60a9, 0xcc}, ++{0x60aa, 0x88}, ++{0x60ab, 0x00}, ++{0x60ac, 0x12}, ++{0x60ad, 0x2c}, ++{0x60ae, 0x60}, ++{0x60af, 0x00}, ++{0x60b0, 0x00}, ++{0x60b1, 0xc0}, ++{0x60b2, 0xb9}, ++{0x60b3, 0xa3}, ++{0x60b4, 0xa3}, ++{0x60b5, 0xb5}, ++{0x60b6, 0x00}, ++{0x60b7, 0xa0}, ++{0x60b8, 0x82}, ++{0x60b9, 0x5c}, ++{0x60ba, 0xd4}, ++{0x60bb, 0x8b}, ++{0x60bc, 0x9d}, ++{0x60bd, 0xd3}, ++{0x60be, 0x21}, ++{0x60bf, 0xb0}, ++{0x60c0, 0xb0}, ++{0x60c1, 0xb7}, ++{0x60c2, 0x05}, ++{0x60c3, 0xd3}, ++{0x60c4, 0x0a}, ++{0x60c5, 0xd3}, ++{0x60c6, 0x10}, ++{0x60c7, 0x9c}, ++{0x60c8, 0x94}, ++{0x60c9, 0x90}, ++{0x60ca, 0xc8}, ++{0x60cb, 0xba}, ++{0x60cc, 0x7c}, ++{0x60cd, 0x74}, ++{0x60ce, 0x00}, ++{0x60cf, 0x61}, ++{0x60d0, 0x2a}, ++{0x60d1, 0x00}, ++{0x60d2, 0xd2}, ++{0x60d3, 0xcc}, ++{0x60d4, 0xdf}, ++{0x60d5, 0xc4}, ++{0x60d6, 0x35}, ++{0x60d7, 0xd3}, ++{0x60d8, 0x13}, ++{0x60d9, 0xd2}, ++{0x60da, 0xcc}, ++{0x60db, 0x06}, ++{0x60dc, 0x31}, ++{0x60dd, 0xd2}, ++{0x60de, 0xcc}, ++{0x60df, 0x15}, ++{0x60e0, 0xd2}, ++{0x60e1, 0xbb}, ++{0x60e2, 0xcc}, ++{0x60e3, 0x1a}, ++{0x60e4, 0xd2}, ++{0x60e5, 0xbe}, ++{0x60e6, 0xce}, ++{0x60e7, 0x52}, ++{0x60e8, 0xcf}, ++{0x60e9, 0x56}, ++{0x60ea, 0xd0}, ++{0x60eb, 0x5b}, ++{0x60ec, 0x2b}, ++{0x60ed, 0xd2}, ++{0x60ee, 0xd3}, ++{0x60ef, 0x01}, ++{0x60f0, 0xcc}, ++{0x60f1, 0x0a}, ++{0x60f2, 0xd2}, ++{0x60f3, 0xd3}, ++{0x60f4, 0x0f}, ++{0x60f5, 0xd9}, ++{0x60f6, 0xb4}, ++{0x60f7, 0xda}, ++{0x60f8, 0xbb}, ++{0x60f9, 0x1a}, ++{0x60fa, 0xd4}, ++{0x60fb, 0xe3}, ++{0x60fc, 0xd4}, ++{0x60fd, 0x96}, ++{0x60fe, 0x27}, ++{0x60ff, 0x00}, ++{0x6100, 0xd2}, ++{0x6101, 0xcc}, ++{0x6102, 0x60}, ++{0x6103, 0xd2}, ++{0x6104, 0xd3}, ++{0x6105, 0x2d}, ++{0x6106, 0xd9}, ++{0x6107, 0xcc}, ++{0x6108, 0xda}, ++{0x6109, 0xd2}, ++{0x610a, 0x1a}, ++{0x610b, 0x12}, ++{0x610c, 0xcc}, ++{0x610d, 0x88}, ++{0x610e, 0xd6}, ++{0x610f, 0x9e}, ++{0x6110, 0xb9}, ++{0x6111, 0xba}, ++{0x6112, 0xaf}, ++{0x6113, 0xdc}, ++{0x6114, 0x00}, ++{0x6115, 0xd5}, ++{0x6116, 0xba}, ++{0x6117, 0x00}, ++{0x6118, 0x00}, ++{0x6119, 0x00}, ++{0x611a, 0x00}, ++{0x611b, 0x00}, ++{0x611c, 0x00}, ++{0x611d, 0x00}, ++{0x611e, 0x00}, ++{0x611f, 0xaa}, ++{0x6120, 0xaa}, ++{0x6121, 0xb7}, ++{0x6122, 0x00}, ++{0x6123, 0x00}, ++{0x6124, 0x00}, ++{0x6125, 0x00}, ++{0x6126, 0x00}, ++{0x6127, 0xa6}, ++{0x6128, 0xa6}, ++{0x6129, 0xb7}, ++{0x612a, 0x00}, ++{0x612b, 0xd5}, ++{0x612c, 0x71}, ++{0x612d, 0xd3}, ++{0x612e, 0x30}, ++{0x612f, 0xba}, ++{0x6130, 0x00}, ++{0x6131, 0x00}, ++{0x6132, 0x00}, ++{0x6133, 0x00}, ++{0x6134, 0xd3}, ++{0x6135, 0x10}, ++{0x6136, 0x70}, ++{0x6137, 0x00}, ++{0x6138, 0x00}, ++{0x6139, 0x00}, ++{0x613a, 0x00}, ++{0x613b, 0xd5}, ++{0x613c, 0xba}, ++{0x613d, 0xb0}, ++{0x613e, 0xb0}, ++{0x613f, 0xb7}, ++{0x6140, 0x9d}, ++{0x6141, 0x02}, ++{0x6142, 0xd3}, ++{0x6143, 0x0a}, ++{0x6144, 0x9d}, ++{0x6145, 0x9d}, ++{0x6146, 0xd3}, ++{0x6147, 0x10}, ++{0x6148, 0x9c}, ++{0x6149, 0x94}, ++{0x614a, 0x90}, ++{0x614b, 0xc8}, ++{0x614c, 0xba}, ++{0x614d, 0xd2}, ++{0x614e, 0x60}, ++{0x614f, 0x2c}, ++{0x6150, 0x50}, ++{0x6151, 0x11}, ++{0x6152, 0xcc}, ++{0x6153, 0x00}, ++{0x6154, 0x30}, ++{0x6155, 0xd5}, ++{0x6156, 0xba}, ++{0x6157, 0xb0}, ++{0x6158, 0xb0}, ++{0x6159, 0xb7}, ++{0x615a, 0x9d}, ++{0x615b, 0x02}, ++{0x615c, 0xd3}, ++{0x615d, 0x0a}, ++{0x615e, 0x9d}, ++{0x615f, 0x9d}, ++{0x6160, 0xd3}, ++{0x6161, 0x10}, ++{0x6162, 0x9c}, ++{0x6163, 0x94}, ++{0x6164, 0x90}, ++{0x6165, 0xc8}, ++{0x6166, 0xba}, ++{0x6167, 0xd5}, ++{0x6168, 0x01}, ++{0x6169, 0x1a}, ++{0x616a, 0xcc}, ++{0x616b, 0x12}, ++{0x616c, 0x12}, ++{0x616d, 0x00}, ++{0x616e, 0xcc}, ++{0x616f, 0x9c}, ++{0x6170, 0xd2}, ++{0x6171, 0xcc}, ++{0x6172, 0x60}, ++{0x6173, 0xd2}, ++{0x6174, 0x04}, ++{0x6175, 0xd5}, ++{0x6176, 0x1a}, ++{0x6177, 0xcc}, ++{0x6178, 0x12}, ++{0x6179, 0x00}, ++{0x617a, 0x12}, ++{0x617b, 0xcc}, ++{0x617c, 0x9c}, ++{0x617d, 0xd2}, ++{0x617e, 0xcc}, ++{0x617f, 0x60}, ++{0x6180, 0xd2}, ++{0x6181, 0x1a}, ++{0x6182, 0xcc}, ++{0x6183, 0x12}, ++{0x6184, 0x00}, ++{0x6185, 0x12}, ++{0x6186, 0xcc}, ++{0x6187, 0x9c}, ++{0x6188, 0xd2}, ++{0x6189, 0xcc}, ++{0x618a, 0x60}, ++{0x618b, 0xd2}, ++{0x618c, 0x1a}, ++{0x618d, 0xcc}, ++{0x618e, 0x12}, ++{0x618f, 0x00}, ++{0x6190, 0x12}, ++{0x6191, 0xcc}, ++{0x6192, 0x9c}, ++{0x6193, 0xd2}, ++{0x6194, 0xcc}, ++{0x6195, 0x60}, ++{0x6196, 0xd2}, ++{0x6197, 0xd5}, ++{0x6198, 0x1a}, ++{0x6199, 0xcc}, ++{0x619a, 0x12}, ++{0x619b, 0x12}, ++{0x619c, 0x00}, ++{0x619d, 0xcc}, ++{0x619e, 0x8a}, ++{0x619f, 0xd2}, ++{0x61a0, 0xcc}, ++{0x61a1, 0x74}, ++{0x61a2, 0xd2}, ++{0x61a3, 0xd5}, ++{0x61a4, 0x1a}, ++{0x61a5, 0xcc}, ++{0x61a6, 0x12}, ++{0x61a7, 0x00}, ++{0x61a8, 0x12}, ++{0x61a9, 0xcc}, ++{0x61aa, 0x8a}, ++{0x61ab, 0xd2}, ++{0x61ac, 0xcc}, ++{0x61ad, 0x74}, ++{0x61ae, 0xd2}, ++{0x61af, 0x1a}, ++{0x61b0, 0xcc}, ++{0x61b1, 0x12}, ++{0x61b2, 0x00}, ++{0x61b3, 0x12}, ++{0x61b4, 0xcc}, ++{0x61b5, 0x8a}, ++{0x61b6, 0xd2}, ++{0x61b7, 0xcc}, ++{0x61b8, 0x74}, ++{0x61b9, 0xd2}, ++{0x61ba, 0x1a}, ++{0x61bb, 0xcc}, ++{0x61bc, 0x12}, ++{0x61bd, 0x00}, ++{0x61be, 0x12}, ++{0x61bf, 0xcc}, ++{0x61c0, 0x8a}, ++{0x61c1, 0xd2}, ++{0x61c2, 0xcc}, ++{0x61c3, 0x74}, ++{0x61c4, 0xd2}, ++{0x61c5, 0xd5}, ++{0x61c6, 0xcc}, ++{0x61c7, 0x12}, ++{0x61c8, 0x00}, ++{0x61c9, 0x12}, ++{0x61ca, 0xcc}, ++{0x61cb, 0x9c}, ++{0x61cc, 0xd5}, ++{0x6400, 0x04}, ++{0x6401, 0x04}, ++{0x6402, 0x00}, ++{0x6403, 0xff}, ++{0x6404, 0x00}, ++{0x6405, 0x08}, ++{0x6406, 0x00}, ++{0x6407, 0xff}, ++{0x6408, 0x04}, ++{0x6409, 0x70}, ++{0x640a, 0x00}, ++{0x640b, 0xff}, ++{0x640c, 0x05}, ++{0x640d, 0x14}, ++{0x640e, 0x04}, ++{0x640f, 0x71}, ++{0x6410, 0x05}, ++{0x6411, 0x74}, ++{0x6412, 0x00}, ++{0x6413, 0xff}, ++{0x6414, 0x05}, ++{0x6415, 0x54}, ++{0x6416, 0x05}, ++{0x6417, 0x44}, ++{0x6418, 0x04}, ++{0x6419, 0x30}, ++{0x641a, 0x05}, ++{0x641b, 0x46}, ++{0x641c, 0x00}, ++{0x641d, 0xff}, ++{0x641e, 0x04}, ++{0x641f, 0x31}, ++{0x6420, 0x04}, ++{0x6421, 0x30}, ++{0x6422, 0x00}, ++{0x6423, 0xff}, ++{0x6424, 0x04}, ++{0x6425, 0x20}, ++{0x6426, 0x05}, ++{0x6427, 0x06}, ++{0x6428, 0x00}, ++{0x6429, 0xff}, ++{0x642a, 0x08}, ++{0x642b, 0x2a}, ++{0x642c, 0x08}, ++{0x642d, 0x31}, ++{0x642e, 0x00}, ++{0x642f, 0xff}, ++{0x6430, 0x08}, ++{0x6431, 0x2a}, ++{0x6432, 0x08}, ++{0x6433, 0x31}, ++{0x6434, 0x06}, ++{0x6435, 0x20}, ++{0x6436, 0x07}, ++{0x6437, 0x00}, ++{0x6438, 0x08}, ++{0x6439, 0x40}, ++{0x643a, 0x00}, ++{0x643b, 0xff}, ++{0x643c, 0x08}, ++{0x643d, 0x2a}, ++{0x643e, 0x08}, ++{0x643f, 0x36}, ++{0x6440, 0x06}, ++{0x6441, 0x10}, ++{0x6442, 0x07}, ++{0x6443, 0x00}, ++{0x6444, 0x08}, ++{0x6445, 0x40}, ++{0x6446, 0x00}, ++{0x6447, 0xff}, ++{0x6448, 0x08}, ++{0x6449, 0x2a}, ++{0x644a, 0x08}, ++{0x644b, 0x3b}, ++{0x644c, 0x06}, ++{0x644d, 0x00}, ++{0x644e, 0x07}, ++{0x644f, 0x00}, ++{0x6450, 0x08}, ++{0x6451, 0x40}, ++{0x6452, 0x00}, ++{0x6453, 0xff}, ++{0x6454, 0x06}, ++{0x6455, 0x00}, ++{0x6456, 0x07}, ++{0x6457, 0x05}, ++{0x6458, 0x01}, ++{0x6459, 0xaf}, ++{0x645a, 0x01}, ++{0x645b, 0x0f}, ++{0x645c, 0x01}, ++{0x645d, 0x90}, ++{0x645e, 0x01}, ++{0x645f, 0xc8}, ++{0x6460, 0x00}, ++{0x6461, 0xff}, ++{0x6462, 0x01}, ++{0x6463, 0xac}, ++{0x6464, 0x01}, ++{0x6465, 0x0c}, ++{0x6466, 0x01}, ++{0x6467, 0x90}, ++{0x6468, 0x01}, ++{0x6469, 0xe8}, ++{0x646a, 0x00}, ++{0x646b, 0xff}, ++{0x646c, 0x01}, ++{0x646d, 0xad}, ++{0x646e, 0x01}, ++{0x646f, 0x0d}, ++{0x6470, 0x01}, ++{0x6471, 0x90}, ++{0x6472, 0x01}, ++{0x6473, 0xe8}, ++{0x6474, 0x00}, ++{0x6475, 0xff}, ++{0x6476, 0x01}, ++{0x6477, 0xae}, ++{0x6478, 0x01}, ++{0x6479, 0x0e}, ++{0x647a, 0x01}, ++{0x647b, 0x90}, ++{0x647c, 0x01}, ++{0x647d, 0xe8}, ++{0x647e, 0x00}, ++{0x647f, 0xff}, ++{0x6480, 0x01}, ++{0x6481, 0xb0}, ++{0x6482, 0x01}, ++{0x6483, 0xb1}, ++{0x6484, 0x01}, ++{0x6485, 0xb2}, ++{0x6486, 0x01}, ++{0x6487, 0xb3}, ++{0x6488, 0x01}, ++{0x6489, 0xb4}, ++{0x648a, 0x01}, ++{0x648b, 0xb5}, ++{0x648c, 0x01}, ++{0x648d, 0xb6}, ++{0x648e, 0x01}, ++{0x648f, 0xb7}, ++{0x6490, 0x01}, ++{0x6491, 0xb8}, ++{0x6492, 0x01}, ++{0x6493, 0xb9}, ++{0x6494, 0x01}, ++{0x6495, 0xba}, ++{0x6496, 0x01}, ++{0x6497, 0xbb}, ++{0x6498, 0x01}, ++{0x6499, 0xbc}, ++{0x649a, 0x01}, ++{0x649b, 0xbd}, ++{0x649c, 0x01}, ++{0x649d, 0xbe}, ++{0x649e, 0x01}, ++{0x649f, 0xbf}, ++{0x64a0, 0x01}, ++{0x64a1, 0xc0}, ++{0x64a2, 0x00}, ++{0x64a3, 0xff}, ++{0x64a4, 0x06}, ++{0x64a5, 0x00}, ++{0x64a6, 0x01}, ++{0x64a7, 0xf6}, ++{0x64a8, 0x04}, ++{0x64a9, 0x30}, ++{0x64aa, 0x00}, ++{0x64ab, 0xff}, ++{0x64ac, 0x06}, ++{0x64ad, 0x10}, ++{0x64ae, 0x01}, ++{0x64af, 0xf6}, ++{0x64b0, 0x04}, ++{0x64b1, 0x30}, ++{0x64b2, 0x06}, ++{0x64b3, 0x00}, ++{0x64b4, 0x00}, ++{0x64b5, 0xff}, ++{0x64b6, 0x06}, ++{0x64b7, 0x20}, ++{0x64b8, 0x01}, ++{0x64b9, 0xf6}, ++{0x64ba, 0x04}, ++{0x64bb, 0x30}, ++{0x64bc, 0x06}, ++{0x64bd, 0x00}, ++{0x64be, 0x00}, ++{0x64bf, 0xff}, ++{0x64c0, 0x04}, ++{0x64c1, 0x31}, ++{0x64c2, 0x04}, ++{0x64c3, 0x30}, ++{0x64c4, 0x01}, ++{0x64c5, 0x20}, ++{0x64c6, 0x01}, ++{0x64c7, 0x31}, ++{0x64c8, 0x01}, ++{0x64c9, 0x32}, ++{0x64ca, 0x01}, ++{0x64cb, 0x33}, ++{0x64cc, 0x01}, ++{0x64cd, 0x34}, ++{0x64ce, 0x01}, ++{0x64cf, 0x35}, ++{0x64d0, 0x01}, ++{0x64d1, 0x36}, ++{0x64d2, 0x01}, ++{0x64d3, 0x37}, ++{0x64d4, 0x01}, ++{0x64d5, 0x38}, ++{0x64d6, 0x01}, ++{0x64d7, 0x39}, ++{0x64d8, 0x01}, ++{0x64d9, 0x3a}, ++{0x64da, 0x01}, ++{0x64db, 0x3b}, ++{0x64dc, 0x01}, ++{0x64dd, 0x3c}, ++{0x64de, 0x01}, ++{0x64df, 0x3d}, ++{0x64e0, 0x01}, ++{0x64e1, 0x3e}, ++{0x64e2, 0x01}, ++{0x64e3, 0x3f}, ++{0x64e4, 0x02}, ++{0x64e5, 0xa0}, ++{0x64e6, 0x00}, ++{0x64e7, 0xff}, ++{0x64e8, 0x04}, ++{0x64e9, 0x31}, ++{0x64ea, 0x04}, ++{0x64eb, 0x30}, ++{0x64ec, 0x01}, ++{0x64ed, 0x00}, ++{0x64ee, 0x01}, ++{0x64ef, 0x11}, ++{0x64f0, 0x01}, ++{0x64f1, 0x12}, ++{0x64f2, 0x01}, ++{0x64f3, 0x13}, ++{0x64f4, 0x01}, ++{0x64f5, 0x14}, ++{0x64f6, 0x01}, ++{0x64f7, 0x15}, ++{0x64f8, 0x01}, ++{0x64f9, 0x16}, ++{0x64fa, 0x01}, ++{0x64fb, 0x17}, ++{0x64fc, 0x01}, ++{0x64fd, 0x18}, ++{0x64fe, 0x01}, ++{0x64ff, 0x19}, ++{0x6500, 0x01}, ++{0x6501, 0x1a}, ++{0x6502, 0x01}, ++{0x6503, 0x1b}, ++{0x6504, 0x01}, ++{0x6505, 0x1c}, ++{0x6506, 0x01}, ++{0x6507, 0x1d}, ++{0x6508, 0x01}, ++{0x6509, 0x1e}, ++{0x650a, 0x01}, ++{0x650b, 0x1f}, ++{0x650c, 0x02}, ++{0x650d, 0xa0}, ++{0x650e, 0x00}, ++{0x650f, 0xff}, ++{0x6510, 0x04}, ++{0x6511, 0x20}, ++{0x6512, 0x05}, ++{0x6513, 0x86}, ++{0x6514, 0x03}, ++{0x6515, 0x0b}, ++{0x6516, 0x05}, ++{0x6517, 0x86}, ++{0x6518, 0x00}, ++{0x6519, 0x00}, ++{0x651a, 0x05}, ++{0x651b, 0x06}, ++{0x651c, 0x00}, ++{0x651d, 0x04}, ++{0x651e, 0x05}, ++{0x651f, 0x04}, ++{0x6520, 0x00}, ++{0x6521, 0x04}, ++{0x6522, 0x05}, ++{0x6523, 0x00}, ++{0x6524, 0x05}, ++{0x6525, 0x0a}, ++{0x6526, 0x03}, ++{0x6527, 0x9a}, ++{0x6528, 0x05}, ++{0x6529, 0x86}, ++{0x652a, 0x00}, ++{0x652b, 0x00}, ++{0x652c, 0x05}, ++{0x652d, 0x06}, ++{0x652e, 0x00}, ++{0x652f, 0x01}, ++{0x6530, 0x05}, ++{0x6531, 0x04}, ++{0x6532, 0x00}, ++{0x6533, 0x04}, ++{0x6534, 0x05}, ++{0x6535, 0x00}, ++{0x6536, 0x05}, ++{0x6537, 0x0a}, ++{0x6538, 0x03}, ++{0x6539, 0x99}, ++{0x653a, 0x05}, ++{0x653b, 0x06}, ++{0x653c, 0x00}, ++{0x653d, 0x00}, ++{0x653e, 0x05}, ++{0x653f, 0x04}, ++{0x6540, 0x00}, ++{0x6541, 0x04}, ++{0x6542, 0x05}, ++{0x6543, 0x00}, ++{0x6544, 0x05}, ++{0x6545, 0x0a}, ++{0x6546, 0x03}, ++{0x6547, 0x98}, ++{0x6548, 0x05}, ++{0x6549, 0x06}, ++{0x654a, 0x00}, ++{0x654b, 0x00}, ++{0x654c, 0x05}, ++{0x654d, 0x04}, ++{0x654e, 0x00}, ++{0x654f, 0x04}, ++{0x6550, 0x05}, ++{0x6551, 0x00}, ++{0x6552, 0x05}, ++{0x6553, 0x0a}, ++{0x6554, 0x03}, ++{0x6555, 0x97}, ++{0x6556, 0x05}, ++{0x6557, 0x06}, ++{0x6558, 0x05}, ++{0x6559, 0x04}, ++{0x655a, 0x00}, ++{0x655b, 0x04}, ++{0x655c, 0x05}, ++{0x655d, 0x00}, ++{0x655e, 0x05}, ++{0x655f, 0x0a}, ++{0x6560, 0x03}, ++{0x6561, 0x96}, ++{0x6562, 0x05}, ++{0x6563, 0x06}, ++{0x6564, 0x05}, ++{0x6565, 0x04}, ++{0x6566, 0x00}, ++{0x6567, 0x04}, ++{0x6568, 0x05}, ++{0x6569, 0x00}, ++{0x656a, 0x05}, ++{0x656b, 0x0a}, ++{0x656c, 0x03}, ++{0x656d, 0x95}, ++{0x656e, 0x05}, ++{0x656f, 0x06}, ++{0x6570, 0x05}, ++{0x6571, 0x04}, ++{0x6572, 0x00}, ++{0x6573, 0x04}, ++{0x6574, 0x05}, ++{0x6575, 0x00}, ++{0x6576, 0x05}, ++{0x6577, 0x0a}, ++{0x6578, 0x03}, ++{0x6579, 0x94}, ++{0x657a, 0x05}, ++{0x657b, 0x06}, ++{0x657c, 0x00}, ++{0x657d, 0x00}, ++{0x657e, 0x05}, ++{0x657f, 0x04}, ++{0x6580, 0x00}, ++{0x6581, 0x04}, ++{0x6582, 0x05}, ++{0x6583, 0x00}, ++{0x6584, 0x05}, ++{0x6585, 0x0a}, ++{0x6586, 0x03}, ++{0x6587, 0x93}, ++{0x6588, 0x05}, ++{0x6589, 0x06}, ++{0x658a, 0x00}, ++{0x658b, 0x00}, ++{0x658c, 0x05}, ++{0x658d, 0x04}, ++{0x658e, 0x00}, ++{0x658f, 0x04}, ++{0x6590, 0x05}, ++{0x6591, 0x00}, ++{0x6592, 0x05}, ++{0x6593, 0x0a}, ++{0x6594, 0x03}, ++{0x6595, 0x92}, ++{0x6596, 0x05}, ++{0x6597, 0x06}, ++{0x6598, 0x05}, ++{0x6599, 0x04}, ++{0x659a, 0x00}, ++{0x659b, 0x04}, ++{0x659c, 0x05}, ++{0x659d, 0x00}, ++{0x659e, 0x05}, ++{0x659f, 0x0a}, ++{0x65a0, 0x03}, ++{0x65a1, 0x91}, ++{0x65a2, 0x05}, ++{0x65a3, 0x06}, ++{0x65a4, 0x05}, ++{0x65a5, 0x04}, ++{0x65a6, 0x00}, ++{0x65a7, 0x04}, ++{0x65a8, 0x05}, ++{0x65a9, 0x00}, ++{0x65aa, 0x05}, ++{0x65ab, 0x0a}, ++{0x65ac, 0x03}, ++{0x65ad, 0x90}, ++{0x65ae, 0x05}, ++{0x65af, 0x06}, ++{0x65b0, 0x05}, ++{0x65b1, 0x04}, ++{0x65b2, 0x00}, ++{0x65b3, 0x04}, ++{0x65b4, 0x05}, ++{0x65b5, 0x00}, ++{0x65b6, 0x05}, ++{0x65b7, 0x0a}, ++{0x65b8, 0x02}, ++{0x65b9, 0x90}, ++{0x65ba, 0x05}, ++{0x65bb, 0x06}, ++{0x65bc, 0x00}, ++{0x65bd, 0xff}, ++{0x65be, 0x04}, ++{0x65bf, 0x70}, ++{0x65c0, 0x08}, ++{0x65c1, 0x76}, ++{0x65c2, 0x00}, ++{0x65c3, 0xff}, ++{0x65c4, 0x08}, ++{0x65c5, 0x76}, ++{0x65c6, 0x04}, ++{0x65c7, 0x0c}, ++{0x65c8, 0x05}, ++{0x65c9, 0x07}, ++{0x65ca, 0x04}, ++{0x65cb, 0x04}, ++{0x65cc, 0x00}, ++{0x65cd, 0xff}, ++{0x65ce, 0x00}, ++{0x65cf, 0xff}, ++{0x65d0, 0x00}, ++{0x65d1, 0xff}, ++{0x30eb, 0x04}, ++{0x30ed, 0x5a}, ++{0x30ee, 0x01}, ++{0x30ef, 0x80}, ++{0x30f1, 0x5a}, ++{0x303a, 0x04}, ++{0x303b, 0x7f}, ++{0x303c, 0xfe}, ++{0x303d, 0x19}, ++{0x303e, 0xd7}, ++{0x303f, 0x09}, ++{0x3040, 0x78}, ++{0x3042, 0x05}, ++#if 0 ++{0x3012, 0x01}, ++{0x3012, 0x00}, ++{0x3119, 0x44}, ++{0x328a, 0x10}, ++{0x3012, 0x01}, ++#else ++{0x328a, 0x10}, ++/* HFLIP=1, VFLIP=0 */ ++{0x3128, 0xc0 | 0x1}, ++{0x3291, 0x01 | 0x2}, ++{0x3090, 0x4}, ++/* change settings to 1280x1080 COMB12 30 fps, 96MHz */ ++{0x3012, 0x0}, ++{0x3000, 0x3}, ++{0x3001, 0x50}, ++{0x3002, 0x0a}, ++{0x3004, 0x3}, ++{0x3005, 0x48}, ++{0x3006, 0x7}, ++{0x308f, 0x10}, ++{0x3127, 0x63}, ++{0x3074, OV10640_X_START >> 8}, ++{0x3075, OV10640_X_START & 0xff}, ++{0x3076, OV10640_Y_START >> 8}, ++{0x3077, OV10640_Y_START & 0xff}, ++{0x3078, OV10640_X_END >> 8}, ++{0x3079, OV10640_X_END & 0xff}, ++{0x307a, OV10640_Y_END >> 8}, ++{0x307b, OV10640_Y_END & 0xff}, ++{0x307c, OV10640_MAX_WIDTH >> 8}, ++{0x307d, OV10640_MAX_WIDTH & 0xff}, ++{0x307e, OV10640_MAX_HEIGHT >> 8}, ++{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS ++{0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, ++{0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS ++{0x3083, (OV10640_SENSOR_HEIGHT + 208) & 0xff}, ++{0x3084, 0x0}, ++{0x3085, 0x0}, ++{0x3086, 0x0}, ++{0x3087, 0x0}, ++{0x346d, 0x14}, ++{0x3444, 0x28}, ++{0x3091, 0x0}, ++{0x3119, 0x44}, // COMB12 ++{0x3012, 0x1}, ++#endif ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0460-media-ar0xxx-add-embedded-line-into-frame.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0460-media-ar0xxx-add-embedded-line-into-frame.patch new file mode 100644 index 00000000..67dfa466 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0460-media-ar0xxx-add-embedded-line-into-frame.patch @@ -0,0 +1,534 @@ +From 093694680d2fc99df1dc5118b78f80f34a0e3f4b Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 30 Dec 2019 19:48:34 +0300 +Subject: [PATCH] media: ar0xxx: add embedded line into frame + +This adds embedded line into frame for further parsing in ISP + +Signed-off-by: Petr Nechaev +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0140.c | 49 +++++++++++++++++++++---- + drivers/media/i2c/soc_camera/ar0140.h | 21 ++++++----- + drivers/media/i2c/soc_camera/ar0143.c | 53 +++++++++++++++++++++++++--- + drivers/media/i2c/soc_camera/ar0143.h | 17 +++++---- + drivers/media/i2c/soc_camera/ar0143_custom.h | 6 +--- + drivers/media/i2c/soc_camera/ar0143_rev1.h | 8 +---- + drivers/media/i2c/soc_camera/ar0220.h | 12 ++++--- + drivers/media/i2c/soc_camera/ar0233.c | 31 ++++++++++------ + drivers/media/i2c/soc_camera/ar0233.h | 12 ++++--- + drivers/media/i2c/soc_camera/ar0233_rev1.h | 2 +- + drivers/media/i2c/soc_camera/ar0233_rev2.h | 2 +- + 11 files changed, 150 insertions(+), 63 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0140.c b/drivers/media/i2c/soc_camera/ar0140.c +index ec2b2e5..ceb2c31 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.c ++++ b/drivers/media/i2c/soc_camera/ar0140.c +@@ -36,6 +36,7 @@ struct ar0140_priv { + struct v4l2_rect rect; + int init_complete; + u8 id[6]; ++ bool emb_enable; + /* serializers */ + int max9286_addr; + int max9271_addr; +@@ -115,7 +116,7 @@ static int ar0140_set_window(struct v4l2_subdev *sd) + reg16_write16(client, 0x3008, priv->rect.left + priv->rect.width - 1 + AR0140_X_START); + /* vert crop start */ + reg16_write16(client, 0x3002, priv->rect.top + AR0140_Y_START); +- /* vert crop end */ ++ /* limit window for embedded data/stats */ + reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR0140_Y_START); + + return 0; +@@ -235,12 +236,18 @@ static int ar0140_get_selection(struct v4l2_subdev *sd, + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = AR0140_MAX_WIDTH; +- sel->r.height = AR0140_MAX_HEIGHT; ++ sel->r.width = AR0140_DEFAULT_WIDTH; ++ sel->r.height = AR0140_DEFAULT_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; + return 0; ++ case V4L2_SEL_TGT_COMPOSE_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = AR0140_EMB_PADDED; ++ sel->r.width = priv->rect.width; ++ sel->r.height = priv->rect.height; ++ return 0; + default: + return -EINVAL; + } +@@ -402,7 +409,35 @@ static ssize_t ar0140_otp_id_show(struct device *dev, + priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + } + ++static ssize_t ar0140_emb_enable_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, size_t count) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0140_priv *priv = to_ar0140(client); ++ u32 val; ++ ++ if (sscanf(buf, "%u\n", &val) != 1) ++ return -EINVAL; ++ priv->emb_enable = !!val; ++ ++ reg16_write16(client, 0x3064, priv->emb_enable ? 0x1982 : 0x1802); ++ ++ return count; ++} ++ ++static ssize_t ar0140_emb_enable_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0140_priv *priv = to_ar0140(client); ++ ++ return snprintf(buf, 4, "%d\n", priv->emb_enable); ++} ++ + static DEVICE_ATTR(otp_id_ar0140, S_IRUGO, ar0140_otp_id_show, NULL); ++static DEVICE_ATTR(emb_enable_ar0140, S_IRUGO|S_IWUSR, ar0140_emb_enable_show, ar0140_emb_enable_store); + + static int ar0140_initialize(struct i2c_client *client) + { +@@ -589,14 +624,15 @@ static int ar0140_probe(struct i2c_client *client, + + priv->rect.left = 0; + priv->rect.top = 0; +- priv->rect.width = AR0140_MAX_WIDTH; +- priv->rect.height = AR0140_MAX_HEIGHT; ++ priv->rect.width = AR0140_DEFAULT_WIDTH; ++ priv->rect.height = AR0140_DEFAULT_HEIGHT; + + ret = v4l2_async_register_subdev(&priv->sd); + if (ret) + goto cleanup; + +- if (device_create_file(&client->dev, &dev_attr_otp_id_ar0140) != 0) { ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ar0140) != 0 || ++ device_create_file(&client->dev, &dev_attr_emb_enable_ar0140) != 0) { + dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); + goto cleanup; + } +@@ -620,6 +656,7 @@ static int ar0140_remove(struct i2c_client *client) + { + struct ar0140_priv *priv = i2c_get_clientdata(client); + ++ device_remove_file(&client->dev, &dev_attr_emb_enable_ar0140); + device_remove_file(&client->dev, &dev_attr_otp_id_ar0140); + v4l2_async_unregister_subdev(&priv->sd); + media_entity_cleanup(&priv->sd.entity); +diff --git a/drivers/media/i2c/soc_camera/ar0140.h b/drivers/media/i2c/soc_camera/ar0140.h +index 2993478..08ce1ca 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.h ++++ b/drivers/media/i2c/soc_camera/ar0140.h +@@ -12,20 +12,23 @@ + //#define AR0140_DISPLAY_PATTERN_FIXED + //#define AR0140_DISPLAY_PATTERN_COLOR_BAR + +-//#define AR0140_EMBEDDED_LINE ++#define AR0140_DEFAULT_WIDTH 1280 ++#define AR0140_DEFAULT_HEIGHT 800 + +-#define AR0140_MAX_WIDTH 1280 +-#define AR0140_MAX_HEIGHT 800 ++#define AR0140_EMB_LINES 4 ++#define AR0140_EMB_PADDED (priv->emb_enable ? AR0140_EMB_LINES + 30 : 0) /* embedded data (SOF) and stats (EOF) + post padding */ + + #define AR0140_DELAY 0xffff + ++#define AR0140_MAX_WIDTH 1280 ++#define AR0140_MAX_HEIGHT 800 + #define AR0140_SENSOR_WIDTH 1280 + #define AR0140_SENSOR_HEIGHT 800 + +-#define AR0140_X_START ((AR0140_SENSOR_WIDTH - AR0140_MAX_WIDTH) / 2) +-#define AR0140_Y_START ((AR0140_SENSOR_HEIGHT - AR0140_MAX_HEIGHT) / 2) +-#define AR0140_X_END (AR0140_X_START + AR0140_MAX_WIDTH - 1) +-#define AR0140_Y_END (AR0140_Y_START + AR0140_MAX_HEIGHT + 1) /* must be +1 and not -1 or 2 lines missed - bug in imager? */ ++#define AR0140_X_START ((AR0140_SENSOR_WIDTH - AR0140_DEFAULT_WIDTH) / 2) ++#define AR0140_Y_START ((AR0140_SENSOR_HEIGHT - AR0140_DEFAULT_HEIGHT) / 2) ++#define AR0140_X_END (AR0140_X_START + AR0140_DEFAULT_WIDTH - 1) ++#define AR0140_Y_END (AR0140_Y_START + AR0140_DEFAULT_HEIGHT + 1) /* must be +1 and not -1 or 2 lines missed - bug in imager? */ + + struct ar0140_reg { + u16 reg; +@@ -395,11 +398,7 @@ static const struct ar0140_reg ar0140_regs_wizard[] = { + {0x3086, 0x2C2C}, + {0x3086, 0x2C00}, + /* End Sequencer */ +-#ifdef AR0140_EMBEDDED_LINE +-{0x3064, 0x1982}, // SMIA_TEST +-#else + {0x3064, 0x1802}, // SMIA_TEST +-#endif + /* PCLK=27Mhz/0x2 *0x30 /1/0x10 - TI serializers */ + {0x302A, 0x0010}, // vt_pix_clk_div + {0x302E, 0x0002}, // pre_pll_clk_div +diff --git a/drivers/media/i2c/soc_camera/ar0143.c b/drivers/media/i2c/soc_camera/ar0143.c +index 0c4b970..bf8d717 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.c ++++ b/drivers/media/i2c/soc_camera/ar0143.c +@@ -38,6 +38,7 @@ struct ar0143_priv { + int init_complete; + u8 id[6]; + int setup; ++ bool emb_enable; + /* serializers */ + int max9286_addr; + int max9271_addr; +@@ -265,12 +270,18 @@ static int ar0143_get_selection(struct v4l2_subdev *sd, + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = AR0143_MAX_WIDTH; +- sel->r.height = AR0143_MAX_HEIGHT; ++ sel->r.width = AR0143_DEFAULT_WIDTH; ++ sel->r.height = AR0143_DEFAULT_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; + return 0; ++ case V4L2_SEL_TGT_COMPOSE_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = AR0143_EMB_PADDED; ++ sel->r.width = priv->rect.width; ++ sel->r.height = priv->rect.height; ++ return 0; + default: + return -EINVAL; + } +@@ -436,7 +449,35 @@ static ssize_t ar0143_otp_id_show(struct device *dev, + priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + } + ++static ssize_t ar0143_emb_enable_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, size_t count) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0143_priv *priv = to_ar0143(client); ++ u32 val; ++ ++ if (sscanf(buf, "%u\n", &val) != 1) ++ return -EINVAL; ++ priv->emb_enable = !!val; ++ ++ reg16_write16(client, 0x3064, priv->emb_enable ? 0x1982 : 0x1802); ++ ++ return count; ++} ++ ++static ssize_t ar0143_emb_enable_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0143_priv *priv = to_ar0143(client); ++ ++ return snprintf(buf, 4, "%d\n", priv->emb_enable); ++} ++ + static DEVICE_ATTR(otp_id_ar0143, S_IRUGO, ar0143_otp_id_show, NULL); ++static DEVICE_ATTR(emb_enable_ar0143, S_IRUGO|S_IWUSR, ar0143_emb_enable_show, ar0143_emb_enable_store); + + static int ar0143_initialize(struct i2c_client *client) + { +@@ -632,14 +673,15 @@ static int ar0143_probe(struct i2c_client *client, + + priv->rect.left = 0; + priv->rect.top = 0; +- priv->rect.width = AR0143_MAX_WIDTH; +- priv->rect.height = AR0143_MAX_HEIGHT; ++ priv->rect.width = AR0143_DEFAULT_WIDTH; ++ priv->rect.height = AR0143_DEFAULT_HEIGHT; + + ret = v4l2_async_register_subdev(&priv->sd); + if (ret) + goto cleanup; + +- if (device_create_file(&client->dev, &dev_attr_otp_id_ar0143) != 0) { ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ar0143) != 0|| ++ device_create_file(&client->dev, &dev_attr_emb_enable_ar0143) != 0) { + dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); + goto cleanup; + } +@@ -664,6 +706,7 @@ static int ar0143_remove(struct i2c_client *client) + struct ar0143_priv *priv = i2c_get_clientdata(client); + + device_remove_file(&client->dev, &dev_attr_otp_id_ar0143); ++ device_remove_file(&client->dev, &dev_attr_emb_enable_ar0143); + v4l2_async_unregister_subdev(&priv->sd); + media_entity_cleanup(&priv->sd.entity); + v4l2_ctrl_handler_free(&priv->hdl); +diff --git a/drivers/media/i2c/soc_camera/ar0143.h b/drivers/media/i2c/soc_camera/ar0143.h +index 14d8175..d14ecae 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.h ++++ b/drivers/media/i2c/soc_camera/ar0143.h +@@ -12,20 +12,23 @@ + //#define AR0143_DISPLAY_PATTERN_FIXED + //#define AR0143_DISPLAY_PATTERN_COLOR_BAR + +-//#define AR0143_EMBEDDED_LINE ++#define AR0143_DEFAULT_WIDTH 1280 ++#define AR0143_DEFAULT_HEIGHT 960 + +-#define AR0143_MAX_WIDTH 1344 +-#define AR0143_MAX_HEIGHT 968 ++#define AR0143_EMB_LINES 8 ++#define AR0143_EMB_PADDED (priv->emb_enable ? AR0143_EMB_LINES + 30 : 0) /* embedded data (SOF) and stats (EOF) + post padding */ + + #define AR0143_DELAY 0xffff + ++#define AR0143_MAX_WIDTH 1344 ++#define AR0143_MAX_HEIGHT 968 + #define AR0143_SENSOR_WIDTH 1344 + #define AR0143_SENSOR_HEIGHT 968 + +-#define AR0143_X_START ((AR0143_SENSOR_WIDTH - AR0143_MAX_WIDTH) / 2) +-#define AR0143_Y_START ((AR0143_SENSOR_HEIGHT - AR0143_MAX_HEIGHT) / 2) +-#define AR0143_X_END (AR0143_X_START + AR0143_MAX_WIDTH - 1) +-#define AR0143_Y_END (AR0143_Y_START + AR0143_MAX_HEIGHT + 1) /* must be +1 and not -1 or 2 lines missed - bug in imager? */ ++#define AR0143_X_START ((AR0143_SENSOR_WIDTH - AR0143_DEFAULT_WIDTH) / 2) ++#define AR0143_Y_START ((AR0143_SENSOR_HEIGHT - AR0143_DEFAULT_HEIGHT) / 2) ++#define AR0143_X_END (AR0143_X_START + AR0143_DEFAULT_WIDTH - 1) ++#define AR0143_Y_END (AR0143_Y_START + AR0143_DEFAULT_HEIGHT + 1) /* must be +1 and not -1 or 2 lines missed - bug in imager? */ + + struct ar0143_reg { + u16 reg; +diff --git a/drivers/media/i2c/soc_camera/ar0143_custom.h b/drivers/media/i2c/soc_camera/ar0143_custom.h +index e5bc37a..8e21416 100644 +--- a/drivers/media/i2c/soc_camera/ar0143_custom.h ++++ b/drivers/media/i2c/soc_camera/ar0143_custom.h +@@ -368,11 +368,7 @@ static const struct ar0143_reg ar0143_regs_wizard_custom[] = { + {0x3180, 0x0080}, // RESERVED_MFR_3180 + {0x33E4, 0x0080}, // RESERVED_MFR_33E4 + {0x33E0, 0x0880}, // TEST_ASIL_ROWS +-#ifdef AR0143_EMBEDDED_LINE +-{0x3064, 0x1982}, // SMIA_TEST +-#else + {0x3064, 0x1802}, // SMIA_TEST +-#endif + {0x3004, 0x0000}, // X_ADDR_START_ + {0x3008, 0x053F}, // X_ADDR_END_ + {0x3002, 0x0000}, // Y_ADDR_START_ +@@ -455,7 +451,7 @@ static const struct ar0143_reg ar0143_regs_wizard_custom[] = { + {0x31B8, 0x404B}, // RESERVED_MFR_31B8 + {0x31BA, 0x020A}, // RESERVED_MFR_31BA + {0x31BC, 0x0C08}, // RESERVED_MFR_31BC +-{0x3040, 0x0000}, // READ_MODE ++{0x3040, 0x0005}, // READ_MODE + {0x30BA, 0x01E2}, // DIGITAL_CTRL + {0x3082, 0x0008}, // OPERATION_MODE_CTRL + {0x3044, 0x0400}, // DARK_CONTROL +diff --git a/drivers/media/i2c/soc_camera/ar0143_rev1.h b/drivers/media/i2c/soc_camera/ar0143_rev1.h +index ec941d8..21cb4bf 100644 +--- a/drivers/media/i2c/soc_camera/ar0143_rev1.h ++++ b/drivers/media/i2c/soc_camera/ar0143_rev1.h +@@ -390,7 +390,7 @@ static const struct ar0143_reg ar0143_regs_wizard_rev1[] = { + #ifdef AR0143_Readout_Mode_Configuration + {0x30A2, 0x0001}, // X_ODD_INC_ + {0x30A6, 0x0001}, // Y_ODD_INC_ +-{0x3040, 0x0000}, // READ_MODE ++{0x3040, 0x0005}, // READ_MODE + {0x3082, 0x0008}, // OPERATION_MODE_CTRL: 3exp + {0x30BA, 0x01E2}, // DIGITAL_CTRL: 3exp max + {0x3044, 0x0400}, // DARK_CONTROL +@@ -400,12 +400,6 @@ static const struct ar0143_reg ar0143_regs_wizard_rev1[] = { + {0x33E4, 0x0080}, // RESERVED_MFR_33E4 + #endif /* AR0143_Readout_Mode_Configuration */ + +-#ifdef AR0143_HDR_Readout_Mode_Configuration +-#ifdef AR0143_EMBEDDED_LINE +-{0x3064, 0x1982}, // SMIA_TEST: enable emb data and stats +-#endif +-#endif /* AR0143_HDR_Readout_Mode_Configuration */ +- + #ifdef AR0143_Full_Res_FOV + {0x31B0, 0x0006}, // FRAME_PREAMBLE + {0x31B2, 0x0045}, // LINE_PREAMBLE +diff --git a/drivers/media/i2c/soc_camera/ar0220.h b/drivers/media/i2c/soc_camera/ar0220.h +index 59a949e..f90deae 100644 +--- a/drivers/media/i2c/soc_camera/ar0220.h ++++ b/drivers/media/i2c/soc_camera/ar0220.h +@@ -12,16 +12,18 @@ + //#define AR0220_DISPLAY_PATTERN_FIXED + //#define AR0220_DISPLAY_PATTERN_COLOR_BAR + ++#define AR0220_DEFAULT_WIDTH 1792 ++#define AR0220_DEFAULT_HEIGHT 944 ++ + #define AR0220_MAX_WIDTH 1828 + #define AR0220_MAX_HEIGHT 948 +- + #define AR0220_SENSOR_WIDTH 1828 + #define AR0220_SENSOR_HEIGHT 948 + +-#define AR0220_X_START ((AR0220_SENSOR_WIDTH - AR0220_MAX_WIDTH) / 2) +-#define AR0220_Y_START ((AR0220_SENSOR_HEIGHT - AR0220_MAX_HEIGHT) / 2) +-#define AR0220_X_END (AR0220_X_START + AR0220_MAX_WIDTH - 1) +-#define AR0220_Y_END (AR0220_Y_START + AR0220_MAX_HEIGHT - 1) ++#define AR0220_X_START ((AR0220_SENSOR_WIDTH - AR0220_DEFAULT_WIDTH) / 2) ++#define AR0220_Y_START ((AR0220_SENSOR_HEIGHT - AR0220_DEFAULT_HEIGHT) / 2) ++#define AR0220_X_END (AR0220_X_START + AR0220_DEFAULT_WIDTH - 1) ++#define AR0220_Y_END (AR0220_Y_START + AR0220_DEFAULT_HEIGHT - 1) + + #include "ar0220_rev2.h" + #include "ar0220_rev3.h" +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index b62fb77..cdd2d8a 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -21,9 +21,10 @@ + #include + + #define AR_DELAY 0xffff +-static int AR_MAX_WIDTH; +-static int AR_MAX_HEIGHT; +-#define AR_MAX_HEIGHT_EMB (AR_MAX_HEIGHT + priv->emb_enable * 4) /* embedded data (SOF) and stats (EOF) */ ++static int AR_MAX_WIDTH, AR_DEFAULT_WIDTH; ++static int AR_MAX_HEIGHT, AR_DEFAULT_HEIGHT; ++#define AR_EMB_LINES 8 ++#define AR_EMB_PADDED (priv->emb_enable ? AR_EMB_LINES : 0) /* embedded data (SOF) and stats (EOF) */ + static int AR_X_START; + static int AR_Y_START; + static int AR_X_END; +@@ -124,7 +125,7 @@ static int ar0233_set_window(struct v4l2_subdev *sd) + reg16_write16(client, 0x3002, priv->rect.top + AR_Y_START); + /* vert crop end */ + /* limit window for embedded data/stats */ +- reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR_Y_START - priv->emb_enable * 4); ++ reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR_Y_START); + + return 0; + }; +@@ -210,7 +211,7 @@ static int ar0233_set_selection(struct v4l2_subdev *sd, + rect->height = ALIGN(rect->height, 2); + + if ((rect->left + rect->width > AR_MAX_WIDTH) || +- (rect->top + rect->height > AR_MAX_HEIGHT_EMB)) ++ (rect->top + rect->height > AR_MAX_HEIGHT)) + *rect = priv->rect; + + priv->rect.left = rect->left; +@@ -238,17 +239,23 @@ static int ar0233_get_selection(struct v4l2_subdev *sd, + sel->r.left = 0; + sel->r.top = 0; + sel->r.width = AR_MAX_WIDTH; +- sel->r.height = AR_MAX_HEIGHT_EMB; ++ sel->r.height = AR_MAX_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = AR_MAX_WIDTH; +- sel->r.height = AR_MAX_HEIGHT_EMB; ++ sel->r.width = AR_DEFAULT_WIDTH; ++ sel->r.height = AR_DEFAULT_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; + return 0; ++ case V4L2_SEL_TGT_COMPOSE_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = AR_EMB_PADDED; ++ sel->r.width = priv->rect.width; ++ sel->r.height = priv->rect.height; ++ return 0; + default: + return -EINVAL; + } +@@ -496,6 +503,8 @@ static int ar0233_initialize(struct i2c_client *client) + strncpy(chip_name, "AR0220", 10); + AR_MAX_WIDTH = AR0220_MAX_WIDTH; + AR_MAX_HEIGHT = AR0220_MAX_HEIGHT; ++ AR_DEFAULT_WIDTH = AR0220_DEFAULT_WIDTH; ++ AR_DEFAULT_HEIGHT = AR0220_DEFAULT_HEIGHT; + AR_X_START = AR0220_X_START; + AR_Y_START = AR0220_Y_START; + AR_X_END = AR0220_X_END; +@@ -532,6 +541,8 @@ static int ar0233_initialize(struct i2c_client *client) + strncpy(chip_name, "AR0233", 10); + AR_MAX_WIDTH = AR0233_MAX_WIDTH; + AR_MAX_HEIGHT = AR0233_MAX_HEIGHT; ++ AR_DEFAULT_WIDTH = AR0233_DEFAULT_WIDTH; ++ AR_DEFAULT_HEIGHT = AR0233_DEFAULT_HEIGHT; + AR_X_START = AR0233_X_START; + AR_Y_START = AR0233_Y_START; + AR_X_END = AR0233_X_END; +@@ -693,8 +704,8 @@ static int ar0233_probe(struct i2c_client *client, + + priv->rect.left = 0; + priv->rect.top = 0; +- priv->rect.width = AR_MAX_WIDTH; +- priv->rect.height = AR_MAX_HEIGHT; ++ priv->rect.width = AR_DEFAULT_WIDTH; ++ priv->rect.height = AR_DEFAULT_HEIGHT; + + ret = v4l2_async_register_subdev(&priv->sd); + if (ret) +diff --git a/drivers/media/i2c/soc_camera/ar0233.h b/drivers/media/i2c/soc_camera/ar0233.h +index 33b661a..cb79421 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.h ++++ b/drivers/media/i2c/soc_camera/ar0233.h +@@ -12,16 +12,18 @@ + //#define AR0233_DISPLAY_PATTERN_FIXED + //#define AR0233_DISPLAY_PATTERN_COLOR_BAR + ++#define AR0233_DEFAULT_WIDTH 2048 ++#define AR0233_DEFAULT_HEIGHT 1280 ++ + #define AR0233_MAX_WIDTH 2048 + #define AR0233_MAX_HEIGHT 1280 +- + #define AR0233_SENSOR_WIDTH 2072 + #define AR0233_SENSOR_HEIGHT 1296 + +-#define AR0233_X_START ((AR0233_SENSOR_WIDTH - AR0233_MAX_WIDTH) / 2) +-#define AR0233_Y_START ((AR0233_SENSOR_HEIGHT - AR0233_MAX_HEIGHT) / 2) +-#define AR0233_X_END (AR0233_X_START + AR0233_MAX_WIDTH - 1) +-#define AR0233_Y_END (AR0233_Y_START + AR0233_MAX_HEIGHT - 1) ++#define AR0233_X_START ((AR0233_SENSOR_WIDTH - AR0233_DEFAULT_WIDTH) / 2) ++#define AR0233_Y_START ((AR0233_SENSOR_HEIGHT - AR0233_DEFAULT_HEIGHT) / 2) ++#define AR0233_X_END (AR0233_X_START + AR0233_DEFAULT_WIDTH - 1) ++#define AR0233_Y_END (AR0233_Y_START + AR0233_DEFAULT_HEIGHT - 1) + + #include "ar0233_rev1.h" + #include "ar0233_rev2.h" +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev1.h b/drivers/media/i2c/soc_camera/ar0233_rev1.h +index 3ff944f..8b9638b 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev1.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev1.h +@@ -1156,7 +1156,7 @@ static const struct ar0xxx_reg ar0233_rev1_Full_resolution[] = { + }; /* Full_resolution */ + + static const struct ar0xxx_reg ar0233_rev1_disable_embed_data_stat[] = { +-{0x3040, 0xC000}, //Embedded stat2 and data2 rows, hflip/vflip=1 ++{0x3040, 0xC005}, //Embedded stat4 and data4 rows, hflip/vflip=1 + #ifdef AR0233_EMBEDDED_LINE + {0x3064, 0x0180}, //Enable embedded data and stat + #else +diff --git a/drivers/media/i2c/soc_camera/ar0233_rev2.h b/drivers/media/i2c/soc_camera/ar0233_rev2.h +index 80572ff..bd508f0 100644 +--- a/drivers/media/i2c/soc_camera/ar0233_rev2.h ++++ b/drivers/media/i2c/soc_camera/ar0233_rev2.h +@@ -2265,7 +2265,7 @@ static const struct ar0xxx_reg ar0233_rev2_O1_Recommended_Defaults_SE_T1_LIN_T2[ + }; /* O1_Recommended_Defaults_SE_T1_LIN_T2 */ + + static const struct ar0xxx_reg ar0233_rev2_disable_embed_data_stat[] = { +-{0x3040, 0xC000}, //Embedded stat2 and data2 rows, hflip/vflip=1 ++{0x3040, 0xC005}, //Embedded stat4 and data4 rows, hflip/vflip=1 + {0x350e, 0x2089}, // bit0 must be set for vflip=1 + #ifdef AR0233_EMBEDDED_LINE + {0x3064, 0x0180}, // SMIA_TEST: enable emb data and stats +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0461-v3hsk-Add-separate-dts-for-dummy-camera-1920x1080.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0461-v3hsk-Add-separate-dts-for-dummy-camera-1920x1080.patch new file mode 100644 index 00000000..a34231f6 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0461-v3hsk-Add-separate-dts-for-dummy-camera-1920x1080.patch @@ -0,0 +1,132 @@ +From 193b183e75deb047c60196e987b3112e134abe17 Mon Sep 17 00:00:00 2001 +From: Petr Nechaev +Date: Thu, 13 Jun 2019 21:20:25 -0400 +Subject: [PATCH] v3hsk: Add separate dts for dummy camera 1920x1080 + +To be used as LVDS -> HDMI converter. +--- + arch/arm64/boot/dts/renesas/Makefile | 1 + + .../renesas/r8a77980-v3hsk-vb-4ch-hdmi.dts | 46 +++++++++++++++++++ + .../renesas/r8a77980-v3hsk-vb-8ch-hdmi.dts | 46 +++++++++++++++++++ + 3 files changed, 93 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch-hdmi.dts + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch-hdmi.dts + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index 4b2f4fb73bed..89da50cbfbdb 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -42,5 +42,6 @@ dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v2.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v3.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-8ch.dtb r8a77980-v3hsk-vb-4ch.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl-8ch.dtb ++dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-4ch-hdmi.dtb r8a77980-v3hsk-vb-8ch-hdmi.dtb + + always := $(dtb-y) +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch-hdmi.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch-hdmi.dts +new file mode 100644 +index 000000000000..f5931c5d3ef6 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch-hdmi.dts +@@ -0,0 +1,46 @@ ++/* ++ * Device Tree Source for the V3HSK VideoBox 4-channel board on r8a7798 with dummy LVDS input ++ * ++ * Copyright (C) 2018 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk-vb-4ch.dts" ++ ++&i2cswitch1 { ++ i2c@2 { ++ /delete-node/ ov106xx@0; ++ ++ dummy-camera@0 { ++ compatible = "dummy-camera"; ++ reg = <0x60>; ++ ++ dummy,width = <1920>; ++ dummy,height = <1080>; ++ ++ port@0 { ++ dummy_camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ dummy_camera_ti9x4_des0ep0: endpoint@1 { ++ remote-endpoint = <&ti9x4_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&ti9x4_des0ep0 { ++ remote-endpoint = <&dummy_camera_in0>; ++}; ++ ++&vin0ep0 { ++ remote-endpoint = <&dummy_camera_in0>; ++}; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch-hdmi.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch-hdmi.dts +new file mode 100644 +index 000000000000..5aecc0e80cde +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch-hdmi.dts +@@ -0,0 +1,46 @@ ++/* ++ * Device Tree Source for the V3HSK VideoBox 8-channel board on r8a7798 with dummy LVDS input ++ * ++ * Copyright (C) 2018 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk-vb-8ch.dts" ++ ++&i2cswitch1 { ++ i2c@2 { ++ /delete-node/ ov106xx@0; ++ ++ dummy-camera@0 { ++ compatible = "dummy-camera"; ++ reg = <0x60>; ++ ++ dummy,width = <1920>; ++ dummy,height = <1080>; ++ ++ port@0 { ++ dummy_camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ dummy_camera_ti9x4_des0ep0: endpoint@1 { ++ remote-endpoint = <&ti9x4_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&ti9x4_des0ep0 { ++ remote-endpoint = <&dummy_camera_in0>; ++}; ++ ++&vin0ep0 { ++ remote-endpoint = <&dummy_camera_in0>; ++}; +-- +2.20.1 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0462-media-i2c-ov10640-add-embedded-data-fix-crop.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0462-media-i2c-ov10640-add-embedded-data-fix-crop.patch new file mode 100644 index 00000000..683ee130 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0462-media-i2c-ov10640-add-embedded-data-fix-crop.patch @@ -0,0 +1,289 @@ +From 0f0c2244b6ed65807d40b8cf730d297e1218600e Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 13 Jan 2020 19:01:29 +0300 +Subject: [PATCH] media: i2c: ov10640: add embedded data, fix crop + +This addes embedded line and stats for furhter parsing inside ISP +This also fixes the crop. + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.c | 79 ++++++++++++++++++++++++------ + drivers/media/i2c/soc_camera/ov10640.h | 17 ++++--- + drivers/media/i2c/soc_camera/ov10640_r1d.h | 10 ++-- + drivers/media/i2c/soc_camera/ov10640_r1e.h | 10 ++-- + drivers/media/i2c/soc_camera/ov10640_r1f.h | 10 ++-- + 5 files changed, 89 insertions(+), 37 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index 40058b7..fab2c0d 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -42,6 +42,7 @@ struct ov10640_priv { + int init_complete; + u8 id[6]; + int dvp_order; ++ bool emb_enable; + /* serializers */ + int max9286_addr; + int max9271_addr; +@@ -113,23 +114,23 @@ static int ov10640_set_window(struct v4l2_subdev *sd) + dev_dbg(&client->dev, "L=%d T=%d %dx%d\n", priv->rect.left, priv->rect.top, priv->rect.width, priv->rect.height); + + /* horiz crop start (reverse) */ +- reg16_write(client, 0x3074, (OV10640_MAX_WIDTH - priv->rect.width - priv->rect.left) >> 8); +- reg16_write(client, 0x3075, (OV10640_MAX_WIDTH - priv->rect.width - priv->rect.left) & 0xff); ++ reg16_write(client, 0x3074, (OV10640_X_END - priv->rect.left - priv->rect.width + 1) >> 8); ++ reg16_write(client, 0x3075, (OV10640_X_END - priv->rect.left - priv->rect.width + 1) & 0xff); + /* horiz crop end (reverse) */ +- reg16_write(client, 0x3078, (OV10640_MAX_WIDTH - priv->rect.left - 1) >> 8); +- reg16_write(client, 0x3079, (OV10640_MAX_WIDTH - priv->rect.left - 1) & 0xff); ++ reg16_write(client, 0x3078, (OV10640_X_END - priv->rect.left) >> 8); ++ reg16_write(client, 0x3079, (OV10640_X_END - priv->rect.left) & 0xff); + /* vert crop start */ +- reg16_write(client, 0x3076, priv->rect.top >> 8); +- reg16_write(client, 0x3077, priv->rect.top & 0xff); ++ reg16_write(client, 0x3076, (priv->rect.top + OV10640_Y_START - OV10640_EMB_PADDED / 2) >> 8); ++ reg16_write(client, 0x3077, (priv->rect.top + OV10640_Y_START - OV10640_EMB_PADDED / 2) & 0xff); + /* vert crop end */ +- reg16_write(client, 0x307a, (priv->rect.top + priv->rect.height + 1) >> 8); +- reg16_write(client, 0x307b, (priv->rect.top + priv->rect.height + 1) & 0xff); ++ reg16_write(client, 0x307a, (priv->rect.top + priv->rect.height + OV10640_Y_START - 1 + OV10640_EMB_PADDED / 2) >> 8); ++ reg16_write(client, 0x307b, (priv->rect.top + priv->rect.height + OV10640_Y_START - 1 + OV10640_EMB_PADDED / 2) & 0xff); + /* horiz output */ + reg16_write(client, 0x307c, priv->rect.width >> 8); + reg16_write(client, 0x307d, priv->rect.width & 0xff); + /* vert output */ +- reg16_write(client, 0x307e, priv->rect.height >> 8); +- reg16_write(client, 0x307f, priv->rect.height & 0xff); ++ reg16_write(client, 0x307e, (priv->rect.height + OV10640_EMB_PADDED) >> 8); ++ reg16_write(client, 0x307f, (priv->rect.height + OV10640_EMB_PADDED) & 0xff); + + return 0; + }; +@@ -248,12 +249,18 @@ static int ov10640_get_selection(struct v4l2_subdev *sd, + case V4L2_SEL_TGT_CROP_DEFAULT: + sel->r.left = 0; + sel->r.top = 0; +- sel->r.width = OV10640_MAX_WIDTH; +- sel->r.height = OV10640_MAX_HEIGHT; ++ sel->r.width = OV10640_DEFAULT_WIDTH; ++ sel->r.height = OV10640_DEFAULT_HEIGHT; + return 0; + case V4L2_SEL_TGT_CROP: + sel->r = priv->rect; + return 0; ++ case V4L2_SEL_TGT_COMPOSE_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = OV10640_EMB_PADDED / 2; ++ sel->r.width = priv->rect.width; ++ sel->r.height = priv->rect.height; ++ return 0; + default: + return -EINVAL; + } +@@ -464,7 +471,45 @@ static ssize_t ov10640_otp_id_show(struct device *dev, + priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + } + ++static ssize_t ov10640_emb_enable_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, size_t count) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); ++ u32 val; ++ ++ if (sscanf(buf, "%u\n", &val) != 1) ++ return -EINVAL; ++ priv->emb_enable = !!val; ++ ++ /* vert crop start */ ++ reg16_write(client, 0x3076, (priv->rect.top + OV10640_Y_START - OV10640_EMB_PADDED / 2) >> 8); ++ reg16_write(client, 0x3077, (priv->rect.top + OV10640_Y_START - OV10640_EMB_PADDED / 2) & 0xff); ++ /* vert crop end */ ++ reg16_write(client, 0x307a, (priv->rect.top + priv->rect.height - 1 + OV10640_Y_START + OV10640_EMB_PADDED / 2) >> 8); ++ reg16_write(client, 0x307b, (priv->rect.top + priv->rect.height - 1 + OV10640_Y_START + OV10640_EMB_PADDED / 2) & 0xff); ++ /* vert output */ ++ reg16_write(client, 0x307e, (priv->rect.height + OV10640_EMB_PADDED) >> 8); ++ reg16_write(client, 0x307f, (priv->rect.height + OV10640_EMB_PADDED) & 0xff); ++ ++ reg16_write(client, 0x3091, priv->emb_enable ? 0x0C : 0x00); ++ ++ return count; ++} ++ ++static ssize_t ov10640_emb_enable_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); ++ ++ return snprintf(buf, 4, "%d\n", priv->emb_enable); ++} ++ + static DEVICE_ATTR(otp_id_ov10640, S_IRUGO, ov10640_otp_id_show, NULL); ++static DEVICE_ATTR(emb_enable_ov10640, S_IRUGO|S_IWUSR, ov10640_emb_enable_show, ov10640_emb_enable_store); + + static int ov10640_initialize(struct i2c_client *client) + { +@@ -510,7 +555,7 @@ static int ov10640_initialize(struct i2c_client *client) + reg16_write(client, 0x3124, priv->dvp_order << 4); + + dev_info(&client->dev, "ov10640 PID %x (r%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", +- pid, rev, OV10640_MAX_WIDTH, OV10640_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ pid, rev, OV10640_DEFAULT_WIDTH, OV10640_DEFAULT_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + out: + ov10640_s_port(client, 0); + +@@ -596,8 +641,8 @@ static int ov10640_probe(struct i2c_client *client, + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; + priv->rect.left = 0; + priv->rect.top = 0; +- priv->rect.width = OV10640_MAX_WIDTH; +- priv->rect.height = OV10640_MAX_HEIGHT; ++ priv->rect.width = OV10640_DEFAULT_WIDTH; ++ priv->rect.height = OV10640_DEFAULT_HEIGHT; + priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); +@@ -653,7 +698,8 @@ static int ov10640_probe(struct i2c_client *client, + if (ret) + goto cleanup; + +- if (device_create_file(&client->dev, &dev_attr_otp_id_ov10640) != 0) { ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ov10640) != 0|| ++ device_create_file(&client->dev, &dev_attr_emb_enable_ov10640) != 0) { + dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); + goto cleanup; + } +@@ -678,6 +724,7 @@ static int ov10640_remove(struct i2c_client *client) + struct ov10640_priv *priv = i2c_get_clientdata(client); + + device_remove_file(&client->dev, &dev_attr_otp_id_ov10640); ++ device_remove_file(&client->dev, &dev_attr_emb_enable_ov10640); + v4l2_async_unregister_subdev(&priv->sd); + media_entity_cleanup(&priv->sd.entity); + v4l2_ctrl_handler_free(&priv->hdl); +diff --git a/drivers/media/i2c/soc_camera/ov10640.h b/drivers/media/i2c/soc_camera/ov10640.h +index 3d2de3d..04ff326 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.h ++++ b/drivers/media/i2c/soc_camera/ov10640.h +@@ -12,18 +12,23 @@ + //#define OV10640_DISPLAY_PATTERN + #define OV10640_FSIN_ENABLE + +-#define OV10640_MAX_WIDTH 1280 +-#define OV10640_MAX_HEIGHT 1080 ++#define OV10640_DEFAULT_WIDTH 1280 ++#define OV10640_DEFAULT_HEIGHT 1080 ++ ++#define OV10640_EMB_LINES 4 /* 2 emb lines at top and 2 stat lines at bottom */ ++#define OV10640_EMB_PADDED (priv->emb_enable ? OV10640_EMB_LINES : 0) /* embedded data (SOF) and stats (EOF) */ + + #define OV10640_DELAY 0xffff + ++#define OV10640_MAX_WIDTH 1280 ++#define OV10640_MAX_HEIGHT 1080 + #define OV10640_SENSOR_WIDTH 1292 + #define OV10640_SENSOR_HEIGHT 1092 + +-#define OV10640_X_START ((OV10640_SENSOR_WIDTH - OV10640_MAX_WIDTH) / 2) +-#define OV10640_Y_START ((OV10640_SENSOR_HEIGHT - OV10640_MAX_HEIGHT) / 2) +-#define OV10640_X_END (OV10640_X_START + OV10640_MAX_WIDTH - 1) +-#define OV10640_Y_END (OV10640_Y_START + OV10640_MAX_HEIGHT - 1) ++#define OV10640_X_START ((OV10640_SENSOR_WIDTH - OV10640_DEFAULT_WIDTH) / 2) ++#define OV10640_Y_START ((OV10640_SENSOR_HEIGHT - OV10640_DEFAULT_HEIGHT) / 2) ++#define OV10640_X_END (OV10640_X_START + OV10640_DEFAULT_WIDTH - 1) ++#define OV10640_Y_END (OV10640_Y_START + OV10640_DEFAULT_HEIGHT - 1) + + struct ov10640_reg { + u16 reg; +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1d.h b/drivers/media/i2c/soc_camera/ov10640_r1d.h +index 374b6d1..6f29b01 100644 +--- a/drivers/media/i2c/soc_camera/ov10640_r1d.h ++++ b/drivers/media/i2c/soc_camera/ov10640_r1d.h +@@ -1219,10 +1219,10 @@ static const struct ov10640_reg ov10640_regs_wizard_r1d[] = { + {0x3079, OV10640_X_END & 0xff}, + {0x307a, OV10640_Y_END >> 8}, + {0x307b, OV10640_Y_END & 0xff}, +-{0x307c, OV10640_MAX_WIDTH >> 8}, +-{0x307d, OV10640_MAX_WIDTH & 0xff}, +-{0x307e, OV10640_MAX_HEIGHT >> 8}, +-{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x307c, OV10640_DEFAULT_WIDTH >> 8}, ++{0x307d, OV10640_DEFAULT_WIDTH & 0xff}, ++{0x307e, OV10640_DEFAULT_HEIGHT >> 8}, ++{0x307f, OV10640_DEFAULT_HEIGHT & 0xff}, + {0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS + {0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, + {0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS +@@ -1233,7 +1233,7 @@ static const struct ov10640_reg ov10640_regs_wizard_r1d[] = { + {0x3087, 0x0}, + {0x346d, 0x14}, + {0x3444, 0x28}, +-{0x3091, 0x0}, ++{0x3091, 0x00}, // embedded data, embedded stats + {0x3119, 0x44}, // COMB12 + {0x3012, 0x1}, + #endif +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1e.h b/drivers/media/i2c/soc_camera/ov10640_r1e.h +index eeff330..ba3c636 100644 +--- a/drivers/media/i2c/soc_camera/ov10640_r1e.h ++++ b/drivers/media/i2c/soc_camera/ov10640_r1e.h +@@ -1214,10 +1214,10 @@ static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { + {0x3079, OV10640_X_END & 0xff}, + {0x307a, OV10640_Y_END >> 8}, + {0x307b, OV10640_Y_END & 0xff}, +-{0x307c, OV10640_MAX_WIDTH >> 8}, +-{0x307d, OV10640_MAX_WIDTH & 0xff}, +-{0x307e, OV10640_MAX_HEIGHT >> 8}, +-{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x307c, OV10640_DEFAULT_WIDTH >> 8}, ++{0x307d, OV10640_DEFAULT_WIDTH & 0xff}, ++{0x307e, OV10640_DEFAULT_HEIGHT >> 8}, ++{0x307f, OV10640_DEFAULT_HEIGHT & 0xff}, + {0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS + {0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, + {0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS +@@ -1228,7 +1228,7 @@ static const struct ov10640_reg ov10640_regs_wizard_r1e[] = { + {0x3087, 0x0}, + {0x346d, 0x14}, + {0x3444, 0x28}, +-{0x3091, 0x0}, ++{0x3091, 0x00}, // embedded data, embedded stats + {0x3119, 0x44}, // COMB12 + {0x3012, 0x1}, + #endif +diff --git a/drivers/media/i2c/soc_camera/ov10640_r1f.h b/drivers/media/i2c/soc_camera/ov10640_r1f.h +index ef866fa..3f9b3f5 100644 +--- a/drivers/media/i2c/soc_camera/ov10640_r1f.h ++++ b/drivers/media/i2c/soc_camera/ov10640_r1f.h +@@ -1177,10 +1177,10 @@ static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { + {0x3079, OV10640_X_END & 0xff}, + {0x307a, OV10640_Y_END >> 8}, + {0x307b, OV10640_Y_END & 0xff}, +-{0x307c, OV10640_MAX_WIDTH >> 8}, +-{0x307d, OV10640_MAX_WIDTH & 0xff}, +-{0x307e, OV10640_MAX_HEIGHT >> 8}, +-{0x307f, OV10640_MAX_HEIGHT & 0xff}, ++{0x307c, OV10640_DEFAULT_WIDTH >> 8}, ++{0x307d, OV10640_DEFAULT_WIDTH & 0xff}, ++{0x307e, OV10640_DEFAULT_HEIGHT >> 8}, ++{0x307f, OV10640_DEFAULT_HEIGHT & 0xff}, + {0x3080, (OV10640_SENSOR_WIDTH + 200) >> 8}, // HTS + {0x3081, (OV10640_SENSOR_WIDTH + 200) & 0xff}, + {0x3082, (OV10640_SENSOR_HEIGHT + 208) >> 8}, //VTS +@@ -1191,7 +1191,7 @@ static const struct ov10640_reg ov10640_regs_wizard_r1f[] = { + {0x3087, 0x0}, + {0x346d, 0x14}, + {0x3444, 0x28}, +-{0x3091, 0x0}, ++{0x3091, 0x00}, // embedded data, embedded stats + {0x3119, 0x44}, // COMB12 + {0x3012, 0x1}, + #endif +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0463-net-can-rcar_can-fix-possible-IRQ-storm-on-high-load.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0463-net-can-rcar_can-fix-possible-IRQ-storm-on-high-load.patch new file mode 100644 index 00000000..8fffdc42 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0463-net-can-rcar_can-fix-possible-IRQ-storm-on-high-load.patch @@ -0,0 +1,62 @@ +From f64aaea45c16fd3f34e4130b62a14389fb174b13 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Jan 2020 13:17:42 +0300 +Subject: [PATCH] net: can: rcar_can: fix possible IRQ storm on high load + +We have observed rcar_canfd driver entering IRQ storm under high load, +with following scenario: +- rcar_canfd_global_interrupt() in entered due to Rx available, +- napi_schedule_prep() is called, and sets NAPIF_STATE_SCHED in state +- Rx fifo interrupts are masked, +- rcar_canfd_global_interrupt() is entered again, this time due to + error interrupt (e.g. due to overflow), +- since scheduled napi poller has not yet executed, condition for calling + napi_schedule_prep() from rcar_canfd_global_interrupt() remains true, + thus napi_schedule_prep() gets called and sets NAPIF_STATE_MISSED flag + in state, +- later, napi poller function rcar_canfd_rx_poll() gets executed, and + calls napi_complete_done(), +- due to NAPIF_STATE_MISSED flag in state, this call does not clear + NAPIF_STATE_SCHED flag from state, +- on return from napi_complete_done(), rcar_canfd_rx_poll() unmasks Rx + interrutps, +- Rx interrupt happens, rcar_canfd_global_interrupt() gets called + and calls napi_schedule_prep(), +- since NAPIF_STATE_SCHED is set in state at this time, this call + returns false, +- due to that false return, rcar_canfd_global_interrupt() returns + without masking Rx interrupt +- and this results into IRQ storm: unmasked Rx interrupt happens again + and again is misprocessed in the same way. + +This patch fixes that scenario by unmasking Rx interrupts only when +napi_complete_done() returns true, which means it has cleared +NAPIF_STATE_SCHED in state. + +Signed-off-by: Nikita Yushchenko +Signed-off-by: Vladimir Barinov +--- + drivers/net/can/rcar/rcar_can.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c +index 8d2c709..b06bfc2 100644 +--- a/drivers/net/can/rcar/rcar_can.c ++++ b/drivers/net/can/rcar/rcar_can.c +@@ -705,9 +705,10 @@ static int rcar_can_rx_poll(struct napi_struct *napi, int quota) + } + /* All packets processed */ + if (num_pkts < quota) { +- napi_complete_done(napi, num_pkts); +- priv->ier |= RCAR_CAN_IER_RXFIE; +- writeb(priv->ier, &priv->regs->ier); ++ if (napi_complete_done(napi, num_pkts)) { ++ priv->ier |= RCAR_CAN_IER_RXFIE; ++ writeb(priv->ier, &priv->regs->ier); ++ } + } + return num_pkts; + } +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0464-arm64-dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0464-arm64-dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch new file mode 100644 index 00000000..5d8b49e0 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0464-arm64-dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch @@ -0,0 +1,48 @@ +From 233ca8eeba0564b0754a31afd4535f35362479cf Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Jan 2020 16:28:12 +0300 +Subject: [PATCH] arm64: dts: renesas: ulcb-v2: use CANFD instead CAN + +Replace replace CAN with CANFD + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi +index 89bc8c1..1b4e6c3 100644 +--- a/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb2.dtsi +@@ -1584,25 +1584,19 @@ + &can0 { + pinctrl-0 = <&can0_pins>; + pinctrl-names = "default"; +- status = "okay"; +- +- renesas,can-clock-select = <0x0>; ++ status = "disabled"; + }; + + &can1 { + pinctrl-0 = <&can1_pins>; + pinctrl-names = "default"; +- status = "okay"; +- +- renesas,can-clock-select = <0x0>; ++ status = "disabled"; + }; + + &canfd { + pinctrl-0 = <&canfd0_pins &canfd1_pins>; + pinctrl-names = "default"; +- status = "disabled"; +- +- renesas,can-clock-select = <0x0>; ++ status = "okay"; + + channel0 { + status = "okay"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0465-arm64-dts-renesas-add-cn12-support-on-VB2-1.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0465-arm64-dts-renesas-add-cn12-support-on-VB2-1.patch new file mode 100644 index 00000000..12d71ec1 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0465-arm64-dts-renesas-add-cn12-support-on-VB2-1.patch @@ -0,0 +1,481 @@ +From 13310cdf96f0f4cf63c2b374267fce6794573500 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 28 Jan 2020 21:13:56 +0300 +Subject: [PATCH] arm64: dts: renesas: add cn12 support on VB2.1 + +This adds CN12 (SLOT C) on VB2.1 + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/ulcb-vb2-cn12.dtsi | 459 +++++++++++++++++++++++++ + 1 file changed, 459 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/ulcb-vb2-cn12.dtsi + +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2-cn12.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2-cn12.dtsi +new file mode 100644 +index 0000000..7ce48d90 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb2-cn12.dtsi +@@ -0,0 +1,459 @@ ++/* ++ * Device Tree Source for the H3ULCB Videobox board V2: ++ * this adding conflicting resource on VIN4/VIN5/VIN6/VIN7 for CN12 ++ * ++ * Copyright (C) 2020 Renesas Electronics Corp. ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++&i2cswitch2 { ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ /* Slot C (CN12) */ ++ ++ ov106xx@8 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x68>; ++ ++ port@0 { ++ ov106xx_in8: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2>; ++ remote-endpoint = <&vin4ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des2ep0: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep0>; ++ }; ++ ov106xx_ti9x4_des2ep0: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep0>; ++ }; ++ }; ++ }; ++ ++ ov106xx@9 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x69>; ++ ++ port@0 { ++ ov106xx_in9: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2>; ++ remote-endpoint = <&vin5ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des2ep1: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep1>; ++ }; ++ ov106xx_ti9x4_des2ep1: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep1>; ++ }; ++ }; ++ }; ++ ++ ov106xx@10 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x6a>; ++ ++ port@0 { ++ ov106xx_in10: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2>; ++ remote-endpoint = <&vin6ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des2ep2: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep2>; ++ }; ++ ov106xx_ti9x4_des2ep2: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep2>; ++ }; ++ }; ++ }; ++ ++ ov106xx@11 { ++ compatible = "ovti,ov106xx"; ++ reg = <0x6b>; ++ ++ port@0 { ++ ov106xx_in11: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2>; ++ remote-endpoint = <&vin7ep0>; ++ }; ++ }; ++ port@1 { ++ ov106xx_max9286_des2ep3: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep3>; ++ }; ++ ov106xx_ti9x4_des2ep3: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep3>; ++ }; ++ }; ++ }; ++ ++ /* DS90UB9x4 @ 0x3a */ ++ ti9x4@2 { ++ compatible = "ti,ti9x4"; ++ reg = <0x3a>; ++ ti,sensor_delay = <350>; ++ ti,links = <4>; ++ ti,lanes = <2>; ++ ti,forwarding-mode = "round-robin"; ++ ti,cable-mode = "coax"; ++ ++ POC0-gpios = <&gpio_exp_c_5c 8 GPIO_ACTIVE_HIGH>; ++ POC1-gpios = <&gpio_exp_c_5c 9 GPIO_ACTIVE_HIGH>; ++ POC2-gpios = <&gpio_exp_c_5c 10 GPIO_ACTIVE_HIGH>; ++ POC3-gpios = <&gpio_exp_c_5c 11 GPIO_ACTIVE_HIGH>; ++ ++ port@0 { ++ ti9x4_des2ep0: endpoint@0 { ++ ti9x3-addr = <0x0c>; ++ dvp-order = <0>; ++ remote-endpoint = <&ov106xx_in8>; ++ }; ++ ti9x4_des2ep1: endpoint@1 { ++ ti9x3-addr = <0x0d>; ++ dvp-order = <0>; ++ remote-endpoint = <&ov106xx_in9>; ++ }; ++ ti9x4_des2ep2: endpoint@2 { ++ ti9x3-addr = <0x0e>; ++ dvp-order = <0>; ++ remote-endpoint = <&ov106xx_in10>; ++ }; ++ ti9x4_des2ep3: endpoint@3 { ++ ti9x3-addr = <0x0f>; ++ dvp-order = <0>; ++ remote-endpoint = <&ov106xx_in11>; ++ }; ++ }; ++ port@1 { ++ ti9x4_csi1ep0: endpoint { ++ csi-rate = <1450>; ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ }; ++ ++ /* MAX9286 @ 0x2c */ ++ max9286@2 { ++ compatible = "maxim,max9286"; ++ reg = <0x2c>; ++ maxim,sensor_delay = <350>; ++ maxim,links = <4>; ++ maxim,lanes = <2>; ++ maxim,resetb-gpio = <1>; ++ maxim,fsync-mode = "automatic"; ++ maxim,timeout = <100>; ++ ++ POC0-gpios = <&gpio_exp_c_5c 9 GPIO_ACTIVE_HIGH>; ++ POC1-gpios = <&gpio_exp_c_5c 8 GPIO_ACTIVE_HIGH>; ++ POC2-gpios = <&gpio_exp_c_5c 11 GPIO_ACTIVE_HIGH>; ++ POC3-gpios = <&gpio_exp_c_5c 10 GPIO_ACTIVE_HIGH>; ++ ++ port@0 { ++ max9286_des2ep0: endpoint@0 { ++ max9271-addr = <0x50>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in8>; ++ }; ++ max9286_des2ep1: endpoint@1 { ++ max9271-addr = <0x51>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in9>; ++ }; ++ max9286_des2ep2: endpoint@2 { ++ max9271-addr = <0x52>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in10>; ++ }; ++ max9286_des2ep3: endpoint@3 { ++ max9271-addr = <0x53>; ++ dvp-order = <1>; ++ remote-endpoint = <&ov106xx_in11>; ++ }; ++ }; ++ port@1 { ++ max9286_csi1ep0: endpoint { ++ csi-rate = <700>; ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ /* Slot C (CN12) */ ++ ++ /* PCA9535 is a redundand/deprecated card */ ++ gpio_exp_c_27: gpio@27 { ++ compatible = "nxp,pca9535"; ++ reg = <0x26>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_c_des_cfg1 { ++ gpio-hog; ++ gpios = <5 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg1"; ++ }; ++ video_c_des_cfg0 { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg0"; ++ }; ++ video_c_pwr_shdn { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR_SHDN"; ++ }; ++ video_c_cam_pwr0 { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR0"; ++ }; ++ video_c_cam_pwr1 { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR1"; ++ }; ++ video_c_cam_pwr2 { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR2"; ++ }; ++ video_c_cam_pwr3 { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR3"; ++ }; ++ video_c_des_shdn { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C DES_SHDN"; ++ }; ++ video_c_des_led { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-C led"; ++ }; ++ }; ++ ++ gpio_exp_c_5c: gpio@5c { ++ compatible = "maxim,max7325"; ++ reg = <0x5c>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_c_des_cfg2 { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg2"; ++ }; ++ video_c_des_cfg1 { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg1"; ++ }; ++ video_c_des_cfg0 { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg0"; ++ }; ++ video_c_pwr_shdn { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR_SHDN"; ++ }; ++ video_c_des_shdn { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C DES_SHDN"; ++ }; ++ video_c_led { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-C LED"; ++ }; ++ }; ++ }; ++}; ++ ++&vin4 { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin4ep0: endpoint { ++ csi,select = "csi20"; ++ virtual,channel = <0>; ++ remote-endpoint = <&ov106xx_in8>; ++ data-lanes = <1 2>; ++ }; ++ }; ++ port@1 { ++ csi2ep0: endpoint { ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ port@2 { ++ vin4_max9286_des2ep0: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep0>; ++ }; ++ vin4_ti9x4_des2ep0: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin5 { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin5ep0: endpoint@0 { ++ csi,select = "csi20"; ++ virtual,channel = <1>; ++ remote-endpoint = <&ov106xx_in9>; ++ data-lanes = <1 2>; ++ }; ++ }; ++ port@1 { ++ csi2ep1: endpoint { ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ port@2 { ++ vin5_max9286_des2ep1: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep1>; ++ }; ++ vin5_ti9x4_des2ep1: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin6 { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin6ep0: endpoint@0 { ++ csi,select = "csi20"; ++ virtual,channel = <2>; ++ remote-endpoint = <&ov106xx_in10>; ++ data-lanes = <1 2>; ++ }; ++ }; ++ port@1 { ++ csi2ep2: endpoint { ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ port@2 { ++ vin6_max9286_des2ep2: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep2>; ++ }; ++ vin6_ti9x4_des2ep2: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin7 { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin7ep0: endpoint@0 { ++ csi,select = "csi20"; ++ virtual,channel = <3>; ++ remote-endpoint = <&ov106xx_in11>; ++ data-lanes = <1 2>; ++ }; ++ }; ++ port@1 { ++ csi2ep3: endpoint { ++ remote-endpoint = <&csi20_ep>; ++ }; ++ }; ++ port@2 { ++ vin7_max9286_des2ep3: endpoint@0 { ++ remote-endpoint = <&max9286_des2ep3>; ++ }; ++ vin7_ti9x4_des2ep3: endpoint@1 { ++ remote-endpoint = <&ti9x4_des2ep3>; ++ }; ++ }; ++ }; ++}; ++ ++&csi20 { ++ status = "okay"; ++ ++ virtual,channel { ++ csi2_vc0 { ++ data,type = "ycbcr422"; ++ receive,vc = <0>; ++ }; ++ csi2_vc1 { ++ data,type = "ycbcr422"; ++ receive,vc = <1>; ++ }; ++ csi2_vc2 { ++ data,type = "ycbcr422"; ++ receive,vc = <2>; ++ }; ++ csi2_vc3 { ++ data,type = "ycbcr422"; ++ receive,vc = <3>; ++ }; ++ }; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi20_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2>; ++ csi-rate = <300>; ++ }; ++ }; ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0466-media-i2c-max9286-parse-crossbar-from-dt.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0466-media-i2c-max9286-parse-crossbar-from-dt.patch new file mode 100644 index 00000000..f96696d6 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0466-media-i2c-max9286-parse-crossbar-from-dt.patch @@ -0,0 +1,58 @@ +From 0220ffebe645d66242aca68d7a374140dea9e6a3 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Jan 2020 16:38:19 +0300 +Subject: [PATCH] media: i2c: max9286: parse crossbar from dt + +This allows to parse crossbar from device tree + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/max9286.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index f6c6b0a..0a1732a 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -56,6 +56,7 @@ struct max9286_priv { + int dbl; + int dt; + int hsgen; ++ u64 crossbar; + char cb[16]; + int hts; + int vts; +@@ -141,8 +142,8 @@ static int switchin = 0; + module_param(switchin, int, 0644); + MODULE_PARM_DESC(switchin, " COAX SWITCH IN+ and IN- (default: 0 - not switched)"); + +-static long crossbar = 0xba9876543210; +-module_param(crossbar, long, 0644); ++static unsigned long crossbar = 0xba9876543210; ++module_param(crossbar, ulong, 0644); + MODULE_PARM_DESC(crossbar, " Crossbar setup (default: ba9876543210 - reversed)"); + + enum { +@@ -738,6 +739,8 @@ static int max9286_parse_dt(struct i2c_client *client) + priv->pclk = pclk; + if (of_property_read_u32(np, "maxim,switchin", &priv->switchin)) + priv->switchin = 0; ++ if (of_property_read_u64(np, "maxim,crossbar", &priv->crossbar)) ++ priv->crossbar = crossbar; + + /* module params override dts */ + if (him) +@@ -773,8 +776,8 @@ static int max9286_parse_dt(struct i2c_client *client) + + /* parse crossbar setup */ + for (i = 0; i < 16; i++) { +- priv->cb[i] = crossbar % 16; +- crossbar /= 16; ++ priv->cb[i] = priv->crossbar % 16; ++ priv->crossbar /= 16; + } + + for (i = 0; i < priv->links; i++) { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0467-media-i2c-isx016-add-fixed-sensor.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0467-media-i2c-isx016-add-fixed-sensor.patch new file mode 100644 index 00000000..359e1903 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0467-media-i2c-isx016-add-fixed-sensor.patch @@ -0,0 +1,94 @@ +From 43b01937acf76c4d057fd6681ff66f945634f5c4 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Jan 2020 16:41:59 +0300 +Subject: [PATCH] media: i2c: isx016: add fixed sensor + +This add possibility to enable camera if the imager is not +accessible in i2c line for ID detection + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/isx016.c | 41 +++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/isx016.c b/drivers/media/i2c/soc_camera/isx016.c +index 9465c8f..a9f137c 100644 +--- a/drivers/media/i2c/soc_camera/isx016.c ++++ b/drivers/media/i2c/soc_camera/isx016.c +@@ -51,8 +51,21 @@ struct isx016_priv { + int port; + int gpio_resetb; + int gpio_fsin; ++ int fixed_sensor; + }; + ++static int isx016_fixed = 0; ++module_param(isx016_fixed, int, 0644); ++MODULE_PARM_DESC(isx016_fixed, " isx016 fixed detect (0 - imager disabled)"); ++ ++static int isx016_width = ISX016_MAX_WIDTH; ++module_param(isx016_width, int, 0644); ++MODULE_PARM_DESC(isx016_width, " isx016 fixed width"); ++ ++static int isx016_height = ISX016_MAX_HEIGHT; ++module_param(isx016_height, int, 0644); ++MODULE_PARM_DESC(isx016_height, " isx016 fixed height"); ++ + static inline struct isx016_priv *to_isx016(const struct i2c_client *client) + { + return container_of(i2c_get_clientdata(client), struct isx016_priv, sd); +@@ -371,9 +384,27 @@ static int isx016_initialize(struct i2c_client *client) + int ret = 0; + int tmp_addr; + int i; ++ u8 ser_pid = 0; + + isx016_s_port(client, 1); + ++ if (priv->fixed_sensor) { ++ tmp_addr = client->addr; ++ if (priv->max9286_addr) { ++ client->addr = priv->max9271_addr; ++ /* check serizlizer ID */ ++ reg8_read(client, 0x1e, &ser_pid); ++ } ++ client->addr = tmp_addr; ++ ++ if (ser_pid != MAX9271_ID && ser_pid != MAX96705_ID && ser_pid != MAX96707_ID) { ++ ret = -ENODEV; ++ goto err; ++ } ++ ++ goto out; ++ } ++ + for (i = 0; i < ARRAY_SIZE(isx016_i2c_addr); i++) { + tmp_addr = client->addr; + if (priv->max9286_addr) { +@@ -409,6 +440,7 @@ static int isx016_initialize(struct i2c_client *client) + /* Program wizard registers */ + isx016_set_regs(client, isx016_regs_wizard, ARRAY_SIZE(isx016_regs_wizard)); + ++out: + dev_info(&client->dev, "isx016 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + err: +@@ -471,6 +503,15 @@ static int isx016_parse_dt(struct device_node *np, struct isx016_priv *priv) + } + client->addr = tmp_addr; + ++ if (of_property_read_u32(np, "isx016,fixed", &priv->fixed_sensor)) ++ priv->fixed_sensor = isx016_fixed; ++ if (priv->fixed_sensor) { ++ if (of_property_read_u32(np, "width", &priv->max_width)) ++ priv->max_width = ISX016_MAX_WIDTH; ++ if (of_property_read_u32(np, "height", &priv->max_height)) ++ priv->max_height = ISX016_MAX_HEIGHT; ++ } ++ + return 0; + } + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0468-imx390-Read-1-byte-registers-by-default.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0468-imx390-Read-1-byte-registers-by-default.patch new file mode 100644 index 00000000..50658706 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0468-imx390-Read-1-byte-registers-by-default.patch @@ -0,0 +1,37 @@ +From 0dc45a01a271f56aedeb7cfc72f8550243d0b3b0 Mon Sep 17 00:00:00 2001 +From: Petr Nechaev +Date: Fri, 27 Dec 2019 22:07:20 +0300 +Subject: [PATCH] imx390: Read 1 byte registers by default + +This patch switches to 1-byte default register size for imx390 image sensor. + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imx390.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imx390.c b/drivers/media/i2c/soc_camera/imx390.c +index c1e568055e54..9d970b16697d 100644 +--- a/drivers/media/i2c/soc_camera/imx390.c ++++ b/drivers/media/i2c/soc_camera/imx390.c +@@ -217,7 +217,7 @@ static int imx390_g_register(struct v4l2_subdev *sd, + int ret; + + if (!s) +- s = 4; ++ s = 1; + if (s > sizeof(reg->val)) + s = sizeof(reg->val); + +@@ -235,7 +235,7 @@ static int imx390_s_register(struct v4l2_subdev *sd, + u32 s = reg->size; + + if (!s) +- s = 4; ++ s = 1; + if (s > sizeof(reg->val)) + s = sizeof(reg->val); + +-- +2.20.1 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0469-rcar_canfd-fix-one-more-interrupt-storm-window.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0469-rcar_canfd-fix-one-more-interrupt-storm-window.patch new file mode 100644 index 00000000..506ff276 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0469-rcar_canfd-fix-one-more-interrupt-storm-window.patch @@ -0,0 +1,67 @@ +From bfdc3bf828002a0550b8183a67879fc3a9246795 Mon Sep 17 00:00:00 2001 +From: Nikita Yushchenko +Date: Thu, 6 Feb 2020 23:13:19 +0300 +Subject: [PATCH] rcar_canfd: fix one more interrupt storm window + +When more than one rcar_canfd channel works simultaneously, same irq and +same irq handler, rcar_canfd_global_interrupt(), is shared between them +all. Entry into this handler while Rx interrupt for one channel is masked +per NAPI, becomes a very frequent event. + +Code makes an attempt to alter interrupt mask only when NAPI suggests to +do so. However that code is racy, and with frequent call to handler with +masked interrupt, this race actually happens. + +The race window is: +- after code in napi_complete_done() clears NAPIF_STATE_SCHED flag inside + NAPI state, but before napi_complete_done() returns true, side-called + interrupt handler detects pending (although masked) Rx, calls + napi_schedule_prep(), and NAPIF_STATE_SCHED flag is re-set, +- then napi_complete_done() returns true and Rx interrupt gets unmasked, +- then unmasked interrupt fires, but this time NAPIF_STATE_SCHED flag + is already set, so napi_schedule_prep() returns false, +- which causes return from interrupt handler without touching interrupt, + and IRQ storm is entered. + +To fix it, active Rx interrupt must be UNCONDITIONALLY masked inside the +handler. Failing to mask active interrupt immediately results into IRQ +storm, regardless of NAPI state or whatever other conditions. + +Once napi_schedule_prep() is called after this unconditional masking, future +call to NAPI poller and evential interrupt unmask is guaranteed. + +Signed-off-by: Nikita Yushchenko +--- + drivers/net/can/rcar/rcar_canfd.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c +index 0017ab9..056a5f6 100644 +--- a/drivers/net/can/rcar/rcar_canfd.c ++++ b/drivers/net/can/rcar/rcar_canfd.c +@@ -1101,13 +1101,16 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id) + /* Handle Rx interrupts */ + sts = rcar_canfd_read(priv->base, RCANFD_RFSTS(ridx)); + if (likely(sts & RCANFD_RFSTS_RFIF)) { +- if (napi_schedule_prep(&priv->napi)) { +- /* Disable Rx FIFO interrupts */ +- rcar_canfd_clear_bit(priv->base, +- RCANFD_RFCC(ridx), +- RCANFD_RFCC_RFIE); ++ /* If Rx FIFO interrupt is there, it must be masked ++ * UNCONDITIONALLY, otherwise IRQ storm will start */ ++ rcar_canfd_clear_bit(priv->base, ++ RCANFD_RFCC(ridx), ++ RCANFD_RFCC_RFIE); ++ /* The above calls ensure that napi polling will be ++ * called sometime AFTER the above call, which ++ * eventually ensures interrupt re-enable */ ++ if (napi_schedule_prep(&priv->napi)) + __napi_schedule(&priv->napi); +- } + } + } + return IRQ_HANDLED; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0470-media-i2c-add-fps-setup.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0470-media-i2c-add-fps-setup.patch new file mode 100644 index 00000000..70fac592 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0470-media-i2c-add-fps-setup.patch @@ -0,0 +1,429 @@ +From 07c0308d3c5991ff67c32329d56f14e375e3e981 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 10 Feb 2020 18:46:46 +0300 +Subject: [PATCH] media: i2c: add fps setup + +This adds FPS setup for max9286/ti9x4 with ar0143/147 imagers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0143.c | 66 ++++++++++++++++++++++++++++++++-- + drivers/media/i2c/soc_camera/ar0147.c | 64 +++++++++++++++++++++++++++++++-- + drivers/media/i2c/soc_camera/max9286.c | 42 ++++++++++++++++++++++ + drivers/media/i2c/soc_camera/ti9x4.c | 54 ++++++++++++++++++++++++---- + 4 files changed, 215 insertions(+), 11 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0143.c b/drivers/media/i2c/soc_camera/ar0143.c +index d81871b..de4ca3c 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.c ++++ b/drivers/media/i2c/soc_camera/ar0143.c +@@ -35,6 +35,8 @@ struct ar0143_priv { + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; ++ int fps_numerator; ++ int fps_denominator; + int init_complete; + u8 id[6]; + int setup; +@@ -297,6 +299,61 @@ static int ar0143_g_mbus_config(struct v4l2_subdev *sd, + return 0; + } + ++static int ar0143_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0143_priv *priv = to_ar0143(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int ar0143_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0143_priv *priv = to_ar0143(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0; ++ int tmp_addr; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ if (priv->ti9x4_addr) ++ priv->vts = (AR0143_SENSOR_HEIGHT + 157) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ else ++ priv->vts = (AR0143_SENSOR_HEIGHT + 142) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ ++ ret = reg16_write16(client, 0x300A, priv->vts); /* FRAME_LENGTH_LINES_ */ ++ ++ tmp_addr = client->addr; ++ if (priv->max9271_addr) { ++ client->addr = priv->max9271_addr; /* Serializer I2C address */ ++ reg8_write(client, 0x58, priv->vts >> 8); /* HS count */ ++ reg8_write(client, 0x59, priv->vts & 0xff); ++ } ++ client->addr = tmp_addr; ++ ++ priv->fps_denominator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++out: ++ return ret; ++} ++ ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0143_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -361,7 +418,8 @@ static int ar0143_s_ctrl(struct v4l2_ctrl *ctrl) + break; + case V4L2_CID_EXPOSURE: + /* T1 exposure */ +- ret = reg16_write16(client, 0x3012, ctrl->val); ++ if (ctrl->val < 0x400 * 30 * priv->fps_numerator / priv->fps_denominator) ++ ret = reg16_write16(client, 0x3012, ctrl->val); + break; + case V4L2_CID_HFLIP: + ret = reg16_read16(client, 0x3040, &val); +@@ -394,6 +452,8 @@ static const struct v4l2_ctrl_ops ar0143_ctrl_ops = { + static struct v4l2_subdev_video_ops ar0143_video_ops = { + .s_stream = ar0143_s_stream, + .g_mbus_config = ar0143_g_mbus_config, ++ .g_parm = ar0143_g_parm, ++ .s_parm = ar0143_s_parm, + }; + + static const struct v4l2_subdev_pad_ops ar0143_subdev_pad_ops = { +@@ -617,6 +677,8 @@ static int ar0143_probe(struct i2c_client *client, + + v4l2_i2c_subdev_init(&priv->sd, client, &ar0143_subdev_ops); + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); + v4l2_ctrl_new_std(&priv->hdl, &ar0143_ctrl_ops, +@@ -638,7 +700,7 @@ static int ar0143_probe(struct i2c_client *client, + v4l2_ctrl_new_std(&priv->hdl, &ar0143_ctrl_ops, + V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0x7); + v4l2_ctrl_new_std(&priv->hdl, &ar0143_ctrl_ops, +- V4L2_CID_EXPOSURE, 1, 0x400, 1, 0x300); ++ V4L2_CID_EXPOSURE, 1, 0x400 * 30, 1, 0x300); + v4l2_ctrl_new_std(&priv->hdl, &ar0143_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 0); + v4l2_ctrl_new_std(&priv->hdl, &ar0143_ctrl_ops, +diff --git a/drivers/media/i2c/soc_camera/ar0147.c b/drivers/media/i2c/soc_camera/ar0147.c +index fc2a09e..e3ecec2 100644 +--- a/drivers/media/i2c/soc_camera/ar0147.c ++++ b/drivers/media/i2c/soc_camera/ar0147.c +@@ -36,6 +36,8 @@ struct ar0147_priv { + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; ++ int fps_denominator; ++ int fps_numerator; + int init_complete; + u8 id[6]; + /* serializers */ +@@ -146,7 +148,7 @@ static int ar0147_set_regs(struct i2c_client *client, const struct ar0147_reg ** + reg16_write16(client, regs[i].reg, 1); // OP_SYS_CLK_DIV + continue; + case 0x300A: +- reg16_write16(client, regs[i].reg, AR0147_SENSOR_HEIGHT + 142); // FRAME_LENGTH_LINES_ ++ reg16_write16(client, regs[i].reg, AR0147_SENSOR_HEIGHT + 226); // FRAME_LENGTH_LINES_ + continue; + } + } +@@ -317,6 +319,57 @@ static int ar0147_g_mbus_config(struct v4l2_subdev *sd, + return 0; + } + ++static int ar0147_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0147_priv *priv = to_ar0147(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int ar0147_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0147_priv *priv = to_ar0147(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0; ++ int tmp_addr; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ priv->vts = (AR0147_SENSOR_HEIGHT + 226) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ ++ ret = reg16_write16(client, 0x300A, priv->vts); /* FRAME_LENGTH_LINES_ */ ++ ++ tmp_addr = client->addr; ++ if (priv->max9271_addr) { ++ client->addr = priv->max9271_addr; /* Serializer I2C address */ ++ reg8_write(client, 0x58, priv->vts >> 8); /* HS count */ ++ reg8_write(client, 0x59, priv->vts & 0xff); ++ } ++ client->addr = tmp_addr; ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++out: ++ return ret; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0147_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -381,7 +434,8 @@ static int ar0147_s_ctrl(struct v4l2_ctrl *ctrl) + break; + case V4L2_CID_EXPOSURE: + /* T1 exposure */ +- ret = reg16_write16(client, 0x3012, ctrl->val); ++ if (ctrl->val < 0x400 * 30 * priv->fps_numerator / priv->fps_denominator) ++ ret = reg16_write16(client, 0x3012, ctrl->val); + break; + case V4L2_CID_HFLIP: + ret = reg16_read16(client, 0x3040, &val); +@@ -414,6 +468,8 @@ static const struct v4l2_ctrl_ops ar0147_ctrl_ops = { + static struct v4l2_subdev_video_ops ar0147_video_ops = { + .s_stream = ar0147_s_stream, + .g_mbus_config = ar0147_g_mbus_config, ++ .g_parm = ar0147_g_parm, ++ .s_parm = ar0147_s_parm, + }; + + static const struct v4l2_subdev_pad_ops ar0147_subdev_pad_ops = { +@@ -648,6 +704,8 @@ static int ar0147_probe(struct i2c_client *client, + + v4l2_i2c_subdev_init(&priv->sd, client, &ar0147_subdev_ops); + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); + v4l2_ctrl_new_std(&priv->hdl, &ar0147_ctrl_ops, +@@ -669,7 +727,7 @@ static int ar0147_probe(struct i2c_client *client, + v4l2_ctrl_new_std(&priv->hdl, &ar0147_ctrl_ops, + V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0x7); + v4l2_ctrl_new_std(&priv->hdl, &ar0147_ctrl_ops, +- V4L2_CID_EXPOSURE, 1, 0x400, 1, 0x300); ++ V4L2_CID_EXPOSURE, 1, 0x400 * 30, 1, 0x300); + v4l2_ctrl_new_std(&priv->hdl, &ar0147_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 0); + v4l2_ctrl_new_std(&priv->hdl, &ar0147_ctrl_ops, +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index 0a1732a..343b8ab 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -43,6 +43,8 @@ struct max9286_priv { + int csi_rate; + const char *fsync_mode; + int fsync_period; ++ int fps_numerator; ++ int fps_denominator; + int pclk; + char pclk_rising_edge; + int gpio_resetb; +@@ -650,8 +652,46 @@ static struct v4l2_subdev_core_ops max9286_subdev_core_ops = { + .registered_async = max9286_registered_async, + }; + ++static int max9286_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ return 0; ++} ++ ++static int max9286_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ int f_period; ++ ++ f_period = priv->fsync_period * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ reg8_write(client, 0x06, f_period & 0xff); ++ reg8_write(client, 0x07, (f_period >> 8) & 0xff); ++ reg8_write(client, 0x08, f_period >> 16); ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_subdev_video_ops max9286_video_ops = { ++ .g_parm = max9286_g_parm, ++ .s_parm = max9286_s_parm, ++}; ++ + static struct v4l2_subdev_ops max9286_subdev_ops = { + .core = &max9286_subdev_core_ops, ++ .video = &max9286_video_ops, + }; + + static int max9286_parse_dt(struct i2c_client *client) +@@ -926,6 +966,8 @@ static int max9286_probe(struct i2c_client *client, + priv->client = client; + atomic_set(&priv->use_count, 0); + priv->csi2_outord = 0xff; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + err = max9286_parse_dt(client); + if (err) +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +index aa85d92..b671736 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/ti9x4.c +@@ -32,6 +32,9 @@ struct ti9x4_priv { + int lanes; + int csi_rate; + const char *forwarding_mode; ++ int fs_time; ++ int fps_numerator; ++ int fps_denominator; + int is_coax; + int dvp_bus; + int dvp_lsb; +@@ -139,7 +142,6 @@ static void ti9x4_read_chipid(struct i2c_client *client) + static void ti9x4_initial_setup(struct i2c_client *client) + { + struct ti9x4_priv *priv = i2c_get_clientdata(client); +- int fs_time = 0; + + /* Initial setup */ + client->addr = priv->des_addr; /* TI9x4 I2C */ +@@ -175,20 +177,21 @@ static void ti9x4_initial_setup(struct i2c_client *client) + case 800: + case 400: + /* FrameSync setup for REFCLK=25MHz, FPS=30: period_counts=1/FPS/12mks=1/30/12e-6=2777 -> HI=2, LO=2775 */ +- fs_time = 2790; ++ priv->fs_time = 2790; + break; + case 1500: + /* FrameSync setup for REFCLK=23MHz, FPS=30: period_counts=1/FPS/13.043mks=1/30/13.043e-6=2556 -> HI=2, LO=2554 */ +- fs_time = 2570; ++ priv->fs_time = 2570; + break; + case 1450: + case 1100: + case 700: + case 350: + /* FrameSync setup for REFCLK=22.5MHz, FPS=30: period_counts=1/FPS/13.333mks=1/30/13.333e-6=2500 -> HI=2, LO=2498 */ +- fs_time = 2513; ++ priv->fs_time = 2513; + break; + default: ++ priv->fs_time = 0; + dev_err(&client->dev, "unsupported CSI rate %d\n", priv->csi_rate); + } + +@@ -213,8 +216,8 @@ static void ti9x4_initial_setup(struct i2c_client *client) + #else + reg8_write(client, 0x19, 2 >> 8); /* FrameSync high time MSB */ + reg8_write(client, 0x1a, 2 & 0xff); /* FrameSync high time LSB */ +- reg8_write(client, 0x1b, fs_time >> 8); /* FrameSync low time MSB */ +- reg8_write(client, 0x1c, fs_time & 0xff); /* FrameSync low time LSB */ ++ reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ ++ reg8_write(client, 0x1c, priv->fs_time & 0xff); /* FrameSync low time LSB */ + reg8_write(client, 0x18, 0x01); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ + // reg8_write(client, 0x18, 0x80); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ + #endif +@@ -425,8 +428,45 @@ static struct v4l2_subdev_core_ops ti9x4_subdev_core_ops = { + .registered_async = ti9x4_registered_async, + }; + ++static int ti9x4_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ return 0; ++} ++ ++static int ti9x4_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ int f_time; ++ ++ f_time = priv->fs_time * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ reg8_write(client, 0x1b, f_time >> 8); /* FrameSync low time MSB */ ++ reg8_write(client, 0x1c, f_time & 0xff); /* FrameSync low time LSB */ ++ ++ priv->fps_denominator = cp->timeperframe.denominator; ++ priv->fps_numerator = cp->timeperframe.numerator; ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_subdev_video_ops ti9x4_video_ops = { ++ .g_parm = ti9x4_g_parm, ++ .s_parm = ti9x4_s_parm, ++}; ++ + static struct v4l2_subdev_ops ti9x4_subdev_ops = { + .core = &ti9x4_subdev_core_ops, ++ .video = &ti9x4_video_ops, + }; + + static int ti9x4_parse_dt(struct i2c_client *client) +@@ -607,6 +647,8 @@ static int ti9x4_probe(struct i2c_client *client, + priv->des_addr = client->addr; + priv->client = client; + atomic_set(&priv->use_count, 0); ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + err = ti9x4_parse_dt(client); + if (err) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0471-media-i2c-ov10640-add-fps-setup.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0471-media-i2c-ov10640-add-fps-setup.patch new file mode 100644 index 00000000..cf009e51 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0471-media-i2c-ov10640-add-fps-setup.patch @@ -0,0 +1,104 @@ +From 969dff5e0dbd9ad6b289073410dbd3013ccd5e31 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 10 Feb 2020 21:09:29 +0300 +Subject: [PATCH] media: i2c: ov10640: add fps setup + +This adds framerate change support for OV10640 imager + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.c | 50 ++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index fab2c0d..0af091e 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -38,6 +38,7 @@ struct ov10640_priv { + struct media_pad pad; + struct v4l2_rect rect; + int subsampling; ++ int fps_numerator; + int fps_denominator; + int init_complete; + u8 id[6]; +@@ -51,6 +52,7 @@ struct ov10640_priv { + int port; + int gpio_resetb; + int gpio_fsin; ++ int vts; + }; + + static inline struct ov10640_priv *to_ov10640(const struct i2c_client *client) +@@ -276,6 +278,51 @@ static int ov10640_g_mbus_config(struct v4l2_subdev *sd, + return 0; + } + ++static int ov10640_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int ov10640_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ priv->vts = (OV10640_SENSOR_HEIGHT + 208) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ ++ reg16_write(client, 0x3012, 0); ++ reg16_write(client, 0x3082, priv->vts >> 8); ++ reg16_write(client, 0x3083, priv->vts & 0xff); ++ ret = reg16_write(client, 0x3012, 1); ++ ++ priv->fps_denominator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return ret; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ov10640_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -417,6 +464,8 @@ static const struct v4l2_ctrl_ops ov10640_ctrl_ops = { + static struct v4l2_subdev_video_ops ov10640_video_ops = { + .s_stream = ov10640_s_stream, + .g_mbus_config = ov10640_g_mbus_config, ++ .g_parm = ov10640_g_parm, ++ .s_parm = ov10640_s_parm, + }; + + static const struct v4l2_subdev_pad_ops ov10640_subdev_pad_ops = { +@@ -643,6 +692,7 @@ static int ov10640_probe(struct i2c_client *client, + priv->rect.top = 0; + priv->rect.width = OV10640_DEFAULT_WIDTH; + priv->rect.height = OV10640_DEFAULT_HEIGHT; ++ priv->fps_numerator = 1; + priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0472-media-i2c-soc_camera-fix-compilation-warnings.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0472-media-i2c-soc_camera-fix-compilation-warnings.patch new file mode 100644 index 00000000..396c78f8 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0472-media-i2c-soc_camera-fix-compilation-warnings.patch @@ -0,0 +1,70 @@ +From 088954dd3b295ef6401f58e694456c782e57ef39 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 10 Feb 2020 21:10:06 +0300 +Subject: [PATCH] media: i2c: soc_camera: fix compilation warnings + +Fix compilation warnings + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0143.c | 2 +- + drivers/media/i2c/soc_camera/ar0147.c | 2 +- + drivers/media/i2c/soc_camera/ov106xx.c | 3 +++ + drivers/media/i2c/soc_camera/ox01d10.c | 1 - + 4 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0143.c b/drivers/media/i2c/soc_camera/ar0143.c +index de4ca3c..7d55afb 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.c ++++ b/drivers/media/i2c/soc_camera/ar0143.c +@@ -349,7 +349,7 @@ static int ar0143_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) + priv->fps_denominator = cp->timeperframe.numerator; + priv->fps_denominator = cp->timeperframe.denominator; + } +-out: ++ + return ret; + } + +diff --git a/drivers/media/i2c/soc_camera/ar0147.c b/drivers/media/i2c/soc_camera/ar0147.c +index e3ecec2..a444700 100644 +--- a/drivers/media/i2c/soc_camera/ar0147.c ++++ b/drivers/media/i2c/soc_camera/ar0147.c +@@ -366,7 +366,7 @@ static int ar0147_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) + priv->fps_numerator = cp->timeperframe.numerator; + priv->fps_denominator = cp->timeperframe.denominator; + } +-out: ++ + return ret; + } + +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index 841861c..cf97f28 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -243,6 +243,9 @@ static int ov106xx_remove(struct i2c_client *client) + case ID_IMX390: + imx390_remove(client); + break; ++ case ID_OX01D10: ++ ox01d10_remove(client); ++ break; + case ID_OX03A: + ox03a_remove(client); + break; +diff --git a/drivers/media/i2c/soc_camera/ox01d10.c b/drivers/media/i2c/soc_camera/ox01d10.c +index 3ea3fef..082e88c 100644 +--- a/drivers/media/i2c/soc_camera/ox01d10.c ++++ b/drivers/media/i2c/soc_camera/ox01d10.c +@@ -388,7 +388,6 @@ static DEVICE_ATTR(otp_id_ox01d10, S_IRUGO, ox01d10_otp_id_show, NULL); + static int ox01d10_initialize(struct i2c_client *client) + { + struct ox01d10_priv *priv = to_ox01d10(client); +- char chip_name[10] = "unknown"; + u8 val = 0; + u16 pid; + int ret = 0; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0473-media-i2c-ov10640-add-different-imager-addresses.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0473-media-i2c-ov10640-add-different-imager-addresses.patch new file mode 100644 index 00000000..c00fef19 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0473-media-i2c-ov10640-add-different-imager-addresses.patch @@ -0,0 +1,96 @@ +From 304be73e907a8c63d774f32358a7087a8b76657a Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 10 Feb 2020 23:41:22 +0300 +Subject: [PATCH] media: i2c: ov10640: add different imager addresses + +This adds different i2c imager addresses + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.c | 39 ++++++++++++++++++++++++---------- + 1 file changed, 28 insertions(+), 11 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index 0af091e..f5f0fdd 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -23,7 +23,7 @@ + #include "max9286.h" + #include "ov10640.h" + +-#define OV10640_I2C_ADDR 0x30 ++static const int ov10640_i2c_addr[] = {0x30, 0x34, 0x36}; + + #define OV10640_PIDA_REG 0x300a + #define OV10640_PIDB_REG 0x300b +@@ -566,16 +566,33 @@ static int ov10640_initialize(struct i2c_client *client) + u16 pid; + u8 val = 0, rev; + int ret = 0; ++ int tmp_addr, i; + + ov10640_s_port(client, 1); + +- /* check and show product ID and manufacturer ID */ +- reg16_read(client, OV10640_PIDA_REG, &val); +- pid = val; +- reg16_read(client, OV10640_PIDB_REG, &val); +- pid = (pid << 8) | val; +- reg16_read(client, OV10640_REV_REG, &val); +- rev = 0x10 | ((val & 0xf) + 0xa); ++ for (i = 0; i < ARRAY_SIZE(ov10640_i2c_addr); i++) { ++ tmp_addr = client->addr; ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x4_addr; ++ reg8_write(client, 0x5d, ov10640_i2c_addr[i] << 1); /* Sensor native I2C address */ ++ usleep_range(2000, 2500); ++ } ++ if (priv->max9286_addr) { ++ client->addr = priv->max9271_addr; ++ reg8_write(client, 0x0a, ov10640_i2c_addr[i] << 1); /* Sensor native I2C address */ ++ usleep_range(2000, 2500); ++ }; ++ client->addr = tmp_addr; ++ ++ /* check product ID */ ++ reg16_read(client, OV10640_PIDA_REG, &val); ++ pid = val; ++ reg16_read(client, OV10640_PIDB_REG, &val); ++ pid = (pid << 8) | val; ++ ++ if (pid == OV10640_PID) ++ break; ++ } + + if (pid != OV10640_PID) { + dev_dbg(&client->dev, "Product ID error %x\n", pid); +@@ -583,6 +600,9 @@ static int ov10640_initialize(struct i2c_client *client) + goto out; + } + ++ /* check revision */ ++ reg16_read(client, OV10640_REV_REG, &val); ++ rev = 0x10 | ((val & 0xf) + 0xa); + /* Read OTP IDs */ + ov10640_otp_id_read(client); + /* Program wizard registers */ +@@ -655,16 +675,13 @@ static int ov10640_parse_dt(struct device_node *np, struct ov10640_priv *priv) + if (priv->max9286_addr) { + client->addr = priv->max9271_addr; /* Serializer I2C address */ + reg8_write(client, 0x09, tmp_addr << 1); /* Sensor translated I2C address */ +- reg8_write(client, 0x0A, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ + usleep_range(2000, 2500); /* wait 2ms */ + }; +- + if (priv->ti9x4_addr) { + client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ + reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ + usleep_range(2000, 2500); /* wait 2ms */ + reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ +- reg8_write(client, 0x5d, OV10640_I2C_ADDR << 1); /* Sensor native I2C address */ + } + client->addr = tmp_addr; + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0474-media-i2c-soc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0474-media-i2c-soc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch new file mode 100644 index 00000000..c15a1f8a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0474-media-i2c-soc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch @@ -0,0 +1,82 @@ +From 6c0c041b3bbfec436e96fe09fdbf5072688b7ad2 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 12 Feb 2020 01:24:14 +0300 +Subject: [PATCH] media: i2c: soc_camera: add V4L2_CID_MIN_BUFFERS_FOR_CAPTURE + +Add V4L2_CID_MIN_BUFFERS_FOR_CAPTURE for isx016 and ap0101 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ap0101_ar014x.c | 8 ++++++++ + drivers/media/i2c/soc_camera/isx016.c | 8 ++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +index 4df5793..c458044 100644 +--- a/drivers/media/i2c/soc_camera/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +@@ -347,6 +347,9 @@ static int ap0101_s_ctrl(struct v4l2_ctrl *ctrl) + reg16_write16(client, 0xfc00, 0x2800); + ret = reg16_write16(client, 0x0040, 0x8100); + break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; + } + + return ret; +@@ -552,6 +555,7 @@ static int ap0101_probe(struct i2c_client *client, + const struct i2c_device_id *did) + { + struct ap0101_priv *priv; ++ struct v4l2_ctrl *ctrl; + int ret; + + priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +@@ -587,6 +591,10 @@ static int ap0101_probe(struct i2c_client *client, + V4L2_CID_HFLIP, 0, 1, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, + V4L2_CID_VFLIP, 0, 1, 1, 1); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; + priv->sd.ctrl_handler = &priv->hdl; + + ret = priv->hdl.error; +diff --git a/drivers/media/i2c/soc_camera/isx016.c b/drivers/media/i2c/soc_camera/isx016.c +index a9f137c..3001df9 100644 +--- a/drivers/media/i2c/soc_camera/isx016.c ++++ b/drivers/media/i2c/soc_camera/isx016.c +@@ -319,6 +319,9 @@ static int isx016_s_ctrl(struct v4l2_ctrl *ctrl) + case V4L2_CID_HFLIP: + case V4L2_CID_VFLIP: + break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; + } + + return ret; +@@ -519,6 +522,7 @@ static int isx016_probe(struct i2c_client *client, + const struct i2c_device_id *did) + { + struct isx016_priv *priv; ++ struct v4l2_ctrl *ctrl; + int ret; + + priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +@@ -554,6 +558,10 @@ static int isx016_probe(struct i2c_client *client, + V4L2_CID_HFLIP, 0, 1, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &isx016_ctrl_ops, + V4L2_CID_VFLIP, 0, 1, 1, 0); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; + priv->sd.ctrl_handler = &priv->hdl; + + ret = priv->hdl.error; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0475-media-i2c-ar0233-add-fps-setup.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0475-media-i2c-ar0233-add-fps-setup.patch new file mode 100644 index 00000000..de7ca72a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0475-media-i2c-ar0233-add-fps-setup.patch @@ -0,0 +1,127 @@ +From ec6c2c03f8c59cada4f8b0409b51534c54da282a Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 13 Feb 2020 10:02:20 +0300 +Subject: [PATCH] media: i2c: ar0233: add fps setup + +This add FPS setup for AR0233/AR0220 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0233.c | 59 +++++++++++++++++++++++++++++++++-- + 1 file changed, 57 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index cdd2d8a..fbff49b 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -55,6 +55,8 @@ struct ar0233_priv { + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; ++ int fps_denominator; ++ int fps_numerator; + int init_complete; + u8 id[6]; + bool emb_enable; +@@ -63,6 +65,7 @@ struct ar0233_priv { + int ti9x3_addr; + int port; + int trigger; ++ int vts; + }; + + static int extclk = 23; +@@ -271,6 +274,53 @@ static int ar0233_g_mbus_config(struct v4l2_subdev *sd, + return 0; + } + ++static int ar0233_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0233_priv *priv = to_ar0233(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int ar0233_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0233_priv *priv = to_ar0233(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ switch (chipid) { ++ case AR0220_PID: ++ priv->vts = (AR0233_SENSOR_HEIGHT + 794) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; break; ++ case AR0233_PID: ++ priv->vts = (AR0233_SENSOR_HEIGHT + 100) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; break; ++ }; ++ ++ ret = reg16_write16(client, 0x300A, priv->vts); /* FRAME_LENGTH_LINES_ */ ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return ret; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0233_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -335,7 +385,8 @@ static int ar0233_s_ctrl(struct v4l2_ctrl *ctrl) + break; + case V4L2_CID_EXPOSURE: + /* T1 exposure */ +- ret = reg16_write16(client, 0x3012, ctrl->val); ++ if (ctrl->val < 0x600 * 30 * priv->fps_numerator / priv->fps_denominator) ++ ret = reg16_write16(client, 0x3012, ctrl->val); + break; + case V4L2_CID_HFLIP: + ret = reg16_read16(client, 0x3040, &val); +@@ -374,6 +425,8 @@ static const struct v4l2_ctrl_ops ar0233_ctrl_ops = { + static struct v4l2_subdev_video_ops ar0233_video_ops = { + .s_stream = ar0233_s_stream, + .g_mbus_config = ar0233_g_mbus_config, ++ .g_parm = ar0233_g_parm, ++ .s_parm = ar0233_s_parm, + }; + + static const struct v4l2_subdev_pad_ops ar0233_subdev_pad_ops = { +@@ -654,6 +707,8 @@ static int ar0233_probe(struct i2c_client *client, + + v4l2_i2c_subdev_init(&priv->sd, client, &ar0233_subdev_ops); + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + v4l2_ctrl_handler_init(&priv->hdl, 4); + v4l2_ctrl_new_std(&priv->hdl, &ar0233_ctrl_ops, +@@ -675,7 +730,7 @@ static int ar0233_probe(struct i2c_client *client, + v4l2_ctrl_new_std(&priv->hdl, &ar0233_ctrl_ops, + V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0xa); + v4l2_ctrl_new_std(&priv->hdl, &ar0233_ctrl_ops, +- V4L2_CID_EXPOSURE, 1, 0x600, 1, 0x144); ++ V4L2_CID_EXPOSURE, 1, 0x600 * 30, 1, 0x144); + v4l2_ctrl_new_std(&priv->hdl, &ar0233_ctrl_ops, + V4L2_CID_HFLIP, 0, 1, 1, 1); + v4l2_ctrl_new_std(&priv->hdl, &ar0233_ctrl_ops, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0476-media-i2c-imx390-add-fps-setup.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0476-media-i2c-imx390-add-fps-setup.patch new file mode 100644 index 00000000..792ddbdc --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0476-media-i2c-imx390-add-fps-setup.patch @@ -0,0 +1,158 @@ +From a58b6fe91b46f2e06ad59e80768d5bf548d0b539 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 13 Feb 2020 16:47:36 +0300 +Subject: [PATCH] media: i2c: imx390: add fps setup + +This adds FPS setup support on IMX390 imager + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imx390.c | 69 +++++++++++++++++++++++++++++++++-- + drivers/media/i2c/soc_camera/imx390.h | 9 +++-- + 2 files changed, 72 insertions(+), 6 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imx390.c b/drivers/media/i2c/soc_camera/imx390.c +index 9d970b1..4f3d730 100644 +--- a/drivers/media/i2c/soc_camera/imx390.c ++++ b/drivers/media/i2c/soc_camera/imx390.c +@@ -35,6 +35,8 @@ struct imx390_priv { + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; ++ int fps_denominator; ++ int fps_numerator; + int init_complete; + u8 id[6]; + int exposure; +@@ -46,6 +48,7 @@ struct imx390_priv { + int port; + int gpio_resetb; + int gpio_fsin; ++ int vts; + }; + + static inline struct imx390_priv *to_imx390(const struct i2c_client *client) +@@ -208,6 +211,62 @@ static int imx390_g_mbus_config(struct v4l2_subdev *sd, + return 0; + } + ++static int imx390_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int imx390_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0, timeout; ++ u8 val; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ priv->vts = (IMX390_SENSOR_HEIGHT + 29) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ ++ reg16_write(client, 0x0, 1); ++ for (timeout = 100; timeout > 0; timeout--) { ++ reg16_read(client, 0x5001, &val); ++ if (val == 1) ++ break; ++ mdelay(1); ++ } ++ if (!timeout) ++ dev_err(&client->dev, "timeout enter standby\n"); ++ ++ reg16_write(client, 0x2008, priv->vts & 0xff); ++ reg16_write(client, 0x2009, (priv->vts >> 8) & 0xff); ++ reg16_write(client, 0x200A, priv->vts >> 16); ++ ret = reg16_write(client, 0x0, 0); ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return ret; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int imx390_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -299,9 +358,9 @@ static int imx390_s_ctrl(struct v4l2_ctrl *ctrl) + break; + case V4L2_CID_EXPOSURE: + val = 0xfff - ctrl->val; +- ret = reg16_write(client, 0x0c, val); /* LSB */ +- ret |= reg16_write(client, 0x0d, val >> 8); +-// ret |= reg16_write(client, 0x0e, ctrl->val >> 16); /* MSB */ ++ reg16_write(client, 0x0c, val); /* LSB */ ++ reg16_write(client, 0x0d, val >> 8); ++ ret = reg16_write(client, 0x0e, val >> 16); /* MSB */ + break; + case V4L2_CID_HFLIP: + /* hflip */ +@@ -349,6 +408,8 @@ static const struct v4l2_ctrl_ops imx390_ctrl_ops = { + static struct v4l2_subdev_video_ops imx390_video_ops = { + .s_stream = imx390_s_stream, + .g_mbus_config = imx390_g_mbus_config, ++ .g_parm = imx390_g_parm, ++ .s_parm = imx390_s_parm, + }; + + static const struct v4l2_subdev_pad_ops imx390_subdev_pad_ops = { +@@ -509,6 +570,8 @@ static int imx390_probe(struct i2c_client *client, + + v4l2_i2c_subdev_init(&priv->sd, client, &imx390_subdev_ops); + priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; + + priv->exposure = 0x100; + priv->gain = 0; +diff --git a/drivers/media/i2c/soc_camera/imx390.h b/drivers/media/i2c/soc_camera/imx390.h +index efd75a7..e9d9808 100644 +--- a/drivers/media/i2c/soc_camera/imx390.h ++++ b/drivers/media/i2c/soc_camera/imx390.h +@@ -14,6 +14,9 @@ + #define IMX390_MAX_WIDTH 1920 + #define IMX390_MAX_HEIGHT 1080 + ++#define IMX390_SENSOR_WIDTH 1936 ++#define IMX390_SENSOR_HEIGHT 1096 ++ + #define IMX390_DELAY 0xffff + #define IMX390_DT 0x2c /* MIPI Data Type RAW12 */ + +@@ -244,9 +247,9 @@ static const struct imx390_reg imx390_regs_wizard[] = { + {0x2002, 0x55}, + {0x2003, 0x05}, + {0x2004, 0x02}, +-{0x2008, 0x65}, +-{0x2009, 0x04}, +-{0x200A, 0x00}, ++{0x2008, (IMX390_SENSOR_HEIGHT + 29) & 0xff}, ++{0x2009, ((IMX390_SENSOR_HEIGHT + 29) >> 8) & 0xff}, ++{0x200A, (IMX390_SENSOR_HEIGHT + 29) >> 16}, + {0x200C, 0x30}, + {0x200D, 0x11}, + {0x2010, 0x04}, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0477-media-i2c-ar0231-fix-FSIN-pin-input.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0477-media-i2c-ar0231-fix-FSIN-pin-input.patch new file mode 100644 index 00000000..c6096a94 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0477-media-i2c-ar0231-fix-FSIN-pin-input.patch @@ -0,0 +1,54 @@ +From 466e494ad2496bc1ec16a56425efef8023d5520d Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 14 Feb 2020 18:28:21 +0300 +Subject: [PATCH] media: i2c: ar0231: fix FSIN pin input + +This fixes lost FSIN gpio pin enablement on AR0231. +Also explicitly enable gpi pins on ar0143/140 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ar0140.c | 1 + + drivers/media/i2c/soc_camera/ar0143.c | 1 + + drivers/media/i2c/soc_camera/ar0231.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/ar0140.c b/drivers/media/i2c/soc_camera/ar0140.c +index ceb2c31..bb7a3ce 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.c ++++ b/drivers/media/i2c/soc_camera/ar0140.c +@@ -495,6 +495,7 @@ static int ar0140_initialize(struct i2c_client *client) + ar0140_set_regs(client, ar0140_regs_wizard, ARRAY_SIZE(ar0140_regs_wizard)); + /* Enable stream */ + reg16_read16(client, 0x301a, &val); // read inital reset_register value ++ val |= (1 << 8); /* GPI pins enable */ + val |= (1 << 2); // Set streamOn bit + reg16_write16(client, 0x301a, val); // Start Streaming + +diff --git a/drivers/media/i2c/soc_camera/ar0143.c b/drivers/media/i2c/soc_camera/ar0143.c +index 7d55afb..07cc445 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.c ++++ b/drivers/media/i2c/soc_camera/ar0143.c +@@ -584,6 +584,7 @@ static int ar0143_initialize(struct i2c_client *client) + + /* Enable stream */ + reg16_read16(client, 0x301a, &val); ++ val |= (1 << 8); /* GPI pins enable */ + val |= (1 << 2); + reg16_write16(client, 0x301a, val); + +diff --git a/drivers/media/i2c/soc_camera/ar0231.c b/drivers/media/i2c/soc_camera/ar0231.c +index c51ae9ad..6c450f7 100644 +--- a/drivers/media/i2c/soc_camera/ar0231.c ++++ b/drivers/media/i2c/soc_camera/ar0231.c +@@ -455,6 +455,7 @@ static int ar0231_initialize(struct i2c_client *client) + + /* Enable stream */ + reg16_read16(client, 0x301a, &val); ++ val |= (1 << 8); /* GPI pins enable */ + val |= (1 << 2); + reg16_write16(client, 0x301a, val); + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0478-media-i2c-ti9x4-fix-framesync.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0478-media-i2c-ti9x4-fix-framesync.patch new file mode 100644 index 00000000..3e7b9dd4 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0478-media-i2c-ti9x4-fix-framesync.patch @@ -0,0 +1,40 @@ +From 08a1910dd33fa0b5628d641854db8fb3200272f6 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 19 Feb 2020 01:49:42 +0300 +Subject: [PATCH] media: i2c: ti9x4: fix framesync + +This fixes frames syncronization. +Cameras must start (fsinc start) simultaneously, hence enable +framesync when all cameras are set up + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ti9x4.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +index b671736..9004bb1 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/ti9x4.c +@@ -218,8 +218,7 @@ static void ti9x4_initial_setup(struct i2c_client *client) + reg8_write(client, 0x1a, 2 & 0xff); /* FrameSync high time LSB */ + reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ + reg8_write(client, 0x1c, priv->fs_time & 0xff); /* FrameSync low time LSB */ +- reg8_write(client, 0x18, 0x01); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ +-// reg8_write(client, 0x18, 0x80); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ ++ reg8_write(client, 0x18, 0x00); /* Disable FrameSync - must be enabled after all cameras are set up */ + #endif + } + +@@ -415,6 +414,8 @@ static int ti9x4_registered_async(struct v4l2_subdev *sd) + struct i2c_client *client = priv->client; + + reg8_write(client, 0x33, ((priv->lanes - 1) ^ 0x3) << 4 | 0x1); /* enable CSI output, set CSI lane count, non-continuous CSI mode */ ++ reg8_write(client, 0x18, 0x01); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ ++// reg8_write(client, 0x18, 0x80); /* Enable FrameSync, Frame clock is external */ + + return 0; + } +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0479-media-soc_camera-rcar_csi2-add-interrupts.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0479-media-soc_camera-rcar_csi2-add-interrupts.patch new file mode 100644 index 00000000..960da094 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0479-media-soc_camera-rcar_csi2-add-interrupts.patch @@ -0,0 +1,150 @@ +From 0812102bc301699c607229cb86b2bc8d385aef2f Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 19 Feb 2020 02:26:11 +0300 +Subject: [PATCH] media: soc_camera: rcar_csi2: add interrupts + +This enables interrupts from RCAR CSI2 and grab timestamp +of received frames (EOF) + +Signed-off-by: Vladimir Barinov +--- + drivers/media/platform/soc_camera/rcar_csi2.c | 58 ++++++++++++++++++++++++++- + 1 file changed, 57 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/platform/soc_camera/rcar_csi2.c b/drivers/media/platform/soc_camera/rcar_csi2.c +index ffb28c7..ca47ba3 100644 +--- a/drivers/media/platform/soc_camera/rcar_csi2.c ++++ b/drivers/media/platform/soc_camera/rcar_csi2.c +@@ -200,6 +200,7 @@ struct rcar_csi2_link_config { + unsigned long vcdt; + unsigned long vcdt2; + unsigned int csi_rate; ++ unsigned int use_interrupts; + }; + + #define INIT_RCAR_CSI2_LINK_CONFIG(m) \ +@@ -228,6 +229,8 @@ struct rcar_csi2 { + unsigned int csi_rate; + spinlock_t lock; + atomic_t use_count; ++ unsigned int use_interrupts; ++ u64 timestamp[4]; + }; + + static int dump = 0; +@@ -434,6 +437,7 @@ static irqreturn_t rcar_csi2_irq(int irq, void *data) + struct rcar_csi2 *priv = data; + u32 int_status; + unsigned int handled = 0; ++ u64 ts; + + spin_lock(&priv->lock); + +@@ -441,6 +445,26 @@ static irqreturn_t rcar_csi2_irq(int irq, void *data) + if (!int_status) + goto done; + ++ /* update timestamp on EOF for remote */ ++ ts = ktime_get_ns(); ++ ++ if (int_status & RCAR_CSI2_INTSTATE_VD4_END) { ++ priv->timestamp[3] = ts; ++ //printk("eof vc3\n"); ++ } ++ if (int_status & RCAR_CSI2_INTSTATE_VD3_END) { ++ priv->timestamp[2] = ts; ++ //printk("eof vc2\n"); ++ } ++ if (int_status & RCAR_CSI2_INTSTATE_VD2_END) { ++ priv->timestamp[1] = ts; ++ //printk("eof vc1\n"); ++ } ++ if (int_status & RCAR_CSI2_INTSTATE_VD1_END) { ++ priv->timestamp[0] = ts; ++ //printk("eof vc0\n"); ++ } ++ + /* ack interrupts */ + iowrite32(int_status, priv->base + RCAR_CSI2_INTSTATE); + handled = 1; +@@ -456,6 +480,10 @@ static void rcar_csi2_hwdeinit(struct rcar_csi2 *priv) + { + iowrite32(0, priv->base + RCAR_CSI2_PHYCNT); + ++ /* mask interrupts */ ++ iowrite32(~0U, priv->base + RCAR_CSI2_INTCLOSE); ++ /* ack interrupts */ ++ iowrite32(~0U, priv->base + RCAR_CSI2_INTSTATE); + /* reset CSI2 hardware */ + iowrite32(0x00000001, priv->base + RCAR_CSI2_SRST); + udelay(5); +@@ -550,6 +578,18 @@ static int rcar_csi2_hwinit(struct rcar_csi2 *priv) + dev_dbg(&priv->pdev->dev, "CSI2 VCDT2: 0x%x\n", + ioread32(priv->base + RCAR_CSI2_VCDT2)); + ++ if (priv->use_interrupts) { ++ /* EOF only interrupts */ ++ tmp = RCAR_CSI2_INTSTATE_VD1_END | RCAR_CSI2_INTSTATE_VD2_END | ++ RCAR_CSI2_INTSTATE_VD3_END | RCAR_CSI2_INTSTATE_VD4_END; ++ /* unmask interrupts */ ++ iowrite32(~tmp, priv->base + RCAR_CSI2_INTCLOSE); ++ /* ack all interrupts */ ++ iowrite32(~0U, priv->base + RCAR_CSI2_INTSTATE); ++ /* enable interrupts */ ++ iowrite32(tmp, priv->base + RCAR_CSI2_INTEN); ++ } ++ + /* wait until video decoder power off */ + msleep(10); + { +@@ -608,8 +648,21 @@ static int rcar_csi2_s_power(struct v4l2_subdev *sd, int on) + return ret; + } + ++static long rcar_csi2_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) ++{ ++ struct rcar_csi2 *priv = v4l2_get_subdevdata(sd); ++ ++ if (cmd > 4 || !priv->use_interrupts) ++ return -EINVAL; ++ ++ *(u64 *)arg = priv->timestamp[cmd]; ++ ++ return 0; ++} ++ + static struct v4l2_subdev_core_ops rcar_csi2_subdev_core_ops = { + .s_power = rcar_csi2_s_power, ++ .ioctl = rcar_csi2_ioctl, + }; + + static struct v4l2_subdev_ops rcar_csi2_subdev_ops = { +@@ -660,6 +713,9 @@ static int rcar_csi2_parse_dt(struct device_node *np, + printk(KERN_ERR "csi-rate not set\n"); + return ret; + } ++ config->use_interrupts = 0; ++ if (of_property_read_bool(endpoint, "use-interrupts")) ++ config->use_interrupts = 1; + of_node_put(endpoint); + + config->lanes = bus_cfg.bus.mipi_csi2.num_data_lanes; +@@ -730,7 +786,6 @@ static int rcar_csi2_probe(struct platform_device *pdev) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); +- /* Interrupt unused so far */ + irq = platform_get_irq(pdev, 0); + + if (!res || (int)irq <= 0) { +@@ -754,6 +809,7 @@ static int rcar_csi2_probe(struct platform_device *pdev) + priv->vcdt = link_config.vcdt; + priv->vcdt2 = link_config.vcdt2; + priv->csi_rate = link_config.csi_rate; ++ priv->use_interrupts = link_config.use_interrupts; + atomic_set(&priv->use_count, 0); + + platform_set_drvdata(pdev, priv); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0480-media-i2c-soc_camera-ov10640-fix-emb-lines-number.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0480-media-i2c-soc_camera-ov10640-fix-emb-lines-number.patch new file mode 100644 index 00000000..121bab5a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0480-media-i2c-soc_camera-ov10640-fix-emb-lines-number.patch @@ -0,0 +1,29 @@ +From b000da3023f944bb078c7bc284279b91854b0882 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Fri, 28 Feb 2020 11:51:12 +0300 +Subject: [PATCH] media: i2c: soc_camera: ov10640: fix emb lines number + +The number of emb lines are documnted as 2+2, but really +we see 4+4 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.h b/drivers/media/i2c/soc_camera/ov10640.h +index 04ff326..de89b19 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.h ++++ b/drivers/media/i2c/soc_camera/ov10640.h +@@ -15,7 +15,7 @@ + #define OV10640_DEFAULT_WIDTH 1280 + #define OV10640_DEFAULT_HEIGHT 1080 + +-#define OV10640_EMB_LINES 4 /* 2 emb lines at top and 2 stat lines at bottom */ ++#define OV10640_EMB_LINES 8 /* 2+2 emb lines at top and 2+2 stat lines at bottom */ + #define OV10640_EMB_PADDED (priv->emb_enable ? OV10640_EMB_LINES : 0) /* embedded data (SOF) and stats (EOF) */ + + #define OV10640_DELAY 0xffff +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0481-r8a779-78-sysc-don-t-poweroff-Cortex-R7-core.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0481-r8a779-78-sysc-don-t-poweroff-Cortex-R7-core.patch new file mode 100644 index 00000000..d681e07a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0481-r8a779-78-sysc-don-t-poweroff-Cortex-R7-core.patch @@ -0,0 +1,42 @@ +From 7ffd543f70c5455bc0a801036658c03a41cd3589 Mon Sep 17 00:00:00 2001 +From: Nikita Yushchenko +Date: Mon, 4 Jun 2018 11:12:25 +0300 +Subject: [PATCH] r8a779[78]-sysc: don't poweroff Cortex R7 core + +In V3M/V3H systems, Cortex R7 code normally executes code not anyhow +related to Linux. Linux should not touch R7's power domain. + +Signed-off-by: Nikita Yushchenko +--- + drivers/soc/renesas/r8a77970-sysc.c | 2 +- + drivers/soc/renesas/r8a77980-sysc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/soc/renesas/r8a77970-sysc.c b/drivers/soc/renesas/r8a77970-sysc.c +index 5725ad09e4da..6d08a3c81262 100644 +--- a/drivers/soc/renesas/r8a77970-sysc.c ++++ b/drivers/soc/renesas/r8a77970-sysc.c +@@ -23,6 +23,7 @@ static const struct rcar_sysc_area r8a77970_areas[] __initconst = { + PD_CPU_NOCR }, + { "ca53-cpu1", 0x200, 1, R8A77970_PD_CA53_CPU1, R8A77970_PD_CA53_SCU, + PD_CPU_NOCR }, ++// { "cr7", 0x240, 0, R8A77970_PD_CR7, R8A77970_PD_ALWAYS_ON, PD_CPU }, + { "a3ir", 0x180, 0, R8A77970_PD_A3IR, R8A77970_PD_ALWAYS_ON }, + { "a2ir0", 0x400, 0, R8A77970_PD_A2IR0, R8A77970_PD_A3IR }, + { "a2ir1", 0x400, 1, R8A77970_PD_A2IR1, R8A77970_PD_A3IR }, +diff --git a/drivers/soc/renesas/r8a77980-sysc.c b/drivers/soc/renesas/r8a77980-sysc.c +index 2affaa27a6f8..ba73ce20d6ba 100644 +--- a/drivers/soc/renesas/r8a77980-sysc.c ++++ b/drivers/soc/renesas/r8a77980-sysc.c +@@ -28,7 +28,7 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = { + PD_CPU_NOCR }, + { "ca53-cpu3", 0x200, 3, R8A77980_PD_CA53_CPU3, R8A77980_PD_CA53_SCU, + PD_CPU_NOCR }, +- { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON }, ++ { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON, PD_CPU }, + { "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON }, + { "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR }, + { "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR }, +-- +2.11.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0482-media-i2c-max9286-ti9x4-power-down-POCs-on-reboot.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0482-media-i2c-max9286-ti9x4-power-down-POCs-on-reboot.patch new file mode 100644 index 00000000..ab493586 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0482-media-i2c-max9286-ti9x4-power-down-POCs-on-reboot.patch @@ -0,0 +1,139 @@ +From cc34c21f572727e49f69e10b761bc44d3addf520 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 4 Mar 2020 17:32:44 +0300 +Subject: [PATCH] media: i2c: max9286,ti9x4: power down POCs on reboot + +Power down all POCs on reboot/shutdown/halt + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/max9286.c | 23 +++++++++++++++++++++++ + drivers/media/i2c/soc_camera/ti9x4.c | 22 ++++++++++++++++++++++ + 2 files changed, 45 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index 343b8ab..05247ff 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -71,6 +72,7 @@ struct max9286_priv { + int max9271_addr_map[4]; + int ser_id; + struct gpio_desc *poc_gpio[4]; /* PoC power supply */ ++ struct notifier_block reboot_notifier; + + /* link statistic */ + int prbserr[4]; +@@ -643,6 +645,19 @@ static int max9286_registered_async(struct v4l2_subdev *sd) + return 0; + } + ++static int max9286_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) ++{ ++ struct max9286_priv *priv = container_of(nb, struct max9286_priv, reboot_notifier); ++ int idx; ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) ++ gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ ++ } ++ ++ return NOTIFY_OK; ++} ++ + static struct v4l2_subdev_core_ops max9286_subdev_core_ops = { + #ifdef CONFIG_VIDEO_ADV_DEBUG + .g_register = max9286_g_register, +@@ -996,6 +1011,13 @@ static int max9286_probe(struct i2c_client *client, + goto out; + } + ++ priv->reboot_notifier.notifier_call = max9286_reboot_notifier; ++ err = register_reboot_notifier(&priv->reboot_notifier); ++ if (err) { ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ goto out; ++ } ++ + err = sysfs_create_group(&client->dev.kobj, + &max9286_group); + if (err < 0) +@@ -1010,6 +1032,7 @@ static int max9286_remove(struct i2c_client *client) + int i; + + sysfs_remove_group(&client->dev.kobj, &max9286_group); ++ unregister_reboot_notifier(&priv->reboot_notifier); + + for (i = 0; i < 4; i++) { + v4l2_async_unregister_subdev(&priv->sd[i]); +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +index 9004bb1..627612a 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/ti9x4.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -52,6 +53,7 @@ struct ti9x4_priv { + struct gpio_desc *pwen; /* chip power en */ + struct gpio_desc *poc_gpio[4]; /* PoC power supply */ + struct v4l2_clk *ref_clk; /* ref clock */ ++ struct notifier_block reboot_notifier; + }; + + static int ser_id; +@@ -420,6 +422,19 @@ static int ti9x4_registered_async(struct v4l2_subdev *sd) + return 0; + } + ++static int ti9x4_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) ++{ ++ struct ti9x4_priv *priv = container_of(nb, struct ti9x4_priv, reboot_notifier); ++ int idx; ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) ++ gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ ++ } ++ ++ return NOTIFY_OK; ++} ++ + static struct v4l2_subdev_core_ops ti9x4_subdev_core_ops = { + #ifdef CONFIG_VIDEO_ADV_DEBUG + .g_register = ti9x4_g_register, +@@ -676,6 +691,11 @@ static int ti9x4_probe(struct i2c_client *client, + goto out; + } + ++ priv->reboot_notifier.notifier_call = ti9x4_reboot_notifier; ++ err = register_reboot_notifier(&priv->reboot_notifier); ++ if (err) ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ + out: + return err; + } +@@ -685,6 +705,8 @@ static int ti9x4_remove(struct i2c_client *client) + struct ti9x4_priv *priv = i2c_get_clientdata(client); + int i; + ++ unregister_reboot_notifier(&priv->reboot_notifier); ++ + for (i = 0; i < priv->links; i++) { + v4l2_async_unregister_subdev(&priv->sd[i]); + v4l2_device_unregister_subdev(&priv->sd[i]); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0484-media-platform-soc_camera-disable-mutex-locking-for-.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0484-media-platform-soc_camera-disable-mutex-locking-for-.patch new file mode 100644 index 00000000..f654b012 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0484-media-platform-soc_camera-disable-mutex-locking-for-.patch @@ -0,0 +1,34 @@ +From fdfb65e3d12080ab862a1847f7d2127a9fd3c6b4 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 9 Mar 2020 23:15:28 +0300 +Subject: [PATCH] media: platform: soc_camera: disable mutex locking for + ADV_DEBUG + +This disabled v4l2_ioctl locking for G/S_REGISTER. +Hence the this allows to use G/S_REGISTER and Q/DQBUG under +stress load. + +Signed-off-by: Vladimir Barinov +Signed-off-by: Nikita Yushchenko +--- + drivers/media/platform/soc_camera/soc_camera.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c +index 8084683..654b0df 100644 +--- a/drivers/media/platform/soc_camera/soc_camera.c ++++ b/drivers/media/platform/soc_camera/soc_camera.c +@@ -2153,6 +2153,10 @@ static int soc_camera_video_start(struct soc_camera_device *icd) + v4l2_disable_ioctl(icd->vdev, VIDIOC_S_STD); + v4l2_disable_ioctl(icd->vdev, VIDIOC_ENUMSTD); + } ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ v4l2_disable_ioctl_locking(icd->vdev, VIDIOC_DBG_G_REGISTER); ++ v4l2_disable_ioctl_locking(icd->vdev, VIDIOC_DBG_S_REGISTER); ++#endif + ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1); + if (ret < 0) { + dev_err(icd->pdev, "video_register_device failed: %d\n", ret); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0485-media-i2c-ov10640-compensate-disabled-mutex.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0485-media-i2c-ov10640-compensate-disabled-mutex.patch new file mode 100644 index 00000000..1ddc7f9e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0485-media-i2c-ov10640-compensate-disabled-mutex.patch @@ -0,0 +1,85 @@ +From 955d8c3c39605a389f10c96b2cf43b975476f272 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 10 Mar 2020 11:34:03 +0300 +Subject: [PATCH] media: i2c: ov10640: compensate disabled mutex + +Compensate ADV_DEBUG mutex after disabling in v4l2_ioctl + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ov10640.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/ov10640.c b/drivers/media/i2c/soc_camera/ov10640.c +index f5f0fdd..d52a0a2 100644 +--- a/drivers/media/i2c/soc_camera/ov10640.c ++++ b/drivers/media/i2c/soc_camera/ov10640.c +@@ -37,6 +37,7 @@ struct ov10640_priv { + struct v4l2_ctrl_handler hdl; + struct media_pad pad; + struct v4l2_rect rect; ++ struct mutex lock; + int subsampling; + int fps_numerator; + int fps_denominator; +@@ -328,6 +329,7 @@ static int ov10640_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); + int ret; + __be64 be_val; + +@@ -336,10 +338,14 @@ static int ov10640_g_register(struct v4l2_subdev *sd, + if (reg->size > sizeof(reg->val)) + reg->size = sizeof(reg->val); + ++ mutex_lock(&priv->lock); ++ + ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); + be_val = be_val << ((sizeof(be_val) - reg->size) * 8); + reg->val = be64_to_cpu(be_val); + ++ mutex_unlock(&priv->lock); ++ + return ret; + } + +@@ -347,7 +353,9 @@ static int ov10640_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10640_priv *priv = to_ov10640(client); + u32 size = reg->size; ++ int ret; + __be64 be_val; + + if (!size) +@@ -355,10 +363,15 @@ static int ov10640_s_register(struct v4l2_subdev *sd, + if (size > sizeof(reg->val)) + size = sizeof(reg->val); + ++ mutex_lock(&priv->lock); ++ + be_val = cpu_to_be64(reg->val); + be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); + +- return reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ mutex_unlock(&priv->lock); ++ ++ return ret; + } + #endif + +@@ -711,6 +724,7 @@ static int ov10640_probe(struct i2c_client *client, + priv->rect.height = OV10640_DEFAULT_HEIGHT; + priv->fps_numerator = 1; + priv->fps_denominator = 30; ++ mutex_init(&priv->lock); + + v4l2_ctrl_handler_init(&priv->hdl, 4); + v4l2_ctrl_new_std(&priv->hdl, &ov10640_ctrl_ops, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0487-i2c-busses-i2c-rcar-block-pm_runtime.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0487-i2c-busses-i2c-rcar-block-pm_runtime.patch new file mode 100644 index 00000000..24ec8902 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0487-i2c-busses-i2c-rcar-block-pm_runtime.patch @@ -0,0 +1,80 @@ +From 7fc6b55fbd279e287a350b85f45885d51c4de5c4 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Mar 2020 15:07:48 +0300 +Subject: [PATCH] i2c: busses i2c-rcar: block pm_runtime + +This allows blocking of i2c clock runtime control by existing dts +pataremeter multi-master. +This speeds up i2c transaction during stress use case. + +Signed-off-by: Vladimir Barinov +--- + drivers/i2c/busses/i2c-rcar.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c +index ddd3b39..4a3ea72 100644 +--- a/drivers/i2c/busses/i2c-rcar.c ++++ b/drivers/i2c/busses/i2c-rcar.c +@@ -786,7 +786,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, + if (priv->suspended) + return -EBUSY; + +- pm_runtime_get_sync(dev); ++ if (!(priv->flags & ID_P_PM_BLOCKED)) ++ pm_runtime_get_sync(dev); + + /* Check bus state before init otherwise bus busy info will be lost */ + ret = rcar_i2c_bus_barrier(priv); +@@ -826,7 +827,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, + ret = num - priv->msgs_left; /* The number of transfer */ + } + out: +- pm_runtime_put(dev); ++ if (!(priv->flags & ID_P_PM_BLOCKED)) ++ pm_runtime_put(dev); + + if (ret < 0 && ret != -ENXIO) + dev_err(dev, "error %d : %x\n", ret, priv->flags); +@@ -845,7 +847,8 @@ static int rcar_reg_slave(struct i2c_client *slave) + return -EAFNOSUPPORT; + + /* Keep device active for slave address detection logic */ +- pm_runtime_get_sync(rcar_i2c_priv_to_dev(priv)); ++ if (!(priv->flags & ID_P_PM_BLOCKED)) ++ pm_runtime_get_sync(rcar_i2c_priv_to_dev(priv)); + + priv->slave = slave; + rcar_i2c_write(priv, ICSAR, slave->addr); +@@ -867,7 +870,8 @@ static int rcar_unreg_slave(struct i2c_client *slave) + + priv->slave = NULL; + +- pm_runtime_put(rcar_i2c_priv_to_dev(priv)); ++ if (!(priv->flags & ID_P_PM_BLOCKED)) ++ pm_runtime_put(rcar_i2c_priv_to_dev(priv)); + + return 0; + } +@@ -1026,6 +1030,8 @@ static int rcar_i2c_suspend(struct device *dev) + struct platform_device *pdev = to_platform_device(dev); + struct rcar_i2c_priv *priv = platform_get_drvdata(pdev); + ++ if (priv->flags & ID_P_PM_BLOCKED) ++ pm_runtime_put(dev); + priv->suspended = 1; + + return 0; +@@ -1045,7 +1051,8 @@ static int rcar_i2c_resume(struct device *dev) + dev_err(dev, "Could not calculate clock\n"); + + rcar_i2c_init(priv); +- pm_runtime_put(dev); ++ if (!(priv->flags & ID_P_PM_BLOCKED)) ++ pm_runtime_put(dev); + + priv->suspended = 0; + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0488-arm64-dts-renesas-block-i2c-pm-runtime.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0488-arm64-dts-renesas-block-i2c-pm-runtime.patch new file mode 100644 index 00000000..ef606653 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0488-arm64-dts-renesas-block-i2c-pm-runtime.patch @@ -0,0 +1,68 @@ +From 7d99fda5fcfea599b9611f4af562b5ee327e8745 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Mar 2020 15:12:47 +0300 +Subject: [PATCH] arm64: dts: renesas: block i2c pm runtime + +Block i2c pm runtime on video boxes. +This speed up i2c under stress cases: imagers control over +FPDLINK or GMSL + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/r8a77970-v3msk-vbm.dts | 1 + + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts | 2 +- + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts | 1 + + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77970-v3msk-vbm.dts b/arch/arm64/boot/dts/renesas/r8a77970-v3msk-vbm.dts +index 7ab71c8..4eb160c 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77970-v3msk-vbm.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77970-v3msk-vbm.dts +@@ -75,6 +75,7 @@ + status = "okay"; + + clock-frequency = <400000>; ++ multi-master; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts +index 4ca62c6..7c84657 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-4ch.dts +@@ -143,6 +143,7 @@ + status = "okay"; + + clock-frequency = <400000>; ++ multi-master; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts +index b635132..47f4408 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-8ch.dts +@@ -143,6 +143,7 @@ + status = "okay"; + + clock-frequency = <400000>; ++ multi-master; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts +index f90951d..dc7938b 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl-8ch.dts +@@ -137,6 +137,7 @@ + status = "okay"; + + clock-frequency = <400000>; ++ multi-master; + + i2cswitch1: i2c-switch@74 { + compatible = "nxp,pca9548"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0489-media-i2c-max9286-increase-i2c-freq-inside-GMSL-cahn.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0489-media-i2c-max9286-increase-i2c-freq-inside-GMSL-cahn.patch new file mode 100644 index 00000000..7d10e4ce --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0489-media-i2c-max9286-increase-i2c-freq-inside-GMSL-cahn.patch @@ -0,0 +1,36 @@ +From 07aec3b12f833316963d45681f2dcbf688973621 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Mar 2020 14:34:14 +0300 +Subject: [PATCH] media: i2c: max9286: increase i2c freq inside GMSL cahnnel + +This slightly (10%) increases the i2c transaction speed over GMSL. + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/max9286.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +index 05247ff..28bd3c3 100644 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ b/drivers/media/i2c/soc_camera/max9286.c +@@ -31,7 +31,7 @@ + #define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ + #define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ + #define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ +-#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_837KHZ + + struct max9286_priv { + struct v4l2_subdev sd[4]; +@@ -270,6 +270,7 @@ static void max9286_postinit(struct i2c_client *client, int addr) + reg8_write(client, 0x0b, priv->csi2_outord); /* CSI2 output order */ + reg8_write(client, 0x15, 0x9b); /* enable CSI output, VC is set accordingly to Link number, BIT7 magic must be set */ + reg8_write(client, 0x1b, priv->switchin | priv->links_mask); /* coax polarity, enable equalizer for CAMs */ ++ reg8_write(client, 0x34, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ + usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ + + if (strcmp(priv->fsync_mode, "manual") == 0) { +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0490-media-i2c-ti9x4-increase-i2c-freq-on-master-bus.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0490-media-i2c-ti9x4-increase-i2c-freq-on-master-bus.patch new file mode 100644 index 00000000..adf70f4b --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0490-media-i2c-ti9x4-increase-i2c-freq-on-master-bus.patch @@ -0,0 +1,48 @@ +From 16082df9fc35be0488ddd3b4280187a9a361b511 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Mar 2020 14:29:31 +0300 +Subject: [PATCH] media: i2c: ti9x4: increase i2c freq on master bus + +This increase the serializer (remote) i2c frequency on master bus. +This speed up imager access since deafult timings are 100Khz + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ti9x4.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +index 627612a..ca86f1fc 100644 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/ti9x4.c +@@ -147,9 +147,6 @@ static void ti9x4_initial_setup(struct i2c_client *client) + + /* Initial setup */ + client->addr = priv->des_addr; /* TI9x4 I2C */ +- reg8_write(client, 0x08, 0x1c); /* I2C glitch filter depth */ +- reg8_write(client, 0x0a, 0x79); /* I2C high pulse width */ +- reg8_write(client, 0x0b, 0x79); /* I2C low pulse width */ + reg8_write(client, 0x0d, 0xb9); /* VDDIO 3.3V */ + switch (priv->csi_rate) { + case 1600: /* REFCLK = 25MHZ */ +@@ -340,6 +337,8 @@ static int ti9x4_initialize(struct i2c_client *client) + switch (priv->ser_id) { + case TI913_ID: + reg8_write(client, 0x0d, 0x55); /* Enable remote GPIO0/1 */ ++ reg8_write(client, 0x11, 0x10); /* I2C high pulse width */ ++ reg8_write(client, 0x12, 0x10); /* I2C low pulse width */ + break; + case TI953_ID: + reg8_write(client, 0x0d, (priv->gpio[0] & 0x1) << 0 | +@@ -354,6 +353,8 @@ static int ti9x4_initialize(struct i2c_client *client) + (!!priv->gpio[1] << 5) | + (!!priv->gpio[2] << 6) | + (!!priv->gpio[3] << 7)); /* Enable serializer GPIOs only for output */ ++ reg8_write(client, 0x0b, 0x10); /* I2C high pulse width */ ++ reg8_write(client, 0x0c, 0x10); /* I2C low pulse width */ + break; + } + client->addr = priv->des_addr; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0491-media-i2c-soc_camera-switch-to-u64-adv_debug-access.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0491-media-i2c-soc_camera-switch-to-u64-adv_debug-access.patch new file mode 100644 index 00000000..05274af5 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0491-media-i2c-soc_camera-switch-to-u64-adv_debug-access.patch @@ -0,0 +1,690 @@ +From 479f56c0ec0ce981e9333e7c1628c4850f3c8043 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 25 Mar 2020 17:27:04 +0300 +Subject: [PATCH] media: i2c: soc_camera: switch to u64 adv_debug access + +This allows up to 8 bytes block writes/reads using ADV_DEBUG +interface. + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ap0101_ar014x.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0132.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0140.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0143.c | 35 +++++++++++++++++++--------- + drivers/media/i2c/soc_camera/ar0147.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0231.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0233.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ar0323.c | 34 +++++++++++++++++++-------- + drivers/media/i2c/soc_camera/ov10635.c | 30 +++++++++++++++++------- + drivers/media/i2c/soc_camera/ov2311.c | 30 +++++++++++++++++------- + drivers/media/i2c/soc_camera/ox01d10.c | 30 +++++++++++++++++------- + drivers/media/i2c/soc_camera/ox03a.c | 30 +++++++++++++++++------- + 12 files changed, 280 insertions(+), 113 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +index c458044..8a2d2a6 100644 +--- a/drivers/media/i2c/soc_camera/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +@@ -273,28 +273,42 @@ static int ap0101_g_mbus_config(struct v4l2_subdev *sd, + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ap0101_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ap0101_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0132.c b/drivers/media/i2c/soc_camera/ar0132.c +index 30e9517..9f55364 100644 +--- a/drivers/media/i2c/soc_camera/ar0132.c ++++ b/drivers/media/i2c/soc_camera/ar0132.c +@@ -232,28 +232,42 @@ static int ar0132_g_mbus_config(struct v4l2_subdev *sd, + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0132_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0132_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0140.c b/drivers/media/i2c/soc_camera/ar0140.c +index bb7a3ce..4d3893bf 100644 +--- a/drivers/media/i2c/soc_camera/ar0140.c ++++ b/drivers/media/i2c/soc_camera/ar0140.c +@@ -265,28 +265,42 @@ static int ar0140_g_mbus_config(struct v4l2_subdev *sd, + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0140_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0140_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0143.c b/drivers/media/i2c/soc_camera/ar0143.c +index 083b7ec..e60e2ec 100644 +--- a/drivers/media/i2c/soc_camera/ar0143.c ++++ b/drivers/media/i2c/soc_camera/ar0143.c +@@ -356,31 +356,44 @@ static int ar0143_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) + return ret; + } + +- + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0143_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0143_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0147.c b/drivers/media/i2c/soc_camera/ar0147.c +index a444700..d7e3f83 100644 +--- a/drivers/media/i2c/soc_camera/ar0147.c ++++ b/drivers/media/i2c/soc_camera/ar0147.c +@@ -372,28 +372,42 @@ static int ar0147_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0147_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0147_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0231.c b/drivers/media/i2c/soc_camera/ar0231.c +index 6c450f7..922c078 100644 +--- a/drivers/media/i2c/soc_camera/ar0231.c ++++ b/drivers/media/i2c/soc_camera/ar0231.c +@@ -253,28 +253,42 @@ static int ar0231_g_mbus_config(struct v4l2_subdev *sd, + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0231_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0231_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0233.c b/drivers/media/i2c/soc_camera/ar0233.c +index fbff49b..2bf260b 100644 +--- a/drivers/media/i2c/soc_camera/ar0233.c ++++ b/drivers/media/i2c/soc_camera/ar0233.c +@@ -323,28 +323,42 @@ static int ar0233_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0233_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0233_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ar0323.c b/drivers/media/i2c/soc_camera/ar0323.c +index 2104d6a..1f20fef 100644 +--- a/drivers/media/i2c/soc_camera/ar0323.c ++++ b/drivers/media/i2c/soc_camera/ar0323.c +@@ -207,28 +207,42 @@ static int ar0323_g_mbus_config(struct v4l2_subdev *sd, + + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int ar0323_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) ++ struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u16 val = 0; ++ __be64 be_val; + +- ret = reg16_read16(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ar0323_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) ++ const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ov10635.c b/drivers/media/i2c/soc_camera/ov10635.c +index 14bb339..e9e0cdf 100644 +--- a/drivers/media/i2c/soc_camera/ov10635.c ++++ b/drivers/media/i2c/soc_camera/ov10635.c +@@ -357,24 +357,38 @@ static int ov10635_g_register(struct v4l2_subdev *sd, + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u8 val = 0; ++ __be64 be_val; + +- ret = reg16_read(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ov10635_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ov2311.c b/drivers/media/i2c/soc_camera/ov2311.c +index c61059d..f8099c7 100644 +--- a/drivers/media/i2c/soc_camera/ov2311.c ++++ b/drivers/media/i2c/soc_camera/ov2311.c +@@ -268,24 +268,38 @@ static int ov2311_g_register(struct v4l2_subdev *sd, + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u8 val = 0; ++ __be64 be_val; + +- ret = reg16_read(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u16); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ov2311_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ox01d10.c b/drivers/media/i2c/soc_camera/ox01d10.c +index 082e88c..cac267a 100644 +--- a/drivers/media/i2c/soc_camera/ox01d10.c ++++ b/drivers/media/i2c/soc_camera/ox01d10.c +@@ -215,24 +215,38 @@ static int ox01d10_g_register(struct v4l2_subdev *sd, + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u8 val = 0; ++ __be64 be_val; + +- ret = reg16_read(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u8); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ox01d10_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +diff --git a/drivers/media/i2c/soc_camera/ox03a.c b/drivers/media/i2c/soc_camera/ox03a.c +index 162c75b..3b4ae27 100644 +--- a/drivers/media/i2c/soc_camera/ox03a.c ++++ b/drivers/media/i2c/soc_camera/ox03a.c +@@ -214,24 +214,38 @@ static int ox03a_g_register(struct v4l2_subdev *sd, + { + struct i2c_client *client = v4l2_get_subdevdata(sd); + int ret; +- u8 val = 0; ++ __be64 be_val; + +- ret = reg16_read(client, (u16)reg->reg, &val); +- if (ret < 0) +- return ret; ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); + +- reg->val = val; +- reg->size = sizeof(u8); ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); + +- return 0; ++ return ret; + } + + static int ox03a_s_register(struct v4l2_subdev *sd, + const struct v4l2_dbg_register *reg) + { + struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); + +- return reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; + } + #endif + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0492-media-i2c-move-gmsl-fpdlink-drivers-to-separate-fold.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0492-media-i2c-move-gmsl-fpdlink-drivers-to-separate-fold.patch new file mode 100644 index 00000000..a4851c0d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0492-media-i2c-move-gmsl-fpdlink-drivers-to-separate-fold.patch @@ -0,0 +1,6794 @@ +From 40f71bc01fcacef975e9fd507ec212a08aeeade9 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 10:47:53 +0300 +Subject: [PATCH] media: i2c: move gmsl/fpdlink drivers to separate + folder + +Move GMSL/FPDLINK driver to separate folder + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/Kconfig | 28 +- + drivers/media/i2c/soc_camera/Makefile | 7 +- + drivers/media/i2c/soc_camera/dummy.c | 491 ----------- + drivers/media/i2c/soc_camera/fpdlink/Kconfig | 5 + + drivers/media/i2c/soc_camera/fpdlink/Makefile | 2 + + drivers/media/i2c/soc_camera/fpdlink/ti9x4.c | 745 +++++++++++++++++ + drivers/media/i2c/soc_camera/fpdlink/ti9x4.h | 204 +++++ + drivers/media/i2c/soc_camera/gmsl/Kconfig | 11 + + drivers/media/i2c/soc_camera/gmsl/Makefile | 3 + + drivers/media/i2c/soc_camera/gmsl/max9286.c | 1072 +++++++++++++++++++++++++ + drivers/media/i2c/soc_camera/gmsl/max9288.c | 768 ++++++++++++++++++ + drivers/media/i2c/soc_camera/imagers/Kconfig | 5 + + drivers/media/i2c/soc_camera/imagers/Makefile | 2 + + drivers/media/i2c/soc_camera/imagers/dummy.c | 491 +++++++++++ + drivers/media/i2c/soc_camera/max9286.c | 1072 ------------------------- + drivers/media/i2c/soc_camera/max9288.c | 768 ------------------ + drivers/media/i2c/soc_camera/ti9x4.c | 745 ----------------- + drivers/media/i2c/soc_camera/ti9x4.h | 204 ----- + 18 files changed, 3315 insertions(+), 3308 deletions(-) + delete mode 100644 drivers/media/i2c/soc_camera/dummy.c + create mode 100644 drivers/media/i2c/soc_camera/fpdlink/Kconfig + create mode 100644 drivers/media/i2c/soc_camera/fpdlink/Makefile + create mode 100644 drivers/media/i2c/soc_camera/fpdlink/ti9x4.c + create mode 100644 drivers/media/i2c/soc_camera/fpdlink/ti9x4.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/Kconfig + create mode 100644 drivers/media/i2c/soc_camera/gmsl/Makefile + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9286.c + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9288.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/Kconfig + create mode 100644 drivers/media/i2c/soc_camera/imagers/Makefile + create mode 100644 drivers/media/i2c/soc_camera/imagers/dummy.c + delete mode 100644 drivers/media/i2c/soc_camera/max9286.c + delete mode 100644 drivers/media/i2c/soc_camera/max9288.c + delete mode 100644 drivers/media/i2c/soc_camera/ti9x4.c + delete mode 100644 drivers/media/i2c/soc_camera/ti9x4.h + +diff --git a/drivers/media/i2c/soc_camera/Kconfig b/drivers/media/i2c/soc_camera/Kconfig +index 729b5af..6792522 100644 +--- a/drivers/media/i2c/soc_camera/Kconfig ++++ b/drivers/media/i2c/soc_camera/Kconfig +@@ -83,30 +83,6 @@ config SOC_CAMERA_TW9910 + help + This is a tw9910 video driver + +-config SOC_CAMERA_MAX9286 +- tristate "max9286 GMSL support" +- depends on SOC_CAMERA && I2C +- help +- This is a MAXIM max9286 GMSL driver +- +-config SOC_CAMERA_MAX9288 +- tristate "max9288 GMSL support" +- depends on SOC_CAMERA && I2C +- help +- This is a MAXIM max9288 GMSL driver +- +-config SOC_CAMERA_TI9X4 +- tristate "ti9x4 FPDLink3 support" +- depends on SOC_CAMERA && I2C +- help +- This is an Texas Instruments ti9X4 FPDLink3 driver +- +-config SOC_CAMERA_OV106XX +- tristate "ov106xx camera support" +- depends on SOC_CAMERA && I2C +- help +- This is a runtime detected GMSL/FPDLink3 sensors driver +- + config SOC_CAMERA_IMX219 + tristate "imx219 camera support" + depends on SOC_CAMERA && I2C +@@ -118,3 +94,7 @@ config SOC_CAMERA_AR0147 + depends on SOC_CAMERA && I2C + help + This is an AR0147 imager glue ++ ++source "drivers/media/i2c/soc_camera/gmsl/Kconfig" ++source "drivers/media/i2c/soc_camera/fpdlink/Kconfig" ++source "drivers/media/i2c/soc_camera/imagers/Kconfig" +diff --git a/drivers/media/i2c/soc_camera/Makefile b/drivers/media/i2c/soc_camera/Makefile +index d916bba..5e08254 100644 +--- a/drivers/media/i2c/soc_camera/Makefile ++++ b/drivers/media/i2c/soc_camera/Makefile +@@ -11,11 +11,10 @@ obj-$(CONFIG_SOC_CAMERA_OV9640) += ov9640.o + obj-$(CONFIG_SOC_CAMERA_OV9740) += ov9740.o + obj-$(CONFIG_SOC_CAMERA_RJ54N1) += rj54n1cb0c.o + obj-$(CONFIG_SOC_CAMERA_TW9910) += tw9910.o +-obj-$(CONFIG_SOC_CAMERA_MAX9286) += max9286.o +-obj-$(CONFIG_SOC_CAMERA_MAX9288) += max9288.o +-obj-$(CONFIG_SOC_CAMERA_TI9X4) += ti9x4.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov106xx.o + obj-$(CONFIG_SOC_CAMERA_IMX219) += imx219.o +-obj-y += dummy.o + + obj-$(CONFIG_SOC_CAMERA_AR0147) += ar0147.o ++obj-y += imagers/ ++obj-y += gmsl/ ++obj-y += fpdlink/ +diff --git a/drivers/media/i2c/soc_camera/dummy.c b/drivers/media/i2c/soc_camera/dummy.c +deleted file mode 100644 +index d213fff..0000000 +--- a/drivers/media/i2c/soc_camera/dummy.c ++++ /dev/null +@@ -1,491 +0,0 @@ +-/* +- * Dummy sensor camera driver +- * +- * Copyright (C) 2019 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-struct dummy_priv { +- struct v4l2_subdev sd; +- struct v4l2_ctrl_handler hdl; +- struct media_pad pad; +- struct v4l2_rect rect; +- u8 id[6]; +- int max_width; +- int max_height; +- const char * media_bus_format; +- int mbus_format; +-}; +- +-static int width = 1920; +-module_param(width, int, 0644); +-MODULE_PARM_DESC(width, " width (default: 1920)"); +- +-static int height = 1080; +-module_param(height, int, 0644); +-MODULE_PARM_DESC(height, " height (default: 1080)"); +- +-static char *mbus = "yuyv"; +-module_param(mbus, charp, 0644); +-MODULE_PARM_DESC(mbus, " MEDIA_BUS_FORMAT (default: YUYV)"); +- +-static inline struct dummy_priv *to_dummy(const struct i2c_client *client) +-{ +- return container_of(i2c_get_clientdata(client), struct dummy_priv, sd); +-} +- +-static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) +-{ +- return &container_of(ctrl->handler, struct dummy_priv, hdl)->sd; +-} +- +-static int dummy_s_stream(struct v4l2_subdev *sd, int enable) +-{ +- return 0; +-} +- +-static int dummy_get_fmt(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_format *format) +-{ +- struct v4l2_mbus_framefmt *mf = &format->format; +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- if (format->pad) +- return -EINVAL; +- +- mf->width = priv->rect.width; +- mf->height = priv->rect.height; +- mf->code = priv->mbus_format; +- mf->colorspace = V4L2_COLORSPACE_SMPTE170M; +- mf->field = V4L2_FIELD_NONE; +- +- return 0; +-} +- +-static int dummy_set_fmt(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_format *format) +-{ +- struct v4l2_mbus_framefmt *mf = &format->format; +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- mf->code = priv->mbus_format; +- mf->colorspace = V4L2_COLORSPACE_SMPTE170M; +- mf->field = V4L2_FIELD_NONE; +- +- if (format->which == V4L2_SUBDEV_FORMAT_TRY) +- cfg->try_fmt = *mf; +- +- return 0; +-} +- +-static int dummy_enum_mbus_code(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_mbus_code_enum *code) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- if (code->pad || code->index > 0) +- return -EINVAL; +- +- code->code = priv->mbus_format; +- +- return 0; +-} +- +-static int dummy_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- memcpy(edid->edid, priv->id, 6); +- +- edid->edid[6] = 0xff; +- edid->edid[7] = client->addr; +- edid->edid[8] = 'D' >> 8; +- edid->edid[9] = 'Y' & 0xff; +- +- return 0; +-} +- +-static int dummy_set_selection(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_selection *sel) +-{ +- struct v4l2_rect *rect = &sel->r; +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || +- sel->target != V4L2_SEL_TGT_CROP) +- return -EINVAL; +- +- rect->left = ALIGN(rect->left, 2); +- rect->top = ALIGN(rect->top, 2); +- rect->width = ALIGN(rect->width, 2); +- rect->height = ALIGN(rect->height, 2); +- +- if ((rect->left + rect->width > priv->max_width) || +- (rect->top + rect->height > priv->max_height)) +- *rect = priv->rect; +- +- priv->rect.left = rect->left; +- priv->rect.top = rect->top; +- priv->rect.width = rect->width; +- priv->rect.height = rect->height; +- +- return 0; +-} +- +-static int dummy_get_selection(struct v4l2_subdev *sd, +- struct v4l2_subdev_pad_config *cfg, +- struct v4l2_subdev_selection *sel) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) +- return -EINVAL; +- +- switch (sel->target) { +- case V4L2_SEL_TGT_CROP_BOUNDS: +- sel->r.left = 0; +- sel->r.top = 0; +- sel->r.width = priv->max_width; +- sel->r.height = priv->max_height; +- return 0; +- case V4L2_SEL_TGT_CROP_DEFAULT: +- sel->r.left = 0; +- sel->r.top = 0; +- sel->r.width = priv->max_width; +- sel->r.height = priv->max_height; +- return 0; +- case V4L2_SEL_TGT_CROP: +- sel->r = priv->rect; +- return 0; +- default: +- return -EINVAL; +- } +-} +- +-static int dummy_g_mbus_config(struct v4l2_subdev *sd, +- struct v4l2_mbus_config *cfg) +-{ +- cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | +- V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; +- cfg->type = V4L2_MBUS_CSI2; +- +- return 0; +-} +- +-#ifdef CONFIG_VIDEO_ADV_DEBUG +-static int dummy_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) +-{ +- reg->val = 0; +- reg->size = sizeof(u16); +- +- return 0; +-} +- +-static int dummy_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) +-{ +- return 0; +-} +-#endif +- +-static struct v4l2_subdev_core_ops dummy_core_ops = { +-#ifdef CONFIG_VIDEO_ADV_DEBUG +- .g_register = dummy_g_register, +- .s_register = dummy_s_register, +-#endif +-}; +- +-static int dummy_s_ctrl(struct v4l2_ctrl *ctrl) +-{ +- switch (ctrl->id) { +- case V4L2_CID_BRIGHTNESS: +- case V4L2_CID_CONTRAST: +- case V4L2_CID_SATURATION: +- case V4L2_CID_HUE: +- case V4L2_CID_GAMMA: +- case V4L2_CID_SHARPNESS: +- case V4L2_CID_AUTOGAIN: +- case V4L2_CID_GAIN: +- case V4L2_CID_ANALOGUE_GAIN: +- case V4L2_CID_EXPOSURE: +- case V4L2_CID_HFLIP: +- case V4L2_CID_VFLIP: +- case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: +- break; +- } +- +- return 0; +-} +- +-static const struct v4l2_ctrl_ops dummy_ctrl_ops = { +- .s_ctrl = dummy_s_ctrl, +-}; +- +-static struct v4l2_subdev_video_ops dummy_video_ops = { +- .s_stream = dummy_s_stream, +- .g_mbus_config = dummy_g_mbus_config, +-}; +- +-static const struct v4l2_subdev_pad_ops dummy_subdev_pad_ops = { +- .get_edid = dummy_get_edid, +- .enum_mbus_code = dummy_enum_mbus_code, +- .get_selection = dummy_get_selection, +- .set_selection = dummy_set_selection, +- .get_fmt = dummy_get_fmt, +- .set_fmt = dummy_set_fmt, +-}; +- +-static struct v4l2_subdev_ops dummy_subdev_ops = { +- .core = &dummy_core_ops, +- .video = &dummy_video_ops, +- .pad = &dummy_subdev_pad_ops, +-}; +- +-static void dummy_otp_id_read(struct i2c_client *client) +-{ +- struct dummy_priv *priv = to_dummy(client); +- +- /* dummy camera id */ +- priv->id[0] = 'd'; +- priv->id[1] = 'u'; +- priv->id[2] = 'm'; +- priv->id[3] = 'm'; +- priv->id[4] = 'y'; +- priv->id[5] = '.'; +-} +- +-static ssize_t dummy_otp_id_show(struct device *dev, +- struct device_attribute *attr, char *buf) +-{ +- struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); +- struct i2c_client *client = v4l2_get_subdevdata(sd); +- struct dummy_priv *priv = to_dummy(client); +- +- dummy_otp_id_read(client); +- +- return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", +- priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +-} +- +-static DEVICE_ATTR(otp_id_dummy, S_IRUGO, dummy_otp_id_show, NULL); +- +-static int dummy_initialize(struct i2c_client *client) +-{ +- struct dummy_priv *priv = to_dummy(client); +- +- if (strcmp(priv->media_bus_format, "yuyv") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_YUYV8_2X8; +- else if (strcmp(priv->media_bus_format, "uyvy") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_UYVY8_2X8; +- else if (strcmp(priv->media_bus_format, "grey") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_Y8_1X8; +- else if (strcmp(priv->media_bus_format, "rggb8") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SRGGB8_1X8; +- else if (strcmp(priv->media_bus_format, "bggr8") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SBGGR8_1X8; +- else if (strcmp(priv->media_bus_format, "grbg8") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SGRBG8_1X8; +- else if (strcmp(priv->media_bus_format, "rggb12") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SRGGB12_1X12; +- else if (strcmp(priv->media_bus_format, "bggr12") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SBGGR12_1X12; +- else if (strcmp(priv->media_bus_format, "grbg12") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SGRBG12_1X12; +- else if (strcmp(priv->media_bus_format, "rggb14") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SRGGB14_1X14; +- else if (strcmp(priv->media_bus_format, "bggr14") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SBGGR14_1X14; +- else if (strcmp(priv->media_bus_format, "grbg14") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SGRBG14_1X14; +- else if (strcmp(priv->media_bus_format, "rggb16") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SRGGB16_1X16; +- else if (strcmp(priv->media_bus_format, "bggr16") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SBGGR16_1X16; +- else if (strcmp(priv->media_bus_format, "grbg16") == 0) +- priv->mbus_format = MEDIA_BUS_FMT_SGRBG16_1X16; +- else { +- v4l_err(client, "failed to parse mbus format (%s)\n", priv->media_bus_format); +- return -EINVAL; +- } +- +- /* Read OTP IDs */ +- dummy_otp_id_read(client); +- +- dev_info(&client->dev, "Dummy camera sensor, res %dx%d, mbus %s, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", +- priv->max_width, priv->max_height, priv->media_bus_format, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); +- +- return 0; +-} +- +-static int dummy_parse_dt(struct device_node *np, struct dummy_priv *priv) +-{ +- if (of_property_read_u32(np, "dummy,width", &priv->max_width)) +- priv->max_width = width; +- +- if (of_property_read_u32(np, "dummy,height", &priv->max_height)) +- priv->max_height = height; +- +- if (of_property_read_string(np, "dummy,mbus", &priv->media_bus_format)) +- priv->media_bus_format = mbus; +- +- /* module params override dts */ +- if (strcmp(mbus, "yuyv")) +- priv->media_bus_format = mbus; +- if (width != 1920) +- priv->max_width = width; +- if (height != 1080) +- priv->max_height = height; +- +- return 0; +-} +- +-static int dummy_probe(struct i2c_client *client, +- const struct i2c_device_id *did) +-{ +- struct dummy_priv *priv; +- int ret; +- +- priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- v4l2_i2c_subdev_init(&priv->sd, client, &dummy_subdev_ops); +- priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; +- +- v4l2_ctrl_handler_init(&priv->hdl, 4); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_CONTRAST, 0, 16, 1, 7); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_SATURATION, 0, 7, 1, 2); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_HUE, 0, 23, 1, 12); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_GAMMA, -128, 128, 1, 0); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_SHARPNESS, 0, 10, 1, 3); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_AUTOGAIN, 0, 1, 1, 0); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_GAIN, 1, 0x7ff, 1, 0x200); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0xa); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_EXPOSURE, 1, 0x600, 1, 0x144); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_HFLIP, 0, 1, 1, 0); +- v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, +- V4L2_CID_VFLIP, 0, 1, 1, 0); +- priv->sd.ctrl_handler = &priv->hdl; +- +- ret = priv->hdl.error; +- if (ret) +- goto cleanup; +- +- v4l2_ctrl_handler_setup(&priv->hdl); +- +- priv->pad.flags = MEDIA_PAD_FL_SOURCE; +- priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; +- ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); +- if (ret < 0) +- goto cleanup; +- +- ret = dummy_parse_dt(client->dev.of_node, priv); +- if (ret) +- goto cleanup; +- +- ret = dummy_initialize(client); +- if (ret < 0) +- goto cleanup; +- +- priv->rect.left = 0; +- priv->rect.top = 0; +- priv->rect.width = priv->max_width; +- priv->rect.height = priv->max_height; +- +- ret = v4l2_async_register_subdev(&priv->sd); +- if (ret) +- goto cleanup; +- +- if (device_create_file(&client->dev, &dev_attr_otp_id_dummy) != 0) { +- dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); +- goto cleanup; +- } +- +- return 0; +- +-cleanup: +- media_entity_cleanup(&priv->sd.entity); +- v4l2_ctrl_handler_free(&priv->hdl); +- v4l2_device_unregister_subdev(&priv->sd); +- v4l_err(client, "failed to probe @ 0x%02x (%s)\n", +- client->addr, client->adapter->name); +- return ret; +-} +- +-static int dummy_remove(struct i2c_client *client) +-{ +- struct dummy_priv *priv = i2c_get_clientdata(client); +- +- device_remove_file(&client->dev, &dev_attr_otp_id_dummy); +- v4l2_async_unregister_subdev(&priv->sd); +- media_entity_cleanup(&priv->sd.entity); +- v4l2_ctrl_handler_free(&priv->hdl); +- v4l2_device_unregister_subdev(&priv->sd); +- +- return 0; +-} +- +-static const struct i2c_device_id dummy_id[] = { +- { "dummy-camera", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, dummy_id); +- +-static const struct of_device_id dummy_of_ids[] = { +- { .compatible = "dummy-camera", }, +- { } +-}; +-MODULE_DEVICE_TABLE(of, dummy_of_ids); +- +-static struct i2c_driver dummy_i2c_driver = { +- .driver = { +- .name = "dummy-camera", +- .of_match_table = dummy_of_ids, +- }, +- .probe = dummy_probe, +- .remove = dummy_remove, +- .id_table = dummy_id, +-}; +-module_i2c_driver(dummy_i2c_driver); +- +-MODULE_DESCRIPTION("Dummy SoC camera driver"); +-MODULE_AUTHOR("Vladimir Barinov"); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/fpdlink/Kconfig b/drivers/media/i2c/soc_camera/fpdlink/Kconfig +new file mode 100644 +index 0000000..9550563 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/fpdlink/Kconfig +@@ -0,0 +1,5 @@ ++config SOC_CAMERA_TI9X4 ++ tristate "ti9x4 FPDLink3 support" ++ depends on I2C ++ help ++ This is an Texas Instruments ti9X4 FPDLink3 driver +diff --git a/drivers/media/i2c/soc_camera/fpdlink/Makefile b/drivers/media/i2c/soc_camera/fpdlink/Makefile +new file mode 100644 +index 0000000..29f4a59 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/fpdlink/Makefile +@@ -0,0 +1,2 @@ ++# SPDX-License-Identifier: GPL-2.0 ++obj-$(CONFIG_SOC_CAMERA_TI9X4) += ti9x4.o +diff --git a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +new file mode 100644 +index 0000000..340e61e +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +@@ -0,0 +1,745 @@ ++ /* ++ * TI DS90UB954/960/964 FPDLinkIII driver ++ * ++ * Copyright (C) 2017-2018 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "ti9x4.h" ++ ++struct ti9x4_priv { ++ struct v4l2_subdev sd[4]; ++ struct fwnode_handle *sd_fwnode[4]; ++ int des_addr; ++ int links; ++ int lanes; ++ int csi_rate; ++ const char *forwarding_mode; ++ int fs_time; ++ int fps_numerator; ++ int fps_denominator; ++ int is_coax; ++ int dvp_bus; ++ int dvp_lsb; ++ int hsync; ++ int vsync; ++ int poc_delay; ++ atomic_t use_count; ++ struct i2c_client *client; ++ int ti9x3_addr_map[4]; ++ char chip_id[6]; ++ int ser_id; ++ int vc_map; ++ int csi_map; ++ int gpio[4]; ++ struct gpio_desc *pwen; /* chip power en */ ++ struct gpio_desc *poc_gpio[4]; /* PoC power supply */ ++ struct v4l2_clk *ref_clk; /* ref clock */ ++ struct notifier_block reboot_notifier; ++}; ++ ++static int ser_id; ++module_param(ser_id, int, 0644); ++MODULE_PARM_DESC(ser_id, " Serializer ID (default: TI913)"); ++ ++static int is_stp; ++module_param(is_stp, int, 0644); ++MODULE_PARM_DESC(is_stp, " STP cable (default: Coax cable)"); ++ ++static int dvp_bus = 8; ++module_param(dvp_bus, int, 0644); ++MODULE_PARM_DESC(dvp_bus, " DVP/CSI over FPDLink (default: DVP 8-bit)"); ++ ++static int dvp_lsb = 0; ++module_param(dvp_lsb, int, 0644); ++MODULE_PARM_DESC(dvp_lsb, " DVP 8-bit LSB/MSB selection (default: DVP 8-bit MSB)"); ++ ++static int hsync; ++module_param(hsync, int, 0644); ++MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); ++ ++static int vsync = 1; ++module_param(vsync, int, 0644); ++MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); ++ ++static int poc_delay; ++module_param(poc_delay, int, 0644); ++MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 0 ms)"); ++ ++static int vc_map = 0x3210; ++module_param(vc_map, int, 0644); ++MODULE_PARM_DESC(vc_map, " CSI VC MAP (default: 0xe4 - linear map VCx=LINKx)"); ++ ++static int csi_map = 0; ++module_param(csi_map, int, 0644); ++MODULE_PARM_DESC(csi_map, " CSI TX MAP (default: 0 - forwarding of all links to CSI0)"); ++ ++static int gpio0 = 0, gpio1 = 0, gpio2 = 0, gpio3 = 0; ++module_param(gpio0, int, 0644); ++MODULE_PARM_DESC(gpio0, " GPIO0 function select (default: GPIO0 low level)"); ++module_param(gpio1, int, 0644); ++MODULE_PARM_DESC(gpio1, " GPIO1 function select (default: GPIO1 low level)"); ++module_param(gpio2, int, 0644); ++MODULE_PARM_DESC(gpio2, " GPIO2 function select (default: GPIO2 low level)"); ++module_param(gpio3, int, 0644); ++MODULE_PARM_DESC(gpio3, " GPIO3 function select (default: GPIO3 low level)"); ++ ++#ifdef TI954_SILICON_ERRATA ++static int indirect_write(struct i2c_client *client, unsigned int page, u8 reg, u8 val) ++{ ++ if (page > 7) ++ return -EINVAL; ++ ++ reg8_write(client, 0xb0, page << 2); ++ reg8_write(client, 0xb1, reg); ++ reg8_write(client, 0xb2, val); ++ ++ return 0; ++} ++ ++static int indirect_read(struct i2c_client *client, unsigned int page, u8 reg, u8 *val) ++{ ++ if (page > 7) ++ return -EINVAL; ++ ++ reg8_write(client, 0xb0, page << 2); ++ reg8_write(client, 0xb1, reg); ++ reg8_read(client, 0xb2, val); ++ ++ return 0; ++} ++#endif ++ ++static void ti9x4_read_chipid(struct i2c_client *client) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ ++ /* Chip ID */ ++ reg8_read(client, 0xf1, &priv->chip_id[0]); ++ reg8_read(client, 0xf2, &priv->chip_id[1]); ++ reg8_read(client, 0xf3, &priv->chip_id[2]); ++ reg8_read(client, 0xf4, &priv->chip_id[3]); ++ reg8_read(client, 0xf5, &priv->chip_id[4]); ++ priv->chip_id[5] = '\0'; ++} ++ ++static void ti9x4_initial_setup(struct i2c_client *client) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ ++ /* Initial setup */ ++ client->addr = priv->des_addr; /* TI9x4 I2C */ ++ reg8_write(client, 0x0d, 0xb9); /* VDDIO 3.3V */ ++ switch (priv->csi_rate) { ++ case 1600: /* REFCLK = 25MHZ */ ++ case 1500: /* REFCLK = 23MHZ */ ++ case 1450: /* REFCLK = 22.5MHZ */ ++ reg8_write(client, 0x1f, 0x00); /* CSI rate 1.5/1.6Gbps */ ++ break; ++ case 1200: /* REFCLK = 25MHZ */ ++ case 1100: /* REFCLK = 22.5MHZ */ ++ reg8_write(client, 0x1f, 0x01); /* CSI rate 1.1/1.2Gbps */ ++ break; ++ case 800: /* REFCLK = 25MHZ */ ++ case 700: /* REFCLK = 22.5MHZ */ ++ reg8_write(client, 0x1f, 0x02); /* CSI rate 700/800Mbps */ ++ break; ++ case 400: /* REFCLK = 25MHZ */ ++ case 350: /* REFCLK = 22.5MHZ */ ++ reg8_write(client, 0x1f, 0x03); /* CSI rate 350/400Mbps */ ++ break; ++ default: ++ dev_err(&client->dev, "unsupported CSI rate %d\n", priv->csi_rate); ++ } ++ ++ switch (priv->csi_rate) { ++ case 1600: ++ case 1200: ++ case 800: ++ case 400: ++ /* FrameSync setup for REFCLK=25MHz, FPS=30: period_counts=1/FPS/12mks=1/30/12e-6=2777 -> HI=2, LO=2775 */ ++ priv->fs_time = 2790; ++ break; ++ case 1500: ++ /* FrameSync setup for REFCLK=23MHz, FPS=30: period_counts=1/FPS/13.043mks=1/30/13.043e-6=2556 -> HI=2, LO=2554 */ ++ priv->fs_time = 2570; ++ break; ++ case 1450: ++ case 1100: ++ case 700: ++ case 350: ++ /* FrameSync setup for REFCLK=22.5MHz, FPS=30: period_counts=1/FPS/13.333mks=1/30/13.333e-6=2500 -> HI=2, LO=2498 */ ++ priv->fs_time = 2513; ++ break; ++ default: ++ priv->fs_time = 0; ++ dev_err(&client->dev, "unsupported CSI rate %d\n", priv->csi_rate); ++ } ++ ++ if (strcmp(priv->forwarding_mode, "round-robin") == 0) { ++ reg8_write(client, 0x21, 0x03); /* Round Robin forwarding enable for CSI0/CSI1 */ ++ } else if (strcmp(priv->forwarding_mode, "synchronized") == 0) { ++ reg8_write(client, 0x21, 0x54); /* Basic Syncronized forwarding enable (FrameSync must be enabled!!) for CSI0/CSI1 */ ++ } ++ ++ reg8_write(client, 0x32, 0x03); /* Select TX for CSI0/CSI1, RX for CSI0 */ ++ reg8_write(client, 0x33, ((priv->lanes - 1) ^ 0x3) << 4); /* disable CSI output, set CSI lane count, non-continuous CSI mode */ ++ reg8_write(client, 0x20, 0xf0 | priv->csi_map); /* disable port forwarding */ ++#if 0 ++ /* FrameSync setup for REFCLK=25MHz, FPS=30: period_counts=1/2/FPS*25MHz =1/2/30*25Mhz =416666 -> FS_TIME=416666 */ ++ /* FrameSync setup for REFCLK=22.5MHz, FPS=30: period_counts=1/2/FPS*22.5Mhz=1/2/30*22.5Mhz=375000 -> FS_TIME=375000 */ ++// #define FS_TIME (priv->csi_rate == 1450 ? 376000 : 417666) ++ #define FS_TIME (priv->csi_rate == 1450 ? 385000 : 428000) // FPS=29.2 (new vendor's firmware AWB restriction?) ++ reg8_write(client, 0x1a, FS_TIME >> 16); /* FrameSync time 24bit */ ++ reg8_write(client, 0x1b, (FS_TIME >> 8) & 0xff); ++ reg8_write(client, 0x1c, FS_TIME & 0xff); ++ reg8_write(client, 0x18, 0x43); /* Enable FrameSync, 50/50 mode, Frame clock from 25MHz */ ++#else ++ reg8_write(client, 0x19, 2 >> 8); /* FrameSync high time MSB */ ++ reg8_write(client, 0x1a, 2 & 0xff); /* FrameSync high time LSB */ ++ reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ ++ reg8_write(client, 0x1c, priv->fs_time & 0xff); /* FrameSync low time LSB */ ++ reg8_write(client, 0x18, 0x00); /* Disable FrameSync - must be enabled after all cameras are set up */ ++#endif ++} ++ ++static void ti9x4_fpdlink3_setup(struct i2c_client *client, int idx) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ u8 port_config = 0x78; ++ u8 port_config2 = 0; ++ ++ /* FPDLinkIII setup */ ++ client->addr = priv->des_addr; /* TI9x4 I2C */ ++ reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ ++ switch (priv->ser_id) { ++ case TI913_ID: ++ reg8_write(client, 0x58, 0x58); /* Back channel: Freq=2.5Mbps */ ++ break; ++ case TI953_ID: ++ reg8_write(client, 0x58, 0x5e); /* Back channel: Freq=50Mbps */ ++ break; ++ default: ++ break; ++ } ++ ++ reg8_write(client, 0x5c, priv->ti9x3_addr_map[idx] << 1); /* TI9X3 I2C addr */ ++// reg8_write(client, 0x5d, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ ++// reg8_write(client, 0x65, (0x60 + idx) << 1); /* SENSOR I2C translated - must be set by sensor driver */ ++ ++ if (priv->is_coax) ++ port_config |= 0x04; /* Coax */ ++ else ++ port_config |= 0x00; /* STP */ ++ ++ switch (priv->dvp_bus) { ++ case 8: ++ port_config2 |= (priv->dvp_lsb ? 0xC0 : 0x80); /* RAW10 as 8-bit prosessing using LSB/MSB bits */ ++ /* fall through */ ++ case 10: ++ port_config |= 0x03; /* DVP over FPDLink (TI913 compatible) RAW10/RAW8 */ ++ break; ++ case 12: ++ port_config |= 0x02; /* DVP over FPDLink (TI913 compatible) RAW12 */ ++ break; ++ default: ++ port_config |= 0x00; /* CSI over FPDLink (TI953 compatible) */ ++ } ++ ++ if (priv->vsync) ++ port_config2 |= 0x01; /* VSYNC acive low */ ++ if (priv->hsync) ++ port_config2 |= 0x02; /* HSYNC acive low */ ++ ++ reg8_write(client, 0x6d, port_config); ++ reg8_write(client, 0x7c, port_config2); ++ reg8_write(client, 0x70, ((priv->vc_map >> (idx * 4)) << 6) | 0x1e); /* CSI data type: yuv422 8-bit, assign VC */ ++ reg8_write(client, 0x71, ((priv->vc_map >> (idx * 4)) << 6) | 0x2c); /* CSI data type: RAW12, assign VC */ ++ reg8_write(client, 0xbc, 0x00); /* Setup minimal time between FV and LV to 3 PCLKs */ ++ reg8_write(client, 0x72, priv->vc_map >> (idx * 4)); /* CSI VC MAP */ ++} ++ ++static int ti9x4_initialize(struct i2c_client *client) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ int idx, timeout; ++ u8 port_sts1[4] = {0, 0, 0, 0}, port_sts2[4] = {0, 0, 0, 0}; ++ ++ dev_info(&client->dev, "LINKs=%d, LANES=%d, FORWARDING=%s, CABLE=%s, ID=%s\n", ++ priv->links, priv->lanes, priv->forwarding_mode, priv->is_coax ? "coax" : "stp", priv->chip_id); ++ ++ ti9x4_initial_setup(client); ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) { ++ gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ ++ mdelay(priv->poc_delay); ++ } ++ ++ ti9x4_fpdlink3_setup(client, idx); ++ } ++ ++ client->addr = priv->des_addr; ++ ++ /* check lock status */ ++ for (timeout = 500 / priv->links; timeout > 0; timeout--) { ++ for (idx = 0; idx < priv->links; idx++) { ++ if ((port_sts1[idx] & 0x1) && (port_sts2[idx] & 0x4)) ++ continue; ++ ++ reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ ++ usleep_range(1000, 1500); /* wait 1ms */ ++ reg8_read(client, 0x4d, &port_sts1[idx]); /* Lock status */ ++ reg8_read(client, 0x4e, &port_sts2[idx]); /* Freq stable */ ++ } ++ } ++ ++ if (!timeout) ++ dev_info(&client->dev, "Receiver lock status [%d,%d,%d,%d]\n", ++ (port_sts1[0] & 0x1) && (port_sts2[0] & 0x4), ++ (port_sts1[1] & 0x1) && (port_sts2[1] & 0x4), ++ (port_sts1[2] & 0x1) && (port_sts2[2] & 0x4), ++ (port_sts1[3] & 0x1) && (port_sts2[3] & 0x4)); ++ ++ if (priv->poc_delay) ++ mdelay(100); ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ ++ usleep_range(1000, 1500); /* wait 1ms */ ++ ++ /* ++ * Enable only FSIN for remote gpio, all permanent states (0 or 1) setup on serializer side: ++ * this avoids intermittent remote gpio noise (f.e. reset or spuriouse fsin) caused by ++ * unstable/bad link, hence unstable backchannel ++ */ ++ client->addr = priv->ti9x3_addr_map[idx]; /* TI9X3 I2C addr */ ++ switch (priv->ser_id) { ++ case TI913_ID: ++ reg8_write(client, 0x0d, 0x55); /* Enable remote GPIO0/1 */ ++ reg8_write(client, 0x11, 0x10); /* I2C high pulse width */ ++ reg8_write(client, 0x12, 0x10); /* I2C low pulse width */ ++ break; ++ case TI953_ID: ++ reg8_write(client, 0x0d, (priv->gpio[0] & 0x1) << 0 | ++ (priv->gpio[1] & 0x1) << 1 | ++ (priv->gpio[2] & 0x1) << 2 | ++ (priv->gpio[3] & 0x1) << 3 | ++ (priv->gpio[0] & 0x2) << 3 | ++ (priv->gpio[1] & 0x2) << 4 | ++ (priv->gpio[2] & 0x2) << 5 | ++ (priv->gpio[3] & 0x2) << 6); /* Enable FSIN remote GPIOs and set local constant gpios */ ++ reg8_write(client, 0x0e, (!!priv->gpio[0] << 4) | ++ (!!priv->gpio[1] << 5) | ++ (!!priv->gpio[2] << 6) | ++ (!!priv->gpio[3] << 7)); /* Enable serializer GPIOs only for output */ ++ reg8_write(client, 0x0b, 0x10); /* I2C high pulse width */ ++ reg8_write(client, 0x0c, 0x10); /* I2C low pulse width */ ++ break; ++ } ++ client->addr = priv->des_addr; ++ ++ reg8_write(client, 0x6e, 0x88 | (priv->gpio[1] << 4) | priv->gpio[0]); /* Remote GPIO1/GPIO0 setup */ ++ reg8_write(client, 0x6f, 0x88 | (priv->gpio[3] << 4) | priv->gpio[2]); /* Remote GPIO3/GPIO2 setup */ ++ } ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ti9x4_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ int ret; ++ u8 val = 0; ++ ++ ret = reg8_read(client, (u8)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u8); ++ ++ return 0; ++} ++ ++static int ti9x4_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ return reg8_write(client, (u8)reg->reg, (u8)reg->val); ++} ++#endif ++ ++static int ti9x4_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ if (on) { ++ if (atomic_inc_return(&priv->use_count) == 1) ++ reg8_write(client, 0x20, 0x00 | priv->csi_map); /* enable port forwarding to CSI */ ++ } else { ++ if (atomic_dec_return(&priv->use_count) == 0) ++ reg8_write(client, 0x20, 0xf0 | priv->csi_map); /* disable port forwarding to CSI */ ++ } ++ ++ return 0; ++} ++ ++static int ti9x4_registered_async(struct v4l2_subdev *sd) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ reg8_write(client, 0x33, ((priv->lanes - 1) ^ 0x3) << 4 | 0x1); /* enable CSI output, set CSI lane count, non-continuous CSI mode */ ++ reg8_write(client, 0x18, 0x01); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ ++// reg8_write(client, 0x18, 0x80); /* Enable FrameSync, Frame clock is external */ ++ ++ return 0; ++} ++ ++static int ti9x4_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) ++{ ++ struct ti9x4_priv *priv = container_of(nb, struct ti9x4_priv, reboot_notifier); ++ int idx; ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) ++ gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ ++ } ++ ++ return NOTIFY_OK; ++} ++ ++static struct v4l2_subdev_core_ops ti9x4_subdev_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ti9x4_g_register, ++ .s_register = ti9x4_s_register, ++#endif ++ .s_power = ti9x4_s_power, ++ .registered_async = ti9x4_registered_async, ++}; ++ ++static int ti9x4_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ return 0; ++} ++ ++static int ti9x4_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ int f_time; ++ ++ f_time = priv->fs_time * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ reg8_write(client, 0x1b, f_time >> 8); /* FrameSync low time MSB */ ++ reg8_write(client, 0x1c, f_time & 0xff); /* FrameSync low time LSB */ ++ ++ priv->fps_denominator = cp->timeperframe.denominator; ++ priv->fps_numerator = cp->timeperframe.numerator; ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_subdev_video_ops ti9x4_video_ops = { ++ .g_parm = ti9x4_g_parm, ++ .s_parm = ti9x4_s_parm, ++}; ++ ++static struct v4l2_subdev_ops ti9x4_subdev_ops = { ++ .core = &ti9x4_subdev_core_ops, ++ .video = &ti9x4_video_ops, ++}; ++ ++static int ti9x4_parse_dt(struct i2c_client *client) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ struct property *prop; ++ int i; ++ int sensor_delay; ++ char forwarding_mode_default[20] = "round-robin"; /* round-robin, synchronized */ ++ struct property *csi_rate_prop, *dvp_order_prop; ++ u8 val = 0; ++ char name[10]; ++ ++ if (of_property_read_u32(np, "ti,links", &priv->links)) ++ priv->links = 4; ++ ++ if (of_property_read_u32(np, "ti,lanes", &priv->lanes)) ++ priv->lanes = 4; ++ ++ priv->ref_clk = v4l2_clk_get(&client->dev, "ref_clk"); ++ if (!IS_ERR(priv->ref_clk)) { ++ dev_info(&client->dev, "ref_clk = %luKHz", v4l2_clk_get_rate(priv->ref_clk) / 1000); ++ v4l2_clk_enable(priv->ref_clk); ++ } ++ ++ priv->pwen = devm_gpiod_get(&client->dev, NULL, GPIOF_OUT_INIT_HIGH); ++ if (!IS_ERR(priv->pwen)) { ++ mdelay(5); ++ gpiod_direction_output(priv->pwen, 0); ++ mdelay(5); ++ } ++ ++ for (i = 0; i < 4; i++) { ++ sprintf(name, "POC%d", i); ++ priv->poc_gpio[i] = devm_gpiod_get_optional(&client->dev, kstrdup(name, GFP_KERNEL), 0); ++ } ++ ++ reg8_read(client, 0x00, &val); /* read TI9x4 I2C address */ ++ if (val != (priv->des_addr << 1)) { ++ prop = of_find_property(np, "reg", NULL); ++ if (prop) ++ of_remove_property(np, prop); ++ return -ENODEV; ++ } ++ ++ ti9x4_read_chipid(client); ++ ++#ifdef TI954_SILICON_ERRATA ++ indirect_write(client, 7, 0x15, 0x30); ++ if (pwen > 0) ++ gpio_set_value(pwen, 1); ++ usleep_range(5000, 5500); /* wait 5ms */ ++ indirect_write(client, 7, 0x15, 0); ++#endif ++ if (!of_property_read_u32(np, "ti,sensor_delay", &sensor_delay)) ++ mdelay(sensor_delay); ++ if (of_property_read_string(np, "ti,forwarding-mode", &priv->forwarding_mode)) ++ priv->forwarding_mode = forwarding_mode_default; ++ if (of_property_read_bool(np, "ti,stp")) ++ priv->is_coax = 0; ++ else ++ priv->is_coax = 1; ++ if (of_property_read_u32(np, "ti,dvp_bus", &priv->dvp_bus)) ++ priv->dvp_bus = 8; ++ if (of_property_read_bool(np, "ti,dvp_lsb")) ++ priv->dvp_lsb = 1; ++ else ++ priv->dvp_lsb = 0; ++ if (of_property_read_u32(np, "ti,hsync", &priv->hsync)) ++ priv->hsync = 0; ++ if (of_property_read_u32(np, "ti,vsync", &priv->vsync)) ++ priv->vsync = 1; ++ if (of_property_read_u32(np, "ti,ser_id", &priv->ser_id)) ++ priv->ser_id = TI913_ID; ++ if (of_property_read_u32(np, "ti,poc-delay", &priv->poc_delay)) ++ priv->poc_delay = 10; ++ if (of_property_read_u32(np, "ti,vc-map", &priv->vc_map)) ++ priv->vc_map = 0x3210; ++ for (i = 0; i < 4; i++) { ++ sprintf(name, "ti,gpio%d", i); ++ if (of_property_read_u32(np, name, &priv->gpio[i])) ++ priv->gpio[i] = 0; ++ } ++ ++ /* ++ * CSI forwarding of all links is to CSI0 by default. ++ * Decide if any link will be forwarded to CSI1 instead CSI0 ++ */ ++ prop = of_find_property(np, "ti,csi1-links", NULL); ++ if (prop) { ++ const __be32 *link = NULL; ++ u32 v; ++ ++ for (i = 0; i < 4; i++) { ++ link = of_prop_next_u32(prop, link, &v); ++ if (!link) ++ break; ++ priv->csi_map |= BIT(v); ++ } ++ } else { ++ priv->csi_map = 0; ++ } ++ ++ /* module params override dts */ ++ if (is_stp) ++ priv->is_coax = 0; ++ if (dvp_bus != 8) ++ priv->dvp_bus = dvp_bus; ++ if (dvp_lsb) ++ priv->dvp_lsb = dvp_lsb; ++ if (hsync) ++ priv->hsync = hsync; ++ if (!vsync) ++ priv->vsync = vsync; ++ if (ser_id) ++ priv->ser_id = ser_id; ++ if (poc_delay) ++ priv->poc_delay = poc_delay; ++ if (vc_map != 0x3210) ++ priv->vc_map = vc_map; ++ if (csi_map) ++ priv->csi_map = csi_map; ++ if (gpio0) ++ priv->gpio[0] = gpio0; ++ if (gpio1) ++ priv->gpio[1] = gpio1; ++ if (gpio2) ++ priv->gpio[2] = gpio2; ++ if (gpio3) ++ priv->gpio[3] = gpio3; ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ if (i < priv->links) { ++ if (of_property_read_u32(endpoint, "ti9x3-addr", &priv->ti9x3_addr_map[i])) { ++ of_node_put(endpoint); ++ dev_err(&client->dev, "ti9x3-addr not set\n"); ++ return -EINVAL; ++ } ++ priv->sd_fwnode[i] = of_fwnode_handle(endpoint); ++ } ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); ++ if (csi_rate_prop) { ++ of_property_read_u32(endpoint, "csi-rate", &priv->csi_rate); ++ of_update_property(rendpoint, csi_rate_prop); ++ } ++ ++ dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); ++ if (dvp_order_prop) ++ of_update_property(rendpoint, dvp_order_prop); ++ } ++ ++ of_node_put(endpoint); ++ return 0; ++} ++ ++static int ti9x4_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ti9x4_priv *priv; ++ int err, i; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ i2c_set_clientdata(client, priv); ++ priv->des_addr = client->addr; ++ priv->client = client; ++ atomic_set(&priv->use_count, 0); ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; ++ ++ err = ti9x4_parse_dt(client); ++ if (err) ++ goto out; ++ ++ err = ti9x4_initialize(client); ++ if (err < 0) ++ goto out; ++ ++ for (i = 0; i < priv->links; i++) { ++ v4l2_subdev_init(&priv->sd[i], &ti9x4_subdev_ops); ++ priv->sd[i].owner = client->dev.driver->owner; ++ priv->sd[i].dev = &client->dev; ++ priv->sd[i].grp_id = i; ++ v4l2_set_subdevdata(&priv->sd[i], priv); ++ priv->sd[i].fwnode = priv->sd_fwnode[i]; ++ ++ snprintf(priv->sd[i].name, V4L2_SUBDEV_NAME_SIZE, "%s %d-%04x", ++ client->dev.driver->name, i2c_adapter_id(client->adapter), ++ client->addr); ++ ++ err = v4l2_async_register_subdev(&priv->sd[i]); ++ if (err < 0) ++ goto out; ++ } ++ ++ priv->reboot_notifier.notifier_call = ti9x4_reboot_notifier; ++ err = register_reboot_notifier(&priv->reboot_notifier); ++ if (err) ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ ++out: ++ return err; ++} ++ ++static int ti9x4_remove(struct i2c_client *client) ++{ ++ struct ti9x4_priv *priv = i2c_get_clientdata(client); ++ int i; ++ ++ unregister_reboot_notifier(&priv->reboot_notifier); ++ ++ for (i = 0; i < priv->links; i++) { ++ v4l2_async_unregister_subdev(&priv->sd[i]); ++ v4l2_device_unregister_subdev(&priv->sd[i]); ++ } ++ ++ return 0; ++} ++ ++static const struct of_device_id ti9x4_dt_ids[] = { ++ { .compatible = "ti,ti9x4" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, ti9x4_dt_ids); ++ ++static const struct i2c_device_id ti9x4_id[] = { ++ { "ti9x4", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ti9x4_id); ++ ++static struct i2c_driver ti9x4_i2c_driver = { ++ .driver = { ++ .name = "ti9x4", ++ .of_match_table = of_match_ptr(ti9x4_dt_ids), ++ }, ++ .probe = ti9x4_probe, ++ .remove = ti9x4_remove, ++ .id_table = ti9x4_id, ++}; ++ ++module_i2c_driver(ti9x4_i2c_driver); ++ ++MODULE_DESCRIPTION("FPDLinkIII driver for DS90UB9x4"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h +new file mode 100644 +index 0000000..6825f8a +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h +@@ -0,0 +1,204 @@ ++/* ++ * TI FPDLinkIII driver include file ++ * ++ * Copyright (C) 2017 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#ifndef _TI9X4_H ++#define _TI9X4_H ++ ++//#define DEBUG ++#ifdef DEBUG ++#undef dev_dbg ++#define dev_dbg dev_info ++#endif ++ ++#define MAXIM_NUM_RETRIES 1 /* number of read/write retries */ ++#define TI913_ID 0x58 ++#define TI953_ID 0x30 /* or starapped to 0x32 */ ++#define TI9X4_ID 0x00 /* strapped */ ++#define BROADCAST 0x6f ++ ++static inline int reg8_read(struct i2c_client *client, u8 reg, u8 *val) ++{ ++ int ret, retries; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_read_byte_data(client, reg); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = ret; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg8_write(struct i2c_client *client, u8 reg, u8 val) ++{ ++ int ret, retries; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_write_byte_data(client, reg, val); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read(struct i2c_client *client, u16 reg, u8 *val) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, buf, 1); ++ if (ret == 1) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = buf[0]; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write(struct i2c_client *client, u16 reg, u8 val) ++{ ++ int ret, retries; ++ u8 buf[3] = {reg >> 8, reg & 0xff, val}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 3); ++ if (ret == 3) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read_n(struct i2c_client *client, u16 reg, u8 *val, int n) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, val, n); ++ if (ret == n) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x registers 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write_n(struct i2c_client *client, u16 reg, const u8* val, int n) ++{ ++ int ret, retries; ++ u8 buf[2 + n]; ++ ++ buf[0] = reg >> 8; ++ buf[1] = reg & 0xff; ++ memcpy(&buf[2], val, n); ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2 + n); ++ if (ret == 2 + n) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read16(struct i2c_client *client, u16 reg, u16 *val) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, buf, 2); ++ if (ret == 2) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_err(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = ((u16)buf[0] << 8) | buf[1]; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write16(struct i2c_client *client, u16 reg, u16 val) ++{ ++ int ret, retries; ++ u8 buf[4] = {reg >> 8, reg & 0xff, val >> 8, val & 0xff}; ++ ++ for (retries = MAXIM_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 4); ++ if (ret == 4) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_err(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++#endif /* _TI9X4_H */ ++ +diff --git a/drivers/media/i2c/soc_camera/gmsl/Kconfig b/drivers/media/i2c/soc_camera/gmsl/Kconfig +new file mode 100644 +index 0000000..c7a33bf +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/Kconfig +@@ -0,0 +1,11 @@ ++config SOC_CAMERA_MAX9286 ++ tristate "max9286 GMSL support" ++ depends on I2C ++ help ++ This is a MAXIM max9286 GMSL driver ++ ++config SOC_CAMERA_MAX9288 ++ tristate "max9288 GMSL support" ++ depends on I2C ++ help ++ This is a MAXIM max9288 GMSL driver +diff --git a/drivers/media/i2c/soc_camera/gmsl/Makefile b/drivers/media/i2c/soc_camera/gmsl/Makefile +new file mode 100644 +index 0000000..9925314 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/Makefile +@@ -0,0 +1,3 @@ ++# SPDX-License-Identifier: GPL-2.0 ++obj-$(CONFIG_SOC_CAMERA_MAX9286) += max9286.o ++obj-$(CONFIG_SOC_CAMERA_MAX9288) += max9288.o +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9286.c b/drivers/media/i2c/soc_camera/gmsl/max9286.c +new file mode 100644 +index 0000000..2d56b41 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9286.c +@@ -0,0 +1,1072 @@ ++/* ++ * MAXIM max9286 GMSL driver ++ * ++ * Copyright (C) 2015-2018 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../max9286.h" ++ ++#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ ++#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ ++#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ ++#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ ++#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ ++#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ ++#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ ++#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++ ++struct max9286_priv { ++ struct v4l2_subdev sd[4]; ++ struct fwnode_handle *sd_fwnode[4]; ++ int des_addr; ++ int des_quirk_addr; /* second MAX9286 on the same I2C bus */ ++ int links; ++ int links_mask; ++ int lanes; ++ int csi_rate; ++ const char *fsync_mode; ++ int fsync_period; ++ int fps_numerator; ++ int fps_denominator; ++ int pclk; ++ char pclk_rising_edge; ++ int gpio_resetb; ++ int active_low_resetb; ++ int him; ++ int hsync; ++ int vsync; ++ int timeout; ++ int poc_delay; ++ int bws; ++ int dbl; ++ int dt; ++ int hsgen; ++ u64 crossbar; ++ char cb[16]; ++ int hts; ++ int vts; ++ int hts_delay; ++ int imager_width; ++ atomic_t use_count; ++ u32 csi2_outord; ++ u32 switchin; ++ struct i2c_client *client; ++ int max9271_addr_map[4]; ++ int ser_id; ++ struct gpio_desc *poc_gpio[4]; /* PoC power supply */ ++ struct notifier_block reboot_notifier; ++ ++ /* link statistic */ ++ int prbserr[4]; ++ int deterr[4]; ++ int correrr[4]; ++}; ++ ++static char fsync_mode_default[20] = "manual"; /* manual, automatic, semi-automatic, external */ ++ ++static int conf_link; ++module_param(conf_link, int, 0644); ++MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); ++ ++static int poc_trig; ++module_param(poc_trig, int, 0644); ++MODULE_PARM_DESC(poc_trig, " Use PoC triggering during reverse channel setup. Useful on systems with dedicated PoC and unstable ser-des lock"); ++ ++static int him; ++module_param(him, int, 0644); ++MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); ++ ++static int fsync_period; ++module_param(fsync_period, int, 0644); ++MODULE_PARM_DESC(fsync_period, " Frame sync period (default: 3.2MHz)"); ++ ++static int hsync; ++module_param(hsync, int, 0644); ++MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); ++ ++static int vsync = 1; ++module_param(vsync, int, 0644); ++MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); ++ ++static int gpio_resetb; ++module_param(gpio_resetb, int, 0644); ++MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); ++ ++static int active_low_resetb; ++module_param(active_low_resetb, int, 0644); ++MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); ++ ++static int timeout_n = 100; ++module_param(timeout_n, int, 0644); ++MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); ++ ++static int poc_delay = 50; ++module_param(poc_delay, int, 0644); ++MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); ++ ++static int bws; ++module_param(bws, int, 0644); ++MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); ++ ++static int dbl = 1; ++module_param(dbl, int, 0644); ++MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); ++ ++static int dt = 3; ++module_param(dt, int, 0644); ++MODULE_PARM_DESC(dt, " DataType (default: 3 - YUV8), 0 - RGB888, 5 - RAW8, 6 - RAW10, 7 - RAW12, 8 - RAW14"); ++ ++static int hsgen; ++module_param(hsgen, int, 0644); ++MODULE_PARM_DESC(hsgen, " Enable HS embedded generator (default: 0 - disabled)"); ++ ++static int pclk = 100; ++module_param(pclk, int, 0644); ++MODULE_PARM_DESC(pclk, " PCLK rate (default: 100MHz)"); ++ ++static int switchin = 0; ++module_param(switchin, int, 0644); ++MODULE_PARM_DESC(switchin, " COAX SWITCH IN+ and IN- (default: 0 - not switched)"); ++ ++static unsigned long crossbar = 0xba9876543210; ++module_param(crossbar, ulong, 0644); ++MODULE_PARM_DESC(crossbar, " Crossbar setup (default: ba9876543210 - reversed)"); ++ ++enum { ++ RGB888_DT = 0, ++ RGB565_DT, ++ RGB666_DT, ++ YUV8_DT, /* default */ ++ YUV10_DT, ++ RAW8_DT, ++ RAW10_DT, ++ RAW12_DT, ++ RAW14_DT, ++}; ++ ++static int dt2bpp [9] = { ++ 24, /* RGB888 */ ++ 16, /* RGB565 */ ++ 18, /* RGB666 */ ++ 8, /* YUV8 - default */ ++ 10, /* YUV10 */ ++ 8, /* RAW8/RAW16 */ ++ 10, /* RAW10 */ ++ 12, /* RAW12 */ ++ 14, /* RAW14 */ ++}; ++ ++static char* ser_name(int id) ++{ ++ switch (id) { ++ case MAX9271_ID: ++ return "MAX9271"; ++ case MAX96705_ID: ++ return "MAX96705"; ++ case MAX96707_ID: ++ return "MAX96707"; ++ default: ++ return "unknown"; ++ } ++} ++ ++static void max9286_write_remote_verify(struct i2c_client *client, int idx, u8 reg, u8 val) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ int timeout; ++ ++ for (timeout = 0; timeout < 10; timeout++) { ++ int tmp_addr; ++ u8 sts = 0; ++ u8 val2 = 0; ++ ++ reg8_write(client, reg, val); ++ ++ tmp_addr = client->addr; ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_read(client, 0x70, &sts); ++ client->addr = tmp_addr; ++ if (sts & BIT(idx)) /* if ACKed */ { ++ reg8_read(client, reg, &val2); ++ if (val2 == val) ++ break; ++ } ++ ++ usleep_range(1000, 1500); ++ } ++ ++ if (timeout >= 10) ++ dev_err(&client->dev, "timeout remote write acked\n"); ++} ++ ++static void max9286_preinit(struct i2c_client *client, int addr) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ ++ client->addr = addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x0a, 0x00); /* disable reverse control for all cams */ ++ reg8_write(client, 0x00, 0x00); /* disable all GMSL links [0:3] */ ++// usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x1b, priv->switchin); /* coax polarity (default - normal) */ ++ reg8_write(client, 0x1c, (priv->him ? 0xf0 : 0x00) | ++ (priv->bws ? 0x05 : 0x04)); /* high-immunity/legacy mode, BWS 24bit */ ++} ++ ++static void max9286_sensor_reset(struct i2c_client *client, int addr, int reset_on) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ ++ if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) ++ return; ++ ++ if (priv->active_low_resetb) ++ reset_on = !reset_on; ++ ++ /* sensor reset/unreset using serializer gpio */ ++ client->addr = addr; ++ reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | (reset_on ? BIT(priv->gpio_resetb) : 0)); /* set GPIOn value */ ++ reg8_write(client, 0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ ++} ++ ++static void max9286_postinit(struct i2c_client *client, int addr) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ int idx; ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) ++ continue; ++ ++ client->addr = priv->des_addr; /* MAX9286 I2C */ ++ reg8_write(client, 0x00, 0xe0 | BIT(idx)); /* enable GMSL link for CAMx */ ++ reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse/forward control for CAMx */ ++ usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ ++ ++ client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C */ ++ max9286_sensor_reset(client, client->addr, 0); /* sensor unreset using gpios. TODO: should be in imager driver */ ++ } ++ ++ client->addr = addr; /* MAX9286 I2C */ ++ reg8_write(client, 0x0a, 0x00); /* disable reverse control for all cams */ ++ reg8_write(client, 0x00, 0xe0 | priv->links_mask); /* enable GMSL link for CAMs */ ++ reg8_write(client, 0x0b, priv->csi2_outord); /* CSI2 output order */ ++ reg8_write(client, 0x15, 0x9b); /* enable CSI output, VC is set accordingly to Link number, BIT7 magic must be set */ ++ reg8_write(client, 0x1b, priv->switchin | priv->links_mask); /* coax polarity, enable equalizer for CAMs */ ++ reg8_write(client, 0x34, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ ++ ++ if (strcmp(priv->fsync_mode, "manual") == 0) { ++ reg8_write(client, 0x01, 0x00); /* manual: FRAMESYNC set manually via [0x06:0x08] regs */ ++ } else if (strcmp(priv->fsync_mode, "automatic") == 0) { ++ reg8_write(client, 0x01, 0x02); /* automatic: FRAMESYNC taken from the slowest Link */ ++ } else if (strcmp(priv->fsync_mode, "semi-automatic") == 0) { ++ reg8_write(client, 0x01, 0x01); /* semi-automatic: FRAMESYNC taken from the slowest Link */ ++ } else if (strcmp(priv->fsync_mode, "external") == 0) { ++ reg8_write(client, 0x01, 0xc0); /* ECU (aka MCU) based FrameSync using GPI-to-GPO */ ++ } ++} ++ ++static int max9286_reverse_channel_setup(struct i2c_client *client, int idx) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ u8 val = 0, lock_sts = 0, link_sts = 0; ++ int timeout = priv->timeout; ++ char timeout_str[40]; ++ int ret = 0; ++ ++ /* Reverse channel enable */ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x34, 0xa2 | MAXIM_I2C_I2C_SPEED); /* enable artificial ACKs, I2C speed set */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x00, 0xe0 | BIT(idx)); /* enable GMSL link for CAMx */ ++ reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse control for CAMx */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ++ for (;;) { ++ if (priv->him) { ++ /* HIM mode setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x4d, 0xc0); ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ if (priv->bws) { ++ reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ } else { ++ /* Legacy mode setup */ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x3f, 0x4f); /* enable custom reverse channel & first pulse length */ ++ reg8_write(client, 0x3b, 0x1e); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x08, 0x01); /* reverse channel receiver high threshold enable */ ++ reg8_write(client, 0x97, 0x5f); /* enable reverse control channel programming (MAX96705-MAX96711 only) */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ if (priv->bws) { ++ reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x3b, 0x19); /* reverse channel increase amplitude 170mV to compensate high threshold enabled */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_read(client, 0x1e, &val); /* read max9271 ID */ ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID || --timeout == 0) { ++ priv->ser_id = val; ++ break; ++ } ++ ++ /* Check if already initialized (after reboot/reset ?) */ ++ client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C */ ++ reg8_read(client, 0x1e, &val); /* read max9271 ID */ ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ priv->ser_id = val; ++ reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ret = -EADDRINUSE; ++ break; ++ } ++ ++ if (poc_trig) { ++ if (!IS_ERR(priv->poc_gpio[idx]) && (timeout % poc_trig == 0)) { ++ gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ ++ mdelay(200); ++ gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ ++ mdelay(priv->poc_delay); ++ } ++ } ++ } ++ ++ max9286_sensor_reset(client, client->addr, 1); /* sensor reset */ ++ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_read(client, 0x27, &lock_sts); /* LOCK status */ ++ reg8_read(client, 0x49, &link_sts); /* LINK status */ ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ priv->links_mask |= BIT(idx); ++ priv->csi2_outord &= ~(0x3 << (idx * 2)); ++ priv->csi2_outord |= ((hweight8(priv->links_mask) - 1) << (idx * 2)); ++ ++out: ++ sprintf(timeout_str, "retries=%d lock_sts=%d link_sts=0x%x", priv->timeout - timeout, !!(lock_sts & 0x80), link_sts & (0x11 << idx)); ++ dev_info(&client->dev, "link%d %s %sat 0x%x %s %s\n", idx, ser_name(priv->ser_id), ++ ret == -EADDRINUSE ? "already " : "", priv->max9271_addr_map[idx], ++ ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", ++ priv->timeout - timeout ? timeout_str : ""); ++ ++ return ret; ++} ++ ++static void max9286_initial_setup(struct i2c_client *client) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ ++ /* Initial setup */ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x15, 0x13); /* disable CSI output, VC is set accordingly to Link number */ ++ reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ ++ reg8_write(client, 0x12, ((priv->lanes - 1) << 6) | ++ (priv->dbl ? 0x30 : 0) | ++ (priv->dt & 0xf)); /* setup lanes, DBL mode, DataType */ ++ ++ /* Start GMSL initialization with FSYNC disabled. This is required for some odd LVDS cameras */ ++ reg8_write(client, 0x01, 0xc0); /* ECU (aka MCU) based FrameSync using GPI-to-GPO */ ++ reg8_write(client, 0x06, priv->fsync_period & 0xff); ++ reg8_write(client, 0x07, (priv->fsync_period >> 8) & 0xff); ++ reg8_write(client, 0x08, priv->fsync_period >> 16); ++ ++ reg8_write(client, 0x63, 0); /* disable overlap window */ ++ reg8_write(client, 0x64, 0); ++ reg8_write(client, 0x0c, 0x91 | (priv->vsync ? BIT(3) : 0) | (priv->hsync ? BIT(2) : 0)); /* enable HS/VS encoding, use D14/15 for HS/VS, invert HS/VS */ ++ reg8_write(client, 0x19, 0x0c); /* Drive HSTRAIL state for 120ns after the last payload bit */ ++} ++ ++static void max9286_gmsl_link_setup(struct i2c_client *client, int idx) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ ++ /* GMSL setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ reg8_write(client, 0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ ++ if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) { ++ switch (priv->dt) { ++ case YUV8_DT: ++ /* setup crossbar for YUV8/RAW8: reverse DVP bus */ ++ reg8_write(client, 0x20, priv->cb[7]); ++ reg8_write(client, 0x21, priv->cb[6]); ++ reg8_write(client, 0x22, priv->cb[5]); ++ reg8_write(client, 0x23, priv->cb[4]); ++ reg8_write(client, 0x24, priv->cb[3]); ++ reg8_write(client, 0x25, priv->cb[2]); ++ reg8_write(client, 0x26, priv->cb[1]); ++ reg8_write(client, 0x27, priv->cb[0]); ++ ++ /* this is second byte if DBL=1 */ ++ reg8_write(client, 0x30, priv->cb[7] + 16); ++ reg8_write(client, 0x31, priv->cb[6] + 16); ++ reg8_write(client, 0x32, priv->cb[5] + 16); ++ reg8_write(client, 0x33, priv->cb[4] + 16); ++ reg8_write(client, 0x34, priv->cb[3] + 16); ++ reg8_write(client, 0x35, priv->cb[2] + 16); ++ reg8_write(client, 0x36, priv->cb[1] + 16); ++ reg8_write(client, 0x37, priv->cb[0] + 16); ++ break; ++ case RAW12_DT: ++ /* setup crossbar for RAW12: reverse DVP bus */ ++ reg8_write(client, 0x20, priv->cb[11]); ++ reg8_write(client, 0x21, priv->cb[10]); ++ reg8_write(client, 0x22, priv->cb[9]); ++ reg8_write(client, 0x23, priv->cb[8]); ++ reg8_write(client, 0x24, priv->cb[7]); ++ reg8_write(client, 0x25, priv->cb[6]); ++ reg8_write(client, 0x26, priv->cb[5]); ++ reg8_write(client, 0x27, priv->cb[4]); ++ reg8_write(client, 0x28, priv->cb[3]); ++ reg8_write(client, 0x29, priv->cb[2]); ++ reg8_write(client, 0x2a, priv->cb[1]); ++ reg8_write(client, 0x2b, priv->cb[0]); ++ ++ /* this is second byte if DBL=1 */ ++ reg8_write(client, 0x30, priv->cb[11] + 16); ++ reg8_write(client, 0x31, priv->cb[10] + 16); ++ reg8_write(client, 0x32, priv->cb[9] + 16); ++ reg8_write(client, 0x33, priv->cb[8] + 16); ++ reg8_write(client, 0x34, priv->cb[7] + 16); ++ reg8_write(client, 0x35, priv->cb[6] + 16); ++ reg8_write(client, 0x36, priv->cb[5] + 16); ++ reg8_write(client, 0x37, priv->cb[4] + 16); ++ reg8_write(client, 0x38, priv->cb[3] + 16); ++ reg8_write(client, 0x39, priv->cb[2] + 16); ++ reg8_write(client, 0x3a, priv->cb[1] + 16); ++ reg8_write(client, 0x3b, priv->cb[0] + 16); ++ ++ if (!priv->bws && priv->dbl) ++ dev_err(&client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); ++ ++ break; ++ } ++ ++ if (priv->hsgen) { ++ /* HS/VS pins map */ ++ reg8_write(client, 0x3f, 0x10); /* HS (NC) */ ++ reg8_write(client, 0x41, 0x10); /* DE (NC) */ ++ if (priv->ser_id == MAX96705_ID) ++ reg8_write(client, 0x40, 15); /* VS (DIN13) */ ++ if (priv->ser_id == MAX96707_ID) ++ reg8_write(client, 0x40, 13); /* VS (DIN13) */ ++#if 0 ++ /* following must come from imager */ ++#define SENSOR_WIDTH (1280*2) ++#define HTS (1288*2) ++#define VTS 960 ++#define HTS_DELAY 0x9 ++ reg8_write(client, 0x4e, HTS_DELAY >> 16); /* HS delay */ ++ reg8_write(client, 0x4f, (HTS_DELAY >> 8) & 0xff); ++ reg8_write(client, 0x50, HTS_DELAY & 0xff); ++ reg8_write(client, 0x54, SENSOR_WIDTH >> 8); /* HS high period */ ++ reg8_write(client, 0x55, SENSOR_WIDTH & 0xff); ++ reg8_write(client, 0x56, (HTS - SENSOR_WIDTH) >> 8); /* HS low period */ ++ reg8_write(client, 0x57, (HTS - SENSOR_WIDTH) & 0xff); ++ reg8_write(client, 0x58, VTS >> 8); /* HS count */ ++ reg8_write(client, 0x59, VTS & 0xff ); ++#endif ++ reg8_write(client, 0x43, 0x15); /* enable HS generator */ ++ } ++ } ++ ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ reg8_write(client, 0x34, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ ++ /* I2C translator setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++// reg8_write(client, 0x09, maxim_map[2][idx] << 1); /* SENSOR I2C translated - must be set by sensor driver */ ++// reg8_write(client, 0x0A, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ ++ reg8_write(client, 0x0B, BROADCAST << 1); /* broadcast I2C */ ++ reg8_write(client, 0x0C, priv->max9271_addr_map[idx] << 1); /* MAX9271-CAMx I2C new */ ++ /* I2C addresse change */ ++ reg8_write(client, 0x01, priv->des_addr << 1); /* MAX9286 I2C */ ++ reg8_write(client, 0x00, priv->max9271_addr_map[idx] << 1); /* MAX9271-CAM0 I2C new */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ /* put MAX9271 in configuration link state */ ++ client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C new */ ++ reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++#ifdef MAXIM_DUMP ++ client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ ++ maxim_max927x_dump_regs(client); ++ client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C new */ ++ maxim_max927x_dump_regs(client); ++#endif ++} ++ ++static int max9286_initialize(struct i2c_client *client) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ int idx, ret; ++ ++ dev_info(&client->dev, "LINKs=%d, LANES=%d, FSYNC mode=%s, FSYNC period=%d, PCLK edge=%s\n", ++ priv->links, priv->lanes, priv->fsync_mode, priv->fsync_period, ++ priv->pclk_rising_edge ? "rising" : "falling"); ++ ++ if (priv->des_quirk_addr) ++ max9286_preinit(client, priv->des_quirk_addr); ++ ++ max9286_preinit(client, priv->des_addr); ++ max9286_initial_setup(client); ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) { ++ gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ ++ mdelay(priv->poc_delay); ++ } ++ ++ ret = max9286_reverse_channel_setup(client, idx); ++ if (ret) ++ continue; ++ max9286_gmsl_link_setup(client, idx); ++ } ++ ++ max9286_postinit(client, priv->des_addr); ++ ++ client->addr = priv->des_addr; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int max9286_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ int ret; ++ u8 val = 0; ++ ++ ret = reg8_read(client, (u8)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u8); ++ ++ return 0; ++} ++ ++static int max9286_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ return reg8_write(client, (u8)reg->reg, (u8)reg->val); ++} ++#endif ++ ++static int max9286_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ if (on) { ++ if (atomic_inc_return(&priv->use_count) == 1) ++ reg8_write(client, 0x69, priv->links_mask ^ 0x0f); /* unmask CSI forwarding from detected links */ ++ } else { ++ if (atomic_dec_return(&priv->use_count) == 0) ++ reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ ++ } ++ ++ return 0; ++} ++ ++static int max9286_registered_async(struct v4l2_subdev *sd) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ int idx, tmp_addr; ++ ++ /* switch to GMSL serial_link for streaming video */ ++ tmp_addr = client->addr; ++ idx = sd->grp_id; ++ ++ client->addr = priv->des_addr; /* MAX9286 I2C */ ++ reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse/forward control for CAMx */ ++ ++ client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx */ ++ max9286_write_remote_verify(client, idx, 0x04, conf_link ? 0x43 : 0x83); ++// usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ ++ ++ client->addr = priv->des_addr; /* MAX9286 I2C */ ++ reg8_write(client, 0x0a, (priv->links_mask << 4) | priv->links_mask); /* enable reverse/forward control for all CAMs */ ++ ++ client->addr = tmp_addr; ++ ++ return 0; ++} ++ ++static int max9286_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) ++{ ++ struct max9286_priv *priv = container_of(nb, struct max9286_priv, reboot_notifier); ++ int idx; ++ ++ for (idx = 0; idx < priv->links; idx++) { ++ if (!IS_ERR(priv->poc_gpio[idx])) ++ gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ ++ } ++ ++ return NOTIFY_OK; ++} ++ ++static struct v4l2_subdev_core_ops max9286_subdev_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = max9286_g_register, ++ .s_register = max9286_s_register, ++#endif ++ .s_power = max9286_s_power, ++ .registered_async = max9286_registered_async, ++}; ++ ++static int max9286_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ return 0; ++} ++ ++static int max9286_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ int f_period; ++ ++ f_period = priv->fsync_period * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ reg8_write(client, 0x06, f_period & 0xff); ++ reg8_write(client, 0x07, (f_period >> 8) & 0xff); ++ reg8_write(client, 0x08, f_period >> 16); ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_subdev_video_ops max9286_video_ops = { ++ .g_parm = max9286_g_parm, ++ .s_parm = max9286_s_parm, ++}; ++ ++static struct v4l2_subdev_ops max9286_subdev_ops = { ++ .core = &max9286_subdev_core_ops, ++ .video = &max9286_video_ops, ++}; ++ ++static int max9286_parse_dt(struct i2c_client *client) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL; ++ struct property *prop; ++ int err, pwen, i; ++ int sensor_delay, gpio0 = 1, gpio1 = 1; ++ u8 val = 0; ++ char poc_name[10]; ++ ++ if (of_property_read_u32(np, "maxim,links", &priv->links)) ++ priv->links = 4; ++ ++ if (of_property_read_u32(np, "maxim,lanes", &priv->lanes)) ++ priv->lanes = 4; ++ ++ pwen = of_get_gpio(np, 0); ++ if (pwen > 0) { ++ err = gpio_request_one(pwen, GPIOF_OUT_INIT_HIGH, dev_name(&client->dev)); ++ if (err) ++ dev_err(&client->dev, "cannot request PWEN gpio %d: %d\n", pwen, err); ++ } ++ ++ mdelay(250); ++ ++ for (i = 0; i < 4; i++) { ++ sprintf(poc_name, "POC%d", i); ++ priv->poc_gpio[i] = devm_gpiod_get_optional(&client->dev, kstrdup(poc_name, GFP_KERNEL), 0); ++ } ++ ++ reg8_read(client, 0x1e, &val); /* read max9286 ID */ ++ if (val != MAX9286_ID) { ++ prop = of_find_property(np, "reg", NULL); ++ if (prop) ++ of_remove_property(np, prop); ++ return -ENODEV; ++ } ++ ++ if (!of_property_read_u32(np, "maxim,gpio0", &gpio0) || ++ !of_property_read_u32(np, "maxim,gpio1", &gpio1)) ++ reg8_write(client, 0x0f, 0x08 | (gpio1 << 1) | gpio0); ++ ++ if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { ++ priv->gpio_resetb = -1; ++ } else { ++ if (of_property_read_bool(np, "maxim,resetb-active-high")) ++ priv->active_low_resetb = 0; ++ else ++ priv->active_low_resetb = 1; ++ } ++ ++ if (!of_property_read_u32(np, "maxim,sensor_delay", &sensor_delay)) ++ mdelay(sensor_delay); ++ if (of_property_read_string(np, "maxim,fsync-mode", &priv->fsync_mode)) ++ priv->fsync_mode = fsync_mode_default; ++ if (of_property_read_u32(np, "maxim,fsync-period", &priv->fsync_period)) ++ priv->fsync_period = 3200000; /* 96MHz/30fps */ ++ priv->pclk_rising_edge = true; ++ if (of_property_read_bool(np, "maxim,pclk-falling-edge")) ++ priv->pclk_rising_edge = false; ++ if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) ++ priv->timeout = 100; ++ if (of_property_read_u32(np, "maxim,i2c-quirk", &priv->des_quirk_addr)) ++ priv->des_quirk_addr = 0; ++ if (of_property_read_u32(np, "maxim,him", &priv->him)) ++ priv->him = 0; ++ if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) ++ priv->hsync = 0; ++ if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) ++ priv->vsync = 1; ++ if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) ++ priv->poc_delay = 50; ++ if (of_property_read_u32(np, "maxim,bws", &priv->bws)) ++ priv->bws = 0; ++ if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) ++ priv->dbl = 1; ++ if (of_property_read_u32(np, "maxim,dt", &priv->dt)) ++ priv->dt = 3; ++ if (of_property_read_u32(np, "maxim,hsgen", &priv->hsgen)) ++ priv->hsgen = 0; ++ if (of_property_read_u32(np, "maxim,pclk", &priv->pclk)) ++ priv->pclk = pclk; ++ if (of_property_read_u32(np, "maxim,switchin", &priv->switchin)) ++ priv->switchin = 0; ++ if (of_property_read_u64(np, "maxim,crossbar", &priv->crossbar)) ++ priv->crossbar = crossbar; ++ ++ /* module params override dts */ ++ if (him) ++ priv->him = him; ++ if (fsync_period) { ++ priv->fsync_period = fsync_period; ++ priv->fsync_mode = fsync_mode_default; ++ } ++ if (hsync) ++ priv->hsync = hsync; ++ if (!vsync) ++ priv->vsync = vsync; ++ if (gpio_resetb) ++ priv->gpio_resetb = gpio_resetb; ++ if (active_low_resetb) ++ priv->active_low_resetb = active_low_resetb; ++ if (timeout_n) ++ priv->timeout = timeout_n; ++ if (poc_delay) ++ priv->poc_delay = poc_delay; ++ if (bws) ++ priv->bws = bws; ++ if (!dbl) ++ priv->dbl = dbl; ++ if (dt != 3) ++ priv->dt = dt; ++ if (hsgen) ++ priv->hsgen = hsgen; ++ if (pclk != 100) ++ priv->pclk = pclk; ++ if (switchin) ++ priv->switchin = switchin; ++ ++ /* parse crossbar setup */ ++ for (i = 0; i < 16; i++) { ++ priv->cb[i] = priv->crossbar % 16; ++ priv->crossbar /= 16; ++ } ++ ++ for (i = 0; i < priv->links; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ if (of_property_read_u32(endpoint, "max9271-addr", &priv->max9271_addr_map[i])) { ++ of_node_put(endpoint); ++ dev_err(&client->dev, "max9271-addr not set\n"); ++ return -EINVAL; ++ } ++ ++ priv->sd_fwnode[i] = of_fwnode_handle(endpoint); ++ } ++ ++ of_node_put(endpoint); ++ return 0; ++} ++ ++static void max9286_setup_remote_endpoint(struct i2c_client *client) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ int i; ++ struct property *csi_rate_prop, *dvp_order_prop; ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); ++ if (csi_rate_prop) { ++ /* CSI2_RATE = PCLK*bpp*links/lanes */ ++ priv->csi_rate = cpu_to_be32(priv->pclk * dt2bpp[priv->dt] * hweight8(priv->links_mask) / priv->lanes); ++ csi_rate_prop->value = &priv->csi_rate; ++ of_update_property(rendpoint, csi_rate_prop); ++ } ++ ++ dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); ++ if (dvp_order_prop) ++ of_update_property(rendpoint, dvp_order_prop); ++ } ++ ++ of_node_put(endpoint); ++} ++ ++static const char *line_status[] = ++{ ++ "BAT", ++ "GND", ++ "NORMAL", ++ "OPEN" ++}; ++ ++static ssize_t max9286_link_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ int i = -1; ++ u8 val = 0; ++ bool lenghterr, linebuffof, hlocked, prbsok, vsyncdet, configdet, videodet; ++ int lf; ++ u8 prbserr = 0, deterr = 0, correrr = 0; ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ ++ if (!sscanf(attr->attr.name, "link_%d", &i)) ++ return -EINVAL; ++ ++ if ((i < 0) || (i > 3)) ++ return -EINVAL; ++ ++ reg8_read(client, 0x20, &val); ++ lf = (val >> (2 * i)) & 0x03; ++ ++ reg8_read(client, 0x21, &val); ++ hlocked = !!(val & (1 << i)); ++ prbsok = !!(val & (1 << (i + 4))); ++ ++ reg8_read(client, 0x22, &val); ++ lenghterr = !!(val & (1 << i)); ++ linebuffof = !!(val & (1 << (i + 4))); ++ ++ reg8_read(client, 0x23 + i, &prbserr); ++ priv->prbserr[i] += prbserr; ++ ++ reg8_read(client, 0x27, &val); ++ vsyncdet = !!(val & (1 << i)); ++ ++ reg8_read(client, 0x28 + i, &deterr); ++ priv->deterr[i] += deterr; ++ ++ reg8_read(client, 0x2c + i, &correrr); ++ priv->correrr[i] += correrr; ++ ++ reg8_read(client, 0x49, &val); ++ configdet = !!(val & (1 << i)); ++ videodet = !!(val & (1 << (i + 4))); ++ ++ return sprintf(buf, "LINK:%d LF:%s HLOCKED:%d PRBSOK:%d LINBUFFOF:%d" ++ " LENGHTERR:%d VSYNCDET:%d CONFIGDET:%d VIDEODET:%d" ++ " PRBSERR:%d(%d) DETEERR:%d(%d) CORRERR:%d(%d)\n", ++ i, line_status[lf], hlocked, prbsok, lenghterr, ++ linebuffof, vsyncdet, configdet, videodet, ++ priv->prbserr[i], prbserr, ++ priv->deterr[i], deterr, ++ priv->correrr[i], correrr); ++ return 0; ++} ++ ++static DEVICE_ATTR(link_0, S_IRUGO, max9286_link_show, NULL); ++static DEVICE_ATTR(link_1, S_IRUGO, max9286_link_show, NULL); ++static DEVICE_ATTR(link_2, S_IRUGO, max9286_link_show, NULL); ++static DEVICE_ATTR(link_3, S_IRUGO, max9286_link_show, NULL); ++ ++static struct attribute *max9286_attributes_links[] = { ++ &dev_attr_link_0.attr, ++ &dev_attr_link_1.attr, ++ &dev_attr_link_2.attr, ++ &dev_attr_link_3.attr, ++ NULL ++}; ++ ++static const struct attribute_group max9286_group = { ++ .attrs = max9286_attributes_links, ++}; ++ ++static int max9286_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct max9286_priv *priv; ++ int err, i; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ i2c_set_clientdata(client, priv); ++ priv->des_addr = client->addr; ++ priv->client = client; ++ atomic_set(&priv->use_count, 0); ++ priv->csi2_outord = 0xff; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; ++ ++ err = max9286_parse_dt(client); ++ if (err) ++ goto out; ++ ++ err = max9286_initialize(client); ++ if (err < 0) ++ goto out; ++ ++ max9286_setup_remote_endpoint(client); ++ ++ for (i = 0; i < 4; i++) { ++ v4l2_subdev_init(&priv->sd[i], &max9286_subdev_ops); ++ priv->sd[i].owner = client->dev.driver->owner; ++ priv->sd[i].dev = &client->dev; ++ priv->sd[i].grp_id = i; ++ v4l2_set_subdevdata(&priv->sd[i], priv); ++ priv->sd[i].fwnode = priv->sd_fwnode[i]; ++ ++ snprintf(priv->sd[i].name, V4L2_SUBDEV_NAME_SIZE, "%s.%d %d-%04x", ++ client->dev.driver->name, i, i2c_adapter_id(client->adapter), ++ client->addr); ++ ++ err = v4l2_async_register_subdev(&priv->sd[i]); ++ if (err < 0) ++ goto out; ++ } ++ ++ priv->reboot_notifier.notifier_call = max9286_reboot_notifier; ++ err = register_reboot_notifier(&priv->reboot_notifier); ++ if (err) { ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ goto out; ++ } ++ ++ err = sysfs_create_group(&client->dev.kobj, ++ &max9286_group); ++ if (err < 0) ++ dev_err(&client->dev, "Sysfs registration failed\n"); ++out: ++ return err; ++} ++ ++static int max9286_remove(struct i2c_client *client) ++{ ++ struct max9286_priv *priv = i2c_get_clientdata(client); ++ int i; ++ ++ sysfs_remove_group(&client->dev.kobj, &max9286_group); ++ unregister_reboot_notifier(&priv->reboot_notifier); ++ ++ for (i = 0; i < 4; i++) { ++ v4l2_async_unregister_subdev(&priv->sd[i]); ++ v4l2_device_unregister_subdev(&priv->sd[i]); ++ } ++ ++ return 0; ++} ++ ++static const struct of_device_id max9286_dt_ids[] = { ++ { .compatible = "maxim,max9286" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, max9286_dt_ids); ++ ++static const struct i2c_device_id max9286_id[] = { ++ { "max9286", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, max9286_id); ++ ++static struct i2c_driver max9286_i2c_driver = { ++ .driver = { ++ .name = "max9286", ++ .of_match_table = of_match_ptr(max9286_dt_ids), ++ }, ++ .probe = max9286_probe, ++ .remove = max9286_remove, ++ .id_table = max9286_id, ++}; ++ ++module_i2c_driver(max9286_i2c_driver); ++ ++MODULE_DESCRIPTION("GMSL driver for MAX9286"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9288.c b/drivers/media/i2c/soc_camera/gmsl/max9288.c +new file mode 100644 +index 0000000..7de1f9e +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9288.c +@@ -0,0 +1,768 @@ ++/* ++ * MAXIM max9288 GMSL driver ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../max9286.h" ++ ++#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ ++#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ ++#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ ++#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ ++#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ ++#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ ++#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ ++#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++ ++struct max9288_priv { ++ struct v4l2_subdev sd; ++ struct fwnode_handle *sd_fwnode; ++ int des_addr; ++ int lanes; ++ int csi_rate; ++ int pclk; ++ char pclk_rising_edge; ++ int gpio_resetb; ++ int active_low_resetb; ++ int him; ++ int hsync; ++ int vsync; ++ int timeout; ++ int poc_delay; ++ int bws; ++ int dbl; ++ int dt; ++ int hsgen; ++ int hts; ++ int vts; ++ int hts_delay; ++ struct i2c_client *client; ++ int max9271_addr; ++ int ser_id; ++ struct gpio_desc *poc_gpio; /* PoC power supply */ ++}; ++ ++static int conf_link; ++module_param(conf_link, int, 0644); ++MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); ++ ++static int poc_trig; ++module_param(poc_trig, int, 0644); ++MODULE_PARM_DESC(poc_trig, " Use PoC triggering during reverse channel setup. Useful on systems with dedicated PoC and unstable ser-des lock"); ++ ++static int him = 0; ++module_param(him, int, 0644); ++MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); ++ ++static int hsync; ++module_param(hsync, int, 0644); ++MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); ++ ++static int vsync = 1; ++module_param(vsync, int, 0644); ++MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); ++ ++static int gpio_resetb; ++module_param(gpio_resetb, int, 0644); ++MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); ++ ++static int active_low_resetb; ++module_param(active_low_resetb, int, 0644); ++MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); ++ ++static int timeout_n = 100; ++module_param(timeout_n, int, 0644); ++MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); ++ ++static int poc_delay = 50; ++module_param(poc_delay, int, 0644); ++MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); ++ ++static int bws = 0; ++module_param(bws, int, 0644); ++MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); ++ ++static int dbl = 1; ++module_param(dbl, int, 0644); ++MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); ++ ++static int dt = 3; ++module_param(dt, int, 0644); ++MODULE_PARM_DESC(dt, " DataType (default: 3 - YUV8), 0 - RGB888, 5 - RAW8, 6 - RAW10, 7 - RAW12, 8 - RAW14"); ++ ++static int hsgen; ++module_param(hsgen, int, 0644); ++MODULE_PARM_DESC(hsgen, " Enable HS embedded generator (default: 0 - disabled)"); ++ ++static int pclk = 100; ++module_param(pclk, int, 0644); ++MODULE_PARM_DESC(pclk, " PCLK rate (default: 100MHz)"); ++ ++enum { ++ RGB888_DT = 0, ++ RGB565_DT, ++ RGB666_DT, ++ YUV8_DT, /* default */ ++ YUV10_DT, ++ RAW8_DT, ++ RAW10_DT, ++ RAW12_DT, ++ RAW14_DT, ++}; ++ ++static int dt2bpp [9] = { ++ 24, /* RGB888 */ ++ 16, /* RGB565 */ ++ 18, /* RGB666 */ ++ 8, /* YUV8 - default */ ++ 10, /* YUV10 */ ++ 8, /* RAW8/RAW16 */ ++ 10, /* RAW10 */ ++ 12, /* RAW12 */ ++ 14, /* RAW14 */ ++}; ++ ++static char* ser_name(int id) ++{ ++ switch (id) { ++ case MAX9271_ID: ++ return "MAX9271"; ++ case MAX96705_ID: ++ return "MAX96705"; ++ case MAX96707_ID: ++ return "MAX96707"; ++ default: ++ return "unknown"; ++ } ++} ++ ++static void max9288_write_remote_verify(struct i2c_client *client, u8 reg, u8 val) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ int timeout; ++ ++ for (timeout = 0; timeout < 10; timeout++) { ++ u8 val2 = 0; ++ ++ reg8_write(client, reg, val); ++ reg8_read(client, reg, &val2); ++ if (val2 == val) ++ break; ++ ++ usleep_range(1000, 1500); ++ } ++ ++ if (timeout >= 10) ++ dev_err(&client->dev, "timeout remote write acked\n"); ++} ++ ++ ++static void max9288_preinit(struct i2c_client *client, int addr) ++{ ++ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ client->addr = addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x04, 0x00); /* disable reverse control */ ++ reg8_write(client, 0x16, (priv->him ? 0x80 : 0x00) | ++ 0x5a); /* high-immunity/legacy mode */ ++} ++ ++static void max9288_sensor_reset(struct i2c_client *client, int addr, int reset_on) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) ++ return; ++ ++ /* sensor reset/unreset */ ++ client->addr = addr; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | /* set GPIOn value to reset/unreset */ ++ ((priv->active_low_resetb ? BIT(priv->gpio_resetb) : 0) ^ reset_on)); ++ reg8_write(client, 0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ ++} ++ ++static int max9288_reverse_channel_setup(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ u8 val = 0, lock_sts = 0; ++ int timeout = priv->timeout; ++ char timeout_str[40]; ++ int ret = 0; ++ ++ /* Reverse channel enable */ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x1c, 0xa2 | MAXIM_I2C_I2C_SPEED); /* enable artificial ACKs, I2C speed set */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x04, 0x03); /* enable reverse control */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ++ for (;;) { ++ if (priv->him) { ++ /* HIM mode setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x4d, 0xc0); ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ if (priv->bws) { ++ reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS disabled enabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ } else { ++ /* Legacy mode setup */ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x13, 0x00); ++ reg8_write(client, 0x11, 0x42); /* enable custom reverse channel & first pulse length */ ++ reg8_write(client, 0x0a, 0x0f); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ reg8_write(client, 0x08, 0x01); /* reverse channel receiver high threshold enable */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ if (priv->bws) { ++ reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding disabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ reg8_write(client, 0x97, 0x5f); /* enable reverse control channel programming (MAX96705-MAX96711 only) */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x0a, 0x0c); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ ++ reg8_write(client, 0x13, 0x20); /* reverse channel increase amplitude 170mV to compensate high threshold enabled */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ } ++ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_read(client, 0x1e, &val); /* read max9271 ID */ ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID || --timeout == 0) { ++ priv->ser_id = val; ++ break; ++ } ++ ++ /* Check if already initialized (after reboot/reset ?) */ ++ client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C */ ++ reg8_read(client, 0x1e, &val); /* read max9271 ID */ ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ priv->ser_id = val; ++ reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ ++ ret = -EADDRINUSE; ++ break; ++ } ++ ++ if (poc_trig) { ++ if (!IS_ERR(priv->poc_gpio) && (timeout % poc_trig == 0)) { ++ gpiod_direction_output(priv->poc_gpio, 0); /* POC power off */ ++ mdelay(200); ++ gpiod_direction_output(priv->poc_gpio, 1); /* POC power on */ ++ mdelay(priv->poc_delay); ++ } ++ } ++ } ++ ++ max9288_sensor_reset(client, client->addr, 1); /* sensor reset */ ++ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_read(client, 0x04, &lock_sts); /* LOCK status */ ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++out: ++ sprintf(timeout_str, "retries=%d lock_sts=%d", priv->timeout - timeout, !!(lock_sts & 0x80)); ++ dev_info(&client->dev, "link %s %sat 0x%x %s %s\n", ser_name(priv->ser_id), ++ ret == -EADDRINUSE ? "already " : "", priv->max9271_addr, ++ ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", ++ priv->timeout - timeout ? timeout_str : ""); ++ ++ return ret; ++} ++ ++static void max9288_initial_setup(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ /* Initial setup */ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x09, 0x40); /* Automatic pixel count enable */ ++ reg8_write(client, 0x15, 0x70); /* Enable HV and DE tracking by register 0x69 */ ++ reg8_write(client, 0x60, (priv->dbl ? 0x20 : 0) | ++ (priv->dt & 0xf)); /* VC=0, DBL mode, DataType */ ++ reg8_write(client, 0x65, 0x47 | ((priv->lanes - 1) << 4)); /* setup CSI lanes, DE input is HS */ ++ ++ reg8_write(client, 0x08, 0x20); /* use D18/19 for HS/VS */ ++ reg8_write(client, 0x14, (priv->vsync ? 0x80 : 0) | (priv->hsync ? 0x40 : 0)); /* setup HS/VS inversion */ ++ reg8_write(client, 0x64, 0x0c); /* Drive HSTRAIL state for 120ns after the last payload bit */ ++} ++ ++static void max9288_gmsl_link_setup(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ /* GMSL setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++ reg8_write(client, 0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | ++ (priv->dbl ? 0x80 : 0) | ++ (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding disabled, DBL mode, BWS 24/32-bit */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ reg8_write(client, 0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ ++ if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) { ++ switch (priv->dt) { ++ case YUV8_DT: ++ /* setup crossbar for YUV8/RAW8: reverse DVP bus */ ++ reg8_write(client, 0x20, 3); ++ reg8_write(client, 0x21, 4); ++ reg8_write(client, 0x22, 5); ++ reg8_write(client, 0x23, 6); ++ reg8_write(client, 0x24, 7); ++ reg8_write(client, 0x25, 0x40); ++ reg8_write(client, 0x26, 0x40); ++ if (priv->ser_id == MAX96705_ID) { ++ reg8_write(client, 0x27, 14); /* HS: D14->D18 */ ++ reg8_write(client, 0x28, 15); /* VS: D15->D19 */ ++ } ++ if (priv->ser_id == MAX96707_ID) { ++ reg8_write(client, 0x27, 14); /* HS: D14->D18, this is a virtual NC pin, hence it is D14 at HS */ ++ reg8_write(client, 0x28, 13); /* VS: D13->D19 */ ++ } ++ reg8_write(client, 0x29, 0x40); ++ reg8_write(client, 0x2A, 0x40); ++ ++ /* this is second byte if DBL=1 */ ++ reg8_write(client, 0x30, 0x10 + 0); ++ reg8_write(client, 0x31, 0x10 + 1); ++ reg8_write(client, 0x32, 0x10 + 2); ++ reg8_write(client, 0x33, 0x10 + 3); ++ reg8_write(client, 0x34, 0x10 + 4); ++ reg8_write(client, 0x35, 0x10 + 5); ++ reg8_write(client, 0x36, 0x10 + 6); ++ reg8_write(client, 0x37, 0x10 + 7); ++ reg8_write(client, 0x38, 0); ++ reg8_write(client, 0x39, 1); ++ reg8_write(client, 0x3A, 2); ++ ++ reg8_write(client, 0x67, 0xC4); /* DBL_ALIGN_TO = 100b */ ++ ++ break; ++ case RAW12_DT: ++#if 0 /* Not supported yet */ ++ /* setup crossbar for RAW12: reverse DVP bus */ ++ reg8_write(client, 0x20, 11); ++ reg8_write(client, 0x21, 10); ++ reg8_write(client, 0x22, 9); ++ reg8_write(client, 0x23, 8); ++ reg8_write(client, 0x24, 7); ++ reg8_write(client, 0x25, 6); ++ reg8_write(client, 0x26, 5); ++ reg8_write(client, 0x27, 4); ++ reg8_write(client, 0x28, 3); ++ reg8_write(client, 0x29, 2); ++ reg8_write(client, 0x2a, 1); ++ reg8_write(client, 0x2b, 0); ++ ++ /* this is second byte if DBL=1 */ ++ reg8_write(client, 0x30, 27); ++ reg8_write(client, 0x31, 26); ++ reg8_write(client, 0x32, 25); ++ reg8_write(client, 0x33, 24); ++ reg8_write(client, 0x34, 23); ++ reg8_write(client, 0x35, 22); ++ reg8_write(client, 0x36, 21); ++ reg8_write(client, 0x37, 20); ++ reg8_write(client, 0x38, 19); ++ reg8_write(client, 0x39, 18); ++ reg8_write(client, 0x3a, 17); ++ reg8_write(client, 0x3b, 16); ++ ++ if (!priv->bws && priv->dbl) ++ dev_err(&client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); ++#endif ++ break; ++ } ++ ++ if (priv->hsgen) { ++ /* HS/VS pins map */ ++ reg8_write(client, 0x3f, 0x10); /* HS (NC) */ ++ reg8_write(client, 0x41, 0x10); /* DE (NC) */ ++ if (priv->ser_id == MAX96705_ID) ++ reg8_write(client, 0x40, 15); /* VS (DIN13) */ ++ if (priv->ser_id == MAX96707_ID) ++ reg8_write(client, 0x40, 13); /* VS (DIN13) */ ++#if 0 ++ /* following must come from imager */ ++#define SENSOR_WIDTH (1280*2) ++#define HTS (1288*2) ++#define VTS 960 ++#define HTS_DELAY 0x9 ++ reg8_write(client, 0x4e, HTS_DELAY >> 16); /* HS delay */ ++ reg8_write(client, 0x4f, (HTS_DELAY >> 8) & 0xff); ++ reg8_write(client, 0x50, HTS_DELAY & 0xff); ++ reg8_write(client, 0x54, SENSOR_WIDTH >> 8); /* HS high period */ ++ reg8_write(client, 0x55, SENSOR_WIDTH & 0xff); ++ reg8_write(client, 0x56, (HTS - SENSOR_WIDTH) >> 8); /* HS low period */ ++ reg8_write(client, 0x57, (HTS - SENSOR_WIDTH) & 0xff); ++ reg8_write(client, 0x58, VTS >> 8); /* HS count */ ++ reg8_write(client, 0x59, VTS & 0xff ); ++#endif ++ reg8_write(client, 0x43, 0x15); /* enable HS generator */ ++ } ++ } ++ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ reg8_write(client, 0x1c, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ ++ /* I2C translator setup */ ++ client->addr = 0x40; /* MAX9271-CAMx I2C */ ++// reg8_write(client, 0x09, maxim_map[2][idx] << 1); /* SENSOR I2C translated - must be set by sensor driver */ ++// reg8_write(client, 0x0A, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ ++ reg8_write(client, 0x0B, BROADCAST << 1); /* broadcast I2C */ ++ reg8_write(client, 0x0C, priv->max9271_addr << 1); /* MAX9271-CAMx I2C new */ ++ /* I2C addresse change */ ++ reg8_write(client, 0x01, priv->des_addr << 1); /* MAX9288 I2C */ ++ reg8_write(client, 0x00, priv->max9271_addr << 1); /* MAX9271-CAM0 I2C new */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ /* put MAX9271 in configuration link state */ ++ client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ ++ reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++#ifdef MAXIM_DUMP ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ maxim_max927x_dump_regs(client); ++ client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ ++ maxim_max927x_dump_regs(client); ++#endif ++} ++ ++static int max9288_initialize(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ dev_info(&client->dev, "LANES=%d, PCLK edge=%s\n", ++ priv->lanes, priv->pclk_rising_edge ? "rising" : "falling"); ++ ++ max9288_preinit(client, priv->des_addr); ++ max9288_initial_setup(client); ++ ++ if (!IS_ERR(priv->poc_gpio)) { ++ gpiod_direction_output(priv->poc_gpio, 1); /* POC power on */ ++ mdelay(priv->poc_delay); ++ } ++ ++ max9288_reverse_channel_setup(client); ++ max9288_gmsl_link_setup(client); ++ ++ client->addr = priv->des_addr; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int max9288_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct max9288_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ int ret; ++ u8 val = 0; ++ ++ ret = reg8_read(client, (u8)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u8); ++ ++ return 0; ++} ++ ++static int max9288_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct max9288_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ return reg8_write(client, (u8)reg->reg, (u8)reg->val); ++} ++#endif ++ ++static int max9288_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max9288_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ ++ max9288_write_remote_verify(client, 0x04, on ? (conf_link ? 0x43 : 0x83) : 0x43); /* enable serial_link or conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ ++ return 0; ++} ++ ++static struct v4l2_subdev_core_ops max9288_subdev_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = max9288_g_register, ++ .s_register = max9288_s_register, ++#endif ++ .s_power = max9288_s_power, ++}; ++ ++static struct v4l2_subdev_ops max9288_subdev_ops = { ++ .core = &max9288_subdev_core_ops, ++}; ++ ++static int max9288_parse_dt(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL; ++ struct property *prop; ++ int err, pwen; ++ int sensor_delay, gpio0 = 1, gpio1 = 1; ++ u8 val = 0; ++ char poc_name[10]; ++ ++ if (of_property_read_u32(np, "maxim,lanes", &priv->lanes)) ++ priv->lanes = 4; ++ ++ pwen = of_get_gpio(np, 0); ++ if (pwen > 0) { ++ err = gpio_request_one(pwen, GPIOF_OUT_INIT_HIGH, dev_name(&client->dev)); ++ if (err) ++ dev_err(&client->dev, "cannot request PWEN gpio %d: %d\n", pwen, err); ++ } ++ ++ mdelay(250); ++ ++ sprintf(poc_name, "POC%d", 0); ++ priv->poc_gpio = devm_gpiod_get_optional(&client->dev, kstrdup(poc_name, GFP_KERNEL), 0); ++ ++ reg8_read(client, 0x1e, &val); /* read max9288 ID */ ++ if (val != MAX9288_ID) { ++ prop = of_find_property(np, "reg", NULL); ++ if (prop) ++ of_remove_property(np, prop); ++ return -ENODEV; ++ } ++ ++ if (!of_property_read_u32(np, "maxim,gpio0", &gpio0) || ++ !of_property_read_u32(np, "maxim,gpio1", &gpio1)) ++ reg8_write(client, 0x06, (gpio1 << 3) | (gpio0 << 1)); ++ ++ if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { ++ priv->gpio_resetb = -1; ++ } else { ++ if (of_property_read_bool(np, "maxim,resetb-active-high")) ++ priv->active_low_resetb = 0; ++ else ++ priv->active_low_resetb = 1; ++ } ++ ++ if (!of_property_read_u32(np, "maxim,sensor_delay", &sensor_delay)) ++ mdelay(sensor_delay); ++ priv->pclk_rising_edge = true; ++ if (of_property_read_bool(np, "maxim,pclk-falling-edge")) ++ priv->pclk_rising_edge = false; ++ if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) ++ priv->timeout = 100; ++ if (of_property_read_u32(np, "maxim,him", &priv->him)) ++ priv->him = 0; ++ if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) ++ priv->hsync = 0; ++ if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) ++ priv->vsync = 1; ++ if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) ++ priv->poc_delay = 50; ++ if (of_property_read_u32(np, "maxim,bws", &priv->bws)) ++ priv->bws = 0; ++ if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) ++ priv->dbl = 1; ++ if (of_property_read_u32(np, "maxim,dt", &priv->dt)) ++ priv->dt = 3; ++ if (of_property_read_u32(np, "maxim,hsgen", &priv->hsgen)) ++ priv->hsgen = 0; ++ if (of_property_read_u32(np, "maxim,pclk", &priv->pclk)) ++ priv->pclk = pclk; ++ ++ /* module params override dts */ ++ if (him) ++ priv->him = him; ++ if (hsync) ++ priv->hsync = hsync; ++ if (!vsync) ++ priv->vsync = vsync; ++ if (gpio_resetb) ++ priv->gpio_resetb = gpio_resetb; ++ if (active_low_resetb) ++ priv->active_low_resetb = active_low_resetb; ++ if (timeout_n) ++ priv->timeout = timeout_n; ++ if (poc_delay) ++ priv->poc_delay = poc_delay; ++ if (bws) ++ priv->bws = bws; ++ if (!dbl) ++ priv->dbl = dbl; ++ if (dt != 3) ++ priv->dt = dt; ++ if (hsgen) ++ priv->hsgen = hsgen; ++ if (pclk != 100) ++ priv->pclk = pclk; ++ ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (endpoint) { ++ if (of_property_read_u32(endpoint, "max9271-addr", &priv->max9271_addr)) { ++ of_node_put(endpoint); ++ dev_err(&client->dev, "max9271-addr not set\n"); ++ return -EINVAL; ++ } ++ ++ priv->sd_fwnode = of_fwnode_handle(endpoint); ++ } ++ ++ of_node_put(endpoint); ++ return 0; ++} ++ ++static void max9288_setup_remote_endpoint(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ int i; ++ struct property *csi_rate_prop, *dvp_order_prop; ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); ++ if (csi_rate_prop) { ++ /* CSI2_RATE = PCLK*bpp/lanes */ ++ priv->csi_rate = cpu_to_be32(priv->pclk * dt2bpp[priv->dt] / priv->lanes); ++ csi_rate_prop->value = &priv->csi_rate; ++ of_update_property(rendpoint, csi_rate_prop); ++ } ++ ++ dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); ++ if (dvp_order_prop) ++ of_update_property(rendpoint, dvp_order_prop); ++ } ++ ++ of_node_put(endpoint); ++} ++ ++static int max9288_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct max9288_priv *priv; ++ int err; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ i2c_set_clientdata(client, priv); ++ priv->des_addr = client->addr; ++ priv->client = client; ++ ++ err = max9288_parse_dt(client); ++ if (err) ++ goto out; ++ ++ err = max9288_initialize(client); ++ if (err < 0) ++ goto out; ++ ++ max9288_setup_remote_endpoint(client); ++ ++ v4l2_subdev_init(&priv->sd, &max9288_subdev_ops); ++ priv->sd.owner = client->dev.driver->owner; ++ priv->sd.dev = &client->dev; ++ v4l2_set_subdevdata(&priv->sd, priv); ++ priv->sd.fwnode = priv->sd_fwnode; ++ ++ snprintf(priv->sd.name, V4L2_SUBDEV_NAME_SIZE, "%s %d-%04x", ++ client->dev.driver->name, i2c_adapter_id(client->adapter), ++ client->addr); ++ ++ err = v4l2_async_register_subdev(&priv->sd); ++ if (err < 0) ++ goto out; ++out: ++ return err; ++} ++ ++static int max9288_remove(struct i2c_client *client) ++{ ++ struct max9288_priv *priv = i2c_get_clientdata(client); ++ ++ v4l2_async_unregister_subdev(&priv->sd); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static const struct of_device_id max9288_dt_ids[] = { ++ { .compatible = "maxim,max9288" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, max9288_dt_ids); ++ ++static const struct i2c_device_id max9288_id[] = { ++ { "max9288", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, max9288_id); ++ ++static struct i2c_driver max9288_i2c_driver = { ++ .driver = { ++ .name = "max9288", ++ .of_match_table = of_match_ptr(max9288_dt_ids), ++ }, ++ .probe = max9288_probe, ++ .remove = max9288_remove, ++ .id_table = max9288_id, ++}; ++ ++module_i2c_driver(max9288_i2c_driver); ++ ++MODULE_DESCRIPTION("GMSL driver for MAX9288"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/Kconfig b/drivers/media/i2c/soc_camera/imagers/Kconfig +new file mode 100644 +index 0000000..a6ccf62 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/Kconfig +@@ -0,0 +1,5 @@ ++config SOC_CAMERA_OV106XX ++ tristate "ov106xx camera support" ++ depends on I2C ++ help ++ This is a runtime detected GMSL1/GMSL2/FPDLink3 sensors driver +diff --git a/drivers/media/i2c/soc_camera/imagers/Makefile b/drivers/media/i2c/soc_camera/imagers/Makefile +new file mode 100644 +index 0000000..ca10bbc +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/Makefile +@@ -0,0 +1,2 @@ ++# SPDX-License-Identifier: GPL-2.0 ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += dummy.o +diff --git a/drivers/media/i2c/soc_camera/imagers/dummy.c b/drivers/media/i2c/soc_camera/imagers/dummy.c +new file mode 100644 +index 0000000..d213fff +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/dummy.c +@@ -0,0 +1,491 @@ ++/* ++ * Dummy sensor camera driver ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++struct dummy_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ u8 id[6]; ++ int max_width; ++ int max_height; ++ const char * media_bus_format; ++ int mbus_format; ++}; ++ ++static int width = 1920; ++module_param(width, int, 0644); ++MODULE_PARM_DESC(width, " width (default: 1920)"); ++ ++static int height = 1080; ++module_param(height, int, 0644); ++MODULE_PARM_DESC(height, " height (default: 1080)"); ++ ++static char *mbus = "yuyv"; ++module_param(mbus, charp, 0644); ++MODULE_PARM_DESC(mbus, " MEDIA_BUS_FORMAT (default: YUYV)"); ++ ++static inline struct dummy_priv *to_dummy(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct dummy_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct dummy_priv, hdl)->sd; ++} ++ ++static int dummy_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int dummy_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = priv->mbus_format; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int dummy_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ mf->code = priv->mbus_format; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int dummy_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = priv->mbus_format; ++ ++ return 0; ++} ++ ++static int dummy_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = 'D' >> 8; ++ edid->edid[9] = 'Y' & 0xff; ++ ++ return 0; ++} ++ ++static int dummy_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > priv->max_width) || ++ (rect->top + rect->height > priv->max_height)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int dummy_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int dummy_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int dummy_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ reg->val = 0; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int dummy_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ return 0; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops dummy_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = dummy_g_register, ++ .s_register = dummy_s_register, ++#endif ++}; ++ ++static int dummy_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ case V4L2_CID_GAIN: ++ case V4L2_CID_ANALOGUE_GAIN: ++ case V4L2_CID_EXPOSURE: ++ case V4L2_CID_HFLIP: ++ case V4L2_CID_VFLIP: ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ break; ++ } ++ ++ return 0; ++} ++ ++static const struct v4l2_ctrl_ops dummy_ctrl_ops = { ++ .s_ctrl = dummy_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops dummy_video_ops = { ++ .s_stream = dummy_s_stream, ++ .g_mbus_config = dummy_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops dummy_subdev_pad_ops = { ++ .get_edid = dummy_get_edid, ++ .enum_mbus_code = dummy_enum_mbus_code, ++ .get_selection = dummy_get_selection, ++ .set_selection = dummy_set_selection, ++ .get_fmt = dummy_get_fmt, ++ .set_fmt = dummy_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops dummy_subdev_ops = { ++ .core = &dummy_core_ops, ++ .video = &dummy_video_ops, ++ .pad = &dummy_subdev_pad_ops, ++}; ++ ++static void dummy_otp_id_read(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = to_dummy(client); ++ ++ /* dummy camera id */ ++ priv->id[0] = 'd'; ++ priv->id[1] = 'u'; ++ priv->id[2] = 'm'; ++ priv->id[3] = 'm'; ++ priv->id[4] = 'y'; ++ priv->id[5] = '.'; ++} ++ ++static ssize_t dummy_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ dummy_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_dummy, S_IRUGO, dummy_otp_id_show, NULL); ++ ++static int dummy_initialize(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (strcmp(priv->media_bus_format, "yuyv") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_YUYV8_2X8; ++ else if (strcmp(priv->media_bus_format, "uyvy") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_UYVY8_2X8; ++ else if (strcmp(priv->media_bus_format, "grey") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_Y8_1X8; ++ else if (strcmp(priv->media_bus_format, "rggb8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB8_1X8; ++ else if (strcmp(priv->media_bus_format, "bggr8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR8_1X8; ++ else if (strcmp(priv->media_bus_format, "grbg8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG8_1X8; ++ else if (strcmp(priv->media_bus_format, "rggb12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB12_1X12; ++ else if (strcmp(priv->media_bus_format, "bggr12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR12_1X12; ++ else if (strcmp(priv->media_bus_format, "grbg12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG12_1X12; ++ else if (strcmp(priv->media_bus_format, "rggb14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB14_1X14; ++ else if (strcmp(priv->media_bus_format, "bggr14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR14_1X14; ++ else if (strcmp(priv->media_bus_format, "grbg14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG14_1X14; ++ else if (strcmp(priv->media_bus_format, "rggb16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB16_1X16; ++ else if (strcmp(priv->media_bus_format, "bggr16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR16_1X16; ++ else if (strcmp(priv->media_bus_format, "grbg16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG16_1X16; ++ else { ++ v4l_err(client, "failed to parse mbus format (%s)\n", priv->media_bus_format); ++ return -EINVAL; ++ } ++ ++ /* Read OTP IDs */ ++ dummy_otp_id_read(client); ++ ++ dev_info(&client->dev, "Dummy camera sensor, res %dx%d, mbus %s, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->max_width, priv->max_height, priv->media_bus_format, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ ++ return 0; ++} ++ ++static int dummy_parse_dt(struct device_node *np, struct dummy_priv *priv) ++{ ++ if (of_property_read_u32(np, "dummy,width", &priv->max_width)) ++ priv->max_width = width; ++ ++ if (of_property_read_u32(np, "dummy,height", &priv->max_height)) ++ priv->max_height = height; ++ ++ if (of_property_read_string(np, "dummy,mbus", &priv->media_bus_format)) ++ priv->media_bus_format = mbus; ++ ++ /* module params override dts */ ++ if (strcmp(mbus, "yuyv")) ++ priv->media_bus_format = mbus; ++ if (width != 1920) ++ priv->max_width = width; ++ if (height != 1080) ++ priv->max_height = height; ++ ++ return 0; ++} ++ ++static int dummy_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct dummy_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &dummy_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_GAIN, 1, 0x7ff, 1, 0x200); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0xa); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_EXPOSURE, 1, 0x600, 1, 0x144); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = dummy_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = dummy_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = priv->max_width; ++ priv->rect.height = priv->max_height; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_dummy) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ v4l_err(client, "failed to probe @ 0x%02x (%s)\n", ++ client->addr, client->adapter->name); ++ return ret; ++} ++ ++static int dummy_remove(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_dummy); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id dummy_id[] = { ++ { "dummy-camera", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, dummy_id); ++ ++static const struct of_device_id dummy_of_ids[] = { ++ { .compatible = "dummy-camera", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, dummy_of_ids); ++ ++static struct i2c_driver dummy_i2c_driver = { ++ .driver = { ++ .name = "dummy-camera", ++ .of_match_table = dummy_of_ids, ++ }, ++ .probe = dummy_probe, ++ .remove = dummy_remove, ++ .id_table = dummy_id, ++}; ++module_i2c_driver(dummy_i2c_driver); ++ ++MODULE_DESCRIPTION("Dummy SoC camera driver"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c +deleted file mode 100644 +index 28bd3c3..0000000 +--- a/drivers/media/i2c/soc_camera/max9286.c ++++ /dev/null +@@ -1,1071 +0,0 @@ +-/* +- * MAXIM max9286 GMSL driver +- * +- * Copyright (C) 2015-2018 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-#include "max9286.h" +- +-#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ +-#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ +-#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ +-#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ +-#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ +-#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ +-#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ +-#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ +- +-struct max9286_priv { +- struct v4l2_subdev sd[4]; +- struct fwnode_handle *sd_fwnode[4]; +- int des_addr; +- int des_quirk_addr; /* second MAX9286 on the same I2C bus */ +- int links; +- int links_mask; +- int lanes; +- int csi_rate; +- const char *fsync_mode; +- int fsync_period; +- int fps_numerator; +- int fps_denominator; +- int pclk; +- char pclk_rising_edge; +- int gpio_resetb; +- int active_low_resetb; +- int him; +- int hsync; +- int vsync; +- int timeout; +- int poc_delay; +- int bws; +- int dbl; +- int dt; +- int hsgen; +- u64 crossbar; +- char cb[16]; +- int hts; +- int vts; +- int hts_delay; +- int imager_width; +- atomic_t use_count; +- u32 csi2_outord; +- u32 switchin; +- struct i2c_client *client; +- int max9271_addr_map[4]; +- int ser_id; +- struct gpio_desc *poc_gpio[4]; /* PoC power supply */ +- struct notifier_block reboot_notifier; +- +- /* link statistic */ +- int prbserr[4]; +- int deterr[4]; +- int correrr[4]; +-}; +- +-static char fsync_mode_default[20] = "manual"; /* manual, automatic, semi-automatic, external */ +- +-static int conf_link; +-module_param(conf_link, int, 0644); +-MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); +- +-static int poc_trig; +-module_param(poc_trig, int, 0644); +-MODULE_PARM_DESC(poc_trig, " Use PoC triggering during reverse channel setup. Useful on systems with dedicated PoC and unstable ser-des lock"); +- +-static int him; +-module_param(him, int, 0644); +-MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); +- +-static int fsync_period; +-module_param(fsync_period, int, 0644); +-MODULE_PARM_DESC(fsync_period, " Frame sync period (default: 3.2MHz)"); +- +-static int hsync; +-module_param(hsync, int, 0644); +-MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); +- +-static int vsync = 1; +-module_param(vsync, int, 0644); +-MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); +- +-static int gpio_resetb; +-module_param(gpio_resetb, int, 0644); +-MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); +- +-static int active_low_resetb; +-module_param(active_low_resetb, int, 0644); +-MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); +- +-static int timeout_n = 100; +-module_param(timeout_n, int, 0644); +-MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); +- +-static int poc_delay = 50; +-module_param(poc_delay, int, 0644); +-MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); +- +-static int bws; +-module_param(bws, int, 0644); +-MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); +- +-static int dbl = 1; +-module_param(dbl, int, 0644); +-MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); +- +-static int dt = 3; +-module_param(dt, int, 0644); +-MODULE_PARM_DESC(dt, " DataType (default: 3 - YUV8), 0 - RGB888, 5 - RAW8, 6 - RAW10, 7 - RAW12, 8 - RAW14"); +- +-static int hsgen; +-module_param(hsgen, int, 0644); +-MODULE_PARM_DESC(hsgen, " Enable HS embedded generator (default: 0 - disabled)"); +- +-static int pclk = 100; +-module_param(pclk, int, 0644); +-MODULE_PARM_DESC(pclk, " PCLK rate (default: 100MHz)"); +- +-static int switchin = 0; +-module_param(switchin, int, 0644); +-MODULE_PARM_DESC(switchin, " COAX SWITCH IN+ and IN- (default: 0 - not switched)"); +- +-static unsigned long crossbar = 0xba9876543210; +-module_param(crossbar, ulong, 0644); +-MODULE_PARM_DESC(crossbar, " Crossbar setup (default: ba9876543210 - reversed)"); +- +-enum { +- RGB888_DT = 0, +- RGB565_DT, +- RGB666_DT, +- YUV8_DT, /* default */ +- YUV10_DT, +- RAW8_DT, +- RAW10_DT, +- RAW12_DT, +- RAW14_DT, +-}; +- +-static int dt2bpp [9] = { +- 24, /* RGB888 */ +- 16, /* RGB565 */ +- 18, /* RGB666 */ +- 8, /* YUV8 - default */ +- 10, /* YUV10 */ +- 8, /* RAW8/RAW16 */ +- 10, /* RAW10 */ +- 12, /* RAW12 */ +- 14, /* RAW14 */ +-}; +- +-static char* ser_name(int id) +-{ +- switch (id) { +- case MAX9271_ID: +- return "MAX9271"; +- case MAX96705_ID: +- return "MAX96705"; +- case MAX96707_ID: +- return "MAX96707"; +- default: +- return "unknown"; +- } +-} +- +-static void max9286_write_remote_verify(struct i2c_client *client, int idx, u8 reg, u8 val) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- int timeout; +- +- for (timeout = 0; timeout < 10; timeout++) { +- int tmp_addr; +- u8 sts = 0; +- u8 val2 = 0; +- +- reg8_write(client, reg, val); +- +- tmp_addr = client->addr; +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_read(client, 0x70, &sts); +- client->addr = tmp_addr; +- if (sts & BIT(idx)) /* if ACKed */ { +- reg8_read(client, reg, &val2); +- if (val2 == val) +- break; +- } +- +- usleep_range(1000, 1500); +- } +- +- if (timeout >= 10) +- dev_err(&client->dev, "timeout remote write acked\n"); +-} +- +-static void max9286_preinit(struct i2c_client *client, int addr) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- +- client->addr = addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x0a, 0x00); /* disable reverse control for all cams */ +- reg8_write(client, 0x00, 0x00); /* disable all GMSL links [0:3] */ +-// usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x1b, priv->switchin); /* coax polarity (default - normal) */ +- reg8_write(client, 0x1c, (priv->him ? 0xf0 : 0x00) | +- (priv->bws ? 0x05 : 0x04)); /* high-immunity/legacy mode, BWS 24bit */ +-} +- +-static void max9286_sensor_reset(struct i2c_client *client, int addr, int reset_on) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- +- if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) +- return; +- +- if (priv->active_low_resetb) +- reset_on = !reset_on; +- +- /* sensor reset/unreset using serializer gpio */ +- client->addr = addr; +- reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | (reset_on ? BIT(priv->gpio_resetb) : 0)); /* set GPIOn value */ +- reg8_write(client, 0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ +-} +- +-static void max9286_postinit(struct i2c_client *client, int addr) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- int idx; +- +- for (idx = 0; idx < priv->links; idx++) { +- if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) +- continue; +- +- client->addr = priv->des_addr; /* MAX9286 I2C */ +- reg8_write(client, 0x00, 0xe0 | BIT(idx)); /* enable GMSL link for CAMx */ +- reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse/forward control for CAMx */ +- usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ +- +- client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C */ +- max9286_sensor_reset(client, client->addr, 0); /* sensor unreset using gpios. TODO: should be in imager driver */ +- } +- +- client->addr = addr; /* MAX9286 I2C */ +- reg8_write(client, 0x0a, 0x00); /* disable reverse control for all cams */ +- reg8_write(client, 0x00, 0xe0 | priv->links_mask); /* enable GMSL link for CAMs */ +- reg8_write(client, 0x0b, priv->csi2_outord); /* CSI2 output order */ +- reg8_write(client, 0x15, 0x9b); /* enable CSI output, VC is set accordingly to Link number, BIT7 magic must be set */ +- reg8_write(client, 0x1b, priv->switchin | priv->links_mask); /* coax polarity, enable equalizer for CAMs */ +- usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ +- +- if (strcmp(priv->fsync_mode, "manual") == 0) { +- reg8_write(client, 0x01, 0x00); /* manual: FRAMESYNC set manually via [0x06:0x08] regs */ +- } else if (strcmp(priv->fsync_mode, "automatic") == 0) { +- reg8_write(client, 0x01, 0x02); /* automatic: FRAMESYNC taken from the slowest Link */ +- } else if (strcmp(priv->fsync_mode, "semi-automatic") == 0) { +- reg8_write(client, 0x01, 0x01); /* semi-automatic: FRAMESYNC taken from the slowest Link */ +- } else if (strcmp(priv->fsync_mode, "external") == 0) { +- reg8_write(client, 0x01, 0xc0); /* ECU (aka MCU) based FrameSync using GPI-to-GPO */ +- } +-} +- +-static int max9286_reverse_channel_setup(struct i2c_client *client, int idx) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- u8 val = 0, lock_sts = 0, link_sts = 0; +- int timeout = priv->timeout; +- char timeout_str[40]; +- int ret = 0; +- +- /* Reverse channel enable */ +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x34, 0xa2 | MAXIM_I2C_I2C_SPEED); /* enable artificial ACKs, I2C speed set */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x00, 0xe0 | BIT(idx)); /* enable GMSL link for CAMx */ +- reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse control for CAMx */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- +- for (;;) { +- if (priv->him) { +- /* HIM mode setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x4d, 0xc0); +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- if (priv->bws) { +- reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- } else { +- /* Legacy mode setup */ +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x3f, 0x4f); /* enable custom reverse channel & first pulse length */ +- reg8_write(client, 0x3b, 0x1e); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x08, 0x01); /* reverse channel receiver high threshold enable */ +- reg8_write(client, 0x97, 0x5f); /* enable reverse control channel programming (MAX96705-MAX96711 only) */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- if (priv->bws) { +- reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x3b, 0x19); /* reverse channel increase amplitude 170mV to compensate high threshold enabled */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_read(client, 0x1e, &val); /* read max9271 ID */ +- if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID || --timeout == 0) { +- priv->ser_id = val; +- break; +- } +- +- /* Check if already initialized (after reboot/reset ?) */ +- client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C */ +- reg8_read(client, 0x1e, &val); /* read max9271 ID */ +- if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { +- priv->ser_id = val; +- reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- ret = -EADDRINUSE; +- break; +- } +- +- if (poc_trig) { +- if (!IS_ERR(priv->poc_gpio[idx]) && (timeout % poc_trig == 0)) { +- gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ +- mdelay(200); +- gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ +- mdelay(priv->poc_delay); +- } +- } +- } +- +- max9286_sensor_reset(client, client->addr, 1); /* sensor reset */ +- +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_read(client, 0x27, &lock_sts); /* LOCK status */ +- reg8_read(client, 0x49, &link_sts); /* LINK status */ +- +- if (!timeout) { +- ret = -ETIMEDOUT; +- goto out; +- } +- +- priv->links_mask |= BIT(idx); +- priv->csi2_outord &= ~(0x3 << (idx * 2)); +- priv->csi2_outord |= ((hweight8(priv->links_mask) - 1) << (idx * 2)); +- +-out: +- sprintf(timeout_str, "retries=%d lock_sts=%d link_sts=0x%x", priv->timeout - timeout, !!(lock_sts & 0x80), link_sts & (0x11 << idx)); +- dev_info(&client->dev, "link%d %s %sat 0x%x %s %s\n", idx, ser_name(priv->ser_id), +- ret == -EADDRINUSE ? "already " : "", priv->max9271_addr_map[idx], +- ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", +- priv->timeout - timeout ? timeout_str : ""); +- +- return ret; +-} +- +-static void max9286_initial_setup(struct i2c_client *client) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- +- /* Initial setup */ +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x15, 0x13); /* disable CSI output, VC is set accordingly to Link number */ +- reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ +- reg8_write(client, 0x12, ((priv->lanes - 1) << 6) | +- (priv->dbl ? 0x30 : 0) | +- (priv->dt & 0xf)); /* setup lanes, DBL mode, DataType */ +- +- /* Start GMSL initialization with FSYNC disabled. This is required for some odd LVDS cameras */ +- reg8_write(client, 0x01, 0xc0); /* ECU (aka MCU) based FrameSync using GPI-to-GPO */ +- reg8_write(client, 0x06, priv->fsync_period & 0xff); +- reg8_write(client, 0x07, (priv->fsync_period >> 8) & 0xff); +- reg8_write(client, 0x08, priv->fsync_period >> 16); +- +- reg8_write(client, 0x63, 0); /* disable overlap window */ +- reg8_write(client, 0x64, 0); +- reg8_write(client, 0x0c, 0x91 | (priv->vsync ? BIT(3) : 0) | (priv->hsync ? BIT(2) : 0)); /* enable HS/VS encoding, use D14/15 for HS/VS, invert HS/VS */ +- reg8_write(client, 0x19, 0x0c); /* Drive HSTRAIL state for 120ns after the last payload bit */ +-} +- +-static void max9286_gmsl_link_setup(struct i2c_client *client, int idx) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- +- /* GMSL setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ +- reg8_write(client, 0x07, 0x04 | (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding enabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms */ +- reg8_write(client, 0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ +- usleep_range(2000, 2500); /* wait 2ms */ +- +- if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) { +- switch (priv->dt) { +- case YUV8_DT: +- /* setup crossbar for YUV8/RAW8: reverse DVP bus */ +- reg8_write(client, 0x20, priv->cb[7]); +- reg8_write(client, 0x21, priv->cb[6]); +- reg8_write(client, 0x22, priv->cb[5]); +- reg8_write(client, 0x23, priv->cb[4]); +- reg8_write(client, 0x24, priv->cb[3]); +- reg8_write(client, 0x25, priv->cb[2]); +- reg8_write(client, 0x26, priv->cb[1]); +- reg8_write(client, 0x27, priv->cb[0]); +- +- /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, priv->cb[7] + 16); +- reg8_write(client, 0x31, priv->cb[6] + 16); +- reg8_write(client, 0x32, priv->cb[5] + 16); +- reg8_write(client, 0x33, priv->cb[4] + 16); +- reg8_write(client, 0x34, priv->cb[3] + 16); +- reg8_write(client, 0x35, priv->cb[2] + 16); +- reg8_write(client, 0x36, priv->cb[1] + 16); +- reg8_write(client, 0x37, priv->cb[0] + 16); +- break; +- case RAW12_DT: +- /* setup crossbar for RAW12: reverse DVP bus */ +- reg8_write(client, 0x20, priv->cb[11]); +- reg8_write(client, 0x21, priv->cb[10]); +- reg8_write(client, 0x22, priv->cb[9]); +- reg8_write(client, 0x23, priv->cb[8]); +- reg8_write(client, 0x24, priv->cb[7]); +- reg8_write(client, 0x25, priv->cb[6]); +- reg8_write(client, 0x26, priv->cb[5]); +- reg8_write(client, 0x27, priv->cb[4]); +- reg8_write(client, 0x28, priv->cb[3]); +- reg8_write(client, 0x29, priv->cb[2]); +- reg8_write(client, 0x2a, priv->cb[1]); +- reg8_write(client, 0x2b, priv->cb[0]); +- +- /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, priv->cb[11] + 16); +- reg8_write(client, 0x31, priv->cb[10] + 16); +- reg8_write(client, 0x32, priv->cb[9] + 16); +- reg8_write(client, 0x33, priv->cb[8] + 16); +- reg8_write(client, 0x34, priv->cb[7] + 16); +- reg8_write(client, 0x35, priv->cb[6] + 16); +- reg8_write(client, 0x36, priv->cb[5] + 16); +- reg8_write(client, 0x37, priv->cb[4] + 16); +- reg8_write(client, 0x38, priv->cb[3] + 16); +- reg8_write(client, 0x39, priv->cb[2] + 16); +- reg8_write(client, 0x3a, priv->cb[1] + 16); +- reg8_write(client, 0x3b, priv->cb[0] + 16); +- +- if (!priv->bws && priv->dbl) +- dev_err(&client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); +- +- break; +- } +- +- if (priv->hsgen) { +- /* HS/VS pins map */ +- reg8_write(client, 0x3f, 0x10); /* HS (NC) */ +- reg8_write(client, 0x41, 0x10); /* DE (NC) */ +- if (priv->ser_id == MAX96705_ID) +- reg8_write(client, 0x40, 15); /* VS (DIN13) */ +- if (priv->ser_id == MAX96707_ID) +- reg8_write(client, 0x40, 13); /* VS (DIN13) */ +-#if 0 +- /* following must come from imager */ +-#define SENSOR_WIDTH (1280*2) +-#define HTS (1288*2) +-#define VTS 960 +-#define HTS_DELAY 0x9 +- reg8_write(client, 0x4e, HTS_DELAY >> 16); /* HS delay */ +- reg8_write(client, 0x4f, (HTS_DELAY >> 8) & 0xff); +- reg8_write(client, 0x50, HTS_DELAY & 0xff); +- reg8_write(client, 0x54, SENSOR_WIDTH >> 8); /* HS high period */ +- reg8_write(client, 0x55, SENSOR_WIDTH & 0xff); +- reg8_write(client, 0x56, (HTS - SENSOR_WIDTH) >> 8); /* HS low period */ +- reg8_write(client, 0x57, (HTS - SENSOR_WIDTH) & 0xff); +- reg8_write(client, 0x58, VTS >> 8); /* HS count */ +- reg8_write(client, 0x59, VTS & 0xff ); +-#endif +- reg8_write(client, 0x43, 0x15); /* enable HS generator */ +- } +- } +- +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- reg8_write(client, 0x34, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ +- usleep_range(2000, 2500); /* wait 2ms */ +- +- /* I2C translator setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +-// reg8_write(client, 0x09, maxim_map[2][idx] << 1); /* SENSOR I2C translated - must be set by sensor driver */ +-// reg8_write(client, 0x0A, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ +- reg8_write(client, 0x0B, BROADCAST << 1); /* broadcast I2C */ +- reg8_write(client, 0x0C, priv->max9271_addr_map[idx] << 1); /* MAX9271-CAMx I2C new */ +- /* I2C addresse change */ +- reg8_write(client, 0x01, priv->des_addr << 1); /* MAX9286 I2C */ +- reg8_write(client, 0x00, priv->max9271_addr_map[idx] << 1); /* MAX9271-CAM0 I2C new */ +- usleep_range(2000, 2500); /* wait 2ms */ +- /* put MAX9271 in configuration link state */ +- client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C new */ +- reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms */ +-#ifdef MAXIM_DUMP +- client->addr = priv->des_addr; /* MAX9286-CAMx I2C */ +- maxim_max927x_dump_regs(client); +- client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx I2C new */ +- maxim_max927x_dump_regs(client); +-#endif +-} +- +-static int max9286_initialize(struct i2c_client *client) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- int idx, ret; +- +- dev_info(&client->dev, "LINKs=%d, LANES=%d, FSYNC mode=%s, FSYNC period=%d, PCLK edge=%s\n", +- priv->links, priv->lanes, priv->fsync_mode, priv->fsync_period, +- priv->pclk_rising_edge ? "rising" : "falling"); +- +- if (priv->des_quirk_addr) +- max9286_preinit(client, priv->des_quirk_addr); +- +- max9286_preinit(client, priv->des_addr); +- max9286_initial_setup(client); +- +- for (idx = 0; idx < priv->links; idx++) { +- if (!IS_ERR(priv->poc_gpio[idx])) { +- gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ +- mdelay(priv->poc_delay); +- } +- +- ret = max9286_reverse_channel_setup(client, idx); +- if (ret) +- continue; +- max9286_gmsl_link_setup(client, idx); +- } +- +- max9286_postinit(client, priv->des_addr); +- +- client->addr = priv->des_addr; +- +- return 0; +-} +- +-#ifdef CONFIG_VIDEO_ADV_DEBUG +-static int max9286_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- int ret; +- u8 val = 0; +- +- ret = reg8_read(client, (u8)reg->reg, &val); +- if (ret < 0) +- return ret; +- +- reg->val = val; +- reg->size = sizeof(u8); +- +- return 0; +-} +- +-static int max9286_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- return reg8_write(client, (u8)reg->reg, (u8)reg->val); +-} +-#endif +- +-static int max9286_s_power(struct v4l2_subdev *sd, int on) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- if (on) { +- if (atomic_inc_return(&priv->use_count) == 1) +- reg8_write(client, 0x69, priv->links_mask ^ 0x0f); /* unmask CSI forwarding from detected links */ +- } else { +- if (atomic_dec_return(&priv->use_count) == 0) +- reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ +- } +- +- return 0; +-} +- +-static int max9286_registered_async(struct v4l2_subdev *sd) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- int idx, tmp_addr; +- +- /* switch to GMSL serial_link for streaming video */ +- tmp_addr = client->addr; +- idx = sd->grp_id; +- +- client->addr = priv->des_addr; /* MAX9286 I2C */ +- reg8_write(client, 0x0a, 0x11 << idx); /* enable reverse/forward control for CAMx */ +- +- client->addr = priv->max9271_addr_map[idx]; /* MAX9271-CAMx */ +- max9286_write_remote_verify(client, idx, 0x04, conf_link ? 0x43 : 0x83); +-// usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ +- +- client->addr = priv->des_addr; /* MAX9286 I2C */ +- reg8_write(client, 0x0a, (priv->links_mask << 4) | priv->links_mask); /* enable reverse/forward control for all CAMs */ +- +- client->addr = tmp_addr; +- +- return 0; +-} +- +-static int max9286_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) +-{ +- struct max9286_priv *priv = container_of(nb, struct max9286_priv, reboot_notifier); +- int idx; +- +- for (idx = 0; idx < priv->links; idx++) { +- if (!IS_ERR(priv->poc_gpio[idx])) +- gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ +- } +- +- return NOTIFY_OK; +-} +- +-static struct v4l2_subdev_core_ops max9286_subdev_core_ops = { +-#ifdef CONFIG_VIDEO_ADV_DEBUG +- .g_register = max9286_g_register, +- .s_register = max9286_s_register, +-#endif +- .s_power = max9286_s_power, +- .registered_async = max9286_registered_async, +-}; +- +-static int max9286_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) +-{ +- return 0; +-} +- +-static int max9286_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- struct v4l2_captureparm *cp = &parms->parm.capture; +- +- if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) +- return -EINVAL; +- if (cp->extendedmode != 0) +- return -EINVAL; +- +- if (priv->fps_denominator != cp->timeperframe.denominator || +- priv->fps_numerator != cp->timeperframe.numerator) { +- int f_period; +- +- f_period = priv->fsync_period * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; +- reg8_write(client, 0x06, f_period & 0xff); +- reg8_write(client, 0x07, (f_period >> 8) & 0xff); +- reg8_write(client, 0x08, f_period >> 16); +- +- priv->fps_numerator = cp->timeperframe.numerator; +- priv->fps_denominator = cp->timeperframe.denominator; +- } +- +- return 0; +-} +- +-static struct v4l2_subdev_video_ops max9286_video_ops = { +- .g_parm = max9286_g_parm, +- .s_parm = max9286_s_parm, +-}; +- +-static struct v4l2_subdev_ops max9286_subdev_ops = { +- .core = &max9286_subdev_core_ops, +- .video = &max9286_video_ops, +-}; +- +-static int max9286_parse_dt(struct i2c_client *client) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- struct device_node *np = client->dev.of_node; +- struct device_node *endpoint = NULL; +- struct property *prop; +- int err, pwen, i; +- int sensor_delay, gpio0 = 1, gpio1 = 1; +- u8 val = 0; +- char poc_name[10]; +- +- if (of_property_read_u32(np, "maxim,links", &priv->links)) +- priv->links = 4; +- +- if (of_property_read_u32(np, "maxim,lanes", &priv->lanes)) +- priv->lanes = 4; +- +- pwen = of_get_gpio(np, 0); +- if (pwen > 0) { +- err = gpio_request_one(pwen, GPIOF_OUT_INIT_HIGH, dev_name(&client->dev)); +- if (err) +- dev_err(&client->dev, "cannot request PWEN gpio %d: %d\n", pwen, err); +- } +- +- mdelay(250); +- +- for (i = 0; i < 4; i++) { +- sprintf(poc_name, "POC%d", i); +- priv->poc_gpio[i] = devm_gpiod_get_optional(&client->dev, kstrdup(poc_name, GFP_KERNEL), 0); +- } +- +- reg8_read(client, 0x1e, &val); /* read max9286 ID */ +- if (val != MAX9286_ID) { +- prop = of_find_property(np, "reg", NULL); +- if (prop) +- of_remove_property(np, prop); +- return -ENODEV; +- } +- +- if (!of_property_read_u32(np, "maxim,gpio0", &gpio0) || +- !of_property_read_u32(np, "maxim,gpio1", &gpio1)) +- reg8_write(client, 0x0f, 0x08 | (gpio1 << 1) | gpio0); +- +- if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { +- priv->gpio_resetb = -1; +- } else { +- if (of_property_read_bool(np, "maxim,resetb-active-high")) +- priv->active_low_resetb = 0; +- else +- priv->active_low_resetb = 1; +- } +- +- if (!of_property_read_u32(np, "maxim,sensor_delay", &sensor_delay)) +- mdelay(sensor_delay); +- if (of_property_read_string(np, "maxim,fsync-mode", &priv->fsync_mode)) +- priv->fsync_mode = fsync_mode_default; +- if (of_property_read_u32(np, "maxim,fsync-period", &priv->fsync_period)) +- priv->fsync_period = 3200000; /* 96MHz/30fps */ +- priv->pclk_rising_edge = true; +- if (of_property_read_bool(np, "maxim,pclk-falling-edge")) +- priv->pclk_rising_edge = false; +- if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) +- priv->timeout = 100; +- if (of_property_read_u32(np, "maxim,i2c-quirk", &priv->des_quirk_addr)) +- priv->des_quirk_addr = 0; +- if (of_property_read_u32(np, "maxim,him", &priv->him)) +- priv->him = 0; +- if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) +- priv->hsync = 0; +- if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) +- priv->vsync = 1; +- if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) +- priv->poc_delay = 50; +- if (of_property_read_u32(np, "maxim,bws", &priv->bws)) +- priv->bws = 0; +- if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) +- priv->dbl = 1; +- if (of_property_read_u32(np, "maxim,dt", &priv->dt)) +- priv->dt = 3; +- if (of_property_read_u32(np, "maxim,hsgen", &priv->hsgen)) +- priv->hsgen = 0; +- if (of_property_read_u32(np, "maxim,pclk", &priv->pclk)) +- priv->pclk = pclk; +- if (of_property_read_u32(np, "maxim,switchin", &priv->switchin)) +- priv->switchin = 0; +- if (of_property_read_u64(np, "maxim,crossbar", &priv->crossbar)) +- priv->crossbar = crossbar; +- +- /* module params override dts */ +- if (him) +- priv->him = him; +- if (fsync_period) { +- priv->fsync_period = fsync_period; +- priv->fsync_mode = fsync_mode_default; +- } +- if (hsync) +- priv->hsync = hsync; +- if (!vsync) +- priv->vsync = vsync; +- if (gpio_resetb) +- priv->gpio_resetb = gpio_resetb; +- if (active_low_resetb) +- priv->active_low_resetb = active_low_resetb; +- if (timeout_n) +- priv->timeout = timeout_n; +- if (poc_delay) +- priv->poc_delay = poc_delay; +- if (bws) +- priv->bws = bws; +- if (!dbl) +- priv->dbl = dbl; +- if (dt != 3) +- priv->dt = dt; +- if (hsgen) +- priv->hsgen = hsgen; +- if (pclk != 100) +- priv->pclk = pclk; +- if (switchin) +- priv->switchin = switchin; +- +- /* parse crossbar setup */ +- for (i = 0; i < 16; i++) { +- priv->cb[i] = priv->crossbar % 16; +- priv->crossbar /= 16; +- } +- +- for (i = 0; i < priv->links; i++) { +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (!endpoint) +- break; +- +- if (of_property_read_u32(endpoint, "max9271-addr", &priv->max9271_addr_map[i])) { +- of_node_put(endpoint); +- dev_err(&client->dev, "max9271-addr not set\n"); +- return -EINVAL; +- } +- +- priv->sd_fwnode[i] = of_fwnode_handle(endpoint); +- } +- +- of_node_put(endpoint); +- return 0; +-} +- +-static void max9286_setup_remote_endpoint(struct i2c_client *client) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- struct device_node *np = client->dev.of_node; +- struct device_node *endpoint = NULL, *rendpoint = NULL; +- int i; +- struct property *csi_rate_prop, *dvp_order_prop; +- +- for (i = 0; ; i++) { +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (!endpoint) +- break; +- +- rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); +- if (!rendpoint) +- continue; +- +- csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); +- if (csi_rate_prop) { +- /* CSI2_RATE = PCLK*bpp*links/lanes */ +- priv->csi_rate = cpu_to_be32(priv->pclk * dt2bpp[priv->dt] * hweight8(priv->links_mask) / priv->lanes); +- csi_rate_prop->value = &priv->csi_rate; +- of_update_property(rendpoint, csi_rate_prop); +- } +- +- dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); +- if (dvp_order_prop) +- of_update_property(rendpoint, dvp_order_prop); +- } +- +- of_node_put(endpoint); +-} +- +-static const char *line_status[] = +-{ +- "BAT", +- "GND", +- "NORMAL", +- "OPEN" +-}; +- +-static ssize_t max9286_link_show(struct device *dev, +- struct device_attribute *attr, char *buf) +-{ +- int i = -1; +- u8 val = 0; +- bool lenghterr, linebuffof, hlocked, prbsok, vsyncdet, configdet, videodet; +- int lf; +- u8 prbserr = 0, deterr = 0, correrr = 0; +- struct i2c_client *client = to_i2c_client(dev); +- struct max9286_priv *priv = i2c_get_clientdata(client); +- +- if (!sscanf(attr->attr.name, "link_%d", &i)) +- return -EINVAL; +- +- if ((i < 0) || (i > 3)) +- return -EINVAL; +- +- reg8_read(client, 0x20, &val); +- lf = (val >> (2 * i)) & 0x03; +- +- reg8_read(client, 0x21, &val); +- hlocked = !!(val & (1 << i)); +- prbsok = !!(val & (1 << (i + 4))); +- +- reg8_read(client, 0x22, &val); +- lenghterr = !!(val & (1 << i)); +- linebuffof = !!(val & (1 << (i + 4))); +- +- reg8_read(client, 0x23 + i, &prbserr); +- priv->prbserr[i] += prbserr; +- +- reg8_read(client, 0x27, &val); +- vsyncdet = !!(val & (1 << i)); +- +- reg8_read(client, 0x28 + i, &deterr); +- priv->deterr[i] += deterr; +- +- reg8_read(client, 0x2c + i, &correrr); +- priv->correrr[i] += correrr; +- +- reg8_read(client, 0x49, &val); +- configdet = !!(val & (1 << i)); +- videodet = !!(val & (1 << (i + 4))); +- +- return sprintf(buf, "LINK:%d LF:%s HLOCKED:%d PRBSOK:%d LINBUFFOF:%d" +- " LENGHTERR:%d VSYNCDET:%d CONFIGDET:%d VIDEODET:%d" +- " PRBSERR:%d(%d) DETEERR:%d(%d) CORRERR:%d(%d)\n", +- i, line_status[lf], hlocked, prbsok, lenghterr, +- linebuffof, vsyncdet, configdet, videodet, +- priv->prbserr[i], prbserr, +- priv->deterr[i], deterr, +- priv->correrr[i], correrr); +- return 0; +-} +- +-static DEVICE_ATTR(link_0, S_IRUGO, max9286_link_show, NULL); +-static DEVICE_ATTR(link_1, S_IRUGO, max9286_link_show, NULL); +-static DEVICE_ATTR(link_2, S_IRUGO, max9286_link_show, NULL); +-static DEVICE_ATTR(link_3, S_IRUGO, max9286_link_show, NULL); +- +-static struct attribute *max9286_attributes_links[] = { +- &dev_attr_link_0.attr, +- &dev_attr_link_1.attr, +- &dev_attr_link_2.attr, +- &dev_attr_link_3.attr, +- NULL +-}; +- +-static const struct attribute_group max9286_group = { +- .attrs = max9286_attributes_links, +-}; +- +-static int max9286_probe(struct i2c_client *client, +- const struct i2c_device_id *did) +-{ +- struct max9286_priv *priv; +- int err, i; +- +- priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- i2c_set_clientdata(client, priv); +- priv->des_addr = client->addr; +- priv->client = client; +- atomic_set(&priv->use_count, 0); +- priv->csi2_outord = 0xff; +- priv->fps_numerator = 1; +- priv->fps_denominator = 30; +- +- err = max9286_parse_dt(client); +- if (err) +- goto out; +- +- err = max9286_initialize(client); +- if (err < 0) +- goto out; +- +- max9286_setup_remote_endpoint(client); +- +- for (i = 0; i < 4; i++) { +- v4l2_subdev_init(&priv->sd[i], &max9286_subdev_ops); +- priv->sd[i].owner = client->dev.driver->owner; +- priv->sd[i].dev = &client->dev; +- priv->sd[i].grp_id = i; +- v4l2_set_subdevdata(&priv->sd[i], priv); +- priv->sd[i].fwnode = priv->sd_fwnode[i]; +- +- snprintf(priv->sd[i].name, V4L2_SUBDEV_NAME_SIZE, "%s.%d %d-%04x", +- client->dev.driver->name, i, i2c_adapter_id(client->adapter), +- client->addr); +- +- err = v4l2_async_register_subdev(&priv->sd[i]); +- if (err < 0) +- goto out; +- } +- +- priv->reboot_notifier.notifier_call = max9286_reboot_notifier; +- err = register_reboot_notifier(&priv->reboot_notifier); +- if (err) { +- dev_err(&client->dev, "failed to register reboot notifier\n"); +- goto out; +- } +- +- err = sysfs_create_group(&client->dev.kobj, +- &max9286_group); +- if (err < 0) +- dev_err(&client->dev, "Sysfs registration failed\n"); +-out: +- return err; +-} +- +-static int max9286_remove(struct i2c_client *client) +-{ +- struct max9286_priv *priv = i2c_get_clientdata(client); +- int i; +- +- sysfs_remove_group(&client->dev.kobj, &max9286_group); +- unregister_reboot_notifier(&priv->reboot_notifier); +- +- for (i = 0; i < 4; i++) { +- v4l2_async_unregister_subdev(&priv->sd[i]); +- v4l2_device_unregister_subdev(&priv->sd[i]); +- } +- +- return 0; +-} +- +-static const struct of_device_id max9286_dt_ids[] = { +- { .compatible = "maxim,max9286" }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, max9286_dt_ids); +- +-static const struct i2c_device_id max9286_id[] = { +- { "max9286", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, max9286_id); +- +-static struct i2c_driver max9286_i2c_driver = { +- .driver = { +- .name = "max9286", +- .of_match_table = of_match_ptr(max9286_dt_ids), +- }, +- .probe = max9286_probe, +- .remove = max9286_remove, +- .id_table = max9286_id, +-}; +- +-module_i2c_driver(max9286_i2c_driver); +- +-MODULE_DESCRIPTION("GMSL driver for MAX9286"); +-MODULE_AUTHOR("Vladimir Barinov"); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/max9288.c b/drivers/media/i2c/soc_camera/max9288.c +deleted file mode 100644 +index 4840795..0000000 +--- a/drivers/media/i2c/soc_camera/max9288.c ++++ /dev/null +@@ -1,768 +0,0 @@ +-/* +- * MAXIM max9288 GMSL driver +- * +- * Copyright (C) 2019 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-#include "max9286.h" +- +-#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ +-#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ +-#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ +-#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ +-#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ +-#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ +-#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ +-#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ +- +-struct max9288_priv { +- struct v4l2_subdev sd; +- struct fwnode_handle *sd_fwnode; +- int des_addr; +- int lanes; +- int csi_rate; +- int pclk; +- char pclk_rising_edge; +- int gpio_resetb; +- int active_low_resetb; +- int him; +- int hsync; +- int vsync; +- int timeout; +- int poc_delay; +- int bws; +- int dbl; +- int dt; +- int hsgen; +- int hts; +- int vts; +- int hts_delay; +- struct i2c_client *client; +- int max9271_addr; +- int ser_id; +- struct gpio_desc *poc_gpio; /* PoC power supply */ +-}; +- +-static int conf_link; +-module_param(conf_link, int, 0644); +-MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); +- +-static int poc_trig; +-module_param(poc_trig, int, 0644); +-MODULE_PARM_DESC(poc_trig, " Use PoC triggering during reverse channel setup. Useful on systems with dedicated PoC and unstable ser-des lock"); +- +-static int him = 0; +-module_param(him, int, 0644); +-MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); +- +-static int hsync; +-module_param(hsync, int, 0644); +-MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); +- +-static int vsync = 1; +-module_param(vsync, int, 0644); +-MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); +- +-static int gpio_resetb; +-module_param(gpio_resetb, int, 0644); +-MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); +- +-static int active_low_resetb; +-module_param(active_low_resetb, int, 0644); +-MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); +- +-static int timeout_n = 100; +-module_param(timeout_n, int, 0644); +-MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); +- +-static int poc_delay = 50; +-module_param(poc_delay, int, 0644); +-MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); +- +-static int bws = 0; +-module_param(bws, int, 0644); +-MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); +- +-static int dbl = 1; +-module_param(dbl, int, 0644); +-MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); +- +-static int dt = 3; +-module_param(dt, int, 0644); +-MODULE_PARM_DESC(dt, " DataType (default: 3 - YUV8), 0 - RGB888, 5 - RAW8, 6 - RAW10, 7 - RAW12, 8 - RAW14"); +- +-static int hsgen; +-module_param(hsgen, int, 0644); +-MODULE_PARM_DESC(hsgen, " Enable HS embedded generator (default: 0 - disabled)"); +- +-static int pclk = 100; +-module_param(pclk, int, 0644); +-MODULE_PARM_DESC(pclk, " PCLK rate (default: 100MHz)"); +- +-enum { +- RGB888_DT = 0, +- RGB565_DT, +- RGB666_DT, +- YUV8_DT, /* default */ +- YUV10_DT, +- RAW8_DT, +- RAW10_DT, +- RAW12_DT, +- RAW14_DT, +-}; +- +-static int dt2bpp [9] = { +- 24, /* RGB888 */ +- 16, /* RGB565 */ +- 18, /* RGB666 */ +- 8, /* YUV8 - default */ +- 10, /* YUV10 */ +- 8, /* RAW8/RAW16 */ +- 10, /* RAW10 */ +- 12, /* RAW12 */ +- 14, /* RAW14 */ +-}; +- +-static char* ser_name(int id) +-{ +- switch (id) { +- case MAX9271_ID: +- return "MAX9271"; +- case MAX96705_ID: +- return "MAX96705"; +- case MAX96707_ID: +- return "MAX96707"; +- default: +- return "unknown"; +- } +-} +- +-static void max9288_write_remote_verify(struct i2c_client *client, u8 reg, u8 val) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- int timeout; +- +- for (timeout = 0; timeout < 10; timeout++) { +- u8 val2 = 0; +- +- reg8_write(client, reg, val); +- reg8_read(client, reg, &val2); +- if (val2 == val) +- break; +- +- usleep_range(1000, 1500); +- } +- +- if (timeout >= 10) +- dev_err(&client->dev, "timeout remote write acked\n"); +-} +- +- +-static void max9288_preinit(struct i2c_client *client, int addr) +-{ +- +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- client->addr = addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x04, 0x00); /* disable reverse control */ +- reg8_write(client, 0x16, (priv->him ? 0x80 : 0x00) | +- 0x5a); /* high-immunity/legacy mode */ +-} +- +-static void max9288_sensor_reset(struct i2c_client *client, int addr, int reset_on) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) +- return; +- +- /* sensor reset/unreset */ +- client->addr = addr; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | /* set GPIOn value to reset/unreset */ +- ((priv->active_low_resetb ? BIT(priv->gpio_resetb) : 0) ^ reset_on)); +- reg8_write(client, 0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ +-} +- +-static int max9288_reverse_channel_setup(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- u8 val = 0, lock_sts = 0; +- int timeout = priv->timeout; +- char timeout_str[40]; +- int ret = 0; +- +- /* Reverse channel enable */ +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x1c, 0xa2 | MAXIM_I2C_I2C_SPEED); /* enable artificial ACKs, I2C speed set */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x04, 0x03); /* enable reverse control */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- +- for (;;) { +- if (priv->him) { +- /* HIM mode setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x4d, 0xc0); +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- if (priv->bws) { +- reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS disabled enabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- } else { +- /* Legacy mode setup */ +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x13, 0x00); +- reg8_write(client, 0x11, 0x42); /* enable custom reverse channel & first pulse length */ +- reg8_write(client, 0x0a, 0x0f); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x04, 0x43); /* wake-up, enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- reg8_write(client, 0x08, 0x01); /* reverse channel receiver high threshold enable */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- if (priv->bws) { +- reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding disabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- reg8_write(client, 0x97, 0x5f); /* enable reverse control channel programming (MAX96705-MAX96711 only) */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x0a, 0x0c); /* first pulse length rise time changed from 300ns to 200ns, amplitude 100mV */ +- reg8_write(client, 0x13, 0x20); /* reverse channel increase amplitude 170mV to compensate high threshold enabled */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- } +- +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_read(client, 0x1e, &val); /* read max9271 ID */ +- if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID || --timeout == 0) { +- priv->ser_id = val; +- break; +- } +- +- /* Check if already initialized (after reboot/reset ?) */ +- client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C */ +- reg8_read(client, 0x1e, &val); /* read max9271 ID */ +- if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { +- priv->ser_id = val; +- reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after any change of reverse channel settings */ +- ret = -EADDRINUSE; +- break; +- } +- +- if (poc_trig) { +- if (!IS_ERR(priv->poc_gpio) && (timeout % poc_trig == 0)) { +- gpiod_direction_output(priv->poc_gpio, 0); /* POC power off */ +- mdelay(200); +- gpiod_direction_output(priv->poc_gpio, 1); /* POC power on */ +- mdelay(priv->poc_delay); +- } +- } +- } +- +- max9288_sensor_reset(client, client->addr, 1); /* sensor reset */ +- +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_read(client, 0x04, &lock_sts); /* LOCK status */ +- +- if (!timeout) { +- ret = -ETIMEDOUT; +- goto out; +- } +- +-out: +- sprintf(timeout_str, "retries=%d lock_sts=%d", priv->timeout - timeout, !!(lock_sts & 0x80)); +- dev_info(&client->dev, "link %s %sat 0x%x %s %s\n", ser_name(priv->ser_id), +- ret == -EADDRINUSE ? "already " : "", priv->max9271_addr, +- ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", +- priv->timeout - timeout ? timeout_str : ""); +- +- return ret; +-} +- +-static void max9288_initial_setup(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- /* Initial setup */ +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x09, 0x40); /* Automatic pixel count enable */ +- reg8_write(client, 0x15, 0x70); /* Enable HV and DE tracking by register 0x69 */ +- reg8_write(client, 0x60, (priv->dbl ? 0x20 : 0) | +- (priv->dt & 0xf)); /* VC=0, DBL mode, DataType */ +- reg8_write(client, 0x65, 0x47 | ((priv->lanes - 1) << 4)); /* setup CSI lanes, DE input is HS */ +- +- reg8_write(client, 0x08, 0x20); /* use D18/19 for HS/VS */ +- reg8_write(client, 0x14, (priv->vsync ? 0x80 : 0) | (priv->hsync ? 0x40 : 0)); /* setup HS/VS inversion */ +- reg8_write(client, 0x64, 0x0c); /* Drive HSTRAIL state for 120ns after the last payload bit */ +-} +- +-static void max9288_gmsl_link_setup(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- /* GMSL setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +- reg8_write(client, 0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ +- reg8_write(client, 0x07, (priv->pclk_rising_edge ? 0 : 0x10) | +- (priv->dbl ? 0x80 : 0) | +- (priv->bws ? 0x20 : 0)); /* RAW/YUV, PCLK edge, HS/VS encoding disabled, DBL mode, BWS 24/32-bit */ +- usleep_range(2000, 2500); /* wait 2ms */ +- reg8_write(client, 0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ +- usleep_range(2000, 2500); /* wait 2ms */ +- +- if (priv->ser_id == MAX96705_ID || priv->ser_id == MAX96707_ID) { +- switch (priv->dt) { +- case YUV8_DT: +- /* setup crossbar for YUV8/RAW8: reverse DVP bus */ +- reg8_write(client, 0x20, 3); +- reg8_write(client, 0x21, 4); +- reg8_write(client, 0x22, 5); +- reg8_write(client, 0x23, 6); +- reg8_write(client, 0x24, 7); +- reg8_write(client, 0x25, 0x40); +- reg8_write(client, 0x26, 0x40); +- if (priv->ser_id == MAX96705_ID) { +- reg8_write(client, 0x27, 14); /* HS: D14->D18 */ +- reg8_write(client, 0x28, 15); /* VS: D15->D19 */ +- } +- if (priv->ser_id == MAX96707_ID) { +- reg8_write(client, 0x27, 14); /* HS: D14->D18, this is a virtual NC pin, hence it is D14 at HS */ +- reg8_write(client, 0x28, 13); /* VS: D13->D19 */ +- } +- reg8_write(client, 0x29, 0x40); +- reg8_write(client, 0x2A, 0x40); +- +- /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, 0x10 + 0); +- reg8_write(client, 0x31, 0x10 + 1); +- reg8_write(client, 0x32, 0x10 + 2); +- reg8_write(client, 0x33, 0x10 + 3); +- reg8_write(client, 0x34, 0x10 + 4); +- reg8_write(client, 0x35, 0x10 + 5); +- reg8_write(client, 0x36, 0x10 + 6); +- reg8_write(client, 0x37, 0x10 + 7); +- reg8_write(client, 0x38, 0); +- reg8_write(client, 0x39, 1); +- reg8_write(client, 0x3A, 2); +- +- reg8_write(client, 0x67, 0xC4); /* DBL_ALIGN_TO = 100b */ +- +- break; +- case RAW12_DT: +-#if 0 /* Not supported yet */ +- /* setup crossbar for RAW12: reverse DVP bus */ +- reg8_write(client, 0x20, 11); +- reg8_write(client, 0x21, 10); +- reg8_write(client, 0x22, 9); +- reg8_write(client, 0x23, 8); +- reg8_write(client, 0x24, 7); +- reg8_write(client, 0x25, 6); +- reg8_write(client, 0x26, 5); +- reg8_write(client, 0x27, 4); +- reg8_write(client, 0x28, 3); +- reg8_write(client, 0x29, 2); +- reg8_write(client, 0x2a, 1); +- reg8_write(client, 0x2b, 0); +- +- /* this is second byte if DBL=1 */ +- reg8_write(client, 0x30, 27); +- reg8_write(client, 0x31, 26); +- reg8_write(client, 0x32, 25); +- reg8_write(client, 0x33, 24); +- reg8_write(client, 0x34, 23); +- reg8_write(client, 0x35, 22); +- reg8_write(client, 0x36, 21); +- reg8_write(client, 0x37, 20); +- reg8_write(client, 0x38, 19); +- reg8_write(client, 0x39, 18); +- reg8_write(client, 0x3a, 17); +- reg8_write(client, 0x3b, 16); +- +- if (!priv->bws && priv->dbl) +- dev_err(&client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); +-#endif +- break; +- } +- +- if (priv->hsgen) { +- /* HS/VS pins map */ +- reg8_write(client, 0x3f, 0x10); /* HS (NC) */ +- reg8_write(client, 0x41, 0x10); /* DE (NC) */ +- if (priv->ser_id == MAX96705_ID) +- reg8_write(client, 0x40, 15); /* VS (DIN13) */ +- if (priv->ser_id == MAX96707_ID) +- reg8_write(client, 0x40, 13); /* VS (DIN13) */ +-#if 0 +- /* following must come from imager */ +-#define SENSOR_WIDTH (1280*2) +-#define HTS (1288*2) +-#define VTS 960 +-#define HTS_DELAY 0x9 +- reg8_write(client, 0x4e, HTS_DELAY >> 16); /* HS delay */ +- reg8_write(client, 0x4f, (HTS_DELAY >> 8) & 0xff); +- reg8_write(client, 0x50, HTS_DELAY & 0xff); +- reg8_write(client, 0x54, SENSOR_WIDTH >> 8); /* HS high period */ +- reg8_write(client, 0x55, SENSOR_WIDTH & 0xff); +- reg8_write(client, 0x56, (HTS - SENSOR_WIDTH) >> 8); /* HS low period */ +- reg8_write(client, 0x57, (HTS - SENSOR_WIDTH) & 0xff); +- reg8_write(client, 0x58, VTS >> 8); /* HS count */ +- reg8_write(client, 0x59, VTS & 0xff ); +-#endif +- reg8_write(client, 0x43, 0x15); /* enable HS generator */ +- } +- } +- +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- reg8_write(client, 0x1c, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ +- usleep_range(2000, 2500); /* wait 2ms */ +- +- /* I2C translator setup */ +- client->addr = 0x40; /* MAX9271-CAMx I2C */ +-// reg8_write(client, 0x09, maxim_map[2][idx] << 1); /* SENSOR I2C translated - must be set by sensor driver */ +-// reg8_write(client, 0x0A, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ +- reg8_write(client, 0x0B, BROADCAST << 1); /* broadcast I2C */ +- reg8_write(client, 0x0C, priv->max9271_addr << 1); /* MAX9271-CAMx I2C new */ +- /* I2C addresse change */ +- reg8_write(client, 0x01, priv->des_addr << 1); /* MAX9288 I2C */ +- reg8_write(client, 0x00, priv->max9271_addr << 1); /* MAX9271-CAM0 I2C new */ +- usleep_range(2000, 2500); /* wait 2ms */ +- /* put MAX9271 in configuration link state */ +- client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ +- reg8_write(client, 0x04, 0x43); /* enable reverse_control/conf_link */ +- usleep_range(2000, 2500); /* wait 2ms */ +-#ifdef MAXIM_DUMP +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- maxim_max927x_dump_regs(client); +- client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ +- maxim_max927x_dump_regs(client); +-#endif +-} +- +-static int max9288_initialize(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- dev_info(&client->dev, "LANES=%d, PCLK edge=%s\n", +- priv->lanes, priv->pclk_rising_edge ? "rising" : "falling"); +- +- max9288_preinit(client, priv->des_addr); +- max9288_initial_setup(client); +- +- if (!IS_ERR(priv->poc_gpio)) { +- gpiod_direction_output(priv->poc_gpio, 1); /* POC power on */ +- mdelay(priv->poc_delay); +- } +- +- max9288_reverse_channel_setup(client); +- max9288_gmsl_link_setup(client); +- +- client->addr = priv->des_addr; +- +- return 0; +-} +- +-#ifdef CONFIG_VIDEO_ADV_DEBUG +-static int max9288_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) +-{ +- struct max9288_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- int ret; +- u8 val = 0; +- +- ret = reg8_read(client, (u8)reg->reg, &val); +- if (ret < 0) +- return ret; +- +- reg->val = val; +- reg->size = sizeof(u8); +- +- return 0; +-} +- +-static int max9288_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) +-{ +- struct max9288_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- return reg8_write(client, (u8)reg->reg, (u8)reg->val); +-} +-#endif +- +-static int max9288_s_power(struct v4l2_subdev *sd, int on) +-{ +- struct max9288_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ +- max9288_write_remote_verify(client, 0x04, on ? (conf_link ? 0x43 : 0x83) : 0x43); /* enable serial_link or conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- +- return 0; +-} +- +-static struct v4l2_subdev_core_ops max9288_subdev_core_ops = { +-#ifdef CONFIG_VIDEO_ADV_DEBUG +- .g_register = max9288_g_register, +- .s_register = max9288_s_register, +-#endif +- .s_power = max9288_s_power, +-}; +- +-static struct v4l2_subdev_ops max9288_subdev_ops = { +- .core = &max9288_subdev_core_ops, +-}; +- +-static int max9288_parse_dt(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- struct device_node *np = client->dev.of_node; +- struct device_node *endpoint = NULL; +- struct property *prop; +- int err, pwen; +- int sensor_delay, gpio0 = 1, gpio1 = 1; +- u8 val = 0; +- char poc_name[10]; +- +- if (of_property_read_u32(np, "maxim,lanes", &priv->lanes)) +- priv->lanes = 4; +- +- pwen = of_get_gpio(np, 0); +- if (pwen > 0) { +- err = gpio_request_one(pwen, GPIOF_OUT_INIT_HIGH, dev_name(&client->dev)); +- if (err) +- dev_err(&client->dev, "cannot request PWEN gpio %d: %d\n", pwen, err); +- } +- +- mdelay(250); +- +- sprintf(poc_name, "POC%d", 0); +- priv->poc_gpio = devm_gpiod_get_optional(&client->dev, kstrdup(poc_name, GFP_KERNEL), 0); +- +- reg8_read(client, 0x1e, &val); /* read max9288 ID */ +- if (val != MAX9288_ID) { +- prop = of_find_property(np, "reg", NULL); +- if (prop) +- of_remove_property(np, prop); +- return -ENODEV; +- } +- +- if (!of_property_read_u32(np, "maxim,gpio0", &gpio0) || +- !of_property_read_u32(np, "maxim,gpio1", &gpio1)) +- reg8_write(client, 0x06, (gpio1 << 3) | (gpio0 << 1)); +- +- if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { +- priv->gpio_resetb = -1; +- } else { +- if (of_property_read_bool(np, "maxim,resetb-active-high")) +- priv->active_low_resetb = 0; +- else +- priv->active_low_resetb = 1; +- } +- +- if (!of_property_read_u32(np, "maxim,sensor_delay", &sensor_delay)) +- mdelay(sensor_delay); +- priv->pclk_rising_edge = true; +- if (of_property_read_bool(np, "maxim,pclk-falling-edge")) +- priv->pclk_rising_edge = false; +- if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) +- priv->timeout = 100; +- if (of_property_read_u32(np, "maxim,him", &priv->him)) +- priv->him = 0; +- if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) +- priv->hsync = 0; +- if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) +- priv->vsync = 1; +- if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) +- priv->poc_delay = 50; +- if (of_property_read_u32(np, "maxim,bws", &priv->bws)) +- priv->bws = 0; +- if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) +- priv->dbl = 1; +- if (of_property_read_u32(np, "maxim,dt", &priv->dt)) +- priv->dt = 3; +- if (of_property_read_u32(np, "maxim,hsgen", &priv->hsgen)) +- priv->hsgen = 0; +- if (of_property_read_u32(np, "maxim,pclk", &priv->pclk)) +- priv->pclk = pclk; +- +- /* module params override dts */ +- if (him) +- priv->him = him; +- if (hsync) +- priv->hsync = hsync; +- if (!vsync) +- priv->vsync = vsync; +- if (gpio_resetb) +- priv->gpio_resetb = gpio_resetb; +- if (active_low_resetb) +- priv->active_low_resetb = active_low_resetb; +- if (timeout_n) +- priv->timeout = timeout_n; +- if (poc_delay) +- priv->poc_delay = poc_delay; +- if (bws) +- priv->bws = bws; +- if (!dbl) +- priv->dbl = dbl; +- if (dt != 3) +- priv->dt = dt; +- if (hsgen) +- priv->hsgen = hsgen; +- if (pclk != 100) +- priv->pclk = pclk; +- +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (endpoint) { +- if (of_property_read_u32(endpoint, "max9271-addr", &priv->max9271_addr)) { +- of_node_put(endpoint); +- dev_err(&client->dev, "max9271-addr not set\n"); +- return -EINVAL; +- } +- +- priv->sd_fwnode = of_fwnode_handle(endpoint); +- } +- +- of_node_put(endpoint); +- return 0; +-} +- +-static void max9288_setup_remote_endpoint(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- struct device_node *np = client->dev.of_node; +- struct device_node *endpoint = NULL, *rendpoint = NULL; +- int i; +- struct property *csi_rate_prop, *dvp_order_prop; +- +- for (i = 0; ; i++) { +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (!endpoint) +- break; +- +- rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); +- if (!rendpoint) +- continue; +- +- csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); +- if (csi_rate_prop) { +- /* CSI2_RATE = PCLK*bpp/lanes */ +- priv->csi_rate = cpu_to_be32(priv->pclk * dt2bpp[priv->dt] / priv->lanes); +- csi_rate_prop->value = &priv->csi_rate; +- of_update_property(rendpoint, csi_rate_prop); +- } +- +- dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); +- if (dvp_order_prop) +- of_update_property(rendpoint, dvp_order_prop); +- } +- +- of_node_put(endpoint); +-} +- +-static int max9288_probe(struct i2c_client *client, +- const struct i2c_device_id *did) +-{ +- struct max9288_priv *priv; +- int err; +- +- priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- i2c_set_clientdata(client, priv); +- priv->des_addr = client->addr; +- priv->client = client; +- +- err = max9288_parse_dt(client); +- if (err) +- goto out; +- +- err = max9288_initialize(client); +- if (err < 0) +- goto out; +- +- max9288_setup_remote_endpoint(client); +- +- v4l2_subdev_init(&priv->sd, &max9288_subdev_ops); +- priv->sd.owner = client->dev.driver->owner; +- priv->sd.dev = &client->dev; +- v4l2_set_subdevdata(&priv->sd, priv); +- priv->sd.fwnode = priv->sd_fwnode; +- +- snprintf(priv->sd.name, V4L2_SUBDEV_NAME_SIZE, "%s %d-%04x", +- client->dev.driver->name, i2c_adapter_id(client->adapter), +- client->addr); +- +- err = v4l2_async_register_subdev(&priv->sd); +- if (err < 0) +- goto out; +-out: +- return err; +-} +- +-static int max9288_remove(struct i2c_client *client) +-{ +- struct max9288_priv *priv = i2c_get_clientdata(client); +- +- v4l2_async_unregister_subdev(&priv->sd); +- v4l2_device_unregister_subdev(&priv->sd); +- +- return 0; +-} +- +-static const struct of_device_id max9288_dt_ids[] = { +- { .compatible = "maxim,max9288" }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, max9288_dt_ids); +- +-static const struct i2c_device_id max9288_id[] = { +- { "max9288", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, max9288_id); +- +-static struct i2c_driver max9288_i2c_driver = { +- .driver = { +- .name = "max9288", +- .of_match_table = of_match_ptr(max9288_dt_ids), +- }, +- .probe = max9288_probe, +- .remove = max9288_remove, +- .id_table = max9288_id, +-}; +- +-module_i2c_driver(max9288_i2c_driver); +- +-MODULE_DESCRIPTION("GMSL driver for MAX9288"); +-MODULE_AUTHOR("Vladimir Barinov"); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c +deleted file mode 100644 +index 340e61e..0000000 +--- a/drivers/media/i2c/soc_camera/ti9x4.c ++++ /dev/null +@@ -1,745 +0,0 @@ +- /* +- * TI DS90UB954/960/964 FPDLinkIII driver +- * +- * Copyright (C) 2017-2018 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +-#include +- +-#include "ti9x4.h" +- +-struct ti9x4_priv { +- struct v4l2_subdev sd[4]; +- struct fwnode_handle *sd_fwnode[4]; +- int des_addr; +- int links; +- int lanes; +- int csi_rate; +- const char *forwarding_mode; +- int fs_time; +- int fps_numerator; +- int fps_denominator; +- int is_coax; +- int dvp_bus; +- int dvp_lsb; +- int hsync; +- int vsync; +- int poc_delay; +- atomic_t use_count; +- struct i2c_client *client; +- int ti9x3_addr_map[4]; +- char chip_id[6]; +- int ser_id; +- int vc_map; +- int csi_map; +- int gpio[4]; +- struct gpio_desc *pwen; /* chip power en */ +- struct gpio_desc *poc_gpio[4]; /* PoC power supply */ +- struct v4l2_clk *ref_clk; /* ref clock */ +- struct notifier_block reboot_notifier; +-}; +- +-static int ser_id; +-module_param(ser_id, int, 0644); +-MODULE_PARM_DESC(ser_id, " Serializer ID (default: TI913)"); +- +-static int is_stp; +-module_param(is_stp, int, 0644); +-MODULE_PARM_DESC(is_stp, " STP cable (default: Coax cable)"); +- +-static int dvp_bus = 8; +-module_param(dvp_bus, int, 0644); +-MODULE_PARM_DESC(dvp_bus, " DVP/CSI over FPDLink (default: DVP 8-bit)"); +- +-static int dvp_lsb = 0; +-module_param(dvp_lsb, int, 0644); +-MODULE_PARM_DESC(dvp_lsb, " DVP 8-bit LSB/MSB selection (default: DVP 8-bit MSB)"); +- +-static int hsync; +-module_param(hsync, int, 0644); +-MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); +- +-static int vsync = 1; +-module_param(vsync, int, 0644); +-MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); +- +-static int poc_delay; +-module_param(poc_delay, int, 0644); +-MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 0 ms)"); +- +-static int vc_map = 0x3210; +-module_param(vc_map, int, 0644); +-MODULE_PARM_DESC(vc_map, " CSI VC MAP (default: 0xe4 - linear map VCx=LINKx)"); +- +-static int csi_map = 0; +-module_param(csi_map, int, 0644); +-MODULE_PARM_DESC(csi_map, " CSI TX MAP (default: 0 - forwarding of all links to CSI0)"); +- +-static int gpio0 = 0, gpio1 = 0, gpio2 = 0, gpio3 = 0; +-module_param(gpio0, int, 0644); +-MODULE_PARM_DESC(gpio0, " GPIO0 function select (default: GPIO0 low level)"); +-module_param(gpio1, int, 0644); +-MODULE_PARM_DESC(gpio1, " GPIO1 function select (default: GPIO1 low level)"); +-module_param(gpio2, int, 0644); +-MODULE_PARM_DESC(gpio2, " GPIO2 function select (default: GPIO2 low level)"); +-module_param(gpio3, int, 0644); +-MODULE_PARM_DESC(gpio3, " GPIO3 function select (default: GPIO3 low level)"); +- +-#ifdef TI954_SILICON_ERRATA +-static int indirect_write(struct i2c_client *client, unsigned int page, u8 reg, u8 val) +-{ +- if (page > 7) +- return -EINVAL; +- +- reg8_write(client, 0xb0, page << 2); +- reg8_write(client, 0xb1, reg); +- reg8_write(client, 0xb2, val); +- +- return 0; +-} +- +-static int indirect_read(struct i2c_client *client, unsigned int page, u8 reg, u8 *val) +-{ +- if (page > 7) +- return -EINVAL; +- +- reg8_write(client, 0xb0, page << 2); +- reg8_write(client, 0xb1, reg); +- reg8_read(client, 0xb2, val); +- +- return 0; +-} +-#endif +- +-static void ti9x4_read_chipid(struct i2c_client *client) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- +- /* Chip ID */ +- reg8_read(client, 0xf1, &priv->chip_id[0]); +- reg8_read(client, 0xf2, &priv->chip_id[1]); +- reg8_read(client, 0xf3, &priv->chip_id[2]); +- reg8_read(client, 0xf4, &priv->chip_id[3]); +- reg8_read(client, 0xf5, &priv->chip_id[4]); +- priv->chip_id[5] = '\0'; +-} +- +-static void ti9x4_initial_setup(struct i2c_client *client) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- +- /* Initial setup */ +- client->addr = priv->des_addr; /* TI9x4 I2C */ +- reg8_write(client, 0x0d, 0xb9); /* VDDIO 3.3V */ +- switch (priv->csi_rate) { +- case 1600: /* REFCLK = 25MHZ */ +- case 1500: /* REFCLK = 23MHZ */ +- case 1450: /* REFCLK = 22.5MHZ */ +- reg8_write(client, 0x1f, 0x00); /* CSI rate 1.5/1.6Gbps */ +- break; +- case 1200: /* REFCLK = 25MHZ */ +- case 1100: /* REFCLK = 22.5MHZ */ +- reg8_write(client, 0x1f, 0x01); /* CSI rate 1.1/1.2Gbps */ +- break; +- case 800: /* REFCLK = 25MHZ */ +- case 700: /* REFCLK = 22.5MHZ */ +- reg8_write(client, 0x1f, 0x02); /* CSI rate 700/800Mbps */ +- break; +- case 400: /* REFCLK = 25MHZ */ +- case 350: /* REFCLK = 22.5MHZ */ +- reg8_write(client, 0x1f, 0x03); /* CSI rate 350/400Mbps */ +- break; +- default: +- dev_err(&client->dev, "unsupported CSI rate %d\n", priv->csi_rate); +- } +- +- switch (priv->csi_rate) { +- case 1600: +- case 1200: +- case 800: +- case 400: +- /* FrameSync setup for REFCLK=25MHz, FPS=30: period_counts=1/FPS/12mks=1/30/12e-6=2777 -> HI=2, LO=2775 */ +- priv->fs_time = 2790; +- break; +- case 1500: +- /* FrameSync setup for REFCLK=23MHz, FPS=30: period_counts=1/FPS/13.043mks=1/30/13.043e-6=2556 -> HI=2, LO=2554 */ +- priv->fs_time = 2570; +- break; +- case 1450: +- case 1100: +- case 700: +- case 350: +- /* FrameSync setup for REFCLK=22.5MHz, FPS=30: period_counts=1/FPS/13.333mks=1/30/13.333e-6=2500 -> HI=2, LO=2498 */ +- priv->fs_time = 2513; +- break; +- default: +- priv->fs_time = 0; +- dev_err(&client->dev, "unsupported CSI rate %d\n", priv->csi_rate); +- } +- +- if (strcmp(priv->forwarding_mode, "round-robin") == 0) { +- reg8_write(client, 0x21, 0x03); /* Round Robin forwarding enable for CSI0/CSI1 */ +- } else if (strcmp(priv->forwarding_mode, "synchronized") == 0) { +- reg8_write(client, 0x21, 0x54); /* Basic Syncronized forwarding enable (FrameSync must be enabled!!) for CSI0/CSI1 */ +- } +- +- reg8_write(client, 0x32, 0x03); /* Select TX for CSI0/CSI1, RX for CSI0 */ +- reg8_write(client, 0x33, ((priv->lanes - 1) ^ 0x3) << 4); /* disable CSI output, set CSI lane count, non-continuous CSI mode */ +- reg8_write(client, 0x20, 0xf0 | priv->csi_map); /* disable port forwarding */ +-#if 0 +- /* FrameSync setup for REFCLK=25MHz, FPS=30: period_counts=1/2/FPS*25MHz =1/2/30*25Mhz =416666 -> FS_TIME=416666 */ +- /* FrameSync setup for REFCLK=22.5MHz, FPS=30: period_counts=1/2/FPS*22.5Mhz=1/2/30*22.5Mhz=375000 -> FS_TIME=375000 */ +-// #define FS_TIME (priv->csi_rate == 1450 ? 376000 : 417666) +- #define FS_TIME (priv->csi_rate == 1450 ? 385000 : 428000) // FPS=29.2 (new vendor's firmware AWB restriction?) +- reg8_write(client, 0x1a, FS_TIME >> 16); /* FrameSync time 24bit */ +- reg8_write(client, 0x1b, (FS_TIME >> 8) & 0xff); +- reg8_write(client, 0x1c, FS_TIME & 0xff); +- reg8_write(client, 0x18, 0x43); /* Enable FrameSync, 50/50 mode, Frame clock from 25MHz */ +-#else +- reg8_write(client, 0x19, 2 >> 8); /* FrameSync high time MSB */ +- reg8_write(client, 0x1a, 2 & 0xff); /* FrameSync high time LSB */ +- reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ +- reg8_write(client, 0x1c, priv->fs_time & 0xff); /* FrameSync low time LSB */ +- reg8_write(client, 0x18, 0x00); /* Disable FrameSync - must be enabled after all cameras are set up */ +-#endif +-} +- +-static void ti9x4_fpdlink3_setup(struct i2c_client *client, int idx) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- u8 port_config = 0x78; +- u8 port_config2 = 0; +- +- /* FPDLinkIII setup */ +- client->addr = priv->des_addr; /* TI9x4 I2C */ +- reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ +- usleep_range(2000, 2500); /* wait 2ms */ +- +- switch (priv->ser_id) { +- case TI913_ID: +- reg8_write(client, 0x58, 0x58); /* Back channel: Freq=2.5Mbps */ +- break; +- case TI953_ID: +- reg8_write(client, 0x58, 0x5e); /* Back channel: Freq=50Mbps */ +- break; +- default: +- break; +- } +- +- reg8_write(client, 0x5c, priv->ti9x3_addr_map[idx] << 1); /* TI9X3 I2C addr */ +-// reg8_write(client, 0x5d, 0x30 << 1); /* SENSOR I2C native - must be set by sensor driver */ +-// reg8_write(client, 0x65, (0x60 + idx) << 1); /* SENSOR I2C translated - must be set by sensor driver */ +- +- if (priv->is_coax) +- port_config |= 0x04; /* Coax */ +- else +- port_config |= 0x00; /* STP */ +- +- switch (priv->dvp_bus) { +- case 8: +- port_config2 |= (priv->dvp_lsb ? 0xC0 : 0x80); /* RAW10 as 8-bit prosessing using LSB/MSB bits */ +- /* fall through */ +- case 10: +- port_config |= 0x03; /* DVP over FPDLink (TI913 compatible) RAW10/RAW8 */ +- break; +- case 12: +- port_config |= 0x02; /* DVP over FPDLink (TI913 compatible) RAW12 */ +- break; +- default: +- port_config |= 0x00; /* CSI over FPDLink (TI953 compatible) */ +- } +- +- if (priv->vsync) +- port_config2 |= 0x01; /* VSYNC acive low */ +- if (priv->hsync) +- port_config2 |= 0x02; /* HSYNC acive low */ +- +- reg8_write(client, 0x6d, port_config); +- reg8_write(client, 0x7c, port_config2); +- reg8_write(client, 0x70, ((priv->vc_map >> (idx * 4)) << 6) | 0x1e); /* CSI data type: yuv422 8-bit, assign VC */ +- reg8_write(client, 0x71, ((priv->vc_map >> (idx * 4)) << 6) | 0x2c); /* CSI data type: RAW12, assign VC */ +- reg8_write(client, 0xbc, 0x00); /* Setup minimal time between FV and LV to 3 PCLKs */ +- reg8_write(client, 0x72, priv->vc_map >> (idx * 4)); /* CSI VC MAP */ +-} +- +-static int ti9x4_initialize(struct i2c_client *client) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- int idx, timeout; +- u8 port_sts1[4] = {0, 0, 0, 0}, port_sts2[4] = {0, 0, 0, 0}; +- +- dev_info(&client->dev, "LINKs=%d, LANES=%d, FORWARDING=%s, CABLE=%s, ID=%s\n", +- priv->links, priv->lanes, priv->forwarding_mode, priv->is_coax ? "coax" : "stp", priv->chip_id); +- +- ti9x4_initial_setup(client); +- +- for (idx = 0; idx < priv->links; idx++) { +- if (!IS_ERR(priv->poc_gpio[idx])) { +- gpiod_direction_output(priv->poc_gpio[idx], 1); /* POC power on */ +- mdelay(priv->poc_delay); +- } +- +- ti9x4_fpdlink3_setup(client, idx); +- } +- +- client->addr = priv->des_addr; +- +- /* check lock status */ +- for (timeout = 500 / priv->links; timeout > 0; timeout--) { +- for (idx = 0; idx < priv->links; idx++) { +- if ((port_sts1[idx] & 0x1) && (port_sts2[idx] & 0x4)) +- continue; +- +- reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ +- usleep_range(1000, 1500); /* wait 1ms */ +- reg8_read(client, 0x4d, &port_sts1[idx]); /* Lock status */ +- reg8_read(client, 0x4e, &port_sts2[idx]); /* Freq stable */ +- } +- } +- +- if (!timeout) +- dev_info(&client->dev, "Receiver lock status [%d,%d,%d,%d]\n", +- (port_sts1[0] & 0x1) && (port_sts2[0] & 0x4), +- (port_sts1[1] & 0x1) && (port_sts2[1] & 0x4), +- (port_sts1[2] & 0x1) && (port_sts2[2] & 0x4), +- (port_sts1[3] & 0x1) && (port_sts2[3] & 0x4)); +- +- if (priv->poc_delay) +- mdelay(100); +- +- for (idx = 0; idx < priv->links; idx++) { +- reg8_write(client, 0x4c, (idx << 4) | (1 << idx)); /* Select RX port number */ +- usleep_range(1000, 1500); /* wait 1ms */ +- +- /* +- * Enable only FSIN for remote gpio, all permanent states (0 or 1) setup on serializer side: +- * this avoids intermittent remote gpio noise (f.e. reset or spuriouse fsin) caused by +- * unstable/bad link, hence unstable backchannel +- */ +- client->addr = priv->ti9x3_addr_map[idx]; /* TI9X3 I2C addr */ +- switch (priv->ser_id) { +- case TI913_ID: +- reg8_write(client, 0x0d, 0x55); /* Enable remote GPIO0/1 */ +- reg8_write(client, 0x11, 0x10); /* I2C high pulse width */ +- reg8_write(client, 0x12, 0x10); /* I2C low pulse width */ +- break; +- case TI953_ID: +- reg8_write(client, 0x0d, (priv->gpio[0] & 0x1) << 0 | +- (priv->gpio[1] & 0x1) << 1 | +- (priv->gpio[2] & 0x1) << 2 | +- (priv->gpio[3] & 0x1) << 3 | +- (priv->gpio[0] & 0x2) << 3 | +- (priv->gpio[1] & 0x2) << 4 | +- (priv->gpio[2] & 0x2) << 5 | +- (priv->gpio[3] & 0x2) << 6); /* Enable FSIN remote GPIOs and set local constant gpios */ +- reg8_write(client, 0x0e, (!!priv->gpio[0] << 4) | +- (!!priv->gpio[1] << 5) | +- (!!priv->gpio[2] << 6) | +- (!!priv->gpio[3] << 7)); /* Enable serializer GPIOs only for output */ +- reg8_write(client, 0x0b, 0x10); /* I2C high pulse width */ +- reg8_write(client, 0x0c, 0x10); /* I2C low pulse width */ +- break; +- } +- client->addr = priv->des_addr; +- +- reg8_write(client, 0x6e, 0x88 | (priv->gpio[1] << 4) | priv->gpio[0]); /* Remote GPIO1/GPIO0 setup */ +- reg8_write(client, 0x6f, 0x88 | (priv->gpio[3] << 4) | priv->gpio[2]); /* Remote GPIO3/GPIO2 setup */ +- } +- +- return 0; +-} +- +-#ifdef CONFIG_VIDEO_ADV_DEBUG +-static int ti9x4_g_register(struct v4l2_subdev *sd, +- struct v4l2_dbg_register *reg) +-{ +- struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- int ret; +- u8 val = 0; +- +- ret = reg8_read(client, (u8)reg->reg, &val); +- if (ret < 0) +- return ret; +- +- reg->val = val; +- reg->size = sizeof(u8); +- +- return 0; +-} +- +-static int ti9x4_s_register(struct v4l2_subdev *sd, +- const struct v4l2_dbg_register *reg) +-{ +- struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- return reg8_write(client, (u8)reg->reg, (u8)reg->val); +-} +-#endif +- +-static int ti9x4_s_power(struct v4l2_subdev *sd, int on) +-{ +- struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- if (on) { +- if (atomic_inc_return(&priv->use_count) == 1) +- reg8_write(client, 0x20, 0x00 | priv->csi_map); /* enable port forwarding to CSI */ +- } else { +- if (atomic_dec_return(&priv->use_count) == 0) +- reg8_write(client, 0x20, 0xf0 | priv->csi_map); /* disable port forwarding to CSI */ +- } +- +- return 0; +-} +- +-static int ti9x4_registered_async(struct v4l2_subdev *sd) +-{ +- struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- reg8_write(client, 0x33, ((priv->lanes - 1) ^ 0x3) << 4 | 0x1); /* enable CSI output, set CSI lane count, non-continuous CSI mode */ +- reg8_write(client, 0x18, 0x01); /* Enable FrameSync, HI/LO mode, Frame clock from port0 */ +-// reg8_write(client, 0x18, 0x80); /* Enable FrameSync, Frame clock is external */ +- +- return 0; +-} +- +-static int ti9x4_reboot_notifier(struct notifier_block *nb, unsigned long event, void *buf) +-{ +- struct ti9x4_priv *priv = container_of(nb, struct ti9x4_priv, reboot_notifier); +- int idx; +- +- for (idx = 0; idx < priv->links; idx++) { +- if (!IS_ERR(priv->poc_gpio[idx])) +- gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ +- } +- +- return NOTIFY_OK; +-} +- +-static struct v4l2_subdev_core_ops ti9x4_subdev_core_ops = { +-#ifdef CONFIG_VIDEO_ADV_DEBUG +- .g_register = ti9x4_g_register, +- .s_register = ti9x4_s_register, +-#endif +- .s_power = ti9x4_s_power, +- .registered_async = ti9x4_registered_async, +-}; +- +-static int ti9x4_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) +-{ +- return 0; +-} +- +-static int ti9x4_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) +-{ +- struct ti9x4_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- struct v4l2_captureparm *cp = &parms->parm.capture; +- +- if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) +- return -EINVAL; +- if (cp->extendedmode != 0) +- return -EINVAL; +- +- if (priv->fps_denominator != cp->timeperframe.denominator || +- priv->fps_numerator != cp->timeperframe.numerator) { +- int f_time; +- +- f_time = priv->fs_time * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; +- reg8_write(client, 0x1b, f_time >> 8); /* FrameSync low time MSB */ +- reg8_write(client, 0x1c, f_time & 0xff); /* FrameSync low time LSB */ +- +- priv->fps_denominator = cp->timeperframe.denominator; +- priv->fps_numerator = cp->timeperframe.numerator; +- } +- +- return 0; +-} +- +-static struct v4l2_subdev_video_ops ti9x4_video_ops = { +- .g_parm = ti9x4_g_parm, +- .s_parm = ti9x4_s_parm, +-}; +- +-static struct v4l2_subdev_ops ti9x4_subdev_ops = { +- .core = &ti9x4_subdev_core_ops, +- .video = &ti9x4_video_ops, +-}; +- +-static int ti9x4_parse_dt(struct i2c_client *client) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- struct device_node *np = client->dev.of_node; +- struct device_node *endpoint = NULL, *rendpoint = NULL; +- struct property *prop; +- int i; +- int sensor_delay; +- char forwarding_mode_default[20] = "round-robin"; /* round-robin, synchronized */ +- struct property *csi_rate_prop, *dvp_order_prop; +- u8 val = 0; +- char name[10]; +- +- if (of_property_read_u32(np, "ti,links", &priv->links)) +- priv->links = 4; +- +- if (of_property_read_u32(np, "ti,lanes", &priv->lanes)) +- priv->lanes = 4; +- +- priv->ref_clk = v4l2_clk_get(&client->dev, "ref_clk"); +- if (!IS_ERR(priv->ref_clk)) { +- dev_info(&client->dev, "ref_clk = %luKHz", v4l2_clk_get_rate(priv->ref_clk) / 1000); +- v4l2_clk_enable(priv->ref_clk); +- } +- +- priv->pwen = devm_gpiod_get(&client->dev, NULL, GPIOF_OUT_INIT_HIGH); +- if (!IS_ERR(priv->pwen)) { +- mdelay(5); +- gpiod_direction_output(priv->pwen, 0); +- mdelay(5); +- } +- +- for (i = 0; i < 4; i++) { +- sprintf(name, "POC%d", i); +- priv->poc_gpio[i] = devm_gpiod_get_optional(&client->dev, kstrdup(name, GFP_KERNEL), 0); +- } +- +- reg8_read(client, 0x00, &val); /* read TI9x4 I2C address */ +- if (val != (priv->des_addr << 1)) { +- prop = of_find_property(np, "reg", NULL); +- if (prop) +- of_remove_property(np, prop); +- return -ENODEV; +- } +- +- ti9x4_read_chipid(client); +- +-#ifdef TI954_SILICON_ERRATA +- indirect_write(client, 7, 0x15, 0x30); +- if (pwen > 0) +- gpio_set_value(pwen, 1); +- usleep_range(5000, 5500); /* wait 5ms */ +- indirect_write(client, 7, 0x15, 0); +-#endif +- if (!of_property_read_u32(np, "ti,sensor_delay", &sensor_delay)) +- mdelay(sensor_delay); +- if (of_property_read_string(np, "ti,forwarding-mode", &priv->forwarding_mode)) +- priv->forwarding_mode = forwarding_mode_default; +- if (of_property_read_bool(np, "ti,stp")) +- priv->is_coax = 0; +- else +- priv->is_coax = 1; +- if (of_property_read_u32(np, "ti,dvp_bus", &priv->dvp_bus)) +- priv->dvp_bus = 8; +- if (of_property_read_bool(np, "ti,dvp_lsb")) +- priv->dvp_lsb = 1; +- else +- priv->dvp_lsb = 0; +- if (of_property_read_u32(np, "ti,hsync", &priv->hsync)) +- priv->hsync = 0; +- if (of_property_read_u32(np, "ti,vsync", &priv->vsync)) +- priv->vsync = 1; +- if (of_property_read_u32(np, "ti,ser_id", &priv->ser_id)) +- priv->ser_id = TI913_ID; +- if (of_property_read_u32(np, "ti,poc-delay", &priv->poc_delay)) +- priv->poc_delay = 10; +- if (of_property_read_u32(np, "ti,vc-map", &priv->vc_map)) +- priv->vc_map = 0x3210; +- for (i = 0; i < 4; i++) { +- sprintf(name, "ti,gpio%d", i); +- if (of_property_read_u32(np, name, &priv->gpio[i])) +- priv->gpio[i] = 0; +- } +- +- /* +- * CSI forwarding of all links is to CSI0 by default. +- * Decide if any link will be forwarded to CSI1 instead CSI0 +- */ +- prop = of_find_property(np, "ti,csi1-links", NULL); +- if (prop) { +- const __be32 *link = NULL; +- u32 v; +- +- for (i = 0; i < 4; i++) { +- link = of_prop_next_u32(prop, link, &v); +- if (!link) +- break; +- priv->csi_map |= BIT(v); +- } +- } else { +- priv->csi_map = 0; +- } +- +- /* module params override dts */ +- if (is_stp) +- priv->is_coax = 0; +- if (dvp_bus != 8) +- priv->dvp_bus = dvp_bus; +- if (dvp_lsb) +- priv->dvp_lsb = dvp_lsb; +- if (hsync) +- priv->hsync = hsync; +- if (!vsync) +- priv->vsync = vsync; +- if (ser_id) +- priv->ser_id = ser_id; +- if (poc_delay) +- priv->poc_delay = poc_delay; +- if (vc_map != 0x3210) +- priv->vc_map = vc_map; +- if (csi_map) +- priv->csi_map = csi_map; +- if (gpio0) +- priv->gpio[0] = gpio0; +- if (gpio1) +- priv->gpio[1] = gpio1; +- if (gpio2) +- priv->gpio[2] = gpio2; +- if (gpio3) +- priv->gpio[3] = gpio3; +- +- for (i = 0; ; i++) { +- endpoint = of_graph_get_next_endpoint(np, endpoint); +- if (!endpoint) +- break; +- +- if (i < priv->links) { +- if (of_property_read_u32(endpoint, "ti9x3-addr", &priv->ti9x3_addr_map[i])) { +- of_node_put(endpoint); +- dev_err(&client->dev, "ti9x3-addr not set\n"); +- return -EINVAL; +- } +- priv->sd_fwnode[i] = of_fwnode_handle(endpoint); +- } +- +- rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); +- if (!rendpoint) +- continue; +- +- csi_rate_prop = of_find_property(endpoint, "csi-rate", NULL); +- if (csi_rate_prop) { +- of_property_read_u32(endpoint, "csi-rate", &priv->csi_rate); +- of_update_property(rendpoint, csi_rate_prop); +- } +- +- dvp_order_prop = of_find_property(endpoint, "dvp-order", NULL); +- if (dvp_order_prop) +- of_update_property(rendpoint, dvp_order_prop); +- } +- +- of_node_put(endpoint); +- return 0; +-} +- +-static int ti9x4_probe(struct i2c_client *client, +- const struct i2c_device_id *did) +-{ +- struct ti9x4_priv *priv; +- int err, i; +- +- priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); +- if (!priv) +- return -ENOMEM; +- +- i2c_set_clientdata(client, priv); +- priv->des_addr = client->addr; +- priv->client = client; +- atomic_set(&priv->use_count, 0); +- priv->fps_numerator = 1; +- priv->fps_denominator = 30; +- +- err = ti9x4_parse_dt(client); +- if (err) +- goto out; +- +- err = ti9x4_initialize(client); +- if (err < 0) +- goto out; +- +- for (i = 0; i < priv->links; i++) { +- v4l2_subdev_init(&priv->sd[i], &ti9x4_subdev_ops); +- priv->sd[i].owner = client->dev.driver->owner; +- priv->sd[i].dev = &client->dev; +- priv->sd[i].grp_id = i; +- v4l2_set_subdevdata(&priv->sd[i], priv); +- priv->sd[i].fwnode = priv->sd_fwnode[i]; +- +- snprintf(priv->sd[i].name, V4L2_SUBDEV_NAME_SIZE, "%s %d-%04x", +- client->dev.driver->name, i2c_adapter_id(client->adapter), +- client->addr); +- +- err = v4l2_async_register_subdev(&priv->sd[i]); +- if (err < 0) +- goto out; +- } +- +- priv->reboot_notifier.notifier_call = ti9x4_reboot_notifier; +- err = register_reboot_notifier(&priv->reboot_notifier); +- if (err) +- dev_err(&client->dev, "failed to register reboot notifier\n"); +- +-out: +- return err; +-} +- +-static int ti9x4_remove(struct i2c_client *client) +-{ +- struct ti9x4_priv *priv = i2c_get_clientdata(client); +- int i; +- +- unregister_reboot_notifier(&priv->reboot_notifier); +- +- for (i = 0; i < priv->links; i++) { +- v4l2_async_unregister_subdev(&priv->sd[i]); +- v4l2_device_unregister_subdev(&priv->sd[i]); +- } +- +- return 0; +-} +- +-static const struct of_device_id ti9x4_dt_ids[] = { +- { .compatible = "ti,ti9x4" }, +- {}, +-}; +-MODULE_DEVICE_TABLE(of, ti9x4_dt_ids); +- +-static const struct i2c_device_id ti9x4_id[] = { +- { "ti9x4", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, ti9x4_id); +- +-static struct i2c_driver ti9x4_i2c_driver = { +- .driver = { +- .name = "ti9x4", +- .of_match_table = of_match_ptr(ti9x4_dt_ids), +- }, +- .probe = ti9x4_probe, +- .remove = ti9x4_remove, +- .id_table = ti9x4_id, +-}; +- +-module_i2c_driver(ti9x4_i2c_driver); +- +-MODULE_DESCRIPTION("FPDLinkIII driver for DS90UB9x4"); +-MODULE_AUTHOR("Vladimir Barinov"); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/ti9x4.h b/drivers/media/i2c/soc_camera/ti9x4.h +deleted file mode 100644 +index 6825f8a..0000000 +--- a/drivers/media/i2c/soc_camera/ti9x4.h ++++ /dev/null +@@ -1,204 +0,0 @@ +-/* +- * TI FPDLinkIII driver include file +- * +- * Copyright (C) 2017 Cogent Embedded, Inc. +- * +- * This program is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License as published by the +- * Free Software Foundation; either version 2 of the License, or (at your +- * option) any later version. +- */ +- +-#ifndef _TI9X4_H +-#define _TI9X4_H +- +-//#define DEBUG +-#ifdef DEBUG +-#undef dev_dbg +-#define dev_dbg dev_info +-#endif +- +-#define MAXIM_NUM_RETRIES 1 /* number of read/write retries */ +-#define TI913_ID 0x58 +-#define TI953_ID 0x30 /* or starapped to 0x32 */ +-#define TI9X4_ID 0x00 /* strapped */ +-#define BROADCAST 0x6f +- +-static inline int reg8_read(struct i2c_client *client, u8 reg, u8 *val) +-{ +- int ret, retries; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_smbus_read_byte_data(client, reg); +- if (!(ret < 0)) +- break; +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "read fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } else { +- *val = ret; +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg8_write(struct i2c_client *client, u8 reg, u8 val) +-{ +- int ret, retries; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_smbus_write_byte_data(client, reg, val); +- if (!(ret < 0)) +- break; +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "write fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_read(struct i2c_client *client, u16 reg, u8 *val) +-{ +- int ret, retries; +- u8 buf[2] = {reg >> 8, reg & 0xff}; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 2); +- if (ret == 2) { +- ret = i2c_master_recv(client, buf, 1); +- if (ret == 1) +- break; +- } +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "read fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } else { +- *val = buf[0]; +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_write(struct i2c_client *client, u16 reg, u8 val) +-{ +- int ret, retries; +- u8 buf[3] = {reg >> 8, reg & 0xff, val}; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 3); +- if (ret == 3) +- break; +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "write fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_read_n(struct i2c_client *client, u16 reg, u8 *val, int n) +-{ +- int ret, retries; +- u8 buf[2] = {reg >> 8, reg & 0xff}; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 2); +- if (ret == 2) { +- ret = i2c_master_recv(client, val, n); +- if (ret == n) +- break; +- } +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "read fail: chip 0x%x registers 0x%x-0x%x: %d\n", +- client->addr, reg, reg + n, ret); +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_write_n(struct i2c_client *client, u16 reg, const u8* val, int n) +-{ +- int ret, retries; +- u8 buf[2 + n]; +- +- buf[0] = reg >> 8; +- buf[1] = reg & 0xff; +- memcpy(&buf[2], val, n); +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 2 + n); +- if (ret == 2 + n) +- break; +- } +- +- if (ret < 0) { +- dev_dbg(&client->dev, +- "write fail: chip 0x%x register 0x%x-0x%x: %d\n", +- client->addr, reg, reg + n, ret); +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_read16(struct i2c_client *client, u16 reg, u16 *val) +-{ +- int ret, retries; +- u8 buf[2] = {reg >> 8, reg & 0xff}; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 2); +- if (ret == 2) { +- ret = i2c_master_recv(client, buf, 2); +- if (ret == 2) +- break; +- } +- } +- +- if (ret < 0) { +- dev_err(&client->dev, +- "read fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } else { +- *val = ((u16)buf[0] << 8) | buf[1]; +- } +- +- return ret < 0 ? ret : 0; +-} +- +-static inline int reg16_write16(struct i2c_client *client, u16 reg, u16 val) +-{ +- int ret, retries; +- u8 buf[4] = {reg >> 8, reg & 0xff, val >> 8, val & 0xff}; +- +- for (retries = MAXIM_NUM_RETRIES; retries; retries--) { +- ret = i2c_master_send(client, buf, 4); +- if (ret == 4) +- break; +- } +- +- if (ret < 0) { +- dev_err(&client->dev, +- "write fail: chip 0x%x register 0x%x: %d\n", +- client->addr, reg, ret); +- } +- +- return ret < 0 ? ret : 0; +-} +-#endif /* _TI9X4_H */ +- +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0493-media-i2c-add-max96712-and-max9296.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0493-media-i2c-add-max96712-and-max9296.patch new file mode 100644 index 00000000..a9535a92 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0493-media-i2c-add-max96712-and-max9296.patch @@ -0,0 +1,4855 @@ +From 845697c2d8a9620131759d72483923ed5612063d Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 10:52:23 +0300 +Subject: [PATCH] media: i2c: add max96712 and max9296 + +This adds GMSL2 drivers for MAX96712 and MAX9296 + +Signed-off-by: Andrey Gusakov +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gmsl/Kconfig | 14 + + drivers/media/i2c/soc_camera/gmsl/Makefile | 2 + + drivers/media/i2c/soc_camera/gmsl/common.h | 499 +++++++ + drivers/media/i2c/soc_camera/gmsl/max9295.h | 29 + + drivers/media/i2c/soc_camera/gmsl/max9296.c | 1423 ++++++++++++++++++++ + drivers/media/i2c/soc_camera/gmsl/max9296.h | 281 ++++ + drivers/media/i2c/soc_camera/gmsl/max9296_debug.h | 462 +++++++ + drivers/media/i2c/soc_camera/gmsl/max96712.c | 1423 ++++++++++++++++++++ + drivers/media/i2c/soc_camera/gmsl/max96712.h | 263 ++++ + drivers/media/i2c/soc_camera/gmsl/max96712_debug.h | 362 +++++ + 10 files changed, 4758 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/gmsl/common.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9295.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9296.c + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9296.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max9296_debug.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max96712.c + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max96712.h + create mode 100644 drivers/media/i2c/soc_camera/gmsl/max96712_debug.h + +diff --git a/drivers/media/i2c/soc_camera/gmsl/Kconfig b/drivers/media/i2c/soc_camera/gmsl/Kconfig +index c7a33bf..4a7dd6c 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/Kconfig ++++ b/drivers/media/i2c/soc_camera/gmsl/Kconfig +@@ -9,3 +9,17 @@ config SOC_CAMERA_MAX9288 + depends on I2C + help + This is a MAXIM max9288 GMSL driver ++ ++config SOC_CAMERA_MAX9296 ++ tristate "max9296 GMSL2 support" ++ depends on I2C ++ select REGMAP_I2C ++ help ++ This is a MAXIM max9296 GMSL2 driver ++ ++config SOC_CAMERA_MAX96712 ++ tristate "max96712 GMSL2 support" ++ depends on I2C ++ select REGMAP_I2C ++ help ++ This is a MAXIM max96712 GMSL2 driver +diff --git a/drivers/media/i2c/soc_camera/gmsl/Makefile b/drivers/media/i2c/soc_camera/gmsl/Makefile +index 9925314..bda7a58 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/Makefile ++++ b/drivers/media/i2c/soc_camera/gmsl/Makefile +@@ -1,3 +1,5 @@ + # SPDX-License-Identifier: GPL-2.0 + obj-$(CONFIG_SOC_CAMERA_MAX9286) += max9286.o + obj-$(CONFIG_SOC_CAMERA_MAX9288) += max9288.o ++obj-$(CONFIG_SOC_CAMERA_MAX9296) += max9296.o ++obj-$(CONFIG_SOC_CAMERA_MAX96712) += max96712.o +diff --git a/drivers/media/i2c/soc_camera/gmsl/common.h b/drivers/media/i2c/soc_camera/gmsl/common.h +new file mode 100644 +index 0000000..98bb1c0 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/common.h +@@ -0,0 +1,499 @@ ++/* ++ * MAXIM GMSL common header ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include "max9295.h" ++ ++#define MAX9271_ID 0x09 ++#define MAX9286_ID 0x40 ++#define MAX9288_ID 0x2A ++#define MAX9290_ID 0x2C ++#define MAX9295A_ID 0x91 ++#define MAX9295B_ID 0x93 ++#define MAX9296A_ID 0x94 ++#define MAX96705_ID 0x41 ++#define MAX96706_ID 0x4A ++#define MAX96707_ID 0x45 /* MAX96715: same but lack of HS pin */ ++#define MAX96708_ID 0x4C ++#define MAX96712_ID 0x20 ++ ++#define UB960_ID 0x00 /* strapped */ ++ ++#define BROADCAST 0x6f ++ ++#define REG8_NUM_RETRIES 1 /* number of read/write retries */ ++#define REG16_NUM_RETRIES 10 /* number of read/write retries */ ++ ++static inline char* chip_name(int id) ++{ ++ switch (id) { ++ case MAX9271_ID: ++ return "MAX9271"; ++ case MAX9286_ID: ++ return "MAX9286"; ++ case MAX9288_ID: ++ return "MAX9288"; ++ case MAX9290_ID: ++ return "MAX9290"; ++ case MAX9295A_ID: ++ return "MAX9295A"; ++ case MAX9295B_ID: ++ return "MAX9295B"; ++ case MAX9296A_ID: ++ return "MAX9296A"; ++ case MAX96705_ID: ++ return "MAX96705"; ++ case MAX96706_ID: ++ return "MAX96706"; ++ case MAX96707_ID: ++ return "MAX96707"; ++ case MAX96712_ID: ++ return "MAX96712"; ++ default: ++ return "serializer"; ++ } ++} ++ ++enum gmsl_mode { ++ MODE_GMSL1 = 1, ++ MODE_GMSL2, ++}; ++ ++#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ ++#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ ++#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ ++#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ ++#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ ++#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ ++#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ ++#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++ ++#define MIPI_DT_GENERIC 0x10 ++#define MIPI_DT_GENERIC_1 0x11 ++#define MIPI_DT_EMB 0x12 ++#define MIPI_DT_YUV8 0x1e ++#define MIPI_DT_YUV10 0x1f ++#define MIPI_DT_RGB565 0x22 ++#define MIPI_DT_RGB666 0x23 ++#define MIPI_DT_RGB888 0x24 ++#define MIPI_DT_RAW8 0x2a ++#define MIPI_DT_RAW10 0x2b ++#define MIPI_DT_RAW12 0x2c ++#define MIPI_DT_RAW14 0x2d ++#define MIPI_DT_RAW16 0x2e ++#define MIPI_DT_RAW20 0x2f ++#define MIPI_DT_YUV12 0x30 ++ ++static inline int mipi_dt_to_bpp(unsigned int dt) ++{ ++ switch (dt) { ++ case 0x2a: ++ case 0x10 ... 0x12: ++ case 0x31 ... 0x37: ++ return 0x08; ++ case 0x2b: ++ return 0x0a; ++ case 0x2c: ++ return 0x0c; ++ case 0x0d: ++ return 0x0e; ++ case 0x22: ++ case 0x1e: ++ case 0x2e: ++ return 0x10; ++ case 0x23: ++ return 0x12; ++ case 0x1f: ++ case 0x2f: ++ return 0x14; ++ case 0x24: ++ case 0x30: ++ return 0x18; ++ default: ++ return 0x08; ++ } ++} ++ ++static inline int reg8_read(struct i2c_client *client, u8 reg, u8 *val) ++{ ++ int ret, retries; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_read_byte_data(client, reg); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = ret; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg8_write(struct i2c_client *client, u8 reg, u8 val) ++{ ++ int ret, retries; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_write_byte_data(client, reg, val); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++#ifdef WRITE_VERIFY ++ u8 val2; ++ reg8_read(client, reg, &val2); ++ if (val != val2) ++ dev_err(&client->dev, ++ "write verify mismatch: chip 0x%x reg=0x%x " ++ "0x%x->0x%x\n", client->addr, reg, val, val2); ++#endif ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read(struct i2c_client *client, u16 reg, u8 *val) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, buf, 1); ++ if (ret == 1) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = buf[0]; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write(struct i2c_client *client, u16 reg, u8 val) ++{ ++ int ret, retries; ++ u8 buf[3] = {reg >> 8, reg & 0xff, val}; ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 3); ++ if (ret == 3) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++#ifdef WRITE_VERIFY ++ u8 val2; ++ reg16_read(client, reg, &val2); ++ if (val != val2) ++ dev_err(&client->dev, ++ "write verify mismatch: chip 0x%x reg=0x%x " ++ "0x%x->0x%x\n", client->addr, reg, val, val2); ++#endif ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read16(struct i2c_client *client, u16 reg, u16 *val) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, buf, 2); ++ if (ret == 2) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } else { ++ *val = ((u16)buf[0] << 8) | buf[1]; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write16(struct i2c_client *client, u16 reg, u16 val) ++{ ++ int ret, retries; ++ u8 buf[4] = {reg >> 8, reg & 0xff, val >> 8, val & 0xff}; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 4); ++ if (ret == 4) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x: %d\n", ++ client->addr, reg, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_read_n(struct i2c_client *client, u16 reg, u8 *val, int n) ++{ ++ int ret, retries; ++ u8 buf[2] = {reg >> 8, reg & 0xff}; ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2); ++ if (ret == 2) { ++ ret = i2c_master_recv(client, val, n); ++ if (ret == n) ++ break; ++ } ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x registers 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg16_write_n(struct i2c_client *client, u16 reg, const u8* val, int n) ++{ ++ int ret, retries; ++ u8 buf[2 + n]; ++ ++ buf[0] = reg >> 8; ++ buf[1] = reg & 0xff; ++ memcpy(&buf[2], val, n); ++ ++ for (retries = REG16_NUM_RETRIES; retries; retries--) { ++ ret = i2c_master_send(client, buf, 2 + n); ++ if (ret == 2 + n) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x-0x%x: %d\n", ++ client->addr, reg, reg + n, ret); ++ } else { ++#ifdef WRITE_VERIFY ++ u8 val2[n]; ++ ret = reg16_read_n(client, reg, val2, n); ++ if (ret < 0) ++ return ret; ++ ++ if (memcmp(val, val2, n)) { ++ dev_err(&client->dev, ++ "write verify mismatch: chip 0x%x reg=0x%x-0x%x " ++ "'%*phN'->'%*phN'\n", client->addr, reg, reg + n, ++ n, val, n, val2); ++ ret = -EBADE; ++ } ++#endif ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg8_read_addr(struct i2c_client *client, int addr, u8 reg, u8 *val) ++{ ++ int ret, retries; ++ union i2c_smbus_data data; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_xfer(client->adapter, addr, client->flags, ++ I2C_SMBUS_READ, reg, I2C_SMBUS_BYTE_DATA, &data); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "read fail: chip 0x%x register 0x%x: %d\n", ++ addr, reg, ret); ++ } else { ++ *val = data.byte; ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++static inline int reg8_write_addr(struct i2c_client *client, u8 addr, u8 reg, u8 val) ++{ ++ int ret, retries; ++ union i2c_smbus_data data; ++ ++ data.byte = val; ++ ++ for (retries = REG8_NUM_RETRIES; retries; retries--) { ++ ret = i2c_smbus_xfer(client->adapter, addr, client->flags, ++ I2C_SMBUS_WRITE, reg, I2C_SMBUS_BYTE_DATA, &data); ++ if (!(ret < 0)) ++ break; ++ } ++ ++ if (ret < 0) { ++ dev_dbg(&client->dev, ++ "write fail: chip 0x%x register 0x%x value 0x%0x: %d\n", ++ addr, reg, val, ret); ++ } ++ ++ return ret < 0 ? ret : 0; ++} ++ ++ ++static inline int reg16_write_addr(struct i2c_client *client, int chip, u16 reg, u8 val) ++{ ++ struct i2c_msg msg[1]; ++ u8 wbuf[3]; ++ int ret; ++ ++ msg->addr = chip; ++ msg->flags = 0; ++ msg->len = 3; ++ msg->buf = wbuf; ++ wbuf[0] = reg >> 8; ++ wbuf[1] = reg & 0xff; ++ wbuf[2] = val; ++ ++ ret = i2c_transfer(client->adapter, msg, 1); ++ if (ret < 0) { ++ dev_dbg(&client->dev, "i2c fail: chip 0x%02x wr 0x%04x (0x%02x): %d\n", ++ chip, reg, val, ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static inline int reg16_read_addr(struct i2c_client *client, int chip, u16 reg, int *val) ++{ ++ struct i2c_msg msg[2]; ++ u8 wbuf[2]; ++ u8 rbuf[1]; ++ int ret; ++ ++ msg[0].addr = chip; ++ msg[0].flags = 0; ++ msg[0].len = 2; ++ msg[0].buf = wbuf; ++ wbuf[0] = reg >> 8; ++ wbuf[1] = reg & 0xff; ++ ++ msg[1].addr = chip; ++ msg[1].flags = I2C_M_RD; ++ msg[1].len = 1; ++ msg[1].buf = rbuf; ++ ++ ret = i2c_transfer(client->adapter, msg, 2); ++ if (ret < 0) { ++ dev_dbg(&client->dev, "i2c fail: chip 0x%02x rd 0x%04x: %d\n", chip, reg, ret); ++ return ret; ++ } ++ ++ *val = rbuf[0]; ++ ++ return 0; ++} ++ ++#define __reg8_read(addr, reg, val) reg8_read_addr(priv->client, addr, reg, val) ++#define __reg8_write(addr, reg, val) reg8_write_addr(priv->client, addr, reg, val) ++#define __reg16_read(addr, reg, val) reg16_read_addr(priv->client, addr, reg, val) ++#define __reg16_write(addr, reg, val) reg16_write_addr(priv->client, addr, reg, val) ++ ++/* copy this struct from drivers/i2c/i2c-mux.c for getting muxc from adapter private data */ ++struct i2c_mux_priv { ++ struct i2c_adapter adap; ++ struct i2c_algorithm algo; ++ struct i2c_mux_core *muxc; ++ u32 chan_id; ++}; ++ ++static inline int get_des_id(struct i2c_client *client) ++{ ++ struct i2c_mux_priv *mux_priv = client->adapter->algo_data; ++ ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "max9286")) ++ return MAX9286_ID; ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "max9288")) ++ return MAX9288_ID; ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "max9296")) ++ return MAX9296A_ID; ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "max96706")) ++ return MAX96706_ID; ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "max96712")) ++ return MAX96712_ID; ++ if (!strcmp(mux_priv->muxc->dev->driver->name, "ti9x4")) ++ return UB960_ID; ++ ++ return -EINVAL; ++} ++ ++static inline int get_des_addr(struct i2c_client *client) ++{ ++ struct i2c_mux_priv *mux_priv = client->adapter->algo_data; ++ ++ return to_i2c_client(mux_priv->muxc->dev)->addr; ++} ++ ++static inline void setup_i2c_translator(struct i2c_client *client, int ser_addr, int sensor_addr, int gmsl_mode) ++{ ++ switch (get_des_id(client)) { ++ case MAX9286_ID: ++ case MAX9288_ID: ++ case MAX9296A_ID: ++ case MAX96706_ID: ++ case MAX96712_ID: ++ if (gmsl_mode == MODE_GMSL1) { ++ reg8_write_addr(client, ser_addr, 0x09, client->addr << 1); /* Sensor translated I2C address */ ++ reg8_write_addr(client, ser_addr, 0x0A, sensor_addr << 1); /* Sensor native I2C address */ ++ } ++ if (gmsl_mode == MODE_GMSL2) { ++ reg16_write_addr(client, ser_addr, MAX9295_I2C2, client->addr << 1); /* Sensor translated I2C address */ ++ reg16_write_addr(client, ser_addr, MAX9295_I2C3, sensor_addr << 1); /* Sensor native I2C address */ ++ } ++ break; ++ case UB960_ID: ++ reg8_write_addr(client, get_des_addr(client), 0x65, client->addr << 1); /* Sensor translated I2C address */ ++ reg8_write_addr(client, get_des_addr(client), 0x5d, sensor_addr << 1); /* Sensor native I2C address */ ++ break; ++ } ++ usleep_range(2000, 2500); ++} +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9295.h b/drivers/media/i2c/soc_camera/gmsl/max9295.h +new file mode 100644 +index 0000000..cf12d3c +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9295.h +@@ -0,0 +1,29 @@ ++/* ++ * MAXIM max9295 GMSL2 driver header ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#define MAX9295_REG2 0x02 ++#define MAX9295_REG7 0x07 ++#define MAX9295_CTRL0 0x10 ++#define MAX9295_I2C2 0x42 ++#define MAX9295_I2C3 0x43 ++#define MAX9295_I2C4 0x44 ++#define MAX9295_I2C5 0x45 ++#define MAX9295_I2C6 0x46 ++ ++#define MAX9295_CROSS(n) (0x1b0 + n) ++ ++#define MAX9295_GPIO_A(n) (0x2be + (3 * n)) ++#define MAX9295_GPIO_B(n) (0x2bf + (3 * n)) ++#define MAX9295_GPIO_C(n) (0x2c0 + (3 * n)) ++ ++#define MAX9295_VIDEO_TX_BASE(n) (0x100 + (0x8 * n)) ++#define MAX9295_VIDEO_TX0(n) (MAX9295_VIDEO_TX_BASE(n) + 0) ++#define MAX9295_VIDEO_TX1(n) (MAX9295_VIDEO_TX_BASE(n) + 1) +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.c b/drivers/media/i2c/soc_camera/gmsl/max9296.c +new file mode 100644 +index 0000000..a6d286f +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.c +@@ -0,0 +1,1423 @@ ++/* ++ * MAXIM max9296 GMSL2 driver ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "common.h" ++#include "max9296.h" ++#include "max9296_debug.h" ++ ++static char mbus_default[10] = "dvp"; /* mipi, dvp */ ++ ++static int conf_link; ++module_param(conf_link, int, 0644); ++MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); ++ ++static int poc_trig; ++module_param(poc_trig, int, 0644); ++MODULE_PARM_DESC(poc_trig, " Use PoC triggering during RC setup. Useful on systems with dedicated PoC and unstable ser-des lock"); ++ ++static int him; ++module_param(him, int, 0644); ++MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); ++ ++static int fsync_period; ++module_param(fsync_period, int, 0644); ++MODULE_PARM_DESC(fsync_period, " Frame sync period (default: 3.2MHz)"); ++ ++static int hsync; ++module_param(hsync, int, 0644); ++MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); ++ ++static int vsync = 1; ++module_param(vsync, int, 0644); ++MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); ++ ++static int gpio_resetb; ++module_param(gpio_resetb, int, 0644); ++MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); ++ ++static int active_low_resetb; ++module_param(active_low_resetb, int, 0644); ++MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); ++ ++static int timeout_n = 100; ++module_param(timeout_n, int, 0644); ++MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); ++ ++static int poc_delay = 50; ++module_param(poc_delay, int, 0644); ++MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); ++ ++static int bws; ++module_param(bws, int, 0644); ++MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); ++ ++static int dbl = 1; ++module_param(dbl, int, 0644); ++MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); ++ ++static int dt = MIPI_DT_YUV8; ++module_param(dt, int, 0644); ++MODULE_PARM_DESC(dt, " DataType (default: 0x1e - YUV8)"); ++ ++static unsigned long crossbar = 0xba9876543210; ++module_param(crossbar, ulong, 0644); ++MODULE_PARM_DESC(crossbar, " Serializer crossbar setup (default: ba9876543210 - reversed)"); ++ ++static int gmsl = MODE_GMSL2; ++module_param(gmsl, int, 0644); ++MODULE_PARM_DESC(gmsl, " GMSL mode (default: 2 - GMSL2)"); ++ ++static char *mbus = "dvp"; ++module_param(mbus, charp, 0644); ++MODULE_PARM_DESC(mbus, " Interfaces mipi,dvp (default: dvp)"); ++ ++static int gpio0 = -1, gpio1 = -1, gpio7 = -1, gpio8 = -1; ++module_param(gpio0, int, 0644); ++MODULE_PARM_DESC(gpio0, " GPIO0 function select (default: GPIO0 tri-state)"); ++module_param(gpio1, int, 0644); ++MODULE_PARM_DESC(gpio1, " GPIO1 function select (default: GPIO1 tri-state)"); ++module_param(gpio7, int, 0644); ++MODULE_PARM_DESC(gpio7, " GPIO7 function select (default: GPIO7 tri-state)"); ++module_param(gpio8, int, 0644); ++MODULE_PARM_DESC(gpio8, " GPIO8 function select (default: GPIO8 tri-state)"); ++ ++static const struct regmap_config max9296_regmap[] = { ++ { ++ /* max9296 */ ++ .reg_bits = 16, ++ .val_bits = 8, ++ .max_register = 0x1f03, ++ }, { ++ /* max9271/max96705 */ ++ .reg_bits = 8, ++ .val_bits = 8, ++ .max_register = 0xff, ++ }, { ++ /* max9695 */ ++ .reg_bits = 16, ++ .val_bits = 8, ++ .max_register = 0x1b03, ++ } ++}; ++ ++static void max9296_write_remote_verify(struct max9296_priv *priv, int link_n, u8 reg, int val) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int timeout; ++ ++ for (timeout = 0; timeout < 10; timeout++) { ++ int sts = 0; ++ u8 val2 = 0; ++ ++ ser_write(reg, val); ++ des_read(MAX9296_COMMON1, &sts); ++ /* check ACKed */ ++ if (sts & BIT(link_n)) { ++ ser_read(reg, &val2); ++ if (val2 == val) ++ break; ++ } ++ ++ usleep_range(1000, 1500); ++ } ++ ++ if (timeout >= 10) ++ dev_err(&priv->client->dev, "timeout remote write acked\n"); ++} ++ ++static void max9296_reset_oneshot(struct max9296_priv *priv) ++{ ++ int timeout; ++ int reg = 0; ++ ++ des_update_bits(MAX9296_CTRL0, BIT(5), BIT(5)); /* set reset one-shot */ ++ ++ /* wait for one-shot bit self-cleared */ ++ for (timeout = 0; timeout < 100; timeout++) { ++ des_read(MAX9296_CTRL0, ®); ++ if (!(reg & BIT(5))) ++ break; ++ ++ msleep(1); ++ } ++ ++ if (reg & BIT(5)) ++ dev_err(&priv->client->dev, "Failed reset oneshot\n"); ++} ++ ++/* ----------------------------------------------------------------------------- ++ * MIPI, mapping, routing ++ */ ++ ++static void max9296_pipe_override(struct max9296_priv *priv, unsigned int pipe, ++ unsigned int dt, unsigned int vc) ++{ ++ int bpp, bank; ++ ++ bpp = mipi_dt_to_bpp(dt); ++ bank = pipe / 4; ++ pipe %= 4; ++ ++ if (priv->dbl == 1) { ++ /* DBL=1 is MUX mode, DBL=0 is Normal mode */ ++ des_update_bits(MAX_BACKTOP27(bank), BIT(pipe + 4), BIT(pipe + 4)); /* enable MUX mode */ ++ bpp = bpp / 2; /* divide because of MUX=1 */ ++ } ++ ++ switch (pipe) { ++ case 0: ++ /* Pipe X: 0 or 4 */ ++ des_update_bits(MAX_BACKTOP12(bank), 0x1f << 3, bpp << 3); ++ des_update_bits(MAX_BACKTOP13(bank), 0x0f, vc); ++ des_update_bits(MAX_BACKTOP15(bank), 0x3f, dt); ++ des_update_bits(bank ? MAX_BACKTOP28(0) : MAX_BACKTOP22(0), BIT(6), BIT(6)); /* enalbe s/w override */ ++ break; ++ case 1: ++ /* Pipe Y: 1 or 5 */ ++ des_update_bits(MAX_BACKTOP18(bank), 0x1f, bpp); ++ des_update_bits(MAX_BACKTOP13(bank), 0x0f << 4, vc << 4); ++ des_update_bits(MAX_BACKTOP16(bank), 0x0f, dt & 0x0f); ++ des_update_bits(MAX_BACKTOP15(bank), 0x03 << 6, (dt & 0x30) << 2); ++ des_update_bits(bank ? MAX_BACKTOP28(0) : MAX_BACKTOP22(0), BIT(7), BIT(7)); /* enable s/w override */ ++ break; ++ case 2: ++ /* Pipe Z: 2 or 6 */ ++ des_update_bits(MAX_BACKTOP19(bank), 0x03, bpp & 0x03); ++ des_update_bits(MAX_BACKTOP18(bank), 0xe0, (bpp & 0x1c) << 3); ++ des_update_bits(MAX_BACKTOP14(bank), 0x0f, vc); ++ des_update_bits(MAX_BACKTOP17(bank), 0x03, dt & 0x03); ++ des_update_bits(MAX_BACKTOP16(bank), 0x0f << 4, (dt & 0x3c) << 2); ++ des_update_bits(bank ? MAX_BACKTOP30(0) : MAX_BACKTOP25(0), BIT(6), BIT(6)); /* enable s/w override */ ++ break; ++ case 3: ++ /* Pipe U: 3 or 7 */ ++ des_update_bits(MAX_BACKTOP19(bank), 0xfc, bpp << 2); ++ des_update_bits(MAX_BACKTOP14(bank), 0x0f << 4, vc << 4); ++ des_update_bits(MAX_BACKTOP17(bank), 0x3f << 2, dt << 2); ++ des_update_bits(bank ? MAX_BACKTOP30(0) : MAX_BACKTOP25(0), BIT(7), BIT(7)); /* enable s/w override */ ++ break; ++ } ++} ++ ++static void max9296_set_pipe_to_mipi_mapping(struct max9296_priv *priv, ++ unsigned int pipe, unsigned int map_n, ++ unsigned int in_dt, unsigned int in_vc, ++ unsigned int out_dt, unsigned int out_vc, unsigned int out_mipi) ++{ ++ int offset = 2 * (map_n % 4); ++ ++ des_write(MAX_MIPI_MAP_SRC(pipe, map_n), (in_vc << 6) | in_dt); ++ des_write(MAX_MIPI_MAP_DST(pipe, map_n), (out_vc << 6) | out_dt); ++ des_update_bits(MAX_MIPI_MAP_DST_PHY(pipe, map_n / 4), 0x03 << offset, out_mipi << offset); ++ des_update_bits(MAX_MIPI_TX11(pipe), BIT(map_n), BIT(map_n)); /* enable SRC_n to DST_n mapping */ ++} ++ ++static void max9296_mipi_setup(struct max9296_priv *priv) ++{ ++ des_write(MAX9296_REG2, 0); /* disable all pipes */ ++ ++ des_write(MAX_MIPI_PHY0, 0x04); /* MIPI Phy 2x4 mode */ ++ des_write(MAX_MIPI_PHY3, 0xe4); /* Lane map: straight */ ++ des_write(MAX_MIPI_PHY4, 0xe4); /* Lane map: straight */ ++ //des_write(MAX_MIPI_PHY5, 0x00); /* HS_prepare time, non-inverted polarity */ ++ //des_write(MAX_MIPI_PHY6, 0x00); ++ ++ des_write(MAX_MIPI_TX10(1), 0xc0); /* MIPI1: 4 lanes */ ++ des_write(MAX_MIPI_TX10(2), 0xc0); /* MIPI2: 4 lanes */ ++ ++ des_update_bits(MAX_BACKTOP22(0), 0x3f, ((priv->csi_rate[1] / 100) & 0x1f) | BIT(5)); /* MIPI rate */ ++ des_update_bits(MAX_BACKTOP25(0), 0x3f, ((priv->csi_rate[1] / 100) & 0x1f) | BIT(5)); ++ des_update_bits(MAX_BACKTOP28(0), 0x3f, ((priv->csi_rate[2] / 100) & 0x1f) | BIT(5)); ++ des_update_bits(MAX_BACKTOP31(0), 0x3f, ((priv->csi_rate[2] / 100) & 0x1f) | BIT(5)); ++ ++ des_update_bits(MAX_MIPI_PHY2, 0xf0, 0xf0); /* enable all MIPI PHYs */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * GMSL1 ++ */ ++ ++static int max9296_gmsl1_sensor_reset(struct max9296_priv *priv, int link_n, int reset_on) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ ++ if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) ++ return -EINVAL; ++ ++ /* sensor reset/unreset */ ++ ser_write(0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | /* set GPIOn value to reset/unreset */ ++ ((priv->active_low_resetb ? BIT(priv->gpio_resetb) : 0) ^ reset_on)); ++ ser_write(0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ ++ ++ return 0; ++} ++ ++static void max9296_gmsl1_cc_enable(struct max9296_priv *priv, int link, int on) ++{ ++ des_update_bits(MAX_GMSL1_4(link), 0x03, on ? 0x03 : 0x00); ++ usleep_range(2000, 2500); ++} ++ ++static int max9296_gmsl1_get_link_lock(struct max9296_priv *priv, int link_n) ++{ ++ int val = 0; ++ ++ des_read(MAX_GMSL1_CB(link_n), &val); ++ ++ return !!(val & BIT(0)); ++} ++ ++static void max9296_gmsl1_link_crossbar_setup(struct max9296_priv *priv, int link, int dt) ++{ ++ /* Always decode reversed bus, since we always reverse on serializer (old imagers need this) */ ++ switch (dt) { ++ case MIPI_DT_YUV8: ++ des_write(MAX_CROSS(link, 0), 7); ++ des_write(MAX_CROSS(link, 1), 6); ++ des_write(MAX_CROSS(link, 2), 5); ++ des_write(MAX_CROSS(link, 3), 4); ++ des_write(MAX_CROSS(link, 4), 3); ++ des_write(MAX_CROSS(link, 5), 2); ++ des_write(MAX_CROSS(link, 6), 1); ++ des_write(MAX_CROSS(link, 7), 0); ++ ++ if (priv->dbl == 0) { ++ /* deserializer DBL=1 is MUX, DBL=0 is Normal */ ++ des_write(MAX_CROSS(link, 8), 15); ++ des_write(MAX_CROSS(link, 9), 14); ++ des_write(MAX_CROSS(link, 10), 13); ++ des_write(MAX_CROSS(link, 11), 12); ++ des_write(MAX_CROSS(link, 12), 11); ++ des_write(MAX_CROSS(link, 13), 10); ++ des_write(MAX_CROSS(link, 14), 9); ++ des_write(MAX_CROSS(link, 15), 8); ++ } ++ break; ++ case MIPI_DT_RAW12: ++ des_write(MAX_CROSS(link, 0), 11); ++ des_write(MAX_CROSS(link, 1), 10); ++ des_write(MAX_CROSS(link, 2), 9); ++ des_write(MAX_CROSS(link, 3), 8); ++ des_write(MAX_CROSS(link, 4), 7); ++ des_write(MAX_CROSS(link, 5), 6); ++ des_write(MAX_CROSS(link, 6), 5); ++ des_write(MAX_CROSS(link, 7), 4); ++ des_write(MAX_CROSS(link, 8), 3); ++ des_write(MAX_CROSS(link, 9), 2); ++ des_write(MAX_CROSS(link, 10), 1); ++ des_write(MAX_CROSS(link, 11), 0); ++ ++ if (priv->dbl == 0) { ++ /* deserializer DBL=1 is MUX, DBL=0 is Normal */ ++ des_write(MAX_CROSS(link, 12), 23); ++ des_write(MAX_CROSS(link, 13), 22); ++ des_write(MAX_CROSS(link, 14), 21); ++ des_write(MAX_CROSS(link, 15), 20); ++ des_write(MAX_CROSS(link, 16), 19); ++ des_write(MAX_CROSS(link, 17), 18); ++ des_write(MAX_CROSS(link, 18), 17); ++ des_write(MAX_CROSS(link, 19), 16); ++ des_write(MAX_CROSS(link, 20), 15); ++ des_write(MAX_CROSS(link, 21), 14); ++ des_write(MAX_CROSS(link, 22), 13); ++ des_write(MAX_CROSS(link, 23), 12); ++ } ++ break; ++ default: ++ dev_err(&priv->client->dev, "crossbar for dt %d is not supported\n", dt); ++ break; ++ } ++ ++ des_write(MAX_CROSS(link, 24), (priv->hsync ? 0x40 : 0) + 24); /* invert HS polarity */ ++ des_write(MAX_CROSS(link, 25), (priv->vsync ? 0 : 0x40) + 25); /* invert VS polarity */ ++ des_write(MAX_CROSS(link, 26), (priv->hsync ? 0x40 : 0) + 26); /* invert DE polarity */ ++} ++ ++static void max9296_gmsl1_initial_setup(struct max9296_priv *priv) ++{ ++ int i; ++ ++ des_write(MAX9296_REG6, 0x10); /* set GMSL1 mode */ ++ des_write(MAX9296_REG1, 0x01); /* 187.5M/3G */ ++ ++ for (i = 0; i < priv->n_links; i++) { ++ des_write(MAX_GMSL1_2(i), 0x03); /* Autodetect serial data rate range */ ++ des_write(MAX_GMSL1_4(i), 0); /* disable REV/FWD CC */ ++ des_update_bits(MAX_GMSL1_6(i), BIT(7), priv->him ? BIT(7) : 0); /* HIM/Legacy mode */ ++ des_write(MAX_GMSL1_7(i), (priv->dbl ? BIT(7) : 0) | /* DBL mode */ ++ (priv->bws ? BIT(5) : 0) | /* BWS 32/24-bit */ ++ (priv->hibw ? BIT(3) : 0) | /* High-bandwidth mode */ ++ (priv->hven ? BIT(2) : 0)); /* HS/VS encoding enable */ ++ des_write(MAX_GMSL1_D(i), 0); /* disable artificial ACKs, RC conf disable */ ++ des_write(MAX_GMSL1_F(i), 0); /* disable DE processing */ ++ des_write(MAX_GMSL1_96(i), (0x13 << 3) | 0x3); /* color map: RAW12 double - i.e. bypass packet as is */ ++ } ++} ++ ++static int max9296_gmsl1_reverse_channel_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int ser_addrs[] = { 0x40 }; /* possible MAX9271/MAX96705 addresses on i2c bus */ ++ int lock_sts; ++ int timeout = priv->timeout; ++ char timeout_str[40]; ++ u8 val = 0; ++ int ret = 0; ++ ++ des_write(MAX_GMSL1_D(link_n), 0x81); /* enable artificial ACKs, RC conf mode */ ++ des_write(MAX_RLMSC5(link_n), 0xa0); /* override RC pulse length */ ++ des_write(MAX_RLMSC4(link_n), 0x80); /* override RC rise/fall time */ ++ usleep_range(2000, 2500); ++ des_write(MAX_GMSL1_4(link_n), 0x3); /* enable REV/FWD CC */ ++ des_write(MAX9296_GMSL1_EN, BIT(link_n)); /* enable GMSL link# */ ++ des_update_bits(MAX9296_CTRL0, 0x13, BIT(link_n)); /* enable GMSL link# */ ++ max9296_reset_oneshot(priv); ++ usleep_range(2000, 2500); ++ ++ for (; timeout > 0; timeout--) { ++ if (priv->him) { ++ /* HIM mode setup */ ++ __reg8_write(ser_addrs[0], 0x4d, 0xc0); ++ usleep_range(2000, 2500); ++ __reg8_write(ser_addrs[0], 0x04, 0x43); /* wake-up, enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ if (priv->bws) { ++ __reg8_write(ser_addrs[0], 0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ } ++ } else { ++ /* Legacy mode setup */ ++ des_write(MAX_RLMS95(link_n), 0x88); /* override RC Tx amplitude */ ++ usleep_range(2000, 2500); ++ ++ __reg8_write(ser_addrs[0], 0x04, 0x43); /* wake-up, enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ __reg8_write(ser_addrs[0], 0x08, 0x01); /* RC receiver high threshold enable */ ++ __reg8_write(ser_addrs[0], 0x97, 0x5f); /* enable RC programming (MAX96705-MAX96711 only) */ ++ usleep_range(2000, 2500); ++ ++ if (priv->bws) { ++ __reg8_write(ser_addrs[0], 0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ } ++ ++ des_write(MAX_RLMS95(link_n), 0xd3); /* increase RC Tx amplitude */ ++ usleep_range(2000, 2500); ++ } ++ ++ __reg8_read(ser_addrs[0], 0x1e, &val); ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ link->ser_id = val; ++ __reg8_write(ser_addrs[0], 0x00, link->ser_addr << 1); /* relocate serizlizer on I2C bus */ ++ usleep_range(2000, 2500); ++ break; ++ } ++ ++ /* Check if already initialized (after reboot/reset ?) */ ++ ser_read(0x1e, &val); ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ link->ser_id = val; ++ ser_write(0x04, 0x43); /* enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ ret = -EADDRINUSE; ++ break; ++ } ++ ++ if (poc_trig) { ++ if (!IS_ERR(link->poc_reg) && (timeout % poc_trig == 0)) { ++ regulator_disable(link->poc_reg); /* POC power off */ ++ mdelay(200); ++ ret = regulator_enable(link->poc_reg); /* POC power on */ ++ if (ret) ++ dev_err(&link->client->dev, "failed to enable poc regulator\n"); ++ mdelay(priv->poc_delay); ++ } ++ } ++ } ++ ++ max9296_gmsl1_sensor_reset(priv, link_n, 0); /* sensor un-reset */ ++ ++ des_write(MAX_GMSL1_D(link_n), 0); /* disable artificial ACKs, RC conf disable */ ++ usleep_range(2000, 2500); ++ des_read(MAX_GMSL1_CB(link_n), &lock_sts); ++ lock_sts = !!(lock_sts & 0x01); ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ priv->links_mask |= BIT(link_n); ++ ++out: ++ sprintf(timeout_str, " retries=%d lock_sts=%d", priv->timeout - timeout, lock_sts); ++ dev_info(&priv->client->dev, "GMSL1 link%d %s %sat 0x%x %s %s\n", link_n, chip_name(link->ser_id), ++ ret == -EADDRINUSE ? "already " : "", link->ser_addr, ++ ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", ++ priv->timeout - timeout ? timeout_str : ""); ++ return ret; ++} ++ ++static int max9296_gmsl1_link_serializer_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ ++ /* GMSL setup */ ++ ser_write(0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ ser_write(0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ ser_write(0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ ++ usleep_range(2000, 2500); ++ ++ if (link->ser_id != MAX9271_ID) { ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ if (priv->dbl == 1) { ++ /* setup crossbar for YUV8/RAW8: reverse DVP bus */ ++ ser_write(0x20, priv->cb[7]); ++ ser_write(0x21, priv->cb[6]); ++ ser_write(0x22, priv->cb[5]); ++ ser_write(0x23, priv->cb[4]); ++ ser_write(0x24, priv->cb[3]); ++ ser_write(0x25, priv->cb[2]); ++ ser_write(0x26, priv->cb[1]); ++ ser_write(0x27, priv->cb[0]); ++ ++ /* this is second byte in the packet (DBL=1 in serializer always) */ ++ ser_write(0x30, priv->cb[7] + 16); ++ ser_write(0x31, priv->cb[6] + 16); ++ ser_write(0x32, priv->cb[5] + 16); ++ ser_write(0x33, priv->cb[4] + 16); ++ ser_write(0x34, priv->cb[3] + 16); ++ ser_write(0x35, priv->cb[2] + 16); ++ ser_write(0x36, priv->cb[1] + 16); ++ ser_write(0x37, priv->cb[0] + 16); ++ } else { ++ /* setup crossbar for YUV8/RAW8: reversed DVP bus */ ++ ser_write(0x20, priv->cb[4]); ++ ser_write(0x21, priv->cb[3]); ++ ser_write(0x22, priv->cb[2]); ++ ser_write(0x23, priv->cb[1]); ++ ser_write(0x24, priv->cb[0]); ++ ser_write(0x25, 0x40); ++ ser_write(0x26, 0x40); ++ if (link->ser_id == MAX96705_ID) { ++ ser_write(0x27, 14); /* HS: D14->D18 */ ++ ser_write(0x28, 15); /* VS: D15->D19 */ ++ ser_write(0x29, 14); /* DE: D14->D20 */ ++ } ++ if (link->ser_id == MAX96707_ID) { ++ ser_write(0x27, 12); /* HS: D12->D18, this is a virtual NC pin, hence it is D14 at HS */ ++ ser_write(0x28, 13); /* VS: D13->D19 */ ++ ser_write(0x29, 12); /* DE: D12->D20 */ ++ } ++ ser_write(0x2A, 0x40); ++ ++ /* this is second byte in the packet (DBL=1 in serializer) */ ++ ser_write(0x30, 0x10 + priv->cb[7]); ++ ser_write(0x31, 0x10 + priv->cb[6]); ++ ser_write(0x32, 0x10 + priv->cb[5]); ++ ser_write(0x33, 0x10 + priv->cb[4]); ++ ser_write(0x34, 0x10 + priv->cb[3]); ++ ser_write(0x35, 0x10 + priv->cb[2]); ++ ser_write(0x36, 0x10 + priv->cb[1]); ++ ser_write(0x37, 0x10 + priv->cb[0]); ++ ser_write(0x38, priv->cb[7]); ++ ser_write(0x39, priv->cb[6]); ++ ser_write(0x3A, priv->cb[5]); ++ ++ ser_write(0x67, 0xC4); /* DBL_ALIGN_TO = 100b */ ++ } ++ break; ++ case MIPI_DT_RAW12: ++ /* setup crossbar for RAW12: reverse DVP bus */ ++ ser_write(0x20, priv->cb[11]); ++ ser_write(0x21, priv->cb[10]); ++ ser_write(0x22, priv->cb[9]); ++ ser_write(0x23, priv->cb[8]); ++ ser_write(0x24, priv->cb[7]); ++ ser_write(0x25, priv->cb[6]); ++ ser_write(0x26, priv->cb[5]); ++ ser_write(0x27, priv->cb[4]); ++ ser_write(0x28, priv->cb[3]); ++ ser_write(0x29, priv->cb[2]); ++ ser_write(0x2a, priv->cb[1]); ++ ser_write(0x2b, priv->cb[0]); ++ ++ /* this is second byte in the packet (DBL=1 in serializer) */ ++ ser_write(0x30, priv->cb[11] + 16); ++ ser_write(0x31, priv->cb[10] + 16); ++ ser_write(0x32, priv->cb[9] + 16); ++ ser_write(0x33, priv->cb[8] + 16); ++ ser_write(0x34, priv->cb[7] + 16); ++ ser_write(0x35, priv->cb[6] + 16); ++ ser_write(0x36, priv->cb[5] + 16); ++ ser_write(0x37, priv->cb[4] + 16); ++ ser_write(0x38, priv->cb[3] + 16); ++ ser_write(0x39, priv->cb[2] + 16); ++ ser_write(0x3a, priv->cb[1] + 16); ++ ser_write(0x3b, priv->cb[0] + 16); ++ ++ if (!(priv->bws || priv->hibw) && priv->dbl) ++ dev_err(&priv->client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); ++ break; ++ } ++ } ++ ++ /* I2C translator setup */ ++// ser_write(0x09, OV490_I2C_ADDR_NEW << 1); /* sensor I2C translated - must be set by sensor driver */ ++// ser_write(0x0A, OV490_I2C_ADDR << 1); /* sensor I2C native - must be set by sensor driver */ ++ ser_write(0x0B, BROADCAST << 1); /* serializer broadcast I2C translated */ ++ ser_write(0x0C, link->ser_addr << 1); /* serializer broadcast I2C native */ ++ /* put serializer in configuration link state */ ++ ser_write(0x04, 0x43); /* enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ ++ return 0; ++} ++ ++static void max9296_gmsl1_link_pipe_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int pipe = link_n; /* straight map */ ++ int dt = priv->dt; /* should come from imager */ ++ int in_vc = 0; ++ ++ max9296_pipe_override(priv, pipe, dt, in_vc); /* override dt, vc */ ++ ++ des_write(MAX_MIPI_TX11(pipe), 0x00); /* disable all mappings */ ++ des_write(MAX_MIPI_TX12(pipe), 0x00); ++ ++ /* use map #0 for payload data */ ++ max9296_set_pipe_to_mipi_mapping(priv, pipe, 0, /* pipe, map# */ ++ dt, in_vc, /* src DT, VC */ ++ dt, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ /* use map #1 for FS */ ++ max9296_set_pipe_to_mipi_mapping(priv, pipe, 1, /* pipe, map# */ ++ 0x00, in_vc, /* src DT, VC */ ++ 0x00, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ /* use map #2 for FE */ ++ max9296_set_pipe_to_mipi_mapping(priv, pipe, 2, /* pipe, map# */ ++ 0x01, in_vc, /* src DT, VC */ ++ 0x01, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ usleep_range(5000, 5500); ++ ++ link->pipes_mask |= BIT(pipe); ++} ++ ++static void max9296_gmsl1_postinit(struct max9296_priv *priv) ++{ ++ int i; ++ u8 val = 0; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ struct max9296_link *link = priv->link[i]; ++ ++ if (!(priv->links_mask & BIT(i))) ++ continue; ++ ++ des_write(MAX_GMSL1_4(i), 0x3); /* enable REV/FWD CC */ ++ des_write(MAX9296_GMSL1_EN, BIT(i)); /* enable GMSL link# */ ++ des_update_bits(MAX9296_CTRL0, 0x13, BIT(i)); /* enable GMSL link# */ ++ max9296_reset_oneshot(priv); ++ usleep_range(2000, 2500); ++ ++ ser_read(0x15, &val); ++ if (!(val & BIT(1))) ++ dev_warn(&priv->client->dev, "link%d valid PCLK is not detected\n", i); ++ ++ /* switch to GMSL serial_link for streaming video */ ++ max9296_write_remote_verify(priv, i, 0x04, conf_link ? 0x43 : 0x83); ++ usleep_range(2000, 2500); ++ ++ des_write(MAX_GMSL1_4(i), 0x00); /* disable REV/FWD CC */ ++ ++ switch (priv->link[i]->ser_id) { ++ case MAX9271_ID: ++ des_update_bits(MAX_GMSL1_6(i), 0x07, 0x01); /* use D14/15 for HS/VS */ ++ break; ++ case MAX96705_ID: ++ case MAX96707_ID: ++ des_update_bits(MAX_GMSL1_6(i), 0x07, 0x00); /* use D18/D19 for HS/VS */ ++ break; ++ } ++ } ++ ++ for (i = 0; i < priv->n_links; i++) ++ des_write(MAX_GMSL1_4(i), priv->links_mask & BIT(i) ? 0x03 : 0); /* enable REV/FWD CC */ ++ ++ des_write(MAX9296_GMSL1_EN, priv->links_mask); /* enable detected links */ ++ des_update_bits(MAX9296_CTRL0, 0x13, priv->links_mask == 3 ? 0x13 : priv->links_mask); /* enable detected links */ ++ max9296_reset_oneshot(priv); /* one-shot reset links */ ++} ++ ++static void max9296_gmsl1_fsync_setup(struct max9296_priv *priv) ++{ ++ des_write(MAX9296_FSYNC_5, priv->fsync_period & 0xff); /* Fsync Period L */ ++ des_write(MAX9296_FSYNC_6, (priv->fsync_period >> 8) & 0xff);/* Fsync Period M */ ++ des_write(MAX9296_FSYNC_7, priv->fsync_period >> 16); /* Fsync Period H */ ++ //des_write(MAX9296_FSYNC_8, 0x00); /* Disable Err Thresh */ ++ //des_write(MAX9296_FSYNC_9, 0x00); /* Disable Err Thresh */ ++ des_write(MAX9296_FSYNC_10, 0x00); /* Disable Overlap */ ++ des_write(MAX9296_FSYNC_11, 0x00); ++ ++ des_write(MAX9296_FSYNC_0, 0x00); /* Manual method, Internal GMSL1 generator mode */ ++ ++ des_write(MAX_GMSL1_8(0), 0x11); /* Fsync Tx Enable on Link A */ ++ des_write(MAX_GMSL1_8(1), 0x11); /* Fsync Tx Enable on Link B */ ++ des_write(MAX_GMSL1_8(2), 0x11); /* Fsync Tx Enable on Link C */ ++ des_write(MAX_GMSL1_8(3), 0x11); /* Fsync Tx Enable on Link D */ ++ ++ des_write(MAX9296_FSYNC_15, 0x1f); /* GMSL1 Type Fsync, Enable all pipes */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * GMSL2 ++ */ ++ ++static void max9296_gmsl2_cc_enable(struct max9296_priv *priv, int link, int on) ++{ ++ /* nothing */ ++} ++ ++static int max9296_gmsl2_get_link_lock(struct max9296_priv *priv, int link_n) ++{ ++ int val = 0; ++ ++ des_read(MAX9296_CTRL3, &val); ++ ++ return !!(val & BIT(3)) && (val & BIT(link_n + 4)); ++} ++ ++static void max9296_gmsl2_initial_setup(struct max9296_priv *priv) ++{ ++ des_write(MAX9296_REG6, 0xC0 | 0x10); /* set GMSL2 mode */ ++ des_write(MAX9296_REG1, 0x02); /* 187.5M/6G */ ++} ++ ++static int max9296_gmsl2_reverse_channel_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int ser_addrs[] = {0x40, 0x42, 0x60, 0x62}; /* possible MAX9295 addresses on i2c bus */ ++ int timeout = priv->timeout; ++ int ret = 0; ++ int i = 0; ++ ++ des_update_bits(MAX9296_CTRL0, 0x13, BIT(link_n)); /* enable GMSL link# */ ++ max9296_reset_oneshot(priv); ++ ++ /* wait 100ms for link to be established, indicated when status bit LOCKED goes high */ ++ while ((!max9296_gmsl2_get_link_lock(priv, link_n)) && (--timeout)) ++ msleep(1); ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ for (i = 0; i < ARRAY_SIZE(ser_addrs); i++) { ++ int val = 0; ++ ++ __reg16_read(ser_addrs[i], 0x000d, &val); /* read serializer ID */ ++ if (val == MAX9295A_ID || val == MAX9295B_ID) { ++ link->ser_id = val; ++ __reg16_write(ser_addrs[i], 0x0000, link->ser_addr << 1); /* relocate serizlizer on I2C bus */ ++ usleep_range(2000, 2500); ++ break; ++ } ++ } ++ ++ if (i == ARRAY_SIZE(ser_addrs)) { ++ dev_err(&priv->client->dev, "serializer not found\n"); ++ goto out; ++ } ++ ++ priv->links_mask |= BIT(link_n); ++ ++out: ++ dev_info(&priv->client->dev, "link%d %s %sat 0x%x (0x%x) %s\n", link_n, chip_name(link->ser_id), ++ ret == -EADDRINUSE ? "already " : "", link->ser_addr, ser_addrs[i], ++ ret == -ETIMEDOUT ? "not found: timeout GMSL2 link establish" : ""); ++ return ret; ++} ++ ++static int max9296_gmsl2_link_serializer_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int i; ++ ++ //ser_write(MAX9295_CTRL0, 0x31); /* link reset */ ++ //msleep(100); ++ ser_write(MAX9295_REG2, 0x03); /* disable all pipes */ ++ ++ if (strcmp(priv->mbus, "dvp") == 0) { ++ ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ ++ (priv->hven ? BIT(5) : 0)); /* HS/VS encoding */ ++ ser_write(MAX9295_VIDEO_TX1(0), 0x0a); /* BPP = 10 */ ++ ser_write(MAX9295_REG7, 0x07); /* DVP stream, enable HS/VS, rising edge */ ++ } ++ ++ ser_write(MAX9295_REG2, 0x13); /* enable Pipe X */ ++ ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ case MIPI_DT_RAW12: ++ /* setup crossbar: strait DVP mapping */ ++ ser_write(MAX9295_CROSS(0), priv->cb[0]); ++ ser_write(MAX9295_CROSS(1), priv->cb[1]); ++ ser_write(MAX9295_CROSS(2), priv->cb[2]); ++ ser_write(MAX9295_CROSS(3), priv->cb[3]); ++ ser_write(MAX9295_CROSS(4), priv->cb[4]); ++ ser_write(MAX9295_CROSS(5), priv->cb[5]); ++ ser_write(MAX9295_CROSS(6), priv->cb[6]); ++ ser_write(MAX9295_CROSS(7), priv->cb[7]); ++ ser_write(MAX9295_CROSS(8), priv->cb[8]); ++ ser_write(MAX9295_CROSS(9), priv->cb[9]); ++ ser_write(MAX9295_CROSS(10), priv->cb[10]); ++ ser_write(MAX9295_CROSS(11), priv->cb[11]); ++ break; ++ } ++ ++ for (i = 0; i < 11; i++) { ++ if (priv->gpio[i] == 0) { ++ /* GPIO set 0 */ ++ ser_write(MAX9295_GPIO_A(i), 0x80); /* 1MOm, GPIO output low */ ++ ser_write(MAX9295_GPIO_B(i), 0xa0); /* push-pull, pull-down */ ++ } ++ if (priv->gpio[i] == 1) { ++ /* GPIO set 1 */ ++ ser_write(MAX9295_GPIO_A(i), 0x90); /* 1MOm, GPIO output high */ ++ ser_write(MAX9295_GPIO_B(i), 0x60); /* push-pull, pull-up */ ++ } ++ if (priv->gpio[i] == 2) { ++ /* GPIO FSIN */ ++ ser_write(MAX9295_GPIO_A(i), 0x84); /* 1MOm, GMSL2 RX from deserializer */ ++ ser_write(MAX9295_GPIO_C(i), 0x01); /* pull-none, GPIO stream ID=1 */ ++ } ++ if (priv->gpio[i] == 3) { ++ /* GPIO Interrupt */ ++ ser_write(MAX9295_GPIO_A(i), 0x63); /* 40kOm, GMSL2 TX to deserializer */ ++ ser_write(MAX9295_GPIO_B(i), 0x25); /* push-pull, pull-none, GPIO stream ID=5 */ ++ } ++ } ++ ++ /* I2C translator setup */ ++// ser_write(MAX9295_I2C2, OV490_I2C_ADDR_NEW << 1); /* sensor I2C translated - must be set by sensor driver */ ++// ser_write(MAX9295_I2C3, OV490_I2C_ADDR << 1); /* sensor I2C native - must be set by sensor driver */ ++ ser_write(MAX9295_I2C4, BROADCAST << 1); /* serializer broadcast I2C translated */ ++ ser_write(MAX9295_I2C5, link->ser_addr << 1); /* serializer broadcast I2C native */ ++ usleep_range(2000, 2500); ++ ++ return 0; ++} ++ ++static struct { ++ int in_dt; ++ int out_dt; ++} gmsl2_pipe_maps[] = { ++ {0x00, 0x00}, /* FS */ ++ {0x01, 0x01}, /* FE */ ++ {MIPI_DT_YUV8, MIPI_DT_YUV8} /* payload data */ ++}; ++ ++static void max9296_gmsl2_pipe_set_source(struct max9296_priv *priv, int pipe, int phy, int in_pipe) ++{ ++ // TODO ++} ++ ++static void max9296_gmsl2_link_pipe_setup(struct max9296_priv *priv, int link_n) ++{ ++ struct max9296_link *link = priv->link[link_n]; ++ int pipe = link_n; /* straight mapping */ ++ int dt = priv->dt; /* must come from imager */ ++ int in_vc = 0; ++ int i; ++ ++ max9296_gmsl2_pipe_set_source(priv, pipe, link_n, 0); /* route Pipe X only */ ++ ++ if (strcmp(priv->mbus, "dvp") == 0) { ++ des_write(MAX9296_RX0(pipe), 0); /* stream_id = 0 */ ++ //des_update_bits(MAX_VIDEO_RX0(pipe), BIT(0), BIT(0)); /* disable Packet detector */ ++ max9296_pipe_override(priv, pipe, dt, in_vc); /* override dt, vc */ ++ } ++ ++ des_write(MAX_MIPI_TX11(pipe), 0x00); /* disable all mappings */ ++ des_write(MAX_MIPI_TX12(pipe), 0x00); ++ ++ for (i = 0; i < ARRAY_SIZE(gmsl2_pipe_maps); i++) { ++ max9296_set_pipe_to_mipi_mapping(priv, pipe, i, /* pipe, map# */ ++ gmsl2_pipe_maps[i].in_dt, in_vc, /* src DT, VC */ ++ gmsl2_pipe_maps[i].out_dt, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ } ++ ++ link->pipes_mask |= BIT(pipe); ++} ++ ++static void max9296_gmsl2_postinit(struct max9296_priv *priv) ++{ ++ des_update_bits(MAX9296_CTRL0, 0x13, priv->links_mask == 3 ? 0x13 : priv->links_mask); /* enable detected links */ ++ max9296_reset_oneshot(priv); /* one-shot reset links */ ++} ++ ++static void max9296_gmsl2_link_crossbar_setup(struct max9296_priv *priv, int link, int dt) ++{ ++ des_write(MAX_CROSS(link, 24), (priv->hsync ? 0x40 : 0) + 24); /* invert HS polarity */ ++ des_write(MAX_CROSS(link, 25), (priv->vsync ? 0 : 0x40) + 25); /* invert VS polarity */ ++ des_write(MAX_CROSS(link, 26), (priv->hsync ? 0x40 : 0) + 26); /* invert DE polarity */ ++} ++ ++static void max9296_gmsl2_fsync_setup(struct max9296_priv *priv) ++{ ++ /* TODO */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * I2C Multiplexer ++ */ ++ ++static int max9296_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) ++{ ++ /* Do nothing! */ ++ return 0; ++} ++ ++static int max9296_i2c_mux_init(struct max9296_priv *priv) ++{ ++ struct i2c_client *client = priv->client; ++ ++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ++ return -ENODEV; ++ ++ priv->mux = i2c_mux_alloc(client->adapter, &client->dev, ++ priv->n_links, 0, I2C_MUX_LOCKED, ++ max9296_i2c_mux_select, NULL); ++ if (!priv->mux) ++ return -ENOMEM; ++ ++ priv->mux->priv = priv; ++ ++ return 0; ++} ++ ++#define max9296_cc_enable(priv,i,en) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_cc_enable(priv, i, en) : \ ++ max9296_gmsl1_cc_enable(priv, i, en)) ++#define max9296_initial_setup(priv) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_initial_setup(priv) : \ ++ max9296_gmsl1_initial_setup(priv)) ++#define max9296_reverse_channel_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_reverse_channel_setup(priv, i) : \ ++ max9296_gmsl1_reverse_channel_setup(priv, i)) ++#define max9296_link_serializer_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_link_serializer_setup(priv, i) : \ ++ max9296_gmsl1_link_serializer_setup(priv, i)) ++#define max9296_link_pipe_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_link_pipe_setup(priv, i) : \ ++ max9296_gmsl1_link_pipe_setup(priv, i)) ++#define max9296_link_crossbar_setup(priv,i,dt) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_link_crossbar_setup(priv, i, dt) : \ ++ max9296_gmsl1_link_crossbar_setup(priv, i, dt)) ++#define max9296_postinit(priv) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_postinit(priv) : \ ++ max9296_gmsl1_postinit(priv)) ++#define max9296_fsync_setup(priv) (priv->gmsl_mode == MODE_GMSL2 ? max9296_gmsl2_fsync_setup(priv) : \ ++ max9296_gmsl1_fsync_setup(priv)) ++ ++static int max9296_preinit(struct max9296_priv *priv) ++{ ++ int i; ++ ++ des_update_bits(MAX9296_CTRL0, BIT(7), BIT(7)); /* reset chip */ ++ mdelay(5); ++ ++ /* enable internal regulator for 1.2V VDD supply */ ++ des_update_bits(MAX9296_CTRL0, BIT(2), BIT(2)); /* REG_ENABLE = 1 */ ++ des_update_bits(MAX9296_CTRL2, BIT(4), BIT(4)); /* REG_MNL = 1 */ ++ ++ /* this is needed for engineering samples */ ++ for (i = 0; i < priv->n_links; i++) { ++ des_write(MAX_RLMS4(i), 0x29); ++ des_write(MAX_RLMSA4(i), 0xc8); ++ des_write(MAX_RLMSA(i), 0x00); ++ des_write(MAX_RLMSB(i), 0x00); ++ } ++ ++ /* I2C-I2C timings */ ++ des_write(MAX9296_I2C_PT_0, 0x01); /* Fast mode Plus, 1mS timeout */ ++ des_write(MAX9296_I2C_PT_1, 0x51); /* i2c speed: 397Kbps, 32mS timeout */ ++ des_write(MAX9296_I2C_0, 0x01); /* Fast mode Plus, 1mS timeout */ ++ des_write(MAX9296_I2C_1, 0x51); /* i2c speed: 397Kbps, 1mS timeout */ ++ ++ des_write(MAX9296_CTRL1, priv->is_coax ? 0x5 : 0); /* cable mode */ ++ des_write(MAX9296_GMSL1_EN, 0); /* disable all links */ ++ des_update_bits(MAX9296_CTRL0, 0x13, 0); /* disable all links */ ++ ++ return 0; ++} ++ ++static int max9296_initialize(struct max9296_priv *priv) ++{ ++ int ret, i; ++ ++ max9296_preinit(priv); ++ max9296_initial_setup(priv); ++ max9296_mipi_setup(priv); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ if (!IS_ERR(priv->link[i]->poc_reg)) { ++ ret = regulator_enable(priv->link[i]->poc_reg); /* POC power on */ ++ if (ret) { ++ dev_err(&priv->link[i]->client->dev, "failed to enable poc regulator\n"); ++ continue; ++ } ++ mdelay(priv->poc_delay); ++ } ++ ++ ret = max9296_reverse_channel_setup(priv, i); ++ if (ret == -ETIMEDOUT) ++ continue; ++ if (!ret) ++ max9296_link_serializer_setup(priv, i); ++ ++ max9296_link_pipe_setup(priv, i); ++ max9296_link_crossbar_setup(priv, i, priv->dt); ++ ++ i2c_mux_add_adapter(priv->mux, 0, i, 0); ++ max9296_cc_enable(priv, i, 0); ++ } ++ ++ max9296_postinit(priv); ++ max9296_fsync_setup(priv); ++ ++ return 0; ++} ++ ++static int max9296_reboot_notifier(struct notifier_block *nb, unsigned long code, void *data) ++{ ++ struct max9296_priv *priv = container_of(nb, struct max9296_priv, reboot_nb); ++ int i; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ if (!IS_ERR(priv->link[i]->poc_reg)) ++ regulator_disable(priv->link[i]->poc_reg); /* POC power off */ ++ } ++ ++ return NOTIFY_DONE; ++} ++ ++static int max9296_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max9296_priv *priv = v4l2_get_subdevdata(sd); ++ ++ if (on) { ++ if (atomic_inc_return(&priv->use_count) == 1) ++ des_update_bits(MAX_BACKTOP12(0), 0x02, 0x02); /* CSI output enable */ ++ } else { ++ if (atomic_dec_return(&priv->use_count) == 0) ++ des_update_bits(MAX_BACKTOP12(0), 0x02, 0); /* CSI output disable */ ++ } ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int max9296_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) ++{ ++ struct max9296_priv *priv = v4l2_get_subdevdata(sd); ++ int ret; ++ int val = 0; ++ ++ ret = des_read(reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int max9296_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) ++{ ++ struct max9296_priv *priv = v4l2_get_subdevdata(sd); ++ ++ return des_write(reg->reg, (u8)reg->val); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops max9296_subdev_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = max9296_g_register, ++ .s_register = max9296_s_register, ++#endif ++ .s_power = max9296_s_power, ++}; ++ ++static struct v4l2_subdev_ops max9296_subdev_ops = { ++ .core = &max9296_subdev_core_ops, ++}; ++ ++static const struct of_device_id max9296_dt_ids[] = { ++ { .compatible = "maxim,max9296" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, max9296_dt_ids); ++ ++static int max9296_parse_dt(struct i2c_client *client) ++{ ++ struct max9296_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ struct property *prop; ++ char name[16]; ++ int i, csi_rate; ++ ++ if (of_property_read_u32(np, "maxim,links", &priv->n_links)) ++ priv->n_links = MAX9296_MAX_LINKS; ++ if (of_property_read_u32(np, "maxim,gmsl", &priv->gmsl_mode)) ++ priv->gmsl_mode = MODE_GMSL2; ++ if (of_property_read_bool(np, "maxim,stp")) ++ priv->is_coax = 0; ++ else ++ priv->is_coax = 1; ++ if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { ++ priv->gpio_resetb = -1; ++ } else { ++ if (of_property_read_bool(np, "maxim,resetb-active-high")) ++ priv->active_low_resetb = 0; ++ else ++ priv->active_low_resetb = 1; ++ } ++ if (of_property_read_u32(np, "maxim,fsync-period", &priv->fsync_period)) ++ priv->fsync_period = 3210000;/* 96MHz/30fps */ ++ priv->pclk_rising_edge = true; ++ if (of_property_read_bool(np, "maxim,pclk-falling-edge")) ++ priv->pclk_rising_edge = false; ++ if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) ++ priv->timeout = 100; ++ if (of_property_read_u32(np, "maxim,him", &priv->him)) ++ priv->him = 0; ++ if (of_property_read_u32(np, "maxim,bws", &priv->bws)) ++ priv->bws = 0; ++ if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) ++ priv->dbl = 1; ++ if (of_property_read_u32(np, "maxim,hven", &priv->hven)) ++ priv->hven = 1; ++ if (of_property_read_u32(np, "maxim,hibw", &priv->hibw)) ++ priv->hibw = 0; ++ if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) ++ priv->hsync = 0; ++ if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) ++ priv->vsync = 1; ++ if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) ++ priv->poc_delay = 50; ++ if (of_property_read_u32(np, "maxim,dt", &priv->dt)) ++ priv->dt = MIPI_DT_YUV8; ++ if (of_property_read_u64(np, "maxim,crossbar", &priv->crossbar)) ++ priv->crossbar = crossbar; ++ if (of_property_read_string(np, "maxim,mbus", &priv->mbus)) ++ priv->mbus = mbus_default; ++ for (i = 0; i < 11; i++) { ++ sprintf(name, "maxim,gpio%d", i); ++ if (of_property_read_u32(np, name, &priv->gpio[i])) ++ priv->gpio[i] = -1; ++ } ++ ++ /* module params override dts */ ++ if (gmsl != MODE_GMSL2) ++ priv->gmsl_mode = gmsl; ++ if (him) ++ priv->him = him; ++ if (fsync_period) { ++ priv->fsync_period = fsync_period; ++// priv->fsync_mode = fsync_mode_default; ++ } ++ if (hsync) ++ priv->hsync = hsync; ++ if (!vsync) ++ priv->vsync = vsync; ++ if (gpio_resetb) ++ priv->gpio_resetb = gpio_resetb; ++ if (active_low_resetb) ++ priv->active_low_resetb = active_low_resetb; ++ if (timeout_n) ++ priv->timeout = timeout_n; ++ if (poc_delay) ++ priv->poc_delay = poc_delay; ++ if (bws) ++ priv->bws = bws; ++ if (!dbl) ++ priv->dbl = dbl; ++ if (dt != MIPI_DT_YUV8) ++ priv->dt = dt; ++// if (hsgen) ++// priv->hsgen = hsgen; ++ if (gpio0 >= 0) ++ priv->gpio[0] = gpio0; ++ if (gpio1 >= 0) ++ priv->gpio[1] = gpio1; ++ if (gpio7 >= 0) ++ priv->gpio[7] = gpio7; ++ if (gpio8 >= 0) ++ priv->gpio[8] = gpio8; ++ ++ /* parse serializer crossbar setup */ ++ for (i = 0; i < 16; i++) { ++ priv->cb[i] = priv->crossbar % 16; ++ priv->crossbar /= 16; ++ } ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ if (i < priv->n_links) { ++ if (of_property_read_u32(endpoint, "ser-addr", &priv->link[i]->ser_addr)) { ++ of_node_put(endpoint); ++ dev_err(&client->dev, "ser-addr not set\n"); ++ return -EINVAL; ++ } ++ priv->link[i]->sd_fwnode = of_fwnode_handle(endpoint); ++ } ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ prop = of_find_property(endpoint, "csi-rate", NULL); ++ if (prop) { ++ of_property_read_u32(endpoint, "csi-rate", &csi_rate); ++ of_update_property(rendpoint, prop); ++ } ++ ++ prop = of_find_property(endpoint, "dvp-order", NULL); ++ if (prop) ++ of_update_property(rendpoint, prop); ++ } ++ ++ of_node_put(endpoint); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ priv->link[i]->out_mipi = 1; /* CSI default forwarding is to MIPI1 */ ++ priv->link[i]->out_vc = i; /* Default VC map: 0 1 2 3 */ ++ } ++ ++ prop = of_find_property(np, "maxim,links-mipi-map", NULL); ++ if (prop) { ++ const __be32 *map = NULL; ++ u32 val; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ map = of_prop_next_u32(prop, map, &val); ++ if (!map) ++ break; ++ if (val >= MAX9296_MAX_MIPI) ++ return -EINVAL; ++ priv->link[i]->out_mipi = val; ++ } ++ } ++ ++ for (i = 0; i < priv->n_links; i++) ++ priv->csi_rate[priv->link[i]->out_mipi] = csi_rate; ++ ++ prop = of_find_property(np, "maxim,links-vc-map", NULL); ++ if (prop) { ++ const __be32 *map = NULL; ++ u32 val; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ map = of_prop_next_u32(prop, map, &val); ++ if (!map) ++ break; ++ if (val >= 4) ++ return -EINVAL; ++ priv->link[i]->out_vc = val; ++ } ++ } ++ ++ dev_dbg(&client->dev, "Link# | MIPI rate | Map | VC\n"); ++ for (i = 0; i < priv->n_links; i++) ++ dev_dbg(&client->dev, "%5d | %9d | %3d | %2d\n", i, priv->csi_rate[i], priv->link[i]->out_mipi, priv->link[i]->out_vc); ++ ++ return 0; ++} ++ ++static int max9296_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct max9296_priv *priv; ++ struct gpio_desc *pwdn_gpio; ++ int ret, i; ++ int val = 0; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->regmap = devm_regmap_init_i2c(client, &max9296_regmap[0]); ++ if (IS_ERR(priv->regmap)) ++ return PTR_ERR(priv->regmap); ++ ++ i2c_set_clientdata(client, priv); ++ priv->client = client; ++ atomic_set(&priv->use_count, 0); ++ ++ priv->ref_clk = v4l2_clk_get(&client->dev, "ref_clk"); ++ if (!IS_ERR(priv->ref_clk)) { ++ dev_info(&client->dev, "ref_clk = %luKHz", v4l2_clk_get_rate(priv->ref_clk) / 1000); ++ v4l2_clk_enable(priv->ref_clk); ++ } ++ ++ pwdn_gpio = devm_gpiod_get_optional(&client->dev, "shutdown", GPIOD_OUT_HIGH); ++ if (!IS_ERR(pwdn_gpio)) { ++ udelay(5); ++ gpiod_set_value_cansleep(pwdn_gpio, 0); ++ usleep_range(3000, 5000); ++ } ++ ++ des_read(MAX9296_REG13, &val); ++ if (val != MAX9296A_ID) ++ return -ENODEV; ++ ++ for (i = 0; i < MAX9296_MAX_LINKS; i++) { ++ priv->link[i] = devm_kzalloc(&client->dev, sizeof(*priv->link[i]), GFP_KERNEL); ++ if (!priv->link[i]) ++ return -ENOMEM; ++ } ++ ++ ret = max9296_parse_dt(client); ++ if (ret) ++ goto out; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ char poc_name[10]; ++ ++ sprintf(poc_name, "poc%d", i); ++ priv->link[i]->poc_reg = devm_regulator_get(&client->dev, poc_name); ++ if (PTR_ERR(priv->link[i]->poc_reg) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ } ++ ++ for (i = 0; i < priv->n_links; i++) { ++ priv->link[i]->client = i2c_new_dummy(client->adapter, priv->link[i]->ser_addr); ++ if (!priv->link[i]->client) ++ return -ENOMEM; ++ ++ priv->link[i]->regmap = regmap_init_i2c(priv->link[i]->client, &max9296_regmap[priv->gmsl_mode]); ++ if (IS_ERR(priv->link[i]->regmap)) ++ return PTR_ERR(priv->link[i]->regmap); ++ } ++ ++ ret = max9296_i2c_mux_init(priv); ++ if (ret) { ++ dev_err(&client->dev, "Unable to initialize I2C multiplexer\n"); ++ goto out; ++ } ++ ++ ret = max9296_initialize(priv); ++ if (ret < 0) ++ goto out; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ v4l2_subdev_init(&priv->link[i]->sd, &max9296_subdev_ops); ++ priv->link[i]->sd.owner = client->dev.driver->owner; ++ priv->link[i]->sd.dev = &client->dev; ++ priv->link[i]->sd.grp_id = i; ++ v4l2_set_subdevdata(&priv->link[i]->sd, priv); ++ priv->link[i]->sd.fwnode = priv->link[i]->sd_fwnode; ++ ++ snprintf(priv->link[i]->sd.name, V4L2_SUBDEV_NAME_SIZE, "%s.%d %d-%04x", ++ client->dev.driver->name, i, i2c_adapter_id(client->adapter), ++ client->addr); ++ ++ ret = v4l2_async_register_subdev(&priv->link[i]->sd); ++ if (ret < 0) ++ goto out; ++ } ++ ++ priv->reboot_nb.notifier_call = max9296_reboot_notifier; ++ ret = register_reboot_notifier(&priv->reboot_nb); ++ if (ret) { ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ goto out; ++ } ++ ++ //max9296_debug_add(priv); ++out: ++ return ret; ++} ++ ++static int max9296_remove(struct i2c_client *client) ++{ ++ struct max9296_priv *priv = i2c_get_clientdata(client); ++ int i; ++ ++ //max9296_debug_remove(priv); ++ i2c_mux_del_adapters(priv->mux); ++ unregister_reboot_notifier(&priv->reboot_nb); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ v4l2_async_unregister_subdev(&priv->link[i]->sd); ++ v4l2_device_unregister_subdev(&priv->link[i]->sd); ++ if (!IS_ERR(priv->link[i]->poc_reg)) ++ regulator_disable(priv->link[i]->poc_reg); /* POC power off */ ++ } ++ ++ return 0; ++} ++ ++static const struct i2c_device_id max9296_id[] = { ++ { "max9296", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, max9296_id); ++ ++static struct i2c_driver max9296_i2c_driver = { ++ .driver = { ++ .name = "max9296", ++ .of_match_table = of_match_ptr(max9296_dt_ids), ++ }, ++ .probe = max9296_probe, ++ .remove = max9296_remove, ++ .id_table = max9296_id, ++}; ++ ++module_i2c_driver(max9296_i2c_driver); ++ ++MODULE_DESCRIPTION("GMSL2 driver for MAX9296"); ++MODULE_AUTHOR("Andrey Gusakov, Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.h b/drivers/media/i2c/soc_camera/gmsl/max9296.h +new file mode 100644 +index 0000000..800df43 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.h +@@ -0,0 +1,281 @@ ++/* ++ * MAXIM max9296 GMSL2 driver header ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#define MAX9296_MAX_LINKS 2 ++#define MAX9296_MAX_PIPES 4 ++#define MAX9296_MAX_PIPE_MAPS 16 ++#define MAX9296_MAX_MIPI 4 ++ ++struct max9296_link { ++ struct v4l2_subdev sd; ++ struct fwnode_handle *sd_fwnode; ++ struct i2c_client *client; ++ struct regmap *regmap; ++ int ser_id; ++ int ser_addr; ++ int pipes_mask; /* mask of pipes used by this link */ ++ int out_mipi; /* MIPI# */ ++ int out_vc; /* VC# */ ++ struct regulator *poc_reg; /* PoC power supply */ ++}; ++ ++struct max9296_priv { ++ struct i2c_client *client; ++ struct regmap *regmap; ++ struct i2c_mux_core *mux; ++ int n_links; ++ int links_mask; ++ enum gmsl_mode gmsl_mode; ++ struct max9296_link *link[MAX9296_MAX_LINKS]; ++ int gpio_resetb; ++ int active_low_resetb; ++ bool pclk_rising_edge; ++ bool is_coax; ++ int him; ++ int bws; ++ int dbl; ++ int hibw; ++ int hven; ++ int hsync; ++ int vsync; ++ int dt; ++ u64 crossbar; ++ char cb[16]; ++ const char *mbus; ++ int gpio[11]; ++ int timeout; ++ int poc_delay; ++ struct v4l2_clk *ref_clk; ++ int csi_rate[MAX9296_MAX_MIPI]; ++ int fsync_period; ++ atomic_t use_count; ++ struct notifier_block reboot_nb; ++}; ++ ++#define MAX9296_REG1 0x01 ++#define MAX9296_REG2 0x02 ++#define MAX9296_REG3 0x03 ++#define MAX9296_REG4 0x04 ++#define MAX9296_REG5 0x05 ++#define MAX9296_REG6 0x06 ++#define MAX9296_REG13 0x0d ++#define MAX9296_REG14 0x0e ++#define MAX9296_REG26 0x26 ++ ++#define MAX9296_INTR3 0x1b ++#define MAX9296_INTR5 0x1d ++#define MAX9296_INTR7 0x1f ++#define MAX9296_DEC_ERR_A 0x22 ++#define MAX9296_DEC_ERR_B 0x23 ++#define MAX9296_IDLE_ERR 0x24 ++#define MAX9296_PKT_CNT 0x25 ++#define MAX9296_RX_0 0x2c ++#define MAX9296_RX_3 0x2f ++ ++#define MAX9296_CTRL0 0x17 ++#define MAX9296_CTRL1 0x18 ++#define MAX9296_CTRL2 0x19 ++#define MAX9296_CTRL3 0x1a ++#define MAX9296_CTRL11 0x22 ++#define MAX9296_CTRL12 0x0a ++#define MAX9296_CTRL13 0x0b ++#define MAX9296_CTRL14 0x0c ++ ++#define MAX9296_CNT(n) (0x22 + n) ++ ++#define MAX9296_I2C_PT_0 0x4c ++#define MAX9296_I2C_PT_1 0x4d ++ ++#define MAX9296_CNT4 0x55c ++ ++#define MAX9296_GMSL1_EN 0xf00 ++#define MAX9296_COMMON1 0xf02 ++#define MAX9296_I2C_0 0xf05 ++#define MAX9296_I2C_1 0xf06 ++#define MAX9296_I2C_2 0xf07 ++#define MAX9296_I2C_3 0xf08 ++#define MAX9296_I2C_4 0xf09 ++#define MAX9296_I2C_5 0xf0a ++ ++#define MAX9296_RX0(n) (0x50 + n) ++ ++#define MAX_VIDEO_RX_BASE(n) (n < 5 ? (0x100 + (0x12 * n)) : \ ++ (0x160 + (0x12 * (n - 5)))) ++#define MAX_VIDEO_RX0(n) (MAX_VIDEO_RX_BASE(n) + 0x00) ++#define MAX_VIDEO_RX3(n) (MAX_VIDEO_RX_BASE(n) + 0x03) ++#define MAX_VIDEO_RX8(n) (MAX_VIDEO_RX_BASE(n) + 0x08) ++#define MAX_VIDEO_RX10(n) (MAX_VIDEO_RX_BASE(n) + 0x0a) ++ ++#define MAX_VPRBS(n) (0x1dc + (0x20 * n)) ++ ++#define MAX_CROSS_BASE(n) (0x1c0 + (0x20 * n)) ++#define MAX_CROSS(n, m) (MAX_CROSS_BASE(n) + m) ++ ++#define MAX_BACKTOP_BASE(bank) (0x400 + (0x20 * bank)) ++#define MAX_BACKTOP1(bank) (MAX_BACKTOP_BASE(bank) + 0x00) ++#define MAX_BACKTOP11(bank) (MAX_BACKTOP_BASE(bank) + 0x0a) ++#define MAX_BACKTOP12(bank) (MAX_BACKTOP_BASE(bank) + 0x0b) ++#define MAX_BACKTOP13(bank) (MAX_BACKTOP_BASE(bank) + 0x0c) ++#define MAX_BACKTOP14(bank) (MAX_BACKTOP_BASE(bank) + 0x0d) ++#define MAX_BACKTOP15(bank) (MAX_BACKTOP_BASE(bank) + 0x0e) ++#define MAX_BACKTOP16(bank) (MAX_BACKTOP_BASE(bank) + 0x0f) ++#define MAX_BACKTOP17(bank) (MAX_BACKTOP_BASE(bank) + 0x10) ++#define MAX_BACKTOP18(bank) (MAX_BACKTOP_BASE(bank) + 0x11) ++#define MAX_BACKTOP19(bank) (MAX_BACKTOP_BASE(bank) + 0x12) ++#define MAX_BACKTOP20(bank) (MAX_BACKTOP_BASE(bank) + 0x13) ++#define MAX_BACKTOP21(bank) (MAX_BACKTOP_BASE(bank) + 0x14) ++#define MAX_BACKTOP22(bank) (MAX_BACKTOP_BASE(bank) + 0x15) ++#define MAX_BACKTOP23(bank) (MAX_BACKTOP_BASE(bank) + 0x16) ++#define MAX_BACKTOP24(bank) (MAX_BACKTOP_BASE(bank) + 0x17) ++#define MAX_BACKTOP25(bank) (MAX_BACKTOP_BASE(bank) + 0x18) ++#define MAX_BACKTOP26(bank) (MAX_BACKTOP_BASE(bank) + 0x19) ++#define MAX_BACKTOP27(bank) (MAX_BACKTOP_BASE(bank) + 0x1a) ++#define MAX_BACKTOP28(bank) (MAX_BACKTOP_BASE(bank) + 0x1b) ++#define MAX_BACKTOP29(bank) (MAX_BACKTOP_BASE(bank) + 0x1c) ++#define MAX_BACKTOP30(bank) (MAX_BACKTOP_BASE(bank) + 0x1d) ++#define MAX_BACKTOP31(bank) (MAX_BACKTOP_BASE(bank) + 0x1e) ++#define MAX_BACKTOP32(bank) (MAX_BACKTOP_BASE(bank) + 0x1f) ++ ++#define MAX9296_FSYNC_0 0x3a0 ++#define MAX9296_FSYNC_5 0x3a5 ++#define MAX9296_FSYNC_6 0x3a6 ++#define MAX9296_FSYNC_7 0x3a7 ++#define MAX9296_FSYNC_8 0x3a8 ++#define MAX9296_FSYNC_9 0x3a9 ++#define MAX9296_FSYNC_10 0x3aa ++#define MAX9296_FSYNC_11 0x3ab ++#define MAX9296_FSYNC_15 0x3af ++ ++#define MAX_MIPI_PHY_BASE 0x8a0 ++#define MAX_MIPI_PHY0 (MAX_MIPI_PHY_BASE + 0x00) ++#define MAX_MIPI_PHY2 (MAX_MIPI_PHY_BASE + 0x02) ++#define MAX_MIPI_PHY3 (MAX_MIPI_PHY_BASE + 0x03) ++#define MAX_MIPI_PHY4 (MAX_MIPI_PHY_BASE + 0x04) ++#define MAX_MIPI_PHY5 (MAX_MIPI_PHY_BASE + 0x05) ++#define MAX_MIPI_PHY6 (MAX_MIPI_PHY_BASE + 0x06) ++#define MAX_MIPI_PHY8 (MAX_MIPI_PHY_BASE + 0x08) ++#define MAX_MIPI_PHY9 (MAX_MIPI_PHY_BASE + 0x09) ++#define MAX_MIPI_PHY10 (MAX_MIPI_PHY_BASE + 0x0a) ++#define MAX_MIPI_PHY11 (MAX_MIPI_PHY_BASE + 0x0b) ++#define MAX_MIPI_PHY13 (MAX_MIPI_PHY_BASE + 0x0d) ++#define MAX_MIPI_PHY14 (MAX_MIPI_PHY_BASE + 0x0e) ++ ++#define MAX_MIPI_TX_BASE(n) (0x900 + 0x40 * n) ++#define MAX_MIPI_TX2(n) (MAX_MIPI_TX_BASE(n) + 0x02) ++#define MAX_MIPI_TX10(n) (MAX_MIPI_TX_BASE(n) + 0x0a) ++#define MAX_MIPI_TX11(n) (MAX_MIPI_TX_BASE(n) + 0x0b) ++#define MAX_MIPI_TX12(n) (MAX_MIPI_TX_BASE(n) + 0x0c) ++ ++/* 16 pairs of source-dest registers */ ++#define MAX_MIPI_MAP_SRC(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x0d + (2 * n)) ++#define MAX_MIPI_MAP_DST(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x0e + (2 * n)) ++/* Phy dst. Each reg contains 4 dest */ ++#define MAX_MIPI_MAP_DST_PHY(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x2d + n) ++ ++#define MAX_GMSL1_2(ch) (0xb02 + (0x100 * ch)) ++#define MAX_GMSL1_4(ch) (0xb04 + (0x100 * ch)) ++#define MAX_GMSL1_6(ch) (0xb06 + (0x100 * ch)) ++#define MAX_GMSL1_7(ch) (0xb07 + (0x100 * ch)) ++#define MAX_GMSL1_8(ch) (0xb08 + (0x100 * ch)) ++#define MAX_GMSL1_D(ch) (0xb0d + (0x100 * ch)) ++#define MAX_GMSL1_F(ch) (0xb0f + (0x100 * ch)) ++#define MAX_GMSL1_19(ch) (0xb19 + (0x100 * ch)) ++#define MAX_GMSL1_1B(ch) (0xb1b + (0x100 * ch)) ++#define MAX_GMSL1_1D(ch) (0xb1d + (0x100 * ch)) ++#define MAX_GMSL1_20(ch) (0xb20 + (0x100 * ch)) ++#define MAX_GMSL1_96(ch) (0xb96 + (0x100 * ch)) ++#define MAX_GMSL1_CA(ch) (0xbca + (0x100 * ch)) ++#define MAX_GMSL1_CB(ch) (0xbcb + (0x100 * ch)) ++ ++#define MAX_RLMS4(ch) (0x1404 + (0x100 * ch)) ++#define MAX_RLMSA(ch) (0x140A + (0x100 * ch)) ++#define MAX_RLMSB(ch) (0x140B + (0x100 * ch)) ++#define MAX_RLMSA4(ch) (0x14a4 + (0x100 * ch)) ++ ++#define MAX_RLMS58(ch) (0x1458 + (0x100 * ch)) ++#define MAX_RLMS59(ch) (0x1459 + (0x100 * ch)) ++#define MAX_RLMS95(ch) (0x1495 + (0x100 * ch)) ++#define MAX_RLMSC4(ch) (0x14c4 + (0x100 * ch)) ++#define MAX_RLMSC5(ch) (0x14c5 + (0x100 * ch)) ++ ++static inline int max9296_write(struct max9296_priv *priv, int reg, int val) ++{ ++ int ret; ++ ++ ret = regmap_write(priv->regmap, reg, val); ++ if (ret) ++ dev_dbg(&priv->client->dev, "write register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max9296_read(struct max9296_priv *priv, int reg, int *val) ++{ ++ int ret; ++ ++ ret = regmap_read(priv->regmap, reg, val); ++ if (ret) ++ dev_dbg(&priv->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max9296_update_bits(struct max9296_priv *priv, int reg, int mask, int bits) ++{ ++ int ret; ++ ++ ret = regmap_update_bits(priv->regmap, reg, mask, bits); ++ if (ret) ++ dev_dbg(&priv->client->dev, "update register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++#define des_read(reg, val) max9296_read(priv, reg, val) ++#define des_write(reg, val) max9296_write(priv, reg, val) ++#define des_update_bits(reg, mask, bits) max9296_update_bits(priv, reg, mask, bits) ++ ++static inline int max9296_ser_write(struct max9296_link *link, int reg, int val) ++{ ++ int ret; ++ ++ ret = regmap_write(link->regmap, reg, val); ++ if (ret < 0) ++ dev_dbg(&link->client->dev, "write register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max9296_ser_read(struct max9296_link *link, int reg, u8 *val) ++{ ++ int ret; ++ ++ ret = regmap_read(link->regmap, reg, (int *)val); ++ if (ret) ++ dev_dbg(&link->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max9296_ser_update_bits(struct max9296_link *link, int reg, int mask, int bits) ++{ ++ int ret; ++ ++ ret = regmap_update_bits(link->regmap, reg, mask, bits); ++ if (ret) ++ dev_dbg(&link->client->dev, "update register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++#define ser_read(reg, val) max9296_ser_read(link, reg, val) ++#define ser_write(reg, val) max9296_ser_write(link, reg, val) ++#define ser_update_bits(reg, mask, bits) max9296_ser_update_bits(link, reg, mask, bits) +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296_debug.h b/drivers/media/i2c/soc_camera/gmsl/max9296_debug.h +new file mode 100644 +index 0000000..6bf03a2 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296_debug.h +@@ -0,0 +1,462 @@ ++/* ++ * MAXIM max9296 GMSL2 driver debug stuff ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static char *max9296_link_mode[4] = { ++ "Splitter mode", ++ "Link A", ++ "Link B", ++ "Dual link", ++}; ++ ++static char *line_status[8] = { ++ "Short to battery", ++ "Short to GND", ++ "Normal operation", ++ "Line open", ++ "Line-to-line short", ++ "Line-to-line short", ++ "Line-to-line short", ++ "Line-to-line short" ++}; ++ ++static char *paxket_cnt_types[] = { ++ "None", ++ "VIDEO", ++ "AUDIO", ++ "INFO Frame", ++ "SPI", ++ "I2C", ++ "UART", ++ "GPIO", ++ "AHDCP", ++ "RGMII", ++ "Reserved", ++ "Reserved", ++ "Reserved", ++ "Reserved", ++ "All", ++ "Unknown and packets with error", ++}; ++ ++static int max9296_gmsl1_get_link_lock(struct max9296_priv *priv, int link_n); ++static int max9296_gmsl2_get_link_lock(struct max9296_priv *priv, int link_n); ++ ++#define reg_bits(x, y) ((reg >> (x)) & ((1 << (y)) - 1)) ++ ++static ssize_t max_link_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max9296_priv *priv = i2c_get_clientdata(client); ++ int i = -1; ++ int j; ++ int gmsl2; ++ u32 crc = 0 ; ++ char *_buf = buf; ++ int reg = 0; ++ ++ if (!sscanf(attr->attr.name, "link_%d", &i)) ++ return -EINVAL; ++ ++ if (i < 0) ++ return -EINVAL; ++ ++ if (i >= priv->n_links) { ++ buf += sprintf(buf, "\n"); ++ return (buf - _buf); ++ } ++ ++ buf += sprintf(buf, "Link %c status\n", 'A' + i); ++ ++ des_read(MAX9296_REG6, ®); ++ gmsl2 = !!(reg & BIT(6 + i)); ++ buf += sprintf(buf, "Link mode: %s\n", gmsl2 ? "GMSL2" : "GMSL1"); ++ ++ if (gmsl2) { ++ buf += sprintf(buf, "GMSL2 Link lock: %d\n", ++ max9296_gmsl2_get_link_lock(priv, i)); ++ } else { ++ reg = max9296_gmsl1_get_link_lock(priv, i); ++ buf += sprintf(buf, ++ "GMSL1_CB: 0x%02x:\t" ++ "LOCKED_G1: %d\n", ++ reg, reg_bits(0, 1)); ++ ++ des_read(MAX_GMSL1_CA(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_CA: 0x%02x:\t" ++ "PHASELOCK: %d, WBLOCK_G1: %d, DATAOK: %d\n", ++ reg, reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ ++ des_read(MAX_GMSL1_1B(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_1B: 0x%02x:\t" ++ "LINE_CRC_ERR: %d ", ++ reg, reg_bits(2, 1)); ++ for (j = 0; j < 4; j++) { ++ des_read(MAX_GMSL1_20(i) + j, ®); ++ crc = crc | ((reg & 0xff) << (j * 8)); ++ } ++ buf += sprintf(buf, "last crc 0x%08x\n", crc); ++ ++ des_read(MAX_GMSL1_19(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_19: CC_CRC_ERRCNT %d\n", ++ reg); ++ ++ des_read(MAX_GMSL1_1D(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_1D: 0x%02x:\t" ++ "UNDERBOOST: %d, AEQ-BST: %d\n", ++ reg, reg_bits(4, 1), reg_bits(0, 4)); ++ ++ { ++ des_read(MAX9296_CTRL1, ®); ++ buf += sprintf(buf, ++ "CTRL1: 0x%02x:\t" ++ "Cable: %s\n", ++ reg, ++ reg_bits(i * 2, 1) ? "coax" : "stp"); ++ ++ des_read(MAX9296_REG26, ®); ++ buf += sprintf(buf, ++ "REG26: 0x%02x:\t" ++ "Line status: %s\n", ++ reg, ++ line_status[reg_bits(i * 4, 3)]); ++ ++ des_read(MAX9296_CNT(i), ®); ++ buf += sprintf(buf, ++ "CNT%d: DEC_ERR_x: %d\n", ++ i, reg); ++ } ++ /* TODO: add same for 96712 */ ++ } ++ ++ return (buf - _buf); ++} ++ ++static ssize_t max_pipe_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max9296_priv *priv = i2c_get_clientdata(client); ++ char *_buf = buf; ++ int pipe = 0; ++ int map; ++ int maps_en = 0; ++ int pipes_en; ++ int reg = 0; ++ ++ if (!sscanf(attr->attr.name, "pipe_%d", &pipe)) ++ return -EINVAL; ++ ++ if (pipe < 0) ++ return -EINVAL; ++ ++ if (pipe >= MAX9296_MAX_PIPES) { ++ buf += sprintf(buf, "\n"); ++ return (buf - _buf); ++ } ++ ++ des_read(MAX9296_REG2, &pipes_en); ++ pipes_en = pipes_en >> 4; ++ ++ buf += sprintf(buf, "Video Pipe %d %s\n", ++ pipe, (pipes_en & BIT(pipe)) ? "ENABLED" : "disabled"); ++ if (!(pipes_en & BIT(pipe))) ++ goto out; ++ ++ des_read(MAX_VPRBS(pipe), ®); ++ /* bit 5 is not valid for MAX96712 */ ++ buf += sprintf(buf, ++ "\tVPRBS: 0x%02x\t" ++ "VPRBS_FAIL: %d," ++ "VIDEO_LOCK: %d\n", ++ reg, ++ reg_bits(5, 1), reg_bits(0, 1)); ++ ++ /* show source */ ++ /* TODO */ ++ ++ /* show maps */ ++ des_read(MAX_MIPI_TX11(pipe), &maps_en); ++ des_read(MAX_MIPI_TX12(pipe), ®); ++ maps_en |= reg << 8; ++ ++ for (map = 0; map < MAX9296_MAX_PIPE_MAPS; map++) { ++ int src, dst, mipi; ++ if (!(maps_en & BIT(map))) ++ continue; ++ ++ des_read(MAX_MIPI_MAP_SRC(pipe, map), &src); ++ des_read(MAX_MIPI_MAP_DST(pipe, map), &dst); ++ des_read(MAX_MIPI_MAP_DST_PHY(pipe, map / 4), &mipi); ++ ++ buf += sprintf(buf, " MAP%d: DT %02x, VC %d -> DT %02x, VC %d MIPI %d\n", ++ map, ++ src & 0x3f, (src >> 6) & 0x03, dst & 0x3f, (dst >> 6) & 0x03, ++ (mipi >> ((map % 4) * 2)) & 0x03); ++ } ++ ++ des_read(MAX9296_CNT4 + pipe, ®); ++ buf += sprintf(buf, "VID_PXL_CRC_ERR: 0x%02x\n", reg); ++ ++ des_read(MAX_VIDEO_RX0(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX0: 0x%02x\t" ++ "LCRC_ERR: %d, " ++ "LINE_CRC_SEL: %d, " ++ "LINE_CRC_EN: %d, " ++ "DIS_PKT_DET: %d\n", ++ reg, ++ reg_bits(7, 1), ++ reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX_VIDEO_RX3(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX3: 0x%02x\t" ++ "HD_TR_MODE: %d, " ++ "DLOCKED: %d, " ++ "VLOCKED: %d, " ++ "HLOCKED: %d, " ++ "DTRACKEN: %d, " ++ "VTRACKEN: %d, " ++ "HTRACKEN: %d\n", ++ reg, ++ reg_bits(6, 1), ++ reg_bits(5, 1), reg_bits(4, 1), reg_bits(3, 1), ++ reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX_VIDEO_RX8(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX8: 0x%02x\t" ++ "VID_BLK_LEN_ERR: %d, " ++ "VID_LOCK: %d, " ++ "VID_PKT_DET: %d, " ++ "VID_SEQ_ERR: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), ++ reg_bits(5, 1), reg_bits(4, 1)); ++ des_read(MAX_VIDEO_RX10(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX10: 0x%02x\t" ++ "MASK_VIDEO_DE: %d\n", ++ reg, ++ reg_bits(6, 1)); ++ ++out: ++ return (buf - _buf); ++} ++ ++static ssize_t max_stat_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max9296_priv *priv = i2c_get_clientdata(client); ++ int i; ++ char *_buf = buf; ++ int reg = 0, reg2 = 0; ++ ++ des_read(MAX9296_REG3, ®); ++ buf += sprintf(buf, ++ "REG_REG3: 0x%02x\t" ++ "LOCK_CFG: %d\n", ++ reg, reg_bits(7, 1)); ++ ++ des_read(MAX9296_CTRL0, ®); ++ buf += sprintf(buf, ++ "CTRL0: 0x%02x\n", ++ reg); ++ ++ des_read(MAX9296_CTRL3, ®); ++ buf += sprintf(buf, ++ "CTRL3: 0x%02x:\t" ++ "LINK_MODE: %s, " ++ "GMSL2 LOCKED: %d, ERROR: %d, " ++ "CMU_LOCKED: %d\n", ++ reg, ++ max9296_link_mode[reg_bits(4, 2)], ++ reg_bits(3, 1), reg_bits(2 ,1), ++ reg_bits(1, 1)); ++ /* get errors */ ++ if (reg_bits(2, 1)) { ++ des_read(MAX9296_INTR3, ®); ++ buf += sprintf(buf, ++ "INTR3: 0x%02x:\t" ++ "PHY_INT_OEN_B: %d " ++ "PHY_INT_OEN_A: %d " ++ "REM_ERR_FLAG: %d " ++ "MEM_INT_ERR_FLAG: %d " ++ "LFLT_INT: %d " ++ "IDLE_ERR_FLAG: %d " ++ "DEC_ERR_FLAG_B: %d " ++ "DEC_ERR_FLAG_A: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1), ++ reg_bits(3, 1), reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX9296_INTR5, ®); ++ buf += sprintf(buf, ++ "INTR5: 0x%02x:\t" ++ "EOM_ERR_FLAG_B: %d " ++ "EOM_ERR_FLAG_A: %d " ++ "MAX_RT_FLAG: %d " ++ "RT_CNT_FLAG: %d " ++ "PKT_CNT_FLAG: %d " ++ "WM_ERR_FLAG: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), ++ reg_bits(3, 1), reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX9296_INTR7, ®); ++ buf += sprintf(buf, ++ "INTR7: 0x%02x:\t" ++ "VDDCMP_INT_FLAG: %d " ++ "PORZ_INT_FLAG: %d " ++ "VDDBAD_INT_FLAG: %d " ++ "LCRC_ERR_FLAG: %d " ++ "VPRBS_ERR_FLAG: %d " ++ "VID_PXL_CRC_ERR: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), ++ reg_bits(3, 1), reg_bits(2, 1), reg_bits(0, 1)); ++ ++ des_read(MAX9296_DEC_ERR_A, ®); ++ buf += sprintf(buf, ++ "ERR_A: 0x%02x\n", reg); ++ des_read(MAX9296_DEC_ERR_B, ®); ++ buf += sprintf(buf, ++ "ERR_B: 0x%02x\n", reg); ++ des_read(MAX9296_IDLE_ERR, ®); ++ buf += sprintf(buf, ++ "IDLE_ERR: 0x%02x\n", reg); ++ des_read(MAX9296_PKT_CNT, ®); ++ buf += sprintf(buf, ++ "PKT_CNT: 0x%02x\n", reg); ++ ++ } ++ ++ des_read(MAX9296_CNT(2), ®); ++ buf += sprintf(buf, ++ "CNT2: IDLE_ERR: %d\n", ++ reg); ++ ++ des_read(MAX9296_CNT(3), ®); ++ des_read(MAX9296_RX_0, ®2); ++ buf += sprintf(buf, ++ "CNT3: PKT_CNT: 0x%02x (type %x: %s)\n", ++ reg, reg2 & 0x0f, ++ paxket_cnt_types[reg2 & 0x0f]); ++ ++ des_read(MAX9296_RX_3, ®); ++ buf += sprintf(buf, ++ "RX3: 0x%02x:\t" ++ "PRBS_SYNCED_B: %d, " ++ "SYNC_LOCKED_B: %d, " ++ "WBLOCK_B: %d, " ++ "FAILLOCK_B: %d, " ++ "PRBS_SYNCED_A: %d, " ++ "SYNC_LOCKED_A: %d, " ++ "WBLOCK_A: %d, " ++ "FAILLOCK_A: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1), ++ reg_bits(3, 1), reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ ++ des_read(MAX_BACKTOP1(0), ®); ++ buf += sprintf(buf, ++ "BACKTOP1: 0x%02x:\t" ++ "CSIPLLU_LOCK: %d, " ++ "CSIPLLZ_LOCK: %d, " ++ "CSIPLLY_LOCK: %d, " ++ "CSIPLLX_LOCK: %d, " ++ "LINE_SPL2: %d, " ++ "LINE_SPL1: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1), ++ reg_bits(3, 1), reg_bits(2, 1)); ++ ++ des_read(MAX_BACKTOP11(0), ®); ++ buf += sprintf(buf, ++ "BACKTOP11: 0x%02x:\t" ++ "CMD_OWERFLOW4: %d, " ++ "CMD_OWERFLOW3: %d, " ++ "CMD_OWERFLOW2: %d, " ++ "CMD_OWERFLOW1: %d, " ++ "LMO_Z: %d, " ++ "LMO_Y: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1), ++ reg_bits(2, 1), reg_bits(1, 1)); ++ ++ for (i = 0; i < MAX9296_MAX_MIPI; i++) { ++ buf += sprintf(buf, "MIPI %d\n", i); ++ des_read(MAX_MIPI_TX2(i), ®); ++ buf += sprintf(buf, ++ "\tMIPI_TX2: 0x%02x\n", ++ reg); ++ } ++ ++ return (buf - _buf); ++} ++ ++static DEVICE_ATTR(link_0, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_1, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_2, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_3, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(pipe_0, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_1, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_2, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_3, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_4, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_5, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_6, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_7, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(stat, S_IRUGO, max_stat_show, NULL); ++ ++static struct attribute *max9296_attributes[] = { ++ &dev_attr_link_0.attr, ++ &dev_attr_link_1.attr, ++ &dev_attr_link_2.attr, ++ &dev_attr_link_3.attr, ++ &dev_attr_pipe_0.attr, ++ &dev_attr_pipe_1.attr, ++ &dev_attr_pipe_2.attr, ++ &dev_attr_pipe_3.attr, ++ &dev_attr_pipe_4.attr, ++ &dev_attr_pipe_5.attr, ++ &dev_attr_pipe_6.attr, ++ &dev_attr_pipe_7.attr, ++ &dev_attr_stat.attr, ++ NULL ++}; ++ ++static const struct attribute_group max9296_group = { ++ .attrs = max9296_attributes, ++}; ++ ++int max9296_debug_add(struct max9296_priv *priv) ++{ ++ int ret; ++ ++ ret = sysfs_create_group(&priv->client->dev.kobj, &max9296_group); ++ if (ret < 0) { ++ dev_err(&priv->client->dev, "Sysfs registration failed\n"); ++ return ret; ++ } ++ ++ /* count video packets */ ++ des_update_bits(MAX9296_RX_0, 0x0f, 0x01); ++ ++ return ret; ++} ++ ++void max9296_debug_remove(struct max9296_priv *priv) ++{ ++ sysfs_remove_group(&priv->client->dev.kobj, &max9296_group); ++} +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.c b/drivers/media/i2c/soc_camera/gmsl/max96712.c +new file mode 100644 +index 0000000..af5e1d7 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.c +@@ -0,0 +1,1423 @@ ++/* ++ * MAXIM max96712 GMSL2 driver ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include "common.h" ++#include "max96712.h" ++#include "max96712_debug.h" ++ ++static char mbus_default[10] = "dvp"; /* mipi, dvp */ ++ ++static int conf_link; ++module_param(conf_link, int, 0644); ++MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); ++ ++static int poc_trig; ++module_param(poc_trig, int, 0644); ++MODULE_PARM_DESC(poc_trig, " Use PoC triggering during RC setup. Useful on systems with dedicated PoC and unstable ser-des lock"); ++ ++static int him; ++module_param(him, int, 0644); ++MODULE_PARM_DESC(him, " Use High-Immunity mode (default: leagacy mode)"); ++ ++static int fsync_period; ++module_param(fsync_period, int, 0644); ++MODULE_PARM_DESC(fsync_period, " Frame sync period (default: 3.2MHz)"); ++ ++static int hsync; ++module_param(hsync, int, 0644); ++MODULE_PARM_DESC(hsync, " HSYNC invertion (default: 0 - not inverted)"); ++ ++static int vsync = 1; ++module_param(vsync, int, 0644); ++MODULE_PARM_DESC(vsync, " VSYNC invertion (default: 1 - inverted)"); ++ ++static int gpio_resetb; ++module_param(gpio_resetb, int, 0644); ++MODULE_PARM_DESC(gpio_resetb, " Serializer GPIO reset (default: 0 - not used)"); ++ ++static int active_low_resetb; ++module_param(active_low_resetb, int, 0644); ++MODULE_PARM_DESC(active_low_resetb, " Serializer GPIO reset level (default: 0 - active high)"); ++ ++static int timeout_n = 100; ++module_param(timeout_n, int, 0644); ++MODULE_PARM_DESC(timeout_n, " Timeout of link detection (default: 100 retries)"); ++ ++static int poc_delay = 50; ++module_param(poc_delay, int, 0644); ++MODULE_PARM_DESC(poc_delay, " Delay in ms after POC enable (default: 50 ms)"); ++ ++static int bws; ++module_param(bws, int, 0644); ++MODULE_PARM_DESC(bws, " BWS mode (default: 0 - 24-bit gmsl packets)"); ++ ++static int dbl = 1; ++module_param(dbl, int, 0644); ++MODULE_PARM_DESC(dbl, " DBL mode (default: 1 - DBL mode enabled)"); ++ ++static int dt = MIPI_DT_YUV8; ++module_param(dt, int, 0644); ++MODULE_PARM_DESC(dt, " DataType (default: 0x1e - YUV8)"); ++ ++static unsigned long crossbar = 0xba9876543210; ++module_param(crossbar, ulong, 0644); ++MODULE_PARM_DESC(crossbar, " Serializer crossbar setup (default: ba9876543210 - reversed)"); ++ ++static int gmsl = MODE_GMSL2; ++module_param(gmsl, int, 0644); ++MODULE_PARM_DESC(gmsl, " GMSL mode (default: 2 - GMSL2)"); ++ ++static char *mbus = "dvp"; ++module_param(mbus, charp, 0644); ++MODULE_PARM_DESC(mbus, " Interfaces mipi,dvp (default: dvp)"); ++ ++static int gpio0 = -1, gpio1 = -1, gpio7 = -1, gpio8 = -1; ++module_param(gpio0, int, 0644); ++MODULE_PARM_DESC(gpio0, " GPIO0 function select (default: GPIO0 tri-state)"); ++module_param(gpio1, int, 0644); ++MODULE_PARM_DESC(gpio1, " GPIO1 function select (default: GPIO1 tri-state)"); ++module_param(gpio7, int, 0644); ++MODULE_PARM_DESC(gpio7, " GPIO7 function select (default: GPIO7 tri-state)"); ++module_param(gpio8, int, 0644); ++MODULE_PARM_DESC(gpio8, " GPIO8 function select (default: GPIO8 tri-state)"); ++ ++static const struct regmap_config max96712_regmap[] = { ++ { ++ /* max96712 */ ++ .reg_bits = 16, ++ .val_bits = 8, ++ .max_register = 0x1f03, ++ }, { ++ /* max9271/max96705 */ ++ .reg_bits = 8, ++ .val_bits = 8, ++ .max_register = 0xff, ++ }, { ++ /* max9695 */ ++ .reg_bits = 16, ++ .val_bits = 8, ++ .max_register = 0x1b03, ++ } ++}; ++ ++static void max96712_write_remote_verify(struct max96712_priv *priv, int link_n, u8 reg, int val) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int timeout; ++ ++ for (timeout = 0; timeout < 10; timeout++) { ++ u8 val2 = 0; ++ ++ ser_write(reg, val); ++ ser_read(reg, &val2); ++ if (val2 == val) ++ break; ++ ++ usleep_range(1000, 1500); ++ } ++ ++ if (timeout >= 10) ++ dev_err(&priv->client->dev, "timeout remote write acked\n"); ++} ++ ++static void max96712_reset_oneshot(struct max96712_priv *priv, int mask) ++{ ++ int timeout; ++ int reg = 0; ++ ++ mask &= 0x0f; ++ des_update_bits(MAX96712_CTRL1, mask, mask); /* set reset one-shot */ ++ ++ /* wait for one-shot bit self-cleared */ ++ for (timeout = 0; timeout < 100; timeout++) { ++ des_read(MAX96712_CTRL1, ®); ++ if (!(reg & mask)) ++ break; ++ ++ msleep(1); ++ } ++ ++ if (reg & mask) ++ dev_err(&priv->client->dev, "Failed reset oneshot 0x%x\n", mask); ++} ++ ++/* ----------------------------------------------------------------------------- ++ * MIPI, mapping, routing ++ */ ++ ++static void max96712_pipe_override(struct max96712_priv *priv, unsigned int pipe, ++ unsigned int dt, unsigned int vc) ++{ ++ int bpp, bank; ++ ++ bpp = mipi_dt_to_bpp(dt); ++ bank = pipe / 4; ++ pipe %= 4; ++ ++ if (priv->dbl == 1) { ++ /* DBL=1 is MUX mode, DBL=0 is Normal mode */ ++ des_update_bits(MAX_BACKTOP27(bank), BIT(pipe + 4), BIT(pipe + 4)); /* enable MUX mode */ ++ bpp = bpp / 2; /* divide because of MUX=1 */ ++ } ++ ++ switch (pipe) { ++ case 0: ++ /* Pipe X: 0 or 4 */ ++ des_update_bits(MAX_BACKTOP12(bank), 0x1f << 3, bpp << 3); ++ des_update_bits(MAX_BACKTOP13(bank), 0x0f, vc); ++ des_update_bits(MAX_BACKTOP15(bank), 0x3f, dt); ++ des_update_bits(bank ? MAX_BACKTOP28(0) : MAX_BACKTOP22(0), BIT(6), BIT(6)); /* enalbe s/w override */ ++ break; ++ case 1: ++ /* Pipe Y: 1 or 5 */ ++ des_update_bits(MAX_BACKTOP18(bank), 0x1f, bpp); ++ des_update_bits(MAX_BACKTOP13(bank), 0x0f << 4, vc << 4); ++ des_update_bits(MAX_BACKTOP16(bank), 0x0f, dt & 0x0f); ++ des_update_bits(MAX_BACKTOP15(bank), 0x03 << 6, (dt & 0x30) << 2); ++ des_update_bits(bank ? MAX_BACKTOP28(0) : MAX_BACKTOP22(0), BIT(7), BIT(7)); /* enable s/w override */ ++ break; ++ case 2: ++ /* Pipe Z: 2 or 6 */ ++ des_update_bits(MAX_BACKTOP19(bank), 0x03, bpp & 0x03); ++ des_update_bits(MAX_BACKTOP18(bank), 0xe0, (bpp & 0x1c) << 3); ++ des_update_bits(MAX_BACKTOP14(bank), 0x0f, vc); ++ des_update_bits(MAX_BACKTOP17(bank), 0x03, dt & 0x03); ++ des_update_bits(MAX_BACKTOP16(bank), 0x0f << 4, (dt & 0x3c) << 2); ++ des_update_bits(bank ? MAX_BACKTOP30(0) : MAX_BACKTOP25(0), BIT(6), BIT(6)); /* enable s/w override */ ++ break; ++ case 3: ++ /* Pipe U: 3 or 7 */ ++ des_update_bits(MAX_BACKTOP19(bank), 0xfc, bpp << 2); ++ des_update_bits(MAX_BACKTOP14(bank), 0x0f << 4, vc << 4); ++ des_update_bits(MAX_BACKTOP17(bank), 0x3f << 2, dt << 2); ++ des_update_bits(bank ? MAX_BACKTOP30(0) : MAX_BACKTOP25(0), BIT(7), BIT(7)); /* enable s/w override */ ++ break; ++ } ++} ++ ++static void max96712_set_pipe_to_mipi_mapping(struct max96712_priv *priv, ++ unsigned int pipe, unsigned int map_n, ++ unsigned int in_dt, unsigned int in_vc, ++ unsigned int out_dt, unsigned int out_vc, unsigned int out_mipi) ++{ ++ int offset = 2 * (map_n % 4); ++ ++ des_write(MAX_MIPI_MAP_SRC(pipe, map_n), (in_vc << 6) | in_dt); ++ des_write(MAX_MIPI_MAP_DST(pipe, map_n), (out_vc << 6) | out_dt); ++ des_update_bits(MAX_MIPI_MAP_DST_PHY(pipe, map_n / 4), 0x03 << offset, out_mipi << offset); ++ des_update_bits(MAX_MIPI_TX11(pipe), BIT(map_n), BIT(map_n)); /* enable SRC_n to DST_n mapping */ ++} ++ ++static void max96712_mipi_setup(struct max96712_priv *priv) ++{ ++ des_write(MAX96712_VIDEO_PIPE_EN, 0); /* disable all pipes */ ++ ++ des_write(MAX_MIPI_PHY0, 0x04); /* MIPI Phy 2x4 mode */ ++ des_write(MAX_MIPI_PHY3, 0xe4); /* Lane map: straight */ ++ des_write(MAX_MIPI_PHY4, 0xe4); /* Lane map: straight */ ++ //des_write(MAX_MIPI_PHY5, 0x00); /* HS_prepare time, non-inverted polarity */ ++ //des_write(MAX_MIPI_PHY6, 0x00); ++ ++ des_write(MAX_MIPI_TX10(1), 0xc0); /* MIPI1: 4 lanes */ ++ des_write(MAX_MIPI_TX10(2), 0xc0); /* MIPI2: 4 lanes */ ++ ++ des_update_bits(MAX_BACKTOP22(0), 0x3f, ((priv->csi_rate[1] / 100) & 0x1f) | BIT(5)); /* MIPI rate */ ++ des_update_bits(MAX_BACKTOP25(0), 0x3f, ((priv->csi_rate[1] / 100) & 0x1f) | BIT(5)); ++ des_update_bits(MAX_BACKTOP28(0), 0x3f, ((priv->csi_rate[2] / 100) & 0x1f) | BIT(5)); ++ des_update_bits(MAX_BACKTOP31(0), 0x3f, ((priv->csi_rate[2] / 100) & 0x1f) | BIT(5)); ++ ++ des_update_bits(MAX_MIPI_PHY2, 0xf0, 0xf0); /* enable all MIPI PHYs */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * GMSL1 ++ */ ++ ++static int max96712_gmsl1_sensor_reset(struct max96712_priv *priv, int link_n, int reset_on) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ ++ if (priv->gpio_resetb < 1 || priv->gpio_resetb > 5) ++ return -EINVAL; ++ ++ /* sensor reset/unreset */ ++ ser_write(0x0f, (0xfe & ~BIT(priv->gpio_resetb)) | /* set GPIOn value to reset/unreset */ ++ ((priv->active_low_resetb ? BIT(priv->gpio_resetb) : 0) ^ reset_on)); ++ ser_write(0x0e, 0x42 | BIT(priv->gpio_resetb)); /* set GPIOn direction output */ ++ ++ return 0; ++} ++ ++static void max96712_gmsl1_cc_enable(struct max96712_priv *priv, int link, int on) ++{ ++ des_update_bits(MAX_GMSL1_4(link), 0x03, on ? 0x03 : 0x00); ++ usleep_range(2000, 2500); ++} ++ ++static int max96712_gmsl1_get_link_lock(struct max96712_priv *priv, int link_n) ++{ ++ int val = 0; ++ ++ des_read(MAX_GMSL1_CB(link_n), &val); ++ ++ return !!(val & BIT(0)); ++} ++ ++static void max96712_gmsl1_link_crossbar_setup(struct max96712_priv *priv, int link, int dt) ++{ ++ /* Always decode reversed bus, since we always reverse on serializer (old imagers need this) */ ++ switch (dt) { ++ case MIPI_DT_YUV8: ++ des_write(MAX_CROSS(link, 0), 7); ++ des_write(MAX_CROSS(link, 1), 6); ++ des_write(MAX_CROSS(link, 2), 5); ++ des_write(MAX_CROSS(link, 3), 4); ++ des_write(MAX_CROSS(link, 4), 3); ++ des_write(MAX_CROSS(link, 5), 2); ++ des_write(MAX_CROSS(link, 6), 1); ++ des_write(MAX_CROSS(link, 7), 0); ++ ++ if (priv->dbl == 0) { ++ /* deserializer DBL=1 is MUX, DBL=0 is Normal */ ++ des_write(MAX_CROSS(link, 8), 15); ++ des_write(MAX_CROSS(link, 9), 14); ++ des_write(MAX_CROSS(link, 10), 13); ++ des_write(MAX_CROSS(link, 11), 12); ++ des_write(MAX_CROSS(link, 12), 11); ++ des_write(MAX_CROSS(link, 13), 10); ++ des_write(MAX_CROSS(link, 14), 9); ++ des_write(MAX_CROSS(link, 15), 8); ++ } ++ break; ++ case MIPI_DT_RAW12: ++ des_write(MAX_CROSS(link, 0), 11); ++ des_write(MAX_CROSS(link, 1), 10); ++ des_write(MAX_CROSS(link, 2), 9); ++ des_write(MAX_CROSS(link, 3), 8); ++ des_write(MAX_CROSS(link, 4), 7); ++ des_write(MAX_CROSS(link, 5), 6); ++ des_write(MAX_CROSS(link, 6), 5); ++ des_write(MAX_CROSS(link, 7), 4); ++ des_write(MAX_CROSS(link, 8), 3); ++ des_write(MAX_CROSS(link, 9), 2); ++ des_write(MAX_CROSS(link, 10), 1); ++ des_write(MAX_CROSS(link, 11), 0); ++ ++ if (priv->dbl == 0) { ++ /* deserializer DBL=1 is MUX, DBL=0 is Normal */ ++ des_write(MAX_CROSS(link, 12), 23); ++ des_write(MAX_CROSS(link, 13), 22); ++ des_write(MAX_CROSS(link, 14), 21); ++ des_write(MAX_CROSS(link, 15), 20); ++ des_write(MAX_CROSS(link, 16), 19); ++ des_write(MAX_CROSS(link, 17), 18); ++ des_write(MAX_CROSS(link, 18), 17); ++ des_write(MAX_CROSS(link, 19), 16); ++ des_write(MAX_CROSS(link, 20), 15); ++ des_write(MAX_CROSS(link, 21), 14); ++ des_write(MAX_CROSS(link, 22), 13); ++ des_write(MAX_CROSS(link, 23), 12); ++ } ++ break; ++ default: ++ dev_err(&priv->client->dev, "crossbar for dt %d is not supported\n", dt); ++ break; ++ } ++ ++ des_write(MAX_CROSS(link, 24), (priv->hsync ? 0x40 : 0) + 24); /* invert HS polarity */ ++ des_write(MAX_CROSS(link, 25), (priv->vsync ? 0 : 0x40) + 25); /* invert VS polarity */ ++ des_write(MAX_CROSS(link, 26), (priv->hsync ? 0x40 : 0) + 26); /* invert DE polarity */ ++} ++ ++static void max96712_gmsl1_initial_setup(struct max96712_priv *priv) ++{ ++ int i; ++ ++ des_update_bits(MAX96712_REG6, 0xf0, 0); /* set GMSL1 mode */ ++ des_write(MAX96712_REG26, 0x11); /* 187.5M/3G */ ++ des_write(MAX96712_REG27, 0x11); /* 187.5M/3G */ ++ ++ for (i = 0; i < priv->n_links; i++) { ++ des_write(MAX_GMSL1_2(i), 0x03); /* Autodetect serial data rate range */ ++ des_write(MAX_GMSL1_4(i), 0); /* disable REV/FWD CC */ ++ des_update_bits(MAX_GMSL1_6(i), BIT(7), priv->him ? BIT(7) : 0); /* HIM/Legacy mode */ ++ des_write(MAX_GMSL1_7(i), (priv->dbl ? BIT(7) : 0) | /* DBL mode */ ++ (priv->bws ? BIT(5) : 0) | /* BWS 32/24-bit */ ++ (priv->hibw ? BIT(3) : 0) | /* High-bandwidth mode */ ++ (priv->hven ? BIT(2) : 0)); /* HS/VS encoding enable */ ++ des_write(MAX_GMSL1_D(i), 0); /* disable artificial ACKs, RC conf disable */ ++ des_write(MAX_GMSL1_F(i), 0); /* disable DE processing */ ++ des_write(MAX_GMSL1_96(i), (0x13 << 3) | 0x3); /* color map: RAW12 double - i.e. bypass packet as is */ ++ } ++} ++ ++static int max96712_gmsl1_reverse_channel_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int ser_addrs[] = { 0x40 }; /* possible MAX9271/MAX96705 addresses on i2c bus */ ++ int lock_sts; ++ int timeout = priv->timeout; ++ char timeout_str[40]; ++ u8 val = 0; ++ int ret = 0; ++ ++ des_write(MAX_GMSL1_D(link_n), 0x81); /* enable artificial ACKs, RC conf mode */ ++ des_write(MAX_RLMSC5(link_n), 0xa0); /* override RC pulse length */ ++ des_write(MAX_RLMSC4(link_n), 0x80); /* override RC rise/fall time */ ++ usleep_range(2000, 2500); ++ des_write(MAX_GMSL1_4(link_n), 0x3); /* enable REV/FWD CC */ ++ des_write(MAX96712_REG6, BIT(link_n)); /* GMSL1 mode, enable GMSL link# */ ++ max96712_reset_oneshot(priv, BIT(link_n)); ++ usleep_range(2000, 2500); ++ ++ for (; timeout > 0; timeout--) { ++ if (priv->him) { ++ /* HIM mode setup */ ++ __reg8_write(ser_addrs[0], 0x4d, 0xc0); ++ usleep_range(2000, 2500); ++ __reg8_write(ser_addrs[0], 0x04, 0x43); /* wake-up, enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ if (priv->bws) { ++ __reg8_write(ser_addrs[0], 0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ } ++ } else { ++ /* Legacy mode setup */ ++ des_write(MAX_RLMS95(link_n), 0x88); /* override RC Tx amplitude */ ++ usleep_range(2000, 2500); ++ ++ __reg8_write(ser_addrs[0], 0x04, 0x43); /* wake-up, enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ __reg8_write(ser_addrs[0], 0x08, 0x01); /* RC receiver high threshold enable */ ++ __reg8_write(ser_addrs[0], 0x97, 0x5f); /* enable RC programming (MAX96705-MAX96711 only) */ ++ usleep_range(2000, 2500); ++ ++ if (priv->bws) { ++ __reg8_write(ser_addrs[0], 0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ } ++ ++ des_write(MAX_RLMS95(link_n), 0xd3); /* increase RC Tx amplitude */ ++ usleep_range(2000, 2500); ++ } ++ ++ __reg8_read(ser_addrs[0], 0x1e, &val); ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ link->ser_id = val; ++ __reg8_write(ser_addrs[0], 0x00, link->ser_addr << 1); /* relocate serizlizer on I2C bus */ ++ usleep_range(2000, 2500); ++ break; ++ } ++ ++ /* Check if already initialized (after reboot/reset ?) */ ++ ser_read(0x1e, &val); ++ if (val == MAX9271_ID || val == MAX96705_ID || val == MAX96707_ID) { ++ link->ser_id = val; ++ ser_write(0x04, 0x43); /* enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ ret = -EADDRINUSE; ++ break; ++ } ++ ++ if (poc_trig) { ++ if (!IS_ERR(link->poc_reg) && (timeout % poc_trig == 0)) { ++ regulator_disable(link->poc_reg); /* POC power off */ ++ mdelay(200); ++ ret = regulator_enable(link->poc_reg); /* POC power on */ ++ if (ret) ++ dev_err(&link->client->dev, "failed to enable poc regulator\n"); ++ mdelay(priv->poc_delay); ++ } ++ } ++ } ++ ++ max96712_gmsl1_sensor_reset(priv, link_n, 0); /* sensor un-reset */ ++ ++ des_write(MAX_GMSL1_D(link_n), 0); /* disable artificial ACKs, RC conf disable */ ++ usleep_range(2000, 2500); ++ des_read(MAX_GMSL1_CB(link_n), &lock_sts); ++ lock_sts = !!(lock_sts & 0x01); ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ priv->links_mask |= BIT(link_n); ++ ++out: ++ sprintf(timeout_str, " retries=%d lock_sts=%d", priv->timeout - timeout, lock_sts); ++ dev_info(&priv->client->dev, "GMSL1 link%d %s %sat 0x%x %s %s\n", link_n, chip_name(link->ser_id), ++ ret == -EADDRINUSE ? "already " : "", link->ser_addr, ++ ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", ++ priv->timeout - timeout ? timeout_str : ""); ++ return ret; ++} ++ ++static int max96712_gmsl1_link_serializer_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ ++ /* GMSL setup */ ++ ser_write(0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ ++ ser_write(0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ usleep_range(2000, 2500); ++ ser_write(0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ ++ usleep_range(2000, 2500); ++ ++ if (link->ser_id != MAX9271_ID) { ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ if (priv->dbl == 1) { ++ /* setup crossbar for YUV8/RAW8: reverse DVP bus */ ++ ser_write(0x20, priv->cb[7]); ++ ser_write(0x21, priv->cb[6]); ++ ser_write(0x22, priv->cb[5]); ++ ser_write(0x23, priv->cb[4]); ++ ser_write(0x24, priv->cb[3]); ++ ser_write(0x25, priv->cb[2]); ++ ser_write(0x26, priv->cb[1]); ++ ser_write(0x27, priv->cb[0]); ++ ++ /* this is second byte in the packet (DBL=1 in serializer always) */ ++ ser_write(0x30, priv->cb[7] + 16); ++ ser_write(0x31, priv->cb[6] + 16); ++ ser_write(0x32, priv->cb[5] + 16); ++ ser_write(0x33, priv->cb[4] + 16); ++ ser_write(0x34, priv->cb[3] + 16); ++ ser_write(0x35, priv->cb[2] + 16); ++ ser_write(0x36, priv->cb[1] + 16); ++ ser_write(0x37, priv->cb[0] + 16); ++ } else { ++ /* setup crossbar for YUV8/RAW8: reversed DVP bus */ ++ ser_write(0x20, priv->cb[4]); ++ ser_write(0x21, priv->cb[3]); ++ ser_write(0x22, priv->cb[2]); ++ ser_write(0x23, priv->cb[1]); ++ ser_write(0x24, priv->cb[0]); ++ ser_write(0x25, 0x40); ++ ser_write(0x26, 0x40); ++ if (link->ser_id == MAX96705_ID) { ++ ser_write(0x27, 14); /* HS: D14->D18 */ ++ ser_write(0x28, 15); /* VS: D15->D19 */ ++ ser_write(0x29, 14); /* DE: D14->D20 */ ++ } ++ if (link->ser_id == MAX96707_ID) { ++ ser_write(0x27, 12); /* HS: D12->D18, this is a virtual NC pin, hence it is D14 at HS */ ++ ser_write(0x28, 13); /* VS: D13->D19 */ ++ ser_write(0x29, 12); /* DE: D12->D20 */ ++ } ++ ser_write(0x2A, 0x40); ++ ++ /* this is second byte in the packet (DBL=1 in serializer) */ ++ ser_write(0x30, 0x10 + priv->cb[7]); ++ ser_write(0x31, 0x10 + priv->cb[6]); ++ ser_write(0x32, 0x10 + priv->cb[5]); ++ ser_write(0x33, 0x10 + priv->cb[4]); ++ ser_write(0x34, 0x10 + priv->cb[3]); ++ ser_write(0x35, 0x10 + priv->cb[2]); ++ ser_write(0x36, 0x10 + priv->cb[1]); ++ ser_write(0x37, 0x10 + priv->cb[0]); ++ ser_write(0x38, priv->cb[7]); ++ ser_write(0x39, priv->cb[6]); ++ ser_write(0x3A, priv->cb[5]); ++ ++ ser_write(0x67, 0xC4); /* DBL_ALIGN_TO = 100b */ ++ } ++ break; ++ case MIPI_DT_RAW12: ++ /* setup crossbar for RAW12: reverse DVP bus */ ++ ser_write(0x20, priv->cb[11]); ++ ser_write(0x21, priv->cb[10]); ++ ser_write(0x22, priv->cb[9]); ++ ser_write(0x23, priv->cb[8]); ++ ser_write(0x24, priv->cb[7]); ++ ser_write(0x25, priv->cb[6]); ++ ser_write(0x26, priv->cb[5]); ++ ser_write(0x27, priv->cb[4]); ++ ser_write(0x28, priv->cb[3]); ++ ser_write(0x29, priv->cb[2]); ++ ser_write(0x2a, priv->cb[1]); ++ ser_write(0x2b, priv->cb[0]); ++ ++ /* this is second byte in the packet (DBL=1 in serializer) */ ++ ser_write(0x30, priv->cb[11] + 16); ++ ser_write(0x31, priv->cb[10] + 16); ++ ser_write(0x32, priv->cb[9] + 16); ++ ser_write(0x33, priv->cb[8] + 16); ++ ser_write(0x34, priv->cb[7] + 16); ++ ser_write(0x35, priv->cb[6] + 16); ++ ser_write(0x36, priv->cb[5] + 16); ++ ser_write(0x37, priv->cb[4] + 16); ++ ser_write(0x38, priv->cb[3] + 16); ++ ser_write(0x39, priv->cb[2] + 16); ++ ser_write(0x3a, priv->cb[1] + 16); ++ ser_write(0x3b, priv->cb[0] + 16); ++ ++ if (!(priv->bws || priv->hibw) && priv->dbl) ++ dev_err(&priv->client->dev, " BWS must be 27/32-bit for RAW12 in DBL mode\n"); ++ break; ++ } ++ } ++ ++ /* I2C translator setup */ ++// ser_write(0x09, OV490_I2C_ADDR_NEW << 1); /* sensor I2C translated - must be set by sensor driver */ ++// ser_write(0x0A, OV490_I2C_ADDR << 1); /* sensor I2C native - must be set by sensor driver */ ++ ser_write(0x0B, BROADCAST << 1); /* serializer broadcast I2C translated */ ++ ser_write(0x0C, link->ser_addr << 1); /* serializer broadcast I2C native */ ++ /* put serializer in configuration link state */ ++ ser_write(0x04, 0x43); /* enable RC, conf_link */ ++ usleep_range(2000, 2500); ++ ++ return 0; ++} ++ ++static void max96712_gmsl1_link_pipe_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int pipe = link_n; /* straight map */ ++ int dt = priv->dt; /* should come from imager */ ++ int in_vc = 0; ++ ++ max96712_pipe_override(priv, pipe, dt, in_vc); /* override dt, vc */ ++ ++ des_write(MAX_MIPI_TX11(pipe), 0x00); /* disable all mappings */ ++ des_write(MAX_MIPI_TX12(pipe), 0x00); ++ ++ /* use map #0 for payload data */ ++ max96712_set_pipe_to_mipi_mapping(priv, pipe, 0, /* pipe, map# */ ++ dt, in_vc, /* src DT, VC */ ++ dt, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ /* use map #1 for FS */ ++ max96712_set_pipe_to_mipi_mapping(priv, pipe, 1, /* pipe, map# */ ++ 0x00, in_vc, /* src DT, VC */ ++ 0x00, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ /* use map #2 for FE */ ++ max96712_set_pipe_to_mipi_mapping(priv, pipe, 2, /* pipe, map# */ ++ 0x01, in_vc, /* src DT, VC */ ++ 0x01, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ usleep_range(5000, 5500); ++ ++ link->pipes_mask |= BIT(pipe); ++} ++ ++static void max96712_gmsl1_postinit(struct max96712_priv *priv) ++{ ++ int i; ++ u8 val = 0; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ struct max96712_link *link = priv->link[i]; ++ ++ if (!(priv->links_mask & BIT(i))) ++ continue; ++ ++ des_write(MAX_GMSL1_4(i), 0x3); /* enable REV/FWD CC */ ++ des_write(MAX96712_REG6, BIT(i)); /* GMSL1 mode, enable GMSL link# */ ++ max96712_reset_oneshot(priv, BIT(i)); ++ usleep_range(2000, 2500); ++ ++ ser_read(0x15, &val); ++ if (!(val & BIT(1))) ++ dev_warn(&priv->client->dev, "link%d valid PCLK is not detected\n", i); ++ ++ /* switch to GMSL serial_link for streaming video */ ++ max96712_write_remote_verify(priv, i, 0x04, conf_link ? 0x43 : 0x83); ++ usleep_range(2000, 2500); ++ ++ des_write(MAX_GMSL1_4(i), 0x00); /* disable REV/FWD CC */ ++ ++ switch (priv->link[i]->ser_id) { ++ case MAX9271_ID: ++ des_update_bits(MAX_GMSL1_6(i), 0x07, 0x01); /* use D14/15 for HS/VS */ ++ break; ++ case MAX96705_ID: ++ case MAX96707_ID: ++ des_update_bits(MAX_GMSL1_6(i), 0x07, 0x00); /* use D18/D19 for HS/VS */ ++ break; ++ } ++ } ++ ++ for (i = 0; i < priv->n_links; i++) ++ des_write(MAX_GMSL1_4(i), priv->links_mask & BIT(i) ? 0x03 : 0); /* enable REV/FWD CC */ ++ ++ des_update_bits(MAX96712_REG6, 0x0f, priv->links_mask); /* enable detected links */ ++ max96712_reset_oneshot(priv, priv->links_mask); /* one-shot reset valid links */ ++} ++ ++static void max96712_gmsl1_fsync_setup(struct max96712_priv *priv) ++{ ++ des_write(MAX96712_FSYNC_5, priv->fsync_period & 0xff); /* Fsync Period L */ ++ des_write(MAX96712_FSYNC_6, (priv->fsync_period >> 8) & 0xff);/* Fsync Period M */ ++ des_write(MAX96712_FSYNC_7, priv->fsync_period >> 16); /* Fsync Period H */ ++ //des_write(MAX96712_FSYNC_8, 0x00); /* Disable Err Thresh */ ++ //des_write(MAX96712_FSYNC_9, 0x00); /* Disable Err Thresh */ ++ des_write(MAX96712_FSYNC_10, 0x00); /* Disable Overlap */ ++ des_write(MAX96712_FSYNC_11, 0x00); ++ ++ des_write(MAX96712_FSYNC_0, 0x00); /* Manual method, Internal GMSL1 generator mode */ ++ ++ des_write(MAX_GMSL1_8(0), 0x11); /* Fsync Tx Enable on Link A */ ++ des_write(MAX_GMSL1_8(1), 0x11); /* Fsync Tx Enable on Link B */ ++ des_write(MAX_GMSL1_8(2), 0x11); /* Fsync Tx Enable on Link C */ ++ des_write(MAX_GMSL1_8(3), 0x11); /* Fsync Tx Enable on Link D */ ++ ++ des_write(MAX96712_FSYNC_15, 0x1f); /* GMSL1 Type Fsync, Enable all pipes */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * GMSL2 ++ */ ++ ++static void max96712_gmsl2_cc_enable(struct max96712_priv *priv, int link, int on) ++{ ++ /* nothing */ ++} ++ ++static int max96712_gmsl2_get_link_lock(struct max96712_priv *priv, int link_n) ++{ ++ int lock_reg[] = {MAX96712_CTRL3, MAX96712_CTRL12, MAX96712_CTRL13, MAX96712_CTRL14}; ++ int val = 0; ++ ++ des_read(lock_reg[link_n], &val); ++ ++ return !!(val & BIT(3)); ++} ++ ++static void max96712_gmsl2_initial_setup(struct max96712_priv *priv) ++{ ++ des_update_bits(MAX96712_REG6, 0xf0, 0xf0); /* set GMSL2 mode */ ++ des_write(MAX96712_REG26, 0x22); /* 187.5M/6G */ ++ des_write(MAX96712_REG27, 0x22); /* 187.5M/6G */ ++} ++ ++static int max96712_gmsl2_reverse_channel_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int ser_addrs[] = {0x40, 0x42, 0x60, 0x62}; /* possible MAX9295 addresses on i2c bus */ ++ int timeout = priv->timeout; ++ int ret = 0; ++ int i = 0; ++ ++ des_write(MAX96712_REG6, 0xf0 | BIT(link_n)); /* GMSL2 mode, enable GMSL link# */ ++ max96712_reset_oneshot(priv, BIT(link_n)); ++ ++ /* wait 100ms for link to be established, indicated when status bit LOCKED goes high */ ++ while ((!max96712_gmsl2_get_link_lock(priv, link_n)) && (--timeout)) ++ msleep(1); ++ ++ if (!timeout) { ++ ret = -ETIMEDOUT; ++ goto out; ++ } ++ ++ for (i = 0; i < ARRAY_SIZE(ser_addrs); i++) { ++ int val = 0; ++ ++ __reg16_read(ser_addrs[i], 0x000d, &val); /* read serializer ID */ ++ if (val == MAX9295A_ID || val == MAX9295B_ID) { ++ link->ser_id = val; ++ __reg16_write(ser_addrs[i], 0x0000, link->ser_addr << 1); /* relocate serizlizer on I2C bus */ ++ usleep_range(2000, 2500); ++ break; ++ } ++ } ++ ++ if (i == ARRAY_SIZE(ser_addrs)) { ++ dev_err(&priv->client->dev, "serializer not found\n"); ++ goto out; ++ } ++ ++ priv->links_mask |= BIT(link_n); ++ ++out: ++ dev_info(&priv->client->dev, "link%d %s %sat 0x%x (0x%x) %s\n", link_n, chip_name(link->ser_id), ++ ret == -EADDRINUSE ? "already " : "", link->ser_addr, ser_addrs[i], ++ ret == -ETIMEDOUT ? "not found: timeout GMSL2 link establish" : ""); ++ return ret; ++} ++ ++static int max96712_gmsl2_link_serializer_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int i; ++ ++ //ser_write(MAX9295_CTRL0, 0x31); /* link reset */ ++ //msleep(100); ++ ser_write(MAX9295_REG2, 0x03); /* disable all pipes */ ++ ++ if (strcmp(priv->mbus, "dvp") == 0) { ++ ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ ++ (priv->hven ? BIT(5) : 0)); /* HS/VS encoding */ ++ ser_write(MAX9295_VIDEO_TX1(0), 0x0a); /* BPP = 10 */ ++ ser_write(MAX9295_REG7, 0x07); /* DVP stream, enable HS/VS, rising edge */ ++ } ++ ++ ser_write(MAX9295_REG2, 0x13); /* enable Pipe X */ ++ ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ case MIPI_DT_RAW12: ++ /* setup crossbar: strait DVP mapping */ ++ ser_write(MAX9295_CROSS(0), priv->cb[0]); ++ ser_write(MAX9295_CROSS(1), priv->cb[1]); ++ ser_write(MAX9295_CROSS(2), priv->cb[2]); ++ ser_write(MAX9295_CROSS(3), priv->cb[3]); ++ ser_write(MAX9295_CROSS(4), priv->cb[4]); ++ ser_write(MAX9295_CROSS(5), priv->cb[5]); ++ ser_write(MAX9295_CROSS(6), priv->cb[6]); ++ ser_write(MAX9295_CROSS(7), priv->cb[7]); ++ ser_write(MAX9295_CROSS(8), priv->cb[8]); ++ ser_write(MAX9295_CROSS(9), priv->cb[9]); ++ ser_write(MAX9295_CROSS(10), priv->cb[10]); ++ ser_write(MAX9295_CROSS(11), priv->cb[11]); ++ break; ++ } ++ ++ for (i = 0; i < 11; i++) { ++ if (priv->gpio[i] == 0) { ++ /* GPIO set 0 */ ++ ser_write(MAX9295_GPIO_A(i), 0x80); /* 1MOm, GPIO output low */ ++ ser_write(MAX9295_GPIO_B(i), 0xa0); /* push-pull, pull-down */ ++ } ++ if (priv->gpio[i] == 1) { ++ /* GPIO set 1 */ ++ ser_write(MAX9295_GPIO_A(i), 0x90); /* 1MOm, GPIO output high */ ++ ser_write(MAX9295_GPIO_B(i), 0x60); /* push-pull, pull-up */ ++ } ++ if (priv->gpio[i] == 2) { ++ /* GPIO FSIN */ ++ ser_write(MAX9295_GPIO_A(i), 0x84); /* 1MOm, GMSL2 RX from deserializer */ ++ ser_write(MAX9295_GPIO_C(i), 0x01); /* pull-none, GPIO stream ID=1 */ ++ } ++ if (priv->gpio[i] == 3) { ++ /* GPIO Interrupt */ ++ ser_write(MAX9295_GPIO_A(i), 0x63); /* 40kOm, GMSL2 TX to deserializer */ ++ ser_write(MAX9295_GPIO_B(i), 0x25); /* push-pull, pull-none, GPIO stream ID=5 */ ++ } ++ } ++ ++ /* I2C translator setup */ ++// ser_write(MAX9295_I2C2, OV490_I2C_ADDR_NEW << 1); /* sensor I2C translated - must be set by sensor driver */ ++// ser_write(MAX9295_I2C3, OV490_I2C_ADDR << 1); /* sensor I2C native - must be set by sensor driver */ ++ ser_write(MAX9295_I2C4, BROADCAST << 1); /* serializer broadcast I2C translated */ ++ ser_write(MAX9295_I2C5, link->ser_addr << 1); /* serializer broadcast I2C native */ ++ usleep_range(2000, 2500); ++ ++ return 0; ++} ++ ++static struct { ++ int in_dt; ++ int out_dt; ++} gmsl2_pipe_maps[] = { ++ {0x00, 0x00}, /* FS */ ++ {0x01, 0x01}, /* FE */ ++ {MIPI_DT_YUV8, MIPI_DT_YUV8} /* payload data */ ++}; ++ ++static void max96712_gmsl2_pipe_set_source(struct max96712_priv *priv, int pipe, int phy, int in_pipe) ++{ ++ int offset = (pipe % 2) * 4; ++ ++ des_update_bits(MAX96712_VIDEO_PIPE_SEL(pipe / 2), 0x0f << offset, (phy << (offset + 2)) | ++ (in_pipe << offset)); ++} ++ ++static void max96712_gmsl2_link_pipe_setup(struct max96712_priv *priv, int link_n) ++{ ++ struct max96712_link *link = priv->link[link_n]; ++ int pipe = link_n; /* straight mapping */ ++ int dt = priv->dt; /* must come from imager */ ++ int in_vc = 0; ++ int i; ++ ++ max96712_gmsl2_pipe_set_source(priv, pipe, link_n, 0); /* route Pipe X only */ ++ ++ if (strcmp(priv->mbus, "dvp") == 0) { ++ des_write(MAX96712_RX0(pipe), 0); /* stream_id = 0 */ ++ //des_update_bits(MAX_VIDEO_RX0(pipe), BIT(0), BIT(0)); /* disable Packet detector */ ++ max96712_pipe_override(priv, pipe, dt, in_vc); /* override dt, vc */ ++ } ++ ++ des_write(MAX_MIPI_TX11(pipe), 0x00); /* disable all mappings */ ++ des_write(MAX_MIPI_TX12(pipe), 0x00); ++ ++ for (i = 0; i < ARRAY_SIZE(gmsl2_pipe_maps); i++) { ++ max96712_set_pipe_to_mipi_mapping(priv, pipe, i, /* pipe, map# */ ++ gmsl2_pipe_maps[i].in_dt, in_vc, /* src DT, VC */ ++ gmsl2_pipe_maps[i].out_dt, link->out_vc, /* dst DT, VC */ ++ link->out_mipi); /* dst MIPI PHY */ ++ } ++ ++ link->pipes_mask |= BIT(pipe); ++} ++ ++static void max96712_gmsl2_postinit(struct max96712_priv *priv) ++{ ++ des_update_bits(MAX96712_REG6, 0x0f, priv->links_mask); /* enable detected links */ ++ max96712_reset_oneshot(priv, priv->links_mask); /* one-shot reset valid links */ ++} ++ ++static void max96712_gmsl2_link_crossbar_setup(struct max96712_priv *priv, int link, int dt) ++{ ++ des_write(MAX_CROSS(link, 24), (priv->hsync ? 0x40 : 0) + 24); /* invert HS polarity */ ++ des_write(MAX_CROSS(link, 25), (priv->vsync ? 0 : 0x40) + 25); /* invert VS polarity */ ++ des_write(MAX_CROSS(link, 26), (priv->hsync ? 0x40 : 0) + 26); /* invert DE polarity */ ++} ++ ++static void max96712_gmsl2_fsync_setup(struct max96712_priv *priv) ++{ ++ /* TODO */ ++} ++ ++/* ----------------------------------------------------------------------------- ++ * I2C Multiplexer ++ */ ++ ++static int max96712_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) ++{ ++ /* Do nothing! */ ++ return 0; ++} ++ ++static int max96712_i2c_mux_init(struct max96712_priv *priv) ++{ ++ struct i2c_client *client = priv->client; ++ ++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ++ return -ENODEV; ++ ++ priv->mux = i2c_mux_alloc(client->adapter, &client->dev, ++ priv->n_links, 0, I2C_MUX_LOCKED, ++ max96712_i2c_mux_select, NULL); ++ if (!priv->mux) ++ return -ENOMEM; ++ ++ priv->mux->priv = priv; ++ ++ return 0; ++} ++ ++#define max96712_cc_enable(priv,i,en) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_cc_enable(priv, i, en) : \ ++ max96712_gmsl1_cc_enable(priv, i, en)) ++#define max96712_initial_setup(priv) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_initial_setup(priv) : \ ++ max96712_gmsl1_initial_setup(priv)) ++#define max96712_reverse_channel_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_reverse_channel_setup(priv, i) : \ ++ max96712_gmsl1_reverse_channel_setup(priv, i)) ++#define max96712_link_serializer_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_link_serializer_setup(priv, i) : \ ++ max96712_gmsl1_link_serializer_setup(priv, i)) ++#define max96712_link_pipe_setup(priv,i) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_link_pipe_setup(priv, i) : \ ++ max96712_gmsl1_link_pipe_setup(priv, i)) ++#define max96712_link_crossbar_setup(priv,i,dt) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_link_crossbar_setup(priv, i, dt) : \ ++ max96712_gmsl1_link_crossbar_setup(priv, i, dt)) ++#define max96712_postinit(priv) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_postinit(priv) : \ ++ max96712_gmsl1_postinit(priv)) ++#define max96712_fsync_setup(priv) (priv->gmsl_mode == MODE_GMSL2 ? max96712_gmsl2_fsync_setup(priv) : \ ++ max96712_gmsl1_fsync_setup(priv)) ++ ++static int max96712_preinit(struct max96712_priv *priv) ++{ ++ int i; ++ ++ des_update_bits(MAX96712_PWR1, BIT(6), BIT(6)); /* reset chip */ ++ mdelay(5); ++ ++ /* enable internal regulator for 1.2V VDD supply */ ++ des_update_bits(MAX96712_CTRL0, BIT(2), BIT(2)); /* REG_ENABLE = 1 */ ++ des_update_bits(MAX96712_CTRL2, BIT(4), BIT(4)); /* REG_MNL = 1 */ ++ ++ //for (i = 0; i < priv->n_links; i++) { ++ // des_write(MAX_RLMS58(i), 0x28); ++ // des_write(MAX_RLMS59(i), 0x68); ++ // max96712_reset_oneshot(priv, BIT(i)); ++ //} ++ ++ /* I2C-I2C timings */ ++ for (i = 0; i < 8; i++) { ++ des_write(MAX96712_I2C_0(i), 0x01); /* Fast mode Plus, 1mS timeout */ ++ des_write(MAX96712_I2C_1(i), 0x51); /* i2c speed: 397Kbps, 1mS timeout */ ++ } ++ ++ des_update_bits(MAX96712_CTRL11, 0x55, priv->is_coax ? 0x55 : 0); /* cable mode */ ++ des_update_bits(MAX96712_REG6, 0x0f, 0); /* disable all links */ ++ ++ return 0; ++} ++ ++static int max96712_initialize(struct max96712_priv *priv) ++{ ++ int ret, i; ++ ++ max96712_preinit(priv); ++ max96712_initial_setup(priv); ++ max96712_mipi_setup(priv); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ if (!IS_ERR(priv->link[i]->poc_reg)) { ++ ret = regulator_enable(priv->link[i]->poc_reg); /* POC power on */ ++ if (ret) { ++ dev_err(&priv->link[i]->client->dev, "failed to enable poc regulator\n"); ++ continue; ++ } ++ mdelay(priv->poc_delay); ++ } ++ ++ ret = max96712_reverse_channel_setup(priv, i); ++ if (ret == -ETIMEDOUT) ++ continue; ++ if (!ret) ++ max96712_link_serializer_setup(priv, i); ++ ++ max96712_link_pipe_setup(priv, i); ++ max96712_link_crossbar_setup(priv, i, priv->dt); ++ ++ i2c_mux_add_adapter(priv->mux, 0, i, 0); ++ max96712_cc_enable(priv, i, 0); ++ } ++ ++ max96712_postinit(priv); ++ max96712_fsync_setup(priv); ++ ++ return 0; ++} ++ ++static int max96712_reboot_notifier(struct notifier_block *nb, unsigned long code, void *data) ++{ ++ struct max96712_priv *priv = container_of(nb, struct max96712_priv, reboot_nb); ++ int i; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ if (!IS_ERR(priv->link[i]->poc_reg)) ++ regulator_disable(priv->link[i]->poc_reg); /* POC power off */ ++ } ++ ++ return NOTIFY_DONE; ++} ++ ++static int max96712_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max96712_priv *priv = v4l2_get_subdevdata(sd); ++ int i = sd->grp_id; ++ int pipes_mask = priv->link[i]->pipes_mask; ++ ++ if (on) { ++ des_update_bits(MAX96712_VIDEO_PIPE_EN, pipes_mask, pipes_mask); /* enable link pipes */ ++ if (atomic_inc_return(&priv->use_count) == 1) ++ des_update_bits(MAX_BACKTOP12(0), 0x02, 0x02); /* CSI output enable */ ++ } else { ++ if (atomic_dec_return(&priv->use_count) == 0) ++ des_update_bits(MAX_BACKTOP12(0), 0x02, 0); /* CSI output disable */ ++ des_update_bits(MAX96712_VIDEO_PIPE_EN, pipes_mask, 0); /* disable link pipes */ ++ } ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int max96712_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) ++{ ++ struct max96712_priv *priv = v4l2_get_subdevdata(sd); ++ int ret; ++ int val = 0; ++ ++ ret = des_read(reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int max96712_s_register(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg) ++{ ++ struct max96712_priv *priv = v4l2_get_subdevdata(sd); ++ ++ return des_write(reg->reg, (u8)reg->val); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops max96712_subdev_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = max96712_g_register, ++ .s_register = max96712_s_register, ++#endif ++ .s_power = max96712_s_power, ++}; ++ ++static struct v4l2_subdev_ops max96712_subdev_ops = { ++ .core = &max96712_subdev_core_ops, ++}; ++ ++static const struct of_device_id max96712_dt_ids[] = { ++ { .compatible = "maxim,max96712" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, max96712_dt_ids); ++ ++static int max96712_parse_dt(struct i2c_client *client) ++{ ++ struct max96712_priv *priv = i2c_get_clientdata(client); ++ struct device_node *np = client->dev.of_node; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ struct property *prop; ++ char name[16]; ++ int i, csi_rate; ++ ++ if (of_property_read_u32(np, "maxim,links", &priv->n_links)) ++ priv->n_links = MAX96712_MAX_LINKS; ++ if (of_property_read_u32(np, "maxim,gmsl", &priv->gmsl_mode)) ++ priv->gmsl_mode = MODE_GMSL2; ++ if (of_property_read_bool(np, "maxim,stp")) ++ priv->is_coax = 0; ++ else ++ priv->is_coax = 1; ++ if (of_property_read_u32(np, "maxim,resetb-gpio", &priv->gpio_resetb)) { ++ priv->gpio_resetb = -1; ++ } else { ++ if (of_property_read_bool(np, "maxim,resetb-active-high")) ++ priv->active_low_resetb = 0; ++ else ++ priv->active_low_resetb = 1; ++ } ++ if (of_property_read_u32(np, "maxim,fsync-period", &priv->fsync_period)) ++ priv->fsync_period = 3210000;/* 96MHz/30fps */ ++ priv->pclk_rising_edge = true; ++ if (of_property_read_bool(np, "maxim,pclk-falling-edge")) ++ priv->pclk_rising_edge = false; ++ if (of_property_read_u32(np, "maxim,timeout", &priv->timeout)) ++ priv->timeout = 100; ++ if (of_property_read_u32(np, "maxim,him", &priv->him)) ++ priv->him = 0; ++ if (of_property_read_u32(np, "maxim,bws", &priv->bws)) ++ priv->bws = 0; ++ if (of_property_read_u32(np, "maxim,dbl", &priv->dbl)) ++ priv->dbl = 1; ++ if (of_property_read_u32(np, "maxim,hven", &priv->hven)) ++ priv->hven = 1; ++ if (of_property_read_u32(np, "maxim,hibw", &priv->hibw)) ++ priv->hibw = 0; ++ if (of_property_read_u32(np, "maxim,hsync", &priv->hsync)) ++ priv->hsync = 0; ++ if (of_property_read_u32(np, "maxim,vsync", &priv->vsync)) ++ priv->vsync = 1; ++ if (of_property_read_u32(np, "maxim,poc-delay", &priv->poc_delay)) ++ priv->poc_delay = 50; ++ if (of_property_read_u32(np, "maxim,dt", &priv->dt)) ++ priv->dt = MIPI_DT_YUV8; ++ if (of_property_read_u64(np, "maxim,crossbar", &priv->crossbar)) ++ priv->crossbar = crossbar; ++ if (of_property_read_string(np, "maxim,mbus", &priv->mbus)) ++ priv->mbus = mbus_default; ++ for (i = 0; i < 11; i++) { ++ sprintf(name, "maxim,gpio%d", i); ++ if (of_property_read_u32(np, name, &priv->gpio[i])) ++ priv->gpio[i] = -1; ++ } ++ ++ /* module params override dts */ ++ if (gmsl != MODE_GMSL2) ++ priv->gmsl_mode = gmsl; ++ if (him) ++ priv->him = him; ++ if (fsync_period) { ++ priv->fsync_period = fsync_period; ++// priv->fsync_mode = fsync_mode_default; ++ } ++ if (hsync) ++ priv->hsync = hsync; ++ if (!vsync) ++ priv->vsync = vsync; ++ if (gpio_resetb) ++ priv->gpio_resetb = gpio_resetb; ++ if (active_low_resetb) ++ priv->active_low_resetb = active_low_resetb; ++ if (timeout_n) ++ priv->timeout = timeout_n; ++ if (poc_delay) ++ priv->poc_delay = poc_delay; ++ if (bws) ++ priv->bws = bws; ++ if (!dbl) ++ priv->dbl = dbl; ++ if (dt != MIPI_DT_YUV8) ++ priv->dt = dt; ++// if (hsgen) ++// priv->hsgen = hsgen; ++ if (gpio0 >= 0) ++ priv->gpio[0] = gpio0; ++ if (gpio1 >= 0) ++ priv->gpio[1] = gpio1; ++ if (gpio7 >= 0) ++ priv->gpio[7] = gpio7; ++ if (gpio8 >= 0) ++ priv->gpio[8] = gpio8; ++ ++ /* parse serializer crossbar setup */ ++ for (i = 0; i < 16; i++) { ++ priv->cb[i] = priv->crossbar % 16; ++ priv->crossbar /= 16; ++ } ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ if (i < priv->n_links) { ++ if (of_property_read_u32(endpoint, "ser-addr", &priv->link[i]->ser_addr)) { ++ of_node_put(endpoint); ++ dev_err(&client->dev, "ser-addr not set\n"); ++ return -EINVAL; ++ } ++ priv->link[i]->sd_fwnode = of_fwnode_handle(endpoint); ++ } ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ prop = of_find_property(endpoint, "csi-rate", NULL); ++ if (prop) { ++ of_property_read_u32(endpoint, "csi-rate", &csi_rate); ++ of_update_property(rendpoint, prop); ++ } ++ ++ prop = of_find_property(endpoint, "dvp-order", NULL); ++ if (prop) ++ of_update_property(rendpoint, prop); ++ } ++ ++ of_node_put(endpoint); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ priv->link[i]->out_mipi = 1; /* CSI default forwarding is to MIPI1 */ ++ priv->link[i]->out_vc = i; /* Default VC map: 0 1 2 3 */ ++ } ++ ++ prop = of_find_property(np, "maxim,links-mipi-map", NULL); ++ if (prop) { ++ const __be32 *map = NULL; ++ u32 val; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ map = of_prop_next_u32(prop, map, &val); ++ if (!map) ++ break; ++ if (val >= MAX96712_MAX_MIPI) ++ return -EINVAL; ++ priv->link[i]->out_mipi = val; ++ } ++ } ++ ++ for (i = 0; i < priv->n_links; i++) ++ priv->csi_rate[priv->link[i]->out_mipi] = csi_rate; ++ ++ prop = of_find_property(np, "maxim,links-vc-map", NULL); ++ if (prop) { ++ const __be32 *map = NULL; ++ u32 val; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ map = of_prop_next_u32(prop, map, &val); ++ if (!map) ++ break; ++ if (val >= 4) ++ return -EINVAL; ++ priv->link[i]->out_vc = val; ++ } ++ } ++ ++ dev_dbg(&client->dev, "Link# | MIPI rate | Map | VC\n"); ++ for (i = 0; i < priv->n_links; i++) ++ dev_dbg(&client->dev, "%5d | %9d | %3d | %2d\n", i, priv->csi_rate[i], priv->link[i]->out_mipi, priv->link[i]->out_vc); ++ ++ return 0; ++} ++ ++static int max96712_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct max96712_priv *priv; ++ struct gpio_desc *pwdn_gpio; ++ int ret, i; ++ int val = 0; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->regmap = devm_regmap_init_i2c(client, &max96712_regmap[0]); ++ if (IS_ERR(priv->regmap)) ++ return PTR_ERR(priv->regmap); ++ ++ i2c_set_clientdata(client, priv); ++ priv->client = client; ++ atomic_set(&priv->use_count, 0); ++ ++ priv->ref_clk = v4l2_clk_get(&client->dev, "ref_clk"); ++ if (!IS_ERR(priv->ref_clk)) { ++ dev_info(&client->dev, "ref_clk = %luKHz", v4l2_clk_get_rate(priv->ref_clk) / 1000); ++ v4l2_clk_enable(priv->ref_clk); ++ } ++ ++ pwdn_gpio = devm_gpiod_get_optional(&client->dev, "shutdown", GPIOD_OUT_HIGH); ++ if (!IS_ERR(pwdn_gpio)) { ++ udelay(5); ++ gpiod_set_value_cansleep(pwdn_gpio, 0); ++ usleep_range(3000, 5000); ++ } ++ ++ des_read(MAX96712_DEV_ID, &val); ++ if (val != MAX96712_ID) ++ return -ENODEV; ++ ++ for (i = 0; i < MAX96712_MAX_LINKS; i++) { ++ priv->link[i] = devm_kzalloc(&client->dev, sizeof(*priv->link[i]), GFP_KERNEL); ++ if (!priv->link[i]) ++ return -ENOMEM; ++ } ++ ++ ret = max96712_parse_dt(client); ++ if (ret) ++ goto out; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ char poc_name[10]; ++ ++ sprintf(poc_name, "poc%d", i); ++ priv->link[i]->poc_reg = devm_regulator_get(&client->dev, poc_name); ++ if (PTR_ERR(priv->link[i]->poc_reg) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ } ++ ++ for (i = 0; i < priv->n_links; i++) { ++ priv->link[i]->client = i2c_new_dummy(client->adapter, priv->link[i]->ser_addr); ++ if (!priv->link[i]->client) ++ return -ENOMEM; ++ ++ priv->link[i]->regmap = regmap_init_i2c(priv->link[i]->client, &max96712_regmap[priv->gmsl_mode]); ++ if (IS_ERR(priv->link[i]->regmap)) ++ return PTR_ERR(priv->link[i]->regmap); ++ } ++ ++ ret = max96712_i2c_mux_init(priv); ++ if (ret) { ++ dev_err(&client->dev, "Unable to initialize I2C multiplexer\n"); ++ goto out; ++ } ++ ++ ret = max96712_initialize(priv); ++ if (ret < 0) ++ goto out; ++ ++ for (i = 0; i < priv->n_links; i++) { ++ v4l2_subdev_init(&priv->link[i]->sd, &max96712_subdev_ops); ++ priv->link[i]->sd.owner = client->dev.driver->owner; ++ priv->link[i]->sd.dev = &client->dev; ++ priv->link[i]->sd.grp_id = i; ++ v4l2_set_subdevdata(&priv->link[i]->sd, priv); ++ priv->link[i]->sd.fwnode = priv->link[i]->sd_fwnode; ++ ++ snprintf(priv->link[i]->sd.name, V4L2_SUBDEV_NAME_SIZE, "%s.%d %d-%04x", ++ client->dev.driver->name, i, i2c_adapter_id(client->adapter), ++ client->addr); ++ ++ ret = v4l2_async_register_subdev(&priv->link[i]->sd); ++ if (ret < 0) ++ goto out; ++ } ++ ++ priv->reboot_nb.notifier_call = max96712_reboot_notifier; ++ ret = register_reboot_notifier(&priv->reboot_nb); ++ if (ret) { ++ dev_err(&client->dev, "failed to register reboot notifier\n"); ++ goto out; ++ } ++ ++ //max96712_debug_add(priv); ++out: ++ return ret; ++} ++ ++static int max96712_remove(struct i2c_client *client) ++{ ++ struct max96712_priv *priv = i2c_get_clientdata(client); ++ int i; ++ ++ //max96712_debug_remove(priv); ++ i2c_mux_del_adapters(priv->mux); ++ unregister_reboot_notifier(&priv->reboot_nb); ++ ++ for (i = 0; i < priv->n_links; i++) { ++ v4l2_async_unregister_subdev(&priv->link[i]->sd); ++ v4l2_device_unregister_subdev(&priv->link[i]->sd); ++ if (!IS_ERR(priv->link[i]->poc_reg)) ++ regulator_disable(priv->link[i]->poc_reg); /* POC power off */ ++ } ++ ++ return 0; ++} ++ ++static const struct i2c_device_id max96712_id[] = { ++ { "max96712", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, max96712_id); ++ ++static struct i2c_driver max96712_i2c_driver = { ++ .driver = { ++ .name = "max96712", ++ .of_match_table = of_match_ptr(max96712_dt_ids), ++ }, ++ .probe = max96712_probe, ++ .remove = max96712_remove, ++ .id_table = max96712_id, ++}; ++ ++module_i2c_driver(max96712_i2c_driver); ++ ++MODULE_DESCRIPTION("GMSL2 driver for MAX96712"); ++MODULE_AUTHOR("Andrey Gusakov, Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.h b/drivers/media/i2c/soc_camera/gmsl/max96712.h +new file mode 100644 +index 0000000..2976027 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.h +@@ -0,0 +1,263 @@ ++/* ++ * MAXIM max96712 GMSL2 driver header ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#define MAX96712_MAX_LINKS 4 ++#define MAX96712_MAX_PIPES 8 ++#define MAX96712_MAX_PIPE_MAPS 16 ++#define MAX96712_MAX_MIPI 4 ++ ++struct max96712_link { ++ struct v4l2_subdev sd; ++ struct fwnode_handle *sd_fwnode; ++ struct i2c_client *client; ++ struct regmap *regmap; ++ int ser_id; ++ int ser_addr; ++ int pipes_mask; /* mask of pipes used by this link */ ++ int out_mipi; /* MIPI# */ ++ int out_vc; /* VC# */ ++ struct regulator *poc_reg; /* PoC power supply */ ++}; ++ ++struct max96712_priv { ++ struct i2c_client *client; ++ struct regmap *regmap; ++ struct i2c_mux_core *mux; ++ int n_links; ++ int links_mask; ++ enum gmsl_mode gmsl_mode; ++ struct max96712_link *link[MAX96712_MAX_LINKS]; ++ int gpio_resetb; ++ int active_low_resetb; ++ bool pclk_rising_edge; ++ bool is_coax; ++ int him; ++ int bws; ++ int dbl; ++ int hibw; ++ int hven; ++ int hsync; ++ int vsync; ++ int dt; ++ u64 crossbar; ++ char cb[16]; ++ const char *mbus; ++ int gpio[11]; ++ int timeout; ++ int poc_delay; ++ struct v4l2_clk *ref_clk; ++ int csi_rate[MAX96712_MAX_MIPI]; ++ int fsync_period; ++ atomic_t use_count; ++ struct notifier_block reboot_nb; ++}; ++ ++#define MAX96712_REG4 0x04 ++#define MAX96712_REG5 0x05 ++#define MAX96712_REG6 0x06 ++#define MAX96712_REG14 0x0e ++#define MAX96712_REG26 0x10 ++#define MAX96712_REG27 0x11 ++ ++#define MAX96712_CTRL0 0x17 ++#define MAX96712_CTRL1 0x18 ++#define MAX96712_CTRL2 0x19 ++#define MAX96712_CTRL3 0x1a ++#define MAX96712_CTRL11 0x22 ++#define MAX96712_CTRL12 0x0a ++#define MAX96712_CTRL13 0x0b ++#define MAX96712_CTRL14 0x0c ++ ++#define MAX96712_PWR1 0x13 ++ ++#define MAX96712_DEV_ID 0x4a ++#define MAX96712_REV 0x4c ++ ++#define MAX96712_VIDEO_PIPE_SEL(n) (0xf0 + n) ++#define MAX96712_VIDEO_PIPE_EN 0xf4 ++ ++#define MAX96712_I2C_0(n) (0x640 + (0x10 * n)) ++#define MAX96712_I2C_1(n) (0x641 + (0x10 * n)) ++ ++#define MAX96712_RX0(n) (0x50 + n) ++ ++#define MAX_VIDEO_RX_BASE(n) (n < 5 ? (0x100 + (0x12 * n)) : \ ++ (0x160 + (0x12 * (n - 5)))) ++#define MAX_VIDEO_RX0(n) (MAX_VIDEO_RX_BASE(n) + 0x00) ++#define MAX_VIDEO_RX3(n) (MAX_VIDEO_RX_BASE(n) + 0x03) ++#define MAX_VIDEO_RX8(n) (MAX_VIDEO_RX_BASE(n) + 0x08) ++#define MAX_VIDEO_RX10(n) (MAX_VIDEO_RX_BASE(n) + 0x0a) ++ ++#define MAX_VPRBS(n) (0x1dc + (0x20 * n)) ++ ++#define MAX_CROSS_BASE(n) (0x1c0 + (0x20 * n)) ++#define MAX_CROSS(n, m) (MAX_CROSS_BASE(n) + m) ++ ++#define MAX_BACKTOP_BASE(bank) (0x400 + (0x20 * bank)) ++#define MAX_BACKTOP1(bank) (MAX_BACKTOP_BASE(bank) + 0x00) ++#define MAX_BACKTOP11(bank) (MAX_BACKTOP_BASE(bank) + 0x0a) ++#define MAX_BACKTOP12(bank) (MAX_BACKTOP_BASE(bank) + 0x0b) ++#define MAX_BACKTOP13(bank) (MAX_BACKTOP_BASE(bank) + 0x0c) ++#define MAX_BACKTOP14(bank) (MAX_BACKTOP_BASE(bank) + 0x0d) ++#define MAX_BACKTOP15(bank) (MAX_BACKTOP_BASE(bank) + 0x0e) ++#define MAX_BACKTOP16(bank) (MAX_BACKTOP_BASE(bank) + 0x0f) ++#define MAX_BACKTOP17(bank) (MAX_BACKTOP_BASE(bank) + 0x10) ++#define MAX_BACKTOP18(bank) (MAX_BACKTOP_BASE(bank) + 0x11) ++#define MAX_BACKTOP19(bank) (MAX_BACKTOP_BASE(bank) + 0x12) ++#define MAX_BACKTOP20(bank) (MAX_BACKTOP_BASE(bank) + 0x13) ++#define MAX_BACKTOP21(bank) (MAX_BACKTOP_BASE(bank) + 0x14) ++#define MAX_BACKTOP22(bank) (MAX_BACKTOP_BASE(bank) + 0x15) ++#define MAX_BACKTOP23(bank) (MAX_BACKTOP_BASE(bank) + 0x16) ++#define MAX_BACKTOP24(bank) (MAX_BACKTOP_BASE(bank) + 0x17) ++#define MAX_BACKTOP25(bank) (MAX_BACKTOP_BASE(bank) + 0x18) ++#define MAX_BACKTOP26(bank) (MAX_BACKTOP_BASE(bank) + 0x19) ++#define MAX_BACKTOP27(bank) (MAX_BACKTOP_BASE(bank) + 0x1a) ++#define MAX_BACKTOP28(bank) (MAX_BACKTOP_BASE(bank) + 0x1b) ++#define MAX_BACKTOP29(bank) (MAX_BACKTOP_BASE(bank) + 0x1c) ++#define MAX_BACKTOP30(bank) (MAX_BACKTOP_BASE(bank) + 0x1d) ++#define MAX_BACKTOP31(bank) (MAX_BACKTOP_BASE(bank) + 0x1e) ++#define MAX_BACKTOP32(bank) (MAX_BACKTOP_BASE(bank) + 0x1f) ++ ++#define MAX96712_FSYNC_0 0x4a0 ++#define MAX96712_FSYNC_5 0x4a5 ++#define MAX96712_FSYNC_6 0x4a6 ++#define MAX96712_FSYNC_7 0x4a7 ++#define MAX96712_FSYNC_8 0x4a8 ++#define MAX96712_FSYNC_9 0x4a9 ++#define MAX96712_FSYNC_10 0x4aa ++#define MAX96712_FSYNC_11 0x4ab ++#define MAX96712_FSYNC_15 0x4af ++ ++#define MAX_MIPI_PHY_BASE 0x8a0 ++#define MAX_MIPI_PHY0 (MAX_MIPI_PHY_BASE + 0x00) ++#define MAX_MIPI_PHY2 (MAX_MIPI_PHY_BASE + 0x02) ++#define MAX_MIPI_PHY3 (MAX_MIPI_PHY_BASE + 0x03) ++#define MAX_MIPI_PHY4 (MAX_MIPI_PHY_BASE + 0x04) ++#define MAX_MIPI_PHY5 (MAX_MIPI_PHY_BASE + 0x05) ++#define MAX_MIPI_PHY6 (MAX_MIPI_PHY_BASE + 0x06) ++#define MAX_MIPI_PHY8 (MAX_MIPI_PHY_BASE + 0x08) ++#define MAX_MIPI_PHY9 (MAX_MIPI_PHY_BASE + 0x09) ++#define MAX_MIPI_PHY10 (MAX_MIPI_PHY_BASE + 0x0a) ++#define MAX_MIPI_PHY11 (MAX_MIPI_PHY_BASE + 0x0b) ++#define MAX_MIPI_PHY13 (MAX_MIPI_PHY_BASE + 0x0d) ++#define MAX_MIPI_PHY14 (MAX_MIPI_PHY_BASE + 0x0e) ++ ++#define MAX_MIPI_TX_BASE(n) (0x900 + 0x40 * n) ++#define MAX_MIPI_TX2(n) (MAX_MIPI_TX_BASE(n) + 0x02) ++#define MAX_MIPI_TX10(n) (MAX_MIPI_TX_BASE(n) + 0x0a) ++#define MAX_MIPI_TX11(n) (MAX_MIPI_TX_BASE(n) + 0x0b) ++#define MAX_MIPI_TX12(n) (MAX_MIPI_TX_BASE(n) + 0x0c) ++ ++/* 16 pairs of source-dest registers */ ++#define MAX_MIPI_MAP_SRC(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x0d + (2 * n)) ++#define MAX_MIPI_MAP_DST(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x0e + (2 * n)) ++/* Phy dst. Each reg contains 4 dest */ ++#define MAX_MIPI_MAP_DST_PHY(pipe, n) (MAX_MIPI_TX_BASE(pipe) + 0x2d + n) ++ ++#define MAX_GMSL1_2(ch) (0xb02 + (0x100 * ch)) ++#define MAX_GMSL1_4(ch) (0xb04 + (0x100 * ch)) ++#define MAX_GMSL1_6(ch) (0xb06 + (0x100 * ch)) ++#define MAX_GMSL1_7(ch) (0xb07 + (0x100 * ch)) ++#define MAX_GMSL1_8(ch) (0xb08 + (0x100 * ch)) ++#define MAX_GMSL1_D(ch) (0xb0d + (0x100 * ch)) ++#define MAX_GMSL1_F(ch) (0xb0f + (0x100 * ch)) ++#define MAX_GMSL1_19(ch) (0xb19 + (0x100 * ch)) ++#define MAX_GMSL1_1B(ch) (0xb1b + (0x100 * ch)) ++#define MAX_GMSL1_1D(ch) (0xb1d + (0x100 * ch)) ++#define MAX_GMSL1_20(ch) (0xb20 + (0x100 * ch)) ++#define MAX_GMSL1_96(ch) (0xb96 + (0x100 * ch)) ++#define MAX_GMSL1_CA(ch) (0xbca + (0x100 * ch)) ++#define MAX_GMSL1_CB(ch) (0xbcb + (0x100 * ch)) ++ ++#define MAX_RLMS4(ch) (0x1404 + (0x100 * ch)) ++#define MAX_RLMSA(ch) (0x140A + (0x100 * ch)) ++#define MAX_RLMSB(ch) (0x140B + (0x100 * ch)) ++#define MAX_RLMSA4(ch) (0x14a4 + (0x100 * ch)) ++ ++#define MAX_RLMS58(ch) (0x1458 + (0x100 * ch)) ++#define MAX_RLMS59(ch) (0x1459 + (0x100 * ch)) ++#define MAX_RLMS95(ch) (0x1495 + (0x100 * ch)) ++#define MAX_RLMSC4(ch) (0x14c4 + (0x100 * ch)) ++#define MAX_RLMSC5(ch) (0x14c5 + (0x100 * ch)) ++ ++static inline int max96712_write(struct max96712_priv *priv, int reg, int val) ++{ ++ int ret; ++ ++ ret = regmap_write(priv->regmap, reg, val); ++ if (ret) ++ dev_dbg(&priv->client->dev, "write register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max96712_read(struct max96712_priv *priv, int reg, int *val) ++{ ++ int ret; ++ ++ ret = regmap_read(priv->regmap, reg, val); ++ if (ret) ++ dev_dbg(&priv->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max96712_update_bits(struct max96712_priv *priv, int reg, int mask, int bits) ++{ ++ int ret; ++ ++ ret = regmap_update_bits(priv->regmap, reg, mask, bits); ++ if (ret) ++ dev_dbg(&priv->client->dev, "update register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++#define des_read(reg, val) max96712_read(priv, reg, val) ++#define des_write(reg, val) max96712_write(priv, reg, val) ++#define des_update_bits(reg, mask, bits) max96712_update_bits(priv, reg, mask, bits) ++ ++static inline int max96712_ser_write(struct max96712_link *link, int reg, int val) ++{ ++ int ret; ++ ++ ret = regmap_write(link->regmap, reg, val); ++ if (ret < 0) ++ dev_dbg(&link->client->dev, "write register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max96712_ser_read(struct max96712_link *link, int reg, u8 *val) ++{ ++ int ret; ++ ++ ret = regmap_read(link->regmap, reg, (int *)val); ++ if (ret) ++ dev_dbg(&link->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++static inline int max96712_ser_update_bits(struct max96712_link *link, int reg, int mask, int bits) ++{ ++ int ret; ++ ++ ret = regmap_update_bits(link->regmap, reg, mask, bits); ++ if (ret) ++ dev_dbg(&link->client->dev, "update register 0x%04x failed (%d)\n", reg, ret); ++ ++ return ret; ++} ++ ++#define ser_read(reg, val) max96712_ser_read(link, reg, val) ++#define ser_write(reg, val) max96712_ser_write(link, reg, val) ++#define ser_update_bits(reg, mask, bits) max96712_ser_update_bits(link, reg, mask, bits) +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712_debug.h b/drivers/media/i2c/soc_camera/gmsl/max96712_debug.h +new file mode 100644 +index 0000000..ee47c04 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712_debug.h +@@ -0,0 +1,362 @@ ++/* ++ * MAXIM max96712 GMSL2 driver debug stuff ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static char *pipe_names[4] = { ++ "X", "Y", "Z", "U" ++}; ++ ++static int max96712_gmsl1_get_link_lock(struct max96712_priv *priv, int link_n); ++static int max96712_gmsl2_get_link_lock(struct max96712_priv *priv, int link_n); ++ ++#define reg_bits(x, y) ((reg >> (x)) & ((1 << (y)) - 1)) ++ ++static ssize_t max_link_show(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max96712_priv *priv = i2c_get_clientdata(client); ++ int i = -1; ++ int j; ++ int gmsl2; ++ u32 crc = 0 ; ++ char *_buf = buf; ++ int reg = 0; ++ ++ if (!sscanf(attr->attr.name, "link_%d", &i)) ++ return -EINVAL; ++ ++ if (i < 0) ++ return -EINVAL; ++ ++ if (i >= priv->n_links) { ++ buf += sprintf(buf, "\n"); ++ return (buf - _buf); ++ } ++ ++ buf += sprintf(buf, "Link %c status\n", 'A' + i); ++ ++ des_read(MAX96712_REG6, ®); ++ gmsl2 = !!(reg & BIT(4 + i)); ++ buf += sprintf(buf, "Link mode: %s\n", gmsl2 ? "GMSL2" : "GMSL1"); ++ ++ if (gmsl2) { ++ buf += sprintf(buf, "GMSL2 Link lock: %d\n", max96712_gmsl2_get_link_lock(priv, i)); ++ } else { ++ reg = max96712_gmsl1_get_link_lock(priv, i); ++ buf += sprintf(buf, ++ "GMSL1_CB: 0x%02x:\t" ++ "LOCKED_G1: %d\n", ++ reg, reg_bits(0, 1)); ++ ++ des_read(MAX_GMSL1_CA(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_CA: 0x%02x:\t" ++ "PHASELOCK: %d, WBLOCK_G1: %d, DATAOK: %d\n", ++ reg, reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ ++ des_read(MAX_GMSL1_1B(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_1B: 0x%02x:\t" ++ "LINE_CRC_ERR: %d ", ++ reg, reg_bits(2, 1)); ++ for (j = 0; j < 4; j++) { ++ des_read(MAX_GMSL1_20(i) + j, ®); ++ crc = crc | ((reg & 0xff) << (j * 8)); ++ } ++ buf += sprintf(buf, "last crc 0x%08x\n", crc); ++ ++ des_read(MAX_GMSL1_19(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_19: CC_CRC_ERRCNT %d\n", ++ reg); ++ ++ des_read(MAX_GMSL1_1D(i), ®); ++ buf += sprintf(buf, ++ "GMSL1_1D: 0x%02x:\t" ++ "UNDERBOOST: %d, AEQ-BST: %d\n", ++ reg, reg_bits(4, 1), reg_bits(0, 4)); ++ } ++ ++ return (buf - _buf); ++} ++ ++static ssize_t max_pipe_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max96712_priv *priv = i2c_get_clientdata(client); ++ char *_buf = buf; ++ int pipe = 0; ++ int map; ++ int maps_en = 0; ++ int pipes_en; ++ int reg = 0; ++ int shift; ++ ++ if (!sscanf(attr->attr.name, "pipe_%d", &pipe)) ++ return -EINVAL; ++ ++ if (pipe < 0) ++ return -EINVAL; ++ ++ if (pipe >= MAX96712_MAX_PIPES) { ++ buf += sprintf(buf, "\n"); ++ return (buf - _buf); ++ } ++ ++ des_read(MAX96712_VIDEO_PIPE_EN, &pipes_en); ++ ++ buf += sprintf(buf, "Video Pipe %d %s\n", ++ pipe, (pipes_en & BIT(pipe)) ? "ENABLED" : "disabled"); ++ if (!(pipes_en & BIT(pipe))) ++ goto out; ++ ++ des_read(MAX_VPRBS(pipe), ®); ++ /* bit 5 is not valid for MAX96712 */ ++ buf += sprintf(buf, ++ "\tVPRBS: 0x%02x\t" ++ "VPRBS_FAIL: %d," ++ "VIDEO_LOCK: %d\n", ++ reg, ++ reg_bits(5, 1), reg_bits(0, 1)); ++ ++ /* show source */ ++ shift = (pipe % 2) * 4; ++ des_read(MAX96712_VIDEO_PIPE_SEL(pipe / 2), ®); ++ buf += sprintf(buf, "SRC: PHY %c, PIPE %s\n", ++ 'A' + (char)((reg >> (shift + 2)) & 0x03), ++ pipe_names[(reg >> shift) & 0x03]); ++ ++ /* show maps */ ++ des_read(MAX_MIPI_TX11(pipe), &maps_en); ++ des_read(MAX_MIPI_TX12(pipe), ®); ++ maps_en |= reg << 8; ++ ++ for (map = 0; map < MAX96712_MAX_PIPE_MAPS; map++) { ++ int src, dst, mipi; ++ if (!(maps_en & BIT(map))) ++ continue; ++ ++ des_read(MAX_MIPI_MAP_SRC(pipe, map), &src); ++ des_read(MAX_MIPI_MAP_DST(pipe, map), &dst); ++ des_read(MAX_MIPI_MAP_DST_PHY(pipe, map / 4), &mipi); ++ ++ buf += sprintf(buf, " MAP%d: DT %02x, VC %d -> DT %02x, VC %d MIPI %d\n", ++ map, ++ src & 0x3f, (src >> 6) & 0x03, dst & 0x3f, (dst >> 6) & 0x03, ++ (mipi >> ((map % 4) * 2)) & 0x03); ++ } ++ ++ des_read(MAX_VIDEO_RX0(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX0: 0x%02x\t" ++ "LCRC_ERR: %d, " ++ "LINE_CRC_SEL: %d, " ++ "LINE_CRC_EN: %d, " ++ "DIS_PKT_DET: %d\n", ++ reg, ++ reg_bits(7, 1), ++ reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX_VIDEO_RX3(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX3: 0x%02x\t" ++ "HD_TR_MODE: %d, " ++ "DLOCKED: %d, " ++ "VLOCKED: %d, " ++ "HLOCKED: %d, " ++ "DTRACKEN: %d, " ++ "VTRACKEN: %d, " ++ "HTRACKEN: %d\n", ++ reg, ++ reg_bits(6, 1), ++ reg_bits(5, 1), reg_bits(4, 1), reg_bits(3, 1), ++ reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ des_read(MAX_VIDEO_RX8(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX8: 0x%02x\t" ++ "VID_BLK_LEN_ERR: %d, " ++ "VID_LOCK: %d, " ++ "VID_PKT_DET: %d, " ++ "VID_SEQ_ERR: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), ++ reg_bits(5, 1), reg_bits(4, 1)); ++ des_read(MAX_VIDEO_RX10(pipe), ®); ++ buf += sprintf(buf, ++ "VIDEO_RX10: 0x%02x\t" ++ "MASK_VIDEO_DE: %d\n", ++ reg, ++ reg_bits(6, 1)); ++ ++out: ++ return (buf - _buf); ++} ++ ++static ssize_t max_stat_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct max96712_priv *priv = i2c_get_clientdata(client); ++ int i; ++ char *_buf = buf; ++ int reg = 0; ++ ++ /* TODO: add same for 96712 */ ++ des_read(MAX96712_REG4, ®); ++ buf += sprintf(buf, ++ "REG_REG4: 0x%02x\t" ++ "LOCK_CFG: %d\n", ++ reg, reg_bits(5, 1)); ++ ++ des_read(MAX_BACKTOP1(0), ®); ++ buf += sprintf(buf, ++ "BACKTOP1: 0x%02x:\t" ++ "CSIPLL3_LOCK: %d, " ++ "CSIPLL2_LOCK: %d, " ++ "CSIPLL1_LOCK: %d, " ++ "CSIPLL0_LOCK: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1)); ++ ++ des_read(MAX_BACKTOP11(0), ®); ++ buf += sprintf(buf, ++ "BACKTOP11: 0x%02x:\t" ++ "CMD_OWERFLOW4: %d, " ++ "CMD_OWERFLOW3: %d, " ++ "CMD_OWERFLOW2: %d, " ++ "CMD_OWERFLOW1: %d, " ++ "LMO_3: %d, " ++ "LMO_2: %d, " ++ "LMO_1: %d, " ++ "LMO_0: %d\n", ++ reg, ++ reg_bits(7, 1), reg_bits(6, 1), reg_bits(5, 1), reg_bits(4, 1), ++ reg_bits(3, 1), reg_bits(2, 1), reg_bits(1, 1), reg_bits(0, 1)); ++ ++ for (i = 0; i < MAX96712_MAX_MIPI; i++) { ++ buf += sprintf(buf, "MIPI %d\n", i); ++ des_read(MAX_MIPI_TX2(i), ®); ++ buf += sprintf(buf, ++ "\tMIPI_TX2: 0x%02x\n", ++ reg); ++ } ++ ++ return (buf - _buf); ++} ++ ++static DEVICE_ATTR(link_0, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_1, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_2, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(link_3, S_IRUGO, max_link_show, NULL); ++static DEVICE_ATTR(pipe_0, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_1, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_2, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_3, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_4, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_5, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_6, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(pipe_7, S_IRUGO, max_pipe_show, NULL); ++static DEVICE_ATTR(stat, S_IRUGO, max_stat_show, NULL); ++ ++static struct attribute *max96712_attributes[] = { ++ &dev_attr_link_0.attr, ++ &dev_attr_link_1.attr, ++ &dev_attr_link_2.attr, ++ &dev_attr_link_3.attr, ++ &dev_attr_pipe_0.attr, ++ &dev_attr_pipe_1.attr, ++ &dev_attr_pipe_2.attr, ++ &dev_attr_pipe_3.attr, ++ &dev_attr_pipe_4.attr, ++ &dev_attr_pipe_5.attr, ++ &dev_attr_pipe_6.attr, ++ &dev_attr_pipe_7.attr, ++ &dev_attr_stat.attr, ++ NULL ++}; ++ ++static const struct attribute_group max96712_group = { ++ .attrs = max96712_attributes, ++}; ++ ++int max96712_debug_add(struct max96712_priv *priv) ++{ ++ int ret; ++ ++ ret = sysfs_create_group(&priv->client->dev.kobj, &max96712_group); ++ if (ret < 0) { ++ dev_err(&priv->client->dev, "Sysfs registration failed\n"); ++ return ret; ++ } ++ ++ return ret; ++} ++ ++void max96712_debug_remove(struct max96712_priv *priv) ++{ ++ sysfs_remove_group(&priv->client->dev.kobj, &max96712_group); ++} ++ ++#if 0 ++int max96712_patgen(struct max96712_priv *priv) ++{ ++ int ret = 0; ++ ++ const u32 xres = 1280; ++ const u32 yres = 800; ++ const u32 hbp = 128; ++ const u32 hfp = 80; ++ const u32 hsa = 32; ++ const u32 vbp = 17; ++ const u32 vfp = 4; ++ const u32 vsa = 3; ++ ++ u32 vtotal = vfp + vsa + vbp + yres; ++ u32 htotal = xres + hfp + hbp + hsa; ++ u32 vs_high = vsa * htotal; ++ u32 vs_low = (vfp + yres + vbp) * htotal; ++ u32 v2h = (vsa + vbp) * htotal + hfp; ++ u32 hs_high = hsa; ++ u32 hs_low = xres + hfp + hbp; ++ u32 v2d = v2h + hsa + hbp; ++ u32 de_high = xres; ++ u32 de_low = hfp + hsa + hbp; ++ u32 de_cnt = yres; ++ ++ /* DEBUG_EXTRA & PATGEN_CLK_SRC = 75Mhz pclk */ ++ des_write(0x0009, 0x01); /* if DEBUG_EXTRA[1:0] = 2b01, PCLK Frequency is 75MHz (don't care PATGEN_CLK_SRC) */ ++ des_write(0x01dc, 0x00); ++ ++ des_write_n(0x1052, 3, 0); /* vs delay */ ++ des_write_n(0x1055, 3, vs_high); ++ des_write_n(0x1058, 3, vs_low); ++ des_write_n(0x105B, 3, v2h); ++ des_write_n(0x105E, 2, hs_high); ++ des_write_n(0x1060, 2, hs_low); ++ des_write_n(0x1062, 2, vtotal); /* hs cnt */ ++ des_write_n(0x1064, 3, v2d); ++ des_write_n(0x1067, 2, de_high); ++ des_write_n(0x1069, 2, de_low); ++ des_write_n(0x106B, 2, de_cnt); ++ ++ des_write_n(0x106E, 3, 0xff0000); /* color A */ ++ des_write_n(0x1071, 3, 0x0000ff); /* color B */ ++ ++ des_write(0x1074, 0x50); /* chkr_rpt_a = 80 */ ++ des_write(0x1075, 0x50); /* chkr_rpt_b = 80 */ ++ des_write(0x1076, 0x50); /* chkr_alt = 80 */ ++ ++ des_write(0x1050, 0xfb); /* gen_vs,gen_hs,gen_de, vtg[0:1] */ ++ des_write(0x1051, 0x10); /* patgen_mode[5:4] = 0b1,checkerboard */ ++ ++out: ++ return ret; ++} ++#endif +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0494-media-i2c-max9286-max9288-use-common.h-file.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0494-media-i2c-max9286-max9288-use-common.h-file.patch new file mode 100644 index 00000000..ea20fd1d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0494-media-i2c-max9286-max9288-use-common.h-file.patch @@ -0,0 +1,218 @@ +From 083a58c074efe94a68fbb2deac66d404f7644e32 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 10:56:45 +0300 +Subject: [PATCH] media: i2c: max9286,max9288: use common.h file + +Use common.h file for all gmsl drivers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gmsl/max9286.c | 61 +++++++++-------------------- + drivers/media/i2c/soc_camera/gmsl/max9288.c | 54 +++++++------------------ + 2 files changed, 34 insertions(+), 81 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9286.c b/drivers/media/i2c/soc_camera/gmsl/max9286.c +index 2d56b41..c37e972 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9286.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max9286.c +@@ -22,16 +22,7 @@ + #include + #include + +-#include "../max9286.h" +- +-#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ +-#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ +-#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ +-#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ +-#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ +-#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ +-#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ +-#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++#include "common.h" + + struct max9286_priv { + struct v4l2_subdev sd[4]; +@@ -174,20 +165,6 @@ static int dt2bpp [9] = { + 14, /* RAW14 */ + }; + +-static char* ser_name(int id) +-{ +- switch (id) { +- case MAX9271_ID: +- return "MAX9271"; +- case MAX96705_ID: +- return "MAX96705"; +- case MAX96707_ID: +- return "MAX96707"; +- default: +- return "unknown"; +- } +-} +- + static void max9286_write_remote_verify(struct i2c_client *client, int idx, u8 reg, u8 val) + { + struct max9286_priv *priv = i2c_get_clientdata(client); +@@ -384,7 +361,7 @@ static int max9286_reverse_channel_setup(struct i2c_client *client, int idx) + + out: + sprintf(timeout_str, "retries=%d lock_sts=%d link_sts=0x%x", priv->timeout - timeout, !!(lock_sts & 0x80), link_sts & (0x11 << idx)); +- dev_info(&client->dev, "link%d %s %sat 0x%x %s %s\n", idx, ser_name(priv->ser_id), ++ dev_info(&client->dev, "link%d %s %sat 0x%x %s %s\n", idx, chip_name(priv->ser_id), + ret == -EADDRINUSE ? "already " : "", priv->max9271_addr_map[idx], + ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", + priv->timeout - timeout ? timeout_str : ""); +@@ -576,6 +553,22 @@ static int max9286_initialize(struct i2c_client *client) + return 0; + } + ++static int max9286_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max9286_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ if (on) { ++ if (atomic_inc_return(&priv->use_count) == 1) ++ reg8_write(client, 0x69, priv->links_mask ^ 0x0f); /* unmask CSI forwarding from detected links */ ++ } else { ++ if (atomic_dec_return(&priv->use_count) == 0) ++ reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ ++ } ++ ++ return 0; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int max9286_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -605,22 +598,6 @@ static int max9286_s_register(struct v4l2_subdev *sd, + } + #endif + +-static int max9286_s_power(struct v4l2_subdev *sd, int on) +-{ +- struct max9286_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- if (on) { +- if (atomic_inc_return(&priv->use_count) == 1) +- reg8_write(client, 0x69, priv->links_mask ^ 0x0f); /* unmask CSI forwarding from detected links */ +- } else { +- if (atomic_dec_return(&priv->use_count) == 0) +- reg8_write(client, 0x69, 0x0f); /* mask CSI forwarding from all links */ +- } +- +- return 0; +-} +- + static int max9286_registered_async(struct v4l2_subdev *sd) + { + struct max9286_priv *priv = v4l2_get_subdevdata(sd); +@@ -656,7 +633,7 @@ static int max9286_reboot_notifier(struct notifier_block *nb, unsigned long even + gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ + } + +- return NOTIFY_OK; ++ return NOTIFY_DONE; + } + + static struct v4l2_subdev_core_ops max9286_subdev_core_ops = { +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9288.c b/drivers/media/i2c/soc_camera/gmsl/max9288.c +index 7de1f9e..ce44e2b 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9288.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max9288.c +@@ -21,16 +21,7 @@ + #include + #include + +-#include "../max9286.h" +- +-#define MAXIM_I2C_I2C_SPEED_837KHZ (0x7 << 2) /* 837kbps */ +-#define MAXIM_I2C_I2C_SPEED_533KHZ (0x6 << 2) /* 533kbps */ +-#define MAXIM_I2C_I2C_SPEED_339KHZ (0x5 << 2) /* 339 kbps */ +-#define MAXIM_I2C_I2C_SPEED_173KHZ (0x4 << 2) /* 174kbps */ +-#define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ +-#define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ +-#define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ +-#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ ++#include "common.h" + + struct max9288_priv { + struct v4l2_subdev sd; +@@ -140,23 +131,8 @@ static int dt2bpp [9] = { + 14, /* RAW14 */ + }; + +-static char* ser_name(int id) +-{ +- switch (id) { +- case MAX9271_ID: +- return "MAX9271"; +- case MAX96705_ID: +- return "MAX96705"; +- case MAX96707_ID: +- return "MAX96707"; +- default: +- return "unknown"; +- } +-} +- + static void max9288_write_remote_verify(struct i2c_client *client, u8 reg, u8 val) + { +- struct max9288_priv *priv = i2c_get_clientdata(client); + int timeout; + + for (timeout = 0; timeout < 10; timeout++) { +@@ -297,7 +273,7 @@ static int max9288_reverse_channel_setup(struct i2c_client *client) + + out: + sprintf(timeout_str, "retries=%d lock_sts=%d", priv->timeout - timeout, !!(lock_sts & 0x80)); +- dev_info(&client->dev, "link %s %sat 0x%x %s %s\n", ser_name(priv->ser_id), ++ dev_info(&client->dev, "link %s %sat 0x%x %s %s\n", chip_name(priv->ser_id), + ret == -EADDRINUSE ? "already " : "", priv->max9271_addr, + ret == -ETIMEDOUT ? "not found: timeout GMSL link establish" : "", + priv->timeout - timeout ? timeout_str : ""); +@@ -487,6 +463,19 @@ static int max9288_initialize(struct i2c_client *client) + return 0; + } + ++static int max9288_s_power(struct v4l2_subdev *sd, int on) ++{ ++ struct max9288_priv *priv = v4l2_get_subdevdata(sd); ++ struct i2c_client *client = priv->client; ++ ++ client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ ++ max9288_write_remote_verify(client, 0x04, on ? (conf_link ? 0x43 : 0x83) : 0x43); /* enable serial_link or conf_link */ ++ usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ ++ client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ ++ ++ return 0; ++} ++ + #ifdef CONFIG_VIDEO_ADV_DEBUG + static int max9288_g_register(struct v4l2_subdev *sd, + struct v4l2_dbg_register *reg) +@@ -516,19 +505,6 @@ static int max9288_s_register(struct v4l2_subdev *sd, + } + #endif + +-static int max9288_s_power(struct v4l2_subdev *sd, int on) +-{ +- struct max9288_priv *priv = v4l2_get_subdevdata(sd); +- struct i2c_client *client = priv->client; +- +- client->addr = priv->max9271_addr; /* MAX9271-CAMx I2C new */ +- max9288_write_remote_verify(client, 0x04, on ? (conf_link ? 0x43 : 0x83) : 0x43); /* enable serial_link or conf_link */ +- usleep_range(2000, 2500); /* wait 2ms after changing reverse_control */ +- client->addr = priv->des_addr; /* MAX9288-CAMx I2C */ +- +- return 0; +-} +- + static struct v4l2_subdev_core_ops max9288_subdev_core_ops = { + #ifdef CONFIG_VIDEO_ADV_DEBUG + .g_register = max9288_g_register, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0495-media-i2c-ti9x4-fix-rebot_notify-and-gpiod_request.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0495-media-i2c-ti9x4-fix-rebot_notify-and-gpiod_request.patch new file mode 100644 index 00000000..9069ad63 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0495-media-i2c-ti9x4-fix-rebot_notify-and-gpiod_request.patch @@ -0,0 +1,62 @@ +From 6ecc8987af944ca48a3565111bd1af7293d5a3ac Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 10:59:10 +0300 +Subject: [PATCH] media: i2c: ti9x4: fix rebot_notify and gpiod_request + +This fixed reboot return value and initialize power gpiod +during request + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/fpdlink/ti9x4.c | 8 ++++---- + drivers/media/i2c/soc_camera/fpdlink/ti9x4.h | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +index 340e61e..24ac2e5 100644 +--- a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +@@ -1,7 +1,7 @@ +- /* ++/* + * TI DS90UB954/960/964 FPDLinkIII driver + * +- * Copyright (C) 2017-2018 Cogent Embedded, Inc. ++ * Copyright (C) 2017-2020 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -433,7 +433,7 @@ static int ti9x4_reboot_notifier(struct notifier_block *nb, unsigned long event, + gpiod_direction_output(priv->poc_gpio[idx], 0); /* POC power off */ + } + +- return NOTIFY_OK; ++ return NOTIFY_DONE; + } + + static struct v4l2_subdev_core_ops ti9x4_subdev_core_ops = { +@@ -511,7 +511,7 @@ static int ti9x4_parse_dt(struct i2c_client *client) + v4l2_clk_enable(priv->ref_clk); + } + +- priv->pwen = devm_gpiod_get(&client->dev, NULL, GPIOF_OUT_INIT_HIGH); ++ priv->pwen = devm_gpiod_get(&client->dev, NULL, GPIOD_OUT_HIGH); + if (!IS_ERR(priv->pwen)) { + mdelay(5); + gpiod_direction_output(priv->pwen, 0); +diff --git a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h +index 6825f8a..964ab78 100644 +--- a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h ++++ b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.h +@@ -1,7 +1,7 @@ + /* + * TI FPDLinkIII driver include file + * +- * Copyright (C) 2017 Cogent Embedded, Inc. ++ * Copyright (C) 2017-2020 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0496-media-i2c-add-interim-LVDS-imager-drivers.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0496-media-i2c-add-interim-LVDS-imager-drivers.patch new file mode 100644 index 00000000..267cff29 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0496-media-i2c-add-interim-LVDS-imager-drivers.patch @@ -0,0 +1,5202 @@ +From b60ec01692d2a2e8ee28e6aae58fe78fd806d733 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 11:02:31 +0300 +Subject: [PATCH] media: i2c: add interim LVDS imager drivers + +This adds new LVDS imager drivers that support all enabled +serializers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/Makefile | 5 + + .../media/i2c/soc_camera/imagers/ap0101_ar014x.c | 618 +++++++++++ + .../media/i2c/soc_camera/imagers/ap0101_ar014x.h | 28 + + .../media/i2c/soc_camera/imagers/ap0201_ar023x.c | 588 ++++++++++ + .../media/i2c/soc_camera/imagers/ap0201_ar023x.h | 24 + + drivers/media/i2c/soc_camera/imagers/ov10635.c | 690 ++++++++++++ + drivers/media/i2c/soc_camera/imagers/ov10635.h | 1143 ++++++++++++++++++++ + .../media/i2c/soc_camera/imagers/ov10635_debug.h | 54 + + drivers/media/i2c/soc_camera/imagers/ov2311.c | 571 ++++++++++ + drivers/media/i2c/soc_camera/imagers/ov2311.h | 217 ++++ + drivers/media/i2c/soc_camera/imagers/ov490.c | 1051 ++++++++++++++++++ + drivers/media/i2c/soc_camera/imagers/ov490.h | 102 ++ + 12 files changed, 5091 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov10635.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov10635.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov10635_debug.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov2311.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov2311.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov490.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ov490.h + +diff --git a/drivers/media/i2c/soc_camera/imagers/Makefile b/drivers/media/i2c/soc_camera/imagers/Makefile +index ca10bbc..0d0ff32 100644 +--- a/drivers/media/i2c/soc_camera/imagers/Makefile ++++ b/drivers/media/i2c/soc_camera/imagers/Makefile +@@ -1,2 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov10635.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov2311.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov490.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0101_ar014x.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0201_ar023x.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += dummy.o +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +new file mode 100644 +index 0000000..1df3f3b +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +@@ -0,0 +1,618 @@ ++/* ++ * ON Semiconductor AP0101-AR014X sensor camera driver ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "ap0101_ar014x.h" ++ ++static const int ap0101_i2c_addr[] = {0x5d, 0x48}; ++ ++#define AP0101_PID_REG 0x0000 ++#define AP0101_REV_REG 0x0058 ++#define AP0101_PID 0x0160 ++ ++#define AP0101_MEDIA_BUS_FMT MEDIA_BUS_FMT_YUYV8_2X8 ++ ++struct ap0101_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int max_width; ++ int max_height; ++ int init_complete; ++ u8 id[6]; ++ int exposure; ++ int gain; ++ int autogain; ++ /* serializers */ ++ int ser_addr; ++ int hts; ++ int vts; ++ int frame_preamble; ++}; ++ ++static inline struct ap0101_priv *to_ap0101(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ap0101_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ap0101_priv, hdl)->sd; ++} ++ ++static int ap0101_set_regs(struct i2c_client *client, ++ const struct ap0101_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == AP0101_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ reg16_write16(client, regs[i].reg, regs[i].val); ++ } ++ ++ return 0; ++} ++ ++static u16 ap0101_ar014x_read(struct i2c_client *client, u16 addr) ++{ ++ u16 reg_val = 0; ++ ++ reg16_write16(client, 0x0040, 0x8d00); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0xfc00, addr); ++ reg16_write16(client, 0xfc02, 0x0200); /* 2 bytes */ ++ reg16_write16(client, 0x0040, 0x8d05); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d08); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_read16(client, 0xfc00, ®_val); ++ reg16_write16(client, 0x0040, 0x8d02); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ ++ return reg_val; ++} ++ ++static void ap0101_ar014x_write(struct i2c_client *client, u16 addr, u16 val) ++{ ++ reg16_write16(client, 0x0040, 0x8d00); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0xfc00, addr); ++ reg16_write16(client, 0xfc02, 0x0200 | (val >> 8)); /* 2 bytes */ ++ reg16_write16(client, 0xfc04, (val & 0xff) << 8); ++ reg16_write16(client, 0x0040, 0x8d06); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d08); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d02); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++} ++ ++static void ap0101_otp_id_read(struct i2c_client *client) ++{ ++ struct ap0101_priv *priv = to_ap0101(client); ++ int i; ++ ++ /* read camera id from ar014x OTP memory */ ++ ap0101_ar014x_write(client, 0x3054, 0x400); ++ ap0101_ar014x_write(client, 0x304a, 0x110); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i += 2) { ++ /* first 4 bytes are equal on all ar014x */ ++ priv->id[i] = (ap0101_ar014x_read(client, 0x3800 + i + 4) >> 8) ^ (ap0101_ar014x_read(client, 0x3800 + i + 16) >> 8); ++ priv->id[i + 1] = (ap0101_ar014x_read(client, 0x3800 + i + 4) & 0xff) ^ (ap0101_ar014x_read(client, 0x3800 + i + 16) & 0xff); ++ } ++} ++ ++static int ap0101_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ap0101_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = AP0101_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ap0101_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = AP0101_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ap0101_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = AP0101_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int ap0101_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ ++ ap0101_otp_id_read(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = AP0101_PID >> 8; ++ edid->edid[9] = AP0101_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ap0101_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > priv->max_width) || ++ (rect->top + rect->height > priv->max_height)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int ap0101_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ap0101_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ap0101_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ __be64 be_val; ++ ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); ++ ++ return ret; ++} ++ ++static int ap0101_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); ++ ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ return reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ap0101_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ap0101_g_register, ++ .s_register = ap0101_s_register, ++#endif ++}; ++ ++static int ap0101_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ int ret = -EINVAL; ++ u16 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ case V4L2_CID_GAIN: ++ case V4L2_CID_EXPOSURE: ++ break; ++ case V4L2_CID_HFLIP: ++ reg16_read16(client, 0xc846, &val); ++ if (ctrl->val) ++ val |= 0x01; ++ else ++ val &= ~0x01; ++ reg16_write16(client, 0xc846, val); ++ reg16_write16(client, 0xfc00, 0x2800); ++ ret = reg16_write16(client, 0x0040, 0x8100); ++ break; ++ case V4L2_CID_VFLIP: ++ reg16_read16(client, 0xc846, &val); ++ if (ctrl->val) ++ val |= 0x02; ++ else ++ val &= ~0x02; ++ reg16_write16(client, 0xc846, val); ++ reg16_write16(client, 0xfc00, 0x2800); ++ ret = reg16_write16(client, 0x0040, 0x8100); ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ap0101_ctrl_ops = { ++ .s_ctrl = ap0101_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ap0101_video_ops = { ++ .s_stream = ap0101_s_stream, ++ .g_mbus_config = ap0101_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ap0101_subdev_pad_ops = { ++ .get_edid = ap0101_get_edid, ++ .enum_mbus_code = ap0101_enum_mbus_code, ++ .get_selection = ap0101_get_selection, ++ .set_selection = ap0101_set_selection, ++ .get_fmt = ap0101_get_fmt, ++ .set_fmt = ap0101_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ap0101_subdev_ops = { ++ .core = &ap0101_core_ops, ++ .video = &ap0101_video_ops, ++ .pad = &ap0101_subdev_pad_ops, ++}; ++ ++static ssize_t ap0101_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0101_priv *priv = to_ap0101(client); ++ ++ ap0101_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ap0101, S_IRUGO, ap0101_otp_id_show, NULL); ++ ++static int ap0101_initialize(struct i2c_client *client) ++{ ++ struct ap0101_priv *priv = to_ap0101(client); ++ u16 pid = 0, rev = 0, val = 0; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(ap0101_i2c_addr); i++) { ++ setup_i2c_translator(client, priv->ser_addr, ap0101_i2c_addr[i], MODE_GMSL1); ++ ++ /* check model ID */ ++ reg16_read16(client, AP0101_PID_REG, &pid); ++ if (pid == AP0101_PID) ++ break; ++ } ++ ++ if (pid != AP0101_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ reg16_read16(client, AP0101_REV_REG, &rev); ++#if 1 ++ /* read resolution used by current firmware */ ++ reg16_read16(client, 0xca90, &val); ++ priv->max_width = val; ++ reg16_read16(client, 0xca92, &val); ++ priv->max_height = val; ++#else ++ priv->max_width = AP0101_MAX_WIDTH; ++ priv->max_height = AP0101_MAX_HEIGHT; ++#endif ++ /* Program wizard registers */ ++ ap0101_set_regs(client, ap0101_regs_wizard, ARRAY_SIZE(ap0101_regs_wizard)); ++ /* Read OTP IDs */ ++ ap0101_otp_id_read(client); ++ ++ switch (get_des_id(client)) { ++ case MAX9286_ID: ++ case MAX9288_ID: ++ case MAX9296A_ID: ++ case MAX96712_ID: ++ /* setup serializer HS generator */ ++ priv->frame_preamble = 5; ++ priv->hts = 1280 * 2 + 548; ++ priv->vts = 960; ++ reg8_write_addr(client, priv->ser_addr, 0x4e, priv->frame_preamble >> 16); /* HS delay */ ++ reg8_write_addr(client, priv->ser_addr, 0x4f, (priv->frame_preamble >> 8) & 0xff); ++ reg8_write_addr(client, priv->ser_addr, 0x50, priv->frame_preamble & 0xff); ++ reg8_write_addr(client, priv->ser_addr, 0x54, (priv->max_width * 2) >> 8); /* HS high period */ ++ reg8_write_addr(client, priv->ser_addr, 0x55, (priv->max_width * 2) & 0xff); ++ reg8_write_addr(client, priv->ser_addr, 0x56, (priv->hts - priv->max_width * 2) >> 8); /* HS low period */ ++ reg8_write_addr(client, priv->ser_addr, 0x57, (priv->hts - priv->max_width * 2) & 0xff); ++ reg8_write_addr(client, priv->ser_addr, 0x58, priv->vts >> 8); /* HS count */ ++ reg8_write_addr(client, priv->ser_addr, 0x59, priv->vts & 0xff); ++ break; ++ } ++ ++ dev_info(&client->dev, "ap0101 PID %x (%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, rev, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id ap0101_id[] = { ++ { "ap0101", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ap0101_id); ++ ++static const struct of_device_id ap0101_of_ids[] = { ++ { .compatible = "onsemi,ap0101", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ap0101_of_ids); ++ ++static int ap0101_parse_dt(struct device_node *np, struct ap0101_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ return 0; ++} ++ ++static int ap0101_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ap0101_priv *priv; ++ struct v4l2_ctrl *ctrl; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ap0101_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ priv->exposure = 0x100; ++ priv->gain = 0x100; ++ priv->autogain = 1; ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_GAIN, 0, 0xffff, 1, priv->gain); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0xffff, 1, priv->exposure); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 1); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 1); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ap0101_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ap0101_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ap0101_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = priv->max_width; ++ priv->rect.height = priv->max_height; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ap0101) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ap0101_remove(struct i2c_client *client) ++{ ++ struct ap0101_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ap0101); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ap0101_i2c_driver = { ++ .driver = { ++ .name = "ap0101", ++ .of_match_table = ap0101_of_ids, ++ }, ++ .probe = ap0101_probe, ++ .remove = ap0101_remove, ++ .id_table = ap0101_id, ++}; ++ ++module_i2c_driver(ap0101_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for AP0101"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h +new file mode 100644 +index 0000000..d0d6205 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h +@@ -0,0 +1,28 @@ ++/* ++ * ON Semiconductor ap0101-ar014x sensor camera wizard 1280x720@30/UYVY/BT601/8bit ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#define AP0101_MAX_WIDTH 1280 ++#define AP0101_MAX_HEIGHT 720 ++ ++#define AP0101_DELAY 0xffff ++ ++struct ap0101_reg { ++ u16 reg; ++ u16 val; ++}; ++ ++static const struct ap0101_reg ap0101_regs_wizard[] = { ++/* enable FSIN */ ++{0xc88c, 0x0303}, ++{0xfc00, 0x2800}, ++{0x0040, 0x8100}, ++{AP0101_DELAY, 100}, ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +new file mode 100644 +index 0000000..35169b8 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +@@ -0,0 +1,588 @@ ++/* ++ * ON Semiconductor AP0201-AR023X sensor camera driver ++ * ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "ap0201_ar023x.h" ++#include "../gmsl/common.h" ++ ++static const int ap0201_i2c_addr[] = {0x5d, 0x48}; ++ ++#define AP0201_PID_REG 0x0000 ++#define AP0201_REV_REG 0x0058 ++#define AP0201_PID 0x0064 ++ ++#define AP0201_MEDIA_BUS_FMT MEDIA_BUS_FMT_YUYV8_2X8 ++ ++struct ap0201_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int max_width; ++ int max_height; ++ int init_complete; ++ u8 id[6]; ++ int exposure; ++ int gain; ++ int autogain; ++ /* serializer */ ++ int ser_addr; ++}; ++ ++static inline struct ap0201_priv *to_ap0201(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ap0201_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ap0201_priv, hdl)->sd; ++} ++ ++static int ap0201_set_regs(struct i2c_client *client, ++ const struct ap0201_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == AP0201_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ reg16_write16(client, regs[i].reg, regs[i].val); ++ } ++ ++ return 0; ++} ++ ++static u16 ap0201_ar023x_read(struct i2c_client *client, u16 addr) ++{ ++ u16 reg_val = 0; ++ ++ reg16_write16(client, 0x0040, 0x8d00); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0xfc00, addr); ++ reg16_write16(client, 0xfc02, 0x0200); /* 2 bytes */ ++ reg16_write16(client, 0x0040, 0x8d05); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d08); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_read16(client, 0xfc00, ®_val); ++ reg16_write16(client, 0x0040, 0x8d02); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ ++ return reg_val; ++} ++ ++static void ap0201_ar023x_write(struct i2c_client *client, u16 addr, u16 val) ++{ ++ reg16_write16(client, 0x0040, 0x8d00); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0xfc00, addr); ++ reg16_write16(client, 0xfc02, 0x0200 | (val >> 8)); /* 2 bytes */ ++ reg16_write16(client, 0xfc04, (val & 0xff) << 8); ++ reg16_write16(client, 0x0040, 0x8d06); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d08); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++ reg16_write16(client, 0x0040, 0x8d02); ++ usleep_range(1000, 1500); /* wait 1000 us */ ++} ++ ++static void ap0201_otp_id_read(struct i2c_client *client) ++{ ++ struct ap0201_priv *priv = to_ap0201(client); ++ int i; ++ ++ /* read camera id from ar023x OTP memory */ ++ ap0201_ar023x_write(client, 0x3054, 0x400); ++ ap0201_ar023x_write(client, 0x304a, 0x110); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i += 2) { ++ u16 val = 0; ++ /* first 4 bytes are equal on all ar023x */ ++ val = ap0201_ar023x_read(client, 0x3800 + i + 4); ++ priv->id[i] = val >> 8; ++ priv->id[i + 1] = val & 0xff; ++ } ++} ++ ++static int ap0201_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ap0201_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = AP0201_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ap0201_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = AP0201_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ap0201_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = AP0201_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int ap0201_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ ++ ap0201_otp_id_read(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = AP0201_PID >> 8; ++ edid->edid[9] = AP0201_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ap0201_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > priv->max_width) || ++ (rect->top + rect->height > priv->max_height)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int ap0201_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ap0201_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ap0201_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ u16 val = 0; ++ ++ ret = reg16_read16(client, (u16)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int ap0201_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ ++ return reg16_write16(client, (u16)reg->reg, (u16)reg->val); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ap0201_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ap0201_g_register, ++ .s_register = ap0201_s_register, ++#endif ++}; ++ ++static int ap0201_change_config(struct i2c_client *client) ++{ ++ reg16_write16(client, 0x098e, 0x7c00); ++ usleep_range(1000, 1500); /* wait 1 ms */ ++ reg16_write16(client, 0xfc00, 0x2800); ++ reg16_write16(client, 0x0040, 0x8100); ++ ++ return 0; ++} ++ ++static int ap0201_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ int ret = -EINVAL; ++ u16 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ case V4L2_CID_GAIN: ++ case V4L2_CID_EXPOSURE: ++ break; ++ case V4L2_CID_HFLIP: ++ reg16_read16(client, 0xc846, &val); ++ if (ctrl->val) ++ val |= 0x01; ++ else ++ val &= ~0x01; ++ reg16_write16(client, 0xc846, val); ++ ret = ap0201_change_config(client); ++ break; ++ case V4L2_CID_VFLIP: ++ reg16_read16(client, 0xc846, &val); ++ if (ctrl->val) ++ val |= 0x02; ++ else ++ val &= ~0x02; ++ reg16_write16(client, 0xc846, val); ++ ret = ap0201_change_config(client); ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ap0201_ctrl_ops = { ++ .s_ctrl = ap0201_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ap0201_video_ops = { ++ .s_stream = ap0201_s_stream, ++ .g_mbus_config = ap0201_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ap0201_subdev_pad_ops = { ++ .get_edid = ap0201_get_edid, ++ .enum_mbus_code = ap0201_enum_mbus_code, ++ .get_selection = ap0201_get_selection, ++ .set_selection = ap0201_set_selection, ++ .get_fmt = ap0201_get_fmt, ++ .set_fmt = ap0201_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ap0201_subdev_ops = { ++ .core = &ap0201_core_ops, ++ .video = &ap0201_video_ops, ++ .pad = &ap0201_subdev_pad_ops, ++}; ++ ++static ssize_t ap0201_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ap0201_priv *priv = to_ap0201(client); ++ ++ ap0201_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ap0201, S_IRUGO, ap0201_otp_id_show, NULL); ++ ++static int ap0201_initialize(struct i2c_client *client) ++{ ++ struct ap0201_priv *priv = to_ap0201(client); ++ u16 pid = 0, rev = 0, val = 0; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(ap0201_i2c_addr); i++) { ++ setup_i2c_translator(client, priv->ser_addr, ap0201_i2c_addr[i], MODE_GMSL2); ++ ++ /* check product ID */ ++ reg16_read16(client, AP0201_PID_REG, &pid); ++ if (pid == AP0201_PID) ++ break; ++ } ++ ++ if (pid != AP0201_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ reg16_read16(client, AP0201_REV_REG, &rev); ++#if 1 ++ /* read resolution used by current firmware */ ++ reg16_read16(client, 0xcae4, &val); ++ priv->max_width = val; ++ reg16_read16(client, 0xcae6, &val); ++ priv->max_height = val; ++#else ++ priv->max_width = AP0201_MAX_WIDTH; ++ priv->max_height = AP0201_MAX_HEIGHT; ++#endif ++ /* Program wizard registers */ ++ ap0201_set_regs(client, ap0201_regs_wizard, ARRAY_SIZE(ap0201_regs_wizard)); ++ /* Read OTP IDs */ ++ ap0201_otp_id_read(client); ++ ++ dev_info(&client->dev, "ap0201 PID %x (%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, rev, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id ap0201_id[] = { ++ { "ap0201", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ap0201_id); ++ ++static const struct of_device_id ap0201_of_ids[] = { ++ { .compatible = "onsemi,ap0201", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ap0201_of_ids); ++ ++static int ap0201_parse_dt(struct device_node *np, struct ap0201_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ return 0; ++} ++ ++static int ap0201_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ap0201_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ap0201_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ priv->exposure = 0x100; ++ priv->gain = 0x100; ++ priv->autogain = 1; ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_GAIN, 0, 0xffff, 1, priv->gain); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0xffff, 1, priv->exposure); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ap0201_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ap0201_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ap0201_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = priv->max_width; ++ priv->rect.height = priv->max_height; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ap0201) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ap0201_remove(struct i2c_client *client) ++{ ++ struct ap0201_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ap0201); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ap0201_i2c_driver = { ++ .driver = { ++ .name = "ap0201", ++ .of_match_table = ap0201_of_ids, ++ }, ++ .probe = ap0201_probe, ++ .remove = ap0201_remove, ++ .id_table = ap0201_id, ++}; ++ ++module_i2c_driver(ap0201_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for AP0201"); ++MODULE_AUTHOR("Andrey Gusakov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h +new file mode 100644 +index 0000000..c857edc +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h +@@ -0,0 +1,24 @@ ++/* ++ * ON Semiconductor AP0201-AR023X sensor camera ++ * ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#define AP0201_MAX_WIDTH 1920 ++#define AP0201_MAX_HEIGHT 1200 ++ ++#define AP0201_DELAY 0xffff ++ ++struct ap0201_reg { ++ u16 reg; ++ u16 val; ++}; ++ ++static const struct ap0201_reg ap0201_regs_wizard[] = { ++/* enable FSIN */ ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ov10635.c b/drivers/media/i2c/soc_camera/imagers/ov10635.c +new file mode 100644 +index 0000000..b9813f7 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov10635.c +@@ -0,0 +1,690 @@ ++/* ++ * OmniVision ov10635 sensor camera driver ++ * ++ * Copyright (C) 2015-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "ov10635.h" ++ ++#define OV10635_I2C_ADDR 0x30 ++ ++#define OV10635_PID_REGA 0x300a ++#define OV10635_PID_REGB 0x300b ++#define OV10635_PID 0xa635 ++ ++struct ov10635_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int subsampling; ++ int fps_denominator; ++ int init_complete; ++ u8 id[6]; ++ int dvp_order; ++ /* serializers */ ++ int ser_addr; ++}; ++ ++static int dvp_order = 0; ++module_param(dvp_order, int, 0644); ++MODULE_PARM_DESC(dvp_order, " DVP bus bits order"); ++ ++static inline struct ov10635_priv *to_ov10635(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ov10635_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ov10635_priv, hdl)->sd; ++} ++ ++static int ov10635_set_regs(struct i2c_client *client, ++ const struct ov10635_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (reg16_write(client, regs[i].reg, regs[i].val)) { ++ usleep_range(100, 150); /* wait 100ns */ ++ if (reg16_write(client, regs[i].reg, regs[i].val)) ++ printk("ov10635 reg 0x%04x write failed\n", regs[i].reg); ++ } ++ } ++ ++ return 0; ++} ++ ++static void ov10635_otp_id_read(struct i2c_client *client) ++{ ++ struct ov10635_priv *priv = to_ov10635(client); ++ int i; ++ ++ /* read camera id from OTP memory */ ++ reg16_write(client, 0x3d10, 1); ++ ++ usleep_range(15000, 16000); /* wait 15ms */ ++ ++ for (i = 0; i < 6; i++) ++ reg16_read(client, 0x3d00 + i, &priv->id[i]); ++} ++ ++static int ov10635_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ov10635_set_window(struct v4l2_subdev *sd, int subsampling) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ ++ /* disable clocks */ ++ reg16_write(client, 0x302e, 0x00); ++ reg16_write(client, 0x301b, 0xff); ++ reg16_write(client, 0x301c, 0xff); ++ reg16_write(client, 0x301a, 0xff); ++ ++ /* setup resolution */ ++ reg16_write(client, 0x3808, priv->rect.width >> 8); ++ reg16_write(client, 0x3809, priv->rect.width & 0xff); ++ reg16_write(client, 0x380a, priv->rect.height >> 8); ++ reg16_write(client, 0x380b, priv->rect.height & 0xff); ++ ++ /* enable/disable subsampling */ ++ reg16_write(client, 0x5005, subsampling ? 0x89 : 0x08); ++ reg16_write(client, 0x3007, subsampling ? 0x02 : 0x01); ++ reg16_write(client, 0x4004, subsampling ? 0x02 : 0x04); ++ ++#if 0 /* This is implemented in VIN via SOC_CAMERA layer, hence skip */ ++ /* horiz crop start */ ++ reg16_write(client, 0x3800, priv->rect.left >> 8); ++ reg16_write(client, 0x3801, priv->rect.left & 0xff); ++ /* horiz crop end */ ++ reg16_write(client, 0x3804, (priv->rect.left + priv->rect.width + 1) >> 8); ++ reg16_write(client, 0x3805, (priv->rect.left + priv->rect.width + 1) & 0xff); ++ /* vert crop start */ ++ reg16_write(client, 0x3802, priv->rect.top >> 8); ++ reg16_write(client, 0x3803, priv->rect.top & 0xff); ++ /* vert crop end */ ++ reg16_write(client, 0x3806, (priv->rect.top + priv->rect.height + 1) >> 8); ++ reg16_write(client, 0x3807, (priv->rect.top + priv->rect.height + 1) & 0xff); ++#endif ++ /* enable clocks */ ++ reg16_write(client, 0x301b, 0xf0); ++ reg16_write(client, 0x301c, 0xf0); ++ reg16_write(client, 0x301a, 0xf0); ++ reg16_write(client, 0x302e, 0x01); ++ ++ return 0; ++}; ++ ++static int ov10635_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ov10635_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ov10635_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ ++ return 0; ++} ++ ++static int ov10635_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = OV10635_PID >> 8; ++ edid->edid[9] = OV10635_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ov10635_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ int subsampling = 0; ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > OV10635_MAX_WIDTH) || ++ (rect->top + rect->height > OV10635_MAX_HEIGHT)) ++ *rect = priv->rect; ++ ++ if (rect->width == OV10635_MAX_WIDTH / 2 && ++ rect->height == OV10635_MAX_HEIGHT / 2) ++ subsampling = 1; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ /* change window only for subsampling, crop is done by VIN */ ++ if (subsampling != priv->subsampling) { ++ ov10635_set_window(sd, subsampling); ++ priv->subsampling = subsampling; ++ } ++ ++ return 0; ++} ++ ++static int ov10635_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OV10635_MAX_WIDTH; ++ sel->r.height = OV10635_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OV10635_MAX_WIDTH; ++ sel->r.height = OV10635_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ov10635_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++static int ov10635_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = 1; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int ov10635_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator) { ++ switch (cp->timeperframe.denominator) { ++ case 5: ++ ret = ov10635_set_regs(client, ov10635_regs_5fps, ++ ARRAY_SIZE(ov10635_regs_5fps)); ++ break; ++ case 10: ++ ret = ov10635_set_regs(client, ov10635_regs_10fps, ++ ARRAY_SIZE(ov10635_regs_10fps)); ++ break; ++ case 15: ++ ret = ov10635_set_regs(client, ov10635_regs_15fps, ++ ARRAY_SIZE(ov10635_regs_15fps)); ++ break; ++ case 30: ++ ret = ov10635_set_regs(client, ov10635_regs_30fps, ++ ARRAY_SIZE(ov10635_regs_30fps)); ++ break; ++ default: ++ ret = -EINVAL; ++ goto out; ++ } ++ ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++out: ++ return ret; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ov10635_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ __be64 be_val; ++ ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); ++ ++ return ret; ++} ++ ++static int ov10635_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); ++ ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ov10635_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ov10635_g_register, ++ .s_register = ov10635_s_register, ++#endif ++}; ++ ++static int ov10635_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ int ret = -EINVAL; ++ u8 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ /* AEC/AGC target */ ++ ret = reg16_write(client, 0xc46a, ctrl->val); ++ break; ++ case V4L2_CID_CONTRAST: ++ udelay(100); ++ ret = ov10635_set_regs(client, &ov10635_regs_contrast[ctrl->val][0], 18); ++ break; ++ case V4L2_CID_SATURATION: ++ ret = reg16_write(client, 0xc316, ctrl->val); ++ break; ++ case V4L2_CID_HUE: ++ /* CMX ? */ ++ ret = 0; ++ break; ++ case V4L2_CID_GAMMA: ++ ret = reg16_write(client, 0xc4be, ctrl->val >> 8); ++ ret |= reg16_write(client, 0xc4bf, ctrl->val & 0xff); ++ break; ++ case V4L2_CID_AUTOGAIN: ++ /* automatic gain/exposure */ ++ ret = reg16_write(client, 0x56d0, !ctrl->val); ++ break; ++ case V4L2_CID_GAIN: ++ /* manual gain */ ++ ret = reg16_write(client, 0x3504, 0); ++ ret |= reg16_write(client, 0x56d1, ctrl->val >> 8); ++ ret |= reg16_write(client, 0x56d2, ctrl->val & 0xff); ++ ret |= reg16_write(client, 0x3504, 1); /* validate gain */ ++ break; ++ case V4L2_CID_EXPOSURE: ++ /* manual exposure */ ++ ret = reg16_write(client, 0x3504, 0); ++ ret |= reg16_write(client, 0x56d5, ctrl->val >> 8); ++ ret |= reg16_write(client, 0x56d6, ctrl->val & 0xff); ++ ret |= reg16_write(client, 0x3504, 1); /* validate exposure */ ++ break; ++ case V4L2_CID_HFLIP: ++ ret = reg16_read(client, 0x381d, &val); ++ if (ctrl->val) ++ val |= 0x3; ++ else ++ val &= ~0x3; ++ ret |= reg16_write(client, 0x381d, val); ++ break; ++ case V4L2_CID_VFLIP: ++ ret = reg16_read(client, 0x381c, &val); ++ if (ctrl->val) ++ val |= 0xc0; ++ else ++ val &= ~0xc0; ++ ret |= reg16_write(client, 0x381c, val); ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ov10635_ctrl_ops = { ++ .s_ctrl = ov10635_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ov10635_video_ops = { ++ .s_stream = ov10635_s_stream, ++ .g_mbus_config = ov10635_g_mbus_config, ++ .g_parm = ov10635_g_parm, ++ .s_parm = ov10635_s_parm, ++}; ++ ++static const struct v4l2_subdev_pad_ops ov10635_subdev_pad_ops = { ++ .get_edid = ov10635_get_edid, ++ .enum_mbus_code = ov10635_enum_mbus_code, ++ .get_selection = ov10635_get_selection, ++ .set_selection = ov10635_set_selection, ++ .get_fmt = ov10635_get_fmt, ++ .set_fmt = ov10635_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ov10635_subdev_ops = { ++ .core = &ov10635_core_ops, ++ .video = &ov10635_video_ops, ++ .pad = &ov10635_subdev_pad_ops, ++}; ++ ++static ssize_t ov10635_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov10635_priv *priv = to_ov10635(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ov10635, S_IRUGO, ov10635_otp_id_show, NULL); ++ ++static int ov10635_initialize(struct i2c_client *client) ++{ ++ struct ov10635_priv *priv = to_ov10635(client); ++ u8 val = 0; ++ u16 pid = 0; ++ ++ setup_i2c_translator(client, priv->ser_addr, OV10635_I2C_ADDR, MODE_GMSL1); ++ udelay(100); ++ ++ reg16_read(client, OV10635_PID_REGA, &val); ++ pid = val; ++ reg16_read(client, OV10635_PID_REGB, &val); ++ pid = (pid << 8) | val; ++ ++ if (pid != OV10635_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ /* s/w reset sensor */ ++ reg16_write(client, 0x103, 0x1); ++ udelay(100); ++ /* Program wizard registers */ ++ ov10635_set_regs(client, ov10635_regs_wizard, ARRAY_SIZE(ov10635_regs_wizard)); ++ /* Set DVP bit swap */ ++ reg16_write(client, 0x4709, priv->dvp_order << 4); ++ /* Read OTP IDs */ ++ ov10635_otp_id_read(client); ++ ++ dev_info(&client->dev, "ov10635 PID %x, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id ov10635_id[] = { ++ { "ov10635", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ov10635_id); ++ ++static const struct of_device_id ov10635_of_ids[] = { ++ { .compatible = "ovti,ov10635", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ov10635_of_ids); ++ ++static int ov10635_parse_dt(struct device_node *np, struct ov10635_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ if (of_property_read_u32(np, "dvp-order", &priv->dvp_order)) ++ priv->dvp_order = 0; ++ ++ /* module params override dts */ ++ if (dvp_order) ++ priv->dvp_order = dvp_order; ++ ++ return 0; ++} ++ ++static int ov10635_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ov10635_priv *priv; ++ struct v4l2_ctrl *ctrl; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ov10635_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = OV10635_MAX_WIDTH; ++ priv->rect.height = OV10635_MAX_HEIGHT; ++ priv->fps_denominator = 30; ++ ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 0xff, 1, 0x30); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 4, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 0xff, 1, 0xff); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_HUE, 0, 255, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_GAMMA, 0, 0xffff, 1, 0x233); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 1); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_GAIN, 0, 0x3ff, 1, 0x10); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0xffff, 1, 0x80); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov10635_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ov10635_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ov10635_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ov10635) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ov10635_remove(struct i2c_client *client) ++{ ++ struct ov10635_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ov10635); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ov10635_i2c_driver = { ++ .driver = { ++ .name = "ov10635", ++ .of_match_table = ov10635_of_ids, ++ }, ++ .probe = ov10635_probe, ++ .remove = ov10635_remove, ++ .id_table = ov10635_id, ++}; ++ ++module_i2c_driver(ov10635_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for OV10635"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov10635.h b/drivers/media/i2c/soc_camera/imagers/ov10635.h +new file mode 100644 +index 0000000..38b4256 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov10635.h +@@ -0,0 +1,1143 @@ ++/* ++ * OmniVision ov10635 sensor camera wizard 1280x800@30/UYVY/BT601/8bit ++ * ++ * Copyright (C) 2015-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define OV10635_DISPLAY_PATTERN ++ ++#define OV10635_SENSOR_WIDTH 1312 ++#define OV10635_SENSOR_HEIGHT 814 ++ ++#define OV10635_MAX_WIDTH 1280 ++#define OV10635_MAX_HEIGHT 800 ++ ++#define OV10635_PCLK_96MHZ ++//#define OV10635_PCLK_88MHZ ++ ++#if defined(OV10635_PCLK_96MHZ) ++/* VTS=PCLK/FPS/HTS/2 (=96MHz/30/1750/2) */ ++ #define OV10635_HTS 1750 ++ #define OV10635_VTS 914 /* fps=30 */ ++#elif defined(OV10635_PCLK_88MHZ) ++/* VTS=PCLK/FPS/HTS/2 (=88MHz/1572/30/2) */ ++ #define OV10635_HTS 1572 ++ #define OV10635_VTS 933 /* fps=29.9998 */ ++#else ++ #error PCLK not defined ++#endif ++ ++struct ov10635_reg { ++ u16 reg; ++ u8 val; ++}; ++ ++static const struct ov10635_reg ov10635_regs_wizard[] = { ++//{0x0103, 0x01}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x300C, 0x61}, ++{0x301B, 0xFF}, ++{0x301C, 0xFF}, ++{0x301A, 0xFF}, ++{0x3011, 0x42}, ++{0x6900, 0x0C}, ++{0x6901, 0x19}, ++{0x3503, 0x10}, ++{0x3025, 0x03}, ++#if defined(OV10635_PCLK_96MHZ) ++{0x3003, 0x20}, ++{0x3004, 0x21}, ++#elif defined(OV10635_PCLK_88MHZ) ++{0x3003, 0x16}, ++{0x3004, 0x30}, ++#endif ++{0x3005, 0x40}, ++{0x3006, 0x91}, ++{0x3600, 0x74}, ++{0x3601, 0x2B}, ++{0x3612, 0x00}, ++{0x3611, 0x67}, ++{0x3633, 0xCA}, ++{0x3602, 0xAF}, ++{0x3603, 0x04}, ++{0x3630, 0x28}, ++{0x3631, 0x16}, ++{0x3714, 0x10}, ++{0x371D, 0x01}, ++{0x4300, 0x3A}, ++{0x3007, 0x01}, ++{0x3024, 0x03}, ++{0x3020, 0x0A}, ++{0x3702, 0x0D}, ++{0x3703, 0x20}, ++{0x3704, 0x15}, ++{0x3709, 0xA8}, ++{0x370C, 0xC7}, ++{0x370D, 0x80}, ++{0x3712, 0x00}, ++{0x3713, 0x20}, ++{0x3715, 0x04}, ++{0x381D, 0x40}, ++{0x381C, 0x00}, ++{0x3822, 0x50}, ++{0x3824, 0x10}, ++{0x3815, 0x8C}, ++{0x3804, 0x05}, ++{0x3805, 0x1F}, ++{0x3800, 0x00}, ++{0x3801, 0x00}, ++{0x3806, 0x03}, ++{0x3807, 0x28}, ++{0x3802, 0x00}, ++{0x3803, 0x07}, ++{0x3808, 0x05}, ++{0x3809, 0x00}, ++{0x380A, 0x03}, ++{0x380B, 0x20}, ++{0x380C, OV10635_HTS >> 8}, ++{0x380D, OV10635_HTS & 0xff}, ++{0x380E, OV10635_VTS >> 8}, ++{0x380F, OV10635_VTS & 0xff}, ++{0x3813, 0x02}, ++{0x3811, 0x08}, ++{0x381F, 0x0C}, ++{0x3819, 0x04}, ++{0x3804, 0x01}, ++{0x3805, 0x00}, ++{0x3828, 0x03}, ++{0x3829, 0x10}, ++{0x382A, 0x10}, ++{0x3621, 0x63}, ++{0x5005, 0x08}, ++{0x56D5, 0x00}, ++{0x56D6, 0x80}, ++{0x56D7, 0x00}, ++{0x56D8, 0x00}, ++{0x56D9, 0x00}, ++{0x56DA, 0x80}, ++{0x56DB, 0x00}, ++{0x56DC, 0x00}, ++{0x56E8, 0x00}, ++{0x56E9, 0x7F}, ++{0x56EA, 0x00}, ++{0x56EB, 0x7F}, ++{0x5100, 0x00}, ++{0x5101, 0x80}, ++{0x5102, 0x00}, ++{0x5103, 0x80}, ++{0x5104, 0x00}, ++{0x5105, 0x80}, ++{0x5106, 0x00}, ++{0x5107, 0x80}, ++{0x5108, 0x00}, ++{0x5109, 0x00}, ++{0x510A, 0x00}, ++{0x510B, 0x00}, ++{0x510C, 0x00}, ++{0x510D, 0x00}, ++{0x510E, 0x00}, ++{0x510F, 0x00}, ++{0x5110, 0x00}, ++{0x5111, 0x80}, ++{0x5112, 0x00}, ++{0x5113, 0x80}, ++{0x5114, 0x00}, ++{0x5115, 0x80}, ++{0x5116, 0x00}, ++{0x5117, 0x80}, ++{0x5118, 0x00}, ++{0x5119, 0x00}, ++{0x511A, 0x00}, ++{0x511B, 0x00}, ++{0x511C, 0x00}, ++{0x511D, 0x00}, ++{0x511E, 0x00}, ++{0x511F, 0x00}, ++{0x56D0, 0x00}, ++{0x5006, 0x04}, ++{0x5608, 0x05}, ++{0x52D7, 0x06}, ++{0x528D, 0x08}, ++{0x5293, 0x12}, ++{0x52D3, 0x12}, ++{0x5288, 0x06}, ++{0x5289, 0x20}, ++{0x52C8, 0x06}, ++{0x52C9, 0x20}, ++{0x52CD, 0x04}, ++{0x5381, 0x00}, ++{0x5382, 0xFF}, ++{0x5589, 0x76}, ++{0x558A, 0x47}, ++{0x558B, 0xEF}, ++{0x558C, 0xC9}, ++{0x558D, 0x49}, ++{0x558E, 0x30}, ++{0x558F, 0x67}, ++{0x5590, 0x3F}, ++{0x5591, 0xF0}, ++{0x5592, 0x10}, ++{0x55A2, 0x6D}, ++{0x55A3, 0x55}, ++{0x55A4, 0xC3}, ++{0x55A5, 0xB5}, ++{0x55A6, 0x43}, ++{0x55A7, 0x38}, ++{0x55A8, 0x5F}, ++{0x55A9, 0x4B}, ++{0x55AA, 0xF0}, ++{0x55AB, 0x10}, ++{0x5581, 0x52}, ++{0x5300, 0x01}, ++{0x5301, 0x00}, ++{0x5302, 0x00}, ++{0x5303, 0x0E}, ++{0x5304, 0x00}, ++{0x5305, 0x0E}, ++{0x5306, 0x00}, ++{0x5307, 0x36}, ++{0x5308, 0x00}, ++{0x5309, 0xD9}, ++{0x530A, 0x00}, ++{0x530B, 0x0F}, ++{0x530C, 0x00}, ++{0x530D, 0x2C}, ++{0x530E, 0x00}, ++{0x530F, 0x59}, ++{0x5310, 0x00}, ++{0x5311, 0x7B}, ++{0x5312, 0x00}, ++{0x5313, 0x22}, ++{0x5314, 0x00}, ++{0x5315, 0xD5}, ++{0x5316, 0x00}, ++{0x5317, 0x13}, ++{0x5318, 0x00}, ++{0x5319, 0x18}, ++{0x531A, 0x00}, ++{0x531B, 0x26}, ++{0x531C, 0x00}, ++{0x531D, 0xDC}, ++{0x531E, 0x00}, ++{0x531F, 0x02}, ++{0x5320, 0x00}, ++{0x5321, 0x24}, ++{0x5322, 0x00}, ++{0x5323, 0x56}, ++{0x5324, 0x00}, ++{0x5325, 0x85}, ++{0x5326, 0x00}, ++{0x5327, 0x20}, ++{0x5609, 0x01}, ++{0x560A, 0x40}, ++{0x560B, 0x01}, ++{0x560C, 0x40}, ++{0x560D, 0x00}, ++{0x560E, 0xFA}, ++{0x560F, 0x00}, ++{0x5610, 0xFA}, ++{0x5611, 0x02}, ++{0x5612, 0x80}, ++{0x5613, 0x02}, ++{0x5614, 0x80}, ++{0x5615, 0x01}, ++{0x5616, 0x2C}, ++{0x5617, 0x01}, ++{0x5618, 0x2C}, ++{0x563B, 0x01}, ++{0x563C, 0x01}, ++{0x563D, 0x01}, ++{0x563E, 0x01}, ++{0x563F, 0x03}, ++{0x5640, 0x03}, ++{0x5641, 0x03}, ++{0x5642, 0x05}, ++{0x5643, 0x09}, ++{0x5644, 0x05}, ++{0x5645, 0x05}, ++{0x5646, 0x05}, ++{0x5647, 0x05}, ++{0x5651, 0x00}, ++{0x5652, 0x80}, ++{0x521A, 0x01}, ++{0x521B, 0x03}, ++{0x521C, 0x06}, ++{0x521D, 0x0A}, ++{0x521E, 0x0E}, ++{0x521F, 0x12}, ++{0x5220, 0x16}, ++{0x5223, 0x02}, ++{0x5225, 0x04}, ++{0x5227, 0x08}, ++{0x5229, 0x0C}, ++{0x522B, 0x12}, ++{0x522D, 0x18}, ++{0x522F, 0x1E}, ++{0x5241, 0x04}, ++{0x5242, 0x01}, ++{0x5243, 0x03}, ++{0x5244, 0x06}, ++{0x5245, 0x0A}, ++{0x5246, 0x0E}, ++{0x5247, 0x12}, ++{0x5248, 0x16}, ++{0x524A, 0x03}, ++{0x524C, 0x04}, ++{0x524E, 0x08}, ++{0x5250, 0x0C}, ++{0x5252, 0x12}, ++{0x5254, 0x18}, ++{0x5256, 0x1E}, ++{0x4606, (2*OV10635_HTS) >> 8}, /* fifo_line_length = 2*hts */ ++{0x4607, (2*OV10635_HTS) & 0xff}, ++{0x460a, (2*(OV10635_HTS-OV10635_MAX_WIDTH)) >> 8}, /* fifo_hsync_start = 2*(hts - xres) */ ++{0x460b, (2*(OV10635_HTS-OV10635_MAX_WIDTH)) & 0xff }, ++{0x460C, 0x00}, ++{0x4620, 0x0E}, ++#if 0 ++{0x4700, 0x02}, // BT656: mode is acceptable but artefact lines on left/bottom due to BT656 SAV/EAV are parsed as image data ++#else ++{0x4700, 0x04}, // BT601: 0x08 is also accaptable as HS/VS mode ++#endif ++{0x4701, 0x00}, ++{0x4702, 0x01}, ++{0x4004, 0x04}, ++{0x4005, 0x18}, ++{0x4001, 0x06}, ++{0x4050, 0x22}, ++{0x4051, 0x24}, ++{0x4052, 0x02}, ++{0x4057, 0x9C}, ++{0x405A, 0x00}, ++{0x4202, 0x02}, ++{0x3023, 0x10}, ++{0x0100, 0x01}, ++{0x0100, 0x01}, ++{0x0100, 0x01}, ++{0x0100, 0x01}, ++{0x0100, 0x01}, ++{0x0100, 0x01}, ++{0x6F10, 0x07}, ++{0x6F11, 0x82}, ++{0x6F12, 0x04}, ++{0x6F13, 0x00}, ++{0xD000, 0x19}, ++{0xD001, 0xA0}, ++{0xD002, 0x00}, ++{0xD003, 0x01}, ++{0xD004, 0xA9}, ++{0xD005, 0xAD}, ++{0xD006, 0x10}, ++{0xD007, 0x40}, ++{0xD008, 0x44}, ++{0xD009, 0x00}, ++{0xD00A, 0x68}, ++{0xD00B, 0x00}, ++{0xD00C, 0x15}, ++{0xD00D, 0x00}, ++{0xD00E, 0x00}, ++{0xD00F, 0x00}, ++{0xD040, 0x9C}, ++{0xD041, 0x21}, ++{0xD042, 0xFF}, ++{0xD043, 0xF8}, ++{0xD044, 0xD4}, ++{0xD045, 0x01}, ++{0xD046, 0x48}, ++{0xD047, 0x00}, ++{0xD048, 0xD4}, ++{0xD049, 0x01}, ++{0xD04A, 0x50}, ++{0xD04B, 0x04}, ++{0xD04C, 0x18}, ++{0xD04D, 0x60}, ++{0xD04E, 0x00}, ++{0xD04F, 0x01}, ++{0xD050, 0xA8}, ++{0xD051, 0x63}, ++{0xD052, 0x02}, ++{0xD053, 0xA4}, ++{0xD054, 0x85}, ++{0xD055, 0x43}, ++{0xD056, 0x00}, ++{0xD057, 0x00}, ++{0xD058, 0x18}, ++{0xD059, 0x60}, ++{0xD05A, 0x00}, ++{0xD05B, 0x01}, ++{0xD05C, 0xA8}, ++{0xD05D, 0x63}, ++{0xD05E, 0x03}, ++{0xD05F, 0xF0}, ++{0xD060, 0x98}, ++{0xD061, 0xA3}, ++{0xD062, 0x00}, ++{0xD063, 0x00}, ++{0xD064, 0x8C}, ++{0xD065, 0x6A}, ++{0xD066, 0x00}, ++{0xD067, 0x6E}, ++{0xD068, 0xE5}, ++{0xD069, 0x85}, ++{0xD06A, 0x18}, ++{0xD06B, 0x00}, ++{0xD06C, 0x10}, ++{0xD06D, 0x00}, ++{0xD06E, 0x00}, ++{0xD06F, 0x10}, ++{0xD070, 0x9C}, ++{0xD071, 0x80}, ++{0xD072, 0x00}, ++{0xD073, 0x03}, ++{0xD074, 0x18}, ++{0xD075, 0x60}, ++{0xD076, 0x00}, ++{0xD077, 0x01}, ++{0xD078, 0xA8}, ++{0xD079, 0x63}, ++{0xD07A, 0x07}, ++{0xD07B, 0x80}, ++{0xD07C, 0x07}, ++{0xD07D, 0xFF}, ++{0xD07E, 0xF9}, ++{0xD07F, 0x03}, ++{0xD080, 0x8C}, ++{0xD081, 0x63}, ++{0xD082, 0x00}, ++{0xD083, 0x00}, ++{0xD084, 0xA5}, ++{0xD085, 0x6B}, ++{0xD086, 0x00}, ++{0xD087, 0xFF}, ++{0xD088, 0x18}, ++{0xD089, 0x80}, ++{0xD08A, 0x00}, ++{0xD08B, 0x01}, ++{0xD08C, 0xA8}, ++{0xD08D, 0x84}, ++{0xD08E, 0x01}, ++{0xD08F, 0x04}, ++{0xD090, 0xE1}, ++{0xD091, 0x6B}, ++{0xD092, 0x58}, ++{0xD093, 0x00}, ++{0xD094, 0x94}, ++{0xD095, 0x6A}, ++{0xD096, 0x00}, ++{0xD097, 0x70}, ++{0xD098, 0xE1}, ++{0xD099, 0x6B}, ++{0xD09A, 0x20}, ++{0xD09B, 0x00}, ++{0xD09C, 0x95}, ++{0xD09D, 0x6B}, ++{0xD09E, 0x00}, ++{0xD09F, 0x00}, ++{0xD0A0, 0xE4}, ++{0xD0A1, 0x8B}, ++{0xD0A2, 0x18}, ++{0xD0A3, 0x00}, ++{0xD0A4, 0x0C}, ++{0xD0A5, 0x00}, ++{0xD0A6, 0x00}, ++{0xD0A7, 0x23}, ++{0xD0A8, 0x15}, ++{0xD0A9, 0x00}, ++{0xD0AA, 0x00}, ++{0xD0AB, 0x00}, ++{0xD0AC, 0x18}, ++{0xD0AD, 0x60}, ++{0xD0AE, 0x80}, ++{0xD0AF, 0x06}, ++{0xD0B0, 0xA8}, ++{0xD0B1, 0x83}, ++{0xD0B2, 0x40}, ++{0xD0B3, 0x08}, ++{0xD0B4, 0xA8}, ++{0xD0B5, 0xE3}, ++{0xD0B6, 0x38}, ++{0xD0B7, 0x2A}, ++{0xD0B8, 0xA8}, ++{0xD0B9, 0xC3}, ++{0xD0BA, 0x40}, ++{0xD0BB, 0x09}, ++{0xD0BC, 0xA8}, ++{0xD0BD, 0xA3}, ++{0xD0BE, 0x38}, ++{0xD0BF, 0x29}, ++{0xD0C0, 0x8C}, ++{0xD0C1, 0x65}, ++{0xD0C2, 0x00}, ++{0xD0C3, 0x00}, ++{0xD0C4, 0xD8}, ++{0xD0C5, 0x04}, ++{0xD0C6, 0x18}, ++{0xD0C7, 0x00}, ++{0xD0C8, 0x8C}, ++{0xD0C9, 0x67}, ++{0xD0CA, 0x00}, ++{0xD0CB, 0x00}, ++{0xD0CC, 0xD8}, ++{0xD0CD, 0x06}, ++{0xD0CE, 0x18}, ++{0xD0CF, 0x00}, ++{0xD0D0, 0x18}, ++{0xD0D1, 0x60}, ++{0xD0D2, 0x80}, ++{0xD0D3, 0x06}, ++{0xD0D4, 0xA8}, ++{0xD0D5, 0xE3}, ++{0xD0D6, 0x67}, ++{0xD0D7, 0x02}, ++{0xD0D8, 0xA9}, ++{0xD0D9, 0x03}, ++{0xD0DA, 0x67}, ++{0xD0DB, 0x03}, ++{0xD0DC, 0xA8}, ++{0xD0DD, 0xC3}, ++{0xD0DE, 0x3D}, ++{0xD0DF, 0x05}, ++{0xD0E0, 0x8C}, ++{0xD0E1, 0x66}, ++{0xD0E2, 0x00}, ++{0xD0E3, 0x00}, ++{0xD0E4, 0xB8}, ++{0xD0E5, 0x63}, ++{0xD0E6, 0x00}, ++{0xD0E7, 0x18}, ++{0xD0E8, 0xB8}, ++{0xD0E9, 0x63}, ++{0xD0EA, 0x00}, ++{0xD0EB, 0x98}, ++{0xD0EC, 0xBC}, ++{0xD0ED, 0x03}, ++{0xD0EE, 0x00}, ++{0xD0EF, 0x00}, ++{0xD0F0, 0x10}, ++{0xD0F1, 0x00}, ++{0xD0F2, 0x00}, ++{0xD0F3, 0x16}, ++{0xD0F4, 0xB8}, ++{0xD0F5, 0x83}, ++{0xD0F6, 0x00}, ++{0xD0F7, 0x19}, ++{0xD0F8, 0x8C}, ++{0xD0F9, 0x67}, ++{0xD0FA, 0x00}, ++{0xD0FB, 0x00}, ++{0xD0FC, 0xB8}, ++{0xD0FD, 0xA4}, ++{0xD0FE, 0x00}, ++{0xD0FF, 0x98}, ++{0xD100, 0xB8}, ++{0xD101, 0x83}, ++{0xD102, 0x00}, ++{0xD103, 0x08}, ++{0xD104, 0x8C}, ++{0xD105, 0x68}, ++{0xD106, 0x00}, ++{0xD107, 0x00}, ++{0xD108, 0xE0}, ++{0xD109, 0x63}, ++{0xD10A, 0x20}, ++{0xD10B, 0x04}, ++{0xD10C, 0xE0}, ++{0xD10D, 0x65}, ++{0xD10E, 0x18}, ++{0xD10F, 0x00}, ++{0xD110, 0xA4}, ++{0xD111, 0x83}, ++{0xD112, 0xFF}, ++{0xD113, 0xFF}, ++{0xD114, 0xB8}, ++{0xD115, 0x64}, ++{0xD116, 0x00}, ++{0xD117, 0x48}, ++{0xD118, 0xD8}, ++{0xD119, 0x07}, ++{0xD11A, 0x18}, ++{0xD11B, 0x00}, ++{0xD11C, 0xD8}, ++{0xD11D, 0x08}, ++{0xD11E, 0x20}, ++{0xD11F, 0x00}, ++{0xD120, 0x9C}, ++{0xD121, 0x60}, ++{0xD122, 0x00}, ++{0xD123, 0x00}, ++{0xD124, 0xD8}, ++{0xD125, 0x06}, ++{0xD126, 0x18}, ++{0xD127, 0x00}, ++{0xD128, 0x00}, ++{0xD129, 0x00}, ++{0xD12A, 0x00}, ++{0xD12B, 0x08}, ++{0xD12C, 0x15}, ++{0xD12D, 0x00}, ++{0xD12E, 0x00}, ++{0xD12F, 0x00}, ++{0xD130, 0x8C}, ++{0xD131, 0x6A}, ++{0xD132, 0x00}, ++{0xD133, 0x76}, ++{0xD134, 0xBC}, ++{0xD135, 0x23}, ++{0xD136, 0x00}, ++{0xD137, 0x00}, ++{0xD138, 0x13}, ++{0xD139, 0xFF}, ++{0xD13A, 0xFF}, ++{0xD13B, 0xE6}, ++{0xD13C, 0x18}, ++{0xD13D, 0x60}, ++{0xD13E, 0x80}, ++{0xD13F, 0x06}, ++{0xD140, 0x03}, ++{0xD141, 0xFF}, ++{0xD142, 0xFF}, ++{0xD143, 0xDD}, ++{0xD144, 0xA8}, ++{0xD145, 0x83}, ++{0xD146, 0x40}, ++{0xD147, 0x08}, ++{0xD148, 0x85}, ++{0xD149, 0x21}, ++{0xD14A, 0x00}, ++{0xD14B, 0x00}, ++{0xD14C, 0x85}, ++{0xD14D, 0x41}, ++{0xD14E, 0x00}, ++{0xD14F, 0x04}, ++{0xD150, 0x44}, ++{0xD151, 0x00}, ++{0xD152, 0x48}, ++{0xD153, 0x00}, ++{0xD154, 0x9C}, ++{0xD155, 0x21}, ++{0xD156, 0x00}, ++{0xD157, 0x08}, ++{0x6F0E, 0x03}, ++{0x6F0F, 0x00}, ++{0x460E, 0x08}, ++{0x460F, 0x01}, ++{0x4610, 0x00}, ++{0x4611, 0x01}, ++{0x4612, 0x00}, ++{0x4613, 0x01}, ++{0x4605, 0x08}, // 8bit ++//{0x4709, 0x10}, // swap data bits order [9:0] -> [0:9] ++{0x4608, 0x00}, ++{0x4609, 0x08}, ++{0x6804, 0x00}, ++{0x6805, 0x06}, ++{0x6806, 0x00}, ++{0x5120, 0x00}, ++{0x3510, 0x00}, ++{0x3504, 0x00}, ++{0x6800, 0x00}, ++{0x6F0D, 0x01}, ++{0x4708, 0x03}, // PCLK rising edge ++{0x5000, 0xFF}, ++{0x5001, 0xBF}, ++{0x5002, 0x7E}, ++#ifdef OV10635_DISPLAY_PATTERN ++{0x503d, 0x80}, ++#else ++{0x503D, 0x00}, ++#endif ++{0xC450, 0x01}, /* AA mode */ ++{0xC452, 0x04}, ++{0xC453, 0x00}, ++{0xC454, 0x00}, ++{0xC455, 0x01}, ++{0xC456, 0x01}, ++{0xC457, 0x00}, ++{0xC458, 0x00}, ++{0xC459, 0x00}, ++{0xC45B, 0x00}, ++{0xC45C, 0x01}, ++{0xC45D, 0x00}, ++{0xC45E, 0x00}, ++{0xC45F, 0x00}, ++{0xC460, 0x00}, ++{0xC461, 0x01}, ++{0xC462, 0x01}, ++{0xC464, 0x03}, ++{0xC465, 0x00}, ++{0xC466, 0x8A}, ++{0xC467, 0x00}, ++{0xC468, 0x86}, ++{0xC469, 0x00}, ++{0xC46A, 0x30}, ++{0xC46B, 0x50}, ++{0xC46C, 0x30}, ++{0xC46D, 0x28}, ++{0xC46E, 0x60}, ++{0xC46F, 0x40}, ++{0xC47C, 0x01}, ++{0xC47D, 0x38}, ++{0xC47E, 0x00}, ++{0xC47F, 0x00}, ++{0xC480, 0x00}, ++{0xC481, 0xFF}, ++{0xC482, 0x00}, ++{0xC483, 0x40}, ++{0xC484, 0x00}, ++{0xC485, 0x18}, ++{0xC486, 0x00}, ++{0xC487, 0x18}, ++{0xC488, (OV10635_VTS-8)*16 >> 8}, ++{0xC489, (OV10635_VTS-8)*16 & 0xff}, ++{0xC48A, (OV10635_VTS-8)*16 >> 8}, ++{0xC48B, (OV10635_VTS-8)*16 & 0xff}, ++{0xC48C, 0x00}, ++{0xC48D, 0x04}, ++{0xC48E, 0x00}, ++{0xC48F, 0x04}, ++{0xC490, 0x03}, ++{0xC492, 0x20}, ++{0xC493, 0x08}, ++{0xC498, 0x02}, ++{0xC499, 0x00}, ++{0xC49A, 0x02}, ++{0xC49B, 0x00}, ++{0xC49C, 0x02}, ++{0xC49D, 0x00}, ++{0xC49E, 0x02}, ++{0xC49F, 0x60}, ++{0xC4A0, 0x03}, ++{0xC4A1, 0x00}, ++{0xC4A2, 0x04}, ++{0xC4A3, 0x00}, ++{0xC4A4, 0x00}, ++{0xC4A5, 0x10}, ++{0xC4A6, 0x00}, ++{0xC4A7, 0x40}, ++{0xC4A8, 0x00}, ++{0xC4A9, 0x80}, ++{0xC4AA, 0x0D}, ++{0xC4AB, 0x00}, ++{0xC4AC, 0x0F}, ++{0xC4AD, 0xC0}, ++{0xC4B4, 0x01}, ++{0xC4B5, 0x01}, ++{0xC4B6, 0x00}, ++{0xC4B7, 0x01}, ++{0xC4B8, 0x00}, ++{0xC4B9, 0x01}, ++{0xC4BA, 0x01}, ++{0xC4BB, 0x00}, ++{0xC4BC, 0x01}, ++{0xC4BD, 0x60}, ++{0xC4BE, 0x02}, ++{0xC4BF, 0x33}, ++{0xC4C8, 0x03}, ++{0xC4C9, 0xD0}, ++{0xC4CA, 0x0E}, ++{0xC4CB, 0x00}, ++{0xC4CC, 0x0E}, ++{0xC4CD, 0x51}, ++{0xC4CE, 0x0E}, ++{0xC4CF, 0x51}, ++{0xC4D0, 0x04}, ++{0xC4D1, 0x80}, ++{0xC4E0, 0x04}, ++{0xC4E1, 0x02}, ++{0xC4E2, 0x01}, ++{0xC4E4, 0x10}, ++{0xC4E5, 0x20}, ++{0xC4E6, 0x30}, ++{0xC4E7, 0x40}, ++{0xC4E8, 0x50}, ++{0xC4E9, 0x60}, ++{0xC4EA, 0x70}, ++{0xC4EB, 0x80}, ++{0xC4EC, 0x90}, ++{0xC4ED, 0xA0}, ++{0xC4EE, 0xB0}, ++{0xC4EF, 0xC0}, ++{0xC4F0, 0xD0}, ++{0xC4F1, 0xE0}, ++{0xC4F2, 0xF0}, ++{0xC4F3, 0x80}, ++{0xC4F4, 0x00}, ++{0xC4F5, 0x20}, ++{0xC4F6, 0x02}, ++{0xC4F7, 0x00}, ++{0xC4F8, 0x00}, ++{0xC4F9, 0x00}, ++{0xC4FA, 0x00}, ++{0xC4FB, 0x01}, ++{0xC4FC, 0x01}, ++{0xC4FD, 0x00}, ++{0xC4FE, 0x04}, ++{0xC4FF, 0x02}, ++{0xC500, 0x48}, ++{0xC501, 0x74}, ++{0xC502, 0x58}, ++{0xC503, 0x80}, ++{0xC504, 0x05}, ++{0xC505, 0x80}, ++{0xC506, 0x03}, ++{0xC507, 0x80}, ++{0xC508, 0x01}, ++{0xC509, 0xC0}, ++{0xC50A, 0x01}, ++{0xC50B, 0xA0}, ++{0xC50C, 0x01}, ++{0xC50D, 0x2C}, ++{0xC50E, 0x01}, ++{0xC50F, 0x0A}, ++{0xC510, 0x00}, ++{0xC511, 0x00}, ++{0xC512, 0xE5}, ++{0xC513, 0x14}, ++{0xC514, 0x04}, ++{0xC515, 0x00}, ++{0xC518, OV10635_VTS >> 8}, ++{0xC519, OV10635_VTS & 0xff}, ++{0xC51A, OV10635_HTS >> 8}, ++{0xC51B, OV10635_HTS & 0xff}, ++{0xC2E0, 0x00}, ++{0xC2E1, 0x51}, ++{0xC2E2, 0x00}, ++{0xC2E3, 0xD6}, ++{0xC2E4, 0x01}, ++{0xC2E5, 0x5E}, ++{0xC2E9, 0x01}, ++{0xC2EA, 0x7A}, ++{0xC2EB, 0x90}, ++{0xC2ED, 0x00}, ++{0xC2EE, 0x7A}, ++{0xC2EF, 0x64}, ++{0xC308, 0x00}, ++{0xC309, 0x00}, ++{0xC30A, 0x00}, ++{0xC30C, 0x00}, ++{0xC30D, 0x01}, ++{0xC30E, 0x00}, ++{0xC30F, 0x00}, ++{0xC310, 0x01}, ++{0xC311, 0x60}, ++{0xC312, 0xFF}, ++{0xC313, 0x08}, ++{0xC314, 0x01}, ++{0xC315, 0x00}, /* min saturation gain */ ++{0xC316, 0xFF}, /* max saturation gain */ ++{0xC317, 0x0B}, ++{0xC318, 0x00}, ++{0xC319, 0x0C}, ++{0xC31A, 0x00}, ++{0xC31B, 0xE0}, ++{0xC31C, 0x00}, ++{0xC31D, 0x14}, ++{0xC31E, 0x00}, ++{0xC31F, 0xC5}, ++{0xC320, 0xFF}, ++{0xC321, 0x4B}, ++{0xC322, 0xFF}, ++{0xC323, 0xF0}, ++{0xC324, 0xFF}, ++{0xC325, 0xE8}, ++{0xC326, 0x00}, ++{0xC327, 0x46}, ++{0xC328, 0xFF}, ++{0xC329, 0xD2}, ++{0xC32A, 0xFF}, ++{0xC32B, 0xE4}, ++{0xC32C, 0xFF}, ++{0xC32D, 0xBB}, ++{0xC32E, 0x00}, ++{0xC32F, 0x61}, ++{0xC330, 0xFF}, ++{0xC331, 0xF9}, ++{0xC332, 0x00}, ++{0xC333, 0xD9}, ++{0xC334, 0x00}, ++{0xC335, 0x2E}, ++{0xC336, 0x00}, ++{0xC337, 0xB1}, ++{0xC338, 0xFF}, ++{0xC339, 0x64}, ++{0xC33A, 0xFF}, ++{0xC33B, 0xEB}, ++{0xC33C, 0xFF}, ++{0xC33D, 0xE8}, ++{0xC33E, 0x00}, ++{0xC33F, 0x48}, ++{0xC340, 0xFF}, ++{0xC341, 0xD0}, ++{0xC342, 0xFF}, ++{0xC343, 0xED}, ++{0xC344, 0xFF}, ++{0xC345, 0xAD}, ++{0xC346, 0x00}, ++{0xC347, 0x66}, ++{0xC348, 0x01}, ++{0xC349, 0x00}, ++{0x6700, 0x04}, ++{0x6701, 0x7B}, ++{0x6702, 0xFD}, ++{0x6703, 0xF9}, ++{0x6704, 0x3D}, ++{0x6705, 0x71}, ++{0x6706, 0x78}, ++{0x6708, 0x05}, ++{0x6F06, 0x6F}, ++{0x6F07, 0x00}, ++{0x6F0A, 0x6F}, ++{0x6F0B, 0x00}, ++{0x6F00, 0x03}, ++{0xC34C, 0x01}, ++{0xC34D, 0x00}, ++{0xC34E, 0x46}, ++{0xC34F, 0x55}, ++{0xC350, 0x00}, ++{0xC351, 0x40}, ++{0xC352, 0x00}, ++{0xC353, 0xFF}, ++{0xC354, 0x04}, ++{0xC355, 0x08}, ++{0xC356, 0x01}, ++{0xC357, 0xEF}, ++{0xC358, 0x30}, ++{0xC359, 0x01}, ++{0xC35A, 0x64}, ++{0xC35B, 0x46}, ++{0xC35C, 0x00}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0x3042, 0xF0}, ++{0xC261, 0x01}, ++{0x301B, 0xF0}, ++{0x301C, 0xF0}, ++{0x301A, 0xF0}, ++{0x6F00, 0xC3}, ++{0xC46A, 0x30}, ++{0xC46D, 0x20}, ++{0xC464, 0x84}, ++{0xC465, 0x00}, ++{0x6F00, 0x03}, ++{0x6F00, 0x43}, ++{0x381C, 0x00}, ++{0x381D, 0x40}, ++{0xC454, 0x01}, ++{0x6F00, 0xC3}, ++{0xC454, 0x00}, ++{0xC4B1, 0x02}, ++{0xC4B2, 0x01}, ++{0xC4B3, 0x03}, ++{0x6F00, 0x03}, ++{0x6F00, 0x43}, ++/* enable FSIN (FRAMESYNC input) functionality */ ++{0x3832, (0x0d+2*0x20+0x15+38) >> 8}, ++{0x3833, (0x0d+2*0x20+0x15+38) & 0xff}, ++{0x3834, OV10635_VTS >> 8}, ++{0x3835, OV10635_VTS & 0xff}, ++{0x302E, 0x01}, ++}; ++ ++static const struct ov10635_reg ov10635_regs_30fps[] = { ++/* disable clocks */ ++{0x301b, 0xff}, ++{0x301c, 0xff}, ++{0x301a, 0xff}, ++/* clk = 24Mhz/2*32/2(1+1)=96Mhz, 30fps */ ++{0x3003, 0x20}, ++{0x3004, 0x21}, ++/* enable clocks */ ++{0x301b, 0xf0}, ++{0x301c, 0xf0}, ++{0x301a, 0xf0}, ++}; ++ ++static const struct ov10635_reg ov10635_regs_15fps[] = { ++/* disable clocks */ ++{0x301b, 0xff}, ++{0x301c, 0xff}, ++{0x301a, 0xff}, ++/* clk = 24Mhz/2*32/2(1+3)=48Mhz, 15fps */ ++{0x3003, 0x20}, ++{0x3004, 0x23}, ++/* enable clocks */ ++{0x301b, 0xf0}, ++{0x301c, 0xf0}, ++{0x301a, 0xf0}, ++}; ++ ++static const struct ov10635_reg ov10635_regs_10fps[] = { ++/* disable clocks */ ++{0x301b, 0xff}, ++{0x301c, 0xff}, ++{0x301a, 0xff}, ++/* clk = 24Mhz/2*32/2(1+5)=32Mhz, 10fps */ ++{0x3003, 0x20}, ++{0x3004, 0x25}, ++/* enable clocks */ ++{0x301b, 0xf0}, ++{0x301c, 0xf0}, ++{0x301a, 0xf0}, ++}; ++ ++static const struct ov10635_reg ov10635_regs_5fps[] = { ++/* disable clocks */ ++{0x301b, 0xff}, ++{0x301c, 0xff}, ++{0x301a, 0xff}, ++/* clk = 24Mhz/4*32/2(1+5)=96Mhz, 5fps */ ++{0x3003, 0x20}, ++{0x3004, 0x45}, ++/* enable clocks */ ++{0x301b, 0xf0}, ++{0x301c, 0xf0}, ++{0x301a, 0xf0}, ++}; ++ ++static const struct ov10635_reg ov10635_regs_contrast[5][18] = { ++{ ++ {0x6f00, 0xc3}, ++ {0xc4e4, 0x20}, ++ {0xc4e5, 0x40}, ++ {0xc4e6, 0x60}, ++ {0xc4e7, 0x80}, ++ {0xc4e8, 0xa0}, ++ {0xc4e9, 0xb4}, ++ {0xc4ea, 0xc0}, ++ {0xc4eb, 0xcb}, ++ {0xc4ec, 0xd5}, ++ {0xc4ed, 0xde}, ++ {0xc4ee, 0xe6}, ++ {0xc4ef, 0xed}, ++ {0xc4f0, 0xf3}, ++ {0xc4f1, 0xf8}, ++ {0xc4f2, 0xfc}, ++ {0x6f00, 0x03}, ++ {0x6f00, 0x43}, ++}, { ++ {0x6f00, 0xc3}, ++ {0xc4e4, 0x18}, ++ {0xc4e5, 0x30}, ++ {0xc4e6, 0x48}, ++ {0xc4e7, 0x60}, ++ {0xc4e8, 0x78}, ++ {0xc4e9, 0x90}, ++ {0xc4ea, 0xa4}, ++ {0xc4eb, 0xb4}, ++ {0xc4ec, 0xc2}, ++ {0xc4ed, 0xcf}, ++ {0xc4ee, 0xdb}, ++ {0xc4ef, 0xe5}, ++ {0xc4f0, 0xee}, ++ {0xc4f1, 0xf6}, ++ {0xc4f2, 0xfc}, ++ {0x6f00, 0x03}, ++ {0x6f00, 0x43}, ++}, { ++ {0x6f00, 0xc3}, ++ {0xc4e4, 0x10}, ++ {0xc4e5, 0x20}, ++ {0xc4e6, 0x30}, ++ {0xc4e7, 0x40}, ++ {0xc4e8, 0x50}, ++ {0xc4e9, 0x60}, ++ {0xc4ea, 0x70}, ++ {0xc4eb, 0x80}, ++ {0xc4ec, 0x90}, ++ {0xc4ed, 0xa0}, ++ {0xc4ee, 0xb0}, ++ {0xc4ef, 0xc0}, ++ {0xc4f0, 0xd0}, ++ {0xc4f1, 0xe0}, ++ {0xc4f2, 0xf0}, ++ {0x6f00, 0x03}, ++ {0x6f00, 0x43}, ++}, { ++ {0x6f00, 0xc3}, ++ {0xc4e4, 0x0c}, ++ {0xc4e5, 0x18}, ++ {0xc4e6, 0x24}, ++ {0xc4e7, 0x30}, ++ {0xc4e8, 0x3c}, ++ {0xc4e9, 0x48}, ++ {0xc4ea, 0x54}, ++ {0xc4eb, 0x62}, ++ {0xc4ec, 0x72}, ++ {0xc4ed, 0x84}, ++ {0xc4ee, 0x94}, ++ {0xc4ef, 0xa6}, ++ {0xc4f0, 0xb9}, ++ {0xc4f1, 0xcd}, ++ {0xc4f2, 0xe2}, ++ {0x6f00, 0x03}, ++ {0x6f00, 0x43}, ++}, { ++ {0x6f00, 0xc3}, ++ {0xc4e4, 0x06}, ++ {0xc4e5, 0x0d}, ++ {0xc4e6, 0x15}, ++ {0xc4e7, 0x1e}, ++ {0xc4e8, 0x28}, ++ {0xc4e9, 0x32}, ++ {0xc4ea, 0x3c}, ++ {0xc4eb, 0x48}, ++ {0xc4ec, 0x56}, ++ {0xc4ed, 0x66}, ++ {0xc4ee, 0x78}, ++ {0xc4ef, 0x8c}, ++ {0xc4f0, 0xa2}, ++ {0xc4f1, 0xba}, ++ {0xc4f2, 0xd4}, ++ {0x6f00, 0x03}, ++ {0x6f00, 0x43}, ++} ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ov10635_debug.h b/drivers/media/i2c/soc_camera/imagers/ov10635_debug.h +new file mode 100644 +index 0000000..4c3515a +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov10635_debug.h +@@ -0,0 +1,54 @@ ++ ++#if 0 ++{0x4700, 0x02}, // BT656 ++{0x381d, 0x40}, // mirror off ++{0x381c, 0x00}, // flip off ++{0x4300, 0x3a}, // YUV: UYVY ++{0x4708, 0x00}, // PCLK rising edge ++ ++// clk = 24Mhz/3*22/2= 88Mhz ++{0x3003, 0x16}, ++{0x3004, 0x30}, ++#endif ++ ++#define WIDTH 1280 ++#define HEIGHT 720 ++ ++// DVP frame size ++{0x3808, WIDTH >> 8}, ++{0x3809, WIDTH & 0xff}, ++{0x380a, HEIGHT >> 8}, ++{0x380b, HEIGHT & 0xff}, ++ ++{0x3802, ((814 - HEIGHT)/2) >> 8}, // vert crop start ++{0x3803, ((814 - HEIGHT)/2) & 0xff}, ++{0x3806, ((814 - HEIGHT)/2 + HEIGHT + 1) >> 8}, // vert crop end ++{0x3807, ((814 - HEIGHT)/2 + HEIGHT + 1) & 0xff}, ++ ++#if 0 ++#define HTS 0x6f6 // got from above table 1782 ++#define VTS (0x2ec+80) // got from above table 748 + 80 ++ ++{0x380c, HTS >> 8}, // hts ++{0x380d, HTS & 0xff}, ++{0x380e, VTS >> 8}, // vts ++{0x380f, VTS & 0xff}, ++ ++// fifo ++{0x4606, (2*HTS) >> 8}, // fifo_line_length = 2*hts ++{0x4607, (2*HTS) & 0xff}, ++{0x460a, (2*(HTS-1280)) >> 8}, // fifo_hsync_start = 2*(hts - xres) ++{0x460b, (2*(HTS-1280)) & 0xff }, ++ ++// exposure ++{0xC488, (VTS-8)*16 >> 8}, ++{0xC489, (VTS-8)*16 & 0xff}, ++{0xC48A, (VTS-8)*16 >> 8}, ++{0xC48B, (VTS-8)*16 & 0xff}, ++ ++// vts/hts ++{0xC518, VTS >> 8}, ++{0xC519, VTS & 0xff}, ++{0xC51A, HTS >> 8}, ++{0xC51B, HTS & 0xff}, ++#endif +diff --git a/drivers/media/i2c/soc_camera/imagers/ov2311.c b/drivers/media/i2c/soc_camera/imagers/ov2311.c +new file mode 100644 +index 0000000..ce4999b +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov2311.c +@@ -0,0 +1,571 @@ ++/* ++ * OmniVision ov2311 sensor camera driver ++ * ++ * Copyright (C) 2015-2019 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "ov2311.h" ++ ++#define OV2311_I2C_ADDR 0x60 ++ ++#define OV2311_PID_REGA 0x300a ++#define OV2311_PID_REGB 0x300b ++#define OV2311_REV_REG 0x300c ++#define OV2311_PID 0x2311 ++ ++#define OV2311_MEDIA_BUS_FMT MEDIA_BUS_FMT_Y8_1X8 ++ ++struct ov2311_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int subsampling; ++ int fps_denominator; ++ int init_complete; ++ u8 id[6]; ++ int dvp_order; ++ /* serializers */ ++ int ser_addr; ++}; ++ ++static inline struct ov2311_priv *to_ov2311(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ov2311_priv, sd); ++} ++ ++static inline struct v4l2_subdev *ov2311_to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ov2311_priv, hdl)->sd; ++} ++ ++static int ov2311_set_regs(struct i2c_client *client, ++ const struct ov2311_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == OV2311_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ if (reg16_write(client, regs[i].reg, regs[i].val)) { ++ usleep_range(100, 150); /* wait 100ns */ ++ reg16_write(client, regs[i].reg, regs[i].val); ++ } ++ } ++ ++ return 0; ++} ++ ++static void ov2311_otp_id_read(struct i2c_client *client) ++{ ++ struct ov2311_priv *priv = to_ov2311(client); ++ int i; ++ ++ reg16_write(client, 0x3d81, 1); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i++) { ++ /* first 6 bytes are equal on all ov2311 */ ++ reg16_read(client, 0x7000 + i + 6, &priv->id[i]); ++ } ++} ++ ++static int ov2311_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ov2311_set_window(struct v4l2_subdev *sd) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ dev_dbg(&client->dev, "L=%d T=%d %dx%d\n", priv->rect.left, priv->rect.top, priv->rect.width, priv->rect.height); ++#if 0 ++ /* setup resolution */ ++ reg16_write(client, 0x3808, priv->rect.width >> 8); ++ reg16_write(client, 0x3809, priv->rect.width & 0xff); ++ reg16_write(client, 0x380a, priv->rect.height >> 8); ++ reg16_write(client, 0x380b, priv->rect.height & 0xff); ++ ++ /* horiz isp windowstart */ ++ reg16_write(client, 0x3810, priv->rect.left >> 8); ++ reg16_write(client, 0x3811, priv->rect.left & 0xff); ++ reg16_write(client, 0x3812, priv->rect.top >> 8); ++ reg16_write(client, 0x3813, priv->rect.top & 0xff); ++#endif ++ return 0; ++}; ++ ++static int ov2311_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = OV2311_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ov2311_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = OV2311_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ov2311_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = OV2311_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int ov2311_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = OV2311_PID >> 8; ++ edid->edid[9] = OV2311_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ov2311_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > OV2311_MAX_WIDTH) || ++ (rect->top + rect->height > OV2311_MAX_HEIGHT)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ ov2311_set_window(sd); ++ ++ return 0; ++} ++ ++static int ov2311_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OV2311_MAX_WIDTH; ++ sel->r.height = OV2311_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = OV2311_MAX_WIDTH; ++ sel->r.height = OV2311_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ov2311_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ov2311_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ __be64 be_val; ++ ++ if (!reg->size) ++ reg->size = sizeof(u8); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); ++ ++ return ret; ++} ++ ++static int ov2311_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u8); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); ++ ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ov2311_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ov2311_g_register, ++ .s_register = ov2311_s_register, ++#endif ++}; ++ ++static int ov2311_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = ov2311_to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ int ret = 0; ++ u8 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ break; ++ case V4L2_CID_GAIN: ++ reg16_write(client, 0x350A, ctrl->val / 0x3ff); // COARSE: 4.10 format ++ reg16_write(client, 0x350B, (ctrl->val % 0x3ff) >> 2); // FINE: 4.10 format ++ reg16_write(client, 0x350C, (ctrl->val % 0x3ff) << 6); // FINE: 4.10 format ++ break; ++ case V4L2_CID_ANALOGUE_GAIN: ++ reg16_write(client, 0x3508, ctrl->val / 0xf); // COARSE: 5.4 format ++ reg16_write(client, 0x3509, (ctrl->val % 0xf) << 4); // FINE: 5.4 format ++ break; ++ case V4L2_CID_EXPOSURE: ++ reg16_write(client, 0x3501, ctrl->val >> 8); ++ reg16_write(client, 0x3502, ctrl->val & 0xff); ++ break; ++ case V4L2_CID_HFLIP: ++ reg16_read(client, 0x3821, &val); ++ val &= ~0x04; ++ val |= (ctrl->val ? 0x04 : 0); ++ reg16_write(client, 0x3821, val); ++ break; ++ case V4L2_CID_VFLIP: ++ reg16_read(client, 0x3820, &val); ++ val &= ~0x44; ++ val |= (ctrl->val ? 0x44 : 0); ++ reg16_write(client, 0x3820, val); ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ov2311_ctrl_ops = { ++ .s_ctrl = ov2311_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ov2311_video_ops = { ++ .s_stream = ov2311_s_stream, ++ .g_mbus_config = ov2311_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ov2311_subdev_pad_ops = { ++ .get_edid = ov2311_get_edid, ++ .enum_mbus_code = ov2311_enum_mbus_code, ++ .get_selection = ov2311_get_selection, ++ .set_selection = ov2311_set_selection, ++ .get_fmt = ov2311_get_fmt, ++ .set_fmt = ov2311_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ov2311_subdev_ops = { ++ .core = &ov2311_core_ops, ++ .video = &ov2311_video_ops, ++ .pad = &ov2311_subdev_pad_ops, ++}; ++ ++static ssize_t ov2311_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov2311_priv *priv = to_ov2311(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ov2311, S_IRUGO, ov2311_otp_id_show, NULL); ++ ++static int ov2311_initialize(struct i2c_client *client) ++{ ++ struct ov2311_priv *priv = to_ov2311(client); ++ u16 pid; ++ u8 val = 0, rev = 0; ++ int ret = 0; ++ ++ setup_i2c_translator(client, priv->ser_addr, OV2311_I2C_ADDR, MODE_GMSL2); ++ ++ reg16_read(client, OV2311_PID_REGA, &val); ++ pid = val; ++ reg16_read(client, OV2311_PID_REGB, &val); ++ pid = (pid << 8) | val; ++ ++ if (pid != OV2311_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ if (get_des_id(client) == UB960_ID) ++ reg8_write_addr(client, priv->ser_addr, 0x02, 0x13); /* MIPI 2-lanes */ ++ ++ /* check revision */ ++ reg16_read(client, OV2311_REV_REG, &rev); ++ /* Program wizard registers */ ++ ov2311_set_regs(client, ov2311_regs_wizard_r1c, ARRAY_SIZE(ov2311_regs_wizard_r1c)); ++ /* Read OTP IDs */ ++ ov2311_otp_id_read(client); ++ ++ dev_info(&client->dev, "ov2311 PID %x (rev %x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, rev, OV2311_MAX_WIDTH, OV2311_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return ret; ++} ++ ++static const struct i2c_device_id ov2311_id[] = { ++ { "ov2311", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ov2311_id); ++ ++static const struct of_device_id ov2311_of_ids[] = { ++ { .compatible = "ovti,ov2311", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ov2311_of_ids); ++ ++static int ov2311_parse_dt(struct device_node *np, struct ov2311_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ return 0; ++} ++ ++static int ov2311_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ov2311_priv *priv; ++ struct v4l2_ctrl *ctrl; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ov2311_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = OV2311_MAX_WIDTH; ++ priv->rect.height = OV2311_MAX_HEIGHT; ++ priv->fps_denominator = 30; ++ ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 0xff, 1, 0x30); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 4, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 0xff, 1, 0xff); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_HUE, 0, 255, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_GAMMA, 0, 0xffff, 1, 0x233); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_GAIN, 0, 0x3ff*4, 1, 0x3ff); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 0, 0xf*5, 1, 0xf); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0x580, 1, 0x57c); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov2311_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ov2311_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ov2311_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ov2311) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ov2311_remove(struct i2c_client *client) ++{ ++ struct ov2311_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ov2311); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ov2311_i2c_driver = { ++ .driver = { ++ .name = "ov2311", ++ .of_match_table = ov2311_of_ids, ++ }, ++ .probe = ov2311_probe, ++ .remove = ov2311_remove, ++ .id_table = ov2311_id, ++}; ++ ++module_i2c_driver(ov2311_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for OV2311"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov2311.h b/drivers/media/i2c/soc_camera/imagers/ov2311.h +new file mode 100644 +index 0000000..3a56b0b +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov2311.h +@@ -0,0 +1,217 @@ ++/* ++ * OmniVision ov2311 sensor camera wizard 1600x130@30/GREY8/MIPI ++ * ++ * Copyright (C) 2015-2017 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define OV2311_DISPLAY_PATTERN ++//#define OV2311_FSIN_ENABLE ++ ++#define OV2311_MAX_WIDTH 1600 ++#define OV2311_MAX_HEIGHT 1300 ++ ++#define OV2311_DELAY 0xffff ++ ++#define OV2311_SENSOR_WIDTH 1616 ++#define OV2311_SENSOR_HEIGHT 1316 ++ ++#define OV2311_X_START ((OV2311_SENSOR_WIDTH - OV2311_MAX_WIDTH) / 2) ++#define OV2311_Y_START ((OV2311_SENSOR_HEIGHT - OV2311_MAX_HEIGHT) / 2) ++#define OV2311_X_END (OV2311_X_START + OV2311_MAX_WIDTH - 1) ++#define OV2311_Y_END (OV2311_Y_START + OV2311_MAX_HEIGHT - 1) ++ ++struct ov2311_reg { ++ u16 reg; ++ u8 val; ++}; ++ ++/* R1600x1300 RAW10 MIPI 60fps */ ++static const struct ov2311_reg ov2311_regs_wizard_r1c[] = { ++{0x0103, 0x01}, ++{0x0100, 0x00}, ++{0x010c, 0x02}, ++{0x010b, 0x01}, ++{0x0300, 0x01}, ++{0x0302, 0x32}, ++{0x0303, 0x00}, ++{0x0304, 0x03}, ++{0x0305, 0x02}, ++{0x0306, 0x01}, ++{0x030d, 0x5a}, ++{0x030e, 0x04}, ++{0x3001, 0x02}, ++{0x3004, 0x00}, ++{0x3005, 0x00}, ++{0x3006, 0x0a}, ++{0x3011, 0x0d}, ++{0x3014, 0x04}, ++{0x301c, 0xf0}, ++{0x3020, 0x20}, ++{0x302c, 0x00}, ++{0x302d, 0x00}, ++{0x302e, 0x00}, ++{0x302f, 0x03}, ++{0x3030, 0x10}, ++{0x303f, 0x03}, ++{0x3103, 0x00}, ++{0x3106, 0x08}, ++{0x31ff, 0x01}, ++{0x3501, 0x05}, ++{0x3502, 0x7c}, ++{0x3506, 0x00}, ++{0x3507, 0x00}, ++{0x3620, 0x67}, ++{0x3633, 0x78}, ++{0x3662, 0x65}, ++{0x3664, 0xb0}, ++{0x3666, 0x70}, ++{0x3670, 0x68}, ++{0x3674, 0x10}, ++{0x3675, 0x00}, ++{0x367e, 0x90}, ++{0x3680, 0x84}, ++{0x36a2, 0x04}, ++{0x36a3, 0x80}, ++{0x36b0, 0x00}, ++{0x3700, 0x35}, ++{0x3704, 0x39}, ++{0x370a, 0x50}, ++{0x3712, 0x00}, ++{0x3713, 0x02}, ++{0x3778, 0x00}, ++{0x379b, 0x01}, ++{0x379c, 0x10}, ++{0x3800, 0x00}, ++{0x3801, 0x00}, ++{0x3802, 0x00}, ++{0x3803, 0x00}, ++{0x3804, 0x06}, ++{0x3805, 0x4f}, ++{0x3806, 0x05}, ++{0x3807, 0x23}, ++{0x3808, OV2311_MAX_WIDTH >> 8}, ++{0x3809, OV2311_MAX_WIDTH & 0xff}, ++{0x380a, OV2311_MAX_HEIGHT >> 8}, ++{0x380b, OV2311_MAX_HEIGHT & 0xff}, ++{0x380c, 0x03}, ++{0x380d, 0xa8}, ++{0x380e, 0x05}, ++{0x380f, 0x88}, ++{0x3810, OV2311_X_START >> 8}, ++{0x3811, OV2311_X_START & 0xff}, ++{0x3812, OV2311_Y_START >> 8}, ++{0x3813, OV2311_X_START & 0xff}, ++{0x3814, 0x11}, ++{0x3815, 0x11}, ++{0x3816, 0x00}, ++{0x3817, 0x01}, ++{0x3818, 0x00}, ++{0x3819, 0x05}, ++{0x3820, 0x00}, ++{0x3821, 0x00}, ++{0x382b, 0x5a}, ++{0x382c, 0x0a}, ++{0x382d, 0xf8}, ++{0x3881, 0x44}, ++{0x3882, 0x02}, ++{0x3883, 0x8c}, ++{0x3885, 0x07}, ++{0x389d, 0x03}, ++{0x38a6, 0x00}, ++{0x38a7, 0x01}, ++{0x38b3, 0x07}, ++{0x38b1, 0x00}, ++{0x38e5, 0x02}, ++{0x38e7, 0x00}, ++{0x38e8, 0x00}, ++{0x3910, 0xff}, ++{0x3911, 0xff}, ++{0x3912, 0x08}, ++{0x3913, 0x00}, ++{0x3914, 0x00}, ++{0x3915, 0x00}, ++{0x391c, 0x00}, ++{0x3920, 0xff}, ++{0x3921, 0x80}, ++{0x3922, 0x00}, ++{0x3923, 0x00}, ++{0x3924, 0x05}, ++{0x3925, 0x00}, ++{0x3926, 0x00}, ++{0x3927, 0x00}, ++{0x3928, 0x1a}, ++{0x392d, 0x03}, ++{0x392e, 0xa8}, ++{0x392f, 0x08}, ++{0x4001, 0x00}, ++{0x4003, 0x40}, ++{0x4008, 0x04}, ++{0x4009, 0x1b}, ++{0x400c, 0x04}, ++{0x400d, 0x1b}, ++{0x4010, 0xf4}, ++{0x4011, 0x00}, ++{0x4016, 0x00}, ++{0x4017, 0x04}, ++{0x4042, 0x11}, ++{0x4043, 0x70}, ++{0x4045, 0x00}, ++{0x4409, 0x5f}, ++{0x4509, 0x00}, ++{0x450b, 0x00}, ++{0x4600, 0x00}, ++{0x4601, 0xa0}, ++{0x4708, 0x09}, ++{0x470c, 0x81}, ++{0x4710, 0x06}, ++{0x4711, 0x00}, ++{0x4800, 0x00}, ++{0x481f, 0x30}, ++{0x4837, 0x14}, ++{0x4f00, 0x00}, ++{0x4f07, 0x00}, ++{0x4f08, 0x03}, ++{0x4f09, 0x08}, ++{0x4f0c, 0x05}, ++{0x4f0d, 0xb4}, ++{0x4f10, 0x00}, ++{0x4f11, 0x00}, ++{0x4f12, 0x07}, ++{0x4f13, 0xe2}, ++{0x5000, 0x9f}, ++{0x5001, 0x20}, ++{0x5026, 0x00}, ++{0x5c00, 0x00}, ++{0x5c01, 0x2c}, ++{0x5c02, 0x00}, ++{0x5c03, 0x7f}, ++{0x5e00, 0x00}, ++{0x5e01, 0x41}, ++{0x38b1, 0x02}, ++{0x3880, 0x00}, ++ ++#if 1 /* Y8 mode */ ++{0x3016, 0xF1}, ++{0x0100, 0x01}, ++{0x4814, 0x6A}, //; dt_man en, both embed/image data type are 0x2A ++{0x3218, 0x32}, ++{0x3216, 0x01}, ++{0x3208, 0x04}, ++{0x3D81, 0x01}, ++{0x4605, 0x02}, ++{0x4816, 0x0A}, ++{0x3208, 0x14}, ++{0x3662, 0x67}, //; [1] raw8 ++{0x366F, 0x1A}, //; [6] MSB ++//{0x3674, 0x11}, //; [0] embed_en, add embed data before normal image ++{0x3674, 0x10}, //; [0] embed_dis, add embed data before normal image ++{0x3016, 0xF0}, ++#endif ++ ++{0x0100, 0x01}, ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ov490.c b/drivers/media/i2c/soc_camera/imagers/ov490.c +new file mode 100644 +index 0000000..3c47398 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov490.c +@@ -0,0 +1,1051 @@ ++/* ++ * OmniVision ov490-10640 sensor camera driver ++ * ++ * Copyright (C) 2016-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "ov490.h" ++ ++#define OV490_I2C_ADDR 0x24 ++ ++#define OV490_PID_REGA 0x300a ++#define OV490_PID_REGB 0x300b ++#define OV490_PID 0x0490 ++ ++#define OV490_ISP_HSIZE_LOW 0x60 ++#define OV490_ISP_HSIZE_HIGH 0x61 ++#define OV490_ISP_VSIZE_LOW 0x62 ++#define OV490_ISP_VSIZE_HIGH 0x63 ++ ++struct ov490_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int max_width; ++ int max_height; ++ int init_complete; ++ u8 id[6]; ++ int exposure; ++ int gain; ++ int autogain; ++ int red; ++ int green_r; ++ int green_b; ++ int blue; ++ int awb; ++ int dvp_order; ++ int group; ++ /* serializers */ ++ int ser_addr; ++ int des_addr; ++ int reset_gpio; ++ int active_low_resetb; ++}; ++ ++static int conf_link; ++module_param(conf_link, int, 0644); ++MODULE_PARM_DESC(conf_link, " Force configuration link. Used only if robust firmware flashing required (f.e. recovery)"); ++ ++static int group = 0; ++module_param(group, int, 0644); ++MODULE_PARM_DESC(group, " group number (0 - does not apply)"); ++ ++static int dvp_order = 0; ++module_param(dvp_order, int, 0644); ++MODULE_PARM_DESC(dvp_order, " DVP bus bits order"); ++ ++static int reset_gpio = 0; ++module_param(reset_gpio, int, 0644); ++MODULE_PARM_DESC(reset_gpio, " serializer gpio number on imager RESETB"); ++ ++static inline struct ov490_priv *to_ov490(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ov490_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ov490_priv, hdl)->sd; ++} ++ ++static void ov490_reset(struct i2c_client *client) ++{ ++ struct ov490_priv *priv = to_ov490(client); ++ ++ switch (get_des_id(client)) { ++ case MAX9286_ID: ++ case MAX9288_ID: ++ case MAX9296A_ID: ++ case MAX96712_ID: ++ reg8_write_addr(client, priv->ser_addr, 0x0f, (0xfe & ~BIT(priv->reset_gpio))); /* set GPIOn value to reset */ ++ usleep_range(2000, 2500); ++ reg8_write_addr(client, priv->ser_addr, 0x0f, 0xfe | BIT(priv->reset_gpio)); /* set GPIOn value to un-reset */ ++ usleep_range(2000, 2500); ++ break; ++ case UB960_ID: ++ reg8_write_addr(client, get_des_addr(client), 0x6e, 0x8a); /* set GPIO1 value to reset */ ++ usleep_range(2000, 2500); ++ reg8_write_addr(client, get_des_addr(client), 0x6e, 0x9a); /* set GPIO1 value to un-reset */ ++ usleep_range(2000, 2500); ++ break; ++ } ++} ++ ++static int ov490_set_regs(struct i2c_client *client, ++ const struct ov490_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (reg16_write(client, regs[i].reg, regs[i].val)) { ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, regs[i].reg, regs[i].val); ++ } ++ ++ if (regs[i].reg == 0xFFFE) ++ usleep_range(100, 150); /* wait 100 us */ ++ } ++ ++ return 0; ++} ++ ++static u8 ov490_ov10640_read(struct i2c_client *client, u16 addr) ++{ ++ u8 reg_val = 0; ++ ++ reg16_write(client, 0xFFFD, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x5000, 0x01); /* read operation */ ++ reg16_write(client, 0x5001, addr >> 8); ++ reg16_write(client, 0x5002, addr & 0xff); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x00C0, 0xc1); ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(1000, 1500); /* wait 1 ms */ ++ reg16_read(client, 0x5000, ®_val); ++ ++ return reg_val; ++} ++ ++static void ov490_ov10640_write(struct i2c_client *client, u16 addr, u8 val) ++{ ++ reg16_write(client, 0xFFFD, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x5000, 0x00); /* write operation */ ++ reg16_write(client, 0x5001, addr >> 8); ++ reg16_write(client, 0x5002, addr & 0xff); ++ reg16_write(client, 0x5003, val); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x00C0, 0xc1); ++} ++ ++static void ov490_otp_id_read(struct i2c_client *client) ++{ ++ struct ov490_priv *priv = to_ov490(client); ++ int i; ++ int otp_bank0_allzero = 1; ++#if 0 ++ /* read camera id from ov490 OTP memory */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x28); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0xE084, 0x40); /* manual mode, bank#0 */ ++ reg16_write(client, 0xE081, 1); /* start OTP read */ ++ ++ usleep_range(25000, 26000); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i++) ++ reg16_read(client, 0xe000 + i + 4, &priv->id[i]); ++#else ++ /* read camera id from ov10640 OTP memory */ ++ ov490_ov10640_write(client, 0x349C, 1); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i++) { ++ /* first 6 bytes are equal on all ov10640 */ ++ priv->id[i] = ov490_ov10640_read(client, 0x349e + i + 6); ++ if (priv->id[i]) ++ otp_bank0_allzero = 0; ++ } ++ ++ if (otp_bank0_allzero) { ++ ov490_ov10640_write(client, 0x3495, 0x41); /* bank#1 */ ++ ov490_ov10640_write(client, 0x349C, 1); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i++) ++ priv->id[i] = ov490_ov10640_read(client, 0x34ae + i); ++ } ++#endif ++} ++ ++static int ov490_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ov490_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ov490_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ov490_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = MEDIA_BUS_FMT_YUYV8_2X8; ++ ++ return 0; ++} ++ ++static int ov490_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = OV490_PID >> 8; ++ edid->edid[9] = OV490_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ov490_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > priv->max_width) || ++ (rect->top + rect->height > priv->max_height)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int ov490_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ov490_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ov490_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ u8 val = 0; ++ ++ ret = reg16_read(client, (u16)reg->reg, &val); ++ if (ret < 0) ++ return ret; ++ ++ reg->val = val; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int ov490_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ ++ ret = reg16_write(client, (u16)reg->reg, (u8)reg->val); ++ if ((u8)reg->reg == 0xFFFD) ++ usleep_range(100, 150); /* wait 100 us */ ++ if ((u8)reg->reg == 0xFFFE) ++ usleep_range(100, 150); /* wait 100 us */ ++ return ret; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ov490_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ov490_g_register, ++ .s_register = ov490_s_register, ++#endif ++}; ++ ++static int ov490_s_gamma(int a, int ref) ++{ ++ if ((a + ref) > 0xff) ++ return 0xff; ++ ++ if ((a + ref) < 0) ++ return 0; ++ ++ return a + ref; ++} ++ ++static int ov490_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ int ret = -EINVAL; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ /* SDE (rough) brightness */ ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); ++ ret |= reg16_write(client, 0x5001, ctrl->val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xf1); ++ break; ++ case V4L2_CID_CONTRAST: ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xfd); ++ break; ++ case V4L2_CID_SATURATION: ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xf3); ++ break; ++ case V4L2_CID_HUE: ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xf5); ++ break; ++ case V4L2_CID_GAMMA: ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ov490_s_gamma(ctrl->val, 0x12)); ++ ret |= reg16_write(client, 0x5001, ov490_s_gamma(ctrl->val, 0x20)); ++ ret |= reg16_write(client, 0x5002, ov490_s_gamma(ctrl->val, 0x3b)); ++ ret |= reg16_write(client, 0x5003, ov490_s_gamma(ctrl->val, 0x5d)); ++ ret |= reg16_write(client, 0x5004, ov490_s_gamma(ctrl->val, 0x6a)); ++ ret |= reg16_write(client, 0x5005, ov490_s_gamma(ctrl->val, 0x76)); ++ ret |= reg16_write(client, 0x5006, ov490_s_gamma(ctrl->val, 0x81)); ++ ret |= reg16_write(client, 0x5007, ov490_s_gamma(ctrl->val, 0x8b)); ++ ret |= reg16_write(client, 0x5008, ov490_s_gamma(ctrl->val, 0x96)); ++ ret |= reg16_write(client, 0x5009, ov490_s_gamma(ctrl->val, 0x9e)); ++ ret |= reg16_write(client, 0x500a, ov490_s_gamma(ctrl->val, 0xae)); ++ ret |= reg16_write(client, 0x500b, ov490_s_gamma(ctrl->val, 0xbc)); ++ ret |= reg16_write(client, 0x500c, ov490_s_gamma(ctrl->val, 0xcf)); ++ ret |= reg16_write(client, 0x500d, ov490_s_gamma(ctrl->val, 0xde)); ++ ret |= reg16_write(client, 0x500e, ov490_s_gamma(ctrl->val, 0xec)); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xf9); ++ break; ++ case V4L2_CID_SHARPNESS: ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xfb); ++ break; ++ case V4L2_CID_AUTOGAIN: ++ case V4L2_CID_GAIN: ++ case V4L2_CID_EXPOSURE: ++ if (ctrl->id == V4L2_CID_AUTOGAIN) ++ priv->autogain = ctrl->val; ++ if (ctrl->id == V4L2_CID_GAIN) ++ priv->gain = ctrl->val; ++ if (ctrl->id == V4L2_CID_EXPOSURE) ++ priv->exposure = ctrl->val; ++ ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, !priv->autogain); ++ ret |= reg16_write(client, 0x5001, priv->exposure >> 8); ++ ret |= reg16_write(client, 0x5002, priv->exposure & 0xff); ++ ret |= reg16_write(client, 0x5003, priv->exposure >> 8); ++ ret |= reg16_write(client, 0x5004, priv->exposure & 0xff); ++ ret |= reg16_write(client, 0x5005, priv->exposure >> 8); ++ ret |= reg16_write(client, 0x5006, priv->exposure & 0xff); ++ ret |= reg16_write(client, 0x5007, priv->gain >> 8); ++ ret |= reg16_write(client, 0x5008, priv->gain & 0xff); ++ ret |= reg16_write(client, 0x5009, priv->gain >> 8); ++ ret |= reg16_write(client, 0x500a, priv->gain & 0xff); ++ ret |= reg16_write(client, 0x500b, priv->gain >> 8); ++ ret |= reg16_write(client, 0x500c, priv->gain & 0xff); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xea); ++ break; ++ case V4L2_CID_AUTO_WHITE_BALANCE: ++ case V4L2_CID_RED_BALANCE: ++ case V4L2_CID_BLUE_BALANCE: ++ if (ctrl->id == V4L2_CID_AUTO_WHITE_BALANCE) ++ priv->awb = ctrl->val; ++ if (ctrl->id == V4L2_CID_RED_BALANCE) { ++ priv->red = ctrl->val; ++ priv->red <<= 8; ++ priv->green_r = priv->red / 2; ++ } ++ if (ctrl->id == V4L2_CID_BLUE_BALANCE) { ++ priv->blue = ctrl->val; ++ priv->blue <<= 8; ++ priv->green_b = priv->blue / 2; ++ } ++ ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, !priv->awb); ++ ret |= reg16_write(client, 0x5001, priv->red >> 8); ++ ret |= reg16_write(client, 0x5002, priv->red & 0xff); ++ ret |= reg16_write(client, 0x5003, priv->green_r >> 8); ++ ret |= reg16_write(client, 0x5004, priv->green_r & 0xff); ++ ret |= reg16_write(client, 0x5005, priv->green_b >> 8); ++ ret |= reg16_write(client, 0x5006, priv->green_b & 0xff); ++ ret |= reg16_write(client, 0x5007, priv->blue >> 8); ++ ret |= reg16_write(client, 0x5008, priv->blue & 0xff); ++ ret |= reg16_write(client, 0x5009, priv->red >> 8); ++ ret |= reg16_write(client, 0x500a, priv->red & 0xff); ++ ret |= reg16_write(client, 0x500b, priv->green_r >> 8); ++ ret |= reg16_write(client, 0x500c, priv->green_r & 0xff); ++ ret |= reg16_write(client, 0x500d, priv->green_b >> 8); ++ ret |= reg16_write(client, 0x500e, priv->green_b & 0xff); ++ ret |= reg16_write(client, 0x500f, priv->blue >> 8); ++ ret |= reg16_write(client, 0x5010, priv->blue & 0xff); ++ ret |= reg16_write(client, 0x5011, priv->red >> 8); ++ ret |= reg16_write(client, 0x5012, priv->red & 0xff); ++ ret |= reg16_write(client, 0x5013, priv->green_r >> 8); ++ ret |= reg16_write(client, 0x5014, priv->green_r & 0xff); ++ ret |= reg16_write(client, 0x5015, priv->green_b >> 8); ++ ret |= reg16_write(client, 0x5016, priv->green_b & 0xff); ++ ret |= reg16_write(client, 0x5017, priv->blue >> 8); ++ ret |= reg16_write(client, 0x5018, priv->blue & 0xff); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xeb); ++ break; ++ case V4L2_CID_HFLIP: ++#if 1 ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0x5001, 0x00); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xdc); ++#else ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3128 ++ ret |= reg16_write(client, 0x5001, 0x31); ++ ret |= reg16_write(client, 0x5002, 0x28); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 0); ++ val |= (ctrl->val << 0); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3128 ++ ret |= reg16_write(client, 0x5001, 0x31); ++ ret |= reg16_write(client, 0x5002, 0x28); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3291 ++ ret |= reg16_write(client, 0x5001, 0x32); ++ ret |= reg16_write(client, 0x5002, 0x91); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 1); ++ val |= (ctrl->val << 1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3291 ++ ret |= reg16_write(client, 0x5001, 0x32); ++ ret |= reg16_write(client, 0x5002, 0x91); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3090 ++ ret |= reg16_write(client, 0x5001, 0x30); ++ ret |= reg16_write(client, 0x5002, 0x90); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 2); ++ val |= (ctrl->val << 2); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3090 ++ ret |= reg16_write(client, 0x5001, 0x30); ++ ret |= reg16_write(client, 0x5002, 0x90); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++#endif ++ break; ++ case V4L2_CID_VFLIP: ++#if 1 ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, ctrl->val); ++ ret |= reg16_write(client, 0x5001, 0x01); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xdc); ++#else ++ ret = reg16_write(client, 0xFFFD, 0x80); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3128 ++ ret |= reg16_write(client, 0x5001, 0x31); ++ ret |= reg16_write(client, 0x5002, 0x28); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 1); ++ val |= (ctrl->val << 1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3128 ++ ret |= reg16_write(client, 0x5001, 0x31); ++ ret |= reg16_write(client, 0x5002, 0x28); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3291 ++ ret |= reg16_write(client, 0x5001, 0x32); ++ ret |= reg16_write(client, 0x5002, 0x91); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 2); ++ val |= (ctrl->val << 2); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3291 ++ ret |= reg16_write(client, 0x5001, 0x32); ++ ret |= reg16_write(client, 0x5002, 0x91); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x01); // read 0x3090 ++ ret |= reg16_write(client, 0x5001, 0x30); ++ ret |= reg16_write(client, 0x5002, 0x90); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_read(client, 0x5000, &val); ++ val &= ~(0x1 << 3); ++ val |= (ctrl->val << 3); ++ ret |= reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x5000, 0x00); // write 0x3090 ++ ret |= reg16_write(client, 0x5001, 0x30); ++ ret |= reg16_write(client, 0x5002, 0x90); ++ ret |= reg16_write(client, 0x5003, val); ++ ret |= reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ ret |= reg16_write(client, 0x00C0, 0xc1); ++#endif ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ov490_ctrl_ops = { ++ .s_ctrl = ov490_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ov490_video_ops = { ++ .s_stream = ov490_s_stream, ++ .g_mbus_config = ov490_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ov490_subdev_pad_ops = { ++ .get_edid = ov490_get_edid, ++ .enum_mbus_code = ov490_enum_mbus_code, ++ .get_selection = ov490_get_selection, ++ .set_selection = ov490_set_selection, ++ .get_fmt = ov490_get_fmt, ++ .set_fmt = ov490_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ov490_subdev_ops = { ++ .core = &ov490_core_ops, ++ .video = &ov490_video_ops, ++ .pad = &ov490_subdev_pad_ops, ++}; ++ ++static ssize_t ov490_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ov490_priv *priv = to_ov490(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ov490, S_IRUGO, ov490_otp_id_show, NULL); ++ ++static int ov490_initialize(struct i2c_client *client) ++{ ++ struct ov490_priv *priv = to_ov490(client); ++ u8 val = 0; ++ u16 pid = 0; ++ int timeout, retry_timeout = 3; ++ ++ setup_i2c_translator(client, priv->ser_addr, OV490_I2C_ADDR, MODE_GMSL1); ++ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_read(client, OV490_PID_REGA, &val); ++ pid = val; ++ reg16_read(client, OV490_PID_REGB, &val); ++ pid = (pid << 8) | val; ++ ++ if (pid != OV490_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ if (unlikely(conf_link)) ++ goto out; ++again: ++ /* Check if firmware booted by reading stream-on status */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x29); ++ usleep_range(100, 150); /* wait 100 us */ ++ for (timeout = 300; timeout > 0; timeout--) { ++ reg16_read(client, 0xd000, &val); ++ if (val == 0x0c) ++ break; ++ mdelay(1); ++ } ++ ++ /* wait firmware apps started by reading OV10640 ID */ ++ for (;timeout > 0; timeout--) { ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x5000, 0x01); ++ reg16_write(client, 0x5001, 0x30); ++ reg16_write(client, 0x5002, 0x0a); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0xC0, 0xc1); ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(1000, 1500); /* wait 1 ms */ ++ reg16_read(client, 0x5000, &val); ++ if (val == 0xa6) ++ break; ++ mdelay(1); ++ } ++ ++ if (!timeout) { ++ dev_err(&client->dev, "Timeout firmware boot wait, retrying\n"); ++ /* reset OV10640 using RESETB pin controlled by OV490 GPIO0 */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x0050, 0x01); ++ reg16_write(client, 0x0054, 0x01); ++ reg16_write(client, 0x0058, 0x00); ++ mdelay(10); ++ reg16_write(client, 0x0058, 0x01); ++ /* reset OV490 using RESETB pin controlled by serializer */ ++ ov490_reset(client); ++ if (retry_timeout--) ++ goto again; ++ } ++ ++ if (priv->group) { ++ /* switch to group# */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x19); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x5000, priv->group); ++ reg16_write(client, 0xFFFE, 0x80); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0xc0, 0x3f); ++ ++ mdelay(30); ++ } ++ ++ /* read resolution used by current firmware */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x82); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_read(client, OV490_ISP_HSIZE_HIGH, &val); ++ priv->max_width = val; ++ reg16_read(client, OV490_ISP_HSIZE_LOW, &val); ++ priv->max_width = (priv->max_width << 8) | val; ++ reg16_read(client, OV490_ISP_VSIZE_HIGH, &val); ++ priv->max_height = val; ++ reg16_read(client, OV490_ISP_VSIZE_LOW, &val); ++ priv->max_height = (priv->max_height << 8) | val; ++ /* Program wizard registers */ ++ ov490_set_regs(client, ov490_regs_wizard, ARRAY_SIZE(ov490_regs_wizard)); ++ /* Set DVP bit swap */ ++ reg16_write(client, 0xFFFD, 0x80); ++ reg16_write(client, 0xFFFE, 0x28); ++ usleep_range(100, 150); /* wait 100 us */ ++ reg16_write(client, 0x6009, priv->dvp_order << 4); ++ /* Read OTP IDs */ ++ ov490_otp_id_read(client); ++ ++out: ++ dev_info(&client->dev, "ov490-10640 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id ov490_id[] = { ++ { "ov490", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ov490_id); ++ ++static const struct of_device_id ov490_of_ids[] = { ++ { .compatible = "ovti,ov490", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ov490_of_ids); ++ ++static int ov490_parse_dt(struct device_node *np, struct ov490_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ if (of_property_read_u32(np, "dvp-order", &priv->dvp_order)) ++ priv->dvp_order = 0; ++ if (of_property_read_u32(np, "reset-gpio", &priv->reset_gpio)) ++ priv->reset_gpio = 1; ++ if (of_property_read_u32(np, "group", &priv->group)) ++ priv->group = 0; ++ ++ /* module params override dts */ ++ if (dvp_order) ++ priv->dvp_order = dvp_order; ++ if (group) ++ priv->group = group; ++ ++ return 0; ++} ++ ++static int ov490_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ov490_priv *priv; ++ struct v4l2_ctrl *ctrl; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ov490_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ priv->exposure = 0x100; ++ priv->gain = 0x100; ++ priv->autogain = 1; ++ priv->red = 0x400; ++ priv->blue = 0x400; ++ priv->green_r = priv->red / 2; ++ priv->green_b = priv->blue / 2; ++ priv->awb = 1; ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_GAIN, 0, 0xffff, 1, priv->gain); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0xffff, 1, priv->exposure); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_RED_BALANCE, 2, 0xf, 1, priv->red >> 8); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_BLUE_BALANCE, 2, 0xf, 1, priv->blue >> 8); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 1); ++ v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov490_ctrl_ops, ++ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 9); ++ if (ctrl) ++ ctrl->flags &= ~V4L2_CTRL_FLAG_READ_ONLY; ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ov490_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ov490_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = priv->max_width; ++ priv->rect.height = priv->max_height; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ov490) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ov490_remove(struct i2c_client *client) ++{ ++ struct ov490_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ov490); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ov490_i2c_driver = { ++ .driver = { ++ .name = "ov490", ++ .of_match_table = ov490_of_ids, ++ }, ++ .probe = ov490_probe, ++ .remove = ov490_remove, ++ .id_table = ov490_id, ++}; ++ ++module_i2c_driver(ov490_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for OV490"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov490.h b/drivers/media/i2c/soc_camera/imagers/ov490.h +new file mode 100644 +index 0000000..6c39bdd +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ov490.h +@@ -0,0 +1,102 @@ ++/* ++ * OmniVision ov490-ov10640 sensor camera wizard 1280x1080@30/UYVY/BT601/8bit ++ * ++ * Copyright (C) 2016-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define OV490_DISPLAY_PATTERN ++ ++struct ov490_reg { ++ u16 reg; ++ u8 val; ++}; ++ ++static const struct ov490_reg ov490_regs_wizard[] = { ++/* The following registers should match firmware */ ++{0xfffd, 0x80}, ++{0xfffe, 0x82}, ++{0x0071, 0x11}, ++{0x0075, 0x11}, ++{0xfffe, 0x29}, ++{0x6010, 0x01}, ++/* ov490 EMB line disable in YUV and RAW data, NOTE: EMB line is still used in ISP and sensor */ ++{0xe000, 0x14}, ++#if 0 /* do not disable EMB line in ISP! */ ++{0x4017, 0x00}, ++#endif ++{0xfffe, 0x28}, ++{0x6000, 0x04}, ++{0x6004, 0x00}, ++//{0x6008, 0x000}, // PCLK polarity - useless due to silicon bug -> use 0x808000bb register ++{0x6008, 0x02}, // PCLK polarity - useless due to silicon bug -> use 0x808000bb register ++{0xfffe, 0x80}, ++{0x0091, 0x00}, ++{0x00bb, 0x1d}, // bit[3]=0 - PCLK polarity workaround ++/* ov10640 EMB line disable */ ++#if 0 /* do not disable EMB line in sensor! */ ++{0xfffe, 0x19}, ++{0x5000, 0x00}, ++{0x5001, 0x30}, ++{0x5002, 0x91}, ++{0x5003, 0x08}, ++{0xfffe, 0x80}, ++{0x00c0, 0xc1}, ++#endif ++/* Ov490 FSIN: app_fsin_from_fsync */ ++{0xfffe, 0x85}, ++{0x0008, 0x00}, ++{0x0009, 0x01}, ++{0x000A, 0x05}, // fsin0 src ++{0x000B, 0x00}, ++{0x0030, 0x02}, // fsin0_delay ++{0x0031, 0x00}, ++{0x0032, 0x00}, ++{0x0033, 0x00}, ++{0x0038, 0x02}, // fsin1_delay ++{0x0039, 0x00}, ++{0x003A, 0x00}, ++{0x003B, 0x00}, ++{0x0070, 0x2C}, // fsin0_length ++{0x0071, 0x01}, ++{0x0072, 0x00}, ++{0x0073, 0x00}, ++{0x0074, 0x64}, // fsin1_length ++{0x0075, 0x00}, ++{0x0076, 0x00}, ++{0x0077, 0x00}, ++{0x0000, 0x14}, ++{0x0001, 0x00}, ++{0x0002, 0x00}, ++{0x0003, 0x00}, ++{0x0004, 0x32}, // load fsin0,load fsin1,load other, it will be cleared automatically. ++{0x0005, 0x00}, ++{0x0006, 0x00}, ++{0x0007, 0x00}, ++{0xfffe, 0x80}, ++{0x0081, 0x00}, // 03;SENSOR FSIN ++/* ov10640 FSIN */ ++{0xfffe, 0x19}, ++{0x5000, 0x00}, ++{0x5001, 0x30}, ++{0x5002, 0x8c}, ++{0x5003, 0xb2}, ++{0xfffe, 0x80}, ++{0x00c0, 0xc1}, ++/* ov10640 HFLIP=1 by default */ ++{0xfffe, 0x19}, ++{0x5000, 0x01}, ++{0x5001, 0x00}, ++{0xfffe, 0x80}, ++{0x00c0, 0xdc}, ++#ifdef OV490_DISPLAY_PATTERN ++{0xfffe, 0x19}, ++{0x5000, 0x02}, ++{0xfffe, 0x80}, ++{0x00c0, 0xd6}, ++#endif ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0497-media-i2c-soc_camera-rcar_csi2-adjust-debugging.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0497-media-i2c-soc_camera-rcar_csi2-adjust-debugging.patch new file mode 100644 index 00000000..89bf7716 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0497-media-i2c-soc_camera-rcar_csi2-adjust-debugging.patch @@ -0,0 +1,165 @@ +From ae9686ecfbdb0af61975e1f501d83f9a488e2e7b Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 11:25:19 +0300 +Subject: [PATCH] media: i2c: soc_camera: rcar_csi2: adjust debugging + +This extends MIPI packets debugging. +This adds possibility to enable debuuggin runtime via sysfs + +Signed-off-by: Andrey Gusakov +Signed-off-by: Vladimir Barinov +--- + drivers/media/platform/soc_camera/rcar_csi2.c | 84 ++++++++++++++++++++++----- + 1 file changed, 69 insertions(+), 15 deletions(-) + +diff --git a/drivers/media/platform/soc_camera/rcar_csi2.c b/drivers/media/platform/soc_camera/rcar_csi2.c +index ca47ba3..1f1beb8 100644 +--- a/drivers/media/platform/soc_camera/rcar_csi2.c ++++ b/drivers/media/platform/soc_camera/rcar_csi2.c +@@ -293,10 +293,10 @@ MODULE_PARM_DESC(dump, " Dump CSI packets (default: disabled)"); + #define RCAR_CSI2_CRCECM 0x150 + #define RCAR_CSI2_LCNT(i) (0x160 + i * 0x04) + #define RCAR_CSI2_LCNTM(i) (0x168 + i * 0x04) +-#define RCAR_CSI2_FCNTM 0x170 +-#define RCAR_CSI2_FCNTM2 0x174 ++#define RCAR_CSI2_FCNTM(i) (0x170 + i * 0x04) + #define RCAR_CSI2_VINSM(i) (0x190 + i * 0x04) + #define RCAR_CSI2_PHM(i) (0x1C0 + i * 0x04) ++#define RCAR_CSI2_PPM(i) (0x1E0 + i * 0x04) + + #define RCAR_CSI2_INTSTATE_ALL 0x3FFFFCDD + +@@ -309,8 +309,28 @@ static void rcar_sci2_debug_show(struct rcar_csi2 *priv) + return; + + dev_info(&priv->pdev->dev, "Debug registers:\n"); +- printk("FCNTM : 0x%08x\n", ioread32(priv->base + RCAR_CSI2_FCNTM)); +- printk("FCNTM2: 0x%08x\n", ioread32(priv->base + RCAR_CSI2_FCNTM2)); ++ for (i = 0; i < 2; i++) { ++ reg0 = ioread32(priv->base + RCAR_CSI2_FCNTM(i)); ++ ++ printk("FCNTM%d: 0x%08x: " ++ "Ch%d: %d, Ch%d: %d\n", ++ i + 1, reg0, ++ i * 2, (reg0 >> 0) & 0xffff, i * 2 + 1, (reg0 >> 16) & 0xffff); ++ } ++ for (i = 0; i < 2; i++) { ++ reg0 = ioread32(priv->base + RCAR_CSI2_LCNTM(i)); ++ ++ printk("LCNTM%d: 0x%08x: " ++ "Ch%d: %d, Ch%d: %d\n", ++ i + 1, reg0, ++ i * 2, (reg0 >> 0) & 0xffff, i * 2 + 1, (reg0 >> 16) & 0xffff); ++ } ++ for (i = 0; i < 2; i++) { ++ reg0 = ioread32(priv->base + RCAR_CSI2_LCNT(i)); ++ ++ printk("LCNT%d: 0x%04x, 0x%04x\n", ++ i + 1, (reg0 >> 0) & 0xffff, (reg0 >> 16)); ++ } + + for (i = 0; i < 4; i++) { + reg0 = ioread32(priv->base + RCAR_CSI2_PHxM0(i)); +@@ -324,7 +344,7 @@ static void rcar_sci2_debug_show(struct rcar_csi2 *priv) + for (i = 0; i < 3; i++) { + reg0 = ioread32(priv->base + RCAR_CSI2_PHRM(i)); + +- printk("Packet header R %d dt: 0x%02x, vc: %d, wc: %d, ecc: 0x%02x\n", ++ printk("Packet Header R Monitor Register %d dt: 0x%02x, vc: %d, wc: %d, ecc: 0x%02x\n", + i, + reg0 & 0x3F, (reg0 >> 6) & 0x03, (reg0 >> 8) & 0xffff, + (reg0 >> 24) & 0xff); +@@ -332,21 +352,36 @@ static void rcar_sci2_debug_show(struct rcar_csi2 *priv) + for (i = 0; i < 2; i++) { + reg0 = ioread32(priv->base + RCAR_CSI2_PHCM(i)); + +- printk("Packet header C %d: dt: 0x%02x, vc: %d, wc: %d, cal_parity: 0x%02x\n", ++ printk("Packet Header C Monitor Register %d: dt: 0x%02x, vc: %d, wc: %d, cal_parity: 0x%02x\n", + i, + reg0 & 0x3F, (reg0 >> 6) & 0x03, (reg0 >> 8) & 0xffff, + (reg0 >> 24) & 0xff); + } + for (i = 0; i < 8; i++) { + reg0 = ioread32(priv->base + RCAR_CSI2_PHM(i)); ++ reg1 = ioread32(priv->base + RCAR_CSI2_PPM(i)); + +- printk("Packet header Monitor %d: dt: 0x%02x, vc: %d, wc: %d, ecc: 0x%02x\n", +- i + 1, ++ printk("Packet Header Monitor Register %d: dt: 0x%02x, vc: %d, wc: %d, ecc: 0x%02x (period = 0x%08x)\n", ++ i, + reg0 & 0x3F, (reg0 >> 6) & 0x03, (reg0 >> 8) & 0xffff, +- (reg0 >> 24) & 0xff); ++ (reg0 >> 24) & 0xff, ++ reg1); + } +- for (i = 0; i < 3; i++) +- printk("VINSM%d: 0x%08x\n", i, ioread32(priv->base + RCAR_CSI2_VINSM(i))); ++ for (i = 0; i < 2; i++) { ++ reg0 = ioread32(priv->base + RCAR_CSI2_VINSM(i)); ++ ++ printk("VINSM%d: 0x%08x: " ++ "HD%d: %d, VD%d: %d, HD%d: %d, VD%d: %d\n", ++ i, reg0, ++ 2 * i, (reg0 >> 0) & 0x0fff, 2* i, (reg0 >> 12) & 0x000f, ++ 2 * i + 1, (reg0 >> 16) & 0x0fff, 2 * i + 1, (reg0 >> 28) & 0x000f); ++ } ++ reg0 = ioread32(priv->base + RCAR_CSI2_VINSM(2)); ++ printk("VINSM3: 0x%08x: " ++ "PE: %d, PEB: %x, FLD: %x, TAG: %x, ERRC: %x, ERRE: %x\n", ++ reg0, ++ (reg0 >> 0) & 0x01, (reg0 >> 4) & 0x0f, (reg0 >> 8) & 0x0f, (reg0 >> 10) & 0x03, ++ (reg0 >> 14) & 0x01, (reg0 >> 15) & 0x01); + printk("SERCCNT: %d\n", + ioread32(priv->base + RCAR_CSI2_SERCCNT)); + printk("SSERCCNT: %d\n", +@@ -357,10 +392,6 @@ static void rcar_sci2_debug_show(struct rcar_csi2 *priv) + ioread32(priv->base + RCAR_CSI2_ECECM)); + printk("CRCECM: %d\n", + ioread32(priv->base + RCAR_CSI2_CRCECM)); +- for (i = 0; i < 2; i++) +- printk("LCNT%d: 0x%08x\n", i, ioread32(priv->base + RCAR_CSI2_LCNT(i))); +- for (i = 0; i < 2; i++) +- printk("LCNTM%d: 0x%08x\n", i, ioread32(priv->base + RCAR_CSI2_LCNTM(i))); + } + + static int rcar_csi2_set_phy_freq(struct rcar_csi2 *priv) +@@ -669,6 +700,26 @@ static struct v4l2_subdev_ops rcar_csi2_subdev_ops = { + .core = &rcar_csi2_subdev_core_ops, + }; + ++static ssize_t rcar_csi2_dump_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, size_t count) ++{ ++ u32 val; ++ ++ if (sscanf(buf, "%u\n", &val) != 1) ++ return -EINVAL; ++ dump = !!val; ++ ++ return count; ++} ++ ++static ssize_t rcar_csi2_dump_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return snprintf(buf, 4, "%d\n", dump); ++} ++ ++static DEVICE_ATTR(dump, S_IRUGO|S_IWUSR, rcar_csi2_dump_show, rcar_csi2_dump_store); ++ + #ifdef CONFIG_OF + static const struct of_device_id rcar_csi2_of_table[] = { + { .compatible = "renesas,r8a77980-csi2", .data = (void *)RCAR_GEN3 }, +@@ -832,6 +883,9 @@ static int rcar_csi2_probe(struct platform_device *pdev) + + pm_runtime_enable(&pdev->dev); + ++ if (device_create_file(&pdev->dev, &dev_attr_dump) != 0) ++ dev_err(&pdev->dev, "sysfs dump entry creation failed\n"); ++ + dev_dbg(&pdev->dev, "CSI2 probed.\n"); + + return 0; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0498-media-platform-soc_camera-rcar_vin-add-max96712-max9.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0498-media-platform-soc_camera-rcar_vin-add-max96712-max9.patch new file mode 100644 index 00000000..b95f9cc6 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0498-media-platform-soc_camera-rcar_vin-add-max96712-max9.patch @@ -0,0 +1,135 @@ +From a7032bf42a9e8452ac2bc01a5bed0775ce80d4b3 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 11:33:26 +0300 +Subject: [PATCH] media: platform: soc_camera: rcar_vin: add max96712, max9296 + +This adds MAX96712 and MAX9296 deserializers in VIN binding + +Signed-off-by: Andrey Gusakov +Signed-off-by: Vladimir Barinov +--- + drivers/media/platform/soc_camera/rcar_vin.c | 75 ++++++++++------------------ + 1 file changed, 27 insertions(+), 48 deletions(-) + +diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c +index 93bc1e4..564c371 100644 +--- a/drivers/media/platform/soc_camera/rcar_vin.c ++++ b/drivers/media/platform/soc_camera/rcar_vin.c +@@ -880,6 +880,14 @@ enum rcar_vin_state { + STOPPING, + }; + ++static const char *deser_names[] = { ++ "max9286", ++ "ti9x4", ++ "max9288", ++ "max9296", ++ "max96712" ++}; ++ + struct rcar_vin_async_client { + struct v4l2_async_subdev *sensor; + struct v4l2_async_notifier notifier; +@@ -1571,23 +1579,15 @@ static struct v4l2_subdev *find_csi2(struct rcar_vin_priv *pcdev) + + static struct v4l2_subdev *find_deser(struct rcar_vin_priv *pcdev) + { ++ int i; + struct v4l2_subdev *sd; +- char name[] = "max9286"; +- char name2[] = "ti9x4"; +- char name3[] = "max9288"; + + v4l2_device_for_each_subdev(sd, &pcdev->ici.v4l2_dev) { +- if (!strncmp(name, sd->name, sizeof(name) - 1)) { +- pcdev->deser_sd = sd; +- return sd; +- } +- if (!strncmp(name2, sd->name, sizeof(name2) - 1)) { +- pcdev->deser_sd = sd; +- return sd; +- } +- if (!strncmp(name3, sd->name, sizeof(name3) - 1)) { +- pcdev->deser_sd = sd; +- return sd; ++ for (i = 0; i < ARRAY_SIZE(deser_names); i++) { ++ if (!strncmp(deser_names[i], sd->name, strlen(deser_names[i]))) { ++ pcdev->deser_sd = sd; ++ return sd; ++ } + } + } + +@@ -3054,13 +3054,11 @@ static int rcar_vin_probe(struct platform_device *pdev) + unsigned int pdata_flags; + int irq, ret; + const char *str; +- unsigned int i; ++ unsigned int i, j; + struct device_node *epn = NULL, *ren = NULL; +- struct device_node *csi2_ren = NULL, *max9286_ren = NULL, *ti9x4_ren = NULL, *max9288_ren = NULL; ++ struct device_node *csi2_ren = NULL; ++ struct device_node *deser_ren[ARRAY_SIZE(deser_names)] = {NULL}; + bool csi_use = false; +- bool max9286_use = false; +- bool ti9x4_use = false; +- bool max9288_use = false; + + match = of_match_device(of_match_ptr(rcar_vin_of_table), &pdev->dev); + +@@ -3092,19 +3090,10 @@ static int rcar_vin_probe(struct platform_device *pdev) + csi_use = true; + } + +- if (strcmp(ren->parent->name, "max9286") == 0) { +- max9286_ren = of_parse_phandle(epn, "remote-endpoint", 0); +- max9286_use = true; +- } +- +- if (strcmp(ren->parent->name, "ti9x4") == 0) { +- ti9x4_ren = of_parse_phandle(epn, "remote-endpoint", 0); +- ti9x4_use = true; +- } +- +- if (strcmp(ren->parent->name, "max9288") == 0) { +- max9288_ren = of_parse_phandle(epn, "remote-endpoint", 0); +- max9288_use = true; ++ for (j = 0; j < ARRAY_SIZE(deser_names); j++) { ++ if (strcmp(ren->parent->name, deser_names[j]) == 0) { ++ deser_ren[j] = of_parse_phandle(epn, "remote-endpoint", 0); ++ } + } + + of_node_put(ren); +@@ -3372,22 +3361,12 @@ static int rcar_vin_probe(struct platform_device *pdev) + goto cleanup; + } + +- if (max9286_use) { +- ret = rcar_vin_soc_of_bind(priv, &priv->ici, epn, max9286_ren); +- if (ret) +- goto cleanup; +- } +- +- if (ti9x4_use) { +- ret = rcar_vin_soc_of_bind(priv, &priv->ici, epn, ti9x4_ren); +- if (ret) +- goto cleanup; +- } +- +- if (max9288_use) { +- ret = rcar_vin_soc_of_bind(priv, &priv->ici, epn, max9288_ren); +- if (ret) +- goto cleanup; ++ for (j = 0; j < ARRAY_SIZE(deser_names); j++) { ++ if (deser_ren[j]) { ++ ret = rcar_vin_soc_of_bind(priv, &priv->ici, epn, deser_ren[j]); ++ if (ret) ++ goto cleanup; ++ } + } + + vin_debug = 0; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0499-regulator-add-MAX2008X-camera-protector.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0499-regulator-add-MAX2008X-camera-protector.patch new file mode 100644 index 00000000..6e1a3e8f --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0499-regulator-add-MAX2008X-camera-protector.patch @@ -0,0 +1,579 @@ +From 7cbcf44f887641e2d15b9b15c5aadd1850bc63ed Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 11:51:14 +0300 +Subject: [PATCH] regulator: add MAX2008X camera protector + +This adds MAX20086-MAX20089 camera protector regulator + +Signed-off-by: Andrey Gusakov +--- + drivers/regulator/Kconfig | 6 + + drivers/regulator/Makefile | 1 + + drivers/regulator/max2008x-regulator.c | 526 +++++++++++++++++++++++++++++++++ + 3 files changed, 533 insertions(+) + create mode 100644 drivers/regulator/max2008x-regulator.c + +diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig +index 0fd6195..2ff9b57 100644 +--- a/drivers/regulator/Kconfig ++++ b/drivers/regulator/Kconfig +@@ -495,6 +495,12 @@ config REGULATOR_MAX8998 + via I2C bus. The provided regulator is suitable for S3C6410 + and S5PC1XX chips to control VCC_CORE and VCC_USIM voltages. + ++config REGULATOR_MAX2008X ++ tristate "Maxim 20086-20089 Dual/Quad Camera Power Protector reguator" ++ help ++ This driver controls MAX20086-MAX20089 dual/quad camera power ++ protector IC. ++ + config REGULATOR_MAX77686 + tristate "Maxim 77686 regulator" + depends on MFD_MAX77686 +diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile +index 80ffc57..eb05d35 100644 +--- a/drivers/regulator/Makefile ++++ b/drivers/regulator/Makefile +@@ -65,6 +65,7 @@ obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o + obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o + obj-$(CONFIG_REGULATOR_MAX8997) += max8997-regulator.o + obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o ++obj-$(CONFIG_REGULATOR_MAX2008X) += max2008x-regulator.o + obj-$(CONFIG_REGULATOR_MAX77686) += max77686-regulator.o + obj-$(CONFIG_REGULATOR_MAX77693) += max77693-regulator.o + obj-$(CONFIG_REGULATOR_MAX77802) += max77802-regulator.o +diff --git a/drivers/regulator/max2008x-regulator.c b/drivers/regulator/max2008x-regulator.c +new file mode 100644 +index 0000000..70f9fb3 +--- /dev/null ++++ b/drivers/regulator/max2008x-regulator.c +@@ -0,0 +1,526 @@ ++/* ++ * gpio-regulator.c ++ * ++ * Copyright 2019 Andrey Gusakov ++ * ++ * based on gpio-regulator.c ++ * ++ * Copyright 2011 Heiko Stuebner ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This is useful for systems with mixed controllable and ++ * non-controllable regulators, as well as for allowing testing on ++ * systems with no controllable regulators. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Register definitions */ ++#define REG_MASK 0x00 ++#define REG_CONFIG 0x01 ++#define REG_ID 0x02 ++#define REG_STAT1 0x03 ++/* 16 bit register: 0x04 + 0x05 */ ++#define REG_STAT2 0x04 ++/* ADC1..ADC4 */ ++#define REG_ADC(n) (0x06 + ((n) & 0x03)) ++ ++#define REG_CONFIG_ADC_MUX_CUR 0x00 ++#define REG_CONFIG_ADC_MUX_VOUT 0x40 ++#define REG_CONFIG_ADC_MUX_MISC 0x80 ++#define REG_CONFIG_ADC_MUX_MASK 0xc0 ++ ++struct max2008x_regulator_data { ++ int id; ++ const char *name; ++ struct regulator_init_data *init_data; ++ struct device_node *of_node; ++}; ++ ++struct max2008x_data { ++ struct regmap *regmap; ++ struct max2008x_regulator_data *regulators; ++ struct iio_dev *iio_dev; ++ ++ unsigned char id; ++ unsigned char rev; ++ unsigned char num_regulators; ++ ++ unsigned char adc_mux; ++}; ++ ++static int max2008x_set_adc_mux(struct max2008x_data *max, int mux) ++{ ++ int ret; ++ unsigned int reg; ++ ++ mux = mux & REG_CONFIG_ADC_MUX_MASK; ++ if (mux > REG_CONFIG_ADC_MUX_MISC) ++ return -EINVAL; ++ ++ /* do we need this? or we can relay on regmap? */ ++ if (mux == max->adc_mux) ++ return 0; ++ ++ ret = regmap_write_bits(max->regmap, REG_CONFIG, ++ REG_CONFIG_ADC_MUX_MASK, mux); ++ if (ret) ++ return ret; ++ ++ max->adc_mux = mux; ++ ++ /* Read ADC1 register to clear ACC bit in STAT1 register */ ++ ret = regmap_read(max->regmap, REG_ADC(0), ®); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int max2008x_read_adc(struct max2008x_data *max, int channel, int *value) ++{ ++ int ret; ++ int timeout = 100; ++ unsigned int reg; ++ ++ /* shift 3:2 bits to 7:6 */ ++ ret = max2008x_set_adc_mux(max, channel << 4); ++ if (ret) ++ return ret; ++ ++ do { ++ ret = regmap_read(max->regmap, REG_STAT1, ®); ++ if (ret) ++ return ret; ++ } while ((!(reg & BIT(4))) && (--timeout)); ++ ++ if (timeout <= 0) ++ return -ETIMEDOUT; ++ ++ ret = regmap_read(max->regmap, REG_ADC(channel & 0x03), ®); ++ if (ret) ++ return ret; ++ *value = reg; ++ ++ return 0; ++} ++ ++static int max2008x_get_voltage(struct regulator_dev *dev) ++{ ++ int ret; ++ int value = 0; ++ struct max2008x_data *max = rdev_get_drvdata(dev); ++ ++ /* voltage channels starts from 4 */ ++ ret = max2008x_read_adc(max, dev->desc->id + 4, &value); ++ if (ret) ++ return ret; ++ ++ /* in 70mV units */ ++ return (value * 70000); ++} ++ ++static struct regulator_ops max2008x_ops = { ++ .enable = regulator_enable_regmap, ++ .disable = regulator_disable_regmap, ++ .is_enabled = regulator_is_enabled_regmap, ++ .get_voltage = max2008x_get_voltage, ++}; ++ ++static struct of_regulator_match max2008x_matches[] = { ++ [0] = { .name = "SW0"}, ++ [1] = { .name = "SW1"}, ++ [2] = { .name = "SW2"}, ++ [3] = { .name = "SW3"}, ++}; ++ ++static int of_get_max2008x_pdata(struct device *dev, ++ struct max2008x_data *pdata) ++{ ++ int matched, i; ++ struct device_node *np; ++ struct max2008x_regulator_data *regulator; ++ ++ np = of_get_child_by_name(dev->of_node, "regulators"); ++ if (!np) { ++ dev_err(dev, "missing 'regulators' subnode in DT\n"); ++ return -EINVAL; ++ } ++ ++ matched = of_regulator_match(dev, np, max2008x_matches, ++ pdata->num_regulators); ++ of_node_put(np); ++ if (matched <= 0) ++ return matched; ++ ++ pdata->regulators = devm_kzalloc(dev, ++ sizeof(struct max2008x_regulator_data) * ++ pdata->num_regulators, GFP_KERNEL); ++ if (!pdata->regulators) ++ return -ENOMEM; ++ ++ regulator = pdata->regulators; ++ ++ for (i = 0; i < pdata->num_regulators; i++) { ++ regulator->id = i; ++ regulator->name = max2008x_matches[i].name; ++ regulator->init_data = max2008x_matches[i].init_data; ++ regulator->of_node = max2008x_matches[i].of_node; ++ regulator++; ++ } ++ ++ return 0; ++} ++ ++static struct max2008x_regulator_data *max2008x_get_regulator_data( ++ int id, struct max2008x_data *data) ++{ ++ int i; ++ ++ if (!data) ++ return NULL; ++ ++ for (i = 0; i < data->num_regulators; i++) { ++ if (data->regulators[i].id == id) ++ return &data->regulators[i]; ++ } ++ ++ return NULL; ++} ++ ++#define MAX2008X_REG(_name, _id, _supply) \ ++ { \ ++ .name = _name, \ ++ .supply_name = _supply, \ ++ .id = _id, \ ++ .type = REGULATOR_VOLTAGE, \ ++ .ops = &max2008x_ops, \ ++ .enable_reg = REG_CONFIG, \ ++ .enable_mask = BIT(_id), \ ++ .owner = THIS_MODULE, \ ++ } ++ ++static const struct regulator_desc max2008x_regulators[] = { ++ MAX2008X_REG("SW0", 0, "out0"), ++ MAX2008X_REG("SW1", 1, "out1"), ++ MAX2008X_REG("SW2", 2, "out2"), ++ MAX2008X_REG("SW3", 3, "out3"), ++}; ++ ++static const char *max2008x_devnames[] = { ++ "max20089", ++ "max20088", ++ "max20087", ++ "max20086" ++}; ++ ++static int max2008x_adc_read_raw(struct iio_dev *indio_dev, ++ struct iio_chan_spec const *chan, ++ int *val, int *val2, long mask) ++{ ++ int ret; ++ struct max2008x_data *max = iio_device_get_drvdata(indio_dev); ++ ++ switch (mask) { ++ case IIO_CHAN_INFO_RAW: ++ ret = iio_device_claim_direct_mode(indio_dev); ++ if (ret) ++ return ret; ++ ++ ret = max2008x_read_adc(max, chan->channel, val); ++ iio_device_release_direct_mode(indio_dev); ++ ++ if (ret) ++ return ret; ++ ++ return IIO_VAL_INT; ++ case IIO_CHAN_INFO_SCALE: ++ if (chan->type == IIO_VOLTAGE) { ++ /* Vout1..Vout4 and Vin */ ++ if (chan->channel <= 8) ++ *val = 70; ++ /* Vdd */ ++ else if (chan->channel == 9) ++ *val = 25; ++ /* Viset */ ++ else ++ *val = 5; ++ } else if (chan->type == IIO_CURRENT) { ++ *val = 3; ++ *val2 = 0; ++ } ++ ++ return IIO_VAL_INT; ++ } ++ ++ return 0; ++} ++ ++#define MAX2008X_ADC_C_CHAN(_chan, _addr, _name) { \ ++ .type = IIO_CURRENT, \ ++ .indexed = 1, \ ++ .address = _addr, \ ++ .channel = _chan, \ ++ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ ++ BIT(IIO_CHAN_INFO_SCALE), \ ++ .scan_index = _addr, \ ++ .scan_type = { \ ++ .sign = 'u', \ ++ .realbits = 8, \ ++ .storagebits = 8, \ ++ .endianness = IIO_CPU, \ ++ }, \ ++ .datasheet_name = _name, \ ++} ++ ++#define MAX2008X_ADC_V_CHAN(_chan, _addr, _name) { \ ++ .type = IIO_VOLTAGE, \ ++ .indexed = 1, \ ++ .address = _addr, \ ++ .channel = _chan, \ ++ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ ++ BIT(IIO_CHAN_INFO_SCALE), \ ++ .scan_index = _addr, \ ++ .scan_type = { \ ++ .sign = 'u', \ ++ .realbits = 8, \ ++ .storagebits = 8, \ ++ .endianness = IIO_CPU, \ ++ }, \ ++ .datasheet_name = _name, \ ++} ++ ++static const struct iio_chan_spec max2008x_adc_channels[] = ++{ ++ MAX2008X_ADC_C_CHAN( 0, 0, "out0"), ++ MAX2008X_ADC_C_CHAN( 1, 1, "out1"), ++ MAX2008X_ADC_C_CHAN( 2, 2, "out2"), ++ MAX2008X_ADC_C_CHAN( 3, 3, "out3"), ++ MAX2008X_ADC_V_CHAN( 4, 4, "out0"), ++ MAX2008X_ADC_V_CHAN( 5, 5, "out1"), ++ MAX2008X_ADC_V_CHAN( 6, 6, "out2"), ++ MAX2008X_ADC_V_CHAN( 7, 7, "out3"), ++ MAX2008X_ADC_V_CHAN( 8, 8, "Vin"), ++ MAX2008X_ADC_V_CHAN( 9, 9, "Vdd"), ++ MAX2008X_ADC_V_CHAN(10, 10, "Viset"), ++}; ++ ++static const struct iio_info max2008x_adc_info = { ++ .driver_module = THIS_MODULE, ++ .read_raw = max2008x_adc_read_raw, ++}; ++ ++#if defined(CONFIG_OF) ++static const struct of_device_id max2008x_of_match[] = { ++ { .compatible = "maxim,max2008x" }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, max2008x_of_match); ++#endif ++ ++ ++static const struct regmap_range max2008x_reg_ranges[] = { ++ regmap_reg_range(REG_MASK, REG_ADC(3)), ++}; ++ ++static const struct regmap_range max2008x_reg_ro_ranges[] = { ++ regmap_reg_range(REG_ID, REG_ADC(3)), ++}; ++ ++static const struct regmap_range max2008x_reg_volatile_ranges[] = { ++ regmap_reg_range(REG_STAT1, REG_ADC(3)), ++}; ++ ++static const struct regmap_access_table max2008x_write_ranges_table = { ++ .yes_ranges = max2008x_reg_ranges, ++ .n_yes_ranges = ARRAY_SIZE(max2008x_reg_ranges), ++ .no_ranges = max2008x_reg_ro_ranges, ++ .n_no_ranges = ARRAY_SIZE(max2008x_reg_ro_ranges), ++}; ++ ++static const struct regmap_access_table max2008x_read_ranges_table = { ++ .yes_ranges = max2008x_reg_ranges, ++ .n_yes_ranges = ARRAY_SIZE(max2008x_reg_ranges), ++}; ++ ++static const struct regmap_access_table max2008x_volatile_ranges_table = { ++ .yes_ranges = max2008x_reg_volatile_ranges, ++ .n_yes_ranges = ARRAY_SIZE(max2008x_reg_volatile_ranges), ++}; ++ ++static const struct regmap_config max2008x_regmap_config = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ .max_register = REG_ADC(3), ++ .wr_table = &max2008x_write_ranges_table, ++ .rd_table = &max2008x_read_ranges_table, ++ .volatile_table = &max2008x_volatile_ranges_table, ++}; ++ ++static int max2008x_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct device *dev = &client->dev; ++ struct device_node *np = dev->of_node; ++ struct max2008x_data *max; ++ struct gpio_desc *enable_gpio; ++ unsigned int reg; ++ int i, ret; ++ ++ max = devm_kzalloc(&client->dev, sizeof(struct max2008x_data), ++ GFP_KERNEL); ++ if (max == NULL) ++ return -ENOMEM; ++ ++ enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", GPIOD_OUT_LOW); ++ ++ /* regmap */ ++ max->regmap = devm_regmap_init_i2c(client, &max2008x_regmap_config); ++ if (IS_ERR(max->regmap)) { ++ ret = PTR_ERR(max->regmap); ++ dev_err(&client->dev, ++ "regmap allocation failed with err %d\n", ret); ++ return ret; ++ } ++ i2c_set_clientdata(client, max); ++ ++ ret = regmap_read(max->regmap, REG_ID, ®); ++ if (ret) ++ return ret; ++ ++ max->id = (reg >> 4) & 0x03; ++ max->rev = reg & 0x0f; ++ /* MAX20086 and MAX20087 have 4 outputs */ ++ max->num_regulators = ((max->id == 0x2) || (max->id == 0x3)) ? 4 : 2; ++ ++ /* Disable all */ ++ ret = regmap_write_bits(max->regmap, REG_CONFIG, BIT(max->num_regulators) - 1, 0x00); ++ if (ret) ++ return ret; ++ ++ /* to update mux on first access */ ++ max->adc_mux = 0xff; ++ ++ /* set autoconvertion mode for ADC */ ++ ret = regmap_write_bits(max->regmap, REG_CONFIG, BIT(5), BIT(5)); ++ if (ret) ++ return ret; ++ ++ dev_info(&client->dev, "%s rev %d found (%d channels)\n", ++ max2008x_devnames[max->id], max->rev, max->num_regulators); ++ ++ if (np) { ++ ret = of_get_max2008x_pdata(&client->dev, max); ++ if (ret) { ++ dev_err(&client->dev, ++ "dt parse error %d\n", ret); ++ return ret; ++ } ++ } ++ ++ /* Finally register devices */ ++ for (i = 0; i < max->num_regulators; i++) { ++ const struct regulator_desc *desc = &max2008x_regulators[i]; ++ struct regulator_config config = { }; ++ struct max2008x_regulator_data *rdata; ++ struct regulator_dev *rdev; ++ ++ config.dev = dev; ++ config.driver_data = max; ++ config.regmap = max->regmap; ++ ++ rdata = max2008x_get_regulator_data(desc->id, max); ++ if (rdata) { ++ config.init_data = rdata->init_data; ++ config.of_node = rdata->of_node; ++ } ++ ++ rdev = devm_regulator_register(dev, desc, &config); ++ if (IS_ERR(rdev)) { ++ dev_err(dev, "failed to register %s\n", desc->name); ++ return PTR_ERR(rdev); ++ } ++ } ++ ++ /* IIO device */ ++ max->iio_dev = devm_iio_device_alloc(dev, 0); ++ if (!max->iio_dev) ++ return -ENOMEM; ++ ++ max->iio_dev->info = &max2008x_adc_info; ++ max->iio_dev->dev.parent = dev; ++ max->iio_dev->dev.of_node = dev->of_node; ++ max->iio_dev->name = "max2008x-adc"; ++ max->iio_dev->modes = INDIO_DIRECT_MODE; ++ ++ max->iio_dev->channels = max2008x_adc_channels; ++ /* only ASIL can measure voltages */ ++ if ((max->id == 0x00) || (max->id == 0x02)) ++ max->iio_dev->num_channels = ARRAY_SIZE(max2008x_adc_channels); ++ else ++ max->iio_dev->num_channels = 4; ++ ++ iio_device_set_drvdata(max->iio_dev, max); ++ ++ ret = iio_device_register(max->iio_dev); ++ if (ret < 0) { ++ dev_err(&client->dev, "Failed to register IIO device: %d\n", ret); ++ return ret; ++ } ++ ++ i2c_set_clientdata(client, max); ++ ++ if (!IS_ERR(enable_gpio)) ++ gpiod_set_value_cansleep(enable_gpio, 1); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id max2008x_id[] = { ++ { "maxim,max2008x" }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, max2008x_id); ++ ++static struct i2c_driver max2008x_driver = { ++ .driver = { ++ .name = "max2008x", ++ .of_match_table = of_match_ptr(max2008x_of_match), ++ }, ++ .probe = max2008x_probe, ++ .id_table = max2008x_id, ++}; ++ ++static int __init max2008x_init(void) ++{ ++ return i2c_add_driver(&max2008x_driver); ++} ++subsys_initcall(max2008x_init); ++ ++static void __exit max2008x_exit(void) ++{ ++ i2c_del_driver(&max2008x_driver); ++} ++module_exit(max2008x_exit); ++ ++MODULE_AUTHOR("Andrey Gusakov "); ++MODULE_DESCRIPTION("max2008x Dual/Quad Camera Power Protector"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS("platform:max2008x"); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0500-arm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0500-arm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch new file mode 100644 index 00000000..4e58b2d8 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0500-arm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch @@ -0,0 +1,1445 @@ +From bcba64742b957d8a6f7303abf05c4e586522c89b Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 18:53:42 +0300 +Subject: [PATCH] arm64: dts: renesas: add V3H GMSL2 Videoboxes + +This adds Quad and Dual GMSL Videoboxes on V3H + +Signed-off-by: Andrey Gusakov +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/Makefile | 2 + + .../dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts | 717 +++++++++++++++++++++ + .../boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts | 683 ++++++++++++++++++++ + 3 files changed, 1402 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index 89da50c..a1373ba 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v3.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v2.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v3.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-8ch.dtb r8a77980-v3hsk-vb-4ch.dtb ++dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl2-2x2.dtb ++dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl2-4.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl-8ch.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-4ch-hdmi.dtb r8a77980-v3hsk-vb-8ch-hdmi.dtb + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +new file mode 100644 +index 0000000..155b73f +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +@@ -0,0 +1,717 @@ ++/* ++ * Device Tree Source for the V3HSK Videobox Mini board on r8a7798 ++ * ++ * Copyright (C) 2018 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk.dts" ++#include ++/* FDPLink output */ ++//#include "vb-fdplink-output.dtsi" ++ ++#define COMPATIBLE_CAMERAS \ ++"onsemi,ar0140", \ ++"onsemi,ar0143", \ ++"onsemi,ar0147", \ ++"onsemi,ar0231", \ ++"onsemi,ar0233", \ ++"onsemi,ap0101", \ ++"onsemi,ap0201", \ ++"ovti,ov10635", \ ++"ovti,ov10640", \ ++"ovti,ov2311", \ ++"ovti,ov2775", \ ++"ovti,ov490", \ ++"ovti,ov495", \ ++"ovti,ox01d10", \ ++"ovti,ox03a", \ ++"sony,imx390", \ ++"sony,isx016", \ ++"sony,isx019", \ ++"dummy,camera" ++ ++/ { ++ model = "Renesas V3HSK 2x2ch GMSL2 Videobox board based on r8a7798"; ++ ++ aliases { ++ serial1 = &scif3; ++ ethernet1 = &avb; ++ }; ++ ++ cs2300_ref_clk: cs2300_ref_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <25000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led0 { ++ label = "board:status"; ++ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ }; ++ }; ++ ++ mpcie_1v8: regulator2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 1v8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ mpcie_3v3: regulator3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ common_3v3: regulator4 { ++ compatible = "regulator-fixed"; ++ regulator-name = "main 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ regulator_poc_0: regulator-poc-0 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "POC 0"; ++ regulator-min-microvolt = <9000000>; ++ regulator-max-microvolt = <9000000>; ++ startup-delay-us = <50>; ++ ++ gpio = <&gpio_exp_ch0 10 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ regulator_poc_1: regulator-poc-1 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "POC 1"; ++ regulator-min-microvolt = <9000000>; ++ regulator-max-microvolt = <9000000>; ++ startup-delay-us = <50>; ++ ++ gpio = <&gpio_exp_ch0 11 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ regulator_poc_2: regulator-poc-2 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "POC 2"; ++ regulator-min-microvolt = <9000000>; ++ regulator-max-microvolt = <9000000>; ++ startup-delay-us = <50>; ++ ++ gpio = <&gpio_exp_ch0 14 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ regulator_poc_3: regulator-poc-3 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "POC 3"; ++ regulator-min-microvolt = <9000000>; ++ regulator-max-microvolt = <9000000>; ++ startup-delay-us = <50>; ++ ++ gpio = <&gpio_exp_ch0 15 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++}; ++ ++&canfd { ++ pinctrl-0 = <&canfd0_pins &canfd1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ channel0 { ++ status = "okay"; ++ }; ++ ++ channel1 { ++ status = "okay"; ++ }; ++}; ++ ++&avb { ++ pinctrl-0 = <&avb_pins>; ++ pinctrl-names = "default"; ++ renesas,no-ether-link; ++ phy-handle = <&avb_phy0>; ++ status = "okay"; ++ phy-int-gpio = <&gpio1 17 GPIO_ACTIVE_LOW>; ++ ++ avb_phy0: eavb-phy@0 { ++ rxc-skew-ps = <1500>; ++ rxdv-skew-ps = <420>; /* default */ ++ rxd0-skew-ps = <420>; /* default */ ++ rxd1-skew-ps = <420>; /* default */ ++ rxd2-skew-ps = <420>; /* default */ ++ rxd3-skew-ps = <420>; /* default */ ++ txc-skew-ps = <900>; /* default */ ++ txen-skew-ps = <420>; /* default */ ++ txd0-skew-ps = <420>; /* default */ ++ txd1-skew-ps = <420>; /* default */ ++ txd2-skew-ps = <420>; /* default */ ++ txd3-skew-ps = <420>; /* default */ ++ reg = <3>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; ++ max-speed = <1000>; ++ }; ++}; ++ ++&csi40 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi40_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <1200>; ++ }; ++ }; ++}; ++ ++&csi41 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi41_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <1200>; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&i2c1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ clock-frequency = <400000>; ++ ++ i2cswitch1: i2c-switch@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; ++ ++ /* CCTRL_SDA and CCTRL_SCL */ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ gpio_exp_ch0: gpio_ch0@76 { ++ compatible = "nxp,pca9539"; ++ reg = <0x76>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ cmr_pwr_en { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CmrPEn"; ++ }; ++ }; ++ ++ /* CS2300 node @0x4e */ ++ cs2300: clk_multiplier@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam: dac_vcam@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ vdd-supply = <&common_3v3>; ++ }; ++ }; ++ ++ /* DS0_SDA and DS0_SCL */ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ max9296@48 { ++ compatible = "maxim,max9296"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x48>; ++ clocks = <&cs2300>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_ch0 1 GPIO_ACTIVE_LOW>; ++ ++ maxim,link-mipi-map = <1 1>; ++ ++ poc0-supply = <®ulator_poc_0>; ++ poc1-supply = <®ulator_poc_1>; ++ ++ port@0 { ++ max9296_des0ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ max9296_des0ep1: endpoint@1 { ++ ser-addr = <0x0d>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ }; ++ ++ port@1 { ++ max9296_des0mipi1: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@60 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max9296_des0ep0: endpoint@1 { ++ remote-endpoint = <&max9296_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@61 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0d>; ++ ++ port@0 { ++ camera_in1: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin1ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max9296_des0ep1: endpoint@1 { ++ remote-endpoint = <&max9296_des0ep1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* DS1_SDA and DS1_SCL */ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ max9296@48 { ++ compatible = "maxim,max9296"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x48>; ++ clocks = <&cs2300>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_ch0 0 GPIO_ACTIVE_LOW>; ++ ++ maxim,link-mipi-map = <1 1>; ++ ++ poc0-supply = <®ulator_poc_2>; ++ poc1-supply = <®ulator_poc_3>; ++ ++ port@0 { ++ max9296_des1ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ max9296_des1ep1: endpoint@1 { ++ ser-addr = <0x51>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ ++ port@1 { ++ max9296_des1mipi1: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@60 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in2: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin4ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max9296_des1ep0: endpoint@1 { ++ remote-endpoint = <&max9296_des1ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@61 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0c>; ++ ++ port@0 { ++ camera_in3: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin5ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max9296_des1ep1: endpoint@1 { ++ remote-endpoint = <&max9296_des1ep1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* Disp_SDA and Disp_SCL */ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ ++ /* fan node - lm96063 */ ++ fan_ctrl: lm96063@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ /* ESDA and ESCL */ ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ ++ /* ext connector nodes here */ ++ }; ++ }; ++}; ++ ++&gpio0 { ++ fpdl_shdn { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "FPDL_SHDN"; ++ }; ++ ++ cam_pwr_en { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIPWR_En"; ++ }; ++ ++ wake_pin_8 { ++ gpio-hog; ++ gpios = <0 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 8"; ++ }; ++}; ++ ++&gpio1 { ++ md_buf_en { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CPLD_If_En"; ++ }; ++}; ++ ++&gpio2 { ++ m2_rst { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 RST#"; ++ }; ++ ++ cctrl_rstn { ++ gpio-hog; ++ gpios = <16 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CCTRL_RSTn"; ++ }; ++ ++ can0_stby { ++ gpio-hog; ++ gpios = <27 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN0STBY"; ++ }; ++ ++ can1_load { ++ gpio-hog; ++ gpios = <29 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1Loff"; ++ }; ++ ++ can1_stby { ++ gpio-hog; ++ gpios = <22 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1STBY"; ++ }; ++ ++ wake_pin_7 { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 7"; ++ }; ++ ++ vi1_gpioext_rst { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP1_RST"; ++ }; ++}; ++ ++&gpio3 { ++ vi0_gpioext_rst { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP0_RST"; ++ }; ++}; ++ ++&pcie_bus_clk { ++ clock-frequency = <100000000>; ++ status = "okay"; ++}; ++ ++&pciec { ++ pcie3v3-supply = <&mpcie_3v3>; ++ pcie1v8-supply = <&mpcie_1v8>; ++ status = "okay"; ++}; ++ ++&pcie_phy { ++ status = "okay"; ++}; ++ ++&pfc { ++ canfd0_pins: canfd0 { ++ groups = "canfd0_data_a"; ++ function = "canfd0"; ++ }; ++ ++ canfd1_pins: canfd1 { ++ groups = "canfd1_data"; ++ function = "canfd1"; ++ }; ++ ++ avb_pins: avb { ++ groups = "avb_mdio", "avb_rgmii"; ++ function = "avb"; ++ }; ++ ++ i2c1_pins: i2c1 { ++ groups = "i2c1"; ++ function = "i2c1"; ++ }; ++ ++ scif3_pins: scif3 { ++ groups = "scif3_data"; ++ function = "scif3"; ++ }; ++}; ++ ++&scif3 { ++ pinctrl-0 = <&scif3_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&tpu { ++ status = "disabled"; ++}; ++ ++&vin0 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin0ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ }; ++ port@1 { ++ csi0ep0: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin0_max9296_des0ep0: endpoint@1 { ++ remote-endpoint = <&max9296_des0ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin1ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ }; ++ port@1 { ++ csi0ep1: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin1_max9296_des0ep1: endpoint@1 { ++ remote-endpoint = <&max9296_des0ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin4 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin4ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ }; ++ port@1 { ++ csi1ep0: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin4_max9296_des1ep0: endpoint@1 { ++ remote-endpoint = <&max9296_des1ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin5 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin5ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ port@1 { ++ csi1ep1: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin5_max9296_des1ep1: endpoint@1 { ++ remote-endpoint = <&max9296_des1ep1>; ++ }; ++ }; ++ }; ++}; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +new file mode 100644 +index 0000000..310061f +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +@@ -0,0 +1,683 @@ ++/* ++ * Device Tree Source for the V3HSK GMSL2 Quad Videobox Mini board on r8a7798 ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk.dts" ++#include ++/* FDPLink output */ ++//#include "vb-fdplink-output.dtsi" ++ ++#define COMPATIBLE_CAMERAS \ ++"onsemi,ar0140", \ ++"onsemi,ar0143", \ ++"onsemi,ar0147", \ ++"onsemi,ar0231", \ ++"onsemi,ar0233", \ ++"onsemi,ap0101", \ ++"onsemi,ap0201", \ ++"ovti,ov10635", \ ++"ovti,ov10640", \ ++"ovti,ov2311", \ ++"ovti,ov2775", \ ++"ovti,ov490", \ ++"ovti,ov495", \ ++"ovti,ox01d10", \ ++"ovti,ox03a", \ ++"sony,imx390", \ ++"sony,isx016", \ ++"sony,isx019", \ ++"dummy,camera" ++ ++/ { ++ model = "Renesas V3HSK 4ch GMSL2 Videobox board based on r8a77980"; ++ ++ aliases { ++ serial1 = &scif3; ++ ethernet1 = &avb; ++ }; ++ ++ cs2300_ref_clk: cs2300_ref_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <25000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led0 { ++ label = "board:status"; ++ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ }; ++ }; ++ ++ mpcie_1v8: regulator2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 1v8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ mpcie_3v3: regulator3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ common_3v3: regulator4 { ++ compatible = "regulator-fixed"; ++ regulator-name = "main 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ iio_hwmon: hwmon@1 { ++ compatible = "iio-hwmon"; ++ io-channels = ++ /* current */ ++ <&max2008x 0>, ++ <&max2008x 2>, ++ /* voltage */ ++ <&max2008x 4>, ++ <&max2008x 6>, ++ /* misc voltages */ ++ <&max2008x 8>, ++ <&max2008x 9>; ++ io-channel-names = ++ "camera-0-Iout", ++ "camera-1-Iout", ++ "camera-0-Vout", ++ "camera-1-Vout", ++ "cameras-Vregulator", ++ "cameras-3v3"; ++ }; ++}; ++ ++&canfd { ++ pinctrl-0 = <&canfd0_pins &canfd1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ channel0 { ++ status = "okay"; ++ }; ++ ++ channel1 { ++ status = "okay"; ++ }; ++}; ++ ++&avb { ++ pinctrl-0 = <&avb_pins>; ++ pinctrl-names = "default"; ++ renesas,no-ether-link; ++ phy-handle = <&avb_phy0>; ++ status = "okay"; ++ phy-int-gpio = <&gpio1 17 GPIO_ACTIVE_LOW>; ++ ++ avb_phy0: eavb-phy@0 { ++ rxc-skew-ps = <1500>; ++ rxdv-skew-ps = <420>; /* default */ ++ rxd0-skew-ps = <420>; /* default */ ++ rxd1-skew-ps = <420>; /* default */ ++ rxd2-skew-ps = <420>; /* default */ ++ rxd3-skew-ps = <420>; /* default */ ++ txc-skew-ps = <900>; /* default */ ++ txen-skew-ps = <420>; /* default */ ++ txd0-skew-ps = <420>; /* default */ ++ txd1-skew-ps = <420>; /* default */ ++ txd2-skew-ps = <420>; /* default */ ++ txd3-skew-ps = <420>; /* default */ ++ reg = <3>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; ++ max-speed = <1000>; ++ }; ++}; ++ ++&csi40 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi40_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <1200>; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&i2c1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ clock-frequency = <400000>; ++ ++ i2cswitch1: i2c-switch@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; ++ ++ /* CCTRL_SDA and CCTRL_SCL */ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ gpio_exp_ch0: gpio_ch0@76 { ++ compatible = "nxp,pca9539"; ++ reg = <0x76>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ cmr_pwr_en { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CmrPEn"; ++ }; ++ }; ++ ++ cs2300: clk_multiplier@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam: dac_vcam@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ vdd-supply = <&common_3v3>; ++ }; ++ ++ max2008x: vcam_switch@28 { ++ compatible = "maxim,max2008x"; ++ reg = <0x28>; ++ #io-channel-cells = <1>; ++ enable-gpios = <&gpio_exp_ch0 5 GPIO_ACTIVE_HIGH>; ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_cam0: SW0 { ++ reg = <0>; ++ regulator-name = "Camera-0"; ++ }; ++ vdd_cam1: SW1 { ++ reg = <1>; ++ regulator-name = "Camera-1"; ++ }; ++ vdd_cam2: SW2 { ++ reg = <2>; ++ regulator-name = "Camera-2"; ++ }; ++ vdd_cam3: SW3 { ++ reg = <3>; ++ regulator-name = "Camera-3"; ++ }; ++ }; ++ }; ++ }; ++ ++ /* DS0_SDA and DS0_SCL */ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ max96712@29 { ++ compatible = "maxim,max96712"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x29>; ++ clocks = <&cs2300>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_ch0 1 GPIO_ACTIVE_LOW>; ++ ++ maxim,links-mipi-map = <2 2 2 2>; ++ ++ poc0-supply = <&vdd_cam3>; ++ poc1-supply = <&vdd_cam1>; ++ poc2-supply = <&vdd_cam0>; ++ poc3-supply = <&vdd_cam2>; ++ ++ port@0 { ++ max96712_des0ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ max96712_des0ep1: endpoint@1 { ++ ser-addr = <0x0d>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ max96712_des0ep2: endpoint@2 { ++ ser-addr = <0x0e>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ max96712_des0ep3: endpoint@3 { ++ ser-addr = <0x0f>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ ++ port@1 { ++ max96712_mipi2: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@60 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@61 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0d>; ++ ++ port@0 { ++ camera_in1: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin1ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ camera@62 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x62 0x0e>; ++ ++ port@0 { ++ camera_in2: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin2ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ camera@63 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x63 0x0f>; ++ ++ port@0 { ++ camera_in3: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin3ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* CTL0_SDA and CTL0_SCL */ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ }; ++ ++ /* Disp_SDA and Disp_SCL */ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ ++ /* fan node - lm96063 */ ++ fan_ctrl: lm96063@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ /* ESDA and ESCL */ ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ ++ rtc: mcp79411@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ }; ++ }; ++ }; ++}; ++ ++&gpio0 { ++ fpdl_shdn { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "FPDL_SHDN"; ++ }; ++ ++ cam_pwr_en { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIPWR_En"; ++ }; ++ ++ wake_pin_8 { ++ gpio-hog; ++ gpios = <0 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 8"; ++ }; ++}; ++ ++&gpio1 { ++ md_buf_en { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CPLD_If_En"; ++ }; ++}; ++ ++&gpio2 { ++ m2_rst { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 RST#"; ++ }; ++ ++ cctrl_rstn { ++ gpio-hog; ++ gpios = <16 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CCTRL_RSTn"; ++ }; ++ ++ can0_stby { ++ gpio-hog; ++ gpios = <27 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN0STBY"; ++ }; ++ ++ can1_load { ++ gpio-hog; ++ gpios = <29 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1Loff"; ++ }; ++ ++ can1_stby { ++ gpio-hog; ++ gpios = <22 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1STBY"; ++ }; ++ ++ wake_pin_7 { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 7"; ++ }; ++ ++ vi1_gpioext_rst { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP1_RST"; ++ }; ++}; ++ ++&gpio3 { ++ vi0_gpioext_rst { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP0_RST"; ++ }; ++}; ++ ++&pcie_bus_clk { ++ clock-frequency = <100000000>; ++ status = "okay"; ++}; ++ ++&pciec { ++ pcie3v3-supply = <&mpcie_3v3>; ++ pcie1v8-supply = <&mpcie_1v8>; ++ status = "okay"; ++}; ++ ++&pcie_phy { ++ status = "okay"; ++}; ++ ++&pfc { ++ canfd0_pins: canfd0 { ++ groups = "canfd0_data_a"; ++ function = "canfd0"; ++ }; ++ ++ canfd1_pins: canfd1 { ++ groups = "canfd1_data"; ++ function = "canfd1"; ++ }; ++ ++ avb_pins: avb { ++ groups = "avb_mdio", "avb_rgmii"; ++ function = "avb"; ++ }; ++ ++ i2c1_pins: i2c1 { ++ groups = "i2c1"; ++ function = "i2c1"; ++ }; ++ ++ scif3_pins: scif3 { ++ groups = "scif3_data"; ++ function = "scif3"; ++ }; ++}; ++ ++&scif3 { ++ pinctrl-0 = <&scif3_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&tpu { ++ status = "disabled"; ++}; ++ ++&vin0 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin0ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ }; ++ port@1 { ++ csi1ep0: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin0_max96712_des0ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin1ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ }; ++ port@1 { ++ csi1ep1: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin1_max96712_des0ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin2 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin2ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ }; ++ port@1 { ++ csi1ep2: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin2_max96712_des0ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin3 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin3ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ port@1 { ++ csi1ep3: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin3_max96712_des0ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch new file mode 100644 index 00000000..1d6af948 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch @@ -0,0 +1,52 @@ +From 7bb14f5fe5ab6c00c48dc879767b3def79bcef17 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Mon, 27 Apr 2020 18:55:09 +0300 +Subject: [PATCH] media: i2c: ap0101: fix fsin on AP0102 + +AP0101 and AP0102 hav different FSIN setup + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/ap0101_ar014x.c | 9 ++++++++- + drivers/media/i2c/soc_camera/ap0101_ar014x.h | 8 ++++++++ + 2 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +index 8a2d2a6..55cff3f 100644 +--- a/drivers/media/i2c/soc_camera/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/ap0101_ar014x.c +@@ -477,7 +477,14 @@ static int ap0101_initialize(struct i2c_client *client) + priv->max_height = AP0101_MAX_HEIGHT; + #endif + /* Program wizard registers */ +- ap0101_set_regs(client, ap0101_regs_wizard, ARRAY_SIZE(ap0101_regs_wizard)); ++ switch (pid) { ++ case AP0101_VERSION_REG: ++ ap0101_set_regs(client, ap0101_regs_wizard, ARRAY_SIZE(ap0101_regs_wizard)); ++ break; ++ case AP0102_VERSION_REG: ++ ap0101_set_regs(client, ap0102_regs_wizard, ARRAY_SIZE(ap0102_regs_wizard)); ++ break; ++ } + /* Read OTP IDs */ + ap0101_otp_id_read(client); + +diff --git a/drivers/media/i2c/soc_camera/ap0101_ar014x.h b/drivers/media/i2c/soc_camera/ap0101_ar014x.h +index 16599a1..d72ebfe 100644 +--- a/drivers/media/i2c/soc_camera/ap0101_ar014x.h ++++ b/drivers/media/i2c/soc_camera/ap0101_ar014x.h +@@ -26,3 +26,11 @@ static const struct ap0101_reg ap0101_regs_wizard[] = { + {0x0040, 0x8100}, + {AP0101_DELAY, 100}, + }; ++ ++static const struct ap0101_reg ap0102_regs_wizard[] = { ++/* enable FSIN */ ++{0xc890, 0x0303}, ++{0xfc00, 0x2800}, ++{0x0040, 0x8100}, ++{AP0101_DELAY, 100}, ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0502-media-i2c-max96712-add-MIPI-GMSL2-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0502-media-i2c-max96712-add-MIPI-GMSL2-support.patch new file mode 100644 index 00000000..6f1d59e0 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0502-media-i2c-max96712-add-MIPI-GMSL2-support.patch @@ -0,0 +1,189 @@ +From 73714bd64b9beb6af9a4e00b85a4d2e6d8933143 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 29 Apr 2020 01:27:08 +0300 +Subject: [PATCH 1/3] media: i2c: max96712: add MIPI GMSL2 support + +This adds MIPI stream from serializer + +Signed-off-by: Vladimir Barinov +Signed-off-by: Andrey Gusakov +--- + drivers/media/i2c/soc_camera/gmsl/max9295.h | 10 ++++ + drivers/media/i2c/soc_camera/gmsl/max96712.c | 75 ++++++++++++++++------------ + drivers/media/i2c/soc_camera/gmsl/max96712.h | 6 +-- + 3 files changed, 57 insertions(+), 34 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9295.h b/drivers/media/i2c/soc_camera/gmsl/max9295.h +index cf12d3c..864c441 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9295.h ++++ b/drivers/media/i2c/soc_camera/gmsl/max9295.h +@@ -27,3 +27,13 @@ + #define MAX9295_VIDEO_TX_BASE(n) (0x100 + (0x8 * n)) + #define MAX9295_VIDEO_TX0(n) (MAX9295_VIDEO_TX_BASE(n) + 0) + #define MAX9295_VIDEO_TX1(n) (MAX9295_VIDEO_TX_BASE(n) + 1) ++ ++#define MAX9295_FRONTTOP_0 0x308 ++#define MAX9295_FRONTTOP_9 0x311 ++#define MAX9295_FRONTTOP_12 0x314 ++#define MAX9295_FRONTTOP_13 0x315 ++ ++#define MAX9295_MIPI_RX0 0x330 ++#define MAX9295_MIPI_RX1 0x331 ++#define MAX9295_MIPI_RX2 0x332 ++#define MAX9295_MIPI_RX3 0x333 +\ No newline at end of file +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.c b/drivers/media/i2c/soc_camera/gmsl/max96712.c +index af5e1d7..02ccc38 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.c +@@ -94,7 +94,7 @@ static int gmsl = MODE_GMSL2; + module_param(gmsl, int, 0644); + MODULE_PARM_DESC(gmsl, " GMSL mode (default: 2 - GMSL2)"); + +-static char *mbus = "dvp"; ++static char *mbus = mbus_default; + module_param(mbus, charp, 0644); + MODULE_PARM_DESC(mbus, " Interfaces mipi,dvp (default: dvp)"); + +@@ -161,7 +161,7 @@ static void max96712_reset_oneshot(struct max96712_priv *priv, int mask) + if (!(reg & mask)) + break; + +- msleep(1); ++ mdelay(1); + } + + if (reg & mask) +@@ -741,9 +741,12 @@ static int max96712_gmsl2_reverse_channel_setup(struct max96712_priv *priv, int + des_write(MAX96712_REG6, 0xf0 | BIT(link_n)); /* GMSL2 mode, enable GMSL link# */ + max96712_reset_oneshot(priv, BIT(link_n)); + +- /* wait 100ms for link to be established, indicated when status bit LOCKED goes high */ +- while ((!max96712_gmsl2_get_link_lock(priv, link_n)) && (--timeout)) +- msleep(1); ++ /* wait the link to be established, indicated when status bit LOCKED goes high */ ++ for (; timeout > 0; timeout--) { ++ if (max96712_gmsl2_get_link_lock(priv, link_n)) ++ break; ++ mdelay(1); ++ } + + if (!timeout) { + ret = -ETIMEDOUT; +@@ -781,36 +784,42 @@ static int max96712_gmsl2_link_serializer_setup(struct max96712_priv *priv, int + struct max96712_link *link = priv->link[link_n]; + int i; + +- //ser_write(MAX9295_CTRL0, 0x31); /* link reset */ +- //msleep(100); +- ser_write(MAX9295_REG2, 0x03); /* disable all pipes */ +- + if (strcmp(priv->mbus, "dvp") == 0) { +- ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ ++ ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ + (priv->hven ? BIT(5) : 0)); /* HS/VS encoding */ + ser_write(MAX9295_VIDEO_TX1(0), 0x0a); /* BPP = 10 */ + ser_write(MAX9295_REG7, 0x07); /* DVP stream, enable HS/VS, rising edge */ +- } +- +- ser_write(MAX9295_REG2, 0x13); /* enable Pipe X */ + +- switch (priv->dt) { +- case MIPI_DT_YUV8: +- case MIPI_DT_RAW12: +- /* setup crossbar: strait DVP mapping */ +- ser_write(MAX9295_CROSS(0), priv->cb[0]); +- ser_write(MAX9295_CROSS(1), priv->cb[1]); +- ser_write(MAX9295_CROSS(2), priv->cb[2]); +- ser_write(MAX9295_CROSS(3), priv->cb[3]); +- ser_write(MAX9295_CROSS(4), priv->cb[4]); +- ser_write(MAX9295_CROSS(5), priv->cb[5]); +- ser_write(MAX9295_CROSS(6), priv->cb[6]); +- ser_write(MAX9295_CROSS(7), priv->cb[7]); +- ser_write(MAX9295_CROSS(8), priv->cb[8]); +- ser_write(MAX9295_CROSS(9), priv->cb[9]); +- ser_write(MAX9295_CROSS(10), priv->cb[10]); +- ser_write(MAX9295_CROSS(11), priv->cb[11]); +- break; ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ case MIPI_DT_RAW12: ++ /* setup crossbar: strait DVP mapping */ ++ ser_write(MAX9295_CROSS(0), priv->cb[0]); ++ ser_write(MAX9295_CROSS(1), priv->cb[1]); ++ ser_write(MAX9295_CROSS(2), priv->cb[2]); ++ ser_write(MAX9295_CROSS(3), priv->cb[3]); ++ ser_write(MAX9295_CROSS(4), priv->cb[4]); ++ ser_write(MAX9295_CROSS(5), priv->cb[5]); ++ ser_write(MAX9295_CROSS(6), priv->cb[6]); ++ ser_write(MAX9295_CROSS(7), priv->cb[7]); ++ ser_write(MAX9295_CROSS(8), priv->cb[8]); ++ ser_write(MAX9295_CROSS(9), priv->cb[9]); ++ ser_write(MAX9295_CROSS(10), priv->cb[10]); ++ ser_write(MAX9295_CROSS(11), priv->cb[11]); ++ break; ++ } ++ } else { ++ /* defaults: ++ * REG2 - video enable Pipex X,Z ++ * MIPI_RX0 - 1x4 mode (1-port x 4-lanes) ++ * MIPI_RX1 - 4-lanes ++ * MIPI_RX2, MIPI_RX3 - merge PHY1,PHY2 to 1x4-mode ++ * FRONTTOP_9 - start Pipes X,Z from CSI_A,CSI_B ++ */ ++ ++ ser_write(MAX9295_FRONTTOP_0, 0x71); /* enable Pipe X from from CSI_A,CSI_B */ ++ ser_write(MAX9295_FRONTTOP_12, BIT(6) | priv->dt); /* primary DT for Pipe X */ ++ ser_write(MAX9295_FRONTTOP_13, BIT(6) | MIPI_DT_EMB); /* secondary DT for Pipe X */ + } + + for (i = 0; i < 11; i++) { +@@ -852,7 +861,9 @@ static struct { + } gmsl2_pipe_maps[] = { + {0x00, 0x00}, /* FS */ + {0x01, 0x01}, /* FE */ +- {MIPI_DT_YUV8, MIPI_DT_YUV8} /* payload data */ ++ {MIPI_DT_YUV8, MIPI_DT_YUV8}, /* payload data */ ++ {MIPI_DT_RAW8, MIPI_DT_RAW8}, ++ {MIPI_DT_RAW12, MIPI_DT_RAW12}, + }; + + static void max96712_gmsl2_pipe_set_source(struct max96712_priv *priv, int pipe, int phy, int in_pipe) +@@ -1193,6 +1204,8 @@ static int max96712_parse_dt(struct i2c_client *client) + priv->gpio[7] = gpio7; + if (gpio8 >= 0) + priv->gpio[8] = gpio8; ++ if (strcmp(mbus, "dvp")) ++ priv->mbus = mbus; + + /* parse serializer crossbar setup */ + for (i = 0; i < 16; i++) { +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.h b/drivers/media/i2c/soc_camera/gmsl/max96712.h +index 2976027..b648bdc 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.h ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.h +@@ -236,11 +236,11 @@ static inline int max96712_ser_write(struct max96712_link *link, int reg, int va + return ret; + } + +-static inline int max96712_ser_read(struct max96712_link *link, int reg, u8 *val) ++static inline int max96712_ser_read(struct max96712_link *link, int reg, int *val) + { + int ret; + +- ret = regmap_read(link->regmap, reg, (int *)val); ++ ret = regmap_read(link->regmap, reg, val); + if (ret) + dev_dbg(&link->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); + +@@ -258,6 +258,6 @@ static inline int max96712_ser_update_bits(struct max96712_link *link, int reg, + return ret; + } + +-#define ser_read(reg, val) max96712_ser_read(link, reg, val) ++#define ser_read(reg, val) max96712_ser_read(link, reg, (int *)val) + #define ser_write(reg, val) max96712_ser_write(link, reg, val) + #define ser_update_bits(reg, mask, bits) max96712_ser_update_bits(link, reg, mask, bits) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0503-media-i2c-ov2311-add-GMSL2-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0503-media-i2c-ov2311-add-GMSL2-support.patch new file mode 100644 index 00000000..478f36f2 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0503-media-i2c-ov2311-add-GMSL2-support.patch @@ -0,0 +1,83 @@ +From fa1d9aeccd9d3244d48ded2dc9e9405aab949513 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 29 Apr 2020 01:28:16 +0300 +Subject: [PATCH] media: i2c: ov2311: add GMSL2 support + +This add GMSL2 camera with this imager + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/ov2311.c | 21 ++++++++++++++------- + drivers/media/i2c/soc_camera/imagers/ov2311.h | 2 +- + 2 files changed, 15 insertions(+), 8 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ov2311.c b/drivers/media/i2c/soc_camera/imagers/ov2311.c +index ce4999b..764c261 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ov2311.c ++++ b/drivers/media/i2c/soc_camera/imagers/ov2311.c +@@ -1,7 +1,7 @@ + /* + * OmniVision ov2311 sensor camera driver + * +- * Copyright (C) 2015-2019 Cogent Embedded, Inc. ++ * Copyright (C) 2015-2020 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the +@@ -25,8 +25,8 @@ + + #define OV2311_I2C_ADDR 0x60 + +-#define OV2311_PID_REGA 0x300a +-#define OV2311_PID_REGB 0x300b ++#define OV2311_PIDA_REG 0x300a ++#define OV2311_PIDB_REG 0x300b + #define OV2311_REV_REG 0x300c + #define OV2311_PID 0x2311 + +@@ -397,9 +397,9 @@ static int ov2311_initialize(struct i2c_client *client) + + setup_i2c_translator(client, priv->ser_addr, OV2311_I2C_ADDR, MODE_GMSL2); + +- reg16_read(client, OV2311_PID_REGA, &val); ++ reg16_read(client, OV2311_PIDA_REG, &val); + pid = val; +- reg16_read(client, OV2311_PID_REGB, &val); ++ reg16_read(client, OV2311_PIDB_REG, &val); + pid = (pid << 8) | val; + + if (pid != OV2311_PID) { +@@ -407,8 +407,15 @@ static int ov2311_initialize(struct i2c_client *client) + return -ENODEV; + } + +- if (get_des_id(client) == UB960_ID) +- reg8_write_addr(client, priv->ser_addr, 0x02, 0x13); /* MIPI 2-lanes */ ++ switch (get_des_id(client)) { ++ case UB960_ID: ++ reg8_write_addr(client, priv->ser_addr, 0x02, 0x13); /* MIPI 2-lanes */ ++ break; ++ case MAX9296A_ID: ++ case MAX96712_ID: ++ reg16_write_addr(client, priv->ser_addr, MAX9295_MIPI_RX1, 0x11); /* MIPI 2-lanes */ ++ break; ++ } + + /* check revision */ + reg16_read(client, OV2311_REV_REG, &rev); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov2311.h b/drivers/media/i2c/soc_camera/imagers/ov2311.h +index 3a56b0b..f76662a 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ov2311.h ++++ b/drivers/media/i2c/soc_camera/imagers/ov2311.h +@@ -30,7 +30,7 @@ struct ov2311_reg { + u8 val; + }; + +-/* R1600x1300 RAW10 MIPI 60fps */ ++/* R1600x1300 RAW8 MIPI 60fps */ + static const struct ov2311_reg ov2311_regs_wizard_r1c[] = { + {0x0103, 0x01}, + {0x0100, 0x00}, +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0504-media-i2c-max9296-add-MIPI-GMSL2-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0504-media-i2c-max9296-add-MIPI-GMSL2-support.patch new file mode 100644 index 00000000..5301e0a3 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0504-media-i2c-max9296-add-MIPI-GMSL2-support.patch @@ -0,0 +1,169 @@ +From ebdaf5ec6d7040c1c7c9a3486ea16ea60f5f127f Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 29 Apr 2020 01:31:03 +0300 +Subject: [PATCH] media: i2c: max9296: add MIPI GMSL2 support + +This adds MIPI stream from serializer + +Signed-off-by: Vladimir Barinov +Signed-off-by: Andrey Gusakov +--- + drivers/media/i2c/soc_camera/gmsl/max9296.c | 75 +++++++++++++++++------------ + drivers/media/i2c/soc_camera/gmsl/max9296.h | 6 +-- + 2 files changed, 47 insertions(+), 34 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.c b/drivers/media/i2c/soc_camera/gmsl/max9296.c +index a6d286f..85b45ca 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9296.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.c +@@ -94,7 +94,7 @@ static int gmsl = MODE_GMSL2; + module_param(gmsl, int, 0644); + MODULE_PARM_DESC(gmsl, " GMSL mode (default: 2 - GMSL2)"); + +-static char *mbus = "dvp"; ++static char *mbus = mbus_default; + module_param(mbus, charp, 0644); + MODULE_PARM_DESC(mbus, " Interfaces mipi,dvp (default: dvp)"); + +@@ -165,7 +165,7 @@ static void max9296_reset_oneshot(struct max9296_priv *priv) + if (!(reg & BIT(5))) + break; + +- msleep(1); ++ mdelay(1); + } + + if (reg & BIT(5)) +@@ -745,9 +745,12 @@ static int max9296_gmsl2_reverse_channel_setup(struct max9296_priv *priv, int li + des_update_bits(MAX9296_CTRL0, 0x13, BIT(link_n)); /* enable GMSL link# */ + max9296_reset_oneshot(priv); + +- /* wait 100ms for link to be established, indicated when status bit LOCKED goes high */ +- while ((!max9296_gmsl2_get_link_lock(priv, link_n)) && (--timeout)) +- msleep(1); ++ /* wait the link to be established, indicated when status bit LOCKED goes high */ ++ for (; timeout > 0; timeout--) { ++ if (max9296_gmsl2_get_link_lock(priv, link_n)) ++ break; ++ mdelay(1); ++ } + + if (!timeout) { + ret = -ETIMEDOUT; +@@ -785,36 +788,42 @@ static int max9296_gmsl2_link_serializer_setup(struct max9296_priv *priv, int li + struct max9296_link *link = priv->link[link_n]; + int i; + +- //ser_write(MAX9295_CTRL0, 0x31); /* link reset */ +- //msleep(100); +- ser_write(MAX9295_REG2, 0x03); /* disable all pipes */ +- + if (strcmp(priv->mbus, "dvp") == 0) { +- ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ ++ ser_write(MAX9295_VIDEO_TX0(0), BIT(6) | /* line CRC enable */ + (priv->hven ? BIT(5) : 0)); /* HS/VS encoding */ + ser_write(MAX9295_VIDEO_TX1(0), 0x0a); /* BPP = 10 */ + ser_write(MAX9295_REG7, 0x07); /* DVP stream, enable HS/VS, rising edge */ +- } +- +- ser_write(MAX9295_REG2, 0x13); /* enable Pipe X */ + +- switch (priv->dt) { +- case MIPI_DT_YUV8: +- case MIPI_DT_RAW12: +- /* setup crossbar: strait DVP mapping */ +- ser_write(MAX9295_CROSS(0), priv->cb[0]); +- ser_write(MAX9295_CROSS(1), priv->cb[1]); +- ser_write(MAX9295_CROSS(2), priv->cb[2]); +- ser_write(MAX9295_CROSS(3), priv->cb[3]); +- ser_write(MAX9295_CROSS(4), priv->cb[4]); +- ser_write(MAX9295_CROSS(5), priv->cb[5]); +- ser_write(MAX9295_CROSS(6), priv->cb[6]); +- ser_write(MAX9295_CROSS(7), priv->cb[7]); +- ser_write(MAX9295_CROSS(8), priv->cb[8]); +- ser_write(MAX9295_CROSS(9), priv->cb[9]); +- ser_write(MAX9295_CROSS(10), priv->cb[10]); +- ser_write(MAX9295_CROSS(11), priv->cb[11]); +- break; ++ switch (priv->dt) { ++ case MIPI_DT_YUV8: ++ case MIPI_DT_RAW12: ++ /* setup crossbar: strait DVP mapping */ ++ ser_write(MAX9295_CROSS(0), priv->cb[0]); ++ ser_write(MAX9295_CROSS(1), priv->cb[1]); ++ ser_write(MAX9295_CROSS(2), priv->cb[2]); ++ ser_write(MAX9295_CROSS(3), priv->cb[3]); ++ ser_write(MAX9295_CROSS(4), priv->cb[4]); ++ ser_write(MAX9295_CROSS(5), priv->cb[5]); ++ ser_write(MAX9295_CROSS(6), priv->cb[6]); ++ ser_write(MAX9295_CROSS(7), priv->cb[7]); ++ ser_write(MAX9295_CROSS(8), priv->cb[8]); ++ ser_write(MAX9295_CROSS(9), priv->cb[9]); ++ ser_write(MAX9295_CROSS(10), priv->cb[10]); ++ ser_write(MAX9295_CROSS(11), priv->cb[11]); ++ break; ++ } ++ } else { ++ /* defaults: ++ * REG2 - video enable Pipex X,Z ++ * MIPI_RX0 - 1x4 mode (1-port x 4-lanes) ++ * MIPI_RX1 - 4-lanes ++ * MIPI_RX2, MIPI_RX3 - merge PHY1,PHY2 to 1x4-mode ++ * FRONTTOP_9 - start Pipes X,Z from CSI_A,CSI_B ++ */ ++ ++ ser_write(MAX9295_FRONTTOP_0, 0x71); /* enable Pipe X from from CSI_A,CSI_B */ ++ ser_write(MAX9295_FRONTTOP_12, BIT(6) | priv->dt); /* primary DT for Pipe X */ ++ ser_write(MAX9295_FRONTTOP_13, BIT(6) | MIPI_DT_EMB); /* secondary DT for Pipe X */ + } + + for (i = 0; i < 11; i++) { +@@ -856,7 +865,9 @@ static struct { + } gmsl2_pipe_maps[] = { + {0x00, 0x00}, /* FS */ + {0x01, 0x01}, /* FE */ +- {MIPI_DT_YUV8, MIPI_DT_YUV8} /* payload data */ ++ {MIPI_DT_YUV8, MIPI_DT_YUV8}, /* payload data */ ++ {MIPI_DT_RAW8, MIPI_DT_RAW8}, ++ {MIPI_DT_RAW12, MIPI_DT_RAW12}, + }; + + static void max9296_gmsl2_pipe_set_source(struct max9296_priv *priv, int pipe, int phy, int in_pipe) +@@ -1193,6 +1204,8 @@ static int max9296_parse_dt(struct i2c_client *client) + priv->gpio[7] = gpio7; + if (gpio8 >= 0) + priv->gpio[8] = gpio8; ++ if (strcmp(mbus, "dvp")) ++ priv->mbus = mbus; + + /* parse serializer crossbar setup */ + for (i = 0; i < 16; i++) { +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.h b/drivers/media/i2c/soc_camera/gmsl/max9296.h +index 800df43..985b77e 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9296.h ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.h +@@ -254,11 +254,11 @@ static inline int max9296_ser_write(struct max9296_link *link, int reg, int val) + return ret; + } + +-static inline int max9296_ser_read(struct max9296_link *link, int reg, u8 *val) ++static inline int max9296_ser_read(struct max9296_link *link, int reg, int *val) + { + int ret; + +- ret = regmap_read(link->regmap, reg, (int *)val); ++ ret = regmap_read(link->regmap, reg, val); + if (ret) + dev_dbg(&link->client->dev, "read register 0x%04x failed (%d)\n", reg, ret); + +@@ -276,6 +276,6 @@ static inline int max9296_ser_update_bits(struct max9296_link *link, int reg, in + return ret; + } + +-#define ser_read(reg, val) max9296_ser_read(link, reg, val) ++#define ser_read(reg, val) max9296_ser_read(link, reg, (int *)val) + #define ser_write(reg, val) max9296_ser_write(link, reg, val) + #define ser_update_bits(reg, mask, bits) max9296_ser_update_bits(link, reg, mask, bits) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0505-media-i2c-gmsl-parse-gmsl_mode-from-deserializer.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0505-media-i2c-gmsl-parse-gmsl_mode-from-deserializer.patch new file mode 100644 index 00000000..21edaa0a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0505-media-i2c-gmsl-parse-gmsl_mode-from-deserializer.patch @@ -0,0 +1,118 @@ +From afbb91288b32731dcf5249dcddeee019994364e2 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 29 Apr 2020 02:33:17 +0300 +Subject: [PATCH] media: i2c: gmsl: parse gmsl_mode from deserializer + +The gmsl1/2 mode needs to be parsed from deserizlier to +access 16 or 8 bit remote serializer. If not done then +imager may try to make 16 bit writes to 8 bit serizlier and +hence it will change it's address at reg=0 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gmsl/common.h | 13 +++++++++++-- + drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c | 2 +- + drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c | 2 +- + drivers/media/i2c/soc_camera/imagers/ov10635.c | 2 +- + drivers/media/i2c/soc_camera/imagers/ov2311.c | 2 +- + drivers/media/i2c/soc_camera/imagers/ov490.c | 2 +- + 6 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/common.h b/drivers/media/i2c/soc_camera/gmsl/common.h +index 98bb1c0..346db3ca 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/common.h ++++ b/drivers/media/i2c/soc_camera/gmsl/common.h +@@ -473,14 +473,23 @@ static inline int get_des_addr(struct i2c_client *client) + return to_i2c_client(mux_priv->muxc->dev)->addr; + } + +-static inline void setup_i2c_translator(struct i2c_client *client, int ser_addr, int sensor_addr, int gmsl_mode) ++static inline void setup_i2c_translator(struct i2c_client *client, int ser_addr, int sensor_addr) + { ++ int gmsl_mode = MODE_GMSL2; ++ + switch (get_des_id(client)) { + case MAX9286_ID: + case MAX9288_ID: +- case MAX9296A_ID: + case MAX96706_ID: ++ reg8_write_addr(client, ser_addr, 0x09, client->addr << 1); /* Sensor translated I2C address */ ++ reg8_write_addr(client, ser_addr, 0x0A, sensor_addr << 1); /* Sensor native I2C address */ ++ break; ++ case MAX9296A_ID: + case MAX96712_ID: ++ /* parse gmsl mode from deserializer */ ++ reg16_read_addr(client, get_des_addr(client), 6, &gmsl_mode); ++ gmsl_mode = !!(gmsl_mode & BIT(7)) + 1; ++ + if (gmsl_mode == MODE_GMSL1) { + reg8_write_addr(client, ser_addr, 0x09, client->addr << 1); /* Sensor translated I2C address */ + reg8_write_addr(client, ser_addr, 0x0A, sensor_addr << 1); /* Sensor native I2C address */ +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +index 1df3f3b..d2a6ff9 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +@@ -409,7 +409,7 @@ static int ap0101_initialize(struct i2c_client *client) + int i; + + for (i = 0; i < ARRAY_SIZE(ap0101_i2c_addr); i++) { +- setup_i2c_translator(client, priv->ser_addr, ap0101_i2c_addr[i], MODE_GMSL1); ++ setup_i2c_translator(client, priv->ser_addr, ap0101_i2c_addr[i]); + + /* check model ID */ + reg16_read16(client, AP0101_PID_REG, &pid); +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +index 35169b8..7b274ce 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +@@ -405,7 +405,7 @@ static int ap0201_initialize(struct i2c_client *client) + int i; + + for (i = 0; i < ARRAY_SIZE(ap0201_i2c_addr); i++) { +- setup_i2c_translator(client, priv->ser_addr, ap0201_i2c_addr[i], MODE_GMSL2); ++ setup_i2c_translator(client, priv->ser_addr, ap0201_i2c_addr[i]); + + /* check product ID */ + reg16_read16(client, AP0201_PID_REG, &pid); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov10635.c b/drivers/media/i2c/soc_camera/imagers/ov10635.c +index b9813f7..d21d357 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ov10635.c ++++ b/drivers/media/i2c/soc_camera/imagers/ov10635.c +@@ -506,7 +506,7 @@ static int ov10635_initialize(struct i2c_client *client) + u8 val = 0; + u16 pid = 0; + +- setup_i2c_translator(client, priv->ser_addr, OV10635_I2C_ADDR, MODE_GMSL1); ++ setup_i2c_translator(client, priv->ser_addr, OV10635_I2C_ADDR); + udelay(100); + + reg16_read(client, OV10635_PID_REGA, &val); +diff --git a/drivers/media/i2c/soc_camera/imagers/ov2311.c b/drivers/media/i2c/soc_camera/imagers/ov2311.c +index 764c261..d49ca96 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ov2311.c ++++ b/drivers/media/i2c/soc_camera/imagers/ov2311.c +@@ -395,7 +395,7 @@ static int ov2311_initialize(struct i2c_client *client) + u8 val = 0, rev = 0; + int ret = 0; + +- setup_i2c_translator(client, priv->ser_addr, OV2311_I2C_ADDR, MODE_GMSL2); ++ setup_i2c_translator(client, priv->ser_addr, OV2311_I2C_ADDR); + + reg16_read(client, OV2311_PIDA_REG, &val); + pid = val; +diff --git a/drivers/media/i2c/soc_camera/imagers/ov490.c b/drivers/media/i2c/soc_camera/imagers/ov490.c +index 3c47398..ff0d122 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ov490.c ++++ b/drivers/media/i2c/soc_camera/imagers/ov490.c +@@ -767,7 +767,7 @@ static int ov490_initialize(struct i2c_client *client) + u16 pid = 0; + int timeout, retry_timeout = 3; + +- setup_i2c_translator(client, priv->ser_addr, OV490_I2C_ADDR, MODE_GMSL1); ++ setup_i2c_translator(client, priv->ser_addr, OV490_I2C_ADDR); + + reg16_write(client, 0xFFFD, 0x80); + reg16_write(client, 0xFFFE, 0x80); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0506-media-i2c-imagers-add-AR0231-for-new-LVDS-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0506-media-i2c-imagers-add-AR0231-for-new-LVDS-support.patch new file mode 100644 index 00000000..c75293ae --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0506-media-i2c-imagers-add-AR0231-for-new-LVDS-support.patch @@ -0,0 +1,1843 @@ +From f113d62d104a24b6035d969bad8cb04af54d7534 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 10:54:49 +0300 +Subject: [PATCH] media: i2c: imagers: add AR0231 for new LVDS support + +This adds AR0231 into new LVDS drivers that support all enabled +serializers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/Makefile | 1 + + drivers/media/i2c/soc_camera/imagers/ar0231.c | 604 +++++++++++++++++++++ + drivers/media/i2c/soc_camera/imagers/ar0231.h | 35 ++ + drivers/media/i2c/soc_camera/imagers/ar0231_rev4.h | 344 ++++++++++++ + drivers/media/i2c/soc_camera/imagers/ar0231_rev6.h | 343 ++++++++++++ + drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h | 445 +++++++++++++++ + 5 files changed, 1771 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/imagers/ar0231.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/ar0231.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ar0231_rev4.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ar0231_rev6.h + create mode 100644 drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h + +diff --git a/drivers/media/i2c/soc_camera/imagers/Makefile b/drivers/media/i2c/soc_camera/imagers/Makefile +index 0d0ff32..eeb36fd 100644 +--- a/drivers/media/i2c/soc_camera/imagers/Makefile ++++ b/drivers/media/i2c/soc_camera/imagers/Makefile +@@ -1,7 +1,8 @@ + # SPDX-License-Identifier: GPL-2.0 ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0101_ar014x.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0201_ar023x.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ar0231.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov10635.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov2311.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov490.o +-obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0101_ar014x.o +-obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0201_ar023x.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += dummy.o +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231.c b/drivers/media/i2c/soc_camera/imagers/ar0231.c +new file mode 100644 +index 0000000..fc08793 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231.c +@@ -0,0 +1,604 @@ ++/* ++ * ON Semiconductor AR0231 sensor camera driver ++ * ++ * Copyright (C) 2018-220 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "ar0231.h" ++ ++static const int ar0231_i2c_addr[] = {0x10, 0x20}; ++ ++#define AR0231_PID_REG 0x3000 ++#define AR0231_REV_REG 0x31FE ++#define AR0231_PID 0x0354 ++ ++#define AR0231_MEDIA_BUS_FMT MEDIA_BUS_FMT_SGRBG12_1X12 ++ ++struct ar0231_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int init_complete; ++ u8 id[6]; ++ /* serializers */ ++ int ser_addr; ++ int trigger; ++}; ++ ++static int trigger = 0; ++module_param(trigger, int, 0644); ++MODULE_PARM_DESC(trigger, " Trigger gpio number (default: 0 - GPIO0) "); ++ ++static inline struct ar0231_priv *to_ar0231(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct ar0231_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct ar0231_priv, hdl)->sd; ++} ++ ++static int ar0231_set_regs(struct i2c_client *client, ++ const struct ar0231_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == AR0231_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ reg16_write16(client, regs[i].reg, regs[i].val); ++ } ++ ++ return 0; ++} ++ ++static void ar0231_otp_id_read(struct i2c_client *client) ++{ ++ struct ar0231_priv *priv = to_ar0231(client); ++ int i; ++ u16 val = 0; ++ ++ /* read camera id from ar014x OTP memory */ ++ reg16_write16(client, 0x3054, 0x400); ++ reg16_write16(client, 0x304a, 0x110); ++ usleep_range(25000, 25500); /* wait 25 ms */ ++ ++ for (i = 0; i < 6; i += 2) { ++ /* first 4 bytes are equal on all ar014x */ ++ reg16_read16(client, 0x3800 + i + 4, &val); ++ priv->id[i] = val >> 8; ++ priv->id[i + 1] = val & 0xff; ++ } ++} ++ ++ ++static int ar0231_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int ar0231_set_window(struct v4l2_subdev *sd) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ dev_dbg(&client->dev, "L=%d T=%d %dx%d\n", priv->rect.left, priv->rect.top, priv->rect.width, priv->rect.height); ++ ++ /* horiz crop start */ ++ reg16_write16(client, 0x3004, priv->rect.left + AR0231_X_START); ++ /* horiz crop end */ ++ reg16_write16(client, 0x3008, priv->rect.left + priv->rect.width - 1 + AR0231_X_START); ++ /* vert crop start */ ++ reg16_write16(client, 0x3002, priv->rect.top + AR0231_Y_START); ++ /* vert crop end */ ++ reg16_write16(client, 0x3006, priv->rect.top + priv->rect.height - 1 + AR0231_Y_START); ++ ++ return 0; ++}; ++ ++static int ar0231_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = AR0231_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int ar0231_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = AR0231_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int ar0231_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = AR0231_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int ar0231_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = AR0231_PID >> 8; ++ edid->edid[9] = AR0231_PID & 0xff; ++ ++ return 0; ++} ++ ++static int ar0231_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > AR0231_MAX_WIDTH) || ++ (rect->top + rect->height > AR0231_MAX_HEIGHT)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ ar0231_set_window(sd); ++ ++ return 0; ++} ++ ++static int ar0231_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = AR0231_MAX_WIDTH; ++ sel->r.height = AR0231_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = AR0231_MAX_WIDTH; ++ sel->r.height = AR0231_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int ar0231_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int ar0231_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ __be64 be_val; ++ ++ if (!reg->size) ++ reg->size = sizeof(u16); ++ if (reg->size > sizeof(reg->val)) ++ reg->size = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)&be_val, reg->size); ++ be_val = be_val << ((sizeof(be_val) - reg->size) * 8); ++ reg->val = be64_to_cpu(be_val); ++ ++ return ret; ++} ++ ++static int ar0231_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 size = reg->size; ++ int ret; ++ __be64 be_val; ++ ++ if (!size) ++ size = sizeof(u16); ++ if (size > sizeof(reg->val)) ++ size = sizeof(reg->val); ++ ++ be_val = cpu_to_be64(reg->val); ++ be_val = be_val >> ((sizeof(be_val) - size) * 8); ++ ret = reg16_write_n(client, (u16)reg->reg, (u8*)&be_val, size); ++ ++ return ret; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops ar0231_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = ar0231_g_register, ++ .s_register = ar0231_s_register, ++#endif ++}; ++ ++static int ar0231_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ int ret = -EINVAL; ++ u16 val = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ break; ++ case V4L2_CID_GAIN: ++ /* Digital gain */ ++ ret = reg16_write16(client, 0x3308, ctrl->val); ++ break; ++ case V4L2_CID_ANALOGUE_GAIN: ++ /* Analog gain */ ++ ret = reg16_write16(client, 0x3366, (ctrl->val << 8) | (ctrl->val << 4) | ctrl->val); ++ break; ++ case V4L2_CID_EXPOSURE: ++ /* T1 exposure */ ++ ret = reg16_write16(client, 0x3012, ctrl->val); ++ break; ++ case V4L2_CID_HFLIP: ++ ret = reg16_read16(client, 0x3040, &val); ++ if (ctrl->val) ++ val |= (1 << 14); ++ else ++ val &= ~(1 << 14); ++ ret |= reg16_write16(client, 0x3040, val); ++ break; ++ case V4L2_CID_VFLIP: ++ ret = reg16_read16(client, 0x3040, &val); ++ if (ctrl->val) ++ val |= (1 << 15); ++ else ++ val &= ~(1 << 15); ++ ret |= reg16_write16(client, 0x3040, val); ++ break; ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ ret = 0; ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops ar0231_ctrl_ops = { ++ .s_ctrl = ar0231_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops ar0231_video_ops = { ++ .s_stream = ar0231_s_stream, ++ .g_mbus_config = ar0231_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops ar0231_subdev_pad_ops = { ++ .get_edid = ar0231_get_edid, ++ .enum_mbus_code = ar0231_enum_mbus_code, ++ .get_selection = ar0231_get_selection, ++ .set_selection = ar0231_set_selection, ++ .get_fmt = ar0231_get_fmt, ++ .set_fmt = ar0231_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops ar0231_subdev_ops = { ++ .core = &ar0231_core_ops, ++ .video = &ar0231_video_ops, ++ .pad = &ar0231_subdev_pad_ops, ++}; ++ ++static ssize_t ar0231_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct ar0231_priv *priv = to_ar0231(client); ++ ++ ar0231_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_ar0231, S_IRUGO, ar0231_otp_id_show, NULL); ++ ++static int ar0231_initialize(struct i2c_client *client) ++{ ++ struct ar0231_priv *priv = to_ar0231(client); ++ u16 val = 0, pid = 0, rev = 0; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(ar0231_i2c_addr); i++) { ++ setup_i2c_translator(client, priv->ser_addr, ar0231_i2c_addr[i] << 1); ++ ++ /* check model ID */ ++ reg16_read16(client, AR0231_PID_REG, &pid); ++ if (pid == AR0231_PID) ++ break; ++ } ++ ++ if (pid != AR0231_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ /* check revision */ ++ reg16_read16(client, AR0231_REV_REG, &rev); ++ /* Read OTP IDs */ ++ ar0231_otp_id_read(client); ++ /* Program wizard registers */ ++ switch (get_des_id(client)) { ++ case UB960_ID: ++ ar0231_set_regs(client, ar0231_regs_wizard_rev7, ARRAY_SIZE(ar0231_regs_wizard_rev7)); ++ break; ++ case MAX9286_ID: ++ case MAX9296A_ID: ++ case MAX96712_ID: ++ ar0231_set_regs(client, ar0231_regs_wizard_rev6_dvp, ARRAY_SIZE(ar0231_regs_wizard_rev6_dvp)); ++ break; ++ } ++ /* Enable trigger */ ++ if (priv->trigger >= 0 && priv->trigger < 4) { ++ reg16_write16(client, 0x340A, (~(BIT(priv->trigger) << 4)) & 0xf0);/* GPIO_CONTROL1: GPIOn input enable */ ++ reg16_write16(client, 0x340C, (0x2 << 2*priv->trigger)); /* GPIO_CONTROL2: GPIOn is trigger */ ++ reg16_write16(client, 0x30CE, 0x0120); /* TRIGGER_MODE */ ++ //reg16_write16(client, 0x30DC, 0x0120); /* TRIGGER_DELAY */ ++ } ++ /* Enable stream */ ++ reg16_read16(client, 0x301a, &val); ++ val |= (1 << 8); /* GPI pins enable */ ++ val |= (1 << 2); ++ reg16_write16(client, 0x301a, val); ++ ++ dev_info(&client->dev, "ar0231 PID %x (rev%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, rev & 0xf, AR0231_MAX_WIDTH, AR0231_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id ar0231_id[] = { ++ { "ar0231", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, ar0231_id); ++ ++static const struct of_device_id ar0231_of_ids[] = { ++ { .compatible = "onnn,ar0231", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, ar0231_of_ids); ++ ++static int ar0231_parse_dt(struct device_node *np, struct ar0231_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ if (of_property_read_u32(np, "trigger", &priv->trigger)) ++ priv->trigger = 0; ++ ++ /* module params override dts */ ++ if (trigger) ++ priv->trigger = trigger; ++ ++ return 0; ++} ++ ++static int ar0231_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct ar0231_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &ar0231_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_GAIN, 1, 0x7ff, 1, 0x200); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0xa); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_EXPOSURE, 1, 0x600, 1, 0x144); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &ar0231_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = ar0231_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = ar0231_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = AR0231_MAX_WIDTH; ++ priv->rect.height = AR0231_MAX_HEIGHT; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_ar0231) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int ar0231_remove(struct i2c_client *client) ++{ ++ struct ar0231_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_ar0231); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver ar0231_i2c_driver = { ++ .driver = { ++ .name = "ar0231", ++ .of_match_table = ar0231_of_ids, ++ }, ++ .probe = ar0231_probe, ++ .remove = ar0231_remove, ++ .id_table = ar0231_id, ++}; ++ ++module_i2c_driver(ar0231_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for AR0231"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231.h b/drivers/media/i2c/soc_camera/imagers/ar0231.h +new file mode 100644 +index 0000000..e455b38 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231.h +@@ -0,0 +1,35 @@ ++/* ++ * ON Semiconductor AR0231 sensor camera wizard 1928x1208@30/BGGR/BT601 ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define AR0231_DISPLAY_PATTERN_FIXED ++//#define AR0231_DISPLAY_PATTERN_COLOR_BAR ++ ++#define AR0231_MAX_WIDTH 1920 ++#define AR0231_MAX_HEIGHT 1200 ++ ++#define AR0231_DELAY 0xffff ++ ++#define AR0231_SENSOR_WIDTH 1928 ++#define AR0231_SENSOR_HEIGHT 1208 ++ ++#define AR0231_X_START ((AR0231_SENSOR_WIDTH - AR0231_MAX_WIDTH) / 2) ++#define AR0231_Y_START ((AR0231_SENSOR_HEIGHT - AR0231_MAX_HEIGHT) / 2) ++#define AR0231_X_END (AR0231_X_START + AR0231_MAX_WIDTH - 1) ++#define AR0231_Y_END (AR0231_Y_START + AR0231_MAX_HEIGHT - 1) ++ ++struct ar0231_reg { ++ u16 reg; ++ u16 val; ++}; ++ ++#include "ar0231_rev4.h" ++#include "ar0231_rev6.h" ++#include "ar0231_rev7.h" +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231_rev4.h b/drivers/media/i2c/soc_camera/imagers/ar0231_rev4.h +new file mode 100644 +index 0000000..e18b96d +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231_rev4.h +@@ -0,0 +1,344 @@ ++/* ++ * ON Semiconductor AR0231 sensor camera wizard 1920x1080@30/BGGR/MIPI ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++static const struct ar0231_reg ar0231_regs_wizard_rev4_dvp[] = { ++{0x301A, 0x0001}, // reset ++{0x301A, 0x10D8}, // Stream off and setup parallel ++{0x3070, 0x0000}, // 1: Solid color test pattern, ++ // 2: Full color bar test pattern, ++ // 3: Fade to grey color bar test pattern, ++ //256: Walking 1 test pattern (12 bit) ++{0x3072, 0x0123}, // R ++{0x3074, 0x0456}, // G(GR row) ++{0x3076, 0x0abc}, // B ++{0x3078, 0x0def}, // G(GB row) ++#ifdef AR0231_DISPLAY_PATTERN_FIXED ++{0x3070, 0x0001}, ++#endif ++#ifdef AR0231_DISPLAY_PATTERN_COLOR_BAR ++{0x3070, 0x0002}, ++#endif ++ ++//Recommended Settings ++{0x3366, 0x6666}, // ANALOG_GAIN ++{0x3056, 0x0080}, // GREEN1_GAIN ++{0x305C, 0x0080}, // GREEN2_GAIN ++{0x3058, 0x0080}, // BLUE_GAIN ++{0x305A, 0x0080}, // RED_GAIN ++{0x3044, 0x0400}, // DARK_CONTROL ++{0x30BA, 0x1021}, // DIGITAL_CTRL ++{0x318E, 0x0200}, // DLO_CONTROL0 ++{0x32EA, 0x3C0A}, // RESERVED_MFR_32EA ++{0x32EA, 0x3C0E}, // RESERVED_MFR_32EA ++{0x3362, 0x0000}, // DC_GAIN ++{0x3364, 0x0060}, // RESERVED_MFR_3364 ++{0x3370, 0x0231}, // DBLC_CONTROL ++{0x3372, 0x700F}, // RESERVED_MFR_3372 ++{0x3386, 0x0000}, // RESERVED_MFR_3386 ++{0x3C04, 0x0E80}, // RESERVED_MFR_3C04 ++{0x3F90, 0x06E1}, // TEMPVSENS0_TMG_CTRL ++{0x3F92, 0x06E1}, // TEMPVSENS1_TMG_CTRL ++{0x3502, 0x0808}, // RESERVED_MFR_3502 ++{0x3502, 0x0808}, // RESERVED_MFR_3502 ++{0x350E, 0xFF10}, // RESERVED_MFR_350E ++{0x3506, 0x4444}, // RESERVED_MFR_3506 ++{0x3508, 0x4444}, // RESERVED_MFR_3508 ++{0x350A, 0x4465}, // RESERVED_MFR_350A ++{0x350C, 0x055F}, // RESERVED_MFR_350C ++{0x3230, 0x0317}, // FINE_CORRECTION ++{0x3232, 0x0552}, // FINE_CORRECTION2 ++{0x3234, 0x078D}, // FINE_CORRECTION3 ++{0x3566, 0x9D38}, // RESERVED_MFR_3566 ++{0x3518, 0x1FFE}, // RESERVED_MFR_3518 ++{0x3520, 0xC688}, // RESERVED_MFR_3520 ++{0x3522, 0x88C0}, // RESERVED_MFR_3522 ++{0x3524, 0xC0C6}, // RESERVED_MFR_3524 ++{0x352C, 0xC6C6}, // RESERVED_MFR_352C ++{0x3528, 0x0900}, // RESERVED_MFR_3528 ++{0x3528, 0x9900}, // RESERVED_MFR_3528 ++{0x3528, 0x9909}, // RESERVED_MFR_3528 ++{0x3528, 0x9999}, // RESERVED_MFR_3528 ++{0x352A, 0x081F}, // RESERVED_MFR_352A ++{0x352E, 0x0001}, // RESERVED_MFR_352E ++{0x352E, 0x0011}, // RESERVED_MFR_352E ++{0x3530, 0x0400}, // RESERVED_MFR_3530 ++{0x3530, 0x4400}, // RESERVED_MFR_3530 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF02}, // RESERVED_MFR_3536 ++{0x3536, 0xFF06}, // RESERVED_MFR_3536 ++{0x3536, 0xFF06}, // RESERVED_MFR_3536 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x353A, 0x9000}, // RESERVED_MFR_353A ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x32EC, 0x72A1}, // RESERVED_MFR_32EC ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3542, 0x584B}, // RESERVED_MFR_3542 ++{0x3542, 0x464B}, // RESERVED_MFR_3542 ++{0x3544, 0x565A}, // RESERVED_MFR_3544 ++{0x3544, 0x4B5A}, // RESERVED_MFR_3544 ++{0x3546, 0x545A}, // RESERVED_MFR_3546 ++{0x3546, 0x5A5A}, // RESERVED_MFR_3546 ++{0x3548, 0x6430}, // RESERVED_MFR_3548 ++{0x3556, 0x101F}, // RESERVED_MFR_3556 ++{0x3566, 0x9D38}, // RESERVED_MFR_3566 ++{0x3566, 0x1D38}, // RESERVED_MFR_3566 ++{0x3566, 0x1D28}, // RESERVED_MFR_3566 ++{0x3566, 0x1128}, // RESERVED_MFR_3566 ++{0x3566, 0x1328}, // RESERVED_MFR_3566 ++{0x3566, 0x3328}, // RESERVED_MFR_3566 ++ ++//Sequencer Update ++{0x2512, 0x8000}, // SEQ_CTRL_PORT ++{0x2510, 0x0905}, // SEQ_DATA_PORT ++{0x2510, 0x3350}, // SEQ_DATA_PORT ++{0x2510, 0x2004}, // SEQ_DATA_PORT ++{0x2510, 0x1460}, // SEQ_DATA_PORT ++{0x2510, 0x1578}, // SEQ_DATA_PORT ++{0x2510, 0x1360}, // SEQ_DATA_PORT ++{0x2510, 0x7B24}, // SEQ_DATA_PORT ++{0x2510, 0xFF24}, // SEQ_DATA_PORT ++{0x2510, 0xFF24}, // SEQ_DATA_PORT ++{0x2510, 0xEA24}, // SEQ_DATA_PORT ++{0x2510, 0x1022}, // SEQ_DATA_PORT ++{0x2510, 0x2410}, // SEQ_DATA_PORT ++{0x2510, 0x155A}, // SEQ_DATA_PORT ++{0x2510, 0x1342}, // SEQ_DATA_PORT ++{0x2510, 0x1400}, // SEQ_DATA_PORT ++{0x2510, 0x24FF}, // SEQ_DATA_PORT ++{0x2510, 0x24FF}, // SEQ_DATA_PORT ++{0x2510, 0x24EA}, // SEQ_DATA_PORT ++{0x2510, 0x2324}, // SEQ_DATA_PORT ++{0x2510, 0x647A}, // SEQ_DATA_PORT ++{0x2510, 0x2404}, // SEQ_DATA_PORT ++{0x2510, 0x052C}, // SEQ_DATA_PORT ++{0x2510, 0x400A}, // SEQ_DATA_PORT ++{0x2510, 0xFF0A}, // SEQ_DATA_PORT ++{0x2510, 0xFF0A}, // SEQ_DATA_PORT ++{0x2510, 0x0408}, // SEQ_DATA_PORT ++{0x2510, 0x3851}, // SEQ_DATA_PORT ++{0x2510, 0x1440}, // SEQ_DATA_PORT ++{0x2510, 0x0004}, // SEQ_DATA_PORT ++{0x2510, 0x0801}, // SEQ_DATA_PORT ++{0x2510, 0x0408}, // SEQ_DATA_PORT ++{0x2510, 0x1180}, // SEQ_DATA_PORT ++{0x2510, 0x15DC}, // SEQ_DATA_PORT ++{0x2510, 0x134C}, // SEQ_DATA_PORT ++{0x2510, 0x1002}, // SEQ_DATA_PORT ++{0x2510, 0x1016}, // SEQ_DATA_PORT ++{0x2510, 0x1181}, // SEQ_DATA_PORT ++{0x2510, 0x1189}, // SEQ_DATA_PORT ++{0x2510, 0x1056}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x0D08}, // SEQ_DATA_PORT ++{0x2510, 0x0913}, // SEQ_DATA_PORT ++{0x2510, 0x13C8}, // SEQ_DATA_PORT ++{0x2510, 0x092B}, // SEQ_DATA_PORT ++{0x2510, 0x1588}, // SEQ_DATA_PORT ++{0x2510, 0x1388}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x11D9}, // SEQ_DATA_PORT ++{0x2510, 0x091D}, // SEQ_DATA_PORT ++{0x2510, 0x1441}, // SEQ_DATA_PORT ++{0x2510, 0x0903}, // SEQ_DATA_PORT ++{0x2510, 0x1214}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x10D6}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x1212}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x11DD}, // SEQ_DATA_PORT ++{0x2510, 0x11D9}, // SEQ_DATA_PORT ++{0x2510, 0x1056}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x11DB}, // SEQ_DATA_PORT ++{0x2510, 0x0915}, // SEQ_DATA_PORT ++{0x2510, 0x119B}, // SEQ_DATA_PORT ++{0x2510, 0x090F}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x121A}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x1460}, // SEQ_DATA_PORT ++{0x2510, 0x1250}, // SEQ_DATA_PORT ++{0x2510, 0x1076}, // SEQ_DATA_PORT ++{0x2510, 0x10E6}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x15AB}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x13A8}, // SEQ_DATA_PORT ++{0x2510, 0x1240}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x0923}, // SEQ_DATA_PORT ++{0x2510, 0x158D}, // SEQ_DATA_PORT ++{0x2510, 0x138D}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x0B09}, // SEQ_DATA_PORT ++{0x2510, 0x0108}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x1440}, // SEQ_DATA_PORT ++{0x2510, 0x091D}, // SEQ_DATA_PORT ++{0x2510, 0x1588}, // SEQ_DATA_PORT ++{0x2510, 0x1388}, // SEQ_DATA_PORT ++{0x2510, 0x092D}, // SEQ_DATA_PORT ++{0x2510, 0x1066}, // SEQ_DATA_PORT ++{0x2510, 0x0905}, // SEQ_DATA_PORT ++{0x2510, 0x0C08}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x1441}, // SEQ_DATA_PORT ++{0x2510, 0x090D}, // SEQ_DATA_PORT ++{0x2510, 0x10E6}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x1262}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x11BF}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x1066}, // SEQ_DATA_PORT ++{0x2510, 0x11FB}, // SEQ_DATA_PORT ++{0x2510, 0x0935}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x1263}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x1400}, // SEQ_DATA_PORT ++{0x2510, 0x1510}, // SEQ_DATA_PORT ++{0x2510, 0x11B8}, // SEQ_DATA_PORT ++{0x2510, 0x12A0}, // SEQ_DATA_PORT ++{0x2510, 0x1200}, // SEQ_DATA_PORT ++{0x2510, 0x1026}, // SEQ_DATA_PORT ++{0x2510, 0x1000}, // SEQ_DATA_PORT ++{0x2510, 0x1342}, // SEQ_DATA_PORT ++{0x2510, 0x1100}, // SEQ_DATA_PORT ++{0x2510, 0x7A06}, // SEQ_DATA_PORT ++{0x2510, 0x0926}, // SEQ_DATA_PORT ++{0x2510, 0x0507}, // SEQ_DATA_PORT ++{0x2510, 0x0841}, // SEQ_DATA_PORT ++{0x2510, 0x3750}, // SEQ_DATA_PORT ++{0x2510, 0x2C2C}, // SEQ_DATA_PORT ++{0x2510, 0xFE02}, // SEQ_DATA_PORT ++{0x2510, 0xFE14}, // SEQ_DATA_PORT ++{0x3566, 0x3328}, // RESERVED_MFR_3566 ++{0x350C, 0x055F}, // RESERVED_MFR_350C ++{0x32D0, 0x3A02}, // RESERVED_MFR_32D0 ++{0x32D2, 0x3508}, // RESERVED_MFR_32D2 ++{0x32D4, 0x3702}, // RESERVED_MFR_32D4 ++{0x32D6, 0x3C04}, // RESERVED_MFR_32D6 ++{0x32DC, 0x370A}, // RESERVED_MFR_32DC ++ ++//Parallel Timing Setup ++{0x302A, 0x0009}, // VT_PIX_CLK_DIV ++{0x302C, 0x0001}, // VT_SYS_CLK_DIV ++{0x302E, 0x0003}, // PRE_PLL_CLK_DIV ++{0x3030, 0x0058}, // PLL_MULTIPLIER ++{0x3036, 0x0008}, // OP_WORD_CLK_DIV ++{0x3038, 0x0001}, // OP_SYS_CLK_DIV ++{0x30B0, 0x0A00}, // DIGITAL_TEST ++ ++//Readout Mode Configuration ++{0x30A2, 0x0001}, // X_ODD_INC_ ++{0x30A6, 0x0001}, // Y_ODD_INC_ ++{0x3040, 0x0000}, // READ_MODE ++{0x3044, 0x0400}, // DARK_CONTROL ++#ifdef AR0231_EMBEDDED_LINE ++{0x3064, 0x1982}, // SMIA_TEST ++#else ++{0x3064, 0x1802}, // SMIA_TEST ++#endif ++{0x33E0, 0x0880}, // RESERVED_MFR_33E0 ++{0x3180, 0x0080}, // RESERVED_MFR_3180 ++{0x33E4, 0x0080}, // RESERVED_MFR_33E4 ++ ++#if 1 ++{0x3004, AR0231_X_START}, // X_ADDR_START_ ++{0x3008, AR0231_X_END}, // X_ADDR_END_ ++{0x3002, AR0231_Y_START}, // Y_ADDR_START_ ++{0x3006, AR0231_Y_END}, // Y_ADDR_END_ ++{0x3402, 0x0000 | AR0231_MAX_WIDTH}, // X_OUTPUT_CONTROL ++{0x3404, 0x0000 | AR0231_MAX_HEIGHT}, // Y_OUTPUT_CONTROL ++#else ++{0x3004, 0}, // X_ADDR_START_ ++{0x3008, 0x0787}, // X_ADDR_END_ ++{0x3002, 0x0000}, // Y_ADDR_START_ ++{0x3006, 0x04B7}, // Y_ADDR_END_ ++{0x3402, 0x0788}, // RESERVED_MFR_3402 ++{0x3402, 0x0F10}, // RESERVED_MFR_3402 ++{0x3404, 0x0440}, // RESERVED_MFR_3404 ++{0x3404, 0x0970}, // RESERVED_MFR_3404 ++#endif ++{0x3032, 0x0000}, // SCALING_MODE ++{0x3400, 0x0010}, // RESERVED_MFR_3400 ++ ++//3exp Timing and Exposure ++{0x3082, 0x0008}, // OPERATION_MODE_CTRL ++{0x30BA, 0x11E2}, // DIGITAL_CTRL ++{0x300A, 0x05AF}, // FRAME_LENGTH_LINES_ ++{0x300C, 0x07BA}, // LINE_LENGTH_PCK_ ++{0x3042, 0x0000}, // EXTRA_DELAY ++{0x3238, 0x0222}, // EXPOSURE_RATIO ++{0x1008, 0x0374}, // FINE_INTEGRATION_TIME_MIN ++{0x100C, 0x05AF}, // FINE_INTEGRATION_TIME2_MIN ++{0x100E, 0x07EA}, // FINE_INTEGRATION_TIME3_MIN ++{0x1010, 0x0139}, // FINE_INTEGRATION_TIME4_MIN ++{0x3012, 0x0163}, // COARSE_INTEGRATION_TIME_ ++{0x3014, 0x06A6}, // FINE_INTEGRATION_TIME_ ++{0x321E, 0x06A6}, // FINE_INTEGRATION_TIME2 ++{0x3222, 0x06A6}, // FINE_INTEGRATION_TIME3 ++{0x30B0, 0x0B02}, // DIGITAL_TEST ++{0x32EA, 0x3C0E}, // RESERVED_MFR_32EA ++{0x32EC, 0x72A1}, // RESERVED_MFR_32EC ++ ++//Parallel HDR 12 bit Output ++{0x31D0, 0x0001}, // COMPANDING ++{0x31AE, 0x0001}, // SERIAL_FORMAT ++{0x31AC, 0x140C}, // DATA_FORMAT_BITS ++ ++#if 0 // no need for front only camera ++/* Enable trigger input */ ++{0x340A, 0x00E0}, // GPIO_CONTROL1: GPIO1 is trigger ++{0x340C, 0x0002}, // GPIO_CONTROL2: GPIO1 is trigger ++{0x30CE, 0x0120}, // TRIGGER_MODE ++//{0x30DC, 0x0120}, // TRIGGER_DELAY ++{0x301A, 0x01D8}, // GPI pins enable ++#endif ++ ++{0x301A, 0x01DC}, // RESET_REGISTER - stream on ++ ++#if 1 ++{0x300A, AR0231_SENSOR_HEIGHT + 225}, // FRAME_LENGTH_LINES_ ++{0x300C, AR0231_SENSOR_WIDTH + 120}, // LINE_LENGTH_PCK_ ++/* the sequence must be updated to use following timings, now it is a hack */ ++{0x1008, 0x0fff}, // FINE_INTEGRATION_TIME_MIN ++{0x100C, 0x0fff}, // FINE_INTEGRATION_TIME2_MIN ++{0x100E, 0x0fff}, // FINE_INTEGRATION_TIME3_MIN ++{0x1010, 0x0fff}, // FINE_INTEGRATION_TIME4_MIN ++#endif ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231_rev6.h b/drivers/media/i2c/soc_camera/imagers/ar0231_rev6.h +new file mode 100644 +index 0000000..b5b8cb2 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231_rev6.h +@@ -0,0 +1,343 @@ ++/* ++ * ON Semiconductor AR0231 sensor camera wizard 1920x1080@30/BGGR/MIPI ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++/* Parallel Timing Setup 27MHz In 88 MHz Out */ ++static const struct ar0231_reg ar0231_regs_wizard_rev6_dvp[] = { ++{0x301A, 0x0001}, // reset ++{0x301A, 0x10D8}, // Stream off and setup parallel ++{0x3070, 0x0000}, // 1: Solid color test pattern, ++ // 2: Full color bar test pattern, ++ // 3: Fade to grey color bar test pattern, ++ //256: Walking 1 test pattern (12 bit) ++{0x3072, 0x0123}, // R ++{0x3074, 0x0456}, // G(GR row) ++{0x3076, 0x0abc}, // B ++{0x3078, 0x0def}, // G(GB row) ++#ifdef AR0231_DISPLAY_PATTERN_FIXED ++{0x3070, 0x0001}, ++#endif ++#ifdef AR0231_DISPLAY_PATTERN_COLOR_BAR ++{0x3070, 0x0002}, ++#endif ++ ++//Recommended Settings ++{0x3056, 0x0080}, // GREEN1_GAIN ++{0x305C, 0x0080}, // GREEN2_GAIN ++{0x3058, 0x0080}, // BLUE_GAIN ++{0x305A, 0x0080}, // RED_GAIN ++{0x3138, 0x000B}, // OTPM_TCFG_OPT ++{0x3372, 0xF54F}, // RESERVED_MFR_3372 ++{0x337A, 0x0D70}, // RESERVED_MFR_337A ++{0x337E, 0x1FFD}, // RESERVED_MFR_337E ++{0x3382, 0x00C0}, // RESERVED_MFR_3382 ++{0x3C04, 0x0E80}, // RESERVED_MFR_3C04 ++{0x3F90, 0x06E1}, // RESERVED_MFR_3F90 ++{0x3F92, 0x06E1}, // RESERVED_MFR_3F92 ++{0x350E, 0x1F14}, // RESERVED_MFR_350E ++{0x350E, 0xFF10}, // RESERVED_MFR_350E ++{0x3506, 0x4444}, // RESERVED_MFR_3506 ++{0x3508, 0x4444}, // RESERVED_MFR_3508 ++{0x350A, 0x4465}, // RESERVED_MFR_350A ++{0x350C, 0x055F}, // RESERVED_MFR_350C ++{0x3566, 0x9D38}, // RESERVED_MFR_3566 ++{0x3518, 0x1FFE}, // RESERVED_MFR_3518 ++{0x3520, 0xC688}, // RESERVED_MFR_3520 ++{0x3522, 0x88C0}, // RESERVED_MFR_3522 ++{0x3524, 0xC0C6}, // RESERVED_MFR_3524 ++{0x352C, 0xC6C6}, // RESERVED_MFR_352C ++{0x3528, 0x0900}, // RESERVED_MFR_3528 ++{0x3528, 0x9900}, // RESERVED_MFR_3528 ++{0x3528, 0x9909}, // RESERVED_MFR_3528 ++{0x3528, 0x9999}, // RESERVED_MFR_3528 ++{0x352A, 0x089F}, // RESERVED_MFR_352A ++{0x352E, 0x0001}, // RESERVED_MFR_352E ++{0x352E, 0x0011}, // RESERVED_MFR_352E ++{0x3530, 0x0400}, // RESERVED_MFR_3530 ++{0x3530, 0x4400}, // RESERVED_MFR_3530 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF00}, // RESERVED_MFR_3536 ++{0x3536, 0xFF02}, // RESERVED_MFR_3536 ++{0x3536, 0xFF06}, // RESERVED_MFR_3536 ++{0x3536, 0xFF06}, // RESERVED_MFR_3536 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x3538, 0xFFFF}, // RESERVED_MFR_3538 ++{0x353A, 0x9000}, // RESERVED_MFR_353A ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x353C, 0x3F00}, // RESERVED_MFR_353C ++{0x32EC, 0x72A1}, // RESERVED_MFR_32EC ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3540, 0xC637}, // RESERVED_MFR_3540 ++{0x3542, 0x584B}, // RESERVED_MFR_3542 ++{0x3542, 0x464B}, // RESERVED_MFR_3542 ++{0x3544, 0x565A}, // RESERVED_MFR_3544 ++{0x3544, 0x4B5A}, // RESERVED_MFR_3544 ++{0x3546, 0x545A}, // RESERVED_MFR_3546 ++{0x3546, 0x5A5A}, // RESERVED_MFR_3546 ++{0x3548, 0x6400}, // RESERVED_MFR_3548 ++{0x3556, 0x101F}, // RESERVED_MFR_3556 ++{0x3566, 0x9D38}, // RESERVED_MFR_3566 ++{0x3566, 0x1D38}, // RESERVED_MFR_3566 ++{0x3566, 0x1D28}, // RESERVED_MFR_3566 ++{0x3566, 0x1128}, // RESERVED_MFR_3566 ++{0x3566, 0x1328}, // RESERVED_MFR_3566 ++{0x3566, 0x3328}, // RESERVED_MFR_3566 ++{0x3528, 0xDDDD}, // RESERVED_MFR_3528 ++ ++//Sequencer Update ++{0x2512, 0x8000}, // SEQ_CTRL_PORT ++{0x2510, 0x0905}, // SEQ_DATA_PORT ++{0x2510, 0x3350}, // SEQ_DATA_PORT ++{0x2510, 0x2004}, // SEQ_DATA_PORT ++{0x2510, 0x1460}, // SEQ_DATA_PORT ++{0x2510, 0x1578}, // SEQ_DATA_PORT ++{0x2510, 0x1360}, // SEQ_DATA_PORT ++{0x2510, 0x7B24}, // SEQ_DATA_PORT ++{0x2510, 0xFF24}, // SEQ_DATA_PORT ++{0x2510, 0xFF24}, // SEQ_DATA_PORT ++{0x2510, 0xEA24}, // SEQ_DATA_PORT ++{0x2510, 0x1022}, // SEQ_DATA_PORT ++{0x2510, 0x2410}, // SEQ_DATA_PORT ++{0x2510, 0x155A}, // SEQ_DATA_PORT ++{0x2510, 0x1342}, // SEQ_DATA_PORT ++{0x2510, 0x1400}, // SEQ_DATA_PORT ++{0x2510, 0x24FF}, // SEQ_DATA_PORT ++{0x2510, 0x24FF}, // SEQ_DATA_PORT ++{0x2510, 0x24EA}, // SEQ_DATA_PORT ++{0x2510, 0x2324}, // SEQ_DATA_PORT ++{0x2510, 0x647A}, // SEQ_DATA_PORT ++{0x2510, 0x2404}, // SEQ_DATA_PORT ++{0x2510, 0x052C}, // SEQ_DATA_PORT ++{0x2510, 0x400A}, // SEQ_DATA_PORT ++{0x2510, 0xFF0A}, // SEQ_DATA_PORT ++{0x2510, 0xFF0A}, // SEQ_DATA_PORT ++{0x2510, 0x1808}, // SEQ_DATA_PORT ++{0x2510, 0x3851}, // SEQ_DATA_PORT ++{0x2510, 0x1440}, // SEQ_DATA_PORT ++{0x2510, 0x0004}, // SEQ_DATA_PORT ++{0x2510, 0x0801}, // SEQ_DATA_PORT ++{0x2510, 0x0408}, // SEQ_DATA_PORT ++{0x2510, 0x1180}, // SEQ_DATA_PORT ++{0x2510, 0x15DC}, // SEQ_DATA_PORT ++{0x2510, 0x134C}, // SEQ_DATA_PORT ++{0x2510, 0x1002}, // SEQ_DATA_PORT ++{0x2510, 0x1016}, // SEQ_DATA_PORT ++{0x2510, 0x1181}, // SEQ_DATA_PORT ++{0x2510, 0x1189}, // SEQ_DATA_PORT ++{0x2510, 0x1056}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x0D08}, // SEQ_DATA_PORT ++{0x2510, 0x0913}, // SEQ_DATA_PORT ++{0x2510, 0x13C8}, // SEQ_DATA_PORT ++{0x2510, 0x092B}, // SEQ_DATA_PORT ++{0x2510, 0x1588}, // SEQ_DATA_PORT ++{0x2510, 0x1388}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x11D9}, // SEQ_DATA_PORT ++{0x2510, 0x091D}, // SEQ_DATA_PORT ++{0x2510, 0x1441}, // SEQ_DATA_PORT ++{0x2510, 0x0903}, // SEQ_DATA_PORT ++{0x2510, 0x1214}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x10D6}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x1212}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x11DD}, // SEQ_DATA_PORT ++{0x2510, 0x11D9}, // SEQ_DATA_PORT ++{0x2510, 0x1056}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x11DB}, // SEQ_DATA_PORT ++{0x2510, 0x0915}, // SEQ_DATA_PORT ++{0x2510, 0x119B}, // SEQ_DATA_PORT ++{0x2510, 0x090F}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x121A}, // SEQ_DATA_PORT ++{0x2510, 0x1210}, // SEQ_DATA_PORT ++{0x2510, 0x1460}, // SEQ_DATA_PORT ++{0x2510, 0x1250}, // SEQ_DATA_PORT ++{0x2510, 0x1076}, // SEQ_DATA_PORT ++{0x2510, 0x10E6}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x15AB}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x13A8}, // SEQ_DATA_PORT ++{0x2510, 0x1240}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x0923}, // SEQ_DATA_PORT ++{0x2510, 0x158D}, // SEQ_DATA_PORT ++{0x2510, 0x138D}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x0B09}, // SEQ_DATA_PORT ++{0x2510, 0x0108}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x1440}, // SEQ_DATA_PORT ++{0x2510, 0x091D}, // SEQ_DATA_PORT ++{0x2510, 0x1588}, // SEQ_DATA_PORT ++{0x2510, 0x1388}, // SEQ_DATA_PORT ++{0x2510, 0x092D}, // SEQ_DATA_PORT ++{0x2510, 0x1066}, // SEQ_DATA_PORT ++{0x2510, 0x0905}, // SEQ_DATA_PORT ++{0x2510, 0x0C08}, // SEQ_DATA_PORT ++{0x2510, 0x090B}, // SEQ_DATA_PORT ++{0x2510, 0x1441}, // SEQ_DATA_PORT ++{0x2510, 0x090D}, // SEQ_DATA_PORT ++{0x2510, 0x10E6}, // SEQ_DATA_PORT ++{0x2510, 0x0901}, // SEQ_DATA_PORT ++{0x2510, 0x1262}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x11BF}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x1066}, // SEQ_DATA_PORT ++{0x2510, 0x11FB}, // SEQ_DATA_PORT ++{0x2510, 0x0935}, // SEQ_DATA_PORT ++{0x2510, 0x11BB}, // SEQ_DATA_PORT ++{0x2510, 0x1263}, // SEQ_DATA_PORT ++{0x2510, 0x1260}, // SEQ_DATA_PORT ++{0x2510, 0x1400}, // SEQ_DATA_PORT ++{0x2510, 0x1510}, // SEQ_DATA_PORT ++{0x2510, 0x11B8}, // SEQ_DATA_PORT ++{0x2510, 0x12A0}, // SEQ_DATA_PORT ++{0x2510, 0x1200}, // SEQ_DATA_PORT ++{0x2510, 0x1026}, // SEQ_DATA_PORT ++{0x2510, 0x1000}, // SEQ_DATA_PORT ++{0x2510, 0x1342}, // SEQ_DATA_PORT ++{0x2510, 0x1100}, // SEQ_DATA_PORT ++{0x2510, 0x7A06}, // SEQ_DATA_PORT ++{0x2510, 0x0915}, // SEQ_DATA_PORT ++{0x2510, 0x0507}, // SEQ_DATA_PORT ++{0x2510, 0x0841}, // SEQ_DATA_PORT ++{0x2510, 0x3750}, // SEQ_DATA_PORT ++{0x2510, 0x2C2C}, // SEQ_DATA_PORT ++{0x2510, 0xFE05}, // SEQ_DATA_PORT ++{0x2510, 0xFE13}, // SEQ_DATA_PORT ++{0x1008, 0x0361}, // FINE_INTEGRATION_TIME_MIN ++{0x100C, 0x0589}, // FINE_INTEGRATION_TIME2_MIN ++{0x100E, 0x07B1}, // FINE_INTEGRATION_TIME3_MIN ++{0x1010, 0x0139}, // FINE_INTEGRATION_TIME4_MIN ++{0x3230, 0x0304}, // FINE_CORRECTION ++{0x3232, 0x052C}, // FINE_CORRECTION2 ++{0x3234, 0x0754}, // FINE_CORRECTION3 ++{0x3236, 0x00DC}, // FINE_CORRECTION4 ++{0x3566, 0x3328}, // RESERVED_MFR_3566 ++{0x350C, 0x055F}, // RESERVED_MFR_350C ++{0x32D0, 0x3A02}, // RESERVED_MFR_32D0 ++{0x32D2, 0x3508}, // RESERVED_MFR_32D2 ++{0x32D4, 0x3702}, // RESERVED_MFR_32D4 ++{0x32D6, 0x3C04}, // RESERVED_MFR_32D6 ++{0x32DC, 0x370A}, // RESERVED_MFR_32DC ++ ++//Parallel Timing Setup 27MHz In 88 MHz Out ++{0x302A, 0x0009}, // VT_PIX_CLK_DIV ++{0x302C, 0x0001}, // VT_SYS_CLK_DIV ++{0x302E, 0x0003}, // PRE_PLL_CLK_DIV ++{0x3030, 0x0058}, // PLL_MULTIPLIER ++{0x3036, 0x0008}, // OP_WORD_CLK_DIV ++{0x3038, 0x0001}, // OP_SYS_CLK_DIV ++{0x30B0, 0x0B02}, // DIGITAL_TEST ++ ++//Readout Mode Configuration ++{0x30A2, 0x0001}, // X_ODD_INC_ ++{0x30A6, 0x0001}, // Y_ODD_INC_ ++{0x3040, 0x0000}, // READ_MODE ++{0x3082, 0x0008}, // OPERATION_MODE_CTRL ++{0x30BA, 0x11E2}, // DIGITAL_CTRL ++{0x3044, 0x0400}, // DARK_CONTROL ++#ifdef AR0231_EMBEDDED_LINE ++{0x3064, 0x1982}, // SMIA_TEST ++#else ++{0x3064, 0x1802}, // SMIA_TEST ++#endif ++{0x33E0, 0x0880}, // RESERVED_MFR_33E0 ++{0x3180, 0x0080}, // RESERVED_MFR_3180 ++{0x33E4, 0x0080}, // RESERVED_MFR_33E4 ++{0x33E0, 0x0C80}, // RESERVED_MFR_33E0 ++ ++#if 1 ++{0x3004, AR0231_X_START}, // X_ADDR_START_ ++{0x3008, AR0231_X_END}, // X_ADDR_END_ ++{0x3002, AR0231_Y_START}, // Y_ADDR_START_ ++{0x3006, AR0231_Y_END}, // Y_ADDR_END_ ++{0x3402, 0x0000 | AR0231_MAX_WIDTH}, // X_OUTPUT_CONTROL ++{0x3404, 0x0000 | AR0231_MAX_HEIGHT}, // Y_OUTPUT_CONTROL ++#else ++{0x3004, 0}, // X_ADDR_START_ ++{0x3008, 0x0787}, // X_ADDR_END_ ++{0x3002, 0x0000}, // Y_ADDR_START_ ++{0x3006, 0x04B7}, // Y_ADDR_END_ ++{0x3402, 0x0788}, // RESERVED_MFR_3402 ++{0x3402, 0x0F10}, // RESERVED_MFR_3402 ++{0x3404, 0x0440}, // RESERVED_MFR_3404 ++{0x3404, 0x0970}, // RESERVED_MFR_3404 ++#endif ++{0x3032, 0x0000}, // SCALING_MODE ++{0x3400, 0x0010}, // RESERVED_MFR_3400 ++ ++//3exp Timing and Exposure ++{0x3082, 0x0008}, // OPERATION_MODE_CTRL ++{0x30BA, 0x11E2}, // DIGITAL_CTRL ++{0x300A, 0x05CA}, // FRAME_LENGTH_LINES_ ++{0x300C, 0x07BA}, // LINE_LENGTH_PCK_ ++{0x3042, 0x0000}, // EXTRA_DELAY ++{0x3238, 0x0222}, // EXPOSURE_RATIO ++{0x3012, 0x0163}, // COARSE_INTEGRATION_TIME_ ++{0x3014, 0x08CC}, // FINE_INTEGRATION_TIME_ ++{0x321E, 0x08CC}, // FINE_INTEGRATION_TIME2 ++{0x3222, 0x0254}, // FINE_INTEGRATION_TIME3 ++{0x30B0, 0x0A00}, // DIGITAL_TEST ++{0x32EA, 0x3C0E}, // RESERVED_MFR_32EA ++{0x32EC, 0x72A1}, // RESERVED_MFR_32EC ++ ++//Parallel HDR 12 bit Output ++{0x31D0, 0x0001}, // COMPANDING ++{0x31AE, 0x0001}, // SERIAL_FORMAT ++{0x31AC, 0x140C}, // DATA_FORMAT_BITS ++ ++#if 0 // no need for front only camera ++/* Enable trigger input */ ++{0x340A, 0x00E0}, // GPIO_CONTROL1: GPIO1 is trigger ++{0x340C, 0x0002}, // GPIO_CONTROL2: GPIO1 is trigger ++{0x30CE, 0x0120}, // TRIGGER_MODE ++//{0x30DC, 0x0120}, // TRIGGER_DELAY ++{0x301A, 0x01D8}, // GPI pins enable ++#endif ++ ++{0x301A, 0x01DC}, // RESET_REGISTER - stream on ++ ++#if 1 ++{0x300A, AR0231_SENSOR_HEIGHT + 225}, // FRAME_LENGTH_LINES_ ++{0x300C, AR0231_SENSOR_WIDTH + 120}, // LINE_LENGTH_PCK_ ++/* the sequence must be updated to use following timings, now it is a hack */ ++{0x1008, 0x0fff}, // FINE_INTEGRATION_TIME_MIN ++{0x100C, 0x0fff}, // FINE_INTEGRATION_TIME2_MIN ++{0x100E, 0x0fff}, // FINE_INTEGRATION_TIME3_MIN ++{0x1010, 0x0fff}, // FINE_INTEGRATION_TIME4_MIN ++#endif ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h b/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h +new file mode 100644 +index 0000000..f3485f5 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h +@@ -0,0 +1,445 @@ ++/* ++ * ON Semiconductor AR0231 sensor camera wizard 1928x1208@30/BGGR/MIPI ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++/* 3Exp HDR Full Resolution Mode MIPI 4lane 12bit 30FPS, XCLK=27MHz */ ++static const struct ar0231_reg ar0231_regs_wizard_rev7[] = { ++{0x301A, 0x18}, // MIPI, stream OFF ++{AR0231_DELAY, 200}, // Wait 200ms ++ ++{0x3070, 0x0000}, // 1: Solid color test pattern, ++ // 2: Full color bar test pattern, ++ // 3: Fade to grey color bar test pattern, ++ //256: Walking 1 test pattern (12 bit) ++{0x3072, 0x0123}, // R ++{0x3074, 0x0456}, // G(GR row) ++{0x3076, 0x0abc}, // B ++{0x3078, 0x0def}, // G(GB row) ++#ifdef AR0231_DISPLAY_PATTERN_FIXED ++{0x3070, 0x0001}, ++#endif ++#ifdef AR0231_DISPLAY_PATTERN_COLOR_BAR ++{0x3070, 0x0002}, ++#endif ++{AR0231_DELAY, 100}, // Wait 100ms ++ ++#if 1 /* Sensor Setup */ ++#if 1 /* Recommended Settings */ ++{0x3092, 0x0C24}, ++{0x337A, 0x0C80}, ++{0x3520, 0x1288}, ++{0x3522, 0x880C}, ++{0x3524, 0x0C12}, ++{0x352C, 0x1212}, ++{0x354A, 0x007F}, ++{0x350C, 0x055C}, ++{0x3506, 0x3333}, ++{0x3508, 0x3333}, ++{0x3100, 0x4000}, ++{0x3280, 0x0FA0}, ++{0x3282, 0x0FA0}, ++{0x3284, 0x0FA0}, ++{0x3286, 0x0FA0}, ++{0x3288, 0x0FA0}, ++{0x328A, 0x0FA0}, ++{0x328C, 0x0FA0}, ++{0x328E, 0x0FA0}, ++{0x3290, 0x0FA0}, ++{0x3292, 0x0FA0}, ++{0x3294, 0x0FA0}, ++{0x3296, 0x0FA0}, ++{0x3298, 0x0FA0}, ++{0x329A, 0x0FA0}, ++{0x329C, 0x0FA0}, ++{0x329E, 0x0FA0}, ++#endif /* Recommended Settings */ ++ ++#if 1 /* Sequencer Update */ ++{0x2512, 0x8000}, ++{0x2510, 0x0905}, ++{0x2510, 0x3350}, ++{0x2510, 0x2004}, ++{0x2510, 0x1460}, ++{0x2510, 0x1578}, ++{0x2510, 0x0901}, ++{0x2510, 0x7B24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xFF24}, ++{0x2510, 0xEA24}, ++{0x2510, 0x1022}, ++{0x2510, 0x2410}, ++{0x2510, 0x155A}, ++{0x2510, 0x0901}, ++{0x2510, 0x1400}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24FF}, ++{0x2510, 0x24EA}, ++{0x2510, 0x2324}, ++{0x2510, 0x647A}, ++{0x2510, 0x2404}, ++{0x2510, 0x052C}, ++{0x2510, 0x400A}, ++{0x2510, 0xFF0A}, ++{0x2510, 0xFF0A}, ++{0x2510, 0x1008}, ++{0x2510, 0x3851}, ++{0x2510, 0x1440}, ++{0x2510, 0x0004}, ++{0x2510, 0x0801}, ++{0x2510, 0x0408}, ++{0x2510, 0x1180}, ++{0x2510, 0x2652}, ++{0x2510, 0x1518}, ++{0x2510, 0x0906}, ++{0x2510, 0x1348}, ++{0x2510, 0x1002}, ++{0x2510, 0x1016}, ++{0x2510, 0x1181}, ++{0x2510, 0x1189}, ++{0x2510, 0x1056}, ++{0x2510, 0x1210}, ++{0x2510, 0x0901}, ++{0x2510, 0x0D09}, ++{0x2510, 0x1413}, ++{0x2510, 0x8809}, ++{0x2510, 0x2B15}, ++{0x2510, 0x8809}, ++{0x2510, 0x0311}, ++{0x2510, 0xD909}, ++{0x2510, 0x1214}, ++{0x2510, 0x4109}, ++{0x2510, 0x0312}, ++{0x2510, 0x1409}, ++{0x2510, 0x0110}, ++{0x2510, 0xD612}, ++{0x2510, 0x1012}, ++{0x2510, 0x1212}, ++{0x2510, 0x1011}, ++{0x2510, 0xDD11}, ++{0x2510, 0xD910}, ++{0x2510, 0x5609}, ++{0x2510, 0x1511}, ++{0x2510, 0xDB09}, ++{0x2510, 0x1511}, ++{0x2510, 0x9B09}, ++{0x2510, 0x0F11}, ++{0x2510, 0xBB12}, ++{0x2510, 0x1A12}, ++{0x2510, 0x1014}, ++{0x2510, 0x6012}, ++{0x2510, 0x5010}, ++{0x2510, 0x7610}, ++{0x2510, 0xE609}, ++{0x2510, 0x0812}, ++{0x2510, 0x4012}, ++{0x2510, 0x6009}, ++{0x2510, 0x290B}, ++{0x2510, 0x0904}, ++{0x2510, 0x1440}, ++{0x2510, 0x0923}, ++{0x2510, 0x15C8}, ++{0x2510, 0x13C8}, ++{0x2510, 0x092C}, ++{0x2510, 0x1588}, ++{0x2510, 0x1388}, ++{0x2510, 0x0C09}, ++{0x2510, 0x0C14}, ++{0x2510, 0x4109}, ++{0x2510, 0x1112}, ++{0x2510, 0x6212}, ++{0x2510, 0x6011}, ++{0x2510, 0xBF11}, ++{0x2510, 0xBB10}, ++{0x2510, 0x6611}, ++{0x2510, 0xFB09}, ++{0x2510, 0x3511}, ++{0x2510, 0xBB12}, ++{0x2510, 0x6312}, ++{0x2510, 0x6014}, ++{0x2510, 0x0015}, ++{0x2510, 0x0011}, ++{0x2510, 0xB812}, ++{0x2510, 0xA012}, ++{0x2510, 0x0010}, ++{0x2510, 0x2610}, ++{0x2510, 0x0013}, ++{0x2510, 0x0011}, ++{0x2510, 0x0008}, ++{0x2510, 0x3053}, ++{0x2510, 0x4215}, ++{0x2510, 0x4013}, ++{0x2510, 0x4010}, ++{0x2510, 0x0210}, ++{0x2510, 0x1611}, ++{0x2510, 0x8111}, ++{0x2510, 0x8910}, ++{0x2510, 0x5612}, ++{0x2510, 0x1009}, ++{0x2510, 0x010D}, ++{0x2510, 0x0815}, ++{0x2510, 0xC015}, ++{0x2510, 0xD013}, ++{0x2510, 0x5009}, ++{0x2510, 0x1313}, ++{0x2510, 0xD009}, ++{0x2510, 0x0215}, ++{0x2510, 0xC015}, ++{0x2510, 0xC813}, ++{0x2510, 0xC009}, ++{0x2510, 0x0515}, ++{0x2510, 0x8813}, ++{0x2510, 0x8009}, ++{0x2510, 0x0213}, ++{0x2510, 0x8809}, ++{0x2510, 0x0411}, ++{0x2510, 0xC909}, ++{0x2510, 0x0814}, ++{0x2510, 0x0109}, ++{0x2510, 0x0B11}, ++{0x2510, 0xD908}, ++{0x2510, 0x1400}, ++{0x2510, 0x091A}, ++{0x2510, 0x1440}, ++{0x2510, 0x0903}, ++{0x2510, 0x1214}, ++{0x2510, 0x0901}, ++{0x2510, 0x10D6}, ++{0x2510, 0x1210}, ++{0x2510, 0x1212}, ++{0x2510, 0x1210}, ++{0x2510, 0x11DD}, ++{0x2510, 0x11D9}, ++{0x2510, 0x1056}, ++{0x2510, 0x0917}, ++{0x2510, 0x11DB}, ++{0x2510, 0x0913}, ++{0x2510, 0x11FB}, ++{0x2510, 0x0905}, ++{0x2510, 0x11BB}, ++{0x2510, 0x121A}, ++{0x2510, 0x1210}, ++{0x2510, 0x1460}, ++{0x2510, 0x1250}, ++{0x2510, 0x1076}, ++{0x2510, 0x10E6}, ++{0x2510, 0x0901}, ++{0x2510, 0x15A8}, ++{0x2510, 0x0901}, ++{0x2510, 0x13A8}, ++{0x2510, 0x1240}, ++{0x2510, 0x1260}, ++{0x2510, 0x0925}, ++{0x2510, 0x13AD}, ++{0x2510, 0x0902}, ++{0x2510, 0x0907}, ++{0x2510, 0x1588}, ++{0x2510, 0x0901}, ++{0x2510, 0x138D}, ++{0x2510, 0x0B09}, ++{0x2510, 0x0914}, ++{0x2510, 0x4009}, ++{0x2510, 0x0B13}, ++{0x2510, 0x8809}, ++{0x2510, 0x1C0C}, ++{0x2510, 0x0920}, ++{0x2510, 0x1262}, ++{0x2510, 0x1260}, ++{0x2510, 0x11BF}, ++{0x2510, 0x11BB}, ++{0x2510, 0x1066}, ++{0x2510, 0x090A}, ++{0x2510, 0x11FB}, ++{0x2510, 0x093B}, ++{0x2510, 0x11BB}, ++{0x2510, 0x1263}, ++{0x2510, 0x1260}, ++{0x2510, 0x1400}, ++{0x2510, 0x1508}, ++{0x2510, 0x11B8}, ++{0x2510, 0x12A0}, ++{0x2510, 0x1200}, ++{0x2510, 0x1026}, ++{0x2510, 0x1000}, ++{0x2510, 0x1300}, ++{0x2510, 0x1100}, ++{0x2510, 0x437A}, ++{0x2510, 0x0609}, ++{0x2510, 0x0B05}, ++{0x2510, 0x0708}, ++{0x2510, 0x4137}, ++{0x2510, 0x502C}, ++{0x2510, 0x2CFE}, ++{0x2510, 0x15FE}, ++{0x2510, 0x0C2C}, ++ ++{0x32e6, 0xe0}, ++{0x1008, 0x36f}, ++{0x100c, 0x58f}, ++{0x100e, 0x7af}, ++{0x1010, 0x14f}, ++ ++{0x3230, 0x312}, ++{0x3232, 0x532}, ++{0x3234, 0x752}, ++{0x3236, 0xf2}, ++#endif /* Sequencer Update */ ++ ++//{0x3566, 0x3328}, // clear bit6 ++{0x32D0, 0x3A02}, ++{0x32D2, 0x3508}, ++{0x32D4, 0x3702}, ++{0x32D6, 0x3C04}, ++{0x32DC, 0x370A}, ++{0x30B0, 0x800}, // clear bit9 ++#endif /* Sensor Setup */ ++ ++#if 1 /* Serial 12-bit Timing Setup */ ++/* PCLK=24Mhz/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ ++/* PCLK=24Mhz/2 *44/1/12 *2= 88Mhz - TI serializers */ ++{0x302E, 2}, // pre_pll_clk_div ++{0x3030, 44}, // pll_multiplier ++{0x302C, 1}, // vt_sys_clk_div (P1 divider) ++{0x302A, 6}, // vt_pix_clk_div (P2 divider) ++{0x3038, 1}, // op_sys_clk_div (P3 divider) ++{0x3036, 12}, // op_word_clk_div (P4 divider) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++#endif /* Serial 12-bit Timing Setup */ ++ ++#if 1 /* Readout Mode Configuration */ ++{0x30A2, 1}, // x_odd_inc_ ++{0x30A6, 1}, // y_odd_inc_ ++{0x3040, 0}, // read_mode ++//{0x3082, 0x8}, // operation_mode_ctrl ++//{0x30BA, 0x11E2}, // digital_ctrl ++{0x3044, 0x400}, // dark_control ++#ifdef AR0231_EMBEDDED_LINE ++{0x3064, 0x1982}, // SMIA_TEST ++#else ++{0x3064, 0x1802}, // SMIA_TEST ++#endif ++//{0x33E0, 0xC80}, ++//{0x3180, 0x80}, ++//{0x33E4, 0x80}, ++#endif /* Readout Mode Configuration */ ++ ++#if 1 /* Full Res FOV */ ++{0x3004, AR0231_X_START}, // X_ADDR_START_ ++{0x3008, AR0231_X_END}, // X_ADDR_END_ ++{0x3002, AR0231_Y_START}, // Y_ADDR_START_ ++{0x3006, AR0231_Y_END}, // Y_ADDR_END_ ++{0x3032, 0x0}, // scaling_mode ++{0x3400, 0x10}, ++{0x3402, 0x0000 | AR0231_MAX_WIDTH}, // X_OUTPUT_CONTROL ++{0x3404, 0x0000 | AR0231_MAX_HEIGHT}, // Y_OUTPUT_CONTROL ++#endif /* Full Res FOV */ ++ ++#if 1 /* 3exp Timing and Exposure */ ++{0x3082, 0x8}, // operation_mode_ctrl ++{0x30BA, 0x11E2}, // digital_ctrl: num_exp_max=2 ++ ++/* Row and Pixel Timing */ ++{0x300C, 1674}, // line_length_pck_ ++{0x300A, 1314}, // frame_length_lines_ ++{0x3042, 0}, // extra_delay ++ ++/* Exposure Settings */ ++//{0x3238, 0x222}, // exposure_ratio ++{0x3012, 355}, // coarse_integration_time_ ++{0x3014, 1874}, // fine_integration_time_ ++{0x321E, 1874}, // fine_integration_time2 ++{0x3222, 1874}, // fine_integration_time3 ++{0x30B0, 0x800}, // digital_test: set bit11 ++{0x32EA, 0x3C0E}, ++{0x32EC, 0x72A1}, ++#endif /* 3exp Timing and Exposure - Serial */ ++ ++#if 1 /* HDR 12 bit Output */ ++{0x31D0, 1}, // companding ++{0x31AC, 0x140C}, // data_format_bits: RAW20, OUT12 ++#endif /* HDR 12 bit Output */ ++ ++#if 1 /* MIPI 12 bit Settings */ ++{0x31AE, 0x204}, // serial_format: MIPI 4 lanes ++{0x3342, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x3346, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334A, 0x2c2c}, // default, DT=0x12, DT=0x2C ++{0x334E, 0x2c2c}, // default, DT=0x12, DT=0x2C ++//{0x3344, 0x0011}, // default, VC=0 ++//{0x3348, 0x0111}, // default, VC=1 ++//{0x334C, 0x0211}, // default, VC=2 ++//{0x3350, 0x0311}, // default, VC=3 ++//{0x31B0, 0x49}, // frame_preamble ++//{0x31B2, 0x33}, // line_preamble ++{0x31B4, 0x2185}, ++{0x31B6, 0x1146}, ++{0x31B8, 0x3047}, ++{0x31BA, 0x186}, ++{0x31BC, 0x805}, ++#endif /* MIPI 12 bit Settings */ ++ ++/* FPS = 105MHz / reg0x300A / reg0x300C * (DES_XTAL/27MHz), DES_XTAL=23.5MHz */ ++{0x300A, AR0231_SENSOR_HEIGHT + 100}, // Frame_length_Lines ++{0x300C, AR0231_SENSOR_WIDTH + 550}, // Line_length_pck ++{0x3012, 0x144}, //Integration_time ++ ++#if 0 /* Enable trigger input */ ++{0x340A, 0x00E0}, // GPIO_CONTROL1: GPIO0 is trigger ++{0x340C, 0x0002}, // GPIO_CONTROL2: GPIO0 is trigger ++{0x30CE, 0x0120}, // TRIGGER_MODE ++//{0x30DC, 0x0120}, // TRIGGER_DELAY ++{0x301A, 0x0118}, // GPI pins enable ++#endif ++}; ++ ++/* 3Exp HDR Full Resolution Mode Parallel 12bit 30FPS, XCLK=24MHz */ ++static const struct ar0231_reg ar0231_regs_wizard_rev7_dvp[] = { ++#if 1 /* Parallel Timing Setup */ ++/* PCLK=24Mhz/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 */ ++/* PCLK=24Mhz/3 *88/1/8 = 88Mhz - TI serializers */ ++{0x302A, 8}, // vt_pix_clk_div (P2 divider) ++{0x302C, 1}, // vt_sys_clk_div (P1 divider) ++{0x302E, 3}, // pre_pll_clk_div ++{0x3030, 88}, // pll_multiplier ++{0x3036, 8}, // op_word_clk_div (P4 divider) ++{0x3038, 1}, // op_sys_clk_div (P3 divider) ++{0x30B0, 0x800}, // digital_test: pll_complete_bypass=0 ++#endif ++ ++#if 1 /* 3exp Timing and Exposure - Parallel */ ++{0x3082, 0x8}, // operation_mode_ctrl ++{0x30BA, 0x11E2}, // digital_ctrl: num_exp_max=2 ++ ++/* Row and Pixel Timing */ ++#if 1 ++{0x300A, AR0231_SENSOR_HEIGHT + 225}, // frame_length_lines_ ++{0x300C, AR0231_SENSOR_WIDTH + 120}, // line_length_pck_ ++#else ++{0x300C, 1978}, // line_length_pck_ ++{0x300A, 1482}, // frame_length_lines_ ++#endif ++{0x3042, 0}, // extra_delay ++ ++/* Exposure Settings */ ++//{0x3238, 0x222}, // exposure_ratio ++//{0x3012, 355}, // coarse_integration_time_ ++{0x3014, 2178}, // fine_integration_time_ ++{0x321E, 2178}, // fine_integration_time2 ++{0x3222, 2178}, // fine_integration_time3 ++{0x30B0, 0x800}, // digital_test: set bit11 ++{0x32EA, 0x3C0E}, ++{0x32EC, 0x72A1}, ++#endif /* 3exp Timing and Exposure - Parallel */ ++ ++#if 1 /* Parallel HDR 12 bit Output */ ++{0x31AE, 0x001}, // serial_format: ++#endif ++ ++{0x301A, 0x01d8}, // RESET_REGISTER parallel pins enable ++}; +-- +2.7.4 + + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0507-media-i2c-ap0101-ap0201-fix-vendor-name-fsin-fix-on-.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0507-media-i2c-ap0101-ap0201-fix-vendor-name-fsin-fix-on-.patch new file mode 100644 index 00000000..45b07d44 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0507-media-i2c-ap0101-ap0201-fix-vendor-name-fsin-fix-on-.patch @@ -0,0 +1,97 @@ +From 9d8155ae4fbf9f480c993447f6f4753ec2f9c3bf Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 11:03:16 +0300 +Subject: [PATCH] media: i2c: ap0101,ap0201: fix vendor name, fsin fix on ap0102 + +This fixes vendor name, fix fsync on ap0102 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c | 14 ++++++++++++-- + drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h | 8 ++++++++ + drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c | 6 ++++-- + 3 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +index d2a6ff9..526d4ea 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.c +@@ -27,7 +27,9 @@ static const int ap0101_i2c_addr[] = {0x5d, 0x48}; + + #define AP0101_PID_REG 0x0000 + #define AP0101_REV_REG 0x0058 ++#define AP0100_PID 0x0062 + #define AP0101_PID 0x0160 ++#define AP0102_PID 0x0064 + + #define AP0101_MEDIA_BUS_FMT MEDIA_BUS_FMT_YUYV8_2X8 + +@@ -434,7 +436,15 @@ static int ap0101_initialize(struct i2c_client *client) + priv->max_height = AP0101_MAX_HEIGHT; + #endif + /* Program wizard registers */ +- ap0101_set_regs(client, ap0101_regs_wizard, ARRAY_SIZE(ap0101_regs_wizard)); ++ switch (pid) { ++ case AP0100_PID: ++ case AP0101_PID: ++ ap0101_set_regs(client, ap0101_regs_wizard, ARRAY_SIZE(ap0101_regs_wizard)); ++ break; ++ case AP0102_PID: ++ ap0101_set_regs(client, ap0102_regs_wizard, ARRAY_SIZE(ap0102_regs_wizard)); ++ break; ++ } + /* Read OTP IDs */ + ap0101_otp_id_read(client); + +@@ -471,7 +481,7 @@ static const struct i2c_device_id ap0101_id[] = { + MODULE_DEVICE_TABLE(i2c, ap0101_id); + + static const struct of_device_id ap0101_of_ids[] = { +- { .compatible = "onsemi,ap0101", }, ++ { .compatible = "onnn,ap0101", }, + { } + }; + MODULE_DEVICE_TABLE(of, ap0101_of_ids); +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h +index d0d6205..5755b87 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h ++++ b/drivers/media/i2c/soc_camera/imagers/ap0101_ar014x.h +@@ -26,3 +26,11 @@ static const struct ap0101_reg ap0101_regs_wizard[] = { + {0x0040, 0x8100}, + {AP0101_DELAY, 100}, + }; ++ ++static const struct ap0101_reg ap0102_regs_wizard[] = { ++/* enable FSIN */ ++{0xc890, 0x0303}, ++{0xfc00, 0x2800}, ++{0x0040, 0x8100}, ++{AP0101_DELAY, 100}, ++}; +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +index 7b274ce..10bf6f7 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +@@ -27,7 +27,9 @@ static const int ap0201_i2c_addr[] = {0x5d, 0x48}; + + #define AP0201_PID_REG 0x0000 + #define AP0201_REV_REG 0x0058 +-#define AP0201_PID 0x0064 ++#define AP0200_PID 0x0062 ++#define AP0201_PID 0x0160 ++#define AP0202_PID 0x0064 + + #define AP0201_MEDIA_BUS_FMT MEDIA_BUS_FMT_YUYV8_2X8 + +@@ -446,7 +448,7 @@ static const struct i2c_device_id ap0201_id[] = { + MODULE_DEVICE_TABLE(i2c, ap0201_id); + + static const struct of_device_id ap0201_of_ids[] = { +- { .compatible = "onsemi,ap0201", }, ++ { .compatible = "onnn,ap0201", }, + { } + }; + MODULE_DEVICE_TABLE(of, ap0201_of_ids); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0508-media-i2c-fix-indentation.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0508-media-i2c-fix-indentation.patch new file mode 100644 index 00000000..98a00d29 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0508-media-i2c-fix-indentation.patch @@ -0,0 +1,46 @@ +From b6a59d9176b872d7247b5829f5d3112376fc4877 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 11:05:05 +0300 +Subject: [PATCH] media: i2c: fix indentation + +Indentation fixes + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/fpdlink/ti9x4.c | 2 +- + drivers/media/i2c/soc_camera/gmsl/max96712.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +index a50201d..56b5ed8a 100644 +--- a/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c ++++ b/drivers/media/i2c/soc_camera/fpdlink/ti9x4.c +@@ -218,7 +218,7 @@ static void ti9x4_initial_setup(struct i2c_client *client) + #else + reg8_write(client, 0x19, 2 >> 8); /* FrameSync high time MSB */ + reg8_write(client, 0x1a, 2 & 0xff); /* FrameSync high time LSB */ +- reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ ++ reg8_write(client, 0x1b, priv->fs_time >> 8); /* FrameSync low time MSB */ + reg8_write(client, 0x1c, priv->fs_time & 0xff); /* FrameSync low time LSB */ + reg8_write(client, 0x18, 0x00); /* Disable FrameSync - must be enabled after all cameras are set up */ + #endif +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.c b/drivers/media/i2c/soc_camera/gmsl/max96712.c +index 02ccc38..c4cdf0e 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.c +@@ -494,9 +494,9 @@ static int max96712_gmsl1_link_serializer_setup(struct max96712_priv *priv, int + /* GMSL setup */ + ser_write(0x0d, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ + ser_write(0x07, (priv->hven ? 0x04 : 0) | /* HS/VS encoding enable */ +- (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ +- (0x80) | /* DBL=1 in serializer */ +- (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ ++ (priv->pclk_rising_edge ? 0 : 0x10) | /* PCLK edge */ ++ (0x80) | /* DBL=1 in serializer */ ++ (priv->bws ? 0x20 : 0)); /* BWS 32/24-bit */ + usleep_range(2000, 2500); + ser_write(0x02, 0xff); /* spread spectrum +-4%, pclk range automatic, Gbps automatic */ + usleep_range(2000, 2500); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0509-media-i2c-fix-broken-old-LVDS-imagers.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0509-media-i2c-fix-broken-old-LVDS-imagers.patch new file mode 100644 index 00000000..4bd48b82 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0509-media-i2c-fix-broken-old-LVDS-imagers.patch @@ -0,0 +1,33 @@ +From e24f11423cea901af73faaacbd3c1614f4be2954 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 11:06:12 +0300 +Subject: [PATCH] media: i2c: fix broken old LVDS imagers + +This fixes broken old LVDS imagers from support. +We temporary need to support these + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/Makefile b/drivers/media/i2c/soc_camera/Makefile +index 5e08254..8640bac 100644 +--- a/drivers/media/i2c/soc_camera/Makefile ++++ b/drivers/media/i2c/soc_camera/Makefile +@@ -11,10 +11,11 @@ obj-$(CONFIG_SOC_CAMERA_OV9640) += ov9640.o + obj-$(CONFIG_SOC_CAMERA_OV9740) += ov9740.o + obj-$(CONFIG_SOC_CAMERA_RJ54N1) += rj54n1cb0c.o + obj-$(CONFIG_SOC_CAMERA_TW9910) += tw9910.o +-obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov106xx.o + obj-$(CONFIG_SOC_CAMERA_IMX219) += imx219.o + + obj-$(CONFIG_SOC_CAMERA_AR0147) += ar0147.o + obj-y += imagers/ + obj-y += gmsl/ + obj-y += fpdlink/ ++ ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov106xx.o +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0510-arm64-dts-renesas-add-camera-dtsi-file.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0510-arm64-dts-renesas-add-camera-dtsi-file.patch new file mode 100644 index 00000000..eda17d66 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0510-arm64-dts-renesas-add-camera-dtsi-file.patch @@ -0,0 +1,120 @@ +From 048fcef8ad30f5a5158b3f3d2c2cf1c63fe51b90 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 11:15:37 +0300 +Subject: [PATCH] arm64: dts: renesas: add camera dtsi file + +This adds camera dtsi file for common data + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/camera.dtsi | 30 ++++++++++++++++++++++ + .../dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts | 22 +--------------- + .../boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts | 22 +--------------- + 3 files changed, 32 insertions(+), 42 deletions(-) + create mode 100644 arch/arm64/boot/dts/renesas/camera.dtsi + +diff --git a/arch/arm64/boot/dts/renesas/camera.dtsi b/arch/arm64/boot/dts/renesas/camera.dtsi +new file mode 100644 +index 0000000..0216327 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/camera.dtsi +@@ -0,0 +1,30 @@ ++/* ++ * Device Tree Source for the LVDS cameras ++ * ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#define COMPATIBLE_CAMERAS \ ++ "onnn,ar0140", \ ++ "onnn,ar0143", \ ++ "onnn,ar0147", \ ++ "onnn,ar0231", \ ++ "onnn,ar0233", \ ++ "onnn,ap0101", \ ++ "onnn,ap0201", \ ++ "ovti,ov10635", \ ++ "ovti,ov10640", \ ++ "ovti,ov2311", \ ++ "ovti,ov2775", \ ++ "ovti,ov490", \ ++ "ovti,ov495", \ ++ "ovti,ox01d10", \ ++ "ovti,ox03a", \ ++ "sony,imx390", \ ++ "sony,isx016", \ ++ "sony,isx019", \ ++ "dummy,camera" +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +index 155b73f..4d284b1 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +@@ -12,27 +12,7 @@ + #include + /* FDPLink output */ + //#include "vb-fdplink-output.dtsi" +- +-#define COMPATIBLE_CAMERAS \ +-"onsemi,ar0140", \ +-"onsemi,ar0143", \ +-"onsemi,ar0147", \ +-"onsemi,ar0231", \ +-"onsemi,ar0233", \ +-"onsemi,ap0101", \ +-"onsemi,ap0201", \ +-"ovti,ov10635", \ +-"ovti,ov10640", \ +-"ovti,ov2311", \ +-"ovti,ov2775", \ +-"ovti,ov490", \ +-"ovti,ov495", \ +-"ovti,ox01d10", \ +-"ovti,ox03a", \ +-"sony,imx390", \ +-"sony,isx016", \ +-"sony,isx019", \ +-"dummy,camera" ++#include "camera.dtsi" + + / { + model = "Renesas V3HSK 2x2ch GMSL2 Videobox board based on r8a7798"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +index 310061f..ac2d825 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +@@ -12,27 +12,7 @@ + #include + /* FDPLink output */ + //#include "vb-fdplink-output.dtsi" +- +-#define COMPATIBLE_CAMERAS \ +-"onsemi,ar0140", \ +-"onsemi,ar0143", \ +-"onsemi,ar0147", \ +-"onsemi,ar0231", \ +-"onsemi,ar0233", \ +-"onsemi,ap0101", \ +-"onsemi,ap0201", \ +-"ovti,ov10635", \ +-"ovti,ov10640", \ +-"ovti,ov2311", \ +-"ovti,ov2775", \ +-"ovti,ov490", \ +-"ovti,ov495", \ +-"ovti,ox01d10", \ +-"ovti,ox03a", \ +-"sony,imx390", \ +-"sony,isx016", \ +-"sony,isx019", \ +-"dummy,camera" ++#include "camera.dtsi" + + / { + model = "Renesas V3HSK 4ch GMSL2 Videobox board based on r8a77980"; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0511-media-i2c-ap0201-detect-AP0200-AP0202.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0511-media-i2c-ap0201-detect-AP0200-AP0202.patch new file mode 100644 index 00000000..dccf8c03 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0511-media-i2c-ap0201-detect-AP0200-AP0202.patch @@ -0,0 +1,85 @@ +From bc27eaaaddb5ebc94daa3a7f91d753162de944b9 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 16:33:49 +0300 +Subject: [PATCH 1/2] media: i2c: ap0201: detect AP0200, AP0202 + +This allows to detect AP0200 and AP0202 imagers + +Signed-off-by: Vladimir Barinov +--- + .../media/i2c/soc_camera/imagers/ap0201_ar023x.c | 6 +++--- + drivers/media/i2c/soc_camera/imagers/dummy.c | 24 +++++++++++----------- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +index 10bf6f7..ad18e2e 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +@@ -411,11 +411,11 @@ static int ap0201_initialize(struct i2c_client *client) + + /* check product ID */ + reg16_read16(client, AP0201_PID_REG, &pid); +- if (pid == AP0201_PID) ++ if (pid == AP0200_PID || pid == AP0201_PID || pid == AP0202_PID) + break; + } + +- if (pid != AP0201_PID) { ++ if (pid != AP0200_PID && pid != AP0201_PID && pid != AP0202_PID) { + dev_dbg(&client->dev, "Product ID error %x\n", pid); + return -ENODEV; + } +@@ -436,7 +436,7 @@ static int ap0201_initialize(struct i2c_client *client) + /* Read OTP IDs */ + ap0201_otp_id_read(client); + +- dev_info(&client->dev, "ap0201 PID %x (%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ dev_info(&client->dev, "ap020X PID %x (%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, rev, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + return 0; + } +diff --git a/drivers/media/i2c/soc_camera/imagers/dummy.c b/drivers/media/i2c/soc_camera/imagers/dummy.c +index d213fff..e4070fc 100644 +--- a/drivers/media/i2c/soc_camera/imagers/dummy.c ++++ b/drivers/media/i2c/soc_camera/imagers/dummy.c +@@ -343,6 +343,18 @@ static int dummy_initialize(struct i2c_client *client) + return 0; + } + ++static const struct i2c_device_id dummy_id[] = { ++ { "dummy-camera", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, dummy_id); ++ ++static const struct of_device_id dummy_of_ids[] = { ++ { .compatible = "dummy,camera", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, dummy_of_ids); ++ + static int dummy_parse_dt(struct device_node *np, struct dummy_priv *priv) + { + if (of_property_read_u32(np, "dummy,width", &priv->max_width)) +@@ -463,18 +475,6 @@ static int dummy_remove(struct i2c_client *client) + return 0; + } + +-static const struct i2c_device_id dummy_id[] = { +- { "dummy-camera", 0 }, +- { } +-}; +-MODULE_DEVICE_TABLE(i2c, dummy_id); +- +-static const struct of_device_id dummy_of_ids[] = { +- { .compatible = "dummy-camera", }, +- { } +-}; +-MODULE_DEVICE_TABLE(of, dummy_of_ids); +- + static struct i2c_driver dummy_i2c_driver = { + .driver = { + .name = "dummy-camera", +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0512-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0512-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch new file mode 100644 index 00000000..198d1daf --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0512-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch @@ -0,0 +1,1949 @@ +From fabd912331128d45339dd6f9282aa623c1b92bb1 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Thu, 30 Apr 2020 16:34:44 +0300 +Subject: [PATCH 2/2] arm64: dts: renesas: add H3 GMSL2 Videobox + +This is GMSL2 RCAR H3 Videobox 2.1 support +This is interim support since all serializers soon will +be integrated to PnP. + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/Makefile | 1 + + .../renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dts | 68 + + .../dts/renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dts | 68 + + arch/arm64/boot/dts/renesas/ulcb-vb2-gmsl2.dtsi | 1662 ++++++++++++++++++++ + arch/arm64/boot/dts/renesas/ulcb-vb2.1-gmsl2.dtsi | 90 ++ + 5 files changed, 1889 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dts + create mode 100644 arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dts + create mode 100644 arch/arm64/boot/dts/renesas/ulcb-vb2-gmsl2.dtsi + create mode 100644 arch/arm64/boot/dts/renesas/ulcb-vb2.1-gmsl2.dtsi + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index f18c742..cd53aaf 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -26,6 +26,7 @@ dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-kf.dtb r8a7795-h3ulcb-4x2g-kf.dtb r + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-vb.dtb r8a7795-es1-h3ulcb-vb.dtb r8a7795-h3ulcb-4x2g-vb.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-vb2.dtb r8a7795-es1-h3ulcb-vb2.dtb r8a7795-h3ulcb-4x2g-vb2.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-vb2.1.dtb r8a7795-h3ulcb-4x2g-vb2.1.dtb ++dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-vb2.1-gmsl2.dtb r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-vbm.dtb r8a7795-es1-h3ulcb-vbm.dtb r8a7795-h3ulcb-4x2g-vbm.dtb + dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb-kf.dtb + dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle-function.dtb +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dts +new file mode 100644 +index 0000000..54170c9 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dts +@@ -0,0 +1,68 @@ ++/* ++ * Device Tree Source for the 8GB H3ULCB Videobox board V2.1 on r8a7795 ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a7795-h3ulcb-4x2g.dts" ++#include "ulcb-vb2.1-gmsl2.dtsi" ++ ++/ { ++ model = "Renesas H3ULCB Videobox V2.1 board based on r8a7795 with 8GiB (4 x 2 GiB)"; ++ ++ hdmi1-out { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con: endpoint { ++ remote-endpoint = <&rcar_dw_hdmi1_out>; ++ }; ++ }; ++ }; ++}; ++ ++&du { ++ ports { ++ port@2 { ++ endpoint { ++ remote-endpoint = <&rcar_dw_hdmi1_in>; ++ }; ++ }; ++ port@3 { ++ endpoint { ++ remote-endpoint = <&lvds_in>; ++ }; ++ }; ++ }; ++}; ++ ++&hdmi1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ rcar_dw_hdmi1_in: endpoint { ++ remote-endpoint = <&du_out_hdmi1>; ++ }; ++ }; ++ port@1 { ++ reg = <1>; ++ rcar_dw_hdmi1_out: endpoint { ++ remote-endpoint = <&hdmi1_con>; ++ }; ++ }; ++ }; ++}; ++ ++&hsusb { ++ status = "okay"; ++}; +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dts +new file mode 100644 +index 0000000..144b035 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dts +@@ -0,0 +1,68 @@ ++/* ++ * Device Tree Source for the H3ULCB Videobox board V2.1 on r8a7795 ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a7795-h3ulcb.dts" ++#include "ulcb-vb2.1-gmsl2.dtsi" ++ ++/ { ++ model = "Renesas H3ULCB Videobox V2.1 board based on r8a7795"; ++ ++ hdmi1-out { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi1_con: endpoint { ++ remote-endpoint = <&rcar_dw_hdmi1_out>; ++ }; ++ }; ++ }; ++}; ++ ++&du { ++ ports { ++ port@2 { ++ endpoint { ++ remote-endpoint = <&rcar_dw_hdmi1_in>; ++ }; ++ }; ++ port@3 { ++ endpoint { ++ remote-endpoint = <&lvds_in>; ++ }; ++ }; ++ }; ++}; ++ ++&hdmi1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ rcar_dw_hdmi1_in: endpoint { ++ remote-endpoint = <&du_out_hdmi1>; ++ }; ++ }; ++ port@1 { ++ reg = <1>; ++ rcar_dw_hdmi1_out: endpoint { ++ remote-endpoint = <&hdmi1_con>; ++ }; ++ }; ++ }; ++}; ++ ++&hsusb { ++ status = "okay"; ++}; +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2-gmsl2.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2-gmsl2.dtsi +new file mode 100644 +index 0000000..64f54f5 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb2-gmsl2.dtsi +@@ -0,0 +1,1662 @@ ++/* ++ * Device Tree Source for the ULCB Videobox V2 board ++ * ++ * Copyright (C) 2018 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "camera.dtsi" ++ ++/ { ++ cs2300_ref_clk: cs2300_ref_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <25000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led5 { ++ gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; ++ }; ++ led6 { ++ gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; ++ }; ++ /* D13 - status 0 */ ++ led_ext00 { ++ gpios = <&gpio_ext_led 0 GPIO_ACTIVE_LOW>; ++ /* linux,default-trigger = "heartbeat"; */ ++ }; ++ /* D14 - status 1 */ ++ led_ext01 { ++ gpios = <&gpio_ext_led 1 GPIO_ACTIVE_LOW>; ++ /* linux,default-trigger = "mmc1"; */ ++ }; ++ /* D16 - HDMI0 */ ++ led_ext02 { ++ gpios = <&gpio_ext_led 2 GPIO_ACTIVE_LOW>; ++ }; ++ /* D18 - HDMI1 */ ++ led_ext03 { ++ gpios = <&gpio_ext_led 3 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ vcc_sdhi3: regulator-vcc-sdhi3 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "SDHI3 Vcc"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ ++ gpio = <&gpio4 17 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ vccq_sdhi3: regulator-vccq-sdhi3 { ++ compatible = "regulator-fixed"; ++ ++ regulator-name = "SDHI3 VccQ"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ }; ++ ++ fpdlink_switch: regulator@8 { ++ compatible = "regulator-fixed"; ++ regulator-name = "fpdlink_on"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio1 20 0>; ++ enable-active-high; ++ regulator-always-on; ++ }; ++ ++ can2_power: regulator@9 { ++ compatible = "regulator-fixed"; ++ regulator-name = "can2_power"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio_ext_pwr 8 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ can3_power: regulator@10 { ++ compatible = "regulator-fixed"; ++ regulator-name = "can3_power"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ gpio = <&gpio_ext_pwr 9 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ }; ++ ++ lvds { ++ compatible = "panel-lvds"; ++ ++ width-mm = <210>; ++ height-mm = <158>; ++ ++ data-mapping = "jeida-24"; ++ ++ panel-timing { ++ /* 1280x800 @60Hz */ ++ clock-frequency = <65000000>; ++ hactive = <1280>; ++ vactive = <800>; ++ hsync-len = <40>; ++ hfront-porch = <80>; ++ hback-porch = <40>; ++ vfront-porch = <14>; ++ vback-porch = <14>; ++ vsync-len = <4>; ++ }; ++ ++ port { ++ lvds_in: endpoint { ++ remote-endpoint = <&du_out_lvds0>; ++ }; ++ }; ++ }; ++ ++ excan_ref_clk: excan-ref-clock { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <16000000>; ++ }; ++ ++ spi_gpio_sw { ++ compatible = "spi-gpio"; ++ #address-cells = <0x1>; ++ #size-cells = <0x0>; ++ gpio-sck = <&gpio0 8 GPIO_ACTIVE_HIGH>; ++ gpio-miso = <&gpio0 10 GPIO_ACTIVE_HIGH>; ++ gpio-mosi = <&gpio0 11 GPIO_ACTIVE_HIGH>; ++ cs-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; ++ num-chipselects = <1>; ++ ++ spidev: spidev@0 { ++ compatible = "spidev", "spi-gpio"; ++ reg = <0>; ++ spi-max-frequency = <25000000>; ++ spi-cpha; ++ spi-cpol; ++ }; ++ }; ++ ++ spi_gpio_can { ++ compatible = "spi-gpio"; ++ #address-cells = <0x1>; ++ #size-cells = <0x0>; ++ gpio-sck = <&gpio1 2 GPIO_ACTIVE_HIGH>; ++ gpio-miso = <&gpio1 3 GPIO_ACTIVE_HIGH>; ++ gpio-mosi = <&gpio1 1 GPIO_ACTIVE_HIGH>; ++ cs-gpios = <&gpio1 0 GPIO_ACTIVE_HIGH ++ &gpio1 4 GPIO_ACTIVE_HIGH>; ++ num-chipselects = <2>; ++ ++ spican0: spidev@0 { ++ compatible = "microchip,mcp2515"; ++ reg = <0>; ++ clocks = <&excan_ref_clk>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <15 GPIO_ACTIVE_LOW>; ++ spi-max-frequency = <10000000>; ++ vdd-supply = <&can2_power>; ++ }; ++ spican1: spidev@1 { ++ compatible = "microchip,mcp2515"; ++ reg = <1>; ++ clocks = <&excan_ref_clk>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <5 GPIO_ACTIVE_LOW>; ++ spi-max-frequency = <10000000>; ++ vdd-supply = <&can3_power>; ++ }; ++ }; ++ ++ /* camera slot A */ ++ iio_hwmon_a: hwmon_a@1 { ++ compatible = "iio-hwmon"; ++ io-channels = ++ /* current */ ++ <&max2008x_a 0>, ++ <&max2008x_a 2>, ++ /* voltage */ ++ <&max2008x_a 4>, ++ <&max2008x_a 6>, ++ /* misc voltages */ ++ <&max2008x_a 8>, ++ <&max2008x_a 9>; ++ io-channel-names = ++ "camera-A-0-Iout", ++ "camera-A-1-Iout", ++ "camera-A-0-Vout", ++ "camera-A-1-Vout", ++ "cameras-A-Vregulator", ++ "cameras-A-3v3"; ++ }; ++}; ++ ++&pfc { ++ hscif4_pins: hscif4 { ++ groups = "hscif4_data_a", "hscif4_ctrl"; ++ function = "hscif4"; ++ }; ++ ++ usb0_pins: usb0 { ++ groups = "usb0"; ++ function = "usb0"; ++ }; ++ ++ usb2_pins: usb2 { ++ groups = "usb2"; ++ function = "usb2"; ++ }; ++ ++ usb30_pins: usb30 { ++ groups = "usb30"; ++ function = "usb30"; ++ }; ++ ++ can0_pins: can0 { ++ groups = "can0_data_a"; ++ function = "can0"; ++ }; ++ ++ can1_pins: can1 { ++ groups = "can1_data"; ++ function = "can1"; ++ }; ++ ++ canfd0_pins: canfd0 { ++ groups = "canfd0_data_a"; ++ function = "canfd0"; ++ }; ++ ++ canfd1_pins: canfd1 { ++ groups = "canfd1_data"; ++ function = "canfd1"; ++ }; ++ ++ sdhi3_pins: sd3 { ++ groups = "sdhi3_data4", "sdhi3_ctrl"; ++ function = "sdhi3"; ++ power-source = <3300>; ++ }; ++ ++ sdhi3_pins_uhs: sd3_uhs { ++ groups = "sdhi3_data4", "sdhi3_ctrl"; ++ function = "sdhi3"; ++ power-source = <1800>; ++ }; ++}; ++ ++&gpio0 { ++ video_a_irq { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-A irq"; ++ }; ++ ++ video_b_irq { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-B irq"; ++ }; ++ ++ video_c_irq { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C irq"; ++ }; ++ can2_irq { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "CAN2 irq"; ++ }; ++}; ++ ++&gpio1 { ++ can3_irq { ++ gpio-hog; ++ gpios = <5 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "CAN3 irq"; ++ }; ++ gpioext_4_22_irq { ++ gpio-hog; ++ gpios = <25 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "0x22@i2c4 irq"; ++ }; ++ m2_0_sleep { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M2 0 SLEEP#"; ++ }; ++ m2_1_sleep { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M2 1 SLEEP#"; ++ }; ++ m2_0_pcie_det { ++ gpio-hog; ++ gpios = <18 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 0 PCIe/SATA"; ++ }; ++ m2_1_pcie_det { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 1 PCIe/SATA"; ++ }; ++ m2_1_rst { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 1 RST#"; ++ }; ++ switch_ext_phy_reset { ++ gpio-hog; ++ gpios = <16 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR ext phy reset"; ++ }; ++ switch_sw_reset { ++ gpio-hog; ++ gpios = <17 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR switch reset"; ++ }; ++ switch_1v2_en { ++ gpio-hog; ++ gpios = <27 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR 1.2V en"; ++ }; ++}; ++ ++&gpio2 { ++ m2_0_wake { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 0 WAKE#"; ++ }; ++ m2_0_clkreq { ++ gpio-hog; ++ gpios = <5 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 0 CLKREQ#"; ++ }; ++ switch_3v3_en { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR 3.3V en"; ++ }; ++}; ++ ++&gpio3 { ++ switch_int_phy_reset { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR int phy reset"; ++ }; ++}; ++ ++&gpio5 { ++ switch_2v5_en { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR 2.5V en"; ++ }; ++ switch_25mhz_en { ++ gpio-hog; ++ gpios = <8 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "BR 25MHz clk en"; ++ }; ++}; ++ ++&gpio6 { ++ m2_1_wake { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 1 WAKE#"; ++ }; ++ m2_1_clkreq { ++ gpio-hog; ++ gpios = <10 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "M.2 1 CLKREQ#"; ++ }; ++ ++ m2_0_rst { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 0 RST#"; ++ }; ++}; ++ ++&i2c2 { ++ clock-frequency = <400000>; ++ ++ i2cswitch2: pca9548@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios = <&gpio6 5 GPIO_ACTIVE_LOW>; ++ ++ i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ /* USB3.0 HUB node(s) */ ++ tusb8041_44@44 { ++ compatible = "ti,tusb8041"; ++ reg = <0x44>; ++ reset-gpios = <&gpio5 5 0>; ++ ti,registers = /bits/ 8 < ++ 0x05 0x10 ++ 0x06 0x0f ++ 0x07 0x8f ++ 0x08 0x0f ++ 0x0a 0x20 ++ 0x0b 0x80>; ++ }; ++ tusb8041_45@45 { ++ compatible = "ti,tusb8041"; ++ reg = <0x45>; ++ reset-gpios = <&gpio5 5 0>; ++ ti,registers = /bits/ 8 < ++ 0x05 0x10 ++ 0x06 0x0f ++ 0x07 0x8f ++ 0x08 0x0f ++ 0x0a 0x20 ++ 0x0b 0x80>; ++ }; ++ }; ++ ++ /* Slot A (CN10) */ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ max96712@29 { ++ compatible = "maxim,max96712"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x29>; ++ clocks = <&cs2300_a>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_a_5c 13 GPIO_ACTIVE_LOW>; ++ ++ maxim,link-mipi-map = <1 1 1 1>; ++ ++ poc0-supply = <&vdd_cam_a_0>; ++ poc1-supply = <&vdd_cam_a_1>; ++ poc2-supply = <&vdd_cam_a_2>; ++ poc3-supply = <&vdd_cam_a_3>; ++ ++ port@0 { ++ reg = <4>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ max96712_des0ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ max96712_des0ep1: endpoint@1 { ++ ser-addr = <0x0d>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ max96712_des0ep2: endpoint@2 { ++ ser-addr = <0x0e>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ max96712_des0ep3: endpoint@3 { ++ ser-addr = <0x0f>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ ++ port@1 { ++ max96712_des0csi0ep0: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ ++ ++ i2c_des@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@0 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep0: endpoint { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@1 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0d>; ++ ++ port@0 { ++ camera_in1: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin1ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep1: endpoint { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ camera@2 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x62 0x0e>; ++ ++ port@0 { ++ camera_in2: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin2ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep2: endpoint { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ camera@3 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x63 0x0f>; ++ ++ port@0 { ++ camera_in3: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin3ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep3: endpoint { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* Slot B (CN11) */ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ max96712@29 { ++ compatible = "maxim,max96712_XX"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x29>; ++ clocks = <&cs2300_b>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_b_5c 13 GPIO_ACTIVE_LOW>; ++ ++ maxim,link-mipi-map = <1 1 1 1>; ++ ++ poc0-supply = <&vdd_cam_b_0>; ++ poc1-supply = <&vdd_cam_b_1>; ++ poc2-supply = <&vdd_cam_b_2>; ++ poc3-supply = <&vdd_cam_b_3>; ++ ++ port@0 { ++ reg = <4>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ max96712_des1ep0: endpoint@0 { ++ ser-addr = <0x1c>; ++ remote-endpoint = <&camera_in4>; ++ }; ++ max96712_des1ep1: endpoint@1 { ++ ser-addr = <0x1d>; ++ remote-endpoint = <&camera_in5>; ++ }; ++ max96712_des1ep2: endpoint@2 { ++ ser-addr = <0x1e>; ++ remote-endpoint = <&camera_in6>; ++ }; ++ max96712_des1ep3: endpoint@3 { ++ ser-addr = <0x1f>; ++ remote-endpoint = <&camera_in7>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <5>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ max96712_des1csi0ep0: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ ++ i2c_des@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@0 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x64 0x1c>; ++ ++ port@0 { ++ camera_in4: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin4ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep0: endpoint { ++ remote-endpoint = <&max96712_des1ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@1 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x65 0x1d>; ++ ++ port@0 { ++ camera_in5: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin5ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep1: endpoint { ++ remote-endpoint = <&max96712_des1ep1>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ camera@2 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x66 0x1e>; ++ ++ port@0 { ++ camera_in6: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin6ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep2: endpoint { ++ remote-endpoint = <&max96712_des1ep2>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c_des@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ camera@3 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x67 0x1f>; ++ ++ port@0 { ++ camera_in7: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin7ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep3: endpoint { ++ remote-endpoint = <&max96712_des1ep3>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* Slot A (CN10) */ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ /* PCA9535 is a redundant/deprecated card */ ++ gpio_exp_a_26: gpio@26 { ++ compatible = "nxp,pca9535"; ++ reg = <0x26>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_a_pwr_shdn { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR_SHDN"; ++ }; ++ video_a_cam_pwr0 { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR0"; ++ }; ++ video_a_cam_pwr1 { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR1"; ++ }; ++ video_a_cam_pwr2 { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR2"; ++ }; ++ video_a_cam_pwr3 { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR3"; ++ }; ++ video_a_des_shdn { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A DES_SHDN"; ++ }; ++ video_a_des_led { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-A led"; ++ }; ++ }; ++ ++ gpio_exp_a_5c: gpio@5c { ++ compatible = "maxim,max7325"; ++ reg = <0x5c>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_a_des_cfg0 { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-A cfg0"; ++ }; ++ video_a_pwr_shdn { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A PWR_SHDN"; ++ }; ++/* ++ video_a_des_shdn { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-A DES_SHDN"; ++ }; ++*/ ++ video_a_led { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-A LED"; ++ }; ++ }; ++ ++ cs2300_a: clk_multiplier_a@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300_a>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam_a: dac_vcam_a@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ }; ++ ++ max2008x_a: vcam_switch_a@28 { ++ compatible = "maxim,max2008x"; ++ reg = <0x28>; ++ #io-channel-cells = <1>; ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_cam_a_0: SW0 { ++ reg = <0>; ++ regulator-name = "Camera-A-0"; ++ }; ++ vdd_cam_a_3: SW1 { ++ reg = <1>; ++ regulator-name = "Camera-A-3"; ++ }; ++ vdd_cam_a_1: SW2 { ++ reg = <2>; ++ regulator-name = "Camera-A-1"; ++ }; ++ vdd_cam_a_2: SW3 { ++ reg = <3>; ++ regulator-name = "Camera-A-2"; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ /* Slot B (CN11) */ ++ ++ /* PCA9535 is a redundant/deprecated card */ ++ gpio_exp_b_26: gpio@26 { ++ compatible = "nxp,pca9535"; ++ reg = <0x26>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_b_des_cfg1 { ++ gpio-hog; ++ gpios = <5 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-B cfg1"; ++ }; ++ video_b_des_cfg0 { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-B cfg0"; ++ }; ++ video_b_pwr_shdn { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR_SHDN"; ++ }; ++ video_b_cam_pwr0 { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR0"; ++ }; ++ video_b_cam_pwr1 { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR1"; ++ }; ++ video_b_cam_pwr2 { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR2"; ++ }; ++ video_b_cam_pwr3 { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR3"; ++ }; ++ video_b_des_shdn { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B DES_SHDN"; ++ }; ++ video_b_des_led { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-B led"; ++ }; ++ }; ++ ++ gpio_exp_b_5c: gpio@5c { ++ compatible = "maxim,max7325"; ++ reg = <0x5c>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_b_des_cfg0 { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-B cfg0"; ++ }; ++ video_b_pwr_shdn { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B PWR_SHDN"; ++ }; ++/* ++ video_b_des_shdn { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-B DES_SHDN"; ++ }; ++*/ ++ video_b_led { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-B LED"; ++ }; ++ }; ++ ++ cs2300_b: clk_multiplier_b@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300_b>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam_b: dac_vcam_b@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ }; ++ ++ max2008x_b: vcam_switch_b@28 { ++ compatible = "maxim,max2008x"; ++ reg = <0x28>; ++ #io-channel-cells = <1>; ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_cam_b_0: SW0 { ++ reg = <0>; ++ regulator-name = "Camera-B-0"; ++ }; ++ vdd_cam_b_3: SW1 { ++ reg = <1>; ++ regulator-name = "Camera-B-3"; ++ }; ++ vdd_cam_b_1: SW2 { ++ reg = <2>; ++ regulator-name = "Camera-B-1"; ++ }; ++ vdd_cam_b_2: SW3 { ++ reg = <3>; ++ regulator-name = "Camera-B-2"; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ /* Slot C (CN12) */ ++ ++ gpio_exp_c_5c: gpio@5c { ++ compatible = "maxim,max7325"; ++ reg = <0x5c>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ video_c_des_cfg0 { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "Video-C cfg0"; ++ }; ++ video_c_pwr_shdn { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C PWR_SHDN"; ++ }; ++/* ++ video_c_des_shdn { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "Video-C DES_SHDN"; ++ }; ++*/ ++ video_c_led { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "Video-C LED"; ++ }; ++ }; ++ ++ cs2300_c: clk_multiplier_c@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300_c>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam_c: dac_vcam_c@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ }; ++ ++ max2008x_c: vcam_switch_c@28 { ++ compatible = "maxim,max2008x"; ++ reg = <0x28>; ++ #io-channel-cells = <1>; ++ ++ regulators { ++ vdd_cam_c_0: SW0 { ++ regulator-name = "Camera-C-0"; ++ }; ++ vdd_cam_c_1: SW2 { ++ regulator-name = "Camera-C-1"; ++ }; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&i2c4 { ++ i2cswitch4: pca9548@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios= <&gpio5 15 GPIO_ACTIVE_LOW>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ /* FAN1 node - lm96063 */ ++ fan_ctrl_1:lm96063-1@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ i2c@6 { ++ /* FAN2 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <6>; ++ /* FAN2 node - lm96063 */ ++ fan_ctrl_2:lm96063-2@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ /* Power nodes - 2 x TPS544x20 */ ++ tps_5v: tps544c20@0x2a { ++ compatible = "tps544c20"; ++ reg = <0x2c>; ++ status = "disabled"; ++ }; ++ tps_3v3: tps544c20@0x22 { ++ compatible = "tps544c20"; ++ reg = <0x24>; ++ status = "disabled"; ++ }; ++ }; ++ ++ i2c_power: i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ /* CAN and power board nodes */ ++ ++ gpio_ext_pwr: pca9535@22 { ++ compatible = "nxp,pca9535"; ++ reg = <0x22>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ interrupt-controller; ++ interrupt-parent = <&gpio1>; ++ interrupts = <25 IRQ_TYPE_EDGE_FALLING>; ++ ++ /* enable input DCDC after wake-up signal released */ ++ pwr_hold { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "pwr_hold"; ++ }; ++ pwr_5v_out { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "pwr_5v_out"; ++ }; ++ pwr_5v_oc { ++ gpio-hog; ++ gpios = <15 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "pwr_5v_oc"; ++ }; ++ pwr_wake8 { ++ gpio-hog; ++ gpios = <12 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "wake8"; ++ }; ++ pwr_wake7 { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "wake7"; ++ }; ++ ++ /* CAN0 */ ++ can0_stby { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "can0_stby"; ++ }; ++ can0_load { ++ gpio-hog; ++ gpios = <0 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "can0_120R_load"; ++ }; ++ /* CAN1 */ ++ can1_stby { ++ gpio-hog; ++ gpios = <5 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "can1_stby"; ++ }; ++ can1_load { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "can1_120R_load"; ++ }; ++ /* CAN2 */ ++ can2_stby { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "can2_stby"; ++ }; ++ can2_load { ++ gpio-hog; ++ gpios = <2 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "can2_120R_load"; ++ }; ++ /* CAN3 */ ++ can3_stby { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ output-low; ++ line-name = "can3_stby"; ++ }; ++ can3_load { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "can3_120R_load"; ++ }; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ /* FPDLink output node - DS90UH947 */ ++ }; ++ ++ i2c@4 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <4>; ++ /* BCM switch node */ ++ }; ++ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ /* LED board node(s) */ ++ ++ gpio_ext_led: pca9535@22 { ++ compatible = "nxp,pca9535"; ++ reg = <0x22>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ /* gpios 0..7 are used for indication LEDs, low-active */ ++ }; ++ rtc: mcp79411@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ }; ++ }; ++ ++ /* port 7 is not used */ ++ }; ++}; ++ ++&pcie_bus_clk { ++ clock-frequency = <100000000>; ++ status = "okay"; ++}; ++ ++&pciec0 { ++ status = "okay"; ++}; ++ ++&pciec1 { ++ status = "okay"; ++}; ++ ++&vin0 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin0ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ }; ++ port@1 { ++ csi40ep0: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin0_mmax96712_des0ep0: endpoint { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin1ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ }; ++ port@1 { ++ csi40ep1: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin1_max96712_des0ep1: endpoint { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin2 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin2ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ }; ++ port@1 { ++ csi40ep2: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin2_max96712_des0ep2: endpoint { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin3 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin3ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ port@1 { ++ csi40ep3: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin3_max96712_des0ep3: endpoint { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++}; ++ ++&vin4 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin4ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <0>; ++ remote-endpoint = <&camera_in4>; ++ data-lanes = <1 2 3 4>; ++ }; ++ }; ++ port@1 { ++ csi41ep0: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin4_max96712_des0ep1: endpoint { ++ remote-endpoint = <&max96712_des1ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin5 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin5ep0: endpoint@0 { ++ csi,select = "csi41"; ++ virtual,channel = <1>; ++ remote-endpoint = <&camera_in5>; ++ data-lanes = <1 2 3 4>; ++ }; ++ }; ++ port@1 { ++ csi41ep1: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin5_max96712_des0ep1: endpoint { ++ remote-endpoint = <&max96712_des1ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin6 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin6ep0: endpoint@0 { ++ csi,select = "csi41"; ++ virtual,channel = <2>; ++ remote-endpoint = <&camera_in6>; ++ data-lanes = <1 2 3 4>; ++ }; ++ }; ++ port@1 { ++ csi41ep2: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin6_max96712_des2ep2: endpoint { ++ remote-endpoint = <&max96712_des1ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin7 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin7ep0: endpoint@0 { ++ csi,select = "csi41"; ++ virtual,channel = <3>; ++ remote-endpoint = <&camera_in7>; ++ data-lanes = <1 2 3 4>; ++ }; ++ }; ++ port@1 { ++ csi41ep3: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin7_max96712_des2ep3: endpoint { ++ remote-endpoint = <&max96712_des1ep3>; ++ }; ++ }; ++ }; ++}; ++ ++&csi40 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi40_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <300>; ++ }; ++ }; ++}; ++ ++&csi41 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi41_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <300>; ++ }; ++ }; ++}; ++ ++&ssi1 { ++ /delete-property/shared-pin; ++}; ++ ++&sdhi3 { ++ pinctrl-0 = <&sdhi3_pins>; ++ pinctrl-1 = <&sdhi3_pins_uhs>; ++ pinctrl-names = "default", "state_uhs"; ++ ++ vmmc-supply = <&vcc_sdhi3>; ++ vqmmc-supply = <&vccq_sdhi3>; ++ cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; ++ wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; ++ bus-width = <4>; ++ sd-uhs-sdr50; ++ status = "okay"; ++}; ++ ++&msiof1 { ++ status = "disabled"; ++}; ++ ++&usb2_phy0 { ++ pinctrl-0 = <&usb0_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&usb2_phy2 { ++ pinctrl-0 = <&usb2_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&xhci0 { ++ pinctrl-0 = <&usb30_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&ehci0 { ++ status = "okay"; ++}; ++ ++&ehci2 { ++ status = "okay"; ++}; ++ ++&ohci0 { ++ status = "okay"; ++}; ++ ++&ohci2 { ++ status = "okay"; ++}; ++ ++&can0 { ++ pinctrl-0 = <&can0_pins>; ++ pinctrl-names = "default"; ++ status = "disabled"; ++}; ++ ++&can1 { ++ pinctrl-0 = <&can1_pins>; ++ pinctrl-names = "default"; ++ status = "disabled"; ++}; ++ ++&canfd { ++ pinctrl-0 = <&canfd0_pins &canfd1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ channel0 { ++ status = "okay"; ++ }; ++ ++ channel1 { ++ status = "okay"; ++ }; ++}; ++ ++/* uncomment to enable CN12 on VIN4-7 */ ++//#include "ulcb-vb2-cn12.dtsi" +diff --git a/arch/arm64/boot/dts/renesas/ulcb-vb2.1-gmsl2.dtsi b/arch/arm64/boot/dts/renesas/ulcb-vb2.1-gmsl2.dtsi +new file mode 100644 +index 0000000..7334a5e +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/ulcb-vb2.1-gmsl2.dtsi +@@ -0,0 +1,90 @@ ++/* ++ * Device Tree Source for the ULCB Videobox V2.1 board ++ * ++ * Copyright (C) 2019 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "ulcb-vb2-gmsl2.dtsi" ++ ++/{ ++ leds { ++ led_button { ++ gpios = <&gpio_ext_led 9 GPIO_ACTIVE_LOW>; ++ linux,default-trigger = "cpu"; ++ }; ++ }; ++ ++ gpio_keys_polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ autorepeat; ++ ++ button_pwr { ++ label = "GPIO Key POWER"; ++ linux,code = <116>; ++ gpios = <&gpio_ext_led 8 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&i2c_power { ++ adc@48 { ++ reg = <0x48>; ++ compatible = "ti,ads1115"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ wake7_voltage: channel@4 { ++ /* single endded AIN0 */ ++ reg = <4>; ++ }; ++ wake8_voltage: channel@5 { ++ /* single endded AIN1 */ ++ reg = <5>; ++ }; ++ dc_prot_voltage: channel@6 { ++ /* single endded AIN2 */ ++ reg = <6>; ++ }; ++ dcdc_voltage: channel@7 { ++ /* single endded AIN3 */ ++ reg = <7>; ++ }; ++ }; ++}; ++ ++&gpio6 { ++ /delete-node/m2_0_rst; ++ ++ m2_0_rst { ++ gpio-hog; ++ gpios = <6 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 0 RST#"; ++ }; ++}; ++ ++&pfc { ++ usb1_pins: usb1 { ++ groups = "usb1"; ++ function = "usb1"; ++ }; ++}; ++ ++&usb2_phy1 { ++ pinctrl-0 = <&usb1_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&ehci1 { ++ status = "okay"; ++}; ++ ++&ohci1 { ++ status = "okay"; ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0513-MTD-renesas-rpc-fix-dummy-cycles.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0513-MTD-renesas-rpc-fix-dummy-cycles.patch new file mode 100644 index 00000000..fe348084 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0513-MTD-renesas-rpc-fix-dummy-cycles.patch @@ -0,0 +1,30 @@ +From 09381afbd95859e22aad7d0647b202eba7bb2cae Mon Sep 17 00:00:00 2001 +From: Andrey Gusakov +Date: Thu, 5 Dec 2019 17:30:15 +0300 +Subject: [PATCH] MTD: renesas-rpc: fix dummy cycles + +Signed-off-by: Andrey Gusakov +--- + drivers/mtd/spi-nor/renesas-rpc-qspi.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/drivers/mtd/spi-nor/renesas-rpc-qspi.c b/drivers/mtd/spi-nor/renesas-rpc-qspi.c +index 3d2d5dbe03e0..f4abdac10670 100644 +--- a/drivers/mtd/spi-nor/renesas-rpc-qspi.c ++++ b/drivers/mtd/spi-nor/renesas-rpc-qspi.c +@@ -458,7 +458,11 @@ static ssize_t rpc_read_flash(struct spi_nor *nor, loff_t from, size_t len, + + /* ...setup read sequence */ + val = rpc_readl(rpc, RPC_DRENR); +- val |= RPC_DRENR_DME | RPC_DRENR_CDE; ++ if (nor->read_dummy) ++ val |= RPC_DRENR_DME; ++ else ++ val &= ~RPC_DRENR_DME; ++ val |= RPC_DRENR_CDE; + rpc_writel(rpc, RPC_DRENR, val); + + rpc_do_read_flash(rpc, from, len, buf, nor->addr_width > 3); +-- +2.17.1 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0514-media-i2c-gmsl2-add-fsync-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0514-media-i2c-gmsl2-add-fsync-support.patch new file mode 100644 index 00000000..49b66489 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0514-media-i2c-gmsl2-add-fsync-support.patch @@ -0,0 +1,102 @@ +From 848b902979b3d10b6104bdae5a73285351b98a3a Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 5 May 2020 00:31:31 +0300 +Subject: [PATCH 1/3] media: i2c: gmsl2: add fsync support + +This add FSYNC support on GMSL2 serializers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gmsl/max9296.c | 12 ++++++++++-- + drivers/media/i2c/soc_camera/gmsl/max9296.h | 1 + + drivers/media/i2c/soc_camera/gmsl/max96712.c | 12 ++++++++++-- + drivers/media/i2c/soc_camera/gmsl/max96712.h | 1 + + 4 files changed, 22 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.c b/drivers/media/i2c/soc_camera/gmsl/max9296.c +index 85b45ca..daa2201 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9296.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.c +@@ -840,7 +840,7 @@ static int max9296_gmsl2_link_serializer_setup(struct max9296_priv *priv, int li + if (priv->gpio[i] == 2) { + /* GPIO FSIN */ + ser_write(MAX9295_GPIO_A(i), 0x84); /* 1MOm, GMSL2 RX from deserializer */ +- ser_write(MAX9295_GPIO_C(i), 0x01); /* pull-none, GPIO stream ID=1 */ ++ ser_write(MAX9295_GPIO_C(i), 0x08); /* pull-none, GPIO ID=8 assosiated with FSYNC transmission */ + } + if (priv->gpio[i] == 3) { + /* GPIO Interrupt */ +@@ -919,7 +919,15 @@ static void max9296_gmsl2_link_crossbar_setup(struct max9296_priv *priv, int lin + + static void max9296_gmsl2_fsync_setup(struct max9296_priv *priv) + { +- /* TODO */ ++ des_write(MAX9296_FSYNC_5, priv->fsync_period & 0xff); /* Fsync Period L */ ++ des_write(MAX9296_FSYNC_6, (priv->fsync_period >> 8) & 0xff);/* Fsync Period M */ ++ des_write(MAX9296_FSYNC_7, priv->fsync_period >> 16); /* Fsync Period H */ ++ des_write(MAX9296_FSYNC_10, 0x00); /* Disable Overlap */ ++ des_write(MAX9296_FSYNC_11, 0x00); ++ ++ des_write(MAX9296_FSYNC_0, 0x00); /* Manual method, Internal GMSL2 generator mode */ ++ des_write(MAX9296_FSYNC_15, 0x9f); /* GMSL2 Type Fsync, Enable all pipes */ ++ des_write(MAX9296_FSYNC_17, 8 << 3); /* GPIO ID=8 assosiated with FSYNC transmission */ + } + + /* ----------------------------------------------------------------------------- +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.h b/drivers/media/i2c/soc_camera/gmsl/max9296.h +index 985b77e..87fa05ee 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9296.h ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.h +@@ -153,6 +153,7 @@ struct max9296_priv { + #define MAX9296_FSYNC_10 0x3aa + #define MAX9296_FSYNC_11 0x3ab + #define MAX9296_FSYNC_15 0x3af ++#define MAX9296_FSYNC_17 0x3b1 + + #define MAX_MIPI_PHY_BASE 0x8a0 + #define MAX_MIPI_PHY0 (MAX_MIPI_PHY_BASE + 0x00) +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.c b/drivers/media/i2c/soc_camera/gmsl/max96712.c +index c4cdf0e..17eed0b 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.c +@@ -836,7 +836,7 @@ static int max96712_gmsl2_link_serializer_setup(struct max96712_priv *priv, int + if (priv->gpio[i] == 2) { + /* GPIO FSIN */ + ser_write(MAX9295_GPIO_A(i), 0x84); /* 1MOm, GMSL2 RX from deserializer */ +- ser_write(MAX9295_GPIO_C(i), 0x01); /* pull-none, GPIO stream ID=1 */ ++ ser_write(MAX9295_GPIO_C(i), 0x08); /* pull-none, GPIO ID=8 assosiated with FSYNC transmission */ + } + if (priv->gpio[i] == 3) { + /* GPIO Interrupt */ +@@ -918,7 +918,15 @@ static void max96712_gmsl2_link_crossbar_setup(struct max96712_priv *priv, int l + + static void max96712_gmsl2_fsync_setup(struct max96712_priv *priv) + { +- /* TODO */ ++ des_write(MAX96712_FSYNC_5, priv->fsync_period & 0xff); /* Fsync Period L */ ++ des_write(MAX96712_FSYNC_6, (priv->fsync_period >> 8) & 0xff);/* Fsync Period M */ ++ des_write(MAX96712_FSYNC_7, priv->fsync_period >> 16); /* Fsync Period H */ ++ des_write(MAX96712_FSYNC_10, 0x00); /* Disable Overlap */ ++ des_write(MAX96712_FSYNC_11, 0x00); ++ ++ des_write(MAX96712_FSYNC_0, 0x00); /* Manual method, Internal GMSL2 generator mode */ ++ des_write(MAX96712_FSYNC_15, 0x9f); /* GMSL2 Type Fsync, Enable all pipes */ ++ des_write(MAX96712_FSYNC_17, 8 << 3); /* GPIO ID=8 assosiated with FSYNC transmission */ + } + + /* ----------------------------------------------------------------------------- +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.h b/drivers/media/i2c/soc_camera/gmsl/max96712.h +index b648bdc..609da2f 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.h ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.h +@@ -135,6 +135,7 @@ struct max96712_priv { + #define MAX96712_FSYNC_10 0x4aa + #define MAX96712_FSYNC_11 0x4ab + #define MAX96712_FSYNC_15 0x4af ++#define MAX96712_FSYNC_17 0x4b1 + + #define MAX_MIPI_PHY_BASE 0x8a0 + #define MAX_MIPI_PHY0 (MAX_MIPI_PHY_BASE + 0x00) +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0515-media-i2c-ap020x-add-fsync-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0515-media-i2c-ap020x-add-fsync-support.patch new file mode 100644 index 00000000..84088d7c --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0515-media-i2c-ap020x-add-fsync-support.patch @@ -0,0 +1,74 @@ +From e5c437ef218ca86640a3c80c5e6a75602748ae5e Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 5 May 2020 00:35:42 +0300 +Subject: [PATCH 2/3] media: i2c: ap020x: add fsync support + +This adds fsync support + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c | 19 +++++++++++++------ + drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h | 12 ++++++++++++ + 2 files changed, 25 insertions(+), 6 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +index ad18e2e..8dfad4a 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.c +@@ -421,6 +421,18 @@ static int ap0201_initialize(struct i2c_client *client) + } + + reg16_read16(client, AP0201_REV_REG, &rev); ++ /* Program wizard registers */ ++ switch (pid) { ++ case AP0200_PID: ++ case AP0201_PID: ++ ap0201_set_regs(client, ap0201_regs_wizard, ARRAY_SIZE(ap0201_regs_wizard)); ++ break; ++ case AP0202_PID: ++ ap0201_set_regs(client, ap0202_regs_wizard, ARRAY_SIZE(ap0202_regs_wizard)); ++ break; ++ } ++ /* Read OTP IDs */ ++ ap0201_otp_id_read(client); + #if 1 + /* read resolution used by current firmware */ + reg16_read16(client, 0xcae4, &val); +@@ -431,12 +443,7 @@ static int ap0201_initialize(struct i2c_client *client) + priv->max_width = AP0201_MAX_WIDTH; + priv->max_height = AP0201_MAX_HEIGHT; + #endif +- /* Program wizard registers */ +- ap0201_set_regs(client, ap0201_regs_wizard, ARRAY_SIZE(ap0201_regs_wizard)); +- /* Read OTP IDs */ +- ap0201_otp_id_read(client); +- +- dev_info(&client->dev, "ap020X PID %x (%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ dev_info(&client->dev, "ap020X PID %x (rev%x), res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", + pid, rev, priv->max_width, priv->max_height, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); + return 0; + } +diff --git a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h +index c857edc..daf6bd6 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h ++++ b/drivers/media/i2c/soc_camera/imagers/ap0201_ar023x.h +@@ -21,4 +21,16 @@ struct ap0201_reg { + + static const struct ap0201_reg ap0201_regs_wizard[] = { + /* enable FSIN */ ++{0xc88c, 0x0303}, ++{0xfc00, 0x2800}, ++{0x0040, 0x8100}, ++{AP0201_DELAY, 100}, ++}; ++ ++static const struct ap0201_reg ap0202_regs_wizard[] = { ++/* enable FSIN */ ++{0xc890, 0x0303}, ++{0xfc00, 0x2800}, ++{0x0040, 0x8100}, ++{AP0201_DELAY, 100}, + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0516-media-i2c-ar0231-fix-translator.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0516-media-i2c-ar0231-fix-translator.patch new file mode 100644 index 00000000..3c276931 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0516-media-i2c-ar0231-fix-translator.patch @@ -0,0 +1,37 @@ +From 104e7ee4ee011b6050dc9b55b993c811e3efc959 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 5 May 2020 00:36:27 +0300 +Subject: [PATCH 3/3] media: i2c: ar0231: fix translator + +This fixes translator imager address + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/ar0231.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231.c b/drivers/media/i2c/soc_camera/imagers/ar0231.c +index fc08793..42f125c 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ar0231.c ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231.c +@@ -27,7 +27,7 @@ static const int ar0231_i2c_addr[] = {0x10, 0x20}; + + #define AR0231_PID_REG 0x3000 + #define AR0231_REV_REG 0x31FE +-#define AR0231_PID 0x0354 ++#define AR0231_PID 0x0354 + + #define AR0231_MEDIA_BUS_FMT MEDIA_BUS_FMT_SGRBG12_1X12 + +@@ -403,7 +403,7 @@ static int ar0231_initialize(struct i2c_client *client) + int i; + + for (i = 0; i < ARRAY_SIZE(ar0231_i2c_addr); i++) { +- setup_i2c_translator(client, priv->ser_addr, ar0231_i2c_addr[i] << 1); ++ setup_i2c_translator(client, priv->ser_addr, ar0231_i2c_addr[i]); + + /* check model ID */ + reg16_read16(client, AR0231_PID_REG, &pid); +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0517-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0517-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch new file mode 100644 index 00000000..b9c0b8e1 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0517-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch @@ -0,0 +1,43 @@ +From bc3d7daebf2a0e35d859d847bbe3f9e648cb1c71 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 5 May 2020 00:52:41 +0300 +Subject: [PATCH] media: i2c: gmsl2: fix fsync in manual mode + +disable back control from pipes, since this is needed only for +automatic mode, that we do not use + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/gmsl/max9296.c | 2 +- + drivers/media/i2c/soc_camera/gmsl/max96712.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max9296.c b/drivers/media/i2c/soc_camera/gmsl/max9296.c +index daa2201..a2a30ef 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max9296.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max9296.c +@@ -926,7 +926,7 @@ static void max9296_gmsl2_fsync_setup(struct max9296_priv *priv) + des_write(MAX9296_FSYNC_11, 0x00); + + des_write(MAX9296_FSYNC_0, 0x00); /* Manual method, Internal GMSL2 generator mode */ +- des_write(MAX9296_FSYNC_15, 0x9f); /* GMSL2 Type Fsync, Enable all pipes */ ++ des_write(MAX9296_FSYNC_15, 0x80); /* GMSL2 Type Fsync, Disable all pipes for manual mode */ + des_write(MAX9296_FSYNC_17, 8 << 3); /* GPIO ID=8 assosiated with FSYNC transmission */ + } + +diff --git a/drivers/media/i2c/soc_camera/gmsl/max96712.c b/drivers/media/i2c/soc_camera/gmsl/max96712.c +index 17eed0b..80e26d0 100644 +--- a/drivers/media/i2c/soc_camera/gmsl/max96712.c ++++ b/drivers/media/i2c/soc_camera/gmsl/max96712.c +@@ -925,7 +925,7 @@ static void max96712_gmsl2_fsync_setup(struct max96712_priv *priv) + des_write(MAX96712_FSYNC_11, 0x00); + + des_write(MAX96712_FSYNC_0, 0x00); /* Manual method, Internal GMSL2 generator mode */ +- des_write(MAX96712_FSYNC_15, 0x9f); /* GMSL2 Type Fsync, Enable all pipes */ ++ des_write(MAX96712_FSYNC_15, 0x80); /* GMSL2 Type Fsync, Disable all pipes for manual mode */ + des_write(MAX96712_FSYNC_17, 8 << 3); /* GPIO ID=8 assosiated with FSYNC transmission */ + } + +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0518-media-i2c-imagers-ar0231-fix-GMSL2.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0518-media-i2c-imagers-ar0231-fix-GMSL2.patch new file mode 100644 index 00000000..e6aab0b5 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0518-media-i2c-imagers-ar0231-fix-GMSL2.patch @@ -0,0 +1,55 @@ +From 92c2f541b19b139a4457383c634b142457ca3df3 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 6 May 2020 17:19:02 +0300 +Subject: [PATCH 1/2] media: i2c: imagers: ar0231: fix GMSL2 + +This fixes imager MIPI setup over GMSL2 + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/ar0231.c | 4 ++-- + drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231.c b/drivers/media/i2c/soc_camera/imagers/ar0231.c +index 42f125c..fd8fe94 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ar0231.c ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231.c +@@ -423,11 +423,11 @@ static int ar0231_initialize(struct i2c_client *client) + /* Program wizard registers */ + switch (get_des_id(client)) { + case UB960_ID: ++ case MAX9296A_ID: ++ case MAX96712_ID: + ar0231_set_regs(client, ar0231_regs_wizard_rev7, ARRAY_SIZE(ar0231_regs_wizard_rev7)); + break; + case MAX9286_ID: +- case MAX9296A_ID: +- case MAX96712_ID: + ar0231_set_regs(client, ar0231_regs_wizard_rev6_dvp, ARRAY_SIZE(ar0231_regs_wizard_rev6_dvp)); + break; + } +diff --git a/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h b/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h +index f3485f5..96dd2c4 100644 +--- a/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h ++++ b/drivers/media/i2c/soc_camera/imagers/ar0231_rev7.h +@@ -303,6 +303,7 @@ static const struct ar0231_reg ar0231_regs_wizard_rev7[] = { + #if 1 /* Serial 12-bit Timing Setup */ + /* PCLK=24Mhz/PRE_PLL_CLK_DIV *PLL_MULTIPLIER /P1 /P4 *2 */ + /* PCLK=24Mhz/2 *44/1/12 *2= 88Mhz - TI serializers */ ++/* MIPI 528MBPS */ + {0x302E, 2}, // pre_pll_clk_div + {0x3030, 44}, // pll_multiplier + {0x302C, 1}, // vt_sys_clk_div (P1 divider) +@@ -381,7 +382,7 @@ static const struct ar0231_reg ar0231_regs_wizard_rev7[] = { + {0x31B6, 0x1146}, + {0x31B8, 0x3047}, + {0x31BA, 0x186}, +-{0x31BC, 0x805}, ++{0x31BC, 0x805 | BIT(15)}, + #endif /* MIPI 12 bit Settings */ + + /* FPS = 105MHz / reg0x300A / reg0x300C * (DES_XTAL/27MHz), DES_XTAL=23.5MHz */ +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0519-media-i2c-imagers-add-IMX390-for-new-LVDS-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0519-media-i2c-imagers-add-IMX390-for-new-LVDS-support.patch new file mode 100644 index 00000000..b4e8848e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0519-media-i2c-imagers-add-IMX390-for-new-LVDS-support.patch @@ -0,0 +1,4377 @@ +From f901052c8130b621fa1a94facb375ac9a5bc8a2e Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 27 May 2020 12:34:28 +0300 +Subject: [PATCH] media: i2c: imagers: add IMX390 for new LVDS support + +This adds IMX390 into new LVDS drivers that support all enabled +serializers + +Signed-off-by: Vladimir Barinov +media: i2c: imagers: add IMX390 for new LVDS support + +This adds IMX390 into new LVDS drivers that support all enabled +serializers + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/imagers/Makefile | 1 + + drivers/media/i2c/soc_camera/imagers/imx390.c | 655 +++++ + drivers/media/i2c/soc_camera/imagers/imx390.h | 3672 +++++++++++++++++++++++++ + 3 files changed, 4328 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/imagers/imx390.c + create mode 100644 drivers/media/i2c/soc_camera/imagers/imx390.h + +diff --git a/drivers/media/i2c/soc_camera/imagers/Makefile b/drivers/media/i2c/soc_camera/imagers/Makefile +index eeb36fd..66c9237 100644 +--- a/drivers/media/i2c/soc_camera/imagers/Makefile ++++ b/drivers/media/i2c/soc_camera/imagers/Makefile +@@ -2,6 +2,7 @@ + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0101_ar014x.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ap0201_ar023x.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ar0231.o ++obj-$(CONFIG_SOC_CAMERA_OV106XX) += imx390.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov10635.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov2311.o + obj-$(CONFIG_SOC_CAMERA_OV106XX) += ov490.o +diff --git a/drivers/media/i2c/soc_camera/imagers/imx390.c b/drivers/media/i2c/soc_camera/imagers/imx390.c +new file mode 100644 +index 0000000..c326aa6 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/imx390.c +@@ -0,0 +1,655 @@ ++/* ++ * Sony IMX390 sensor camera driver ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include "../gmsl/common.h" ++#include "imx390.h" ++ ++static const int imx390_i2c_addr[] = {0x21, 0x1a}; ++ ++#define IMX390_PID_REG 0x0330 ++#define IMX390_PID 0x0015 ++ ++#define IMX390_MEDIA_BUS_FMT MEDIA_BUS_FMT_SRGGB12_1X12 ++ ++struct imx390_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ int fps_denominator; ++ int fps_numerator; ++ int init_complete; ++ u8 id[6]; ++ int exposure; ++ int gain; ++ int autogain; ++ /* serializers */ ++ int ser_addr; ++ int vts; ++}; ++ ++static inline struct imx390_priv *to_imx390(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct imx390_priv, sd); ++} ++ ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct imx390_priv, hdl)->sd; ++} ++ ++static int imx390_set_regs(struct i2c_client *client, ++ const struct imx390_reg *regs, int nr_regs) ++{ ++ int i; ++ ++ for (i = 0; i < nr_regs; i++) { ++ if (regs[i].reg == IMX390_DELAY) { ++ mdelay(regs[i].val); ++ continue; ++ } ++ ++ reg16_write(client, regs[i].reg, regs[i].val); ++ } ++ ++ return 0; ++} ++ ++static void imx390_otp_id_read(struct i2c_client *client) ++{ ++ struct imx390_priv *priv = to_imx390(client); ++ int i; ++ u8 val = 0; ++ ++ /* read camera id from imx390 OTP memory */ ++ for (i = 0; i < 6; i++) { ++ reg16_read(client, 0x3050 + i, &val); ++ priv->id[i] = val; ++ } ++} ++ ++static int imx390_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int imx390_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = IMX390_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int imx390_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ ++ mf->code = IMX390_MEDIA_BUS_FMT; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int imx390_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = IMX390_MEDIA_BUS_FMT; ++ ++ return 0; ++} ++ ++static int imx390_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = IMX390_PID >> 8; ++ edid->edid[9] = IMX390_PID & 0xff; ++ ++ return 0; ++} ++ ++static int imx390_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > IMX390_MAX_WIDTH) || ++ (rect->top + rect->height > IMX390_MAX_HEIGHT)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int imx390_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = IMX390_MAX_WIDTH; ++ sel->r.height = IMX390_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = IMX390_MAX_WIDTH; ++ sel->r.height = IMX390_MAX_HEIGHT; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int imx390_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++static int imx390_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(struct v4l2_captureparm)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = priv->fps_numerator; ++ cp->timeperframe.denominator = priv->fps_denominator; ++ ++ return 0; ++} ++ ++static int imx390_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ int ret = 0, timeout; ++ u8 val; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (priv->fps_denominator != cp->timeperframe.denominator || ++ priv->fps_numerator != cp->timeperframe.numerator) { ++ priv->vts = (IMX390_SENSOR_HEIGHT + 29) * 30 * cp->timeperframe.numerator / cp->timeperframe.denominator; ++ ++ reg16_write(client, 0x0, 1); ++ for (timeout = 100; timeout > 0; timeout--) { ++ reg16_read(client, 0x5001, &val); ++ if (val == 1) ++ break; ++ mdelay(1); ++ } ++ if (!timeout) ++ dev_err(&client->dev, "timeout enter standby\n"); ++ ++ reg16_write(client, 0x2008, priv->vts & 0xff); ++ reg16_write(client, 0x2009, (priv->vts >> 8) & 0xff); ++ reg16_write(client, 0x200A, priv->vts >> 16); ++ ret = reg16_write(client, 0x0, 0); ++ ++ priv->fps_numerator = cp->timeperframe.numerator; ++ priv->fps_denominator = cp->timeperframe.denominator; ++ } ++ ++ return ret; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int imx390_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 s = reg->size; ++ int ret; ++ ++ if (!s) ++ s = 1; ++ if (s > sizeof(reg->val)) ++ s = sizeof(reg->val); ++ ++ ret = reg16_read_n(client, (u16)reg->reg, (u8*)®->val, s); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ ++static int imx390_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ u32 s = reg->size; ++ ++ if (!s) ++ s = 1; ++ if (s > sizeof(reg->val)) ++ s = sizeof(reg->val); ++ ++ return reg16_write_n(client, (u16)reg->reg, (u8*)®->val, s); ++} ++#endif ++ ++static struct v4l2_subdev_core_ops imx390_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = imx390_g_register, ++ .s_register = imx390_s_register, ++#endif ++}; ++ ++static int imx390_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ int ret = -EINVAL; ++ int val; ++ uint8_t val8 = 0; ++ ++ if (!priv->init_complete) ++ return 0; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ break; ++ case V4L2_CID_GAIN: ++ /* Digital gain */ ++ /* Set PGA_GAIN_SP1H as Normal SP1 HCG mode is configured in wizard */ ++ val8 = ctrl->val & 0xff; ++ ret = reg16_write(client, 0x24, val8); ++#if 0 // stubs for other normal modes and HDR ++ /* Set PGA_GAIN_SP1L as Normal SP1 LCG mode is configured in wizard */ ++ val8 = ctrl->val & 0xff; ++ ret = reg16_write(client, 0x26, val8); ++ ++ /* Set PGA_GAIN_SP2 as Normal SP2 mode is configured in wizard */ ++ val8 = ctrl->val & 0xff; ++ ret = reg16_write(client, 0x28, val8); ++#endif ++ break; ++ case V4L2_CID_ANALOGUE_GAIN: ++ /* Analog gain */ ++ /* Set AGAIN_SP1H as Normal SP1 HCG mode is configured in wizard */ ++ val8 = ctrl->val & 0xff; ++ ret = reg16_write(client, 0x18, val8); ++#if 0 // stubs for other normal modes and HDR ++ /* Set AGAIN_SP1L as Normal SP1 LCG mode is configured in wizard */ ++ val8 = ctrl->val & 0xff; ++ ret = reg16_write(client, 0x1A, val8); ++#endif ++ break; ++ case V4L2_CID_EXPOSURE: ++ val = 0xfff - ctrl->val; ++ reg16_write(client, 0x0c, val); /* LSB */ ++ reg16_write(client, 0x0d, val >> 8); ++ ret = reg16_write(client, 0x0e, val >> 16); /* MSB */ ++ break; ++ case V4L2_CID_HFLIP: ++ /* hflip */ ++ ret = reg16_read(client, 0x74, &val8); ++ if (ctrl->val) ++ val8 |= (1 << 1); ++ else ++ val8 &= ~(1 << 1); ++ ret |= reg16_write(client, 0x74, val8); ++ ++ /* hflip app lock */ ++ ret = reg16_read(client, 0x3c0, &val8); ++ if (ctrl->val) ++ val8 |= (1 << 3); ++ else ++ val8 &= ~(1 << 3); ++ ret |= reg16_write(client, 0x3c0, val8); ++ break; ++ case V4L2_CID_VFLIP: ++ /* vflip */ ++ ret = reg16_read(client, 0x74, &val8); ++ if (ctrl->val) ++ val8 |= (1 << 0); ++ else ++ val8 &= ~(1 << 0); ++ ret |= reg16_write(client, 0x74, val8); ++ ++ /* vflip app lock */ ++ ret = reg16_read(client, 0x3c0, &val8); ++ if (ctrl->val) ++ val8 |= (1 << 2); ++ else ++ val8 &= ~(1 << 2); ++ ret |= reg16_write(client, 0x3c0, val8); ++ break; ++ } ++ ++ return ret; ++} ++ ++static const struct v4l2_ctrl_ops imx390_ctrl_ops = { ++ .s_ctrl = imx390_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops imx390_video_ops = { ++ .s_stream = imx390_s_stream, ++ .g_mbus_config = imx390_g_mbus_config, ++ .g_parm = imx390_g_parm, ++ .s_parm = imx390_s_parm, ++}; ++ ++static const struct v4l2_subdev_pad_ops imx390_subdev_pad_ops = { ++ .get_edid = imx390_get_edid, ++ .enum_mbus_code = imx390_enum_mbus_code, ++ .get_selection = imx390_get_selection, ++ .set_selection = imx390_set_selection, ++ .get_fmt = imx390_get_fmt, ++ .set_fmt = imx390_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops imx390_subdev_ops = { ++ .core = &imx390_core_ops, ++ .video = &imx390_video_ops, ++ .pad = &imx390_subdev_pad_ops, ++}; ++ ++static ssize_t imx390_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct imx390_priv *priv = to_imx390(client); ++ ++ imx390_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_imx390, S_IRUGO, imx390_otp_id_show, NULL); ++ ++static int imx390_initialize(struct i2c_client *client) ++{ ++ struct imx390_priv *priv = to_imx390(client); ++ u8 pid = 0; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(imx390_i2c_addr); i++) { ++ setup_i2c_translator(client, priv->ser_addr, imx390_i2c_addr[i]); ++ ++ /* check model ID */ ++ reg16_read(client, IMX390_PID_REG, &pid); ++ if (pid == IMX390_PID) ++ break; ++ } ++ ++ if (pid != IMX390_PID) { ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ return -ENODEV; ++ } ++ ++ switch (get_des_id(client)) { ++ case UB960_ID: ++ /* Setup XCLK: ++ * CLK_OUT=23MHz*160*M/N/CLKDIV ++ * CLK_OUT=24MHz (desired), CLKDIV=4, M=6, N=230 ++ * 23*160/4*6/230 = 24MHz = CLK_OUT ++ */ ++ reg8_write_addr(client, priv->ser_addr, 0x06, 0x46); /* Set CLKDIV and M */ ++ reg8_write_addr(client, priv->ser_addr, 0x07, 0xe6); /* Set N */ ++ break; ++ case MAX9296A_ID: ++ case MAX96712_ID: ++// reg16_write_addr(client, priv->ser_addr, MAX9295_MIPI_RX1, 0x11); /* MIPI 2-lanes */ ++ break; ++ } ++ ++ /* Read OTP IDs */ ++ imx390_otp_id_read(client); ++ /* Program wizard registers */ ++ imx390_set_regs(client, imx390_regs_wizard, ARRAY_SIZE(imx390_regs_wizard)); ++ ++ dev_info(&client->dev, "imx390 PID %x, res %dx%d, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, IMX390_MAX_WIDTH, IMX390_MAX_HEIGHT, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ return 0; ++} ++ ++static const struct i2c_device_id imx390_id[] = { ++ { "imx390", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, imx390_id); ++ ++static const struct of_device_id imx390_of_ids[] = { ++ { .compatible = "sony,imx390", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, imx390_of_ids); ++ ++static int imx390_parse_dt(struct device_node *np, struct imx390_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ u32 addrs[2], naddrs; ++ ++ naddrs = of_property_count_elems_of_size(np, "reg", sizeof(u32)); ++ if (naddrs != 2) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ if (of_property_read_u32_array(client->dev.of_node, "reg", addrs, naddrs) < 0) { ++ dev_err(&client->dev, "Invalid DT reg property\n"); ++ return -EINVAL; ++ } ++ ++ priv->ser_addr = addrs[1]; ++ ++ return 0; ++} ++ ++static int imx390_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct imx390_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &imx390_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ priv->fps_numerator = 1; ++ priv->fps_denominator = 30; ++ ++ priv->exposure = 0x100; ++ priv->gain = 0; ++ priv->autogain = 1; ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, priv->autogain); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_GAIN, 0, 140, 1, priv->gain); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 0, 100, 1, 0x15); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_EXPOSURE, 0, 0xff0, 1, 0xfff - 0x2f2); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &imx390_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = imx390_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = imx390_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = IMX390_MAX_WIDTH; ++ priv->rect.height = IMX390_MAX_HEIGHT; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_imx390) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ priv->init_complete = 1; ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ return ret; ++} ++ ++static int imx390_remove(struct i2c_client *client) ++{ ++ struct imx390_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_imx390); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} ++ ++static struct i2c_driver imx390_i2c_driver = { ++ .driver = { ++ .name = "imx390", ++ .of_match_table = imx390_of_ids, ++ }, ++ .probe = imx390_probe, ++ .remove = imx390_remove, ++ .id_table = imx390_id, ++}; ++ ++module_i2c_driver(imx390_i2c_driver); ++ ++MODULE_DESCRIPTION("SoC Camera driver for IMX390"); ++MODULE_AUTHOR("Vladimir Barinov"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/media/i2c/soc_camera/imagers/imx390.h b/drivers/media/i2c/soc_camera/imagers/imx390.h +new file mode 100644 +index 0000000..8f27447 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/imagers/imx390.h +@@ -0,0 +1,3672 @@ ++/* ++ * Sony IMX390 sensor camera wizard 1920x1080@30/BGGR/MIPI ++ * ++ * Copyright (C) 2018-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++//#define IMX390_DISPLAY_PATTERN_COLOR_BAR ++ ++#define IMX390_MAX_WIDTH 1920 ++#define IMX390_MAX_HEIGHT 1080 ++ ++#define IMX390_SENSOR_WIDTH 1936 ++#define IMX390_SENSOR_HEIGHT 1096 ++ ++#define IMX390_DELAY 0xffff ++#define IMX390_DT 0x2c /* MIPI Data Type RAW12 */ ++ ++struct imx390_reg { ++ u16 reg; ++ u8 val; ++}; ++ ++/* wizard: MIPI 1920x1080 RAW12 Linear 30fps 700Mbps */ ++static const struct imx390_reg imx390_regs_wizard[] = { ++{0x000C, 0xF2}, ++{0x000D, 0x02}, ++{0x000E, 0x00}, ++{0x0010, 0xF2}, ++{0x0011, 0x02}, ++{0x0012, 0x00}, ++{0x0018, 0x15}, ++{0x0019, 0x00}, ++{0x001A, 0x0C}, ++{0x001B, 0x00}, ++{0x0038, 0x00}, ++{0x003C, 0x00}, ++{0x003D, 0x00}, ++{0x003E, 0x00}, ++{0x0040, 0x00}, ++{0x0041, 0x00}, ++{0x0042, 0x00}, ++{0x0044, 0x00}, ++{0x0045, 0x00}, ++{0x0046, 0x00}, ++{0x0048, 0x00}, ++{0x0049, 0x00}, ++{0x004A, 0x00}, ++{0x004C, 0x00}, ++{0x004D, 0x00}, ++{0x004E, 0x00}, ++{0x0050, 0x00}, ++{0x0051, 0x00}, ++{0x0052, 0x00}, ++{0x0054, 0x00}, ++{0x0055, 0x00}, ++{0x0056, 0x00}, ++{0x0058, 0x00}, ++{0x0059, 0x00}, ++{0x005A, 0x00}, ++{0x005C, 0x00}, ++{0x005D, 0x00}, ++{0x005E, 0x00}, ++{0x0060, 0x00}, ++{0x0061, 0x00}, ++{0x0062, 0x00}, ++{0x0064, 0x00}, ++{0x0065, 0x00}, ++{0x0066, 0x00}, ++{0x0068, 0x00}, ++{0x0069, 0x00}, ++{0x006A, 0x00}, ++{0x0078, 0x00}, ++{0x007C, 0x00}, ++{0x007D, 0x00}, ++{0x0080, 0x00}, ++{0x0081, 0x00}, ++{0x00F4, 0x1C}, ++{0x00F5, 0xF8}, ++{0x00F6, 0x01}, ++{0x00F8, 0x03}, ++{0x00F9, 0x00}, // non-HDR ++//{0x00F9, 0x01}, // HDR ++{0x00FA, 0x00}, ++{0x00FB, 0x00}, ++{0x0114, 0x00}, ++{0x0115, 0x01}, ++{0x0118, 0x20}, ++{0x0119, 0x03}, ++{0x011A, 0x00}, ++{0x011B, 0x41}, ++{0x011C, 0x80}, ++{0x011D, 0x00}, ++{0x0120, 0x20}, ++{0x0121, 0x00}, ++{0x0122, 0x00}, ++{0x0123, 0x44}, ++{0x0124, 0x00}, ++{0x0125, 0x01}, ++{0x0128, 0xAC}, ++{0x0129, 0x0D}, ++{0x012A, 0x00}, ++{0x012B, 0xA4}, ++{0x012C, 0x00}, ++{0x012D, 0x01}, ++{0x0130, 0xC4}, ++{0x0131, 0x09}, ++{0x0132, 0x00}, ++{0x0133, 0xDA}, ++{0x013B, 0x01}, ++{0x01C4, 0x00}, ++{0x01C5, 0x00}, ++{0x01CC, 0x01}, ++{0x01D0, 0x09}, ++{0x01D4, 0x01}, ++{0x0232, 0x7E}, ++{0x0233, 0x00}, ++{0x0390, 0x00}, ++{0x0391, 0x00}, ++{0x0392, 0x00}, ++#ifdef IMX390_DISPLAY_PATTERN_COLOR_BAR ++{0x01DB, 0x32}, ++{0x03C0, 0x02}, ++#else ++{0x03C0, 0x00}, ++#endif ++{0x2000, 0x55}, ++{0x2001, 0x55}, ++{0x2002, 0x55}, ++{0x2003, 0x05}, ++{0x2004, 0x02}, ++{0x2008, (IMX390_SENSOR_HEIGHT + 29) & 0xff}, ++{0x2009, ((IMX390_SENSOR_HEIGHT + 29) >> 8) & 0xff}, ++{0x200A, (IMX390_SENSOR_HEIGHT + 29) >> 16}, ++{0x200C, 0x30}, ++{0x200D, 0x11}, ++{0x2010, 0x04}, ++{0x2014, 0x01}, ++{0x2018, 0x02}, ++{0x2019, 0x04}, ++{0x201A, 0x00}, ++{0x201C, 0x21}, ++{0x201D, 0x11}, ++{0x201E, 0x00}, ++{0x201F, 0x00}, ++{0x2020, 0xBC}, ++{0x2021, 0x00}, ++{0x2022, 0x7F}, ++{0x2023, 0x00}, ++{0x2024, 0xBA}, ++{0x2025, 0x00}, ++{0x2026, 0x81}, ++{0x2027, 0x00}, ++{0x2028, 0x7D}, ++{0x2029, 0x90}, ++{0x202A, 0x05}, ++{0x202C, 0xFC}, ++{0x202D, 0x02}, ++{0x202E, 0x25}, ++{0x202F, 0x03}, ++{0x2030, 0x05}, ++{0x2031, 0x02}, ++{0x2032, 0xCA}, ++{0x2033, 0x02}, ++{0x2034, 0xFC}, ++{0x2035, 0x02}, ++{0x2036, 0x25}, ++{0x2037, 0x03}, ++{0x2038, 0x25}, ++{0x2039, 0x97}, ++{0x203A, 0xEC}, ++{0x203B, 0x01}, ++{0x203C, 0xF5}, ++{0x203D, 0x8E}, ++{0x203E, 0x0C}, ++{0x203F, 0x2D}, ++{0x2040, 0x69}, ++{0x2041, 0x01}, ++{0x2042, 0x8E}, ++{0x2043, 0x01}, ++{0x2044, 0x0C}, ++{0x2045, 0x02}, ++{0x2046, 0x31}, ++{0x2047, 0x02}, ++{0x2048, 0x6A}, ++{0x2049, 0x01}, ++{0x204A, 0x8E}, ++{0x204B, 0x01}, ++{0x204C, 0x0D}, ++{0x204D, 0x02}, ++{0x204E, 0x31}, ++{0x204F, 0x02}, ++{0x2050, 0x7B}, ++{0x2051, 0x00}, ++{0x2052, 0x7D}, ++{0x2053, 0x00}, ++{0x2054, 0x95}, ++{0x2055, 0x00}, ++{0x2056, 0x97}, ++{0x2057, 0x00}, ++{0x2058, 0xAD}, ++{0x2059, 0x00}, ++{0x205A, 0xAF}, ++{0x205B, 0x00}, ++{0x205C, 0x92}, ++{0x205D, 0x00}, ++{0x205E, 0x94}, ++{0x205F, 0x00}, ++{0x2060, 0x8E}, ++{0x2061, 0x00}, ++{0x2062, 0x90}, ++{0x2063, 0x00}, ++{0x2064, 0xB1}, ++{0x2065, 0x00}, ++{0x2066, 0xB3}, ++{0x2067, 0x00}, ++{0x2068, 0x08}, ++{0x2069, 0x00}, ++{0x206A, 0x04}, ++{0x206B, 0x00}, ++{0x206C, 0x84}, ++{0x206D, 0x00}, ++{0x206E, 0x80}, ++{0x206F, 0x00}, ++{0x2070, 0x04}, ++{0x2071, 0x00}, ++{0x2072, 0x46}, ++{0x2073, 0x00}, ++{0x2074, 0xE9}, ++{0x2075, 0x01}, ++{0x2076, 0x74}, ++{0x2077, 0x02}, ++{0x2078, 0x80}, ++{0x2079, 0x00}, ++{0x207A, 0xC1}, ++{0x207B, 0x00}, ++{0x207C, 0xFF}, ++{0x207D, 0x03}, ++{0x207E, 0xFF}, ++{0x207F, 0x03}, ++{0x2080, 0x78}, ++{0x2081, 0x00}, ++{0x2082, 0x6A}, ++{0x2083, 0x01}, ++{0x2084, 0xE4}, ++{0x2085, 0x01}, ++{0x2086, 0x2B}, ++{0x2087, 0x03}, ++{0x2088, 0x00}, ++{0x2089, 0x00}, ++{0x208A, 0xFF}, ++{0x208B, 0x03}, ++{0x208C, 0xFF}, ++{0x208D, 0x03}, ++{0x208E, 0xFF}, ++{0x208F, 0x03}, ++{0x2090, 0x7D}, ++{0x2091, 0x00}, ++{0x2092, 0x62}, ++{0x2093, 0x01}, ++{0x2094, 0xE9}, ++{0x2095, 0x01}, ++{0x2096, 0x00}, ++{0x2097, 0x00}, ++{0x2098, 0x7C}, ++{0x2099, 0x00}, ++{0x209A, 0x21}, ++{0x209B, 0x03}, ++{0x209C, 0xE9}, ++{0x209D, 0x01}, ++{0x209E, 0x21}, ++{0x209F, 0x03}, ++{0x20A0, 0xFF}, ++{0x20A1, 0x03}, ++{0x20A2, 0xFF}, ++{0x20A3, 0x03}, ++{0x20A4, 0xFF}, ++{0x20A5, 0x03}, ++{0x20A6, 0xFF}, ++{0x20A7, 0x03}, ++{0x20A8, 0xFF}, ++{0x20A9, 0x03}, ++{0x20AA, 0xFF}, ++{0x20AB, 0x03}, ++{0x20AC, 0xFF}, ++{0x20AD, 0x03}, ++{0x20AE, 0xFF}, ++{0x20AF, 0x03}, ++{0x20B0, 0xFF}, ++{0x20B1, 0x03}, ++{0x20B2, 0xFF}, ++{0x20B3, 0x03}, ++{0x20B4, 0x87}, ++{0x20B5, 0xCC}, ++{0x20B6, 0x87}, ++{0x20B7, 0x08}, ++{0x20B8, 0xF4}, ++{0x20B9, 0xA5}, ++{0x20BA, 0x07}, ++{0x20BC, 0x1F}, ++{0x20BD, 0x01}, ++{0x20BE, 0xF6}, ++{0x20BF, 0x00}, ++{0x20C0, 0x90}, ++{0x20C1, 0x01}, ++{0x20C2, 0x67}, ++{0x20C3, 0x01}, ++{0x20C4, 0xFF}, ++{0x20C5, 0x03}, ++{0x20C6, 0xFF}, ++{0x20C7, 0x03}, ++{0x20C8, 0x33}, ++{0x20C9, 0x02}, ++{0x20CA, 0x0A}, ++{0x20CB, 0x02}, ++{0x20CC, 0x7F}, ++{0x20CD, 0x00}, ++{0x20CE, 0xD2}, ++{0x20CF, 0x00}, ++{0x20D0, 0x81}, ++{0x20D1, 0x00}, ++{0x20D2, 0x87}, ++{0x20D3, 0x00}, ++{0x20D4, 0x09}, ++{0x20D5, 0x00}, ++{0x20D8, 0x7F}, ++{0x20D9, 0x00}, ++{0x20DA, 0x62}, ++{0x20DB, 0x01}, ++{0x20DC, 0x7F}, ++{0x20DD, 0x00}, ++{0x20DE, 0x62}, ++{0x20DF, 0x01}, ++{0x20E0, 0x65}, ++{0x20E1, 0x00}, ++{0x20E2, 0x75}, ++{0x20E3, 0x00}, ++{0x20E4, 0xE0}, ++{0x20E5, 0x00}, ++{0x20E6, 0xF0}, ++{0x20E7, 0x00}, ++{0x20E8, 0x4C}, ++{0x20E9, 0x01}, ++{0x20EA, 0x5C}, ++{0x20EB, 0x01}, ++{0x20EC, 0xD1}, ++{0x20ED, 0x01}, ++{0x20EE, 0xE1}, ++{0x20EF, 0x01}, ++{0x20F0, 0x93}, ++{0x20F1, 0x02}, ++{0x20F2, 0xA3}, ++{0x20F3, 0x02}, ++{0x20F4, 0x0D}, ++{0x20F5, 0x03}, ++{0x20F6, 0x1D}, ++{0x20F7, 0x03}, ++{0x20F8, 0x57}, ++{0x20F9, 0x00}, ++{0x20FA, 0x7B}, ++{0x20FB, 0x00}, ++{0x20FC, 0xD2}, ++{0x20FD, 0x00}, ++{0x20FE, 0xF6}, ++{0x20FF, 0x00}, ++{0x2100, 0x3E}, ++{0x2101, 0x01}, ++{0x2102, 0x60}, ++{0x2103, 0x01}, ++{0x2104, 0xC3}, ++{0x2105, 0x01}, ++{0x2106, 0xE5}, ++{0x2107, 0x01}, ++{0x2108, 0x85}, ++{0x2109, 0x02}, ++{0x210A, 0xA9}, ++{0x210B, 0x02}, ++{0x210C, 0xFF}, ++{0x210D, 0x02}, ++{0x210E, 0x21}, ++{0x210F, 0x03}, ++{0x2110, 0xFF}, ++{0x2111, 0x03}, ++{0x2112, 0x00}, ++{0x2113, 0x00}, ++{0x2114, 0xFF}, ++{0x2115, 0x03}, ++{0x2116, 0xFF}, ++{0x2117, 0x03}, ++{0x2118, 0xFF}, ++{0x2119, 0x03}, ++{0x211A, 0xFF}, ++{0x211B, 0x03}, ++{0x211C, 0xFF}, ++{0x211D, 0x03}, ++{0x211E, 0xFF}, ++{0x211F, 0x03}, ++{0x2120, 0xFF}, ++{0x2121, 0x03}, ++{0x2122, 0xFF}, ++{0x2123, 0x03}, ++{0x2124, 0xFF}, ++{0x2125, 0x03}, ++{0x2126, 0xFF}, ++{0x2127, 0x03}, ++{0x2128, 0x7D}, ++{0x2129, 0x90}, ++{0x212A, 0xD5}, ++{0x212B, 0x07}, ++{0x212C, 0x64}, ++{0x212D, 0x01}, ++{0x2130, 0x5F}, ++{0x2131, 0x7D}, ++{0x2132, 0x05}, ++{0x2134, 0x78}, ++{0x2135, 0x00}, ++{0x2136, 0x76}, ++{0x2137, 0x00}, ++{0x2138, 0xF3}, ++{0x2139, 0x00}, ++{0x213A, 0xF1}, ++{0x213B, 0x00}, ++{0x213C, 0xA6}, ++{0x213D, 0x02}, ++{0x213E, 0xA4}, ++{0x213F, 0x02}, ++{0x2140, 0x7D}, ++{0x2141, 0x00}, ++{0x2142, 0x8D}, ++{0x2143, 0x00}, ++{0x2144, 0xA1}, ++{0x2145, 0x01}, ++{0x2146, 0xB1}, ++{0x2147, 0x01}, ++{0x2148, 0xAB}, ++{0x2149, 0x02}, ++{0x214A, 0xBB}, ++{0x214B, 0x02}, ++{0x214C, 0x17}, ++{0x214D, 0x5C}, ++{0x214E, 0x00}, ++{0x2150, 0x00}, ++{0x2151, 0x00}, ++{0x2152, 0xF8}, ++{0x2153, 0x00}, ++{0x2154, 0xBE}, ++{0x2155, 0x00}, ++{0x2156, 0x7D}, ++{0x2157, 0x00}, ++{0x2158, 0x25}, ++{0x2159, 0x00}, ++{0x215A, 0x7D}, ++{0x215B, 0x00}, ++{0x215C, 0x62}, ++{0x215D, 0x01}, ++{0x215E, 0xFF}, ++{0x215F, 0x03}, ++{0x2160, 0x26}, ++{0x2161, 0x00}, ++{0x2162, 0x7D}, ++{0x2163, 0x00}, ++{0x2164, 0x63}, ++{0x2165, 0x01}, ++{0x2166, 0xFF}, ++{0x2167, 0x03}, ++{0x2168, 0xCB}, ++{0x2169, 0x02}, ++{0x216A, 0xCF}, ++{0x216B, 0x02}, ++{0x216C, 0xFF}, ++{0x216D, 0x03}, ++{0x216E, 0xFF}, ++{0x216F, 0x03}, ++{0x2170, 0xFF}, ++{0x2171, 0x03}, ++{0x2172, 0xFF}, ++{0x2173, 0x03}, ++{0x2174, 0xFF}, ++{0x2175, 0x03}, ++{0x2176, 0xFF}, ++{0x2177, 0x03}, ++{0x2178, 0x7E}, ++{0x2179, 0x00}, ++{0x217A, 0xBD}, ++{0x217B, 0x00}, ++{0x217C, 0xEC}, ++{0x217D, 0x01}, ++{0x217E, 0x7B}, ++{0x217F, 0x02}, ++{0x2180, 0xD1}, ++{0x2181, 0x02}, ++{0x2182, 0x25}, ++{0x2183, 0x03}, ++{0x2184, 0x7F}, ++{0x2185, 0x00}, ++{0x2186, 0xBD}, ++{0x2187, 0x00}, ++{0x2188, 0xED}, ++{0x2189, 0x01}, ++{0x218A, 0x7B}, ++{0x218B, 0x02}, ++{0x218C, 0xD2}, ++{0x218D, 0x02}, ++{0x218E, 0x25}, ++{0x218F, 0x03}, ++{0x2190, 0xFF}, ++{0x2191, 0x03}, ++{0x2192, 0xFF}, ++{0x2193, 0x03}, ++{0x2194, 0xE9}, ++{0x2195, 0x01}, ++{0x2196, 0x21}, ++{0x2197, 0x03}, ++{0x2198, 0x17}, ++{0x2199, 0xFC}, ++{0x219A, 0x7F}, ++{0x219B, 0x01}, ++{0x219C, 0xFF}, ++{0x219D, 0x03}, ++{0x21A0, 0x1B}, ++{0x21A1, 0x1B}, ++{0x21A2, 0x1B}, ++{0x21A3, 0x1B}, ++{0x21A4, 0x2E}, ++{0x21A5, 0x80}, ++{0x21A6, 0x00}, ++{0x21A8, 0x04}, ++{0x21A9, 0x98}, ++{0x21AA, 0x60}, ++{0x21AB, 0x03}, ++{0x21AC, 0x7F}, ++{0x21AD, 0x80}, ++{0x21AE, 0x09}, ++{0x21B0, 0x1C}, ++{0x21B1, 0x00}, ++{0x21B2, 0xA0}, ++{0x21B3, 0x00}, ++{0x21B4, 0x0C}, ++{0x21B5, 0x00}, ++{0x21B6, 0x2D}, ++{0x21B7, 0x00}, ++{0x21B8, 0x20}, ++{0x21B9, 0x00}, ++{0x21BA, 0x02}, ++{0x21BB, 0x00}, ++{0x21BC, 0xCC}, ++{0x21BD, 0x00}, ++{0x21BE, 0x4A}, ++{0x21BF, 0x00}, ++{0x21C0, 0xD0}, ++{0x21C1, 0x00}, ++{0x21C2, 0x44}, ++{0x21C3, 0x00}, ++{0x21C4, 0x00}, ++{0x21C5, 0xE0}, ++{0x21C6, 0x00}, ++{0x21C8, 0x11}, ++{0x21C9, 0x00}, ++{0x21CA, 0x02}, ++{0x21CC, 0x08}, ++{0x21CD, 0xC0}, ++{0x21CE, 0x0C}, ++{0x21D0, 0x44}, ++{0x21D1, 0x00}, ++{0x21D2, 0x02}, ++{0x21D4, 0x02}, ++{0x21D5, 0x20}, ++{0x21D6, 0x2C}, ++{0x21D8, 0xFE}, ++{0x21D9, 0x9D}, ++{0x21DA, 0xDF}, ++{0x21DB, 0x03}, ++{0x21DC, 0x62}, ++{0x21DD, 0x01}, ++{0x21DE, 0x7F}, ++{0x21DF, 0x00}, ++{0x21E0, 0xB7}, ++{0x21E1, 0x01}, ++{0x21E2, 0xB5}, ++{0x21E3, 0x01}, ++{0x21E4, 0xC1}, ++{0x21E5, 0x02}, ++{0x21E6, 0xBF}, ++{0x21E7, 0x02}, ++{0x21E8, 0xB3}, ++{0x21E9, 0x0D}, ++{0x21EA, 0x00}, ++{0x21EB, 0x04}, ++#if 1 ++{0x21EC, 0x90}, ++{0x21ED, 0x07}, ++{0x21EE, 0x58}, ++{0x21EF, 0x04}, ++#else ++{0x21EC, 0x80}, ++{0x21ED, 0x07}, ++{0x21EE, 0x38}, ++{0x21EF, 0x04}, ++#endif ++{0x21F0, 0x54}, ++{0x21F1, 0x04}, ++{0x21F4, 0x02}, ++{0x21F5, 0x00}, ++{0x21F6, 0x00}, ++{0x21F8, 0x3C}, ++{0x21F9, 0x00}, ++{0x21FC, 0x28}, ++{0x21FD, 0x00}, ++{0x21FE, 0x3C}, ++{0x21FF, 0x00}, ++{0x2200, 0x00}, ++{0x2204, 0x4C}, ++{0x2205, 0x04}, ++{0x2206, 0x65}, ++{0x2207, 0x04}, ++{0x2208, 0x0A}, ++{0x2209, 0x00}, ++{0x220C, 0x47}, ++{0x220D, 0x00}, ++{0x220E, 0x1F}, ++{0x220F, 0x00}, ++{0x2210, 0x17}, ++{0x2211, 0x00}, ++{0x2212, 0x0F}, ++{0x2213, 0x00}, ++{0x2214, 0x17}, ++{0x2215, 0x00}, ++{0x2216, 0x47}, ++{0x2217, 0x00}, ++{0x2218, 0x0F}, ++{0x2219, 0x00}, ++{0x221A, 0x0F}, ++{0x221B, 0x00}, ++{0x221C, 0x03}, ++{0x2220, 0x20}, ++{0x2221, 0x20}, ++{0x2222, 0x22}, ++{0x2223, 0x02}, ++{0x2224, 0xA7}, ++{0x2225, 0xAA}, ++{0x2226, 0x80}, ++{0x2227, 0x08}, ++{0x2228, 0x01}, ++{0x22B2, 0x92}, ++{0x22B4, 0x20}, ++{0x22B5, 0x00}, ++{0x22B6, 0x20}, ++{0x22B7, 0x00}, ++{0x22B8, 0x20}, ++{0x22B9, 0x00}, ++{0x22BA, 0x20}, ++{0x22BB, 0x00}, ++{0x22BC, 0x20}, ++{0x22BD, 0x00}, ++{0x22BE, 0x20}, ++{0x22BF, 0x00}, ++{0x22C0, 0x20}, ++{0x22C1, 0x00}, ++{0x22C2, 0x20}, ++{0x22C3, 0x00}, ++{0x22C4, 0x20}, ++{0x22C5, 0x00}, ++{0x22C6, 0x20}, ++{0x22C7, 0x00}, ++{0x22C8, 0x20}, ++{0x22C9, 0x00}, ++{0x22CA, 0x20}, ++{0x22CB, 0x00}, ++{0x22CC, 0x20}, ++{0x22CD, 0x00}, ++{0x22CE, 0x20}, ++{0x22CF, 0x00}, ++{0x22DA, 0x00}, ++{0x2308, 0x01}, ++{0x2311, 0x09}, ++{0x2318, 0x40}, ++{0x2319, 0xCD}, ++{0x231A, 0x54}, ++{0x2324, 0x20}, ++{0x2325, 0x00}, ++{0x2328, 0x00}, ++{0x2354, 0x0C}, ++{0x23C0, 0x5D}, ++{0x244C, 0x00}, ++{0x244D, 0x02}, ++{0x244E, 0x54}, ++{0x244F, 0x02}, ++{0x24A0, 0x00}, ++{0x24DA, 0x6F}, ++{0x24DB, 0x00}, ++{0x24DC, 0x62}, ++{0x24DD, 0x01}, ++{0x24EA, 0x32}, ++{0x24EB, 0x00}, ++{0x24EC, 0xDC}, ++{0x24ED, 0x00}, ++{0x24FA, 0x32}, ++{0x24FB, 0x00}, ++{0x24FC, 0xDD}, ++{0x24FD, 0x00}, ++{0x254A, 0x15}, ++{0x254B, 0x01}, ++{0x255A, 0x15}, ++{0x255B, 0x01}, ++{0x2560, 0x01}, ++{0x2561, 0x00}, ++{0x2562, 0x2A}, ++{0x2563, 0x00}, ++{0x2564, 0xF8}, ++{0x2565, 0x00}, ++{0x2566, 0x15}, ++{0x2567, 0x01}, ++{0x2568, 0x0C}, ++{0x2569, 0x02}, ++{0x256A, 0x31}, ++{0x256B, 0x02}, ++{0x2578, 0x90}, ++{0x2579, 0x01}, ++{0x257A, 0x92}, ++{0x257B, 0x01}, ++{0x257C, 0xB8}, ++{0x257D, 0x02}, ++{0x257E, 0xBA}, ++{0x257F, 0x02}, ++{0x2584, 0x90}, ++{0x2585, 0x01}, ++{0x2586, 0x92}, ++{0x2587, 0x01}, ++{0x2588, 0xB8}, ++{0x2589, 0x02}, ++{0x258A, 0xBA}, ++{0x258B, 0x02}, ++{0x26B8, 0x10}, ++{0x26B9, 0x00}, ++{0x26BA, 0x33}, ++{0x26BB, 0x00}, ++{0x26BC, 0x89}, ++{0x26BD, 0x00}, ++{0x26BE, 0xB0}, ++{0x26BF, 0x00}, ++{0x26C4, 0x4E}, ++{0x26C5, 0x00}, ++{0x26C8, 0xC9}, ++{0x26C9, 0x00}, ++{0x26CC, 0x35}, ++{0x26CD, 0x01}, ++{0x26D0, 0xBA}, ++{0x26D1, 0x01}, ++{0x26D4, 0x7C}, ++{0x26D5, 0x02}, ++{0x26D8, 0xF6}, ++{0x26D9, 0x02}, ++{0x26DE, 0x51}, ++{0x26DF, 0x00}, ++{0x26E0, 0x7F}, ++{0x26E1, 0x00}, ++{0x26E2, 0xCC}, ++{0x26E3, 0x00}, ++{0x26E4, 0xF8}, ++{0x26E5, 0x00}, ++{0x26E6, 0x38}, ++{0x26E7, 0x01}, ++{0x26E8, 0x65}, ++{0x26E9, 0x01}, ++{0x26EA, 0xBD}, ++{0x26EB, 0x01}, ++{0x26EE, 0x7F}, ++{0x26EF, 0x02}, ++{0x26F0, 0xAB}, ++{0x26F1, 0x02}, ++{0x26F2, 0xF9}, ++{0x26F3, 0x02}, ++{0x2722, 0x59}, ++{0x2723, 0x02}, ++{0x2938, 0x55}, ++{0x2939, 0x00}, ++{0x293A, 0x17}, ++{0x293B, 0x00}, ++{0x293C, 0xD0}, ++{0x293D, 0x00}, ++{0x293E, 0x91}, ++{0x293F, 0x00}, ++{0x2940, 0x3C}, ++{0x2941, 0x01}, ++{0x2942, 0x0C}, ++{0x2943, 0x01}, ++{0x2944, 0xC1}, ++{0x2945, 0x01}, ++{0x2946, 0x76}, ++{0x2947, 0x01}, ++{0x2948, 0x83}, ++{0x2949, 0x02}, ++{0x294A, 0xFB}, ++{0x294B, 0x01}, ++{0x294C, 0xFD}, ++{0x294D, 0x02}, ++{0x294E, 0xBF}, ++{0x294F, 0x02}, ++{0x2A06, 0xFF}, ++{0x2A07, 0x03}, ++{0x2A20, 0x00}, ++{0x2A21, 0x00}, ++{0x2A22, 0x7D}, ++{0x2A23, 0x00}, ++{0x2B11, 0x19}, ++{0x2B13, 0x15}, ++{0x2B14, 0x14}, ++{0x2B15, 0x13}, ++{0x2B16, 0x12}, ++{0x2B17, 0x11}, ++{0x2B18, 0x10}, ++{0x2B19, 0x0F}, ++{0x2B1A, 0x0E}, ++{0x2B1B, 0x0D}, ++{0x2B1C, 0x0C}, ++{0x2B1D, 0x0B}, ++{0x2B1E, 0x0A}, ++{0x2B1F, 0x09}, ++{0x2B20, 0x08}, ++{0x2B21, 0x07}, ++{0x2B22, 0x06}, ++{0x2B23, 0x05}, ++{0x2B24, 0x04}, ++{0x2B25, 0x03}, ++{0x2B26, 0x03}, ++{0x2B38, 0x01}, ++{0x2B45, 0xE3}, ++{0x2B50, 0x01}, ++{0x2B51, 0x00}, ++{0x2B6D, 0x47}, ++{0x2B70, 0x02}, ++{0x2B71, 0x02}, ++{0x2B72, 0x02}, ++{0x2B7F, 0x7F}, ++{0x2B80, 0x94}, ++{0x2B81, 0x06}, ++{0x2B87, 0x1B}, ++{0x2B88, 0x1B}, ++{0x2B89, 0x17}, ++{0x2B8A, 0x12}, ++{0x2B8B, 0x12}, ++{0x2B8D, 0x2B}, ++{0x2B8E, 0x2B}, ++{0x2B8F, 0x2B}, ++{0x2B90, 0x7F}, ++{0x2B91, 0x1F}, ++{0x2B94, 0x7F}, ++{0x2B95, 0x27}, ++{0x2B98, 0x7F}, ++{0x2B99, 0x57}, ++{0x2BA8, 0xBC}, ++{0x2BA9, 0x62}, ++{0x2BC1, 0x70}, ++{0x2BC5, 0x80}, ++{0x2BD5, 0x30}, ++{0x2BD6, 0xF0}, ++{0x2BD8, 0xDB}, ++{0x2BD9, 0xF6}, ++{0x2BDA, 0x63}, ++{0x2BDB, 0x0C}, ++{0x2BDC, 0x5C}, ++{0x2C98, 0xE1}, ++{0x2C99, 0x2E}, ++{0x2C9B, 0x86}, ++{0x2CA9, 0x80}, ++{0x2CAA, 0x01}, ++{0x2D39, 0x0E}, ++{0x2D54, 0x00}, ++{0x2D5B, 0x58}, ++{0x3000, 0x00}, ++{0x3001, 0x40}, ++{0x3002, 0x23}, ++{0x3003, 0xA1}, ++{0x3004, 0x00}, ++{0x3005, 0x20}, ++{0x3006, 0x94}, ++{0x3007, 0x00}, ++{0x3008, 0x06}, ++{0x3009, 0xB4}, ++{0x300A, 0x1F}, ++{0x300B, 0x28}, ++{0x300C, 0x00}, ++{0x300D, 0x18}, ++{0x300E, 0x90}, ++{0x300F, 0x97}, ++{0x3010, 0x00}, ++{0x3011, 0x40}, ++{0x3012, 0x21}, ++{0x3013, 0x21}, ++{0x3014, 0x00}, ++{0x3015, 0x20}, ++{0x3016, 0x94}, ++{0x3017, 0x00}, ++{0x3018, 0x00}, ++{0x3019, 0x09}, ++{0x301A, 0x46}, ++{0x301B, 0x28}, ++{0x3070, 0xC1}, ++{0x3071, 0x81}, ++{0x3072, 0x29}, ++{0x3073, 0x81}, ++#if 1 ++{0x3410, 0x90}, ++{0x3411, 0x07}, ++{0x3418, 0x48}, ++{0x3419, 0x04}, ++#else ++{0x3410, 0x80}, ++{0x3411, 0x07}, ++{0x3418, 0x38}, ++{0x3419, 0x04}, ++#endif ++{0x3584, 0x00}, ++{0x3586, 0x00}, ++{0x3587, 0x01}, ++{0x3588, 0xE6}, ++{0x3589, 0x00}, ++{0x3590, 0x00}, ++{0x3591, 0x00}, ++{0x3594, 0x40}, ++{0x3598, 0x03}, ++{0x3599, 0x00}, ++{0x359A, 0x80}, ++{0x359B, 0x00}, ++{0x359C, 0x00}, ++{0x359D, 0x01}, ++{0x359E, 0x00}, ++{0x359F, 0x02}, ++{0x35A0, 0x00}, ++{0x35A1, 0x04}, ++{0x35A2, 0x20}, ++{0x35A3, 0x00}, ++{0x35A4, 0x40}, ++{0x35A5, 0x00}, ++{0x35A6, 0x80}, ++{0x35A7, 0x00}, ++{0x35A8, 0x00}, ++{0x35A9, 0x01}, ++{0x35AA, 0x3A}, ++{0x35AB, 0x00}, ++{0x35AC, 0x80}, ++{0x35AD, 0x00}, ++{0x35AE, 0x00}, ++{0x35AF, 0x01}, ++{0x35B0, 0x00}, ++{0x35B1, 0x02}, ++{0x35B2, 0x00}, ++{0x35B3, 0x04}, ++{0x35B4, 0x02}, ++{0x35B5, 0x00}, ++{0x35B6, 0x04}, ++{0x35B7, 0x00}, ++{0x35B8, 0x08}, ++{0x35B9, 0x00}, ++{0x35BA, 0x10}, ++{0x35BB, 0x00}, ++{0x35BC, 0x03}, ++{0x35BD, 0x00}, ++{0x35C8, 0x00}, ++{0x35C9, 0x01}, ++{0x35CA, 0x00}, ++{0x35CB, 0x04}, ++{0x35CC, 0x00}, ++{0x35CD, 0x10}, ++{0x35CE, 0x00}, ++{0x35CF, 0x40}, ++{0x35D0, 0x00}, ++{0x35D1, 0x0C}, ++{0x35D2, 0x00}, ++{0x35D3, 0x0C}, ++{0x35D4, 0x00}, ++{0x35D5, 0x0C}, ++{0x35D6, 0x00}, ++{0x35D7, 0x0C}, ++{0x35D8, 0x00}, ++{0x35D9, 0x00}, ++{0x35DA, 0x08}, ++{0x35DB, 0x00}, ++{0x35DC, 0xD8}, ++{0x35DD, 0x0E}, ++{0x35F0, 0x00}, ++{0x35F1, 0x10}, ++{0x35F2, 0x00}, ++{0x35F3, 0x10}, ++{0x35F4, 0x00}, ++{0x35F5, 0x10}, ++{0x35F6, 0x00}, ++{0x35F7, 0x03}, ++{0x35F8, 0x00}, ++{0x35F9, 0x01}, ++{0x35FA, 0x38}, ++{0x35FB, 0x00}, ++{0x35FC, 0xB3}, ++{0x35FD, 0x01}, ++{0x35FE, 0x00}, ++{0x35FF, 0x00}, ++{0x3600, 0x04}, ++{0x3601, 0x06}, ++{0x3604, 0x03}, ++{0x3605, 0x00}, ++{0x3608, 0x03}, ++{0x3609, 0x00}, ++{0x360C, 0x00}, ++{0x360D, 0x00}, ++{0x3610, 0x10}, ++{0x3611, 0x01}, ++{0x3612, 0x00}, ++{0x3613, 0x00}, ++{0x3614, 0x00}, ++{0x3615, 0x00}, ++{0x361C, 0x00}, ++{0x361D, 0x01}, ++{0x361E, 0x00}, ++{0x361F, 0x01}, ++{0x3620, 0x01}, ++{0x3621, 0x00}, ++{0x3622, 0xB0}, ++{0x3623, 0x04}, ++{0x3624, 0xDC}, ++{0x3625, 0x05}, ++{0x3626, 0x00}, ++{0x3627, 0x01}, ++{0x3628, 0xFF}, ++{0x3629, 0x0F}, ++{0x362A, 0x00}, ++{0x362B, 0x10}, ++{0x362C, 0x00}, ++{0x362D, 0x01}, ++{0x36C4, 0x99}, ++{0x36C5, 0x09}, ++{0x36C6, 0x18}, ++{0x36C7, 0x07}, ++{0x36C8, 0x65}, ++{0x36C9, 0x0E}, ++{0x36CC, 0x99}, ++{0x36CD, 0x01}, ++{0x36CE, 0x47}, ++{0x36CF, 0x00}, ++{0x36D0, 0x04}, ++{0x36D1, 0x00}, ++{0x36D4, 0x65}, ++{0x36D5, 0x0E}, ++{0x36D6, 0xA4}, ++{0x36D7, 0x0A}, ++{0x36D8, 0x65}, ++{0x36D9, 0x0E}, ++{0x36DC, 0x65}, ++{0x36DD, 0x0E}, ++{0x36DE, 0xA4}, ++{0x36DF, 0x0A}, ++{0x36E0, 0x65}, ++{0x36E1, 0x0E}, ++{0x36E4, 0x65}, ++{0x36E5, 0x0E}, ++{0x36E6, 0xA4}, ++{0x36E7, 0x0A}, ++{0x36E8, 0x65}, ++{0x36E9, 0x0E}, ++{0x36EE, 0x00}, ++{0x36EF, 0x00}, ++{0x36F0, 0x00}, ++{0x36F1, 0x80}, ++{0x36F8, 0x00}, ++{0x3702, 0x03}, ++{0x3703, 0x04}, ++{0x3704, 0x08}, ++{0x370E, 0x0E}, ++{0x3718, 0x62}, ++{0x3719, 0x4A}, ++{0x371A, 0x38}, ++{0x371B, 0x20}, ++{0x371C, 0x64}, ++{0x371D, 0x42}, ++{0x371E, 0x32}, ++{0x371F, 0x1B}, ++{0x3720, 0x98}, ++{0x3721, 0xA0}, ++{0x3722, 0xA8}, ++{0x3723, 0xB0}, ++{0x3748, 0xA5}, ++{0x3749, 0x9B}, ++{0x374A, 0x91}, ++{0x374B, 0x7D}, ++{0x37C0, 0x00}, ++{0x37C1, 0x00}, ++{0x37C2, 0x00}, ++{0x37C4, 0x00}, ++{0x37C5, 0x00}, ++{0x37C6, 0x00}, ++{0x37C8, 0x00}, ++{0x37C9, 0x00}, ++{0x37CA, 0x00}, ++{0x37CC, 0x00}, ++{0x37CD, 0x00}, ++{0x37CE, 0x00}, ++{0x37D0, 0x00}, ++{0x37D1, 0x00}, ++{0x37D2, 0x00}, ++{0x37D4, 0x00}, ++{0x37D5, 0x00}, ++{0x37D6, 0x00}, ++{0x37D8, 0x00}, ++{0x37D9, 0x00}, ++{0x37DA, 0x00}, ++{0x37DC, 0x00}, ++{0x37DD, 0x00}, ++{0x37DE, 0x00}, ++{0x37E0, 0x00}, ++{0x37E1, 0x00}, ++{0x37E2, 0x00}, ++{0x37E4, 0x00}, ++{0x37E5, 0x00}, ++{0x37E6, 0x00}, ++{0x37E8, 0x00}, ++{0x37E9, 0x00}, ++{0x37EA, 0x00}, ++{0x37EC, 0x00}, ++{0x37ED, 0x00}, ++{0x37EE, 0x00}, ++{0x37F0, 0x00}, ++{0x37F4, 0x00}, ++{0x37F5, 0x1E}, ++{0x37F6, 0x34}, ++{0x37F7, 0x00}, ++{0x37F8, 0xFF}, ++{0x37F9, 0xFF}, ++{0x37FA, 0x03}, ++{0x37FC, 0x00}, ++{0x37FD, 0x00}, ++{0x37FE, 0x04}, ++{0x3800, 0xFF}, ++{0x3801, 0xFF}, ++{0x3802, 0x03}, ++{0x3804, 0x00}, ++{0x3805, 0x00}, ++{0x3806, 0x04}, ++{0x3808, 0x00}, ++{0x3809, 0x00}, ++{0x380A, 0x00}, ++{0x380C, 0x00}, ++{0x380D, 0x00}, ++{0x380E, 0x00}, ++{0x3810, 0x00}, ++{0x3811, 0x00}, ++{0x3812, 0x00}, ++{0x3814, 0x00}, ++{0x3815, 0x00}, ++{0x3816, 0x00}, ++{0x3818, 0x00}, ++{0x3819, 0x00}, ++{0x381A, 0x00}, ++{0x381C, 0x00}, ++{0x381D, 0x00}, ++{0x381E, 0x00}, ++{0x3820, 0x00}, ++{0x3821, 0x00}, ++{0x3822, 0x00}, ++{0x3824, 0x00}, ++{0x3825, 0x00}, ++{0x3826, 0x00}, ++{0x3828, 0x00}, ++{0x3829, 0x00}, ++{0x382A, 0x00}, ++{0x382C, 0x00}, ++{0x382D, 0x00}, ++{0x382E, 0x00}, ++{0x3830, 0x00}, ++{0x3831, 0x00}, ++{0x3832, 0x00}, ++{0x3834, 0x00}, ++{0x3835, 0x00}, ++{0x3836, 0x00}, ++{0x3838, 0x22}, ++{0x3839, 0x00}, ++{0x383A, 0x25}, ++{0x383B, 0x00}, ++{0x383C, 0x1A}, ++{0x383D, 0x00}, ++{0x383E, 0x26}, ++{0x383F, 0x00}, ++{0x3840, 0x07}, ++{0x3841, 0x00}, ++{0x3842, 0x06}, ++{0x3843, 0x00}, ++{0x3844, 0x03}, ++{0x3845, 0x00}, ++{0x3846, 0x02}, ++{0x3847, 0x00}, ++{0x3848, 0xFB}, ++{0x3849, 0xFF}, ++{0x384A, 0xFF}, ++{0x384B, 0xFF}, ++{0x384C, 0xF3}, ++{0x384D, 0xFF}, ++{0x384E, 0xF2}, ++{0x384F, 0xFF}, ++{0x3850, 0xFF}, ++{0x3851, 0x0F}, ++{0x3852, 0x00}, ++{0x3853, 0x10}, ++{0x3854, 0xFF}, ++{0x3855, 0x0F}, ++{0x3856, 0x00}, ++{0x3857, 0x10}, ++{0x3858, 0xFF}, ++{0x3859, 0x0F}, ++{0x385A, 0x00}, ++{0x385B, 0x10}, ++{0x385C, 0x02}, ++{0x385D, 0x00}, ++{0x385E, 0x06}, ++{0x385F, 0x00}, ++{0x3860, 0x06}, ++{0x3861, 0x00}, ++{0x3862, 0x08}, ++{0x3863, 0x00}, ++{0x3864, 0x02}, ++{0x3865, 0x00}, ++{0x38A0, 0x01}, ++{0x38A1, 0x01}, ++{0x38A2, 0x00}, ++{0x38A3, 0x01}, ++{0x38A4, 0x07}, ++{0x38A5, 0x00}, ++{0x38A6, 0x04}, ++{0x38A7, 0x05}, ++{0x38A8, 0x00}, ++{0x38A9, 0x00}, ++{0x38AC, 0x00}, ++{0x38AD, 0x00}, ++{0x38AE, 0x01}, ++{0x38B0, 0x02}, ++{0x38B2, 0x22}, ++{0x38B3, 0x00}, ++{0x38B4, 0x17}, ++{0x38B5, 0x00}, ++{0x38B6, 0x11}, ++{0x38B7, 0x00}, ++{0x38B8, 0x0E}, ++{0x38B9, 0x00}, ++{0x38BA, 0x2A}, ++{0x38BB, 0x00}, ++{0x38BC, 0x1C}, ++{0x38BD, 0x00}, ++{0x38BE, 0x14}, ++{0x38BF, 0x00}, ++{0x38C0, 0x10}, ++{0x38C1, 0x00}, ++{0x38C2, 0x31}, ++{0x38C3, 0x00}, ++{0x38C4, 0x21}, ++{0x38C5, 0x00}, ++{0x38C6, 0x18}, ++{0x38C7, 0x00}, ++{0x38C8, 0x12}, ++{0x38C9, 0x00}, ++{0x38CA, 0x3C}, ++{0x38CB, 0x00}, ++{0x38CC, 0x29}, ++{0x38CD, 0x00}, ++{0x38CE, 0x1D}, ++{0x38CF, 0x00}, ++{0x38D0, 0x15}, ++{0x38D1, 0x00}, ++{0x38D2, 0x4E}, ++{0x38D3, 0x00}, ++{0x38D4, 0x35}, ++{0x38D5, 0x00}, ++{0x38D6, 0x26}, ++{0x38D7, 0x00}, ++{0x38D8, 0x1A}, ++{0x38D9, 0x00}, ++{0x38DA, 0x69}, ++{0x38DB, 0x00}, ++{0x38DC, 0x48}, ++{0x38DD, 0x00}, ++{0x38DE, 0x33}, ++{0x38DF, 0x00}, ++{0x38E0, 0x22}, ++{0x38E1, 0x00}, ++{0x38E2, 0x93}, ++{0x38E3, 0x00}, ++{0x38E4, 0x64}, ++{0x38E5, 0x00}, ++{0x38E6, 0x48}, ++{0x38E7, 0x00}, ++{0x38E8, 0x30}, ++{0x38E9, 0x00}, ++{0x38EA, 0xD3}, ++{0x38EB, 0x00}, ++{0x38EC, 0x90}, ++{0x38ED, 0x00}, ++{0x38EE, 0x69}, ++{0x38EF, 0x00}, ++{0x38F0, 0x49}, ++{0x38F1, 0x00}, ++{0x38F2, 0x39}, ++{0x38F3, 0x01}, ++{0x38F4, 0xD5}, ++{0x38F5, 0x00}, ++{0x38F6, 0x9F}, ++{0x38F7, 0x00}, ++{0x38F8, 0x75}, ++{0x38F9, 0x00}, ++{0x38FA, 0x00}, ++{0x38FB, 0x01}, ++{0x38FC, 0x00}, ++{0x38FD, 0x01}, ++{0x38FE, 0x00}, ++{0x38FF, 0x01}, ++{0x3900, 0x00}, ++{0x3901, 0x01}, ++{0x3902, 0x60}, ++{0x3903, 0x00}, ++{0x3904, 0x25}, ++{0x3905, 0x00}, ++{0x3906, 0x18}, ++{0x3907, 0x00}, ++{0x3908, 0x10}, ++{0x3909, 0x00}, ++{0x390A, 0xFF}, ++{0x390B, 0x00}, ++{0x390C, 0xD5}, ++{0x390D, 0x00}, ++{0x390E, 0xAA}, ++{0x390F, 0x00}, ++{0x3910, 0x85}, ++{0x3911, 0x00}, ++{0x3912, 0xFF}, ++{0x3913, 0x00}, ++{0x3914, 0xD5}, ++{0x3915, 0x00}, ++{0x3916, 0xAA}, ++{0x3917, 0x00}, ++{0x3918, 0x85}, ++{0x3919, 0x00}, ++{0x391A, 0xFF}, ++{0x391B, 0x00}, ++{0x391C, 0xD5}, ++{0x391D, 0x00}, ++{0x391E, 0xAA}, ++{0x391F, 0x00}, ++{0x3920, 0x85}, ++{0x3921, 0x00}, ++{0x3922, 0x40}, ++{0x3923, 0x00}, ++{0x3924, 0x40}, ++{0x3925, 0x00}, ++{0x3926, 0x40}, ++{0x3927, 0x00}, ++{0x3928, 0x40}, ++{0x3929, 0x00}, ++{0x392A, 0x80}, ++{0x392B, 0x00}, ++{0x392C, 0x80}, ++{0x392D, 0x00}, ++{0x392E, 0x80}, ++{0x392F, 0x00}, ++{0x3930, 0x80}, ++{0x3931, 0x00}, ++{0x3932, 0x4C}, ++{0x3933, 0x4C}, ++{0x3934, 0x4C}, ++{0x3940, 0x01}, ++{0x3941, 0x01}, ++{0x3942, 0x00}, ++{0x3943, 0x01}, ++{0x3944, 0x07}, ++{0x3945, 0x00}, ++{0x3946, 0x04}, ++{0x3947, 0x05}, ++{0x3948, 0x00}, ++{0x3949, 0x00}, ++{0x394C, 0x00}, ++{0x394D, 0x00}, ++{0x394E, 0x01}, ++{0x3950, 0x03}, ++{0x3952, 0x14}, ++{0x3953, 0x00}, ++{0x3954, 0x0F}, ++{0x3955, 0x00}, ++{0x3956, 0x0E}, ++{0x3957, 0x00}, ++{0x3958, 0x0E}, ++{0x3959, 0x00}, ++{0x395A, 0x19}, ++{0x395B, 0x00}, ++{0x395C, 0x11}, ++{0x395D, 0x00}, ++{0x395E, 0x0F}, ++{0x395F, 0x00}, ++{0x3960, 0x0E}, ++{0x3961, 0x00}, ++{0x3962, 0x1C}, ++{0x3963, 0x00}, ++{0x3964, 0x13}, ++{0x3965, 0x00}, ++{0x3966, 0x0F}, ++{0x3967, 0x00}, ++{0x3968, 0x0E}, ++{0x3969, 0x00}, ++{0x396A, 0x23}, ++{0x396B, 0x00}, ++{0x396C, 0x15}, ++{0x396D, 0x00}, ++{0x396E, 0x11}, ++{0x396F, 0x00}, ++{0x3970, 0x0E}, ++{0x3971, 0x00}, ++{0x3972, 0x2E}, ++{0x3973, 0x00}, ++{0x3974, 0x1A}, ++{0x3975, 0x00}, ++{0x3976, 0x14}, ++{0x3977, 0x00}, ++{0x3978, 0x0F}, ++{0x3979, 0x00}, ++{0x397A, 0x3E}, ++{0x397B, 0x00}, ++{0x397C, 0x23}, ++{0x397D, 0x00}, ++{0x397E, 0x1A}, ++{0x397F, 0x00}, ++{0x3980, 0x12}, ++{0x3981, 0x00}, ++{0x3982, 0x56}, ++{0x3983, 0x00}, ++{0x3984, 0x31}, ++{0x3985, 0x00}, ++{0x3986, 0x25}, ++{0x3987, 0x00}, ++{0x3988, 0x1A}, ++{0x3989, 0x00}, ++{0x398A, 0x7B}, ++{0x398B, 0x00}, ++{0x398C, 0x49}, ++{0x398D, 0x00}, ++{0x398E, 0x39}, ++{0x398F, 0x00}, ++{0x3990, 0x2C}, ++{0x3991, 0x00}, ++{0x3992, 0xB4}, ++{0x3993, 0x00}, ++{0x3994, 0x75}, ++{0x3995, 0x00}, ++{0x3996, 0x61}, ++{0x3997, 0x00}, ++{0x3998, 0x53}, ++{0x3999, 0x00}, ++{0x399A, 0x00}, ++{0x399B, 0x01}, ++{0x399C, 0x00}, ++{0x399D, 0x01}, ++{0x399E, 0x00}, ++{0x399F, 0x01}, ++{0x39A0, 0x00}, ++{0x39A1, 0x01}, ++{0x39A2, 0x60}, ++{0x39A3, 0x00}, ++{0x39A4, 0x20}, ++{0x39A5, 0x00}, ++{0x39A6, 0x15}, ++{0x39A7, 0x00}, ++{0x39A8, 0x10}, ++{0x39A9, 0x00}, ++{0x39AA, 0xFF}, ++{0x39AB, 0x00}, ++{0x39AC, 0xD5}, ++{0x39AD, 0x00}, ++{0x39AE, 0xAA}, ++{0x39AF, 0x00}, ++{0x39B0, 0x85}, ++{0x39B1, 0x00}, ++{0x39B2, 0xFF}, ++{0x39B3, 0x00}, ++{0x39B4, 0xD5}, ++{0x39B5, 0x00}, ++{0x39B6, 0xAA}, ++{0x39B7, 0x00}, ++{0x39B8, 0x85}, ++{0x39B9, 0x00}, ++{0x39BA, 0xFF}, ++{0x39BB, 0x00}, ++{0x39BC, 0xD5}, ++{0x39BD, 0x00}, ++{0x39BE, 0xAA}, ++{0x39BF, 0x00}, ++{0x39C0, 0x85}, ++{0x39C1, 0x00}, ++{0x39C2, 0x40}, ++{0x39C3, 0x00}, ++{0x39C4, 0x40}, ++{0x39C5, 0x00}, ++{0x39C6, 0x40}, ++{0x39C7, 0x00}, ++{0x39C8, 0x40}, ++{0x39C9, 0x00}, ++{0x39CA, 0x80}, ++{0x39CB, 0x00}, ++{0x39CC, 0x80}, ++{0x39CD, 0x00}, ++{0x39CE, 0x80}, ++{0x39CF, 0x00}, ++{0x39D0, 0x80}, ++{0x39D1, 0x00}, ++{0x39D2, 0x4C}, ++{0x39D3, 0x4C}, ++{0x39D4, 0x4C}, ++{0x39E0, 0x01}, ++{0x39E1, 0x00}, ++{0x39E4, 0x40}, ++{0x39E5, 0x01}, ++{0x39E6, 0x01}, ++{0x39E8, 0x00}, ++{0x39E9, 0x01}, ++{0x39EA, 0x00}, ++{0x39EB, 0x00}, ++{0x39EC, 0x01}, ++{0x39ED, 0x00}, ++{0x39EE, 0x01}, ++{0x39F0, 0x03}, ++{0x39F1, 0x04}, ++{0x39F2, 0x0E}, ++{0x39F4, 0x1C}, ++{0x39F5, 0x00}, ++{0x39F6, 0x13}, ++{0x39F7, 0x00}, ++{0x39F8, 0x0D}, ++{0x39F9, 0x00}, ++{0x39FA, 0x07}, ++{0x39FB, 0x00}, ++{0x39FC, 0x38}, ++{0x39FD, 0x00}, ++{0x39FE, 0x1C}, ++{0x39FF, 0x00}, ++{0x3A00, 0x11}, ++{0x3A01, 0x00}, ++{0x3A02, 0x08}, ++{0x3A03, 0x00}, ++{0x3A04, 0x4A}, ++{0x3A05, 0x00}, ++{0x3A06, 0x23}, ++{0x3A07, 0x00}, ++{0x3A08, 0x15}, ++{0x3A09, 0x00}, ++{0x3A0A, 0x09}, ++{0x3A0B, 0x00}, ++{0x3A0C, 0x65}, ++{0x3A0D, 0x00}, ++{0x3A0E, 0x2D}, ++{0x3A0F, 0x00}, ++{0x3A10, 0x1A}, ++{0x3A11, 0x00}, ++{0x3A12, 0x0B}, ++{0x3A13, 0x00}, ++{0x3A14, 0x8D}, ++{0x3A15, 0x00}, ++{0x3A16, 0x3D}, ++{0x3A17, 0x00}, ++{0x3A18, 0x23}, ++{0x3A19, 0x00}, ++{0x3A1A, 0x0E}, ++{0x3A1B, 0x00}, ++{0x3A1C, 0xC5}, ++{0x3A1D, 0x00}, ++{0x3A1E, 0x55}, ++{0x3A1F, 0x00}, ++{0x3A20, 0x30}, ++{0x3A21, 0x00}, ++{0x3A22, 0x13}, ++{0x3A23, 0x00}, ++{0x3A24, 0x16}, ++{0x3A25, 0x01}, ++{0x3A26, 0x76}, ++{0x3A27, 0x00}, ++{0x3A28, 0x42}, ++{0x3A29, 0x00}, ++{0x3A2A, 0x1A}, ++{0x3A2B, 0x00}, ++{0x3A2C, 0x88}, ++{0x3A2D, 0x01}, ++{0x3A2E, 0xA7}, ++{0x3A2F, 0x00}, ++{0x3A30, 0x5D}, ++{0x3A31, 0x00}, ++{0x3A32, 0x24}, ++{0x3A33, 0x00}, ++{0x3A34, 0x2A}, ++{0x3A35, 0x02}, ++{0x3A36, 0xEB}, ++{0x3A37, 0x00}, ++{0x3A38, 0x83}, ++{0x3A39, 0x00}, ++{0x3A3A, 0x32}, ++{0x3A3B, 0x00}, ++{0x3A3C, 0x00}, ++{0x3A3D, 0x01}, ++{0x3A3E, 0x00}, ++{0x3A3F, 0x01}, ++{0x3A40, 0x00}, ++{0x3A41, 0x01}, ++{0x3A42, 0x00}, ++{0x3A43, 0x01}, ++{0x3A44, 0x70}, ++{0x3A45, 0x00}, ++{0x3A46, 0x25}, ++{0x3A47, 0x00}, ++{0x3A48, 0x18}, ++{0x3A49, 0x00}, ++{0x3A4A, 0x10}, ++{0x3A4B, 0x00}, ++{0x3A4C, 0xFF}, ++{0x3A4D, 0x00}, ++{0x3A4E, 0xD5}, ++{0x3A4F, 0x00}, ++{0x3A50, 0xAA}, ++{0x3A51, 0x00}, ++{0x3A52, 0x85}, ++{0x3A53, 0x00}, ++{0x3A54, 0xFF}, ++{0x3A55, 0x00}, ++{0x3A56, 0xD5}, ++{0x3A57, 0x00}, ++{0x3A58, 0xAA}, ++{0x3A59, 0x00}, ++{0x3A5A, 0x85}, ++{0x3A5B, 0x00}, ++{0x3A5C, 0xFF}, ++{0x3A5D, 0x00}, ++{0x3A5E, 0xD5}, ++{0x3A5F, 0x00}, ++{0x3A60, 0xAA}, ++{0x3A61, 0x00}, ++{0x3A62, 0x85}, ++{0x3A63, 0x00}, ++{0x3A64, 0x1C}, ++{0x3A65, 0x00}, ++{0x3A66, 0x13}, ++{0x3A67, 0x00}, ++{0x3A68, 0x0D}, ++{0x3A69, 0x00}, ++{0x3A6A, 0x07}, ++{0x3A6B, 0x00}, ++{0x3A6C, 0x0D}, ++{0x3A6D, 0x00}, ++{0x3A6E, 0x0B}, ++{0x3A6F, 0x00}, ++{0x3A70, 0x06}, ++{0x3A71, 0x00}, ++{0x3A72, 0x05}, ++{0x3A73, 0x00}, ++{0x3A74, 0x19}, ++{0x3A75, 0x00}, ++{0x3A76, 0x14}, ++{0x3A77, 0x00}, ++{0x3A78, 0x0F}, ++{0x3A79, 0x00}, ++{0x3A7A, 0x0A}, ++{0x3A7B, 0x00}, ++{0x3A7C, 0x80}, ++{0x3A7D, 0x00}, ++{0x3A7E, 0x80}, ++{0x3A7F, 0x00}, ++{0x3A80, 0x80}, ++{0x3A81, 0x00}, ++{0x3A82, 0x80}, ++{0x3A83, 0x00}, ++{0x3A84, 0x08}, ++{0x3A85, 0x00}, ++{0x3A86, 0x05}, ++{0x3A87, 0x00}, ++{0x3A88, 0x04}, ++{0x3A89, 0x00}, ++{0x3A8A, 0x03}, ++{0x3A8B, 0x00}, ++{0x3A8C, 0xCD}, ++{0x3A8D, 0x00}, ++{0x3A8E, 0xAA}, ++{0x3A8F, 0x00}, ++{0x3A90, 0x8C}, ++{0x3A91, 0x00}, ++{0x3A92, 0x64}, ++{0x3A93, 0x00}, ++{0x3A94, 0xCD}, ++{0x3A95, 0x00}, ++{0x3A96, 0xAA}, ++{0x3A97, 0x00}, ++{0x3A98, 0x8C}, ++{0x3A99, 0x00}, ++{0x3A9A, 0x64}, ++{0x3A9B, 0x00}, ++{0x3A9C, 0x08}, ++{0x3A9D, 0x10}, ++{0x3A9E, 0x4C}, ++{0x3A9F, 0x4C}, ++{0x3AA0, 0x4C}, ++{0x3AA1, 0x04}, ++{0x3AA2, 0x05}, ++{0x3AC0, 0x01}, ++{0x3AC4, 0x81}, ++{0x3AC5, 0x00}, ++{0x3AC6, 0x00}, ++{0x3AC7, 0x00}, ++{0x3AC8, 0x00}, ++{0x3AC9, 0x00}, ++{0x3ACA, 0x00}, ++{0x3ACB, 0x00}, ++{0x3ACC, 0x02}, ++{0x3ACD, 0x00}, ++{0x3ACE, 0x81}, ++{0x3ACF, 0x00}, ++{0x3AD0, 0x00}, ++{0x3AD1, 0x00}, ++{0x3AD2, 0xFD}, ++{0x3AD3, 0x03}, ++{0x3AD4, 0x02}, ++{0x3AD5, 0x00}, ++{0x3AD6, 0x00}, ++{0x3AD7, 0x00}, ++{0x3AD8, 0x81}, ++{0x3AD9, 0x00}, ++{0x3ADA, 0xFD}, ++{0x3ADB, 0x03}, ++{0x3ADC, 0xFF}, ++{0x3ADD, 0x03}, ++{0x3ADE, 0x01}, ++{0x3ADF, 0x00}, ++{0x3AE0, 0x01}, ++{0x3AE1, 0x00}, ++{0x3AE2, 0x7E}, ++{0x3AE3, 0x00}, ++{0x3AF4, 0x00}, ++{0x3AF6, 0x40}, ++{0x3AF7, 0x1E}, ++{0x3AF8, 0x01}, ++{0x3AFA, 0x63}, ++{0x3AFB, 0x09}, ++{0x3AFC, 0x11}, ++{0x3AFD, 0x09}, ++{0x3AFE, 0x00}, ++{0x3AFF, 0x00}, ++{0x3B00, 0x00}, ++{0x3B01, 0x00}, ++{0x3B02, 0x84}, ++{0x3B03, 0x06}, ++{0x3B04, 0x30}, ++{0x3B05, 0x06}, ++{0x3B06, 0x00}, ++{0x3B07, 0x00}, ++{0x3B08, 0x00}, ++{0x3B09, 0x00}, ++{0x3B0A, 0x00}, ++{0x3B0B, 0x00}, ++{0x3B0C, 0x00}, ++{0x3B0D, 0x00}, ++{0x3B0E, 0x00}, ++{0x3B0F, 0x00}, ++{0x3B10, 0x00}, ++{0x3B11, 0x00}, ++{0x3B12, 0x00}, ++{0x3B13, 0x00}, ++{0x3B14, 0x00}, ++{0x3B15, 0x00}, ++{0x3B16, 0x00}, ++{0x3B17, 0x00}, ++{0x3B18, 0x00}, ++{0x3B19, 0x00}, ++{0x3B1A, 0x00}, ++{0x3B1B, 0x00}, ++{0x3B1C, 0x00}, ++{0x3B1D, 0x00}, ++{0x3B1E, 0x00}, ++{0x3B1F, 0x00}, ++{0x3B20, 0x00}, ++{0x3B21, 0x00}, ++{0x3B22, 0x00}, ++{0x3B23, 0x00}, ++{0x3B24, 0x00}, ++{0x3B25, 0x00}, ++{0x3B26, 0x00}, ++{0x3B27, 0x00}, ++{0x3B28, 0x00}, ++{0x3B29, 0x00}, ++{0x3B2A, 0x00}, ++{0x3B2C, 0x00}, ++{0x3B2E, 0x00}, ++{0x3B30, 0x00}, ++{0x3B32, 0x0C}, ++{0x4000, 0xD1}, ++{0x4001, 0xC0}, ++{0x4002, 0xC0}, ++{0x4003, 0xB8}, ++{0x4004, 0xC0}, ++{0x4005, 0xB8}, ++{0x4006, 0xB9}, ++{0x4007, 0xB7}, ++{0x4008, 0xB0}, ++{0x4009, 0xAB}, ++{0x400A, 0xAC}, ++{0x400B, 0xAB}, ++{0x400C, 0xA8}, ++{0x400D, 0xA6}, ++{0x400E, 0xA6}, ++{0x400F, 0xA5}, ++{0x4010, 0xA2}, ++{0x4011, 0xA0}, ++{0x4012, 0xA0}, ++{0x4013, 0x9F}, ++{0x4014, 0xA4}, ++{0x4015, 0xA2}, ++{0x4016, 0xA2}, ++{0x4017, 0x9C}, ++{0x4018, 0xA8}, ++{0x4019, 0xA6}, ++{0x401A, 0xA8}, ++{0x401B, 0xAA}, ++{0x401C, 0xB0}, ++{0x401D, 0xAE}, ++{0x401E, 0xAE}, ++{0x401F, 0xAE}, ++{0x4020, 0xBA}, ++{0x4021, 0xAE}, ++{0x4022, 0xAF}, ++{0x4023, 0xAE}, ++{0x4024, 0xC6}, ++{0x4025, 0xBD}, ++{0x4026, 0xBD}, ++{0x4027, 0xBA}, ++{0x4028, 0xB0}, ++{0x4029, 0xA9}, ++{0x402A, 0xAA}, ++{0x402B, 0xA8}, ++{0x402C, 0x9F}, ++{0x402D, 0x9C}, ++{0x402E, 0x9C}, ++{0x402F, 0x9B}, ++{0x4030, 0x93}, ++{0x4031, 0x91}, ++{0x4032, 0x92}, ++{0x4033, 0x91}, ++{0x4034, 0x8D}, ++{0x4035, 0x8C}, ++{0x4036, 0x8C}, ++{0x4037, 0x8C}, ++{0x4038, 0x8F}, ++{0x4039, 0x8E}, ++{0x403A, 0x8E}, ++{0x403B, 0x8E}, ++{0x403C, 0x98}, ++{0x403D, 0x96}, ++{0x403E, 0x96}, ++{0x403F, 0x95}, ++{0x4040, 0xA4}, ++{0x4041, 0xA0}, ++{0x4042, 0xA0}, ++{0x4043, 0x9E}, ++{0x4044, 0xB3}, ++{0x4045, 0xAE}, ++{0x4046, 0xAF}, ++{0x4047, 0xAB}, ++{0x4048, 0xC2}, ++{0x4049, 0xB7}, ++{0x404A, 0xB8}, ++{0x404B, 0xB5}, ++{0x404C, 0xAB}, ++{0x404D, 0xA4}, ++{0x404E, 0xA5}, ++{0x404F, 0xA3}, ++{0x4050, 0x99}, ++{0x4051, 0x96}, ++{0x4052, 0x96}, ++{0x4053, 0x96}, ++{0x4054, 0x8B}, ++{0x4055, 0x8A}, ++{0x4056, 0x8A}, ++{0x4057, 0x8A}, ++{0x4058, 0x82}, ++{0x4059, 0x81}, ++{0x405A, 0x81}, ++{0x405B, 0x81}, ++{0x405C, 0x85}, ++{0x405D, 0x86}, ++{0x405E, 0x85}, ++{0x405F, 0x85}, ++{0x4060, 0x90}, ++{0x4061, 0x90}, ++{0x4062, 0x8F}, ++{0x4063, 0x8F}, ++{0x4064, 0x9D}, ++{0x4065, 0x9B}, ++{0x4066, 0x9B}, ++{0x4067, 0x9A}, ++{0x4068, 0xAF}, ++{0x4069, 0xAA}, ++{0x406A, 0xAC}, ++{0x406B, 0xAA}, ++{0x406C, 0xC2}, ++{0x406D, 0xB7}, ++{0x406E, 0xB8}, ++{0x406F, 0xB5}, ++{0x4070, 0xAB}, ++{0x4071, 0xA4}, ++{0x4072, 0xA4}, ++{0x4073, 0xA3}, ++{0x4074, 0x99}, ++{0x4075, 0x96}, ++{0x4076, 0x96}, ++{0x4077, 0x96}, ++{0x4078, 0x8B}, ++{0x4079, 0x8A}, ++{0x407A, 0x8A}, ++{0x407B, 0x8A}, ++{0x407C, 0x82}, ++{0x407D, 0x82}, ++{0x407E, 0x82}, ++{0x407F, 0x82}, ++{0x4080, 0x85}, ++{0x4081, 0x86}, ++{0x4082, 0x86}, ++{0x4083, 0x86}, ++{0x4084, 0x90}, ++{0x4085, 0x90}, ++{0x4086, 0x8F}, ++{0x4087, 0x8F}, ++{0x4088, 0x9D}, ++{0x4089, 0x9B}, ++{0x408A, 0x9B}, ++{0x408B, 0x99}, ++{0x408C, 0xAE}, ++{0x408D, 0xAA}, ++{0x408E, 0xAA}, ++{0x408F, 0xA7}, ++{0x4090, 0xC7}, ++{0x4091, 0xBA}, ++{0x4092, 0xBC}, ++{0x4093, 0xB9}, ++{0x4094, 0xB1}, ++{0x4095, 0xA8}, ++{0x4096, 0xA8}, ++{0x4097, 0xA7}, ++{0x4098, 0x9F}, ++{0x4099, 0x9B}, ++{0x409A, 0x9B}, ++{0x409B, 0x9B}, ++{0x409C, 0x93}, ++{0x409D, 0x91}, ++{0x409E, 0x91}, ++{0x409F, 0x91}, ++{0x40A0, 0x8D}, ++{0x40A1, 0x8C}, ++{0x40A2, 0x8C}, ++{0x40A3, 0x8C}, ++{0x40A4, 0x8E}, ++{0x40A5, 0x8E}, ++{0x40A6, 0x8D}, ++{0x40A7, 0x8D}, ++{0x40A8, 0x96}, ++{0x40A9, 0x95}, ++{0x40AA, 0x95}, ++{0x40AB, 0x94}, ++{0x40AC, 0xA2}, ++{0x40AD, 0x9F}, ++{0x40AE, 0x9F}, ++{0x40AF, 0x9D}, ++{0x40B0, 0xB1}, ++{0x40B1, 0xAC}, ++{0x40B2, 0xAB}, ++{0x40B3, 0xAA}, ++{0x40B4, 0xD3}, ++{0x40B5, 0xBC}, ++{0x40B6, 0xBD}, ++{0x40B7, 0xBC}, ++{0x40B8, 0xC1}, ++{0x40B9, 0xB7}, ++{0x40BA, 0xB7}, ++{0x40BB, 0xB5}, ++{0x40BC, 0xB0}, ++{0x40BD, 0xAA}, ++{0x40BE, 0xAA}, ++{0x40BF, 0xAA}, ++{0x40C0, 0xA8}, ++{0x40C1, 0xA4}, ++{0x40C2, 0xA4}, ++{0x40C3, 0xA4}, ++{0x40C4, 0xA2}, ++{0x40C5, 0x9F}, ++{0x40C6, 0x9F}, ++{0x40C7, 0x9F}, ++{0x40C8, 0xA3}, ++{0x40C9, 0xA0}, ++{0x40CA, 0xA0}, ++{0x40CB, 0xA0}, ++{0x40CC, 0xA6}, ++{0x40CD, 0xA3}, ++{0x40CE, 0xA3}, ++{0x40CF, 0xA2}, ++{0x40D0, 0xAF}, ++{0x40D1, 0xAB}, ++{0x40D2, 0xAA}, ++{0x40D3, 0xA8}, ++{0x40D4, 0xBA}, ++{0x40D5, 0xAE}, ++{0x40D6, 0xAE}, ++{0x40D7, 0xAB}, ++{0x4100, 0xBD}, ++{0x4101, 0xBA}, ++{0x4102, 0xBD}, ++{0x4103, 0xB7}, ++{0x4104, 0xB7}, ++{0x4105, 0xB7}, ++{0x4106, 0xB8}, ++{0x4107, 0xB5}, ++{0x4108, 0xAB}, ++{0x4109, 0xAA}, ++{0x410A, 0xAC}, ++{0x410B, 0xAB}, ++{0x410C, 0xA4}, ++{0x410D, 0xA5}, ++{0x410E, 0xA5}, ++{0x410F, 0xA4}, ++{0x4110, 0x9F}, ++{0x4111, 0xA0}, ++{0x4112, 0xA0}, ++{0x4113, 0x9F}, ++{0x4114, 0xA0}, ++{0x4115, 0xA0}, ++{0x4116, 0xA0}, ++{0x4117, 0x9F}, ++{0x4118, 0xA1}, ++{0x4119, 0xA1}, ++{0x411A, 0xA1}, ++{0x411B, 0xA0}, ++{0x411C, 0xA7}, ++{0x411D, 0xA6}, ++{0x411E, 0xA6}, ++{0x411F, 0xA6}, ++{0x4120, 0xA7}, ++{0x4121, 0xA6}, ++{0x4122, 0xA6}, ++{0x4123, 0xA3}, ++{0x4124, 0xB9}, ++{0x4125, 0xB9}, ++{0x4126, 0xBA}, ++{0x4127, 0xB8}, ++{0x4128, 0xA6}, ++{0x4129, 0xA7}, ++{0x412A, 0xA7}, ++{0x412B, 0xA6}, ++{0x412C, 0x9B}, ++{0x412D, 0x9B}, ++{0x412E, 0x9B}, ++{0x412F, 0x9B}, ++{0x4130, 0x91}, ++{0x4131, 0x92}, ++{0x4132, 0x92}, ++{0x4133, 0x91}, ++{0x4134, 0x8C}, ++{0x4135, 0x8C}, ++{0x4136, 0x8C}, ++{0x4137, 0x8C}, ++{0x4138, 0x8D}, ++{0x4139, 0x8D}, ++{0x413A, 0x8D}, ++{0x413B, 0x8D}, ++{0x413C, 0x93}, ++{0x413D, 0x93}, ++{0x413E, 0x93}, ++{0x413F, 0x92}, ++{0x4140, 0x9A}, ++{0x4141, 0x9A}, ++{0x4142, 0x9A}, ++{0x4143, 0x99}, ++{0x4144, 0xA7}, ++{0x4145, 0xA5}, ++{0x4146, 0xA6}, ++{0x4147, 0xA6}, ++{0x4148, 0xB8}, ++{0x4149, 0xB4}, ++{0x414A, 0xB4}, ++{0x414B, 0xB3}, ++{0x414C, 0xA3}, ++{0x414D, 0xA2}, ++{0x414E, 0xA3}, ++{0x414F, 0xA2}, ++{0x4150, 0x96}, ++{0x4151, 0x96}, ++{0x4152, 0x96}, ++{0x4153, 0x96}, ++{0x4154, 0x8A}, ++{0x4155, 0x8A}, ++{0x4156, 0x8A}, ++{0x4157, 0x8A}, ++{0x4158, 0x82}, ++{0x4159, 0x82}, ++{0x415A, 0x82}, ++{0x415B, 0x82}, ++{0x415C, 0x84}, ++{0x415D, 0x85}, ++{0x415E, 0x84}, ++{0x415F, 0x84}, ++{0x4160, 0x8D}, ++{0x4161, 0x8D}, ++{0x4162, 0x8D}, ++{0x4163, 0x8D}, ++{0x4164, 0x96}, ++{0x4165, 0x96}, ++{0x4166, 0x96}, ++{0x4167, 0x95}, ++{0x4168, 0xA5}, ++{0x4169, 0xA2}, ++{0x416A, 0xA3}, ++{0x416B, 0xA2}, ++{0x416C, 0xB7}, ++{0x416D, 0xB3}, ++{0x416E, 0xB5}, ++{0x416F, 0xB4}, ++{0x4170, 0xA4}, ++{0x4171, 0xA2}, ++{0x4172, 0xA3}, ++{0x4173, 0xA2}, ++{0x4174, 0x97}, ++{0x4175, 0x96}, ++{0x4176, 0x96}, ++{0x4177, 0x96}, ++{0x4178, 0x8B}, ++{0x4179, 0x8A}, ++{0x417A, 0x8A}, ++{0x417B, 0x8A}, ++{0x417C, 0x81}, ++{0x417D, 0x81}, ++{0x417E, 0x81}, ++{0x417F, 0x81}, ++{0x4180, 0x84}, ++{0x4181, 0x84}, ++{0x4182, 0x84}, ++{0x4183, 0x84}, ++{0x4184, 0x8C}, ++{0x4185, 0x8D}, ++{0x4186, 0x8D}, ++{0x4187, 0x8D}, ++{0x4188, 0x95}, ++{0x4189, 0x96}, ++{0x418A, 0x96}, ++{0x418B, 0x95}, ++{0x418C, 0xA1}, ++{0x418D, 0xA1}, ++{0x418E, 0xA1}, ++{0x418F, 0xA0}, ++{0x4190, 0xBC}, ++{0x4191, 0xB8}, ++{0x4192, 0xB8}, ++{0x4193, 0xB9}, ++{0x4194, 0xA8}, ++{0x4195, 0xA5}, ++{0x4196, 0xA6}, ++{0x4197, 0xA5}, ++{0x4198, 0x9C}, ++{0x4199, 0x9A}, ++{0x419A, 0x9A}, ++{0x419B, 0x9A}, ++{0x419C, 0x91}, ++{0x419D, 0x91}, ++{0x419E, 0x91}, ++{0x419F, 0x91}, ++{0x41A0, 0x8B}, ++{0x41A1, 0x8B}, ++{0x41A2, 0x8B}, ++{0x41A3, 0x8B}, ++{0x41A4, 0x8C}, ++{0x41A5, 0x8C}, ++{0x41A6, 0x8C}, ++{0x41A7, 0x8C}, ++{0x41A8, 0x91}, ++{0x41A9, 0x92}, ++{0x41AA, 0x91}, ++{0x41AB, 0x91}, ++{0x41AC, 0x98}, ++{0x41AD, 0x99}, ++{0x41AE, 0x99}, ++{0x41AF, 0x98}, ++{0x41B0, 0xA3}, ++{0x41B1, 0xA3}, ++{0x41B2, 0xA3}, ++{0x41B3, 0xA2}, ++{0x41B4, 0xC1}, ++{0x41B5, 0xB8}, ++{0x41B6, 0xB9}, ++{0x41B7, 0xBA}, ++{0x41B8, 0xB8}, ++{0x41B9, 0xB4}, ++{0x41BA, 0xB4}, ++{0x41BB, 0xB4}, ++{0x41BC, 0xAA}, ++{0x41BD, 0xA7}, ++{0x41BE, 0xA7}, ++{0x41BF, 0xA8}, ++{0x41C0, 0xA4}, ++{0x41C1, 0xA2}, ++{0x41C2, 0xA2}, ++{0x41C3, 0xA3}, ++{0x41C4, 0x9E}, ++{0x41C5, 0x9D}, ++{0x41C6, 0x9D}, ++{0x41C7, 0x9D}, ++{0x41C8, 0x9E}, ++{0x41C9, 0x9D}, ++{0x41CA, 0x9D}, ++{0x41CB, 0x9D}, ++{0x41CC, 0x9E}, ++{0x41CD, 0x9E}, ++{0x41CE, 0x9E}, ++{0x41CF, 0x9E}, ++{0x41D0, 0xA3}, ++{0x41D1, 0xA3}, ++{0x41D2, 0xA2}, ++{0x41D3, 0xA1}, ++{0x41D4, 0xA7}, ++{0x41D5, 0xA7}, ++{0x41D6, 0xA7}, ++{0x41D7, 0xA3}, ++{0x4200, 0xCE}, ++{0x4201, 0xC0}, ++{0x4202, 0xC1}, ++{0x4203, 0xB9}, ++{0x4204, 0xC3}, ++{0x4205, 0xB9}, ++{0x4206, 0xBC}, ++{0x4207, 0xBD}, ++{0x4208, 0xB3}, ++{0x4209, 0xAE}, ++{0x420A, 0xAF}, ++{0x420B, 0xAE}, ++{0x420C, 0xAA}, ++{0x420D, 0xA8}, ++{0x420E, 0xA8}, ++{0x420F, 0xA6}, ++{0x4210, 0xA4}, ++{0x4211, 0xA2}, ++{0x4212, 0xA2}, ++{0x4213, 0xA0}, ++{0x4214, 0xA4}, ++{0x4215, 0xA3}, ++{0x4216, 0xA2}, ++{0x4217, 0xA0}, ++{0x4218, 0xA7}, ++{0x4219, 0xA5}, ++{0x421A, 0xA3}, ++{0x421B, 0xA1}, ++{0x421C, 0xB0}, ++{0x421D, 0xA8}, ++{0x421E, 0xA8}, ++{0x421F, 0xA6}, ++{0x4220, 0xB4}, ++{0x4221, 0xAA}, ++{0x4222, 0xA5}, ++{0x4223, 0xA3}, ++{0x4224, 0xC7}, ++{0x4225, 0xBC}, ++{0x4226, 0xBE}, ++{0x4227, 0xBC}, ++{0x4228, 0xB0}, ++{0x4229, 0xA9}, ++{0x422A, 0xA9}, ++{0x422B, 0xA8}, ++{0x422C, 0xA0}, ++{0x422D, 0x9D}, ++{0x422E, 0x9D}, ++{0x422F, 0x9C}, ++{0x4230, 0x94}, ++{0x4231, 0x93}, ++{0x4232, 0x93}, ++{0x4233, 0x92}, ++{0x4234, 0x8E}, ++{0x4235, 0x8D}, ++{0x4236, 0x8D}, ++{0x4237, 0x8C}, ++{0x4238, 0x8F}, ++{0x4239, 0x8E}, ++{0x423A, 0x8E}, ++{0x423B, 0x8D}, ++{0x423C, 0x96}, ++{0x423D, 0x94}, ++{0x423E, 0x94}, ++{0x423F, 0x92}, ++{0x4240, 0xA1}, ++{0x4241, 0x9C}, ++{0x4242, 0x9C}, ++{0x4243, 0x99}, ++{0x4244, 0xB0}, ++{0x4245, 0xA8}, ++{0x4246, 0xAB}, ++{0x4247, 0xA7}, ++{0x4248, 0xC3}, ++{0x4249, 0xB7}, ++{0x424A, 0xB7}, ++{0x424B, 0xBC}, ++{0x424C, 0xAB}, ++{0x424D, 0xA4}, ++{0x424E, 0xA5}, ++{0x424F, 0xA5}, ++{0x4250, 0x9A}, ++{0x4251, 0x97}, ++{0x4252, 0x97}, ++{0x4253, 0x98}, ++{0x4254, 0x8C}, ++{0x4255, 0x8B}, ++{0x4256, 0x8B}, ++{0x4257, 0x8B}, ++{0x4258, 0x82}, ++{0x4259, 0x82}, ++{0x425A, 0x82}, ++{0x425B, 0x82}, ++{0x425C, 0x85}, ++{0x425D, 0x85}, ++{0x425E, 0x85}, ++{0x425F, 0x84}, ++{0x4260, 0x8F}, ++{0x4261, 0x8E}, ++{0x4262, 0x8E}, ++{0x4263, 0x8D}, ++{0x4264, 0x9B}, ++{0x4265, 0x98}, ++{0x4266, 0x98}, ++{0x4267, 0x95}, ++{0x4268, 0xAE}, ++{0x4269, 0xA5}, ++{0x426A, 0xA7}, ++{0x426B, 0xA2}, ++{0x426C, 0xC2}, ++{0x426D, 0xB7}, ++{0x426E, 0xB8}, ++{0x426F, 0xB9}, ++{0x4270, 0xAA}, ++{0x4271, 0xA4}, ++{0x4272, 0xA4}, ++{0x4273, 0xA5}, ++{0x4274, 0x99}, ++{0x4275, 0x96}, ++{0x4276, 0x97}, ++{0x4277, 0x98}, ++{0x4278, 0x8B}, ++{0x4279, 0x8A}, ++{0x427A, 0x8A}, ++{0x427B, 0x8B}, ++{0x427C, 0x81}, ++{0x427D, 0x81}, ++{0x427E, 0x81}, ++{0x427F, 0x82}, ++{0x4280, 0x84}, ++{0x4281, 0x84}, ++{0x4282, 0x84}, ++{0x4283, 0x84}, ++{0x4284, 0x8E}, ++{0x4285, 0x8E}, ++{0x4286, 0x8D}, ++{0x4287, 0x8C}, ++{0x4288, 0x9A}, ++{0x4289, 0x97}, ++{0x428A, 0x97}, ++{0x428B, 0x95}, ++{0x428C, 0xAA}, ++{0x428D, 0xA3}, ++{0x428E, 0xA3}, ++{0x428F, 0xA2}, ++{0x4290, 0xC7}, ++{0x4291, 0xBA}, ++{0x4292, 0xC0}, ++{0x4293, 0xC3}, ++{0x4294, 0xB0}, ++{0x4295, 0xA7}, ++{0x4296, 0xA7}, ++{0x4297, 0xA9}, ++{0x4298, 0x9F}, ++{0x4299, 0x9B}, ++{0x429A, 0x9B}, ++{0x429B, 0x9D}, ++{0x429C, 0x93}, ++{0x429D, 0x91}, ++{0x429E, 0x91}, ++{0x429F, 0x92}, ++{0x42A0, 0x8C}, ++{0x42A1, 0x8B}, ++{0x42A2, 0x8B}, ++{0x42A3, 0x8C}, ++{0x42A4, 0x8D}, ++{0x42A5, 0x8C}, ++{0x42A6, 0x8C}, ++{0x42A7, 0x8C}, ++{0x42A8, 0x94}, ++{0x42A9, 0x93}, ++{0x42AA, 0x92}, ++{0x42AB, 0x91}, ++{0x42AC, 0x9E}, ++{0x42AD, 0x9B}, ++{0x42AE, 0x9B}, ++{0x42AF, 0x98}, ++{0x42B0, 0xAC}, ++{0x42B1, 0xA6}, ++{0x42B2, 0xA6}, ++{0x42B3, 0xA2}, ++{0x42B4, 0xCE}, ++{0x42B5, 0xBA}, ++{0x42B6, 0xBC}, ++{0x42B7, 0xB7}, ++{0x42B8, 0xC5}, ++{0x42B9, 0xB5}, ++{0x42BA, 0xBA}, ++{0x42BB, 0xC0}, ++{0x42BC, 0xB1}, ++{0x42BD, 0xA8}, ++{0x42BE, 0xAE}, ++{0x42BF, 0xAF}, ++{0x42C0, 0xA7}, ++{0x42C1, 0xA3}, ++{0x42C2, 0xA3}, ++{0x42C3, 0xA5}, ++{0x42C4, 0xA0}, ++{0x42C5, 0x9D}, ++{0x42C6, 0x9D}, ++{0x42C7, 0x9F}, ++{0x42C8, 0xA0}, ++{0x42C9, 0x9E}, ++{0x42CA, 0x9E}, ++{0x42CB, 0x9F}, ++{0x42CC, 0xA2}, ++{0x42CD, 0xA0}, ++{0x42CE, 0xA0}, ++{0x42CF, 0xA0}, ++{0x42D0, 0xA8}, ++{0x42D1, 0xA5}, ++{0x42D2, 0xA5}, ++{0x42D3, 0xA2}, ++{0x42D4, 0xB3}, ++{0x42D5, 0xAA}, ++{0x42D6, 0xAB}, ++{0x42D7, 0xA3}, ++{0x42D8, 0x00}, ++{0x42D9, 0x00}, ++{0x4300, 0xA2}, ++{0x4301, 0xAE}, ++{0x4302, 0xAD}, ++{0x4303, 0xB5}, ++{0x4304, 0x95}, ++{0x4305, 0x9A}, ++{0x4306, 0x98}, ++{0x4307, 0x9B}, ++{0x4308, 0x8D}, ++{0x4309, 0x90}, ++{0x430A, 0x8F}, ++{0x430B, 0x91}, ++{0x430C, 0x86}, ++{0x430D, 0x88}, ++{0x430E, 0x87}, ++{0x430F, 0x89}, ++{0x4310, 0x86}, ++{0x4311, 0x87}, ++{0x4312, 0x86}, ++{0x4313, 0x88}, ++{0x4314, 0x89}, ++{0x4315, 0x88}, ++{0x4316, 0x88}, ++{0x4317, 0x8E}, ++{0x4318, 0x90}, ++{0x4319, 0x8F}, ++{0x431A, 0x8C}, ++{0x431B, 0x8C}, ++{0x431C, 0x9C}, ++{0x431D, 0x99}, ++{0x431E, 0x98}, ++{0x431F, 0x99}, ++{0x4320, 0xAB}, ++{0x4321, 0xB0}, ++{0x4322, 0xAD}, ++{0x4323, 0xAF}, ++{0x4324, 0x9B}, ++{0x4325, 0x9F}, ++{0x4326, 0x9E}, ++{0x4327, 0xA1}, ++{0x4328, 0x8E}, ++{0x4329, 0x91}, ++{0x432A, 0x90}, ++{0x432B, 0x93}, ++{0x432C, 0x86}, ++{0x432D, 0x88}, ++{0x432E, 0x87}, ++{0x432F, 0x89}, ++{0x4330, 0x82}, ++{0x4331, 0x84}, ++{0x4332, 0x83}, ++{0x4333, 0x84}, ++{0x4334, 0x82}, ++{0x4335, 0x82}, ++{0x4336, 0x82}, ++{0x4337, 0x83}, ++{0x4338, 0x85}, ++{0x4339, 0x84}, ++{0x433A, 0x84}, ++{0x433B, 0x85}, ++{0x433C, 0x8A}, ++{0x433D, 0x89}, ++{0x433E, 0x88}, ++{0x433F, 0x89}, ++{0x4340, 0x93}, ++{0x4341, 0x91}, ++{0x4342, 0x91}, ++{0x4343, 0x93}, ++{0x4344, 0xA0}, ++{0x4345, 0x9E}, ++{0x4346, 0x9D}, ++{0x4347, 0xA1}, ++{0x4348, 0x95}, ++{0x4349, 0x9B}, ++{0x434A, 0x9A}, ++{0x434B, 0x9C}, ++{0x434C, 0x8A}, ++{0x434D, 0x8D}, ++{0x434E, 0x8C}, ++{0x434F, 0x8D}, ++{0x4350, 0x83}, ++{0x4351, 0x85}, ++{0x4352, 0x84}, ++{0x4353, 0x85}, ++{0x4354, 0x80}, ++{0x4355, 0x81}, ++{0x4356, 0x81}, ++{0x4357, 0x81}, ++{0x4358, 0x80}, ++{0x4359, 0x80}, ++{0x435A, 0x80}, ++{0x435B, 0x80}, ++{0x435C, 0x82}, ++{0x435D, 0x81}, ++{0x435E, 0x81}, ++{0x435F, 0x81}, ++{0x4360, 0x85}, ++{0x4361, 0x84}, ++{0x4362, 0x84}, ++{0x4363, 0x85}, ++{0x4364, 0x8D}, ++{0x4365, 0x8B}, ++{0x4366, 0x8B}, ++{0x4367, 0x8D}, ++{0x4368, 0x98}, ++{0x4369, 0x98}, ++{0x436A, 0x95}, ++{0x436B, 0x98}, ++{0x436C, 0x95}, ++{0x436D, 0x9A}, ++{0x436E, 0x99}, ++{0x436F, 0x9A}, ++{0x4370, 0x8A}, ++{0x4371, 0x8D}, ++{0x4372, 0x8C}, ++{0x4373, 0x8C}, ++{0x4374, 0x83}, ++{0x4375, 0x85}, ++{0x4376, 0x84}, ++{0x4377, 0x84}, ++{0x4378, 0x80}, ++{0x4379, 0x80}, ++{0x437A, 0x80}, ++{0x437B, 0x80}, ++{0x437C, 0x7F}, ++{0x437D, 0x7F}, ++{0x437E, 0x7F}, ++{0x437F, 0x7F}, ++{0x4380, 0x81}, ++{0x4381, 0x80}, ++{0x4382, 0x80}, ++{0x4383, 0x81}, ++{0x4384, 0x84}, ++{0x4385, 0x83}, ++{0x4386, 0x83}, ++{0x4387, 0x84}, ++{0x4388, 0x8B}, ++{0x4389, 0x8A}, ++{0x438A, 0x8A}, ++{0x438B, 0x8C}, ++{0x438C, 0x97}, ++{0x438D, 0x96}, ++{0x438E, 0x96}, ++{0x438F, 0x99}, ++{0x4390, 0x99}, ++{0x4391, 0x9F}, ++{0x4392, 0x9E}, ++{0x4393, 0x9D}, ++{0x4394, 0x8D}, ++{0x4395, 0x90}, ++{0x4396, 0x90}, ++{0x4397, 0x8F}, ++{0x4398, 0x85}, ++{0x4399, 0x87}, ++{0x439A, 0x87}, ++{0x439B, 0x86}, ++{0x439C, 0x81}, ++{0x439D, 0x83}, ++{0x439E, 0x82}, ++{0x439F, 0x82}, ++{0x43A0, 0x80}, ++{0x43A1, 0x81}, ++{0x43A2, 0x81}, ++{0x43A3, 0x81}, ++{0x43A4, 0x82}, ++{0x43A5, 0x82}, ++{0x43A6, 0x82}, ++{0x43A7, 0x82}, ++{0x43A8, 0x86}, ++{0x43A9, 0x85}, ++{0x43AA, 0x85}, ++{0x43AB, 0x87}, ++{0x43AC, 0x8D}, ++{0x43AD, 0x8D}, ++{0x43AE, 0x8D}, ++{0x43AF, 0x90}, ++{0x43B0, 0x9A}, ++{0x43B1, 0x9A}, ++{0x43B2, 0x9B}, ++{0x43B3, 0x9D}, ++{0x43B4, 0xA0}, ++{0x43B5, 0xAD}, ++{0x43B6, 0xAC}, ++{0x43B7, 0xAA}, ++{0x43B8, 0x93}, ++{0x43B9, 0x97}, ++{0x43BA, 0x97}, ++{0x43BB, 0x96}, ++{0x43BC, 0x8B}, ++{0x43BD, 0x8E}, ++{0x43BE, 0x8E}, ++{0x43BF, 0x8C}, ++{0x43C0, 0x83}, ++{0x43C1, 0x85}, ++{0x43C2, 0x85}, ++{0x43C3, 0x84}, ++{0x43C4, 0x82}, ++{0x43C5, 0x84}, ++{0x43C6, 0x83}, ++{0x43C7, 0x83}, ++{0x43C8, 0x83}, ++{0x43C9, 0x84}, ++{0x43CA, 0x84}, ++{0x43CB, 0x85}, ++{0x43CC, 0x8A}, ++{0x43CD, 0x8A}, ++{0x43CE, 0x8A}, ++{0x43CF, 0x8C}, ++{0x43D0, 0x92}, ++{0x43D1, 0x93}, ++{0x43D2, 0x93}, ++{0x43D3, 0x96}, ++{0x43D4, 0x9F}, ++{0x43D5, 0xA6}, ++{0x43D6, 0xA5}, ++{0x43D7, 0xAA}, ++{0x4400, 0xA1}, ++{0x4401, 0xAB}, ++{0x4402, 0xA7}, ++{0x4403, 0xB0}, ++{0x4404, 0x91}, ++{0x4405, 0x96}, ++{0x4406, 0x94}, ++{0x4407, 0x99}, ++{0x4408, 0x8A}, ++{0x4409, 0x8E}, ++{0x440A, 0x8C}, ++{0x440B, 0x8F}, ++{0x440C, 0x85}, ++{0x440D, 0x86}, ++{0x440E, 0x86}, ++{0x440F, 0x88}, ++{0x4410, 0x85}, ++{0x4411, 0x86}, ++{0x4412, 0x85}, ++{0x4413, 0x87}, ++{0x4414, 0x88}, ++{0x4415, 0x87}, ++{0x4416, 0x87}, ++{0x4417, 0x89}, ++{0x4418, 0x91}, ++{0x4419, 0x8F}, ++{0x441A, 0x8F}, ++{0x441B, 0x90}, ++{0x441C, 0x9C}, ++{0x441D, 0x9B}, ++{0x441E, 0x9A}, ++{0x441F, 0x9A}, ++{0x4420, 0xB3}, ++{0x4421, 0xB1}, ++{0x4422, 0xB0}, ++{0x4423, 0xB2}, ++{0x4424, 0x96}, ++{0x4425, 0x9C}, ++{0x4426, 0x9A}, ++{0x4427, 0x9E}, ++{0x4428, 0x8B}, ++{0x4429, 0x8F}, ++{0x442A, 0x8E}, ++{0x442B, 0x91}, ++{0x442C, 0x84}, ++{0x442D, 0x87}, ++{0x442E, 0x86}, ++{0x442F, 0x88}, ++{0x4430, 0x82}, ++{0x4431, 0x83}, ++{0x4432, 0x82}, ++{0x4433, 0x84}, ++{0x4434, 0x82}, ++{0x4435, 0x82}, ++{0x4436, 0x82}, ++{0x4437, 0x83}, ++{0x4438, 0x84}, ++{0x4439, 0x84}, ++{0x443A, 0x84}, ++{0x443B, 0x84}, ++{0x443C, 0x8B}, ++{0x443D, 0x89}, ++{0x443E, 0x89}, ++{0x443F, 0x89}, ++{0x4440, 0x95}, ++{0x4441, 0x93}, ++{0x4442, 0x93}, ++{0x4443, 0x93}, ++{0x4444, 0xA2}, ++{0x4445, 0xA2}, ++{0x4446, 0xA1}, ++{0x4447, 0xA0}, ++{0x4448, 0x8F}, ++{0x4449, 0x97}, ++{0x444A, 0x97}, ++{0x444B, 0x98}, ++{0x444C, 0x87}, ++{0x444D, 0x8B}, ++{0x444E, 0x8A}, ++{0x444F, 0x8B}, ++{0x4450, 0x81}, ++{0x4451, 0x83}, ++{0x4452, 0x83}, ++{0x4453, 0x84}, ++{0x4454, 0x7F}, ++{0x4455, 0x80}, ++{0x4456, 0x80}, ++{0x4457, 0x81}, ++{0x4458, 0x80}, ++{0x4459, 0x80}, ++{0x445A, 0x80}, ++{0x445B, 0x80}, ++{0x445C, 0x82}, ++{0x445D, 0x81}, ++{0x445E, 0x81}, ++{0x445F, 0x81}, ++{0x4460, 0x87}, ++{0x4461, 0x85}, ++{0x4462, 0x85}, ++{0x4463, 0x86}, ++{0x4464, 0x90}, ++{0x4465, 0x8E}, ++{0x4466, 0x8E}, ++{0x4467, 0x8E}, ++{0x4468, 0x9B}, ++{0x4469, 0x9C}, ++{0x446A, 0x9A}, ++{0x446B, 0x9A}, ++{0x446C, 0x91}, ++{0x446D, 0x97}, ++{0x446E, 0x95}, ++{0x446F, 0x95}, ++{0x4470, 0x87}, ++{0x4471, 0x8A}, ++{0x4472, 0x8A}, ++{0x4473, 0x89}, ++{0x4474, 0x81}, ++{0x4475, 0x83}, ++{0x4476, 0x83}, ++{0x4477, 0x83}, ++{0x4478, 0x7F}, ++{0x4479, 0x80}, ++{0x447A, 0x80}, ++{0x447B, 0x80}, ++{0x447C, 0x80}, ++{0x447D, 0x80}, ++{0x447E, 0x80}, ++{0x447F, 0x7F}, ++{0x4480, 0x81}, ++{0x4481, 0x81}, ++{0x4482, 0x81}, ++{0x4483, 0x81}, ++{0x4484, 0x85}, ++{0x4485, 0x85}, ++{0x4486, 0x85}, ++{0x4487, 0x85}, ++{0x4488, 0x8E}, ++{0x4489, 0x8D}, ++{0x448A, 0x8D}, ++{0x448B, 0x8E}, ++{0x448C, 0x9D}, ++{0x448D, 0x9C}, ++{0x448E, 0x9C}, ++{0x448F, 0x9C}, ++{0x4490, 0x94}, ++{0x4491, 0x9B}, ++{0x4492, 0x9A}, ++{0x4493, 0x97}, ++{0x4494, 0x8A}, ++{0x4495, 0x8E}, ++{0x4496, 0x8E}, ++{0x4497, 0x8C}, ++{0x4498, 0x84}, ++{0x4499, 0x86}, ++{0x449A, 0x86}, ++{0x449B, 0x84}, ++{0x449C, 0x81}, ++{0x449D, 0x83}, ++{0x449E, 0x83}, ++{0x449F, 0x81}, ++{0x44A0, 0x81}, ++{0x44A1, 0x82}, ++{0x44A2, 0x82}, ++{0x44A3, 0x81}, ++{0x44A4, 0x83}, ++{0x44A5, 0x83}, ++{0x44A6, 0x83}, ++{0x44A7, 0x83}, ++{0x44A8, 0x88}, ++{0x44A9, 0x88}, ++{0x44AA, 0x88}, ++{0x44AB, 0x88}, ++{0x44AC, 0x91}, ++{0x44AD, 0x91}, ++{0x44AE, 0x91}, ++{0x44AF, 0x92}, ++{0x44B0, 0xA0}, ++{0x44B1, 0xA0}, ++{0x44B2, 0xA0}, ++{0x44B3, 0xA0}, ++{0x44B4, 0x9E}, ++{0x44B5, 0xA9}, ++{0x44B6, 0xA8}, ++{0x44B7, 0xA3}, ++{0x44B8, 0x90}, ++{0x44B9, 0x95}, ++{0x44BA, 0x95}, ++{0x44BB, 0x92}, ++{0x44BC, 0x8A}, ++{0x44BD, 0x8E}, ++{0x44BE, 0x8E}, ++{0x44BF, 0x8B}, ++{0x44C0, 0x84}, ++{0x44C1, 0x86}, ++{0x44C2, 0x86}, ++{0x44C3, 0x84}, ++{0x44C4, 0x84}, ++{0x44C5, 0x85}, ++{0x44C6, 0x85}, ++{0x44C7, 0x84}, ++{0x44C8, 0x86}, ++{0x44C9, 0x87}, ++{0x44CA, 0x87}, ++{0x44CB, 0x86}, ++{0x44CC, 0x8D}, ++{0x44CD, 0x8E}, ++{0x44CE, 0x8E}, ++{0x44CF, 0x8D}, ++{0x44D0, 0x98}, ++{0x44D1, 0x98}, ++{0x44D2, 0x99}, ++{0x44D3, 0x9A}, ++{0x44D4, 0xA9}, ++{0x44D5, 0xAA}, ++{0x44D6, 0xAA}, ++{0x44D7, 0xAD}, ++{0x4500, 0x9F}, ++{0x4501, 0xA8}, ++{0x4502, 0xA5}, ++{0x4503, 0xAF}, ++{0x4504, 0x8F}, ++{0x4505, 0x96}, ++{0x4506, 0x92}, ++{0x4507, 0x94}, ++{0x4508, 0x89}, ++{0x4509, 0x8D}, ++{0x450A, 0x8A}, ++{0x450B, 0x8E}, ++{0x450C, 0x84}, ++{0x450D, 0x85}, ++{0x450E, 0x84}, ++{0x450F, 0x87}, ++{0x4510, 0x84}, ++{0x4511, 0x85}, ++{0x4512, 0x84}, ++{0x4513, 0x86}, ++{0x4514, 0x87}, ++{0x4515, 0x86}, ++{0x4516, 0x86}, ++{0x4517, 0x88}, ++{0x4518, 0x8F}, ++{0x4519, 0x8D}, ++{0x451A, 0x8D}, ++{0x451B, 0x8F}, ++{0x451C, 0x9A}, ++{0x451D, 0x9A}, ++{0x451E, 0x98}, ++{0x451F, 0x9A}, ++{0x4520, 0xAF}, ++{0x4521, 0xAF}, ++{0x4522, 0xB2}, ++{0x4523, 0xB1}, ++{0x4524, 0x95}, ++{0x4525, 0x9B}, ++{0x4526, 0x97}, ++{0x4527, 0x9C}, ++{0x4528, 0x8A}, ++{0x4529, 0x8E}, ++{0x452A, 0x8D}, ++{0x452B, 0x90}, ++{0x452C, 0x84}, ++{0x452D, 0x86}, ++{0x452E, 0x85}, ++{0x452F, 0x87}, ++{0x4530, 0x81}, ++{0x4531, 0x82}, ++{0x4532, 0x82}, ++{0x4533, 0x83}, ++{0x4534, 0x81}, ++{0x4535, 0x81}, ++{0x4536, 0x81}, ++{0x4537, 0x82}, ++{0x4538, 0x84}, ++{0x4539, 0x83}, ++{0x453A, 0x83}, ++{0x453B, 0x84}, ++{0x453C, 0x8A}, ++{0x453D, 0x88}, ++{0x453E, 0x88}, ++{0x453F, 0x89}, ++{0x4540, 0x94}, ++{0x4541, 0x92}, ++{0x4542, 0x91}, ++{0x4543, 0x92}, ++{0x4544, 0xA1}, ++{0x4545, 0xA0}, ++{0x4546, 0x9C}, ++{0x4547, 0x9D}, ++{0x4548, 0x8F}, ++{0x4549, 0x96}, ++{0x454A, 0x95}, ++{0x454B, 0x92}, ++{0x454C, 0x87}, ++{0x454D, 0x8A}, ++{0x454E, 0x89}, ++{0x454F, 0x8A}, ++{0x4550, 0x81}, ++{0x4551, 0x83}, ++{0x4552, 0x82}, ++{0x4553, 0x83}, ++{0x4554, 0x7F}, ++{0x4555, 0x80}, ++{0x4556, 0x80}, ++{0x4557, 0x81}, ++{0x4558, 0x7F}, ++{0x4559, 0x80}, ++{0x455A, 0x7F}, ++{0x455B, 0x80}, ++{0x455C, 0x81}, ++{0x455D, 0x81}, ++{0x455E, 0x81}, ++{0x455F, 0x81}, ++{0x4560, 0x86}, ++{0x4561, 0x85}, ++{0x4562, 0x85}, ++{0x4563, 0x85}, ++{0x4564, 0x8F}, ++{0x4565, 0x8D}, ++{0x4566, 0x8D}, ++{0x4567, 0x8D}, ++{0x4568, 0x99}, ++{0x4569, 0x9A}, ++{0x456A, 0x97}, ++{0x456B, 0x99}, ++{0x456C, 0x90}, ++{0x456D, 0x95}, ++{0x456E, 0x93}, ++{0x456F, 0x92}, ++{0x4570, 0x87}, ++{0x4571, 0x8A}, ++{0x4572, 0x88}, ++{0x4573, 0x87}, ++{0x4574, 0x81}, ++{0x4575, 0x83}, ++{0x4576, 0x82}, ++{0x4577, 0x82}, ++{0x4578, 0x7F}, ++{0x4579, 0x80}, ++{0x457A, 0x80}, ++{0x457B, 0x80}, ++{0x457C, 0x80}, ++{0x457D, 0x80}, ++{0x457E, 0x80}, ++{0x457F, 0x80}, ++{0x4580, 0x81}, ++{0x4581, 0x81}, ++{0x4582, 0x81}, ++{0x4583, 0x81}, ++{0x4584, 0x85}, ++{0x4585, 0x85}, ++{0x4586, 0x84}, ++{0x4587, 0x85}, ++{0x4588, 0x8E}, ++{0x4589, 0x8D}, ++{0x458A, 0x8C}, ++{0x458B, 0x8D}, ++{0x458C, 0x9B}, ++{0x458D, 0x9B}, ++{0x458E, 0x9A}, ++{0x458F, 0x98}, ++{0x4590, 0x94}, ++{0x4591, 0x9A}, ++{0x4592, 0x94}, ++{0x4593, 0x90}, ++{0x4594, 0x8A}, ++{0x4595, 0x8D}, ++{0x4596, 0x8C}, ++{0x4597, 0x89}, ++{0x4598, 0x84}, ++{0x4599, 0x86}, ++{0x459A, 0x85}, ++{0x459B, 0x83}, ++{0x459C, 0x82}, ++{0x459D, 0x83}, ++{0x459E, 0x82}, ++{0x459F, 0x80}, ++{0x45A0, 0x81}, ++{0x45A1, 0x82}, ++{0x45A2, 0x81}, ++{0x45A3, 0x80}, ++{0x45A4, 0x83}, ++{0x45A5, 0x83}, ++{0x45A6, 0x83}, ++{0x45A7, 0x83}, ++{0x45A8, 0x88}, ++{0x45A9, 0x87}, ++{0x45AA, 0x87}, ++{0x45AB, 0x88}, ++{0x45AC, 0x91}, ++{0x45AD, 0x90}, ++{0x45AE, 0x90}, ++{0x45AF, 0x91}, ++{0x45B0, 0x9F}, ++{0x45B1, 0x9F}, ++{0x45B2, 0x9E}, ++{0x45B3, 0x9F}, ++{0x45B4, 0x9F}, ++{0x45B5, 0xA8}, ++{0x45B6, 0xA6}, ++{0x45B7, 0xA7}, ++{0x45B8, 0x8D}, ++{0x45B9, 0x95}, ++{0x45BA, 0x90}, ++{0x45BB, 0x8A}, ++{0x45BC, 0x89}, ++{0x45BD, 0x8D}, ++{0x45BE, 0x88}, ++{0x45BF, 0x86}, ++{0x45C0, 0x84}, ++{0x45C1, 0x86}, ++{0x45C2, 0x85}, ++{0x45C3, 0x82}, ++{0x45C4, 0x84}, ++{0x45C5, 0x85}, ++{0x45C6, 0x85}, ++{0x45C7, 0x83}, ++{0x45C8, 0x86}, ++{0x45C9, 0x86}, ++{0x45CA, 0x86}, ++{0x45CB, 0x85}, ++{0x45CC, 0x8E}, ++{0x45CD, 0x8D}, ++{0x45CE, 0x8D}, ++{0x45CF, 0x8C}, ++{0x45D0, 0x99}, ++{0x45D1, 0x98}, ++{0x45D2, 0x98}, ++{0x45D3, 0x98}, ++{0x45D4, 0xA6}, ++{0x45D5, 0xA9}, ++{0x45D6, 0xA7}, ++{0x45D7, 0xAC}, ++{0x7000, 0xAB}, ++{0x7001, 0xBA}, ++{0x7002, 0x40}, ++{0x7003, 0x02}, ++{0x7004, 0x00}, ++{0x7005, 0x00}, ++{0x7006, 0x00}, ++{0x7007, 0x00}, ++{0x7008, 0x00}, ++{0x7009, 0x00}, ++{0x700A, 0x00}, ++{0x700B, 0x00}, ++{0x700C, 0x00}, ++{0x700D, 0x00}, ++{0x700E, 0x00}, ++{0x700F, 0x00}, ++{0x7010, 0x55}, ++{0x7011, 0x88}, ++{0x7012, 0x40}, ++{0x7013, 0x01}, ++{0x7014, 0x72}, ++{0x7015, 0xF1}, ++{0x7016, 0x02}, ++{0x7017, 0xF8}, ++{0x7018, 0x00}, ++{0x7019, 0x00}, ++{0x701A, 0x00}, ++{0x701B, 0x00}, ++{0x701C, 0x00}, ++{0x701D, 0x00}, ++{0x701E, 0x00}, ++{0x701F, 0x00}, ++{0x7020, 0x00}, ++{0x7021, 0x00}, ++{0x7022, 0x00}, ++{0x7023, 0x00}, ++{0x7024, 0x00}, ++{0x7025, 0x00}, ++{0x7026, 0x00}, ++{0x7027, 0x00}, ++{0x7028, 0x00}, ++{0x7029, 0x00}, ++{0x702A, 0x00}, ++{0x702B, 0x00}, ++{0x702C, 0x00}, ++{0x702D, 0x00}, ++{0x702E, 0x00}, ++{0x702F, 0x00}, ++{0x7030, 0x00}, ++{0x7031, 0x00}, ++{0x7032, 0x00}, ++{0x7033, 0x00}, ++{0x7034, 0x00}, ++{0x7035, 0x00}, ++{0x7036, 0x00}, ++{0x7037, 0x00}, ++{0x7038, 0x00}, ++{0x7039, 0x00}, ++{0x703A, 0x00}, ++{0x703B, 0x00}, ++{0x703C, 0x00}, ++{0x703D, 0x00}, ++{0x703E, 0x00}, ++{0x703F, 0x00}, ++{0x7040, 0x00}, ++{0x7041, 0x00}, ++{0x7042, 0x00}, ++{0x7043, 0x00}, ++{0x7044, 0x00}, ++{0x7045, 0x00}, ++{0x7046, 0x00}, ++{0x7047, 0x00}, ++{0x7048, 0x00}, ++{0x7049, 0x00}, ++{0x704A, 0x00}, ++{0x704B, 0x00}, ++{0x704C, 0x00}, ++{0x704D, 0x00}, ++{0x704E, 0x00}, ++{0x704F, 0x00}, ++{0x7050, 0x00}, ++{0x7051, 0x00}, ++{0x7052, 0x00}, ++{0x7053, 0x00}, ++{0x7054, 0x00}, ++{0x7055, 0x00}, ++{0x7056, 0x00}, ++{0x7057, 0x00}, ++{0x7058, 0x00}, ++{0x7059, 0x00}, ++{0x705A, 0x00}, ++{0x705B, 0x00}, ++{0x705C, 0x00}, ++{0x705D, 0x00}, ++{0x705E, 0x00}, ++{0x705F, 0x00}, ++{0x7060, 0x00}, ++{0x7061, 0x00}, ++{0x7062, 0x00}, ++{0x7063, 0x00}, ++{0x7064, 0x00}, ++{0x7065, 0x00}, ++{0x7066, 0x00}, ++{0x7067, 0x00}, ++{0x7068, 0x00}, ++{0x7069, 0x00}, ++{0x706A, 0x00}, ++{0x706B, 0x00}, ++{0x706C, 0x00}, ++{0x706D, 0x00}, ++{0x706E, 0x00}, ++{0x706F, 0x00}, ++{0x7070, 0x00}, ++{0x7071, 0x00}, ++{0x7072, 0x00}, ++{0x7073, 0x00}, ++{0x7074, 0x00}, ++{0x7075, 0x00}, ++{0x7076, 0x00}, ++{0x7077, 0x00}, ++{0x7078, 0x00}, ++{0x7079, 0x00}, ++{0x707A, 0x00}, ++{0x707B, 0x00}, ++{0x707C, 0x00}, ++{0x707D, 0x00}, ++{0x707E, 0x00}, ++{0x707F, 0x00}, ++{0x7080, 0x00}, ++{0x7081, 0x00}, ++{0x7082, 0x00}, ++{0x7083, 0x00}, ++{0x7084, 0x00}, ++{0x7085, 0x00}, ++{0x7086, 0x00}, ++{0x7087, 0x00}, ++{0x7088, 0x00}, ++{0x7089, 0x00}, ++{0x708A, 0x00}, ++{0x708B, 0x00}, ++{0x708C, 0x00}, ++{0x708D, 0x00}, ++{0x708E, 0x00}, ++{0x708F, 0x00}, ++{0x7090, 0x00}, ++{0x7091, 0xF0}, ++{0x7092, 0x02}, ++{0x7093, 0xF8}, ++{0x7094, 0x8D}, ++{0x7095, 0xF6}, ++{0x7096, 0xFA}, ++{0x7097, 0xFF}, ++{0x7098, 0xF0}, ++{0x7099, 0xB5}, ++{0x709A, 0x04}, ++{0x709B, 0x46}, ++{0x709C, 0x8F}, ++{0x709D, 0xB0}, ++{0x709E, 0x5F}, ++{0x709F, 0x48}, ++{0x70A0, 0x0C}, ++{0x70A1, 0x90}, ++{0x70A2, 0x5F}, ++{0x70A3, 0x48}, ++{0x70A4, 0x06}, ++{0x70A5, 0x90}, ++{0x70A6, 0x20}, ++{0x70A7, 0x46}, ++{0x70A8, 0x34}, ++{0x70A9, 0x30}, ++{0x70AA, 0x0B}, ++{0x70AB, 0x90}, ++{0x70AC, 0x5B}, ++{0x70AD, 0x48}, ++{0x70AE, 0x5A}, ++{0x70AF, 0x49}, ++{0x70B0, 0x26}, ++{0x70B1, 0x46}, ++{0x70B2, 0x66}, ++{0x70B3, 0x30}, ++{0x70B4, 0x3A}, ++{0x70B5, 0x31}, ++{0x70B6, 0x3C}, ++{0x70B7, 0x36}, ++{0x70B8, 0x05}, ++{0x70B9, 0x90}, ++{0x70BA, 0x0A}, ++{0x70BB, 0x30}, ++{0x70BC, 0x04}, ++{0x70BD, 0x90}, ++{0x70BE, 0x59}, ++{0x70BF, 0x48}, ++{0x70C0, 0x55}, ++{0x70C1, 0x4A}, ++{0x70C2, 0x40}, ++{0x70C3, 0x6E}, ++{0x70C4, 0xC0}, ++{0x70C5, 0x07}, ++{0x70C6, 0x7D}, ++{0x70C7, 0xD1}, ++{0x70C8, 0x17}, ++{0x70C9, 0x88}, ++{0x70CA, 0x0A}, ++{0x70CB, 0x5E}, ++{0x70CC, 0x0D}, ++{0x70CD, 0x92}, ++{0x70CE, 0x53}, ++{0x70CF, 0x49}, ++{0x70D0, 0x55}, ++{0x70D1, 0x48}, ++{0x70D2, 0x94}, ++{0x70D3, 0x31}, ++{0x70D4, 0x89}, ++{0x70D5, 0x6B}, ++{0x70D6, 0x80}, ++{0x70D7, 0x68}, ++{0x70D8, 0x09}, ++{0x70D9, 0x02}, ++{0x70DA, 0x00}, ++{0x70DB, 0x03}, ++{0x70DC, 0x09}, ++{0x70DD, 0x0E}, ++{0x70DE, 0x00}, ++{0x70DF, 0x0B}, ++{0x70E0, 0x49}, ++{0x70E1, 0x1C}, ++{0x70E2, 0x48}, ++{0x70E3, 0x43}, ++{0x70E4, 0x4D}, ++{0x70E5, 0x49}, ++{0x70E6, 0x6C}, ++{0x70E7, 0x39}, ++{0x70E8, 0x8A}, ++{0x70E9, 0x6A}, ++{0x70EA, 0x07}, ++{0x70EB, 0x92}, ++{0x70EC, 0xCA}, ++{0x70ED, 0x6A}, ++{0x70EE, 0x00}, ++{0x70EF, 0x21}, ++{0x70F0, 0xC9}, ++{0x70F1, 0x43}, ++{0x70F2, 0x03}, ++{0x70F3, 0x92}, ++{0x70F4, 0x00}, ++{0x70F5, 0x22}, ++{0x70F6, 0x00}, ++{0x70F7, 0x91}, ++{0x70F8, 0x01}, ++{0x70F9, 0x92}, ++{0x70FA, 0x39}, ++{0x70FB, 0x46}, ++{0x70FC, 0x8F}, ++{0x70FD, 0xF6}, ++{0x70FE, 0xCE}, ++{0x70FF, 0xFB}, ++{0x7100, 0x01}, ++{0x7101, 0x22}, ++{0x7102, 0x00}, ++{0x7103, 0x23}, ++{0x7104, 0x8C}, ++{0x7105, 0xF6}, ++{0x7106, 0x02}, ++{0x7107, 0xFA}, ++{0x7108, 0x00}, ++{0x7109, 0x21}, ++{0x710A, 0x05}, ++{0x710B, 0x46}, ++{0x710C, 0x01}, ++{0x710D, 0x91}, ++{0x710E, 0x00}, ++{0x710F, 0x90}, ++{0x7110, 0x39}, ++{0x7111, 0x46}, ++{0x7112, 0x07}, ++{0x7113, 0x98}, ++{0x7114, 0x8F}, ++{0x7115, 0xF6}, ++{0x7116, 0xC2}, ++{0x7117, 0xFB}, ++{0x7118, 0x0D}, ++{0x7119, 0x9A}, ++{0x711A, 0xD3}, ++{0x711B, 0x17}, ++{0x711C, 0x80}, ++{0x711D, 0x18}, ++{0x711E, 0x59}, ++{0x711F, 0x41}, ++{0x7120, 0x01}, ++{0x7121, 0x22}, ++{0x7122, 0x00}, ++{0x7123, 0x23}, ++{0x7124, 0x8C}, ++{0x7125, 0xF6}, ++{0x7126, 0xCD}, ++{0x7127, 0xF9}, ++{0x7128, 0x07}, ++{0x7129, 0x90}, ++{0x712A, 0x00}, ++{0x712B, 0x20}, ++{0x712C, 0x01}, ++{0x712D, 0x90}, ++{0x712E, 0x00}, ++{0x712F, 0x95}, ++{0x7130, 0x39}, ++{0x7131, 0x46}, ++{0x7132, 0x03}, ++{0x7133, 0x98}, ++{0x7134, 0x8F}, ++{0x7135, 0xF6}, ++{0x7136, 0xB2}, ++{0x7137, 0xFB}, ++{0x7138, 0x01}, ++{0x7139, 0x22}, ++{0x713A, 0x00}, ++{0x713B, 0x23}, ++{0x713C, 0x8C}, ++{0x713D, 0xF6}, ++{0x713E, 0xE6}, ++{0x713F, 0xF9}, ++{0x7140, 0x02}, ++{0x7141, 0x46}, ++{0x7142, 0x07}, ++{0x7143, 0x98}, ++{0x7144, 0x00}, ++{0x7145, 0x23}, ++{0x7146, 0x81}, ++{0x7147, 0x0B}, ++{0x7148, 0x80}, ++{0x7149, 0x04}, ++{0x714A, 0x7A}, ++{0x714B, 0xF6}, ++{0x714C, 0x54}, ++{0x714D, 0xF8}, ++{0x714E, 0x37}, ++{0x714F, 0x4A}, ++{0x7150, 0x00}, ++{0x7151, 0x23}, ++{0x7152, 0x00}, ++{0x7153, 0x92}, ++{0x7154, 0x01}, ++{0x7155, 0x93}, ++{0x7156, 0x01}, ++{0x7157, 0x22}, ++{0x7158, 0x8C}, ++{0x7159, 0xF6}, ++{0x715A, 0xD8}, ++{0x715B, 0xF9}, ++{0x715C, 0x05}, ++{0x715D, 0x46}, ++{0x715E, 0x60}, ++{0x715F, 0x68}, ++{0x7160, 0x00}, ++{0x7161, 0x23}, ++{0x7162, 0x01}, ++{0x7163, 0x0C}, ++{0x7164, 0x00}, ++{0x7165, 0x04}, ++{0x7166, 0xE2}, ++{0x7167, 0x68}, ++{0x7168, 0x7A}, ++{0x7169, 0xF6}, ++{0x716A, 0x45}, ++{0x716B, 0xF8}, ++{0x716C, 0x00}, ++{0x716D, 0x22}, ++{0x716E, 0xD2}, ++{0x716F, 0x43}, ++{0x7170, 0x00}, ++{0x7171, 0x23}, ++{0x7172, 0x00}, ++{0x7173, 0x92}, ++{0x7174, 0x01}, ++{0x7175, 0x93}, ++{0x7176, 0x1A}, ++{0x7177, 0x46}, ++{0x7178, 0x8C}, ++{0x7179, 0xF6}, ++{0x717A, 0xC8}, ++{0x717B, 0xF9}, ++{0x717C, 0x29}, ++{0x717D, 0x46}, ++{0x717E, 0x8F}, ++{0x717F, 0xF6}, ++{0x7180, 0x8D}, ++{0x7181, 0xFB}, ++{0x7182, 0x8A}, ++{0x7183, 0x03}, ++{0x7184, 0x80}, ++{0x7185, 0x0C}, ++{0x7186, 0x10}, ++{0x7187, 0x43}, ++{0x7188, 0x00}, ++{0x7189, 0x22}, ++{0x718A, 0xD2}, ++{0x718B, 0x43}, ++{0x718C, 0x00}, ++{0x718D, 0x23}, ++{0x718E, 0x00}, ++{0x718F, 0x92}, ++{0x7190, 0x89}, ++{0x7191, 0x0C}, ++{0x7192, 0x01}, ++{0x7193, 0x93}, ++{0x7194, 0x1A}, ++{0x7195, 0x46}, ++{0x7196, 0x8C}, ++{0x7197, 0xF6}, ++{0x7198, 0xB9}, ++{0x7199, 0xF9}, ++{0x719A, 0x00}, ++{0x719B, 0x24}, ++{0x719C, 0x03}, ++{0x719D, 0x90}, ++{0x719E, 0x0C}, ++{0x719F, 0x98}, ++{0x71A0, 0x61}, ++{0x71A1, 0x00}, ++{0x71A2, 0x45}, ++{0x71A3, 0x5A}, ++{0x71A4, 0x06}, ++{0x71A5, 0x98}, ++{0x71A6, 0x22}, ++{0x71A7, 0x4A}, ++{0x71A8, 0x40}, ++{0x71A9, 0x5A}, ++{0x71AA, 0x00}, ++{0x71AB, 0x21}, ++{0x71AC, 0x8C}, ++{0x71AD, 0xF6}, ++{0x71AE, 0xBE}, ++{0x71AF, 0xF9}, ++{0x71B0, 0x07}, ++{0x71B1, 0x46}, ++{0x71B2, 0x28}, ++{0x71B3, 0x46}, ++{0x71B4, 0x03}, ++{0x71B5, 0x99}, ++{0x71B6, 0x8F}, ++{0x71B7, 0xF6}, ++{0x71B8, 0x71}, ++{0x71B9, 0xFB}, ++{0x71BA, 0x3A}, ++{0x71BB, 0x46}, ++{0x71BC, 0x00}, ++{0x71BD, 0x23}, ++{0x71BE, 0x79}, ++{0x71BF, 0xF6}, ++{0x71C0, 0xCA}, ++{0x71C1, 0xFF}, ++{0x71C2, 0x00}, ++{0x71C3, 0xE0}, ++{0x71C4, 0x0F}, ++{0x71C5, 0xE0}, ++{0x71C6, 0x8A}, ++{0x71C7, 0x02}, ++{0x71C8, 0x80}, ++{0x71C9, 0x0D}, ++{0x71CA, 0x10}, ++{0x71CB, 0x43}, ++{0x71CC, 0x19}, ++{0x71CD, 0x4A}, ++{0x71CE, 0x00}, ++{0x71CF, 0x23}, ++{0x71D0, 0x00}, ++{0x71D1, 0x92}, ++{0x71D2, 0x89}, ++{0x71D3, 0x0D}, ++{0x71D4, 0x01}, ++{0x71D5, 0x93}, ++{0x71D6, 0x40}, ++{0x71D7, 0x22}, ++{0x71D8, 0x8C}, ++{0x71D9, 0xF6}, ++{0x71DA, 0x98}, ++{0x71DB, 0xF9}, ++{0x71DC, 0xA1}, ++{0x71DD, 0x00}, ++{0x71DE, 0x64}, ++{0x71DF, 0x1C}, ++{0x71E0, 0x70}, ++{0x71E1, 0x50}, ++{0x71E2, 0x04}, ++{0x71E3, 0x2C}, ++{0x71E4, 0xDB}, ++{0x71E5, 0xD3}, ++{0x71E6, 0x14}, ++{0x71E7, 0x4D}, ++{0x71E8, 0x00}, ++{0x71E9, 0x24}, ++{0x71EA, 0x0B}, ++{0x71EB, 0x98}, ++{0x71EC, 0x67}, ++{0x71ED, 0x00}, ++{0x71EE, 0xC0}, ++{0x71EF, 0x5B}, ++{0x71F0, 0x2A}, ++{0x71F1, 0x46}, ++{0x71F2, 0x40}, ++{0x71F3, 0x21}, ++{0x71F4, 0x8C}, ++{0x71F5, 0xF6}, ++{0x71F6, 0x9A}, ++{0x71F7, 0xF9}, ++{0x71F8, 0x05}, ++{0x71F9, 0x99}, ++{0x71FA, 0x0E}, ++{0x71FB, 0x4A}, ++{0x71FC, 0xC8}, ++{0x71FD, 0x53}, ++{0x71FE, 0xA7}, ++{0x71FF, 0x00}, ++{0x7200, 0xF0}, ++{0x7201, 0x59}, ++{0x7202, 0x40}, ++{0x7203, 0x21}, ++{0x7204, 0x8C}, ++{0x7205, 0xF6}, ++{0x7206, 0x7B}, ++{0x7207, 0xF9}, ++{0x7208, 0x04}, ++{0x7209, 0x99}, ++{0x720A, 0x64}, ++{0x720B, 0x1C}, ++{0x720C, 0xC8}, ++{0x720D, 0x51}, ++{0x720E, 0x04}, ++{0x720F, 0x2C}, ++{0x7210, 0xEB}, ++{0x7211, 0xD3}, ++{0x7212, 0x0F}, ++{0x7213, 0xB0}, ++{0x7214, 0xF0}, ++{0x7215, 0xBD}, ++{0x7216, 0x00}, ++{0x7217, 0x00}, ++{0x7218, 0x76}, ++{0x7219, 0x69}, ++{0x721A, 0x18}, ++{0x721B, 0x00}, ++{0x721C, 0xEC}, ++{0x721D, 0x58}, ++{0x721E, 0x18}, ++{0x721F, 0x00}, ++{0x7220, 0x38}, ++{0x7221, 0x36}, ++{0x7222, 0x18}, ++{0x7223, 0x00}, ++{0x7224, 0x00}, ++{0x7225, 0x35}, ++{0x7226, 0x18}, ++{0x7227, 0x00}, ++{0x7228, 0x00}, ++{0x7229, 0x20}, ++{0x722A, 0x18}, ++{0x722B, 0x00}, ++{0x722C, 0xFF}, ++{0x722D, 0xFF}, ++{0x722E, 0xFF}, ++{0x722F, 0x3F}, ++{0x7230, 0xFF}, ++{0x7231, 0x07}, ++{0x7232, 0x00}, ++{0x7233, 0x00}, ++{0x7234, 0xFF}, ++{0x7235, 0xFF}, ++{0x7236, 0x07}, ++{0x7237, 0x00}, ++{0x7238, 0xFF}, ++{0x7239, 0x1F}, ++{0x723A, 0x00}, ++{0x723B, 0x00}, ++{0x723C, 0x01}, ++{0x723D, 0xF6}, ++{0x723E, 0x45}, ++{0x723F, 0x12}, ++{0x3450, 0x00}, /* use continuous clock */ ++//{0x3448, 0x2f}, // RAW20 DT ++//{0x3449, 0x2c}, // RAW12 DT ++{0x0000, 0x00}, ++}; ++ +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0520-media-i2c-soc_camera-add-dummy-lvds-sensor.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0520-media-i2c-soc_camera-add-dummy-lvds-sensor.patch new file mode 100644 index 00000000..84a7e44e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0520-media-i2c-soc_camera-add-dummy-lvds-sensor.patch @@ -0,0 +1,620 @@ +From 0368ffc88e6aec7655d9b63c7ddc50c57714dd58 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Sat, 30 May 2020 00:48:18 +0300 +Subject: [PATCH] media: i2c: soc_camera: add dummy lvds sensor + +This adds sensor that is not detectable behind serializer + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/dummy.c | 539 +++++++++++++++++++++++++++++++++ + drivers/media/i2c/soc_camera/max9286.h | 3 + + drivers/media/i2c/soc_camera/ov106xx.c | 11 + + 3 files changed, 553 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/dummy.c + +diff --git a/drivers/media/i2c/soc_camera/dummy.c b/drivers/media/i2c/soc_camera/dummy.c +new file mode 100644 +index 0000000..346b5dd +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/dummy.c +@@ -0,0 +1,539 @@ ++/* ++ * Dummy sensor camera driver ++ * ++ * Copyright (C) 2019-2020 Cogent Embedded, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++struct dummy_priv { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct media_pad pad; ++ struct v4l2_rect rect; ++ u8 id[6]; ++ int max_width; ++ int max_height; ++ const char * media_bus_format; ++ int mbus_format; ++ int dummy; ++ /* serializers */ ++ int ti9x4_addr; ++ int ti9x3_addr; ++ int port; ++}; ++ ++static int width = 1920; ++module_param(width, int, 0644); ++MODULE_PARM_DESC(width, " width (default: 1920)"); ++ ++static int height = 1080; ++module_param(height, int, 0644); ++MODULE_PARM_DESC(height, " height (default: 1080)"); ++ ++static char *fmt = "yuyv"; ++module_param(fmt, charp, 0644); ++MODULE_PARM_DESC(fmt, " MEDIA_BUS_FORMAT (default: YUYV)"); ++ ++static int dummy = 0; ++module_param(dummy, int, 0644); ++MODULE_PARM_DESC(dummy, " dummy force (0 - dummy imager disabled)"); ++ ++static inline struct dummy_priv *to_dummy(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct dummy_priv, sd); ++} ++ ++static inline struct v4l2_subdev *dummy_to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct dummy_priv, hdl)->sd; ++} ++ ++static int dummy_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ return 0; ++} ++ ++static int dummy_get_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (format->pad) ++ return -EINVAL; ++ ++ mf->width = priv->rect.width; ++ mf->height = priv->rect.height; ++ mf->code = priv->mbus_format; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++static int dummy_set_fmt(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *mf = &format->format; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ mf->code = priv->mbus_format; ++ mf->colorspace = V4L2_COLORSPACE_SMPTE170M; ++ mf->field = V4L2_FIELD_NONE; ++ ++ if (format->which == V4L2_SUBDEV_FORMAT_TRY) ++ cfg->try_fmt = *mf; ++ ++ return 0; ++} ++ ++static int dummy_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (code->pad || code->index > 0) ++ return -EINVAL; ++ ++ code->code = priv->mbus_format; ++ ++ return 0; ++} ++ ++static int dummy_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ memcpy(edid->edid, priv->id, 6); ++ ++ edid->edid[6] = 0xff; ++ edid->edid[7] = client->addr; ++ edid->edid[8] = 'D' >> 8; ++ edid->edid[9] = 'Y' & 0xff; ++ ++ return 0; ++} ++ ++static int dummy_set_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct v4l2_rect *rect = &sel->r; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE || ++ sel->target != V4L2_SEL_TGT_CROP) ++ return -EINVAL; ++ ++ rect->left = ALIGN(rect->left, 2); ++ rect->top = ALIGN(rect->top, 2); ++ rect->width = ALIGN(rect->width, 2); ++ rect->height = ALIGN(rect->height, 2); ++ ++ if ((rect->left + rect->width > priv->max_width) || ++ (rect->top + rect->height > priv->max_height)) ++ *rect = priv->rect; ++ ++ priv->rect.left = rect->left; ++ priv->rect.top = rect->top; ++ priv->rect.width = rect->width; ++ priv->rect.height = rect->height; ++ ++ return 0; ++} ++ ++static int dummy_get_selection(struct v4l2_subdev *sd, ++ struct v4l2_subdev_pad_config *cfg, ++ struct v4l2_subdev_selection *sel) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ if (sel->which != V4L2_SUBDEV_FORMAT_ACTIVE) ++ return -EINVAL; ++ ++ switch (sel->target) { ++ case V4L2_SEL_TGT_CROP_BOUNDS: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP_DEFAULT: ++ sel->r.left = 0; ++ sel->r.top = 0; ++ sel->r.width = priv->max_width; ++ sel->r.height = priv->max_height; ++ return 0; ++ case V4L2_SEL_TGT_CROP: ++ sel->r = priv->rect; ++ return 0; ++ default: ++ return -EINVAL; ++ } ++} ++ ++static int dummy_g_mbus_config(struct v4l2_subdev *sd, ++ struct v4l2_mbus_config *cfg) ++{ ++ cfg->flags = V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_CHANNEL_0 | ++ V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; ++ cfg->type = V4L2_MBUS_CSI2; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++static int dummy_g_register(struct v4l2_subdev *sd, ++ struct v4l2_dbg_register *reg) ++{ ++ reg->val = 0; ++ reg->size = sizeof(u16); ++ ++ return 0; ++} ++ ++static int dummy_s_register(struct v4l2_subdev *sd, ++ const struct v4l2_dbg_register *reg) ++{ ++ return 0; ++} ++#endif ++ ++static struct v4l2_subdev_core_ops dummy_core_ops = { ++#ifdef CONFIG_VIDEO_ADV_DEBUG ++ .g_register = dummy_g_register, ++ .s_register = dummy_s_register, ++#endif ++}; ++ ++static int dummy_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ switch (ctrl->id) { ++ case V4L2_CID_BRIGHTNESS: ++ case V4L2_CID_CONTRAST: ++ case V4L2_CID_SATURATION: ++ case V4L2_CID_HUE: ++ case V4L2_CID_GAMMA: ++ case V4L2_CID_SHARPNESS: ++ case V4L2_CID_AUTOGAIN: ++ case V4L2_CID_GAIN: ++ case V4L2_CID_ANALOGUE_GAIN: ++ case V4L2_CID_EXPOSURE: ++ case V4L2_CID_HFLIP: ++ case V4L2_CID_VFLIP: ++ case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: ++ break; ++ } ++ ++ return 0; ++} ++ ++static const struct v4l2_ctrl_ops dummy_ctrl_ops = { ++ .s_ctrl = dummy_s_ctrl, ++}; ++ ++static struct v4l2_subdev_video_ops dummy_video_ops = { ++ .s_stream = dummy_s_stream, ++ .g_mbus_config = dummy_g_mbus_config, ++}; ++ ++static const struct v4l2_subdev_pad_ops dummy_subdev_pad_ops = { ++ .get_edid = dummy_get_edid, ++ .enum_mbus_code = dummy_enum_mbus_code, ++ .get_selection = dummy_get_selection, ++ .set_selection = dummy_set_selection, ++ .get_fmt = dummy_get_fmt, ++ .set_fmt = dummy_set_fmt, ++}; ++ ++static struct v4l2_subdev_ops dummy_subdev_ops = { ++ .core = &dummy_core_ops, ++ .video = &dummy_video_ops, ++ .pad = &dummy_subdev_pad_ops, ++}; ++ ++static void dummy_otp_id_read(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = to_dummy(client); ++ ++ /* dummy camera id */ ++ priv->id[0] = 'd'; ++ priv->id[1] = 'u'; ++ priv->id[2] = 'm'; ++ priv->id[3] = 'm'; ++ priv->id[4] = 'y'; ++ priv->id[5] = '.'; ++} ++ ++static ssize_t dummy_otp_id_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(to_i2c_client(dev)); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct dummy_priv *priv = to_dummy(client); ++ ++ dummy_otp_id_read(client); ++ ++ return snprintf(buf, 32, "%02x:%02x:%02x:%02x:%02x:%02x\n", ++ priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++} ++ ++static DEVICE_ATTR(otp_id_dummy, S_IRUGO, dummy_otp_id_show, NULL); ++ ++static int dummy_initialize(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = to_dummy(client); ++ u8 pid = 0xff; ++ int tmp_addr; ++ ++ tmp_addr = client->addr; ++ do { ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x3_addr; ++ /* check if UB953 ID */ ++ reg8_read(client, 0xf1, &pid); ++ if (pid == 'U') ++ break; ++ /* check if UB913 ID */ ++ reg8_read(client, 0x00, &pid); ++ if (pid == (TI913_ID << 1)) ++ break; ++ ++ dev_dbg(&client->dev, "Product ID error %x\n", pid); ++ client->addr = tmp_addr; ++ return -ENODEV; ++ } ++ } while(0); ++ client->addr = tmp_addr; ++ ++ if (strcmp(priv->media_bus_format, "yuyv") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_YUYV8_2X8; ++ else if (strcmp(priv->media_bus_format, "uyvy") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_UYVY8_2X8; ++ else if (strcmp(priv->media_bus_format, "grey") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_Y8_1X8; ++ else if (strcmp(priv->media_bus_format, "rggb8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB8_1X8; ++ else if (strcmp(priv->media_bus_format, "bggr8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR8_1X8; ++ else if (strcmp(priv->media_bus_format, "grbg8") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG8_1X8; ++ else if (strcmp(priv->media_bus_format, "rggb12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB12_1X12; ++ else if (strcmp(priv->media_bus_format, "bggr12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR12_1X12; ++ else if (strcmp(priv->media_bus_format, "grbg12") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG12_1X12; ++ else if (strcmp(priv->media_bus_format, "rggb14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB14_1X14; ++ else if (strcmp(priv->media_bus_format, "bggr14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR14_1X14; ++ else if (strcmp(priv->media_bus_format, "grbg14") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG14_1X14; ++ else if (strcmp(priv->media_bus_format, "rggb16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SRGGB16_1X16; ++ else if (strcmp(priv->media_bus_format, "bggr16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SBGGR16_1X16; ++ else if (strcmp(priv->media_bus_format, "grbg16") == 0) ++ priv->mbus_format = MEDIA_BUS_FMT_SGRBG16_1X16; ++ else { ++ v4l_err(client, "failed to parse mbus format (%s)\n", priv->media_bus_format); ++ return -EINVAL; ++ } ++ ++ /* Read OTP IDs */ ++ dummy_otp_id_read(client); ++ ++ dev_info(&client->dev, "Dummy camera PID %x, res %dx%d, fmt %s, OTP_ID %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pid, priv->max_width, priv->max_height, priv->media_bus_format, priv->id[0], priv->id[1], priv->id[2], priv->id[3], priv->id[4], priv->id[5]); ++ ++ return 0; ++} ++ ++static int dummy_parse_dt(struct device_node *np, struct dummy_priv *priv) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&priv->sd); ++ int i; ++ struct device_node *endpoint = NULL, *rendpoint = NULL; ++ int tmp_addr = 0; ++ ++ for (i = 0; ; i++) { ++ endpoint = of_graph_get_next_endpoint(np, endpoint); ++ if (!endpoint) ++ break; ++ ++ of_property_read_u32(endpoint, "dummy", &priv->dummy); ++ ++ if (of_property_read_u32(np, "dummy,width", &priv->max_width)) ++ priv->max_width = width; ++ if (of_property_read_u32(np, "dummy,height", &priv->max_height)) ++ priv->max_height = height; ++ if (of_property_read_string(np, "dummy,fmt", &priv->media_bus_format)) ++ priv->media_bus_format = fmt; ++ ++ rendpoint = of_parse_phandle(endpoint, "remote-endpoint", 0); ++ if (!rendpoint) ++ continue; ++ ++ if (!of_property_read_u32(rendpoint, "ti9x3-addr", &priv->ti9x3_addr) && ++ !of_property_match_string(rendpoint->parent->parent, "compatible", "ti,ti9x4") && ++ !of_property_read_u32(rendpoint->parent->parent, "reg", &priv->ti9x4_addr) && ++ !kstrtouint(strrchr(rendpoint->full_name, '@') + 1, 0, &priv->port)) ++ break; ++ } ++ ++ of_node_put(endpoint); ++ ++ if (!priv->ti9x4_addr) { ++ dev_dbg(&client->dev, "deserializer does not present\n"); ++ return -EINVAL; ++ } ++ ++ /* setup I2C translator address */ ++ tmp_addr = client->addr; ++ if (priv->ti9x4_addr) { ++ client->addr = priv->ti9x4_addr; /* Deserializer I2C address */ ++ ++ reg8_write(client, 0x4c, (priv->port << 4) | (1 << priv->port)); /* Select RX port number */ ++ usleep_range(2000, 2500); /* wait 2ms */ ++ reg8_write(client, 0x65, tmp_addr << 1); /* Sensor translated I2C address */ ++ } ++ client->addr = tmp_addr; ++ ++ /* module params override dts */ ++ if (strcmp(fmt, "yuyv")) ++ priv->media_bus_format = fmt; ++ if (width != 1920) ++ priv->max_width = width; ++ if (height != 1080) ++ priv->max_height = height; ++ if (dummy) ++ priv->dummy = dummy; ++ ++ if (!priv->dummy) ++ return -ENODEV; ++ ++ return 0; ++} ++ ++static int dummy_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct dummy_priv *priv; ++ int ret; ++ ++ priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_i2c_subdev_init(&priv->sd, client, &dummy_subdev_ops); ++ priv->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ v4l2_ctrl_handler_init(&priv->hdl, 4); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_BRIGHTNESS, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_CONTRAST, 0, 16, 1, 7); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_SATURATION, 0, 7, 1, 2); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_HUE, 0, 23, 1, 12); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_GAMMA, -128, 128, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_SHARPNESS, 0, 10, 1, 3); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_GAIN, 1, 0x7ff, 1, 0x200); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_ANALOGUE_GAIN, 1, 0xe, 1, 0xa); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_EXPOSURE, 1, 0x600, 1, 0x144); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(&priv->hdl, &dummy_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ priv->sd.ctrl_handler = &priv->hdl; ++ ++ ret = priv->hdl.error; ++ if (ret) ++ goto cleanup; ++ ++ v4l2_ctrl_handler_setup(&priv->hdl); ++ ++ priv->pad.flags = MEDIA_PAD_FL_SOURCE; ++ priv->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; ++ ret = media_entity_pads_init(&priv->sd.entity, 1, &priv->pad); ++ if (ret < 0) ++ goto cleanup; ++ ++ ret = dummy_parse_dt(client->dev.of_node, priv); ++ if (ret) ++ goto cleanup; ++ ++ ret = dummy_initialize(client); ++ if (ret < 0) ++ goto cleanup; ++ ++ priv->rect.left = 0; ++ priv->rect.top = 0; ++ priv->rect.width = priv->max_width; ++ priv->rect.height = priv->max_height; ++ ++ ret = v4l2_async_register_subdev(&priv->sd); ++ if (ret) ++ goto cleanup; ++ ++ if (device_create_file(&client->dev, &dev_attr_otp_id_dummy) != 0) { ++ dev_err(&client->dev, "sysfs otp_id entry creation failed\n"); ++ goto cleanup; ++ } ++ ++ return 0; ++ ++cleanup: ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ v4l_err(client, "failed to probe @ 0x%02x (%s)\n", ++ client->addr, client->adapter->name); ++ return ret; ++} ++ ++static int dummy_remove(struct i2c_client *client) ++{ ++ struct dummy_priv *priv = i2c_get_clientdata(client); ++ ++ device_remove_file(&client->dev, &dev_attr_otp_id_dummy); ++ v4l2_async_unregister_subdev(&priv->sd); ++ media_entity_cleanup(&priv->sd.entity); ++ v4l2_ctrl_handler_free(&priv->hdl); ++ v4l2_device_unregister_subdev(&priv->sd); ++ ++ return 0; ++} +diff --git a/drivers/media/i2c/soc_camera/max9286.h b/drivers/media/i2c/soc_camera/max9286.h +index 3fe713f..48233e2 100644 +--- a/drivers/media/i2c/soc_camera/max9286.h ++++ b/drivers/media/i2c/soc_camera/max9286.h +@@ -30,6 +30,9 @@ + #define MAX9290_ID 0x2C + #define BROADCAST 0x6f + ++#define TI913_ID 0x58 ++#define TI953_ID 0x30 ++ + static inline int reg8_read(struct i2c_client *client, u8 reg, u8 *val) + { + int ret, retries; +diff --git a/drivers/media/i2c/soc_camera/ov106xx.c b/drivers/media/i2c/soc_camera/ov106xx.c +index cf97f28..b3d84a6 100644 +--- a/drivers/media/i2c/soc_camera/ov106xx.c ++++ b/drivers/media/i2c/soc_camera/ov106xx.c +@@ -32,6 +32,7 @@ static enum { + ID_ISX016, + ID_ISX019, + ID_OV2311, ++ ID_DUMMY, + } chip_id; + + #include "ov10635.c" +@@ -55,6 +56,7 @@ static enum { + #include "isx019.c" + #include "ov2311.c" + #include "ar0147.c" ++#include "dummy.c" + + static int ov106xx_probe(struct i2c_client *client, + const struct i2c_device_id *did) +@@ -62,6 +64,12 @@ static int ov106xx_probe(struct i2c_client *client, + int ret = -1; + chip_id = -EINVAL; + ++ ret = dummy_probe(client, did); ++ if (!ret) { ++ chip_id = ID_DUMMY; ++ goto out; ++ } ++ + ret = gw5200_probe(client, did); + if (!ret) { + chip_id = ID_GW5200_IMX390; +@@ -258,6 +266,9 @@ static int ov106xx_remove(struct i2c_client *client) + case ID_OV2311: + ov2311_remove(client); + break; ++ case ID_DUMMY: ++ dummy_remove(client); ++ break; + default: + break; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0521-arm64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0521-arm64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch new file mode 100644 index 00000000..b3aef256 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0521-arm64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch @@ -0,0 +1,1014 @@ +From ed70167620fa94494ade3a3192a8517d8a47c55d Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 3 Jun 2020 18:42:39 +0300 +Subject: [PATCH] arm64: dts: renesas: add V3H GMSL2 8ch Videobox + +This adds V3H GMSL2 8ch Videobox + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/Makefile | 1 + + .../boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-8.dts | 979 +++++++++++++++++++++ + 2 files changed, 980 insertions(+) + create mode 100644 arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-8.dts + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index da23cbb..558ea98 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -49,6 +49,7 @@ dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vbm-v3.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-8ch.dtb r8a77980-v3hsk-vb-4ch.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl2-2x2.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl2-4.dtb ++dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl2-8.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-gmsl-8ch.dtb + dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-v3hsk-vb-4ch-hdmi.dtb r8a77980-v3hsk-vb-8ch-hdmi.dtb + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-8.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-8.dts +new file mode 100644 +index 0000000..9bf6cd3 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-8.dts +@@ -0,0 +1,979 @@ ++/* ++ * Device Tree Source for the V3HSK GMSL2 Quad Videobox Mini board on r8a7798 ++ * ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ * ++ * This file is licensed under the terms of the GNU General Public License ++ * version 2. This program is licensed "as is" without any warranty of any ++ * kind, whether express or implied. ++ */ ++ ++#include "r8a77980-v3hsk.dts" ++#include ++/* FDPLink output */ ++//#include "vb-fdplink-output.dtsi" ++#include "camera.dtsi" ++ ++/ { ++ model = "Renesas V3HSK 8ch GMSL2 Videobox board based on r8a77980"; ++ ++ aliases { ++ serial1 = &scif3; ++ ethernet1 = &avb; ++ }; ++ ++ cs2300_ref_clk: cs2300_ref_clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-frequency = <25000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ led0 { ++ label = "board:status"; ++ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ }; ++ }; ++ ++ mpcie_1v8: regulator2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 1v8"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ mpcie_3v3: regulator3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "mPCIe 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ common_3v3: regulator4 { ++ compatible = "regulator-fixed"; ++ regulator-name = "main 3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ }; ++ ++ iio_hwmon: hwmon@1 { ++ compatible = "iio-hwmon"; ++ io-channels = ++ /* current */ ++ <&max2008x 0>, ++ <&max2008x 2>, ++ /* voltage */ ++ <&max2008x 4>, ++ <&max2008x 6>, ++ /* misc voltages */ ++ <&max2008x 8>, ++ <&max2008x 9>; ++ io-channel-names = ++ "camera-0-Iout", ++ "camera-1-Iout", ++ "camera-0-Vout", ++ "camera-1-Vout", ++ "cameras-Vregulator", ++ "cameras-3v3"; ++ }; ++ ++ iio_hwmon2: hwmon@2 { ++ compatible = "iio-hwmon"; ++ io-channels = ++ /* current */ ++ <&max2008x_2 0>, ++ <&max2008x_2 2>, ++ /* voltage */ ++ <&max2008x_2 4>, ++ <&max2008x_2 6>, ++ /* misc voltages */ ++ <&max2008x_2 8>, ++ <&max2008x_2 9>; ++ io-channel-names = ++ "camera-0-Iout", ++ "camera-1-Iout", ++ "camera-0-Vout", ++ "camera-1-Vout", ++ "cameras-Vregulator", ++ "cameras-3v3"; ++ }; ++}; ++ ++&canfd { ++ pinctrl-0 = <&canfd0_pins &canfd1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ channel0 { ++ status = "okay"; ++ }; ++ ++ channel1 { ++ status = "okay"; ++ }; ++}; ++ ++&avb { ++ pinctrl-0 = <&avb_pins>; ++ pinctrl-names = "default"; ++ renesas,no-ether-link; ++ phy-handle = <&avb_phy0>; ++ status = "okay"; ++ phy-int-gpio = <&gpio1 17 GPIO_ACTIVE_LOW>; ++ ++ avb_phy0: eavb-phy@0 { ++ rxc-skew-ps = <1500>; ++ rxdv-skew-ps = <420>; /* default */ ++ rxd0-skew-ps = <420>; /* default */ ++ rxd1-skew-ps = <420>; /* default */ ++ rxd2-skew-ps = <420>; /* default */ ++ rxd3-skew-ps = <420>; /* default */ ++ txc-skew-ps = <900>; /* default */ ++ txen-skew-ps = <420>; /* default */ ++ txd0-skew-ps = <420>; /* default */ ++ txd1-skew-ps = <420>; /* default */ ++ txd2-skew-ps = <420>; /* default */ ++ txd3-skew-ps = <420>; /* default */ ++ reg = <3>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; ++ max-speed = <1000>; ++ }; ++}; ++ ++&csi40 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi40_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <1200>; ++ }; ++ }; ++}; ++ ++&csi41 { ++ status = "okay"; ++ ++ port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ csi41_ep: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ csi-rate = <1200>; ++ }; ++ }; ++}; ++ ++&i2c1 { ++ pinctrl-0 = <&i2c1_pins>; ++ pinctrl-names = "default"; ++ status = "okay"; ++ ++ clock-frequency = <400000>; ++ ++ i2cswitch1: i2c-switch@74 { ++ compatible = "nxp,pca9548"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x74>; ++ reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; ++ ++ /* CCTRL_SDA and CCTRL_SCL */ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ gpio_exp_ch0: gpio_ch0@76 { ++ compatible = "nxp,pca9539"; ++ reg = <0x76>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ cmr_pwr_en { ++ gpio-hog; ++ gpios = <3 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CmrPEn"; ++ }; ++ }; ++ ++ /* CS2300 node @0x4e */ ++ cs2300: clk_multiplier@4e { ++ #clock-cells = <0>; ++ compatible = "cirrus,cs2300-cp"; ++ reg = <0x4e>; ++ clocks = <&cs2300_ref_clk>; ++ clock-names = "clk_in"; ++ ++ assigned-clocks = <&cs2300>; ++ assigned-clock-rates = <25000000>; ++ }; ++ ++ dac_vcam: dac_vcam@60 { ++ compatible = "microchip,mcp4725"; ++ reg = <0x60>; ++ vdd-supply = <&common_3v3>; ++ }; ++ ++ max2008x: vcam_switch@28 { ++ compatible = "maxim,max2008x"; ++ reg = <0x28>; ++ #io-channel-cells = <1>; ++ enable-gpios = <&gpio_exp_ch0 5 GPIO_ACTIVE_HIGH>; ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_cam0: SW0 { ++ reg = <0>; ++ regulator-name = "Camera-0"; ++ }; ++ vdd_cam1: SW1 { ++ reg = <1>; ++ regulator-name = "Camera-1"; ++ }; ++ vdd_cam2: SW2 { ++ reg = <2>; ++ regulator-name = "Camera-2"; ++ }; ++ vdd_cam3: SW3 { ++ reg = <3>; ++ regulator-name = "Camera-3"; ++ }; ++ }; ++ }; ++ ++ max2008x_2: vcam_switch@29 { ++ compatible = "maxim,max2008x"; ++ reg = <0x29>; ++ #io-channel-cells = <1>; ++ /* enable-gpios = <&gpio_exp_ch0 5 GPIO_ACTIVE_HIGH>; */ ++ ++ regulators { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ vdd_cam4: SW0 { ++ reg = <0>; ++ regulator-name = "Camera-4"; ++ }; ++ vdd_cam5: SW1 { ++ reg = <1>; ++ regulator-name = "Camera-5"; ++ }; ++ vdd_cam6: SW2 { ++ reg = <2>; ++ regulator-name = "Camera-6"; ++ }; ++ vdd_cam7: SW3 { ++ reg = <3>; ++ regulator-name = "Camera-7"; ++ }; ++ }; ++ }; ++ }; ++ ++ /* DS0_SDA and DS0_SCL */ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ max96712@29 { ++ compatible = "maxim,max96712"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x29>; ++ clocks = <&cs2300>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_ch0 1 GPIO_ACTIVE_LOW>; ++ ++ maxim,links-mipi-map = <2 2 2 2>; ++ ++ poc0-supply = <&vdd_cam1>; ++ poc1-supply = <&vdd_cam4>; ++ poc2-supply = <&vdd_cam6>; ++ poc3-supply = <&vdd_cam3>; ++ ++ port@0 { ++ max96712_des0ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ max96712_des0ep1: endpoint@1 { ++ ser-addr = <0x0d>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ max96712_des0ep2: endpoint@2 { ++ ser-addr = <0x0e>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ max96712_des0ep3: endpoint@3 { ++ ser-addr = <0x0f>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ ++ port@1 { ++ max96712_des0mipi2: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@60 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in0: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin0ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@61 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0d>; ++ ++ port@0 { ++ camera_in1: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin1ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ camera@62 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x62 0x0e>; ++ ++ port@0 { ++ camera_in2: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin2ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ camera@63 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x63 0x0f>; ++ ++ port@0 { ++ camera_in3: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin3ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des0ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ max96712@29 { ++ compatible = "maxim,max96712"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0x29>; ++ clocks = <&cs2300>; ++ clock-names = "ref_clk"; ++ shutdown-gpios = <&gpio_exp_ch0 2 GPIO_ACTIVE_LOW>; ++ ++ maxim,links-mipi-map = <1 1 1 1>; ++ ++ poc0-supply = <&vdd_cam0>; ++ poc1-supply = <&vdd_cam7>; ++ poc2-supply = <&vdd_cam5>; ++ poc3-supply = <&vdd_cam2>; ++ ++ port@0 { ++ max96712_des1ep0: endpoint@0 { ++ ser-addr = <0x0c>; ++ remote-endpoint = <&camera_in4>; ++ }; ++ max96712_des1ep1: endpoint@1 { ++ ser-addr = <0x0d>; ++ remote-endpoint = <&camera_in5>; ++ }; ++ max96712_des1ep2: endpoint@2 { ++ ser-addr = <0x0e>; ++ remote-endpoint = <&camera_in6>; ++ }; ++ max96712_des1ep3: endpoint@3 { ++ ser-addr = <0x0f>; ++ remote-endpoint = <&camera_in7>; ++ }; ++ }; ++ ++ port@1 { ++ max96712_des1mipi2: endpoint { ++ csi-rate = <1200>; ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ camera@60 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x60 0x0c>; ++ ++ port@0 { ++ camera_in4: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin4ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep0>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ camera@61 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x61 0x0d>; ++ ++ port@0 { ++ camera_in5: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin5ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep1>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <2>; ++ ++ camera@62 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x62 0x0e>; ++ ++ port@0 { ++ camera_in6: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin6ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep2>; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <3>; ++ ++ camera@63 { ++ compatible = COMPATIBLE_CAMERAS; ++ reg = <0x63 0x0f>; ++ ++ port@0 { ++ camera_in7: endpoint { ++ clock-lanes = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&vin7ep0>; ++ }; ++ }; ++ port@1 { ++ camera_max96712_des1ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep3>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ /* Disp_SDA and Disp_SCL */ ++ i2c@5 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <5>; ++ ++ /* fan node - lm96063 */ ++ fan_ctrl: lm96063@4c { ++ compatible = "lm96163"; ++ reg = <0x4c>; ++ }; ++ }; ++ ++ /* ESDA and ESCL */ ++ i2c@7 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <7>; ++ ++ rtc: mcp79411@6f { ++ compatible = "microchip,mcp7941x"; ++ reg = <0x6f>; ++ }; ++ }; ++ }; ++}; ++ ++&gpio0 { ++ fpdl_shdn { ++ gpio-hog; ++ gpios = <1 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "FPDL_SHDN"; ++ }; ++ ++ cam_pwr_en { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIPWR_En"; ++ }; ++ ++ wake_pin_8 { ++ gpio-hog; ++ gpios = <0 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 8"; ++ }; ++}; ++ ++&gpio1 { ++ md_buf_en { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CPLD_If_En"; ++ }; ++}; ++ ++&gpio2 { ++ m2_rst { ++ gpio-hog; ++ gpios = <11 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "M.2 RST#"; ++ }; ++ ++ cctrl_rstn { ++ gpio-hog; ++ gpios = <16 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CCTRL_RSTn"; ++ }; ++ ++ can0_stby { ++ gpio-hog; ++ gpios = <27 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN0STBY"; ++ }; ++ ++ can1_load { ++ gpio-hog; ++ gpios = <29 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1Loff"; ++ }; ++ ++ can1_stby { ++ gpio-hog; ++ gpios = <22 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CAN1STBY"; ++ }; ++ ++ wake_pin_7 { ++ gpio-hog; ++ gpios = <19 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "WAKE INPUT PIN 7"; ++ }; ++ ++ vi1_gpioext_rst { ++ gpio-hog; ++ gpios = <13 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP1_RST"; ++ }; ++}; ++ ++&gpio3 { ++ vi0_gpioext_rst { ++ gpio-hog; ++ gpios = <4 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "VIP0_RST"; ++ }; ++}; ++ ++&pcie_bus_clk { ++ clock-frequency = <100000000>; ++ status = "okay"; ++}; ++ ++&pciec { ++ pcie3v3-supply = <&mpcie_3v3>; ++ pcie1v8-supply = <&mpcie_1v8>; ++ status = "okay"; ++}; ++ ++&pcie_phy { ++ status = "okay"; ++}; ++ ++&pfc { ++ canfd0_pins: canfd0 { ++ groups = "canfd0_data_a"; ++ function = "canfd0"; ++ }; ++ ++ canfd1_pins: canfd1 { ++ groups = "canfd1_data"; ++ function = "canfd1"; ++ }; ++ ++ avb_pins: avb { ++ groups = "avb_mdio", "avb_rgmii"; ++ function = "avb"; ++ }; ++ ++ i2c1_pins: i2c1 { ++ groups = "i2c1"; ++ function = "i2c1"; ++ }; ++ ++ scif3_pins: scif3 { ++ groups = "scif3_data"; ++ function = "scif3"; ++ }; ++}; ++ ++&scif3 { ++ pinctrl-0 = <&scif3_pins>; ++ pinctrl-names = "default"; ++ ++ status = "okay"; ++}; ++ ++&tpu { ++ status = "disabled"; ++}; ++ ++&vin0 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin0ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in0>; ++ }; ++ }; ++ port@1 { ++ csi0ep0: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin0_max96712_des0ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin1 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin1ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in1>; ++ }; ++ }; ++ port@1 { ++ csi0ep1: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin1_max96712_des0ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin2 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin2ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in2>; ++ }; ++ }; ++ port@1 { ++ csi0ep2: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin2_max96712_des0ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin3 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin3ep0: endpoint { ++ csi,select = "csi40"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in3>; ++ }; ++ }; ++ port@1 { ++ csi0ep3: endpoint { ++ remote-endpoint = <&csi40_ep>; ++ }; ++ }; ++ port@2 { ++ vin3_max96712_des0ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des0ep3>; ++ }; ++ }; ++ }; ++}; ++ ++&vin4 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin4ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <0>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in4>; ++ }; ++ }; ++ port@1 { ++ csi1ep0: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin4_max96712_des1ep0: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep0>; ++ }; ++ }; ++ }; ++}; ++ ++&vin5 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin5ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <1>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in5>; ++ }; ++ }; ++ port@1 { ++ csi1ep1: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin5_max96712_des1ep1: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep1>; ++ }; ++ }; ++ }; ++}; ++ ++&vin6 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin6ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <2>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in6>; ++ }; ++ }; ++ port@1 { ++ csi1ep2: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin6_max96712_des1ep2: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep2>; ++ }; ++ }; ++ }; ++}; ++ ++&vin7 { ++ status = "okay"; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ vin7ep0: endpoint { ++ csi,select = "csi41"; ++ virtual,channel = <3>; ++ data-lanes = <1 2 3 4>; ++ remote-endpoint = <&camera_in7>; ++ }; ++ }; ++ port@1 { ++ csi1ep3: endpoint { ++ remote-endpoint = <&csi41_ep>; ++ }; ++ }; ++ port@2 { ++ vin7_max96712_des1ep3: endpoint@1 { ++ remote-endpoint = <&max96712_des1ep3>; ++ }; ++ }; ++ }; ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch new file mode 100644 index 00000000..2272f48f --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch @@ -0,0 +1,106 @@ +From b025c0676549f2a075269e09ca9fc88b62a1c5af Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 3 Jun 2020 18:44:06 +0300 +Subject: [PATCH] arm64: dts: renesas: vb-gmsl2: fix typos + +This fixes varius typos on GMSL2 Videobox ECUs + +Signed-off-by: Vladimir Barinov +--- + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts | 12 ++++++------ + arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts | 8 ++++---- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +index 4d284b1..c56adc0 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dts +@@ -1,7 +1,7 @@ + /* +- * Device Tree Source for the V3HSK Videobox Mini board on r8a7798 ++ * Device Tree Source for the V3HSK GMSL2 Dual Videobox Mini board on r8a7798 + * +- * Copyright (C) 2018 Cogent Embedded, Inc. ++ * Copyright (C) 2020 Cogent Embedded, Inc. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any +@@ -254,7 +254,7 @@ + clock-names = "ref_clk"; + shutdown-gpios = <&gpio_exp_ch0 1 GPIO_ACTIVE_LOW>; + +- maxim,link-mipi-map = <1 1>; ++ maxim,links-mipi-map = <1 1>; + + poc0-supply = <®ulator_poc_0>; + poc1-supply = <®ulator_poc_1>; +@@ -342,7 +342,7 @@ + clock-names = "ref_clk"; + shutdown-gpios = <&gpio_exp_ch0 0 GPIO_ACTIVE_LOW>; + +- maxim,link-mipi-map = <1 1>; ++ maxim,links-mipi-map = <1 1>; + + poc0-supply = <®ulator_poc_2>; + poc1-supply = <®ulator_poc_3>; +@@ -353,7 +353,7 @@ + remote-endpoint = <&camera_in2>; + }; + max9296_des1ep1: endpoint@1 { +- ser-addr = <0x51>; ++ ser-addr = <0x0d>; + remote-endpoint = <&camera_in3>; + }; + }; +@@ -396,7 +396,7 @@ + + camera@61 { + compatible = COMPATIBLE_CAMERAS; +- reg = <0x61 0x0c>; ++ reg = <0x61 0x0d>; + + port@0 { + camera_in3: endpoint { +diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +index ac2d825..919e775 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk-vb-gmsl2-4.dts +@@ -566,7 +566,7 @@ + }; + }; + port@1 { +- csi1ep0: endpoint { ++ csi0ep0: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; +@@ -594,7 +594,7 @@ + }; + }; + port@1 { +- csi1ep1: endpoint { ++ csi0ep1: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; +@@ -622,7 +622,7 @@ + }; + }; + port@1 { +- csi1ep2: endpoint { ++ csi0ep2: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; +@@ -650,7 +650,7 @@ + }; + }; + port@1 { +- csi1ep3: endpoint { ++ csi0ep3: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0523-media-i2c-isx019-do-not-disable-embedded-line.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0523-media-i2c-isx019-do-not-disable-embedded-line.patch new file mode 100644 index 00000000..a2c8870e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0523-media-i2c-isx019-do-not-disable-embedded-line.patch @@ -0,0 +1,32 @@ +From 4c72275148ef3cc02ca8c6dc8a22cb8e67724322 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Wed, 17 Jun 2020 23:13:26 +0300 +Subject: [PATCH] media: i2c: isx019: do not disable embedded line + +Skip disale the embedded line by default. +Disableing of embedded line reduces the frame size by one line, +that is truncated in the end of frame, hence this is useless to disable +emb line + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/isx019.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/isx019.h b/drivers/media/i2c/soc_camera/isx019.h +index c7072a3..c3c36ba 100644 +--- a/drivers/media/i2c/soc_camera/isx019.h ++++ b/drivers/media/i2c/soc_camera/isx019.h +@@ -23,8 +23,8 @@ static const struct isx019_reg isx019_regs_wizard[] = { + #if 0 + /* enable FSIN */ + {ISX019_DELAY, 100}, +-#endif + /* disable embedded data */ + {0x504c, 0x0}, + {0x504e, 0x0}, ++#endif + }; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0524-media-i2c-dummy-fix-DT-parse.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0524-media-i2c-dummy-fix-DT-parse.patch new file mode 100644 index 00000000..f567d5df --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0524-media-i2c-dummy-fix-DT-parse.patch @@ -0,0 +1,28 @@ +From 8e338812615c72dad0fe17ea5a135ffdcc7b25a7 Mon Sep 17 00:00:00 2001 +From: Vladimir Barinov +Date: Tue, 28 Jul 2020 21:12:51 +0300 +Subject: [PATCH] media: i2c: dummy: fix DT parse + +This fixes the parse of dummy field + +Signed-off-by: Vladimir Barinov +--- + drivers/media/i2c/soc_camera/dummy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/i2c/soc_camera/dummy.c b/drivers/media/i2c/soc_camera/dummy.c +index 346b5dd..3be2728 100644 +--- a/drivers/media/i2c/soc_camera/dummy.c ++++ b/drivers/media/i2c/soc_camera/dummy.c +@@ -386,7 +386,7 @@ static int dummy_parse_dt(struct device_node *np, struct dummy_priv *priv) + if (!endpoint) + break; + +- of_property_read_u32(endpoint, "dummy", &priv->dummy); ++ of_property_read_u32(np, "dummy", &priv->dummy); + + if (of_property_read_u32(np, "dummy,width", &priv->max_width)) + priv->max_width = width; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0525-arm64-dts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0525-arm64-dts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch new file mode 100644 index 00000000..1a727e37 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0525-arm64-dts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch @@ -0,0 +1,74 @@ +From 20b0cce7e2407ab766e849851d832006cabf9f2d Mon Sep 17 00:00:00 2001 +From: Valentine Barshak +Date: Wed, 8 Jul 2020 19:21:13 +0300 +Subject: [PATCH] arm64: dts: renesas: Add r8a7796-m3ulcb-2x4g-kf.dts + +This adds Kingfisher board support for M3 v3.0 8GiB (2x4GiB) SK. + +Signed-off-by: Valentine Barshak +--- + arch/arm64/boot/dts/renesas/Makefile | 2 +- + .../boot/dts/renesas/r8a7796-m3ulcb-2x4g-kf.dts | 38 ++++++++++++++++++++++ + 2 files changed, 39 insertions(+), 1 deletion(-) + create mode 100644 arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-2x4g-kf.dts + +diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile +index 5680cde..45c555e 100644 +--- a/arch/arm64/boot/dts/renesas/Makefile ++++ b/arch/arm64/boot/dts/renesas/Makefile +@@ -24,7 +24,7 @@ dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb + # ADAS boards + dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x-view.dtb + dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-view.dtb +-dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb ++dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb r8a7796-m3ulcb-2x4g.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x-view.dtb r8a7795-es1-salvator-x-view.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-view.dtb r8a7795-es1-h3ulcb-view.dtb + dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-had-alfa.dtb r8a7795-h3ulcb-had-beta.dtb r8a7795-es1-h3ulcb-had-alfa.dtb r8a7795-es1-h3ulcb-had-beta.dtb +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-2x4g-kf.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-2x4g-kf.dts +new file mode 100644 +index 0000000..76e0e57 +--- /dev/null ++++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-2x4g-kf.dts +@@ -0,0 +1,38 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Device Tree Source for the M3ULCB Kingfisher board ++ * ++ * Copyright (C) 2020 Renesas Electronics Corp. ++ * Copyright (C) 2020 Cogent Embedded, Inc. ++ */ ++ ++#include "r8a7796-m3ulcb-2x4g.dts" ++#include "ulcb-kf.dtsi" ++ ++/ { ++ model = "Renesas M3ULCB Kingfisher board based on r8a7796 ES3.0+"; ++ compatible = "shimafuji,kingfisher", "renesas,m3ulcb", ++ "renesas,r8a7796"; ++}; ++ ++&du { ++ ports { ++ port@0 { ++ endpoint { ++ remote-endpoint = <&adv7513_in>; ++ }; ++ }; ++ }; ++}; ++ ++&lvds0 { ++ status = "okay"; ++ ++ ports { ++ port@1 { ++ lvds0_out: endpoint { ++ remote-endpoint = <&lvds_in>; ++ }; ++ }; ++ }; ++}; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/enable.cfg b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/enable.cfg new file mode 100644 index 00000000..abd0bd76 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/enable.cfg @@ -0,0 +1,2 @@ +CONFIG_TMPFS=y +CONFIG_REGULATOR=y diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/hyperflash.cfg b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/hyperflash.cfg index df45d5e9..b078e242 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/hyperflash.cfg +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/hyperflash.cfg @@ -1,2 +1 @@ -CONFIG_MTD=y -CONFIG_MTD_RPC_HYPERFLASH=y +CONFIG_MTD_RENESAS_RPC_HYPERFLASH=y diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/qspi.cfg b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/qspi.cfg index 9a1c695e..a88472a8 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/qspi.cfg +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/qspi.cfg @@ -1,3 +1,3 @@ -CONFIG_SPI_RENESAS_RPC=y +CONFIG_MTD_RENESAS_RPC_QSPI=y CONFIG_MTD_BLOCK=y CONFIG_JFFS2_FS=y diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/renesas.scc b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/renesas.scc index 31146743..34855009 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/renesas.scc +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/renesas.scc @@ -291,7 +291,6 @@ patch 0351-arm64-dts-renesas-r8a77980-VB-4ch-and-8ch-Add-PCIE-p.patch patch 0352-gpu-drm-rcar_du-Fix-physical-address-of-the-CMA-back.patch patch 0353-media-soc_camera-rcar_csi2-add-dump-module-param.patch patch 0354-media-rcar_csi2-Disable-data-type-matching.patch -patch 0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch patch 0356-media-platform-vsp1-Extend-DRM-VSP1-interface.patch patch 0357-gpu-drm-rcar-du-rcar_du_vsp-Check-if-gem-buffer-has-.patch patch 0358-media-platform-vsp1-Add-cropping-handling-to-VSP-alp.patch @@ -355,3 +354,105 @@ patch 0416-arm64-dtb-renesas-vb2.1-enable-usb2-channel-3.patch patch 0417-USB-tusb8041-add-simple-driver-to-start-device-over-.patch patch 0418-arm64-dts-renesas-ulcb-vb2-fix-USB30-and-HUB.patch patch 0419-phy-rcar-gen3-usb2-power-on-port-in-host-mode-to.patch +patch 0420-media-i2c-ov2311-fix-otp-id-read.patch +patch 0421-media-i2c-imx390-add-user-defined-size-for-register-.patch +patch 0422-mmc-core-mmc-Try-other-timings-if-the-higher-one-fai.patch +patch 0423-media-i2c-ap0101_ar014x-add-AP0102-chip.patch +patch 0424-arm64-dts-renesas-ulcb-vb-Fix-lvds0-port-routing.patch +patch 0425-arm64-dts-r8a7798-v3hsk-vb-4-8ch-change-i2c-rate-to-.patch +patch 0426-media-i2c-ov106xx-change-order.patch +patch 0427-media-i2c-gw5200-fix-imager-hang.patch +patch 0428-arch64-dts-renesas-r8a77970-Fix-IPMMU-probe-order.patch +patch 0429-arch64-dts-renesas-r8a77980-Fix-IPMMU-probe-order.patch +patch 0430-media-i2c-ar0140-update-driver-to-use-rGPIO-and-dyna.patch +patch 0431-media-i2c-ti9x4-update-remote-gpio-function.patch +patch 0432-media-i2c-soc_camera-add-AR0220.patch +patch 0433-media-i2c-ar0220-add-rev2-rev3.patch +patch 0434-media-i2c-max9286-parse-crossbard-from-cmdline.patch +patch 0435-clk-renesas-r8a7795-cpg-mssr-Add-RPC-clocks.patch +patch 0436-clk-renesas-r8a7796-cpg-mssr-Add-RPC-clocks.patch +patch 0437-clk-renesas-r8a77965-cpg-mssr-Add-RPC-clocks.patch +patch 0438-clk-renesas-rcar-gen3-cpg-Allow-to-set-RPCD2-clock-p.patch +patch 0439-mtd-Consolidate-Renesas-RPC-drivers.patch +patch 0440-arm64-dts-renesas-r8a77970-Update-RPC-device-nodes.patch +patch 0441-arm64-dts-renesas-r8a77980-Update-RPC-device-nodes.patch +patch 0442-arm64-dts-renesas-r8a7795-Add-RPC-device-node.patch +patch 0443-arm64-dts-renesas-r8a7796-Add-RPC-device-node.patch +patch 0444-arm64-dts-renesas-r8a77965-Add-RPC-device-node.patch +patch 0445-arm64-dts-renesas-ulcb-Add-RPC-HyperFlash-device-nod.patch +patch 0446-arm64-dts-renesas-salvator-common-Add-RPC-HyperFlash.patch +patch 0447-media-soc_camera-rcar_vin-Fix-crash-when-the-module-.patch +patch 0448-media-i2c-ar0xxx-append-embedded-data-stats-into-frame.patch +patch 0449-media-i2c-soc_camera-ov495_ov2775-Remove-early_param.patch +patch 0450-arm64-dts-renesas-ulcb-Add-tee-MTD-RPC-HyperFlash-pa.patch +patch 0451-arm64-dts-renesas-salvator-common-Add-tee-MTD-RPC-Hy.patch +patch 0452-arm64-dts-renesas-ulcb-Increase-U-Boot-partition-siz.patch +patch 0453-arm64-dts-renesas-salvator-common-Increase-U-Boot-pa.patch +patch 0454-media-i2c-imx390-fix-refclk.patch +patch 0455-media-i2c-ox01d10-add-imager-support.patch +patch 0456-media-i2c-max9286-fix-resetb-handling.patch +patch 0457-media-i2c-ov10640-fix-dvp-order-and-soft-reset.patch +patch 0458-arm64-dts-renesas-Add-V3x-VideoBox-GMSL-8ch-support.patch +patch 0459-media-i2c-ov10640-support-different-revisions.patch +patch 0460-media-ar0xxx-add-embedded-line-into-frame.patch +patch 0461-v3hsk-Add-separate-dts-for-dummy-camera-1920x1080.patch +patch 0462-media-i2c-ov10640-add-embedded-data-fix-crop.patch +patch 0463-net-can-rcar_can-fix-possible-IRQ-storm-on-high-load.patch +patch 0464-arm64-dts-renesas-ulcb-v2-use-CANFD-instead-CAN.patch +patch 0465-arm64-dts-renesas-add-cn12-support-on-VB2-1.patch +patch 0466-media-i2c-max9286-parse-crossbar-from-dt.patch +patch 0467-media-i2c-isx016-add-fixed-sensor.patch +patch 0468-imx390-Read-1-byte-registers-by-default.patch +patch 0469-rcar_canfd-fix-one-more-interrupt-storm-window.patch +patch 0470-media-i2c-add-fps-setup.patch +patch 0471-media-i2c-ov10640-add-fps-setup.patch +patch 0472-media-i2c-soc_camera-fix-compilation-warnings.patch +patch 0473-media-i2c-ov10640-add-different-imager-addresses.patch +patch 0474-media-i2c-soc_camera-add-V4L2_CID_MIN_BUFFERS_FOR_CA.patch +patch 0475-media-i2c-ar0233-add-fps-setup.patch +patch 0476-media-i2c-imx390-add-fps-setup.patch +patch 0477-media-i2c-ar0231-fix-FSIN-pin-input.patch +patch 0478-media-i2c-ti9x4-fix-framesync.patch +patch 0479-media-soc_camera-rcar_csi2-add-interrupts.patch +patch 0480-media-i2c-soc_camera-ov10640-fix-emb-lines-number.patch +patch 0481-r8a779-78-sysc-don-t-poweroff-Cortex-R7-core.patch +patch 0482-media-i2c-max9286-ti9x4-power-down-POCs-on-reboot.patch +patch 0484-media-platform-soc_camera-disable-mutex-locking-for-.patch +patch 0485-media-i2c-ov10640-compensate-disabled-mutex.patch +patch 0487-i2c-busses-i2c-rcar-block-pm_runtime.patch +patch 0488-arm64-dts-renesas-block-i2c-pm-runtime.patch +patch 0490-media-i2c-ti9x4-increase-i2c-freq-on-master-bus.patch +patch 0491-media-i2c-soc_camera-switch-to-u64-adv_debug-access.patch +patch 0492-media-i2c-move-gmsl-fpdlink-drivers-to-separate-fold.patch +patch 0493-media-i2c-add-max96712-and-max9296.patch +patch 0494-media-i2c-max9286-max9288-use-common.h-file.patch +patch 0495-media-i2c-ti9x4-fix-rebot_notify-and-gpiod_request.patch +patch 0496-media-i2c-add-interim-LVDS-imager-drivers.patch +patch 0497-media-i2c-soc_camera-rcar_csi2-adjust-debugging.patch +patch 0498-media-platform-soc_camera-rcar_vin-add-max96712-max9.patch +patch 0499-regulator-add-MAX2008X-camera-protector.patch +patch 0500-arm64-dts-renesas-add-V3H-GMSL2-Videoboxes.patch +patch 0501-media-i2c-ap0101-fix-fsin-on-AP0102.patch +patch 0502-media-i2c-max96712-add-MIPI-GMSL2-support.patch +patch 0503-media-i2c-ov2311-add-GMSL2-support.patch +patch 0504-media-i2c-max9296-add-MIPI-GMSL2-support.patch +patch 0505-media-i2c-gmsl-parse-gmsl_mode-from-deserializer.patch +patch 0506-media-i2c-imagers-add-AR0231-for-new-LVDS-support.patch +patch 0507-media-i2c-ap0101-ap0201-fix-vendor-name-fsin-fix-on-.patch +patch 0508-media-i2c-fix-indentation.patch +patch 0509-media-i2c-fix-broken-old-LVDS-imagers.patch +patch 0510-arm64-dts-renesas-add-camera-dtsi-file.patch +patch 0511-media-i2c-ap0201-detect-AP0200-AP0202.patch +patch 0512-arm64-dts-renesas-add-H3-GMSL2-Videobox.patch +patch 0513-MTD-renesas-rpc-fix-dummy-cycles.patch +patch 0514-media-i2c-gmsl2-add-fsync-support.patch +patch 0515-media-i2c-ap020x-add-fsync-support.patch +patch 0516-media-i2c-ar0231-fix-translator.patch +patch 0517-media-i2c-gmsl2-fix-fsync-in-manual-mode.patch +patch 0518-media-i2c-imagers-ar0231-fix-GMSL2.patch +patch 0519-media-i2c-imagers-add-IMX390-for-new-LVDS-support.patch +patch 0520-media-i2c-soc_camera-add-dummy-lvds-sensor.patch +patch 0521-arm64-dts-renesas-add-V3H-GMSL2-8ch-Videobox.patch +patch 0522-arm64-dts-renesas-vb-gmsl2-fix-typos.patch +patch 0523-media-i2c-isx019-do-not-disable-embedded-line.patch +patch 0524-media-i2c-dummy-fix-DT-parse.patch diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg index e053969e..4cce75a8 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg @@ -27,6 +27,8 @@ CONFIG_SOC_CAMERA=y CONFIG_SOC_CAMERA_SCALE_CROP=y CONFIG_SOC_CAMERA_PLATFORM=y CONFIG_SOC_CAMERA_MAX9286=y +CONFIG_SOC_CAMERA_MAX9296=y +CONFIG_SOC_CAMERA_MAX96712=y CONFIG_SOC_CAMERA_TI9X4=y CONFIG_SOC_CAMERA_OV106XX=y CONFIG_SOC_CAMERA_OV5647=y @@ -85,3 +87,5 @@ CONFIG_MD=y CONFIG_BLK_DEV_MD=y CONFIG_MD_RAID0=y CONFIG_GPIO_SYSFS=y +CONFIG_USB_TUSB8041=y +CONFIG_REGULATOR_MAX2008X=y diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/v3hsk.cfg b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/v3hsk.cfg index c633e9ed..9baa6f0f 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/v3hsk.cfg +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/v3hsk.cfg @@ -22,6 +22,8 @@ CONFIG_SOC_CAMERA=y CONFIG_SOC_CAMERA_SCALE_CROP=y CONFIG_SOC_CAMERA_PLATFORM=y CONFIG_SOC_CAMERA_MAX9286=y +CONFIG_SOC_CAMERA_MAX9296=y +CONFIG_SOC_CAMERA_MAX96712=y CONFIG_SOC_CAMERA_TI9X4=y CONFIG_SOC_CAMERA_OV106XX=y CONFIG_INPUT_TOUCHSCREEN=y @@ -41,3 +43,4 @@ CONFIG_GPIO_SYSFS=y CONFIG_DRM_THINE_THC63LVD1024=y CONFIG_MCP4725=y CONFIG_PHY_RCAR_GEN3_PCIE=y +CONFIG_REGULATOR_MAX2008X=y diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.14.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.14.bbappend index 5473336d..f066ca28 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.14.bbappend +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -6,13 +6,17 @@ COMPATIBLE_MACHINE_condor = "condor" COMPATIBLE_MACHINE_v3mzf = "v3mzf" COMPATIBLE_MACHINE_v3hsk = "v3hsk" +KF_ENABLE_M3V3SK8GB := "${@bb.utils.contains("KERNEL_DEVICETREE", "renesas/r8a7796-m3ulcb-2x4g.dtb", "1", "", d)}" + SRC_URI_append = " \ - ${@bb.utils.contains('MACHINE_FEATURES', 'h3ulcb-had', ' file://hyperflash.cfg', '', d)} \ + ${@oe.utils.conditional("DISABLE_RPC_ACCESS", "1", "", " file://hyperflash.cfg", d)} \ ${@oe.utils.conditional("SDHI_SEQ", "1", " file://sdhi_seq.cfg", "", d)} \ file://nvme.cfg \ file://imr.cfg \ file://disable-unused.cfg \ + file://enable.cfg \ file://renesas.scc \ + file://0355-gpu-drm-rcar-du-Extend-VSP1-DRM-interface.patch \ ${@oe.utils.conditional("KF_ENABLE_SD3", "1", " file://0047-arm64-dts-renesas-ulcb-kf-enable-sd3.patch", "", d)} \ ${@oe.utils.conditional("KF_ENABLE_MOST", "1", " file://0048-arm64-dts-renesas-ulcb-kf-enable-most.patch", "", d)} \ ${@oe.utils.conditional("KF_ENABLE_IMX219", "1", " file://0115-arm64-dts-renesas-ulcb-kf-enable-enable-IMX219.patch", "", d)} \ @@ -20,6 +24,7 @@ SRC_URI_append = " \ ${@oe.utils.conditional("KF_PANEL_MODEL", "AA104XD12", " file://0121-arm64-dts-renesas-ulcb-kf-Set-Mitsubishi-AA104XD12-1.patch", "", d)} \ ${@oe.utils.conditional("KF_PANEL_MODEL", "AA121TD01", " file://0121-arm64-dts-renesas-ulcb-kf-Set-Mitsubishi-AA121TD01-1.patch", "", d)} \ ${@oe.utils.conditional("VB_ENABLE_FDPLINK", "1", " file://0391-arm64-dts-renesas-Enable-FDPLink-output-on-V3x-Video.patch", "", d)} \ + ${@oe.utils.conditional("KF_ENABLE_M3V3SK8GB", "1", " file://0525-arm64-dts-renesas-Add-r8a7796-m3ulcb-2x4g-kf.dts.patch", "", d)} \ " SRC_URI_append_h3ulcb = " file://ulcb.cfg" @@ -34,7 +39,7 @@ SRC_URI_append_v3hsk = " file://v3hsk.cfg" SRC_URI_append_rcar-gen3-v3x = " \ file://cma.cfg \ - file://qspi.cfg \ + ${@oe.utils.conditional("DISABLE_RPC_ACCESS", "1", "", " file://qspi.cfg", d)} \ " KERNEL_DEVICETREE_append_h3ulcb = " \ @@ -58,11 +63,14 @@ KERNEL_DEVICETREE_append_h3ulcb = " \ renesas/r8a7795-h3ulcb-4x2g-vb2.dtb \ renesas/r8a7795-h3ulcb-4x2g-vb2.1.dtb \ renesas/r8a7795-h3ulcb-4x2g-vbm.dtb \ + renesas/r8a7795-h3ulcb-vb2.1-gmsl2.dtb \ + renesas/r8a7795-h3ulcb-4x2g-vb2.1-gmsl2.dtb \ " KERNEL_DEVICETREE_append_m3ulcb = " \ renesas/r8a7796-m3ulcb-view.dtb \ renesas/r8a7796-m3ulcb-kf.dtb \ + ${@oe.utils.conditional("KF_ENABLE_M3V3SK8GB", "1", " renesas/r8a7796-m3ulcb-2x4g-kf.dtb", "", d)} \ " KERNEL_DEVICETREE_append_m3nulcb = " \ @@ -112,6 +120,10 @@ KERNEL_DEVICETREE_append_v3hsk = " \ renesas/r8a77980-v3hsk-vbm-v3.dtb \ renesas/r8a77980-v3hsk-vb-4ch.dtb \ renesas/r8a77980-v3hsk-vb-8ch.dtb \ + renesas/r8a77980-v3hsk-vb-gmsl-8ch.dtb \ + renesas/r8a77980-v3hsk-vb-gmsl2-2x2.dtb \ + renesas/r8a77980-v3hsk-vb-gmsl2-4.dtb \ + renesas/r8a77980-v3hsk-vb-gmsl2-8.dtb \ " # Prefer V4L2 rcar_imr driver over UIO uio_imr KERNEL_MODULE_AUTOLOAD_append = " rcar_imr" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils/0001-aplay-Fix-invalid-file-size-check-for-non-regular-fi.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils/0001-aplay-Fix-invalid-file-size-check-for-non-regular-fi.patch deleted file mode 100644 index 586f9731..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils/0001-aplay-Fix-invalid-file-size-check-for-non-regular-fi.patch +++ /dev/null @@ -1,36 +0,0 @@ -From da4d5bd53a1a57d1b39318b83d3280fbcd78e9f6 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Tue, 15 May 2018 22:17:01 +0200 -Subject: [PATCH] aplay: Fix invalid file size check for non-regular files - -aplay tries to check the file size via fstat() at parsing the format -headers and avoids parsing when the size is shorter than the given -size. This works fine for regular files, but when a special file like -pipe is passed, it fails, eventually leading to the fallback mode -wrongly. - -A proper fix is to do this sanity check only for a regular file. - -Reported-by: Jay Foster -Signed-off-by: Takashi Iwai ---- - aplay/aplay.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/aplay/aplay.c b/aplay/aplay.c -index bbd7fff..63ec9ef 100644 ---- a/aplay/aplay.c -+++ b/aplay/aplay.c -@@ -2821,7 +2821,8 @@ static int read_header(int *loaded, int header_size) - - /* don't be adventurous, get out if file size is smaller than - * requested header size */ -- if (buf.st_size < header_size) -+ if ((buf.st_mode & S_IFMT) == S_IFREG && -+ buf.st_size < header_size) - return -1; - - if (*loaded < header_size) { --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils_1.1.6.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils_1.1.6.bbappend deleted file mode 100644 index a8c60aec..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/alsa/alsa-utils_1.1.6.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append = " \ - file://0001-aplay-Fix-invalid-file-size-check-for-non-regular-fi.patch \ -" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend new file mode 100644 index 00000000..0b6b1a5a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend @@ -0,0 +1,10 @@ +OMX_LIBS = "mp3dec_lib" + +do_configure_append() { + for lib in ${OMX_LIBS}; do + if ${@bb.utils.contains('DISTRO_FEATURES', '$lib', 'false', 'true', d)}; then + lib="omx${lib%%_lib}" + sed -i "/^\[$lib\]/,/^$/d" ${S}/config/rcar/gstomx.conf + fi + done +} diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf deleted file mode 100644 index 890c5ad9..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video6 -output-device-name=/dev/video7 diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend deleted file mode 100644 index 6d4804d1..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0001-install-wayland.h-header.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0001-install-wayland.h-header.patch deleted file mode 100644 index 0d9ed62e..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0001-install-wayland.h-header.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 688a7bfe44a3ca9029fccdb1f7bfdd405927dade Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Thu, 5 May 2016 15:55:55 +0300 -Subject: [PATCH] install wayland.h header - ---- - gst-libs/gst/wayland/Makefile.am | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am -index 743a489..c59b06d 100644 ---- a/gst-libs/gst/wayland/Makefile.am -+++ b/gst-libs/gst/wayland/Makefile.am -@@ -5,6 +5,8 @@ libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c - libgstwayland_@GST_API_VERSION@includedir = \ - $(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland - -+libgstwayland_@GST_API_VERSION@include_HEADERS = wayland.h -+ - libgstwayland_@GST_API_VERSION@_la_CFLAGS = \ - $(GST_PLUGINS_BAD_CFLAGS) \ - $(GST_PLUGINS_BASE_CFLAGS) \ -@@ -21,7 +23,3 @@ libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \ - $(GST_LIB_LDFLAGS) \ - $(GST_ALL_LDFLAGS) \ - $(GST_LT_LDFLAGS) -- --noinst_HEADERS = \ -- wayland.h -- --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0002-pkgconfig-libgstwayland.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0002-pkgconfig-libgstwayland.patch deleted file mode 100644 index 5f5e9948..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0002-pkgconfig-libgstwayland.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 96044f1d3773ba2783e3956729cd9c85b04733da Mon Sep 17 00:00:00 2001 -From: Grigory Kletsko -Date: Thu, 12 May 2016 21:24:38 +0300 -Subject: [PATCH] fix - ---- - pkgconfig/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am -index 0e69cd1..b76f7b5 100644 ---- a/pkgconfig/Makefile.am -+++ b/pkgconfig/Makefile.am -@@ -1,6 +1,7 @@ - - ### all of the standard pc files we need to generate - pcverfiles = \ -+ gstreamer-wayland-@GST_API_VERSION@.pc \ - gstreamer-plugins-bad-@GST_API_VERSION@.pc \ - gstreamer-codecparsers-@GST_API_VERSION@.pc \ - gstreamer-insertbin-@GST_API_VERSION@.pc \ -@@ -11,6 +12,7 @@ pcverfiles = \ - gstreamer-bad-video-@GST_API_VERSION@.pc - - pcverfiles_uninstalled = \ -+ gstreamer-wayland-@GST_API_VERSION@-uninstalled.pc \ - gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \ - gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \ - gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \ --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0003-gstkmssink-add-rcar-du-to-driver-list.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0003-gstkmssink-add-rcar-du-to-driver-list.patch deleted file mode 100644 index 6a8050ef..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.14.%/0003-gstkmssink-add-rcar-du-to-driver-list.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 300a679bd033d9b3fcf6873b1cd0385f0e0435ae Mon Sep 17 00:00:00 2001 -From: Sergey Nazaryev -Date: Tue, 26 Feb 2019 17:55:54 +0300 -Subject: [PATCH] gstkmssink: add rcar-du to driver list - ---- - sys/kms/gstkmssink.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c -index 1331883..5e45796 100644 ---- a/sys/kms/gstkmssink.c -+++ b/sys/kms/gstkmssink.c -@@ -168,7 +168,7 @@ kms_open (gchar ** driver) - { - static const char *drivers[] = { "i915", "radeon", "nouveau", "vmwgfx", - "exynos", "amdgpu", "imx-drm", "rockchip", "atmel-hlcdc", "msm", -- "xlnx", "vc4", "meson", "sun4i-drm", "mxsfb-drm", -+ "xlnx", "vc4", "meson", "sun4i-drm", "mxsfb-drm", "rcar-du", - "xilinx_drm", /* DEPRECATED. Replaced by xlnx */ - }; - int i, fd = -1; --- -2.7.4 - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0001-install-wayland.h-header.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0001-install-wayland.h-header.patch new file mode 100644 index 00000000..d98ca26d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0001-install-wayland.h-header.patch @@ -0,0 +1,33 @@ +From 688a7bfe44a3ca9029fccdb1f7bfdd405927dade Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Thu, 5 May 2016 15:55:55 +0300 +Subject: [PATCH] install wayland.h header + +--- + gst-libs/gst/wayland/Makefile.am | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am +index a9f3f7b..7281a6e 100644 +--- a/gst-libs/gst/wayland/Makefile.am ++++ b/gst-libs/gst/wayland/Makefile.am +@@ -5,6 +5,8 @@ libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c + libgstwayland_@GST_API_VERSION@includedir = \ + $(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland + ++libgstwayland_@GST_API_VERSION@include_HEADERS = wayland.h ++ + libgstwayland_@GST_API_VERSION@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ +@@ -22,7 +24,3 @@ libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \ + $(GST_LIB_LDFLAGS) \ + $(GST_ALL_LDFLAGS) \ + $(GST_LT_LDFLAGS) +- +-noinst_HEADERS = \ +- wayland.h +- +-- +2.5.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0002-pkgconfig-libgstwayland.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0002-pkgconfig-libgstwayland.patch new file mode 100644 index 00000000..f677b432 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0002-pkgconfig-libgstwayland.patch @@ -0,0 +1,32 @@ +From 96044f1d3773ba2783e3956729cd9c85b04733da Mon Sep 17 00:00:00 2001 +From: Grigory Kletsko +Date: Thu, 12 May 2016 21:24:38 +0300 +Subject: [PATCH] fix + +--- + pkgconfig/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am +index 8e74a8e..f641285 100644 +--- a/pkgconfig/Makefile.am ++++ b/pkgconfig/Makefile.am +@@ -1,6 +1,7 @@ + + ### all of the standard pc files we need to generate + pcverfiles = \ ++ gstreamer-wayland-@GST_API_VERSION@.pc \ + gstreamer-plugins-bad-@GST_API_VERSION@.pc \ + gstreamer-codecparsers-@GST_API_VERSION@.pc \ + gstreamer-insertbin-@GST_API_VERSION@.pc \ +@@ -11,6 +12,7 @@ pcverfiles = \ + gstreamer-bad-audio-@GST_API_VERSION@.pc + + pcverfiles_uninstalled = \ ++ gstreamer-wayland-@GST_API_VERSION@-uninstalled.pc \ + gstreamer-plugins-bad-@GST_API_VERSION@-uninstalled.pc \ + gstreamer-codecparsers-@GST_API_VERSION@-uninstalled.pc \ + gstreamer-insertbin-@GST_API_VERSION@-uninstalled.pc \ +-- +2.5.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0003-gstkmssink-add-rcar-du-to-driver-list.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0003-gstkmssink-add-rcar-du-to-driver-list.patch new file mode 100644 index 00000000..6b421ac6 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad-1.16.2/0003-gstkmssink-add-rcar-du-to-driver-list.patch @@ -0,0 +1,25 @@ +From 300a679bd033d9b3fcf6873b1cd0385f0e0435ae Mon Sep 17 00:00:00 2001 +From: Sergey Nazaryev +Date: Tue, 26 Feb 2019 17:55:54 +0300 +Subject: [PATCH] gstkmssink: add rcar-du to driver list + +--- + sys/kms/gstkmssink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c +index cdecbf6..0b11233 100644 +--- a/sys/kms/gstkmssink.c ++++ b/sys/kms/gstkmssink.c +@@ -177,7 +177,7 @@ kms_open (gchar ** driver) + { + static const char *drivers[] = { "i915", "radeon", "nouveau", "vmwgfx", + "exynos", "amdgpu", "imx-drm", "rockchip", "atmel-hlcdc", "msm", +- "xlnx", "vc4", "meson", "sun4i-drm", "mxsfb-drm", ++ "xlnx", "vc4", "meson", "sun4i-drm", "mxsfb-drm", "rcar-du", + "xilinx_drm", /* DEPRECATED. Replaced by xlnx */ + }; + int i, fd = -1; +-- +2.7.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.%.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.%.bbappend deleted file mode 100644 index 1e630f9e..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.%.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" - -SRC_URI_append = " \ - file://0001-install-wayland.h-header.patch \ - file://0002-pkgconfig-libgstwayland.patch \ - file://0003-gstkmssink-add-rcar-du-to-driver-list.patch \ -" - -PACKAGECONFIG_append = " kms" - -PACKAGECONFIG_remove = '${@ "vulkan" if not ('opengl' in '${DISTRO_FEATURES}') else ""}' -DEPENDS_remove = '${@ "weston" if not ('wayland' in '${DISTRO_FEATURES}') else ""}' -RDEPENDS_gstreamer1.0-plugins-bad_remove = '${@bb.utils.contains("DISTRO_FEATURES", "wayland opengl", "", "libwayland-egl", d)}' diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend new file mode 100644 index 00000000..1e630f9e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" + +SRC_URI_append = " \ + file://0001-install-wayland.h-header.patch \ + file://0002-pkgconfig-libgstwayland.patch \ + file://0003-gstkmssink-add-rcar-du-to-driver-list.patch \ +" + +PACKAGECONFIG_append = " kms" + +PACKAGECONFIG_remove = '${@ "vulkan" if not ('opengl' in '${DISTRO_FEATURES}') else ""}' +DEPENDS_remove = '${@ "weston" if not ('wayland' in '${DISTRO_FEATURES}') else ""}' +RDEPENDS_gstreamer1.0-plugins-bad_remove = '${@bb.utils.contains("DISTRO_FEATURES", "wayland opengl", "", "libwayland-egl", d)}' diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend deleted file mode 100644 index 7d28801e..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend +++ /dev/null @@ -1,42 +0,0 @@ -FILESEXTRAPATHS_append := "${THISDIR}/files:" - -PR="r2" - -SRC_URI_append_rcar-gen3 = " \ - file://pulseaudio.init \ - file://rsnddai0ak4613h.conf \ - file://hifi \ - file://system.pa \ - file://daemon.conf \ - file://pulseaudio-bluetooth.conf \ - file://pulseaudio-ofono.conf \ -" - -inherit update-rc.d - -INITSCRIPT_PACKAGES = "${PN}-server" -INITSCRIPT_NAME_${PN}-server = "pulseaudio" -INITSCRIPT_PARAMS_${PN}-server = "defaults 30" - -do_install_append_rcar-gen3() { - install -d ${D}/etc/init.d - install -d ${D}/etc/pulse - install -d ${D}/usr/share/alsa/ucm/rsnddai0ak4613h/ - - install -m 0755 ${WORKDIR}/pulseaudio.init ${D}/etc/init.d/pulseaudio - - install -m 0644 ${WORKDIR}/system.pa ${D}/etc/pulse/system.pa - install -m 0644 ${WORKDIR}/daemon.conf ${D}/etc/pulse/daemon.conf - - install -m 0644 ${WORKDIR}/rsnddai0ak4613h.conf ${D}${datadir}/alsa/ucm/rsnddai0ak4613h/rsnddai0ak4613h.conf - install -m 0644 ${WORKDIR}/hifi ${D}${datadir}/alsa/ucm/rsnddai0ak4613h/hifi - - install -d ${D}/${sysconfdir}/dbus-1/system.d - install -m 644 ${WORKDIR}/pulseaudio-bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/ - install -m 644 ${WORKDIR}/pulseaudio-ofono.conf ${D}/${sysconfdir}/dbus-1/system.d/ -} - -FILES_${PN}-server += " \ - ${datadir}/alsa/ucm \ - ${datadir}/dbus-1/ \ -" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend new file mode 100644 index 00000000..7d28801e --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend @@ -0,0 +1,42 @@ +FILESEXTRAPATHS_append := "${THISDIR}/files:" + +PR="r2" + +SRC_URI_append_rcar-gen3 = " \ + file://pulseaudio.init \ + file://rsnddai0ak4613h.conf \ + file://hifi \ + file://system.pa \ + file://daemon.conf \ + file://pulseaudio-bluetooth.conf \ + file://pulseaudio-ofono.conf \ +" + +inherit update-rc.d + +INITSCRIPT_PACKAGES = "${PN}-server" +INITSCRIPT_NAME_${PN}-server = "pulseaudio" +INITSCRIPT_PARAMS_${PN}-server = "defaults 30" + +do_install_append_rcar-gen3() { + install -d ${D}/etc/init.d + install -d ${D}/etc/pulse + install -d ${D}/usr/share/alsa/ucm/rsnddai0ak4613h/ + + install -m 0755 ${WORKDIR}/pulseaudio.init ${D}/etc/init.d/pulseaudio + + install -m 0644 ${WORKDIR}/system.pa ${D}/etc/pulse/system.pa + install -m 0644 ${WORKDIR}/daemon.conf ${D}/etc/pulse/daemon.conf + + install -m 0644 ${WORKDIR}/rsnddai0ak4613h.conf ${D}${datadir}/alsa/ucm/rsnddai0ak4613h/rsnddai0ak4613h.conf + install -m 0644 ${WORKDIR}/hifi ${D}${datadir}/alsa/ucm/rsnddai0ak4613h/hifi + + install -d ${D}/${sysconfdir}/dbus-1/system.d + install -m 644 ${WORKDIR}/pulseaudio-bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/ + install -m 644 ${WORKDIR}/pulseaudio-ofono.conf ${D}/${sysconfdir}/dbus-1/system.d/ +} + +FILES_${PN}-server += " \ + ${datadir}/alsa/ucm \ + ${datadir}/dbus-1/ \ +" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/glm/glm_0.9.7.6.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/glm/glm_0.9.7.6.bb index 7c013937..49e5b04d 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/glm/glm_0.9.7.6.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/glm/glm_0.9.7.6.bb @@ -1,10 +1,11 @@ require glm.inc -SRC_URI = "\ - https://github.com/g-truc/${BPN}/archive/${PV}.tar.gz \ - file://0001-Fix-cmake-pathes.patch \ -" +S = "${WORKDIR}/git" -SRC_URI[md5sum] = "5b75955d21ce2c2d515919d30c69a3eb" -SRC_URI[sha256sum] = "872fdea580b69b752562adc60734d7472fd97d5724c4ead585564083deac3953" +SRC_URI = " \ + git://github.com/g-truc/${BPN}.git \ + file://0001-Fix-cmake-pathes.patch \ +" +# tag: 0.9.7.6 +SRCREV = "dff3af56a884e31d21eae7ab3eb72a8d192adc54" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio.inc b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio.inc deleted file mode 100644 index 81662a50..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio.inc +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "Library for interfacing with IIO devices" -HOMEPAGE = "http://wiki.analog.com/resources/tools-software/linux-software/libiio" -SECTION = "System/Libraries" -LICENSE = "LGPL-2.1" - -LIC_FILES_CHKSUM ??= "file://COPYING.txt;md5=7c13b3376cea0ce68d2d2da0a1b3a72c" - -inherit cmake pkgconfig - -DEPENDS = "libxml2 bison-native flex-native systemd" - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_0.5.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_0.5.bb deleted file mode 100644 index 664dc963..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_0.5.bb +++ /dev/null @@ -1,9 +0,0 @@ -require ${BPN}.inc - -SRC_URI = "https://github.com/analogdevicesinc/${BPN}/archive/v${PV}.tar.gz" -SRC_URI[md5sum] = "4496c24dabdce60bdcf231ebe19bb501" -SRC_URI[sha256sum] = "c41cdcfeae8717e72f1100b4dac9d7cc9d86f4e0731da3354149cb7e051666f3" - -LIC_FILES_CHKSUM ??= "file://COPYING;md5=7c13b3376cea0ce68d2d2da0a1b3a72c" - -S = "${WORKDIR}/${BPN}-${PV}" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_git.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_git.bb deleted file mode 100644 index 0c02133a..00000000 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libiio/libiio_git.bb +++ /dev/null @@ -1,8 +0,0 @@ -require ${BPN}.inc - -SRC_URI = "git://github.com/analogdevicesinc/${BPN}.git" -S = "${WORKDIR}/git" -SRCREV = "7ce5cd5b508389077aedaaa4d5f1c0b08b78ded5" - -DEFAULT_PREFERENCE = "1" - diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libusbg/libusbg_0.1.0.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libusbg/libusbg_0.1.0.bb index b63bcd48..6c594977 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libusbg/libusbg_0.1.0.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/libusbg/libusbg_0.1.0.bb @@ -1,9 +1,8 @@ require libusbg.inc -SRC_URI = "https://github.com/libusbg/libusbg/archive/v${PV}.tar.gz" +S = "${WORKDIR}/git" -SRC_URI[md5sum] = "2d3af961f7007a35ed3816de6b712ac1" -SRC_URI[sha256sum] = "82fa5c71741a70477148ed455c307611075a4f9af6886ab3e7a4471377dfd2c7" - -S = "${WORKDIR}/libusbg-${PV}" +SRC_URI = "https://github.com/${BPN}/${BPN}.git" +# tag: v0.1.0 +SRCREV = "7e2b04363f319e8936a606bdb122dbde249a2f58" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb index 5c72a311..d331430d 100644 --- a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/nlopt/nlopt_2.4.2.bb @@ -1,7 +1,8 @@ require ${PN}.inc -SRC_URI = "https://github.com/stevengj/${BPN}/archive/${BPN}-${PV}.tar.gz" -SRC_URI[md5sum] = "5f60160dd0cb0f7c4fed983940bd5224" -SRC_URI[sha256sum] = "d838b5b4b1c6b6493666ff61a8817a4ebcee924f54fb95f6f64e5f727ddbf2a6" +S = "${WORKDIR}/git" -S = "${WORKDIR}/${BPN}-${BPN}-${PV}" +SRC_URI = "git://github.com/stevengj/${BPN}.git" + +# tag: nlopt-2.4.2 +SRCREV = "355a597b43c80f616252cb370fa9f7e5c997418e" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch new file mode 100644 index 00000000..4d76ad40 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch @@ -0,0 +1,38 @@ +From 4801a057730632225337d7f6d26b9335e6b9b078 Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda Delgado +Date: Thu, 31 Mar 2016 00:20:15 +0200 +Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp + +Signed-off-by: Ricardo Ribalda Delgado +Signed-off-by: Ismo Puustinen +--- + 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 d601da4bb..f6fc1098c 100644 +--- a/3rdparty/ippicv/ippicv.cmake ++++ b/3rdparty/ippicv/ippicv.cmake +@@ -39,18 +39,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() +-- +2.13.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch new file mode 100644 index 00000000..513597b8 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Add-missing-multi-line-separator.patch @@ -0,0 +1,36 @@ +From 60857229aab13ccc426572a43ab891409bb76ea4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 9 Sep 2018 22:52:55 -0700 +Subject: [PATCH] Add missing multi-line separator + +Otherwise this fails to build ( found on mips ) + +Fixes +contrib/modules/surface_matching/src/hash_murmur86.hpp:97:15: error: +expected constructor, destructor, or type conversion before '(' token + && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && +__GNUC_MINOR__>=3)) + ^ + +Upstream-Status: Submitted [https://github.com/opencv/opencv_contrib/pull/1764] +Signed-off-by: Khem Raj +--- + modules/surface_matching/src/hash_murmur86.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/surface_matching/src/hash_murmur86.hpp b/modules/surface_matching/src/hash_murmur86.hpp +index 1edf6bf4..0477d37e 100644 +--- a/modules/surface_matching/src/hash_murmur86.hpp ++++ b/modules/surface_matching/src/hash_murmur86.hpp +@@ -93,7 +93,7 @@ void hashMurmurx86 ( const void * key, const int len, const uint seed, void * ou + /* Now find best way we can to READ_UINT32 */ + #ifndef WORDS_BIGENDIAN + # define READ_UINT32(ptr) (*((uint32_t*)(ptr))) +-#elif defined(WORDS_BIGENDIAN) ++#elif defined(WORDS_BIGENDIAN) \ + && defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3)) + # define READ_UINT32(ptr) (__builtin_bswap32(*((uint32_t*)(ptr)))) + #endif +-- +2.18.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch new file mode 100644 index 00000000..319071a3 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Check-for-clang-before-using-isystem.patch @@ -0,0 +1,32 @@ +From fa76d8646bb2b9b514728eeef41afed7c43a36f2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 11 Sep 2018 18:18:33 -0700 +Subject: [PATCH] Check for clang before using -isystem + +When cross compiling with clang, the internal C++ headers are not found +when adding sysroot to -isystem, that is redundant anyway because it +will look for headers insider --sysroot path with same quality as it +would do with -isystem otherwise + +Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/12504] +Signed-off-by: Khem Raj +--- + cmake/OpenCVUtils.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake +index fae91c165f..60c20192dc 100644 +--- a/cmake/OpenCVUtils.cmake ++++ b/cmake/OpenCVUtils.cmake +@@ -259,7 +259,7 @@ function(ocv_include_directories) + ocv_is_opencv_directory(__is_opencv_dir "${dir}") + if(__is_opencv_dir) + list(APPEND __add_before "${dir}") +- elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND ++ elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND + dir MATCHES "/usr/include$") + # workaround for GCC 6.x bug + else() +-- +2.18.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch new file mode 100644 index 00000000..bf0b80a3 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Dont-use-isystem.patch @@ -0,0 +1,30 @@ +From 7144c44ec70dee73a628463b99ffeed74b1a8ef6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +--- + cmake/OpenCVPCHSupport.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake +index f9b1b48b65..fe27a136f5 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") +-- +2.18.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch new file mode 100644 index 00000000..63cb7f94 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch @@ -0,0 +1,33 @@ +From 7d31f41d2a6759e244983504ce855fc32916b97a Mon Sep 17 00:00:00 2001 +From: Jason Wessel +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 +--- + 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 5a9b10f075..97c6b74b07 100644 +--- a/modules/videoio/src/cap_ffmpeg_impl.hpp ++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp +@@ -667,6 +667,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(); +-- +2.11.0 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch new file mode 100644 index 00000000..a845505a --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch @@ -0,0 +1,26 @@ +From 350525293aef65490e80104ddd99e1b21c5d54b0 Mon Sep 17 00:00:00 2001 +From: Bian Naimeng +Date: Wed, 19 Apr 2017 03:11:37 +0900 +Subject: [PATCH 2/3] Make opencv-ts create share library intead of static. + +Signed-off-by: Lei Maohui +--- + modules/ts/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt +index f95bed079..ee67858df 100644 +--- a/modules/ts/CMakeLists.txt ++++ b/modules/ts/CMakeLists.txt +@@ -4,7 +4,7 @@ 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_TYPE STATIC) + set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) + + if(WINRT) +-- +2.13.4 + diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch new file mode 100644 index 00000000..5270b8c9 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch @@ -0,0 +1,69 @@ +From ace48a628dca34d742615598afeef42ed323a029 Mon Sep 17 00:00:00 2001 +From: Huang Qiyu +Date: Fri, 19 May 2017 04:27:50 +0900 +Subject: [PATCH 3/3] 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 + +Also add the visibility changes for certain OpenCL-related functions in +ts module. + +Signed-off-by: Ismo Puustinen +--- + modules/ts/include/opencv2/ts.hpp | 6 +++--- + modules/ts/include/opencv2/ts/ocl_test.hpp | 2 +- + modules/ts/include/opencv2/ts/ts_ext.hpp | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +Index: git/modules/ts/include/opencv2/ts.hpp +=================================================================== +--- git.orig/modules/ts/include/opencv2/ts.hpp ++++ git/modules/ts/include/opencv2/ts.hpp +@@ -608,7 +608,7 @@ protected: + } + }; + +-extern uint64 param_seed; ++CV_EXPORTS extern uint64 param_seed; + + struct DefaultRngAuto + { +@@ -671,7 +671,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 + +Index: git/modules/ts/include/opencv2/ts/ocl_test.hpp +=================================================================== +--- git.orig/modules/ts/include/opencv2/ts/ocl_test.hpp ++++ git/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 + +Index: git/modules/ts/include/opencv2/ts/ts_ext.hpp +=================================================================== +--- git.orig/modules/ts/include/opencv2/ts/ts_ext.hpp ++++ git/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/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/fixpkgconfig.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/fixpkgconfig.patch new file mode 100644 index 00000000..3ed3468d --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/fixpkgconfig.patch @@ -0,0 +1,30 @@ +Index: git/cmake/OpenCVGenPkgconfig.cmake +=================================================================== +--- git.orig/cmake/OpenCVGenPkgconfig.cmake ++++ git/cmake/OpenCVGenPkgconfig.cmake +@@ -31,7 +31,7 @@ macro(fix_prefix lst isown) + get_filename_component(libdir "${item}" PATH) + get_filename_component(_libname "${item}" NAME) + ocv_get_libname(libname "${_libname}") +- list(APPEND _lst "-L${libdir}" "-l${libname}") ++ list(APPEND _lst "-l${libname}") + else() + list(APPEND _lst "-l${item}") + endif() +@@ -124,11 +124,14 @@ ocv_list_unique(_extra) + ocv_list_unique(_3rdparty) + + set(OPENCV_PC_LIBS +- "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" ++ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}" + "${_modules}" + ) + if(BUILD_SHARED_LIBS) +- set(OPENCV_PC_LIBS_PRIVATE "${_extra}") ++ set(OPENCV_PC_LIBS_PRIVATE ++ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}" ++ "${_extra}" ++ ) + else() + set(OPENCV_PC_LIBS_PRIVATE + "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}" diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/uselocalxfeatures.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/uselocalxfeatures.patch new file mode 100644 index 00000000..fc273a89 --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv/uselocalxfeatures.patch @@ -0,0 +1,20 @@ +diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt +index e1755595..c7009c47 100644 +--- a/modules/xfeatures2d/CMakeLists.txt ++++ b/modules/xfeatures2d/CMakeLists.txt +@@ -5,10 +5,10 @@ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d openc + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake) + set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d") +-download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) +-download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) +-if(NOT boost_status OR NOT vgg_status) +- ocv_module_disable(xfeatures2d) +-endif() ++#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) ++#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) ++#if(NOT boost_status OR NOT vgg_status) ++# ocv_module_disable(xfeatures2d) ++#endif() + + ocv_module_include_directories("${DOWNLOAD_DIR}") diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv_3.4.3.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv_3.4.3.bb new file mode 100644 index 00000000..a96def9c --- /dev/null +++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-support/opencv/opencv_3.4.3.bb @@ -0,0 +1,194 @@ +SUMMARY = "Opencv : The Open Computer Vision Library" +HOMEPAGE = "http://opencv.org/" +SECTION = "libs" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=62d89c5dcb0583609ea919c56be0ee76" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" + +SRCREV_opencv = "b38c50b3d0c31e82294315ec44b54b7ef559ef12" +SRCREV_contrib = "1f6d6f06266e1ef336437ae5404bee1c65d42cda" +SRCREV_ipp = "bdb7bb85f34a8cb0d35e40a81f58da431aa1557a" +SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" +SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" + +def ipp_filename(d): + import re + arch = d.getVar('TARGET_ARCH') + if re.match("i.86$", arch): + return "ippicv_2017u3_lnx_ia32_general_20180518.tgz" + else: + return "ippicv_2017u3_lnx_intel64_general_20180518.tgz" + +def ipp_md5sum(d): + import re + arch = d.getVar('TARGET_ARCH') + if re.match("i.86$", arch): + return "ea72de74dae3c604eb6348395366e78e" + else: + return "b7cc351267db2d34b9efa1cd22ff0572" + +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_20180518;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 \ + file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ + file://uselocalxfeatures.patch;patchdir=../contrib/ \ + file://0001-Add-missing-multi-line-separator.patch;patchdir=../contrib/ \ + file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \ + file://0003-To-fix-errors-as-following.patch \ + file://fixpkgconfig.patch \ + file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ + file://0001-Dont-use-isystem.patch \ + file://0001-Check-for-clang-before-using-isystem.patch \ +" +PV = "3.4.3+git${SRCPV}" + +S = "${WORKDIR}/git" + +do_unpack_extra() { + tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} + cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src + cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src +} +addtask unpack_extra after do_unpack before do_patch + +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 \ + -DENABLE_NEON=1 \ + -DWITH_NEON=1 \ + ${@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)} \ + ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \ + ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \ +" +EXTRA_OECMAKE_append_x86 = " -DX86=ON" + +PACKAGECONFIG ??= "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[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 ${datadir}/OpenCV/*.cmake" +FILES_${PN}-staticdev += "${datadir}/OpenCV/3rdparty/lib/*.a" +FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV" +FILES_${PN}-java = "${datadir}/OpenCV/java" +FILES_${PN}-samples = "${datadir}/OpenCV/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" + +do_install_append() { + cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/ + sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h + + # 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 + + # Remove references to yocto directories + sed -i "s,${STAGING_DIR_TARGET},,g" ${D}${datadir}/OpenCV/*.cmake + sed -i "/INTERFACE_LINK_LIBRARIES/ s,${libdir}/lib,,g" ${D}${datadir}/OpenCV/*.cmake + sed -i "/INTERFACE_LINK_LIBRARIES/ s,[.]so,,g" ${D}${datadir}/OpenCV/*.cmake +} diff --git a/bsp/meta-renesas-rcar-gen3/.gitignore b/bsp/meta-renesas-rcar-gen3/.gitignore deleted file mode 100644 index 5cc4bc0a..00000000 --- a/bsp/meta-renesas-rcar-gen3/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.tar.bz2 -*.tar.gz diff --git a/bsp/meta-renesas-rcar-gen3/.gitreview b/bsp/meta-renesas-rcar-gen3/.gitreview deleted file mode 100644 index a247a4dd..00000000 --- a/bsp/meta-renesas-rcar-gen3/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.automotivelinux.org -port=29418 -project=AGL/meta-renesas-rcar-gen3 -defaultbranch=icefish diff --git a/bsp/meta-renesas-rcar-gen3/COPYING.MIT b/bsp/meta-renesas-rcar-gen3/COPYING.MIT deleted file mode 100644 index fb950dc6..00000000 --- a/bsp/meta-renesas-rcar-gen3/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -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. diff --git a/bsp/meta-renesas-rcar-gen3/MAINTAINERS b/bsp/meta-renesas-rcar-gen3/MAINTAINERS deleted file mode 100644 index 4921617a..00000000 --- a/bsp/meta-renesas-rcar-gen3/MAINTAINERS +++ /dev/null @@ -1,28 +0,0 @@ -This file contains a list of BSP maintainers for the BSPs contained in -the meta-renesas repository. - -Descriptions of section entries: - - M: Mail patches to: FullName - F: Files and directories with wildcard patterns. - A trailing slash includes all files and subdirectory files. - F: meta-XXXXX/ all files in and below meta-XXXXX - F: meta-XXXXX/* all files in meta-XXXXX, but not below - One pattern per line. Multiple F: lines acceptable. - -Please keep this list in alphabetical order. - -Maintainers List (try to look for most precise areas first) - - ----------------------------------- -Renesas ARM SoCs R-Car Generation 3 -M: Takamitsu Honda -F: meta-rcar-gen3 - -Renesas ARM SoCs R-Car Generation 2 -M: Takamitsu Honda -F: meta-rcar-gen2 - -COMMON -M: Takamitsu Honda -F: common diff --git a/bsp/meta-renesas-rcar-gen3/README.md b/bsp/meta-renesas-rcar-gen3/README.md deleted file mode 100644 index 7eb9de96..00000000 --- a/bsp/meta-renesas-rcar-gen3/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# OpenEmbedded/Yocto BSP layer for Renesas Electronics's SoCs - -This layer provides support for Renesas Electronics's platforms for use with -OpenEmbedded and/or Yocto. - -Layer maintainer: Takamitsu Honda - -## Supported Boards/Machines - - -In addition, this also provides layer which supports boards using Renesas SoCs. -Layer and boards that support is the following: - - meta-rcar-gen3 - - Renesas Electronics Corporation. Salvator-X (R8A7795/R8A7796/R8A77965) - - Renesas Electronics Corporation. R-Car Starter Kit premier(H3ULCB) (R8A7795) - - Renesas Electronics Corporation. R-Car Starter Kit pro(M3ULCB) (R8A7796) - - Renesas Electronics Corporation. R-Car Starter Kit pro(M3NULCB) (R8A77965) - - Renesas Electronics Corporation. R-Car Ebisu (R8A77990) - -Please see README in the layer directory for the description of the board. - -## Original BSP image - -The meta-renesas layer provides original BSP image. The following: - -* core-image-minimal -* core-image-weston diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/COPYING.MIT b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/COPYING.MIT deleted file mode 100644 index 89de3547..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -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. diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.evaproprietary.md b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.evaproprietary.md deleted file mode 100644 index 69a33d8c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.evaproprietary.md +++ /dev/null @@ -1,121 +0,0 @@ -# R-Car Gen3 Evaluation Software Package for Linux - - -The meta-rcar-gen3 layer of meta-renesas supports the Click-through licensed -Linux Drivers and Gfx/MMP packages. - -This README describes how to use these features and setting local.conf. - -```bash - I/ Build configuration - II/ Obtain and Install Renesas Graphics Drivers -``` - -**NOTE:** - -* However, to have a completed local.conf, please also refer to Build -Instruction in [meta-renesas/meta-rcar-gen3/README.md](README.md). - -* In addition, these libraries are not provided with recipes. If you would like -to use, you will need to get them from Renesas. - -## I/ Build configuration - - -* Add the target board to local.conf - - * For Salvator-X board - - ```bash - MACHINE = "salvator-x" - ``` - - * For R-Car Starter Kit Premier(H3ULCB) board - - ```bash - MACHINE = "h3ulcb" - ``` - - * For R-Car Starter Kit Pro(M3ULCB) board - - ```bash - MACHINE = "m3ulcb" - ``` - - * For R-Car Starter Kit Pro(M3NULCB) board - - ```bash - MACHINE = "m3nulcb" - ``` - - * For Ebisu board - - ```bash - MACHINE = "ebisu" - ``` - -* Set SOC family name - - * For H3: r8a7795 - - ```bash - SOC_FAMILY = "r8a7795" - ``` - - * For M3: r8a7796 - - ```bash - SOC_FAMILY = "r8a7796" - ``` - - * For M3N: r8a77965 - - ```bash - SOC_FAMILY = "r8a77965" - ``` - - * For E3: r8a77990 - - ```bash - # Already added in machine config: ebisu.conf - SOC_FAMILY = "r8a77990" - ``` - -* When using the click-through version of the gfx/mmp packages, you need to add -the following to your local.conf - -```bash - DISTRO_FEATURES_append = " use_eva_pkg" -``` - -## II/ Obtain and Install Renesas Graphics Drivers - - -Before setting up the build environment, you need to download the proprietary -drivers. - -* Download Renesas graphic drivers with a "click through" license from -[Renesas website][rcar Linux Drivers] and unzip them into a folder. - -**NOTE:** - -* You have to register with a free account on MyRenesas and accept the license -conditions before downloading the drivers. -The operation is fast and simple nevertheless mandatory to access evaluation of -non open-source drivers for free. -Once you registered, you can download two zip files. - -```bash -$ cd -$ unzip -o R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip -$ unzip -o R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip -``` - -To install them into the correct place in the Yocto BSP, a copy script is used. - -```bash -$ cd ./meta-renesas -$ sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -``` - -[rcar Linux Drivers]: https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.md b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.md deleted file mode 100644 index dfb712cb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.md +++ /dev/null @@ -1,243 +0,0 @@ -# meta-rcar-gen3 - - -This layer provides the support for the evaluation board mounted ARM SoCs of -Renesas Electronics, called the R-Car Generation 3. - -Currently, this supports boards and the SoCs of the following: - -```bash - - Board: Salvator-X / SoC: R8A7795 (R-Car H3), R8A7796 (R-Car M3), R8A77965 (R-Car M3N) - - Board: R-Car Starter Kit premier(H3ULCB) / SoC: R8A7795 (R-Car H3) - - Board: R-Car Starter Kit pro(M3ULCB) / SoC: R8A7796 (R-Car M3) - - Board: R-Car Starter Kit pro(M3NULCB) / SoC: R8A77965 (R-Car M3N) - - Board: Ebisu / SoC: R8A77990 (R-Car E3) -``` - -## Branch Policy - - -* This is Community Yocto BSP to follow Yocto/Poky releases. - -* It is not supported to the level of the Customer Yocto BSP. - -## Tag Policy - - -* Releases are created from the respective working branch. - -* After a Customer Yocto BSP version releases, the Community Yocto BSP will be -rebased and released accordingly. - -* thud-X: - - * The versions used on thud (Yocto Project 2.6) will start on - thud-Yocto-v3.19.0 to keep the major version numbers in sync. - -## Contribution - - -* Please submit any patches for this layer to: takamitsu.honda.pv@renesas.com - -* Please see the MAINTAINERS file for more details. - -## Layer Dependencies - - -This layer depends on: - -* poky - -```bash - URI: git://git.yoctoproject.org/poky - layers: meta, meta-yocto, meta-yocto-bsp - branch: thud - revision: e7f0177ef3b6e06b8bc1722fca0241fef08a1530 -``` -* meta-linaro - -```bash - URI: git://git.linaro.org/openembedded/meta-linaro.git - layers: meta-optee - branch: thud - revision: 0a94decea3bd2504590d1637eadff9d502c19ee2 -``` - -* meta-openembedded - -```bash - URI: git://git.openembedded.org/meta-openembedded - layers: meta-oe - branch: thud - revision: 4cd3a39f22a2712bfa8fc657d09fe2c7765a4005 -``` - -## Build Instructions - - -The following instructions require a Poky installation (or equivalent). - -* This also needs git user name and email defined: - -```bash - $ git config --global user.email "you@example.com" - $ git config --global user.name "Your Name" -``` - -* Initialize a build using the 'oe-init-build-env' script in Poky. e.g.: - -```bash - $ source poky/oe-init-build-env -``` - -* After that, initialized configure bblayers.conf by adding meta-rcar-gen3 layer. -e.g.: - -```bash - BBLAYERS ?= " \ - /poky/meta \ - /poky/meta-yocto \ - /poky/meta-yocto-bsp \ - /meta-renesas/meta-rcar-gen3 \ - /meta-linaro/meta-optee \ - /meta-openembedded/meta-oe \ - " -``` - -* To build a specific target BSP, configure the associated machine in local.conf: - -```bash - MACHINE ??= "" -``` - -Board|MACHINE ------|------- -Salvator-X/XS|MACHINE="salvator-x" -Ebisu|MACHINE="ebisu" -Starter Kit Pro (M3ULCB)|MACHINE="m3ulcb" -Starter Kit Pro (M3NULCB)|MACHINE="m3nulcb" -Starter Kit Premier (H3ULCB)|MACHINE="h3ulcb" - -* Select the SOC - - * For H3: r8a7795 - - ```bash - SOC_FAMILY = "r8a7795" - ``` - - * For M3: r8a7796 - - ```bash - SOC_FAMILY = "r8a7796" - ``` - - * For M3N: r8a77965 - - ```bash - SOC_FAMILY = "r8a77965" - ``` - - * For E3: r8a77990 - - ```bash - # Already added in machine config: ebisu.conf - SOC_FAMILY = "r8a77990" - ``` - -* Configure for systemd init in local.conf: - -```bash - DISTRO_FEATURES_append = " systemd" - VIRTUAL-RUNTIME_init_manager = "systemd" -``` - -* Configure for ivi-shell and ivi-extension - -```bash - DISTRO_FEATURES_append = " ivi-shell" -``` - -* Configure for USB 3.0 - -```bash - MACHINE_FEATURES_append = " usb3" -``` - -* Enable tuning support for Capacity Aware migration Strategy (CAS) - -```bash - MACHINE_FEATURES_append = " cas" -``` - -* For a list of sample local.conf file, please refer to: [docs/sample/conf/](docs/sample/conf/) - -* Build the target file system image using bitbake: - -```bash - $ bitbake core-image-minimal -``` - -After completing the images for the target machine will be available in the -output directory 'tmp/deploy/images/'. - -Images generated: - -* Image (generic Linux Kernel binary image file) - -* \-\.dtb (DTB for target machine) - -* core-image-minimal-\.tar.bz2 (rootfs tar+bzip2) - -* core-image-minimal-\.ext4 (rootfs ext4 format) - -## Build Instructions for SDK - - -NOTE: - -**This may be changed in the near feature. These instructions are tentative.** - -Should define the staticdev in SDK image feature for installing the static libs -to SDK in local.conf. - -```bash - SDKIMAGE_FEATURES_append = " staticdev-pkgs" -``` - -### For 64-bit target SDK (aarch64) - - -Use `bitbake -c populate_sdk` for generating the toolchain SDK - -```bash - $ bitbake core-image-minimal -c populate_sdk -``` - -The SDK can be found in the output directory `tmp/deploy/sdk` - -* `poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh` - -### Usage of toolchain SDK - - -Install the SDK to the default: `/opt/poky/x.x` - -* For 64-bit target SDK - -```bash - $ sh poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh -``` - -* For 64-bit application, using environment script in `/opt/poky/x.x` - -```bash - $ source /opt/poky/x.x/environment-setup-aarch64-poky-linux -``` - -## R-Car Generation 3 Information - - -Refer to the following for more information from eLinux website - -https://elinux.org/R-Car diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.proprietary.md b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.proprietary.md deleted file mode 100644 index 22da393d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/README.proprietary.md +++ /dev/null @@ -1,219 +0,0 @@ -# Proprietary libraries for meta-rcar-gen3 - - -The meta-rcar-gen3 layer of meta-renesas is supported Graphic GLES(GSX) -libraries, proprietary library of multimedia, and ICCOM software. - -This README describes how to use these features and setting to local.conf. - -```bash - I/ Board configuration - II/ Build with GLES - III/ Build with Renesas multimedia libraries - IV/ Enable Linux ICCOM driver and Linux ICCOM library -``` - -There are 2 main paths: - -* Please check section II to config for GLES. -* Please check section III to enable Multimedia functions. - -If you would like to use Linux ICCOM driver and Linux ICCOM library, please -check section IV. - -**NOTE:** - -* However, to have a completed local.conf, please also refer to Build -Instruction in [meta-renesas/meta-rcar-gen3/README.md](README.md). - -* In addition, these libraries are not provided with recipes. If you would like -to use, you will need to get them from Renesas. - -## I/ Board configuration - - -* Add this line to local.conf - - * For Salvator-X board - - ```bash - MACHINE = "salvator-x" - ``` - - * For R-Car Starter Kit Premier(H3ULCB) board - - ```bash - MACHINE = "h3ulcb" - ``` - - * For R-Car Starter Kit Pro(M3ULCB) board - - ```bash - MACHINE = "m3ulcb" - ``` - - * For R-Car Starter Kit Pro(M3NULCB) board - - ```bash - MACHINE = "m3nulcb" - ``` - - * For Ebisu board - - ```bash - MACHINE = "ebisu" - ``` - -* Set SOC family name - - * For H3: r8a7795 - - ```bash - SOC_FAMILY = "r8a7795" - ``` - - * For M3: r8a7796 - - ```bash - SOC_FAMILY = "r8a7796" - ``` - - * For M3N: r8a77965 - - ```bash - SOC_FAMILY = "r8a77965" - ``` - - * For E3: r8a77990 - - ```bash - # Already added in machine config: ebisu.conf - SOC_FAMILY = "r8a77990" - ``` - -## II/ Build with GLES - - -For wayland with GSX - -* Please copy proprietary libraries to the directory of recipes. - -* Set local.conf the following. - -```bash - # Enable Gfx Pkgs - MACHINE_FEATURES_append = " gsx" - MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - - # for Wayland/Weston - DISTRO_FEATURES_NATIVESDK_append = " wayland" - DISTRO_FEATURES_append = " pam" - PREFERRED_PROVIDER_virtual/libgles1 = "" - PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" - PREFERRED_PROVIDER_virtual/egl = "libegl" - PREFERRED_PROVIDER_virtual/libgl = "" - PREFERRED_PROVIDER_virtual/mesa = "" - PREFERRED_PROVIDER_libgbm = "libgbm" - PREFERRED_PROVIDER_libgbm-dev = "libgbm" - BBMASK = "mesa-gl" -``` - -* Run `bitbake core-image-weston` - -## III/ Build with Renesas multimedia libraries - - -Multimedia portions depend on GLES portions. - -### A/ Configuration for Multimedia features - - -* Please copy proprietary libraries to the directory of recipes. - -* Please set local.conf the following. - -```bash - # Enable multimedia features. - # This provides package group of plug-ins of the GStreamer, multimedia - # libraries and kernel drivers. - - MACHINE_FEATURES_append = " multimedia" -``` - -### B/ Configuration for optional codecs and middleware - - -* Please copy proprietary libraries to the directory of recipes. - -* Add features to DISTRO_FEATURES_append to local.conf - -```bash - # Additional configuration in OMX module - " h263dec_lib" - for OMX Media Component H263 Decoder Library - " h264dec_lib" - for OMX Media Component H264 Decoder Library - " h264enc_lib" - for OMX Media Component H.264 Encoder Library - " h265dec_lib" - for OMX Media Component H265 Decoder Library - " mpeg2dec_lib" - for OMX Media Component MPEG2 Decoder Library - " mpeg4dec_lib" - for OMX Media Component MPEG4 Decoder Library - " vc1dec_lib" - for OMX Media Component VC-1 Decoder Library - " divxdec_lib" - for OMX Media Component DivX Decoder Library - " rvdec_lib" - for OMX Media Component RealVideo Decoder Library - " alacdec_lib" - for OMX Media Component ALAC Decoder Library - " flacdec_lib" - for OMX Media Component FLAC Decoder Library - " aaclcdec_lib" - for OMX Media Component AAC-LC Decoder Library - " aaclcdec_mdw" - for AAC-LC 2ch Decoder Middleware for Linux - " aacpv2dec_lib" - for OMX Media Component aacPlus V2 Decoder Library - " aacpv2dec_mdw" - for aacPlus V2 Decoder Middleware for Linux - " mp3dec_lib" - for OMX Media Component MP3 Decoder Library - " mp3dec_mdw" - for MP3 Decoder Middleware for Linux - " wmadec_lib" - for OMX Media Component WMA Standard Decoder Library - " wmadec_mdw" - for WMA Standard Decoder Middleware for Linux - " dddec_lib" - for OMX Media Component Dolby(R) Digital Decoder Library - " dddec_mdw" - for Dolby(R) Digital Decoder Middleware for Linux - " aaclcenc_lib" - for OMX Media Component AAC-LC Encoder Library - " vp8dec_lib" - for OMX Media Component VP8 Decoder Library for Linux - " vp8enc_lib" - for OMX Media Component VP8 Encoder Library for Linux - " vp9dec_lib" - for OMX Media Component VP9 Decoder Library for Linux - " aaclcenc_mdw" - for AAC-LC Encoder Middleware for Linux - " cmsbcm" - for CMS Basic Color Management Middleware for Linux - " cmsblc" - for CMS CMM3 Backlight Control Middleware for Linux - " cmsdgc" - for CMS VSP2 Dynamic Gamma Correction Middleware for Linux - " dtv" - for ISDB-T DTV Software Package for Linux - " dvd" - for DVD Core-Middleware for Linux - " adsp" - for ADSP driver, ADSP interface and ADSP framework for Linux - " avb" - for AVB Software Package for Linux -``` - -Ex: -``` - DISTRO_FEATURES_append = " h264dec_lib h265dec_lib mpeg2dec_lib aaclcdec_lib aaclcdec_mdw" -``` - -### C/ Configuration for test packages - - -Must ensure that Multimedia features have been enabled. -(Please refer to III/A to enable Multimedia.) - -* Please add feature to DISTRO_FEATURES_append to local.conf. - -```bash - # Configuration for multimedia test package - - DISTRO_FEATURES_append = " mm-test" -``` - -## IV/ Enable Linux ICCOM driver and Linux ICCOM library - - -For Linux ICCOM driver and Linux ICCOM library - -* Please copy proprietary libraries to the directory of recipes. - -* Please set local.conf the following. - -```bash - DISTRO_FEATURES_append = " iccom" -``` -END. - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/layer.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/layer.conf deleted file mode 100644 index cc52dc6b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/layer.conf +++ /dev/null @@ -1,12 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "rcar-gen3" -BBFILE_PATTERN_rcar-gen3 = "^${LAYERDIR}/" -BBFILE_PRIORITY_rcar-gen3 = "6" - -LAYERSERIES_COMPAT_rcar-gen3 = "thud" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/ebisu.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/ebisu.conf deleted file mode 100644 index 8d53a3f7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/ebisu.conf +++ /dev/null @@ -1,55 +0,0 @@ -#@TYPE: Machine -#@NAME: Ebisu machine -#@DESCRIPTION: Machine configuration for running Ebisu - -SOC_FAMILY = "r8a77990" - -DEFAULTTUNE ?= "cortexa53" -require conf/machine/include/tune-cortexa53.inc -require conf/machine/include/${SOC_FAMILY}.inc - -# 32BIT package install (default is disable) -# This variables can be used only in multilib. -USE_32BIT_PKGS ?= "0" -USE_32BIT_WAYLAND ?= "0" -USE_32BIT_MMP ?= "0" - -MACHINE_FEATURES = "" - -KERNEL_IMAGETYPE = "Image" -IMAGE_FSTYPES_append = " tar.bz2 ext4" - -SERIAL_CONSOLES = "115200;ttySC0" - -# Configuration for kernel -PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" -# Device tree for E3 -KERNEL_DEVICETREE = " \ - renesas/r8a77990-ebisu.dtb \ - renesas/r8a77990-ebisu-4d.dtb \ - renesas/r8a77990-es10-ebisu.dtb \ - renesas/r8a77990-es10-ebisu-4d.dtb \ -" - -# Configuration for ARM Trusted Firmware -EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" - -# u-boot -PREFERRED_VERSION_u-boot = "v2018.09%" -EXTRA_IMAGEDEPENDS += " u-boot" -# E3 u-boot configure -UBOOT_CONFIG ??= "ebisu ebisu-4d" -UBOOT_CONFIG[ebisu] = "r8a77990_ebisu_defconfig" -UBOOT_CONFIG[ebisu-4d] = "r8a77990_ebisu-4d_defconfig" - -# libdrm -PREFERRED_VERSION_libdrm = "2.4.85" - -# xserver-xorg -PREFERRED_VERSION_xserver-xorg = "1.19.6" - -# Add variable to Build Configuration in build log -BUILDCFG_VARS_append = " SOC_FAMILY" - -# Command using to build kernel-module-gles -HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/h3ulcb.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/h3ulcb.conf deleted file mode 100644 index 2161e22a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/h3ulcb.conf +++ /dev/null @@ -1,55 +0,0 @@ -#@TYPE: Machine -#@NAME: H3ULCB machine -#@DESCRIPTION: Machine configuration for running H3ULCB - -SOC_FAMILY = "r8a7795" - -DEFAULTTUNE ?= "cortexa57-cortexa53" -require conf/machine/include/tune-cortexa57-cortexa53.inc -require conf/machine/include/${SOC_FAMILY}.inc - -# 32BIT package install (default is disable) -# This variables can be used only in multilib. -USE_32BIT_PKGS ?= "0" -USE_32BIT_WAYLAND ?= "0" -USE_32BIT_MMP ?= "0" - -MACHINE_FEATURES = "" - -KERNEL_IMAGETYPE = "Image" -IMAGE_FSTYPES_append = " tar.bz2 ext4" - -SERIAL_CONSOLES = "115200;ttySC0" - -# Configuration for kernel -PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" -KERNEL_DEVICETREE = " \ - renesas/r8a7795-h3ulcb.dtb \ - renesas/r8a7795-es1-h3ulcb.dtb \ - renesas/r8a7795-h3ulcb-4x2g.dtb \ -" - -# Configuration for ARM Trusted Firmware -EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" - -# u-boot -PREFERRED_VERSION_u-boot = "v2018.09%" -EXTRA_IMAGEDEPENDS += " u-boot" -# H3ULCB u-boot configure -UBOOT_CONFIG ??= "h3ulcb h3ulcb-4x2g" -UBOOT_CONFIG[h3ulcb] = "r8a7795_ulcb_defconfig" -UBOOT_CONFIG[h3ulcb-4x2g] = "r8a7795_ulcb-4x2g_defconfig" - -# libdrm -PREFERRED_VERSION_libdrm = "2.4.85" - -# xserver-xorg -PREFERRED_VERSION_xserver-xorg = "1.19.6" - -# Add variable to Build Configuration in build log -BUILDCFG_VARS_append = " SOC_FAMILY" - -MACHINEOVERRIDES .= ":ulcb" - -# Command using to build kernel-module-gles -HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7795.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7795.inc deleted file mode 100644 index dda3d76d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7795.inc +++ /dev/null @@ -1,3 +0,0 @@ -SOC_FAMILY =. "rcar-gen3:" -require conf/machine/include/soc-family.inc -LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7796.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7796.inc deleted file mode 100644 index dda3d76d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a7796.inc +++ /dev/null @@ -1,3 +0,0 @@ -SOC_FAMILY =. "rcar-gen3:" -require conf/machine/include/soc-family.inc -LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77965.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77965.inc deleted file mode 100644 index dda3d76d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77965.inc +++ /dev/null @@ -1,3 +0,0 @@ -SOC_FAMILY =. "rcar-gen3:" -require conf/machine/include/soc-family.inc -LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77990.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77990.inc deleted file mode 100644 index dda3d76d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/r8a77990.inc +++ /dev/null @@ -1,3 +0,0 @@ -SOC_FAMILY =. "rcar-gen3:" -require conf/machine/include/soc-family.inc -LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa53.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa53.inc deleted file mode 100644 index ebf2c4f9..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa53.inc +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULTTUNE ?= "cortexa53" -require conf/machine/include/arm/arch-armv8.inc - -TUNEVALID[cortexa53] = "Enable Cortex-A53 specific processor optimizations" -TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -march=armv8-a", "" ,d)}" - -MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa53", "cortexa53:", "" ,d)}" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa53", " -mtune=cortex-a53", "", d)}" - -# Little Endian base configs -AVAILTUNES += "cortexa53" -ARMPKGARCH_tune-cortexa53 = "cortexa53" -TUNE_FEATURES_tune-cortexa53 = "${TUNE_FEATURES_tune-aarch64} cortexa53" -PACKAGE_EXTRA_ARCHS_tune-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-aarch64} cortexa53" -BASE_LIB_tune-cortexa53 = "lib64" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57-cortexa53.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57-cortexa53.inc deleted file mode 100644 index 17f1f255..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57-cortexa53.inc +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULTTUNE ?= "cortexa57-cortexa53" -require conf/machine/include/arm/arch-armv8.inc - -TUNEVALID[cortexa57-cortexa53] = "Enable big.LITTLE Cortex-A57.Cortex-A53 specific processor optimizations" -TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -march=armv8-a", "" ,d)}" - -MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", "cortexa57-cortexa53:", "" ,d)}" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa57-cortexa53", " -mtune=cortex-a57.cortex-a53", "", d)}" - -# Little Endian base configs -AVAILTUNES += "cortexa57-cortexa53" -ARMPKGARCH_tune-cortexa57-cortexa53 = "cortexa57-cortexa53" -TUNE_FEATURES_tune-cortexa57-cortexa53 = "${TUNE_FEATURES_tune-aarch64} cortexa57-cortexa53" -PACKAGE_EXTRA_ARCHS_tune-cortexa57-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-aarch64} cortexa57-cortexa53" -BASE_LIB_tune-cortexa57-cortexa53 = "lib64" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc deleted file mode 100644 index 509aee48..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULTTUNE ?= "cortexa57" -require conf/machine/include/arm/arch-armv8.inc - -TUNEVALID[cortexa57] = "Enable Cortex-A57 specific processor optimizations" -TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", " -march=armv8-a", "" ,d)}" - -MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa57", "cortexa57:", "" ,d)}" - -TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa57", " -mtune=cortex-a57", "", d)}" - -# Little Endian base configs -AVAILTUNES += "cortexa57" -ARMPKGARCH_tune-cortexa57 = "cortexa57" -TUNE_FEATURES_tune-cortexa57 = "${TUNE_FEATURES_tune-aarch64} cortexa57" -PACKAGE_EXTRA_ARCHS_tune-cortexa57 = "${PACKAGE_EXTRA_ARCHS_tune-aarch64} cortexa57" -BASE_LIB_tune-cortexa57 = "lib64" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3nulcb.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3nulcb.conf deleted file mode 100644 index 06fb9a7b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3nulcb.conf +++ /dev/null @@ -1,45 +0,0 @@ -#@TYPE: Machine -#@NAME: M3NULCB machine -#@DESCRIPTION: Machine configuration for running M3NULCB - -SOC_FAMILY = "r8a77965" - -DEFAULTTUNE ?= "cortexa57" -require conf/machine/include/tune-cortexa57.inc -require conf/machine/include/${SOC_FAMILY}.inc - -# 32BIT package install (default is disable) -# This variables can be used only in multilib. -USE_32BIT_PKGS ?= "0" -USE_32BIT_WAYLAND ?= "0" -USE_32BIT_MMP ?= "0" - -MACHINE_FEATURES = "" - -KERNEL_IMAGETYPE = "Image" -IMAGE_FSTYPES_append = " tar.bz2 ext4" - -SERIAL_CONSOLES = "115200;ttySC0" - -# Configuration for kernel -PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" -KERNEL_DEVICETREE = "renesas/r8a77965-m3nulcb.dtb" - -# Configuration for ARM Trusted Firmware -EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" - -# u-boot -PREFERRED_VERSION_u-boot = "v2018.09%" -EXTRA_IMAGEDEPENDS += " u-boot" -UBOOT_MACHINE = "r8a77965_ulcb_defconfig" - -# libdrm -PREFERRED_VERSION_libdrm = "2.4.85" - -# Add variable to Build Configuration in build log -BUILDCFG_VARS_append = " SOC_FAMILY" - -MACHINEOVERRIDES .= ":ulcb" - -# Command using to build kernel-module-gles -HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3ulcb.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3ulcb.conf deleted file mode 100644 index 50e6ba52..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/m3ulcb.conf +++ /dev/null @@ -1,48 +0,0 @@ -#@TYPE: Machine -#@NAME: M3ULCB machine -#@DESCRIPTION: Machine configuration for running M3ULCB - -SOC_FAMILY = "r8a7796" - -DEFAULTTUNE ?= "cortexa57-cortexa53" -require conf/machine/include/tune-cortexa57-cortexa53.inc -require conf/machine/include/${SOC_FAMILY}.inc - -# 32BIT package install (default is disable) -# This variables can be used only in multilib. -USE_32BIT_PKGS ?= "0" -USE_32BIT_WAYLAND ?= "0" -USE_32BIT_MMP ?= "0" - -MACHINE_FEATURES = "" - -KERNEL_IMAGETYPE = "Image" -IMAGE_FSTYPES_append = " tar.bz2 ext4" - -SERIAL_CONSOLES = "115200;ttySC0" - -# Configuration for kernel -PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" -KERNEL_DEVICETREE = "renesas/r8a7796-m3ulcb.dtb" - -# Configuration for ARM Trusted Firmware -EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" - -# u-boot -PREFERRED_VERSION_u-boot = "v2018.09%" -EXTRA_IMAGEDEPENDS += " u-boot" -UBOOT_MACHINE = "r8a7796_ulcb_defconfig" - -# libdrm -PREFERRED_VERSION_libdrm = "2.4.85" - -# xserver-xorg -PREFERRED_VERSION_xserver-xorg = "1.19.6" - -# Add variable to Build Configuration in build log -BUILDCFG_VARS_append = " SOC_FAMILY" - -MACHINEOVERRIDES .= ":ulcb" - -# Command using to build kernel-module-gles -HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/salvator-x.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/salvator-x.conf deleted file mode 100644 index 27cbf4e9..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/salvator-x.conf +++ /dev/null @@ -1,84 +0,0 @@ -#@TYPE: Machine -#@NAME: Salvator-X machine -#@DESCRIPTION: Machine configuration for running Salvator-X - -require conf/machine/include/${SOC_FAMILY}.inc -# Add default tune for H3/M3 -DEFAULTTUNE ?= "cortexa57-cortexa53" -# Add default tune for M3N -DEFAULTTUNE_r8a77965 = "cortexa57" - -# Add tune configure file for M3N -TUNE_CONF ?= "conf/machine/include/tune-cortexa57-cortexa53.inc" -TUNE_CONF_r8a77965 = "conf/machine/include/tune-cortexa57.inc" - -require ${TUNE_CONF} - -# 32BIT package install (default is disable) -# This variables can be used only in multilib. -USE_32BIT_PKGS ?= "0" -USE_32BIT_WAYLAND ?= "0" -USE_32BIT_MMP ?= "0" - -MACHINE_FEATURES = "" - -KERNEL_IMAGETYPE = "Image" -IMAGE_FSTYPES_append = " tar.bz2 ext4" - -SERIAL_CONSOLES = "115200;ttySC0" - -# Configuration for kernel -PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" -# Device tree for H3 -KERNEL_DEVICETREE_r8a7795 = " \ - renesas/r8a7795-es1-salvator-x.dtb \ - renesas/r8a7795-salvator-x.dtb \ - renesas/r8a7795-salvator-xs.dtb \ - renesas/r8a7795-salvator-xs-2x2g.dtb \ - renesas/r8a7795-salvator-xs-4x2g.dtb \ -" -# Device tree for M3 -KERNEL_DEVICETREE_r8a7796 = " \ - renesas/r8a7796-salvator-x.dtb \ - renesas/r8a7796-salvator-xs.dtb \ - renesas/r8a7796-salvator-xs-2x4g.dtb \ -" -# Device tree for M3N -KERNEL_DEVICETREE_r8a77965 = " \ - renesas/r8a77965-salvator-x.dtb \ - renesas/r8a77965-salvator-xs.dtb \ -" - -# Configuration for ARM Trusted Firmware -EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" - -# u-boot -PREFERRED_VERSION_u-boot = "v2018.09%" -EXTRA_IMAGEDEPENDS += " u-boot" -# H3 u-boot configure -UBOOT_CONFIG_r8a7795 ??= "r8a7795_salvator-x r8a7795_salvator-xs r8a7795_salvator-xs-2x2g r8a7795_salvator-xs-4x2g" -UBOOT_CONFIG[r8a7795_salvator-x] = "r8a7795_salvator-x_defconfig" -UBOOT_CONFIG[r8a7795_salvator-xs] = "r8a7795_salvator-xs_defconfig" -UBOOT_CONFIG[r8a7795_salvator-xs-2x2g] = "r8a7795_salvator-xs-2x2g_defconfig" -UBOOT_CONFIG[r8a7795_salvator-xs-4x2g] = "r8a7795_salvator-xs-4x2g_defconfig" -# M3 u-boot configure -UBOOT_CONFIG_r8a7796 ??= "r8a7796_salvator-x r8a7796_salvator-xs r8a7796_salvator-xs-2x4g" -UBOOT_CONFIG[r8a7796_salvator-x] = "r8a7796_salvator-x_defconfig" -UBOOT_CONFIG[r8a7796_salvator-xs] = "r8a7796_salvator-xs_defconfig" -UBOOT_CONFIG[r8a7796_salvator-xs-2x4g] = "r8a7796_salvator-xs-2x4g_defconfig" -# M3N u-boot configure -UBOOT_CONFIG_r8a77965 ??= "r8a77965_salvator-x r8a77965_salvator-xs" -UBOOT_CONFIG[r8a77965_salvator-x] = "r8a77965_salvator-x_defconfig" -UBOOT_CONFIG[r8a77965_salvator-xs] = "r8a77965_salvator-xs_defconfig" - -# libdrm -PREFERRED_VERSION_libdrm = "2.4.85" - -# xserver-xorg -PREFERRED_VERSION_xserver-xorg = "1.19.6" - -# Add variable to Build Configuration in build log -BUILDCFG_VARS_append = " SOC_FAMILY" - -# Command using to build kernel-module-gles -HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs-book.yml b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs-book.yml deleted file mode 100644 index 5c54809a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs-book.yml +++ /dev/null @@ -1,18 +0,0 @@ -type: books -books: -- - id: hardware-support - title: Renesas Gen3 Boards - title_fr: Cartes Renesas Gen3 - description: - keywords: - author: - version: master - dst_prefix: renesas-gen3 - chapters: - - name: meta-rcar-gen3 Layer - url: "README.md" - destination: "gen3.md" - - name: Proprietary Drivers - url: "README.proprietary.md" - destination: "proprietary.md" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local-wayland.conf deleted file mode 100644 index 51d1e75f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,271 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local.conf deleted file mode 100644 index 52a23fe8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/bsp/local.conf +++ /dev/null @@ -1,264 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 83d8eb2e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,277 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/local-wayland.conf deleted file mode 100644 index 2ad6044f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/linaro-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,383 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf deleted file mode 100644 index 3b2c068a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - ${TOPDIR}/../meta-linaro/meta-optee \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf deleted file mode 100644 index b9fde5c6..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,279 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf deleted file mode 100644 index bcbcef15..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf +++ /dev/null @@ -1,272 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 150e894f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,285 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf deleted file mode 100644 index 0f606bf7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,391 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "ebisu" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local-wayland.conf deleted file mode 100644 index cfc98c06..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,271 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local.conf deleted file mode 100644 index c7b7b533..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/bsp/local.conf +++ /dev/null @@ -1,264 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 5785f2a2..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,277 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/local-wayland.conf deleted file mode 100644 index 14f4c607..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/linaro-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,383 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf deleted file mode 100644 index 3b2c068a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - ${TOPDIR}/../meta-linaro/meta-optee \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf deleted file mode 100644 index 57535bd6..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,279 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf deleted file mode 100644 index 3eb69269..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf +++ /dev/null @@ -1,272 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 683ae4ec..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,285 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf deleted file mode 100644 index 9b2cb09d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,391 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "h3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local-wayland.conf deleted file mode 100644 index 7e71ed0c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,268 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local.conf deleted file mode 100644 index 087a3a3e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/bsp/local.conf +++ /dev/null @@ -1,261 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 204a5043..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,274 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/local-wayland.conf deleted file mode 100644 index b0eedb19..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/linaro-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,380 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf deleted file mode 100644 index 3b2c068a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - ${TOPDIR}/../meta-linaro/meta-optee \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf deleted file mode 100644 index 0a4a79be..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,265 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf deleted file mode 100644 index 4114bd5d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf +++ /dev/null @@ -1,258 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 77d6778d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,271 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf deleted file mode 100644 index a73b537b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,377 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3nulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local-wayland.conf deleted file mode 100644 index 0b6f13c4..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,271 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local.conf deleted file mode 100644 index 3c63eff8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/bsp/local.conf +++ /dev/null @@ -1,264 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index dba007a6..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,277 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/local-wayland.conf deleted file mode 100644 index a96df786..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/linaro-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,383 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf deleted file mode 100644 index 3b2c068a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - ${TOPDIR}/../meta-linaro/meta-optee \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf deleted file mode 100644 index d953c74a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,279 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf deleted file mode 100644 index 672e16b8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf +++ /dev/null @@ -1,272 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 7b8f40cf..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,285 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf deleted file mode 100644 index 3300326e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,391 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "m3ulcb" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-ltp.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-ltp.conf deleted file mode 100644 index 9dd4d907..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-ltp.conf +++ /dev/null @@ -1,274 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-sdk" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" - -# Additional packages for LTP -DISTRO_FEATURES_append = " pam" -CORE_IMAGE_EXTRA_INSTALL_append = " ltp" -IMAGE_INSTALL_append = " binutils elfutils file quota tar bzip2 sudo shadow glibc-utils net-tools procps cdrkit kernel-modules" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-wayland.conf deleted file mode 100644 index ab2e8156..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,280 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local.conf deleted file mode 100644 index 29c0f5db..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/bsp/local.conf +++ /dev/null @@ -1,273 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index 3d798264..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,286 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/bblayers.conf deleted file mode 100644 index 96ff8ada..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,16 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-linaro-toolchain \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/local-wayland.conf deleted file mode 100644 index 085d9119..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/linaro-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,395 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# Linaro GCC -GCCVERSION = "linaro-7.2" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf deleted file mode 100644 index 3b2c068a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - ${TOPDIR}/../meta-linaro/meta-optee \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf deleted file mode 100644 index cfff0538..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf +++ /dev/null @@ -1,284 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-sdk" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" - -# Additional packages for LTP -DISTRO_FEATURES_append = " pam" -CORE_IMAGE_EXTRA_INSTALL_append = " ltp" -IMAGE_INSTALL_append = " binutils elfutils file quota tar bzip2 sudo shadow glibc-utils net-tools procps cdrkit kernel-modules" - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf deleted file mode 100644 index 9b28b4e1..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf +++ /dev/null @@ -1,288 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# for Wayland/Weston weston-laucher -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" - -# Mask the wayland related to GFX -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Mask the gstreamer recipe for MMP -BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf deleted file mode 100644 index 33c4cc2d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf +++ /dev/null @@ -1,281 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Mask graphic Pkgs -BBMASK .= "|gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Enable pam distro feature -DISTRO_FEATURES_append = " pam" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf deleted file mode 100644 index ea63a57c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf +++ /dev/null @@ -1,294 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" -# Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" - -# Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf deleted file mode 100644 index 882db523..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf +++ /dev/null @@ -1,15 +0,0 @@ -# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf -# changes incompatibly -POKY_BBLAYERS_CONF_VERSION = "2" - -BBPATH = "${TOPDIR}" -BBFILES ?= "" - -BBLAYERS ?= " \ - ${TOPDIR}/../poky/meta \ - ${TOPDIR}/../poky/meta-poky \ - ${TOPDIR}/../poky/meta-yocto-bsp \ - ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ - ${TOPDIR}/../meta-linaro/meta-optee \ - ${TOPDIR}/../meta-openembedded/meta-oe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf deleted file mode 100644 index 91f3c163..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf +++ /dev/null @@ -1,403 +0,0 @@ -# -# This file is your local configuration file and is where all local user settings -# are placed. The comments in this file give some guide to the options a new user -# to the system might want to change but pretty much any configuration option can -# be set in this file. More adventurous users can look at local.conf.extended -# which contains other examples of configuration which can be placed in this file -# but new users likely won't need any of them initially. -# -# Lines starting with the '#' character are commented out and in some cases the -# default values are provided as comments to show people example syntax. Enabling -# the option is a question of removing the # character and making any change to the -# variable as required. - -# -# Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "mpc8315e-rdb" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86 if no other machine is selected: -MACHINE ??= "salvator-x" - -# This sets the SoC -# H3: r8a7795, M3: r8a7796, M3N: r8a77965 -SOC_FAMILY = "r8a7795" -#SOC_FAMILY = "r8a7796" -#SOC_FAMILY = "r8a77965" - -# -# Where to place downloads -# -# During a first build the system will download many different source code tarballs -# from various upstream projects. This can take a while, particularly if your network -# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you -# can preserve this directory to speed up this part of subsequent builds. This directory -# is safe to share between multiple builds on the same machine too. -# -# The default is a downloads directory under TOPDIR which is the build directory. -# -#DL_DIR ?= "${TOPDIR}/downloads" - -# -# Where to place shared-state files -# -# BitBake has the capability to accelerate builds based on previously built output. -# This is done using "shared state" files which can be thought of as cache objects -# and this option determines where those files are placed. -# -# You can wipe out TMPDIR leaving this directory intact and the build would regenerate -# from these files if no changes were made to the configuration. If changes were made -# to the configuration, only shared state files where the state was still valid would -# be used (done using checksums). -# -# The default is a sstate-cache directory under TOPDIR. -# -#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" - -# -# Where to place the build output -# -# This option specifies where the bulk of the building work should be done and -# where BitBake should place its temporary files and output. Keep in mind that -# this includes the extraction and compilation of many applications and the toolchain -# which can use Gigabytes of hard disk space. -# -# The default is a tmp directory under TOPDIR. -# -#TMPDIR = "${TOPDIR}/tmp" - -# -# Default policy config -# -# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults. -# -DISTRO ?= "poky" -# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users. -# DISTRO ?= "poky-bleeding" - -# -# Package Management configuration -# -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) -# - 'package_rpm' for rpm style packages -# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" -# We default to rpm: -PACKAGE_CLASSES ?= "package_rpm" - -# -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686 and x86_64 -#SDKMACHINE ?= "i686" - -# -# Extra image configuration defaults -# -# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated -# images. Some of these options are added to certain image types automatically. The -# variable can contain the following options: -# "dbg-pkgs" - add -dbg packages for all installed packages -# (adds symbol information for debugging/profiling) -# "dev-pkgs" - add -dev packages for all installed packages -# (useful if you want to develop against libs in the image) -# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages -# (useful if you want to run the package test suites) -# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) -# "tools-debug" - add debugging tools (gdb, strace) -# "eclipse-debug" - add Eclipse remote debugging support -# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) -# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) -# "debug-tweaks" - make an image suitable for development -# e.g. ssh root access has a blank password -# There are other application targets that can be used here too, see -# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. -# We default to enabling the debugging tweaks. -EXTRA_IMAGE_FEATURES ?= "debug-tweaks" - -# -# Additional image features -# -# The following is a list of additional classes to use when building images which -# enable extra features. Some available options which can be included in this variable -# are: -# - 'buildstats' collect build statistics -# - 'image-mklibs' to reduce shared library files size for an image -# - 'image-prelink' in order to prelink the filesystem image -# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink -# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended -USER_CLASSES ?= "buildstats image-mklibs image-prelink" - -# -# Runtime testing of images -# -# The build system can test booting virtual machine images under qemu (an emulator) -# after any root filesystems are created and run tests against those images. To -# enable this uncomment this line. See classes/testimage(-auto).bbclass for -# further details. -#TEST_IMAGE = "1" -# -# Interactive shell configuration -# -# Under certain circumstances the system may need input from you and to do this it -# can launch an interactive shell. It needs to do this since the build is -# multithreaded and needs to be able to handle the case where more than one parallel -# process may require the user's attention. The default is iterate over the available -# terminal types to find one that works. -# -# Examples of the occasions this may happen are when resolving patches which cannot -# be applied, to use the devshell or the kernel menuconfig -# -# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none -# Note: currently, Konsole support only works for KDE 3.x due to the way -# newer Konsole versions behave -#OE_TERMINAL = "auto" -# By default disable interactive patch resolution (tasks will just fail instead): -PATCHRESOLVE = "noop" - -# -# Disk Space Monitoring during the build -# -# Monitor the disk space during the build. If there is less that 1GB of space or less -# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully -# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort -# of the build. The reason for this is that running completely out of space can corrupt -# files and damages the build in ways which may not be easily recoverable. -# It's necesary to monitor /tmp, if there is no space left the build will fail -# with very exotic errors. -BB_DISKMON_DIRS ??= "\ - STOPTASKS,${TMPDIR},1G,100K \ - STOPTASKS,${DL_DIR},1G,100K \ - STOPTASKS,${SSTATE_DIR},1G,100K \ - STOPTASKS,/tmp,100M,100K \ - ABORT,${TMPDIR},100M,1K \ - ABORT,${DL_DIR},100M,1K \ - ABORT,${SSTATE_DIR},100M,1K \ - ABORT,/tmp,10M,1K" - -# -# Shared-state files from other locations -# -# As mentioned above, shared state files are prebuilt cache data objects which can -# used to accelerate build time. This variable can be used to configure the system -# to search other mirror locations for these objects before it builds the data itself. -# -# This can be a filesystem directory, or a remote url such as http or ftp. These -# would contain the sstate-cache results from previous builds (possibly from other -# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the -# cache locations to check for the shared objects. -# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH -# at the end as shown in the examples below. This will be substituted with the -# correct path within the directory structure. -#SSTATE_MIRRORS ?= "\ -#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ -#file://.* file:///some/local/dir/sstate/PATH" - -# -# Yocto Project SState Mirror -# -# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting the following line. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# equally, it will also speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network. -# -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" - -# -# Qemu configuration -# -# By default qemu will build with a builtin VNC server where graphical output can be -# seen. The two lines below enable the SDL backend too. By default libsdl2-native will -# be built, if you want to use your host's libSDL instead of the minimal libsdl built -# by libsdl2-native then uncomment the ASSUME_PROVIDED line below. -PACKAGECONFIG_append_pn-qemu-native = " sdl" -PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" -#ASSUME_PROVIDED += "libsdl2-native" - -# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to -# track the version of this file when it was generated. This can safely be ignored if -# this doesn't mean anything to you. -CONF_VERSION = "1" - -# Add systemd configuration -DISTRO_FEATURES_append = " systemd" -VIRTUAL-RUNTIME_init_manager = "systemd" - -# add the static lib to SDK toolchain -SDKIMAGE_FEATURES_append = " staticdev-pkgs" - -# Disable optee in meta-linaro layer -BBMASK = "meta-linaro/meta-optee/recipes-security/optee" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# for Wayland/Weston -DISTRO_FEATURES_NATIVESDK_append = " wayland" -DISTRO_FEATURES_append = " pam" -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "libegl" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "" -PREFERRED_PROVIDER_virtual/libgbm = "libgbm" -PREFERRED_PROVIDER_libgbm-dev = "libgbm" -BBMASK .= "|mesa-gl" - -# Enable Multimedia features -MACHINE_FEATURES_append = " multimedia" - -# for gstreamer omx plugins -LICENSE_FLAGS_WHITELIST = "commercial" -# for mmp test program -DISTRO_FEATURES_append = " mm-test" - -# for weston v4l2 renderer -#DISTRO_FEATURES_append = " v4l2-renderer" - -# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) -#DISTRO_FEATURES_append = " h263dec_lib" - -# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) -DISTRO_FEATURES_append = " h264dec_lib" - -# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) -#DISTRO_FEATURES_append = " h264enc_lib" - -# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) -#DISTRO_FEATURES_append = " h265dec_lib" - -# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) -#DISTRO_FEATURES_append = " mpeg2dec_lib" - -# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) -#DISTRO_FEATURES_append = " mpeg4dec_lib" - -# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) -#DISTRO_FEATURES_append = " vc1dec_lib" - -# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) -#DISTRO_FEATURES_append = " divxdec_lib" - -# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) -#DISTRO_FEATURES_append = " rvdec_lib" - -# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) -#DISTRO_FEATURES_append = " alacdec_lib" - -# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) -#DISTRO_FEATURES_append = " flacdec_lib" - -# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), -# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) -DISTRO_FEATURES_append = " aaclcdec_lib" -DISTRO_FEATURES_append = " aaclcdec_mdw" - -# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), -# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) -#DISTRO_FEATURES_append = " aacpv2dec_lib" -#DISTRO_FEATURES_append = " aacpv2dec_mdw" - -# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), -# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) -#DISTRO_FEATURES_append = " mp3dec_lib" -#DISTRO_FEATURES_append = " mp3dec_mdw" - -# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), -# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) -#DISTRO_FEATURES_append = " wmadec_lib" -#DISTRO_FEATURES_append = " wmadec_mdw" - -# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) -# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) -#DISTRO_FEATURES_append = " aaclcenc_lib" -#DISTRO_FEATURES_append = " aaclcenc_mdw" - -# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), -# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) -#DISTRO_FEATURES_append = " dddec_lib" -#DISTRO_FEATURES_append = " dddec_mdw" - -# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) -#DISTRO_FEATURES_append = " vp8dec_lib" - -# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) -#DISTRO_FEATURES_append = " vp8enc_lib" - -# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) -#DISTRO_FEATURES_append = " vp9dec_lib" - -# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) -#DISTRO_FEATURES_append = " cmsbcm" - -# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) -#DISTRO_FEATURES_append = " cmsblc" - -# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) -#DISTRO_FEATURES_append = " cmsdgc" - -# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) -#DISTRO_FEATURES_append = " dtv" - -# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) -# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) -#DISTRO_FEATURES_append = " dvd" -#DISTRO_FEATURES_append = " dvd_encryption_library" - -# ADSP Driver for Linux (RCG3AHPDL4101ZDO) -# ADSP Interface for Linux (RCG3AHIFL4101ZDP) -# ADSP Framework (RCG3AHFWN0201ZDP) -#DISTRO_FEATURES_append = " adsp" - -# AVB Software Package for Linux -#DISTRO_FEATURES_append = " avb" - -# Linux ICCOM driver (RCG3ZLIDL4101ZNO) -# Linux ICCOM library (RCG3ZLILL4101ZNO) -#DISTRO_FEATURES_append = " iccom" - -# Evaluation packages -#DISTRO_FEATURES_append = " use_eva_pkg" - -# Configuration for ivi-shell and ivi-extension -#DISTRO_FEATURES_append = " ivi-shell" - -# Configuration for USB 3.0 -#MACHINE_FEATURES_append = " usb3" - -# Add Capacity Aware migration Strategy (CAS) -MACHINE_FEATURES_append = " cas" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh deleted file mode 100755 index fd867b34..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh +++ /dev/null @@ -1,1032 +0,0 @@ -#!/bin/sh - -# Copyright (C) Renesas Electronics Corporation 2016-2018 All rights reserved. - -usage() -{ -cat << EOF - usage: `basename $0` [-f] [-d] source-directory - -f: fource copy. ignore md5check - -d: debug mode - - Ex) - `basename $0` -f my_package_dir -EOF -} - -##### MD5 list ##### -. `dirname $0`/md5list.txt - -##### Library List ##### -# Audio Library -# Please add omx audio library to "_audio_list" -# Don't use space in xxx_name. -# audio_list=",, \ -# ,, \ -# ,," -_audio_list="AAC-LC_decoder_lib,EVARTM0AC0000XAAACD30SL41C,RTM0AC0000XAAACD30SL41C.tar.gz \ - AAC-LC_encoder_lib,EVARTM0AC0000XAAACE30SL41C,RTM0AC0000XAAACE30SL41C.tar.gz" - -# Audio M/W Library -# Please add omx audio library to "_audio_mw_list" -# Don't use space in xxx_name. -# audio_mw_list=",, \ -# ,, \ -# ,," -_audio_mw_list="AAC-LC_decoder_M/W,EVARTM0AC0000ADAACMZ1SL41C,RTM0AC0000ADAACMZ1SL41C.tar.gz \ - AAC-LC_encoder_M/W,EVARTM0AC0000AEAACMZ1SL41C,RTM0AC0000AEAACMZ1SL41C.tar.gz" - -# Video Decoder Library -# Please add omx video decoder library to "_video_dec_list" -# Don't use space in xxx_name. -# video_dec_list=",, \ -# ,, \ -# ,," -_video_dec_list="H264_decoder,EVARTM0AC0000XV264D30SL41C,EVARTM0AC0000XV264D30SL41C.tar.bz2" - -# Video Encoder Library -# Please add omx video encoder library to "_video_enc_list" -# Don't use space in xxx_name. -# video_enc_list=",, \ -# ,, \ -# ,," -_video_enc_list="H264_encoder,EVARTM0AC0000XV264E30SL41C,EVARTM0AC0000XV264E30SL41C.tar.bz2" - -# Common library packages -# Don't use space in xxx_name. -# XXX_list=",, \ -# ,, \ -# ,," -_omx_common_list="omx_common_lib,EVARTM0AC0000XCMCTL30SL41C,EVARTM0AC0000XCMCTL30SL41C.tar.bz2" -_uvcs_list="uvcs_lib,RCG3VUDRL4101ZDO,RCG3VUDRL4101ZDO.tar.bz2" -_video_enc_common_list="video_enc_common,EVARTM0AC0000XVCMNE30SL41C,EVARTM0AC0000XVCMNE30SL41C.tar.bz2" -_video_dec_common_list="video_dec_common,EVARTM0AC0000XVCMND30SL41C,EVARTM0AC0000XVCMND30SL41C.tar.bz2" -_audio_common_list="audio_common,EVARTM0AC0000XACMND30SL41C,RTM0AC0000XACMND30SL41C.tar.gz" - -# GFX -# Please add GFX to "_gfx_list" -# Don't use space in xxx_name. -# gfx_list=",,, \ -# ,,, \ -# ,,," -_gfx_list="EVARTM0RC7795GLPG0001SL41C,EVA_r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ - EVARTM0RC7796GLPG0001SL41C,EVA_r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2" - -##### static value -_MODE_ZIP=1 -_MODE_TAR=2 -_GFX_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles" -_GFX_UM_INST_DIR="../meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module" -_UVCS_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv" -_OMX_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module" - -##### common function - -# $1: search file name -# $2: search directory -# return global variable -# _find_filename: find filename -# _extract_mode: _MODE_ZIP or _MODE_TAR -func_cmn_find_file() -{ -# echo "$1" -# echo "$2" - if [ -z "$1" ]; then - func_error "ERROR: func_cmn_find_file: empty filename" - fi - - if [ -z "$2" ]; then - _search_dir=${_src_full} - else - _search_dir=$2 - fi - - # search zip file -# zip_count=`find ${_search_dir} -maxdepth 1 -name "$1*.zip" | wc -l` - zip_count=`ls ${_search_dir}/$1*.zip 2>/dev/null | wc -l` - - # search tar file -# tar_count=`find ${_search_dir} -maxdepth 1 -name "$1*.tar.*" | wc -l` - tar_count=`ls ${_search_dir}/$1*.tar.* 2>/dev/null | wc -l` - - # duplicate file check - if [ 1 -lt `expr $zip_count + $tar_count` ]; then - echo "file1_zip = $zip_count" - echo "file1_tar = $tar_count" - func_error "ERROR: $1: too many files" - fi - - # set result - if [ 1 = $zip_count ]; then - _find_filename=$(ls ${_search_dir}/$1*.zip) - _extract_mode=${_MODE_ZIP} - elif [ 1 = $tar_count ]; then - _find_filename=$(ls ${_search_dir}/$1*.tar.*) - _extract_mode=${_MODE_TAR} - else - _find_filename="" - fi -} - -# $1: Mode -# $2: archive file name -func_cmn_extract_archive() -{ - case $1 in - $_MODE_ZIP) -# echo "Zip mode" - unzip -oq $2 - ;; - $_MODE_TAR) -# echo "Tar mode" - tar xf $2 - ;; - *) - func_error "ERROR: func_cmn_extract_archive: mode error." - exit 1 - ;; - esac -} - -# $1: set target filename. -# $2: set MD5 expectation value. -func_cmn_md5_check() -{ - _md5_func_param_filename=$1 - _md5_func_param_expectation=$2 - if [ ! -e ${_md5_func_param_filename} ]; then - func_error "func_cmn_md5_check : ERROR ${_md5_func_param_filename} not found." - fi - - _calc_md5=$(md5sum ${_md5_func_param_filename} | cut -d " " -f1) - - if [ -n "${_no_md5check}" ] || [ -z ${_md5_func_param_expectation} ]; then - echo "Skip MD5 : `basename ${_md5_func_param_filename}`" - return - fi - - if [ -n "${_debug}" ]; then - echo "MD5 target file = ${_md5_func_param_filename}" - echo "calc_md5 = ${_calc_md5}" - echo "expect_value = ${_md5_func_param_expectation}" - fi - - if [ ${_calc_md5} = ${_md5_func_param_expectation} ]; then - echo "MD5 OK : `basename ${_md5_func_param_filename}`" - else - echo "calc_md5 = ${_calc_md5}" - echo "expect_value = ${_md5_func_param_expectation}" - func_error "MD5 ERROR : ${_md5_func_param_filename}" - fi -} - -##### Error function -# $1: error message -func_error() -{ - echo "$1" - # cleanup temp directory. - func_clean_tempdir - exit 1 -} - -##### cleanup temp directory -func_clean_tempdir() -{ - echo "cleanup temp directory" - rm -rf ${TMPWORK} -} - -##### Template function for Single package - -# $1: package name -# $2: search target filename -# $3: search directory (full path) -# return -# _find_filename : the found file (full path) -# _extract_top_dir_name -func_search_file_in_package() -{ - # search package file - func_cmn_find_file $1 $3 - if [ -n "${_debug}" ]; then - echo "" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - # Get directory name - # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # search file - num=`find ${top_dir} -name $2 | wc -l` - if [ ${num} -eq 1 ]; then - _find_filename=`find ${top_dir} -name $2` - else - # same filename exists. - _find_filename=`find ${top_dir} -name $2 | grep Software` - fi - - # set mode - if [ `echo ${_find_filename} | grep '\.'zip` ]; then - _extract_mode=${_MODE_ZIP} - else - _extract_mode=${_MODE_TAR} - fi - - # set return value - _extract_top_dir_name=${top_dir} -} - -# $1: package name -# $2: copy filename (md5 target) -# $3: expect MD5 value -# $4: search directory (full path) -# return -# _find_file_name -# _extract_top_dir_name -func_search_and_md5check() -{ - # search package file - func_cmn_find_file $1 $4 - if [ -n "${_debug}" ]; then - echo "" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - # MD5 - # Get directory name - # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # call func_cmn_md5_check -# func_cmn_md5_check "${top_dir}/$1/Software/$2" "$3" - - # set return value - _extract_top_dir_name=${top_dir} -} - -##### Template function for Group package -# $1: group package name -# $2: single package name -# $3: copy filename (md5 target) -# $4: expect MD5 value -# $5: search directory (full path) -# return -# _find_file_name -# _extract_top_dir_name -# -# NOTE) This function support level1 packaging. "grp pkg in grp pkg" dose note support. -func_search_and_md5check_grp() -{ - # search group package @SRCDIR - func_cmn_find_file $1 $5 - if [ -n "${_debug}" ]; then - echo "search group package" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - echo "" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract group package @TMPWORK - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - cd ${_find_filename} - # check group pachage structure - # _/Package_Info.txt - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - if [ ! -e ${top_dir}/Package_Info.txt ]; then - echo "grp package = $1" - echo "single package = $2" - func_error "ERROR: Package_Info.txt not found in Group package." - fi - - # search single package @TMPWORK/TOPDIR// - func_cmn_find_file $2 "${TMPWORK}/${top_dir}/$1" - if [ -n "${_debug}" ]; then - echo "search single package" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - echo "" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # mv TMPWORK/. - mv ${_find_filename} ${TMPWORK}/. - - # delete group package - rm -rf ${TMPWORK}/${top_dir} - - # call search and md5check @TMPWORK - func_search_and_md5check $2 $3 $4 ${TMPWORK} -} - -##### File search and MD5check for Package list -# $1: package list -# $2: rigid flag (1: true, other: false) -# -# return -# 1: [Success] One or more files were found. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_md5check () -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'${pkg_name}` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - # rigid flag = TRUE. Not found = ERROR - if [ "X$2" = "X1" ]; then - return 0 - fi - else - find_flag=1 - fi - done - - return ${find_flag} -} - -##### File search and install (without MD5check) for Package list -# -# $1: package list -# $2: install directory -# -# return -# 1: [Success] One or more files were installed. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_install_wo_md5check() -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'$pkg_name` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - copyfile_name=$(basename ${copyfile_name}) - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - # file search - func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - else - find_flag=1 - - # install - install -d $2 - install -m 0644 ${_find_filename} $2 - echo "Installed $sw_name" - echo " : ${pkg_name}" - fi - done - - return ${find_flag} -} - -##### File search and install for Package list -# -# $1: package list -# $2: install directory -# -# return -# 1: [Success] One or more files were installed. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_install() -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'$pkg_name` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - # seach & MD5 check - func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - else - find_flag=1 - - # Get directory name - # _find_filename = pkg file (full path). It is not copyfile. - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # install - install -d $2 - install -m 0644 ${top_dir}/${pkg_name}/Software/${copyfile_name} $2 - echo "Installed $sw_name" - echo " : ${pkg_name}" - fi - done - - return ${find_flag} -} - -##### Package function - -# For 3D graphics packages -func_gfx() -{ - echo "" - echo "Copying for Graphic Packages" - - copy_flag=0 - - for i in ${_gfx_list} - do - user_pkg_name=`echo $i | cut -d "," -f 1` - user_copyfile_name=`echo $i | cut -d "," -f 2` - user_md5_val=`eval echo '$_MD5_'${user_pkg_name}` - kern_pkg_name=`echo $i | cut -d "," -f 3` - kern_copyfile_name=`echo $i | cut -d "," -f 4` - kern_md5_val=`eval echo '$_MD5_'${kern_pkg_name}` - - if [ -n "${_debug}" ]; then - echo "" - echo "user_pkg_name = ${user_pkg_name}" - echo "user_copyfile_name= ${user_copyfile_name}" - echo "user_md5_val = ${user_md5_val}" - echo "kern_pkg_name = ${kern_pkg_name}" - echo "kern_copyfile_name= ${kern_copyfile_name}" - echo "kern_md5_val = ${kern_md5_val}" - fi - - # user module (file1) - func_search_and_md5check "${user_pkg_name}" "${user_copyfile_name}" "${user_md5_val}" "${_src_full}" - - if [ -z "${_find_filename}" ]; then - echo "${user_pkg_name} not found!" - continue - fi - - file1_top_dir=${_extract_top_dir_name} - echo "file1 top : ${file1_top_dir}" - - # kernel module (file2) - func_search_and_md5check "${kern_pkg_name}" "${kern_copyfile_name}" "${kern_md5_val}" "${_src_full}" - - # file1 exist, but file2 not exist - if [ -z "${_find_filename}" ]; then - func_error "ERROR: func_gfx: package file for Graphic is incomplete." - fi - - file2_top_dir=${_extract_top_dir_name} - echo "file2 top : ${file2_top_dir}" - - # Finally copy is performed - copy_flag=1 - install -d ${_GFX_UM_INST_DIR} - install -m 0644 ${file1_top_dir}/${user_pkg_name}/Software/${user_copyfile_name} ${_GFX_UM_INST_DIR}/`echo ${user_copyfile_name} | cut -b 5-200` - install -d ${_GFX_KM_INST_DIR} - install -m 0644 ${file2_top_dir}/${kern_pkg_name}/Software/${kern_copyfile_name} ${_GFX_KM_INST_DIR} - echo "Installed GFX package" - echo " : ${user_pkg_name}" - echo " : ${kern_pkg_name}" - echo "" - done - - if [ ${copy_flag} -eq 0 ]; then - return - fi - - echo "" - echo "Packages for GFX module were found and copied." - echo /=======================================================/ -} - -##### For Multi Media - -# For Audio library copy -# -# Global -# _audio_list: audio library list -# Return -# 0: Not found -# 1: Success -func_audio_lib() -{ - # MD5 check: OMX Media Component Audio Common Library for Linux - func_list_search_and_md5check "${_audio_common_list}" "1" - if [ $? -eq 0 ]; then - echo "Audio Common Library not found!" - echo "" - return 0 - fi - - # MD5 check: audio library. - func_list_search_and_md5check "${_audio_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "Audio library not found." - return 0 - fi - - # Add audio common library to list - _audio_list="${_audio_common_list} ${_audio_list}" - - # Install omx common lib (if not installed) - func_install_omx_common - - # Install Audio library packages - func_list_search_and_install_wo_md5check "${_audio_list}" "${_OMX_UM_INST_DIR}" - _audio_common_install=1 - - return 1 -} - -# For Audio library -func_audio() -{ - echo "" - echo "Copying for Audio Common Packages" - - _audio_common_install=0 - - # Audio requires OMX common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # Audio Library - func_audio_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Audio Packages" - echo "" - return - fi - - echo "" - echo "Packages for Audio module were found and copied." - echo /=======================================================/ -} - -# For Audio M/W -# Global -# _audio_mw_list: audio M/W library list -# Return -# 0: Not found -# 1: Success -func_audio_mw() -{ - echo "" - echo "Copying for Audio M/W Packages" - - # MD5 check - func_list_search_and_md5check "${_audio_mw_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "Packages for Audio M/W module were not found." - return 0 - fi - - # Install Audio M/W library packages - func_list_search_and_install_wo_md5check "${_audio_mw_list}" "${_OMX_UM_INST_DIR}" - - echo "" - echo "Packages for Audio M/W module were found and copied." - echo /=======================================================/ - - return 1 -} - -# install OMX common library -func_install_omx_common() -{ - if [ ${_omx_common_install} -eq 0 ]; then - echo "" - echo "Install for OMX Common Packages" - func_list_search_and_install_wo_md5check "${_omx_common_list}" "${_OMX_UM_INST_DIR}" - _omx_common_install=1 - fi -} - -# install uvcs driver -func_install_uvcs() -{ - if [ ${_uvcs_install} -eq 0 ]; then - echo "" - echo "Installed UVCS driver" - func_list_search_and_install_wo_md5check "${_uvcs_list}" "${_UVCS_INST_DIR}" - _uvcs_install=1 - fi -} - -# search & MD5 check for OMX Video Decoder library -# Global -# _video_dec_list: video decoder list -# Return -# 0: Not found -# 1: Success -func_video_decoder_lib() -{ - echo "" - echo "Copying for Video Decoder Library Packages" - - # MD5 check: Decoder Common Library (rigid flag=TRUE) - func_list_search_and_md5check "${_video_dec_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Video Decoder Common Library not found!" - return 0 - fi - - # MD5 check: Video Decoder Library - func_list_search_and_md5check "${_video_dec_list}" - if [ $? -eq 0 ]; then - # library not found. - return 0 - fi - - # install OMX common lib (if not installed) - func_install_omx_common - - # install UVCS driver (if not installed) - func_install_uvcs - - # Add video decoder common lib to list - _video_dec_list="${_video_dec_common_list} ${_video_dec_list}" - - # install searched library - func_list_search_and_install_wo_md5check "${_video_dec_list}" "${_OMX_UM_INST_DIR}" - _video_decoder_common_install=1 - - return 1 -} - -# search & MD5 check for OMX Video Encoder library -# Global -# _video_enc_list: video encoder list -# Return -# 0: Not found -# 1: Success -func_video_encoder_lib() -{ - echo "" - echo "Copying for Video Encoder Library Packages" - - - # MD5 check Encoder Common Library (rigid flag=TRUE) - func_list_search_and_md5check "${_video_enc_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Video Encoder Common Library not found!" - return 0 - fi - _video_encoder_common_install=0 - - # Video Encoder Library - # MD5 check - func_list_search_and_md5check "${_video_enc_list}" - if [ $? -eq 0 ]; then - # library not found. - return 0 - fi - - # install common lib (if not installed) - func_install_omx_common - - # install UVCS driver (if not installed) - func_install_uvcs - - # Add Video encoder common library to list - _video_enc_list="${_video_enc_common_list} ${_video_enc_list}" - - # install searched library - func_list_search_and_install_wo_md5check "${_video_enc_list}" "${_OMX_UM_INST_DIR}" - _video_encoder_common_install=1 - - return 1 -} - -# For Video decoder -# Global -# _video_dec_list: video decoder list -# Return -# 0: Not found -# 1: Success -func_video_decoder() -{ - echo "" - echo "Copying for Video Decoder Packages" - - # OMX Common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # UVCS driver - if [ ${_uvcs_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_uvcs_list}" "1" - if [ $? -eq 0 ]; then - echo "UVCS driver not found!" - echo "" - return - fi - else - echo "UVCS driver already installed" - fi - - # OMX Decoder - # Decoder common Lib - func_video_decoder_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Video Decoder Packages" - echo "" - return - fi - - echo "" - echo "Packages for video decoder module were found and copied." - echo /=======================================================/ -} - -# For Video encoder -func_video_encoder() -{ - echo "" - echo "Copying for Video Encoder Packages" - - # OMX Common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # UVCS driver - if [ ${_uvcs_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_uvcs_list}" "1" - if [ $? -eq 0 ]; then - echo "UVCS driver not found!" - echo "" - return - fi - else - echo "UVCS driver already installed" - fi - - # OMX Encoder - # Encoder common Lib - func_video_encoder_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Video Encoder Packages" - echo "" - return - fi - - echo "" - echo "Packages for video encoder module were found and copied." - echo /=======================================================/ -} - -################################ -# Copy Script Main routine -################################ -echo "Copyscript for R-Car Gen3" -echo -#### 1) Checking current directory -if [ ! -d meta-rcar-gen3 ]; then - echo "ERROR: Please extract meta-renesas and cd to it, before execute $0" - exit 1 -fi - -#### 2) Checking Arguments -if [ "X$1" = "X" ]; then - usage - exit 1 -fi - -while [ $# -gt 0 ] ; do - case "$1" in - -f|--force) - _no_md5check=1 - ;; - -d|--debug) - _debug=1 - ;; - *) - _src_dirname=$(basename $1) - _src_path=$(cd $(dirname $1) && pwd) - _src_full=${_src_path}/${_src_dirname} - ;; - esac - shift -done - -#### 3) Checking ClickThrough present - -COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip 2>/dev/null | wc --lines) -if [ ${COUNTFILE} -eq 0 ]; then - echo "R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip not found!" - usage - exit 1 -fi -if [ ${COUNTFILE} -gt 1 ]; then - echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip file found!" - echo "Clean your directory \"${_src_full}\"" - exit 1 -fi - -COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip 2>/dev/null | wc --lines) -if [ ${COUNTFILE} -eq 0 ]; then - echo "R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip not found!" - exit 1 -fi -if [ ${COUNTFILE} -gt 1 ]; then - echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip file found!" - echo "Clean your directory \"${_src_full}\"" - usage - exit 1 -fi - -unzip -d ${_src_full} -oq ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip -unzip -d ${_src_full} -oq ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip - -tar -C ${_src_full} -zxf ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.tar.gz --strip-components 2 -tar -C ${_src_full} -zxf ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz --strip-components 2 - -# source directory check -if [ ! -d ${_src_path}/${_src_dirname} ]; then - echo "${_src_path}/${_src_dirname} not found." - usage - exit 1 -fi - -if [ -n "${_debug}" ]; then - echo "src = ${_src_dirname}" - echo "src_path = ${_src_path}" - echo "src_full = ${_src_full}" - echo "no_md5check = ${_no_md5check}" - echo "" -fi - -##### 3) create temp directory -TMPWORK=${PWD}/CP_SCRIPT_TEMP -if [ -d ${TMPWORK} ]; then - echo "ERROR: Work directory already exist." - exit 1 -fi -install -d -m 700 ${TMPWORK} -cd ${TMPWORK} - -##### 4) copy -# initialize flag -_omx_common_install=0 -_uvcs_install=0 -_audio_common_install=0 -_video_decoder_common_install=0 -_video_encoder_common_install=0 - -func_gfx -func_audio -func_audio_mw -func_video_decoder -func_video_encoder - -##### 5) cleanup temp directory -func_clean_tempdir - -##### End -echo "Complete copying !" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh deleted file mode 100755 index 2ce4148b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh +++ /dev/null @@ -1,1329 +0,0 @@ -#!/bin/sh - -# Copyright (C) Renesas Electronics Corporation 2015-2018 All rights reserved. - -usage() -{ -cat << EOF - usage: `basename $0` [-f] [-d] source-directory - -f: fource copy. ignore md5check - -d: debug mode - - Ex) - `basename $0` -f my_package_dir -EOF -} - -##### MD5 list ##### -. `dirname $0`/md5list.txt - -##### Library List ##### -# Audio Library -# Please add omx audio library to "_audio_list" -# Don't use space in xxx_name. -# audio_list=",, \ -# ,, \ -# ,," -_audio_list="AAC-LC_decoder_lib,RTM0AC0000XAAACD30SL41C,RTM0AC0000XAAACD30SL41C.tar.gz \ - aacPlusV2_decoder_lib,RTM0AC0000XAAAPD30SL41C,RTM0AC0000XAAAPD30SL41C.tar.gz \ - MP3_decoder_lib,RTM0AC0000XAMP3D30SL41C,RTM0AC0000XAMP3D30SL41C.tar.gz \ - WMA_decoder_lib,RTM0AC0000XAWMAD30SL41C,RTM0AC0000XAWMAD30SL41C.tar.gz \ - AAC-LC_encoder_lib,RTM0AC0000XAAACE30SL41C,RTM0AC0000XAAACE30SL41C.tar.gz \ - ALAC_decoder_lib,RTM0AC0000XAALAD30SL41C,RTM0AC0000XAALAD30SL41C.tar.gz \ - FLAC_decoder_lib,RTM0AC0000XAFLAD30SL41C,RTM0AC0000XAFLAD30SL41C.tar.gz \ - Dolby_decoder_lib,RTM0AC0000XADD5D30SL41C,RTM0AC0000XADD5D30SL41C.tar.gz" - -# Audio M/W Library -# Please add omx audio library to "_audio_mw_list" -# Don't use space in xxx_name. -# audio_mw_list=",, \ -# ,, \ -# ,," -_audio_mw_list="AAC-LC_decoder_M/W,RTM0AC0000ADAACMZ1SL41C,RTM0AC0000ADAACMZ1SL41C.tar.gz \ - aacPlusV2_decoder_M/W,RTM0AC0000ADAAPMZ1SL41C,RTM0AC0000ADAAPMZ1SL41C.tar.gz \ - MP3_decoder_M/W,RTM0AC0000ADMP3MZ1SL41C,RTM0AC0000ADMP3MZ1SL41C.tar.gz \ - WMA_decoder_M/W,RTM0AC0000ADWMAMZ1SL41C,RTM0AC0000ADWMAMZ1SL41C.tar.gz \ - AAC-LC_encoder_M/W,RTM0AC0000AEAACMZ1SL41C,RTM0AC0000AEAACMZ1SL41C.tar.gz \ - DDD_decoder_M/W,RTM0AC0000ADDD5MZ1SL41C,RTM0AC0000ADDD5MZ1SL41C.tar.gz" - -# Video Decoder Library -# Please add omx video decoder library to "_video_dec_list" -# Don't use space in xxx_name. -# video_dec_list=",, \ -# ,, \ -# ,," -_video_dec_list="H263_decoder,RTM0AC0000XV263D30SL41C,RTM0AC0000XV263D30SL41C.tar.bz2 \ - H264_decoder,RTM0AC0000XV264D30SL41C,RTM0AC0000XV264D30SL41C.tar.bz2 \ - H265_decoder,RTM0AC0000XV265D30SL41C,RTM0AC0000XV265D30SL41C.tar.bz2 \ - MPEG2_decoder,RTM0AC0000XVM2VD30SL41C,RTM0AC0000XVM2VD30SL41C.tar.bz2 \ - MPEG4_decoder,RTM0AC0000XVM4VD30SL41C,RTM0AC0000XVM4VD30SL41C.tar.bz2 \ - VC1_decoder,RTM0AC0000XVVC1D30SL41C,RTM0AC0000XVVC1D30SL41C.tar.bz2 \ - DivX_decoder,RTM0AC0000XVDVXD30SL41C,RTM0AC0000XVDVXD30SL41C.tar.bz2 \ - RealVideo_decoder,RTM0AC0000XVRLVD30SL41C,RTM0AC0000XVRLVD30SL41C.tar.bz2 \ - VP8_decoder,RTM0AC0000XVVP8D30SL41C,RTM0AC0000XVVP8D30SL41C.tar.bz2 \ - VP9_decoder,RTM0AC0000XVVP9D30SL41C,RTM0AC0000XVVP9D30SL41C.tar.bz2" - -# Video Encoder Library -# Please add omx video encoder library to "_video_enc_list" -# Don't use space in xxx_name. -# video_enc_list=",, \ -# ,, \ -# ,," -_video_enc_list="H264_encoder,RTM0AC0000XV264E30SL41C,RTM0AC0000XV264E30SL41C.tar.bz2 \ - VP8_encoder,RTM0AC0000XVVP8E30SL41C,RTM0AC0000XVVP8E30SL41C.tar.bz2" - -# Common library packages -# Don't use space in xxx_name. -# XXX_list=",, \ -# ,, \ -# ,," -_omx_common_list="omx_common_lib,RTM0AC0000XCMCTL30SL41C,RTM0AC0000XCMCTL30SL41C.tar.bz2" -_uvcs_list="uvcs_lib,RCG3VUDRL4101ZDO,RCG3VUDRL4101ZDO.tar.bz2" -_video_enc_common_list="video_enc_common,RTM0AC0000XVCMNE30SL41C,RTM0AC0000XVCMNE30SL41C.tar.bz2" -_video_dec_common_list="video_dec_common,RTM0AC0000XVCMND30SL41C,RTM0AC0000XVCMND30SL41C.tar.bz2" -_audio_common_list="audio_common,RTM0AC0000XACMND30SL41C,RTM0AC0000XACMND30SL41C.tar.gz" - - -# DTV Library -# Please add DTV library to "_dtv_list" -# Don't use space in xxx_name. -# dtv_xx_list=",,, \ -# ,,, \ -# ,,," -_dtv_km_list="dtv_km,RCG3T001L4101ZDO,Software.tar.gz" -_dtv_um_list="dtv_lib,RTM0RC0000TE020000SL41C,Software.tar.gz,RTM0RC0000TE020000SL41C1 \ - dtv_userfunc,RTM0RC0000TE020000SL41C,../Reference/Reference.tar.gz,RTM0RC0000TE020000SL41C2" - -# DVD Library -# Please add DVD library to "_dvd_list" -# Don't use space in xxx_name. -# dvd_list=",,, \ -# ,,, \ -# ,,," -_dvd_list="dvd_lib,RTM0RC0000XDVDC301SL41C,Software.tar.gz \ - dvd_encrypt_lib,RTM0RC0000XDVDF301SL41C,Software.tar.gz" - -# CMS Library -# Please add CMS library to "_cms_list" -# Don't use space in xxx_name. -# cms_list=",, \ -# ,, \ -# ,," -_cms_list="bcm,RTM0AC0000JRCMBCV0SL41C,RTM0AC0000JRCMBCV0SL41C.tar.gz \ - blc,RTM0AC0000JRCMBLC0SL41C,RTM0AC0000JRCMBLC0SL41C.tar.gz \ - dgc,RTM0AC0000JRCMDGV0SL41C,RTM0AC0000JRCMDGV0SL41C.tar.gz" - -# ADSP -# Please add ADSP to "_adsp_list" -# Don't use space in xxx_name. -# adsp_xx_list=",, \ -# ,, \ -# ,," -_adsp_um_list="adsp_fw,RCG3AHFWN0201ZDP,RCG3AHFWN0201ZDP.tar.gz \ - adsp_if,RCG3AHIFL4101ZDP,RCG3AHIFL4101ZDP.tar.gz" -_adsp_km_list="adsp_driver,RCG3AHPDL4101ZDO,RCG3AHPDL4101ZDO.tar.gz" - -# GFX -# Please add GFX to "_gfx_list" -# Don't use space in xxx_name. -# gfx_list=",,, \ -# ,,, \ -# ,,," -_gfx_list="RTM0RC7795GLPG0001SL41C,r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ - RTM0RC7796GLPG0001SL41C,r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2 \ - RTM0RC7796GLPGB001SL41C,r8a77965_linux_gsx_binaries_gles.tar.bz2,RCN3G001L4101ZDO,GSX_KM_M3N.tar.bz2 \ - RTM0RC7799GLPG0001SL41C,r8a77990_linux_gsx_binaries_gles.tar.bz2,RCE3G001L4101ZDO,GSX_KM_E3.tar.bz2 \ - INFRTM0RC7795GLPG0001SL41C,INF_r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ - INFRTM0RC7796GLPG0001SL41C,INF_r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2 \ - INFRTM0RC7796GLPGB001SL41C,INF_r8a77965_linux_gsx_binaries_gles.tar.bz2,RCN3G001L4101ZDO,GSX_KM_M3N.tar.bz2 \ - INFRTM0RC7799GLPG0001SL41C,INF_r8a77990_linux_gsx_binaries_gles.tar.bz2,RCE3G001L4101ZDO,GSX_KM_E3.tar.bz2" - -# ICCOM -# Please add ICCOM to "_iccom_list" -# Don't use space in xxx_name. -# iccom_xx_list=",,, \ -# ,,, \ -# ,,," -_iccom_km_list="iccom_mfis,RCG3ZLIDL4101ZNO,iccom-mfis.tar.bz2,RCG3ZLIDL4101ZNO1 \ - iccom_sample,RCG3ZLIDL4101ZNO,iccom-hwspinlock-sample.tar.bz2,RCG3ZLIDL4101ZNO2" -_iccom_um_list="iccom_lib,RCG3ZLILL4101ZNO,libiccom.tar.bz2,RCG3ZLILL4101ZNO" - -# Crypto Package list -# Please add crypto (zip) package name to "_crypto_pkg_list" -# Don't use space in xxx_name. -# crypto_pkg_list=" " -_crypto_pkg_list="RTM0AC0000ADDD5MZ1SL41C" - -##### static value -_MODE_ZIP=1 -_MODE_TAR=2 -_MODE_CRYPTO_ZIP=3 -_GFX_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles" -_GFX_UM_INST_DIR="../meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module" -_UVCS_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv" -_OMX_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module" -_DTV_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-dtv/files" -_DTV_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module" -_DVD_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module \ - ../meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module" -_CMS_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module" -_ADSP_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-adsp/xtensa-hifi" -_ADSP_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/adsp-module/files" -_ICCOM_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-iccom/files" -_ICCOM_UM_INST_DIR="../meta-rcar-gen3/recipes-connectivity/iccom-module/files" - -##### common function - -# $1: search file name -# $2: search directory -# return global variable -# _find_filename: find filename -# _extract_mode: _MODE_ZIP or _MODE_TAR -func_cmn_find_file() -{ -# echo "$1" -# echo "$2" - if [ -z "$1" ]; then - func_error "ERROR: func_cmn_find_file: empty filename" - fi - - if [ -z "$2" ]; then - _search_dir=${_src_full} - else - _search_dir=$2 - fi - - # search zip file -# zip_count=`find ${_search_dir} -maxdepth 1 -name "$1*.zip" | wc -l` - zip_count=`ls ${_search_dir}/$1*.zip 2>/dev/null | wc -l` - - # search tar file -# tar_count=`find ${_search_dir} -maxdepth 1 -name "$1*.tar.*" | wc -l` - tar_count=`ls ${_search_dir}/$1*.tar.* 2>/dev/null | wc -l` - - # duplicate file check - if [ 1 -lt `expr $zip_count + $tar_count` ]; then - echo "file1_zip = $zip_count" - echo "file1_tar = $tar_count" - func_error "ERROR: $1: too many files" - fi - - crypto_zip_count=0 - for i in ${_crypto_pkg_list} - do - if [ $1 = $i ]; then - crypto_zip_count=$zip_count - zip_count=0 - fi - done - - # set result - if [ 1 = $zip_count ]; then - _find_filename=$(ls ${_search_dir}/$1*.zip) - _extract_mode=${_MODE_ZIP} - elif [ 1 = $tar_count ]; then - _find_filename=$(ls ${_search_dir}/$1*.tar.*) - _extract_mode=${_MODE_TAR} - elif [ 1 = $crypto_zip_count ]; then - _find_filename=$(ls ${_search_dir}/$1*.zip) - _extract_mode=${_MODE_CRYPTO_ZIP} - else - _find_filename="" - fi -} - -# $1: Mode -# $2: archive file name -func_cmn_extract_archive() -{ - case $1 in - $_MODE_ZIP) -# echo "Zip mode" - unzip -oq $2 - ;; - $_MODE_TAR) -# echo "Tar mode" - tar xf $2 - ;; - $_MODE_CRYPTO_ZIP) -# echo "Crypto Zip mode" - unzip -oq $2 - top_dir=$(basename $2) - top_dir=${top_dir%.*} - cd ${top_dir} - unzip -oq *.zip - if [ $? -gt 0 ]; then - func_error "ERROR: FAILED ZIP PASSWORD" - fi - cd ${TMPWORK} - ;; - *) - func_error "ERROR: func_cmn_extract_archive: mode error." - exit 1 - ;; - esac -} - -# $1: set target filename. -# $2: set MD5 expectation value. -func_cmn_md5_check() -{ - _md5_func_param_filename=$1 - _md5_func_param_expectation=$2 - if [ ! -e ${_md5_func_param_filename} ]; then - func_error "func_cmn_md5_check : ERROR ${_md5_func_param_filename} not found." - fi - - _calc_md5=$(md5sum ${_md5_func_param_filename} | cut -d " " -f1) - - if [ -n "${_no_md5check}" ] || [ -z ${_md5_func_param_expectation} ]; then - echo "Skip MD5 : `basename ${_md5_func_param_filename}`" - return - fi - - if [ -n "${_debug}" ]; then - echo "MD5 target file = ${_md5_func_param_filename}" - echo "calc_md5 = ${_calc_md5}" - echo "expect_value = ${_md5_func_param_expectation}" - fi - - if [ ${_calc_md5} = ${_md5_func_param_expectation} ]; then - echo "MD5 OK : `basename ${_md5_func_param_filename}`" - else - echo "calc_md5 = ${_calc_md5}" - echo "expect_value = ${_md5_func_param_expectation}" - func_error "MD5 ERROR : ${_md5_func_param_filename}" - fi -} - -##### Error function -# $1: error message -func_error() -{ - echo "$1" - # cleanup temp directory. - func_clean_tempdir - exit 1 -} - -##### cleanup temp directory -func_clean_tempdir() -{ - echo "cleanup temp directory" - rm -rf ${TMPWORK} -} - -##### Template function for Single package - -# $1: package name -# $2: search target filename -# $3: search directory (full path) -# return -# _find_filename : the found file (full path) -# _extract_top_dir_name -func_search_file_in_package() -{ - # search package file - func_cmn_find_file $1 $3 - if [ -n "${_debug}" ]; then - echo "" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - # Get directory name - # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # search file - num=`find ${top_dir} -name $2 | wc -l` - if [ ${num} -eq 1 ]; then - _find_filename=`find ${top_dir} -name $2` - else - # same filename exists. - _find_filename=`find ${top_dir} -name $2 | grep Software` - fi - - # set mode - if [ `echo ${_find_filename} | grep '\.'zip` ]; then - _extract_mode=${_MODE_ZIP} - else - _extract_mode=${_MODE_TAR} - fi - - # set return value - _extract_top_dir_name=${top_dir} -} - -# $1: package name -# $2: copy filename (md5 target) -# $3: expect MD5 value -# $4: search directory (full path) -# return -# _find_file_name -# _extract_top_dir_name -func_search_and_md5check() -{ - # search package file - func_cmn_find_file $1 $4 - if [ -n "${_debug}" ]; then - echo "" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - # MD5 - # Get directory name - # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # call func_cmn_md5_check - func_cmn_md5_check "${top_dir}/$1/Software/$2" "$3" - - # set return value - _extract_top_dir_name=${top_dir} -} - -##### Template function for Group package -# $1: group package name -# $2: single package name -# $3: copy filename (md5 target) -# $4: expect MD5 value -# $5: search directory (full path) -# return -# _find_file_name -# _extract_top_dir_name -# -# NOTE) This function supports level1 packaging. Do not support "grp pkg in grp pkg". -func_search_and_md5check_grp() -{ - # search group package @SRCDIR - func_cmn_find_file $1 $5 - if [ -n "${_debug}" ]; then - echo "search group package" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - echo "" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # extract group package @TMPWORK - func_cmn_extract_archive ${_extract_mode} "${_find_filename}" - - cd ${_find_filename} - # check group pachage structure - # _/Package_Info.txt - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - if [ ! -e ${top_dir}/Package_Info.txt ]; then - echo "grp package = $1" - echo "single package = $2" - func_error "ERROR: Package_Info.txt not found in Group package." - fi - - # search single package @TMPWORK/TOPDIR// - func_cmn_find_file $2 "${TMPWORK}/${top_dir}/$1" - if [ -n "${_debug}" ]; then - echo "search single package" - echo "FileName = ${_find_filename}" - echo "Mode = ${_extract_mode}" - echo "" - fi - - if [ -z "${_find_filename}" ]; then - return - fi - - # mv TMPWORK/. - mv ${_find_filename} ${TMPWORK}/. - - # delete group package - rm -rf ${TMPWORK}/${top_dir} - - # call search and md5check @TMPWORK - func_search_and_md5check $2 $3 $4 ${TMPWORK} -} - -##### File search and MD5check for Package list -# $1: package list -# $2: rigid flag (1: true, other: false) -# -# return -# 1: [Success] One or more files were found. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_md5check () -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'${pkg_name}` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - # rigid flag = TRUE. Not found = ERROR - if [ "X$2" = "X1" ]; then - return 0 - fi - else - find_flag=1 - fi - done - - return ${find_flag} -} - -##### File search and install (without MD5check) for Package list -# -# $1: package list -# $2: install directory -# -# return -# 1: [Success] One or more files were installed. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_install_wo_md5check() -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'$pkg_name` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - copyfile_name=$(basename ${copyfile_name}) - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - # file search - func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - else - find_flag=1 - - # install - install -d $2 - install -m 0644 ${_find_filename} $2 - echo "Installed $sw_name" - echo " : ${pkg_name}" - fi - done - - return ${find_flag} -} - -##### File search and install for Package list -# -# $1: package list -# $2: install directory -# -# return -# 1: [Success] One or more files were installed. -# 0: [Fail] File not found -# -# package list format -# list =",,, \ -# ,,, \ -# ,,," -# -# Note) Don't use space in xxx_name. -# Note) md5_variable_name is defined in md5list.txt. -# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO -# It is omissible. The default is "_MD5_". -func_list_search_and_install() -{ - find_flag=0 - - for i in $1 - do - sw_name=`echo $i | cut -d "," -f 1` - pkg_name=`echo $i | cut -d "," -f 2` - copyfile_name=`echo $i | cut -d "," -f 3` - md5_val=`echo $i | cut -d "," -f 4` - - # is empty. Default MD5 name is "_MD5_" - if [ -z "${md5_val}" ]; then - md5_val=`eval echo '$_MD5_'$pkg_name` - else - md5_val=`eval echo '$_MD5_'${md5_val}` - fi - - if [ -n "${_debug}" ]; then - echo "" - echo "sw_name = $sw_name" - echo "pkg_name = $pkg_name" - echo "copyfile_name = $copyfile_name" - echo "md5_val = $md5_val" - fi - - # seach & MD5 check - func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" - if [ -z "${_find_filename}" ]; then - echo "${sw_name} not found!" - else - find_flag=1 - - # Get directory name - # _find_filename = pkg file (full path). It is not copyfile. - top_dir=$(basename ${_find_filename}) - top_dir=${top_dir%.*} - - # install - install -d $2 - install -m 0644 ${top_dir}/${pkg_name}/Software/${copyfile_name} $2 - echo "Installed $sw_name" - echo " : ${pkg_name}" - fi - done - - return ${find_flag} -} - -##### Package function - -# For 3D graphics packages -func_gfx() -{ - echo "" - echo "Copying for Graphic Packages" - - copy_flag=0 - - for i in ${_gfx_list} - do - user_pkg_name=`echo $i | cut -d "," -f 1` - user_copyfile_name=`echo $i | cut -d "," -f 2` - user_md5_val=`eval echo '$_MD5_'${user_pkg_name}` - kern_pkg_name=`echo $i | cut -d "," -f 3` - kern_copyfile_name=`echo $i | cut -d "," -f 4` - kern_md5_val=`eval echo '$_MD5_'${kern_pkg_name}` - - if [ -n "${_debug}" ]; then - echo "" - echo "user_pkg_name = ${user_pkg_name}" - echo "user_copyfile_name= ${user_copyfile_name}" - echo "user_md5_val = ${user_md5_val}" - echo "kern_pkg_name = ${kern_pkg_name}" - echo "kern_copyfile_name= ${kern_copyfile_name}" - echo "kern_md5_val = ${kern_md5_val}" - fi - - # user module (file1) - func_search_and_md5check "${user_pkg_name}" "${user_copyfile_name}" "${user_md5_val}" "${_src_full}" - - if [ -z "${_find_filename}" ]; then - echo "${user_pkg_name} not found!" - continue - fi - - file1_top_dir=${_extract_top_dir_name} - echo "file1 top : ${file1_top_dir}" - - # kernel module (file2) - func_search_and_md5check "${kern_pkg_name}" "${kern_copyfile_name}" "${kern_md5_val}" "${_src_full}" - - # file1 exist, but file2 not exist - if [ -z "${_find_filename}" ]; then - func_error "ERROR: func_gfx: package file for Graphic is incomplete." - fi - - file2_top_dir=${_extract_top_dir_name} - echo "file2 top : ${file2_top_dir}" - - # Finally copy is performed - copy_flag=1 - install -d ${_GFX_UM_INST_DIR} - install -m 0644 ${file1_top_dir}/${user_pkg_name}/Software/${user_copyfile_name} ${_GFX_UM_INST_DIR}/${user_copyfile_name##INF_} - install -d ${_GFX_KM_INST_DIR} - install -m 0644 ${file2_top_dir}/${kern_pkg_name}/Software/${kern_copyfile_name} ${_GFX_KM_INST_DIR} - echo "Installed GFX package" - echo " : ${user_pkg_name}" - echo " : ${kern_pkg_name}" - echo "" - done - - if [ ${copy_flag} -eq 0 ]; then - return - fi - - echo "" - echo "Packages for GFX module were found and copied." - echo /=======================================================/ -} - -##### For Multi Media - -# For Audio library copy -# -# Global -# _audio_list: audio library list -# Return -# 0: Not found -# 1: Success -func_audio_lib() -{ - # MD5 check: OMX Media Component Audio Common Library for Linux - func_list_search_and_md5check "${_audio_common_list}" "1" - if [ $? -eq 0 ]; then - echo "Audio Common Library not found!" - echo "" - return 0 - fi - - # MD5 check: audio library. - func_list_search_and_md5check "${_audio_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "Audio library not found." - return 0 - fi - - # Add audio common library to list - _audio_list="${_audio_common_list} ${_audio_list}" - - # Install omx common lib (if not installed) - func_install_omx_common - - # Install Audio library packages - func_list_search_and_install_wo_md5check "${_audio_list}" "${_OMX_UM_INST_DIR}" - _audio_common_install=1 - - return 1 -} - -# For Audio library -func_audio() -{ - echo "" - echo "Copying for Audio Common Packages" - - _audio_common_install=0 - - # Audio requires OMX common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # Audio Library - func_audio_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Audio Packages" - echo "" - return - fi - - echo "" - echo "Packages for Audio module were found and copied." - echo /=======================================================/ -} - -# For Audio M/W -# Global -# _audio_mw_list: audio M/W library list -# Return -# 0: Not found -# 1: Success -func_audio_mw() -{ - echo "" - echo "Copying for Audio M/W Packages" - - # MD5 check - func_list_search_and_md5check "${_audio_mw_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "Packages for Audio M/W module were not found." - return 0 - fi - - # Install Audio M/W library packages - func_list_search_and_install_wo_md5check "${_audio_mw_list}" "${_OMX_UM_INST_DIR}" - - echo "" - echo "Packages for Audio M/W module were found and copied." - echo /=======================================================/ - - return 1 -} - -# install OMX common library -func_install_omx_common() -{ - if [ ${_omx_common_install} -eq 0 ]; then - echo "" - echo "Install for OMX Common Packages" - func_list_search_and_install_wo_md5check "${_omx_common_list}" "${_OMX_UM_INST_DIR}" - _omx_common_install=1 - fi -} - -# install uvcs driver -func_install_uvcs() -{ - if [ ${_uvcs_install} -eq 0 ]; then - echo "" - echo "Installed UVCS driver" - func_list_search_and_install_wo_md5check "${_uvcs_list}" "${_UVCS_INST_DIR}" - _uvcs_install=1 - fi -} - -# search & MD5 check for OMX Video Decoder library -# Global -# _video_dec_list: video decoder list -# Return -# 0: Not found -# 1: Success -func_video_decoder_lib() -{ - echo "" - echo "Copying for Video Decoder Library Packages" - - # MD5 check: Decoder Common Library (rigid flag=TRUE) - func_list_search_and_md5check "${_video_dec_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Video Decoder Common Library not found!" - return 0 - fi - - # MD5 check: Video Decoder Library - func_list_search_and_md5check "${_video_dec_list}" - if [ $? -eq 0 ]; then - # library not found. - return 0 - fi - - # install OMX common lib (if not installed) - func_install_omx_common - - # install UVCS driver (if not installed) - func_install_uvcs - - # Add video decoder common lib to list - _video_dec_list="${_video_dec_common_list} ${_video_dec_list}" - - # install searched library - func_list_search_and_install_wo_md5check "${_video_dec_list}" "${_OMX_UM_INST_DIR}" - _video_decoder_common_install=1 - - return 1 -} - -# search & MD5 check for OMX Video Encoder library -# Global -# _video_enc_list: video encoder list -# Return -# 0: Not found -# 1: Success -func_video_encoder_lib() -{ - echo "" - echo "Copying for Video Encoder Library Packages" - - - # MD5 check Encoder Common Library (rigid flag=TRUE) - func_list_search_and_md5check "${_video_enc_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Video Encoder Common Library not found!" - return 0 - fi - _video_encoder_common_install=0 - - # Video Encoder Library - # MD5 check - func_list_search_and_md5check "${_video_enc_list}" - if [ $? -eq 0 ]; then - # library not found. - return 0 - fi - - # install common lib (if not installed) - func_install_omx_common - - # install UVCS driver (if not installed) - func_install_uvcs - - # Add Video encoder common library to list - _video_enc_list="${_video_enc_common_list} ${_video_enc_list}" - - # install searched library - func_list_search_and_install_wo_md5check "${_video_enc_list}" "${_OMX_UM_INST_DIR}" - _video_encoder_common_install=1 - - return 1 -} - -# For Video decoder -# Global -# _video_dec_list: video decoder list -# Return -# 0: Not found -# 1: Success -func_video_decoder() -{ - echo "" - echo "Copying for Video Decoder Packages" - - # OMX Common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # UVCS driver - if [ ${_uvcs_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_uvcs_list}" "1" - if [ $? -eq 0 ]; then - echo "UVCS driver not found!" - echo "" - return - fi - else - echo "UVCS driver already installed" - fi - - # OMX Decoder - # Decoder common Lib - func_video_decoder_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Video Decoder Packages" - echo "" - return - fi - - echo "" - echo "Packages for video decoder module were found and copied." - echo /=======================================================/ -} - -# For Video encoder -func_video_encoder() -{ - echo "" - echo "Copying for Video Encoder Packages" - - # OMX Common library - if [ ${_omx_common_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_omx_common_list}" "1" - if [ $? -eq 0 ]; then - echo "OMX Common Library not found!" - echo "" - return - fi - else - echo "OMX Common Library already installed" - fi - - # UVCS driver - if [ ${_uvcs_install} -eq 0 ]; then - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_uvcs_list}" "1" - if [ $? -eq 0 ]; then - echo "UVCS driver not found!" - echo "" - return - fi - else - echo "UVCS driver already installed" - fi - - # OMX Encoder - # Encoder common Lib - func_video_encoder_lib - if [ $? -eq 0 ]; then - echo "" - echo "Skip Video Encoder Packages" - echo "" - return - fi - - echo "" - echo "Packages for video encoder module were found and copied." - echo /=======================================================/ -} - -# For DTV kernel module -func_dtv_kern() -{ - echo "" - echo "Copying for DTV kernel module" - - _dtv_kern_install=0 - - func_list_search_and_md5check "${_dtv_km_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "DTV kernel library not found!" - return - fi - - pkg_name=`echo ${_dtv_km_list} | cut -d "," -f 2` - copyfile_name=`echo ${_dtv_km_list} | cut -d "," -f 3` - - # extract --> archive --> copied - echo "Installed DTV kernel modules" - func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" - func_cmn_extract_archive "${_extract_mode}" "${_find_filename}" - - dtv_driver_list="ssp_drv scu_src_drv tsif_drv tddmac_drv" - for i in ${dtv_driver_list} - do - tar cfz $i.tar.gz $i - install -d ${_DTV_KM_INST_DIR} - install -m 644 $i.tar.gz ${_DTV_KM_INST_DIR} - echo " : $i.tar.gz" - done - - _dtv_kern_install=1 - - echo "" - echo "DTV kernel module were found and copied." - echo /=======================================================/ -} - -# For DTV lib -func_dtv_lib() -{ - echo "" - echo "Copying for DTV Library Packages" - - # DTV kernel modules - if [ ${_dtv_kern_install} -eq 0 ]; then - echo "DTV kernel module not found!" - echo "Skip DTV Package" - echo "" - return - fi - - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_dtv_um_list}" "1" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "DTV library not found" - return - fi - - # install - func_list_search_and_install_wo_md5check "${_dtv_um_list}" "${_DTV_UM_INST_DIR}" - - echo "" - echo "DTV Package were found and copied." - echo /=======================================================/ -} - -# For DVD lib -func_dvd_lib() -{ - echo "" - echo "Copying for DVD Library Packages" - - # MD5 check (rigid flag=TRUE) - func_list_search_and_md5check "${_dvd_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "" - echo "DVD library not found" - return - fi - - index="1" - # install searched library - for i in ${_dvd_list}; do - install_dir=`echo ${_DVD_UM_INST_DIR} | cut -d " " -f ${index}` - func_list_search_and_install_wo_md5check ${i} ${install_dir} - index=`expr ${index} + 1` - done - - echo "" - echo "DVD Package were found and copied." - echo /=======================================================/ -} - -# For DTV/DVD main routine -func_dtv_dvd() -{ - echo "" - echo "Copying for DTV/DVD Packages" - - # DTV package - func_dtv_kern - func_dtv_lib - - # DVD package - func_dvd_lib -} - -# For CMS main routine -func_cms() -{ - echo "" - echo "Copying for CMS Packages" - - copy_flag=0 - - # MD5 check - func_list_search_and_md5check "${_cms_list}" - if [ $? -eq 0 ]; then - # library not found. - echo "Skip CMS package" - echo "" - return - fi - - # Install library - func_list_search_and_install_wo_md5check "${_cms_list}" "${_CMS_UM_INST_DIR}" - - echo "" - echo "Packages for CMS were found and copied." - echo /=======================================================/ -} - -# For ADSP main routine -func_adsp() -{ - echo "" - echo "Copying for ADSP Packages" - - # MD5 check (rigid flag = TRUE) - # In ADSP, all files are necesarry - func_list_search_and_md5check "${_adsp_km_list}" "1" - if [ $? -eq 0 ]; then - # library not found. - echo "Skip ADSP Package" - echo "" - return - fi - - func_list_search_and_md5check "${_adsp_um_list}" "1" - if [ $? -eq 0 ]; then - # library not found. - echo "Skip ADSP Package" - echo "" - return - fi - - # Install kernel module - func_list_search_and_install_wo_md5check "${_adsp_km_list}" "${_ADSP_KM_INST_DIR}" - - # Install user module - func_list_search_and_install_wo_md5check "${_adsp_um_list}" "${_ADSP_UM_INST_DIR}" - - echo "" - echo "Packages for ADSP were found and copied." - echo /=======================================================/ -} - -# For ICCOM main routine -func_iccom() -{ - echo "" - echo "Copying for ICCOM Packages" - - # MD5 check (rigid flag = TRUE) - # In ICCOM, all files are necesarry - func_list_search_and_md5check "${_iccom_km_list}" "1" - if [ $? -eq 0 ]; then - # library not found. - echo "Skip ICCOM Package" - echo "" - return - fi - - func_list_search_and_md5check "${_iccom_um_list}" "1" - if [ $? -eq 0 ]; then - # library not found. - echo "Skip ICCOM Package" - echo "" - return - fi - - # Install kernel module - func_list_search_and_install_wo_md5check "${_iccom_km_list}" "${_ICCOM_KM_INST_DIR}" - - # Install user module - func_list_search_and_install_wo_md5check "${_iccom_um_list}" "${_ICCOM_UM_INST_DIR}" - - echo "" - echo "Packages for ICCOM were found and copied." - echo /=======================================================/ -} - -################################ -# Copy Script Main routine -################################ -echo "Copyscript for R-Car Gen3" -echo -#### 1) Checking current directory -if [ ! -d meta-rcar-gen3 ]; then - echo "ERROR: Please extract meta-renesas and cd to it, before execute $0" - exit 1 -fi - -#### 2) Checking Arguments -if [ "X$1" = "X" ]; then - usage - exit 1 -fi - -while [ $# -gt 0 ] ; do - case "$1" in - -f|--force) - _no_md5check=1 - ;; - -d|--debug) - _debug=1 - ;; - *) - _src_dirname=$(basename $1) - _src_path=$(cd $(dirname $1) && pwd) - _src_full=${_src_path}/${_src_dirname} - ;; - esac - shift -done - -# source directory check -if [ ! -d ${_src_path}/${_src_dirname} ]; then - echo "${_src_path}/${_src_dirname} not found." - usage - exit 1 -fi - -if [ -n "${_debug}" ]; then - echo "src = ${_src_dirname}" - echo "src_path = ${_src_path}" - echo "src_full = ${_src_full}" - echo "no_md5check = ${_no_md5check}" - echo "" -fi - -##### 3) create temp directory -TMPWORK=${PWD}/CP_SCRIPT_TEMP -if [ -d ${TMPWORK} ]; then - echo "ERROR: Work directory already exist." - exit 1 -fi -install -d -m 700 ${TMPWORK} -cd ${TMPWORK} - -##### 4) copy -# initialize flag -_omx_common_install=0 -_uvcs_install=0 -_audio_common_install=0 -_video_decoder_common_install=0 -_video_encoder_common_install=0 -_dtv_kern_install=0 - -func_gfx -func_audio -func_audio_mw -func_video_decoder -func_video_encoder -func_dtv_dvd -func_cms -func_adsp -func_iccom - -##### 5) cleanup temp directory -func_clean_tempdir - -##### End -echo "Complete copying !" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/md5list.txt b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/md5list.txt deleted file mode 100644 index 14a9cb74..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/md5list.txt +++ /dev/null @@ -1,64 +0,0 @@ -# GFX -_MD5_RTM0RC7795GLPG0001SL41C="" -_MD5_RCH3G001L4101ZDO="" -_MD5_RTM0RC7796GLPG0001SL41C="" -_MD5_RCM3G001L4101ZDO="" -_MD5_RTM0RC7796GLPGB001SL41C="" -_MD5_RCN3G001L4101ZDO="" -_MD5_RTM0RC7799GLPG0001SL41C="" -_MD5_RCE3G001L4101ZDO="" -_MD5_INFRTM0RC7795GLPG0001SL41C="" -_MD5_INFRTM0RC7796GLPG0001SL41C="" -_MD5_INFRTM0RC7796GLPGB001SL41C="" -_MD5_INFRTM0RC7799GLPG0001SL41C="" -# OMX AUDIO -_MD5_RTM0AC0000ADAACMZ1SL41C="" -_MD5_RTM0AC0000XAAACD30SL41C="" -_MD5_RTM0AC0000XACMND30SL41C="" -_MD5_RTM0AC0000ADAAPMZ1SL41C="" -_MD5_RTM0AC0000ADMP3MZ1SL41C="" -_MD5_RTM0AC0000ADWMAMZ1SL41C="" -_MD5_RTM0AC0000XAAAPD30SL41C="" -_MD5_RTM0AC0000XAMP3D30SL41C="" -_MD5_RTM0AC0000XAWMAD30SL41C="" -_MD5_RTM0AC0000AEAACMZ1SL41C="" -_MD5_RTM0AC0000XAAACE30SL41C="" -_MD5_RTM0AC0000XAALAD30SL41C="" -_MD5_RTM0AC0000XAFLAD30SL41C="" -_MD5_RTM0AC0000XADD5D30SL41C="" -_MD5_RTM0AC0000ADDD5MZ1SL41C="" -# OMX VIDEO -_MD5_RTM0AC0000XV263D30SL41C="" -_MD5_RTM0AC0000XV264D30SL41C="" -_MD5_RTM0AC0000XCMCTL30SL41C="" -_MD5_RCG3VUDRL4101ZDO="" -_MD5_RTM0AC0000XVCMND30SL41C="" -_MD5_RTM0AC0000XV265D30SL41C="" -_MD5_RTM0AC0000XVM2VD30SL41C="" -_MD5_RTM0AC0000XVM4VD30SL41C="" -_MD5_RTM0AC0000XVVC1D30SL41C="" -_MD5_RTM0AC0000XVCMNE30SL41C="" -_MD5_RTM0AC0000XV264E30SL41C="" -_MD5_RTM0AC0000XVDVXD30SL41C="" -_MD5_RTM0AC0000XVRLVD30SL41C="" -_MD5_RTM0AC0000XVVP8D30SL41C="" -_MD5_RTM0AC0000XVVP8E30SL41C="" -_MD5_RTM0AC0000XVVP9D30SL41C="" -# DTV/DVD -_MD5_RCG3T001L4101ZDO="" -_MD5_RTM0RC0000TE020000SL41C1="" -_MD5_RTM0RC0000TE020000SL41C2="" -_MD5_RTM0RC0000XDVDC301SL41C="" -_MD5_RTM0RC0000XDVDF301SL41C="" -# CMS -_MD5_RTM0AC0000JRCMBCV0SL41C="" -_MD5_RTM0AC0000JRCMBLC0SL41C="" -_MD5_RTM0AC0000JRCMDGV0SL41C="" -# ADSP -_MD5_RCG3AHFWN0201ZDP="" -_MD5_RCG3AHIFL4101ZDP="" -_MD5_RCG3AHPDL4101ZDO="" -# ICCOM -_MD5_RCG3ZLIDL4101ZNO1="" -_MD5_RCG3ZLIDL4101ZNO2="" -_MD5_RCG3ZLILL4101ZNO="" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch deleted file mode 100644 index 0ca10175..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch +++ /dev/null @@ -1,186 +0,0 @@ -From a217313adcfb331634c99be786b93516d38d943a Mon Sep 17 00:00:00 2001 -From: Thuy Tran -Date: Tue, 24 Oct 2017 14:39:24 +0700 -Subject: [PATCH] rcar-gen3: Add readme for building with Linaro Gcc - -This patch add the dependent layer information, build instructions -for using Linaro Gcc. - -Updated on Dec, 2016: -- Add H3ULCB -- Change supported branch from jethro to krogoth -- Change Maintainer information. - -Updated on Oct, 2017: -- Add M3N -- Add M3ULCB -- Add meta-optee layer - -Updated on Feb, 2018: -- Add E3 -- Add elinux.org reference - -Signed-off-by: Phong Man Tran -Signed-off-by: Thao Nguyen -Signed-off-by: Thuy Tran -Signed-off-by: Takamitsu Honda ---- - meta-rcar-gen3/README.linaro | 127 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 127 insertions(+) - create mode 100644 meta-rcar-gen3/README.linaro - -diff --git a/meta-rcar-gen3/README.linaro b/meta-rcar-gen3/README.linaro -new file mode 100644 -index 0000000..e1fe40a ---- /dev/null -+++ b/meta-rcar-gen3/README.linaro -@@ -0,0 +1,127 @@ -+meta-rcar-gen3 -+============== -+ -+This layer provides that evaluation board is mounted ARM SoCs of Renesas -+Electronics, called the R-Car Generation 3. Currently, this supports -+board and the SoCs of the following: -+ - Board: Salvator-X / SoC: R8A7795 (R-Car H3), R8A7796 (R-Car M3), R8A77965 (R-Car M3N) -+ - Board: R-Car Starter Kit premier(H3ULCB) / SoC: R8A7795 -+ - Board: R-Car Starter Kit pro(M3ULCB) / SoC: R8A7796 -+ - Board: Ebisu / SoC: R8A77990 (R-Car E3) -+ -+Patches -+======= -+ -+Please submit any patches for this layer to: takamitsu.honda.pv@renesas.com -+Please see the MAINTAINERS file for more details. -+ -+Dependencies -+============ -+ -+This layer depends on: -+ -+ URI: git://git.yoctoproject.org/poky -+ layers: meta, meta-yocto, meta-yocto-bsp -+ branch: rocko -+ -+ URI: https://git.linaro.org/openembedded/meta-linaro.git -+ layers: meta-linaro-toolchain, meta-optee -+ branch: rocko -+ -+ URI: git://git.openembedded.org/meta-openembedded -+ layers: meta-oe -+ branch: rocko -+ -+Build Instructions -+================== -+ -+The following instructions require a Poky installation (or equivalent). -+ -+Initialize a build using the 'oe-init-build-env' script in Poky. e.g.: -+ -+ $ source poky/oe-init-build-env -+ -+After that, initialized configure bblayers.conf by adding meta-rcar-gen3 layer. e.g.: -+ -+ BBLAYERS ?= " \ -+ /poky/meta \ -+ /poky/meta-yocto \ -+ /poky/meta-yocto-bsp \ -+ /meta-renesas/meta-rcar-gen3 \ -+ /meta-linaro/meta-linaro-toolchain \ -+ /meta-linaro/meta-optee \ -+ /meta-openembedded/meta-oe \ -+ " -+ -+To build a specific target BSP, configure the associated machine in local.conf: -+ -+ MACHINE ??= "" -+ -+Select the SOC -+ -+ For H3: r8a7795 -+ SOC_FAMILY = "r8a7795" -+ -+ For M3: r8a7796 -+ SOC_FAMILY = "r8a7796" -+ -+ For M3N: r8a77965 -+ SOC_FAMILY = "r8a77965" -+ -+ For E3: r8a77990 -+ SOC_FAMILY = "r8a77990" -+ Already added in machine config: ebisu.conf -+ -+Must Change the Gcc version in local.conf. -+ -+ GCCVERSION="linaro-7.2" -+ -+Configure for systemd init in local.conf: -+ -+ DISTRO_FEATURES_append = " systemd" -+ VIRTUAL-RUNTIME_init_manager = "systemd" -+Configure for ivi-shell and ivi-extension -+ -+ DISTRO_FEATURES_append = " ivi-shell" -+ -+Configure for USB 3.0 -+ -+ MACHINE_FEATURES_append = " usb3" -+ -+Enable tuning support for Capacity Aware migration Strategy (CAS) -+ -+ MACHINE_FEATURES_append = " cas" -+ -+Build the target file system image using bitbake: -+ -+ $ bitbake core-image-minimal -+ -+After completing the images for the target machine will be available in the output -+directory 'tmp/deploy/images/'. -+ -+Images generated: -+ * Image (generic Linux Kernel binary image file) -+ * Image-.dtb (DTB for target machine) -+ * core-image-minimal-.tar.bz2 (rootfs tar+bzip2) -+ * core-image-minimal-.ext4 (rootfs ext4 format) -+ -+Build Instructions for SDK -+========================== -+This may be changed in the near feature. These instructions are tentative. -+ -+Should define the staticdev in SDK image feature for installing the static libs -+to SDK in local.conf. -+ -+ SDKIMAGE_FEATURES_append = " staticdev-pkgs" -+ -+Use bitbake -c populate_sdk for generating the toolchain SDK: -+For 64-bit target SDK (aarch64): -+ -+ $ bitbake core-image-minimal -c populate_sdk -+ -+The SDK can be found in the output directory 'tmp/deploy/sdk' -+ * poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh -+ -+Usage of toolchain SDK: -+Install the SDK to the default: /opt/poky/x.x -+(x.x is YP version, i.e. 2.1.) -+For 64-bit target SDK: -+ -+ $ sh poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh -+ -+For 64-bit application use environment script in /opt/poky/x.x -+ -+ $ source /opt/poky/x.x/environment-setup-aarch64-poky-linux -+ -+ULCB Information -+================ -+Refer to the following for more information of ULCB: -+ -+ http://elinux.org/R-Car -+ -+The information on building and running Yocto on R-Car Generation 3 -+========================= -+Refer to the following for more information: -+ -+ https://elinux.org/R-Car/Boards/Yocto-Gen3 --- -1.9.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/adsp-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/adsp-control.inc deleted file mode 100644 index 44a8d146..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/adsp-control.inc +++ /dev/null @@ -1,2 +0,0 @@ -# USE_ADSP for Audio DSP -USE_ADSP = "${@bb.utils.contains('DISTRO_FEATURES', 'adsp', '1', '0', d)}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/arm-trusted-firmware-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/arm-trusted-firmware-control.inc deleted file mode 100644 index 013598df..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/arm-trusted-firmware-control.inc +++ /dev/null @@ -1,58 +0,0 @@ -# This function is to generate IPL binaries for H3/H3ULCB (SoC: r8a7795), E3 (SoC: r8a7790) - -# IPL build options for H3/E3/H3ULCB -EXTRA_ATFW_OPT ?= "" -EXTRA_ATFW_CONF ?= "" - -do_ipl_opt_compile () { - oe_runmake distclean - oe_runmake bl2 bl31 dummytool PLAT=${PLATFORM} ${EXTRA_ATFW_OPT} ${ATFW_OPT_LOSSY} -} - -do_ipl_opt_deploy () { - install -d ${DEPLOYDIR} - - # Copy IPL to deploy folder - install -m 0644 ${S}/build/${PLATFORM}/release/bl2/bl2.elf ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.elf - install -m 0644 ${S}/build/${PLATFORM}/release/bl2.bin ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.bin - install -m 0644 ${S}/build/${PLATFORM}/release/bl2.srec ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.srec - install -m 0644 ${S}/build/${PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.elf - install -m 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.bin - install -m 0644 ${S}/build/${PLATFORM}/release/bl31.srec ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.srec - install -m 0644 ${S}/tools/dummy_create/bootparam_sa0.srec ${DEPLOYDIR}/bootparam_sa0-${EXTRA_ATFW_CONF}.srec - install -m 0644 ${S}/tools/dummy_create/cert_header_sa6.srec ${DEPLOYDIR}/cert_header_sa6-${EXTRA_ATFW_CONF}.srec -} - -# For IPL compile options for H3/H3ULCB (SoC: r8a7795), E3 (SoC: r8a7790) -python do_extra_ipl_opt() { - soc = d.getVar('SOC_FAMILY') - soc = soc.split(':')[1] - machine = d.getVar('MACHINE_ARCH') - - if soc == "r8a7795": - # For H3 SiP DDR 4GiB (2GiB x 2ch) - if machine != "h3ulcb": - d.setVar('EXTRA_ATFW_CONF', '2x2g') - d.setVar('EXTRA_ATFW_OPT', ' LSI=H3 RCAR_DRAM_SPLIT=2 RCAR_DRAM_CHANNEL=5 ') - bb.build.exec_func('do_ipl_opt_compile', d) - bb.build.exec_func('do_ipl_opt_deploy', d) - - # For H3/H3ULCB SiP DDR 8GiB (2GiB x 4ch) - d.setVar('EXTRA_ATFW_CONF', '4x2g') - d.setVar('EXTRA_ATFW_OPT', ' LSI=H3 RCAR_DRAM_SPLIT=1 ') - d.setVar('EXTRA_ATFW_OPT_append_ulcb', ' RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 ') - bb.build.exec_func('do_ipl_opt_compile', d) - bb.build.exec_func('do_ipl_opt_deploy', d) - - # For E3 SiP DDR 2GiB - if soc == "r8a77990": - d.setVar('EXTRA_ATFW_CONF', '4d') - d.setVar('EXTRA_ATFW_OPT', ' LSI=E3 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=1 RCAR_DRAM_DDR3L_MEMDUAL=1 ') - bb.build.exec_func('do_ipl_opt_compile', d) - bb.build.exec_func('do_ipl_opt_deploy', d) -} - -do_ipl_opt_compile[dirs] = "${B}" -do_ipl_opt_deploy[dirs] = "${B}" - -addtask extra_ipl_opt after do_configure before do_compile diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/avb-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/avb-control.inc deleted file mode 100644 index 6ed7f536..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/avb-control.inc +++ /dev/null @@ -1,2 +0,0 @@ -# USE_AVB for AVB Software Package for Linux -USE_AVB = "${@'1' if 'avb' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cas-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cas-control.inc deleted file mode 100644 index 18ccc74d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cas-control.inc +++ /dev/null @@ -1,17 +0,0 @@ -SOC="${@d.getVar('SOC_FAMILY').split(':')[1]}" -CAS="${@'1' if 'cas' in '${MACHINE_FEATURES}' else '0'}" - -# USE_CAS for H3 (SoC: r8a7795) or M3 (SoC: r8a7796) -USE_CAS="${@'1' if '${CAS}' == '1' and ('${SOC}' == 'r8a7795' or '${SOC}' == 'r8a7796') else '0'}" - -# Trap incorrect CAS setting for M3N/E3 -WARN="${@'1' if '${CAS}' == '1' and '${USE_CAS}' == '0' else '0'}" - -# This function is to show a warning message when enabling CAS feature on M3N/E3 -python do_cas_checking() { - warn=d.getVar('WARN') - if warn == "1" : - bb.warn("CAS only supports H3 (SoC: r8a7795), M3 (SoC: r8a7796), this feature will be disabled automatically") -} - -addtask cas_checking before do_configure after do_patch diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control.inc deleted file mode 100644 index e0decc73..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control.inc +++ /dev/null @@ -1,25 +0,0 @@ -require include/checksum_control_files.inc - -python do_checksum_control() { - to_check_dico = d.getVarFlags("CTL_CHECKSUM") - if to_check_dico is None: - return 0 - - src_uri = (d.getVar('SRC_URI') or "").split() - for s in src_uri: - c_source=os.path.basename(s) - bb.note("Check source: %s " % (c_source)) - if c_source in to_check_dico: - f_data = bb.fetch2.FetchData(s, d, True) - f_data.setup_localpath(d) - if os.path.exists(f_data.localpath): - mdr5_sum=bb.utils.md5_file(f_data.localpath) - mdr5_ctl=to_check_dico[c_source] - if mdr5_sum != mdr5_ctl: - bb.fatal( "File %s hash should be %s but %s find, please update your driver files." % (c_source, mdr5_ctl, mdr5_sum)) -} - -do_checksum_control[doc] = "Do a checksum of the archives source files" -do_checksum_control[vardeps] = "CTL_CHECKSUM" - -addtask do_checksum_control before do_unpack after do_fetch diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control_files.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control_files.inc deleted file mode 100644 index 86fe65ad..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/checksum_control_files.inc +++ /dev/null @@ -1,15 +0,0 @@ -CTL_CHECKSUM[r8a77951_linux_gsx_binaries_gles.tar.bz2]="40ef703b7b6bbd2931722810fe7ff46f" -CTL_CHECKSUM[r8a77960_linux_gsx_binaries_gles.tar.bz2]="1cf07eae93757a5752d16cdc351a59eb" -CTL_CHECKSUM[GSX_KM_H3.tar.bz2]="ab1ee4534a1d4b1852478dc6d8fa5eb9" -CTL_CHECKSUM[GSX_KM_M3.tar.bz2]="531b91b53ad7ffaf13e33aec2d499278" -CTL_CHECKSUM[RCG3VUDRL4101ZDO.tar.bz2]="43a8921d5c2a257ccc0bf491c737f5be" -CTL_CHECKSUM[EVARTM0AC0000XCMCTL30SL41C.tar.bz2]="3714b73b8cc317372a22a8335c74e103" -CTL_CHECKSUM[EVARTM0AC0000XV264D30SL41C.tar.bz2]="efcbb6493f61d714b64f6340503fa1d3" -CTL_CHECKSUM[EVARTM0AC0000XV264E30SL41C.tar.bz2]="8b0480bcee569b53438ed79d166630fa" -CTL_CHECKSUM[EVARTM0AC0000XVCMND30SL41C.tar.bz2]="691889ccf3bc295bdfdb5cf90d90bcaf" -CTL_CHECKSUM[EVARTM0AC0000XVCMNE30SL41C.tar.bz2]="9dd7c067632385a5b071f96204766ac1" -CTL_CHECKSUM[RTM0AC0000ADAACMZ1SL41C.tar.gz]="4e0bb98feeb1e309a2ec12c201bc16aa" -CTL_CHECKSUM[RTM0AC0000AEAACMZ1SL41C.tar.gz]="414c5fc22bcf848b5a6eee3812874611" -CTL_CHECKSUM[RTM0AC0000XAAACD30SL41C.tar.gz]="e44c10bd24372fc70013c2498c6869d3" -CTL_CHECKSUM[RTM0AC0000XAAACE30SL41C.tar.gz]="1611375916d9e17cff19c34b83300c83" -CTL_CHECKSUM[RTM0AC0000XACMND30SL41C.tar.gz]="6229f43b2260d194f663bceed16ca273" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cms-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cms-control.inc deleted file mode 100644 index 2ebfa517..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/cms-control.inc +++ /dev/null @@ -1,18 +0,0 @@ -# USE_CMSBCM for Basic Color Management Middleware for Linux -USE_CMSBCM = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsbcm', '1', '0', d)}" - -# USE_CMSBLC for Backlight Control Middleware for Linux -USE_CMSBLC = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsblc', '1', '0', d)}" - -# USE_CMSDGC for Dynamic Gamma Correction Middleware for Linux -USE_CMSDGC = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsdgc', '1', '0', d)}" - -# CMS Flag list -LIST_CMS_FLAG = " \ - ${USE_CMSBCM} \ - ${USE_CMSBLC} \ - ${USE_CMSDGC} \ -" - -# USE_CMS for Color Management Middleware -USE_CMS = "${@'1' if '1' in '${LIST_CMS_FLAG}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/dtv-dvd-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/dtv-dvd-control.inc deleted file mode 100644 index 07c4d5f0..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/dtv-dvd-control.inc +++ /dev/null @@ -1,19 +0,0 @@ -# USE_DTV for ISDB-T DTV Software Package -USE_DTV = "${@'1' if 'dtv' in '${DISTRO_FEATURES}' else '0'}" - -# USE_DVD for DVD Core-Middleware for Linux -USE_DVD = "${@'1' if 'dvd' in '${DISTRO_FEATURES}' else '0'}" - -# USE_DVD_ENCRYPTION_LIB for DVD Encryption Library for Linux -USE_DVD_ENCRYPTION_LIB = "${@'1' if 'dvd_encryption_library' in '${DISTRO_FEATURES}' else '0'}" - -# This function to prevent build DTV feature with E3 -python do_dtv_checking () { - soc = d.getVar('SOC_FAMILY') - soc = soc.split(':')[1] - use_dtv = d.getVar('USE_DTV') - if use_dtv == "1" and soc == "r8a77990": - bb.fatal("E3 (SoC: r8a77990) does not support SSP, please disable DTV feature in your local configuration") -} - -addtask dtv_checking before do_configure after do_patch diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/gles-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/gles-control.inc deleted file mode 100644 index 045caa32..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/gles-control.inc +++ /dev/null @@ -1,6 +0,0 @@ -USE_GLES = "${@'1' if 'gsx' in '${MACHINE_FEATURES}' else '0'}" -USE_GLES_WAYLAND = \ - "${@'1' if '${USE_GLES}' == '1' and 'wayland' in '${DISTRO_FEATURES}' else '0'}" -USE_WAYLAND_IVI_SHELL = \ - "${@'1' if 'ivi-shell' in '${DISTRO_FEATURES}' and \ - 'wayland' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/iccom-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/iccom-control.inc deleted file mode 100644 index bb8bd2cc..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/iccom-control.inc +++ /dev/null @@ -1,2 +0,0 @@ -# USE_ICCOM for Linux ICCOM driver, Linux ICCOM library -USE_ICCOM = "${@'1' if 'iccom' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/multimedia-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/multimedia-control.inc deleted file mode 100644 index beeabc15..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/multimedia-control.inc +++ /dev/null @@ -1,9 +0,0 @@ -# USE_MULTIMEDIA for Renesas Multimedia package -USE_MULTIMEDIA = "${@'1' if 'multimedia' in '${MACHINE_FEATURES}' else '0'}" -USE_MULTIMEDIA_TP = "${@'1' if 'mm-test' in '${DISTRO_FEATURES}' else '0'}" - -# For wayland -USE_WAYLAND = "${@'1' if 'wayland' in '${DISTRO_FEATURES}' else '0'}" - -# USE_V4L2_RENDERER for weston v4l2-renderer -USE_V4L2_RENDERER = "${@'1' if 'v4l2-renderer' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/omx-control.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/omx-control.inc deleted file mode 100644 index 69093e8f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/omx-control.inc +++ /dev/null @@ -1,156 +0,0 @@ -## Additional configuration in OMX module, include -# USE_H263D_OMX for OMX Media Component H263 OMX Library -USE_H263D_OMX = "${@'1' if 'h263dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_H264D_OMX for OMX Media Component H264 OMX Library -USE_H264D_OMX = "${@'1' if 'h264dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_H264E_OMX for OMX Media Component H264 Encoder Library -USE_H264E_OMX = "${@'1' if 'h264enc_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_H265D_OMX for OMX Media Component H265 OMX Library -USE_H265D_OMX = "${@'1' if 'h265dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_MPEG2_OMX for OMX Media Component MPEG2 OMX Library -USE_MPEG2D_OMX = "${@'1' if 'mpeg2dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_MPEG4D_OMX for OMX Media Component MPEG4 Decoder Library -USE_MPEG4D_OMX = "${@'1' if 'mpeg4dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_VC1D_OMX for OMX Media Component VC-1 Decoder Library -USE_VC1D_OMX = "${@'1' if 'vc1dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_DIVXD_OMX for OMX Media Component DivX Decoder Library -USE_DIVXD_OMX = "${@'1' if 'divxdec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_RVD_OMX for OMX Media Component RealVideo Decoder Library -USE_RVD_OMX = "${@'1' if 'rvdec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACLCD_OMX for OMX Media Component AACLC OMX Library -USE_AACLCD_OMX = "${@'1' if 'aaclcdec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACPV2D_OMX for OMX Media Component aacPlus V2 OMX Library -USE_AACPV2D_OMX = "${@'1' if 'aacpv2dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_MP3D_OMX for OMX Media Component MP3 OMX Library -USE_MP3D_OMX = "${@'1' if 'mp3dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_WMAD_OMX for OMX Media Component WMA OMX Library -USE_WMAD_OMX = "${@'1' if 'wmadec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_ALACD_OMX for OMX Media Component ALAC decoder Library -USE_ALACD_OMX = "${@'1' if 'alacdec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_FLACD_OMX for OMX Media Component FLAC decoder Library -USE_FLACD_OMX = "${@'1' if 'flacdec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_DDD_OMX for OMX Media Component Dolby(R) Digital decoder Library -USE_DDD_OMX = "${@'1' if 'dddec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACLCE_OMX for OMX Media Component AAC-LC encoder Library -USE_AACLCE_OMX = "${@'1' if 'aaclcenc_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACLC_MDW for AACLC MDW Library -USE_AACLC_MDW = "${@'1' if 'aaclcdec_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACPV2_MDW for aacPlus V2 MDW Library -USE_AACPV2_MDW = "${@'1' if 'aacpv2dec_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_MP3_MDW for MP3 MDW Library -USE_MP3_MDW = "${@'1' if 'mp3dec_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_WMA_MDW for WMA MDW Library -USE_WMA_MDW = "${@'1' if 'wmadec_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_DD_MDW for Dolby(R) Digital MDW Library -USE_DD_MDW = "${@'1' if 'dddec_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_AACLCE_OMX for AAC-LC encoder middleware Library -USE_AACLCE_MDW = "${@'1' if 'aaclcenc_mdw' in '${DISTRO_FEATURES}' else '0'}" - -# USE_VP8D_OMX for OMX Media Component VP8 Decoder Library -USE_VP8D_OMX = "${@'1' if 'vp8dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_VP8E_OMX for OMX Media Component VP8 Encoder Library -USE_VP8E_OMX = "${@'1' if 'vp8enc_lib' in '${DISTRO_FEATURES}' else '0'}" - -# USE_VP9D_OMX for OMX Media Component VP9 Decoder Library -USE_VP9D_OMX = "${@'1' if 'vp9dec_lib' in '${DISTRO_FEATURES}' else '0'}" - -# This function is to make sure vp9dec_lib only build with M3N or E3 -# and warns user to build vp9dec_lib for M3 v3.0 only -python () { - soc = d.getVar('SOC_FAMILY') - soc = soc.split(':')[1] - use_vp9d = d.getVar('USE_VP9D_OMX') - if use_vp9d == "1": - if soc != 'r8a77965' and soc != 'r8a77990': - if soc == 'r8a7796': - bb.warn("vp9dec_lib supports M3 v3.0 only, it does not work on other M3 versions.") - else: - bb.warn("vp9dec_lib only supports M3N (SoC: r8a77965), E3 (SoC: r8a77990), M3 v3.0 (SoC: r8a7796). Disabling.") - d.setVar('USE_VP9D_OMX', '0') -} - -# OMX Video Decoder Flag list -LIST_OMX_VIDEO_DEC_FLAG = " \ - ${USE_H263D_OMX} \ - ${USE_H264D_OMX} \ - ${USE_H265D_OMX} \ - ${USE_MPEG2D_OMX} \ - ${USE_MPEG4D_OMX} \ - ${USE_VC1D_OMX} \ - ${USE_DIVXD_OMX} \ - ${USE_RVD_OMX} \ - ${USE_VP8D_OMX} \ - ${USE_VP9D_OMX} \ -" - -# OMX Video Encoder Flag list -LIST_OMX_VIDEO_ENC_FLAG = " \ - ${USE_H264E_OMX} \ - ${USE_VP8E_OMX} \ -" - -# OMX Audio Flag list (except MDW) -LIST_OMX_AUDIO_FLAG = " \ - ${USE_AACLCD_OMX} \ - ${USE_AACPV2D_OMX} \ - ${USE_MP3D_OMX} \ - ${USE_WMAD_OMX} \ - ${USE_AACLCE_OMX} \ - ${USE_ALACD_OMX} \ - ${USE_FLACD_OMX} \ - ${USE_DDD_OMX} \ -" - -# Audio M/W Flag list -LIST_AUDIO_MDW_FLAG = " \ - ${USE_AACLC_MDW} \ - ${USE_AACPV2_MDW} \ - ${USE_MP3_MDW} \ - ${USE_WMA_MDW} \ - ${USE_DD_MDW} \ - ${USE_AACLCE_MDW} \ -" - -# USE_OMX_VIDEO_DEC for Video Decoder Common Libs -USE_VIDEO_DEC = "${@'1' if '1' in '${LIST_OMX_VIDEO_DEC_FLAG}' else '0'}" - -# USE_OMX_VIDEO_DEC for Video Encoder Common Libs -USE_VIDEO_ENC = "${@'1' if '1' in '${LIST_OMX_VIDEO_ENC_FLAG}' else '0'}" - -# USE_VIDEO_OMX for Enable/Disable OMX Video -USE_VIDEO_OMX = "${@'1' if '1' in '${USE_VIDEO_DEC} ${USE_VIDEO_ENC}' else '0'}" - -# USE_AUDIO_OMX for Audio Common Libs -USE_AUDIO_OMX = "${@'1' if '1' in '${LIST_OMX_AUDIO_FLAG}' else '0'}" - -# USE_OMX_COMMON for OMX Common Libs -USE_OMX_COMMON = "${@'1' if '1' in '${USE_VIDEO_OMX} ${USE_AUDIO_OMX}' else '0'}" - -# USE_OMX_USER_MODULE for OMX User Module -# Note) List of USE_OMX_COMMON = {USE_VIDEO_OMX} + {USE_AUDIO_OMX} -USE_OMX_USER_MODULE = "${@'1' if '1' in '${USE_OMX_COMMON} ${LIST_AUDIO_MDW_FLAG}' else '0'}" - -USE_OMX_EVA_PKG = "${@'1' if 'use_eva_pkg' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-modules-common.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-modules-common.inc deleted file mode 100644 index 7cd0845d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-modules-common.inc +++ /dev/null @@ -1,9 +0,0 @@ -export BUILDDIR = "${STAGING_INCDIR}/.." -export INCSHARED = "${STAGING_INCDIR}" -export LIBSHARED = "${STAGING_LIBDIR}" -export KERNELSRC = "${STAGING_KERNEL_DIR}" -export CROSS_COMPILE = "${TARGET_PREFIX}" -export KERNELDIR = "${STAGING_KERNEL_DIR}" -export LDFLAGS = "" -export CP = "cp" -require include/rcar-gen3-path-common.inc diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-path-common.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-path-common.inc deleted file mode 100644 index d3dcfffc..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/include/rcar-gen3-path-common.inc +++ /dev/null @@ -1 +0,0 @@ -RENESAS_DATADIR ?= "/usr/local" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend deleted file mode 100644 index 460c4b01..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm libgbm" -PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm libgbm" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb deleted file mode 100644 index 81f5cd98..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb +++ /dev/null @@ -1,60 +0,0 @@ -DESCRIPTION = "ARM Trusted Firmware" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit deploy -require include/multimedia-control.inc -require include/arm-trusted-firmware-control.inc - -S = "${WORKDIR}/git" - -BRANCH = "rcar_gen3" -SRC_URI = "git://github.com/renesas-rcar/arm-trusted-firmware.git;branch=${BRANCH}" -SRCREV = "236f8fbb57af7f899980bbd5a03feb12d6462970" - -PV = "v1.5+renesas+git${SRCPV}" - -COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" -PLATFORM = "rcar" -ATFW_OPT_LOSSY = "${@oe.utils.conditional("USE_MULTIMEDIA", "1", "RCAR_LOSSY_ENABLE=1", "", d)}" -ATFW_OPT_r8a7795 = "LSI=H3 RCAR_DRAM_SPLIT=1 RCAR_DRAM_LPDDR4_MEMCONF=0 ${ATFW_OPT_LOSSY}" -ATFW_OPT_r8a7796 = "LSI=M3 RCAR_DRAM_SPLIT=2 ${ATFW_OPT_LOSSY}" -ATFW_OPT_r8a77965 = "LSI=M3N ${ATFW_OPT_LOSSY}" -ATFW_OPT_r8a77990 = "LSI=E3 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 RCAR_DRAM_DDR3L_MEMDUAL=0" -ATFW_OPT_append_ulcb = " RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0" - -# requires CROSS_COMPILE set by hand as there is no configure script -export CROSS_COMPILE="${TARGET_PREFIX}" - -# 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" - -do_compile() { - oe_runmake distclean - oe_runmake bl2 bl31 dummytool PLAT=${PLATFORM} ${ATFW_OPT} -} - -# do_install() nothing -do_install[noexec] = "1" - -do_deploy() { - # Create deploy folder - install -d ${DEPLOYDIR} - - # Copy IPL to deploy folder - install -m 0644 ${S}/build/${PLATFORM}/release/bl2/bl2.elf ${DEPLOYDIR}/bl2-${MACHINE}.elf - install -m 0644 ${S}/build/${PLATFORM}/release/bl2.bin ${DEPLOYDIR}/bl2-${MACHINE}.bin - install -m 0644 ${S}/build/${PLATFORM}/release/bl2.srec ${DEPLOYDIR}/bl2-${MACHINE}.srec - install -m 0644 ${S}/build/${PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}.elf - install -m 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}.bin - install -m 0644 ${S}/build/${PLATFORM}/release/bl31.srec ${DEPLOYDIR}/bl31-${MACHINE}.srec - install -m 0644 ${S}/tools/dummy_create/bootparam_sa0.srec ${DEPLOYDIR}/bootparam_sa0.srec - install -m 0644 ${S}/tools/dummy_create/cert_header_sa6.srec ${DEPLOYDIR}/cert_header_sa6.srec -} -addtask deploy before do_build after do_compile diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch deleted file mode 100644 index db8bdace..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 30dd2986fb64aba7ee78d4e231c344e2c39d7999 Mon Sep 17 00:00:00 2001 -From: Simon Hughes -Date: Thu, 21 Jun 2018 17:22:23 +0100 -Subject: [PATCH] Fix for teec_trace.c snprintf -Werror=format-truncation= - error. - -Signed-off-by: Simon Hughes ---- - libteec/src/teec_trace.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libteec/src/teec_trace.c b/libteec/src/teec_trace.c -index 78b79d6..c91bc43 100644 ---- a/libteec/src/teec_trace.c -+++ b/libteec/src/teec_trace.c -@@ -106,7 +106,8 @@ int _dprintf(const char *function, int flen, int line, int level, - */ - int thread_id = syscall(SYS_gettid); /* perf issue ? */ - -- snprintf(prefixed, MAX_PRINT_SIZE, -+ int len = 0; -+ len = snprintf(prefixed+len, MAX_PRINT_SIZE, - "%s [%d] %s:%s:%d: %s", - trace_level_strings[level], thread_id, prefix, func, - line, raw); --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch deleted file mode 100644 index fddc7fc1..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 04a72e88f768722edff453694e70535d36a8b1b4 Mon Sep 17 00:00:00 2001 -From: Hiroki Negishi -Date: Mon, 1 Apr 2019 13:10:57 +0900 -Subject: [PATCH] tee-supplicant: use MMC_IOC_MULTI_CMD for RPMB access - -To access RPMB, host should switch to RPMB partition. -And in RPMB partition, host should finish RPMB sequence. - -In case of using MMC_IOC_CMD as RPMB ioctl, eMMC driver switches -partition to user data area between WRITE command and READ command. -This may cause General failure. -In case of MMC_IOC_MULTI_CMD, eMMC driver keeps RPMB partition. - -This patch changes RPMB ioctl from MMC_IOC_CMD into MMC_IOC_MULTI_CMD -and changes ioctl parameters according to mmc utils. - -Signed-off-by: Hiroki Negishi ---- - tee-supplicant/src/rpmb.c | 120 +++++++++++++++++++++++----------------------- - 1 file changed, 61 insertions(+), 59 deletions(-) - -diff --git a/tee-supplicant/src/rpmb.c b/tee-supplicant/src/rpmb.c -index cac9932..29da690 100644 ---- a/tee-supplicant/src/rpmb.c -+++ b/tee-supplicant/src/rpmb.c -@@ -114,6 +114,7 @@ static pthread_mutex_t rpmb_mutex = PTHREAD_MUTEX_INITIALIZER; - */ - - #define MMC_BLOCK_MAJOR 179 -+#define RPMB_MULTI_CMD_MAX_CMDS 3 - - /* mmc_ioc_cmd.opcode */ - #define MMC_SEND_EXT_CSD 8 -@@ -130,6 +131,9 @@ static pthread_mutex_t rpmb_mutex = PTHREAD_MUTEX_INITIALIZER; - - #define MMC_CMD_ADTC (1 << 5) /* Addressed data transfer command */ - -+#define MMC_RSP_SPI_S1 (1 << 7) /* one status byte */ -+#define MMC_RSP_SPI_R1 (MMC_RSP_SPI_S1) -+ - /* mmc_ioc_cmd.write_flag */ - #define MMC_CMD23_ARG_REL_WR (1 << 31) /* CMD23 reliable write */ - -@@ -610,26 +614,38 @@ static uint32_t read_ext_csd(int fd, uint8_t *ext_csd) - return TEEC_SUCCESS; - } - -+static inline void set_single_cmd(struct mmc_ioc_cmd *ioc, __u32 opcode, -+ int write_flag, unsigned int blocks) -+{ -+ ioc->opcode = opcode; -+ ioc->write_flag = write_flag; -+ ioc->arg = 0x0; -+ ioc->blksz = 512; -+ ioc->blocks = blocks; -+ ioc->flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; -+} -+ - static uint32_t rpmb_data_req(int fd, struct rpmb_data_frame *req_frm, - size_t req_nfrm, struct rpmb_data_frame *rsp_frm, - size_t rsp_nfrm) - { -- int st; -+ int err; - size_t i; - uint16_t msg_type = ntohs(req_frm->msg_type); -- struct mmc_ioc_cmd cmd; -+ struct mmc_ioc_cmd *ioc; -+ struct mmc_ioc_multi_cmd *mioc; -+ struct rpmb_data_frame frame_status = {0}; - -- memset(&cmd, 0, sizeof(cmd)); -- cmd.blksz = 512; -- cmd.blocks = req_nfrm; -- cmd.data_ptr = (uintptr_t)req_frm; -- cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; -- cmd.opcode = MMC_WRITE_MULTIPLE_BLOCK; -- cmd.write_flag = 1; -+ mioc = (struct mmc_ioc_multi_cmd *) -+ malloc(sizeof(struct mmc_ioc_multi_cmd) + -+ RPMB_MULTI_CMD_MAX_CMDS * sizeof(struct mmc_ioc_cmd)); -+ if (!mioc) -+ return -ENOMEM; - - for (i = 1; i < req_nfrm; i++) { - if (req_frm[i].msg_type != msg_type) { - EMSG("All request frames shall be of the same type"); -+ free(mioc); - return TEEC_ERROR_BAD_PARAMETERS; - } - } -@@ -642,77 +658,63 @@ static uint32_t rpmb_data_req(int fd, struct rpmb_data_frame *req_frm, - case RPMB_MSG_TYPE_REQ_AUTH_DATA_WRITE: - if (rsp_nfrm != 1) { - EMSG("Expected only one response frame"); -+ free(mioc); - return TEEC_ERROR_BAD_PARAMETERS; - } - -- /* Send write request frame(s) */ -- cmd.write_flag |= MMC_CMD23_ARG_REL_WR; -- /* -- * Black magic: tested on a HiKey board with a HardKernel eMMC -- * module. When postsleep values are zero, the kernel logs -- * random errors: "mmc_blk_ioctl_cmd: Card Status=0x00000E00" -- * and ioctl() fails. -- */ -- cmd.postsleep_min_us = 20000; -- cmd.postsleep_max_us = 50000; -- st = IOCTL(fd, MMC_IOC_CMD, &cmd); -- if (st < 0) -- return TEEC_ERROR_GENERIC; -- cmd.postsleep_min_us = 0; -- cmd.postsleep_max_us = 0; -- -- /* Send result request frame */ -- memset(rsp_frm, 0, 1); -- rsp_frm->msg_type = htons(RPMB_MSG_TYPE_REQ_RESULT_READ); -- cmd.data_ptr = (uintptr_t)rsp_frm; -- cmd.write_flag &= ~MMC_CMD23_ARG_REL_WR; -- st = IOCTL(fd, MMC_IOC_CMD, &cmd); -- if (st < 0) -- return TEEC_ERROR_GENERIC; -- -- /* Read response frame */ -- cmd.opcode = MMC_READ_MULTIPLE_BLOCK; -- cmd.write_flag = 0; -- cmd.blocks = rsp_nfrm; -- st = IOCTL(fd, MMC_IOC_CMD, &cmd); -- if (st < 0) -- return TEEC_ERROR_GENERIC; -+ mioc->num_of_cmds = 3; -+ -+ /* Write request */ -+ ioc = &mioc->cmds[0]; -+ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, (1 << 31) | 1, 1); -+ mmc_ioc_cmd_set_data((*ioc), req_frm); -+ -+ /* Result request */ -+ ioc = &mioc->cmds[1]; -+ frame_status.msg_type = htobe16(RPMB_MSG_TYPE_REQ_RESULT_READ); -+ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, 1, 1); -+ mmc_ioc_cmd_set_data((*ioc), &frame_status); -+ -+ /* Get response */ -+ ioc = &mioc->cmds[2]; -+ set_single_cmd(ioc, MMC_READ_MULTIPLE_BLOCK, 0, 1); -+ mmc_ioc_cmd_set_data((*ioc), rsp_frm); -+ - break; - - case RPMB_MSG_TYPE_REQ_WRITE_COUNTER_VAL_READ: - if (rsp_nfrm != 1) { - EMSG("Expected only one response frame"); -+ free(mioc); - return TEEC_ERROR_BAD_PARAMETERS; - } - - /* Fall through */ - case RPMB_MSG_TYPE_REQ_AUTH_DATA_READ: -- if (req_nfrm != 1) { -- EMSG("Expected only one request frame"); -- return TEEC_ERROR_BAD_PARAMETERS; -- } -+ mioc->num_of_cmds = 2; -+ -+ /* Read request */ -+ ioc = &mioc->cmds[0]; -+ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, 1, 1); -+ mmc_ioc_cmd_set_data((*ioc), req_frm); -+ -+ /* Get response */ -+ ioc = &mioc->cmds[1]; -+ set_single_cmd(ioc, MMC_READ_MULTIPLE_BLOCK, 0, rsp_nfrm); -+ mmc_ioc_cmd_set_data((*ioc), rsp_frm); - -- /* Send request frame */ -- st = IOCTL(fd, MMC_IOC_CMD, &cmd); -- if (st < 0) -- return TEEC_ERROR_GENERIC; -- -- /* Read response frames */ -- cmd.data_ptr = (uintptr_t)rsp_frm; -- cmd.opcode = MMC_READ_MULTIPLE_BLOCK; -- cmd.write_flag = 0; -- cmd.blocks = rsp_nfrm; -- st = IOCTL(fd, MMC_IOC_CMD, &cmd); -- if (st < 0) -- return TEEC_ERROR_GENERIC; - break; - - default: - EMSG("Unsupported message type: %d", msg_type); -+ free(mioc); - return TEEC_ERROR_GENERIC; - } - -- return TEEC_SUCCESS; -+ err = ioctl(fd, MMC_IOC_MULTI_CMD, mioc); -+ -+ free(mioc); -+ return err; - } - - static uint32_t rpmb_get_dev_info(uint16_t dev_id, struct rpmb_dev_info *info) --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service deleted file mode 100644 index 37fc4f75..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=optee services - -[Service] -ExecStart=/usr/bin/tee-supplicant -ExecStop=/usr/bin/killall -s KILL tee-supplicant - -[Install] -WantedBy=multi-user.target diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb deleted file mode 100644 index 960c6141..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb +++ /dev/null @@ -1,63 +0,0 @@ -DESCRIPTION = "OP-TEE Client" -LICENSE = "BSD-2-Clause" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" -PR = "r0" -PV = "3.1.0+renesas+git${SRCPV}" -BRANCH = "master" -SRC_URI = "git://github.com/OP-TEE/optee_client.git;branch=${BRANCH}" -SRCREV = "3f16662284a69fdec97b1712064be94d1fed7ae7" - -SRC_URI += " \ - file://optee.service \ - file://0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch \ - file://0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch \ -" - -inherit pythonnative systemd -SYSTEMD_SERVICE_${PN} = "optee.service" - -COMPATIBLE_MACHINE = "salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/git" - -# Recipe which fail to compile when enabling _FORTIFY_SOURCE=2 option -SECURITY_CFLAGS_pn-optee-client = "" - -EXTRA_OEMAKE = "RPMB_EMU=0" - -do_install () { - # Create destination directories - install -d ${D}/${libdir} - install -d ${D}/${includedir} - - # Install library - install -m 0755 ${S}/out/export/lib/libteec.so.1.0 ${D}/${libdir} - - # Create symbolic link - cd ${D}/${libdir} - ln -sf libteec.so.1.0 libteec.so.1 - ln -sf libteec.so.1 libteec.so - - # Install header files - install -m 0644 ${S}/out/export/include/* ${D}/${includedir} - - # Install systemd service configure file for OP-TEE client - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}/${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/optee.service ${D}/${systemd_system_unitdir} - fi -} - -# install the tee-supplicant for 64 bit only. -do_install_append_aarch64 () { - # Create destination directory - install -d ${D}/${bindir} - - # Install binary to bindir - install -m 0755 ${S}/out/export/bin/tee-supplicant ${D}/${bindir} -} - -RPROVIDES_${PN} += "optee-client" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples/0001-secure_storage-ta-Add-a-missing-include-file.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples/0001-secure_storage-ta-Add-a-missing-include-file.patch deleted file mode 100644 index 7627a066..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples/0001-secure_storage-ta-Add-a-missing-include-file.patch +++ /dev/null @@ -1,29 +0,0 @@ -From be7079678aeb1503e0f681d977c47c44fd7b4f8c Mon Sep 17 00:00:00 2001 -From: Pierre Marzin -Date: Mon, 19 Aug 2019 09:33:17 +0000 -Subject: [PATCH] secure_storage: ta: Add a missing include file - -The commit 9890a50d3c26b377dcb27f5db680018e15a5a3de fix a size type by -using a format macro contant 'PRIu32' into a printf. This needs the -inttypes.h header file to build correctly with aarch64-linux-gnu-gcc. - -Signed-off-by: Pierre Marzin ---- - secure_storage/ta/secure_storage_ta.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/secure_storage/ta/secure_storage_ta.c b/secure_storage/ta/secure_storage_ta.c -index 3ccc12d..cfdfbb6 100644 ---- a/secure_storage/ta/secure_storage_ta.c -+++ b/secure_storage/ta/secure_storage_ta.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - static TEE_Result delete_object(uint32_t param_types, TEE_Param params[4]) - { --- -2.11.0 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb deleted file mode 100644 index ccfe3fe3..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "OP-TEE examples" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30" - - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit pythonnative - -PV = "3.6.0+git${SRCPV}" - -SRCREV = "292da2fd8db0176e0e96989268c63ef9ab910a6c" - -SRC_URI = " \ - git://github.com/linaro-swg/optee_examples;branch=master;name=master \ - file://0001-secure_storage-ta-Add-a-missing-include-file.patch \ -" - -COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" -PLATFORM = "rcar" - -DEPENDS = "optee-os optee-client python-pycrypto-native" - -CFLAGS += "-Wno-extra -Wno-error=format" -TARGET_CFLAGS += "-Wno-extra -Wno-error=format" - -TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" - -TA_DEV_KIT_DIR = "${STAGING_DIR_TARGET}/usr/share/optee/export-ta_arm64" - -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_TARGET}/usr" - -TEEC_EXPORT = "${STAGING_DIR_TARGET}/usr" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = "\ - TEEC_EXPORT=${TEEC_EXPORT} \ - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ - TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ - HOST_CROSS_COMPILE=${TARGET_PREFIX} \ - TA_CROSS_COMPILE=${TARGET_PREFIX} \ - PLATFORM=${PLATFORM} \ - V=1 \ - " - -do_compile() { - oe_runmake -} - -do_install () { - mkdir -p ${D}${nonarch_base_libdir}/optee_armtz - mkdir -p ${D}${bindir} - install -D -p -m0755 ${S}/out/ca/* ${D}${bindir} - install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz - mkdir -p ${D}${includedir} - cp ${S}/hello_world/ta/include/* ${D}${includedir} -} - -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch deleted file mode 100644 index bad7b27c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch +++ /dev/null @@ -1,75 +0,0 @@ -From f6d17e33e7b95c90a2521cfd37cd5cb511909fc4 Mon Sep 17 00:00:00 2001 -From: Jerome Forissier -Date: Thu, 5 Jul 2018 13:07:52 +0200 -Subject: [PATCH] core: define syscall_t as void (*)(void) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -syscall_t is currently typedef'ed as TEE_Result (*)(void). It is used to -represent a pointer to any system call, in the syscall table for instance. -As such, the exact type behind syscall_t cannot reflect all the syscalls -since they have different prototypes. The current declaration with a -TEE_Result return type was probably chosen because it was a common -characteristic of all syscalls to return a TEE_Result. - -However, this type causes compilation warnings with GCC 8.1: - -core/arch/arm/tee/arch_svc.c:43:36: warning: cast between incompatible function types from ‘void (*)(long unsigned int)’ to ‘TEE_Result (*)(void)’ {aka ‘unsigned int (*)(void)’} [-Wcast-function-type] - #define SYSCALL_ENTRY(_fn) { .fn = (syscall_t)_fn } - ^ -core/arch/arm/tee/arch_svc.c:50:2: note: in expansion of macro ‘SYSCALL_ENTRY’ - SYSCALL_ENTRY(syscall_sys_return), - ^~~~~~~~~~~~~ - -The solution is to use 'void (*)(void)' instead, as explained in the GCC -documentation: - - -Wcast-function-type - - Warn when a function pointer is cast to an incompatible function - pointer. [...] The function type void (*) (void) is special and matches - everything, which can be used to suppress this warning. [...] - -Link: [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html -Signed-off-by: Jerome Forissier -Acked-by: Jens Wiklander ---- - core/arch/arm/tee/arch_svc.c | 2 +- - core/arch/arm/tee/arch_svc_private.h | 7 +++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/core/arch/arm/tee/arch_svc.c b/core/arch/arm/tee/arch_svc.c -index eb142ec..b2dd193 100644 ---- a/core/arch/arm/tee/arch_svc.c -+++ b/core/arch/arm/tee/arch_svc.c -@@ -208,7 +208,7 @@ void __weak tee_svc_handler(struct thread_svc_regs *regs) - } - - if (scn > TEE_SCN_MAX) -- scf = syscall_not_supported; -+ scf = (syscall_t)syscall_not_supported; - else - scf = tee_svc_syscall_table[scn].fn; - -diff --git a/core/arch/arm/tee/arch_svc_private.h b/core/arch/arm/tee/arch_svc_private.h -index c0b3a73..695e733 100644 ---- a/core/arch/arm/tee/arch_svc_private.h -+++ b/core/arch/arm/tee/arch_svc_private.h -@@ -7,8 +7,11 @@ - - #include - --/* void argument but in reality it can be any number of arguments */ --typedef TEE_Result (*syscall_t)(void); -+/* -+ * Generic "pointer to function" type. Actual syscalls take zero or more -+ * arguments and return TEE_Result. -+ */ -+typedef void (*syscall_t)(void); - - /* Helper function for tee_svc_handler() */ - uint32_t tee_svc_do_call(struct thread_svc_regs *regs, syscall_t func); --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb deleted file mode 100644 index e338631b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb +++ /dev/null @@ -1,70 +0,0 @@ -DESCRIPTION = "OP-TEE OS" - -LICENSE = "BSD-2-Clause & BSD-3-Clause" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=69663ab153298557a59c67a60a743e5b \ - file://${WORKDIR}/git_official/LICENSE;md5=69663ab153298557a59c67a60a743e5b \ -" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit deploy pythonnative - -PV = "3.1.0+renesas+git${SRCPV}" - -BRANCH = "rcar_gen3" -SRCREV_renesas = "19fb6dcbf42631f23afed406e893310eb30cd548" -SRCREV_officialgit = "e77020396508fc086d7a4d6137388b116e4a662f" -SRCREV_FORMAT = "renesas_officialgit" - -SRC_URI = " \ - git://github.com/renesas-rcar/optee_os.git;branch=${BRANCH};name=renesas \ - git://github.com/OP-TEE/optee_os.git;branch=master;name=officialgit;destsuffix=git_official \ - file://0001-core-define-syscall_t-as-void-void.patch \ -" - -COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" -PLATFORM = "rcar" - -DEPENDS = "python-pycrypto-native" - -export CROSS_COMPILE64="${TARGET_PREFIX}" - -# Let the Makefile handle setting up the flags as it is a standalone application -LD[unexport] = "1" -LDFLAGS[unexport] = "1" -export CCcore="${CC}" -export LDcore="${LD}" -libdir[unexport] = "1" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -do_configure() { - git -C ${WORKDIR}/git_official checkout -B official 3.1.0 - git -C ${WORKDIR}/git_official cherry-pick -n ${SRCREV_officialgit} - cp -rn ${WORKDIR}/git_official/core/lib/libtomcrypt ${B}/core/lib/. -} - -do_compile() { - oe_runmake PLATFORM=${PLATFORM} CFG_ARM64_core=y -} - -do_install() { - install -d ${D}/usr/share/optee - cp -r ${S}/out/arm-plat-${PLATFORM}/export-ta_arm64 ${D}/usr/share/optee -} - -do_deploy() { - # Create deploy folder - install -d ${DEPLOYDIR} - - # Copy TEE OS to deploy folder - install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.elf ${DEPLOYDIR}/tee-${MACHINE}.elf - install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.bin ${DEPLOYDIR}/tee-${MACHINE}.bin - install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.srec ${DEPLOYDIR}/tee-${MACHINE}.srec -} -addtask deploy before do_build after do_compile - -FILES_${PN}-staticdev += "${datadir}/optee/export-ta_arm64/lib/*.a" -FILES_${PN}-dev += "${datadir}/optee/export-ta_arm64" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test/optee_xtest_fix.diff b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test/optee_xtest_fix.diff deleted file mode 100644 index 5067086f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test/optee_xtest_fix.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/host/xtest/regression_6000.c b/host/xtest/regression_6000.c -index 336ea14..2379e43 100644 ---- a/host/xtest/regression_6000.c -+++ b/host/xtest/regression_6000.c -@@ -82,6 +82,8 @@ static uint32_t fs_id_for_tee_storage_private(void) - return TEE_STORAGE_PRIVATE_REE; - #elif defined(CFG_RPMB_FS) - return TEE_STORAGE_PRIVATE_RPMB; -+#else -+ return TEE_STORAGE_PRIVATE; - #endif - } - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb deleted file mode 100644 index ea58e24c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb +++ /dev/null @@ -1,55 +0,0 @@ -DESCRIPTION = "OP-TEE TEST" - -LICENSE = "GPLv2 & BSD-2-Clause" -LIC_FILES_CHKSUM = "file://${S}/host/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit pythonnative - -PV = "3.1.0+git${SRCPV}" - -SRCREV = "45218eb59b006ad20cc7610904f291dd85157a43" - -SRC_URI = " \ - git://github.com/OP-TEE/optee_test.git;branch=master;name=master \ - file://optee_xtest_fix.diff \ -" - -COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" -PLATFORM = "rcar" - -DEPENDS = "optee-os optee-client python-pycrypto-native" - -export CROSS_COMPILE64="${TARGET_PREFIX}" - -# Let the Makefile handle setting up the flags as it is a standalone application -LD[unexport] = "1" -LDFLAGS[unexport] = "1" -export CCcore="${CC}" -export LDcore="${LD}" -libdir[unexport] = "1" - -CFLAGS += "-Wno-extra -Wno-error=stringop-overflow -Wno-error=array-bounds" -TARGET_CFLAGS += "-Wno-extra -Wno-error=stringop-overflow -Wno-error=array-bounds" - -TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -do_compile() { - oe_runmake CROSS_COMPILE=${CROSS_COMPILE64} PLATFORM=${PLATFORM} OPTEE_CLIENT_EXPORT=${STAGING_DIR_TARGET}/usr --no-builtin-variables TA_DEV_KIT_DIR="${STAGING_DIR_TARGET}/usr/share/optee/export-ta_arm64" -} - -do_install () { - install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest - - # install path should match the value set in optee-client/tee-supplicant - # default TEEC_LOAD_PATH is /lib - mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ - install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ -} - -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb deleted file mode 100644 index 8d45a3c2..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb +++ /dev/null @@ -1,57 +0,0 @@ -SUMMARY = "OP-TEE user_app_template" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit pythonnative - -PV = "0.1+git${SRCPV}" - -SRCREV = "0.1" - -SRC_URI = " \ - git://github.com/iotbzh/optee_user_app_template;branch=master \ -" - -COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" -PLATFORM = "rcar" - -DEPENDS = "optee-os optee-client python-pycrypto-native" - -CFLAGS += "-Wno-extra -Wno-error=format" -TARGET_CFLAGS += "-Wno-extra -Wno-error=format" - -TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" - -TA_DEV_KIT_DIR = "${STAGING_DIR_TARGET}/usr/share/optee/export-ta_arm64" - -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_TARGET}/usr" - -TEEC_EXPORT = "${STAGING_DIR_TARGET}/usr" - -S = "${WORKDIR}/git" -EXTRA_OEMAKE = "\ - TEEC_EXPORT=${TEEC_EXPORT} \ - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ - TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ - HOST_CROSS_COMPILE=${TARGET_PREFIX} \ - TA_CROSS_COMPILE=${TARGET_PREFIX} \ - PLATFORM=${PLATFORM} \ - V=1 \ - " - -do_compile() { - oe_runmake -} - -do_install () { - mkdir -p ${D}${nonarch_base_libdir}/optee_armtz - mkdir -p ${D}${bindir} - install -D -p -m0755 ${S}/out/ca/* ${D}${bindir} - install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz -} - -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb deleted file mode 100644 index 8fb0198f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb +++ /dev/null @@ -1,36 +0,0 @@ -DESCRIPTION = "QOS Interface test app for R-Car Gen3" - -require qosif.inc - -DEPENDS = "qosif-user-module" -PN = "qosif-tp-user-module" -PR = "r0" - -S = "${WORKDIR}/git" -QOSIF_TP_DIR = "qos_if-tp-user/files/qos_if" - -includedir = "${RENESAS_DATADIR}/include" - -do_compile() { - cd ${S}/${QOSIF_TP_DIR} - oe_runmake -} - -do_install() { - # Create destination directory - install -d ${D}${RENESAS_DATADIR}/bin/ - - # Copy user test program - install -m 755 ${S}/${QOSIF_TP_DIR}/qos_tp ${D}${RENESAS_DATADIR}/bin/ -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dbg \ -" - -FILES_${PN} = "${RENESAS_DATADIR}/bin/qos_tp" - -FILES_${PN}-dbg = " \ - ${RENESAS_DATADIR}/bin/.debug/* \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb deleted file mode 100644 index c836fe31..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "QOS Interface library for R-Car Gen3" - -require qosif.inc - -DEPENDS = "kernel-module-qos" -PN = "qosif-user-module" -PR = "r0" - -S = "${WORKDIR}/git" -QOSIF_LIB_DIR = "qos_if-module/files/qos_if" - -EXTRA_OEMAKE = "ARCH=${TARGET_ARCH}" - -includedir = "${RENESAS_DATADIR}/include" - -do_compile() { - # Build shared library - cd ${S}/${QOSIF_LIB_DIR}/if - rm -rf ${S}/${QOSIF_LIB_DIR}/if/libqos.so* - oe_runmake -} - -do_install() { - # Create destination directories - install -d ${D}/${libdir} - install -d ${D}/${includedir} - - # Copy shared library - install -m 755 ${S}/${QOSIF_LIB_DIR}/if/libqos.so* ${D}/${libdir}/ - cd ${D}/${libdir}/ - ln -sf libqos.so.1.0.0 libqos.so.1 - ln -sf libqos.so.1 libqos.so - - # Install shared header file - install -m 644 ${S}/${QOSIF_LIB_DIR}/include/qos_public.h ${D}/${includedir}/ -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-dbg \ -" - -FILES_${PN} = " \ - ${libdir}/libqos.so* \ -" - -INSANE_SKIP_${PN} = "dev-so" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif.inc deleted file mode 100644 index 0b6cf905..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/qos/qosif.inc +++ /dev/null @@ -1,15 +0,0 @@ -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9 \ -" - -require include/rcar-gen3-modules-common.inc - -QOSIF_LIB_URL = "git://github.com/renesas-rcar/qos_lib.git" -BRANCH = "rcar-gen3" -SRCREV = "84ea8d562a55d1fbd7b6acf08a498d33a92dc392" - -SRC_URI = "${QOSIF_LIB_URL};branch=${BRANCH}" - -# This module is machine specific. -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc deleted file mode 100644 index f66ac8fb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc +++ /dev/null @@ -1,9 +0,0 @@ -HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" -SECTION = "bootloaders" -DEPENDS += "flex-native bison-native" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" -PE = "1" - -S = "${WORKDIR}/git" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc deleted file mode 100644 index 48fbc572..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc +++ /dev/null @@ -1,310 +0,0 @@ -SUMMARY = "Universal Boot Loader for embedded devices" -PROVIDES = "virtual/bootloader" - -B = "${WORKDIR}/build" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit uboot-config uboot-extlinux-config uboot-sign deploy - -DEPENDS += "swig-native python-native" - -EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' -EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' -EXTRA_OEMAKE += 'PYTHON=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' - -PACKAGECONFIG ??= "openssl" -# u-boot will compile its own tools during the build, with specific -# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as -# a host build dependency. -PACKAGECONFIG[openssl] = ",,openssl-native" - -# Allow setting an additional version string that will be picked up by the -# u-boot build system and appended to the u-boot version. If the .scmversion -# file already exists it will not be overwritten. -UBOOT_LOCALVERSION ?= "" - -# Some versions of u-boot use .bin and others use .img. By default use .bin -# but enable individual recipes to change this value. -UBOOT_SUFFIX ??= "bin" -UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" -UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}" -UBOOT_MAKE_TARGET ?= "all" - -# Output the ELF generated. Some platforms can use the ELF file and directly -# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging -# purposes. -UBOOT_ELF ?= "" -UBOOT_ELF_SUFFIX ?= "elf" -UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" - -# Some versions of u-boot build an SPL (Second Program Loader) image that -# should be packaged along with the u-boot binary as well as placed in the -# deploy directory. For those versions they can set the following variables -# to allow packaging the SPL. -SPL_BINARY ?= "" -SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" -SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" -SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" - -# Additional environment variables or a script can be installed alongside -# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' -# or 'boot.scr', should be packaged along with u-boot as well as placed in the -# deploy directory. Machine configurations needing one of these files should -# include it in the SRC_URI and set the UBOOT_ENV parameter. -UBOOT_ENV_SUFFIX ?= "txt" -UBOOT_ENV ?= "" -UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" - -# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf -# to find EXTLINUX conf file. -UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" -UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" -UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" - -do_compile () { - if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then - sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk - fi - - unset LDFLAGS - unset CFLAGS - unset CPPFLAGS - - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then - echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion - echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion - fi - - if [ -n "${UBOOT_CONFIG}" ] - then - unset i j k - 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 - oe_runmake -C ${S} O=${B}/${config} ${config} - oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} - for binary in ${UBOOT_BINARIES}; do - k=$(expr $k + 1); - if [ $k -eq $i ]; then - cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} - fi - done - unset k - fi - done - unset j - done - unset i - else - oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} - oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} - fi - -} - -do_install () { - 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 ${D}/boot - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} - fi - done - unset j - done - unset i - else - install -d ${D}/boot - install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} - ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} - fi - - if [ -n "${UBOOT_ELF}" ] - then - 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 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} - fi - done - unset j - done - unset i - else - install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} - fi - fi - - if [ -e ${WORKDIR}/fw_env.config ] ; then - install -d ${D}${sysconfdir} - install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config - fi - - if [ -n "${SPL_BINARY}" ] - then - 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 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} - fi - done - unset j - done - unset i - else - install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} - fi - fi - - if [ -n "${UBOOT_ENV}" ] - then - install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} - ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} - fi - - if [ "${UBOOT_EXTLINUX}" = "1" ] - then - install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME} - fi - -} - -FILES_${PN} = "/boot ${sysconfdir}" - -do_deploy () { - 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} - install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - cd ${DEPLOYDIR} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} - fi - done - unset j - done - unset i - else - install -d ${DEPLOYDIR} - install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} - cd ${DEPLOYDIR} - rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} - fi - - if [ -n "${UBOOT_ELF}" ] - then - 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 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} - fi - done - unset j - done - unset i - else - install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} - fi - fi - - - if [ -n "${SPL_BINARY}" ] - then - 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 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} - rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} - fi - done - unset j - done - unset i - else - install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} - fi - fi - - - if [ -n "${UBOOT_ENV}" ] - then - install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} - ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} - ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} - fi - - if [ "${UBOOT_EXTLINUX}" = "1" ] - then - install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK} - ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} - ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} - fi -} - -addtask deploy before do_build after do_compile diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb deleted file mode 100644 index da155ce2..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb +++ /dev/null @@ -1,43 +0,0 @@ -require u-boot-common_${PV}.inc -require u-boot.inc - -DEPENDS += "bc-native dtc-native" - -UBOOT_URL = "git://github.com/renesas-rcar/u-boot.git" -BRANCH = "v2018.09/rcar-3.9.5" - -SRC_URI = "${UBOOT_URL};branch=${BRANCH}" -SRCREV = "33049e0f28708289ade19d09a51ba278f6ddbe1c" -PV = "v2018.09+git${SRCPV}" - -UBOOT_SREC_SUFFIX = "srec" -UBOOT_SREC ?= "u-boot-elf.${UBOOT_SREC_SUFFIX}" -UBOOT_SREC_IMAGE ?= "u-boot-elf-${MACHINE}-${PV}-${PR}.${UBOOT_SREC_SUFFIX}" -UBOOT_SREC_SYMLINK ?= "u-boot-elf-${MACHINE}.${UBOOT_SREC_SUFFIX}" - -do_deploy_append() { - 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 - type=${type#*_} - install -m 644 ${B}/${config}/${UBOOT_SREC} ${DEPLOYDIR}/u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} - cd ${DEPLOYDIR} - ln -sf u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} u-boot-elf-${type}.${UBOOT_SREC_SUFFIX} - fi - done - unset j - done - unset i - else - install -m 644 ${B}/${UBOOT_SREC} ${DEPLOYDIR}/${UBOOT_SREC_IMAGE} - cd ${DEPLOYDIR} - rm -f ${UBOOT_SREC} ${UBOOT_SREC_SYMLINK} - ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC_SYMLINK} - ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC} - fi -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb deleted file mode 100644 index ed4401f8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb +++ /dev/null @@ -1,58 +0,0 @@ -DESCRIPTION = "Linux ICCOM library test applications for Renesas R-Car Gen3" - -require iccom-user-module.inc -require include/multimedia-control.inc -require include/rcar-gen3-path-common.inc - -DEPENDS = " \ - kernel-module-iccom-mfis \ - iccom-user-module \ - ${@oe.utils.conditional('USE_MULTIMEDIA', '1', 'mmngr-user-module', '', d )} \ -" - -export USE_MMNGR="${USE_MULTIMEDIA}" - -PN = "iccom-tp-user-module" -PR = "r0" - -S = "${WORKDIR}/libiccom" - -do_compile() { - cd ${S}/sample_test - make - - cd ${S}/sample_test_fatal - make - - cd ${S}/sample_sharedmem - make - - cd ${S}/sample_lock - make - - cd ${S}/sample_pvconv - make -} - -do_install() { - # Create destination directory - install -d ${D}${RENESAS_DATADIR}/bin - - # Install test applications - install -m 755 ${S}/sample_test/sample_test ${D}${RENESAS_DATADIR}/bin/ - install -m 755 ${S}/sample_test_fatal/sample_test_fatal ${D}${RENESAS_DATADIR}/bin/ - install -m 755 ${S}/sample_sharedmem/sample_sharedmem ${D}${RENESAS_DATADIR}/bin/ - install -m 755 ${S}/sample_lock/sample_lock ${D}${RENESAS_DATADIR}/bin/ - install -m 755 ${S}/sample_pvconv/sample_pvconv ${D}${RENESAS_DATADIR}/bin/ -} - -FILES_${PN} = " \ - ${RENESAS_DATADIR}/bin/sample_test \ - ${RENESAS_DATADIR}/bin/sample_test_fatal \ - ${RENESAS_DATADIR}/bin/sample_sharedmem \ - ${RENESAS_DATADIR}/bin/sample_lock \ - ${RENESAS_DATADIR}/bin/sample_pvconv \ -" - -# Skip debug split -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb deleted file mode 100644 index d943f0c7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "Linux ICCOM library for Renesas R-Car Gen3" - -require iccom-user-module.inc -require include/rcar-gen3-path-common.inc - -DEPENDS = " \ - kernel-module-iccom-mfis \ -" - -PN = "iccom-user-module" -PR = "r0" - -# log output level : INFO=0 LOW=1 MED=2 HIGH=3 ERROR=4 FATAL=5 NONE=255 -# (the setting of 4 means that ERROR and FATAL log are output) -export MEG_LEV="4" - -S = "${WORKDIR}/libiccom" -B = "${S}/source" - -includedir = "${RENESAS_DATADIR}/include" - -do_install() { - # Create destination directories - install -d ${D}/${libdir} - install -d ${D}${RENESAS_DATADIR}/include - - # Install library - install -m 755 ${B}/libiccom.so ${D}/${libdir}/ - - # Install shared header file - install -m 644 ${S}/include/iccom_if_app.h ${D}${RENESAS_DATADIR}/include/ -} - -FILES_${PN} = " \ - ${libdir}/libiccom.so \ -" - -FILES_${PN}-dev = " \ - ${RENESAS_DATADIR}/include/iccom_if_app.h \ -" - -# Skip debug split -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc deleted file mode 100644 index 96caa778..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc +++ /dev/null @@ -1,8 +0,0 @@ -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=442d4e9f738ff4d05ae6215ae20caa6c" - -inherit distro_features_check - -REQUIRED_DISTRO_FEATURES = "iccom" - -SRC_URI = "file://libiccom.tar.bz2" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend deleted file mode 100644 index 3381aa56..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -require include/rcar-gen3-path-common.inc - -do_install_append () { - echo "export LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${RENESAS_DATADIR}/lib\"" >> ${D}${sysconfdir}/profile -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend deleted file mode 100644 index b1bd1233..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend +++ /dev/null @@ -1 +0,0 @@ -require recipes-graphics/images/core-image-renesas-base.inc diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend deleted file mode 100644 index 7efa4695..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# nativesdk don't generally look in base_libdir -base_libdir_class-nativesdk = "${libdir}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend deleted file mode 100644 index 84eca35f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# In YP2.1.2, nativesdk-wayland is lacking. -RDEPENDS_${PN}_append = " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland nativesdk-wayland-dev', '', d)} \ - nativesdk-perl nativesdk-perl-dev \ - nativesdk-perl-modules \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend deleted file mode 100644 index f414a2b3..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -PACKAGECONFIG_remove = "timesyncd" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend deleted file mode 100644 index f06b4519..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -require include/gles-control.inc -DEPENDS_append = " \ - ${@'gles-user-module libgbm' if '${USE_GLES_WAYLAND}' == '1' else ''} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch deleted file mode 100644 index bf526370..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e6bd4205b0b546afe991ae6f72256645f4404ad4 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Mon, 5 Sep 2016 14:41:37 +0300 -Subject: [PATCH libdrm] configure.ac: Allow explicit enabling of cunit tests - -Add --with-cunit to make it easier to do reproducible builds. Default -is still to probe cunit and build opportunistically. - -Signed-off-by: Jussi Kukkonen -Upstream-Status: Submitted [mailing list] ---- - configure.ac | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e3048c7..918d21d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs, - [Install test programs (default: no)]), - [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no]) - -+AC_ARG_WITH([cunit], -+ [AS_HELP_STRING([--with-cunit], -+ [Build tests that use cunit (default: auto)])], -+ [], -+ [with_cunit=auto]) -+ - dnl =========================================================================== - dnl check compiler flags - AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ -@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then - AC_DEFINE(HAVE_RADEON, 1, [Have radeon support]) - fi - --if test "x$AMDGPU" != xno; then -+if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then - # Detect cunit library - PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) - # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We -@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then - AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support]) - - if test "x$have_cunit" = "xno"; then -- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ if test "x$with_cunit" = "xyes"; then -+ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given]) -+ elif test "x$with_cunit" = "xauto"; then -+ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) -+ fi - fi - fi - --- -2.1.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch deleted file mode 100644 index 4708bf1e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch +++ /dev/null @@ -1,24 +0,0 @@ -drmdevice.c: define _GNU_SOURCE - -Include config.h to fix this build error with uclibc: - -libdrm-2.4.66/tests/drmdevice.c: In function 'main': -libdrm-2.4.66/tests/drmdevice.c:96:60: error: -'O_CLOEXEC' undeclared (first use in this function) -fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0); - -Upstream-Status: Pending - -Signed-off-by: Maxin B. John ---- -diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c ---- libdrm-2.4.66-orig/tests/drmdevice.c 2016-02-23 11:34:02.054904502 +0200 -+++ libdrm-2.4.66/tests/drmdevice.c 2016-02-23 11:35:34.371750383 +0200 -@@ -21,6 +21,7 @@ - * - */ - -+#include - #include - #include - #include diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/installtests.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/installtests.patch deleted file mode 100644 index ec1fb023..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm/installtests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Tue, 21 Feb 2017 14:37:52 +0200 -Subject: [PATCH] tests: also install test apps - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Yu Ke -Signed-off-by: Jussi Kukkonen ---- - tests/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 0355a92..b4882cd 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -45,3 +45,4 @@ TESTS = \ - check_PROGRAMS = \ - $(TESTS) \ - drmdevice -+bin_PROGRAMS = $(check_PROGRAMS) --- -2.1.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm_2.4.85.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm_2.4.85.bb deleted file mode 100644 index 4e3e8efc..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/drm/libdrm_2.4.85.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "Userspace interface to the kernel DRM services" -DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ -stands for \"Direct Rendering Manager\", which is the kernel portion of the \ -\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ -accelerated OpenGL drivers." -HOMEPAGE = "http://dri.freedesktop.org" -SECTION = "x11/base" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" -PROVIDES = "drm" -DEPENDS = "libpthread-stubs libpciaccess" - -SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \ - file://installtests.patch \ - file://fix_O_CLOEXEC_undeclared.patch \ - file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \ - " - -SRC_URI[md5sum] = "7aa540aeea4a1f3d1e9b0828f1772543" -SRC_URI[sha256sum] = "64e4cd87eaee38ae60b2984ef02b66159b9bdd33030040db2a04339cf15f6173" - -inherit autotools pkgconfig manpages - -EXTRA_OECONF += "--disable-cairo-tests \ - --without-cunit \ - --enable-omap-experimental-api \ - --enable-etnaviv-experimental-api \ - --enable-install-test-programs \ - --disable-valgrind \ - " -PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native" - -ALLOW_EMPTY_${PN}-drivers = "1" -PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ - ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ - ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \ - ${PN}-etnaviv" - -FILES_${PN}-tests = "${bindir}/*" -FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" -FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" -FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" -FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" -FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" -FILES_${PN}-kms = "${libdir}/libkms*.so.*" -FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" -FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" -FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb deleted file mode 100644 index cb7cc20a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb +++ /dev/null @@ -1,132 +0,0 @@ -require include/gles-control.inc -require include/rcar-gen3-path-common.inc -require include/checksum_control.inc - -DESCRIPTION = "PowerVR GPU user module" -LICENSE = "CLOSED" - -PN = "gles-user-module" -PR = "r0" - -COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/rogue" -GLES = "gsx" - -SRC_URI_r8a7795 = "file://r8a77951_linux_gsx_binaries_gles.tar.bz2" -SRC_URI_r8a7796 = "file://r8a77960_linux_gsx_binaries_gles.tar.bz2" -SRC_URI_r8a77965 = "file://r8a77965_linux_gsx_binaries_gles.tar.bz2" -SRC_URI_r8a77990 = "file://r8a77990_linux_gsx_binaries_gles.tar.bz2" - -SRC_URI_append = " \ - file://change-shell.patch \ - file://rc.pvr.service \ -" - -inherit update-rc.d systemd - -INITSCRIPT_NAME = "pvrinit" -INITSCRIPT_PARAMS = "start 7 5 2 . stop 62 0 1 6 ." -SYSTEMD_SERVICE_${PN} = "rc.pvr.service" - -do_populate_lic[noexec] = "1" -do_compile[noexec] = "1" - -do_install() { - # Install configuration files - install -d ${D}${sysconfdir}/init.d - install -m 644 ${S}/etc/powervr.ini ${D}${sysconfdir} - install -m 755 ${S}/etc/init.d/rc.pvr ${D}${sysconfdir}/init.d/pvrinit - install -m 755 ${S}/etc/init.d/rc.pvr ${D}${sysconfdir}/init.d/ - install -d ${D}${sysconfdir}/udev/rules.d - install -m 644 ${S}/etc/udev/rules.d/72-pvr-seat.rules ${D}${sysconfdir}/udev/rules.d/ - - # Install header files - install -d ${D}${includedir}/EGL - install -m 644 ${S}/usr/include/EGL/*.h ${D}${includedir}/EGL/ - install -d ${D}${includedir}/GLES2 - install -m 644 ${S}/usr/include/GLES2/*.h ${D}${includedir}/GLES2/ - install -d ${D}${includedir}/GLES3 - install -m 644 ${S}/usr/include/GLES3/*.h ${D}${includedir}/GLES3/ - install -d ${D}${includedir}/KHR - install -m 644 ${S}/usr/include/KHR/khrplatform.h ${D}${includedir}/KHR/khrplatform.h - - # Install pre-builded binaries - install -d ${D}${libdir} - install -m 755 ${S}/usr/lib/*.so ${D}${libdir}/ - install -d ${D}${RENESAS_DATADIR}/bin - install -m 755 ${S}/usr/local/bin/dlcsrv_REL ${D}${RENESAS_DATADIR}/bin/dlcsrv_REL - install -d ${D}/lib/firmware - install -m 644 ${S}/lib/firmware/* ${D}/lib/firmware/ - - # Install pkgconfig - install -d ${D}${libdir}/pkgconfig - install -m 644 ${S}/usr/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/ - - # Create symbolic link - cd ${D}${libdir} - ln -s libEGL.so libEGL.so.1 - ln -s libGLESv2.so libGLESv2.so.2 - - if [ "${USE_GLES_WAYLAND}" = "1" ]; then - # Set the "WindowSystem" parameter for wayland - if [ "${GLES}" = "gsx" ]; then - sed -i -e "s/WindowSystem=libpvrDRM_WSEGL.so/WindowSystem=libpvrWAYLAND_WSEGL.so/g" \ - ${D}${sysconfdir}/powervr.ini - fi - fi - - # Install systemd service - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} ; then - install -d ${D}${systemd_system_unitdir}/ - install -m 644 ${WORKDIR}/rc.pvr.service ${D}${systemd_system_unitdir}/ - install -d ${D}${exec_prefix}/bin - install -m 755 ${S}/etc/init.d/rc.pvr ${D}${exec_prefix}/bin/pvrinit - fi -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dev \ -" - -FILES_${PN} = " \ - ${sysconfdir}/* \ - ${libdir}/* \ - /lib/firmware/rgx.fw* \ - ${RENESAS_DATADIR}/bin/* \ - ${exec_prefix}/bin/* \ -" - -FILES_${PN}-dev = " \ - ${includedir}/* \ - ${libdir}/pkgconfig/* \ -" - -PROVIDES = "virtual/libgles2" -RPROVIDES_${PN} += " \ - ${GLES}-user-module \ - libgles2-mesa \ - libgles2-mesa-dev \ - libgles2 \ - libgles2-dev \ -" - -RDEPENDS_${PN} = " \ - kernel-module-gles \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ -" - -INSANE_SKIP_${PN} = "ldflags build-deps file-rdeps" -INSANE_SKIP_${PN}-dev = "ldflags build-deps file-rdeps" -INSANE_SKIP_${PN} += "arch" -INSANE_SKIP_${PN}-dev += "arch" -INSANE_SKIP_${PN}-dbg = "arch" - -# Skip debug strip of do_populate_sysroot() -INHIBIT_SYSROOT_STRIP = "1" - -# Skip debug split and strip of do_package() -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch deleted file mode 100644 index f6025709..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: rogue/etc/init.d/rc.pvr -=================================================================== ---- rogue.orig/etc/init.d/rc.pvr -+++ rogue/etc/init.d/rc.pvr -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - ############################################################################ ### - # File rc.pvr - # Copyright Copyright (C) 2013-2016 Renesas Electronics Corporation diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service deleted file mode 100644 index da7fc300..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=PowerVR consumer services -Before=weston.service - -[Service] -ExecStart=/usr/bin/pvrinit start -ExecStop=/usr/bin/pvrinit stop -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target -RequiredBy=weston.service diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc deleted file mode 100644 index 67615b17..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc +++ /dev/null @@ -1,67 +0,0 @@ -require include/iccom-control.inc - -# Basic packages -IMAGE_INSTALL_append = " \ - bash \ - v4l-utils \ - i2c-tools \ - libx11-locale \ - coreutils \ -" - -# Support secure environment -IMAGE_INSTALL_append = " \ - optee-client \ -" - -# Add overrides for selection 32 bit or 64 bit target -OVERRIDES .= ":${TARGET_SYS}" - -# Qos user packages only supports 64bit. -QOS_USER_PKGS = "" -QOS_USER_PKGS_aarch64-poky-linux = " \ - qosif-user-module \ - qosif-tp-user-module \ -" - -# Installation for QoS packages -IMAGE_INSTALL_append = " \ - kernel-module-qos \ - ${QOS_USER_PKGS} \ -" - -# Renesas Basic packages for 32bit -BASIC_32BIT_PKGS = " \ - lib32-coreutils \ - lib32-libstdc++ \ - lib32-optee-client \ -" - -# Installation for 32bit packages -IMAGE_INSTALL_append = " \ - ${@oe.utils.conditional("USE_32BIT_PKGS", "1", "${BASIC_32BIT_PKGS}", "", d)} \ -" - -# Kernel modules of ICCOM -ICCOM_KERNEL_PKGS = " \ - kernel-module-iccom-mfis \ - kernel-module-iccom-hwspinlock-sample \ -" - -# User modules of ICCOM only supports 64bit -ICCOM_USER_PKGS = "" -ICCOM_USER_PKGS_aarch64-poky-linux = " \ - iccom-user-module \ - iccom-tp-user-module \ -" - -# ICCOM Packages -ICCOM_PKGS = " \ - ${ICCOM_KERNEL_PKGS} \ - ${ICCOM_USER_PKGS} \ -" - -# Installation for ICCOM Packages -IMAGE_INSTALL_append = " \ - ${@oe.utils.conditional("USE_ICCOM", "1", " ${ICCOM_PKGS}", "", d)} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc deleted file mode 100644 index 88062204..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc +++ /dev/null @@ -1,102 +0,0 @@ -require include/multimedia-control.inc -require include/cms-control.inc -require include/adsp-control.inc -require include/dtv-dvd-control.inc -require include/avb-control.inc -require include/omx-control.inc - -# Common Multi Media Packages (MMP) -MULTIMEDIA_PKGS = " \ - packagegroup-multimedia-kernel-modules \ - packagegroup-multimedia-libs \ -" - -# MMP test Packages -MULTIMEDIA_TP_PKGS = " \ - vspmif-tp-user-module \ -" - -# OMX MMP Packages -OMX_MULTIMEDIA_PKGS = " \ - omx-user-module \ -" - -# CMS MMP Packages -CMS_MULTIMEDIA_PKGS = " \ - cms-user-module \ -" - -# Kernel modules of DTV -DTV_KERNEL_PKGS = " \ - kernel-module-scu-src \ - kernel-module-ssp \ - kernel-module-tddmac \ - kernel-module-tsif \ -" - -# DTV Packages -DTV_PKGS = " \ - ${DTV_KERNEL_PKGS} \ - dtv-user-module \ -" - -# DVD Packages -DVD_PKGS = " \ - dvd-user-module \ -" - -# DVD Encryption Library packages -DVD_ENCRYPTION_PKGS = " \ - dvd-encryption-module \ -" - -# ADSP Packages -ADSP_PKGS = " \ - kernel-module-xtensa-hifi \ - adsp-if-module \ - adsp-fw-module \ -" - -# Kernel modules of AVB -AVB_KERNEL_PKGS = " \ - kernel-module-avb-streaming \ - kernel-module-avb-mch \ - kernel-module-avb-mse \ -" - -# AVB Packages -AVB_PKGS = " \ - ${AVB_KERNEL_PKGS} \ - avbtool \ - linuxptp \ - openavnu-mrpd \ - openavnu-gptp \ - openavnu-maap \ - avb-demoapps-avblauncher \ - avb-demoapps-mrpdummy \ - avb-demoapps-simple \ -" - -# Renesas MMP 32bit packages -MMP_32BIT_PKGS = " \ - ${@oe.utils.conditional("USE_MULTIMEDIA", "1", "lib32-packagegroup-multimedia-libs lib32-omx-user-module", "", d)} \ - ${@oe.utils.conditional("USE_MULTIMEDIA_TP", "1", "lib32-vspmif-tp-user-module", "", d)} \ - ${@oe.utils.conditional("USE_CMS", "1", "lib32-cms-user-module", "", d)} \ - ${@oe.utils.conditional("USE_DTV", "1", "lib32-dtv-user-module", "", d)} \ - ${@oe.utils.conditional("USE_DVD", "1", "lib32-dvd-user-module", "", d)} \ - ${@oe.utils.conditional("USE_ADSP", "1", "lib32-adsp-if-module", "", d)} \ -" - -# Install pkg selection -IMAGE_INSTALL_append = " \ - ${@oe.utils.conditional("USE_MULTIMEDIA", "1", " ${MULTIMEDIA_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_MULTIMEDIA_TP", "1", " ${MULTIMEDIA_TP_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_OMX_USER_MODULE", "1", " ${OMX_MULTIMEDIA_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_CMS", "1", " ${CMS_MULTIMEDIA_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_DTV", "1", " ${DTV_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_DVD", "1", " ${DVD_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_DVD_ENCRYPTION_LIB", "1", " ${DVD_ENCRYPTION_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_ADSP", "1", " ${ADSP_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_AVB", "1", " ${AVB_PKGS}", "", d)} \ - ${@oe.utils.conditional("USE_32BIT_MMP", "1", " ${MMP_32BIT_PKGS}", "", d)} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb deleted file mode 100644 index fd4e6a09..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb +++ /dev/null @@ -1,15 +0,0 @@ -require recipes-graphics/images/core-image-weston.bb -require core-image-renesas-base.inc -require core-image-weston.inc - -DESCRIPTION = "Image with weston support that includes everything within \ -core-image-weston plus meta-toolchain, development headers and libraries to \ -form a standalone SDK." - -IMAGE_FEATURES += " \ - dev-pkgs tools-sdk \ - tools-debug debug-tweaks \ - ssh-server-openssh \ -" - -IMAGE_INSTALL_append = " kernel-devsrc ltp" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend deleted file mode 100644 index e30bc2e0..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -require core-image-renesas-base.inc -require core-image-weston.inc diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc deleted file mode 100644 index eb4f1b81..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc +++ /dev/null @@ -1,15 +0,0 @@ -require include/gles-control.inc -require core-image-renesas-mmp-base.inc - -# Gstreamer Packages -GSTREAMER_PKGS = "packagegroup-gstreamer1.0-plugins" - -# Install packages for Wayland Env -# default: Basic packages, Gstreamer packages -# optional: GFX packages -IMAGE_INSTALL_append = " \ - ${GSTREAMER_PKGS} \ - packagegroup-wayland-community \ - packagegroup-graphics-renesas-proprietary \ - packagegroup-graphics-renesas-wayland \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc deleted file mode 100644 index e69de29b..00000000 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc deleted file mode 100644 index 0aa77e03..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc +++ /dev/null @@ -1,24 +0,0 @@ -# FIXME: can not override PACKAGECONFIG. -PACKAGECONFIG[gles] = "--enable-gles1 --disable-gles2" -PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=wayland" - -# Disable the gbm modules of mesa -PACKAGECONFIG_remove = "gbm" - -# Remove the gbm and egl packages. These are provided in other recipes. -PACKAGES_remove = " \ - libgbm-dev libgbm \ - libegl-mesa-dev libegl-mesa \ - libegl-dev libegl \ - libgles2-mesa libgles2-mesa-dev \ - libwayland-egl libwayland-egl-dev \ -" - -do_install_append() { - # Remove libegl-mesa modules and headers - rm -f ${D}/${libdir}/libEGL.la - rm -f ${D}/${libdir}/libEGL.so* - rm -f ${D}/${libdir}/pkgconfig/egl.pc - rm -rf ${D}/${includedir}/EGL - rm -rf ${D}/${includedir}/KHR -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend deleted file mode 100644 index 022144ef..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -require include/gles-control.inc - -def map_libs(d): - if oe.utils.conditional('USE_GLES_WAYLAND', "1", "1", "0", d) == "1": - return "wayland" - - return "dummy" - -MESATARGET := "${@map_libs(d)}" -include mesa-${MESATARGET}.inc diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb deleted file mode 100644 index cc37f8ef..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Renesas package group for Weston" -LICENSE = "CLOSED & MIT" - -inherit packagegroup -require include/gles-control.inc - -PACKAGES = " \ - packagegroup-wayland-community \ - packagegroup-graphics-renesas-proprietary \ - packagegroup-graphics-renesas-wayland \ -" - -PR = "r0" - -RDEPENDS_packagegroup-wayland-community = " \ - wayland \ - weston \ - weston-examples \ - alsa-utils \ - alsa-tools \ - libdrm-tests \ - libdrm-kms \ -" - -RDEPENDS_packagegroup-graphics-renesas-proprietary = " \ - ${@bb.utils.contains('USE_GLES', '1', \ - 'kernel-module-gles gles-user-module' , \ - '', d)} \ -" - -DEPENDS_packagegroup-graphics-renesas-wayland = "libegl" - -RDEPENDS_packagegroup-graphics-renesas-wayland = " \ - ${@bb.utils.contains('USE_GLES_WAYLAND', '1', \ - 'libgbm libgbm-dev wayland-kms', \ - '', d)} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb deleted file mode 100644 index 0bde4ae7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Recipe for libegl" -LICENSE = "CLOSED" - -DEPENDS = "gles-user-module \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ -" - -PR = "r0" - -RDEPENDS_${PN} = " \ - gles-user-module \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ -" - -PROVIDES = "virtual/egl" -RPROVIDES_${PN} += " \ - libegl \ - libegl1 \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb deleted file mode 100644 index 0f89c667..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "gbm library" -LICENSE = "MIT" -SECTION = "libs" - -LIC_FILES_CHKSUM = " \ - file://gbm.c;beginline=4;endline=22;md5=5cdaac262c876e98e47771f11c7036b5" - -SRCREV = "71806a392f351f9b99ab1489587c8ca6f9fbe10f" -SRC_URI = "git://github.com/renesas-rcar/libgbm;branch=match-mesa-17.3.6" - -S = "${WORKDIR}/git" - -COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" -DEPENDS = "wayland-kms udev" - -inherit autotools pkgconfig - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-dbg \ - ${PN}-staticdev \ -" - -FILES_${PN} = " \ - ${libdir}/libgbm.so.* \ - ${libdir}/gbm/libgbm_kms.so.* \ - ${libdir}/gbm/*.so \ - ${libdir}/*.so \ -" -FILES_${PN}-dev += "${libdir}/gbm/*.la" -FILES_${PN}-dbg += "${libdir}/gbm/.debug/*" -FILES_${PN}-staticdev += "${libdir}/gbm/*.a" - -INSANE_SKIP_${PN} += "dev-so" -PROVIDES += "virtual/libgbm" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb deleted file mode 100644 index 134e8d2e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "KMS library for Wayland" -LICENSE = "MIT" - -LIC_FILES_CHKSUM = " \ - file://wayland-kms.c;beginline=6;endline=24;md5=5cdaac262c876e98e47771f11c7036b5" - -PV_append = "+git${SRCREV}" - -SRCREV = "15184e5bd3701938a6b30b8f03b471477fc742e8" -SRC_URI = "git://github.com/renesas-rcar/wayland-kms.git;branch=rcar-gen3" - -COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" -S = "${WORKDIR}/git" -DEPENDS = "libdrm wayland gles-user-module wayland-native" - -inherit autotools pkgconfig - -FILES_${PN} = "${libdir}/libwayland-kms.so.*" -FILES_${PN}-dev = " \ - ${libdir}/libwayland-kms.la \ - ${libdir}/libwayland-kms.so \ - ${libdir}/pkgconfig/* \ - ${includedir}/* \ -" -FILES_${PN}-staticdev += "${libdir}/libwayland-kms.a" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend deleted file mode 100644 index 179651bf..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend +++ /dev/null @@ -1,34 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI = " \ - file://weston.ini \ - file://weston.sh \ -" - -do_install_append() { - install -d ${D}/${sysconfdir}/xdg/weston - # install weston.ini as sample settings of gl-renderer - install -m 644 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/ - - # Checking for ivi-shell configuration - # If ivi-shell is enable, we will add its configs to weston.ini - if [ "X${USE_WAYLAND_IVI_SHELL}" = "X1" ]; then - sed -i '/repaint-window=34/c\repaint-window=34\nshell=ivi-shell.so' \ - ${D}/${sysconfdir}/xdg/weston/weston.ini - sed -e '$a\\' \ - -e '$a\[ivi-shell]' \ - -e '$a\ivi-module=ivi-controller.so' \ - -e '$a\ivi-input-module=ivi-input-controller.so' \ - -e '$a\transition-duration=300' \ - -e '$a\cursor-theme=default' \ - -i ${D}/${sysconfdir}/xdg/weston/weston.ini - fi - - # Set XDG_RUNTIME_DIR to /run/user/$UID (e.g. run/user/0) - install -d ${D}/${sysconfdir}/profile.d - install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh -} - -FILES_${PN}_append = " \ - ${sysconfdir}/profile.d/weston.sh \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini deleted file mode 100644 index f31c2906..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini +++ /dev/null @@ -1,2 +0,0 @@ -[core] -repaint-window=34 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh deleted file mode 100755 index 33ed8a4a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -if test -z "$XDG_RUNTIME_DIR"; then - export XDG_RUNTIME_DIR=/run/user/$UID -fi diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend deleted file mode 100644 index dafc0330..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -require include/gles-control.inc - -do_install_append() { - if [ "X${USE_GLES}" = "X1" ]; then - sed -e "/RequiresMountsFor=\/run/a After=dbus.service multi-user.target" \ - -e "s/\$OPTARGS/--idle-time=0 \$OPTARGS/" \ - -i ${D}/${systemd_system_unitdir}/weston.service - fi -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston.inc deleted file mode 100644 index c1cc2066..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston.inc +++ /dev/null @@ -1,16 +0,0 @@ -require include/gles-control.inc -require include/multimedia-control.inc - -PACKAGECONFIG_remove_virtclass-multilib-lib32 = "launch" -DEPENDS_append = " \ - ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" - -RDEPENDS_${PN}_append = " \ - ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)} \ -" -RDEPENDS_${PN}-examples_append = " \ - ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" - -EXTRA_OECONF_append = " \ - ${@oe.utils.conditional('USE_GLES', '1', '', \ - ' WESTON_NATIVE_BACKEND="fbdev-backend.so"', d)}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend deleted file mode 100644 index a7f8ff8f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -require weston.inc - - -PACKAGE_ARCH="${MACHINE_ARCH}" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc deleted file mode 100644 index 89318e53..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc +++ /dev/null @@ -1,180 +0,0 @@ -SUMMARY = "The X.Org X server" -HOMEPAGE = "http://www.x.org" -SECTION = "x11/base" -LICENSE = "MIT-X" -LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" - -# xf86-*-* packages depend on an X server built with the xfree86 DDX -# so we have a virtual to represent that: -# deprecated, we should use virtual/xserver instead -PROVIDES = "virtual/xserver-xf86" - -# Other packages tend to just care that there is *an* X server: -PROVIDES += "virtual/xserver" - -PE = "2" -INC_PR = "r8" - -XORG_PN = "xorg-server" -SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" -SRC_URI += "file://macro_tweak.patch" - -S = "${WORKDIR}/${XORG_PN}-${PV}" - -inherit autotools pkgconfig - -inherit distro_features_check -REQUIRED_DISTRO_FEATURES = "x11" - -PROTO_DEPS = "xorgproto" -LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" -DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util" - -# Split out some modules and extensions from the main package -# These aren't needed for basic operations and only take up space: -# 32.0k libdri.so -# 91.0k libexa.so -# 336.0k libglx.so -# 1360k libint10.so -# 180.0k libwfb.so -# 320.0k libxaa.so -# 124.0k libxf1bpp.so -# 84.0k libxf4bpp.so -# librecord.so -# libextmod.so -# libdbe.so - -PACKAGES =+ "${PN}-sdl \ - ${PN}-fbdev \ - ${PN}-xvfb \ - ${PN}-utils \ - ${PN}-xephyr \ - ${PN}-xwayland \ - ${PN}-multimedia-modules \ - ${PN}-extension-dri \ - ${PN}-extension-dri2 \ - ${PN}-extension-glx \ - ${PN}-extension-record \ - ${PN}-extension-extmod \ - ${PN}-extension-dbe \ - ${PN}-module-libint10 \ - ${PN}-module-libafb \ - ${PN}-module-libwfb \ - ${PN}-module-libmfb \ - ${PN}-module-libcfb \ - ${PN}-module-exa \ - ${PN}-module-xaa \ - ${PN}-module-libxf1bpp \ - ${PN}-module-libxf4bpp \ - xf86-video-modesetting" - -SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" -INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" - -XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" -RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" -RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" -RDEPENDS_${PN}-xvfb += "xkeyboard-config" -RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" - -FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d" -FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" -FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" -FILES_${PN}-sdl = "${bindir}/Xsdl" -FILES_${PN}-fbdev = "${bindir}/Xfbdev" -FILES_${PN}-xvfb = "${bindir}/Xvfb" -FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" -FILES_${PN}-xephyr = "${bindir}/Xephyr" -FILES_${PN}-xwayland = "${bindir}/Xwayland" -FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" -FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" -FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" -FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" -FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" -FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" -FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" -FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" -FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" -FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" -FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" -FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" -FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" -FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" -FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" -FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" -FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so" - -EXTRA_OECONF += "--with-fop=no \ - --with-pic \ - --disable-static \ - --disable-record \ - --disable-dmx \ - --disable-xnest \ - --enable-xvfb \ - --enable-composite \ - --without-dtrace \ - --with-int10=x86emu \ - --sysconfdir=/etc/X11 \ - --localstatedir=/var \ - --with-xkb-output=/var/lib/xkb \ -" - -OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" -PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \ -" - -PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" -PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xorgproto virtual/mesa" -PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,xorgproto" -# DRI3 requires xshmfence to also be enabled -PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,xorgproto" -PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,xorgproto virtual/libgl virtual/libx11" -PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl" -PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" -PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" -PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," -PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" -PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xorgproto" -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" - -# Xorg requires a SHA1 implementation, pick one -XORG_CRYPTO ??= "openssl" -PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" -PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" -PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" - -do_install_append () { - # Its assumed base-files creates this for us - rmdir ${D}${localstatedir}/log/ -} - -# Add runtime provides for the ABI versions of the video and input subsystems, -# so that drivers can depend on the relevant version. -python populate_packages_prepend() { - import subprocess - - # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going - # into the new package, not the staged ones. - newenv = dict(os.environ) - newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") - - def get_abi(name): - abis = { - "video": "abi_videodrv", - "input": "abi_xinput" - } - p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], - shell=True, env=newenv, stdout=subprocess.PIPE) - stdout, stderr = p.communicate() - output = stdout.decode("utf-8").split(".")[0] - mlprefix = d.getVar('MLPREFIX') or '' - return "%sxorg-abi-%s-%s" % (mlprefix, name, output) - - pn = d.getVar("PN") - d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) - d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch deleted file mode 100644 index 964d5dd4..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a309323328d9d6e0bf5d9ea1d75920e53b9beef3 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 5 Jan 2018 11:58:42 +1000 -Subject: [PATCH] config: fix NULL value detection for ID_INPUT being unset - -Erroneous condition caused us to keep going with all devices that didn't have -ID_INPUT set. - -Fixes: 5aad81445c8c3d6 -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104382 -Reviewed-by: Adam Jackson -Signed-off-by: Peter Hutterer - -Upstream-status: Backport -https://patchwork.freedesktop.org/patch/196090/ -Affects: < 1.20.0 -[Yocto # 12899] - -Signed-off-by: Armin Kuster - ---- - config/udev.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/config/udev.c b/config/udev.c -index e198e8609..3a73189e2 100644 ---- a/config/udev.c -+++ b/config/udev.c -@@ -135,7 +135,7 @@ device_added(struct udev_device *udev_device) - #endif - - value = udev_device_get_property_value(udev_device, "ID_INPUT"); -- if (value && !strcmp(value, "0")) { -+ if (!value || !strcmp(value, "0")) { - LogMessageVerb(X_INFO, 10, - "config/udev: ignoring device %s without " - "property ID_INPUT set\n", path); --- -2.17.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch deleted file mode 100644 index 16ec3edb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch +++ /dev/null @@ -1,61 +0,0 @@ -Discover monotonic clock using compile-time check - -monotonic clock check does not work when cross-compiling. - -Upstream-Status: Denied [Does not work on OpenBSD] -Signed-off-by: Jussi Kukkonen - - - -Original patch follows: - -When xorg-xserver is being cross-compiled, there is currently no way -for us to detect whether the monotonic clock is available on the -target system, because we aren't able to run a test program on the host -system. Currently, in this situation, we default to not use the -monotonic clock. One problem with this situation is that the user will -be treated as idle when the date is updated. - -To fix this situation, we now use a compile-time check to detect whether the -monotonic clock is available. This check can run just fine when we are -cross-compiling. - -Signed-off-by: David James ---- - configure.ac | 17 +++++++---------- - 1 file changed, 7 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f7ab48c..26e85cd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then - CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" - fi - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ - #include -- --int main(int argc, char *argv[[]]) { -- struct timespec tp; -- -- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) -+#include -+int main() { -+#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) -+ #error No monotonic clock -+#endif - return 0; -- else -- return 1; - } -- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], -- [MONOTONIC_CLOCK="cross compiling"]) -+]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) - - LIBS="$LIBS_SAVE" - CPPFLAGS="$CPPFLAGS_SAVE" --- -2.1.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch deleted file mode 100644 index d05eec5b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d77cdc5e1eee26821ab98c947abea53fb7b18fe5 Mon Sep 17 00:00:00 2001 -From: California Sullivan -Date: Fri, 16 Mar 2018 17:23:11 -0700 -Subject: [PATCH] xf86pciBus.c: use Intel ddx only for pre-gen4 hardware - -Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting -Author: Timo Aaltonen - -Instead of defaulting to the Intel driver for all Intel hardware, only -default it for older hardware for which it has shown to be better for. - -Others fall through to the -modesetting default. - -Upstream-Status: Pending [Debian/Fedora patch -https://src.fedoraproject.org/rpms/xorg-x11-server/c/ee515e44b07e37689abf48cf2fffb41578f3bc1d] - -Signed-off-by: California Sullivan ---- - hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c -index e61ae0cd4..d70c99197 100644 ---- a/hw/xfree86/common/xf86pciBus.c -+++ b/hw/xfree86/common/xf86pciBus.c -@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_device *dev, - case 0x0bef: - /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */ - break; -- default: -+ /* Default to intel only on pre-gen4 chips */ -+ case 0x3577: -+ case 0x2562: -+ case 0x3582: -+ case 0x358e: -+ case 0x2572: -+ case 0x2582: -+ case 0x258a: -+ case 0x2592: -+ case 0x2772: -+ case 0x27a2: -+ case 0x27ae: -+ case 0x29b2: -+ case 0x29c2: -+ case 0x29d2: -+ case 0xa001: -+ case 0xa011: - driverList[0] = "intel"; - break; - } --- -2.14.3 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch deleted file mode 100644 index beed6cb4..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch +++ /dev/null @@ -1,47 +0,0 @@ -From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj -Date: Mon, 30 Jan 2017 16:32:06 -0600 -Subject: [PATCH] Remove check for useSIGIO option - -Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO -option. - -As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO -and OsReleaseSIGIO. - -No longer the check for useSIGIO is needed - -Upstream-Status: Pending - -Signed-off-by: Prabhu Sundararaj ---- - hw/xfree86/os-support/shared/sigio.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c -index 884a71c..be76498 100644 ---- a/hw/xfree86/os-support/shared/sigio.c -+++ b/hw/xfree86/os-support/shared/sigio.c -@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) - int i; - int installed = FALSE; - -- if (!xf86Info.useSIGIO) -- return 0; -- - for (i = 0; i < MAX_FUNCS; i++) { - if (!xf86SigIOFuncs[i].f) { - if (xf86IsPipe(fd)) -@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) - int max; - int ret; - -- if (!xf86Info.useSIGIO) -- return 0; -- - max = 0; - ret = 0; - for (i = 0; i < MAX_FUNCS; i++) { --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch deleted file mode 100644 index 5243761f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5028ef46ff4ab0930224b71024a7349b05610d42 Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Thu, 22 Dec 2016 15:41:06 +0100 -Subject: [PATCH] modesetting: Fix 16 bit depth/bpp mode - -When setting DefaultDepth to 16 in the Screen section, the current -code requests a 32 bpp framebuffer, however the X-Server seems to -assumes 16 bpp. - -Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp -conversion in shadow update") - -Signed-off-by: Stefan Agner - -Upstream-Status: Submitted [1] - -[1] https://lists.x.org/archives/xorg-devel/2016-December/052113.html ---- - hw/xfree86/drivers/modesetting/driver.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c -index d7030e5..647ad83 100644 ---- a/hw/xfree86/drivers/modesetting/driver.c -+++ b/hw/xfree86/drivers/modesetting/driver.c -@@ -930,7 +930,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) - "Using 24bpp hw front buffer with 32bpp shadow\n"); - defaultbpp = 32; - } else { -- ms->drmmode.kbpp = defaultbpp; -+ ms->drmmode.kbpp = 0; - } - bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb; - -@@ -950,6 +950,8 @@ PreInit(ScrnInfoPtr pScrn, int flags) - return FALSE; - } - xf86PrintDepthBpp(pScrn); -+ if (!ms->drmmode.kbpp) -+ ms->drmmode.kbpp = pScrn->bitsPerPixel; - - /* Process the options */ - xf86CollectOptions(pScrn, NULL); --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch deleted file mode 100644 index c36e4e73..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch +++ /dev/null @@ -1,25 +0,0 @@ -This is the revised version of files/macro_tweak.patch for -xorg-server 1.8.99.904 and newer. - -Upstream-Status: Pending - -Signed-off-by: Yu Ke - -Index: xorg-server-1.19.6/xorg-server.m4 -=================================================================== ---- xorg-server-1.19.6.orig/xorg-server.m4 -+++ xorg-server-1.19.6/xorg-server.m4 -@@ -28,10 +28,12 @@ dnl - # Checks for the MACRO define in xorg-server.h (from the sdk). If it - # is defined, then add the given PROTO to $REQUIRED_MODULES. - -+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) -+ - AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" -+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include "xorg-server.h" - #if !defined $1 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch deleted file mode 100644 index 4be441fb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch +++ /dev/null @@ -1,18 +0,0 @@ -inb/outb family for arm is only implemented on glibc -so assumption across linux is wrong - -Signed-off-by: Khem Raj -Upstream-Status: Pending -Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h -=================================================================== ---- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h -+++ xorg-server-1.18.0/hw/xfree86/common/compiler.h -@@ -758,7 +758,7 @@ inl(unsigned short port) - return xf86ReadMmio32Le((void *) ioBase, port); - } - --#elif defined(__arm__) && defined(__linux__) -+#elif defined(__arm__) && defined(__GLIBC__) - - /* for Linux on ARM, we use the LIBC inx/outx routines */ - /* note that the appropriate setup via "ioperm" needs to be done */ diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend deleted file mode 100644 index cfc27142..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -# Glamor for Xorg requires gbm >= 10.2.0. -# Glamor is not necessary with current env, so disable it. -PACKAGECONFIG_remove = "glamor" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb deleted file mode 100644 index 7e8a9541..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb +++ /dev/null @@ -1,33 +0,0 @@ -require xserver-xorg.inc - -SRC_URI += "file://musl-arm-inb-outb.patch \ - file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \ - file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \ - file://0003-Remove-check-for-useSIGIO-option.patch \ - file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \ - file://0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch \ - " -SRC_URI[md5sum] = "3e47777ff034a331aed2322b078694a8" -SRC_URI[sha256sum] = "a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197" - -# These extensions are now integrated into the server, so declare the migration -# path for in-place upgrades. - -RREPLACES_${PN} = "${PN}-extension-dri \ - ${PN}-extension-dri2 \ - ${PN}-extension-record \ - ${PN}-extension-extmod \ - ${PN}-extension-dbe \ - " -RPROVIDES_${PN} = "${PN}-extension-dri \ - ${PN}-extension-dri2 \ - ${PN}-extension-record \ - ${PN}-extension-extmod \ - ${PN}-extension-dbe \ - " -RCONFLICTS_${PN} = "${PN}-extension-dri \ - ${PN}-extension-dri2 \ - ${PN}-extension-record \ - ${PN}-extension-extmod \ - ${PN}-extension-dbe \ - " diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb deleted file mode 100644 index 62f10d6c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "ADSP Driver for Linux" -LICENSE = "GPLv2 & MIT" - -LIC_FILES_CHKSUM = " \ - file://COPYING;md5=55979d94ccbb973fdea772250e0c54d6 \ - file://MIT-COPYING;md5=f932f6ad0feea4f97b6e8316e172070e \ -" - -inherit module distro_features_check - -REQUIRED_DISTRO_FEATURES = "adsp" - -FILESEXTRAPATHS_prepend := "${THISDIR}/xtensa-hifi:" - -SRC_URI = "file://RCG3AHPDL4101ZDO.tar.gz" - -S = "${WORKDIR}/RCG3AHPDL4101ZDO" - -# Define the extra config for using module.bbclass to build ADSP driver -EXTRA_OEMAKE_append = " KDIR=${STAGING_KERNEL_DIR}" - -# Build ADSP kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -# Enable build target for E3 board -do_configure_prepend_r8a77990(){ - sed -i 's|-DTARGET_BOARD_E3=0|-DTARGET_BOARD_E3=1|g' ${S}/Kbuild -} - -do_install_append(){ - # Create install directories - install -d ${D}/${includedir} - install -d ${D}/${includedir}/sys/xt-shmem - - # Install shared header files - install -m 644 ${S}/include/*.h ${D}/${includedir}/ - install -m 644 ${S}/include/sys/xt-shmem/*.h ${D}/${includedir}/sys/xt-shmem/ -} - -# The ADSP driver need adsp firmware for running -RDEPENDS_${PN}_append = " adsp-fw-module" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb deleted file mode 100644 index 092d44a8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "AVB MCH Driver for Linux for the R-Car Gen3" - -require include/avb-control.inc -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=96e553279b3fff0d6168dafe0b596197 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" - -REQUIRED_DISTRO_FEATURES = "avb" - -SRC_URI = "git://github.com/renesas-rcar/avb-mch.git;branch=rcar-gen3" -SRCREV = "5c02335afa0c6c692798dc07e65c9eb21943fb2f" - -S = "${WORKDIR}/git" - -includedir = "${RENESAS_DATADIR}/include" - -# Build AVB MCH kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install_append() { - # Create destination directories - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/ravb_mch.h ${KERNELSRC}/include - - # Install shared header files to ${includedir} - install -m 644 ${S}/ravb_mch.h ${D}/${includedir} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb deleted file mode 100644 index e7609c15..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "AVB MSE Driver for Linux for the R-Car Gen3" - -require include/avb-control.inc -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=98449101c5d5452a9429b88d6ead1ba4 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas kernel-module-avb-streaming kernel-module-avb-mch" - -REQUIRED_DISTRO_FEATURES = "avb" - -SRC_URI = "git://github.com/renesas-rcar/avb-mse.git;branch=rcar-gen3" -SRCREV = "d290b4a5d7afab654a8b3a356934be2c1406c378" - -S = "${WORKDIR}/git" - -includedir = "${RENESAS_DATADIR}/include" - -# Build AVB MSE kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install_append() { - # Create destination directories - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/ravb_mse.h ${KERNELSRC}/include - install -m 644 ${S}/ravb_mse_kernel.h ${KERNELSRC}/include - - # Install shared header files to ${includedir} - install -m 644 ${S}/ravb_mse.h ${D}/${includedir} - install -m 644 ${S}/ravb_mse_kernel.h ${D}/${includedir} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb deleted file mode 100644 index 5087449f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "AVB Streaming Driver for Linux for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc -require include/avb-control.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=704e38c3a28fde2e7fa153d3e0e787a4 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" - -REQUIRED_DISTRO_FEATURES = "avb" - -SRC_URI = "git://github.com/renesas-rcar/avb-streaming.git;branch=rcar-gen3" -SRCREV = "526c794e5667d4b260934ef1e3934a094f01f404" - -S = "${WORKDIR}/git" - -includedir = "${RENESAS_DATADIR}/include" - -# Build AVB Streaming kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install_append () { - # Create destination directories - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/ravb_eavb.h ${KERNELSRC}/include - - # Install shared header files to ${includedir} - install -m 644 ${S}/ravb_eavb.h ${D}/${includedir} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb deleted file mode 100644 index 42f4f85b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "DTV Driver part of scu_src for Linux for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://scu_src_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://scu_src_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" -PN = "kernel-module-scu-src" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "dtv" - -SRC_URI = "file://scu_src_drv.tar.gz" - -S = "${WORKDIR}" - -EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" -EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" -EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" - -# Build DTV kernel modules without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/scu_src_drv/drv - oe_runmake -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - - # Install kernel module - install -m 644 ${S}/scu_src_drv/drv/scu_src_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/scu_src_drv/include/*.h ${KERNELSRC}/include - install -m 644 ${S}/scu_src_drv/drv/Module.symvers ${KERNELSRC}/include/scu-drv.symvers -} - -PACKAGES = "\ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/scu_src_drv.ko \ -" - -RPROVIDES_${PN} += "kernel-module-scu-src kernel-module-scu-src-drv" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb deleted file mode 100644 index 4b1408eb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "DTV Driver part of ssp for Linux for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://ssp_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://ssp_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" -PN = "kernel-module-ssp" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "dtv" - -SRC_URI = "file://ssp_drv.tar.gz" - -S = "${WORKDIR}" - -EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" -EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" -EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" - -# Build DTV SSP kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/ssp_drv/drv - oe_runmake -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - - # Install kernel module - install -m 644 ${S}/ssp_drv/drv/ssp_dev.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/ssp_drv/include/*.h ${KERNELSRC}/include - install -m 644 ${S}/ssp_drv/drv/Module.symvers ${KERNELSRC}/include/ssp_drv.symvers -} - -PACKAGES = "\ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/ssp_dev.ko \ -" - -RPROVIDES_${PN} += "kernel-module-ssp" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb deleted file mode 100644 index 55c56901..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "DTV Driver part of tddmac for Linux for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://tddmac_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://tddmac_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ -" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" -PN = "kernel-module-tddmac" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "dtv" - -SRC_URI = "file://tddmac_drv.tar.gz" - -S = "${WORKDIR}" - -EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" -EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" -EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" - -# Build DTV tddmac kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/tddmac_drv/drv - oe_runmake -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - - # Install kernel module - install -m 644 ${S}/tddmac_drv/drv/tddmac.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/tddmac_drv/include/*.h ${KERNELSRC}/include - install -m 644 ${S}/tddmac_drv/drv/Module.symvers ${KERNELSRC}/include/tddmac_drv.symvers -} - -PACKAGES = "\ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/tddmac.ko \ -" - -RPROVIDES_${PN} += "kernel-module-tddmac" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb deleted file mode 100644 index f93db45b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb +++ /dev/null @@ -1,58 +0,0 @@ -DESCRIPTION = "DTV Driver part of tsif for Linux for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://tsif_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://tsif_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ -" - -inherit module distro_features_check - -PN = "kernel-module-tsif" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "dtv" - -SRC_URI = "file://tsif_drv.tar.gz" - -S = "${WORKDIR}" - -EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" -EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" -EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" - -# Build DTV tsif kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/tsif_drv/drv - oe_runmake -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - - # Install kernel module - install -m 644 ${S}/tsif_drv/drv/tsif_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/tsif_drv/include/*.h ${KERNELSRC}/include - install -m 644 ${S}/tsif_drv/drv/Module.symvers ${KERNELSRC}/include/tsif_drv.symvers -} - -PACKAGES = "\ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/tsif_drv.ko \ -" - -RPROVIDES_${PN} += "kernel-module-tsif kernel-module-tsif-drv" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb deleted file mode 100644 index 249a0574..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb +++ /dev/null @@ -1,78 +0,0 @@ -DESCRIPTION = "Kernel module of PowerVR GPU" -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e \ - file://MIT-COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054 \ -" -inherit module -require include/checksum_control.inc - -PN = "kernel-module-gles" -PR = "r0" - -COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI_r8a7795 = 'file://GSX_KM_H3.tar.bz2' -SRC_URI_r8a7796 = 'file://GSX_KM_M3.tar.bz2' -SRC_URI_r8a77965 = 'file://GSX_KM_M3N.tar.bz2' -SRC_URI_r8a77990 = 'file://GSX_KM_E3.tar.bz2' - -S = "${WORKDIR}/rogue_km" - -# W/A fix build errors with GCC 8.1 -SRC_URI_append = " file://0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch" - -KBUILD_DIR_r8a7795 = "${S}/build/linux/r8a7795_linux" -KBUILD_DIR_r8a7796 = "${S}/build/linux/r8a7796_linux" -KBUILD_DIR_r8a77965 = "${S}/build/linux/r8a77965_linux" -KBUILD_DIR_r8a77990 = "${S}/build/linux/r8a7799_linux" -KBUILD_OUTDIR_r8a7795 = "binary_r8a7795_linux_release/target_aarch64/kbuild/" -KBUILD_OUTDIR_r8a7796 = "binary_r8a7796_linux_release/target_aarch64/kbuild/" -KBUILD_OUTDIR_r8a77965 = "binary_r8a77965_linux_release/target_aarch64/kbuild/" -KBUILD_OUTDIR_r8a77990 = "binary_r8a7799_linux_release/target_aarch64/kbuild/" - -B = "${KBUILD_DIR}" - -EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" -EXTRA_OEMAKE += "CROSS_COMPILE=${CROSS_COMPILE}" - -# Build GFX kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -module_do_compile() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - cd ${KBUILD_DIR} - oe_runmake -} - -module_do_install() { - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - install -d ${D}/lib/modules/${KERNEL_VERSION} - cd ${KBUILD_DIR} - oe_runmake DISCIMAGE="${D}" install -} - -# Ship the module symbol file to kernel build dir -SYSROOT_PREPROCESS_FUNCS = "module_sysroot_symbol" - -module_sysroot_symbol() { - install -m 644 ${S}/${KBUILD_OUTDIR}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/GLES.symvers -} - -# Clean up the module symbol file -CLEANFUNCS = "module_clean_symbol" - -module_clean_symbol() { - rm -f ${STAGING_KERNEL_BUILDDIR}/GLES.symvers -} - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/pvrsrvkm.ko \ - ${sysconfdir}/modules-load.d \ -" - -RPROVIDES_${PN} += "kernel-module-pvrsrvkm kernel-module-dc-linuxfb" - -# Auto load pvrsrvkm -KERNEL_MODULE_AUTOLOAD_append = " pvrsrvkm" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch deleted file mode 100644 index fd911584..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silenced-Wcast-function-type-Wsizeof-pointer-div-and.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 1bc7c0daece11b36abebc48b9113193056289fe6 Mon Sep 17 00:00:00 2001 -From: Thuy Tran -Date: Tue, 17 Jul 2018 15:01:56 +0700 -Subject: [PATCH] Silenced -Wcast-function-type, -Wsizeof-pointer-div and - -Wstringop-truncation options of GCC 8.1 - -Current GFX source code will get compilation error with GCC 8.1, -because it is defined in makefile to use -Wall to enable all Warnings -check. --Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation -are new Warnings from GCC 8. - -===================================================================== -* Error generated by -Wcast-function-type - - rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/module_common.c:43: - kernel-source/include/linux/timer.h: In function 'timer_setup': - error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type] - __setup_timer(timer, (TIMER_FUNC_TYPE)callback, - ^ -/ssd/thuy/FS2.6/M1/build_m3ulcb_mmp/tmp/work-shared/m3ulcb/kernel-source/include/linux/timer.h:144:25: note: in definition of macro '__setup_timer' - (_timer)->function = (_fn); \ - ^~~ -====================================================================== -* Error generated by -Wsizeof-pointer-div - - rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:229:48: error: division 'sizeof (void *) / sizeof (void)' does not compute the number of array elements [-Werror=sizeof-pointer-div] - #define APPHINT_HELP_ARRAY_SIZE(a) (sizeof((a))/(sizeof((a[0])))) - ^ - rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:233:49: note: in expansion of macro 'APPHINT_HELP_ARRAY_SIZE' - {APPHINT_ID_ ## a, APPHINT_DATA_TYPE_ ## b, e, APPHINT_HELP_ARRAY_SIZE(e) }, - ^~~~~~~~~~~~~~~~~~~~~~~ -====================================================================== -* Error generated by -Wstringop-truncation - - rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/devices/rgx/rgxfwutils.c:1294:2: error: 'strncat' output truncated before terminating nul copying 7 bytes from a string of the same length [-Werror=stringop-truncation] - strncat(sCCBCtlName, sAppend, APPEND_STR_SIZE); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Thuy Tran ---- - build/linux/buildvars.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/linux/buildvars.mk b/build/linux/buildvars.mk -index a871d37..ddf12eb 100644 ---- a/build/linux/buildvars.mk -+++ b/build/linux/buildvars.mk -@@ -51,7 +51,7 @@ - - # These flags are used for kernel, User C and User C++ - # --COMMON_FLAGS := -W -Wall -+COMMON_FLAGS := -W -Wall -Wno-cast-function-type -Wno-sizeof-pointer-div -Wno-stringop-truncation - - # Enable 64-bit file & memory handling on 32-bit systems. - # --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb deleted file mode 100644 index d7b230aa..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb +++ /dev/null @@ -1,34 +0,0 @@ -DESCRIPTION = "Linux ICCOM hwspinlock Sample Driver for Renesas R-Car Gen3" - -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" -PN = "kernel-module-iccom-hwspinlock-sample" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "iccom" - -SRC_URI = "file://iccom-hwspinlock-sample.tar.bz2" - -S = "${WORKDIR}/iccom-hwspinlock-sample" -B = "${S}/iccom-hwspinlock-sample" - -# Build ICCOM kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install () { - # Create destination directory - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install kernel module - install -m 644 ${B}/iccom_hwspinlock_sample.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ -} - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/iccom_hwspinlock_sample.ko \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb deleted file mode 100644 index 47d37eb3..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb +++ /dev/null @@ -1,37 +0,0 @@ -DESCRIPTION = "Linux ICCOM MFIS Driver for Renesas R-Car Gen3" - -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -inherit module distro_features_check - -DEPENDS = "linux-renesas" -PN = "kernel-module-iccom-mfis" -PR = "r0" - -REQUIRED_DISTRO_FEATURES = "iccom" - -SRC_URI = "file://iccom-mfis.tar.bz2" - -S = "${WORKDIR}/iccom-mfis" -B = "${S}/iccom-mfis/drv" - -# Build ICCOM MFIS kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install () { - # Create destination directory - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install kernel module - install -m 644 ${B}/iccom_mfis.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ -} - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/iccom_mfis.ko \ -" - -# Autoload ICCOM MFIS Driver -KERNEL_MODULE_AUTOLOAD_append = " iccom_mfis" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb deleted file mode 100644 index 694163ef..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb +++ /dev/null @@ -1,75 +0,0 @@ -DESCRIPTION = "Memory Manager Kernel module for Renesas R-Car Gen3" - -require mmngr_drv.inc -require include/dtv-dvd-control.inc - -DEPENDS = "linux-renesas" -PN = "kernel-module-mmngr" -PR = "r0" - -S = "${WORKDIR}/git" -MMNGR_DRV_DIR = "mmngr_drv/mmngr/mmngr-module/files/mmngr" - -MMNGR_CFG_salvator-x = "MMNGR_SALVATORX" -MMNGR_CFG_h3ulcb = "MMNGR_SALVATORX" -MMNGR_CFG_m3ulcb = "MMNGR_SALVATORX" -MMNGR_CFG_m3nulcb = "MMNGR_SALVATORX" -MMNGR_CFG_ebisu = "MMNGR_EBISU" - -includedir = "${RENESAS_DATADIR}/include" -SSTATE_DUPWHITELIST += "${STAGING_INCDIR}" - -# Build Memory Manager kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - export MMNGR_CONFIG=${MMNGR_CFG} - - if [ "X${USE_DTV}" = "X1" ]; then - export MMNGR_SSP_CONFIG="MMNGR_SSP_ENABLE" - else - export MMNGR_SSP_CONFIG="MMNGR_SSP_DISABLE" - fi - - export MMNGR_IPMMU_MMU_CONFIG="IPMMU_MMU_DISABLE" - - cd ${S}/${MMNGR_DRV_DIR}/drv - install -d ${INCSHARED} - make all -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/mmngr.symvers - - # Install kernel module - install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/mmngr.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public.h ${KERNELSRC}/include/ - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private.h ${KERNELSRC}/include/ - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${KERNELSRC}/include/ - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${KERNELSRC}/include/ - - # Install shared header file to ${includedir} - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${D}/${includedir}/ - install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${D}/${includedir}/ -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dev \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/mmngr.ko \ -" - -RPROVIDES_${PN} += "kernel-module-mmngr" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb deleted file mode 100644 index 6a2fb8dc..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb +++ /dev/null @@ -1,60 +0,0 @@ -DESCRIPTION = "Memory Manager Buffer Kernel module for Renesas R-Car Gen3" - -require mmngr_drv.inc - -DEPENDS = "linux-renesas" -PN = "kernel-module-mmngrbuf" -PR = "r0" - -S = "${WORKDIR}/git" -MMNGRBUF_DRV_DIR = "mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf" - -# Support HW overlay mode in weston 5.0 -SRC_URI_append = "\ - file://0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch \ -" - -includedir = "${RENESAS_DATADIR}/include" -SSTATE_DUPWHITELIST += "${STAGING_INCDIR}" - -# Build Memory Manager Buffer kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/${MMNGRBUF_DRV_DIR}/drv - install -d ${INCSHARED} - make all -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/mmngrbuf.symvers - - # Install kernel module - install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/drv/mmngrbuf.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private.h ${KERNELSRC}/include/ - install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private_cmn.h ${KERNELSRC}/include/ - - # Install shared header files to ${includedir} - install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private_cmn.h ${D}/${includedir}/ -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dev \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/mmngrbuf.ko \ -" - -RPROVIDES_${PN} += "kernel-module-mmngrbuf" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch deleted file mode 100644 index 7e5ca0aa..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 43d2cc7496340eea3f96cb3c3cf66139e0878f3c Mon Sep 17 00:00:00 2001 -From: Hai Nguyen Pham -Date: Tue, 26 Mar 2019 15:56:30 +0700 -Subject: [PATCH] mmngr_drv: mmngrbuf: Take care of any migration of - scatterlist - -MMNGRBUF should take care of any migration of scatterlist for -all (shared) users of the DMA buffer. Although we only care about -DMA addresses at the moment, this will benefit the DRM system that -uses the buffer allocated by MMNGR directly. - -Initialize the scatterlist entry so that it can be happily traversed. - -Signed-off-by: Hai Nguyen Pham ---- - mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c -index fe3db08..d9189e9 100644 ---- a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c -+++ b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c -@@ -256,6 +256,9 @@ static struct sg_table *dmabuf_map_dma_buf(struct dma_buf_attachment *attach, - return NULL; - } - -+ sg_set_page(sgt->sgl, pfn_to_page(PFN_DOWN(priv->hard_addr)), -+ priv->size, offset_in_page(priv->hard_addr)); -+ - sg_dma_address(sgt->sgl) = priv->hard_addr; - sg_dma_len(sgt->sgl) = priv->size; - --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc deleted file mode 100644 index 77a0bced..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc +++ /dev/null @@ -1,13 +0,0 @@ -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ -" - -require include/rcar-gen3-modules-common.inc -inherit module - -MMNGR_DRV_URI = "git://github.com/renesas-rcar/mmngr_drv.git" - -SRC_URI = "${MMNGR_DRV_URI};branch=rcar_gen3" -SRCREV = "85d0042924de379307115533d7b6284333409bb3" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb deleted file mode 100644 index 5b02fb92..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb +++ /dev/null @@ -1,62 +0,0 @@ -DESCRIPTION = "QoS driver for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ -" - -inherit module - -DEPENDS = "linux-renesas" -PN = "kernel-module-qos" -PR = "r0" - -QOS_DRV_URL = "git://github.com/renesas-rcar/qos_drv.git" -BRANCH = "rcar-gen3" -SRCREV = "d32fbee4d7b76056c37935ff31102c3583801a29" - -SRC_URI = "${QOS_DRV_URL};branch=${BRANCH}" - -S = "${WORKDIR}/git" -QOS_DRV_DIR = "qos-module/files/qos/drv" - -includedir = "${RENESAS_DATADIR}/include" - -# Build Qos kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/${QOS_DRV_DIR}/ - oe_runmake -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${D}/${includedir} - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${QOS_DRV_DIR}/Module.symvers ${KERNELSRC}/include/qos.symvers - - # Install kernel module - install -m 644 ${S}/${QOS_DRV_DIR}/qos.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files - install -m 644 ${S}/${QOS_DRV_DIR}/qos.h ${KERNELSRC}/include/ - install -m 644 ${S}/${QOS_DRV_DIR}/qos_public_common.h ${KERNELSRC}/include/ - install -m 644 ${S}/${QOS_DRV_DIR}/qos_public_common.h ${D}/${includedir}/ -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-dbg \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/qos.ko \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb deleted file mode 100644 index bb326418..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb +++ /dev/null @@ -1,70 +0,0 @@ -DESCRIPTION = "Kernel module of UVCS" -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/lkm/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/core/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/cmn/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ - file://src/lkm/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ - file://src/core/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ - file://src/cmn/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ -" -require include/omx-control.inc -require include/rcar-gen3-path-common.inc -require include/checksum_control.inc - -inherit module - -PR = "r0" - -SRC_URI = "${@oe.utils.conditional('USE_VIDEO_OMX', '1', 'file://RCG3VUDRL4101ZDO.tar.bz2', '', d)}" - -S = "${WORKDIR}/RCG3VUDRL4101ZDO" - -EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" -EXTRA_OEMAKE += "CROSS_COMPILE=${CROSS_COMPILE}" - -B="${S}/src/makefile" - -includedir = "${RENESAS_DATADIR}/include" - -do_compile_prepend() { - export UVCS_SRC="${S}/src" - export UVCS_INC="${S}" - export VCP4_SRC="${S}/src" -} - -# Build UVCS kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_install() { - # Create destination directory - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${D}/${includedir}/ - - # Install kernel module - install -m 644 ${B}/uvcs_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install module symbol file - install -m 644 ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/UVCS.symvers - - # Install shared header file - install -m 644 ${S}/include/uvcs_ioctl.h ${D}/${includedir}/ -} - -# Clean up the module symbol file -CLEANFUNCS = "module_clean_symbol" - -module_clean_symbol() { - rm -f ${STAGING_KERNEL_BUILDDIR}/UVCS.symvers -} - -PACKAGES = " \ - ${PN} \ - ${PN}-sstate \ -" - -FILES_${PN}-sstate = " \ - ${includedir}/uvcs_ioctl.h \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb deleted file mode 100644 index be8f8e01..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb +++ /dev/null @@ -1,65 +0,0 @@ -DESCRIPTION = "VSP2Driver for the R-Car Gen3" - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ -" - -require include/rcar-gen3-modules-common.inc - -inherit module - -DEPENDS = "linux-renesas kernel-module-vspm" -PN = "kernel-module-vsp2driver" -PR = "r0" - -VSP2DRIVER_URL = " \ - git://github.com/renesas-rcar/vsp2driver.git" -BRANCH = "rcar-gen3" -SRCREV = "0ecf35aa05c103ba4d3ab83e3320a22fccd912c3" - -SRC_URI = "${VSP2DRIVER_URL};branch=${BRANCH}" - -SRC_URI_append = " file://0001-Handle-data_offset-setting-from-V4L2-API.patch" - -S = "${WORKDIR}/git" - -# Build VSP2 driver kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/vsp2driver - make all -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/vsp2driver/Module.symvers ${KERNELSRC}/include/vsp2.symvers - - # Copy kernel module - install -m 644 ${S}/vsp2driver/vsp2.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/vsp2driver/linux/vsp2.h ${KERNELSRC}/include/ -} - -PACKAGES = "\ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/vsp2.ko \ - ${sysconfdir}/modules-load.d \ -" - -RPROVIDES_${PN} += "kernel-module-vsp2driver kernel-module-vsp2" - -# Autoload VSP2Driver -KERNEL_MODULE_AUTOLOAD_append = " vsp2" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch deleted file mode 100644 index 3aab1740..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 50dd867589931beef05dbcdb17a37a8a678e4b13 Mon Sep 17 00:00:00 2001 -From: Damian Hobson-Garcia -Date: Fri, 10 May 2019 13:34:42 +0900 -Subject: [PATCH] Handle data_offset setting from V4L2 API - -The data in each buffer does not necessarily start at the -beginning of the buffer. Adjust as necessary according to -the data_offset field specified from user space. ---- - vsp2driver/vsp2_video.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/vsp2driver/vsp2_video.c b/vsp2driver/vsp2_video.c -index 8875578..0abf81c 100644 ---- a/vsp2driver/vsp2_video.c -+++ b/vsp2driver/vsp2_video.c -@@ -764,7 +764,8 @@ static int vsp2_video_buffer_prepare(struct vb2_buffer *vb) - } - - for (i = 0; i < vb->num_planes; ++i) { -- buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i); -+ buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i) + -+ vb->planes[i].data_offset; - - if (vb2_plane_size(vb, i) < format->plane_fmt[i].sizeimage) - return -EINVAL; --- -2.17.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb deleted file mode 100644 index 9b723614..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb +++ /dev/null @@ -1,102 +0,0 @@ -DESCRIPTION = "VSP Manager for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=0ebf15a927e436cec699371cd890775c \ -" - -inherit module - -DEPENDS = "linux-renesas" -PN = "kernel-module-vspm" -PR = "r0" - -VSPM_DRV_URL = "git://github.com/renesas-rcar/vspm_drv.git" -BRANCH = "rcar_gen3" -SRCREV = "7f854a9a1c4760255a54b7c14891d1545ed1bf43" - -SRC_URI = "${VSPM_DRV_URL};branch=${BRANCH}" - -# Fix patch for upscaling issue -SRC_URI_append = " \ - file://0001-Set-UDS-horizontal-scaling-phase-to-auto.patch \ -" - -S = "${WORKDIR}/git" -VSPM_DRV_DIR = "vspm-module/files/vspm" -includedir = "${RENESAS_DATADIR}/include" - -# Build VSP Manager kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/${VSPM_DRV_DIR}/drv - make all -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${KERNELSRC}/include - install -d ${D}/${includedir} - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${VSPM_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/vspm.symvers - - # Install kernel module - install -m 644 ${S}/${VSPM_DRV_DIR}/drv/vspm.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_public.h ${KERNELSRC}/include/ - install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_cmn.h ${KERNELSRC}/include/ - install -m 644 ${S}/${VSPM_DRV_DIR}/include/vsp_drv.h ${KERNELSRC}/include/ - install -m 644 ${S}/${VSPM_DRV_DIR}/include/fdp_drv.h ${KERNELSRC}/include/ - - # Install shared header files - install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_cmn.h ${D}/${includedir}/ - install -m 644 ${S}/${VSPM_DRV_DIR}/include/vsp_drv.h ${D}/${includedir}/ - install -m 644 ${S}/${VSPM_DRV_DIR}/include/fdp_drv.h ${D}/${includedir}/ -} - -do_populate_sysroot[sstate-inputdirs] += "${S}/${VSPM_DRV_DIR}/include/" -do_populate_sysroot[sstate-outputdirs] += "${KERNELSRC}/include/" -do_populate_sysroot_setscene[prefuncs] = "vspm_sstate_check_func" -SSTATE_DUPWHITELIST = "${KERNELSRC}/include" - -vspm_sstate_check_func() { - # An error is returned when unpack of kernel source has not been completed yet. - # By returning error, rebuild task runs by force (Invalidating sstate). - # This module installs shared header files in ${KERNELSRC}/include by - # sstate cache. - # Those files will be deleted by unpack task of kernel. - if [ ${WITHIN_EXT_SDK} -eq 1 ]; then - : - else - if [ ! -d "${KERNELSRC}/include" ]; then - exit 1 - fi - fi -} - -# Should also clean deploy/licenses directory -# for module when do_clean. -do_clean[cleandirs] += "${LICENSE_DIRECTORY}/${PN}" - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/vspm.ko \ -" - -RPROVIDES_${PN} += "kernel-module-vspm" - -# Autoload VSPM -KERNEL_MODULE_AUTOLOAD_append = " vspm" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch deleted file mode 100644 index 17bf6233..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch +++ /dev/null @@ -1,40 +0,0 @@ -From dd7dffa07065100c3164ca94a1d4395712e647cd Mon Sep 17 00:00:00 2001 -From: Damian Hobson-Garcia -Date: Mon, 3 Jun 2019 12:33:57 +0900 -Subject: [PATCH] Set UDS horizontal scaling phase to auto - -Use the register default settings for the scaling phase instead -of manually calculating them. - -The default setting seems to calculate the phase correctly, -which the manual settings seem to shift the output image to the left -my an amount proportional to the scaling ratio. i.e x16 scaling -will shift the output by 16 pixels. ---- - vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c b/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c -index 8f63565..6f89bae 100644 ---- a/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c -+++ b/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c -@@ -1454,16 +1454,6 @@ static void vsp_ins_replace_part_uds_module( - r_temp *= ratio; - } - -- /* add horizontal filter phase of control register */ -- uds_info->val_ctrl |= VSP_UDS_CTRL_AMDSLH; -- -- /* replace scaling filter horizontal phase */ -- if (l_temp & 0xfff) -- uds_info->val_hphase = (4096 - (l_temp & 0xfff)) << 16; -- else -- uds_info->val_hphase = 0; -- if (r_temp & 0xfff) -- uds_info->val_hphase |= (4096 - (r_temp & 0xfff)); - } else { - l_temp *= 4096; - r_temp *= 4096; --- -2.17.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb deleted file mode 100644 index 95e71c44..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb +++ /dev/null @@ -1,67 +0,0 @@ -DESCRIPTION = "VSP Manager Interface driver for the R-Car Gen3" - -require include/rcar-gen3-modules-common.inc - -LICENSE = "GPLv2 & MIT" -LIC_FILES_CHKSUM = " \ - file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://MIT-COPYING;md5=0ebf15a927e436cec699371cd890775c \ -" - -inherit module - -DEPENDS = "linux-renesas kernel-module-vspm" -PN = "kernel-module-vspmif" -PR = "r0" - -VSPMIF_DRV_URL = " \ - git://github.com/renesas-rcar/vspmif_drv.git" -BRANCH = "rcar_gen3" -SRCREV = "6172cc7273aae0345db894faa5ab59777549c247" - -SRC_URI = "${VSPMIF_DRV_URL};branch=${BRANCH}" - -S = "${WORKDIR}/git" -VSPMIF_DRV_DIR = "vspm_if-module/files/vspm_if" - -includedir = "${RENESAS_DATADIR}/include" - -# Build VSP Manager Interface kernel module without suffix -KERNEL_MODULE_PACKAGE_SUFFIX = "" - -do_compile() { - cd ${S}/${VSPMIF_DRV_DIR}/drv - make all -} - -do_install () { - # Create destination directories - install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ - install -d ${D}/${includedir} - install -d ${KERNELSRC}/include - - # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${VSPMIF_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/vspm_if.symvers - - # Install kernel module - install -m 644 ${S}/${VSPMIF_DRV_DIR}/drv/vspm_if.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ - - # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) - # This file installed in SDK by kernel-devsrc pkg. - install -m 644 ${S}/${VSPMIF_DRV_DIR}/include/vspm_if.h ${KERNELSRC}/include/ - - # Install shared header file - install -m 644 ${S}/${VSPMIF_DRV_DIR}/include/vspm_if.h ${D}/${includedir}/ -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dev \ -" - -FILES_${PN} = " \ - /lib/modules/${KERNEL_VERSION}/extra/vspm_if.ko \ -" - -RPROVIDES_${PN} += "kernel-module-vspmif kernel-module-vspm-if" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch deleted file mode 100644 index 765053fa..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5f378e5db591a4a119b6cface6037cbded240506 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Thu, 25 Oct 2018 13:25:10 +0700 -Subject: [PATCH 1/6] ADSP: add document for compatible string - "renesas,rcar_adsp_sound_gen3" - -Signed-off-by: tienphitran ---- - .../devicetree/bindings/sound/renesas,adsp.txt | 11 +++++++++++ - 1 file changed, 11 insertions(+) - create mode 100644 Documentation/devicetree/bindings/sound/renesas,adsp.txt - -diff --git a/Documentation/devicetree/bindings/sound/renesas,adsp.txt b/Documentation/devicetree/bindings/sound/renesas,adsp.txt -new file mode 100644 -index 000000000000..b529bcadea82 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/renesas,adsp.txt -@@ -0,0 +1,11 @@ -+Renesas ADSP sound driver -+ -+Required properties: -+- compatible : "renesas,rcar_adsp_sound_gen3" -+ -+Example: -+ -+rcar_adsp_sound: adsp_sound@0 { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+}; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch deleted file mode 100644 index 9c38a327..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a39cada70268aadff7153e4f782bcd90a5c69d07 Mon Sep 17 00:00:00 2001 -From: Hendrik Brueckner -Date: Mon, 4 Dec 2017 10:56:46 +0100 -Subject: [PATCH] arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT - program type - -Correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type -by exporting the user_pt_regs structure instead of the pt_regs structure -that is in-kernel only. - -Signed-off-by: Hendrik Brueckner -Reviewed-by: Thomas Richter -Acked-by: Alexei Starovoitov -Cc: Will Deacon -Cc: Mark Rutland -Cc: Arnaldo Carvalho de Melo -Signed-off-by: Daniel Borkmann ---- - arch/arm64/include/asm/perf_event.h | 2 ++ - arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ - 2 files changed, 11 insertions(+) - create mode 100644 arch/arm64/include/uapi/asm/bpf_perf_event.h - -diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h -index 8d5cbec..f9ccc36 100644 ---- a/arch/arm64/include/asm/perf_event.h -+++ b/arch/arm64/include/asm/perf_event.h -@@ -18,6 +18,7 @@ - #define __ASM_PERF_EVENT_H - - #include -+#include - - #define ARMV8_PMU_MAX_COUNTERS 32 - #define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1) -@@ -79,6 +80,7 @@ struct pt_regs; - extern unsigned long perf_instruction_pointer(struct pt_regs *regs); - extern unsigned long perf_misc_flags(struct pt_regs *regs); - #define perf_misc_flags(regs) perf_misc_flags(regs) -+#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs - #endif - - #define perf_arch_fetch_caller_regs(regs, __ip) { \ -diff --git a/arch/arm64/include/uapi/asm/bpf_perf_event.h b/arch/arm64/include/uapi/asm/bpf_perf_event.h -new file mode 100644 -index 0000000..b551b74 ---- /dev/null -+++ b/arch/arm64/include/uapi/asm/bpf_perf_event.h -@@ -0,0 +1,9 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ -+#define _UAPI__ASM_BPF_PERF_EVENT_H__ -+ -+#include -+ -+typedef struct user_pt_regs bpf_user_pt_regs_t; -+ -+#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */ --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch deleted file mode 100644 index 8c0a2af7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1cdbf4ed4717eefa2b6237c1e63e351b62990522 Mon Sep 17 00:00:00 2001 -From: Dien Pham -Date: Fri, 23 Feb 2018 18:29:32 +0700 -Subject: [PATCH] rpmsg: Add message to be able to configure RPMSG_VIRTIO from - defconfig - -Signed-off-by: Dien Pham ---- - drivers/rpmsg/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/rpmsg/Kconfig b/drivers/rpmsg/Kconfig -index 0fe6eac..5b1e61b 100644 ---- a/drivers/rpmsg/Kconfig -+++ b/drivers/rpmsg/Kconfig -@@ -47,7 +47,7 @@ config RPMSG_QCOM_SMD - platforms. - - config RPMSG_VIRTIO -- tristate -+ tristate "Enable remote processor message and virtual I/O configure" - select RPMSG - select VIRTIO - --- -1.9.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch deleted file mode 100644 index 14719fba..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch +++ /dev/null @@ -1,7204 +0,0 @@ -From 829c17a722611c39cda6926f0fac46fa586c70ef Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Mon, 17 Jun 2019 17:04:02 +0700 -Subject: [PATCH 2/6] ADSP: add ADSP sound driver source - -Signed-off-by: tienphitran - -diff --git a/include/adsp_drv/xf-adsp-drv-ext.h b/include/adsp_drv/xf-adsp-drv-ext.h -new file mode 100644 -index 0000000..6c3dbc0 ---- /dev/null -+++ b/include/adsp_drv/xf-adsp-drv-ext.h -@@ -0,0 +1,58 @@ -+/***************************************************************************** -+ * \file xf-adsp-driver-ext.h -+ * \brief Header file for ADSP driver extension part -+ * \addtogroup ADSP Driver -+ ****************************************************************************** -+ * \date Oct. 21, 2017 -+ * \author Renesas Electronics Corporation -+ ****************************************************************************** -+ * \par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_DRV_EXT_H -+#define __XF_ADSP_DRV_EXT_H -+ -+/*********************************************************** -+ * Extension client APIs -+ * ********************************************************/ -+ -+struct xf_adsp_base_cmd { -+ /* register new client for ADSP base control */ -+ int (*client_register)(void **private_data); -+ /* unregister client */ -+ int (*client_unregister)(void *private_data); -+ /* get data from proxy */ -+ int (*recv)(void *private_data, void *buf); -+ /* send data to proxy */ -+ int (*send)(void *private_data, void *buf); -+ /* wait the valid message in the response queue */ -+ int (*poll)(void *private_data, int *condition); -+}; -+ -+/* create ADSP base control data */ -+int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd); -+ -+/* destroy ADSP base control data */ -+int xf_adsp_base_destroy(void); -+ -+#endif -diff --git a/sound/soc/adsp/Kconfig b/sound/soc/adsp/Kconfig -new file mode 100644 -index 0000000..605261f ---- /dev/null -+++ b/sound/soc/adsp/Kconfig -@@ -0,0 +1,14 @@ -+## SoC for ADSP driver configuration -+menu "ASoC ADSP driver" -+ -+config SND_SOC_ADSP -+ tristate "SoC Audio for R-Car ADSP" -+ select SND_SIMPLE_CARD -+ select SND_SIMPLE_SCU_CARD -+ select SND_AUDIO_GRAPH_CARD -+ select SND_AUDIO_GRAPH_SCU_CARD -+ default y -+ help -+ This option enables ALSA ADSP sound supports ADSP module -+ -+endmenu -diff --git a/sound/soc/adsp/Makefile b/sound/soc/adsp/Makefile -new file mode 100644 -index 0000000..8277fdb ---- /dev/null -+++ b/sound/soc/adsp/Makefile -@@ -0,0 +1,3 @@ -+## Makefile for SoC ADSP driver -+snd-soc-adsp-objs := xf-adsp-alsa.o xf-adsp-base.o -+obj-$(CONFIG_SND_SOC_ADSP) += snd-soc-adsp.o -diff --git a/sound/soc/adsp/xf-adsp-alsa.c b/sound/soc/adsp/xf-adsp-alsa.c -new file mode 100644 -index 0000000..493ff84 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-alsa.c -@@ -0,0 +1,3939 @@ -+/** *************************************************************************** -+ * \file xf-adsp-alsa.c -+ * \brief Source file for ADSP ALSA Driver -+ * \addtogroup ADSP Driver -+ ****************************************************************************** -+ * \date Oct. 21, 2017 -+ * \author Renesas Electronics Corporation -+ ****************************************************************************** -+ * \par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ *****************************************************************************/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "xf-adsp-base.h" -+ -+/* Name of Volume control for playback */ -+#define PLAYBACK_VOLUME_CTR_NAME "PlaybackVolume" -+ -+/* Name of Volume control for capture */ -+#define CAPTURE_VOLUME_CTR_NAME "CaptureVolume" -+ -+/* Name of Sample Rate control for playback */ -+#define PLAYBACK_OUT_RATE_CTR_NAME "PlaybackOutRate" -+ -+/* Name of Output Channel control for playback */ -+#define PLAYBACK_OUT_CHANNEL_CTR_NAME "PlaybackOutChannel" -+ -+/* Name of Sample Rate control for capture */ -+#define CAPTURE_IN_RATE_CTR_NAME "CaptureInRate" -+ -+/* Name of Equalizer parameters control for playback */ -+#define PLAYBACK_EQZ_CTR_NAME "PlaybackEQZControl" -+ -+/* Name of Equalizer parameters control for capture */ -+#define CAPTURE_EQZ_CTR_NAME "CaptureEQZControl" -+ -+/* Name of Equalizer Switch control for playback */ -+#define PLAYBACK_EQZ_SWITCH_CTR_NAME "PlaybackEQZSwitch" -+ -+/* Name of Equalizer Switch control for capture */ -+#define CAPTURE_EQZ_SWITCH_CTR_NAME "CaptureEQZSwitch" -+ -+/* Name of Volume control for TDM playback */ -+#define TDM_PLAYBACK_VOLUME_CTR_NAME "TDMPlaybackVolume" -+ -+/* Name of Volume control for TDM capture */ -+#define TDM_CAPTURE_VOLUME_CTR_NAME "TDMCaptureVolume" -+ -+/* Name of Sample Rate control for TDM playback */ -+#define TDM_PLAYBACK_OUT_RATE_CTR_NAME "TDMPlaybackOutRate" -+ -+/* Name of Sample Rate control for TDM capture */ -+#define TDM_CAPTURE_IN_RATE_CTR_NAME "TDMCaptureInRate" -+ -+/* Prefix of Playback control name */ -+#define PREFIX_OF_PLAYBACK_CTR_NAME PLAYBACK_VOLUME_CTR_NAME[0] -+ -+/* Prefix of Capture control name */ -+#define PREFIX_OF_CAPTURE_CTR_NAME CAPTURE_VOLUME_CTR_NAME[0] -+ -+/* Prefix of TDM control name */ -+#define PREFIX_OF_TDM_CTR_NAME TDM_PLAYBACK_VOLUME_CTR_NAME[0] -+ -+/* Prefix of TDM playback */ -+#define TDM_PLAYBACK TDM_PLAYBACK_VOLUME_CTR_NAME[3] -+ -+/* Prefix of TDM record */ -+#define TDM_CAPTURE TDM_CAPTURE_VOLUME_CTR_NAME[3] -+ -+/* Number of control for playback & capture */ -+#define RDR_CONTROL_NUM (9) -+ -+/* Number of controls for TDM */ -+#define TDM_CONTROL_NUM (4) -+ -+/* Indicate playback stream */ -+#define DIRECT_PLAYBACK (0) -+ -+/* Indicate capture stream */ -+#define DIRECT_CAPTURE (1) -+ -+/* Indicate stream number */ -+#define DIRECT_NUM (2) -+ -+/* Supported frame size for playback/record function in driver */ -+#define FRAME_SIZE (1024) -+ -+/* Supported frame size for TDM playback/record function in driver */ -+#define TDM_FRAME_SIZE (1024) -+ -+/* Supported sample rate in driver */ -+#define SND_ADSP_SAMPLE_RATES (SNDRV_PCM_RATE_32000 | \ -+ SNDRV_PCM_RATE_44100 | \ -+ SNDRV_PCM_RATE_48000) -+ -+/* Supported PCM width in driver */ -+#define SND_ADSP_PCM_WIDTHS (SNDRV_PCM_FMTBIT_S16_LE | \ -+ SNDRV_PCM_FMTBIT_S24_LE) -+ -+/* Macro to control DAI index */ -+/* DAI 0 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX0 (0) -+ -+/* DAI 1 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX1 (1) -+ -+/* DAI 2 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX2 (2) -+ -+/* DAI 3 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX3 (3) -+ -+/* DAI 4 index for playback/record functions of TDM formats */ -+#define TDM_DAI_IDX (4) -+ -+/* Maximum number of DAI supported by driver */ -+#define MAX_DAI_IDX (5) -+ -+/* Renderer/Capture software information */ -+/* Minimum channel number supported */ -+#define MIN_CHANNEL (1) -+ -+/* Maximum channel number supported */ -+#define MAX_CHANNEL (2) -+ -+/* Minimum buffer size in byte */ -+#define MIN_BUF_SIZE (FRAME_SIZE * MIN_CHANNEL * 2) -+ -+/* Maximum buffer size in byte */ -+#define MAX_BUF_SIZE (FRAME_SIZE * MAX_CHANNEL * 4) -+ -+/* Minimum numbers of period in the buffer */ -+#define MIN_PERIOD (1) -+ -+/* Maximum numbers of period in the buffer */ -+#define MAX_PERIOD (4) -+ -+/* Maximun numbers of bytes in ALSA buffer */ -+#define MAX_BUFFER_BYTES (MAX_PERIOD * MAX_BUF_SIZE) -+ -+/* TDM software information */ -+/*< Minimum channel number supported in TDM plugin */ -+#define TDM_MIN_CHANNEL (6) -+ -+/* Maximum channel number supported in TDM plugin */ -+#define TDM_MAX_CHANNEL (8) -+ -+/* Minimum buffer size in byte for TDM format */ -+#define TDM_MIN_BUF_SIZE (TDM_FRAME_SIZE * TDM_MIN_CHANNEL * 2) -+ -+/* Maximum buffer size in byte for TDM format */ -+#define TDM_MAX_BUF_SIZE (TDM_FRAME_SIZE * TDM_MAX_CHANNEL * 4) -+ -+/* Minimum numbers of period in the buffer for TDM format */ -+#define TDM_MIN_PERIOD (1) -+ -+/* Maximum numbers of period in the buffer for TDM format */ -+#define TDM_MAX_PERIOD (4) -+ -+/* Maximum numbers of bytes in ALSA buffer for TDM format */ -+#define TDM_MAX_BUFFER_BYTES (TDM_MAX_PERIOD * TDM_MAX_BUF_SIZE) -+ -+/* Volume scale used when user set */ -+#define VOLUME_SCALE (100) -+ -+/* Maximum element in Equalizer parameter control */ -+#define MAX_EQZ_PARAM_NUMBER (55) -+ -+/* Equalizer control is disabled */ -+#define EQZ_OFF (0) -+ -+/* Equalizer control is enabled */ -+#define EQZ_ON (1) -+ -+/* Component status */ -+/* Handle state is NULL */ -+#define XF_HANDLE_NULL (0) -+ -+/* Handle state is CREATED after creating handle successfully */ -+#define XF_HANDLE_CREATED BIT(0) -+ -+/* Handle state is READY after finishing handle init */ -+#define XF_HANDLE_READY BIT(1) -+ -+/* channels */ -+/* Mono stream */ -+#define MONAURAL (1) -+ -+/* Stereo stream */ -+#define STEREO (2) -+ -+/* define number of bytes in a sample of 24 bits format types */ -+/* store 24 bits data in 4 bytes LE */ -+#define FMTBIT_S24_LE_BYTES_PER_SAMPLE (4) -+ -+/* store 24 bits data in 3 bytes LE */ -+#define FMTBIT_S24_3LE_BYTES_PER_SAMPLE (3) -+ -+/* helper macro to get bytes per sample number */ -+#define BYTES_PER_SAMPLE(fmt) (FMTBIT_##fmt##_BYTES_PER_SAMPLE) -+ -+/* check component is created */ -+#define COMPONENT_IS_CREATED(n) (((n & XF_HANDLE_CREATED) != 0) ? TRUE : FALSE) -+ -+/* check component is ready */ -+#define COMPONENT_IS_READY(n) (((n & XF_HANDLE_READY) != 0) ? TRUE : FALSE) -+ -+/* indicator of stream order */ -+#define MIX_UNUSED (0) -+#define FIRST_RUN (2) -+#define SECOND_RUN (1) -+ -+/* check MIX usage */ -+#define MIX_ENABLED(mix_ctl) ((mix_ctl == SECOND_RUN) ? TRUE : FALSE) -+ -+/******************************************************************* -+ * base structures for ADSP ALSA driver -+ * ****************************************************************/ -+ -+/** \struct snd_adsp_control -+ * \brief Structure stores parameters from user -+ */ -+struct snd_adsp_control { -+ /* Volume rate for playback/record */ -+ int vol_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Volume rate for TDM playback/TDM record */ -+ int tdm_vol_rate[DIRECT_NUM]; -+ -+ /* Out sample rate with Renderer, in sample rate with Capture */ -+ int sample_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Out sample rate for TDM Renderer, in sample rate for TDM Capture */ -+ int tdm_sample_rate[DIRECT_NUM]; -+ -+ /* Output channel of playback */ -+ int rdr_out_ch[MAX_DAI_IDX - 1]; -+ -+ /* Equalizer parameters */ -+ struct xf_adsp_equalizer_params eqz_params[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Equalizer switch */ -+ int eqz_switch[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Indicator of MIX usage */ -+ int mix_usage; -+}; -+ -+/** \struct snd_adsp_base_info -+ * \brief Structure stores some base information of a stream -+ */ -+struct snd_adsp_base_info { -+ /* high resolution timer data */ -+ struct hrtimer hrtimer; -+ -+ /* kernel time value in nanosecond */ -+ ktime_t ktime; -+ -+ /* save interrupt state before getting lock */ -+ unsigned long flag; -+ -+ /* high resolution timer state */ -+ int hrt_state; -+ -+ /* target handle id of ALSA driver */ -+ int handle_id; -+ -+ /* data buffer */ -+ char *buffer[XF_BUF_POOL_SIZE]; -+ -+ /* size of each allocated data buffer */ -+ int buf_bytes; -+ -+ /* data index of buffer */ -+ int buf_idx; -+ -+ /* queue index of buffer */ -+ int buf_queue; -+ -+ /* HW index in bytes */ -+ int hw_idx; -+ -+ /* number of bytes in a period */ -+ int period_bytes; -+ -+ /* substream runtime object */ -+ struct snd_pcm_substream *substream; -+ -+ /* indirect PCM data transfer */ -+ struct snd_pcm_indirect pcm_indirect; -+ -+ /* spinlock data */ -+ spinlock_t lock; -+ -+ /* runtime error indicator */ -+ int runtime_err; -+}; -+ -+/** \struct snd_adsp_playback -+ * \brief Structure stores data for playback function -+ */ -+struct snd_adsp_playback { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* Renderer component data */ -+ struct xf_adsp_renderer *renderer; -+ -+ /* Equalizer component data */ -+ struct xf_adsp_equalizer *equalizer; -+ -+ /* Renderer component state */ -+ int rdr_state; -+ -+ /* Equalizer component state */ -+ int eqz_state; -+}; -+ -+/** \struct snd_adsp_record -+ * \brief Structure stores data for record function -+ */ -+struct snd_adsp_record { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* Capture component data */ -+ struct xf_adsp_capture *capture; -+ -+ /* Equalizer component data */ -+ struct xf_adsp_equalizer *equalizer; -+ -+ /* Capture component state */ -+ int cap_state; -+ -+ /* Equalizer component state */ -+ int eqz_state; -+}; -+ -+/** \struct snd_adsp_tdm_playback -+ * \brief Structure stores data for TDM playback function -+ */ -+struct snd_adsp_tdm_playback { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* TDM Renderer component data */ -+ struct xf_adsp_tdm_renderer *tdm_renderer; -+ -+ /* TDM Renderer component state */ -+ int state; -+}; -+ -+/** \struct snd_adsp_tdm_record -+ * \brief Structure stores data for TDM record function -+ */ -+struct snd_adsp_tdm_record { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* TDM Capture component data */ -+ struct xf_adsp_tdm_capture *tdm_capture; -+ -+ /* TDM Capture component state */ -+ int state; -+}; -+ -+/** \struct snd_adsp_card -+ * \brief Structure stores data for ALSA sound card -+ */ -+struct snd_adsp_card { -+ /* playback data */ -+ struct snd_adsp_playback *playback[MAX_DAI_IDX - 1]; -+ -+ /* record data */ -+ struct snd_adsp_record *record[MAX_DAI_IDX - 1]; -+ -+ /* TDM playback data */ -+ struct snd_adsp_tdm_playback *tdm_playback; -+ -+ /* TDM record data */ -+ struct snd_adsp_tdm_record *tdm_record; -+ -+ /* Structure contains params information for control */ -+ struct snd_adsp_control ctr_if; -+}; -+ -+/** HW configuration of ALSA ADSP card for Renderer/Capture */ -+static struct snd_pcm_hardware snd_pcm_adsp_hw = { -+ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ -+ | SNDRV_PCM_INFO_RESUME -+ | SNDRV_PCM_INFO_BLOCK_TRANSFER -+ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), -+ .formats = SND_ADSP_PCM_WIDTHS, -+ .rates = SND_ADSP_SAMPLE_RATES, -+ .rate_min = 32000, -+ .rate_max = 48000, -+ .channels_min = MIN_CHANNEL, -+ .channels_max = MAX_CHANNEL, -+ -+ /* maximum buffer size in bytes */ -+ .buffer_bytes_max = MAX_BUFFER_BYTES, -+ -+ /* minimum size of the periods (frame) in bytes */ -+ .period_bytes_min = MIN_BUF_SIZE, -+ -+ /* maximum size of the periods (frame) in bytes */ -+ .period_bytes_max = MAX_BUF_SIZE, -+ -+ /* minimum periods (frames) in a buffer */ -+ .periods_min = MIN_PERIOD, -+ -+ /* maximum periods (frames) in a buffer */ -+ .periods_max = MAX_PERIOD, -+}; -+ -+/* HW configuration of ALSA ADSP card for TDM */ -+static struct snd_pcm_hardware snd_pcm_adsp_tdm_hw = { -+ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ -+ | SNDRV_PCM_INFO_RESUME -+ | SNDRV_PCM_INFO_BLOCK_TRANSFER -+ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), -+ .formats = SND_ADSP_PCM_WIDTHS, -+ .rates = SND_ADSP_SAMPLE_RATES, -+ .rate_min = 32000, -+ .rate_max = 48000, -+ .channels_min = TDM_MIN_CHANNEL, -+ .channels_max = TDM_MAX_CHANNEL, -+ -+ /* maximum buffer size in bytes */ -+ .buffer_bytes_max = TDM_MAX_BUFFER_BYTES, -+ -+ /* minimum size of the periods (frame) in bytes */ -+ .period_bytes_min = TDM_MIN_BUF_SIZE, -+ -+ /* maximum size of the periods (frame) in bytes */ -+ .period_bytes_max = TDM_MAX_BUF_SIZE, -+ -+ /* minimum periods (frames) in a buffer */ -+ .periods_min = TDM_MIN_PERIOD, -+ -+ /* maximum periods (frames) in a buffer */ -+ .periods_max = TDM_MAX_PERIOD, -+}; -+ -+/******************************************************************* -+ * function declaration -+ * ****************************************************************/ -+ -+static int -+snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream); -+static void * -+snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream); -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream); -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_hrt(struct hrtimer *hrt); -+static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt); -+static int snd_adsp_playback_init(struct snd_adsp_playback **data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_record_init(struct snd_adsp_record **data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_record_prepare(struct snd_adsp_record *record, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback); -+static int snd_adsp_record_deinit(struct snd_adsp_record *record); -+static int snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **data, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **data, -+ struct snd_pcm_substream *substream); -+static int -+snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, -+ struct snd_pcm_substream *substream); -+static int -+snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback); -+static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record); -+static int snd_adsp_pcm_open(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_close(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *hw_params); -+static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx); -+static snd_pcm_uframes_t -+snd_adsp_pcm_pointer(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream); -+static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, -+ struct snd_pcm_indirect *rec, size_t bytes); -+static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int -+snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int -+snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static void snd_adsp_get_eqz_params_from_control( -+ struct xf_adsp_equalizer_params *eqz_params, -+ struct xf_adsp_equalizer_params *eqz_ctr_params, -+ bool flag); -+static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime); -+static int snd_adsp_probe(struct platform_device *pdev); -+static int snd_adsp_remove(struct platform_device *pdev); -+ -+/******************************************************************* -+ * callback function of ADSP control interface -+ * ****************************************************************/ -+/** ************************************************************************** -+ * \brief event handler callback to notify error from ADSP -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_event_handler(void *data) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) -+ base->runtime_err = TRUE; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief empty buf done callback for playback/TDM playback functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->buf_queue++; -+ base->hw_idx += length; /* increase the DMA buffer index */ -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief fill buf done callback for playback/TDM playback functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief empty buf done callback for record/TDM record functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief fill buf done callback for record/TDM record functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->buf_queue++; -+ base->hw_idx += length; /* increase the DMA buffer index */ -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ return 0; -+} -+ -+/** callback functions for playback/TDM playback */ -+static struct xf_callback_func rdr_callbacks = /* PRQA S 3218 */ -+{ -+ .empty_buf_done = &snd_adsp_rdr_empty_buf_done, /* PRQA S 1053 2 */ -+ .fill_buf_done = &snd_adsp_rdr_fill_buf_done, -+ .event_handler = &snd_adsp_event_handler -+}; -+ -+/** callback functions for record/TDM record */ -+static struct xf_callback_func cap_callbacks = /* PRQA S 3218 */ -+{ -+ .empty_buf_done = &snd_adsp_cap_empty_buf_done, /* PRQA S 1053 2 */ -+ .fill_buf_done = &snd_adsp_cap_fill_buf_done, -+ .event_handler = &snd_adsp_event_handler -+}; -+ -+/******************************************************************* -+ * helper functions to get some internal data -+ * ****************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Get current index of CPU DAI from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval id Index of current CPU DAI -+ *****************************************************************************/ -+static int -+snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd; -+ -+ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; -+ return rtd->cpu_dai->id; -+} -+ -+/** ************************************************************************** -+ * \brief Get ADSP ALSA driver's data from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval pointer Pointer to driver's data -+ *****************************************************************************/ -+static void * -+snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd; -+ -+ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; -+ return snd_soc_dai_get_drvdata(rtd->cpu_dai); -+} -+ -+/** ************************************************************************** -+ * \brief Get base's data of playback/record from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval pointer Pointer to playback/record's base data -+ *****************************************************************************/ -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ struct snd_adsp_base_info *base; -+ int dai_idx; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ -+ /* get DAI index of substream */ -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ -+ /* get base data of the substream */ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ base = !adsp_card->playback[dai_idx] ? -+ NULL : &adsp_card->playback[dai_idx]->base; -+ } else { -+ base = !adsp_card->record[dai_idx] ? -+ NULL : &adsp_card->record[dai_idx]->base; -+ } -+ } else { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ base = !adsp_card->tdm_playback ? -+ NULL : &adsp_card->tdm_playback->base; -+ } else { -+ base = !adsp_card->tdm_record ? -+ NULL : &adsp_card->tdm_record->base; -+ } -+ } -+ -+ return base; -+} -+ -+/** *************************************************************************** -+ * \brief Get playback/record/TDM playback/TDM record's base data -+ * from hr timer data -+ * -+ * \param[in] hrt Pointer to hr timer data -+ * \retval pointer Pointer to playback/record's base data -+ *****************************************************************************/ -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_hrt(struct hrtimer *hrt) -+{ -+ return (struct snd_adsp_base_info *)hrt; -+} -+ -+/***************************************************************************** -+ * hrtimer interrupt function -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Interrupt function of high resolution timer -+ * -+ * \param[in] hrt Pointer to hr timer data -+ * \retval HRTIMER_RESTART Restart the timer after expire time -+ *****************************************************************************/ -+static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt) -+{ -+ struct snd_adsp_base_info *base = snd_adsp_get_base_from_hrt(hrt); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ if (base->hw_idx != 0) { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ /* update PCM status for the next period */ -+ snd_pcm_period_elapsed(base->substream); -+ } else { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ hrtimer_forward_now(hrt, base->ktime); -+ -+ return HRTIMER_RESTART; -+} -+ -+/***************************************************************************** -+ * internal functions to manage playback and record functions -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Initialize playback data -+ * -+ * \param[out] playback_data Pointer to store playback data -+ * \param[in] eqz_flag Flag to indicate equalizer usage -+ * \param[in] substream Pointer to substream data -+ * \retval EINVAL Failed to initialize playback data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_init(struct snd_adsp_playback **playback_data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_playback *playback; -+ -+ /* allocate memory for playback data */ -+ playback = kmalloc(sizeof(*playback), GFP_KERNEL); -+ if (!playback) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(playback, 0, sizeof(struct snd_adsp_playback)); -+ -+ /* save the playback data */ -+ *playback_data = playback; -+ -+ /* set handle state as NULL state */ -+ playback->rdr_state = XF_HANDLE_NULL; -+ playback->eqz_state = XF_HANDLE_NULL; -+ playback->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register renderer component */ -+ if (xf_adsp_renderer_create(&playback->renderer, -+ &rdr_callbacks, -+ (void *)&playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark renderer component created */ -+ playback->rdr_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as renderer ID */ -+ playback->base.handle_id = playback->renderer->handle_id; -+ -+ if (eqz_flag == EQZ_ON) { -+ /* create equalizer component when equalizer is used */ -+ if (xf_adsp_equalizer_create(&playback->equalizer, -+ &rdr_callbacks, -+ (void *)&playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark equalizer component created */ -+ playback->eqz_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as equalizer ID */ -+ playback->base.handle_id = playback->equalizer->handle_id; -+ } -+ -+ /* init lock */ -+ spin_lock_init(&playback->base.lock); -+ -+ /* save the substream data */ -+ playback->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&playback->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ playback->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ playback->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Initialize record data -+ * -+ * \param[out] record_data Pointer to store record data -+ * \param[in] eqz_flag Flag to indicate equalizer usage -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize record data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_init(struct snd_adsp_record **record_data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_record *record; -+ -+ /* allocate memory for record data */ -+ record = kmalloc(sizeof(*record), GFP_KERNEL); -+ if (!record) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(record, 0, sizeof(struct snd_adsp_record)); -+ -+ /* save the record data */ -+ *record_data = record; -+ -+ /* set handle state as NULL state */ -+ record->cap_state = XF_HANDLE_NULL; -+ record->eqz_state = XF_HANDLE_NULL; -+ record->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register capture component */ -+ if (xf_adsp_capture_create(&record->capture, -+ &cap_callbacks, -+ (void *)&record->base) < 0) -+ return -EINVAL; -+ -+ /* mark capture component created */ -+ record->cap_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as capture ID */ -+ record->base.handle_id = record->capture->handle_id; -+ -+ /* create equalizer component in case of it being used */ -+ if (eqz_flag == EQZ_ON) { -+ if (xf_adsp_equalizer_create(&record->equalizer, -+ &cap_callbacks, -+ (void *)&record->base) < 0) -+ return -EINVAL; -+ -+ /* mark equalizer component created */ -+ record->eqz_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as equalizer ID */ -+ record->base.handle_id = record->equalizer->handle_id; -+ } -+ -+ /* init lock */ -+ spin_lock_init(&record->base.lock); -+ -+ /* save the substream data */ -+ record->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&record->base.hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ record->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ record->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare playback function -+ * -+ * \param[out] playback Pointer to playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, hw_buffer_size; -+ int out_rate; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_renderer *renderer; -+ struct xf_adsp_equalizer *equalizer; -+ struct snd_adsp_base_info *base; -+ int i; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ renderer = playback->renderer; -+ equalizer = playback->equalizer; -+ base = &playback->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ ch = runtime->channels; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ vol_rate = ctr_if->vol_rate[DIRECT_PLAYBACK][dai_idx]; -+ out_rate = ctr_if->sample_rate[DIRECT_PLAYBACK][dai_idx]; -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = (base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* it should equal to a period size in bytes */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes; -+ -+ /* set parameters when Renderer is not ready */ -+ if (COMPONENT_IS_READY(playback->rdr_state) == FALSE) { -+ struct xf_adsp_renderer_params *params = &renderer->params; -+ -+ /* apply renderer parameters */ -+ params->in_rate = fs; -+ params->channel = ch; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ if (ctr_if->mix_usage == SECOND_RUN) -+ params->mix_ctrl = ctr_if->mix_usage; -+ else -+ params->mix_ctrl = MIX_UNUSED; -+ -+ /* set flow as ADSP->PDMA0->SRC0->PDMA1->SSI0 */ -+ params->dev1 = SRC0; -+ params->dev2 = SSI00; -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ -+ /* when MIX is enabled, change to DMAC transfer type to save */ -+ /* hw FIFO */ -+ if (MIX_ENABLED(params->mix_ctrl) == TRUE) -+ params->dma1 = ADMAC_CH01; -+ -+ /* set volume rate if it is set by user or default value */ -+ /* is 100% */ -+ if (vol_rate >= 0) -+ params->vol_rate = vol_rate; -+ else -+ params->vol_rate = (1 << 20); -+ -+ /* set output channel if it is set by user */ -+ if (ctr_if->rdr_out_ch[dai_idx] >= MONAURAL) -+ params->out_channel = ctr_if->rdr_out_ch[dai_idx]; -+ else -+ params->out_channel = params->channel; -+ -+ /* set sample rate output if it is set by user */ -+ if (out_rate >= 0) -+ params->out_rate = out_rate; -+ -+ /* set parameters to ADSP Renderer plugin */ -+ if (xf_adsp_renderer_set_params(renderer) != 0) -+ return -EINVAL; -+ -+ /* allocate buffer pool to prepare the execution */ -+ renderer->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(renderer->buf_pool)) /* PRQA S 306*/ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ renderer->buf_pool, i); -+ -+ base->buf_queue++; -+ memset(base->buffer[i], 0, base->buf_bytes); -+ } -+ -+ /* mark Renderer ready */ -+ playback->rdr_state |= XF_HANDLE_READY; -+ -+ /* set parameters for Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { -+ /* apply Equalizer parameter setting */ -+ equalizer->params.channel = ch; -+ equalizer->params.pcm_width = pcm_width; -+ equalizer->params.rate = fs; -+ -+ /* get equalizer parameters from control interface */ -+ /* data */ -+ snd_adsp_get_eqz_params_from_control( -+ &equalizer->params, -+ &ctr_if->eqz_params[DIRECT_PLAYBACK][dai_idx], -+ true); -+ -+ /* set parameters to Equalizer plugin */ -+ if (xf_adsp_equalizer_set_params(equalizer) != 0) -+ return -EINVAL; -+ -+ /* route Equalizer to Renderer */ -+ if (xf_adsp_route(equalizer->handle_id, -+ renderer->handle_id, -+ XF_BUF_POOL_SIZE, -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ /* mark Equalizer ready */ -+ playback->eqz_state |= XF_HANDLE_READY; -+ -+ /* prepare data before start PCM */ -+ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ /* send buffer to plugin to kick */ -+ /* init-processing */ -+ if (xf_adsp_empty_this_buffer( -+ base->handle_id, -+ base->buffer[i], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ } else { -+ /* send zero buffer to plugin to kick */ -+ /* init-processing */ -+ if (xf_adsp_empty_this_buffer(base->handle_id, -+ base->buffer[0], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ /* wait until all the buffer have been consummed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset HW index */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare record function -+ * -+ * \param[out] record Pointer to record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_prepare(struct snd_adsp_record *record, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, in_rate; -+ int hw_buffer_size, hw_queue_size; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_capture *capture; -+ struct xf_adsp_equalizer *equalizer; -+ struct snd_adsp_base_info *base; -+ int i; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ capture = record->capture; -+ equalizer = record->equalizer; -+ base = &record->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ ch = runtime->channels; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ vol_rate = ctr_if->vol_rate[DIRECT_CAPTURE][dai_idx]; -+ in_rate = ctr_if->sample_rate[DIRECT_CAPTURE][dai_idx]; -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* total size of allocated buffers */ -+ hw_queue_size = base->period_bytes * XF_BUF_POOL_SIZE; -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ base->pcm_indirect.hw_queue_size = hw_queue_size; -+ -+ /* prepare parameters to set to Capture plugin when it is not yet */ -+ /* ready */ -+ if (COMPONENT_IS_READY(record->cap_state) == FALSE) { -+ struct xf_adsp_capture_params *params = &capture->params; -+ -+ /* apply capture parameters */ -+ params->out_rate = fs; -+ params->channel = ch; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ params->dev1 = SRC0; -+ params->dev2 = SSI10; -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ -+ /* set volume rate if it is set by user or default volume as */ -+ /* 100% */ -+ if (vol_rate >= 0) -+ params->vol_rate = vol_rate; -+ else -+ params->vol_rate = (1 << 20); -+ -+ /* set sample rate input if it is set by user */ -+ if (in_rate >= 0) -+ params->in_rate = in_rate; -+ -+ /* allocate buffer pool to prepare the execution */ -+ capture->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(capture->buf_pool)) /* PRQA S 306 */ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ capture->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* set parameters to ADSP Capture plugin */ -+ if (xf_adsp_capture_set_params(capture) != 0) -+ return -EINVAL; -+ -+ /* mark Capture ready */ -+ record->cap_state |= XF_HANDLE_READY; -+ -+ /* set parameters for Equalizer if it's used */ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ /* apply Equalizer parameter setting */ -+ equalizer->params.channel = ch; -+ equalizer->params.pcm_width = pcm_width; -+ equalizer->params.rate = fs; -+ -+ /* get equalizer parameter from control interface */ -+ /* data */ -+ snd_adsp_get_eqz_params_from_control( -+ &equalizer->params, -+ &ctr_if->eqz_params[DIRECT_CAPTURE][dai_idx], -+ true); -+ -+ /* set parameters to Equalizer plugin */ -+ if (xf_adsp_equalizer_set_params(equalizer) != 0) -+ return -EINVAL; -+ -+ /* route Capture to Equalizer */ -+ if (xf_adsp_route(capture->handle_id, -+ equalizer->handle_id, -+ XF_BUF_POOL_SIZE, -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ /* mark Equalizer ready */ -+ record->eqz_state |= XF_HANDLE_READY; -+ } -+ -+ /* kick init process by sending a zero buffer length */ -+ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until finishing initialization */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ /* send buffer to plugin */ -+ if (xf_adsp_fill_this_buffer( -+ base->handle_id, -+ base->buffer[i], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ /* wait until all the buffer have been responsed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ } -+ -+ /* reset hw data position */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize playback function -+ * -+ * \param[out] playback Pointer to playback data -+ * \retval -EINVAL Failed to deinitialize playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if playback has been created already */ -+ if (playback) { -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(playback->rdr_state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process *//* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(playback->base.handle_id, -+ NULL, 0); -+ -+ /* free buffer pool */ /* PRQA S 3200 1 */ -+ xf_adsp_free_mem_pool(playback->renderer->buf_pool); -+ -+ /* destroy Renderer */ -+ if (xf_adsp_renderer_destroy(playback->renderer) != 0) -+ ret = -EINVAL; -+ -+ playback->renderer = NULL; -+ } -+ -+ /* destroy Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { -+ if (xf_adsp_equalizer_destroy(playback->equalizer)) -+ ret = -EINVAL; -+ -+ playback->equalizer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(playback->base.hrt_state) == TRUE) -+ hrtimer_cancel(&playback->base.hrtimer); -+ -+ /* free playback data */ -+ kfree(playback); -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize record function -+ * -+ * \param[out] record Pointer to record data -+ * \retval -EINVAL Failed to deinitialize record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_deinit(struct snd_adsp_record *record) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if record has been created already */ -+ if (!record) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(record->cap_state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process *//* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(record->base.handle_id, NULL, 0); -+ -+ /* free buffer pool */ /* PRQA S 3200 1 */ -+ xf_adsp_free_mem_pool(record->capture->buf_pool); -+ -+ if (xf_adsp_capture_destroy(record->capture)) -+ ret = -EINVAL; -+ -+ record->capture = NULL; -+ } -+ -+ /* destroy Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ if (xf_adsp_equalizer_destroy(record->equalizer) != 0) -+ ret = -EINVAL; -+ -+ record->equalizer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(record->base.hrt_state) == TRUE) -+ hrtimer_cancel(&record->base.hrtimer); -+ -+ /* free record data */ -+ kfree(record); -+ -+ return ret; -+} -+ -+/***************************************************************************** -+ * internal functions to manage TDM playback and TDM record functions -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Initialize TDM playback data -+ * -+ * \param[out] tdm_playback_data Pointer to store TDM playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize TDM playback data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **tdm_playback_data, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_tdm_playback *tdm_playback; -+ -+ /* allocate memory for TDM playback data */ -+ tdm_playback = kmalloc(sizeof(*tdm_playback), GFP_KERNEL); -+ -+ if (!tdm_playback) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(tdm_playback, 0, sizeof(struct snd_adsp_tdm_playback)); -+ -+ /* save the TDM playback data */ -+ *tdm_playback_data = tdm_playback; -+ -+ /* set handle state as NULL state */ -+ tdm_playback->state = XF_HANDLE_NULL; -+ tdm_playback->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register TDM renderer component */ -+ if (xf_adsp_tdm_renderer_create(&tdm_playback->tdm_renderer, -+ &rdr_callbacks, -+ (void *)&tdm_playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark TDM renderer component created */ -+ tdm_playback->state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as TDM renderer ID */ -+ tdm_playback->base.handle_id = tdm_playback->tdm_renderer->handle_id; -+ -+ /* init lock */ -+ spin_lock_init(&tdm_playback->base.lock); -+ -+ /* save the substream data */ -+ tdm_playback->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&tdm_playback->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ tdm_playback->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ tdm_playback->base.hrt_state = XF_HANDLE_CREATED; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Initialize TDM record data -+ * -+ * \param[out] tdm_record_data Pointer to store TDM record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize TDM record data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **tdm_record_data, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_tdm_record *tdm_record; -+ -+ /* allocate memory for TDM record data */ -+ tdm_record = kmalloc(sizeof(*tdm_record), GFP_KERNEL); -+ if (!tdm_record) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(tdm_record, 0, sizeof(struct snd_adsp_tdm_record)); -+ -+ /* save the TDM record data */ -+ *tdm_record_data = tdm_record; -+ -+ /* set handle state as NULL state */ -+ tdm_record->state = XF_HANDLE_NULL; -+ tdm_record->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register TDM Capture component */ -+ if (xf_adsp_tdm_capture_create(&tdm_record->tdm_capture, -+ &cap_callbacks, -+ (void *)&tdm_record->base) != 0) -+ return -EINVAL; -+ -+ /* mark TDM capture component created */ -+ tdm_record->state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as TDM capture ID */ -+ tdm_record->base.handle_id = tdm_record->tdm_capture->handle_id; -+ -+ /* init lock */ -+ spin_lock_init(&tdm_record->base.lock); -+ -+ /* save the substream data */ -+ tdm_record->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&tdm_record->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ tdm_record->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ tdm_record->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare TDM playback function -+ * -+ * \param[out] tdm_playback Pointer to TDM playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare TDM playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_tdm_renderer *tdm_renderer; -+ struct snd_adsp_base_info *base; -+ int i; -+ int pcm_width, ch_mode, fs, frame_size, hw_buffer_size; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ tdm_renderer = tdm_playback->tdm_renderer; -+ base = &tdm_playback->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ -+ ch_mode = (runtime->channels == 8) ? -+ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; -+ -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* it should equal to a period size in bytes */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes; -+ -+ /* prepare parameters to set to TDM playback as it is not ready */ -+ if (COMPONENT_IS_READY(tdm_playback->state) == FALSE) { -+ struct xf_adsp_tdm_renderer_params *params; -+ -+ params = &tdm_renderer->params; -+ -+ /* apply renderer parameters */ -+ params->in_rate = fs; -+ params->ch_mode = ch_mode; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ /* setting Audio device indexes */ -+ params->dma1 = ADMAC_CH00; /* use DMAC for transfer data */ -+ params->dma2 = PDMA_CH03; -+ params->dev1 = SRC1; -+ params->dev2 = SSI30; /* set SSI index to SSI30 */ -+ -+ /* set volume rate if it is set by user or default value as */ -+ /* 100% */ -+ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] >= 0) -+ ? ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] : (1 << 20); -+ -+ /* set output sampling rate if it is set by user */ -+ if (ctr_if->tdm_sample_rate[DIRECT_PLAYBACK] >= 0) -+ params->out_rate = -+ ctr_if->tdm_sample_rate[DIRECT_PLAYBACK]; -+ -+ /* set parameters to ADSP TDM Renderer plugin */ -+ if (xf_adsp_tdm_renderer_set_params(tdm_renderer) != 0) -+ return -EINVAL; -+ -+ /* allocate buffer pool to prepare the execution */ -+ tdm_renderer->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(tdm_renderer->buf_pool)) /* PRQA S 306*/ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ tdm_renderer->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* mark TDM Renderer created */ -+ tdm_playback->state |= XF_HANDLE_READY; -+ -+ /* send zero buffer to plugin to kick init-processing */ -+ memset(base->buffer[0], 0, base->buf_bytes); -+ -+ if (xf_adsp_empty_this_buffer(base->handle_id, base->buffer[0], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until all the buffer have been consummed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset HW index */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare TDM record function -+ * -+ * \param[out] tdm_record Pointer to TDM record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare TDM record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card = -+ snd_adsp_get_drvdata_from_substream(substream); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ struct snd_pcm_runtime *runtime = substream->runtime; -+ struct xf_adsp_tdm_capture *tdm_capture = tdm_record->tdm_capture; -+ struct snd_adsp_base_info *base = &tdm_record->base; -+ int i; -+ int pcm_width, ch_mode, fs, frame_size; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ -+ ch_mode = (runtime->channels == 8) ? -+ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; -+ -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ base->buf_bytes = (pcm_width == 16) ? -+ base->period_bytes : ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / -+ BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* total size of allocated buffers */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes * -+ XF_BUF_POOL_SIZE; -+ -+ /* prepare parameters to set to TDM Capture as it is not yet ready */ -+ if (COMPONENT_IS_READY(tdm_record->state) == FALSE) { -+ struct xf_adsp_tdm_capture_params *params; -+ -+ params = &tdm_capture->params; -+ -+ /* apply capture parameters */ -+ params->out_rate = fs; -+ params->ch_mode = ch_mode; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ /* setting Audio device indexes */ -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ params->dev1 = SRC0; -+ params->dev2 = SSI40; /* set input device is SSI40 */ -+ -+ /* set volume rate if it is set by user or default value as */ -+ /* 100% */ -+ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_CAPTURE] >= 0) -+ ? ctr_if->tdm_vol_rate[DIRECT_CAPTURE] : (1 << 20); -+ -+ /* set input rate if it is set by user */ -+ if (ctr_if->tdm_sample_rate[DIRECT_CAPTURE] >= 0) { -+ params->in_rate = -+ ctr_if->tdm_sample_rate[DIRECT_CAPTURE]; -+ } -+ -+ /* allocate buffer pool to prepare the execution */ -+ tdm_capture->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(tdm_capture->buf_pool)) /* PRQA S 306 */ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ tdm_capture->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* set parameters to ADSP TDM Capture plugin */ -+ if (xf_adsp_tdm_capture_set_params(tdm_capture) != 0) -+ return -EINVAL; -+ -+ /* mark TDM Capture ready */ -+ tdm_record->state |= XF_HANDLE_READY; -+ -+ /* kick init process by sending a zero buffer length */ -+ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until finishing initialization */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset hw data position */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize TDM playback function -+ * -+ * \param[out] tdm_playback Pointer to TDM playback data -+ * \retval -EINVAL Failed to deinitialize TDM playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if TDM playback has been created */ -+ if (!tdm_playback) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(tdm_playback->state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process */ -+ /* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(tdm_playback->base.handle_id, -+ NULL, 0); -+ -+ /* free buffer pool *//* PRQA S 3200 2 */ -+ xf_adsp_free_mem_pool(tdm_playback->tdm_renderer->buf_pool); -+ -+ /* destroy TDM Renderer component */ -+ if (xf_adsp_tdm_renderer_destroy( -+ tdm_playback->tdm_renderer) != 0) -+ ret = -EINVAL; -+ -+ tdm_playback->tdm_renderer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(tdm_playback->base.hrt_state) == TRUE) -+ hrtimer_cancel(&tdm_playback->base.hrtimer); -+ -+ /* free playback data */ -+ kfree(tdm_playback); -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize TDM record function -+ * -+ * \param[out] tdm_record Pointer to TDM record data -+ * \retval -EINVAL Failed to deinitialize TDM record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if TDM record has been created already */ -+ if (!tdm_record) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(tdm_record->state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process */ -+ /* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(tdm_record->base.handle_id, NULL, 0); -+ -+ /* free buffer pool *//* PRQA S 3200 2 */ -+ xf_adsp_free_mem_pool(tdm_record->tdm_capture->buf_pool); -+ -+ /* destroy TDM Capture component */ -+ if (xf_adsp_tdm_capture_destroy(tdm_record->tdm_capture) != 0) -+ ret = -EINVAL; -+ -+ tdm_record->tdm_capture = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(tdm_record->base.hrt_state) == TRUE) -+ hrtimer_cancel(&tdm_record->base.hrtimer); -+ -+ /* free record data */ -+ kfree(tdm_record); -+ -+ return ret; -+} -+ -+/***************************************************************************** -+ * callback functions of ADSP ALSA driver -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Open a playback/TDM playback or record/TDM record stream -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_open(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ struct snd_adsp_control *ctr_if; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ /* register data for playback/record functions */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* perform playback initialization */ -+ if (snd_adsp_playback_init( -+ &adsp_card->playback[dai_idx], -+ ctr_if->eqz_switch[DIRECT_PLAYBACK][dai_idx], -+ substream) < 0) { -+ /* perform playback de-initialization when */ -+ /* the initialization fails */ -+ snd_adsp_playback_deinit( -+ adsp_card->playback[dai_idx]); -+ -+ adsp_card->playback[dai_idx] = NULL; -+ return -EINVAL; -+ } -+ } else { -+ /* perform record initialization */ -+ if (snd_adsp_record_init( -+ &adsp_card->record[dai_idx], -+ ctr_if->eqz_switch[DIRECT_CAPTURE][dai_idx], -+ substream) < 0) { -+ /* perform record de-initialization when the */ -+ /* initialization fails */ -+ snd_adsp_record_deinit( -+ adsp_card->record[dai_idx]); -+ -+ adsp_card->record[dai_idx] = NULL; -+ return -EINVAL; -+ } -+ } -+ -+ /* save the hardware parameters */ -+ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_hw); -+ -+ /* each period has a frame size */ -+ snd_pcm_hw_constraint_single(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -+ FRAME_SIZE); -+ } else { -+ /* register data for TDM playback/record functions */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* perform TDM playback initialization */ -+ if (snd_adsp_tdm_playback_init( -+ &adsp_card->tdm_playback, -+ substream) < 0) { -+ /* perform TDM playback de-initialization */ -+ /* when the initialization fails */ -+ snd_adsp_tdm_playback_deinit( -+ adsp_card->tdm_playback); -+ -+ adsp_card->tdm_playback = NULL; -+ return -EINVAL; -+ } -+ } else { -+ /* perform TDM record initialization */ -+ if (snd_adsp_tdm_record_init(&adsp_card->tdm_record, -+ substream) < 0) { -+ /* perform TDM record de-initialization */ -+ /* when the initialization fails */ -+ snd_adsp_tdm_record_deinit( -+ adsp_card->tdm_record); -+ -+ adsp_card->tdm_record = NULL; -+ return -EINVAL; -+ } -+ } -+ -+ /* save the hardware parameters */ -+ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_tdm_hw); -+ -+ /* each period has a frame size */ -+ snd_pcm_hw_constraint_single(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -+ TDM_FRAME_SIZE); -+ } -+ -+ snd_pcm_hw_constraint_integer(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIODS); -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Close a playback/TDM playback or record/TDM record stream -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_close(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card *adsp_card = -+ snd_adsp_get_drvdata_from_substream(substream); -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ int err = 0; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ /* destroy Renderer/Capture or Equalizer (if used) */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ if (snd_adsp_playback_deinit( -+ adsp_card->playback[dai_idx]) < 0) -+ err = -EINVAL; -+ -+ adsp_card->playback[dai_idx] = NULL; -+ } else { -+ if (snd_adsp_record_deinit( -+ adsp_card->record[dai_idx]) < 0) -+ err = -EINVAL; -+ -+ adsp_card->record[dai_idx] = NULL; -+ } -+ } else { -+ /* destroy TDM Renderer/TDM Capture */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ if (snd_adsp_tdm_playback_deinit( -+ adsp_card->tdm_playback) < 0) -+ err = -EINVAL; -+ -+ adsp_card->tdm_playback = NULL; -+ } else { -+ if (snd_adsp_tdm_record_deinit( -+ adsp_card->tdm_record) < 0) -+ err = -EINVAL; -+ -+ adsp_card->tdm_record = NULL; -+ } -+ } -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Allocate ALSA buffer and calculate expire time of hr timer -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -ENOMEM Cannot allocate ALSA buffer -+ *****************************************************************************/ -+static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *hw_params) -+{ -+ struct snd_adsp_base_info *base; -+ int err = 0; -+ -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ /* set expire time of hrtimer, this value should be time for */ -+ /* transfer a frame */ -+ base->ktime = ns_to_ktime((1000000000 / params_rate(hw_params)) * -+ params_period_size(hw_params)); -+ -+ err = snd_pcm_lib_malloc_pages(substream, -+ params_buffer_bytes(hw_params)); -+ -+ /* reset DMA buffer area */ -+ memset(substream->runtime->dma_area, 0, substream->runtime->dma_bytes); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Free the allocated ALSA buffer -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Cannot deallocate buffer -+ *****************************************************************************/ -+static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream) -+{ -+ return snd_pcm_lib_free_pages(substream); -+} -+ -+/** ************************************************************************** -+ * \brief Prepare playback/TDM playback or record/TDM record function -+ * before transferring data -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card * -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ int err = 0; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ /* get playback prepared to execute */ -+ err = snd_adsp_playback_prepare( -+ adsp_card->playback[dai_idx], substream); -+ else -+ /* get record prepared to execute */ -+ err = snd_adsp_record_prepare( -+ adsp_card->record[dai_idx], substream); -+ } else { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ /* get TDM playback prepared to execute */ -+ err = snd_adsp_tdm_playback_prepare( -+ adsp_card->tdm_playback, substream); -+ else -+ /* get TDM record prepared to execute */ -+ err = snd_adsp_tdm_record_prepare( -+ adsp_card->tdm_record, substream); -+ } -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Trigger playback/TDM playback or record/TDM record stream -+ * to go to next phase -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ switch (idx) { -+ case SNDRV_PCM_TRIGGER_START: -+ case SNDRV_PCM_TRIGGER_RESUME: -+ /* start high-resolution timer */ -+ hrtimer_start(&base->hrtimer, base->ktime, HRTIMER_MODE_REL); -+ -+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { -+ int buf_queue = 0; -+ -+ /* get current available buffer */ -+ spin_lock_irqsave(&base->lock, base->flag); -+ buf_queue = base->buf_queue; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* send all available buffer to plugin to */ -+ /* get data */ -+ for (; buf_queue > 0; buf_queue--) { -+ if (xf_adsp_fill_this_buffer( -+ base->handle_id, -+ base->buffer[base->buf_idx], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ base->buf_idx++; -+ -+ if (base->buf_idx >= XF_BUF_POOL_SIZE) -+ base->buf_idx = 0; -+ } -+ } -+ break; -+ case SNDRV_PCM_TRIGGER_STOP: -+ case SNDRV_PCM_TRIGGER_SUSPEND: -+ break; -+ default: -+ return -EINVAL; -+ } -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Return HW data position -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval position HW data position -+ *****************************************************************************/ -+static snd_pcm_uframes_t -+snd_adsp_pcm_pointer(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ unsigned int hw_idx, hw_buffer_size; -+ snd_pcm_uframes_t pointer; -+ -+ /* convert hw index to correct as submitted bytes */ -+ spin_lock_irqsave(&base->lock, base->flag); -+ hw_idx = (base->hw_idx / base->buf_bytes) * base->period_bytes; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ hw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ if (hw_idx >= hw_buffer_size) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->hw_idx -= (hw_buffer_size / base->period_bytes) * -+ base->buf_bytes; -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ pointer = snd_pcm_indirect_playback_pointer(substream, -+ &base->pcm_indirect, -+ hw_idx); -+ else -+ pointer = snd_pcm_indirect_capture_pointer(substream, -+ &base->pcm_indirect, -+ hw_idx); -+ -+ return pointer; -+} -+ -+/** ************************************************************************** -+ * \brief Call read/write process to transfer data -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ if (base->runtime_err) -+ return -EINVAL; -+ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ snd_pcm_indirect_playback_transfer(substream, -+ &base->pcm_indirect, -+ snd_adsp_pcm_transfer); -+ else -+ snd_pcm_indirect_capture_transfer(substream, -+ &base->pcm_indirect, -+ snd_adsp_pcm_transfer); -+ -+ return 0; -+} -+ -+/** *************************************************************************** -+ * \brief Copy data from source buffer to destination buffer -+ * -+ * \params[in] dst Destination buffer pointer -+ * \params[out] src Source buffer pointer -+ * \params[in] dst_size Destination buffer size in byte -+ * \params[in] src_size Source buffer size in byte -+ * \retval None -+ *****************************************************************************/ -+static inline void -+snd_adsp_copy_data(void *dst, void *src, int dst_size, int src_size) -+{ -+ unsigned char *data_dst = dst; -+ unsigned char *data_src = src; -+ int i; -+ -+ if (dst_size == src_size) { -+ /* src and dst bufs are same size, does not need to convert */ -+ memcpy(data_dst, data_src, dst_size); -+ -+ } else if (dst_size < src_size) { -+ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_3LE)); -+ i += BYTES_PER_SAMPLE(S24_3LE)) { -+ *(u32 *)data_dst = *(u32 *)data_src; -+ -+ data_dst += BYTES_PER_SAMPLE(S24_3LE); -+ data_src += BYTES_PER_SAMPLE(S24_LE); -+ } -+ -+ /* copy a S24_3LE sample from S24_LE sample */ -+ data_dst[0] = data_src[0]; -+ data_dst[1] = data_src[1]; -+ data_dst[2] = data_src[2]; -+ -+ } else { -+ unsigned int tmp; -+ -+ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_LE)); -+ i += BYTES_PER_SAMPLE(S24_LE)) { -+ tmp = *(u32 *)data_src; -+ *(u32 *)data_dst = tmp & 0x0FFFFFF; -+ -+ data_dst += BYTES_PER_SAMPLE(S24_LE); -+ data_src += BYTES_PER_SAMPLE(S24_3LE); -+ } -+ -+ /* copy a S24_LE sample from S24_3LE sample */ -+ data_dst[0] = data_src[0]; -+ data_dst[1] = data_src[1]; -+ data_dst[2] = data_src[2]; -+ data_dst[3] = 0; -+ } -+} -+ -+/** ************************************************************************** -+ * \brief Transfer data process between ALSA buffer and ADSP buffer -+ * -+ * \param[in] substream Pointer to substream object -+ * \param[in] rec Pointer to indirect PCM data -+ * \param[in] bytes Number of byte need to be transferred -+ * \retval None -+ *****************************************************************************/ -+static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, -+ struct snd_pcm_indirect *rec, -+ size_t bytes) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ int direct = substream->stream; -+ int trans_bytes = bytes; -+ int buf_bytes, period_bytes; -+ void *dma_buf, *data_buff; -+ -+ /* get the DMA buffer pointer */ -+ dma_buf = (void *)(substream->runtime->dma_area + rec->sw_data); -+ -+ /* get information from base */ -+ buf_bytes = base->buf_bytes; -+ period_bytes = base->period_bytes; -+ -+ /* make sure the available buffer and transfer size - TBD */ -+ while (trans_bytes > 0) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ if (base->buf_queue > 0 && trans_bytes >= period_bytes) { -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* get the buffer pointer from stream */ -+ data_buff = base->buffer[base->buf_idx]; -+ -+ if (direct == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* copy data from user *//* PRQA S 3200 2 */ -+ snd_adsp_copy_data(data_buff, dma_buf, -+ buf_bytes, period_bytes); -+ -+ /* send buffer to plugin */ -+ if (xf_adsp_empty_this_buffer(base->handle_id, -+ data_buff, -+ buf_bytes) < 0) -+ base->runtime_err = TRUE; -+ } else { -+ /* copy data to user *//* PRQA S 3200 2 */ -+ snd_adsp_copy_data(dma_buf, data_buff, -+ period_bytes, buf_bytes); -+ -+ /* send buffer to plugin */ -+ if (xf_adsp_fill_this_buffer(base->handle_id, -+ data_buff, -+ buf_bytes) < 0) -+ base->runtime_err = TRUE; -+ } -+ -+ base->buf_idx++; -+ if (base->buf_idx >= XF_BUF_POOL_SIZE) -+ base->buf_idx = 0; -+ } else { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ break; -+ } -+ -+ trans_bytes -= period_bytes; -+ } -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Volume control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of volume control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 799; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get volume value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to volume value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ int handle_state, handle_id; -+ int volume, cmd_idx, direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine command index, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* get the volume's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get the volume's value from the plugin */ -+ if (xf_adsp_get_param(handle_id, cmd_idx, &volume) != 0) -+ return -EINVAL; -+ -+ /* check the value after getting it and adjust it */ -+ ucontrol->value.integer.value[0] = (volume == 0xFFFFFFFF) ? -+ (-1) : (volume * VOLUME_SCALE) >> 20; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ ucontrol->value.integer.value[0] = -+ (ctr_if->vol_rate[direction][index] * -+ VOLUME_SCALE) >> 20; -+ else -+ ucontrol->value.integer.value[0] = -+ (ctr_if->tdm_vol_rate[direction] * -+ VOLUME_SCALE) >> 20; -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set volume value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to volume value -+ * \retval 1 Volume change -+ * \retval 0 Volume does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1*/ -+static int -+snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ int volume; -+ int ret; -+ int handle_state, handle_id, cmd_idx, volume_get; -+ int direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state and handle ID */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* get the value to set */ -+ if (ucontrol->value.integer.value[0] == -1) { -+ volume = 0xFFFFFFFF; -+ } else { -+ /* round up the value if needed */ -+ volume = (ucontrol->value.integer.value[0] * (1 << 20)) / -+ VOLUME_SCALE; -+ -+ if ((ucontrol->value.integer.value[0] * (1 << 20)) > -+ (VOLUME_SCALE * volume)) -+ volume += 1; -+ } -+ -+ /* determine command index, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* set volume to plugin */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* TDM does not support set volume in runtime state */ -+ if (kcontrol->id.name[0] == PREFIX_OF_TDM_CTR_NAME) -+ return -EINVAL; -+ -+ /* apply set volume value to ADSP from user setting */ -+ if (xf_adsp_set_param(handle_id, cmd_idx, volume) != 0) -+ return -EINVAL; -+ -+ /* get volume from ADSP after setting to confirm */ -+ if (xf_adsp_get_param(handle_id, cmd_idx, &volume_get) != 0) -+ return -EINVAL; -+ -+ /* check if the value has changed */ -+ ret = (volume_get == volume) ? 1 : 0; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ ctr_if->vol_rate[direction][index] = volume; -+ else -+ ctr_if->tdm_vol_rate[direction] = volume; -+ -+ ret = 1; -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Sample Rate Converter control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of sample rate -+ * converter control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 48000; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get sample rate value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to sample rate value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int *rate; -+ int handle_id, handle_state, cmd_idx, direction; -+ unsigned int index; -+ -+ rate = (int *)&ucontrol->value.integer.value[0]; /* PRQA S 310 */ -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state and handle ID */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine command, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* get parameter from plugin */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ if (xf_adsp_get_param(handle_id, cmd_idx, rate) != 0) -+ return -EINVAL; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ *rate = adsp_card->ctr_if.sample_rate[direction][index]; -+ else -+ *rate = adsp_card->ctr_if.tdm_sample_rate[direction]; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set sample rate value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to sample rate value -+ * \retval 1 Sample rate change -+ * \retval 0 Sample rate does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1 */ -+static int -+snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ unsigned int index; -+ int rate; -+ int handle_state, cmd_idx, direction; -+ int ret = 1; -+ -+ rate = (int)ucontrol->value.integer.value[0]; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine command, direction and handle state */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) -+ handle_state = adsp_card->tdm_playback->state; -+ -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) -+ handle_state = adsp_card->tdm_record->state; -+ } -+ } -+ -+ /* get the value to set */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ return -EINVAL; -+ -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ adsp_card->ctr_if.sample_rate[direction][index] = rate; -+ else -+ adsp_card->ctr_if.tdm_sample_rate[direction] = rate; -+ -+ ret = 1; -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Equalizer control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Equalizer control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = MAX_EQZ_PARAM_NUMBER; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 0x7fffffff; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get equalizer parameters value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer parameters value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int handle_state, direction; -+ int i, j, filter_index; -+ unsigned int index; -+ struct xf_adsp_equalizer *equalizer; -+ struct xf_adsp_equalizer_params *eqz_params; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determin direction of stream */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state, handle ID, equalizer pointer */ -+ handle_state = XF_HANDLE_NULL; -+ equalizer = NULL; -+ -+ /* get component's state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->eqz_state; -+ equalizer = adsp_card->playback[index]->equalizer; -+ } -+ } else { -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->eqz_state; -+ equalizer = adsp_card->record[index]->equalizer; -+ } -+ } -+ -+ /* perform parameters' values getting */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get equalizer's parameters */ -+ if (xf_adsp_equalizer_get_params(equalizer) != 0) -+ return -EINVAL; -+ -+ eqz_params = &equalizer->params; -+ } else { -+ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; -+ } -+ -+ /* get equalizer type: PARAMETRIC or GRAPHIC */ -+ ucontrol->value.integer.value[0] = eqz_params->eqz_type; -+ -+ /* get parameters' value from Equalizer plugin */ -+ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ for (i = 0, filter_index = 1; -+ filter_index <= XA_REL_EQZ_FILTER_NUM; -+ i++, filter_index++) { -+ /* get filter index */ -+ ucontrol->value.integer.value[(i * 6) + 1] = -+ filter_index; -+ -+ /* get frequency centre */ -+ ucontrol->value.integer.value[(i * 6) + 2] = -+ eqz_params->p_coef.fc[i]; -+ -+ /* get bandwidth */ -+ ucontrol->value.integer.value[(i * 6) + 3] = -+ eqz_params->p_coef.band_width[i]; -+ -+ /* get filter type */ -+ ucontrol->value.integer.value[(i * 6) + 4] = -+ eqz_params->p_coef.type[i]; -+ -+ /* get gain base */ -+ ucontrol->value.integer.value[(i * 6) + 5] = -+ eqz_params->p_coef.gain_base[i]; -+ -+ /* get gain */ -+ ucontrol->value.integer.value[(i * 6) + 6] = -+ eqz_params->p_coef.gain[i]; -+ } -+ } else { -+ for (i = 0, filter_index = 1; -+ filter_index <= XA_REL_EQZ_GRAPHIC_BAND_NUM; -+ i++, filter_index++) { -+ /* get band index */ -+ ucontrol->value.integer.value[(i * 2) + 1] = -+ filter_index; -+ -+ /* get graphic gain */ -+ ucontrol->value.integer.value[(i * 2) + 2] = -+ eqz_params->g_coef.gain_g[i]; -+ } -+ -+ j = (i * 2) + 1; -+ -+ /* make the rest of values silent */ -+ while (j < MAX_EQZ_PARAM_NUMBER) { -+ ucontrol->value.integer.value[j] = -1; -+ j++; -+ } -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set equalizer parameters value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer parameters value -+ * \retval 1 Equalizer parameters change -+ * \retval 0 Equalizer parameters does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1*/ -+static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int handle_state, direction, filter_idx; -+ int i; -+ int index; -+ struct xf_adsp_equalizer_params *eqz_params = NULL; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* get the handle state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->eqz_state; -+ } else { -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->eqz_state; -+ } -+ -+ /* perform equalizer's parameters setting */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ return -EINVAL; -+ -+ /* PRQA S 310 1*/ -+ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; -+ -+ i = 0; -+ /* PRQA S 3440 1*/ -+ eqz_params->eqz_type = ucontrol->value.integer.value[i]; -+ i++; -+ filter_idx = 0; -+ -+ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ while (i < MAX_EQZ_PARAM_NUMBER) { -+ /* get index filter */ -+ /* PRQA S 3440*/ -+ filter_idx = ucontrol->value.integer.value[i]; -+ i++; -+ -+ /* valid index filter is range */ -+ /* (1 to XA_REL_EQZ_FILTER_NUM) */ -+ if (filter_idx >= 1 && -+ filter_idx <= XA_REL_EQZ_FILTER_NUM) { -+ /* PRQA S 3440 5*/ -+ eqz_params->p_coef.fc[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.band_width[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.type[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.gain_base[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.gain[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ } -+ /* index filter = -1 means that user */ -+ /* does not set this filter */ -+ else if (filter_idx == -1 || filter_idx == 0) { -+ i += 5; -+ } else { -+ return -EINVAL; -+ } -+ } -+ } else if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_GRAPHIC) { -+ while (i < ((XA_REL_EQZ_GRAPHIC_BAND_NUM * 2) + 1)) { -+ /*get index filter */ -+ /* PRQA S 3440 */ -+ filter_idx = ucontrol->value.integer.value[i++]; -+ -+ if (filter_idx >= 1 && -+ filter_idx <= XA_REL_EQZ_GRAPHIC_BAND_NUM) { -+ eqz_params->g_coef.gain_g[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ i++; -+ -+ } else if (filter_idx == -1 || filter_idx == 0) { -+ i += 1; -+ } else { -+ return -EINVAL; -+ } -+ } -+ } else { -+ return -EINVAL; -+ } -+ -+ return 1; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Equalizer Switch control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Equalizer -+ * Switch control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = 0; -+ uinfo->value.integer.max = 1; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get equalizer switch value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer switch value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* get the Equalizer switch status */ -+ ucontrol->value.integer.value[0] = -+ adsp_card->ctr_if.eqz_switch[direction][index]; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set equalizer switch value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer switch value -+ * \retval 1 Equalizer switch change -+ * \retval 0 Equalizer switch does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1 */ -+static int -+snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int eqz_switch; -+ int handle_state, direction; -+ unsigned int index; -+ int ret = 0; -+ -+ eqz_switch = ucontrol->value.integer.value[0]; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine handle state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ } else { -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->cap_state; -+ } -+ -+ /* set the status of Equalizer */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* runtime setting is not supported */ -+ ret = -EINVAL; -+ } else { -+ adsp_card->ctr_if.eqz_switch[direction][index] = eqz_switch; -+ ret = 1; -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Renderer output channel -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Renderer output channel -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = MONAURAL; -+ uinfo->value.integer.max = STEREO; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get Renderer output channel's value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to Renderer output channel value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int rdr_out_ch; -+ unsigned int index; -+ int handle_state, handle_id; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine handle state and handle ID */ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ handle_id = adsp_card->playback[index]->renderer->handle_id; -+ } -+ -+ /* get Renderer output channel's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get Renderer output channel's value from Renderer plugin */ -+ if (xf_adsp_get_param(handle_id, -+ XA_RDR_CONFIG_PARAM_OUT_CHANNELS, -+ &rdr_out_ch) != 0) { -+ return -EINVAL; -+ } -+ -+ ucontrol->value.integer.value[0] = rdr_out_ch; -+ } else { -+ ucontrol->value.integer.value[0] = -+ adsp_card->ctr_if.rdr_out_ch[index]; -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set Renderer output channel's value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to Renderer output channel value -+ * \retval 1 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ unsigned int index; -+ int handle_state; -+ int ret = 1; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine handle state and handle ID */ -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ /* get Renderer output channel's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ /* not support runtime setting */ -+ ret = -EINVAL; -+ else -+ adsp_card->ctr_if.rdr_out_ch[index] = -+ ucontrol->value.integer.value[0]; -+ -+ return ret; -+} -+ -+/** control interface for playback's volume rate */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_playback_volume_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ } -+}; -+ -+/** control interface for Capture's volume rate */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_capture_volume_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ } -+}; -+ -+/** control interface for playback's output sample rate */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_playback_sample_rate_out_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ } -+}; -+ -+/** control interface for Capture's input sample rate */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_capture_sample_rate_in_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ } -+}; -+ -+/** control interface for Equalizer parameters in playback */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_playback_equalizer_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ } -+}; -+ -+/** control interface for Equalizer parameters in record */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_capture_equalizer_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ } -+}; -+ -+/** control interface for Equalizer usage in playback */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_playback_equalizer_switch_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ } -+}; -+ -+/** control interface for Equalizer usage in record */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_capture_equalizer_switch_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ } -+}; -+ -+/** control interface for playback's output channel */ -+static struct snd_kcontrol_new -+snd_adsp_playback_out_channel_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ } -+}; -+ -+/** control interface for TDM playback's volume rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_playback_volume_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+}; -+ -+/** control interface for TDM capture's volume rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_capture_volume_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+}; -+ -+/** control interface for TDM playback's output sample rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_playback_sample_rate_out_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+}; -+ -+/** control interface for TDM capture's input sample rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_capture_sample_rate_in_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+}; -+ -+/** PCM callback function of the sound card */ -+static struct snd_pcm_ops snd_adsp_pcm_ops = { -+ .open = &snd_adsp_pcm_open, /* PRQA S 1053 10 */ -+ .close = &snd_adsp_pcm_close, -+ .ioctl = &snd_pcm_lib_ioctl, -+ .hw_params = &snd_adsp_pcm_hw_params, -+ .hw_free = &snd_adsp_pcm_hw_free, -+ .prepare = &snd_adsp_pcm_prepare, -+ .trigger = &snd_adsp_pcm_trigger, -+ .pointer = &snd_adsp_pcm_pointer, -+ .ack = &snd_adsp_pcm_ack -+}; -+ -+/******************************************************************* -+ * Internal functions -+ * ****************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Process information get from control structure -+ * -+ * \param[in] eqz_params Equalizer parameters object -+ * \param[in] eqz_ctr_params Equalizer parameters stored in control object -+ * \param[in] flag Indicate playback or capture stream -+ *****************************************************************************/ -+static void snd_adsp_get_eqz_params_from_control( -+ struct xf_adsp_equalizer_params *eqz_params, -+ struct xf_adsp_equalizer_params *eqz_ctr_params, bool flag) -+{ -+ int filter_idx; -+ -+ if (flag) { -+ if (eqz_ctr_params->eqz_type >= 0) -+ eqz_params->eqz_type = eqz_ctr_params->eqz_type; -+ -+ for (filter_idx = 0; filter_idx < XA_REL_EQZ_FILTER_NUM; -+ filter_idx++) { -+ if (eqz_ctr_params->p_coef.fc[filter_idx] >= 0) -+ eqz_params->p_coef.fc[filter_idx] = -+ eqz_ctr_params->p_coef.fc[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.band_width[filter_idx] >= 0) -+ eqz_params->p_coef.band_width[filter_idx] = -+ eqz_ctr_params->p_coef.band_width[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.type[filter_idx] >= 0) -+ eqz_params->p_coef.type[filter_idx] = -+ eqz_ctr_params->p_coef.type[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.gain_base[filter_idx] >= 0) -+ eqz_params->p_coef.gain_base[filter_idx] = -+ eqz_ctr_params->p_coef.gain_base[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.gain[filter_idx] >= 0) -+ eqz_params->p_coef.gain[filter_idx] = -+ eqz_ctr_params->p_coef.gain[filter_idx]; -+ } -+ for (filter_idx = 0; filter_idx < XA_REL_EQZ_GRAPHIC_BAND_NUM; -+ filter_idx++) { -+ if (eqz_ctr_params->g_coef.gain_g[filter_idx] >= 0) -+ eqz_params->g_coef.gain_g[filter_idx] = -+ eqz_ctr_params->g_coef.gain_g[filter_idx]; -+ } -+ } else { -+ memcpy(eqz_ctr_params, eqz_params, sizeof(*eqz_params)); -+ } -+} -+ -+/******************************************************************* -+ * ALSA ADSP Platform driver interface -+ * ****************************************************************/ -+ -+/** **************************************************************************** -+ * \brief Register control interface and preallocate ALSA buffer -+ * -+ * \param[in] runtime Pointer to runtime PCM data -+ * \retval 0 Success -+ * \retval -EINVAL Cannot register control interface -+ ******************************************************************************/ -+static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime) -+{ -+ int i = 0, err = 0; -+ int id; -+ struct snd_card *card; -+ struct snd_adsp_card *adsp_card; -+ int alsa_buf_sz = 0; -+ -+ /* get sound card data */ -+ card = runtime->card->snd_card; -+ -+ /* get driver data */ -+ adsp_card = snd_soc_dai_get_drvdata(runtime->cpu_dai); -+ -+ /* get the ID of CPU DAI */ -+ id = runtime->cpu_dai->id; -+ -+ /* register control interfaces */ -+ if (id == RDR_DAI_IDX0 || id == RDR_DAI_IDX1 || -+ id == RDR_DAI_IDX2 || id == RDR_DAI_IDX3) { -+ struct snd_kcontrol *kctl[RDR_CONTROL_NUM]; -+ void *rdr_ctr[RDR_CONTROL_NUM] = { -+ &snd_adsp_playback_volume_control[id], /* PRQA S 1031 */ -+ &snd_adsp_capture_volume_control[id], -+ &snd_adsp_playback_sample_rate_out_control[id], -+ &snd_adsp_capture_sample_rate_in_control[id], -+ &snd_adsp_playback_equalizer_control[id], -+ &snd_adsp_capture_equalizer_control[id], -+ &snd_adsp_playback_equalizer_switch_control[id], -+ &snd_adsp_capture_equalizer_switch_control[id], -+ &snd_adsp_playback_out_channel_control[id] -+ }; -+ -+ /* add basic control instance */ -+ for (i = 0; i < RDR_CONTROL_NUM; i++) { -+ kctl[i] = snd_ctl_new1(rdr_ctr[i], adsp_card); -+ err = snd_ctl_add(card, kctl[i]); -+ if (err < 0) -+ return -EINVAL; -+ } -+ -+ /* assign ALSA buffer size */ -+ alsa_buf_sz = MAX_BUFFER_BYTES; -+ -+ /* enable MIX feature from the 2nd playback/record stream */ -+ if (adsp_card->ctr_if.mix_usage == MIX_UNUSED) -+ adsp_card->ctr_if.mix_usage = FIRST_RUN; -+ else if (adsp_card->ctr_if.mix_usage == FIRST_RUN) -+ adsp_card->ctr_if.mix_usage = SECOND_RUN; -+ -+ } else { -+ struct snd_kcontrol *kctl[TDM_CONTROL_NUM]; -+ void *tdm_ctr[TDM_CONTROL_NUM] = { -+ &snd_adsp_tdm_playback_volume_control, -+ &snd_adsp_tdm_playback_sample_rate_out_control, -+ &snd_adsp_tdm_capture_volume_control, -+ &snd_adsp_tdm_capture_sample_rate_in_control -+ }; -+ -+ /* add basic control instances */ -+ for (i = 0; i < TDM_CONTROL_NUM; i++) { -+ kctl[i] = snd_ctl_new1(tdm_ctr[i], adsp_card); -+ err = snd_ctl_add(card, kctl[i]); -+ if (err < 0) -+ return -EINVAL; -+ } -+ -+ /* assign ALSA buffer size */ -+ alsa_buf_sz = TDM_MAX_BUFFER_BYTES; -+ } -+ -+ return snd_pcm_lib_preallocate_pages_for_all(runtime->pcm, -+ SNDRV_DMA_TYPE_CONTINUOUS, -+ snd_dma_continuous_data(GFP_KERNEL), -+ alsa_buf_sz, alsa_buf_sz); -+} -+ -+/* **************************************************************************** -+ * ALSA ADSP DAI register -+ * ***************************************************************************/ -+ -+/** callback function of platform driver */ -+static struct snd_soc_platform_driver snd_adsp_platform = { -+ .pcm_new = &snd_adsp_pcm_new, /* PRQA S 1053 *//* PRQA S 0674 */ -+ .ops = &snd_adsp_pcm_ops, -+}; -+ -+/** component information of driver */ -+static const struct snd_soc_component_driver snd_adsp_component = { -+ .name = "snd_adsp", /* PRQA S 1053 */ -+}; -+ -+/** DAI information of ADSP ALSA driver */ -+static struct snd_soc_dai_driver snd_adsp_dai[MAX_DAI_IDX] = { -+ { -+ /* PRQA S 1053 */ -+ .id = RDR_DAI_IDX0, -+ .name = "adsp-dai.0", -+ .playback.stream_name = "Playback0", -+ .capture.stream_name = "Capture0", -+ }, -+ { -+ .id = RDR_DAI_IDX1, -+ .name = "adsp-dai.1", -+ .playback.stream_name = "Playback1", -+ .capture.stream_name = "Capture1", -+ }, -+ { -+ .id = RDR_DAI_IDX2, -+ .name = "adsp-dai.2", -+ .playback.stream_name = "Playback2", -+ .capture.stream_name = "Capture2", -+ }, -+ { -+ .id = RDR_DAI_IDX3, -+ .name = "adsp-dai.3", -+ .playback.stream_name = "Playback3", -+ .capture.stream_name = "Capture3", -+ }, -+ { -+ .id = TDM_DAI_IDX, -+ .name = "adsp-tdm-dai", -+ .playback.stream_name = "TDM Playback", -+ .capture.stream_name = "TDM Capture", -+ } -+}; -+ -+/** *************************************************************************** -+ * \brief Register platform driver and ADSP ALSA sound card -+ * -+ * \param[in] pdev Pointer to platform driver data -+ * \retval 0 Success -+ * \retval -ENOMEM Cannot allocate driver's data -+ * \retval -EINVAL Cannot register platform driver or sound card -+ ****************************************************************************/ -+static int snd_adsp_probe(struct platform_device *pdev) -+{ -+ struct snd_adsp_card *adsp_card; -+ int i; -+ -+ /* allocate a card data structure */ -+ adsp_card = kmalloc(sizeof(*adsp_card), GFP_KERNEL); -+ if (!adsp_card) -+ return -ENOMEM; -+ -+ /* init parameters */ -+ memset(adsp_card, 0, sizeof(*adsp_card)); /* PRQA S 3200 */ -+ -+ /* PRQA S 3200 1*/ -+ memset(&adsp_card->ctr_if, -1, sizeof(struct snd_adsp_control)); -+ -+ /* disable Equalizer for all streams */ -+ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { -+ adsp_card->ctr_if.eqz_switch[DIRECT_CAPTURE][i] = 0; -+ adsp_card->ctr_if.eqz_switch[DIRECT_PLAYBACK][i] = 0; -+ } -+ -+ /* disable MIX function for all */ -+ adsp_card->ctr_if.mix_usage = MIX_UNUSED; -+ -+ /* save driver data */ -+ dev_set_drvdata(&pdev->dev, adsp_card); -+ -+ /* register platform device */ -+ if (snd_soc_register_platform(&pdev->dev, &snd_adsp_platform) < 0) { -+ snd_soc_unregister_platform(&pdev->dev); -+ return -EINVAL; -+ } -+ -+ /* fill format information of sound DAI driver for Rdr/Cap function */ -+ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { -+ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].playback.channels_min = MIN_CHANNEL; -+ snd_adsp_dai[i].playback.channels_max = MAX_CHANNEL; -+ -+ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].capture.channels_min = MIN_CHANNEL; -+ snd_adsp_dai[i].capture.channels_max = MAX_CHANNEL; -+ } -+ -+ /* fill format information of sound DAI driver for TDM function */ -+ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].playback.channels_min = TDM_MIN_CHANNEL; -+ snd_adsp_dai[i].playback.channels_max = TDM_MAX_CHANNEL; -+ -+ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].capture.channels_min = TDM_MIN_CHANNEL; -+ snd_adsp_dai[i].capture.channels_max = TDM_MAX_CHANNEL; -+ -+ /* register CPU dai */ -+ if (snd_soc_register_component(&pdev->dev, &snd_adsp_component, -+ snd_adsp_dai, -+ ARRAY_SIZE(snd_adsp_dai)) < 0) { -+ snd_soc_unregister_platform(&pdev->dev); -+ return -EINVAL; -+ } -+ -+ dev_info(&pdev->dev, "probed\n"); -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Unregister platform driver and ADSP ALSA sound card -+ * -+ * \param[in] pdev Pointer platform driver data -+ * \retval 0 Success -+ * \retval -EINVAL Invalid driver's data -+ *****************************************************************************/ -+static int snd_adsp_remove(struct platform_device *pdev) -+{ -+ /* get ADSP sound card data */ -+ struct snd_adsp_card *adsp_card = dev_get_drvdata(&pdev->dev); -+ -+ if (!adsp_card) -+ return -ENODEV; -+ -+ /* release the ADSP sound card */ -+ kfree(adsp_card); -+ -+ /* unregister platform driver */ -+ snd_soc_unregister_component(&pdev->dev); -+ snd_soc_unregister_platform(&pdev->dev); -+ -+ /* success */ -+ return 0; -+} -+ -+/** ADSP ALSA driver information */ -+static const struct of_device_id snd_adsp_id[] = { -+ { .compatible = "renesas,rcar_adsp_sound_gen3", }, /* PRQA S 1053 */ -+}; -+MODULE_DEVICE_TABLE(of, snd_adsp_id); -+ -+/** platform driver of ADSP ALSA sound card */ -+static struct platform_driver snd_adsp_driver = { -+ .driver = { /* PRQA S 1053 */ -+ .name = "rcar_adsp_sound", -+ .of_match_table = snd_adsp_id, -+ }, -+ .probe = snd_adsp_probe, -+ .remove = snd_adsp_remove, -+}; -+module_platform_driver(snd_adsp_driver); /* PRQA S 0651 */ -+ -+MODULE_AUTHOR("Renesas AudioDSP"); -+MODULE_DESCRIPTION("Platform driver for ADSP"); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:ADSP-PCM-AUDIO"); -diff --git a/sound/soc/adsp/xf-adsp-base.c b/sound/soc/adsp/xf-adsp-base.c -new file mode 100644 -index 0000000..3ad9445 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-base.c -@@ -0,0 +1,2259 @@ -+/** *************************************************************************** -+ *\file xf-adsp-base.c -+ *\brief Source file for ADSP Base Control layer -+ *\addtogroup ADSP Driver -+ ****************************************************************************** -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ ****************************************************************************** -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#include -+#include -+#include -+ -+#include "xf-adsp-base.h" -+ -+#define XF_AUX_POOL_SIZE (16) /**< size of auxiliary pool*/ -+#define XF_AUX_POOL_MSG_LENGTH (256) /**< size of auxiliary buffer */ -+ -+#define XF_PROXY_ALIGN (64) /**< proxy alignment */ -+ -+/** \def XF_ALIGNED(size) -+ * Get properly aligned buffer length -+ */ -+#define XF_ALIGNED(size)\ -+((((size) + XF_PROXY_ALIGN) - 1) & ~(XF_PROXY_ALIGN - 1)) /* PRQA S 3453 */ -+ -+#ifndef offset_of -+/** \def offset_of(type, member) -+ * Return the offset of member in type structuer in byte -+ */ -+#define offset_of(type, member) \ -+ ((int)(long int)&(((const type *)(0))->member)) /* PRQA S 3453 */ -+#endif -+ -+/************************************************* -+ * Variable and and function declaration -+ * **********************************************/ -+ -+/** ADSP base control data */ -+static struct xf_adsp_base *base; -+ -+/* function declaration */ -+static int xf_adsp_base_register_handle(void *private_data, -+ struct xf_callback_func *cb, -+ int comp_id); -+static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id); -+static int xf_adsp_base_free_handle(int handle_id); -+static void xf_adsp_base_init_handle(void); -+static int xf_adsp_base_get_valid_handle(void); -+static int xf_send_and_receive(struct xf_message *msg); -+static int xf_response_thread(void *data); -+static void xf_buffer_put(struct xf_buffer *buffer); -+static u32 xf_buffer_length(struct xf_buffer *b); -+static struct xf_buffer *xf_buffer_get(struct xf_pool *pool); -+static void *xf_buffer_data(struct xf_buffer *b); -+static int xf_adsp_unregister(int comp_id); -+static int xf_adsp_register(char *name, int *comp_id); -+ -+/************************************************* -+ * Helper function to process pool data -+ * **********************************************/ -+ -+/** *********************************************************** -+ * \brief get buffer from given pool -+ * -+ * \param[in] pool Data pool address -+ * \retval b Pointer to buffer address in pool -+ **************************************************************/ -+static struct xf_buffer *xf_buffer_get(struct xf_pool *pool) -+{ -+ struct xf_buffer *b; -+ -+ b = pool->free; -+ if (b) { -+ pool->free = b->link.next; -+ b->link.pool = pool; -+ } -+ return b; -+} -+ -+/*********************************************************** -+ *\brief return buffer back to pool -+ * -+ *\param[in] buffer Pointer to the buffer data -+ ************************************************************/ -+static void xf_buffer_put(struct xf_buffer *buffer) -+{ -+ struct xf_pool *pool = buffer->link.pool; -+ -+ buffer->link.next = pool->free; -+ pool->free = buffer; -+} -+ -+/*********************************************************** -+ *\brief get the address of the given buffer data -+ * -+ *\param[in] b Pointer to the buffer data -+ *\retval address Address of buffer data -+ ************************************************************/ -+static void *xf_buffer_data(struct xf_buffer *b) -+{ -+ return b->address; -+} -+ -+/************************************************************ -+ *\brief get the length of the given buffer data -+ * -+ *\param[in] b Pointer to the buffer data -+ *\retval length Size of buffer data -+ ************************************************************/ -+static u32 xf_buffer_length(struct xf_buffer *b) /* PRQA S 3673 */ -+{ -+ return b->link.pool->length; -+} -+ -+/************************************************************ -+ *\brief set data to the given command message -+ * -+ *\param[out] m Pointer to the command message -+ *\param[in] id Message ID -+ *\param[in] opcode Message opcode -+ *\param[in] length Message length -+ *\param[in] buf Pointer to the buffer data -+ *\param[in] next Pointer to the next message -+ *\retval m Pointer to the command message -+ ************************************************************/ -+static inline struct xf_message * -+xf_create_msg(struct xf_message *m, u32 id, u32 opcode, u32 length, void *buf, -+ struct xf_message *next) -+{ -+ if (m) { -+ m->id = id; -+ m->opcode = opcode; -+ m->length = length; -+ m->buffer = buf; -+ m->next = next; -+ } -+ -+ return m; -+} -+ -+/***************************************************************** -+ *\brief synchronous send and wait for response message from proxy -+ * -+ *\param[in] msg Pointer to the command message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ ****************************************************************/ -+static int xf_send_and_receive(struct xf_message *msg) -+{ -+ int err; -+ int opcode = msg->opcode; -+ -+ /* reset the base flag */ -+ spin_lock(&base->lock); -+ base->base_flag = FALSE; -+ spin_unlock(&base->lock); -+ -+ err = base->cmd.send(base->client, (void *)msg); -+ if (err != 0) -+ return err; -+ -+ /* sleep and wait for the response wake up event */ -+ if (wait_event_interruptible(base->base_wait, -+ base->base_flag || base->err_flag)) { -+ return -EINVAL; -+ } -+ -+ if (base->err_flag != 0) { -+ spin_lock(&base->lock); -+ base->err_flag = FALSE; -+ spin_unlock(&base->lock); -+ return -EINVAL; -+ } -+ -+ /* save the response message */ -+ /* PRQA S 3200 */ -+ memcpy(msg, &base->base_msg, sizeof(struct xf_message)); -+ -+ /* check if the reponsed message is right */ -+ if (msg->opcode != opcode) -+ return -EINVAL; -+ -+ return 0; -+} -+ -+/************************************************************* -+ *\brief send a message to proxy -+ * -+ *\param[in] msg Pointer to the command message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+static inline int xf_send(struct xf_message *msg) -+{ -+ return base->cmd.send(base->client, (void *)msg); -+} -+ -+/** *********************************************************** -+ *\brief receive message from proxy -+ * -+ *\param[in] msg Pointer to store the response message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+static inline int xf_receive(struct xf_message *msg) -+{ -+ /* do not wait here */ -+ return base->cmd.recv(base->client, (void *)msg); -+} -+ -+/** *********************************************************** -+ *\brief thread for receive response data -+ **************************************************************/ -+static int xf_response_thread(void *data) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ int id; -+ -+ /* set polling to wait the response message */ -+ spin_lock(&base->lock); -+ base->wait_flag = FALSE; -+ spin_unlock(&base->lock); -+ -+ while (!kthread_should_stop()) { -+ if (base->cmd.poll(base->client, &base->wait_flag) != 0) -+ continue; -+ -+ if (xf_receive(&msg) != 0) -+ continue; -+ -+ /* get the handle id */ -+ id = XF_AP_CLIENT(msg.id); -+ -+ /* check the destination of the response message */ -+ if (id == 0) { -+ /* message is from base control */ -+ /* PRQA S 3200 1*/ -+ memcpy(&base->base_msg, &msg, -+ sizeof(struct xf_message)); -+ -+ spin_lock(&base->lock); -+ base->base_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ continue; -+ } -+ -+ /* get handle data */ -+ handle = xf_adsp_base_get_handle(id); -+ -+ if (handle == 0) -+ continue; -+ -+ switch (msg.opcode) { -+ case XF_EMPTY_THIS_BUFFER: /* PRQA S 0594 */ -+ handle->cb->empty_buf_done(handle->private_data, -+ msg.opcode, -+ msg.length, -+ msg.buffer); -+ break; -+ case XF_FILL_THIS_BUFFER: /* PRQA S 0594 */ -+ handle->cb->fill_buf_done(handle->private_data, -+ msg.opcode, -+ msg.length, -+ msg.buffer); -+ break; -+ case XF_SET_PARAM: /* PRQA S 0594 4 */ -+ case XF_GET_PARAM: -+ case XF_ROUTE: -+ case XF_UNROUTE: -+ /* message is from base control */ -+ memcpy(&base->base_msg, &msg, -+ sizeof(struct xf_message)); /* PRQA S 3200 */ -+ -+ spin_lock(&base->lock); -+ base->base_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ break; -+ default: -+ /* error has occurred */ -+ handle->cb->event_handler(handle->private_data); -+ -+ xf_adsp_base_free_handle(id); /* PRQA S 3200 */ -+ -+ spin_lock(&base->lock); -+ base->err_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ break; -+ } -+ } -+ -+ pr_info("ADSP base thread was exited\n"); -+ -+ do_exit(0); -+ return 0; -+} -+ -+/************************************************************* -+ * \brief register component to ADSP -+ * -+ * \param[in] name Name string of component -+ * \param[out] comp_id Store the registered component ID -+ * \retval 0 Success -+ * \retval -EINVAL Failed -+ **************************************************************/ -+static int xf_adsp_register(char *name, int *comp_id) /* PRQA S 3673 */ -+{ -+ struct xf_message msg; -+ struct xf_buffer *b = xf_buffer_get(base->aux_pool); -+ int err = 0; -+ -+ msg.id = __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)); -+ msg.opcode = XF_REGISTER; -+ msg.length = strlen(name) + 1; -+ msg.buffer = xf_buffer_data(b); -+ -+ /* copy identify name of ADSP component */ -+ if (msg.length <= xf_buffer_length(b)) -+ strncpy(msg.buffer, name, msg.length); /* PRQA S 3200 */ -+ else -+ strncpy(msg.buffer, name, xf_buffer_length(b));/* PRQA S 3200 */ -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the registered component ID */ -+ *comp_id = XF_MSG_SRC(msg.id); -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ * \brief unregister component from ADSP -+ * \param[in] comp_id Registered component ID -+ * \retval 0 Success -+ * \retval -EINVAL Failed -+ **************************************************************/ -+static int xf_adsp_unregister(int comp_id) -+{ -+ struct xf_message msg; -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), comp_id), -+ XF_UNREGISTER, 0, NULL, NULL); /* PRQA S 3200 */ -+ -+ return xf_send_and_receive(&msg); -+} -+ -+/*************************************************************** -+ * APIs for ADSP component helper -+ * ************************************************************/ -+/** *********************************************************** -+ * \brief allocate memory pool from shared memory -+ * \param[in] pool_size Number of buffer need to allocate -+ * \param[in] buf_length Size of each buffer in bytes -+ * \retval pool Pointer to allocated pool -+ * \retval -EINVAL Invalid base data -+ * \retval -ENOMEM Out of memory resource -+ **************************************************************/ -+struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length) -+{ -+ void *data; -+ u32 number; -+ struct xf_buffer *b; -+ struct xf_message msg; -+ struct xf_pool *pool; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return ERR_PTR(-EINVAL); /* PRQA S 0306 */ -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), -+ XF_ALLOC, -+ buf_length * pool_size, NULL, NULL); /* PRQA S 3200 */ -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ -+ -+ /* PRQA S 0306 1 */ -+ pool = kmalloc(offset_of(struct xf_pool, buffer) + -+ (pool_size * sizeof(struct xf_buffer)), GFP_KERNEL); -+ -+ if (!pool) -+ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ -+ -+ pool->length = buf_length; -+ pool->number = pool_size; -+ pool->p = msg.buffer; -+ -+ number = pool_size; -+ for (pool->free = b = &pool->buffer[0], data = pool->p; -+ number > 0; number--, b++) { /* PRQA S 2462,3418,0489 */ -+ /* set address of the buffer */ -+ b->address = data; -+ -+ /* fill buffer into free list */ -+ if (number == 1) -+ b->link.next = NULL; -+ else -+ b->link.next = b + 1; /* PRQA S 0489 */ -+ -+ /* advance data pointer in contigous buffer */ -+ data += buf_length; /* PRQA S 0550 */ -+ } -+ -+ return pool; -+} -+ -+/** *********************************************************** -+ *\brief return memory to shared memory -+ *\param[in] pool Data pool address -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or pool data -+ **************************************************************/ -+int xf_adsp_free_mem_pool(struct xf_pool *pool) -+{ -+ struct xf_message msg; -+ -+ /* check the sane ADSP base pool data*/ -+ if (!base || !pool) -+ return -EINVAL; -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), -+ XF_FREE, pool->number * pool->length, -+ pool->p, NULL); /* PRQA S 3200 */ -+ -+ xf_send_and_receive(&msg); /* PRQA S 3200 */ -+ -+ kfree(pool); -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief get buffer from given pool -+ * -+ *\param[in] pool Data pool address -+ *\param[in] index Buffer index -+ *\retval b Pointer to buffer address in pool -+ *\retval -EINVAL Invalid pool or index -+ **************************************************************/ -+char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index) -+{ -+ struct xf_buffer *buf[XF_BUF_POOL_SIZE] = {0}; -+ char *data; -+ int i; -+ -+ /* check the sane pool data*/ -+ if (!pool) -+ return ERR_PTR(-EINVAL); /* PRQA S 306 */ -+ -+ /* check the index is valid */ -+ if (index > (pool->number - 1)) -+ return ERR_PTR(-EINVAL); /* PRQA S 306 */ -+ -+ /* get buffer from pool */ -+ for (i = 0; i <= index; i++) -+ buf[i] = xf_buffer_get(pool); -+ -+ /* get data from buffer */ -+ data = xf_buffer_data(buf[index]); -+ -+ /* return buffer to pool */ -+ for (i = index; i >= 0; i--) -+ xf_buffer_put(buf[i]); -+ -+ return data; -+} -+ -+/** *********************************************************** -+ *\brief send empty this buffer command to ADSP framework -+ * -+ *\param[in] handle_id ID of the registered handle -+ *\param[in] buffer Pointer to data buffer -+ *\param[in] length Size of buffer in bytes -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ /* submit message to port 0 of component */ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_EMPTY_THIS_BUFFER, length, buffer, NULL); -+ -+ xf_send(&msg); /* PRQA S 3200 */ -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief send fill this buffer command to ADSP framework -+ * -+ *\param[in] handle_id ID of the registered handle -+ *\param[in] buffer Pointer to data buffer -+ *\param[in] length Size of buffer in bytes -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ /* submit message to port 1 of component */ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 1)), -+ XF_FILL_THIS_BUFFER, length, buffer, NULL); -+ -+ xf_send(&msg); /* PRQA S 3200 */ -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief route data between two registered ADSP plugins -+ * -+ *\param[in] src_handle_id Handle ID of source plugin -+ *\param[in] dst_handle_id Handle ID of sink plugin -+ *\param[in] buf_cnt Number of buffer in tunnel -+ *\param[in] buf_size Size of each buffer in tunnel -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int -+xf_adsp_route(int src_handle_id, int dst_handle_id, int buf_cnt, int buf_size) -+{ -+ struct xf_route_port_msg *route_msg; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ struct xf_handle *dst_handle, *src_handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ /* get handle data */ -+ dst_handle = xf_adsp_base_get_handle(dst_handle_id); -+ src_handle = xf_adsp_base_get_handle(src_handle_id); -+ -+ if (!dst_handle || !src_handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ route_msg = xf_buffer_data(b); -+ -+ /* route information */ -+ route_msg->dst = __XF_PORT_SPEC2(dst_handle->comp_id, 0); -+ route_msg->alloc_align = 4; -+ route_msg->alloc_number = buf_cnt; -+ route_msg->alloc_size = buf_size; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, src_handle_id), -+ __XF_PORT_SPEC2(src_handle->comp_id, 1)), -+ XF_ROUTE, sizeof(*route_msg), route_msg, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief set a single parameter -+ * -+ *\param[in] handle_id ID of registered handle -+ *\param[in] index Sub-command index of parameter -+ *\param[in] value the setting value -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_set_param(int handle_id, int index, int value) -+{ -+ struct xf_message msg; -+ struct xf_buffer *b; -+ struct xf_set_param_msg *msg_params; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ msg_params->item[0].id = index; -+ msg_params->item[0].value = value; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(1), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get a single parameter -+ * -+ *\param[in] handle_id ID of registered handle -+ *\param[in] index Sub-command index of parameter -+ *\param[out] value Store the getting value -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_get_param(int handle_id, int index, int *value) -+{ -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base and value data */ -+ if (!base || !value) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ msg_params->c.id[0] = index; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(1), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ *value = msg_params->r.value[0]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/*************************************************** -+ * APIs for ADSP base control -+ * ************************************************/ -+ -+/** *********************************************************** -+ *\brief initialize ADSP base's instance -+ * -+ *\retval 0 Success -+ *\retval -EINVAL ADSP base's instance has been initialized -+ *\retval -ENOMEM Cannot allocate memory for ADSP base -+ *\retval -EBUSY Cannot register client to proxy -+ **************************************************************/ -+int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd) -+{ -+ int err = 0; -+ -+ if (base != 0) -+ return -EINVAL; -+ -+ if (!cmd || !cmd->recv || !cmd->send || !cmd->poll || -+ !cmd->client_register || !cmd->client_unregister) -+ return -EINVAL; -+ -+ base = kmalloc(sizeof(*base), GFP_KERNEL); -+ if (!base) -+ return -ENOMEM; -+ -+ memset(base, 0, sizeof(struct xf_adsp_base)); /* PRQA S 3200 */ -+ -+ /* store the proxy command */ -+ memcpy(&base->cmd, cmd, sizeof(struct xf_adsp_base_cmd)); -+ -+ /* create client to connect from proxy driver */ -+ err = base->cmd.client_register(&base->client); -+ if (err != 0) -+ goto err3; /* PRQA S 2001 */ -+ -+ /* initialize waiting queue */ -+ init_waitqueue_head(&base->base_wait); -+ -+ /* initialize handle */ -+ xf_adsp_base_init_handle(); -+ -+ /* create thread to get the responsed message from proxy */ -+ base->rsp_thread = kthread_run(&xf_response_thread, -+ (void *)base, "adsp base"); -+ -+ if (base->rsp_thread != 0) { -+ pr_info("ADSP base thread has been started.\n"); -+ } else { -+ pr_info("Failed in create base thread\n"); -+ err = -ENOMEM; -+ goto err2; /* PRQA S 2001 */ -+ } -+ -+ /* allocate auxiliary pool for component usage */ -+ base->aux_pool = xf_adsp_allocate_mem_pool( -+ XF_AUX_POOL_SIZE, -+ XF_ALIGNED(XF_AUX_POOL_MSG_LENGTH)); -+ -+ if (IS_ERR(base->aux_pool)) { /* PRQA S 306 */ -+ err = -ENOMEM; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ pr_info("ADSP base was created\n"); -+ return 0; -+ -+err1: -+ /* cancel the waitting queue */ -+ spin_lock(&base->lock); -+ base->wait_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ /* stop thread inadvance */ -+ kthread_stop(base->rsp_thread); -+ -+err2: -+ base->cmd.client_unregister(base->client); -+ -+err3: -+ kfree(base); -+ base = NULL; -+ -+ return err; -+} -+EXPORT_SYMBOL(xf_adsp_base_create); /* PRQA S 0651 */ -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP base's instance -+ * -+ *\retval 0 Success -+ *\retval -EINVAL Invalid ADSP base's instance -+ **************************************************************/ -+int xf_adsp_base_destroy(void) -+{ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ /* free auxiliary pool to shared memory */ -+ xf_adsp_free_mem_pool(base->aux_pool); /* PRQA S 3200 */ -+ -+ /* cancel wait the response message, go to stop process */ -+ spin_lock(&base->lock); -+ base->wait_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ /* stop response thread */ -+ kthread_stop(base->rsp_thread); -+ -+ /* unregister client */ -+ base->cmd.client_unregister(base->client); -+ -+ kfree(base); -+ base = NULL; -+ -+ pr_info("ADSP base was destroyed\n"); -+ return 0; -+} -+EXPORT_SYMBOL(xf_adsp_base_destroy); /* PRQA S 0651 */ -+ -+/** *********************************************************** -+ * \brief initialize handle instance -+ **************************************************************/ -+static inline void xf_adsp_base_init_handle(void) -+{ -+ int i; -+ -+ for (i = 0; i < MAX_HANDLE; i++) -+ base->handle[i] = NULL; -+} -+ -+/** *********************************************************** -+ *\brief get the next available handle ID for register -+ * -+ *\retval -1 Unavailable handle ID -+ *\retval 0 to 255 Available handle ID -+ **************************************************************/ -+static inline int xf_adsp_base_get_valid_handle(void) -+{ -+ int id = -1; -+ int i; -+ -+ for (i = 0; i < MAX_HANDLE; i++) { -+ /* get the id of the first available handler */ -+ if (!base->handle[i]) { -+ id = i; -+ break; -+ } -+ } -+ -+ return id; -+} -+ -+/** *********************************************************** -+ *\brief register a handle instance for component usage -+ * -+ *\param[in] private_data Private data of this component -+ *\param[in] cb Callback function -+ *\param[in] comp_id ID of register component -+ *\retval id ID of registered handle -+ *\retval -EINVAL Cannot get the handle instance -+ *\retval -ENOMEM Cannot allocate handle memory -+ **************************************************************/ -+static int xf_adsp_base_register_handle(void *private_data, -+ struct xf_callback_func *cb, -+ int comp_id) -+{ -+ struct xf_handle *handle; -+ int id; -+ -+ /* get the next handle id */ -+ id = xf_adsp_base_get_valid_handle(); -+ -+ /* check available handle in base */ -+ if (id < 0) -+ return -EINVAL; -+ -+ /* allocate handle data */ -+ handle = kmalloc(sizeof(*handle), GFP_KERNEL); -+ if (!handle) -+ return -ENOMEM; -+ -+ /* save handle data */ -+ handle->private_data = private_data; -+ handle->cb = cb; -+ handle->comp_id = comp_id; -+ -+ /* save the hanle data */ -+ base->handle[id] = handle; -+ -+ /* return the id numbering in base handle */ -+ return (id + 1); -+} -+ -+/** *********************************************************** -+ *\brief get handle instance from handle ID -+ * -+ *\param[in] handle_id ID of registered handle -+ *\retval handle Pointer to handle instance -+ **************************************************************/ -+static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id) -+{ -+ return base->handle[handle_id - 1]; -+} -+ -+/** *********************************************************** -+ *\brief free the registered handle instance -+ * -+ *\param[in] handle_id ID of registered handle -+ *\retval 0 Success -+ *\retval -EINVAL Invalid handle ID -+ **************************************************************/ -+static int xf_adsp_base_free_handle(int handle_id) -+{ -+ if (handle_id < 1 || handle_id > MAX_HANDLE) -+ return -EINVAL; -+ -+ kfree(base->handle[handle_id - 1]); -+ base->handle[handle_id - 1] = NULL; -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Renderer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Renderer parameters -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_renderer_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ params = &renderer->params; -+ -+ /* get Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_CHANNELS; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; -+ msg_params->item[i++].value = params->out_channel; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_MIX_CONTROL; -+ msg_params->item[i++].value = params->mix_ctrl; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_STATE; -+ msg_params->item[i++].value = params->state; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Renderer parameters -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 */ -+int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_adsp_renderer_params *rdr_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ rdr_params = &renderer->params; -+ -+ /* get Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_CHANNELS; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_MIX_CONTROL; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_STATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ rdr_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ rdr_params->channel = msg_params->r.value[i++]; -+ rdr_params->pcm_width = msg_params->r.value[i++]; -+ rdr_params->frame_size = msg_params->r.value[i++]; -+ rdr_params->dev1 = msg_params->r.value[i++]; -+ rdr_params->dev2 = msg_params->r.value[i++]; -+ rdr_params->dma1 = msg_params->r.value[i++]; -+ rdr_params->dma2 = msg_params->r.value[i++]; -+ rdr_params->out_rate = msg_params->r.value[i++]; -+ rdr_params->vol_rate = msg_params->r.value[i++]; -+ rdr_params->out_channel = msg_params->r.value[i++]; -+ rdr_params->mix_ctrl = msg_params->r.value[i++]; -+ rdr_params->state = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Renderer component -+ * -+ *\param[in,out] renderer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_renderer *rdr; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ rdr = kmalloc(sizeof(*rdr), GFP_KERNEL); -+ if (!rdr) -+ return -ENOMEM; -+ -+ memset(rdr, 0, sizeof(struct xf_adsp_renderer)); /* PRQA S 3200 */ -+ -+ /* register renderer component */ -+ err = xf_adsp_register("renderer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register Renderer to ADSP base control */ -+ rdr->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (rdr->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from Renderer plugin */ -+ err = xf_adsp_renderer_get_params(rdr); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save renderer compoent data */ -+ *renderer = rdr; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(rdr); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Renderer component -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ handle_id = renderer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(renderer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Capture component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Capture parameters -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_capture_set_params(struct xf_adsp_capture *capture) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_capture_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ params = &capture->params; -+ -+ /* get Capture's handle data */ -+ handle = xf_adsp_base_get_handle(capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_CHANNELS; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_STATE; -+ msg_params->item[i++].value = params->state; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Capture parameters -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 */ -+int xf_adsp_capture_get_params(struct xf_adsp_capture *capture) -+{ -+ struct xf_adsp_capture_params *cap_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ cap_params = &capture->params; -+ -+ /* get Capture's handle data */ -+ handle = xf_adsp_base_get_handle(capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 11 1*/ -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_CHANNELS; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_STATE; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ cap_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 11 */ -+ cap_params->channel = msg_params->r.value[i++]; -+ cap_params->pcm_width = msg_params->r.value[i++]; -+ cap_params->frame_size = msg_params->r.value[i++]; -+ cap_params->dev1 = msg_params->r.value[i++]; -+ cap_params->dev2 = msg_params->r.value[i++]; -+ cap_params->dma1 = msg_params->r.value[i++]; -+ cap_params->dma2 = msg_params->r.value[i++]; -+ cap_params->out_rate = msg_params->r.value[i++]; -+ cap_params->vol_rate = msg_params->r.value[i++]; -+ cap_params->state = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Capture component -+ * -+ *\param[in,out] capture Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Capture instance -+ *****************************************************************************/ -+int xf_adsp_capture_create(struct xf_adsp_capture **capture, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_capture *cap; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ cap = kmalloc(sizeof(*cap), GFP_KERNEL); -+ if (!cap) -+ return -ENOMEM; -+ -+ memset(cap, 0, sizeof(struct xf_adsp_capture)); /* PRQA S 3200 */ -+ -+ /* register capture component */ -+ err = xf_adsp_register("capture", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register capture to ADSP base control */ -+ cap->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (cap->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from capture plugin */ -+ err = xf_adsp_capture_get_params(cap); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save capture compoent data */ -+ *capture = cap; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(cap); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Capture component -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Capture data -+ **************************************************************/ -+int xf_adsp_capture_destroy(struct xf_adsp_capture *capture) /* PRQA S 3673 */ -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ handle_id = capture->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(capture); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Equalizer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Equalizer parameters -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_equalizer_params *params; -+ struct xf_buffer *b; -+ int i, n; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ params = &equalizer->params; -+ -+ /* get Equalizer's handle data */ -+ handle = xf_adsp_base_get_handle(equalizer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_COEF_FS; -+ msg_params->item[i++].value = params->rate; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_CH; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; -+ msg_params->item[i++].value = params->eqz_type; -+ -+ if (params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ struct xf_equalizer_parametric_coef *coef = ¶ms->p_coef; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; -+ msg_params->item[i++].value = coef->type[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; -+ msg_params->item[i++].value = coef->fc[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; -+ msg_params->item[i++].value = coef->band_width[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; -+ msg_params->item[i++].value = coef->gain[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; -+ msg_params->item[i++].value = coef->gain_base[n]; -+ } -+ } else { -+ struct xf_equalizer_graphic_coef *coef = ¶ms->g_coef; -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; -+ msg_params->item[i++].value = coef->gain_g[n]; -+ } -+ } -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Equalizer parameters -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_adsp_equalizer_params *eqz_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i, n; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ eqz_params = &equalizer->params; -+ -+ /* get Equalizer's handle data */ -+ handle = xf_adsp_base_get_handle(equalizer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_COEF_FS; /* PRQA S 3440 4 */ -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_CH; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ /* PRQA S 3440 5 */ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; -+ } -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) -+ /* PRQA S 3440 1 */ -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ eqz_params->rate = msg_params->r.value[i++]; /* PRQA S 3440 4 */ -+ eqz_params->channel = msg_params->r.value[i++]; -+ eqz_params->pcm_width = msg_params->r.value[i++]; -+ eqz_params->eqz_type = msg_params->r.value[i++]; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ /* PRQA S 3440 5 */ -+ eqz_params->p_coef.type[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.fc[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.band_width[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.gain[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.gain_base[n] = msg_params->r.value[i++]; -+ } -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { -+ /* PRQA S 3440 1 */ -+ eqz_params->g_coef.gain_g[n] = msg_params->r.value[i++]; -+ } -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Equalizer component -+ * -+ *\param[in,out] equalizer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Equalier instance -+ *****************************************************************************/ -+int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_equalizer *eqz; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ eqz = kmalloc(sizeof(*eqz), GFP_KERNEL); -+ if (!eqz) -+ return -ENOMEM; -+ -+ memset(eqz, 0, sizeof(struct xf_adsp_equalizer)); /* PRQA S 3200 */ -+ -+ /* register equalizer component */ -+ err = xf_adsp_register("equalizer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register equalizer to ADSP base control */ -+ eqz->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (eqz->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from equalizer plugin */ -+ err = xf_adsp_equalizer_get_params(eqz); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save equalizer compoent data */ -+ *equalizer = eqz; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(eqz); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Equalizer component -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Equalizer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base and Equalizer data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ handle_id = equalizer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(equalizer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for TDM Renderer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP TDM Renderer parameters -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_tdm_renderer_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ params = &tdm_renderer->params; -+ -+ /* get TDM Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->item[i++].value = params->ch_mode; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP TDM Renderer parameters -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_adsp_tdm_renderer_params *params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ params = &tdm_renderer->params; -+ -+ /* get TDM Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ params->ch_mode = msg_params->r.value[i++]; -+ params->pcm_width = msg_params->r.value[i++]; -+ params->frame_size = msg_params->r.value[i++]; -+ params->dev1 = msg_params->r.value[i++]; -+ params->dev2 = msg_params->r.value[i++]; -+ params->dma1 = msg_params->r.value[i++]; -+ params->dma2 = msg_params->r.value[i++]; -+ params->out_rate = msg_params->r.value[i++]; -+ params->vol_rate = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create TDM Renderer component -+ * -+ *\param[in,out] tdm_renderer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, -+ struct xf_callback_func *cb, -+ void *private_data) -+{ -+ struct xf_adsp_tdm_renderer *tdm_rdr; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ tdm_rdr = kmalloc(sizeof(*tdm_rdr), GFP_KERNEL); -+ if (!tdm_rdr) -+ return -ENOMEM; -+ -+ /* PRQA S 3200 */ -+ memset(tdm_rdr, 0, sizeof(struct xf_adsp_tdm_renderer)); -+ -+ /* register TDM Renderer component */ -+ err = xf_adsp_register("tdm-renderer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register TDM Renderer to ADSP base control */ -+ tdm_rdr->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (tdm_rdr->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from plugin */ -+ err = xf_adsp_tdm_renderer_get_params(tdm_rdr); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save compoent data */ -+ *tdm_renderer = tdm_rdr; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(tdm_rdr); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP TDM Renderer component -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 1*/ -+int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ handle_id = tdm_renderer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(tdm_renderer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for TDM Capture component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP TDM Capture parameters -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_tdm_capture_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ params = &tdm_capture->params; -+ -+ /* get TDM Capture's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->item[i++].value = params->ch_mode; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP TDM Capture parameters -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_adsp_tdm_capture_params *params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ params = &tdm_capture->params; -+ -+ /* get TDM Capture's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ params->ch_mode = msg_params->r.value[i++]; -+ params->pcm_width = msg_params->r.value[i++]; -+ params->frame_size = msg_params->r.value[i++]; -+ params->dev1 = msg_params->r.value[i++]; -+ params->dev2 = msg_params->r.value[i++]; -+ params->dma1 = msg_params->r.value[i++]; -+ params->dma2 = msg_params->r.value[i++]; -+ params->out_rate = msg_params->r.value[i++]; -+ params->vol_rate = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create TDM Capture component -+ * -+ *\param[in,out] tdm_capture Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_tdm_capture *tdm_cap; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ tdm_cap = kmalloc(sizeof(*tdm_cap), GFP_KERNEL); -+ if (!tdm_cap) -+ return -ENOMEM; -+ -+ /* PRQA S 3200 */ -+ memset(tdm_cap, 0, sizeof(struct xf_adsp_tdm_capture)); -+ -+ /* register TDM Capture component */ -+ err = xf_adsp_register("tdm-capture", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register TDM Capture to ADSP base control */ -+ tdm_cap->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (tdm_cap->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from plugin */ -+ err = xf_adsp_tdm_capture_get_params(tdm_cap); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save compoent data */ -+ *tdm_capture = tdm_cap; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(tdm_cap); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP TDM Capture component -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ handle_id = tdm_capture->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(tdm_capture); -+ -+ return 0; -+} -diff --git a/sound/soc/adsp/xf-adsp-base.h b/sound/soc/adsp/xf-adsp-base.h -new file mode 100644 -index 0000000..27eb084 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-base.h -@@ -0,0 +1,275 @@ -+/** ************************************************************************* -+ *\file xf-adsp-base.h -+ *\brief Header file for ADSP Base Control layer -+ *\addtogroup ADSP Driver -+ **************************************************************************** -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ **************************************************************************** -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_BASE_H -+#define __XF_ADSP_BASE_H -+ -+#include "xf-adsp-config.h" -+#include -+ -+#define XF_BUF_POOL_SIZE (4) /**< number of buffer in a data pool */ -+ -+/**< maximum number of DSP component can be registered */ -+#define MAX_HANDLE (256) -+ -+/* define boolean */ -+#define TRUE (1) -+#define FALSE (0) -+ -+/** \struct xf_callback_func -+ * \brief callback function for ADSP's response message -+ */ -+struct xf_callback_func { -+ /** callback for empty buffer done message */ -+ int (*empty_buf_done)(void *data, int opcode, int length, char *buffer); -+ -+ /** callback for fill buffer done message */ -+ int (*fill_buf_done)(void *data, int opcode, int length, char *buffer); -+ -+ /** callback for event handler */ -+ int (*event_handler)(void *data); -+}; -+ -+/** \struct xf_adsp_renderer_params -+ * \brief parameter structure for Renderer component -+ */ -+struct xf_adsp_renderer_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+ int out_channel; /**< output channels */ -+ int mix_ctrl; /**< mix control flag */ -+ int state; /**< operation state */ -+}; -+ -+/** \struct xf_adsp_renderer -+ * \brief Renderer component structure -+ */ -+struct xf_adsp_renderer { -+ struct xf_adsp_renderer_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_adsp_capture_params -+ *\brief parameter structure of Capture component -+ */ -+struct xf_adsp_capture_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+ int state; /**< operation state */ -+}; -+ -+/** \struct xf_adsp_capture -+ * \brief Capture component structure -+ */ -+struct xf_adsp_capture { -+ struct xf_adsp_capture_params params; /**< parameter structuer*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_equalizer_parametric_coef -+ *\brief Parametric Equalizer type's parameters -+ */ -+struct xf_equalizer_parametric_coef { -+ int type[XA_REL_EQZ_FILTER_NUM]; /**< Filter type */ -+ int fc[XA_REL_EQZ_FILTER_NUM]; /**< Filter center frequency */ -+ int gain[XA_REL_EQZ_FILTER_NUM]; /**< Filter gain */ -+ int band_width[XA_REL_EQZ_FILTER_NUM]; /**< Filter band width */ -+ int gain_base[XA_REL_EQZ_FILTER_NUM]; /**< Filter base gain */ -+}; -+ -+/** \struct xf_equalizer_graphic_coef -+ * \brief Graphic Equalizer type's parameters -+ */ -+struct xf_equalizer_graphic_coef { -+ int gain_g[XA_REL_EQZ_GRAPHIC_BAND_NUM];/**< Graphic equalizer gain */ -+}; -+ -+/** \struct xf_adsp_equalizer_params -+ *\brief Equalizer parameters -+ */ -+struct xf_adsp_equalizer_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int rate; /**< sampling rate */ -+ int eqz_type; /**< Equalizer type */ -+ struct xf_equalizer_parametric_coef p_coef; /**< Parametric params */ -+ struct xf_equalizer_graphic_coef g_coef; /**< Graphic params */ -+}; -+ -+/** \struct xf_adsp_equalizer -+ * \brief Equalizer component's structure -+ */ -+struct xf_adsp_equalizer { -+ struct xf_adsp_equalizer_params params;/**< Equalizer parameters */ -+ struct xf_pool *buf_pool; /**< buffer pool for transfer data */ -+ int handle_id; /**< ID of registered handle */ -+}; -+ -+/** \struct xf_adsp_tdm_renderer_params -+ * \brief parameter structure for TDM Renderer component -+ */ -+struct xf_adsp_tdm_renderer_params { -+ int ch_mode; /**< channel mode */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+}; -+ -+/** \struct xf_adsp_tdm_renderer -+ * \brief TDM Renderer component structure -+ */ -+struct xf_adsp_tdm_renderer { -+ struct xf_adsp_tdm_renderer_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle */ -+}; -+ -+/** \struct xf_adsp_tdm_capture_params -+ * \brief parameter structure for TDM Capture component -+ */ -+struct xf_adsp_tdm_capture_params { -+ int ch_mode; /**< channel mode */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+}; -+ -+/** \struct xf_adsp_tdm_capture -+ * \brief TDM Capture component structure -+ */ -+struct xf_adsp_tdm_capture { -+ struct xf_adsp_tdm_capture_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_handle -+ * \brief Handle struct for each ADSP component -+ */ -+struct xf_handle { -+ int comp_id;/**< ADSP component ID */ -+ struct xf_callback_func *cb;/**< callback functions */ -+ void *private_data; /**< private data for callback functions*/ -+}; -+ -+/** \struct xf_adsp_base -+ * \brief Base component structure -+ */ -+struct xf_adsp_base { -+ struct xf_adsp_base_cmd cmd; /**< proxy commands */ -+ void *client; /**< client data which registered to proxy */ -+ struct xf_pool *aux_pool; /**< auxiliary buffer pool data */ -+ struct xf_handle *handle[MAX_HANDLE]; /**< handler data */ -+ struct task_struct *rsp_thread;/**< thread for response message*/ -+ wait_queue_head_t base_wait; /**< ADSP base's waiting queue */ -+ struct xf_message base_msg; /**< ADSP base's response message */ -+ int base_flag; /**< flag to control its waiting queue */ -+ int err_flag; /**< flag to indicate a error from plugins */ -+ int wait_flag; /**< flag to control the polling waiting*/ -+ spinlock_t lock; /**< spinlock data */ -+}; -+ -+struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length); -+int xf_adsp_free_mem_pool(struct xf_pool *pool); -+char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index); -+ -+int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length); -+int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length); -+ -+int xf_adsp_route(int src_handle_id, int dst_handle_id -+ , int buf_cnt, int buf_size); -+ -+int xf_adsp_set_param(int handle_id, int index, int value); -+int xf_adsp_get_param(int handle_id, int index, int *value); -+ -+int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer); -+int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer); -+int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer); -+ -+int xf_adsp_capture_create(struct xf_adsp_capture **capture, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_capture_destroy(struct xf_adsp_capture *capture); -+int xf_adsp_capture_set_params(struct xf_adsp_capture *capture); -+int xf_adsp_capture_get_params(struct xf_adsp_capture *capture); -+ -+int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer); -+int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer); -+int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer); -+ -+int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, -+ struct xf_callback_func *cb, -+ void *private_data); -+int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer); -+int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer); -+int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer); -+ -+int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, -+ struct xf_callback_func *cb, -+ void *private_data); -+int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture); -+int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture); -+int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture); -+ -+#endif -diff --git a/sound/soc/adsp/xf-adsp-config.h b/sound/soc/adsp/xf-adsp-config.h -new file mode 100644 -index 0000000..818a46a ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-config.h -@@ -0,0 +1,604 @@ -+/** **************************************************************************** -+ *\file xf-adsp-config.h -+ *\brief Header file for ADSP configuration -+ *\addtogroup ADSP Driver -+ ******************************************************************************* -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ ******************************************************************************* -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_CONFIG_H -+#define __XF_ADSP_CONFIG_H -+ -+/* Equalizer definition */ -+#define XA_REL_EQZ_FILTER_NUM (9) /**< number of filter */ -+#define XA_REL_EQZ_GRAPHIC_BAND_NUM (5) /**< number of graphic band */ -+ -+struct xf_buffer { -+ void *address; -+ union { /* PRQA S 750 3 */ -+ struct xf_buffer *next; -+ struct xf_pool *pool; -+ } link; -+}; -+ -+struct xf_pool { -+ /* length of individual buffer in a pool */ -+ u32 length; -+ -+ /* number of buffer in a pool */ -+ u32 number; -+ -+ /* pointer to pool memory */ -+ void *p; -+ -+ /* pointer to first free buffer in a pool */ -+ struct xf_buffer *free; -+ -+ /* individual buffer */ -+ struct xf_buffer buffer[0]; /* PRQA S 1037 */ -+}; -+ -+struct xf_message { -+ /* pointer to the next item in the list */ -+ struct xf_message *next; -+ -+ /* shmem session_id */ -+ u32 id; -+ -+ /* operation code */ -+ u32 opcode; -+ -+ /* length of attached message buffer */ -+ u32 length; -+ -+ /* message buffer */ -+ void *buffer; -+}; -+ -+/******************************************************************************* -+ * XF_GET_PARAM message -+ ******************************************************************************/ -+ -+/* ...message body (command/response) */ -+union xf_get_param_msg { /* PRQA S 750 18 */ -+ /* ...command structure */ -+ struct { -+ /* ...array of parameters requested */ -+ u32 id[0]; /* PRQA S 1037 */ -+ -+ } __attribute__((__packed__)) c; -+ -+ /* ...response structure */ -+ struct { -+ /* ...array of parameters values */ -+ u32 value[0];/* PRQA S 1037 */ -+ -+ } __attribute__((__packed__)) r; -+ -+}; -+ -+/* ...length of the XF_GET_PARAM command/response */ -+/* PRQA S 3453 2 */ -+#define XF_GET_PARAM_CMD_LEN(params) (sizeof(u32) * (params)) -+#define XF_GET_PARAM_RSP_LEN(params) (sizeof(u32) * (params)) -+ -+/******************************************************************************* -+ * XF_SET_PARAM message -+ ******************************************************************************/ -+ -+/* ...component initialization parameter */ -+struct xf_set_param_item { -+ /* ...index of parameter passed to SET_CONFIG_PARAM call */ -+ u32 id; -+ -+ /* ...value of parameter */ -+ u32 value; -+ -+} __attribute__ ((__packed__)); -+ -+/* ...message body (no response message? - tbd) */ -+struct xf_set_param_msg { -+ /* ...command message */ -+ struct xf_set_param_item item[0]; /* PRQA S 1037 */ -+ -+} __attribute__ ((__packed__)); -+ -+/* ...length of the command message */ -+/* PRQA S 3453 */ -+#define XF_SET_PARAM_CMD_LEN(params) \ -+ (sizeof(struct xf_set_param_item) * (params)) -+ -+/******************************************************************************* -+ * XF_ROUTE definition -+ ******************************************************************************/ -+ -+/* ...port routing command */ -+struct xf_route_port_msg { -+ /* ...source port specification */ -+ u32 src; -+ -+ /* ...destination port specification */ -+ u32 dst; -+ -+ /* ...number of buffers to allocate */ -+ u32 alloc_number; -+ -+ /* ...length of buffer to allocate */ -+ u32 alloc_size; -+ -+ /* ...alignment restriction for a buffer */ -+ u32 alloc_align; -+ -+} __attribute__((__packed__)); -+ -+/******************************************************************************* -+ * XF_UNROUTE definition -+ ******************************************************************************/ -+ -+/* ...port unrouting command */ -+struct xf_unroute_port_msg { -+ /* ...source port specification */ -+ u32 src; -+ -+ /* ...destination port specification */ -+ u32 dst; -+ -+} __attribute__((__packed__)); -+ -+/* ...Capture states */ -+enum xa_capture_state { -+ XA_CAP_STATE_RUN = 0, -+ XA_CAP_STATE_IDLE = 1, -+ XA_CAP_STATE_PAUSE = 2 -+}; -+ -+/* ...Renderer states */ -+enum xa_renderer_state { -+ XA_RDR_STATE_RUN = 0, -+ XA_RDR_STATE_IDLE = 1, -+ XA_RDR_STATE_PAUSE = 2 -+}; -+ -+/******************************************************************************* -+ * Message routing composition - move somewhere else - tbd -+ ******************************************************************************/ -+ -+/* ...adjust IPC client of message going from user-space */ -+#define XF_MSG_AP_FROM_USER(id, client) \ -+ (((id) & ~(0xF << 2)) | ((client) << 2)) -+ -+/* ...wipe out IPC client from message going to user-space */ -+#define XF_MSG_AP_TO_USER(id) \ -+ ((id) & ~(0xF << 18)) -+ -+/* ...port specification (12 bits) */ -+#define __XF_PORT_SPEC(core, id, port) ((core) | ((id) << 2) | ((port) << 8)) -+#define __XF_PORT_SPEC2(id, port) ((id) | ((port) << 8)) -+#define XF_PORT_CORE(spec) ((spec) & 0x3) -+#define XF_PORT_CLIENT(spec) (((spec) >> 2) & 0x3F) -+#define XF_PORT_ID(spec) (((spec) >> 8) & 0xF) -+ -+/* ...message id contains source and destination ports specification */ -+#define __XF_MSG_ID(src, dst) (((src) & 0xFFFF) | (((dst) & 0xFFFF) << 16)) -+#define XF_MSG_SRC(id) (((id) >> 0) & 0xFFFF) -+#define XF_MSG_SRC_CORE(id) (((id) >> 0) & 0x3) -+#define XF_MSG_SRC_CLIENT(id) (((id) >> 2) & 0x3F) -+#define XF_MSG_SRC_PORT(id) (((id) >> 8) & 0xF) -+#define XF_MSG_SRC_PROXY(id) (((id) >> 15) & 0x1) -+#define XF_MSG_DST(id) (((id) >> 16) & 0xFFFF) -+#define XF_MSG_DST_CORE(id) (((id) >> 16) & 0x3) -+#define XF_MSG_DST_CLIENT(id) (((id) >> 18) & 0x3F) -+#define XF_MSG_DST_PORT(id) (((id) >> 24) & 0xF) -+#define XF_MSG_DST_PROXY(id) (((id) >> 31) & 0x1) -+ -+/* ...special treatment of AP-proxy destination field */ -+#define XF_AP_IPC_CLIENT(id) (((id) >> 18) & 0xF) -+#define XF_AP_CLIENT(id) (((id) >> 22) & 0x1FF) -+#define __XF_AP_PROXY(core) ((core) | 0x8000) -+#define __XF_DSP_PROXY(core) ((core) | 0x8000) -+#define __XF_AP_CLIENT(core, client) ((core) | ((client) << 6) | 0x8000) -+ -+/******************************************************************************* -+ * Opcode composition -+ ******************************************************************************/ -+ -+/* ...opcode composition with command/response data tags */ -+#define __XF_OPCODE(c, r, op) (((c) << 31) | ((r) << 30) | ((op) & 0x3F)) -+ -+/* ...accessors */ -+#define XF_OPCODE_CDATA(opcode) ((opcode) & (1 << 31)) -+#define XF_OPCODE_RDATA(opcode) ((opcode) & (1 << 30)) -+#define XF_OPCODE_TYPE(opcode) ((opcode) & (0x3F)) -+ -+/******************************************************************************* -+ * Opcode types -+ ******************************************************************************/ -+ -+/* ...unregister client */ -+#define XF_UNREGISTER __XF_OPCODE(0, 0, 0) -+ -+/* ...register client at proxy */ -+#define XF_REGISTER __XF_OPCODE(1, 0, 1) -+ -+/* ...port routing command */ -+#define XF_ROUTE __XF_OPCODE(1, 0, 2) -+ -+/* ...port unrouting command */ -+#define XF_UNROUTE __XF_OPCODE(1, 0, 3) -+ -+/* ...shared buffer allocation */ -+#define XF_ALLOC __XF_OPCODE(0, 0, 4) -+ -+/* ...shared buffer freeing */ -+#define XF_FREE __XF_OPCODE(0, 0, 5) -+ -+/* ...set component parameters */ -+#define XF_SET_PARAM __XF_OPCODE(1, 0, 6) -+ -+/* ...get component parameters */ -+#define XF_GET_PARAM __XF_OPCODE(1, 1, 7) -+ -+/* ...input buffer reception */ -+#define XF_EMPTY_THIS_BUFFER __XF_OPCODE(1, 0, 8) -+ -+/* ...output buffer reception */ -+#define XF_FILL_THIS_BUFFER __XF_OPCODE(0, 1, 9) -+ -+/* ...flush specific port */ -+#define XF_FLUSH __XF_OPCODE(0, 0, 10) -+ -+/* ...start component operation */ -+#define XF_START __XF_OPCODE(0, 0, 11) -+ -+/* ...stop component operation */ -+#define XF_STOP __XF_OPCODE(0, 0, 12) -+ -+/* ...pause component operation */ -+#define XF_PAUSE __XF_OPCODE(0, 0, 13) -+ -+/* ...resume component operation */ -+#define XF_RESUME __XF_OPCODE(0, 0, 14) -+ -+/* ...total amount of supported decoder commands */ -+#define __XF_OP_NUM (15) -+ -+/************************************************* -+ * Renderer - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_config_param_renderer { -+ XA_RDR_CONFIG_PARAM_STATE = 0, -+ XA_RDR_CONFIG_PARAM_PCM_WIDTH = 1, -+ XA_RDR_CONFIG_PARAM_CHANNELS = 2, -+ XA_RDR_CONFIG_PARAM_SAMPLE_RATE = 3, -+ XA_RDR_CONFIG_PARAM_FRAME_SIZE = 4, -+ XA_RDR_CONFIG_PARAM_OUTPUT1 = 5, -+ XA_RDR_CONFIG_PARAM_DMACHANNEL1 = 6, -+ XA_RDR_CONFIG_PARAM_OUTPUT2 = 7, -+ XA_RDR_CONFIG_PARAM_DMACHANNEL2 = 8, -+ XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 9, -+ XA_RDR_CONFIG_PARAM_VOLUME_RATE = 10, -+ XA_RDR_CONFIG_PARAM_OUT_CHANNELS = 11, -+ XA_RDR_CONFIG_PARAM_MIX_CONTROL = 12, -+ XA_RDR_CONFIG_PARAM_NUM = 13 -+}; -+ -+/************************************************* -+ * Capture - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_config_param_capture { -+ XA_CAP_CONFIG_PARAM_CB = 0, -+ XA_CAP_CONFIG_PARAM_STATE = 1, -+ XA_CAP_CONFIG_PARAM_PCM_WIDTH = 2, -+ XA_CAP_CONFIG_PARAM_CHANNELS = 3, -+ XA_CAP_CONFIG_PARAM_SAMPLE_RATE = 4, -+ XA_CAP_CONFIG_PARAM_FRAME_SIZE = 5, -+ XA_CAP_CONFIG_PARAM_INPUT1 = 6, -+ XA_CAP_CONFIG_PARAM_DMACHANNEL1 = 7, -+ XA_CAP_CONFIG_PARAM_INPUT2 = 8, -+ XA_CAP_CONFIG_PARAM_DMACHANNEL2 = 9, -+ XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 10, -+ XA_CAP_CONFIG_PARAM_VOLUME_RATE = 11, -+ XA_CAP_CONFIG_PARAM_NUM = 12 -+}; -+ -+/************************************************* -+ * Equalizer - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_rel_eqz_filter_type { -+ XA_REL_EQZ_TYPE_THROUGH = 0, -+ XA_REL_EQZ_TYPE_PEAK = 1, -+ XA_REL_EQZ_TYPE_BASS = 2, -+ XA_REL_EQZ_TYPE_TREBLE = 3 -+}; -+ -+enum xa_rel_eqz_type { -+ XA_REL_EQZ_TYPE_PARAMETRIC = 0, -+ XA_REL_EQZ_TYPE_GRAPHIC = 1 -+}; -+ -+/*****************************************************************************/ -+/* Additional subcommand indices */ -+/*****************************************************************************/ -+ -+enum xa_add_cmd_type_generic { -+ /* XA_API_CMD_SET_CONFIG_PARAM indices */ -+ XA_EQZ_CONFIG_PARAM_COEF_FS = 0x0000, -+ XA_EQZ_CONFIG_PARAM_PCM_WIDTH = 0x0001, -+ XA_EQZ_CONFIG_PARAM_CH = 0x0002, -+ XA_EQZ_CONFIG_PARAM_EQZ_TYPE = 0x0003, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC = 0x0010, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_FC = 0x0011, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_FC = 0x0012, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_FC = 0x0013, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_FC = 0x0014, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_FC = 0x0015, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_FC = 0x0016, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_FC = 0x0017, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_FC = 0x0018, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE = 0x0020, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_TYPE = 0x0021, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_TYPE = 0x0022, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_TYPE = 0x0023, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_TYPE = 0x0024, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_TYPE = 0x0025, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_TYPE = 0x0026, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_TYPE = 0x0027, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_TYPE = 0x0028, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW = 0x0030, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BW = 0x0031, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BW = 0x0032, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BW = 0x0033, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BW = 0x0034, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BW = 0x0035, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BW = 0x0036, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BW = 0x0037, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BW = 0x0038, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA = 0x0040, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_GA = 0x0041, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_GA = 0x0042, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_GA = 0x0043, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_GA = 0x0044, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_GA = 0x0045, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_GA = 0x0046, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_GA = 0x0047, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_GA = 0x0048, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA = 0x0050, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BA = 0x0051, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BA = 0x0052, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BA = 0x0053, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BA = 0x0054, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BA = 0x0055, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BA = 0x0056, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BA = 0x0057, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BA = 0x0058, -+ -+ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA = 0x0060, -+ XA_EQZ_CONFIG_PARAM_BAND_1_GCOEF_GA = 0x0061, -+ XA_EQZ_CONFIG_PARAM_BAND_2_GCOEF_GA = 0x0062, -+ XA_EQZ_CONFIG_PARAM_BAND_3_GCOEF_GA = 0x0063, -+ XA_EQZ_CONFIG_PARAM_BAND_4_GCOEF_GA = 0x0064 -+}; -+ -+/* ...tdm-renderer-specific configuration parameters */ -+enum xa_config_param_tdm_renderer { -+ XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH = 0, -+ XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE = 1, -+ XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE = 2, -+ XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE = 3, -+ XA_TDM_RDR_CONFIG_PARAM_OUTPUT1 = 4, -+ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1 = 5, -+ XA_TDM_RDR_CONFIG_PARAM_OUTPUT2 = 6, -+ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2 = 7, -+ XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, -+ XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE = 9 -+}; -+ -+enum xa_rel_tdm_renderer_channel_mode { -+ XA_TDM_RDR_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ -+ /**< 1 six-channels plus 1 two-channels TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_6_2 = 2, -+ XA_TDM_RDR_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ -+}; -+ -+/* ...TDM Capture-specific configuration parameters */ -+enum xa_config_param_tdm_capture { -+ XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH = 0, -+ XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE = 1, -+ XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE = 2, -+ XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE = 3, -+ XA_TDM_CAP_CONFIG_PARAM_INPUT1 = 4, -+ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1 = 5, -+ XA_TDM_CAP_CONFIG_PARAM_INPUT2 = 6, -+ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2 = 7, -+ XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, -+ XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE = 9 -+}; -+ -+enum xa_rel_tdm_capture_channel_mode { -+ XA_TDM_CAP_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ -+ /**< 1 six-channels plus 1 two-channels TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_6_2 = 2, -+ XA_TDM_CAP_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ -+}; -+ -+/*****************************************************************************/ -+/* HW supported */ -+/*****************************************************************************/ -+/* ...SSI modules supported by HW */ -+enum ssi_module { -+ SSI00 = 0, -+ SSI01 = 1, -+ SSI02 = 2, -+ SSI03 = 3, -+ SSI04 = 4, -+ SSI05 = 5, -+ SSI06 = 6, -+ SSI07 = 7, -+ SSI10 = 10, -+ SSI11 = 11, -+ SSI12 = 12, -+ SSI13 = 13, -+ SSI14 = 14, -+ SSI15 = 15, -+ SSI16 = 16, -+ SSI17 = 17, -+ SSI20 = 20, -+ SSI21 = 21, -+ SSI22 = 22, -+ SSI23 = 23, -+ SSI24 = 24, -+ SSI25 = 25, -+ SSI26 = 26, -+ SSI27 = 27, -+ SSI30 = 30, -+ SSI31 = 31, -+ SSI32 = 32, -+ SSI33 = 33, -+ SSI34 = 34, -+ SSI35 = 35, -+ SSI36 = 36, -+ SSI37 = 37, -+ SSI40 = 40, -+ SSI41 = 41, -+ SSI42 = 42, -+ SSI43 = 43, -+ SSI44 = 44, -+ SSI45 = 45, -+ SSI46 = 46, -+ SSI47 = 47, -+ SSI5 = 50, -+ SSI6 = 60, -+ SSI7 = 70, -+ SSI8 = 80, -+ SSI90 = 90, -+ SSI91 = 91, -+ SSI92 = 92, -+ SSI93 = 93, -+ SSI94 = 94, -+ SSI95 = 95, -+ SSI96 = 96, -+ SSI97 = 97 -+}; -+ -+/* ...SRC modules supported by HW */ -+enum src_module { -+ SRC0 = 110, /* SRC0 */ -+ SRC1 = 111, /* SRC1 */ -+ SRC2 = 112, /* SRC2 */ -+ SRC3 = 113, /* SRC3 */ -+ SRC4 = 114, /* SRC4 */ -+ SRC5 = 115, /* SRC5 */ -+ SRC6 = 116, /* SRC6 */ -+ SRC7 = 117, /* SRC7 */ -+ SRC8 = 118, /* SRC8 */ -+ SRC9 = 119, /* SRC9 */ -+ SRCMAX = 120 /* Maximum number of SRC modules */ -+}; -+ -+/* ...PDMA supported by HW */ -+enum { -+ PDMA_CH00 = 0, -+ PDMA_CH01 = 1, -+ PDMA_CH02 = 2, -+ PDMA_CH03 = 3, -+ PDMA_CH04 = 4, -+ PDMA_CH05 = 5, -+ PDMA_CH06 = 6, -+ PDMA_CH07 = 7, -+ PDMA_CH08 = 8, -+ PDMA_CH09 = 9, -+ PDMA_CH10 = 10, -+ PDMA_CH11 = 11, -+ PDMA_CH12 = 12, -+ PDMA_CH13 = 13, -+ PDMA_CH14 = 14, -+ PDMA_CH15 = 15, -+ PDMA_CH16 = 16, -+ PDMA_CH17 = 17, -+ PDMA_CH18 = 18, -+ PDMA_CH19 = 19, -+ PDMA_CH20 = 20, -+ PDMA_CH21 = 21, -+ PDMA_CH22 = 22, -+ PDMA_CH23 = 23, -+ PDMA_CH24 = 24, -+ PDMA_CH25 = 25, -+ PDMA_CH26 = 26, -+ PDMA_CH27 = 27, -+ PDMA_CH28 = 28, -+ PDMA_CHMAX = 29 -+}; -+ -+/* ...DMAC supported by HW */ -+enum { -+ ADMAC_CH00 = PDMA_CHMAX + 0, -+ ADMAC_CH01 = PDMA_CHMAX + 1, -+ ADMAC_CH02 = PDMA_CHMAX + 2, -+ ADMAC_CH03 = PDMA_CHMAX + 3, -+ ADMAC_CH04 = PDMA_CHMAX + 4, -+ ADMAC_CH05 = PDMA_CHMAX + 5, -+ ADMAC_CH06 = PDMA_CHMAX + 6, -+ ADMAC_CH07 = PDMA_CHMAX + 7, -+ ADMAC_CH08 = PDMA_CHMAX + 8, -+ ADMAC_CH09 = PDMA_CHMAX + 9, -+ ADMAC_CH10 = PDMA_CHMAX + 10, -+ ADMAC_CH11 = PDMA_CHMAX + 11, -+ ADMAC_CH12 = PDMA_CHMAX + 12, -+ ADMAC_CH13 = PDMA_CHMAX + 13, -+ ADMAC_CH14 = PDMA_CHMAX + 14, -+ ADMAC_CH15 = PDMA_CHMAX + 15, -+ ADMAC_CH16 = PDMA_CHMAX + 16, -+ ADMAC_CH17 = PDMA_CHMAX + 17, -+ ADMAC_CH18 = PDMA_CHMAX + 18, -+ ADMAC_CH19 = PDMA_CHMAX + 19, -+ ADMAC_CH20 = PDMA_CHMAX + 20, -+ ADMAC_CH21 = PDMA_CHMAX + 21, -+ ADMAC_CH22 = PDMA_CHMAX + 22, -+ ADMAC_CH23 = PDMA_CHMAX + 23, -+ ADMAC_CH24 = PDMA_CHMAX + 24, -+ ADMAC_CH25 = PDMA_CHMAX + 25, -+ ADMAC_CH26 = PDMA_CHMAX + 26, -+ ADMAC_CH27 = PDMA_CHMAX + 27, -+ ADMAC_CH28 = PDMA_CHMAX + 28, -+ ADMAC_CH29 = PDMA_CHMAX + 29, -+ ADMAC_CH30 = PDMA_CHMAX + 30, -+ ADMAC_CH31 = PDMA_CHMAX + 31, -+ ADMAC_CHMAX = PDMA_CHMAX + 32 -+}; -+ -+#endif --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch deleted file mode 100644 index ecab4120..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3ae5cb9feda031f660becc94f5496d5ee9b90e22 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Mon, 15 Oct 2018 17:57:56 +0700 -Subject: [PATCH 3/6] ADSP: add build for ADSP sound driver - -Signed-off-by: tienphitran ---- - sound/soc/Kconfig | 1 + - sound/soc/Makefile | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig -index c0abad2067e1..f5f6abbd6e14 100644 ---- a/sound/soc/Kconfig -+++ b/sound/soc/Kconfig -@@ -71,6 +71,7 @@ source "sound/soc/txx9/Kconfig" - source "sound/soc/ux500/Kconfig" - source "sound/soc/xtensa/Kconfig" - source "sound/soc/zte/Kconfig" -+source "sound/soc/adsp/Kconfig" - - # Supported codecs - source "sound/soc/codecs/Kconfig" -diff --git a/sound/soc/Makefile b/sound/soc/Makefile -index bf8c1e2ce0bf..6e77abba2b01 100644 ---- a/sound/soc/Makefile -+++ b/sound/soc/Makefile -@@ -52,3 +52,4 @@ obj-$(CONFIG_SND_SOC) += txx9/ - obj-$(CONFIG_SND_SOC) += ux500/ - obj-$(CONFIG_SND_SOC) += xtensa/ - obj-$(CONFIG_SND_SOC) += zte/ -+obj-$(CONFIG_SND_SOC) += adsp/ --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch deleted file mode 100644 index 6d95d65f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 825517f3f8ebe551d297db16e4582c0eae646f05 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Wed, 31 Oct 2018 16:12:36 +0700 -Subject: [PATCH 4/6] ADSP: integrate ADSP sound for H3, M3, M3N board - -Signed-off-by: tienphitran -[takeshi.kihara.df: fix W=1 dtc warning] -Signed-off-by: Takeshi Kihara ---- - arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 ++ - arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 ++ - arch/arm64/boot/dts/renesas/r8a77965.dtsi | 5 ++ - .../boot/dts/renesas/salvator-common.dtsi | 84 +++++++++++++++++-- - 4 files changed, 94 insertions(+), 5 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -index 1896e5250dff..8dfda0fda91c 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -@@ -793,6 +793,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -index c00d1da64198..726c0d07fe59 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -@@ -798,6 +798,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi -index 454a67b132f4..799b005ade92 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi -@@ -227,6 +227,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi -index 922b9cc4797c..2c1d49c4bcaa 100644 ---- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi -+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi -@@ -153,11 +153,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture", -+ "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -419,8 +435,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -731,6 +766,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -769,7 +843,7 @@ - rsnd_port0: port@0 { - reg = <0>; - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch deleted file mode 100644 index 34b32d8f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch +++ /dev/null @@ -1,272 +0,0 @@ -From 455f26d0de1cf6eaeb0aa5b58725e3e34d8d34bd Mon Sep 17 00:00:00 2001 -From: Nguyen Dang -Date: Tue, 6 Nov 2018 11:36:15 +0700 -Subject: [PATCH 5/6] ADSP: integrate ADSP sound for E3 board - -Signed-off-by: Nguyen Dang -[takeshi.kihara.df: fix W=1 dtc warning] -[takeshi.kihara.df: support for dt file separation by E3 ES1.0 SoC] -Signed-off-by: Takeshi Kihara ---- - .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 84 +++++++++++++++++-- - .../boot/dts/renesas/r8a77990-es10-ebisu.dts | 84 +++++++++++++++++-- - arch/arm64/boot/dts/renesas/r8a77990.dtsi | 5 ++ - 3 files changed, 163 insertions(+), 10 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -index 26081a6e1866..20fdb4085d87 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -@@ -221,11 +221,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture", -+ "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -501,8 +517,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -702,6 +737,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -737,7 +811,7 @@ - ports { - rsnd_port0: port@0 { - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; -diff --git a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -index 087d5533f3db..61e18309c4a4 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -+++ b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -@@ -221,11 +221,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture", -+ "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -501,8 +517,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -702,6 +737,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -737,7 +811,7 @@ - ports { - rsnd_port0: port@0 { - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; -diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi -index bd4d71e2b93e..845399adcbdb 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi -@@ -181,6 +181,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch deleted file mode 100644 index 3f601b64..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch +++ /dev/null @@ -1,101 +0,0 @@ -From acd7751ebcce90a442588f37fc6731990b5e09ea Mon Sep 17 00:00:00 2001 -From: Nguyen Dang -Date: Tue, 6 Nov 2018 11:46:25 +0700 -Subject: [PATCH v2 6/6] ADSP: remove HDMI support from rcar-sound - -Signed-off-by: Nguyen Dang -[takeshi.kihara.df: support for dt file separation by M3v3.0 SoC] -Signed-off-by: Takeshi Kihara ---- - arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 6 ------ - arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 6 ------ - arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 5 ----- - arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts | 5 ----- - arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts | 5 ----- - 5 files changed, 27 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -index 6928afbd8e06..b268afd7df85 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -@@ -104,12 +104,6 @@ - status = "okay"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1 /* HDMI0 */ -- &rsnd_port2>; /* HDMI1 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -index 498f78875dbd..b6ec3036e9fd 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -@@ -114,12 +114,6 @@ - status = "okay"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1 /* HDMI0 */ -- &rsnd_port2>; /* HDMI1 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -index cf92aa3939e3..4faf935c4a32 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -@@ -88,11 +88,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -index 664dc9250bbb..13960f69b2f7 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -@@ -96,11 +96,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -index 7d39dc96ac8a..1cd6f0463361 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -@@ -88,11 +88,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - --- -2.21.0 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb deleted file mode 100644 index 203ea19c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb +++ /dev/null @@ -1,38 +0,0 @@ -require recipes-kernel/linux-libc-headers/linux-libc-headers.inc -require include/iccom-control.inc -require include/adsp-control.inc - -RENESAS_BSP_URL = " \ - git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git" -BRANCH = "v4.14.75-ltsi/rcar-3.9.6" -SRCREV = "1d76a004d3a19367669b861559c1fbbf546b3065" - -SRC_URI = "${RENESAS_BSP_URL};branch=${BRANCH}" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -# Enable RPMSG_VIRTIO depend on ICCOM -SRC_URI_append = " \ - ${@oe.utils.conditional("USE_ICCOM", "1", " file://0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch", "", d)} \ -" - -# Add ADSP ALSA driver -SUPPORT_ADSP_ASOC = " \ - file://0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch \ - file://0002-ADSP-add-ADSP-sound-driver-source.patch \ - file://0003-ADSP-add-build-for-ADSP-sound-driver.patch \ - file://0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch \ - file://0005-ADSP-integrate-ADSP-sound-for-E3-board.patch \ - file://0006-ADSP-remove-HDMI-support-from-rcar-sound.patch \ -" - -SRC_URI_append = " \ - ${@oe.utils.conditional("USE_ADSP", "1", "${SUPPORT_ADSP_ASOC}", "", d)} \ -" - -S = "${WORKDIR}/git" - -# W/A Fix build issue with Linux v4.14 -SRC_URI_append = " \ - file://0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch deleted file mode 100644 index 765053fa..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5f378e5db591a4a119b6cface6037cbded240506 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Thu, 25 Oct 2018 13:25:10 +0700 -Subject: [PATCH 1/6] ADSP: add document for compatible string - "renesas,rcar_adsp_sound_gen3" - -Signed-off-by: tienphitran ---- - .../devicetree/bindings/sound/renesas,adsp.txt | 11 +++++++++++ - 1 file changed, 11 insertions(+) - create mode 100644 Documentation/devicetree/bindings/sound/renesas,adsp.txt - -diff --git a/Documentation/devicetree/bindings/sound/renesas,adsp.txt b/Documentation/devicetree/bindings/sound/renesas,adsp.txt -new file mode 100644 -index 000000000000..b529bcadea82 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/renesas,adsp.txt -@@ -0,0 +1,11 @@ -+Renesas ADSP sound driver -+ -+Required properties: -+- compatible : "renesas,rcar_adsp_sound_gen3" -+ -+Example: -+ -+rcar_adsp_sound: adsp_sound@0 { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+}; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch deleted file mode 100644 index 521631b0..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a0e2d5ab917de4d8fce6bed4a5c87b729be30ca7 Mon Sep 17 00:00:00 2001 -From: Mark Farrugia -Date: Sat, 1 Dec 2018 23:48:49 +1100 -Subject: [PATCH] Revert: ASoC: rsnd: ssi: wait maximum 5ms for status check - -By waiting only a maximum of 5ms, we break the Renesas -ADSP firmware's ability to access the SSI directly. -This functionality is currently used by the Fiberdyne DSP. - -Since we shouldn't use udelay() for 50us -(linux/Documentation/timers/timers-howto.txt), we instead increase -the loop length to 1024*10 (5ms*10=50ms). - -Signed-off-by: Mark Farrugia ---- - sound/soc/sh/rcar/ssi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c -index 9538f76f8e20..0395e33bebdd 100644 ---- a/sound/soc/sh/rcar/ssi.c -+++ b/sound/soc/sh/rcar/ssi.c -@@ -166,7 +166,7 @@ static void rsnd_ssi_status_check(struct rsnd_mod *mod, - u32 status; - int i; - -- for (i = 0; i < 1024; i++) { -+ for (i = 0; i < (10*1024); i++) { - status = rsnd_ssi_status_get(mod); - if (status & bit) - return; --- -2.17.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch deleted file mode 100644 index 9c38a327..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch +++ /dev/null @@ -1,61 +0,0 @@ -From a39cada70268aadff7153e4f782bcd90a5c69d07 Mon Sep 17 00:00:00 2001 -From: Hendrik Brueckner -Date: Mon, 4 Dec 2017 10:56:46 +0100 -Subject: [PATCH] arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT - program type - -Correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type -by exporting the user_pt_regs structure instead of the pt_regs structure -that is in-kernel only. - -Signed-off-by: Hendrik Brueckner -Reviewed-by: Thomas Richter -Acked-by: Alexei Starovoitov -Cc: Will Deacon -Cc: Mark Rutland -Cc: Arnaldo Carvalho de Melo -Signed-off-by: Daniel Borkmann ---- - arch/arm64/include/asm/perf_event.h | 2 ++ - arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ - 2 files changed, 11 insertions(+) - create mode 100644 arch/arm64/include/uapi/asm/bpf_perf_event.h - -diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h -index 8d5cbec..f9ccc36 100644 ---- a/arch/arm64/include/asm/perf_event.h -+++ b/arch/arm64/include/asm/perf_event.h -@@ -18,6 +18,7 @@ - #define __ASM_PERF_EVENT_H - - #include -+#include - - #define ARMV8_PMU_MAX_COUNTERS 32 - #define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1) -@@ -79,6 +80,7 @@ struct pt_regs; - extern unsigned long perf_instruction_pointer(struct pt_regs *regs); - extern unsigned long perf_misc_flags(struct pt_regs *regs); - #define perf_misc_flags(regs) perf_misc_flags(regs) -+#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs - #endif - - #define perf_arch_fetch_caller_regs(regs, __ip) { \ -diff --git a/arch/arm64/include/uapi/asm/bpf_perf_event.h b/arch/arm64/include/uapi/asm/bpf_perf_event.h -new file mode 100644 -index 0000000..b551b74 ---- /dev/null -+++ b/arch/arm64/include/uapi/asm/bpf_perf_event.h -@@ -0,0 +1,9 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ -+#define _UAPI__ASM_BPF_PERF_EVENT_H__ -+ -+#include -+ -+typedef struct user_pt_regs bpf_user_pt_regs_t; -+ -+#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */ --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch deleted file mode 100644 index 8c0a2af7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1cdbf4ed4717eefa2b6237c1e63e351b62990522 Mon Sep 17 00:00:00 2001 -From: Dien Pham -Date: Fri, 23 Feb 2018 18:29:32 +0700 -Subject: [PATCH] rpmsg: Add message to be able to configure RPMSG_VIRTIO from - defconfig - -Signed-off-by: Dien Pham ---- - drivers/rpmsg/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/rpmsg/Kconfig b/drivers/rpmsg/Kconfig -index 0fe6eac..5b1e61b 100644 ---- a/drivers/rpmsg/Kconfig -+++ b/drivers/rpmsg/Kconfig -@@ -47,7 +47,7 @@ config RPMSG_QCOM_SMD - platforms. - - config RPMSG_VIRTIO -- tristate -+ tristate "Enable remote processor message and virtual I/O configure" - select RPMSG - select VIRTIO - --- -1.9.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch deleted file mode 100644 index 14719fba..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch +++ /dev/null @@ -1,7204 +0,0 @@ -From 829c17a722611c39cda6926f0fac46fa586c70ef Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Mon, 17 Jun 2019 17:04:02 +0700 -Subject: [PATCH 2/6] ADSP: add ADSP sound driver source - -Signed-off-by: tienphitran - -diff --git a/include/adsp_drv/xf-adsp-drv-ext.h b/include/adsp_drv/xf-adsp-drv-ext.h -new file mode 100644 -index 0000000..6c3dbc0 ---- /dev/null -+++ b/include/adsp_drv/xf-adsp-drv-ext.h -@@ -0,0 +1,58 @@ -+/***************************************************************************** -+ * \file xf-adsp-driver-ext.h -+ * \brief Header file for ADSP driver extension part -+ * \addtogroup ADSP Driver -+ ****************************************************************************** -+ * \date Oct. 21, 2017 -+ * \author Renesas Electronics Corporation -+ ****************************************************************************** -+ * \par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_DRV_EXT_H -+#define __XF_ADSP_DRV_EXT_H -+ -+/*********************************************************** -+ * Extension client APIs -+ * ********************************************************/ -+ -+struct xf_adsp_base_cmd { -+ /* register new client for ADSP base control */ -+ int (*client_register)(void **private_data); -+ /* unregister client */ -+ int (*client_unregister)(void *private_data); -+ /* get data from proxy */ -+ int (*recv)(void *private_data, void *buf); -+ /* send data to proxy */ -+ int (*send)(void *private_data, void *buf); -+ /* wait the valid message in the response queue */ -+ int (*poll)(void *private_data, int *condition); -+}; -+ -+/* create ADSP base control data */ -+int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd); -+ -+/* destroy ADSP base control data */ -+int xf_adsp_base_destroy(void); -+ -+#endif -diff --git a/sound/soc/adsp/Kconfig b/sound/soc/adsp/Kconfig -new file mode 100644 -index 0000000..605261f ---- /dev/null -+++ b/sound/soc/adsp/Kconfig -@@ -0,0 +1,14 @@ -+## SoC for ADSP driver configuration -+menu "ASoC ADSP driver" -+ -+config SND_SOC_ADSP -+ tristate "SoC Audio for R-Car ADSP" -+ select SND_SIMPLE_CARD -+ select SND_SIMPLE_SCU_CARD -+ select SND_AUDIO_GRAPH_CARD -+ select SND_AUDIO_GRAPH_SCU_CARD -+ default y -+ help -+ This option enables ALSA ADSP sound supports ADSP module -+ -+endmenu -diff --git a/sound/soc/adsp/Makefile b/sound/soc/adsp/Makefile -new file mode 100644 -index 0000000..8277fdb ---- /dev/null -+++ b/sound/soc/adsp/Makefile -@@ -0,0 +1,3 @@ -+## Makefile for SoC ADSP driver -+snd-soc-adsp-objs := xf-adsp-alsa.o xf-adsp-base.o -+obj-$(CONFIG_SND_SOC_ADSP) += snd-soc-adsp.o -diff --git a/sound/soc/adsp/xf-adsp-alsa.c b/sound/soc/adsp/xf-adsp-alsa.c -new file mode 100644 -index 0000000..493ff84 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-alsa.c -@@ -0,0 +1,3939 @@ -+/** *************************************************************************** -+ * \file xf-adsp-alsa.c -+ * \brief Source file for ADSP ALSA Driver -+ * \addtogroup ADSP Driver -+ ****************************************************************************** -+ * \date Oct. 21, 2017 -+ * \author Renesas Electronics Corporation -+ ****************************************************************************** -+ * \par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ *****************************************************************************/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "xf-adsp-base.h" -+ -+/* Name of Volume control for playback */ -+#define PLAYBACK_VOLUME_CTR_NAME "PlaybackVolume" -+ -+/* Name of Volume control for capture */ -+#define CAPTURE_VOLUME_CTR_NAME "CaptureVolume" -+ -+/* Name of Sample Rate control for playback */ -+#define PLAYBACK_OUT_RATE_CTR_NAME "PlaybackOutRate" -+ -+/* Name of Output Channel control for playback */ -+#define PLAYBACK_OUT_CHANNEL_CTR_NAME "PlaybackOutChannel" -+ -+/* Name of Sample Rate control for capture */ -+#define CAPTURE_IN_RATE_CTR_NAME "CaptureInRate" -+ -+/* Name of Equalizer parameters control for playback */ -+#define PLAYBACK_EQZ_CTR_NAME "PlaybackEQZControl" -+ -+/* Name of Equalizer parameters control for capture */ -+#define CAPTURE_EQZ_CTR_NAME "CaptureEQZControl" -+ -+/* Name of Equalizer Switch control for playback */ -+#define PLAYBACK_EQZ_SWITCH_CTR_NAME "PlaybackEQZSwitch" -+ -+/* Name of Equalizer Switch control for capture */ -+#define CAPTURE_EQZ_SWITCH_CTR_NAME "CaptureEQZSwitch" -+ -+/* Name of Volume control for TDM playback */ -+#define TDM_PLAYBACK_VOLUME_CTR_NAME "TDMPlaybackVolume" -+ -+/* Name of Volume control for TDM capture */ -+#define TDM_CAPTURE_VOLUME_CTR_NAME "TDMCaptureVolume" -+ -+/* Name of Sample Rate control for TDM playback */ -+#define TDM_PLAYBACK_OUT_RATE_CTR_NAME "TDMPlaybackOutRate" -+ -+/* Name of Sample Rate control for TDM capture */ -+#define TDM_CAPTURE_IN_RATE_CTR_NAME "TDMCaptureInRate" -+ -+/* Prefix of Playback control name */ -+#define PREFIX_OF_PLAYBACK_CTR_NAME PLAYBACK_VOLUME_CTR_NAME[0] -+ -+/* Prefix of Capture control name */ -+#define PREFIX_OF_CAPTURE_CTR_NAME CAPTURE_VOLUME_CTR_NAME[0] -+ -+/* Prefix of TDM control name */ -+#define PREFIX_OF_TDM_CTR_NAME TDM_PLAYBACK_VOLUME_CTR_NAME[0] -+ -+/* Prefix of TDM playback */ -+#define TDM_PLAYBACK TDM_PLAYBACK_VOLUME_CTR_NAME[3] -+ -+/* Prefix of TDM record */ -+#define TDM_CAPTURE TDM_CAPTURE_VOLUME_CTR_NAME[3] -+ -+/* Number of control for playback & capture */ -+#define RDR_CONTROL_NUM (9) -+ -+/* Number of controls for TDM */ -+#define TDM_CONTROL_NUM (4) -+ -+/* Indicate playback stream */ -+#define DIRECT_PLAYBACK (0) -+ -+/* Indicate capture stream */ -+#define DIRECT_CAPTURE (1) -+ -+/* Indicate stream number */ -+#define DIRECT_NUM (2) -+ -+/* Supported frame size for playback/record function in driver */ -+#define FRAME_SIZE (1024) -+ -+/* Supported frame size for TDM playback/record function in driver */ -+#define TDM_FRAME_SIZE (1024) -+ -+/* Supported sample rate in driver */ -+#define SND_ADSP_SAMPLE_RATES (SNDRV_PCM_RATE_32000 | \ -+ SNDRV_PCM_RATE_44100 | \ -+ SNDRV_PCM_RATE_48000) -+ -+/* Supported PCM width in driver */ -+#define SND_ADSP_PCM_WIDTHS (SNDRV_PCM_FMTBIT_S16_LE | \ -+ SNDRV_PCM_FMTBIT_S24_LE) -+ -+/* Macro to control DAI index */ -+/* DAI 0 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX0 (0) -+ -+/* DAI 1 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX1 (1) -+ -+/* DAI 2 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX2 (2) -+ -+/* DAI 3 index for playback/record functions of stereo/mono formats */ -+#define RDR_DAI_IDX3 (3) -+ -+/* DAI 4 index for playback/record functions of TDM formats */ -+#define TDM_DAI_IDX (4) -+ -+/* Maximum number of DAI supported by driver */ -+#define MAX_DAI_IDX (5) -+ -+/* Renderer/Capture software information */ -+/* Minimum channel number supported */ -+#define MIN_CHANNEL (1) -+ -+/* Maximum channel number supported */ -+#define MAX_CHANNEL (2) -+ -+/* Minimum buffer size in byte */ -+#define MIN_BUF_SIZE (FRAME_SIZE * MIN_CHANNEL * 2) -+ -+/* Maximum buffer size in byte */ -+#define MAX_BUF_SIZE (FRAME_SIZE * MAX_CHANNEL * 4) -+ -+/* Minimum numbers of period in the buffer */ -+#define MIN_PERIOD (1) -+ -+/* Maximum numbers of period in the buffer */ -+#define MAX_PERIOD (4) -+ -+/* Maximun numbers of bytes in ALSA buffer */ -+#define MAX_BUFFER_BYTES (MAX_PERIOD * MAX_BUF_SIZE) -+ -+/* TDM software information */ -+/*< Minimum channel number supported in TDM plugin */ -+#define TDM_MIN_CHANNEL (6) -+ -+/* Maximum channel number supported in TDM plugin */ -+#define TDM_MAX_CHANNEL (8) -+ -+/* Minimum buffer size in byte for TDM format */ -+#define TDM_MIN_BUF_SIZE (TDM_FRAME_SIZE * TDM_MIN_CHANNEL * 2) -+ -+/* Maximum buffer size in byte for TDM format */ -+#define TDM_MAX_BUF_SIZE (TDM_FRAME_SIZE * TDM_MAX_CHANNEL * 4) -+ -+/* Minimum numbers of period in the buffer for TDM format */ -+#define TDM_MIN_PERIOD (1) -+ -+/* Maximum numbers of period in the buffer for TDM format */ -+#define TDM_MAX_PERIOD (4) -+ -+/* Maximum numbers of bytes in ALSA buffer for TDM format */ -+#define TDM_MAX_BUFFER_BYTES (TDM_MAX_PERIOD * TDM_MAX_BUF_SIZE) -+ -+/* Volume scale used when user set */ -+#define VOLUME_SCALE (100) -+ -+/* Maximum element in Equalizer parameter control */ -+#define MAX_EQZ_PARAM_NUMBER (55) -+ -+/* Equalizer control is disabled */ -+#define EQZ_OFF (0) -+ -+/* Equalizer control is enabled */ -+#define EQZ_ON (1) -+ -+/* Component status */ -+/* Handle state is NULL */ -+#define XF_HANDLE_NULL (0) -+ -+/* Handle state is CREATED after creating handle successfully */ -+#define XF_HANDLE_CREATED BIT(0) -+ -+/* Handle state is READY after finishing handle init */ -+#define XF_HANDLE_READY BIT(1) -+ -+/* channels */ -+/* Mono stream */ -+#define MONAURAL (1) -+ -+/* Stereo stream */ -+#define STEREO (2) -+ -+/* define number of bytes in a sample of 24 bits format types */ -+/* store 24 bits data in 4 bytes LE */ -+#define FMTBIT_S24_LE_BYTES_PER_SAMPLE (4) -+ -+/* store 24 bits data in 3 bytes LE */ -+#define FMTBIT_S24_3LE_BYTES_PER_SAMPLE (3) -+ -+/* helper macro to get bytes per sample number */ -+#define BYTES_PER_SAMPLE(fmt) (FMTBIT_##fmt##_BYTES_PER_SAMPLE) -+ -+/* check component is created */ -+#define COMPONENT_IS_CREATED(n) (((n & XF_HANDLE_CREATED) != 0) ? TRUE : FALSE) -+ -+/* check component is ready */ -+#define COMPONENT_IS_READY(n) (((n & XF_HANDLE_READY) != 0) ? TRUE : FALSE) -+ -+/* indicator of stream order */ -+#define MIX_UNUSED (0) -+#define FIRST_RUN (2) -+#define SECOND_RUN (1) -+ -+/* check MIX usage */ -+#define MIX_ENABLED(mix_ctl) ((mix_ctl == SECOND_RUN) ? TRUE : FALSE) -+ -+/******************************************************************* -+ * base structures for ADSP ALSA driver -+ * ****************************************************************/ -+ -+/** \struct snd_adsp_control -+ * \brief Structure stores parameters from user -+ */ -+struct snd_adsp_control { -+ /* Volume rate for playback/record */ -+ int vol_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Volume rate for TDM playback/TDM record */ -+ int tdm_vol_rate[DIRECT_NUM]; -+ -+ /* Out sample rate with Renderer, in sample rate with Capture */ -+ int sample_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Out sample rate for TDM Renderer, in sample rate for TDM Capture */ -+ int tdm_sample_rate[DIRECT_NUM]; -+ -+ /* Output channel of playback */ -+ int rdr_out_ch[MAX_DAI_IDX - 1]; -+ -+ /* Equalizer parameters */ -+ struct xf_adsp_equalizer_params eqz_params[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Equalizer switch */ -+ int eqz_switch[DIRECT_NUM][MAX_DAI_IDX - 1]; -+ -+ /* Indicator of MIX usage */ -+ int mix_usage; -+}; -+ -+/** \struct snd_adsp_base_info -+ * \brief Structure stores some base information of a stream -+ */ -+struct snd_adsp_base_info { -+ /* high resolution timer data */ -+ struct hrtimer hrtimer; -+ -+ /* kernel time value in nanosecond */ -+ ktime_t ktime; -+ -+ /* save interrupt state before getting lock */ -+ unsigned long flag; -+ -+ /* high resolution timer state */ -+ int hrt_state; -+ -+ /* target handle id of ALSA driver */ -+ int handle_id; -+ -+ /* data buffer */ -+ char *buffer[XF_BUF_POOL_SIZE]; -+ -+ /* size of each allocated data buffer */ -+ int buf_bytes; -+ -+ /* data index of buffer */ -+ int buf_idx; -+ -+ /* queue index of buffer */ -+ int buf_queue; -+ -+ /* HW index in bytes */ -+ int hw_idx; -+ -+ /* number of bytes in a period */ -+ int period_bytes; -+ -+ /* substream runtime object */ -+ struct snd_pcm_substream *substream; -+ -+ /* indirect PCM data transfer */ -+ struct snd_pcm_indirect pcm_indirect; -+ -+ /* spinlock data */ -+ spinlock_t lock; -+ -+ /* runtime error indicator */ -+ int runtime_err; -+}; -+ -+/** \struct snd_adsp_playback -+ * \brief Structure stores data for playback function -+ */ -+struct snd_adsp_playback { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* Renderer component data */ -+ struct xf_adsp_renderer *renderer; -+ -+ /* Equalizer component data */ -+ struct xf_adsp_equalizer *equalizer; -+ -+ /* Renderer component state */ -+ int rdr_state; -+ -+ /* Equalizer component state */ -+ int eqz_state; -+}; -+ -+/** \struct snd_adsp_record -+ * \brief Structure stores data for record function -+ */ -+struct snd_adsp_record { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* Capture component data */ -+ struct xf_adsp_capture *capture; -+ -+ /* Equalizer component data */ -+ struct xf_adsp_equalizer *equalizer; -+ -+ /* Capture component state */ -+ int cap_state; -+ -+ /* Equalizer component state */ -+ int eqz_state; -+}; -+ -+/** \struct snd_adsp_tdm_playback -+ * \brief Structure stores data for TDM playback function -+ */ -+struct snd_adsp_tdm_playback { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* TDM Renderer component data */ -+ struct xf_adsp_tdm_renderer *tdm_renderer; -+ -+ /* TDM Renderer component state */ -+ int state; -+}; -+ -+/** \struct snd_adsp_tdm_record -+ * \brief Structure stores data for TDM record function -+ */ -+struct snd_adsp_tdm_record { -+ /* base information of stream */ -+ struct snd_adsp_base_info base; -+ -+ /* TDM Capture component data */ -+ struct xf_adsp_tdm_capture *tdm_capture; -+ -+ /* TDM Capture component state */ -+ int state; -+}; -+ -+/** \struct snd_adsp_card -+ * \brief Structure stores data for ALSA sound card -+ */ -+struct snd_adsp_card { -+ /* playback data */ -+ struct snd_adsp_playback *playback[MAX_DAI_IDX - 1]; -+ -+ /* record data */ -+ struct snd_adsp_record *record[MAX_DAI_IDX - 1]; -+ -+ /* TDM playback data */ -+ struct snd_adsp_tdm_playback *tdm_playback; -+ -+ /* TDM record data */ -+ struct snd_adsp_tdm_record *tdm_record; -+ -+ /* Structure contains params information for control */ -+ struct snd_adsp_control ctr_if; -+}; -+ -+/** HW configuration of ALSA ADSP card for Renderer/Capture */ -+static struct snd_pcm_hardware snd_pcm_adsp_hw = { -+ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ -+ | SNDRV_PCM_INFO_RESUME -+ | SNDRV_PCM_INFO_BLOCK_TRANSFER -+ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), -+ .formats = SND_ADSP_PCM_WIDTHS, -+ .rates = SND_ADSP_SAMPLE_RATES, -+ .rate_min = 32000, -+ .rate_max = 48000, -+ .channels_min = MIN_CHANNEL, -+ .channels_max = MAX_CHANNEL, -+ -+ /* maximum buffer size in bytes */ -+ .buffer_bytes_max = MAX_BUFFER_BYTES, -+ -+ /* minimum size of the periods (frame) in bytes */ -+ .period_bytes_min = MIN_BUF_SIZE, -+ -+ /* maximum size of the periods (frame) in bytes */ -+ .period_bytes_max = MAX_BUF_SIZE, -+ -+ /* minimum periods (frames) in a buffer */ -+ .periods_min = MIN_PERIOD, -+ -+ /* maximum periods (frames) in a buffer */ -+ .periods_max = MAX_PERIOD, -+}; -+ -+/* HW configuration of ALSA ADSP card for TDM */ -+static struct snd_pcm_hardware snd_pcm_adsp_tdm_hw = { -+ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ -+ | SNDRV_PCM_INFO_RESUME -+ | SNDRV_PCM_INFO_BLOCK_TRANSFER -+ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), -+ .formats = SND_ADSP_PCM_WIDTHS, -+ .rates = SND_ADSP_SAMPLE_RATES, -+ .rate_min = 32000, -+ .rate_max = 48000, -+ .channels_min = TDM_MIN_CHANNEL, -+ .channels_max = TDM_MAX_CHANNEL, -+ -+ /* maximum buffer size in bytes */ -+ .buffer_bytes_max = TDM_MAX_BUFFER_BYTES, -+ -+ /* minimum size of the periods (frame) in bytes */ -+ .period_bytes_min = TDM_MIN_BUF_SIZE, -+ -+ /* maximum size of the periods (frame) in bytes */ -+ .period_bytes_max = TDM_MAX_BUF_SIZE, -+ -+ /* minimum periods (frames) in a buffer */ -+ .periods_min = TDM_MIN_PERIOD, -+ -+ /* maximum periods (frames) in a buffer */ -+ .periods_max = TDM_MAX_PERIOD, -+}; -+ -+/******************************************************************* -+ * function declaration -+ * ****************************************************************/ -+ -+static int -+snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer); -+static int -+snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream); -+static void * -+snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream); -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream); -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_hrt(struct hrtimer *hrt); -+static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt); -+static int snd_adsp_playback_init(struct snd_adsp_playback **data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_record_init(struct snd_adsp_record **data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_record_prepare(struct snd_adsp_record *record, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback); -+static int snd_adsp_record_deinit(struct snd_adsp_record *record); -+static int snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **data, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **data, -+ struct snd_pcm_substream *substream); -+static int -+snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, -+ struct snd_pcm_substream *substream); -+static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, -+ struct snd_pcm_substream *substream); -+static int -+snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback); -+static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record); -+static int snd_adsp_pcm_open(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_close(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *hw_params); -+static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx); -+static snd_pcm_uframes_t -+snd_adsp_pcm_pointer(struct snd_pcm_substream *substream); -+static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream); -+static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, -+ struct snd_pcm_indirect *rec, size_t bytes); -+static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int -+snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo); -+static int -+snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static int -+snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol); -+static void snd_adsp_get_eqz_params_from_control( -+ struct xf_adsp_equalizer_params *eqz_params, -+ struct xf_adsp_equalizer_params *eqz_ctr_params, -+ bool flag); -+static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime); -+static int snd_adsp_probe(struct platform_device *pdev); -+static int snd_adsp_remove(struct platform_device *pdev); -+ -+/******************************************************************* -+ * callback function of ADSP control interface -+ * ****************************************************************/ -+/** ************************************************************************** -+ * \brief event handler callback to notify error from ADSP -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_event_handler(void *data) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) -+ base->runtime_err = TRUE; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief empty buf done callback for playback/TDM playback functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->buf_queue++; -+ base->hw_idx += length; /* increase the DMA buffer index */ -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief fill buf done callback for playback/TDM playback functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief empty buf done callback for record/TDM record functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief fill buf done callback for record/TDM record functions -+ * -+ * \param[in] data Pointer to ADSP ALSA sound card -+ * \param[in] opcode Opcode of message -+ * \param[in] length Length of data buffer -+ * \param[in] buffer Pointer to data buffer -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer) -+{ -+ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; -+ -+ if (base) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->buf_queue++; -+ base->hw_idx += length; /* increase the DMA buffer index */ -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ return 0; -+} -+ -+/** callback functions for playback/TDM playback */ -+static struct xf_callback_func rdr_callbacks = /* PRQA S 3218 */ -+{ -+ .empty_buf_done = &snd_adsp_rdr_empty_buf_done, /* PRQA S 1053 2 */ -+ .fill_buf_done = &snd_adsp_rdr_fill_buf_done, -+ .event_handler = &snd_adsp_event_handler -+}; -+ -+/** callback functions for record/TDM record */ -+static struct xf_callback_func cap_callbacks = /* PRQA S 3218 */ -+{ -+ .empty_buf_done = &snd_adsp_cap_empty_buf_done, /* PRQA S 1053 2 */ -+ .fill_buf_done = &snd_adsp_cap_fill_buf_done, -+ .event_handler = &snd_adsp_event_handler -+}; -+ -+/******************************************************************* -+ * helper functions to get some internal data -+ * ****************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Get current index of CPU DAI from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval id Index of current CPU DAI -+ *****************************************************************************/ -+static int -+snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd; -+ -+ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; -+ return rtd->cpu_dai->id; -+} -+ -+/** ************************************************************************** -+ * \brief Get ADSP ALSA driver's data from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval pointer Pointer to driver's data -+ *****************************************************************************/ -+static void * -+snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_soc_pcm_runtime *rtd; -+ -+ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; -+ return snd_soc_dai_get_drvdata(rtd->cpu_dai); -+} -+ -+/** ************************************************************************** -+ * \brief Get base's data of playback/record from runtime data of substream -+ * -+ * \param[in] substream Pointer to PCM stream data -+ * \retval pointer Pointer to playback/record's base data -+ *****************************************************************************/ -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ struct snd_adsp_base_info *base; -+ int dai_idx; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ -+ /* get DAI index of substream */ -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ -+ /* get base data of the substream */ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ base = !adsp_card->playback[dai_idx] ? -+ NULL : &adsp_card->playback[dai_idx]->base; -+ } else { -+ base = !adsp_card->record[dai_idx] ? -+ NULL : &adsp_card->record[dai_idx]->base; -+ } -+ } else { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ base = !adsp_card->tdm_playback ? -+ NULL : &adsp_card->tdm_playback->base; -+ } else { -+ base = !adsp_card->tdm_record ? -+ NULL : &adsp_card->tdm_record->base; -+ } -+ } -+ -+ return base; -+} -+ -+/** *************************************************************************** -+ * \brief Get playback/record/TDM playback/TDM record's base data -+ * from hr timer data -+ * -+ * \param[in] hrt Pointer to hr timer data -+ * \retval pointer Pointer to playback/record's base data -+ *****************************************************************************/ -+static struct snd_adsp_base_info * -+snd_adsp_get_base_from_hrt(struct hrtimer *hrt) -+{ -+ return (struct snd_adsp_base_info *)hrt; -+} -+ -+/***************************************************************************** -+ * hrtimer interrupt function -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Interrupt function of high resolution timer -+ * -+ * \param[in] hrt Pointer to hr timer data -+ * \retval HRTIMER_RESTART Restart the timer after expire time -+ *****************************************************************************/ -+static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt) -+{ -+ struct snd_adsp_base_info *base = snd_adsp_get_base_from_hrt(hrt); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ if (base->hw_idx != 0) { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ /* update PCM status for the next period */ -+ snd_pcm_period_elapsed(base->substream); -+ } else { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ hrtimer_forward_now(hrt, base->ktime); -+ -+ return HRTIMER_RESTART; -+} -+ -+/***************************************************************************** -+ * internal functions to manage playback and record functions -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Initialize playback data -+ * -+ * \param[out] playback_data Pointer to store playback data -+ * \param[in] eqz_flag Flag to indicate equalizer usage -+ * \param[in] substream Pointer to substream data -+ * \retval EINVAL Failed to initialize playback data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_init(struct snd_adsp_playback **playback_data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_playback *playback; -+ -+ /* allocate memory for playback data */ -+ playback = kmalloc(sizeof(*playback), GFP_KERNEL); -+ if (!playback) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(playback, 0, sizeof(struct snd_adsp_playback)); -+ -+ /* save the playback data */ -+ *playback_data = playback; -+ -+ /* set handle state as NULL state */ -+ playback->rdr_state = XF_HANDLE_NULL; -+ playback->eqz_state = XF_HANDLE_NULL; -+ playback->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register renderer component */ -+ if (xf_adsp_renderer_create(&playback->renderer, -+ &rdr_callbacks, -+ (void *)&playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark renderer component created */ -+ playback->rdr_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as renderer ID */ -+ playback->base.handle_id = playback->renderer->handle_id; -+ -+ if (eqz_flag == EQZ_ON) { -+ /* create equalizer component when equalizer is used */ -+ if (xf_adsp_equalizer_create(&playback->equalizer, -+ &rdr_callbacks, -+ (void *)&playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark equalizer component created */ -+ playback->eqz_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as equalizer ID */ -+ playback->base.handle_id = playback->equalizer->handle_id; -+ } -+ -+ /* init lock */ -+ spin_lock_init(&playback->base.lock); -+ -+ /* save the substream data */ -+ playback->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&playback->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ playback->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ playback->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Initialize record data -+ * -+ * \param[out] record_data Pointer to store record data -+ * \param[in] eqz_flag Flag to indicate equalizer usage -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize record data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_init(struct snd_adsp_record **record_data, -+ int eqz_flag, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_record *record; -+ -+ /* allocate memory for record data */ -+ record = kmalloc(sizeof(*record), GFP_KERNEL); -+ if (!record) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(record, 0, sizeof(struct snd_adsp_record)); -+ -+ /* save the record data */ -+ *record_data = record; -+ -+ /* set handle state as NULL state */ -+ record->cap_state = XF_HANDLE_NULL; -+ record->eqz_state = XF_HANDLE_NULL; -+ record->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register capture component */ -+ if (xf_adsp_capture_create(&record->capture, -+ &cap_callbacks, -+ (void *)&record->base) < 0) -+ return -EINVAL; -+ -+ /* mark capture component created */ -+ record->cap_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as capture ID */ -+ record->base.handle_id = record->capture->handle_id; -+ -+ /* create equalizer component in case of it being used */ -+ if (eqz_flag == EQZ_ON) { -+ if (xf_adsp_equalizer_create(&record->equalizer, -+ &cap_callbacks, -+ (void *)&record->base) < 0) -+ return -EINVAL; -+ -+ /* mark equalizer component created */ -+ record->eqz_state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as equalizer ID */ -+ record->base.handle_id = record->equalizer->handle_id; -+ } -+ -+ /* init lock */ -+ spin_lock_init(&record->base.lock); -+ -+ /* save the substream data */ -+ record->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&record->base.hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ record->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ record->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare playback function -+ * -+ * \param[out] playback Pointer to playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, hw_buffer_size; -+ int out_rate; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_renderer *renderer; -+ struct xf_adsp_equalizer *equalizer; -+ struct snd_adsp_base_info *base; -+ int i; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ renderer = playback->renderer; -+ equalizer = playback->equalizer; -+ base = &playback->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ ch = runtime->channels; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ vol_rate = ctr_if->vol_rate[DIRECT_PLAYBACK][dai_idx]; -+ out_rate = ctr_if->sample_rate[DIRECT_PLAYBACK][dai_idx]; -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = (base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* it should equal to a period size in bytes */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes; -+ -+ /* set parameters when Renderer is not ready */ -+ if (COMPONENT_IS_READY(playback->rdr_state) == FALSE) { -+ struct xf_adsp_renderer_params *params = &renderer->params; -+ -+ /* apply renderer parameters */ -+ params->in_rate = fs; -+ params->channel = ch; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ if (ctr_if->mix_usage == SECOND_RUN) -+ params->mix_ctrl = ctr_if->mix_usage; -+ else -+ params->mix_ctrl = MIX_UNUSED; -+ -+ /* set flow as ADSP->PDMA0->SRC0->PDMA1->SSI0 */ -+ params->dev1 = SRC0; -+ params->dev2 = SSI00; -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ -+ /* when MIX is enabled, change to DMAC transfer type to save */ -+ /* hw FIFO */ -+ if (MIX_ENABLED(params->mix_ctrl) == TRUE) -+ params->dma1 = ADMAC_CH01; -+ -+ /* set volume rate if it is set by user or default value */ -+ /* is 100% */ -+ if (vol_rate >= 0) -+ params->vol_rate = vol_rate; -+ else -+ params->vol_rate = (1 << 20); -+ -+ /* set output channel if it is set by user */ -+ if (ctr_if->rdr_out_ch[dai_idx] >= MONAURAL) -+ params->out_channel = ctr_if->rdr_out_ch[dai_idx]; -+ else -+ params->out_channel = params->channel; -+ -+ /* set sample rate output if it is set by user */ -+ if (out_rate >= 0) -+ params->out_rate = out_rate; -+ -+ /* set parameters to ADSP Renderer plugin */ -+ if (xf_adsp_renderer_set_params(renderer) != 0) -+ return -EINVAL; -+ -+ /* allocate buffer pool to prepare the execution */ -+ renderer->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(renderer->buf_pool)) /* PRQA S 306*/ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ renderer->buf_pool, i); -+ -+ base->buf_queue++; -+ memset(base->buffer[i], 0, base->buf_bytes); -+ } -+ -+ /* mark Renderer ready */ -+ playback->rdr_state |= XF_HANDLE_READY; -+ -+ /* set parameters for Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { -+ /* apply Equalizer parameter setting */ -+ equalizer->params.channel = ch; -+ equalizer->params.pcm_width = pcm_width; -+ equalizer->params.rate = fs; -+ -+ /* get equalizer parameters from control interface */ -+ /* data */ -+ snd_adsp_get_eqz_params_from_control( -+ &equalizer->params, -+ &ctr_if->eqz_params[DIRECT_PLAYBACK][dai_idx], -+ true); -+ -+ /* set parameters to Equalizer plugin */ -+ if (xf_adsp_equalizer_set_params(equalizer) != 0) -+ return -EINVAL; -+ -+ /* route Equalizer to Renderer */ -+ if (xf_adsp_route(equalizer->handle_id, -+ renderer->handle_id, -+ XF_BUF_POOL_SIZE, -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ /* mark Equalizer ready */ -+ playback->eqz_state |= XF_HANDLE_READY; -+ -+ /* prepare data before start PCM */ -+ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ /* send buffer to plugin to kick */ -+ /* init-processing */ -+ if (xf_adsp_empty_this_buffer( -+ base->handle_id, -+ base->buffer[i], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ } else { -+ /* send zero buffer to plugin to kick */ -+ /* init-processing */ -+ if (xf_adsp_empty_this_buffer(base->handle_id, -+ base->buffer[0], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ /* wait until all the buffer have been consummed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset HW index */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare record function -+ * -+ * \param[out] record Pointer to record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_prepare(struct snd_adsp_record *record, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, in_rate; -+ int hw_buffer_size, hw_queue_size; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_capture *capture; -+ struct xf_adsp_equalizer *equalizer; -+ struct snd_adsp_base_info *base; -+ int i; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ capture = record->capture; -+ equalizer = record->equalizer; -+ base = &record->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ ch = runtime->channels; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ vol_rate = ctr_if->vol_rate[DIRECT_CAPTURE][dai_idx]; -+ in_rate = ctr_if->sample_rate[DIRECT_CAPTURE][dai_idx]; -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* total size of allocated buffers */ -+ hw_queue_size = base->period_bytes * XF_BUF_POOL_SIZE; -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ base->pcm_indirect.hw_queue_size = hw_queue_size; -+ -+ /* prepare parameters to set to Capture plugin when it is not yet */ -+ /* ready */ -+ if (COMPONENT_IS_READY(record->cap_state) == FALSE) { -+ struct xf_adsp_capture_params *params = &capture->params; -+ -+ /* apply capture parameters */ -+ params->out_rate = fs; -+ params->channel = ch; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ params->dev1 = SRC0; -+ params->dev2 = SSI10; -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ -+ /* set volume rate if it is set by user or default volume as */ -+ /* 100% */ -+ if (vol_rate >= 0) -+ params->vol_rate = vol_rate; -+ else -+ params->vol_rate = (1 << 20); -+ -+ /* set sample rate input if it is set by user */ -+ if (in_rate >= 0) -+ params->in_rate = in_rate; -+ -+ /* allocate buffer pool to prepare the execution */ -+ capture->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(capture->buf_pool)) /* PRQA S 306 */ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ capture->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* set parameters to ADSP Capture plugin */ -+ if (xf_adsp_capture_set_params(capture) != 0) -+ return -EINVAL; -+ -+ /* mark Capture ready */ -+ record->cap_state |= XF_HANDLE_READY; -+ -+ /* set parameters for Equalizer if it's used */ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ /* apply Equalizer parameter setting */ -+ equalizer->params.channel = ch; -+ equalizer->params.pcm_width = pcm_width; -+ equalizer->params.rate = fs; -+ -+ /* get equalizer parameter from control interface */ -+ /* data */ -+ snd_adsp_get_eqz_params_from_control( -+ &equalizer->params, -+ &ctr_if->eqz_params[DIRECT_CAPTURE][dai_idx], -+ true); -+ -+ /* set parameters to Equalizer plugin */ -+ if (xf_adsp_equalizer_set_params(equalizer) != 0) -+ return -EINVAL; -+ -+ /* route Capture to Equalizer */ -+ if (xf_adsp_route(capture->handle_id, -+ equalizer->handle_id, -+ XF_BUF_POOL_SIZE, -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ /* mark Equalizer ready */ -+ record->eqz_state |= XF_HANDLE_READY; -+ } -+ -+ /* kick init process by sending a zero buffer length */ -+ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until finishing initialization */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ /* send buffer to plugin */ -+ if (xf_adsp_fill_this_buffer( -+ base->handle_id, -+ base->buffer[i], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ /* wait until all the buffer have been responsed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ } -+ -+ /* reset hw data position */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize playback function -+ * -+ * \param[out] playback Pointer to playback data -+ * \retval -EINVAL Failed to deinitialize playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if playback has been created already */ -+ if (playback) { -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(playback->rdr_state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process *//* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(playback->base.handle_id, -+ NULL, 0); -+ -+ /* free buffer pool */ /* PRQA S 3200 1 */ -+ xf_adsp_free_mem_pool(playback->renderer->buf_pool); -+ -+ /* destroy Renderer */ -+ if (xf_adsp_renderer_destroy(playback->renderer) != 0) -+ ret = -EINVAL; -+ -+ playback->renderer = NULL; -+ } -+ -+ /* destroy Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { -+ if (xf_adsp_equalizer_destroy(playback->equalizer)) -+ ret = -EINVAL; -+ -+ playback->equalizer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(playback->base.hrt_state) == TRUE) -+ hrtimer_cancel(&playback->base.hrtimer); -+ -+ /* free playback data */ -+ kfree(playback); -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize record function -+ * -+ * \param[out] record Pointer to record data -+ * \retval -EINVAL Failed to deinitialize record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_record_deinit(struct snd_adsp_record *record) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if record has been created already */ -+ if (!record) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(record->cap_state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process *//* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(record->base.handle_id, NULL, 0); -+ -+ /* free buffer pool */ /* PRQA S 3200 1 */ -+ xf_adsp_free_mem_pool(record->capture->buf_pool); -+ -+ if (xf_adsp_capture_destroy(record->capture)) -+ ret = -EINVAL; -+ -+ record->capture = NULL; -+ } -+ -+ /* destroy Equalizer if it is used */ -+ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { -+ if (xf_adsp_equalizer_destroy(record->equalizer) != 0) -+ ret = -EINVAL; -+ -+ record->equalizer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(record->base.hrt_state) == TRUE) -+ hrtimer_cancel(&record->base.hrtimer); -+ -+ /* free record data */ -+ kfree(record); -+ -+ return ret; -+} -+ -+/***************************************************************************** -+ * internal functions to manage TDM playback and TDM record functions -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Initialize TDM playback data -+ * -+ * \param[out] tdm_playback_data Pointer to store TDM playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize TDM playback data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **tdm_playback_data, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_tdm_playback *tdm_playback; -+ -+ /* allocate memory for TDM playback data */ -+ tdm_playback = kmalloc(sizeof(*tdm_playback), GFP_KERNEL); -+ -+ if (!tdm_playback) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(tdm_playback, 0, sizeof(struct snd_adsp_tdm_playback)); -+ -+ /* save the TDM playback data */ -+ *tdm_playback_data = tdm_playback; -+ -+ /* set handle state as NULL state */ -+ tdm_playback->state = XF_HANDLE_NULL; -+ tdm_playback->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register TDM renderer component */ -+ if (xf_adsp_tdm_renderer_create(&tdm_playback->tdm_renderer, -+ &rdr_callbacks, -+ (void *)&tdm_playback->base) < 0) -+ return -EINVAL; -+ -+ /* mark TDM renderer component created */ -+ tdm_playback->state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as TDM renderer ID */ -+ tdm_playback->base.handle_id = tdm_playback->tdm_renderer->handle_id; -+ -+ /* init lock */ -+ spin_lock_init(&tdm_playback->base.lock); -+ -+ /* save the substream data */ -+ tdm_playback->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&tdm_playback->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ tdm_playback->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ tdm_playback->base.hrt_state = XF_HANDLE_CREATED; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Initialize TDM record data -+ * -+ * \param[out] tdm_record_data Pointer to store TDM record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to initialize TDM record data -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **tdm_record_data, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_tdm_record *tdm_record; -+ -+ /* allocate memory for TDM record data */ -+ tdm_record = kmalloc(sizeof(*tdm_record), GFP_KERNEL); -+ if (!tdm_record) -+ return -EINVAL; -+ -+ /* init params */ -+ memset(tdm_record, 0, sizeof(struct snd_adsp_tdm_record)); -+ -+ /* save the TDM record data */ -+ *tdm_record_data = tdm_record; -+ -+ /* set handle state as NULL state */ -+ tdm_record->state = XF_HANDLE_NULL; -+ tdm_record->base.hrt_state = XF_HANDLE_NULL; -+ -+ /* register TDM Capture component */ -+ if (xf_adsp_tdm_capture_create(&tdm_record->tdm_capture, -+ &cap_callbacks, -+ (void *)&tdm_record->base) != 0) -+ return -EINVAL; -+ -+ /* mark TDM capture component created */ -+ tdm_record->state = XF_HANDLE_CREATED; -+ -+ /* set target handle ID as TDM capture ID */ -+ tdm_record->base.handle_id = tdm_record->tdm_capture->handle_id; -+ -+ /* init lock */ -+ spin_lock_init(&tdm_record->base.lock); -+ -+ /* save the substream data */ -+ tdm_record->base.substream = substream; -+ -+ /* init high resolution timer for updating hw status */ -+ hrtimer_init(&tdm_record->base.hrtimer, -+ CLOCK_MONOTONIC, -+ HRTIMER_MODE_REL); -+ -+ /* PRQA S 0563 1 */ -+ tdm_record->base.hrtimer.function = &snd_adsp_hrtimer_func; -+ tdm_record->base.hrt_state = XF_HANDLE_CREATED; -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare TDM playback function -+ * -+ * \param[out] tdm_playback Pointer to TDM playback data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare TDM playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card; -+ struct snd_adsp_control *ctr_if; -+ struct snd_pcm_runtime *runtime; -+ struct xf_adsp_tdm_renderer *tdm_renderer; -+ struct snd_adsp_base_info *base; -+ int i; -+ int pcm_width, ch_mode, fs, frame_size, hw_buffer_size; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ runtime = substream->runtime; -+ tdm_renderer = tdm_playback->tdm_renderer; -+ base = &tdm_playback->base; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ -+ ch_mode = (runtime->channels == 8) ? -+ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; -+ -+ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ -+ if (pcm_width == 16) -+ base->buf_bytes = base->period_bytes; -+ else -+ base->buf_bytes = ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = hw_buffer_size; -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* it should equal to a period size in bytes */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes; -+ -+ /* prepare parameters to set to TDM playback as it is not ready */ -+ if (COMPONENT_IS_READY(tdm_playback->state) == FALSE) { -+ struct xf_adsp_tdm_renderer_params *params; -+ -+ params = &tdm_renderer->params; -+ -+ /* apply renderer parameters */ -+ params->in_rate = fs; -+ params->ch_mode = ch_mode; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ /* setting Audio device indexes */ -+ params->dma1 = ADMAC_CH00; /* use DMAC for transfer data */ -+ params->dma2 = PDMA_CH03; -+ params->dev1 = SRC1; -+ params->dev2 = SSI30; /* set SSI index to SSI30 */ -+ -+ /* set volume rate if it is set by user or default value as */ -+ /* 100% */ -+ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] >= 0) -+ ? ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] : (1 << 20); -+ -+ /* set output sampling rate if it is set by user */ -+ if (ctr_if->tdm_sample_rate[DIRECT_PLAYBACK] >= 0) -+ params->out_rate = -+ ctr_if->tdm_sample_rate[DIRECT_PLAYBACK]; -+ -+ /* set parameters to ADSP TDM Renderer plugin */ -+ if (xf_adsp_tdm_renderer_set_params(tdm_renderer) != 0) -+ return -EINVAL; -+ -+ /* allocate buffer pool to prepare the execution */ -+ tdm_renderer->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(tdm_renderer->buf_pool)) /* PRQA S 306*/ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ tdm_renderer->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* mark TDM Renderer created */ -+ tdm_playback->state |= XF_HANDLE_READY; -+ -+ /* send zero buffer to plugin to kick init-processing */ -+ memset(base->buffer[0], 0, base->buf_bytes); -+ -+ if (xf_adsp_empty_this_buffer(base->handle_id, base->buffer[0], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until all the buffer have been consummed */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset HW index */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Prepare TDM record function -+ * -+ * \param[out] tdm_record Pointer to TDM record data -+ * \param[in] substream Pointer to substream data -+ * \retval -EINVAL Failed to prepare TDM record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, -+ struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_card *adsp_card = -+ snd_adsp_get_drvdata_from_substream(substream); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ struct snd_pcm_runtime *runtime = substream->runtime; -+ struct xf_adsp_tdm_capture *tdm_capture = tdm_record->tdm_capture; -+ struct snd_adsp_base_info *base = &tdm_record->base; -+ int i; -+ int pcm_width, ch_mode, fs, frame_size; -+ -+ /* runtime parameter */ -+ fs = runtime->rate; -+ -+ ch_mode = (runtime->channels == 8) ? -+ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; -+ -+ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; -+ frame_size = runtime->period_size; -+ -+ /* get number of bytes in a period */ -+ base->period_bytes = snd_pcm_lib_period_bytes(substream); -+ base->buf_bytes = (pcm_width == 16) ? -+ base->period_bytes : ((base->period_bytes * -+ BYTES_PER_SAMPLE(S24_3LE)) / -+ BYTES_PER_SAMPLE(S24_LE)); -+ -+ /* pcm indirect configuration */ -+ base->pcm_indirect.hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); -+ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ /* total size of allocated buffers */ -+ base->pcm_indirect.hw_queue_size = base->period_bytes * -+ XF_BUF_POOL_SIZE; -+ -+ /* prepare parameters to set to TDM Capture as it is not yet ready */ -+ if (COMPONENT_IS_READY(tdm_record->state) == FALSE) { -+ struct xf_adsp_tdm_capture_params *params; -+ -+ params = &tdm_capture->params; -+ -+ /* apply capture parameters */ -+ params->out_rate = fs; -+ params->ch_mode = ch_mode; -+ params->pcm_width = pcm_width; -+ params->frame_size = frame_size; -+ -+ /* setting Audio device indexes */ -+ params->dma1 = PDMA_CH00; -+ params->dma2 = PDMA_CH01; -+ params->dev1 = SRC0; -+ params->dev2 = SSI40; /* set input device is SSI40 */ -+ -+ /* set volume rate if it is set by user or default value as */ -+ /* 100% */ -+ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_CAPTURE] >= 0) -+ ? ctr_if->tdm_vol_rate[DIRECT_CAPTURE] : (1 << 20); -+ -+ /* set input rate if it is set by user */ -+ if (ctr_if->tdm_sample_rate[DIRECT_CAPTURE] >= 0) { -+ params->in_rate = -+ ctr_if->tdm_sample_rate[DIRECT_CAPTURE]; -+ } -+ -+ /* allocate buffer pool to prepare the execution */ -+ tdm_capture->buf_pool = xf_adsp_allocate_mem_pool( -+ XF_BUF_POOL_SIZE, base->buf_bytes); -+ -+ if (IS_ERR(tdm_capture->buf_pool)) /* PRQA S 306 */ -+ return -EINVAL; -+ -+ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { -+ base->buffer[i] = xf_adsp_get_data_from_pool( -+ tdm_capture->buf_pool, i); -+ -+ base->buf_queue++; -+ } -+ -+ /* set parameters to ADSP TDM Capture plugin */ -+ if (xf_adsp_tdm_capture_set_params(tdm_capture) != 0) -+ return -EINVAL; -+ -+ /* mark TDM Capture ready */ -+ tdm_record->state |= XF_HANDLE_READY; -+ -+ /* kick init process by sending a zero buffer length */ -+ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* wait until finishing initialization */ -+ while (base->buf_queue != XF_BUF_POOL_SIZE) { -+ schedule_timeout_interruptible(2); -+ if (signal_pending(current)) -+ break; -+ -+ /* check the error from initialization */ -+ if (base->runtime_err) -+ return -EINVAL; -+ } -+ -+ /* reset hw data position */ -+ base->hw_idx = 0; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize TDM playback function -+ * -+ * \param[out] tdm_playback Pointer to TDM playback data -+ * \retval -EINVAL Failed to deinitialize TDM playback function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if TDM playback has been created */ -+ if (!tdm_playback) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(tdm_playback->state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process */ -+ /* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(tdm_playback->base.handle_id, -+ NULL, 0); -+ -+ /* free buffer pool *//* PRQA S 3200 2 */ -+ xf_adsp_free_mem_pool(tdm_playback->tdm_renderer->buf_pool); -+ -+ /* destroy TDM Renderer component */ -+ if (xf_adsp_tdm_renderer_destroy( -+ tdm_playback->tdm_renderer) != 0) -+ ret = -EINVAL; -+ -+ tdm_playback->tdm_renderer = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(tdm_playback->base.hrt_state) == TRUE) -+ hrtimer_cancel(&tdm_playback->base.hrtimer); -+ -+ /* free playback data */ -+ kfree(tdm_playback); -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Deinitialize TDM record function -+ * -+ * \param[out] tdm_record Pointer to TDM record data -+ * \retval -EINVAL Failed to deinitialize TDM record function -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record) -+{ -+ int ret = 0; -+ -+ /* perform de-initialization if TDM record has been created already */ -+ if (!tdm_record) -+ return ret; -+ -+ /* perform completion process */ -+ if (COMPONENT_IS_CREATED(tdm_record->state) == TRUE) { -+ /* send buffer with zero length to plugin for */ -+ /* completion process */ -+ /* PRQA S 3200 2 */ -+ xf_adsp_empty_this_buffer(tdm_record->base.handle_id, NULL, 0); -+ -+ /* free buffer pool *//* PRQA S 3200 2 */ -+ xf_adsp_free_mem_pool(tdm_record->tdm_capture->buf_pool); -+ -+ /* destroy TDM Capture component */ -+ if (xf_adsp_tdm_capture_destroy(tdm_record->tdm_capture) != 0) -+ ret = -EINVAL; -+ -+ tdm_record->tdm_capture = NULL; -+ } -+ -+ /* canncel timer interrupt */ -+ if (COMPONENT_IS_CREATED(tdm_record->base.hrt_state) == TRUE) -+ hrtimer_cancel(&tdm_record->base.hrtimer); -+ -+ /* free record data */ -+ kfree(tdm_record); -+ -+ return ret; -+} -+ -+/***************************************************************************** -+ * callback functions of ADSP ALSA driver -+ * ***************************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Open a playback/TDM playback or record/TDM record stream -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_open(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card *adsp_card; -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ struct snd_adsp_control *ctr_if; -+ -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ ctr_if = &adsp_card->ctr_if; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ /* register data for playback/record functions */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* perform playback initialization */ -+ if (snd_adsp_playback_init( -+ &adsp_card->playback[dai_idx], -+ ctr_if->eqz_switch[DIRECT_PLAYBACK][dai_idx], -+ substream) < 0) { -+ /* perform playback de-initialization when */ -+ /* the initialization fails */ -+ snd_adsp_playback_deinit( -+ adsp_card->playback[dai_idx]); -+ -+ adsp_card->playback[dai_idx] = NULL; -+ return -EINVAL; -+ } -+ } else { -+ /* perform record initialization */ -+ if (snd_adsp_record_init( -+ &adsp_card->record[dai_idx], -+ ctr_if->eqz_switch[DIRECT_CAPTURE][dai_idx], -+ substream) < 0) { -+ /* perform record de-initialization when the */ -+ /* initialization fails */ -+ snd_adsp_record_deinit( -+ adsp_card->record[dai_idx]); -+ -+ adsp_card->record[dai_idx] = NULL; -+ return -EINVAL; -+ } -+ } -+ -+ /* save the hardware parameters */ -+ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_hw); -+ -+ /* each period has a frame size */ -+ snd_pcm_hw_constraint_single(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -+ FRAME_SIZE); -+ } else { -+ /* register data for TDM playback/record functions */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* perform TDM playback initialization */ -+ if (snd_adsp_tdm_playback_init( -+ &adsp_card->tdm_playback, -+ substream) < 0) { -+ /* perform TDM playback de-initialization */ -+ /* when the initialization fails */ -+ snd_adsp_tdm_playback_deinit( -+ adsp_card->tdm_playback); -+ -+ adsp_card->tdm_playback = NULL; -+ return -EINVAL; -+ } -+ } else { -+ /* perform TDM record initialization */ -+ if (snd_adsp_tdm_record_init(&adsp_card->tdm_record, -+ substream) < 0) { -+ /* perform TDM record de-initialization */ -+ /* when the initialization fails */ -+ snd_adsp_tdm_record_deinit( -+ adsp_card->tdm_record); -+ -+ adsp_card->tdm_record = NULL; -+ return -EINVAL; -+ } -+ } -+ -+ /* save the hardware parameters */ -+ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_tdm_hw); -+ -+ /* each period has a frame size */ -+ snd_pcm_hw_constraint_single(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -+ TDM_FRAME_SIZE); -+ } -+ -+ snd_pcm_hw_constraint_integer(substream->runtime, -+ SNDRV_PCM_HW_PARAM_PERIODS); -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Close a playback/TDM playback or record/TDM record stream -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_close(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card *adsp_card = -+ snd_adsp_get_drvdata_from_substream(substream); -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ int err = 0; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ /* destroy Renderer/Capture or Equalizer (if used) */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ if (snd_adsp_playback_deinit( -+ adsp_card->playback[dai_idx]) < 0) -+ err = -EINVAL; -+ -+ adsp_card->playback[dai_idx] = NULL; -+ } else { -+ if (snd_adsp_record_deinit( -+ adsp_card->record[dai_idx]) < 0) -+ err = -EINVAL; -+ -+ adsp_card->record[dai_idx] = NULL; -+ } -+ } else { -+ /* destroy TDM Renderer/TDM Capture */ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { -+ if (snd_adsp_tdm_playback_deinit( -+ adsp_card->tdm_playback) < 0) -+ err = -EINVAL; -+ -+ adsp_card->tdm_playback = NULL; -+ } else { -+ if (snd_adsp_tdm_record_deinit( -+ adsp_card->tdm_record) < 0) -+ err = -EINVAL; -+ -+ adsp_card->tdm_record = NULL; -+ } -+ } -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Allocate ALSA buffer and calculate expire time of hr timer -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -ENOMEM Cannot allocate ALSA buffer -+ *****************************************************************************/ -+static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *hw_params) -+{ -+ struct snd_adsp_base_info *base; -+ int err = 0; -+ -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ /* set expire time of hrtimer, this value should be time for */ -+ /* transfer a frame */ -+ base->ktime = ns_to_ktime((1000000000 / params_rate(hw_params)) * -+ params_period_size(hw_params)); -+ -+ err = snd_pcm_lib_malloc_pages(substream, -+ params_buffer_bytes(hw_params)); -+ -+ /* reset DMA buffer area */ -+ memset(substream->runtime->dma_area, 0, substream->runtime->dma_bytes); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Free the allocated ALSA buffer -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Cannot deallocate buffer -+ *****************************************************************************/ -+static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream) -+{ -+ return snd_pcm_lib_free_pages(substream); -+} -+ -+/** ************************************************************************** -+ * \brief Prepare playback/TDM playback or record/TDM record function -+ * before transferring data -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream) -+{ -+ /* get ADSP soundcard and CPU DAI index */ -+ struct snd_adsp_card * -+ adsp_card = snd_adsp_get_drvdata_from_substream(substream); -+ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); -+ int err = 0; -+ -+ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || -+ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ /* get playback prepared to execute */ -+ err = snd_adsp_playback_prepare( -+ adsp_card->playback[dai_idx], substream); -+ else -+ /* get record prepared to execute */ -+ err = snd_adsp_record_prepare( -+ adsp_card->record[dai_idx], substream); -+ } else { -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ /* get TDM playback prepared to execute */ -+ err = snd_adsp_tdm_playback_prepare( -+ adsp_card->tdm_playback, substream); -+ else -+ /* get TDM record prepared to execute */ -+ err = snd_adsp_tdm_record_prepare( -+ adsp_card->tdm_record, substream); -+ } -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ * \brief Trigger playback/TDM playback or record/TDM record stream -+ * to go to next phase -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ switch (idx) { -+ case SNDRV_PCM_TRIGGER_START: -+ case SNDRV_PCM_TRIGGER_RESUME: -+ /* start high-resolution timer */ -+ hrtimer_start(&base->hrtimer, base->ktime, HRTIMER_MODE_REL); -+ -+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { -+ int buf_queue = 0; -+ -+ /* get current available buffer */ -+ spin_lock_irqsave(&base->lock, base->flag); -+ buf_queue = base->buf_queue; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* send all available buffer to plugin to */ -+ /* get data */ -+ for (; buf_queue > 0; buf_queue--) { -+ if (xf_adsp_fill_this_buffer( -+ base->handle_id, -+ base->buffer[base->buf_idx], -+ base->buf_bytes) != 0) -+ return -EINVAL; -+ -+ spin_lock_irqsave(&base->lock, base->flag); -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ base->buf_idx++; -+ -+ if (base->buf_idx >= XF_BUF_POOL_SIZE) -+ base->buf_idx = 0; -+ } -+ } -+ break; -+ case SNDRV_PCM_TRIGGER_STOP: -+ case SNDRV_PCM_TRIGGER_SUSPEND: -+ break; -+ default: -+ return -EINVAL; -+ } -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Return HW data position -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval position HW data position -+ *****************************************************************************/ -+static snd_pcm_uframes_t -+snd_adsp_pcm_pointer(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ unsigned int hw_idx, hw_buffer_size; -+ snd_pcm_uframes_t pointer; -+ -+ /* convert hw index to correct as submitted bytes */ -+ spin_lock_irqsave(&base->lock, base->flag); -+ hw_idx = (base->hw_idx / base->buf_bytes) * base->period_bytes; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ hw_buffer_size = base->pcm_indirect.hw_buffer_size; -+ -+ if (hw_idx >= hw_buffer_size) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ -+ base->hw_idx -= (hw_buffer_size / base->period_bytes) * -+ base->buf_bytes; -+ -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ } -+ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ pointer = snd_pcm_indirect_playback_pointer(substream, -+ &base->pcm_indirect, -+ hw_idx); -+ else -+ pointer = snd_pcm_indirect_capture_pointer(substream, -+ &base->pcm_indirect, -+ hw_idx); -+ -+ return pointer; -+} -+ -+/** ************************************************************************** -+ * \brief Call read/write process to transfer data -+ * -+ * \param[in] substream Pointer to substream object -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ -+ if (base->runtime_err) -+ return -EINVAL; -+ -+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) -+ snd_pcm_indirect_playback_transfer(substream, -+ &base->pcm_indirect, -+ snd_adsp_pcm_transfer); -+ else -+ snd_pcm_indirect_capture_transfer(substream, -+ &base->pcm_indirect, -+ snd_adsp_pcm_transfer); -+ -+ return 0; -+} -+ -+/** *************************************************************************** -+ * \brief Copy data from source buffer to destination buffer -+ * -+ * \params[in] dst Destination buffer pointer -+ * \params[out] src Source buffer pointer -+ * \params[in] dst_size Destination buffer size in byte -+ * \params[in] src_size Source buffer size in byte -+ * \retval None -+ *****************************************************************************/ -+static inline void -+snd_adsp_copy_data(void *dst, void *src, int dst_size, int src_size) -+{ -+ unsigned char *data_dst = dst; -+ unsigned char *data_src = src; -+ int i; -+ -+ if (dst_size == src_size) { -+ /* src and dst bufs are same size, does not need to convert */ -+ memcpy(data_dst, data_src, dst_size); -+ -+ } else if (dst_size < src_size) { -+ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_3LE)); -+ i += BYTES_PER_SAMPLE(S24_3LE)) { -+ *(u32 *)data_dst = *(u32 *)data_src; -+ -+ data_dst += BYTES_PER_SAMPLE(S24_3LE); -+ data_src += BYTES_PER_SAMPLE(S24_LE); -+ } -+ -+ /* copy a S24_3LE sample from S24_LE sample */ -+ data_dst[0] = data_src[0]; -+ data_dst[1] = data_src[1]; -+ data_dst[2] = data_src[2]; -+ -+ } else { -+ unsigned int tmp; -+ -+ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_LE)); -+ i += BYTES_PER_SAMPLE(S24_LE)) { -+ tmp = *(u32 *)data_src; -+ *(u32 *)data_dst = tmp & 0x0FFFFFF; -+ -+ data_dst += BYTES_PER_SAMPLE(S24_LE); -+ data_src += BYTES_PER_SAMPLE(S24_3LE); -+ } -+ -+ /* copy a S24_LE sample from S24_3LE sample */ -+ data_dst[0] = data_src[0]; -+ data_dst[1] = data_src[1]; -+ data_dst[2] = data_src[2]; -+ data_dst[3] = 0; -+ } -+} -+ -+/** ************************************************************************** -+ * \brief Transfer data process between ALSA buffer and ADSP buffer -+ * -+ * \param[in] substream Pointer to substream object -+ * \param[in] rec Pointer to indirect PCM data -+ * \param[in] bytes Number of byte need to be transferred -+ * \retval None -+ *****************************************************************************/ -+static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, -+ struct snd_pcm_indirect *rec, -+ size_t bytes) -+{ -+ struct snd_adsp_base_info * -+ base = snd_adsp_get_base_from_substream(substream); -+ int direct = substream->stream; -+ int trans_bytes = bytes; -+ int buf_bytes, period_bytes; -+ void *dma_buf, *data_buff; -+ -+ /* get the DMA buffer pointer */ -+ dma_buf = (void *)(substream->runtime->dma_area + rec->sw_data); -+ -+ /* get information from base */ -+ buf_bytes = base->buf_bytes; -+ period_bytes = base->period_bytes; -+ -+ /* make sure the available buffer and transfer size - TBD */ -+ while (trans_bytes > 0) { -+ spin_lock_irqsave(&base->lock, base->flag); -+ if (base->buf_queue > 0 && trans_bytes >= period_bytes) { -+ base->buf_queue--; -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ -+ /* get the buffer pointer from stream */ -+ data_buff = base->buffer[base->buf_idx]; -+ -+ if (direct == SNDRV_PCM_STREAM_PLAYBACK) { -+ /* copy data from user *//* PRQA S 3200 2 */ -+ snd_adsp_copy_data(data_buff, dma_buf, -+ buf_bytes, period_bytes); -+ -+ /* send buffer to plugin */ -+ if (xf_adsp_empty_this_buffer(base->handle_id, -+ data_buff, -+ buf_bytes) < 0) -+ base->runtime_err = TRUE; -+ } else { -+ /* copy data to user *//* PRQA S 3200 2 */ -+ snd_adsp_copy_data(dma_buf, data_buff, -+ period_bytes, buf_bytes); -+ -+ /* send buffer to plugin */ -+ if (xf_adsp_fill_this_buffer(base->handle_id, -+ data_buff, -+ buf_bytes) < 0) -+ base->runtime_err = TRUE; -+ } -+ -+ base->buf_idx++; -+ if (base->buf_idx >= XF_BUF_POOL_SIZE) -+ base->buf_idx = 0; -+ } else { -+ spin_unlock_irqrestore(&base->lock, base->flag); -+ break; -+ } -+ -+ trans_bytes -= period_bytes; -+ } -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Volume control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of volume control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 799; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get volume value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to volume value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ int handle_state, handle_id; -+ int volume, cmd_idx, direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine command index, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* get the volume's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get the volume's value from the plugin */ -+ if (xf_adsp_get_param(handle_id, cmd_idx, &volume) != 0) -+ return -EINVAL; -+ -+ /* check the value after getting it and adjust it */ -+ ucontrol->value.integer.value[0] = (volume == 0xFFFFFFFF) ? -+ (-1) : (volume * VOLUME_SCALE) >> 20; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ ucontrol->value.integer.value[0] = -+ (ctr_if->vol_rate[direction][index] * -+ VOLUME_SCALE) >> 20; -+ else -+ ucontrol->value.integer.value[0] = -+ (ctr_if->tdm_vol_rate[direction] * -+ VOLUME_SCALE) >> 20; -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set volume value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to volume value -+ * \retval 1 Volume change -+ * \retval 0 Volume does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1*/ -+static int -+snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; -+ int volume; -+ int ret; -+ int handle_state, handle_id, cmd_idx, volume_get; -+ int direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state and handle ID */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* get the value to set */ -+ if (ucontrol->value.integer.value[0] == -1) { -+ volume = 0xFFFFFFFF; -+ } else { -+ /* round up the value if needed */ -+ volume = (ucontrol->value.integer.value[0] * (1 << 20)) / -+ VOLUME_SCALE; -+ -+ if ((ucontrol->value.integer.value[0] * (1 << 20)) > -+ (VOLUME_SCALE * volume)) -+ volume += 1; -+ } -+ -+ /* determine command index, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* set volume to plugin */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* TDM does not support set volume in runtime state */ -+ if (kcontrol->id.name[0] == PREFIX_OF_TDM_CTR_NAME) -+ return -EINVAL; -+ -+ /* apply set volume value to ADSP from user setting */ -+ if (xf_adsp_set_param(handle_id, cmd_idx, volume) != 0) -+ return -EINVAL; -+ -+ /* get volume from ADSP after setting to confirm */ -+ if (xf_adsp_get_param(handle_id, cmd_idx, &volume_get) != 0) -+ return -EINVAL; -+ -+ /* check if the value has changed */ -+ ret = (volume_get == volume) ? 1 : 0; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ ctr_if->vol_rate[direction][index] = volume; -+ else -+ ctr_if->tdm_vol_rate[direction] = volume; -+ -+ ret = 1; -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Sample Rate Converter control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of sample rate -+ * converter control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 48000; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get sample rate value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to sample rate value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int *rate; -+ int handle_id, handle_state, cmd_idx, direction; -+ unsigned int index; -+ -+ rate = (int *)&ucontrol->value.integer.value[0]; /* PRQA S 310 */ -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state and handle ID */ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine command, direction, handle state, handle ID */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ handle_id = -+ adsp_card->playback[index]->renderer->handle_id; -+ } -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ handle_id = -+ adsp_card->record[index]->capture->handle_id; -+ } -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) { -+ handle_state = adsp_card->tdm_playback->state; -+ -+ handle_id = -+ adsp_card->tdm_playback->tdm_renderer->handle_id; -+ } -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) { -+ handle_state = adsp_card->tdm_record->state; -+ -+ handle_id = -+ adsp_card->tdm_record->tdm_capture->handle_id; -+ } -+ } -+ } -+ -+ /* get parameter from plugin */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ if (xf_adsp_get_param(handle_id, cmd_idx, rate) != 0) -+ return -EINVAL; -+ } else { -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ *rate = adsp_card->ctr_if.sample_rate[direction][index]; -+ else -+ *rate = adsp_card->ctr_if.tdm_sample_rate[direction]; -+ } -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set sample rate value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to sample rate value -+ * \retval 1 Sample rate change -+ * \retval 0 Sample rate does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1 */ -+static int -+snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ unsigned int index; -+ int rate; -+ int handle_state, cmd_idx, direction; -+ int ret = 1; -+ -+ rate = (int)ucontrol->value.integer.value[0]; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine command, direction and handle state */ -+ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { -+ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { -+ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->cap_state; -+ -+ } else { -+ if (kcontrol->id.name[3] == TDM_PLAYBACK) { -+ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ direction = DIRECT_PLAYBACK; -+ -+ if (adsp_card->tdm_playback) -+ handle_state = adsp_card->tdm_playback->state; -+ -+ } else { -+ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ direction = DIRECT_CAPTURE; -+ -+ if (adsp_card->tdm_record) -+ handle_state = adsp_card->tdm_record->state; -+ } -+ } -+ -+ /* get the value to set */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ return -EINVAL; -+ -+ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) -+ adsp_card->ctr_if.sample_rate[direction][index] = rate; -+ else -+ adsp_card->ctr_if.tdm_sample_rate[direction] = rate; -+ -+ ret = 1; -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Equalizer control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Equalizer control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = MAX_EQZ_PARAM_NUMBER; -+ uinfo->value.integer.min = -1; -+ uinfo->value.integer.max = 0x7fffffff; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get equalizer parameters value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer parameters value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int handle_state, direction; -+ int i, j, filter_index; -+ unsigned int index; -+ struct xf_adsp_equalizer *equalizer; -+ struct xf_adsp_equalizer_params *eqz_params; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determin direction of stream */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state, handle ID, equalizer pointer */ -+ handle_state = XF_HANDLE_NULL; -+ equalizer = NULL; -+ -+ /* get component's state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->eqz_state; -+ equalizer = adsp_card->playback[index]->equalizer; -+ } -+ } else { -+ if (adsp_card->record[index]) { -+ handle_state = adsp_card->record[index]->eqz_state; -+ equalizer = adsp_card->record[index]->equalizer; -+ } -+ } -+ -+ /* perform parameters' values getting */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get equalizer's parameters */ -+ if (xf_adsp_equalizer_get_params(equalizer) != 0) -+ return -EINVAL; -+ -+ eqz_params = &equalizer->params; -+ } else { -+ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; -+ } -+ -+ /* get equalizer type: PARAMETRIC or GRAPHIC */ -+ ucontrol->value.integer.value[0] = eqz_params->eqz_type; -+ -+ /* get parameters' value from Equalizer plugin */ -+ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ for (i = 0, filter_index = 1; -+ filter_index <= XA_REL_EQZ_FILTER_NUM; -+ i++, filter_index++) { -+ /* get filter index */ -+ ucontrol->value.integer.value[(i * 6) + 1] = -+ filter_index; -+ -+ /* get frequency centre */ -+ ucontrol->value.integer.value[(i * 6) + 2] = -+ eqz_params->p_coef.fc[i]; -+ -+ /* get bandwidth */ -+ ucontrol->value.integer.value[(i * 6) + 3] = -+ eqz_params->p_coef.band_width[i]; -+ -+ /* get filter type */ -+ ucontrol->value.integer.value[(i * 6) + 4] = -+ eqz_params->p_coef.type[i]; -+ -+ /* get gain base */ -+ ucontrol->value.integer.value[(i * 6) + 5] = -+ eqz_params->p_coef.gain_base[i]; -+ -+ /* get gain */ -+ ucontrol->value.integer.value[(i * 6) + 6] = -+ eqz_params->p_coef.gain[i]; -+ } -+ } else { -+ for (i = 0, filter_index = 1; -+ filter_index <= XA_REL_EQZ_GRAPHIC_BAND_NUM; -+ i++, filter_index++) { -+ /* get band index */ -+ ucontrol->value.integer.value[(i * 2) + 1] = -+ filter_index; -+ -+ /* get graphic gain */ -+ ucontrol->value.integer.value[(i * 2) + 2] = -+ eqz_params->g_coef.gain_g[i]; -+ } -+ -+ j = (i * 2) + 1; -+ -+ /* make the rest of values silent */ -+ while (j < MAX_EQZ_PARAM_NUMBER) { -+ ucontrol->value.integer.value[j] = -1; -+ j++; -+ } -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set equalizer parameters value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer parameters value -+ * \retval 1 Equalizer parameters change -+ * \retval 0 Equalizer parameters does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1*/ -+static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int handle_state, direction, filter_idx; -+ int i; -+ int index; -+ struct xf_adsp_equalizer_params *eqz_params = NULL; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* get the handle state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->eqz_state; -+ } else { -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->eqz_state; -+ } -+ -+ /* perform equalizer's parameters setting */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ return -EINVAL; -+ -+ /* PRQA S 310 1*/ -+ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; -+ -+ i = 0; -+ /* PRQA S 3440 1*/ -+ eqz_params->eqz_type = ucontrol->value.integer.value[i]; -+ i++; -+ filter_idx = 0; -+ -+ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ while (i < MAX_EQZ_PARAM_NUMBER) { -+ /* get index filter */ -+ /* PRQA S 3440*/ -+ filter_idx = ucontrol->value.integer.value[i]; -+ i++; -+ -+ /* valid index filter is range */ -+ /* (1 to XA_REL_EQZ_FILTER_NUM) */ -+ if (filter_idx >= 1 && -+ filter_idx <= XA_REL_EQZ_FILTER_NUM) { -+ /* PRQA S 3440 5*/ -+ eqz_params->p_coef.fc[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.band_width[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.type[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.gain_base[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ eqz_params->p_coef.gain[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ -+ i++; -+ } -+ /* index filter = -1 means that user */ -+ /* does not set this filter */ -+ else if (filter_idx == -1 || filter_idx == 0) { -+ i += 5; -+ } else { -+ return -EINVAL; -+ } -+ } -+ } else if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_GRAPHIC) { -+ while (i < ((XA_REL_EQZ_GRAPHIC_BAND_NUM * 2) + 1)) { -+ /*get index filter */ -+ /* PRQA S 3440 */ -+ filter_idx = ucontrol->value.integer.value[i++]; -+ -+ if (filter_idx >= 1 && -+ filter_idx <= XA_REL_EQZ_GRAPHIC_BAND_NUM) { -+ eqz_params->g_coef.gain_g[filter_idx - 1] = -+ ucontrol->value.integer.value[i]; -+ i++; -+ -+ } else if (filter_idx == -1 || filter_idx == 0) { -+ i += 1; -+ } else { -+ return -EINVAL; -+ } -+ } -+ } else { -+ return -EINVAL; -+ } -+ -+ return 1; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Equalizer Switch control -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Equalizer -+ * Switch control -+ * \retval 0 Success -+ *****************************************************************************/ -+static int snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = 0; -+ uinfo->value.integer.max = 1; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get equalizer switch value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer switch value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int direction; -+ unsigned int index; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* get the Equalizer switch status */ -+ ucontrol->value.integer.value[0] = -+ adsp_card->ctr_if.eqz_switch[direction][index]; -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set equalizer switch value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to equalizer switch value -+ * \retval 1 Equalizer switch change -+ * \retval 0 Equalizer switch does not change -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+/* PRQA S 3673 1 */ -+static int -+snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int eqz_switch; -+ int handle_state, direction; -+ unsigned int index; -+ int ret = 0; -+ -+ eqz_switch = ucontrol->value.integer.value[0]; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ /* determine the direction */ -+ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? -+ DIRECT_PLAYBACK : DIRECT_CAPTURE; -+ -+ /* set handle state as NULL state */ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine handle state */ -+ if (direction == DIRECT_PLAYBACK) { -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ } else { -+ if (adsp_card->record[index]) -+ handle_state = adsp_card->record[index]->cap_state; -+ } -+ -+ /* set the status of Equalizer */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* runtime setting is not supported */ -+ ret = -EINVAL; -+ } else { -+ adsp_card->ctr_if.eqz_switch[direction][index] = eqz_switch; -+ ret = 1; -+ } -+ -+ return ret; -+} -+ -+/** ************************************************************************** -+ * \brief Get info of Renderer output channel -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] uinfo Pointer to info structure of Renderer output channel -+ * \retval 0 Success -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_info(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_info *uinfo) -+{ -+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; -+ uinfo->count = 1; -+ uinfo->value.integer.min = MONAURAL; -+ uinfo->value.integer.max = STEREO; -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Get Renderer output channel's value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to Renderer output channel value -+ * \retval 0 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_get(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ int rdr_out_ch; -+ unsigned int index; -+ int handle_state, handle_id; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ handle_state = XF_HANDLE_NULL; -+ handle_id = -1; -+ -+ /* determine handle state and handle ID */ -+ if (adsp_card->playback[index]) { -+ handle_state = adsp_card->playback[index]->rdr_state; -+ handle_id = adsp_card->playback[index]->renderer->handle_id; -+ } -+ -+ /* get Renderer output channel's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) { -+ /* get Renderer output channel's value from Renderer plugin */ -+ if (xf_adsp_get_param(handle_id, -+ XA_RDR_CONFIG_PARAM_OUT_CHANNELS, -+ &rdr_out_ch) != 0) { -+ return -EINVAL; -+ } -+ -+ ucontrol->value.integer.value[0] = rdr_out_ch; -+ } else { -+ ucontrol->value.integer.value[0] = -+ adsp_card->ctr_if.rdr_out_ch[index]; -+ } -+ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Set Renderer output channel's value -+ * -+ * \param[in] kcontrol Pointer to control instance -+ * \param[in] ucontrol Pointer to Renderer output channel value -+ * \retval 1 Success -+ * \retval -EINVAL Error -+ *****************************************************************************/ -+static int -+snd_adsp_control_rdr_out_channel_put(struct snd_kcontrol *kcontrol, -+ struct snd_ctl_elem_value *ucontrol) -+{ -+ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); -+ unsigned int index; -+ int handle_state; -+ int ret = 1; -+ -+ /* get the index */ -+ index = kcontrol->id.index; -+ -+ handle_state = XF_HANDLE_NULL; -+ -+ /* determine handle state and handle ID */ -+ if (adsp_card->playback[index]) -+ handle_state = adsp_card->playback[index]->rdr_state; -+ -+ /* get Renderer output channel's value */ -+ if (COMPONENT_IS_READY(handle_state) == TRUE) -+ /* not support runtime setting */ -+ ret = -EINVAL; -+ else -+ adsp_card->ctr_if.rdr_out_ch[index] = -+ ucontrol->value.integer.value[0]; -+ -+ return ret; -+} -+ -+/** control interface for playback's volume rate */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_playback_volume_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ } -+}; -+ -+/** control interface for Capture's volume rate */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_capture_volume_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+ } -+}; -+ -+/** control interface for playback's output sample rate */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_playback_sample_rate_out_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ } -+}; -+ -+/** control interface for Capture's input sample rate */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_capture_sample_rate_in_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+ } -+}; -+ -+/** control interface for Equalizer parameters in playback */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_playback_equalizer_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ } -+}; -+ -+/** control interface for Equalizer parameters in record */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_capture_equalizer_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_EQZ_CTR_NAME, -+ .info = &snd_adsp_control_eqz_info, -+ .get = &snd_adsp_control_eqz_get, -+ .put = &snd_adsp_control_eqz_put -+ } -+}; -+ -+/** control interface for Equalizer usage in playback */ -+/* PRQA S 3218 */ -+static struct snd_kcontrol_new -+snd_adsp_playback_equalizer_switch_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ } -+}; -+ -+/** control interface for Equalizer usage in record */ -+/* PRQA S 3218 1*/ -+static struct snd_kcontrol_new -+snd_adsp_capture_equalizer_switch_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX1, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX2, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX3, -+ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, -+ .info = &snd_adsp_control_eqz_switch_info, -+ .get = &snd_adsp_control_eqz_switch_get, -+ .put = &snd_adsp_control_eqz_switch_put -+ } -+}; -+ -+/** control interface for playback's output channel */ -+static struct snd_kcontrol_new -+snd_adsp_playback_out_channel_control[MAX_DAI_IDX - 1] = { -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .index = RDR_DAI_IDX0, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX1, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX2, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ }, -+ { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, -+ .index = RDR_DAI_IDX3, -+ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, -+ .info = &snd_adsp_control_rdr_out_channel_info, -+ .get = &snd_adsp_control_rdr_out_channel_get, -+ .put = &snd_adsp_control_rdr_out_channel_put -+ } -+}; -+ -+/** control interface for TDM playback's volume rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_playback_volume_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_PLAYBACK_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+}; -+ -+/** control interface for TDM capture's volume rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_capture_volume_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_CAPTURE_VOLUME_CTR_NAME, -+ .info = &snd_adsp_control_volume_info, -+ .get = &snd_adsp_control_volume_get, -+ .put = &snd_adsp_control_volume_put -+}; -+ -+/** control interface for TDM playback's output sample rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_playback_sample_rate_out_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_PLAYBACK_OUT_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+}; -+ -+/** control interface for TDM capture's input sample rate */ -+static struct snd_kcontrol_new snd_adsp_tdm_capture_sample_rate_in_control = { -+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ -+ .name = TDM_CAPTURE_IN_RATE_CTR_NAME, -+ .info = &snd_adsp_control_sample_rate_info, -+ .get = &snd_adsp_control_sample_rate_get, -+ .put = &snd_adsp_control_sample_rate_put -+}; -+ -+/** PCM callback function of the sound card */ -+static struct snd_pcm_ops snd_adsp_pcm_ops = { -+ .open = &snd_adsp_pcm_open, /* PRQA S 1053 10 */ -+ .close = &snd_adsp_pcm_close, -+ .ioctl = &snd_pcm_lib_ioctl, -+ .hw_params = &snd_adsp_pcm_hw_params, -+ .hw_free = &snd_adsp_pcm_hw_free, -+ .prepare = &snd_adsp_pcm_prepare, -+ .trigger = &snd_adsp_pcm_trigger, -+ .pointer = &snd_adsp_pcm_pointer, -+ .ack = &snd_adsp_pcm_ack -+}; -+ -+/******************************************************************* -+ * Internal functions -+ * ****************************************************************/ -+ -+/** ************************************************************************** -+ * \brief Process information get from control structure -+ * -+ * \param[in] eqz_params Equalizer parameters object -+ * \param[in] eqz_ctr_params Equalizer parameters stored in control object -+ * \param[in] flag Indicate playback or capture stream -+ *****************************************************************************/ -+static void snd_adsp_get_eqz_params_from_control( -+ struct xf_adsp_equalizer_params *eqz_params, -+ struct xf_adsp_equalizer_params *eqz_ctr_params, bool flag) -+{ -+ int filter_idx; -+ -+ if (flag) { -+ if (eqz_ctr_params->eqz_type >= 0) -+ eqz_params->eqz_type = eqz_ctr_params->eqz_type; -+ -+ for (filter_idx = 0; filter_idx < XA_REL_EQZ_FILTER_NUM; -+ filter_idx++) { -+ if (eqz_ctr_params->p_coef.fc[filter_idx] >= 0) -+ eqz_params->p_coef.fc[filter_idx] = -+ eqz_ctr_params->p_coef.fc[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.band_width[filter_idx] >= 0) -+ eqz_params->p_coef.band_width[filter_idx] = -+ eqz_ctr_params->p_coef.band_width[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.type[filter_idx] >= 0) -+ eqz_params->p_coef.type[filter_idx] = -+ eqz_ctr_params->p_coef.type[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.gain_base[filter_idx] >= 0) -+ eqz_params->p_coef.gain_base[filter_idx] = -+ eqz_ctr_params->p_coef.gain_base[filter_idx]; -+ -+ if (eqz_ctr_params->p_coef.gain[filter_idx] >= 0) -+ eqz_params->p_coef.gain[filter_idx] = -+ eqz_ctr_params->p_coef.gain[filter_idx]; -+ } -+ for (filter_idx = 0; filter_idx < XA_REL_EQZ_GRAPHIC_BAND_NUM; -+ filter_idx++) { -+ if (eqz_ctr_params->g_coef.gain_g[filter_idx] >= 0) -+ eqz_params->g_coef.gain_g[filter_idx] = -+ eqz_ctr_params->g_coef.gain_g[filter_idx]; -+ } -+ } else { -+ memcpy(eqz_ctr_params, eqz_params, sizeof(*eqz_params)); -+ } -+} -+ -+/******************************************************************* -+ * ALSA ADSP Platform driver interface -+ * ****************************************************************/ -+ -+/** **************************************************************************** -+ * \brief Register control interface and preallocate ALSA buffer -+ * -+ * \param[in] runtime Pointer to runtime PCM data -+ * \retval 0 Success -+ * \retval -EINVAL Cannot register control interface -+ ******************************************************************************/ -+static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime) -+{ -+ int i = 0, err = 0; -+ int id; -+ struct snd_card *card; -+ struct snd_adsp_card *adsp_card; -+ int alsa_buf_sz = 0; -+ -+ /* get sound card data */ -+ card = runtime->card->snd_card; -+ -+ /* get driver data */ -+ adsp_card = snd_soc_dai_get_drvdata(runtime->cpu_dai); -+ -+ /* get the ID of CPU DAI */ -+ id = runtime->cpu_dai->id; -+ -+ /* register control interfaces */ -+ if (id == RDR_DAI_IDX0 || id == RDR_DAI_IDX1 || -+ id == RDR_DAI_IDX2 || id == RDR_DAI_IDX3) { -+ struct snd_kcontrol *kctl[RDR_CONTROL_NUM]; -+ void *rdr_ctr[RDR_CONTROL_NUM] = { -+ &snd_adsp_playback_volume_control[id], /* PRQA S 1031 */ -+ &snd_adsp_capture_volume_control[id], -+ &snd_adsp_playback_sample_rate_out_control[id], -+ &snd_adsp_capture_sample_rate_in_control[id], -+ &snd_adsp_playback_equalizer_control[id], -+ &snd_adsp_capture_equalizer_control[id], -+ &snd_adsp_playback_equalizer_switch_control[id], -+ &snd_adsp_capture_equalizer_switch_control[id], -+ &snd_adsp_playback_out_channel_control[id] -+ }; -+ -+ /* add basic control instance */ -+ for (i = 0; i < RDR_CONTROL_NUM; i++) { -+ kctl[i] = snd_ctl_new1(rdr_ctr[i], adsp_card); -+ err = snd_ctl_add(card, kctl[i]); -+ if (err < 0) -+ return -EINVAL; -+ } -+ -+ /* assign ALSA buffer size */ -+ alsa_buf_sz = MAX_BUFFER_BYTES; -+ -+ /* enable MIX feature from the 2nd playback/record stream */ -+ if (adsp_card->ctr_if.mix_usage == MIX_UNUSED) -+ adsp_card->ctr_if.mix_usage = FIRST_RUN; -+ else if (adsp_card->ctr_if.mix_usage == FIRST_RUN) -+ adsp_card->ctr_if.mix_usage = SECOND_RUN; -+ -+ } else { -+ struct snd_kcontrol *kctl[TDM_CONTROL_NUM]; -+ void *tdm_ctr[TDM_CONTROL_NUM] = { -+ &snd_adsp_tdm_playback_volume_control, -+ &snd_adsp_tdm_playback_sample_rate_out_control, -+ &snd_adsp_tdm_capture_volume_control, -+ &snd_adsp_tdm_capture_sample_rate_in_control -+ }; -+ -+ /* add basic control instances */ -+ for (i = 0; i < TDM_CONTROL_NUM; i++) { -+ kctl[i] = snd_ctl_new1(tdm_ctr[i], adsp_card); -+ err = snd_ctl_add(card, kctl[i]); -+ if (err < 0) -+ return -EINVAL; -+ } -+ -+ /* assign ALSA buffer size */ -+ alsa_buf_sz = TDM_MAX_BUFFER_BYTES; -+ } -+ -+ return snd_pcm_lib_preallocate_pages_for_all(runtime->pcm, -+ SNDRV_DMA_TYPE_CONTINUOUS, -+ snd_dma_continuous_data(GFP_KERNEL), -+ alsa_buf_sz, alsa_buf_sz); -+} -+ -+/* **************************************************************************** -+ * ALSA ADSP DAI register -+ * ***************************************************************************/ -+ -+/** callback function of platform driver */ -+static struct snd_soc_platform_driver snd_adsp_platform = { -+ .pcm_new = &snd_adsp_pcm_new, /* PRQA S 1053 *//* PRQA S 0674 */ -+ .ops = &snd_adsp_pcm_ops, -+}; -+ -+/** component information of driver */ -+static const struct snd_soc_component_driver snd_adsp_component = { -+ .name = "snd_adsp", /* PRQA S 1053 */ -+}; -+ -+/** DAI information of ADSP ALSA driver */ -+static struct snd_soc_dai_driver snd_adsp_dai[MAX_DAI_IDX] = { -+ { -+ /* PRQA S 1053 */ -+ .id = RDR_DAI_IDX0, -+ .name = "adsp-dai.0", -+ .playback.stream_name = "Playback0", -+ .capture.stream_name = "Capture0", -+ }, -+ { -+ .id = RDR_DAI_IDX1, -+ .name = "adsp-dai.1", -+ .playback.stream_name = "Playback1", -+ .capture.stream_name = "Capture1", -+ }, -+ { -+ .id = RDR_DAI_IDX2, -+ .name = "adsp-dai.2", -+ .playback.stream_name = "Playback2", -+ .capture.stream_name = "Capture2", -+ }, -+ { -+ .id = RDR_DAI_IDX3, -+ .name = "adsp-dai.3", -+ .playback.stream_name = "Playback3", -+ .capture.stream_name = "Capture3", -+ }, -+ { -+ .id = TDM_DAI_IDX, -+ .name = "adsp-tdm-dai", -+ .playback.stream_name = "TDM Playback", -+ .capture.stream_name = "TDM Capture", -+ } -+}; -+ -+/** *************************************************************************** -+ * \brief Register platform driver and ADSP ALSA sound card -+ * -+ * \param[in] pdev Pointer to platform driver data -+ * \retval 0 Success -+ * \retval -ENOMEM Cannot allocate driver's data -+ * \retval -EINVAL Cannot register platform driver or sound card -+ ****************************************************************************/ -+static int snd_adsp_probe(struct platform_device *pdev) -+{ -+ struct snd_adsp_card *adsp_card; -+ int i; -+ -+ /* allocate a card data structure */ -+ adsp_card = kmalloc(sizeof(*adsp_card), GFP_KERNEL); -+ if (!adsp_card) -+ return -ENOMEM; -+ -+ /* init parameters */ -+ memset(adsp_card, 0, sizeof(*adsp_card)); /* PRQA S 3200 */ -+ -+ /* PRQA S 3200 1*/ -+ memset(&adsp_card->ctr_if, -1, sizeof(struct snd_adsp_control)); -+ -+ /* disable Equalizer for all streams */ -+ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { -+ adsp_card->ctr_if.eqz_switch[DIRECT_CAPTURE][i] = 0; -+ adsp_card->ctr_if.eqz_switch[DIRECT_PLAYBACK][i] = 0; -+ } -+ -+ /* disable MIX function for all */ -+ adsp_card->ctr_if.mix_usage = MIX_UNUSED; -+ -+ /* save driver data */ -+ dev_set_drvdata(&pdev->dev, adsp_card); -+ -+ /* register platform device */ -+ if (snd_soc_register_platform(&pdev->dev, &snd_adsp_platform) < 0) { -+ snd_soc_unregister_platform(&pdev->dev); -+ return -EINVAL; -+ } -+ -+ /* fill format information of sound DAI driver for Rdr/Cap function */ -+ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { -+ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].playback.channels_min = MIN_CHANNEL; -+ snd_adsp_dai[i].playback.channels_max = MAX_CHANNEL; -+ -+ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].capture.channels_min = MIN_CHANNEL; -+ snd_adsp_dai[i].capture.channels_max = MAX_CHANNEL; -+ } -+ -+ /* fill format information of sound DAI driver for TDM function */ -+ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].playback.channels_min = TDM_MIN_CHANNEL; -+ snd_adsp_dai[i].playback.channels_max = TDM_MAX_CHANNEL; -+ -+ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; -+ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; -+ snd_adsp_dai[i].capture.channels_min = TDM_MIN_CHANNEL; -+ snd_adsp_dai[i].capture.channels_max = TDM_MAX_CHANNEL; -+ -+ /* register CPU dai */ -+ if (snd_soc_register_component(&pdev->dev, &snd_adsp_component, -+ snd_adsp_dai, -+ ARRAY_SIZE(snd_adsp_dai)) < 0) { -+ snd_soc_unregister_platform(&pdev->dev); -+ return -EINVAL; -+ } -+ -+ dev_info(&pdev->dev, "probed\n"); -+ -+ /* success */ -+ return 0; -+} -+ -+/** ************************************************************************** -+ * \brief Unregister platform driver and ADSP ALSA sound card -+ * -+ * \param[in] pdev Pointer platform driver data -+ * \retval 0 Success -+ * \retval -EINVAL Invalid driver's data -+ *****************************************************************************/ -+static int snd_adsp_remove(struct platform_device *pdev) -+{ -+ /* get ADSP sound card data */ -+ struct snd_adsp_card *adsp_card = dev_get_drvdata(&pdev->dev); -+ -+ if (!adsp_card) -+ return -ENODEV; -+ -+ /* release the ADSP sound card */ -+ kfree(adsp_card); -+ -+ /* unregister platform driver */ -+ snd_soc_unregister_component(&pdev->dev); -+ snd_soc_unregister_platform(&pdev->dev); -+ -+ /* success */ -+ return 0; -+} -+ -+/** ADSP ALSA driver information */ -+static const struct of_device_id snd_adsp_id[] = { -+ { .compatible = "renesas,rcar_adsp_sound_gen3", }, /* PRQA S 1053 */ -+}; -+MODULE_DEVICE_TABLE(of, snd_adsp_id); -+ -+/** platform driver of ADSP ALSA sound card */ -+static struct platform_driver snd_adsp_driver = { -+ .driver = { /* PRQA S 1053 */ -+ .name = "rcar_adsp_sound", -+ .of_match_table = snd_adsp_id, -+ }, -+ .probe = snd_adsp_probe, -+ .remove = snd_adsp_remove, -+}; -+module_platform_driver(snd_adsp_driver); /* PRQA S 0651 */ -+ -+MODULE_AUTHOR("Renesas AudioDSP"); -+MODULE_DESCRIPTION("Platform driver for ADSP"); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:ADSP-PCM-AUDIO"); -diff --git a/sound/soc/adsp/xf-adsp-base.c b/sound/soc/adsp/xf-adsp-base.c -new file mode 100644 -index 0000000..3ad9445 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-base.c -@@ -0,0 +1,2259 @@ -+/** *************************************************************************** -+ *\file xf-adsp-base.c -+ *\brief Source file for ADSP Base Control layer -+ *\addtogroup ADSP Driver -+ ****************************************************************************** -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ ****************************************************************************** -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#include -+#include -+#include -+ -+#include "xf-adsp-base.h" -+ -+#define XF_AUX_POOL_SIZE (16) /**< size of auxiliary pool*/ -+#define XF_AUX_POOL_MSG_LENGTH (256) /**< size of auxiliary buffer */ -+ -+#define XF_PROXY_ALIGN (64) /**< proxy alignment */ -+ -+/** \def XF_ALIGNED(size) -+ * Get properly aligned buffer length -+ */ -+#define XF_ALIGNED(size)\ -+((((size) + XF_PROXY_ALIGN) - 1) & ~(XF_PROXY_ALIGN - 1)) /* PRQA S 3453 */ -+ -+#ifndef offset_of -+/** \def offset_of(type, member) -+ * Return the offset of member in type structuer in byte -+ */ -+#define offset_of(type, member) \ -+ ((int)(long int)&(((const type *)(0))->member)) /* PRQA S 3453 */ -+#endif -+ -+/************************************************* -+ * Variable and and function declaration -+ * **********************************************/ -+ -+/** ADSP base control data */ -+static struct xf_adsp_base *base; -+ -+/* function declaration */ -+static int xf_adsp_base_register_handle(void *private_data, -+ struct xf_callback_func *cb, -+ int comp_id); -+static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id); -+static int xf_adsp_base_free_handle(int handle_id); -+static void xf_adsp_base_init_handle(void); -+static int xf_adsp_base_get_valid_handle(void); -+static int xf_send_and_receive(struct xf_message *msg); -+static int xf_response_thread(void *data); -+static void xf_buffer_put(struct xf_buffer *buffer); -+static u32 xf_buffer_length(struct xf_buffer *b); -+static struct xf_buffer *xf_buffer_get(struct xf_pool *pool); -+static void *xf_buffer_data(struct xf_buffer *b); -+static int xf_adsp_unregister(int comp_id); -+static int xf_adsp_register(char *name, int *comp_id); -+ -+/************************************************* -+ * Helper function to process pool data -+ * **********************************************/ -+ -+/** *********************************************************** -+ * \brief get buffer from given pool -+ * -+ * \param[in] pool Data pool address -+ * \retval b Pointer to buffer address in pool -+ **************************************************************/ -+static struct xf_buffer *xf_buffer_get(struct xf_pool *pool) -+{ -+ struct xf_buffer *b; -+ -+ b = pool->free; -+ if (b) { -+ pool->free = b->link.next; -+ b->link.pool = pool; -+ } -+ return b; -+} -+ -+/*********************************************************** -+ *\brief return buffer back to pool -+ * -+ *\param[in] buffer Pointer to the buffer data -+ ************************************************************/ -+static void xf_buffer_put(struct xf_buffer *buffer) -+{ -+ struct xf_pool *pool = buffer->link.pool; -+ -+ buffer->link.next = pool->free; -+ pool->free = buffer; -+} -+ -+/*********************************************************** -+ *\brief get the address of the given buffer data -+ * -+ *\param[in] b Pointer to the buffer data -+ *\retval address Address of buffer data -+ ************************************************************/ -+static void *xf_buffer_data(struct xf_buffer *b) -+{ -+ return b->address; -+} -+ -+/************************************************************ -+ *\brief get the length of the given buffer data -+ * -+ *\param[in] b Pointer to the buffer data -+ *\retval length Size of buffer data -+ ************************************************************/ -+static u32 xf_buffer_length(struct xf_buffer *b) /* PRQA S 3673 */ -+{ -+ return b->link.pool->length; -+} -+ -+/************************************************************ -+ *\brief set data to the given command message -+ * -+ *\param[out] m Pointer to the command message -+ *\param[in] id Message ID -+ *\param[in] opcode Message opcode -+ *\param[in] length Message length -+ *\param[in] buf Pointer to the buffer data -+ *\param[in] next Pointer to the next message -+ *\retval m Pointer to the command message -+ ************************************************************/ -+static inline struct xf_message * -+xf_create_msg(struct xf_message *m, u32 id, u32 opcode, u32 length, void *buf, -+ struct xf_message *next) -+{ -+ if (m) { -+ m->id = id; -+ m->opcode = opcode; -+ m->length = length; -+ m->buffer = buf; -+ m->next = next; -+ } -+ -+ return m; -+} -+ -+/***************************************************************** -+ *\brief synchronous send and wait for response message from proxy -+ * -+ *\param[in] msg Pointer to the command message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ ****************************************************************/ -+static int xf_send_and_receive(struct xf_message *msg) -+{ -+ int err; -+ int opcode = msg->opcode; -+ -+ /* reset the base flag */ -+ spin_lock(&base->lock); -+ base->base_flag = FALSE; -+ spin_unlock(&base->lock); -+ -+ err = base->cmd.send(base->client, (void *)msg); -+ if (err != 0) -+ return err; -+ -+ /* sleep and wait for the response wake up event */ -+ if (wait_event_interruptible(base->base_wait, -+ base->base_flag || base->err_flag)) { -+ return -EINVAL; -+ } -+ -+ if (base->err_flag != 0) { -+ spin_lock(&base->lock); -+ base->err_flag = FALSE; -+ spin_unlock(&base->lock); -+ return -EINVAL; -+ } -+ -+ /* save the response message */ -+ /* PRQA S 3200 */ -+ memcpy(msg, &base->base_msg, sizeof(struct xf_message)); -+ -+ /* check if the reponsed message is right */ -+ if (msg->opcode != opcode) -+ return -EINVAL; -+ -+ return 0; -+} -+ -+/************************************************************* -+ *\brief send a message to proxy -+ * -+ *\param[in] msg Pointer to the command message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+static inline int xf_send(struct xf_message *msg) -+{ -+ return base->cmd.send(base->client, (void *)msg); -+} -+ -+/** *********************************************************** -+ *\brief receive message from proxy -+ * -+ *\param[in] msg Pointer to store the response message -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+static inline int xf_receive(struct xf_message *msg) -+{ -+ /* do not wait here */ -+ return base->cmd.recv(base->client, (void *)msg); -+} -+ -+/** *********************************************************** -+ *\brief thread for receive response data -+ **************************************************************/ -+static int xf_response_thread(void *data) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ int id; -+ -+ /* set polling to wait the response message */ -+ spin_lock(&base->lock); -+ base->wait_flag = FALSE; -+ spin_unlock(&base->lock); -+ -+ while (!kthread_should_stop()) { -+ if (base->cmd.poll(base->client, &base->wait_flag) != 0) -+ continue; -+ -+ if (xf_receive(&msg) != 0) -+ continue; -+ -+ /* get the handle id */ -+ id = XF_AP_CLIENT(msg.id); -+ -+ /* check the destination of the response message */ -+ if (id == 0) { -+ /* message is from base control */ -+ /* PRQA S 3200 1*/ -+ memcpy(&base->base_msg, &msg, -+ sizeof(struct xf_message)); -+ -+ spin_lock(&base->lock); -+ base->base_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ continue; -+ } -+ -+ /* get handle data */ -+ handle = xf_adsp_base_get_handle(id); -+ -+ if (handle == 0) -+ continue; -+ -+ switch (msg.opcode) { -+ case XF_EMPTY_THIS_BUFFER: /* PRQA S 0594 */ -+ handle->cb->empty_buf_done(handle->private_data, -+ msg.opcode, -+ msg.length, -+ msg.buffer); -+ break; -+ case XF_FILL_THIS_BUFFER: /* PRQA S 0594 */ -+ handle->cb->fill_buf_done(handle->private_data, -+ msg.opcode, -+ msg.length, -+ msg.buffer); -+ break; -+ case XF_SET_PARAM: /* PRQA S 0594 4 */ -+ case XF_GET_PARAM: -+ case XF_ROUTE: -+ case XF_UNROUTE: -+ /* message is from base control */ -+ memcpy(&base->base_msg, &msg, -+ sizeof(struct xf_message)); /* PRQA S 3200 */ -+ -+ spin_lock(&base->lock); -+ base->base_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ break; -+ default: -+ /* error has occurred */ -+ handle->cb->event_handler(handle->private_data); -+ -+ xf_adsp_base_free_handle(id); /* PRQA S 3200 */ -+ -+ spin_lock(&base->lock); -+ base->err_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ wake_up(&base->base_wait); -+ break; -+ } -+ } -+ -+ pr_info("ADSP base thread was exited\n"); -+ -+ do_exit(0); -+ return 0; -+} -+ -+/************************************************************* -+ * \brief register component to ADSP -+ * -+ * \param[in] name Name string of component -+ * \param[out] comp_id Store the registered component ID -+ * \retval 0 Success -+ * \retval -EINVAL Failed -+ **************************************************************/ -+static int xf_adsp_register(char *name, int *comp_id) /* PRQA S 3673 */ -+{ -+ struct xf_message msg; -+ struct xf_buffer *b = xf_buffer_get(base->aux_pool); -+ int err = 0; -+ -+ msg.id = __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)); -+ msg.opcode = XF_REGISTER; -+ msg.length = strlen(name) + 1; -+ msg.buffer = xf_buffer_data(b); -+ -+ /* copy identify name of ADSP component */ -+ if (msg.length <= xf_buffer_length(b)) -+ strncpy(msg.buffer, name, msg.length); /* PRQA S 3200 */ -+ else -+ strncpy(msg.buffer, name, xf_buffer_length(b));/* PRQA S 3200 */ -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the registered component ID */ -+ *comp_id = XF_MSG_SRC(msg.id); -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ * \brief unregister component from ADSP -+ * \param[in] comp_id Registered component ID -+ * \retval 0 Success -+ * \retval -EINVAL Failed -+ **************************************************************/ -+static int xf_adsp_unregister(int comp_id) -+{ -+ struct xf_message msg; -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), comp_id), -+ XF_UNREGISTER, 0, NULL, NULL); /* PRQA S 3200 */ -+ -+ return xf_send_and_receive(&msg); -+} -+ -+/*************************************************************** -+ * APIs for ADSP component helper -+ * ************************************************************/ -+/** *********************************************************** -+ * \brief allocate memory pool from shared memory -+ * \param[in] pool_size Number of buffer need to allocate -+ * \param[in] buf_length Size of each buffer in bytes -+ * \retval pool Pointer to allocated pool -+ * \retval -EINVAL Invalid base data -+ * \retval -ENOMEM Out of memory resource -+ **************************************************************/ -+struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length) -+{ -+ void *data; -+ u32 number; -+ struct xf_buffer *b; -+ struct xf_message msg; -+ struct xf_pool *pool; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return ERR_PTR(-EINVAL); /* PRQA S 0306 */ -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), -+ XF_ALLOC, -+ buf_length * pool_size, NULL, NULL); /* PRQA S 3200 */ -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ -+ -+ /* PRQA S 0306 1 */ -+ pool = kmalloc(offset_of(struct xf_pool, buffer) + -+ (pool_size * sizeof(struct xf_buffer)), GFP_KERNEL); -+ -+ if (!pool) -+ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ -+ -+ pool->length = buf_length; -+ pool->number = pool_size; -+ pool->p = msg.buffer; -+ -+ number = pool_size; -+ for (pool->free = b = &pool->buffer[0], data = pool->p; -+ number > 0; number--, b++) { /* PRQA S 2462,3418,0489 */ -+ /* set address of the buffer */ -+ b->address = data; -+ -+ /* fill buffer into free list */ -+ if (number == 1) -+ b->link.next = NULL; -+ else -+ b->link.next = b + 1; /* PRQA S 0489 */ -+ -+ /* advance data pointer in contigous buffer */ -+ data += buf_length; /* PRQA S 0550 */ -+ } -+ -+ return pool; -+} -+ -+/** *********************************************************** -+ *\brief return memory to shared memory -+ *\param[in] pool Data pool address -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or pool data -+ **************************************************************/ -+int xf_adsp_free_mem_pool(struct xf_pool *pool) -+{ -+ struct xf_message msg; -+ -+ /* check the sane ADSP base pool data*/ -+ if (!base || !pool) -+ return -EINVAL; -+ -+ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), -+ XF_FREE, pool->number * pool->length, -+ pool->p, NULL); /* PRQA S 3200 */ -+ -+ xf_send_and_receive(&msg); /* PRQA S 3200 */ -+ -+ kfree(pool); -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief get buffer from given pool -+ * -+ *\param[in] pool Data pool address -+ *\param[in] index Buffer index -+ *\retval b Pointer to buffer address in pool -+ *\retval -EINVAL Invalid pool or index -+ **************************************************************/ -+char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index) -+{ -+ struct xf_buffer *buf[XF_BUF_POOL_SIZE] = {0}; -+ char *data; -+ int i; -+ -+ /* check the sane pool data*/ -+ if (!pool) -+ return ERR_PTR(-EINVAL); /* PRQA S 306 */ -+ -+ /* check the index is valid */ -+ if (index > (pool->number - 1)) -+ return ERR_PTR(-EINVAL); /* PRQA S 306 */ -+ -+ /* get buffer from pool */ -+ for (i = 0; i <= index; i++) -+ buf[i] = xf_buffer_get(pool); -+ -+ /* get data from buffer */ -+ data = xf_buffer_data(buf[index]); -+ -+ /* return buffer to pool */ -+ for (i = index; i >= 0; i--) -+ xf_buffer_put(buf[i]); -+ -+ return data; -+} -+ -+/** *********************************************************** -+ *\brief send empty this buffer command to ADSP framework -+ * -+ *\param[in] handle_id ID of the registered handle -+ *\param[in] buffer Pointer to data buffer -+ *\param[in] length Size of buffer in bytes -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ /* submit message to port 0 of component */ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_EMPTY_THIS_BUFFER, length, buffer, NULL); -+ -+ xf_send(&msg); /* PRQA S 3200 */ -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief send fill this buffer command to ADSP framework -+ * -+ *\param[in] handle_id ID of the registered handle -+ *\param[in] buffer Pointer to data buffer -+ *\param[in] length Size of buffer in bytes -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length) -+{ -+ struct xf_message msg; -+ struct xf_handle *handle; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ /* submit message to port 1 of component */ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 1)), -+ XF_FILL_THIS_BUFFER, length, buffer, NULL); -+ -+ xf_send(&msg); /* PRQA S 3200 */ -+ -+ return 0; -+} -+ -+/** *********************************************************** -+ *\brief route data between two registered ADSP plugins -+ * -+ *\param[in] src_handle_id Handle ID of source plugin -+ *\param[in] dst_handle_id Handle ID of sink plugin -+ *\param[in] buf_cnt Number of buffer in tunnel -+ *\param[in] buf_size Size of each buffer in tunnel -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int -+xf_adsp_route(int src_handle_id, int dst_handle_id, int buf_cnt, int buf_size) -+{ -+ struct xf_route_port_msg *route_msg; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ struct xf_handle *dst_handle, *src_handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ /* get handle data */ -+ dst_handle = xf_adsp_base_get_handle(dst_handle_id); -+ src_handle = xf_adsp_base_get_handle(src_handle_id); -+ -+ if (!dst_handle || !src_handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ route_msg = xf_buffer_data(b); -+ -+ /* route information */ -+ route_msg->dst = __XF_PORT_SPEC2(dst_handle->comp_id, 0); -+ route_msg->alloc_align = 4; -+ route_msg->alloc_number = buf_cnt; -+ route_msg->alloc_size = buf_size; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, src_handle_id), -+ __XF_PORT_SPEC2(src_handle->comp_id, 1)), -+ XF_ROUTE, sizeof(*route_msg), route_msg, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief set a single parameter -+ * -+ *\param[in] handle_id ID of registered handle -+ *\param[in] index Sub-command index of parameter -+ *\param[in] value the setting value -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_set_param(int handle_id, int index, int value) -+{ -+ struct xf_message msg; -+ struct xf_buffer *b; -+ struct xf_set_param_msg *msg_params; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ msg_params->item[0].id = index; -+ msg_params->item[0].value = value; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(1), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get a single parameter -+ * -+ *\param[in] handle_id ID of registered handle -+ *\param[in] index Sub-command index of parameter -+ *\param[out] value Store the getting value -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_get_param(int handle_id, int index, int *value) -+{ -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base and value data */ -+ if (!base || !value) -+ return -EINVAL; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ msg_params->c.id[0] = index; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(1), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ *value = msg_params->r.value[0]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/*************************************************** -+ * APIs for ADSP base control -+ * ************************************************/ -+ -+/** *********************************************************** -+ *\brief initialize ADSP base's instance -+ * -+ *\retval 0 Success -+ *\retval -EINVAL ADSP base's instance has been initialized -+ *\retval -ENOMEM Cannot allocate memory for ADSP base -+ *\retval -EBUSY Cannot register client to proxy -+ **************************************************************/ -+int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd) -+{ -+ int err = 0; -+ -+ if (base != 0) -+ return -EINVAL; -+ -+ if (!cmd || !cmd->recv || !cmd->send || !cmd->poll || -+ !cmd->client_register || !cmd->client_unregister) -+ return -EINVAL; -+ -+ base = kmalloc(sizeof(*base), GFP_KERNEL); -+ if (!base) -+ return -ENOMEM; -+ -+ memset(base, 0, sizeof(struct xf_adsp_base)); /* PRQA S 3200 */ -+ -+ /* store the proxy command */ -+ memcpy(&base->cmd, cmd, sizeof(struct xf_adsp_base_cmd)); -+ -+ /* create client to connect from proxy driver */ -+ err = base->cmd.client_register(&base->client); -+ if (err != 0) -+ goto err3; /* PRQA S 2001 */ -+ -+ /* initialize waiting queue */ -+ init_waitqueue_head(&base->base_wait); -+ -+ /* initialize handle */ -+ xf_adsp_base_init_handle(); -+ -+ /* create thread to get the responsed message from proxy */ -+ base->rsp_thread = kthread_run(&xf_response_thread, -+ (void *)base, "adsp base"); -+ -+ if (base->rsp_thread != 0) { -+ pr_info("ADSP base thread has been started.\n"); -+ } else { -+ pr_info("Failed in create base thread\n"); -+ err = -ENOMEM; -+ goto err2; /* PRQA S 2001 */ -+ } -+ -+ /* allocate auxiliary pool for component usage */ -+ base->aux_pool = xf_adsp_allocate_mem_pool( -+ XF_AUX_POOL_SIZE, -+ XF_ALIGNED(XF_AUX_POOL_MSG_LENGTH)); -+ -+ if (IS_ERR(base->aux_pool)) { /* PRQA S 306 */ -+ err = -ENOMEM; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ pr_info("ADSP base was created\n"); -+ return 0; -+ -+err1: -+ /* cancel the waitting queue */ -+ spin_lock(&base->lock); -+ base->wait_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ /* stop thread inadvance */ -+ kthread_stop(base->rsp_thread); -+ -+err2: -+ base->cmd.client_unregister(base->client); -+ -+err3: -+ kfree(base); -+ base = NULL; -+ -+ return err; -+} -+EXPORT_SYMBOL(xf_adsp_base_create); /* PRQA S 0651 */ -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP base's instance -+ * -+ *\retval 0 Success -+ *\retval -EINVAL Invalid ADSP base's instance -+ **************************************************************/ -+int xf_adsp_base_destroy(void) -+{ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ /* free auxiliary pool to shared memory */ -+ xf_adsp_free_mem_pool(base->aux_pool); /* PRQA S 3200 */ -+ -+ /* cancel wait the response message, go to stop process */ -+ spin_lock(&base->lock); -+ base->wait_flag = TRUE; -+ spin_unlock(&base->lock); -+ -+ /* stop response thread */ -+ kthread_stop(base->rsp_thread); -+ -+ /* unregister client */ -+ base->cmd.client_unregister(base->client); -+ -+ kfree(base); -+ base = NULL; -+ -+ pr_info("ADSP base was destroyed\n"); -+ return 0; -+} -+EXPORT_SYMBOL(xf_adsp_base_destroy); /* PRQA S 0651 */ -+ -+/** *********************************************************** -+ * \brief initialize handle instance -+ **************************************************************/ -+static inline void xf_adsp_base_init_handle(void) -+{ -+ int i; -+ -+ for (i = 0; i < MAX_HANDLE; i++) -+ base->handle[i] = NULL; -+} -+ -+/** *********************************************************** -+ *\brief get the next available handle ID for register -+ * -+ *\retval -1 Unavailable handle ID -+ *\retval 0 to 255 Available handle ID -+ **************************************************************/ -+static inline int xf_adsp_base_get_valid_handle(void) -+{ -+ int id = -1; -+ int i; -+ -+ for (i = 0; i < MAX_HANDLE; i++) { -+ /* get the id of the first available handler */ -+ if (!base->handle[i]) { -+ id = i; -+ break; -+ } -+ } -+ -+ return id; -+} -+ -+/** *********************************************************** -+ *\brief register a handle instance for component usage -+ * -+ *\param[in] private_data Private data of this component -+ *\param[in] cb Callback function -+ *\param[in] comp_id ID of register component -+ *\retval id ID of registered handle -+ *\retval -EINVAL Cannot get the handle instance -+ *\retval -ENOMEM Cannot allocate handle memory -+ **************************************************************/ -+static int xf_adsp_base_register_handle(void *private_data, -+ struct xf_callback_func *cb, -+ int comp_id) -+{ -+ struct xf_handle *handle; -+ int id; -+ -+ /* get the next handle id */ -+ id = xf_adsp_base_get_valid_handle(); -+ -+ /* check available handle in base */ -+ if (id < 0) -+ return -EINVAL; -+ -+ /* allocate handle data */ -+ handle = kmalloc(sizeof(*handle), GFP_KERNEL); -+ if (!handle) -+ return -ENOMEM; -+ -+ /* save handle data */ -+ handle->private_data = private_data; -+ handle->cb = cb; -+ handle->comp_id = comp_id; -+ -+ /* save the hanle data */ -+ base->handle[id] = handle; -+ -+ /* return the id numbering in base handle */ -+ return (id + 1); -+} -+ -+/** *********************************************************** -+ *\brief get handle instance from handle ID -+ * -+ *\param[in] handle_id ID of registered handle -+ *\retval handle Pointer to handle instance -+ **************************************************************/ -+static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id) -+{ -+ return base->handle[handle_id - 1]; -+} -+ -+/** *********************************************************** -+ *\brief free the registered handle instance -+ * -+ *\param[in] handle_id ID of registered handle -+ *\retval 0 Success -+ *\retval -EINVAL Invalid handle ID -+ **************************************************************/ -+static int xf_adsp_base_free_handle(int handle_id) -+{ -+ if (handle_id < 1 || handle_id > MAX_HANDLE) -+ return -EINVAL; -+ -+ kfree(base->handle[handle_id - 1]); -+ base->handle[handle_id - 1] = NULL; -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Renderer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Renderer parameters -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_renderer_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ params = &renderer->params; -+ -+ /* get Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_CHANNELS; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; -+ msg_params->item[i++].value = params->out_channel; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_MIX_CONTROL; -+ msg_params->item[i++].value = params->mix_ctrl; -+ -+ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_STATE; -+ msg_params->item[i++].value = params->state; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Renderer parameters -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 */ -+int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_adsp_renderer_params *rdr_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ rdr_params = &renderer->params; -+ -+ /* get Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_CHANNELS; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_MIX_CONTROL; -+ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_STATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ rdr_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ rdr_params->channel = msg_params->r.value[i++]; -+ rdr_params->pcm_width = msg_params->r.value[i++]; -+ rdr_params->frame_size = msg_params->r.value[i++]; -+ rdr_params->dev1 = msg_params->r.value[i++]; -+ rdr_params->dev2 = msg_params->r.value[i++]; -+ rdr_params->dma1 = msg_params->r.value[i++]; -+ rdr_params->dma2 = msg_params->r.value[i++]; -+ rdr_params->out_rate = msg_params->r.value[i++]; -+ rdr_params->vol_rate = msg_params->r.value[i++]; -+ rdr_params->out_channel = msg_params->r.value[i++]; -+ rdr_params->mix_ctrl = msg_params->r.value[i++]; -+ rdr_params->state = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Renderer component -+ * -+ *\param[in,out] renderer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_renderer *rdr; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ rdr = kmalloc(sizeof(*rdr), GFP_KERNEL); -+ if (!rdr) -+ return -ENOMEM; -+ -+ memset(rdr, 0, sizeof(struct xf_adsp_renderer)); /* PRQA S 3200 */ -+ -+ /* register renderer component */ -+ err = xf_adsp_register("renderer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register Renderer to ADSP base control */ -+ rdr->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (rdr->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from Renderer plugin */ -+ err = xf_adsp_renderer_get_params(rdr); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save renderer compoent data */ -+ *renderer = rdr; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(rdr); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Renderer component -+ * -+ *\param[in] renderer Pointer to Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !renderer) -+ return -EINVAL; -+ -+ handle_id = renderer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(renderer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Capture component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Capture parameters -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_capture_set_params(struct xf_adsp_capture *capture) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_capture_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ params = &capture->params; -+ -+ /* get Capture's handle data */ -+ handle = xf_adsp_base_get_handle(capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_CHANNELS; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_STATE; -+ msg_params->item[i++].value = params->state; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Capture parameters -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 */ -+int xf_adsp_capture_get_params(struct xf_adsp_capture *capture) -+{ -+ struct xf_adsp_capture_params *cap_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ cap_params = &capture->params; -+ -+ /* get Capture's handle data */ -+ handle = xf_adsp_base_get_handle(capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 11 1*/ -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_CHANNELS; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_STATE; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ cap_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 11 */ -+ cap_params->channel = msg_params->r.value[i++]; -+ cap_params->pcm_width = msg_params->r.value[i++]; -+ cap_params->frame_size = msg_params->r.value[i++]; -+ cap_params->dev1 = msg_params->r.value[i++]; -+ cap_params->dev2 = msg_params->r.value[i++]; -+ cap_params->dma1 = msg_params->r.value[i++]; -+ cap_params->dma2 = msg_params->r.value[i++]; -+ cap_params->out_rate = msg_params->r.value[i++]; -+ cap_params->vol_rate = msg_params->r.value[i++]; -+ cap_params->state = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Capture component -+ * -+ *\param[in,out] capture Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Capture instance -+ *****************************************************************************/ -+int xf_adsp_capture_create(struct xf_adsp_capture **capture, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_capture *cap; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ cap = kmalloc(sizeof(*cap), GFP_KERNEL); -+ if (!cap) -+ return -ENOMEM; -+ -+ memset(cap, 0, sizeof(struct xf_adsp_capture)); /* PRQA S 3200 */ -+ -+ /* register capture component */ -+ err = xf_adsp_register("capture", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register capture to ADSP base control */ -+ cap->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (cap->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from capture plugin */ -+ err = xf_adsp_capture_get_params(cap); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save capture compoent data */ -+ *capture = cap; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(cap); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Capture component -+ * -+ *\param[in] capture Pointer to Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Capture data -+ **************************************************************/ -+int xf_adsp_capture_destroy(struct xf_adsp_capture *capture) /* PRQA S 3673 */ -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !capture) -+ return -EINVAL; -+ -+ handle_id = capture->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(capture); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for Equalizer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP Equalizer parameters -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_equalizer_params *params; -+ struct xf_buffer *b; -+ int i, n; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ params = &equalizer->params; -+ -+ /* get Equalizer's handle data */ -+ handle = xf_adsp_base_get_handle(equalizer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_COEF_FS; -+ msg_params->item[i++].value = params->rate; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_CH; -+ msg_params->item[i++].value = params->channel; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; -+ msg_params->item[i++].value = params->eqz_type; -+ -+ if (params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { -+ struct xf_equalizer_parametric_coef *coef = ¶ms->p_coef; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; -+ msg_params->item[i++].value = coef->type[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; -+ msg_params->item[i++].value = coef->fc[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; -+ msg_params->item[i++].value = coef->band_width[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; -+ msg_params->item[i++].value = coef->gain[n]; -+ -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; -+ msg_params->item[i++].value = coef->gain_base[n]; -+ } -+ } else { -+ struct xf_equalizer_graphic_coef *coef = ¶ms->g_coef; -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { -+ msg_params->item[i].id = -+ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; -+ msg_params->item[i++].value = coef->gain_g[n]; -+ } -+ } -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP Equalizer parameters -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_adsp_equalizer_params *eqz_params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i, n; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ eqz_params = &equalizer->params; -+ -+ /* get Equalizer's handle data */ -+ handle = xf_adsp_base_get_handle(equalizer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_COEF_FS; /* PRQA S 3440 4 */ -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_CH; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ /* PRQA S 3440 5 */ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; -+ -+ msg_params->c.id[i++] = -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; -+ } -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) -+ /* PRQA S 3440 1 */ -+ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; -+ -+ /* PRQA S 3200 2 */ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ eqz_params->rate = msg_params->r.value[i++]; /* PRQA S 3440 4 */ -+ eqz_params->channel = msg_params->r.value[i++]; -+ eqz_params->pcm_width = msg_params->r.value[i++]; -+ eqz_params->eqz_type = msg_params->r.value[i++]; -+ -+ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { -+ /* PRQA S 3440 5 */ -+ eqz_params->p_coef.type[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.fc[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.band_width[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.gain[n] = msg_params->r.value[i++]; -+ eqz_params->p_coef.gain_base[n] = msg_params->r.value[i++]; -+ } -+ -+ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { -+ /* PRQA S 3440 1 */ -+ eqz_params->g_coef.gain_g[n] = msg_params->r.value[i++]; -+ } -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create Equalizer component -+ * -+ *\param[in,out] equalizer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Equalier instance -+ *****************************************************************************/ -+int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_equalizer *eqz; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ eqz = kmalloc(sizeof(*eqz), GFP_KERNEL); -+ if (!eqz) -+ return -ENOMEM; -+ -+ memset(eqz, 0, sizeof(struct xf_adsp_equalizer)); /* PRQA S 3200 */ -+ -+ /* register equalizer component */ -+ err = xf_adsp_register("equalizer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register equalizer to ADSP base control */ -+ eqz->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (eqz->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from equalizer plugin */ -+ err = xf_adsp_equalizer_get_params(eqz); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save equalizer compoent data */ -+ *equalizer = eqz; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(eqz); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP Equalizer component -+ * -+ *\param[in] equalizer Pointer to Equalizer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Equalizer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base and Equalizer data */ -+ if (!base || !equalizer) -+ return -EINVAL; -+ -+ handle_id = equalizer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(equalizer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for TDM Renderer component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP TDM Renderer parameters -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_tdm_renderer_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ params = &tdm_renderer->params; -+ -+ /* get TDM Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->item[i++].value = params->ch_mode; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP TDM Renderer parameters -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_adsp_tdm_renderer_params *params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ params = &tdm_renderer->params; -+ -+ /* get TDM Renderer's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ params->ch_mode = msg_params->r.value[i++]; -+ params->pcm_width = msg_params->r.value[i++]; -+ params->frame_size = msg_params->r.value[i++]; -+ params->dev1 = msg_params->r.value[i++]; -+ params->dev2 = msg_params->r.value[i++]; -+ params->dma1 = msg_params->r.value[i++]; -+ params->dma2 = msg_params->r.value[i++]; -+ params->out_rate = msg_params->r.value[i++]; -+ params->vol_rate = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create TDM Renderer component -+ * -+ *\param[in,out] tdm_renderer Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, -+ struct xf_callback_func *cb, -+ void *private_data) -+{ -+ struct xf_adsp_tdm_renderer *tdm_rdr; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ tdm_rdr = kmalloc(sizeof(*tdm_rdr), GFP_KERNEL); -+ if (!tdm_rdr) -+ return -ENOMEM; -+ -+ /* PRQA S 3200 */ -+ memset(tdm_rdr, 0, sizeof(struct xf_adsp_tdm_renderer)); -+ -+ /* register TDM Renderer component */ -+ err = xf_adsp_register("tdm-renderer", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register TDM Renderer to ADSP base control */ -+ tdm_rdr->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (tdm_rdr->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from plugin */ -+ err = xf_adsp_tdm_renderer_get_params(tdm_rdr); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save compoent data */ -+ *tdm_renderer = tdm_rdr; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(tdm_rdr); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP TDM Renderer component -+ * -+ *\param[in] tdm_renderer Pointer to TDM Renderer component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 1*/ -+int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_renderer) -+ return -EINVAL; -+ -+ handle_id = tdm_renderer->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(tdm_renderer); -+ -+ return 0; -+} -+ -+/*********************************************************************** -+ * APIs for TDM Capture component -+ * ********************************************************************/ -+ -+/** *********************************************************** -+ *\brief set ADSP TDM Capture parameters -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_message msg; -+ struct xf_set_param_msg *msg_params; -+ struct xf_adsp_tdm_capture_params *params; -+ struct xf_buffer *b; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ params = &tdm_capture->params; -+ -+ /* get TDM Capture's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->item[i++].value = params->in_rate; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->item[i++].value = params->ch_mode; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->item[i++].value = params->pcm_width; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->item[i++].value = params->frame_size; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->item[i++].value = params->dev1; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->item[i++].value = params->dev2; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->item[i++].value = params->dma1; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->item[i++].value = params->dma2; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->item[i++].value = params->out_rate; -+ -+ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ msg_params->item[i++].value = params->vol_rate; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief get ADSP TDM Capture parameters -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Failed -+ **************************************************************/ -+/* PRQA S 1505 1*/ -+int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_adsp_tdm_capture_params *params; -+ struct xf_message msg; -+ struct xf_buffer *b; -+ union xf_get_param_msg *msg_params; -+ int i; -+ struct xf_handle *handle; -+ int err = 0; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ params = &tdm_capture->params; -+ -+ /* get TDM Capture's handle data */ -+ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); -+ if (!handle) -+ return -EINVAL; -+ -+ b = xf_buffer_get(base->aux_pool); -+ msg_params = xf_buffer_data(b); -+ -+ i = 0; -+ /* PRQA S 3440 13 1*/ -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT1; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT2; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; -+ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; -+ -+ /* PRQA S 3200 2*/ -+ xf_create_msg(&msg, -+ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), -+ __XF_PORT_SPEC2(handle->comp_id, 0)), -+ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); -+ -+ err = xf_send_and_receive(&msg); -+ if (err != 0) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* save the received parameters */ -+ i = 0; -+ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ -+ params->ch_mode = msg_params->r.value[i++]; -+ params->pcm_width = msg_params->r.value[i++]; -+ params->frame_size = msg_params->r.value[i++]; -+ params->dev1 = msg_params->r.value[i++]; -+ params->dev2 = msg_params->r.value[i++]; -+ params->dma1 = msg_params->r.value[i++]; -+ params->dma2 = msg_params->r.value[i++]; -+ params->out_rate = msg_params->r.value[i++]; -+ params->vol_rate = msg_params->r.value[i++]; -+ -+exit: -+ /* return msg to pool */ -+ xf_buffer_put(b); -+ -+ return err; -+} -+ -+/** ************************************************************************** -+ *\brief create TDM Capture component -+ * -+ *\param[in,out] tdm_capture Pointer to the registered component -+ *\param[in] cb Callback function -+ *\param[in] private_data Private data -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base instance or register fail -+ *\retval -ENOMEM Cannot allocate Renderer instance -+ *****************************************************************************/ -+int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, -+ struct xf_callback_func *cb, void *private_data) -+{ -+ struct xf_adsp_tdm_capture *tdm_cap; -+ int err; -+ int comp_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base) -+ return -EINVAL; -+ -+ tdm_cap = kmalloc(sizeof(*tdm_cap), GFP_KERNEL); -+ if (!tdm_cap) -+ return -ENOMEM; -+ -+ /* PRQA S 3200 */ -+ memset(tdm_cap, 0, sizeof(struct xf_adsp_tdm_capture)); -+ -+ /* register TDM Capture component */ -+ err = xf_adsp_register("tdm-capture", &comp_id); -+ if (err != 0) -+ goto err2; /* PRQA S 2001 */ -+ -+ /* register TDM Capture to ADSP base control */ -+ tdm_cap->handle_id = xf_adsp_base_register_handle(private_data, -+ cb, comp_id); -+ -+ if (tdm_cap->handle_id <= 0) { -+ err = -EINVAL; -+ goto err1; /* PRQA S 2001 */ -+ } -+ -+ /* get the default parameter from plugin */ -+ err = xf_adsp_tdm_capture_get_params(tdm_cap); -+ if (err != 0) -+ goto err1; /* PRQA S 2001 */ -+ -+ /* save compoent data */ -+ *tdm_capture = tdm_cap; -+ -+ return 0; -+ -+err1: -+ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ -+ -+err2: -+ kfree(tdm_cap); -+ -+ return err; -+} -+ -+/** *********************************************************** -+ *\brief deinitialize ADSP TDM Capture component -+ * -+ *\param[in] tdm_capture Pointer to TDM Capture component -+ *\retval 0 Success -+ *\retval -EINVAL Invalid base or Renderer data -+ **************************************************************/ -+/* PRQA S 3673 */ -+int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture) -+{ -+ struct xf_handle *handle; -+ int handle_id; -+ -+ /* check the sane ADSP base data */ -+ if (!base || !tdm_capture) -+ return -EINVAL; -+ -+ handle_id = tdm_capture->handle_id; -+ -+ handle = xf_adsp_base_get_handle(handle_id); -+ if (!handle) -+ goto exit; /* PRQA S 2001 */ -+ -+ /* unregister component */ -+ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ -+ -+ /* free handle data from base control */ -+ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ -+ -+exit: -+ kfree(tdm_capture); -+ -+ return 0; -+} -diff --git a/sound/soc/adsp/xf-adsp-base.h b/sound/soc/adsp/xf-adsp-base.h -new file mode 100644 -index 0000000..27eb084 ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-base.h -@@ -0,0 +1,275 @@ -+/** ************************************************************************* -+ *\file xf-adsp-base.h -+ *\brief Header file for ADSP Base Control layer -+ *\addtogroup ADSP Driver -+ **************************************************************************** -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ **************************************************************************** -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_BASE_H -+#define __XF_ADSP_BASE_H -+ -+#include "xf-adsp-config.h" -+#include -+ -+#define XF_BUF_POOL_SIZE (4) /**< number of buffer in a data pool */ -+ -+/**< maximum number of DSP component can be registered */ -+#define MAX_HANDLE (256) -+ -+/* define boolean */ -+#define TRUE (1) -+#define FALSE (0) -+ -+/** \struct xf_callback_func -+ * \brief callback function for ADSP's response message -+ */ -+struct xf_callback_func { -+ /** callback for empty buffer done message */ -+ int (*empty_buf_done)(void *data, int opcode, int length, char *buffer); -+ -+ /** callback for fill buffer done message */ -+ int (*fill_buf_done)(void *data, int opcode, int length, char *buffer); -+ -+ /** callback for event handler */ -+ int (*event_handler)(void *data); -+}; -+ -+/** \struct xf_adsp_renderer_params -+ * \brief parameter structure for Renderer component -+ */ -+struct xf_adsp_renderer_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+ int out_channel; /**< output channels */ -+ int mix_ctrl; /**< mix control flag */ -+ int state; /**< operation state */ -+}; -+ -+/** \struct xf_adsp_renderer -+ * \brief Renderer component structure -+ */ -+struct xf_adsp_renderer { -+ struct xf_adsp_renderer_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_adsp_capture_params -+ *\brief parameter structure of Capture component -+ */ -+struct xf_adsp_capture_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+ int state; /**< operation state */ -+}; -+ -+/** \struct xf_adsp_capture -+ * \brief Capture component structure -+ */ -+struct xf_adsp_capture { -+ struct xf_adsp_capture_params params; /**< parameter structuer*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_equalizer_parametric_coef -+ *\brief Parametric Equalizer type's parameters -+ */ -+struct xf_equalizer_parametric_coef { -+ int type[XA_REL_EQZ_FILTER_NUM]; /**< Filter type */ -+ int fc[XA_REL_EQZ_FILTER_NUM]; /**< Filter center frequency */ -+ int gain[XA_REL_EQZ_FILTER_NUM]; /**< Filter gain */ -+ int band_width[XA_REL_EQZ_FILTER_NUM]; /**< Filter band width */ -+ int gain_base[XA_REL_EQZ_FILTER_NUM]; /**< Filter base gain */ -+}; -+ -+/** \struct xf_equalizer_graphic_coef -+ * \brief Graphic Equalizer type's parameters -+ */ -+struct xf_equalizer_graphic_coef { -+ int gain_g[XA_REL_EQZ_GRAPHIC_BAND_NUM];/**< Graphic equalizer gain */ -+}; -+ -+/** \struct xf_adsp_equalizer_params -+ *\brief Equalizer parameters -+ */ -+struct xf_adsp_equalizer_params { -+ int channel; /**< channel number */ -+ int pcm_width; /**< PCM width */ -+ int rate; /**< sampling rate */ -+ int eqz_type; /**< Equalizer type */ -+ struct xf_equalizer_parametric_coef p_coef; /**< Parametric params */ -+ struct xf_equalizer_graphic_coef g_coef; /**< Graphic params */ -+}; -+ -+/** \struct xf_adsp_equalizer -+ * \brief Equalizer component's structure -+ */ -+struct xf_adsp_equalizer { -+ struct xf_adsp_equalizer_params params;/**< Equalizer parameters */ -+ struct xf_pool *buf_pool; /**< buffer pool for transfer data */ -+ int handle_id; /**< ID of registered handle */ -+}; -+ -+/** \struct xf_adsp_tdm_renderer_params -+ * \brief parameter structure for TDM Renderer component -+ */ -+struct xf_adsp_tdm_renderer_params { -+ int ch_mode; /**< channel mode */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+}; -+ -+/** \struct xf_adsp_tdm_renderer -+ * \brief TDM Renderer component structure -+ */ -+struct xf_adsp_tdm_renderer { -+ struct xf_adsp_tdm_renderer_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle */ -+}; -+ -+/** \struct xf_adsp_tdm_capture_params -+ * \brief parameter structure for TDM Capture component -+ */ -+struct xf_adsp_tdm_capture_params { -+ int ch_mode; /**< channel mode */ -+ int pcm_width; /**< PCM width */ -+ int frame_size; /**< frame size */ -+ int in_rate; /**< input sampling rate */ -+ int out_rate; /**< output sampling rate */ -+ int vol_rate; /**< volume rate */ -+ int dev1; /**< 1st device index */ -+ int dev2; /**< 2nd device index */ -+ int dma1; /**< 1st DMA index */ -+ int dma2; /**< 2nd DMA index */ -+}; -+ -+/** \struct xf_adsp_tdm_capture -+ * \brief TDM Capture component structure -+ */ -+struct xf_adsp_tdm_capture { -+ struct xf_adsp_tdm_capture_params params; /**< parameter structure*/ -+ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ -+ int handle_id; /**< ID of registered handle*/ -+}; -+ -+/** \struct xf_handle -+ * \brief Handle struct for each ADSP component -+ */ -+struct xf_handle { -+ int comp_id;/**< ADSP component ID */ -+ struct xf_callback_func *cb;/**< callback functions */ -+ void *private_data; /**< private data for callback functions*/ -+}; -+ -+/** \struct xf_adsp_base -+ * \brief Base component structure -+ */ -+struct xf_adsp_base { -+ struct xf_adsp_base_cmd cmd; /**< proxy commands */ -+ void *client; /**< client data which registered to proxy */ -+ struct xf_pool *aux_pool; /**< auxiliary buffer pool data */ -+ struct xf_handle *handle[MAX_HANDLE]; /**< handler data */ -+ struct task_struct *rsp_thread;/**< thread for response message*/ -+ wait_queue_head_t base_wait; /**< ADSP base's waiting queue */ -+ struct xf_message base_msg; /**< ADSP base's response message */ -+ int base_flag; /**< flag to control its waiting queue */ -+ int err_flag; /**< flag to indicate a error from plugins */ -+ int wait_flag; /**< flag to control the polling waiting*/ -+ spinlock_t lock; /**< spinlock data */ -+}; -+ -+struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length); -+int xf_adsp_free_mem_pool(struct xf_pool *pool); -+char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index); -+ -+int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length); -+int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length); -+ -+int xf_adsp_route(int src_handle_id, int dst_handle_id -+ , int buf_cnt, int buf_size); -+ -+int xf_adsp_set_param(int handle_id, int index, int value); -+int xf_adsp_get_param(int handle_id, int index, int *value); -+ -+int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer); -+int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer); -+int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer); -+ -+int xf_adsp_capture_create(struct xf_adsp_capture **capture, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_capture_destroy(struct xf_adsp_capture *capture); -+int xf_adsp_capture_set_params(struct xf_adsp_capture *capture); -+int xf_adsp_capture_get_params(struct xf_adsp_capture *capture); -+ -+int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, -+ struct xf_callback_func *cb, void *private_data); -+int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer); -+int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer); -+int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer); -+ -+int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, -+ struct xf_callback_func *cb, -+ void *private_data); -+int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer); -+int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer); -+int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer); -+ -+int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, -+ struct xf_callback_func *cb, -+ void *private_data); -+int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture); -+int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture); -+int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture); -+ -+#endif -diff --git a/sound/soc/adsp/xf-adsp-config.h b/sound/soc/adsp/xf-adsp-config.h -new file mode 100644 -index 0000000..818a46a ---- /dev/null -+++ b/sound/soc/adsp/xf-adsp-config.h -@@ -0,0 +1,604 @@ -+/** **************************************************************************** -+ *\file xf-adsp-config.h -+ *\brief Header file for ADSP configuration -+ *\addtogroup ADSP Driver -+ ******************************************************************************* -+ *\date Oct. 21, 2017 -+ *\author Renesas Electronics Corporation -+ ******************************************************************************* -+ *\par Copyright -+ * -+ * Copyright(c) 2016 Renesas Electoronics Corporation -+ * -+ * 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. -+ ******************************************************************************/ -+ -+#ifndef __XF_ADSP_CONFIG_H -+#define __XF_ADSP_CONFIG_H -+ -+/* Equalizer definition */ -+#define XA_REL_EQZ_FILTER_NUM (9) /**< number of filter */ -+#define XA_REL_EQZ_GRAPHIC_BAND_NUM (5) /**< number of graphic band */ -+ -+struct xf_buffer { -+ void *address; -+ union { /* PRQA S 750 3 */ -+ struct xf_buffer *next; -+ struct xf_pool *pool; -+ } link; -+}; -+ -+struct xf_pool { -+ /* length of individual buffer in a pool */ -+ u32 length; -+ -+ /* number of buffer in a pool */ -+ u32 number; -+ -+ /* pointer to pool memory */ -+ void *p; -+ -+ /* pointer to first free buffer in a pool */ -+ struct xf_buffer *free; -+ -+ /* individual buffer */ -+ struct xf_buffer buffer[0]; /* PRQA S 1037 */ -+}; -+ -+struct xf_message { -+ /* pointer to the next item in the list */ -+ struct xf_message *next; -+ -+ /* shmem session_id */ -+ u32 id; -+ -+ /* operation code */ -+ u32 opcode; -+ -+ /* length of attached message buffer */ -+ u32 length; -+ -+ /* message buffer */ -+ void *buffer; -+}; -+ -+/******************************************************************************* -+ * XF_GET_PARAM message -+ ******************************************************************************/ -+ -+/* ...message body (command/response) */ -+union xf_get_param_msg { /* PRQA S 750 18 */ -+ /* ...command structure */ -+ struct { -+ /* ...array of parameters requested */ -+ u32 id[0]; /* PRQA S 1037 */ -+ -+ } __attribute__((__packed__)) c; -+ -+ /* ...response structure */ -+ struct { -+ /* ...array of parameters values */ -+ u32 value[0];/* PRQA S 1037 */ -+ -+ } __attribute__((__packed__)) r; -+ -+}; -+ -+/* ...length of the XF_GET_PARAM command/response */ -+/* PRQA S 3453 2 */ -+#define XF_GET_PARAM_CMD_LEN(params) (sizeof(u32) * (params)) -+#define XF_GET_PARAM_RSP_LEN(params) (sizeof(u32) * (params)) -+ -+/******************************************************************************* -+ * XF_SET_PARAM message -+ ******************************************************************************/ -+ -+/* ...component initialization parameter */ -+struct xf_set_param_item { -+ /* ...index of parameter passed to SET_CONFIG_PARAM call */ -+ u32 id; -+ -+ /* ...value of parameter */ -+ u32 value; -+ -+} __attribute__ ((__packed__)); -+ -+/* ...message body (no response message? - tbd) */ -+struct xf_set_param_msg { -+ /* ...command message */ -+ struct xf_set_param_item item[0]; /* PRQA S 1037 */ -+ -+} __attribute__ ((__packed__)); -+ -+/* ...length of the command message */ -+/* PRQA S 3453 */ -+#define XF_SET_PARAM_CMD_LEN(params) \ -+ (sizeof(struct xf_set_param_item) * (params)) -+ -+/******************************************************************************* -+ * XF_ROUTE definition -+ ******************************************************************************/ -+ -+/* ...port routing command */ -+struct xf_route_port_msg { -+ /* ...source port specification */ -+ u32 src; -+ -+ /* ...destination port specification */ -+ u32 dst; -+ -+ /* ...number of buffers to allocate */ -+ u32 alloc_number; -+ -+ /* ...length of buffer to allocate */ -+ u32 alloc_size; -+ -+ /* ...alignment restriction for a buffer */ -+ u32 alloc_align; -+ -+} __attribute__((__packed__)); -+ -+/******************************************************************************* -+ * XF_UNROUTE definition -+ ******************************************************************************/ -+ -+/* ...port unrouting command */ -+struct xf_unroute_port_msg { -+ /* ...source port specification */ -+ u32 src; -+ -+ /* ...destination port specification */ -+ u32 dst; -+ -+} __attribute__((__packed__)); -+ -+/* ...Capture states */ -+enum xa_capture_state { -+ XA_CAP_STATE_RUN = 0, -+ XA_CAP_STATE_IDLE = 1, -+ XA_CAP_STATE_PAUSE = 2 -+}; -+ -+/* ...Renderer states */ -+enum xa_renderer_state { -+ XA_RDR_STATE_RUN = 0, -+ XA_RDR_STATE_IDLE = 1, -+ XA_RDR_STATE_PAUSE = 2 -+}; -+ -+/******************************************************************************* -+ * Message routing composition - move somewhere else - tbd -+ ******************************************************************************/ -+ -+/* ...adjust IPC client of message going from user-space */ -+#define XF_MSG_AP_FROM_USER(id, client) \ -+ (((id) & ~(0xF << 2)) | ((client) << 2)) -+ -+/* ...wipe out IPC client from message going to user-space */ -+#define XF_MSG_AP_TO_USER(id) \ -+ ((id) & ~(0xF << 18)) -+ -+/* ...port specification (12 bits) */ -+#define __XF_PORT_SPEC(core, id, port) ((core) | ((id) << 2) | ((port) << 8)) -+#define __XF_PORT_SPEC2(id, port) ((id) | ((port) << 8)) -+#define XF_PORT_CORE(spec) ((spec) & 0x3) -+#define XF_PORT_CLIENT(spec) (((spec) >> 2) & 0x3F) -+#define XF_PORT_ID(spec) (((spec) >> 8) & 0xF) -+ -+/* ...message id contains source and destination ports specification */ -+#define __XF_MSG_ID(src, dst) (((src) & 0xFFFF) | (((dst) & 0xFFFF) << 16)) -+#define XF_MSG_SRC(id) (((id) >> 0) & 0xFFFF) -+#define XF_MSG_SRC_CORE(id) (((id) >> 0) & 0x3) -+#define XF_MSG_SRC_CLIENT(id) (((id) >> 2) & 0x3F) -+#define XF_MSG_SRC_PORT(id) (((id) >> 8) & 0xF) -+#define XF_MSG_SRC_PROXY(id) (((id) >> 15) & 0x1) -+#define XF_MSG_DST(id) (((id) >> 16) & 0xFFFF) -+#define XF_MSG_DST_CORE(id) (((id) >> 16) & 0x3) -+#define XF_MSG_DST_CLIENT(id) (((id) >> 18) & 0x3F) -+#define XF_MSG_DST_PORT(id) (((id) >> 24) & 0xF) -+#define XF_MSG_DST_PROXY(id) (((id) >> 31) & 0x1) -+ -+/* ...special treatment of AP-proxy destination field */ -+#define XF_AP_IPC_CLIENT(id) (((id) >> 18) & 0xF) -+#define XF_AP_CLIENT(id) (((id) >> 22) & 0x1FF) -+#define __XF_AP_PROXY(core) ((core) | 0x8000) -+#define __XF_DSP_PROXY(core) ((core) | 0x8000) -+#define __XF_AP_CLIENT(core, client) ((core) | ((client) << 6) | 0x8000) -+ -+/******************************************************************************* -+ * Opcode composition -+ ******************************************************************************/ -+ -+/* ...opcode composition with command/response data tags */ -+#define __XF_OPCODE(c, r, op) (((c) << 31) | ((r) << 30) | ((op) & 0x3F)) -+ -+/* ...accessors */ -+#define XF_OPCODE_CDATA(opcode) ((opcode) & (1 << 31)) -+#define XF_OPCODE_RDATA(opcode) ((opcode) & (1 << 30)) -+#define XF_OPCODE_TYPE(opcode) ((opcode) & (0x3F)) -+ -+/******************************************************************************* -+ * Opcode types -+ ******************************************************************************/ -+ -+/* ...unregister client */ -+#define XF_UNREGISTER __XF_OPCODE(0, 0, 0) -+ -+/* ...register client at proxy */ -+#define XF_REGISTER __XF_OPCODE(1, 0, 1) -+ -+/* ...port routing command */ -+#define XF_ROUTE __XF_OPCODE(1, 0, 2) -+ -+/* ...port unrouting command */ -+#define XF_UNROUTE __XF_OPCODE(1, 0, 3) -+ -+/* ...shared buffer allocation */ -+#define XF_ALLOC __XF_OPCODE(0, 0, 4) -+ -+/* ...shared buffer freeing */ -+#define XF_FREE __XF_OPCODE(0, 0, 5) -+ -+/* ...set component parameters */ -+#define XF_SET_PARAM __XF_OPCODE(1, 0, 6) -+ -+/* ...get component parameters */ -+#define XF_GET_PARAM __XF_OPCODE(1, 1, 7) -+ -+/* ...input buffer reception */ -+#define XF_EMPTY_THIS_BUFFER __XF_OPCODE(1, 0, 8) -+ -+/* ...output buffer reception */ -+#define XF_FILL_THIS_BUFFER __XF_OPCODE(0, 1, 9) -+ -+/* ...flush specific port */ -+#define XF_FLUSH __XF_OPCODE(0, 0, 10) -+ -+/* ...start component operation */ -+#define XF_START __XF_OPCODE(0, 0, 11) -+ -+/* ...stop component operation */ -+#define XF_STOP __XF_OPCODE(0, 0, 12) -+ -+/* ...pause component operation */ -+#define XF_PAUSE __XF_OPCODE(0, 0, 13) -+ -+/* ...resume component operation */ -+#define XF_RESUME __XF_OPCODE(0, 0, 14) -+ -+/* ...total amount of supported decoder commands */ -+#define __XF_OP_NUM (15) -+ -+/************************************************* -+ * Renderer - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_config_param_renderer { -+ XA_RDR_CONFIG_PARAM_STATE = 0, -+ XA_RDR_CONFIG_PARAM_PCM_WIDTH = 1, -+ XA_RDR_CONFIG_PARAM_CHANNELS = 2, -+ XA_RDR_CONFIG_PARAM_SAMPLE_RATE = 3, -+ XA_RDR_CONFIG_PARAM_FRAME_SIZE = 4, -+ XA_RDR_CONFIG_PARAM_OUTPUT1 = 5, -+ XA_RDR_CONFIG_PARAM_DMACHANNEL1 = 6, -+ XA_RDR_CONFIG_PARAM_OUTPUT2 = 7, -+ XA_RDR_CONFIG_PARAM_DMACHANNEL2 = 8, -+ XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 9, -+ XA_RDR_CONFIG_PARAM_VOLUME_RATE = 10, -+ XA_RDR_CONFIG_PARAM_OUT_CHANNELS = 11, -+ XA_RDR_CONFIG_PARAM_MIX_CONTROL = 12, -+ XA_RDR_CONFIG_PARAM_NUM = 13 -+}; -+ -+/************************************************* -+ * Capture - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_config_param_capture { -+ XA_CAP_CONFIG_PARAM_CB = 0, -+ XA_CAP_CONFIG_PARAM_STATE = 1, -+ XA_CAP_CONFIG_PARAM_PCM_WIDTH = 2, -+ XA_CAP_CONFIG_PARAM_CHANNELS = 3, -+ XA_CAP_CONFIG_PARAM_SAMPLE_RATE = 4, -+ XA_CAP_CONFIG_PARAM_FRAME_SIZE = 5, -+ XA_CAP_CONFIG_PARAM_INPUT1 = 6, -+ XA_CAP_CONFIG_PARAM_DMACHANNEL1 = 7, -+ XA_CAP_CONFIG_PARAM_INPUT2 = 8, -+ XA_CAP_CONFIG_PARAM_DMACHANNEL2 = 9, -+ XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 10, -+ XA_CAP_CONFIG_PARAM_VOLUME_RATE = 11, -+ XA_CAP_CONFIG_PARAM_NUM = 12 -+}; -+ -+/************************************************* -+ * Equalizer - specific configuration parameters -+ * **********************************************/ -+ -+enum xa_rel_eqz_filter_type { -+ XA_REL_EQZ_TYPE_THROUGH = 0, -+ XA_REL_EQZ_TYPE_PEAK = 1, -+ XA_REL_EQZ_TYPE_BASS = 2, -+ XA_REL_EQZ_TYPE_TREBLE = 3 -+}; -+ -+enum xa_rel_eqz_type { -+ XA_REL_EQZ_TYPE_PARAMETRIC = 0, -+ XA_REL_EQZ_TYPE_GRAPHIC = 1 -+}; -+ -+/*****************************************************************************/ -+/* Additional subcommand indices */ -+/*****************************************************************************/ -+ -+enum xa_add_cmd_type_generic { -+ /* XA_API_CMD_SET_CONFIG_PARAM indices */ -+ XA_EQZ_CONFIG_PARAM_COEF_FS = 0x0000, -+ XA_EQZ_CONFIG_PARAM_PCM_WIDTH = 0x0001, -+ XA_EQZ_CONFIG_PARAM_CH = 0x0002, -+ XA_EQZ_CONFIG_PARAM_EQZ_TYPE = 0x0003, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC = 0x0010, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_FC = 0x0011, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_FC = 0x0012, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_FC = 0x0013, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_FC = 0x0014, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_FC = 0x0015, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_FC = 0x0016, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_FC = 0x0017, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_FC = 0x0018, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE = 0x0020, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_TYPE = 0x0021, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_TYPE = 0x0022, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_TYPE = 0x0023, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_TYPE = 0x0024, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_TYPE = 0x0025, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_TYPE = 0x0026, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_TYPE = 0x0027, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_TYPE = 0x0028, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW = 0x0030, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BW = 0x0031, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BW = 0x0032, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BW = 0x0033, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BW = 0x0034, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BW = 0x0035, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BW = 0x0036, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BW = 0x0037, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BW = 0x0038, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA = 0x0040, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_GA = 0x0041, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_GA = 0x0042, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_GA = 0x0043, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_GA = 0x0044, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_GA = 0x0045, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_GA = 0x0046, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_GA = 0x0047, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_GA = 0x0048, -+ -+ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA = 0x0050, -+ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BA = 0x0051, -+ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BA = 0x0052, -+ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BA = 0x0053, -+ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BA = 0x0054, -+ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BA = 0x0055, -+ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BA = 0x0056, -+ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BA = 0x0057, -+ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BA = 0x0058, -+ -+ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA = 0x0060, -+ XA_EQZ_CONFIG_PARAM_BAND_1_GCOEF_GA = 0x0061, -+ XA_EQZ_CONFIG_PARAM_BAND_2_GCOEF_GA = 0x0062, -+ XA_EQZ_CONFIG_PARAM_BAND_3_GCOEF_GA = 0x0063, -+ XA_EQZ_CONFIG_PARAM_BAND_4_GCOEF_GA = 0x0064 -+}; -+ -+/* ...tdm-renderer-specific configuration parameters */ -+enum xa_config_param_tdm_renderer { -+ XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH = 0, -+ XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE = 1, -+ XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE = 2, -+ XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE = 3, -+ XA_TDM_RDR_CONFIG_PARAM_OUTPUT1 = 4, -+ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1 = 5, -+ XA_TDM_RDR_CONFIG_PARAM_OUTPUT2 = 6, -+ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2 = 7, -+ XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, -+ XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE = 9 -+}; -+ -+enum xa_rel_tdm_renderer_channel_mode { -+ XA_TDM_RDR_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ -+ /**< 1 six-channels plus 1 two-channels TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_6_2 = 2, -+ XA_TDM_RDR_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ -+ XA_TDM_RDR_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ -+}; -+ -+/* ...TDM Capture-specific configuration parameters */ -+enum xa_config_param_tdm_capture { -+ XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH = 0, -+ XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE = 1, -+ XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE = 2, -+ XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE = 3, -+ XA_TDM_CAP_CONFIG_PARAM_INPUT1 = 4, -+ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1 = 5, -+ XA_TDM_CAP_CONFIG_PARAM_INPUT2 = 6, -+ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2 = 7, -+ XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, -+ XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE = 9 -+}; -+ -+enum xa_rel_tdm_capture_channel_mode { -+ XA_TDM_CAP_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ -+ /**< 1 six-channels plus 1 two-channels TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_6_2 = 2, -+ XA_TDM_CAP_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ -+ XA_TDM_CAP_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ -+}; -+ -+/*****************************************************************************/ -+/* HW supported */ -+/*****************************************************************************/ -+/* ...SSI modules supported by HW */ -+enum ssi_module { -+ SSI00 = 0, -+ SSI01 = 1, -+ SSI02 = 2, -+ SSI03 = 3, -+ SSI04 = 4, -+ SSI05 = 5, -+ SSI06 = 6, -+ SSI07 = 7, -+ SSI10 = 10, -+ SSI11 = 11, -+ SSI12 = 12, -+ SSI13 = 13, -+ SSI14 = 14, -+ SSI15 = 15, -+ SSI16 = 16, -+ SSI17 = 17, -+ SSI20 = 20, -+ SSI21 = 21, -+ SSI22 = 22, -+ SSI23 = 23, -+ SSI24 = 24, -+ SSI25 = 25, -+ SSI26 = 26, -+ SSI27 = 27, -+ SSI30 = 30, -+ SSI31 = 31, -+ SSI32 = 32, -+ SSI33 = 33, -+ SSI34 = 34, -+ SSI35 = 35, -+ SSI36 = 36, -+ SSI37 = 37, -+ SSI40 = 40, -+ SSI41 = 41, -+ SSI42 = 42, -+ SSI43 = 43, -+ SSI44 = 44, -+ SSI45 = 45, -+ SSI46 = 46, -+ SSI47 = 47, -+ SSI5 = 50, -+ SSI6 = 60, -+ SSI7 = 70, -+ SSI8 = 80, -+ SSI90 = 90, -+ SSI91 = 91, -+ SSI92 = 92, -+ SSI93 = 93, -+ SSI94 = 94, -+ SSI95 = 95, -+ SSI96 = 96, -+ SSI97 = 97 -+}; -+ -+/* ...SRC modules supported by HW */ -+enum src_module { -+ SRC0 = 110, /* SRC0 */ -+ SRC1 = 111, /* SRC1 */ -+ SRC2 = 112, /* SRC2 */ -+ SRC3 = 113, /* SRC3 */ -+ SRC4 = 114, /* SRC4 */ -+ SRC5 = 115, /* SRC5 */ -+ SRC6 = 116, /* SRC6 */ -+ SRC7 = 117, /* SRC7 */ -+ SRC8 = 118, /* SRC8 */ -+ SRC9 = 119, /* SRC9 */ -+ SRCMAX = 120 /* Maximum number of SRC modules */ -+}; -+ -+/* ...PDMA supported by HW */ -+enum { -+ PDMA_CH00 = 0, -+ PDMA_CH01 = 1, -+ PDMA_CH02 = 2, -+ PDMA_CH03 = 3, -+ PDMA_CH04 = 4, -+ PDMA_CH05 = 5, -+ PDMA_CH06 = 6, -+ PDMA_CH07 = 7, -+ PDMA_CH08 = 8, -+ PDMA_CH09 = 9, -+ PDMA_CH10 = 10, -+ PDMA_CH11 = 11, -+ PDMA_CH12 = 12, -+ PDMA_CH13 = 13, -+ PDMA_CH14 = 14, -+ PDMA_CH15 = 15, -+ PDMA_CH16 = 16, -+ PDMA_CH17 = 17, -+ PDMA_CH18 = 18, -+ PDMA_CH19 = 19, -+ PDMA_CH20 = 20, -+ PDMA_CH21 = 21, -+ PDMA_CH22 = 22, -+ PDMA_CH23 = 23, -+ PDMA_CH24 = 24, -+ PDMA_CH25 = 25, -+ PDMA_CH26 = 26, -+ PDMA_CH27 = 27, -+ PDMA_CH28 = 28, -+ PDMA_CHMAX = 29 -+}; -+ -+/* ...DMAC supported by HW */ -+enum { -+ ADMAC_CH00 = PDMA_CHMAX + 0, -+ ADMAC_CH01 = PDMA_CHMAX + 1, -+ ADMAC_CH02 = PDMA_CHMAX + 2, -+ ADMAC_CH03 = PDMA_CHMAX + 3, -+ ADMAC_CH04 = PDMA_CHMAX + 4, -+ ADMAC_CH05 = PDMA_CHMAX + 5, -+ ADMAC_CH06 = PDMA_CHMAX + 6, -+ ADMAC_CH07 = PDMA_CHMAX + 7, -+ ADMAC_CH08 = PDMA_CHMAX + 8, -+ ADMAC_CH09 = PDMA_CHMAX + 9, -+ ADMAC_CH10 = PDMA_CHMAX + 10, -+ ADMAC_CH11 = PDMA_CHMAX + 11, -+ ADMAC_CH12 = PDMA_CHMAX + 12, -+ ADMAC_CH13 = PDMA_CHMAX + 13, -+ ADMAC_CH14 = PDMA_CHMAX + 14, -+ ADMAC_CH15 = PDMA_CHMAX + 15, -+ ADMAC_CH16 = PDMA_CHMAX + 16, -+ ADMAC_CH17 = PDMA_CHMAX + 17, -+ ADMAC_CH18 = PDMA_CHMAX + 18, -+ ADMAC_CH19 = PDMA_CHMAX + 19, -+ ADMAC_CH20 = PDMA_CHMAX + 20, -+ ADMAC_CH21 = PDMA_CHMAX + 21, -+ ADMAC_CH22 = PDMA_CHMAX + 22, -+ ADMAC_CH23 = PDMA_CHMAX + 23, -+ ADMAC_CH24 = PDMA_CHMAX + 24, -+ ADMAC_CH25 = PDMA_CHMAX + 25, -+ ADMAC_CH26 = PDMA_CHMAX + 26, -+ ADMAC_CH27 = PDMA_CHMAX + 27, -+ ADMAC_CH28 = PDMA_CHMAX + 28, -+ ADMAC_CH29 = PDMA_CHMAX + 29, -+ ADMAC_CH30 = PDMA_CHMAX + 30, -+ ADMAC_CH31 = PDMA_CHMAX + 31, -+ ADMAC_CHMAX = PDMA_CHMAX + 32 -+}; -+ -+#endif --- -2.7.4 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch deleted file mode 100644 index ecab4120..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 3ae5cb9feda031f660becc94f5496d5ee9b90e22 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Mon, 15 Oct 2018 17:57:56 +0700 -Subject: [PATCH 3/6] ADSP: add build for ADSP sound driver - -Signed-off-by: tienphitran ---- - sound/soc/Kconfig | 1 + - sound/soc/Makefile | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig -index c0abad2067e1..f5f6abbd6e14 100644 ---- a/sound/soc/Kconfig -+++ b/sound/soc/Kconfig -@@ -71,6 +71,7 @@ source "sound/soc/txx9/Kconfig" - source "sound/soc/ux500/Kconfig" - source "sound/soc/xtensa/Kconfig" - source "sound/soc/zte/Kconfig" -+source "sound/soc/adsp/Kconfig" - - # Supported codecs - source "sound/soc/codecs/Kconfig" -diff --git a/sound/soc/Makefile b/sound/soc/Makefile -index bf8c1e2ce0bf..6e77abba2b01 100644 ---- a/sound/soc/Makefile -+++ b/sound/soc/Makefile -@@ -52,3 +52,4 @@ obj-$(CONFIG_SND_SOC) += txx9/ - obj-$(CONFIG_SND_SOC) += ux500/ - obj-$(CONFIG_SND_SOC) += xtensa/ - obj-$(CONFIG_SND_SOC) += zte/ -+obj-$(CONFIG_SND_SOC) += adsp/ --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch deleted file mode 100644 index 6d95d65f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 825517f3f8ebe551d297db16e4582c0eae646f05 Mon Sep 17 00:00:00 2001 -From: tienphitran -Date: Wed, 31 Oct 2018 16:12:36 +0700 -Subject: [PATCH 4/6] ADSP: integrate ADSP sound for H3, M3, M3N board - -Signed-off-by: tienphitran -[takeshi.kihara.df: fix W=1 dtc warning] -Signed-off-by: Takeshi Kihara ---- - arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 ++ - arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 ++ - arch/arm64/boot/dts/renesas/r8a77965.dtsi | 5 ++ - .../boot/dts/renesas/salvator-common.dtsi | 84 +++++++++++++++++-- - 4 files changed, 94 insertions(+), 5 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -index 1896e5250dff..8dfda0fda91c 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -@@ -793,6 +793,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -index c00d1da64198..726c0d07fe59 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -@@ -798,6 +798,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi -index 454a67b132f4..799b005ade92 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi -@@ -227,6 +227,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; -diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi -index 922b9cc4797c..2c1d49c4bcaa 100644 ---- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi -+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi -@@ -153,11 +153,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture", -+ "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -419,8 +435,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -731,6 +766,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -769,7 +843,7 @@ - rsnd_port0: port@0 { - reg = <0>; - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch deleted file mode 100644 index 34b32d8f..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch +++ /dev/null @@ -1,272 +0,0 @@ -From 455f26d0de1cf6eaeb0aa5b58725e3e34d8d34bd Mon Sep 17 00:00:00 2001 -From: Nguyen Dang -Date: Tue, 6 Nov 2018 11:36:15 +0700 -Subject: [PATCH 5/6] ADSP: integrate ADSP sound for E3 board - -Signed-off-by: Nguyen Dang -[takeshi.kihara.df: fix W=1 dtc warning] -[takeshi.kihara.df: support for dt file separation by E3 ES1.0 SoC] -Signed-off-by: Takeshi Kihara ---- - .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 84 +++++++++++++++++-- - .../boot/dts/renesas/r8a77990-es10-ebisu.dts | 84 +++++++++++++++++-- - arch/arm64/boot/dts/renesas/r8a77990.dtsi | 5 ++ - 3 files changed, 163 insertions(+), 10 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -index 26081a6e1866..20fdb4085d87 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts -@@ -221,11 +221,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture", -+ "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -501,8 +517,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -702,6 +737,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -737,7 +811,7 @@ - ports { - rsnd_port0: port@0 { - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; -diff --git a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -index 087d5533f3db..61e18309c4a4 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -+++ b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts -@@ -221,11 +221,27 @@ - }; - - sound_card: sound { -- compatible = "audio-graph-card"; -+ compatible = "audio-graph-scu-card"; - - label = "rcar-sound"; - -- dais = <&rsnd_port0>; -+ prefix = "ak4613"; -+ routing = "ak4613 Playback", "DAI0 Playback", -+ "DAI0 Capture", "ak4613 Capture", -+ "ak4613 Playback", "Playback0", -+ "ak4613 Playback", "Playback1", -+ "ak4613 Playback", "Playback2", -+ "ak4613 Playback", "Playback3", -+ "Capture0", "ak4613 Capture", -+ "Capture1", "ak4613 Capture", -+ "Capture2", "ak4613 Capture", -+ "Capture3", "ak4613 Capture"; -+ -+ dais = <&adsp_port0 -+ &adsp_port1 -+ &adsp_port2 -+ &adsp_port3 -+ &rsnd_port0>; - }; - - vbus0_usb2: regulator-vbus0-usb2 { -@@ -501,8 +517,27 @@ - asahi-kasei,out5-single-end; - asahi-kasei,out6-single-end; - -- port { -- ak4613_endpoint: endpoint { -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ak4613_endpoint0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&adsp_endpoint0>; -+ }; -+ ak4613_endpoint1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&adsp_endpoint1>; -+ }; -+ ak4613_endpoint2: endpoint@2 { -+ reg = <2>; -+ remote-endpoint = <&adsp_endpoint2>; -+ }; -+ ak4613_endpoint3: endpoint@3 { -+ reg = <3>; -+ remote-endpoint = <&adsp_endpoint3>; -+ }; -+ ak4613_endpoint4: endpoint@4 { -+ reg = <4>; - remote-endpoint = <&rsnd_endpoint0>; - }; - }; -@@ -702,6 +737,45 @@ - status = "okay"; - }; - -+&rcar_adsp_sound { -+ status = "okay"; -+ /* Multiple DAI */ -+ #sound-dai-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ adsp_port0: port@0 { -+ reg = <0>; -+ adsp_endpoint0: endpoint { -+ remote-endpoint = <&ak4613_endpoint0>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port1: port@1 { -+ reg = <1>; -+ adsp_endpoint1: endpoint { -+ remote-endpoint = <&ak4613_endpoint1>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port2: port@2 { -+ reg = <2>; -+ adsp_endpoint2: endpoint { -+ remote-endpoint = <&ak4613_endpoint2>; -+ dai-format = "left_j"; -+ }; -+ }; -+ adsp_port3: port@3 { -+ reg = <3>; -+ adsp_endpoint3: endpoint { -+ remote-endpoint = <&ak4613_endpoint3>; -+ dai-format = "left_j"; -+ }; -+ }; -+ }; -+}; -+ - &rcar_sound { - pinctrl-0 = <&sound_pins &sound_clk_pins>; - pinctrl-names = "default"; -@@ -737,7 +811,7 @@ - ports { - rsnd_port0: port@0 { - rsnd_endpoint0: endpoint { -- remote-endpoint = <&ak4613_endpoint>; -+ remote-endpoint = <&ak4613_endpoint4>; - - dai-format = "left_j"; - bitclock-master = <&rsnd_endpoint0>; -diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi -index bd4d71e2b93e..845399adcbdb 100644 ---- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi -@@ -181,6 +181,11 @@ - method = "smc"; - }; - -+ rcar_adsp_sound: adsp_sound { -+ compatible = "renesas,rcar_adsp_sound_gen3"; -+ status = "disabled"; -+ }; -+ - /* External SCIF clock - to be overridden by boards that provide it */ - scif_clk: scif { - compatible = "fixed-clock"; --- -2.19.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch deleted file mode 100644 index 3f601b64..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch +++ /dev/null @@ -1,101 +0,0 @@ -From acd7751ebcce90a442588f37fc6731990b5e09ea Mon Sep 17 00:00:00 2001 -From: Nguyen Dang -Date: Tue, 6 Nov 2018 11:46:25 +0700 -Subject: [PATCH v2 6/6] ADSP: remove HDMI support from rcar-sound - -Signed-off-by: Nguyen Dang -[takeshi.kihara.df: support for dt file separation by M3v3.0 SoC] -Signed-off-by: Takeshi Kihara ---- - arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 6 ------ - arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 6 ------ - arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 5 ----- - arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts | 5 ----- - arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts | 5 ----- - 5 files changed, 27 deletions(-) - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -index 6928afbd8e06..b268afd7df85 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts -@@ -104,12 +104,6 @@ - status = "okay"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1 /* HDMI0 */ -- &rsnd_port2>; /* HDMI1 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -index 498f78875dbd..b6ec3036e9fd 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts -@@ -114,12 +114,6 @@ - status = "okay"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1 /* HDMI0 */ -- &rsnd_port2>; /* HDMI1 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -index cf92aa3939e3..4faf935c4a32 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts -@@ -88,11 +88,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -index 664dc9250bbb..13960f69b2f7 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts -@@ -96,11 +96,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -index 7d39dc96ac8a..1cd6f0463361 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts -@@ -88,11 +88,6 @@ - "dclkin.0", "dclkin.1", "dclkin.2"; - }; - --&sound_card { -- dais = <&rsnd_port0 /* ak4613 */ -- &rsnd_port1>; /* HDMI0 */ --}; -- - &hdmi0 { - status = "okay"; - --- -2.21.0 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg deleted file mode 100644 index f19e8d29..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_SND_SOC_ADSP=y -CONFIG_SND_SOC_I2C_AND_SPI=y - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg deleted file mode 100644 index e8b09aa7..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SCHED_DEBUG=y diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/defconfig b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/defconfig deleted file mode 100644 index dd59bb89..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/defconfig +++ /dev/null @@ -1,6423 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Linux/arm64 4.14.75 Kernel Configuration -# -CONFIG_ARM64=y -CONFIG_64BIT=y -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y -CONFIG_MMU=y -CONFIG_ARM64_PAGE_SHIFT=12 -CONFIG_ARM64_CONT_SHIFT=4 -CONFIG_ARCH_MMAP_RND_BITS_MIN=18 -CONFIG_ARCH_MMAP_RND_BITS_MAX=33 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y -CONFIG_HAVE_GENERIC_GUP=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_SG_DMA_LENGTH=y -CONFIG_SMP=y -CONFIG_SWIOTLB=y -CONFIG_IOMMU_HELPER=y -CONFIG_KERNEL_MODE_NEON=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_PGTABLE_LEVELS=4 -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y -CONFIG_THREAD_INFO_IN_TASK=y - -# -# General setup -# -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_CROSS_COMPILE="" -# CONFIG_COMPILE_TEST is not set -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_DEFAULT_HOSTNAME="(none)" -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y -CONFIG_CROSS_MEMORY_ATTACH=y -CONFIG_FHANDLE=y -# CONFIG_USELIB is not set -CONFIG_AUDIT=y -CONFIG_HAVE_ARCH_AUDITSYSCALL=y -CONFIG_AUDITSYSCALL=y -CONFIG_AUDIT_WATCH=y -CONFIG_AUDIT_TREE=y - -# -# IRQ subsystem -# -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_MIGRATION=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_MSI_IRQ_DOMAIN=y -CONFIG_HANDLE_DOMAIN_IRQ=y -# CONFIG_IRQ_DOMAIN_DEBUG is not set -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_SPARSE_IRQ=y -# CONFIG_GENERIC_IRQ_DEBUGFS is not set -CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_ARCH_HAS_TICK_BROADCAST=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y - -# -# Timers subsystem -# -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ_COMMON=y -# CONFIG_HZ_PERIODIC is not set -CONFIG_NO_HZ_IDLE=y -# CONFIG_NO_HZ_FULL is not set -# CONFIG_NO_HZ is not set -CONFIG_HIGH_RES_TIMERS=y - -# -# CPU/Task time and stats accounting -# -CONFIG_TICK_CPU_ACCOUNTING=y -# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set -CONFIG_IRQ_TIME_ACCOUNTING=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y - -# -# RCU Subsystem -# -CONFIG_PREEMPT_RCU=y -# CONFIG_RCU_EXPERT is not set -CONFIG_SRCU=y -CONFIG_TREE_SRCU=y -CONFIG_TASKS_RCU=y -CONFIG_RCU_STALL_COMMON=y -CONFIG_RCU_NEED_SEGCBLIST=y -CONFIG_BUILD_BIN2C=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 -CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13 -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y -CONFIG_NUMA_BALANCING=y -CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y -CONFIG_CGROUPS=y -CONFIG_PAGE_COUNTER=y -CONFIG_MEMCG=y -CONFIG_MEMCG_SWAP=y -CONFIG_MEMCG_SWAP_ENABLED=y -CONFIG_BLK_CGROUP=y -# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_CGROUP_WRITEBACK=y -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -# CONFIG_RT_GROUP_SCHED is not set -CONFIG_CGROUP_PIDS=y -# CONFIG_CGROUP_RDMA is not set -# CONFIG_CGROUP_FREEZER is not set -CONFIG_CGROUP_HUGETLB=y -CONFIG_CPUSETS=y -CONFIG_PROC_PID_CPUSET=y -CONFIG_CGROUP_DEVICE=y -CONFIG_CGROUP_CPUACCT=y -CONFIG_CGROUP_PERF=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_SOCK_CGROUP_DATA is not set -# CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_USER_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y -# CONFIG_SYSFS_DEPRECATED is not set -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_RD_GZIP=y -CONFIG_RD_BZIP2=y -CONFIG_RD_LZMA=y -CONFIG_RD_XZ=y -CONFIG_RD_LZO=y -CONFIG_RD_LZ4=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_HAVE_UID16=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -CONFIG_BPF=y -# CONFIG_EXPERT is not set -CONFIG_UID16=y -CONFIG_MULTIUSER=y -# CONFIG_SGETMASK_SYSCALL is not set -CONFIG_SYSFS_SYSCALL=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_POSIX_TIMERS=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set -CONFIG_KALLSYMS_BASE_RELATIVE=y -CONFIG_PRINTK=y -CONFIG_PRINTK_NMI=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_FUTEX_PI=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -# CONFIG_BPF_SYSCALL is not set -CONFIG_SHMEM=y -CONFIG_AIO=y -CONFIG_ADVISE_SYSCALLS=y -# CONFIG_USERFAULTFD is not set -CONFIG_PCI_QUIRKS=y -CONFIG_MEMBARRIER=y -# CONFIG_EMBEDDED is not set -CONFIG_HAVE_PERF_EVENTS=y -# CONFIG_PC104 is not set - -# -# Kernel Performance Events And Counters -# -CONFIG_PERF_EVENTS=y -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_SLUB_MEMCG_SYSFS_ON is not set -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLAB is not set -CONFIG_SLUB=y -CONFIG_SLAB_MERGE_DEFAULT=y -# CONFIG_SLAB_FREELIST_RANDOM is not set -# CONFIG_SLAB_FREELIST_HARDENED is not set -CONFIG_SLUB_CPU_PARTIAL=y -# CONFIG_SYSTEM_DATA_VERIFICATION is not set -CONFIG_PROFILING=y -CONFIG_CRASH_CORE=y -CONFIG_KEXEC_CORE=y -# CONFIG_KPROBES is not set -CONFIG_JUMP_LABEL=y -# CONFIG_STATIC_KEYS_SELFTEST is not set -# CONFIG_UPROBES is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_NMI=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -CONFIG_ARCH_HAS_SET_MEMORY=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_DMA_API_DEBUG=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_RCU_TABLE_FREE=y -CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y -CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y -CONFIG_HAVE_CMPXCHG_LOCAL=y -CONFIG_HAVE_CMPXCHG_DOUBLE=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_HAVE_GCC_PLUGINS=y -# CONFIG_GCC_PLUGINS is not set -CONFIG_HAVE_CC_STACKPROTECTOR=y -# CONFIG_CC_STACKPROTECTOR is not set -CONFIG_CC_STACKPROTECTOR_NONE=y -# CONFIG_CC_STACKPROTECTOR_REGULAR is not set -# CONFIG_CC_STACKPROTECTOR_STRONG is not set -CONFIG_THIN_ARCHIVES=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y -CONFIG_HAVE_ARCH_HUGE_VMAP=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_ARCH_MMAP_RND_BITS=18 -CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y -CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 -# CONFIG_HAVE_ARCH_HASH is not set -# CONFIG_ISA_BUS_API is not set -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y -# CONFIG_CPU_NO_EFFICIENT_FFS is not set -CONFIG_HAVE_ARCH_VMAP_STACK=y -CONFIG_VMAP_STACK=y -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set -CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -CONFIG_STRICT_KERNEL_RWX=y -CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -CONFIG_STRICT_MODULE_RWX=y -# CONFIG_REFCOUNT_FULL is not set - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -# CONFIG_TRIM_UNUSED_KSYMS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_BLK_DEV_BSG=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_BLK_DEV_INTEGRITY=y -# CONFIG_BLK_DEV_ZONED is not set -# CONFIG_BLK_DEV_THROTTLING is not set -# CONFIG_BLK_CMDLINE_PARSER is not set -# CONFIG_BLK_WBT is not set -CONFIG_BLK_DEBUG_FS=y -# CONFIG_BLK_SED_OPAL is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y -CONFIG_BLK_MQ_PCI=y -CONFIG_BLK_MQ_VIRTIO=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CFQ_GROUP_IOSCHED is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_MQ_IOSCHED_DEADLINE=y -CONFIG_MQ_IOSCHED_KYBER=y -# CONFIG_IOSCHED_BFQ is not set -CONFIG_PREEMPT_NOTIFIERS=y -CONFIG_UNINLINE_SPIN_UNLOCK=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_FREEZER=y - -# -# Platform selection -# -# CONFIG_ARCH_ACTIONS is not set -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_LAYERSCAPE=y -CONFIG_ARCH_LG1K=y -CONFIG_ARCH_HISI=y -CONFIG_ARCH_MEDIATEK=y -CONFIG_ARCH_MESON=y -CONFIG_ARCH_MVEBU=y -CONFIG_ARCH_QCOM=y -# CONFIG_ARCH_REALTEK is not set -CONFIG_ARCH_ROCKCHIP=y -CONFIG_ARCH_SEATTLE=y -CONFIG_ARCH_SHMOBILE=y -CONFIG_ARCH_RENESAS=y -CONFIG_ARCH_R8A7795=y -CONFIG_ARCH_R8A7796=y -CONFIG_ARCH_R8A77965=y -CONFIG_ARCH_R8A77970=y -CONFIG_ARCH_R8A77980=y -CONFIG_ARCH_R8A77990=y -CONFIG_ARCH_R8A77995=y -CONFIG_ARCH_STRATIX10=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_VULCAN is not set -CONFIG_ARCH_XGENE=y -CONFIG_ARCH_ZX=y -CONFIG_ARCH_ZYNQMP=y - -# -# Bus support -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DOMAINS_GENERIC=y -CONFIG_PCI_SYSCALL=y -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=y -CONFIG_PCIEAER=y -# CONFIG_PCIE_ECRC is not set -# CONFIG_PCIEAER_INJECT is not set -CONFIG_PCIEASPM=y -# CONFIG_PCIEASPM_DEBUG is not set -CONFIG_PCIEASPM_DEFAULT=y -# CONFIG_PCIEASPM_POWERSAVE is not set -# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set -# CONFIG_PCIEASPM_PERFORMANCE is not set -CONFIG_PCIE_PME=y -# CONFIG_PCIE_DPC is not set -# CONFIG_PCIE_PTM is not set -CONFIG_PCI_BUS_ADDR_T_64BIT=y -CONFIG_PCI_MSI=y -CONFIG_PCI_MSI_IRQ_DOMAIN=y -# CONFIG_PCI_DEBUG is not set -# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set -# CONFIG_PCI_STUB is not set -CONFIG_PCI_ATS=y -CONFIG_PCI_ECAM=y -CONFIG_PCI_IOV=y -# CONFIG_PCI_PRI is not set -# CONFIG_PCI_PASID is not set -CONFIG_PCI_LABEL=y -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_ACPI=y -# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set - -# -# DesignWare PCI Core Support -# -CONFIG_PCIE_DW=y -CONFIG_PCIE_DW_HOST=y -# CONFIG_PCIE_DW_PLAT is not set -CONFIG_PCI_LAYERSCAPE=y -CONFIG_PCI_HISI=y -CONFIG_PCIE_QCOM=y -CONFIG_PCIE_ARMADA_8K=y -CONFIG_PCIE_KIRIN=y - -# -# PCI host controller drivers -# -CONFIG_PCI_AARDVARK=y -# CONFIG_PCIE_XILINX_NWL is not set -CONFIG_PCI_TEGRA=y -CONFIG_PCIE_RCAR=y -CONFIG_PCI_HOST_COMMON=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_PCI_XGENE=y -CONFIG_PCI_XGENE_MSI=y -CONFIG_PCIE_IPROC=y -CONFIG_PCIE_IPROC_PLATFORM=y -CONFIG_PCIE_IPROC_MSI=y -CONFIG_PCI_HOST_THUNDER_PEM=y -CONFIG_PCI_HOST_THUNDER_ECAM=y -CONFIG_PCIE_ROCKCHIP=m -# CONFIG_PCIE_MEDIATEK is not set - -# -# PCI Endpoint -# -# CONFIG_PCI_ENDPOINT is not set - -# -# PCI switch controller drivers -# -# CONFIG_PCI_SW_SWITCHTEC is not set - -# -# Kernel Features -# - -# -# ARM errata workarounds via the alternatives framework -# -CONFIG_ARM64_ERRATUM_826319=y -CONFIG_ARM64_ERRATUM_827319=y -CONFIG_ARM64_ERRATUM_824069=y -CONFIG_ARM64_ERRATUM_819472=y -CONFIG_ARM64_ERRATUM_832075=y -CONFIG_ARM64_ERRATUM_834220=y -CONFIG_ARM64_ERRATUM_845719=y -CONFIG_ARM64_ERRATUM_843419=y -CONFIG_ARM64_ERRATUM_1024718=y -CONFIG_CAVIUM_ERRATUM_22375=y -CONFIG_CAVIUM_ERRATUM_23144=y -CONFIG_CAVIUM_ERRATUM_23154=y -CONFIG_CAVIUM_ERRATUM_27456=y -CONFIG_CAVIUM_ERRATUM_30115=y -CONFIG_QCOM_FALKOR_ERRATUM_1003=y -CONFIG_QCOM_FALKOR_ERRATUM_1009=y -CONFIG_QCOM_QDF2400_ERRATUM_0065=y -CONFIG_QCOM_FALKOR_ERRATUM_E1041=y -CONFIG_ARM64_4K_PAGES=y -# CONFIG_ARM64_16K_PAGES is not set -# CONFIG_ARM64_64K_PAGES is not set -# CONFIG_ARM64_VA_BITS_39 is not set -CONFIG_ARM64_VA_BITS_48=y -CONFIG_ARM64_VA_BITS=48 -# CONFIG_CPU_BIG_ENDIAN is not set -CONFIG_SCHED_MC=y -# CONFIG_SCHED_SMT is not set -CONFIG_NR_CPUS=64 -CONFIG_HOTPLUG_CPU=y -CONFIG_NUMA=y -CONFIG_NODES_SHIFT=2 -CONFIG_USE_PERCPU_NUMA_NODE_ID=y -CONFIG_HAVE_SETUP_PER_CPU_AREA=y -CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y -CONFIG_HOLES_IN_ZONE=y -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_COUNT=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_SCHED_HRTICK=y -CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y -CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_HAVE_ARCH_PFN_VALID=y -CONFIG_HW_PERF_EVENTS=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y -CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y -CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MEMBLOCK_NODE_MAP=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MEMORY_BALLOON=y -CONFIG_BALLOON_COMPACTION=y -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_BOUNCE=y -CONFIG_MMU_NOTIFIER=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y -CONFIG_MEMORY_FAILURE=y -# CONFIG_HWPOISON_INJECT is not set -CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y -# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set -# CONFIG_ARCH_WANTS_THP_SWAP is not set -CONFIG_TRANSPARENT_HUGE_PAGECACHE=y -# CONFIG_CLEANCACHE is not set -# CONFIG_FRONTSWAP is not set -CONFIG_CMA=y -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=7 -# CONFIG_ZPOOL is not set -# CONFIG_ZBUD is not set -# CONFIG_ZSMALLOC is not set -CONFIG_GENERIC_EARLY_IOREMAP=y -# CONFIG_IDLE_PAGE_TRACKING is not set -CONFIG_FRAME_VECTOR=y -# CONFIG_PERCPU_STATS is not set -CONFIG_SECCOMP=y -CONFIG_PARAVIRT=y -# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_XEN_DOM0=y -CONFIG_XEN=y -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_UNMAP_KERNEL_AT_EL0=y -CONFIG_HARDEN_BRANCH_PREDICTOR=y -CONFIG_ARM64_SSBD=y -# CONFIG_ARMV8_DEPRECATED is not set -# CONFIG_ARM64_SW_TTBR0_PAN is not set - -# -# ARMv8.1 architectural features -# -CONFIG_ARM64_HW_AFDBM=y -CONFIG_ARM64_PAN=y -# CONFIG_ARM64_LSE_ATOMICS is not set -CONFIG_ARM64_VHE=y - -# -# ARMv8.2 architectural features -# -CONFIG_ARM64_UAO=y -# CONFIG_ARM64_PMEM is not set -CONFIG_ARM64_MODULE_CMODEL_LARGE=y -# CONFIG_RANDOMIZE_BASE is not set - -# -# Boot options -# -# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set -CONFIG_CMDLINE="" -# CONFIG_CMDLINE_FORCE is not set -CONFIG_EFI_STUB=y -CONFIG_EFI=y -CONFIG_DMI=y - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -CONFIG_ELFCORE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set -# CONFIG_BINFMT_MISC is not set -CONFIG_COREDUMP=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Power management options -# -CONFIG_SUSPEND=y -CONFIG_SUSPEND_FREEZER=y -CONFIG_HIBERNATE_CALLBACKS=y -CONFIG_HIBERNATION=y -CONFIG_PM_STD_PARTITION="" -CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_SMP=y -# CONFIG_PM_AUTOSLEEP is not set -# CONFIG_PM_WAKELOCKS is not set -CONFIG_PM=y -# CONFIG_PM_DEBUG is not set -CONFIG_PM_OPP=y -CONFIG_PM_CLK=y -CONFIG_PM_GENERIC_DOMAINS=y -CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y -CONFIG_PM_GENERIC_DOMAINS_SLEEP=y -CONFIG_PM_GENERIC_DOMAINS_OF=y -CONFIG_CPU_PM=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_HIBERNATION_HEADER=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y - -# -# CPU Power Management -# - -# -# CPU Idle -# -CONFIG_CPU_IDLE=y -CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y -# CONFIG_CPU_IDLE_GOV_LADDER is not set -CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_DT_IDLE_STATES=y - -# -# ARM CPU Idle Drivers -# -CONFIG_ARM_CPUIDLE=y -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_GOV_ATTR_SET=y -CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y - -# -# CPU frequency scaling drivers -# -CONFIG_CPUFREQ_DT=y -CONFIG_CPUFREQ_DT_PLATDEV=y -CONFIG_ARM_BIG_LITTLE_CPUFREQ=y -CONFIG_ARM_BRCMSTB_AVS_CPUFREQ=y -# CONFIG_ARM_BRCMSTB_AVS_CPUFREQ_DEBUG is not set -# CONFIG_ARM_DT_BL_CPUFREQ is not set -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set -# CONFIG_ARM_MEDIATEK_CPUFREQ is not set -CONFIG_ARM_SCPI_CPUFREQ=y -CONFIG_ARM_TEGRA20_CPUFREQ=y -CONFIG_ARM_TEGRA124_CPUFREQ=y -CONFIG_ARM_TEGRA186_CPUFREQ=y -CONFIG_ACPI_CPPC_CPUFREQ=m -# CONFIG_QORIQ_CPUFREQ is not set -CONFIG_NET=y -CONFIG_NET_INGRESS=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_DIAG is not set -CONFIG_UNIX=y -# CONFIG_UNIX_DIAG is not set -# CONFIG_TLS is not set -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE_DEMUX is not set -CONFIG_NET_IP_TUNNEL=m -# CONFIG_IP_MROUTE is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_NET_IPVTI is not set -# CONFIG_NET_UDP_TUNNEL is not set -# CONFIG_NET_FOU is not set -# CONFIG_NET_FOU_IP_TUNNELS is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_INET_UDP_DIAG is not set -# CONFIG_INET_RAW_DIAG is not set -# CONFIG_INET_DIAG_DESTROY is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m -# CONFIG_IPV6_ROUTER_PREF is not set -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_IPV6_MIP6 is not set -# CONFIG_IPV6_ILA is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -# CONFIG_IPV6_VTI is not set -CONFIG_IPV6_SIT=m -# CONFIG_IPV6_SIT_6RD is not set -CONFIG_IPV6_NDISC_NODETYPE=y -# CONFIG_IPV6_TUNNEL is not set -# CONFIG_IPV6_FOU is not set -# CONFIG_IPV6_FOU_TUNNEL is not set -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_IPV6_MROUTE is not set -# CONFIG_IPV6_SEG6_LWTUNNEL is not set -# CONFIG_IPV6_SEG6_HMAC is not set -# CONFIG_NETLABEL is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NET_PTP_CLASSIFY=y -# CONFIG_NETWORK_PHY_TIMESTAMPING is not set -CONFIG_NETFILTER=y -CONFIG_NETFILTER_ADVANCED=y -CONFIG_BRIDGE_NETFILTER=m - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_INGRESS=y -# CONFIG_NETFILTER_NETLINK_ACCT is not set -# CONFIG_NETFILTER_NETLINK_QUEUE is not set -# CONFIG_NETFILTER_NETLINK_LOG is not set -CONFIG_NF_CONNTRACK=m -CONFIG_NF_LOG_COMMON=m -# CONFIG_NF_LOG_NETDEV is not set -# CONFIG_NF_CONNTRACK_MARK is not set -CONFIG_NF_CONNTRACK_PROCFS=y -CONFIG_NF_CONNTRACK_EVENTS=y -# CONFIG_NF_CONNTRACK_TIMEOUT is not set -# CONFIG_NF_CONNTRACK_TIMESTAMP is not set -CONFIG_NF_CT_PROTO_DCCP=y -CONFIG_NF_CT_PROTO_SCTP=y -CONFIG_NF_CT_PROTO_UDPLITE=y -# CONFIG_NF_CONNTRACK_AMANDA is not set -# CONFIG_NF_CONNTRACK_FTP is not set -# CONFIG_NF_CONNTRACK_H323 is not set -# CONFIG_NF_CONNTRACK_IRC is not set -# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set -# CONFIG_NF_CONNTRACK_SNMP is not set -# CONFIG_NF_CONNTRACK_PPTP is not set -# CONFIG_NF_CONNTRACK_SANE is not set -# CONFIG_NF_CONNTRACK_SIP is not set -# CONFIG_NF_CONNTRACK_TFTP is not set -# CONFIG_NF_CT_NETLINK is not set -# CONFIG_NF_CT_NETLINK_TIMEOUT is not set -CONFIG_NF_NAT=m -CONFIG_NF_NAT_NEEDED=y -CONFIG_NF_NAT_PROTO_DCCP=y -CONFIG_NF_NAT_PROTO_UDPLITE=y -CONFIG_NF_NAT_PROTO_SCTP=y -# CONFIG_NF_NAT_AMANDA is not set -# CONFIG_NF_NAT_FTP is not set -# CONFIG_NF_NAT_IRC is not set -# CONFIG_NF_NAT_SIP is not set -# CONFIG_NF_NAT_TFTP is not set -# CONFIG_NF_NAT_REDIRECT is not set -# CONFIG_NF_TABLES is not set -CONFIG_NETFILTER_XTABLES=m - -# -# Xtables combined modules -# -# CONFIG_NETFILTER_XT_MARK is not set -# CONFIG_NETFILTER_XT_CONNMARK is not set - -# -# Xtables targets -# -# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set -CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -# CONFIG_NETFILTER_XT_TARGET_HL is not set -# CONFIG_NETFILTER_XT_TARGET_HMARK is not set -# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set -# CONFIG_NETFILTER_XT_TARGET_LED is not set -CONFIG_NETFILTER_XT_TARGET_LOG=m -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -CONFIG_NETFILTER_XT_NAT=m -# CONFIG_NETFILTER_XT_TARGET_NETMAP is not set -# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set -# CONFIG_NETFILTER_XT_TARGET_REDIRECT is not set -# CONFIG_NETFILTER_XT_TARGET_TEE is not set -# CONFIG_NETFILTER_XT_TARGET_TPROXY is not set -# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set -# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set - -# -# Xtables matches -# -CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m -# CONFIG_NETFILTER_XT_MATCH_BPF is not set -# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set -# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -# CONFIG_NETFILTER_XT_MATCH_CPU is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ECN is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_HELPER is not set -# CONFIG_NETFILTER_XT_MATCH_HL is not set -# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set -# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set -# CONFIG_NETFILTER_XT_MATCH_L2TP is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_MAC is not set -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set -# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set -# CONFIG_NETFILTER_XT_MATCH_OWNER is not set -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set -# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set -# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_RECENT is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_STATE is not set -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_TIME is not set -# CONFIG_NETFILTER_XT_MATCH_U32 is not set -# CONFIG_IP_SET is not set -# CONFIG_IP_VS is not set - -# -# IP: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV4=m -CONFIG_NF_CONNTRACK_IPV4=m -# CONFIG_NF_SOCKET_IPV4 is not set -# CONFIG_NF_DUP_IPV4 is not set -# CONFIG_NF_LOG_ARP is not set -CONFIG_NF_LOG_IPV4=m -CONFIG_NF_REJECT_IPV4=m -CONFIG_NF_NAT_IPV4=m -CONFIG_NF_NAT_MASQUERADE_IPV4=m -# CONFIG_NF_NAT_PPTP is not set -# CONFIG_NF_NAT_H323 is not set -CONFIG_IP_NF_IPTABLES=m -# CONFIG_IP_NF_MATCH_AH is not set -# CONFIG_IP_NF_MATCH_ECN is not set -# CONFIG_IP_NF_MATCH_RPFILTER is not set -# CONFIG_IP_NF_MATCH_TTL is not set -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -# CONFIG_IP_NF_TARGET_SYNPROXY is not set -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_TARGET_MASQUERADE=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_REDIRECT is not set -CONFIG_IP_NF_MANGLE=m -# CONFIG_IP_NF_TARGET_CLUSTERIP is not set -# CONFIG_IP_NF_TARGET_ECN is not set -# CONFIG_IP_NF_TARGET_TTL is not set -# CONFIG_IP_NF_RAW is not set -# CONFIG_IP_NF_SECURITY is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# IPv6: Netfilter Configuration -# -CONFIG_NF_DEFRAG_IPV6=m -CONFIG_NF_CONNTRACK_IPV6=m -# CONFIG_NF_SOCKET_IPV6 is not set -# CONFIG_NF_DUP_IPV6 is not set -CONFIG_NF_REJECT_IPV6=m -CONFIG_NF_LOG_IPV6=m -CONFIG_NF_NAT_IPV6=m -CONFIG_NF_NAT_MASQUERADE_IPV6=m -CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_AH is not set -# CONFIG_IP6_NF_MATCH_EUI64 is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_HL is not set -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -# CONFIG_IP6_NF_MATCH_MH is not set -# CONFIG_IP6_NF_MATCH_RPFILTER is not set -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_TARGET_HL is not set -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_REJECT=m -# CONFIG_IP6_NF_TARGET_SYNPROXY is not set -CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_RAW is not set -# CONFIG_IP6_NF_SECURITY is not set -CONFIG_IP6_NF_NAT=m -CONFIG_IP6_NF_TARGET_MASQUERADE=m -# CONFIG_IP6_NF_TARGET_NPT is not set -# CONFIG_BRIDGE_NF_EBTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_L2TP is not set -CONFIG_STP=m -CONFIG_GARP=m -CONFIG_MRP=m -CONFIG_BRIDGE=m -CONFIG_BRIDGE_IGMP_SNOOPING=y -CONFIG_BRIDGE_VLAN_FILTERING=y -CONFIG_HAVE_NET_DSA=y -# CONFIG_NET_DSA is not set -CONFIG_VLAN_8021Q=m -CONFIG_VLAN_8021Q_GVRP=y -CONFIG_VLAN_8021Q_MVRP=y -# CONFIG_DECNET is not set -CONFIG_LLC=m -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_PHONET is not set -# CONFIG_6LOWPAN is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set -CONFIG_DNS_RESOLVER=y -# CONFIG_BATMAN_ADV is not set -# CONFIG_OPENVSWITCH is not set -# CONFIG_VSOCKETS is not set -# CONFIG_NETLINK_DIAG is not set -# CONFIG_MPLS is not set -# CONFIG_NET_NSH is not set -# CONFIG_HSR is not set -# CONFIG_NET_SWITCHDEV is not set -# CONFIG_NET_L3_MASTER_DEV is not set -# CONFIG_QRTR is not set -# CONFIG_NET_NCSI is not set -CONFIG_RPS=y -CONFIG_RFS_ACCEL=y -CONFIG_XPS=y -# CONFIG_CGROUP_NET_PRIO is not set -# CONFIG_CGROUP_NET_CLASSID is not set -CONFIG_NET_RX_BUSY_POLL=y -CONFIG_BQL=y -CONFIG_BPF_JIT=y -CONFIG_NET_FLOW_LIMIT=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -CONFIG_BT=m -CONFIG_BT_BREDR=y -# CONFIG_BT_RFCOMM is not set -# CONFIG_BT_BNEP is not set -CONFIG_BT_HIDP=m -# CONFIG_BT_HS is not set -# CONFIG_BT_LE is not set -CONFIG_BT_LEDS=y -# CONFIG_BT_SELFTEST is not set -# CONFIG_BT_DEBUGFS is not set - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIBTUSB is not set -# CONFIG_BT_HCIBTSDIO is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_SERDEV=y -# CONFIG_BT_HCIUART_H4 is not set -# CONFIG_BT_HCIUART_NOKIA is not set -# CONFIG_BT_HCIUART_BCSP is not set -# CONFIG_BT_HCIUART_ATH3K is not set -CONFIG_BT_HCIUART_LL=y -# CONFIG_BT_HCIUART_3WIRE is not set -# CONFIG_BT_HCIUART_INTEL is not set -# CONFIG_BT_HCIUART_BCM is not set -# CONFIG_BT_HCIUART_QCA is not set -# CONFIG_BT_HCIUART_AG6XX is not set -# CONFIG_BT_HCIUART_MRVL is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -# CONFIG_BT_MRVL is not set -# CONFIG_AF_RXRPC is not set -# CONFIG_AF_KCM is not set -# CONFIG_STREAM_PARSER is not set -CONFIG_WIRELESS=y -CONFIG_CFG80211=m -# CONFIG_NL80211_TESTMODE is not set -# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set -CONFIG_CFG80211_DEFAULT_PS=y -# CONFIG_CFG80211_DEBUGFS is not set -# CONFIG_CFG80211_INTERNAL_REGDB is not set -CONFIG_CFG80211_CRDA_SUPPORT=y -# CONFIG_CFG80211_WEXT is not set -# CONFIG_LIB80211 is not set -CONFIG_MAC80211=m -CONFIG_MAC80211_HAS_RC=y -CONFIG_MAC80211_RC_MINSTREL=y -CONFIG_MAC80211_RC_MINSTREL_HT=y -# CONFIG_MAC80211_RC_MINSTREL_VHT is not set -CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y -CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" -# CONFIG_MAC80211_MESH is not set -CONFIG_MAC80211_LEDS=y -# CONFIG_MAC80211_DEBUGFS is not set -# CONFIG_MAC80211_MESSAGE_TRACING is not set -# CONFIG_MAC80211_DEBUG_MENU is not set -CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 -# CONFIG_WIMAX is not set -CONFIG_RFKILL=m -CONFIG_RFKILL_LEDS=y -CONFIG_RFKILL_INPUT=y -# CONFIG_RFKILL_GPIO is not set -CONFIG_NET_9P=y -CONFIG_NET_9P_VIRTIO=y -# CONFIG_NET_9P_XEN is not set -# CONFIG_NET_9P_DEBUG is not set -# CONFIG_CAIF is not set -# CONFIG_CEPH_LIB is not set -# CONFIG_NFC is not set -# CONFIG_PSAMPLE is not set -# CONFIG_NET_IFE is not set -# CONFIG_LWTUNNEL is not set -CONFIG_DST_CACHE=y -CONFIG_GRO_CELLS=y -# CONFIG_NET_DEVLINK is not set -CONFIG_MAY_USE_DEVLINK=y -CONFIG_HAVE_EBPF_JIT=y - -# -# Device Drivers -# -CONFIG_ARM_AMBA=y -CONFIG_TEGRA_AHB=y - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set -CONFIG_ALLOW_DEV_COREDUMP=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set -# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set -CONFIG_SYS_HYPERVISOR=y -# CONFIG_GENERIC_CPU_DEVICES is not set -CONFIG_GENERIC_CPU_AUTOPROBE=y -CONFIG_SOC_BUS=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_SPI=y -CONFIG_REGMAP_SPMI=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_IRQ=y -CONFIG_DMA_SHARED_BUFFER=y -# CONFIG_DMA_FENCE_TRACE is not set -CONFIG_DMA_CMA=y - -# -# Default contiguous memory area size: -# -CONFIG_CMA_SIZE_MBYTES=16 -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_ALIGNMENT=8 -CONFIG_GENERIC_ARCH_TOPOLOGY=y - -# -# Bus devices -# -# CONFIG_ARM_CCI400_PMU is not set -# CONFIG_ARM_CCI5xx_PMU is not set -# CONFIG_ARM_CCN is not set -CONFIG_BRCMSTB_GISB_ARB=y -CONFIG_QCOM_EBI2=y -# CONFIG_SIMPLE_PM_BUS is not set -CONFIG_SUNXI_RSB=y -# CONFIG_TEGRA_ACONNECT is not set -# CONFIG_TEGRA_GMI is not set -CONFIG_UNIPHIER_SYSTEM_BUS=y -CONFIG_VEXPRESS_CONFIG=y -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_TESTS is not set -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set -CONFIG_MTD_OF_PARTS=y -# CONFIG_MTD_AR7_PARTS is not set - -# -# Partition parsers -# - -# -# User Modules And Translation Layers -# -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set -# CONFIG_SM_FTL is not set -# CONFIG_MTD_OOPS is not set -# CONFIG_MTD_SWAP is not set -# CONFIG_MTD_PARTITIONED_MASTER is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_INTEL_VR_NOR is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_DATAFLASH is not set -CONFIG_MTD_M25P80=y -# CONFIG_MTD_MCHP23K256 is not set -# CONFIG_MTD_SST25L is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOCG3 is not set -CONFIG_MTD_NAND_ECC=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_ECC_BCH is not set -# CONFIG_MTD_SM_COMMON is not set -CONFIG_MTD_NAND_DENALI=y -# CONFIG_MTD_NAND_DENALI_PCI is not set -CONFIG_MTD_NAND_DENALI_DT=y -# CONFIG_MTD_NAND_GPIO is not set -# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set -# CONFIG_MTD_NAND_RICOH is not set -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_DOCG4 is not set -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_PXA3xx is not set -# CONFIG_MTD_NAND_NANDSIM is not set -# CONFIG_MTD_NAND_BRCMNAND is not set -# CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_NAND_FSL_IFC is not set -# CONFIG_MTD_NAND_SUNXI is not set -# CONFIG_MTD_NAND_HISI504 is not set -# CONFIG_MTD_NAND_QCOM is not set -# CONFIG_MTD_NAND_MTK is not set -# CONFIG_MTD_ONENAND is not set - -# -# LPDDR & LPDDR2 PCM memory drivers -# -# CONFIG_MTD_LPDDR is not set -CONFIG_MTD_SPI_NOR=y -# CONFIG_MTD_MT81xx_NOR is not set -CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y -# CONFIG_SPI_FSL_QUADSPI is not set -# CONFIG_SPI_HISI_SFC is not set -# CONFIG_MTD_UBI is not set -CONFIG_DTC=y -CONFIG_OF=y -# CONFIG_OF_UNITTEST is not set -CONFIG_OF_FLATTREE=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_ADDRESS_PCI=y -CONFIG_OF_IRQ=y -CONFIG_OF_NET=y -CONFIG_OF_MDIO=y -CONFIG_OF_PCI=y -CONFIG_OF_PCI_IRQ=y -CONFIG_OF_RESERVED_MEM=y -# CONFIG_OF_OVERLAY is not set -CONFIG_OF_NUMA=y -# CONFIG_PARPORT is not set -CONFIG_PNP=y -CONFIG_PNP_DEBUG_MESSAGES=y - -# -# Protocols -# -CONFIG_PNPACPI=y -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_NULL_BLK is not set -# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_DRBD is not set -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SKD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -CONFIG_XEN_BLKDEV_FRONTEND=y -# CONFIG_XEN_BLKDEV_BACKEND is not set -CONFIG_VIRTIO_BLK=y -# CONFIG_VIRTIO_BLK_SCSI is not set -# CONFIG_BLK_DEV_RBD is not set -# CONFIG_BLK_DEV_RSXX is not set -CONFIG_NVME_CORE=m -CONFIG_BLK_DEV_NVME=m -# CONFIG_NVME_FC is not set -# CONFIG_NVME_TARGET is not set - -# -# Misc devices -# -# CONFIG_SENSORS_LIS3LV02D is not set -# CONFIG_AD525X_DPOT is not set -# CONFIG_DUMMY_IRQ is not set -# CONFIG_PHANTOM is not set -# CONFIG_SGI_IOC4 is not set -# CONFIG_TIFM_CORE is not set -# CONFIG_ICS932S401 is not set -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_HP_ILO is not set -# CONFIG_QCOM_COINCELL is not set -# CONFIG_APDS9802ALS is not set -# CONFIG_ISL29003 is not set -# CONFIG_ISL29020 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_SENSORS_BH1770 is not set -# CONFIG_SENSORS_APDS990X is not set -# CONFIG_HMC6352 is not set -# CONFIG_DS1682 is not set -# CONFIG_TI_DAC7512 is not set -# CONFIG_USB_SWITCH_FSA9480 is not set -# CONFIG_LATTICE_ECP3_CONFIG is not set -CONFIG_SRAM=y -CONFIG_VEXPRESS_SYSCFG=y -# CONFIG_PCI_ENDPOINT_TEST is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# -# CONFIG_EEPROM_AT24 is not set -CONFIG_EEPROM_AT25=m -# CONFIG_EEPROM_LEGACY is not set -# CONFIG_EEPROM_MAX6875 is not set -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_EEPROM_93XX46 is not set -# CONFIG_EEPROM_IDT_89HPESX is not set -# CONFIG_CB710_CORE is not set - -# -# Texas Instruments shared transport line discipline -# -# CONFIG_TI_ST is not set -# CONFIG_SENSORS_LIS3_I2C is not set - -# -# Altera FPGA firmware download module -# -# CONFIG_ALTERA_STAPL is not set - -# -# Intel MIC Bus Driver -# - -# -# SCIF Bus Driver -# - -# -# VOP Bus Driver -# - -# -# Intel MIC Host Driver -# - -# -# Intel MIC Card Driver -# - -# -# SCIF Driver -# - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# - -# -# VOP Driver -# -# CONFIG_GENWQE is not set -# CONFIG_ECHO is not set -# CONFIG_CXL_BASE is not set -# CONFIG_CXL_AFU_DRIVER_OPS is not set -# CONFIG_CXL_LIB is not set - -# -# SCSI device support -# -CONFIG_SCSI_MOD=y -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_MQ_DEFAULT is not set -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=y -CONFIG_SCSI_SAS_LIBSAS=y -CONFIG_SCSI_SAS_ATA=y -CONFIG_SCSI_SAS_HOST_SMP=y -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_ISCSI_BOOT_SYSFS is not set -# CONFIG_SCSI_CXGB3_ISCSI is not set -# CONFIG_SCSI_CXGB4_ISCSI is not set -# CONFIG_SCSI_BNX2_ISCSI is not set -# CONFIG_BE2ISCSI is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_HPSA is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_3W_SAS is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_AIC94XX is not set -CONFIG_SCSI_HISI_SAS=y -CONFIG_SCSI_HISI_SAS_PCI=y -# CONFIG_SCSI_MVSAS is not set -# CONFIG_SCSI_MVUMI is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_ARCMSR is not set -# CONFIG_SCSI_ESAS2R is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_MPT3SAS is not set -# CONFIG_SCSI_MPT2SAS is not set -# CONFIG_SCSI_SMARTPQI is not set -# CONFIG_SCSI_UFSHCD is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_XEN_SCSI_FRONTEND is not set -# CONFIG_SCSI_SNIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_STEX is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_ISCSI is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_WD719X is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_PMCRAID is not set -# CONFIG_SCSI_PM8001 is not set -# CONFIG_SCSI_VIRTIO is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -CONFIG_HAVE_PATA_PLATFORM=y -CONFIG_ATA=y -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_ATA_VERBOSE_ERROR=y -CONFIG_ATA_ACPI=y -# CONFIG_SATA_ZPODD is not set -CONFIG_SATA_PMP=y - -# -# Controllers with non-SFF native interface -# -CONFIG_SATA_AHCI=y -CONFIG_SATA_AHCI_PLATFORM=y -# CONFIG_AHCI_BRCM is not set -CONFIG_AHCI_CEVA=y -# CONFIG_AHCI_MTK is not set -CONFIG_AHCI_MVEBU=y -# CONFIG_AHCI_SUNXI is not set -# CONFIG_AHCI_TEGRA is not set -CONFIG_AHCI_XGENE=y -CONFIG_AHCI_QORIQ=y -# CONFIG_SATA_AHCI_SEATTLE is not set -# CONFIG_SATA_INIC162X is not set -# CONFIG_SATA_ACARD_AHCI is not set -CONFIG_SATA_SIL24=y -CONFIG_ATA_SFF=y - -# -# SFF controllers with custom DMA interface -# -# CONFIG_PDC_ADMA is not set -# CONFIG_SATA_QSTOR is not set -# CONFIG_SATA_SX4 is not set -CONFIG_ATA_BMDMA=y - -# -# SATA SFF controllers with BMDMA -# -# CONFIG_ATA_PIIX is not set -# CONFIG_SATA_DWC is not set -# CONFIG_SATA_MV is not set -# CONFIG_SATA_NV is not set -# CONFIG_SATA_PROMISE is not set -CONFIG_SATA_RCAR=y -# CONFIG_SATA_SIL is not set -# CONFIG_SATA_SIS is not set -# CONFIG_SATA_SVW is not set -# CONFIG_SATA_ULI is not set -# CONFIG_SATA_VIA is not set -# CONFIG_SATA_VITESSE is not set - -# -# PATA SFF controllers with BMDMA -# -# CONFIG_PATA_ALI is not set -# CONFIG_PATA_AMD is not set -# CONFIG_PATA_ARTOP is not set -# CONFIG_PATA_ATIIXP is not set -# CONFIG_PATA_ATP867X is not set -# CONFIG_PATA_CMD64X is not set -# CONFIG_PATA_CYPRESS is not set -# CONFIG_PATA_EFAR is not set -# CONFIG_PATA_HPT366 is not set -# CONFIG_PATA_HPT37X is not set -# CONFIG_PATA_HPT3X2N is not set -# CONFIG_PATA_HPT3X3 is not set -# CONFIG_PATA_IT8213 is not set -# CONFIG_PATA_IT821X is not set -# CONFIG_PATA_JMICRON is not set -# CONFIG_PATA_MARVELL is not set -# CONFIG_PATA_NETCELL is not set -# CONFIG_PATA_NINJA32 is not set -# CONFIG_PATA_NS87415 is not set -# CONFIG_PATA_OLDPIIX is not set -# CONFIG_PATA_OPTIDMA is not set -# CONFIG_PATA_PDC2027X is not set -# CONFIG_PATA_PDC_OLD is not set -# CONFIG_PATA_RADISYS is not set -# CONFIG_PATA_RDC is not set -# CONFIG_PATA_SCH is not set -# CONFIG_PATA_SERVERWORKS is not set -# CONFIG_PATA_SIL680 is not set -# CONFIG_PATA_SIS is not set -# CONFIG_PATA_TOSHIBA is not set -# CONFIG_PATA_TRIFLEX is not set -# CONFIG_PATA_VIA is not set -# CONFIG_PATA_WINBOND is not set - -# -# PIO-only SFF controllers -# -# CONFIG_PATA_CMD640_PCI is not set -# CONFIG_PATA_MPIIX is not set -# CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_OPTI is not set -CONFIG_PATA_PLATFORM=y -CONFIG_PATA_OF_PLATFORM=y -# CONFIG_PATA_RZ1000 is not set - -# -# Generic fallback / legacy drivers -# -# CONFIG_PATA_ACPI is not set -# CONFIG_ATA_GENERIC is not set -# CONFIG_PATA_LEGACY is not set -# CONFIG_MD is not set -# CONFIG_TARGET_CORE is not set -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_FIREWIRE is not set -# CONFIG_FIREWIRE_NOSY is not set -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_NET_CORE=y -# CONFIG_BONDING is not set -# CONFIG_DUMMY is not set -# CONFIG_EQUALIZER is not set -# CONFIG_NET_FC is not set -# CONFIG_NET_TEAM is not set -CONFIG_MACVLAN=m -CONFIG_MACVTAP=m -# CONFIG_VXLAN is not set -# CONFIG_MACSEC is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -CONFIG_TUN=y -CONFIG_TAP=m -# CONFIG_TUN_VNET_CROSS_LE is not set -CONFIG_VETH=m -CONFIG_VIRTIO_NET=y -# CONFIG_NLMON is not set -# CONFIG_ARCNET is not set - -# -# CAIF transport drivers -# - -# -# Distributed Switch Architecture drivers -# -CONFIG_ETHERNET=y -CONFIG_NET_VENDOR_3COM=y -# CONFIG_VORTEX is not set -# CONFIG_TYPHOON is not set -CONFIG_NET_VENDOR_ADAPTEC=y -# CONFIG_ADAPTEC_STARFIRE is not set -CONFIG_NET_VENDOR_AGERE=y -# CONFIG_ET131X is not set -CONFIG_NET_VENDOR_ALACRITECH=y -# CONFIG_SLICOSS is not set -CONFIG_NET_VENDOR_ALLWINNER=y -# CONFIG_SUN4I_EMAC is not set -CONFIG_NET_VENDOR_ALTEON=y -# CONFIG_ACENIC is not set -# CONFIG_ALTERA_TSE is not set -CONFIG_NET_VENDOR_AMAZON=y -CONFIG_NET_VENDOR_AMD=y -# CONFIG_AMD8111_ETH is not set -# CONFIG_PCNET32 is not set -CONFIG_AMD_XGBE=y -# CONFIG_AMD_XGBE_HAVE_ECC is not set -CONFIG_NET_XGENE=y -# CONFIG_NET_XGENE_V2 is not set -CONFIG_NET_VENDOR_AQUANTIA=y -CONFIG_NET_VENDOR_ARC=y -# CONFIG_EMAC_ROCKCHIP is not set -CONFIG_NET_VENDOR_ATHEROS=y -# CONFIG_ATL2 is not set -# CONFIG_ATL1 is not set -# CONFIG_ATL1E is not set -# CONFIG_ATL1C is not set -# CONFIG_ALX is not set -# CONFIG_NET_VENDOR_AURORA is not set -CONFIG_NET_CADENCE=y -CONFIG_MACB=y -CONFIG_MACB_USE_HWSTAMP=y -# CONFIG_MACB_PCI is not set -CONFIG_NET_VENDOR_BROADCOM=y -# CONFIG_B44 is not set -# CONFIG_BCMGENET is not set -# CONFIG_BNX2 is not set -# CONFIG_CNIC is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2X is not set -CONFIG_BGMAC=y -CONFIG_BGMAC_PLATFORM=y -# CONFIG_SYSTEMPORT is not set -# CONFIG_BNXT is not set -CONFIG_NET_VENDOR_BROCADE=y -# CONFIG_BNA is not set -CONFIG_NET_VENDOR_CAVIUM=y -CONFIG_THUNDER_NIC_PF=y -# CONFIG_THUNDER_NIC_VF is not set -CONFIG_THUNDER_NIC_BGX=y -CONFIG_THUNDER_NIC_RGX=y -# CONFIG_LIQUIDIO is not set -# CONFIG_LIQUIDIO_VF is not set -CONFIG_NET_VENDOR_CHELSIO=y -# CONFIG_CHELSIO_T1 is not set -# CONFIG_CHELSIO_T3 is not set -# CONFIG_CHELSIO_T4 is not set -# CONFIG_CHELSIO_T4VF is not set -CONFIG_NET_VENDOR_CISCO=y -# CONFIG_ENIC is not set -# CONFIG_DNET is not set -CONFIG_NET_VENDOR_DEC=y -# CONFIG_NET_TULIP is not set -CONFIG_NET_VENDOR_DLINK=y -# CONFIG_DL2K is not set -# CONFIG_SUNDANCE is not set -CONFIG_NET_VENDOR_EMULEX=y -# CONFIG_BE2NET is not set -CONFIG_NET_VENDOR_EZCHIP=y -# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set -CONFIG_NET_VENDOR_EXAR=y -# CONFIG_S2IO is not set -# CONFIG_VXGE is not set -CONFIG_NET_VENDOR_FREESCALE=y -# CONFIG_FSL_FMAN is not set -# CONFIG_FSL_PQ_MDIO is not set -# CONFIG_FSL_XGMAC_MDIO is not set -# CONFIG_GIANFAR is not set -CONFIG_NET_VENDOR_HISILICON=y -# CONFIG_HIX5HD2_GMAC is not set -# CONFIG_HISI_FEMAC is not set -# CONFIG_HIP04_ETH is not set -CONFIG_HNS_MDIO=y -CONFIG_HNS=y -CONFIG_HNS_DSAF=y -CONFIG_HNS_ENET=y -# CONFIG_HNS3 is not set -CONFIG_NET_VENDOR_HP=y -# CONFIG_HP100 is not set -CONFIG_NET_VENDOR_HUAWEI=y -CONFIG_NET_VENDOR_INTEL=y -# CONFIG_E100 is not set -# CONFIG_E1000 is not set -CONFIG_E1000E=y -CONFIG_IGB=y -CONFIG_IGB_HWMON=y -CONFIG_IGBVF=y -# CONFIG_IXGB is not set -# CONFIG_IXGBE is not set -# CONFIG_IXGBEVF is not set -# CONFIG_I40E is not set -# CONFIG_I40EVF is not set -# CONFIG_FM10K is not set -CONFIG_NET_VENDOR_I825XX=y -# CONFIG_JME is not set -CONFIG_NET_VENDOR_MARVELL=y -CONFIG_MVMDIO=y -CONFIG_MVNETA=y -CONFIG_MVPP2=y -# CONFIG_PXA168_ETH is not set -# CONFIG_SKGE is not set -CONFIG_SKY2=y -# CONFIG_SKY2_DEBUG is not set -# CONFIG_NET_VENDOR_MEDIATEK is not set -CONFIG_NET_VENDOR_MELLANOX=y -# CONFIG_MLX4_EN is not set -# CONFIG_MLX4_CORE is not set -# CONFIG_MLX5_CORE is not set -# CONFIG_MLXSW_CORE is not set -# CONFIG_MLXFW is not set -CONFIG_NET_VENDOR_MICREL=y -# CONFIG_KS8842 is not set -# CONFIG_KS8851 is not set -# CONFIG_KS8851_MLL is not set -# CONFIG_KSZ884X_PCI is not set -CONFIG_NET_VENDOR_MICROCHIP=y -# CONFIG_ENC28J60 is not set -# CONFIG_ENCX24J600 is not set -CONFIG_NET_VENDOR_MYRI=y -# CONFIG_MYRI10GE is not set -# CONFIG_FEALNX is not set -CONFIG_NET_VENDOR_NATSEMI=y -# CONFIG_NATSEMI is not set -# CONFIG_NS83820 is not set -CONFIG_NET_VENDOR_NETRONOME=y -# CONFIG_NFP is not set -CONFIG_NET_VENDOR_8390=y -# CONFIG_NE2K_PCI is not set -CONFIG_NET_VENDOR_NVIDIA=y -# CONFIG_FORCEDETH is not set -CONFIG_NET_VENDOR_OKI=y -# CONFIG_ETHOC is not set -CONFIG_NET_PACKET_ENGINE=y -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_NET_VENDOR_QLOGIC=y -# CONFIG_QLA3XXX is not set -# CONFIG_QLCNIC is not set -# CONFIG_QLGE is not set -# CONFIG_NETXEN_NIC is not set -# CONFIG_QED is not set -CONFIG_NET_VENDOR_QUALCOMM=y -# CONFIG_QCA7000_SPI is not set -# CONFIG_QCA7000_UART is not set -CONFIG_QCOM_EMAC=m -# CONFIG_RMNET is not set -CONFIG_NET_VENDOR_REALTEK=y -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_R8169 is not set -CONFIG_NET_VENDOR_RENESAS=y -# CONFIG_SH_ETH is not set -CONFIG_RAVB=y -CONFIG_NET_VENDOR_RDC=y -# CONFIG_R6040 is not set -CONFIG_NET_VENDOR_ROCKER=y -CONFIG_NET_VENDOR_SAMSUNG=y -# CONFIG_SXGBE_ETH is not set -CONFIG_NET_VENDOR_SEEQ=y -CONFIG_NET_VENDOR_SILAN=y -# CONFIG_SC92031 is not set -CONFIG_NET_VENDOR_SIS=y -# CONFIG_SIS900 is not set -# CONFIG_SIS190 is not set -CONFIG_NET_VENDOR_SOLARFLARE=y -# CONFIG_SFC is not set -# CONFIG_SFC_FALCON is not set -CONFIG_NET_VENDOR_SMSC=y -CONFIG_SMC91X=y -# CONFIG_EPIC100 is not set -CONFIG_SMSC911X=y -# CONFIG_SMSC911X_ARCH_HOOKS is not set -# CONFIG_SMSC9420 is not set -CONFIG_NET_VENDOR_STMICRO=y -CONFIG_STMMAC_ETH=y -CONFIG_STMMAC_PLATFORM=y -# CONFIG_DWMAC_DWC_QOS_ETH is not set -CONFIG_DWMAC_GENERIC=y -CONFIG_DWMAC_IPQ806X=m -CONFIG_DWMAC_MESON=m -CONFIG_DWMAC_ROCKCHIP=m -# CONFIG_DWMAC_SOCFPGA is not set -CONFIG_DWMAC_SUNXI=m -CONFIG_DWMAC_SUN8I=m -# CONFIG_STMMAC_PCI is not set -CONFIG_NET_VENDOR_SUN=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NIU is not set -CONFIG_NET_VENDOR_TEHUTI=y -# CONFIG_TEHUTI is not set -CONFIG_NET_VENDOR_TI=y -# CONFIG_TI_CPSW_ALE is not set -# CONFIG_TLAN is not set -CONFIG_NET_VENDOR_VIA=y -# CONFIG_VIA_RHINE is not set -# CONFIG_VIA_VELOCITY is not set -CONFIG_NET_VENDOR_WIZNET=y -# CONFIG_WIZNET_W5100 is not set -# CONFIG_WIZNET_W5300 is not set -CONFIG_NET_VENDOR_SYNOPSYS=y -# CONFIG_DWC_XLGMAC is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_NET_SB1000 is not set -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_BUS=y -# CONFIG_MDIO_BCM_IPROC is not set -# CONFIG_MDIO_BCM_UNIMAC is not set -CONFIG_MDIO_BITBANG=y -CONFIG_MDIO_BUS_MUX=y -CONFIG_MDIO_BUS_MUX_BCM_IPROC=y -# CONFIG_MDIO_BUS_MUX_GPIO is not set -CONFIG_MDIO_BUS_MUX_MMIOREG=y -CONFIG_MDIO_CAVIUM=y -# CONFIG_MDIO_GPIO is not set -# CONFIG_MDIO_HISI_FEMAC is not set -# CONFIG_MDIO_OCTEON is not set -# CONFIG_MDIO_SUN4I is not set -CONFIG_MDIO_THUNDER=y -CONFIG_MDIO_XGENE=y -CONFIG_PHYLIB=y -CONFIG_SWPHY=y -# CONFIG_LED_TRIGGER_PHY is not set - -# -# MII PHY device drivers -# -# CONFIG_AMD_PHY is not set -# CONFIG_AQUANTIA_PHY is not set -CONFIG_AT803X_PHY=m -# CONFIG_BCM7XXX_PHY is not set -# CONFIG_BCM87XX_PHY is not set -# CONFIG_BROADCOM_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_CORTINA_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_DP83848_PHY is not set -# CONFIG_DP83867_PHY is not set -CONFIG_FIXED_PHY=y -# CONFIG_ICPLUS_PHY is not set -# CONFIG_INTEL_XWAY_PHY is not set -# CONFIG_LSI_ET1011C_PHY is not set -# CONFIG_LXT_PHY is not set -CONFIG_MARVELL_PHY=m -CONFIG_MARVELL_10G_PHY=m -CONFIG_MESON_GXL_PHY=m -CONFIG_MICREL_PHY=y -# CONFIG_MICROCHIP_PHY is not set -# CONFIG_MICROSEMI_PHY is not set -# CONFIG_NATIONAL_PHY is not set -# CONFIG_QSEMI_PHY is not set -CONFIG_REALTEK_PHY=m -CONFIG_ROCKCHIP_PHY=y -# CONFIG_SMSC_PHY is not set -# CONFIG_STE10XP is not set -# CONFIG_TERANETICS_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_XILINX_GMII2RGMII is not set -# CONFIG_MICREL_KS8995MA is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -CONFIG_USB_NET_DRIVERS=y -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_RTL8152=m -# CONFIG_USB_LAN78XX is not set -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_AX88179_178A=m -CONFIG_USB_NET_CDCETHER=m -# CONFIG_USB_NET_CDC_EEM is not set -CONFIG_USB_NET_CDC_NCM=m -# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set -# CONFIG_USB_NET_CDC_MBIM is not set -CONFIG_USB_NET_DM9601=m -# CONFIG_USB_NET_SR9700 is not set -CONFIG_USB_NET_SR9800=m -CONFIG_USB_NET_SMSC75XX=m -CONFIG_USB_NET_SMSC95XX=m -# CONFIG_USB_NET_GL620A is not set -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_MCS7830=m -# CONFIG_USB_NET_RNDIS_HOST is not set -CONFIG_USB_NET_CDC_SUBSET_ENABLE=m -CONFIG_USB_NET_CDC_SUBSET=m -# CONFIG_USB_ALI_M5632 is not set -# CONFIG_USB_AN2720 is not set -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -# CONFIG_USB_EPSON2888 is not set -# CONFIG_USB_KC2190 is not set -CONFIG_USB_NET_ZAURUS=m -# CONFIG_USB_NET_CX82310_ETH is not set -# CONFIG_USB_NET_KALMIA is not set -# CONFIG_USB_NET_QMI_WWAN is not set -# CONFIG_USB_HSO is not set -# CONFIG_USB_NET_INT51X1 is not set -# CONFIG_USB_IPHETH is not set -# CONFIG_USB_SIERRA_NET is not set -# CONFIG_USB_VL600 is not set -# CONFIG_USB_NET_CH9200 is not set -CONFIG_WLAN=y -CONFIG_WLAN_VENDOR_ADMTEK=y -# CONFIG_ADM8211 is not set -CONFIG_WLAN_VENDOR_ATH=y -# CONFIG_ATH_DEBUG is not set -# CONFIG_ATH5K is not set -# CONFIG_ATH5K_PCI is not set -# CONFIG_ATH9K is not set -# CONFIG_ATH9K_HTC is not set -# CONFIG_CARL9170 is not set -# CONFIG_ATH6KL is not set -# CONFIG_AR5523 is not set -# CONFIG_WIL6210 is not set -# CONFIG_ATH10K is not set -# CONFIG_WCN36XX is not set -CONFIG_WLAN_VENDOR_ATMEL=y -# CONFIG_ATMEL is not set -# CONFIG_AT76C50X_USB is not set -CONFIG_WLAN_VENDOR_BROADCOM=y -# CONFIG_B43 is not set -# CONFIG_B43LEGACY is not set -CONFIG_BRCMUTIL=m -# CONFIG_BRCMSMAC is not set -CONFIG_BRCMFMAC=m -CONFIG_BRCMFMAC_PROTO_BCDC=y -CONFIG_BRCMFMAC_SDIO=y -# CONFIG_BRCMFMAC_USB is not set -# CONFIG_BRCMFMAC_PCIE is not set -# CONFIG_BRCM_TRACING is not set -# CONFIG_BRCMDBG is not set -CONFIG_WLAN_VENDOR_CISCO=y -CONFIG_WLAN_VENDOR_INTEL=y -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_IWL4965 is not set -# CONFIG_IWL3945 is not set -# CONFIG_IWLWIFI is not set -CONFIG_WLAN_VENDOR_INTERSIL=y -# CONFIG_HOSTAP is not set -# CONFIG_HERMES is not set -# CONFIG_P54_COMMON is not set -# CONFIG_PRISM54 is not set -CONFIG_WLAN_VENDOR_MARVELL=y -# CONFIG_LIBERTAS is not set -# CONFIG_LIBERTAS_THINFIRM is not set -# CONFIG_MWIFIEX is not set -# CONFIG_MWL8K is not set -CONFIG_WLAN_VENDOR_MEDIATEK=y -# CONFIG_MT7601U is not set -CONFIG_WLAN_VENDOR_RALINK=y -# CONFIG_RT2X00 is not set -CONFIG_WLAN_VENDOR_REALTEK=y -# CONFIG_RTL8180 is not set -# CONFIG_RTL8187 is not set -CONFIG_RTL_CARDS=m -# CONFIG_RTL8192CE is not set -# CONFIG_RTL8192SE is not set -# CONFIG_RTL8192DE is not set -# CONFIG_RTL8723AE is not set -# CONFIG_RTL8723BE is not set -# CONFIG_RTL8188EE is not set -# CONFIG_RTL8192EE is not set -# CONFIG_RTL8821AE is not set -# CONFIG_RTL8192CU is not set -# CONFIG_RTL8XXXU is not set -CONFIG_WLAN_VENDOR_RSI=y -# CONFIG_RSI_91X is not set -CONFIG_WLAN_VENDOR_ST=y -# CONFIG_CW1200 is not set -CONFIG_WLAN_VENDOR_TI=y -# CONFIG_WL1251 is not set -# CONFIG_WL12XX is not set -CONFIG_WL18XX=m -CONFIG_WLCORE=m -# CONFIG_WLCORE_SPI is not set -CONFIG_WLCORE_SDIO=m -CONFIG_WILINK_PLATFORM_DATA=y -CONFIG_WLAN_VENDOR_ZYDAS=y -# CONFIG_USB_ZD1201 is not set -# CONFIG_ZD1211RW is not set -CONFIG_WLAN_VENDOR_QUANTENNA=y -# CONFIG_QTNFMAC_PEARL_PCIE is not set -# CONFIG_MAC80211_HWSIM is not set -# CONFIG_USB_NET_RNDIS_WLAN is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# -# CONFIG_WAN is not set -CONFIG_XEN_NETDEV_FRONTEND=y -# CONFIG_XEN_NETDEV_BACKEND is not set -# CONFIG_VMXNET3 is not set -# CONFIG_FUJITSU_ES is not set -# CONFIG_ISDN is not set -# CONFIG_NVM is not set - -# -# Input device support -# -CONFIG_INPUT=y -CONFIG_INPUT_LEDS=y -# CONFIG_INPUT_FF_MEMLESS is not set -CONFIG_INPUT_POLLDEV=m -# CONFIG_INPUT_SPARSEKMAP is not set -CONFIG_INPUT_MATRIXKMAP=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ADC=m -# CONFIG_KEYBOARD_ADP5588 is not set -# CONFIG_KEYBOARD_ADP5589 is not set -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_QT1070 is not set -# CONFIG_KEYBOARD_QT2160 is not set -# CONFIG_KEYBOARD_DLINK_DIR685 is not set -# CONFIG_KEYBOARD_LKKBD is not set -CONFIG_KEYBOARD_GPIO=y -# CONFIG_KEYBOARD_GPIO_POLLED is not set -# CONFIG_KEYBOARD_TCA6416 is not set -# CONFIG_KEYBOARD_TCA8418 is not set -# CONFIG_KEYBOARD_MATRIX is not set -# CONFIG_KEYBOARD_LM8323 is not set -# CONFIG_KEYBOARD_LM8333 is not set -# CONFIG_KEYBOARD_MAX7359 is not set -# CONFIG_KEYBOARD_MCS is not set -# CONFIG_KEYBOARD_MPR121 is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_KEYBOARD_TEGRA is not set -# CONFIG_KEYBOARD_OPENCORES is not set -# CONFIG_KEYBOARD_SAMSUNG is not set -# CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_SH_KEYSC is not set -# CONFIG_KEYBOARD_SUN4I_LRADC is not set -# CONFIG_KEYBOARD_OMAP4 is not set -# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set -# CONFIG_KEYBOARD_XTKBD is not set -CONFIG_KEYBOARD_CROS_EC=y -# CONFIG_KEYBOARD_CAP11XX is not set -# CONFIG_KEYBOARD_BCM is not set -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=y -CONFIG_MOUSE_PS2_ALPS=y -CONFIG_MOUSE_PS2_BYD=y -CONFIG_MOUSE_PS2_LOGIPS2PP=y -CONFIG_MOUSE_PS2_SYNAPTICS=y -CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y -CONFIG_MOUSE_PS2_CYPRESS=y -CONFIG_MOUSE_PS2_TRACKPOINT=y -# CONFIG_MOUSE_PS2_ELANTECH is not set -# CONFIG_MOUSE_PS2_SENTELIC is not set -# CONFIG_MOUSE_PS2_TOUCHKIT is not set -CONFIG_MOUSE_PS2_FOCALTECH=y -CONFIG_MOUSE_PS2_SMBUS=y -# CONFIG_MOUSE_SERIAL is not set -# CONFIG_MOUSE_APPLETOUCH is not set -# CONFIG_MOUSE_BCM5974 is not set -# CONFIG_MOUSE_CYAPA is not set -# CONFIG_MOUSE_ELAN_I2C is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_MOUSE_GPIO is not set -# CONFIG_MOUSE_SYNAPTICS_I2C is not set -# CONFIG_MOUSE_SYNAPTICS_USB is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_AD714X is not set -# CONFIG_INPUT_ATMEL_CAPTOUCH is not set -# CONFIG_INPUT_BMA150 is not set -# CONFIG_INPUT_E3X0_BUTTON is not set -CONFIG_INPUT_PM8941_PWRKEY=y -# CONFIG_INPUT_PM8XXX_VIBRATOR is not set -# CONFIG_INPUT_MMA8450 is not set -# CONFIG_INPUT_GP2A is not set -# CONFIG_INPUT_GPIO_BEEPER is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set -# CONFIG_INPUT_GPIO_DECODER is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_KXTJ9 is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_CM109 is not set -# CONFIG_INPUT_REGULATOR_HAPTIC is not set -# CONFIG_INPUT_AXP20X_PEK is not set -# CONFIG_INPUT_UINPUT is not set -# CONFIG_INPUT_PCF8574 is not set -# CONFIG_INPUT_PWM_BEEPER is not set -# CONFIG_INPUT_PWM_VIBRA is not set -# CONFIG_INPUT_RK805_PWRKEY is not set -# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set -# CONFIG_INPUT_ADXL34X is not set -# CONFIG_INPUT_IMS_PCU is not set -# CONFIG_INPUT_CMA3000 is not set -CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y -# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set -# CONFIG_INPUT_DRV260X_HAPTICS is not set -# CONFIG_INPUT_DRV2665_HAPTICS is not set -# CONFIG_INPUT_DRV2667_HAPTICS is not set -CONFIG_INPUT_HISI_POWERKEY=y -# CONFIG_RMI4_CORE is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_SERIO_ALTERA_PS2 is not set -# CONFIG_SERIO_PS2MULT is not set -# CONFIG_SERIO_ARC_PS2 is not set -# CONFIG_SERIO_APBPS2 is not set -# CONFIG_SERIO_SUN4I_PS2 is not set -# CONFIG_SERIO_GPIO_PS2 is not set -# CONFIG_USERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_TTY=y -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_VT_CONSOLE_SLEEP=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_SERIAL_NONSTANDARD is not set -# CONFIG_NOZOMI is not set -# CONFIG_N_GSM is not set -# CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y - -# -# Serial drivers -# -CONFIG_SERIAL_EARLYCON=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y -CONFIG_SERIAL_8250_PNP=y -# CONFIG_SERIAL_8250_FINTEK is not set -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_DMA=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_EXAR=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -# CONFIG_SERIAL_8250_ASPEED_VUART is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_RSA is not set -CONFIG_SERIAL_8250_BCM2835AUX=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_DW=y -# CONFIG_SERIAL_8250_RT288X is not set -CONFIG_SERIAL_8250_MT6577=y -CONFIG_SERIAL_8250_UNIPHIER=y -# CONFIG_SERIAL_8250_MOXA is not set -CONFIG_SERIAL_OF_PLATFORM=y - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set -CONFIG_SERIAL_MESON=y -CONFIG_SERIAL_MESON_CONSOLE=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_UARTS_4=y -CONFIG_SERIAL_SAMSUNG_UARTS=4 -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_SERIAL_TEGRA=y -# CONFIG_SERIAL_MAX3100 is not set -# CONFIG_SERIAL_MAX310X is not set -# CONFIG_SERIAL_UARTLITE is not set -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=18 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_SERIAL_SH_SCI_EARLYCON=y -CONFIG_SERIAL_SH_SCI_DMA=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_SERIAL_MSM=y -CONFIG_SERIAL_MSM_CONSOLE=y -# CONFIG_SERIAL_SCCNXP is not set -# CONFIG_SERIAL_SC16IS7XX is not set -# CONFIG_SERIAL_ALTERA_JTAGUART is not set -# CONFIG_SERIAL_ALTERA_UART is not set -# CONFIG_SERIAL_IFX6X60 is not set -CONFIG_SERIAL_XILINX_PS_UART=y -CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y -# CONFIG_SERIAL_ARC is not set -# CONFIG_SERIAL_RP2 is not set -# CONFIG_SERIAL_FSL_LPUART is not set -# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set -# CONFIG_SERIAL_SPRD is not set -CONFIG_SERIAL_MVEBU_UART=y -CONFIG_SERIAL_MVEBU_CONSOLE=y -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SERIAL_DEV_BUS=y -CONFIG_SERIAL_DEV_CTRL_TTYPORT=y -CONFIG_HVC_DRIVER=y -CONFIG_HVC_IRQ=y -CONFIG_HVC_XEN=y -CONFIG_HVC_XEN_FRONTEND=y -# CONFIG_HVC_DCC is not set -CONFIG_VIRTIO_CONSOLE=y -# CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=m -# CONFIG_HW_RANDOM_TIMERIOMEM is not set -CONFIG_HW_RANDOM_BCM2835=m -CONFIG_HW_RANDOM_IPROC_RNG200=m -CONFIG_HW_RANDOM_OMAP=m -# CONFIG_HW_RANDOM_VIRTIO is not set -CONFIG_HW_RANDOM_HISI=m -CONFIG_HW_RANDOM_MSM=m -CONFIG_HW_RANDOM_XGENE=m -CONFIG_HW_RANDOM_MESON=m -CONFIG_HW_RANDOM_CAVIUM=m -CONFIG_HW_RANDOM_MTK=m -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# PCMCIA character devices -# -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -# CONFIG_TCG_TPM is not set -CONFIG_DEVPORT=y -# CONFIG_XILLYBUS is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_ACPI_I2C_OPREGION=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_COMPAT=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y - -# -# Multiplexer I2C Chip support -# -# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set -# CONFIG_I2C_MUX_GPIO is not set -# CONFIG_I2C_MUX_GPMUX is not set -# CONFIG_I2C_MUX_LTC4306 is not set -# CONFIG_I2C_MUX_PCA9541 is not set -CONFIG_I2C_MUX_PCA954x=y -# CONFIG_I2C_MUX_PINCTRL is not set -# CONFIG_I2C_MUX_REG is not set -# CONFIG_I2C_DEMUX_PINCTRL is not set -# CONFIG_I2C_MUX_MLXCPLD is not set -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_ALGOBIT=y - -# -# I2C Hardware Bus support -# - -# -# PC SMBus host controller drivers -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_HIX5HD2 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_ISCH is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set - -# -# ACPI drivers -# -# CONFIG_I2C_SCMI is not set - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -CONFIG_I2C_BCM2835=m -CONFIG_I2C_BCM_IPROC=y -CONFIG_I2C_BRCMSTB=y -# CONFIG_I2C_CADENCE is not set -# CONFIG_I2C_CBUS_GPIO is not set -CONFIG_I2C_DESIGNWARE_CORE=y -CONFIG_I2C_DESIGNWARE_PLATFORM=y -# CONFIG_I2C_DESIGNWARE_SLAVE is not set -# CONFIG_I2C_DESIGNWARE_PCI is not set -# CONFIG_I2C_EMEV2 is not set -CONFIG_I2C_EXYNOS5=y -# CONFIG_I2C_GPIO is not set -CONFIG_I2C_IMX=y -CONFIG_I2C_MESON=y -# CONFIG_I2C_MT65XX is not set -CONFIG_I2C_MV64XXX=y -# CONFIG_I2C_NOMADIK is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PCA_PLATFORM is not set -CONFIG_I2C_PXA=y -# CONFIG_I2C_PXA_PCI is not set -# CONFIG_I2C_PXA_SLAVE is not set -CONFIG_I2C_QUP=y -# CONFIG_I2C_RIIC is not set -CONFIG_I2C_RK3X=y -CONFIG_I2C_SH_MOBILE=y -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_SPRD is not set -CONFIG_I2C_TEGRA=y -CONFIG_I2C_TEGRA_BPMP=y -# CONFIG_I2C_UNIPHIER is not set -CONFIG_I2C_UNIPHIER_F=y -# CONFIG_I2C_VERSATILE is not set -# CONFIG_I2C_THUNDERX is not set -# CONFIG_I2C_XILINX is not set -# CONFIG_I2C_XLP9XX is not set -CONFIG_I2C_RCAR=y - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_DIOLAN_U2C is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_ROBOTFUZZ_OSIF is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -CONFIG_I2C_CROS_EC_TUNNEL=y -# CONFIG_I2C_XGENE_SLIMPRO is not set -CONFIG_I2C_ZX2967=y -# CONFIG_I2C_STUB is not set -CONFIG_I2C_SLAVE=y -# CONFIG_I2C_SLAVE_EEPROM is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_ALTERA is not set -# CONFIG_SPI_ARMADA_3700 is not set -# CONFIG_SPI_AXI_SPI_ENGINE is not set -CONFIG_SPI_BCM2835=m -CONFIG_SPI_BCM2835AUX=m -CONFIG_SPI_BCM_QSPI=y -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_CADENCE is not set -# CONFIG_SPI_DESIGNWARE is not set -# CONFIG_SPI_GPIO is not set -# CONFIG_SPI_FSL_SPI is not set -# CONFIG_SPI_FSL_DSPI is not set -CONFIG_SPI_MESON_SPICC=m -CONFIG_SPI_MESON_SPIFC=m -# CONFIG_SPI_MT65XX is not set -# CONFIG_SPI_OC_TINY is not set -CONFIG_SPI_ORION=y -CONFIG_SPI_PL022=y -# CONFIG_SPI_PXA2XX is not set -# CONFIG_SPI_PXA2XX_PCI is not set -CONFIG_SPI_ROCKCHIP=y -# CONFIG_SPI_RSPI is not set -CONFIG_SPI_QUP=y -CONFIG_SPI_S3C64XX=y -# CONFIG_SPI_SC18IS602 is not set -# CONFIG_SPI_SH_MSIOF is not set -# CONFIG_SPI_SH_HSPI is not set -# CONFIG_SPI_SUN4I is not set -# CONFIG_SPI_SUN6I is not set -# CONFIG_SPI_TEGRA114 is not set -# CONFIG_SPI_TEGRA20_SFLASH is not set -# CONFIG_SPI_TEGRA20_SLINK is not set -# CONFIG_SPI_THUNDERX is not set -# CONFIG_SPI_XCOMM is not set -# CONFIG_SPI_XILINX is not set -# CONFIG_SPI_XLP is not set -# CONFIG_SPI_ZYNQMP_GQSPI is not set - -# -# SPI Protocol Masters -# -CONFIG_SPI_SPIDEV=m -# CONFIG_SPI_LOOPBACK_TEST is not set -# CONFIG_SPI_TLE62X0 is not set -# CONFIG_SPI_SLAVE is not set -CONFIG_SPMI=y -CONFIG_SPMI_MSM_PMIC_ARB=y -# CONFIG_HSI is not set -CONFIG_PPS=y -# CONFIG_PPS_DEBUG is not set - -# -# PPS clients support -# -# CONFIG_PPS_CLIENT_KTIMER is not set -# CONFIG_PPS_CLIENT_LDISC is not set -# CONFIG_PPS_CLIENT_GPIO is not set - -# -# PPS generators support -# - -# -# PTP clock support -# -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_DTE=y - -# -# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. -# -CONFIG_PINCTRL=y - -# -# Pin controllers -# -CONFIG_GENERIC_PINCTRL_GROUPS=y -CONFIG_PINMUX=y -CONFIG_GENERIC_PINMUX_FUNCTIONS=y -CONFIG_PINCONF=y -CONFIG_GENERIC_PINCONF=y -# CONFIG_DEBUG_PINCTRL is not set -# CONFIG_PINCTRL_AMD is not set -# CONFIG_PINCTRL_MCP23S08 is not set -CONFIG_PINCTRL_MESON=y -CONFIG_PINCTRL_ROCKCHIP=y -CONFIG_PINCTRL_SINGLE=y -# CONFIG_PINCTRL_SX150X is not set -CONFIG_PINCTRL_MAX77620=y -# CONFIG_PINCTRL_RK805 is not set -CONFIG_PINCTRL_BCM2835=y -CONFIG_PINCTRL_IPROC_GPIO=y -CONFIG_PINCTRL_NS2_MUX=y -# CONFIG_PINCTRL_BERLIN_BG2 is not set -# CONFIG_PINCTRL_BERLIN_BG2CD is not set -# CONFIG_PINCTRL_BERLIN_BG2Q is not set -# CONFIG_PINCTRL_BERLIN_BG4CT is not set -CONFIG_PINCTRL_MVEBU=y -CONFIG_PINCTRL_ARMADA_AP806=y -CONFIG_PINCTRL_ARMADA_CP110=y -CONFIG_PINCTRL_ARMADA_37XX=y -CONFIG_PINCTRL_MSM=y -# CONFIG_PINCTRL_APQ8064 is not set -# CONFIG_PINCTRL_APQ8084 is not set -# CONFIG_PINCTRL_IPQ4019 is not set -# CONFIG_PINCTRL_IPQ8064 is not set -CONFIG_PINCTRL_IPQ8074=y -# CONFIG_PINCTRL_MSM8660 is not set -# CONFIG_PINCTRL_MSM8960 is not set -# CONFIG_PINCTRL_MDM9615 is not set -# CONFIG_PINCTRL_MSM8X74 is not set -CONFIG_PINCTRL_MSM8916=y -CONFIG_PINCTRL_MSM8994=y -CONFIG_PINCTRL_MSM8996=y -CONFIG_PINCTRL_QDF2XXX=y -CONFIG_PINCTRL_QCOM_SPMI_PMIC=y -# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set -CONFIG_PINCTRL_SAMSUNG=y -CONFIG_PINCTRL_EXYNOS=y -CONFIG_PINCTRL_EXYNOS_ARM64=y -CONFIG_PINCTRL_SH_PFC=y -CONFIG_PINCTRL_PFC_R8A7795=y -CONFIG_PINCTRL_PFC_R8A7796=y -CONFIG_PINCTRL_PFC_R8A77965=y -CONFIG_PINCTRL_PFC_R8A77970=y -CONFIG_PINCTRL_PFC_R8A77980=y -CONFIG_PINCTRL_PFC_R8A77990=y -CONFIG_PINCTRL_PFC_R8A77995=y -# CONFIG_PINCTRL_SPRD is not set -CONFIG_PINCTRL_SUNXI=y -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -CONFIG_PINCTRL_SUN8I_H3_R=y -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set -CONFIG_PINCTRL_SUN50I_A64=y -CONFIG_PINCTRL_SUN50I_A64_R=y -CONFIG_PINCTRL_SUN50I_H5=y -CONFIG_PINCTRL_TEGRA=y -CONFIG_PINCTRL_TEGRA124=y -CONFIG_PINCTRL_TEGRA210=y -CONFIG_PINCTRL_TEGRA_XUSB=y -CONFIG_PINCTRL_UNIPHIER=y -# CONFIG_PINCTRL_UNIPHIER_LD4 is not set -# CONFIG_PINCTRL_UNIPHIER_PRO4 is not set -# CONFIG_PINCTRL_UNIPHIER_SLD8 is not set -# CONFIG_PINCTRL_UNIPHIER_PRO5 is not set -# CONFIG_PINCTRL_UNIPHIER_PXS2 is not set -# CONFIG_PINCTRL_UNIPHIER_LD6B is not set -CONFIG_PINCTRL_UNIPHIER_LD11=y -CONFIG_PINCTRL_UNIPHIER_LD20=y -CONFIG_PINCTRL_UNIPHIER_PXS3=y -CONFIG_PINCTRL_MTK=y -CONFIG_PINCTRL_MT8173=y -# CONFIG_PINCTRL_ZX296718 is not set -CONFIG_GPIOLIB=y -CONFIG_OF_GPIO=y -CONFIG_GPIO_ACPI=y -CONFIG_GPIOLIB_IRQCHIP=y -# CONFIG_DEBUG_GPIO is not set -# CONFIG_GPIO_SYSFS is not set -CONFIG_GPIO_GENERIC=y - -# -# Memory mapped GPIO drivers -# -# CONFIG_GPIO_74XX_MMIO is not set -# CONFIG_GPIO_ALTERA is not set -# CONFIG_GPIO_AMDPT is not set -# CONFIG_GPIO_AXP209 is not set -CONFIG_GPIO_BRCMSTB=y -CONFIG_GPIO_DWAPB=y -# CONFIG_GPIO_EXAR is not set -# CONFIG_GPIO_FTGPIO010 is not set -CONFIG_GPIO_GENERIC_PLATFORM=y -# CONFIG_GPIO_GRGPIO is not set -# CONFIG_GPIO_MOCKUP is not set -# CONFIG_GPIO_MPC8XXX is not set -CONFIG_GPIO_MVEBU=y -CONFIG_GPIO_PL061=y -CONFIG_GPIO_RCAR=y -# CONFIG_GPIO_SYSCON is not set -CONFIG_GPIO_TEGRA=y -# CONFIG_GPIO_THUNDERX is not set -CONFIG_GPIO_XGENE=y -CONFIG_GPIO_XGENE_SB=y -# CONFIG_GPIO_XILINX is not set -# CONFIG_GPIO_XLP is not set -# CONFIG_GPIO_ZYNQ is not set -# CONFIG_GPIO_ZX is not set - -# -# I2C GPIO expanders -# -# CONFIG_GPIO_ADP5588 is not set -# CONFIG_GPIO_ADNP is not set -# CONFIG_GPIO_MAX7300 is not set -# CONFIG_GPIO_MAX732X is not set -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -# CONFIG_GPIO_PCF857X is not set -# CONFIG_GPIO_SX150X is not set -# CONFIG_GPIO_TPIC2810 is not set - -# -# MFD GPIO expanders -# -# CONFIG_GPIO_BD9571MWV is not set -CONFIG_GPIO_MAX77620=y - -# -# PCI GPIO expanders -# -# CONFIG_GPIO_BT8XX is not set -# CONFIG_GPIO_PCI_IDIO_16 is not set -# CONFIG_GPIO_RDC321X is not set - -# -# SPI GPIO expanders -# -# CONFIG_GPIO_74X164 is not set -# CONFIG_GPIO_MAX7301 is not set -# CONFIG_GPIO_MC33880 is not set -# CONFIG_GPIO_PISOSR is not set -# CONFIG_GPIO_XRA1403 is not set - -# -# USB GPIO expanders -# -# CONFIG_W1 is not set -CONFIG_POWER_AVS=y -CONFIG_ROCKCHIP_IODOMAIN=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_BRCMSTB=y -# CONFIG_POWER_RESET_GPIO is not set -# CONFIG_POWER_RESET_GPIO_RESTART is not set -# CONFIG_POWER_RESET_HISI is not set -CONFIG_POWER_RESET_MSM=y -# CONFIG_POWER_RESET_LTC2952 is not set -# CONFIG_POWER_RESET_RESTART is not set -CONFIG_POWER_RESET_VEXPRESS=y -CONFIG_POWER_RESET_XGENE=y -CONFIG_POWER_RESET_SYSCON=y -# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set -# CONFIG_POWER_RESET_ZX is not set -CONFIG_REBOOT_MODE=y -CONFIG_SYSCON_REBOOT_MODE=y -CONFIG_POWER_SUPPLY=y -# CONFIG_POWER_SUPPLY_DEBUG is not set -# CONFIG_PDA_POWER is not set -# CONFIG_GENERIC_ADC_BATTERY is not set -# CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2780 is not set -# CONFIG_BATTERY_DS2781 is not set -# CONFIG_BATTERY_DS2782 is not set -# CONFIG_BATTERY_LEGO_EV3 is not set -# CONFIG_BATTERY_SBS is not set -# CONFIG_CHARGER_SBS is not set -CONFIG_BATTERY_BQ27XXX=y -CONFIG_BATTERY_BQ27XXX_I2C=y -# CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set -# CONFIG_AXP20X_POWER is not set -# CONFIG_AXP288_FUEL_GAUGE is not set -# CONFIG_BATTERY_MAX17040 is not set -# CONFIG_BATTERY_MAX17042 is not set -# CONFIG_CHARGER_ISP1704 is not set -# CONFIG_CHARGER_MAX8903 is not set -# CONFIG_CHARGER_LP8727 is not set -# CONFIG_CHARGER_GPIO is not set -# CONFIG_CHARGER_MANAGER is not set -# CONFIG_CHARGER_LTC3651 is not set -# CONFIG_CHARGER_DETECTOR_MAX14656 is not set -# CONFIG_CHARGER_QCOM_SMBB is not set -# CONFIG_CHARGER_BQ2415X is not set -# CONFIG_CHARGER_BQ24190 is not set -# CONFIG_CHARGER_BQ24257 is not set -# CONFIG_CHARGER_BQ24735 is not set -# CONFIG_CHARGER_BQ25890 is not set -# CONFIG_CHARGER_SMB347 is not set -# CONFIG_BATTERY_GAUGE_LTC2941 is not set -# CONFIG_CHARGER_RT9455 is not set -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Native drivers -# -# CONFIG_SENSORS_AD7314 is not set -# CONFIG_SENSORS_AD7414 is not set -# CONFIG_SENSORS_AD7418 is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1029 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ADT7310 is not set -# CONFIG_SENSORS_ADT7410 is not set -# CONFIG_SENSORS_ADT7411 is not set -# CONFIG_SENSORS_ADT7462 is not set -# CONFIG_SENSORS_ADT7470 is not set -# CONFIG_SENSORS_ADT7475 is not set -# CONFIG_SENSORS_ASC7621 is not set -CONFIG_SENSORS_ARM_SCPI=y -# CONFIG_SENSORS_ASPEED is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS620 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_I5K_AMB is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set -# CONFIG_SENSORS_F75375S is not set -# CONFIG_SENSORS_FTSTEUTATES is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_G760A is not set -# CONFIG_SENSORS_G762 is not set -# CONFIG_SENSORS_GPIO_FAN is not set -# CONFIG_SENSORS_HIH6130 is not set -# CONFIG_SENSORS_IIO_HWMON is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_JC42 is not set -# CONFIG_SENSORS_POWR1220 is not set -# CONFIG_SENSORS_LINEAGE is not set -# CONFIG_SENSORS_LTC2945 is not set -# CONFIG_SENSORS_LTC2990 is not set -# CONFIG_SENSORS_LTC4151 is not set -# CONFIG_SENSORS_LTC4215 is not set -# CONFIG_SENSORS_LTC4222 is not set -# CONFIG_SENSORS_LTC4245 is not set -# CONFIG_SENSORS_LTC4260 is not set -# CONFIG_SENSORS_LTC4261 is not set -# CONFIG_SENSORS_MAX1111 is not set -# CONFIG_SENSORS_MAX16065 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_MAX1668 is not set -# CONFIG_SENSORS_MAX197 is not set -# CONFIG_SENSORS_MAX31722 is not set -# CONFIG_SENSORS_MAX6639 is not set -# CONFIG_SENSORS_MAX6642 is not set -# CONFIG_SENSORS_MAX6650 is not set -# CONFIG_SENSORS_MAX6697 is not set -# CONFIG_SENSORS_MAX31790 is not set -# CONFIG_SENSORS_MCP3021 is not set -# CONFIG_SENSORS_TC654 is not set -# CONFIG_SENSORS_ADCXX is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM70 is not set -# CONFIG_SENSORS_LM73 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -CONFIG_SENSORS_LM90=m -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_LM93 is not set -# CONFIG_SENSORS_LM95234 is not set -# CONFIG_SENSORS_LM95241 is not set -# CONFIG_SENSORS_LM95245 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_PC87427 is not set -# CONFIG_SENSORS_NTC_THERMISTOR is not set -# CONFIG_SENSORS_NCT6683 is not set -# CONFIG_SENSORS_NCT6775 is not set -# CONFIG_SENSORS_NCT7802 is not set -# CONFIG_SENSORS_NCT7904 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_PMBUS is not set -# CONFIG_SENSORS_PWM_FAN is not set -# CONFIG_SENSORS_SHT15 is not set -# CONFIG_SENSORS_SHT21 is not set -# CONFIG_SENSORS_SHT3x is not set -# CONFIG_SENSORS_SHTC1 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_DME1737 is not set -# CONFIG_SENSORS_EMC1403 is not set -# CONFIG_SENSORS_EMC2103 is not set -# CONFIG_SENSORS_EMC6W201 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_SCH56XX_COMMON is not set -# CONFIG_SENSORS_SCH5627 is not set -# CONFIG_SENSORS_SCH5636 is not set -# CONFIG_SENSORS_STTS751 is not set -# CONFIG_SENSORS_SMM665 is not set -# CONFIG_SENSORS_ADC128D818 is not set -# CONFIG_SENSORS_ADS1015 is not set -# CONFIG_SENSORS_ADS7828 is not set -# CONFIG_SENSORS_ADS7871 is not set -# CONFIG_SENSORS_AMC6821 is not set -# CONFIG_SENSORS_INA209 is not set -CONFIG_SENSORS_INA2XX=m -# CONFIG_SENSORS_INA3221 is not set -# CONFIG_SENSORS_TC74 is not set -# CONFIG_SENSORS_THMC50 is not set -# CONFIG_SENSORS_TMP102 is not set -# CONFIG_SENSORS_TMP103 is not set -# CONFIG_SENSORS_TMP108 is not set -# CONFIG_SENSORS_TMP401 is not set -# CONFIG_SENSORS_TMP421 is not set -# CONFIG_SENSORS_VEXPRESS is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83793 is not set -# CONFIG_SENSORS_W83795 is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83L786NG is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_SENSORS_XGENE is not set - -# -# ACPI drivers -# -# CONFIG_SENSORS_ACPI_POWER is not set -CONFIG_THERMAL=y -CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 -CONFIG_THERMAL_HWMON=y -CONFIG_THERMAL_OF=y -# CONFIG_THERMAL_WRITABLE_TRIPS is not set -# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y -# CONFIG_THERMAL_GOV_FAIR_SHARE is not set -# CONFIG_THERMAL_GOV_STEP_WISE is not set -# CONFIG_THERMAL_GOV_BANG_BANG is not set -# CONFIG_THERMAL_GOV_USER_SPACE is not set -CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y -CONFIG_CPU_THERMAL=y -# CONFIG_CLOCK_THERMAL is not set -# CONFIG_DEVFREQ_THERMAL is not set -CONFIG_THERMAL_EMULATION=y -CONFIG_HISI_THERMAL=y -# CONFIG_MAX77620_THERMAL is not set -# CONFIG_QORIQ_THERMAL is not set -CONFIG_ROCKCHIP_THERMAL=m -# CONFIG_RCAR_THERMAL is not set -CONFIG_RCAR_GEN3_THERMAL=y -# CONFIG_ARMADA_THERMAL is not set - -# -# ACPI INT340X thermal drivers -# -CONFIG_MTK_THERMAL=y - -# -# Samsung thermal drivers -# -CONFIG_EXYNOS_THERMAL=y - -# -# NVIDIA Tegra thermal drivers -# -# CONFIG_TEGRA_SOCTHERM is not set -# CONFIG_QCOM_SPMI_TEMP_ALARM is not set -# CONFIG_GENERIC_ADC_THERMAL is not set - -# -# Qualcomm thermal drivers -# -CONFIG_QCOM_TSENS=y -# CONFIG_ZX2967_THERMAL is not set -CONFIG_UNIPHIER_THERMAL=y -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_CORE=y -# CONFIG_WATCHDOG_NOWAYOUT is not set -CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y -# CONFIG_WATCHDOG_SYSFS is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_GPIO_WATCHDOG is not set -# CONFIG_WDAT_WDT is not set -# CONFIG_XILINX_WATCHDOG is not set -# CONFIG_ZIIRAVE_WATCHDOG is not set -# CONFIG_ARM_SP805_WATCHDOG is not set -# CONFIG_ARM_SBSA_WATCHDOG is not set -# CONFIG_CADENCE_WATCHDOG is not set -CONFIG_HAVE_S3C2410_WATCHDOG=y -CONFIG_S3C2410_WATCHDOG=y -# CONFIG_DW_WATCHDOG is not set -# CONFIG_SUNXI_WATCHDOG is not set -# CONFIG_MAX63XX_WATCHDOG is not set -# CONFIG_MAX77620_WATCHDOG is not set -# CONFIG_IMX2_WDT is not set -# CONFIG_TEGRA_WATCHDOG is not set -# CONFIG_QCOM_WDT is not set -CONFIG_MESON_GXBB_WATCHDOG=m -CONFIG_MESON_WATCHDOG=m -# CONFIG_MEDIATEK_WATCHDOG is not set -CONFIG_RENESAS_WDT=y -# CONFIG_RENESAS_RZAWDT is not set -# CONFIG_ZX2967_WATCHDOG is not set -CONFIG_UNIPHIER_WATCHDOG=y -# CONFIG_ALIM7101_WDT is not set -# CONFIG_I6300ESB_WDT is not set -CONFIG_BCM2835_WDT=y -# CONFIG_BCM7038_WDT is not set -# CONFIG_MEN_A21_WDT is not set -# CONFIG_XEN_WDT is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set - -# -# Watchdog Pretimeout Governors -# -# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set -CONFIG_BCMA_POSSIBLE=y -# CONFIG_BCMA is not set - -# -# Multifunction device drivers -# -CONFIG_MFD_CORE=y -# CONFIG_MFD_ACT8945A is not set -# CONFIG_MFD_SUN4I_GPADC is not set -# CONFIG_MFD_AS3711 is not set -# CONFIG_MFD_AS3722 is not set -# CONFIG_PMIC_ADP5520 is not set -# CONFIG_MFD_AAT2870_CORE is not set -# CONFIG_MFD_ATMEL_FLEXCOM is not set -# CONFIG_MFD_ATMEL_HLCDC is not set -# CONFIG_MFD_BCM590XX is not set -CONFIG_MFD_BD9571MWV=y -# CONFIG_MFD_AC100 is not set -CONFIG_MFD_AXP20X=y -# CONFIG_MFD_AXP20X_I2C is not set -CONFIG_MFD_AXP20X_RSB=y -CONFIG_MFD_CROS_EC=y -CONFIG_MFD_CROS_EC_I2C=y -CONFIG_MFD_CROS_EC_SPI=y -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_DA9052_SPI is not set -# CONFIG_MFD_DA9052_I2C is not set -# CONFIG_MFD_DA9055 is not set -# CONFIG_MFD_DA9062 is not set -# CONFIG_MFD_DA9063 is not set -# CONFIG_MFD_DA9150 is not set -# CONFIG_MFD_DLN2 is not set -CONFIG_MFD_EXYNOS_LPASS=m -# CONFIG_MFD_MC13XXX_SPI is not set -# CONFIG_MFD_MC13XXX_I2C is not set -CONFIG_MFD_HI6421_PMIC=y -CONFIG_MFD_HI655X_PMIC=y -# CONFIG_HTC_PASIC3 is not set -# CONFIG_HTC_I2CPLD is not set -# CONFIG_LPC_ICH is not set -# CONFIG_LPC_SCH is not set -# CONFIG_MFD_JANZ_CMODIO is not set -# CONFIG_MFD_KEMPLD is not set -# CONFIG_MFD_88PM800 is not set -# CONFIG_MFD_88PM805 is not set -# CONFIG_MFD_88PM860X is not set -# CONFIG_MFD_MAX14577 is not set -CONFIG_MFD_MAX77620=y -# CONFIG_MFD_MAX77686 is not set -# CONFIG_MFD_MAX77693 is not set -# CONFIG_MFD_MAX77843 is not set -# CONFIG_MFD_MAX8907 is not set -# CONFIG_MFD_MAX8925 is not set -# CONFIG_MFD_MAX8997 is not set -# CONFIG_MFD_MAX8998 is not set -# CONFIG_MFD_MT6397 is not set -# CONFIG_MFD_MENF21BMC is not set -# CONFIG_EZX_PCAP is not set -# CONFIG_MFD_CPCAP is not set -# CONFIG_MFD_VIPERBOARD is not set -# CONFIG_MFD_RETU is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_MFD_QCOM_RPM is not set -CONFIG_MFD_SPMI_PMIC=y -# CONFIG_MFD_RDC321X is not set -# CONFIG_MFD_RTSX_PCI is not set -# CONFIG_MFD_RT5033 is not set -# CONFIG_MFD_RTSX_USB is not set -# CONFIG_MFD_RC5T583 is not set -CONFIG_MFD_RK808=y -# CONFIG_MFD_RN5T618 is not set -CONFIG_MFD_SEC_CORE=y -# CONFIG_MFD_SI476X_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_SKY81452 is not set -# CONFIG_MFD_SMSC is not set -# CONFIG_ABX500_CORE is not set -# CONFIG_MFD_STMPE is not set -# CONFIG_MFD_SUN6I_PRCM is not set -CONFIG_MFD_SYSCON=y -# CONFIG_MFD_TI_AM335X_TSCADC is not set -# CONFIG_MFD_LP3943 is not set -# CONFIG_MFD_LP8788 is not set -# CONFIG_MFD_TI_LMU is not set -# CONFIG_MFD_PALMAS is not set -# CONFIG_TPS6105X is not set -# CONFIG_TPS65010 is not set -# CONFIG_TPS6507X is not set -# CONFIG_MFD_TPS65086 is not set -# CONFIG_MFD_TPS65090 is not set -# CONFIG_MFD_TPS65217 is not set -# CONFIG_MFD_TPS68470 is not set -# CONFIG_MFD_TI_LP873X is not set -# CONFIG_MFD_TI_LP87565 is not set -# CONFIG_MFD_TPS65218 is not set -# CONFIG_MFD_TPS6586X is not set -# CONFIG_MFD_TPS65910 is not set -# CONFIG_MFD_TPS65912_I2C is not set -# CONFIG_MFD_TPS65912_SPI is not set -# CONFIG_MFD_TPS80031 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_TWL6040_CORE is not set -# CONFIG_MFD_WL1273_CORE is not set -# CONFIG_MFD_LM3533 is not set -# CONFIG_MFD_TC3589X is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_VX855 is not set -# CONFIG_MFD_ARIZONA_I2C is not set -# CONFIG_MFD_ARIZONA_SPI is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X_I2C is not set -# CONFIG_MFD_WM831X_SPI is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_WM8994 is not set -CONFIG_MFD_VEXPRESS_SYSREG=y -CONFIG_REGULATOR=y -# CONFIG_REGULATOR_DEBUG is not set -CONFIG_REGULATOR_FIXED_VOLTAGE=y -# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set -# CONFIG_REGULATOR_ACT8865 is not set -# CONFIG_REGULATOR_AD5398 is not set -# CONFIG_REGULATOR_ANATOP is not set -CONFIG_REGULATOR_AXP20X=y -CONFIG_REGULATOR_BD9571MWV=y -# CONFIG_REGULATOR_DA9210 is not set -# CONFIG_REGULATOR_DA9211 is not set -CONFIG_REGULATOR_FAN53555=y -CONFIG_REGULATOR_GPIO=y -# CONFIG_REGULATOR_HI6421 is not set -CONFIG_REGULATOR_HI6421V530=y -CONFIG_REGULATOR_HI655X=y -# CONFIG_REGULATOR_ISL9305 is not set -# CONFIG_REGULATOR_ISL6271A is not set -# CONFIG_REGULATOR_LP3971 is not set -# CONFIG_REGULATOR_LP3972 is not set -# CONFIG_REGULATOR_LP872X is not set -# CONFIG_REGULATOR_LP8755 is not set -# CONFIG_REGULATOR_LTC3589 is not set -# CONFIG_REGULATOR_LTC3676 is not set -# CONFIG_REGULATOR_MAX1586 is not set -CONFIG_REGULATOR_MAX77620=y -# CONFIG_REGULATOR_MAX8649 is not set -# CONFIG_REGULATOR_MAX8660 is not set -# CONFIG_REGULATOR_MAX8952 is not set -# CONFIG_REGULATOR_MAX8973 is not set -# CONFIG_REGULATOR_MT6311 is not set -# CONFIG_REGULATOR_PFUZE100 is not set -# CONFIG_REGULATOR_PV88060 is not set -# CONFIG_REGULATOR_PV88080 is not set -# CONFIG_REGULATOR_PV88090 is not set -CONFIG_REGULATOR_PWM=y -CONFIG_REGULATOR_QCOM_SMD_RPM=y -CONFIG_REGULATOR_QCOM_SPMI=y -CONFIG_REGULATOR_RK808=y -# CONFIG_REGULATOR_S2MPA01 is not set -CONFIG_REGULATOR_S2MPS11=y -# CONFIG_REGULATOR_S5M8767 is not set -# CONFIG_REGULATOR_TPS51632 is not set -# CONFIG_REGULATOR_TPS62360 is not set -# CONFIG_REGULATOR_TPS65023 is not set -# CONFIG_REGULATOR_TPS6507X is not set -# CONFIG_REGULATOR_TPS65132 is not set -# CONFIG_REGULATOR_TPS6524X is not set -# CONFIG_REGULATOR_VCTRL is not set -# CONFIG_REGULATOR_VEXPRESS is not set -CONFIG_CEC_CORE=y -CONFIG_RC_CORE=m -CONFIG_RC_MAP=m -CONFIG_RC_DECODERS=y -# CONFIG_LIRC is not set -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_RC_DEVICES=y -# CONFIG_RC_ATI_REMOTE is not set -# CONFIG_IR_ENE is not set -# CONFIG_IR_HIX5HD2 is not set -# CONFIG_IR_IMON is not set -# CONFIG_IR_MCEUSB is not set -# CONFIG_IR_ITE_CIR is not set -# CONFIG_IR_FINTEK is not set -CONFIG_IR_MESON=m -# CONFIG_IR_MTK is not set -# CONFIG_IR_NUVOTON is not set -# CONFIG_IR_REDRAT3 is not set -# CONFIG_IR_STREAMZAP is not set -# CONFIG_IR_IGORPLUGUSB is not set -# CONFIG_IR_IGUANA is not set -# CONFIG_IR_TTUSBIR is not set -# CONFIG_RC_LOOPBACK is not set -# CONFIG_IR_GPIO_CIR is not set -# CONFIG_IR_SUNXI is not set -# CONFIG_IR_SERIAL is not set -# CONFIG_IR_SIR is not set -# CONFIG_IR_ZX is not set -CONFIG_MEDIA_SUPPORT=y - -# -# Multimedia core support -# -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_ANALOG_TV_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -# CONFIG_MEDIA_RADIO_SUPPORT is not set -# CONFIG_MEDIA_SDR_SUPPORT is not set -# CONFIG_MEDIA_CEC_SUPPORT is not set -CONFIG_MEDIA_CONTROLLER=y -# CONFIG_MEDIA_CONTROLLER_DVB is not set -CONFIG_VIDEO_DEV=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_VIDEO_V4L2=y -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set -# CONFIG_VIDEO_PCI_SKELETON is not set -CONFIG_V4L2_MEM2MEM_DEV=m -CONFIG_V4L2_FWNODE=y -CONFIG_VIDEOBUF2_CORE=y -CONFIG_VIDEOBUF2_MEMOPS=y -CONFIG_VIDEOBUF2_DMA_CONTIG=y -CONFIG_VIDEOBUF2_VMALLOC=y -CONFIG_DVB_CORE=y -# CONFIG_DVB_NET is not set -# CONFIG_TTPCI_EEPROM is not set -CONFIG_DVB_MAX_ADAPTERS=16 -# CONFIG_DVB_DYNAMIC_MINORS is not set -# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set - -# -# Media drivers -# -# CONFIG_MEDIA_USB_SUPPORT is not set -# CONFIG_MEDIA_PCI_SUPPORT is not set -CONFIG_V4L_PLATFORM_DRIVERS=y -# CONFIG_VIDEO_CAFE_CCIC is not set -# CONFIG_VIDEO_SH_VOU is not set -# CONFIG_VIDEO_MUX is not set -# CONFIG_VIDEO_QCOM_CAMSS is not set -# CONFIG_VIDEO_RENESAS_CEU is not set -# CONFIG_SOC_CAMERA is not set -# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set -# CONFIG_VIDEO_XILINX is not set -CONFIG_VIDEO_RCAR_CSI2=y -CONFIG_VIDEO_RCAR_VIN=y -# CONFIG_VIDEO_RCAR_VIN_DEBUG is not set -CONFIG_V4L_MEM2MEM_DRIVERS=y -# CONFIG_VIDEO_MEDIATEK_VPU is not set -# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set -# CONFIG_VIDEO_SAMSUNG_S5P_G2D is not set -CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m -CONFIG_VIDEO_SAMSUNG_S5P_MFC=m -CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m -# CONFIG_VIDEO_SH_VEU is not set -# CONFIG_VIDEO_RENESAS_FDP1 is not set -# CONFIG_VIDEO_RENESAS_JPU is not set -CONFIG_VIDEO_RENESAS_FCP=y -CONFIG_VIDEO_RENESAS_VSP1=y -# CONFIG_VIDEO_RENESAS_DEBUG is not set -CONFIG_VIDEO_RENESAS_VSP_ALPHA_BIT_ARGB1555=0 -# CONFIG_VIDEO_QCOM_VENUS is not set -# CONFIG_V4L_TEST_DRIVERS is not set -# CONFIG_DVB_PLATFORM_DRIVERS is not set - -# -# Supported MMC/SDIO adapters -# -# CONFIG_SMS_SDIO_DRV is not set -# CONFIG_CYPRESS_FIRMWARE is not set - -# -# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) -# -# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set -CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=m - -# -# I2C Encoders, decoders, sensors and other helper chips -# - -# -# Audio decoders, processors and mixers -# -# CONFIG_VIDEO_TVAUDIO is not set -# CONFIG_VIDEO_TDA7432 is not set -# CONFIG_VIDEO_TDA9840 is not set -# CONFIG_VIDEO_TEA6415C is not set -# CONFIG_VIDEO_TEA6420 is not set -# CONFIG_VIDEO_MSP3400 is not set -# CONFIG_VIDEO_CS3308 is not set -# CONFIG_VIDEO_CS5345 is not set -# CONFIG_VIDEO_CS53L32A is not set -# CONFIG_VIDEO_TLV320AIC23B is not set -# CONFIG_VIDEO_UDA1342 is not set -# CONFIG_VIDEO_WM8775 is not set -# CONFIG_VIDEO_WM8739 is not set -# CONFIG_VIDEO_VP27SMPX is not set -# CONFIG_VIDEO_SONY_BTF_MPX is not set - -# -# RDS decoders -# -# CONFIG_VIDEO_SAA6588 is not set - -# -# Video decoders -# -CONFIG_VIDEO_ADV7180=y -# CONFIG_VIDEO_ADV7183 is not set -CONFIG_VIDEO_ADV748X=y -CONFIG_VIDEO_ADV7604=y -CONFIG_VIDEO_ADV7604_CEC=y -# CONFIG_VIDEO_ADV7842 is not set -# CONFIG_VIDEO_BT819 is not set -# CONFIG_VIDEO_BT856 is not set -# CONFIG_VIDEO_BT866 is not set -# CONFIG_VIDEO_KS0127 is not set -# CONFIG_VIDEO_ML86V7667 is not set -# CONFIG_VIDEO_AD5820 is not set -# CONFIG_VIDEO_DW9714 is not set -# CONFIG_VIDEO_SAA7110 is not set -# CONFIG_VIDEO_SAA711X is not set -# CONFIG_VIDEO_TC358743 is not set -# CONFIG_VIDEO_TVP514X is not set -# CONFIG_VIDEO_TVP5150 is not set -# CONFIG_VIDEO_TVP7002 is not set -# CONFIG_VIDEO_TW2804 is not set -# CONFIG_VIDEO_TW9903 is not set -# CONFIG_VIDEO_TW9906 is not set -# CONFIG_VIDEO_VPX3220 is not set - -# -# Video and audio decoders -# -# CONFIG_VIDEO_SAA717X is not set -# CONFIG_VIDEO_CX25840 is not set - -# -# Video encoders -# -# CONFIG_VIDEO_SAA7127 is not set -# CONFIG_VIDEO_SAA7185 is not set -# CONFIG_VIDEO_ADV7170 is not set -# CONFIG_VIDEO_ADV7175 is not set -# CONFIG_VIDEO_ADV7343 is not set -# CONFIG_VIDEO_ADV7393 is not set -# CONFIG_VIDEO_ADV7511 is not set -# CONFIG_VIDEO_AD9389B is not set -# CONFIG_VIDEO_AK881X is not set -# CONFIG_VIDEO_THS8200 is not set - -# -# Camera sensor devices -# -# CONFIG_VIDEO_OV2640 is not set -# CONFIG_VIDEO_OV2659 is not set -# CONFIG_VIDEO_OV5640 is not set -# CONFIG_VIDEO_OV5645 is not set -# CONFIG_VIDEO_OV5647 is not set -# CONFIG_VIDEO_OV6650 is not set -# CONFIG_VIDEO_OV5670 is not set -# CONFIG_VIDEO_OV7640 is not set -# CONFIG_VIDEO_OV7670 is not set -# CONFIG_VIDEO_OV9650 is not set -# CONFIG_VIDEO_OV13858 is not set -# CONFIG_VIDEO_VS6624 is not set -# CONFIG_VIDEO_MT9M032 is not set -# CONFIG_VIDEO_MT9M111 is not set -# CONFIG_VIDEO_MT9P031 is not set -# CONFIG_VIDEO_MT9T001 is not set -# CONFIG_VIDEO_MT9V011 is not set -# CONFIG_VIDEO_MT9V032 is not set -# CONFIG_VIDEO_SR030PC30 is not set -# CONFIG_VIDEO_NOON010PC30 is not set -# CONFIG_VIDEO_M5MOLS is not set -# CONFIG_VIDEO_S5K6AA is not set -# CONFIG_VIDEO_S5K6A3 is not set -# CONFIG_VIDEO_S5K4ECGX is not set -# CONFIG_VIDEO_S5K5BAF is not set -# CONFIG_VIDEO_SMIAPP is not set -# CONFIG_VIDEO_ET8EK8 is not set -# CONFIG_VIDEO_S5C73M3 is not set - -# -# Flash devices -# -# CONFIG_VIDEO_ADP1653 is not set -# CONFIG_VIDEO_AS3645A is not set -# CONFIG_VIDEO_LM3560 is not set -# CONFIG_VIDEO_LM3646 is not set - -# -# Video improvement chips -# -# CONFIG_VIDEO_UPD64031A is not set -# CONFIG_VIDEO_UPD64083 is not set - -# -# Audio/Video compression chips -# -# CONFIG_VIDEO_SAA6752HS is not set - -# -# SDR tuner chips -# - -# -# Miscellaneous helper chips -# -# CONFIG_VIDEO_THS7303 is not set -# CONFIG_VIDEO_M52790 is not set - -# -# Sensors used on soc_camera driver -# - -# -# SPI helper chips -# -# CONFIG_VIDEO_GS1662 is not set -CONFIG_MEDIA_TUNER=y - -# -# Customize TV tuners -# -CONFIG_MEDIA_TUNER_SIMPLE=m -CONFIG_MEDIA_TUNER_TDA8290=m -CONFIG_MEDIA_TUNER_TDA827X=m -CONFIG_MEDIA_TUNER_TDA18271=m -CONFIG_MEDIA_TUNER_TDA9887=m -CONFIG_MEDIA_TUNER_TEA5761=m -CONFIG_MEDIA_TUNER_TEA5767=m -CONFIG_MEDIA_TUNER_MSI001=m -CONFIG_MEDIA_TUNER_MT20XX=m -CONFIG_MEDIA_TUNER_MT2060=m -CONFIG_MEDIA_TUNER_MT2063=m -CONFIG_MEDIA_TUNER_MT2266=m -CONFIG_MEDIA_TUNER_MT2131=m -CONFIG_MEDIA_TUNER_QT1010=m -CONFIG_MEDIA_TUNER_XC2028=m -CONFIG_MEDIA_TUNER_XC5000=m -CONFIG_MEDIA_TUNER_XC4000=m -CONFIG_MEDIA_TUNER_MXL5005S=m -CONFIG_MEDIA_TUNER_MXL5007T=m -CONFIG_MEDIA_TUNER_MC44S803=m -CONFIG_MEDIA_TUNER_MAX2165=m -CONFIG_MEDIA_TUNER_TDA18218=m -CONFIG_MEDIA_TUNER_FC0011=m -CONFIG_MEDIA_TUNER_FC0012=m -CONFIG_MEDIA_TUNER_FC0013=m -CONFIG_MEDIA_TUNER_TDA18212=m -CONFIG_MEDIA_TUNER_E4000=m -CONFIG_MEDIA_TUNER_FC2580=m -CONFIG_MEDIA_TUNER_M88RS6000T=m -CONFIG_MEDIA_TUNER_TUA9001=m -CONFIG_MEDIA_TUNER_SI2157=m -CONFIG_MEDIA_TUNER_IT913X=m -CONFIG_MEDIA_TUNER_R820T=m -CONFIG_MEDIA_TUNER_MXL301RF=m -CONFIG_MEDIA_TUNER_QM1D1C0042=m - -# -# Customise DVB Frontends -# - -# -# Multistandard (satellite) frontends -# -CONFIG_DVB_STB0899=m -CONFIG_DVB_STB6100=m -CONFIG_DVB_STV090x=m -CONFIG_DVB_STV0910=m -CONFIG_DVB_STV6110x=m -CONFIG_DVB_STV6111=m -CONFIG_DVB_MXL5XX=m -CONFIG_DVB_M88DS3103=m - -# -# Multistandard (cable + terrestrial) frontends -# -CONFIG_DVB_DRXK=m -CONFIG_DVB_TDA18271C2DD=m -CONFIG_DVB_SI2165=m -CONFIG_DVB_MN88472=m -CONFIG_DVB_MN88473=m - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_MT312=m -CONFIG_DVB_ZL10036=m -CONFIG_DVB_ZL10039=m -CONFIG_DVB_S5H1420=m -CONFIG_DVB_STV0288=m -CONFIG_DVB_STB6000=m -CONFIG_DVB_STV0299=m -CONFIG_DVB_STV6110=m -CONFIG_DVB_STV0900=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_TDA10086=m -CONFIG_DVB_TDA8261=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_TUNER_ITD1000=m -CONFIG_DVB_TUNER_CX24113=m -CONFIG_DVB_TDA826X=m -CONFIG_DVB_TUA6100=m -CONFIG_DVB_CX24116=m -CONFIG_DVB_CX24117=m -CONFIG_DVB_CX24120=m -CONFIG_DVB_SI21XX=m -CONFIG_DVB_TS2020=m -CONFIG_DVB_DS3000=m -CONFIG_DVB_MB86A16=m -CONFIG_DVB_TDA10071=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_S5H1432=m -CONFIG_DVB_DRXD=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m -CONFIG_DVB_DIB7000M=m -CONFIG_DVB_DIB7000P=m -CONFIG_DVB_DIB9000=m -CONFIG_DVB_TDA10048=m -CONFIG_DVB_AF9013=m -CONFIG_DVB_EC100=m -CONFIG_DVB_STV0367=m -CONFIG_DVB_CXD2820R=m -CONFIG_DVB_CXD2841ER=m -CONFIG_DVB_RTL2830=m -CONFIG_DVB_RTL2832=m -CONFIG_DVB_SI2168=m -# CONFIG_DVB_AS102_FE is not set -CONFIG_DVB_ZD1301_DEMOD=m -# CONFIG_DVB_GP8PSK_FE is not set - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_TDA10023=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m -CONFIG_DVB_LGDT3305=m -CONFIG_DVB_LGDT3306A=m -CONFIG_DVB_LG2160=m -CONFIG_DVB_S5H1409=m -CONFIG_DVB_AU8522=m -CONFIG_DVB_AU8522_DTV=m -CONFIG_DVB_AU8522_V4L=m -CONFIG_DVB_S5H1411=m - -# -# ISDB-T (terrestrial) frontends -# -CONFIG_DVB_S921=m -CONFIG_DVB_DIB8000=m -CONFIG_DVB_MB86A20S=m - -# -# ISDB-S (satellite) & ISDB-T (terrestrial) frontends -# -CONFIG_DVB_TC90522=m - -# -# Digital terrestrial only tuners/PLL -# -CONFIG_DVB_PLL=m -CONFIG_DVB_TUNER_DIB0070=m -CONFIG_DVB_TUNER_DIB0090=m - -# -# SEC control devices for DVB-S -# -CONFIG_DVB_DRX39XYJ=m -CONFIG_DVB_LNBH25=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_LNBP22=m -CONFIG_DVB_ISL6405=m -CONFIG_DVB_ISL6421=m -CONFIG_DVB_ISL6423=m -CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m -CONFIG_DVB_LGS8GL5=m -CONFIG_DVB_LGS8GXX=m -CONFIG_DVB_ATBM8830=m -CONFIG_DVB_TDA665x=m -CONFIG_DVB_IX2505V=m -CONFIG_DVB_M88RS2000=m -CONFIG_DVB_AF9033=m -CONFIG_DVB_HORUS3A=m -CONFIG_DVB_ASCOT2E=m -CONFIG_DVB_HELENE=m - -# -# Tools to develop new frontends -# -# CONFIG_DVB_DUMMY_FE is not set - -# -# Graphics support -# -CONFIG_VGA_ARB=y -CONFIG_VGA_ARB_MAX_GPUS=16 -CONFIG_TEGRA_HOST1X=m -CONFIG_TEGRA_HOST1X_FIREWALL=y -CONFIG_DRM=y -CONFIG_DRM_MIPI_DSI=y -# CONFIG_DRM_DP_AUX_CHARDEV is not set -# CONFIG_DRM_DEBUG_MM is not set -# CONFIG_DRM_DEBUG_MM_SELFTEST is not set -CONFIG_DRM_KMS_HELPER=y -CONFIG_DRM_KMS_FB_HELPER=y -CONFIG_DRM_FBDEV_EMULATION=y -CONFIG_DRM_FBDEV_OVERALLOC=100 -# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set -CONFIG_DRM_TTM=m -CONFIG_DRM_GEM_CMA_HELPER=y -CONFIG_DRM_KMS_CMA_HELPER=y -CONFIG_DRM_VM=y - -# -# I2C encoder or helper chips -# -CONFIG_DRM_I2C_CH7006=m -CONFIG_DRM_I2C_SIL164=m -# CONFIG_DRM_I2C_NXP_TDA998X is not set -# CONFIG_DRM_HDLCD is not set -# CONFIG_DRM_MALI_DISPLAY is not set -# CONFIG_DRM_RADEON is not set -# CONFIG_DRM_AMDGPU is not set - -# -# ACP (Audio CoProcessor) Configuration -# -CONFIG_DRM_NOUVEAU=m -CONFIG_NOUVEAU_PLATFORM_DRIVER=y -CONFIG_NOUVEAU_DEBUG=5 -CONFIG_NOUVEAU_DEBUG_DEFAULT=3 -CONFIG_DRM_NOUVEAU_BACKLIGHT=y -# CONFIG_DRM_VGEM is not set -CONFIG_DRM_EXYNOS=m - -# -# CRTCs -# -# CONFIG_DRM_EXYNOS_FIMD is not set -CONFIG_DRM_EXYNOS5433_DECON=y -CONFIG_DRM_EXYNOS7_DECON=y -# CONFIG_DRM_EXYNOS_MIXER is not set -# CONFIG_DRM_EXYNOS_VIDI is not set - -# -# Encoders and Bridges -# -CONFIG_DRM_EXYNOS_DSI=y -# CONFIG_DRM_EXYNOS_DP is not set -CONFIG_DRM_EXYNOS_HDMI=y -CONFIG_DRM_EXYNOS_MIC=y - -# -# Sub-drivers -# -# CONFIG_DRM_EXYNOS_G2D is not set -# CONFIG_DRM_EXYNOS_IPP is not set -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_UDL is not set -# CONFIG_DRM_AST is not set -# CONFIG_DRM_MGAG200 is not set -# CONFIG_DRM_CIRRUS_QEMU is not set -CONFIG_DRM_RCAR_DU=y -CONFIG_DRM_RCAR_DW_HDMI=y -CONFIG_DRM_RCAR_LVDS=y -CONFIG_DRM_RCAR_VSP=y -# CONFIG_DRM_QXL is not set -# CONFIG_DRM_BOCHS is not set -# CONFIG_DRM_VIRTIO_GPU is not set -CONFIG_DRM_MSM=y -# CONFIG_DRM_MSM_REGISTER_LOGGING is not set -CONFIG_DRM_MSM_HDMI_HDCP=y -CONFIG_DRM_MSM_DSI=y -CONFIG_DRM_MSM_DSI_PLL=y -CONFIG_DRM_MSM_DSI_28NM_PHY=y -CONFIG_DRM_MSM_DSI_20NM_PHY=y -CONFIG_DRM_MSM_DSI_28NM_8960_PHY=y -CONFIG_DRM_MSM_DSI_14NM_PHY=y -CONFIG_DRM_TEGRA=m -# CONFIG_DRM_TEGRA_DEBUG is not set -CONFIG_DRM_PANEL=y - -# -# Display Panels -# -CONFIG_DRM_PANEL_LVDS=y -CONFIG_DRM_PANEL_SIMPLE=m -# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set -# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set -# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set -# CONFIG_DRM_PANEL_LG_LG4573 is not set -# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set -# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set -# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set -# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set -# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set -# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set -CONFIG_DRM_BRIDGE=y -CONFIG_DRM_PANEL_BRIDGE=y - -# -# Display Interface Bridges -# -# CONFIG_DRM_ANALOGIX_ANX78XX is not set -CONFIG_DRM_DUMB_VGA_DAC=y -# CONFIG_DRM_LVDS_ENCODER is not set -# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set -# CONFIG_DRM_NXP_PTN3460 is not set -# CONFIG_DRM_PARADE_PS8622 is not set -# CONFIG_DRM_SIL_SII8620 is not set -# CONFIG_DRM_SII902X is not set -CONFIG_DRM_THINE_THC63LVD1024=y -# CONFIG_DRM_TOSHIBA_TC358767 is not set -# CONFIG_DRM_TI_TFP410 is not set -CONFIG_DRM_ANALOGIX_DP=m -CONFIG_DRM_I2C_ADV7511=y -# CONFIG_DRM_I2C_ADV7511_AUDIO is not set -CONFIG_DRM_I2C_ADV7533=y -CONFIG_DRM_I2C_ADV7511_CEC=y -CONFIG_DRM_DW_HDMI=y -# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set -CONFIG_DRM_DW_HDMI_I2S_AUDIO=y -# CONFIG_DRM_DW_HDMI_CEC is not set -CONFIG_DRM_VC4=m -# CONFIG_DRM_VC4_HDMI_CEC is not set -# CONFIG_DRM_ARCPGU is not set -CONFIG_DRM_HISI_HIBMC=m -CONFIG_DRM_HISI_KIRIN=m -CONFIG_HISI_KIRIN_DW_DSI=m -# CONFIG_DRM_MEDIATEK is not set -# CONFIG_DRM_ZTE is not set -# CONFIG_DRM_MXSFB is not set -CONFIG_DRM_MESON=m -CONFIG_DRM_MESON_DW_HDMI=m -# CONFIG_DRM_TINYDRM is not set -# CONFIG_DRM_PL111 is not set -# CONFIG_DRM_LEGACY is not set -# CONFIG_DRM_LIB_RANDOM is not set - -# -# Frame buffer Devices -# -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB_CMDLINE=y -CONFIG_FB_NOTIFY=y -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -CONFIG_FB_SYS_FILLRECT=y -CONFIG_FB_SYS_COPYAREA=y -CONFIG_FB_SYS_IMAGEBLIT=y -# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -CONFIG_FB_SYS_FOPS=y -CONFIG_FB_DEFERRED_IO=y -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -CONFIG_FB_BACKLIGHT=y -CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -CONFIG_FB_ARMCLCD=y -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_EFI is not set -# CONFIG_FB_OPENCORES is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -# CONFIG_FB_I740 is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_S3 is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_VT8623 is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_ARK is not set -# CONFIG_FB_PM3 is not set -# CONFIG_FB_CARMINE is not set -# CONFIG_FB_SH_MOBILE_LCDC is not set -# CONFIG_FB_S3C is not set -# CONFIG_FB_SMSCUFX is not set -# CONFIG_FB_UDL is not set -# CONFIG_FB_IBM_GXT4500 is not set -# CONFIG_FB_XILINX is not set -# CONFIG_FB_VIRTUAL is not set -CONFIG_XEN_FBDEV_FRONTEND=y -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_FB_AUO_K190X is not set -# CONFIG_FB_SIMPLE is not set -# CONFIG_FB_SSD1307 is not set -# CONFIG_FB_SM712 is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=m -# CONFIG_LCD_L4F00242T03 is not set -# CONFIG_LCD_LMS283GF05 is not set -# CONFIG_LCD_LTV350QV is not set -# CONFIG_LCD_ILI922X is not set -# CONFIG_LCD_ILI9320 is not set -# CONFIG_LCD_TDO24M is not set -# CONFIG_LCD_VGG2432A4 is not set -# CONFIG_LCD_PLATFORM is not set -# CONFIG_LCD_S6E63M0 is not set -# CONFIG_LCD_LD9040 is not set -# CONFIG_LCD_AMS369FG06 is not set -# CONFIG_LCD_LMS501KF03 is not set -# CONFIG_LCD_HX8357 is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_GENERIC=m -CONFIG_BACKLIGHT_PWM=m -# CONFIG_BACKLIGHT_PM8941_WLED is not set -# CONFIG_BACKLIGHT_ADP8860 is not set -# CONFIG_BACKLIGHT_ADP8870 is not set -# CONFIG_BACKLIGHT_LM3630A is not set -# CONFIG_BACKLIGHT_LM3639 is not set -CONFIG_BACKLIGHT_LP855X=m -# CONFIG_BACKLIGHT_GPIO is not set -# CONFIG_BACKLIGHT_LV5207LP is not set -# CONFIG_BACKLIGHT_BD6107 is not set -# CONFIG_BACKLIGHT_ARCXCNN is not set -# CONFIG_VGASTATE is not set -CONFIG_VIDEOMODE_HELPERS=y -CONFIG_HDMI=y - -# -# Console display driver support -# -CONFIG_DUMMY_CONSOLE=y -CONFIG_DUMMY_CONSOLE_COLUMNS=80 -CONFIG_DUMMY_CONSOLE_ROWS=25 -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_PCM_ELD=y -CONFIG_SND_PCM_IEC958=y -CONFIG_SND_DMAENGINE_PCM=y -CONFIG_SND_JACK=y -CONFIG_SND_JACK_INPUT_DEV=y -# CONFIG_SND_OSSEMUL is not set -CONFIG_SND_PCM_TIMER=y -# CONFIG_SND_HRTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_PROC_FS=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -CONFIG_SND_DRIVERS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_ALOOP is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_PCI=y -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_ATIIXP_MODEM is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AW2 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_OXYGEN is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CTXFI is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set -# CONFIG_SND_INDIGOIOX is not set -# CONFIG_SND_INDIGODJX is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_EMU10K1_SEQ is not set -# CONFIG_SND_EMU10K1X is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_LOLA is not set -# CONFIG_SND_LX6464ES is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_SE6X is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VIA82XX_MODEM is not set -# CONFIG_SND_VIRTUOSO is not set -# CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# HD-Audio -# -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDA_TEGRA is not set -CONFIG_SND_HDA_PREALLOC_SIZE=64 -CONFIG_SND_SPI=y -CONFIG_SND_USB=y -# CONFIG_SND_USB_AUDIO is not set -# CONFIG_SND_USB_UA101 is not set -# CONFIG_SND_USB_CAIAQ is not set -# CONFIG_SND_USB_6FIRE is not set -# CONFIG_SND_USB_HIFACE is not set -# CONFIG_SND_BCD2000 is not set -# CONFIG_SND_USB_POD is not set -# CONFIG_SND_USB_PODHD is not set -# CONFIG_SND_USB_TONEPORT is not set -# CONFIG_SND_USB_VARIAX is not set -CONFIG_SND_SOC=y -CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y -# CONFIG_SND_SOC_AMD_ACP is not set -# CONFIG_SND_ATMEL_SOC is not set -CONFIG_SND_BCM2835_SOC_I2S=m -# CONFIG_SND_DESIGNWARE_I2S is not set - -# -# SoC Audio for Freescale CPUs -# - -# -# Common SoC Audio options for Freescale CPUs: -# -# CONFIG_SND_SOC_FSL_ASRC is not set -# CONFIG_SND_SOC_FSL_SAI is not set -# CONFIG_SND_SOC_FSL_SSI is not set -# CONFIG_SND_SOC_FSL_SPDIF is not set -# CONFIG_SND_SOC_FSL_ESAI is not set -# CONFIG_SND_SOC_IMX_AUDMUX is not set -# CONFIG_SND_I2S_HI6210_I2S is not set -# CONFIG_SND_KIRKWOOD_SOC is not set -# CONFIG_SND_SOC_IMG is not set -# CONFIG_SND_SOC_MT2701 is not set -# CONFIG_SND_SOC_MT8173 is not set -# CONFIG_SND_SOC_QCOM is not set -# CONFIG_SND_SOC_ROCKCHIP is not set -CONFIG_SND_SOC_SAMSUNG=y -# CONFIG_SND_SAMSUNG_PCM is not set -# CONFIG_SND_SAMSUNG_SPDIF is not set -# CONFIG_SND_SAMSUNG_I2S is not set -# CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994 is not set -# CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF is not set -# CONFIG_SND_SOC_SMDK_WM8994_PCM is not set -# CONFIG_SND_SOC_SNOW is not set -# CONFIG_SND_SOC_ODROID is not set -# CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631 is not set - -# -# SoC Audio support for Renesas SoCs -# -# CONFIG_SND_SOC_SH4_FSI is not set -CONFIG_SND_SOC_RCAR=y - -# -# STMicroelectronics STM32 SOC audio support -# - -# -# Allwinner SoC Audio support -# -# CONFIG_SND_SUN4I_CODEC is not set -# CONFIG_SND_SUN8I_CODEC_ANALOG is not set -# CONFIG_SND_SUN4I_I2S is not set -# CONFIG_SND_SUN4I_SPDIF is not set -# CONFIG_SND_SOC_TEGRA is not set -# CONFIG_SND_SOC_XTFPGA_I2S is not set -# CONFIG_ZX_SPDIF is not set -# CONFIG_ZX_I2S is not set -# CONFIG_ZX_TDM is not set -CONFIG_SND_SOC_I2C_AND_SPI=y - -# -# CODEC drivers -# -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_ADAU1701 is not set -# CONFIG_SND_SOC_ADAU1761_I2C is not set -# CONFIG_SND_SOC_ADAU1761_SPI is not set -# CONFIG_SND_SOC_ADAU7002 is not set -# CONFIG_SND_SOC_AK4104 is not set -# CONFIG_SND_SOC_AK4554 is not set -CONFIG_SND_SOC_AK4613=y -# CONFIG_SND_SOC_AK4642 is not set -# CONFIG_SND_SOC_AK5386 is not set -# CONFIG_SND_SOC_ALC5623 is not set -# CONFIG_SND_SOC_BT_SCO is not set -# CONFIG_SND_SOC_CS35L32 is not set -# CONFIG_SND_SOC_CS35L33 is not set -# CONFIG_SND_SOC_CS35L34 is not set -# CONFIG_SND_SOC_CS35L35 is not set -# CONFIG_SND_SOC_CS42L42 is not set -# CONFIG_SND_SOC_CS42L51_I2C is not set -# CONFIG_SND_SOC_CS42L52 is not set -# CONFIG_SND_SOC_CS42L56 is not set -# CONFIG_SND_SOC_CS42L73 is not set -# CONFIG_SND_SOC_CS4265 is not set -# CONFIG_SND_SOC_CS4270 is not set -# CONFIG_SND_SOC_CS4271_I2C is not set -# CONFIG_SND_SOC_CS4271_SPI is not set -# CONFIG_SND_SOC_CS42XX8_I2C is not set -# CONFIG_SND_SOC_CS43130 is not set -# CONFIG_SND_SOC_CS4349 is not set -# CONFIG_SND_SOC_CS53L30 is not set -# CONFIG_SND_SOC_DIO2125 is not set -CONFIG_SND_SOC_HDMI_CODEC=y -# CONFIG_SND_SOC_ES7134 is not set -# CONFIG_SND_SOC_ES8316 is not set -# CONFIG_SND_SOC_ES8328_I2C is not set -# CONFIG_SND_SOC_ES8328_SPI is not set -# CONFIG_SND_SOC_GTM601 is not set -# CONFIG_SND_SOC_INNO_RK3036 is not set -# CONFIG_SND_SOC_MAX98504 is not set -# CONFIG_SND_SOC_MAX98927 is not set -# CONFIG_SND_SOC_MAX9860 is not set -# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set -# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set -# CONFIG_SND_SOC_PCM1681 is not set -# CONFIG_SND_SOC_PCM179X_I2C is not set -# CONFIG_SND_SOC_PCM179X_SPI is not set -# CONFIG_SND_SOC_PCM3168A_I2C is not set -# CONFIG_SND_SOC_PCM3168A_SPI is not set -# CONFIG_SND_SOC_PCM512x_I2C is not set -# CONFIG_SND_SOC_PCM512x_SPI is not set -# CONFIG_SND_SOC_RT5616 is not set -# CONFIG_SND_SOC_RT5631 is not set -# CONFIG_SND_SOC_RT5677_SPI is not set -# CONFIG_SND_SOC_SGTL5000 is not set -# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set -# CONFIG_SND_SOC_SPDIF is not set -# CONFIG_SND_SOC_SSM2602_SPI is not set -# CONFIG_SND_SOC_SSM2602_I2C is not set -# CONFIG_SND_SOC_SSM4567 is not set -# CONFIG_SND_SOC_STA32X is not set -# CONFIG_SND_SOC_STA350 is not set -# CONFIG_SND_SOC_STI_SAS is not set -# CONFIG_SND_SOC_TAS2552 is not set -# CONFIG_SND_SOC_TAS5086 is not set -# CONFIG_SND_SOC_TAS571X is not set -# CONFIG_SND_SOC_TAS5720 is not set -# CONFIG_SND_SOC_TFA9879 is not set -# CONFIG_SND_SOC_TLV320AIC23_I2C is not set -# CONFIG_SND_SOC_TLV320AIC23_SPI is not set -# CONFIG_SND_SOC_TLV320AIC31XX is not set -# CONFIG_SND_SOC_TLV320AIC3X is not set -# CONFIG_SND_SOC_TS3A227E is not set -# CONFIG_SND_SOC_WM8510 is not set -# CONFIG_SND_SOC_WM8523 is not set -# CONFIG_SND_SOC_WM8524 is not set -# CONFIG_SND_SOC_WM8580 is not set -# CONFIG_SND_SOC_WM8711 is not set -# CONFIG_SND_SOC_WM8728 is not set -# CONFIG_SND_SOC_WM8731 is not set -# CONFIG_SND_SOC_WM8737 is not set -# CONFIG_SND_SOC_WM8741 is not set -# CONFIG_SND_SOC_WM8750 is not set -# CONFIG_SND_SOC_WM8753 is not set -# CONFIG_SND_SOC_WM8770 is not set -# CONFIG_SND_SOC_WM8776 is not set -# CONFIG_SND_SOC_WM8804_I2C is not set -# CONFIG_SND_SOC_WM8804_SPI is not set -# CONFIG_SND_SOC_WM8903 is not set -# CONFIG_SND_SOC_WM8960 is not set -# CONFIG_SND_SOC_WM8962 is not set -# CONFIG_SND_SOC_WM8974 is not set -# CONFIG_SND_SOC_WM8978 is not set -# CONFIG_SND_SOC_WM8985 is not set -# CONFIG_SND_SOC_ZX_AUD96P22 is not set -# CONFIG_SND_SOC_NAU8540 is not set -# CONFIG_SND_SOC_NAU8810 is not set -# CONFIG_SND_SOC_NAU8824 is not set -# CONFIG_SND_SOC_TPA6130A2 is not set -CONFIG_SND_SIMPLE_CARD_UTILS=y -CONFIG_SND_SIMPLE_CARD=y -# CONFIG_SND_SIMPLE_SCU_CARD is not set -CONFIG_SND_AUDIO_GRAPH_CARD=y -# CONFIG_SND_AUDIO_GRAPH_SCU_CARD is not set - -# -# HID support -# -CONFIG_HID=y -# CONFIG_HID_BATTERY_STRENGTH is not set -# CONFIG_HIDRAW is not set -# CONFIG_UHID is not set -CONFIG_HID_GENERIC=y - -# -# Special HID drivers -# -CONFIG_HID_A4TECH=y -# CONFIG_HID_ACCUTOUCH is not set -# CONFIG_HID_ACRUX is not set -CONFIG_HID_APPLE=y -# CONFIG_HID_APPLEIR is not set -# CONFIG_HID_ASUS is not set -# CONFIG_HID_AUREAL is not set -CONFIG_HID_BELKIN=y -# CONFIG_HID_BETOP_FF is not set -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -# CONFIG_HID_CORSAIR is not set -# CONFIG_HID_PRODIKEYS is not set -# CONFIG_HID_CMEDIA is not set -CONFIG_HID_CYPRESS=y -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EMS_FF is not set -# CONFIG_HID_ELECOM is not set -# CONFIG_HID_ELO is not set -CONFIG_HID_EZKEY=y -# CONFIG_HID_GEMBIRD is not set -# CONFIG_HID_GFRM is not set -# CONFIG_HID_HOLTEK is not set -# CONFIG_HID_GT683R is not set -# CONFIG_HID_KEYTOUCH is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_UCLOGIC is not set -# CONFIG_HID_WALTOP is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_ICADE is not set -CONFIG_HID_ITE=y -# CONFIG_HID_TWINHAN is not set -CONFIG_HID_KENSINGTON=y -# CONFIG_HID_LCPOWER is not set -# CONFIG_HID_LED is not set -# CONFIG_HID_LENOVO is not set -CONFIG_HID_LOGITECH=y -# CONFIG_HID_LOGITECH_HIDPP is not set -# CONFIG_LOGITECH_FF is not set -# CONFIG_LOGIRUMBLEPAD2_FF is not set -# CONFIG_LOGIG940_FF is not set -# CONFIG_LOGIWHEELS_FF is not set -# CONFIG_HID_MAGICMOUSE is not set -# CONFIG_HID_MAYFLASH is not set -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -# CONFIG_HID_MULTITOUCH is not set -# CONFIG_HID_NTI is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_ORTEK is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PENMOUNT is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_PICOLCD is not set -# CONFIG_HID_PLANTRONICS is not set -# CONFIG_HID_PRIMAX is not set -# CONFIG_HID_RETRODE is not set -# CONFIG_HID_ROCCAT is not set -# CONFIG_HID_SAITEK is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SPEEDLINK is not set -# CONFIG_HID_STEELSERIES is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_RMI is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TIVO is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THINGM is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_UDRAW_PS3 is not set -# CONFIG_HID_WACOM is not set -# CONFIG_HID_WIIMOTE is not set -# CONFIG_HID_XINMO is not set -# CONFIG_HID_ZEROPLUS is not set -# CONFIG_HID_ZYDACRON is not set -# CONFIG_HID_SENSOR_HUB is not set -# CONFIG_HID_ALPS is not set - -# -# USB HID support -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# I2C HID support -# -# CONFIG_I2C_HID is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_COMMON=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB=y -CONFIG_USB_PCI=y -# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEFAULT_PERSIST=y -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_OTG_FSM is not set -# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -CONFIG_USB_XHCI_HCD=y -# CONFIG_USB_XHCI_DBGCAP is not set -CONFIG_USB_XHCI_PCI=y -CONFIG_USB_XHCI_PLATFORM=y -# CONFIG_USB_XHCI_MTK is not set -# CONFIG_USB_XHCI_MVEBU is not set -CONFIG_USB_XHCI_RCAR=y -CONFIG_USB_XHCI_TEGRA=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_EHCI_PCI=y -CONFIG_USB_EHCI_HCD_ORION=y -# CONFIG_USB_EHCI_MSM is not set -# CONFIG_USB_EHCI_TEGRA is not set -CONFIG_USB_EHCI_EXYNOS=y -CONFIG_USB_EHCI_HCD_PLATFORM=y -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -# CONFIG_USB_FOTG210_HCD is not set -# CONFIG_USB_MAX3421_HCD is not set -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_OHCI_HCD_PCI=y -CONFIG_USB_OHCI_EXYNOS=y -CONFIG_USB_OHCI_HCD_PLATFORM=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_RENESAS_USBHS_HCD is not set -# CONFIG_USB_HCD_TEST_MODE is not set -CONFIG_USB_RENESAS_USBHS=y - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_REALTEK is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_STORAGE_ENE_UB6250 is not set -# CONFIG_USB_UAS is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -# CONFIG_USBIP_CORE is not set -# CONFIG_USB_MTU3 is not set -CONFIG_USB_MUSB_HDRC=y -# CONFIG_USB_MUSB_HOST is not set -# CONFIG_USB_MUSB_GADGET is not set -CONFIG_USB_MUSB_DUAL_ROLE=y - -# -# Platform Glue Layer -# -CONFIG_USB_MUSB_SUNXI=y - -# -# MUSB DMA mode -# -# CONFIG_MUSB_PIO_ONLY is not set -CONFIG_USB_DWC3=y -# CONFIG_USB_DWC3_ULPI is not set -# CONFIG_USB_DWC3_HOST is not set -# CONFIG_USB_DWC3_GADGET is not set -CONFIG_USB_DWC3_DUAL_ROLE=y - -# -# Platform Glue Driver Support -# -CONFIG_USB_DWC3_EXYNOS=y -CONFIG_USB_DWC3_PCI=y -CONFIG_USB_DWC3_OF_SIMPLE=y -CONFIG_USB_DWC2=y -# CONFIG_USB_DWC2_HOST is not set - -# -# Gadget/Dual-role mode requires USB Gadget support to be enabled -# -# CONFIG_USB_DWC2_PERIPHERAL is not set -CONFIG_USB_DWC2_DUAL_ROLE=y -# CONFIG_USB_DWC2_PCI is not set -# CONFIG_USB_DWC2_DEBUG is not set -# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_OF=y -CONFIG_USB_CHIPIDEA_PCI=y -CONFIG_USB_CHIPIDEA_UDC=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_CHIPIDEA_ULPI=y -CONFIG_USB_ISP1760=y -CONFIG_USB_ISP1760_HCD=y -CONFIG_USB_ISP1761_UDC=y -# CONFIG_USB_ISP1760_HOST_ROLE is not set -# CONFIG_USB_ISP1760_GADGET_ROLE is not set -CONFIG_USB_ISP1760_DUAL_ROLE=y - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_EHSET_TEST_FIXTURE is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_YUREX is not set -# CONFIG_USB_EZUSB_FX2 is not set -# CONFIG_USB_HUB_USB251XB is not set -CONFIG_USB_HSIC_USB3503=y -# CONFIG_USB_HSIC_USB4604 is not set -# CONFIG_USB_LINK_LAYER_TEST is not set -# CONFIG_USB_CHAOSKEY is not set - -# -# USB Physical Layer drivers -# -CONFIG_USB_PHY=y -CONFIG_NOP_USB_XCEIV=y -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_USB_ISP1301 is not set -# CONFIG_USB_MSM_OTG is not set -# CONFIG_USB_QCOM_8X16_PHY is not set -CONFIG_USB_ULPI=y -CONFIG_USB_ULPI_VIEWPORT=y -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -# CONFIG_USB_GADGET_DEBUG_FS is not set -CONFIG_USB_GADGET_VBUS_DRAW=2 -CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 - -# -# USB Peripheral Controller -# -# CONFIG_USB_FOTG210_UDC is not set -# CONFIG_USB_GR_UDC is not set -# CONFIG_USB_R8A66597 is not set -CONFIG_USB_RENESAS_USBHS_UDC=y -CONFIG_USB_RENESAS_USB3=m -# CONFIG_USB_PXA27X is not set -# CONFIG_USB_MV_UDC is not set -# CONFIG_USB_MV_U3D is not set -CONFIG_USB_SNP_CORE=y -CONFIG_USB_SNP_UDC_PLAT=y -# CONFIG_USB_M66592 is not set -CONFIG_USB_BDC_UDC=y - -# -# Platform Support -# -CONFIG_USB_BDC_PCI=y -# CONFIG_USB_AMD5536UDC is not set -# CONFIG_USB_NET2272 is not set -# CONFIG_USB_NET2280 is not set -# CONFIG_USB_GOKU is not set -# CONFIG_USB_EG20T is not set -# CONFIG_USB_GADGET_XILINX is not set -# CONFIG_USB_DUMMY_HCD is not set -# CONFIG_USB_CONFIGFS is not set - -# -# USB Power Delivery and Type-C drivers -# -# CONFIG_TYPEC_UCSI is not set -# CONFIG_USB_LED_TRIG is not set -CONFIG_USB_ULPI_BUS=y -CONFIG_USB_ROLE_SWITCH=m -# CONFIG_UWB is not set -CONFIG_MMC=y -CONFIG_PWRSEQ_EMMC=y -CONFIG_PWRSEQ_SIMPLE=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_MINORS=32 -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_ARMMMCI=y -CONFIG_MMC_QCOM_DML=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_IO_ACCESSORS=y -# CONFIG_MMC_SDHCI_PCI is not set -CONFIG_MMC_SDHCI_ACPI=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SDHCI_OF_ARASAN=y -# CONFIG_MMC_SDHCI_OF_AT91 is not set -CONFIG_MMC_SDHCI_OF_ESDHC=y -CONFIG_MMC_SDHCI_CADENCE=y -CONFIG_MMC_SDHCI_TEGRA=y -# CONFIG_MMC_SDHCI_PXAV3 is not set -CONFIG_MMC_SDHCI_F_SDH30=y -CONFIG_MMC_SDHCI_IPROC=y -CONFIG_MMC_MESON_GX=y -CONFIG_MMC_SDHCI_MSM=y -# CONFIG_MMC_TIFM_SD is not set -CONFIG_MMC_SPI=y -CONFIG_MMC_TMIO_CORE=y -CONFIG_MMC_SDHI=y -# CONFIG_MMC_SDHI_SYS_DMAC is not set -CONFIG_MMC_SDHI_INTERNAL_DMAC=y -# CONFIG_MMC_SDHI_PIO is not set -# CONFIG_MMC_CB710 is not set -# CONFIG_MMC_VIA_SDMMC is not set -# CONFIG_MMC_CAVIUM_THUNDERX is not set -CONFIG_MMC_DW=y -CONFIG_MMC_DW_PLTFM=y -CONFIG_MMC_DW_EXYNOS=y -CONFIG_MMC_DW_K3=y -# CONFIG_MMC_DW_PCI is not set -CONFIG_MMC_DW_ROCKCHIP=y -# CONFIG_MMC_DW_ZX is not set -# CONFIG_MMC_SH_MMCIF is not set -# CONFIG_MMC_VUB300 is not set -# CONFIG_MMC_USHC is not set -# CONFIG_MMC_USDHI6ROL0 is not set -CONFIG_MMC_SUNXI=y -# CONFIG_MMC_TOSHIBA_PCI is not set -CONFIG_MMC_BCM2835=y -# CONFIG_MMC_MTK is not set -CONFIG_MMC_SDHCI_BRCMSTB=y -CONFIG_MMC_SDHCI_XENON=y -# CONFIG_MEMSTICK is not set -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -# CONFIG_LEDS_CLASS_FLASH is not set -# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set - -# -# LED drivers -# -# CONFIG_LEDS_BCM6328 is not set -# CONFIG_LEDS_BCM6358 is not set -# CONFIG_LEDS_LM3530 is not set -# CONFIG_LEDS_LM3642 is not set -# CONFIG_LEDS_PCA9532 is not set -CONFIG_LEDS_GPIO=y -# CONFIG_LEDS_LP3944 is not set -# CONFIG_LEDS_LP3952 is not set -# CONFIG_LEDS_LP5521 is not set -# CONFIG_LEDS_LP5523 is not set -# CONFIG_LEDS_LP5562 is not set -# CONFIG_LEDS_LP8501 is not set -# CONFIG_LEDS_LP8860 is not set -# CONFIG_LEDS_PCA955X is not set -# CONFIG_LEDS_PCA963X is not set -# CONFIG_LEDS_DAC124S085 is not set -CONFIG_LEDS_PWM=y -# CONFIG_LEDS_REGULATOR is not set -# CONFIG_LEDS_BD2802 is not set -# CONFIG_LEDS_LT3593 is not set -# CONFIG_LEDS_TCA6507 is not set -# CONFIG_LEDS_TLC591XX is not set -# CONFIG_LEDS_LM355x is not set -# CONFIG_LEDS_IS31FL319X is not set -# CONFIG_LEDS_IS31FL32XX is not set - -# -# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) -# -# CONFIG_LEDS_BLINKM is not set -CONFIG_LEDS_SYSCON=y -# CONFIG_LEDS_USER is not set - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -# CONFIG_LEDS_TRIGGER_TIMER is not set -# CONFIG_LEDS_TRIGGER_ONESHOT is not set -CONFIG_LEDS_TRIGGER_DISK=y -# CONFIG_LEDS_TRIGGER_MTD is not set -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set -CONFIG_LEDS_TRIGGER_CPU=y -# CONFIG_LEDS_TRIGGER_GPIO is not set -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y - -# -# iptables trigger is under Netfilter config (LED target) -# -# CONFIG_LEDS_TRIGGER_TRANSIENT is not set -# CONFIG_LEDS_TRIGGER_CAMERA is not set -CONFIG_LEDS_TRIGGER_PANIC=y -# CONFIG_ACCESSIBILITY is not set -# CONFIG_INFINIBAND is not set -CONFIG_EDAC_SUPPORT=y -CONFIG_EDAC=y -CONFIG_EDAC_LEGACY_SYSFS=y -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_GHES=y -# CONFIG_EDAC_LAYERSCAPE is not set -# CONFIG_EDAC_THUNDERX is not set -# CONFIG_EDAC_XGENE is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -CONFIG_RTC_SYSTOHC=y -CONFIG_RTC_SYSTOHC_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set -CONFIG_RTC_NVMEM=y - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_ABB5ZES3 is not set -# CONFIG_RTC_DRV_ABX80X is not set -CONFIG_RTC_DRV_BRCMSTB=y -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_HYM8563 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -CONFIG_RTC_DRV_MAX77686=y -CONFIG_RTC_DRV_RK808=m -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_ISL12022 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8523 is not set -# CONFIG_RTC_DRV_PCF85063 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_BQ32K is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8010 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set -# CONFIG_RTC_DRV_EM3027 is not set -# CONFIG_RTC_DRV_RV8803 is not set -CONFIG_RTC_DRV_S5M=y - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_M41T93 is not set -# CONFIG_RTC_DRV_M41T94 is not set -# CONFIG_RTC_DRV_DS1302 is not set -# CONFIG_RTC_DRV_DS1305 is not set -# CONFIG_RTC_DRV_DS1343 is not set -# CONFIG_RTC_DRV_DS1347 is not set -# CONFIG_RTC_DRV_DS1390 is not set -# CONFIG_RTC_DRV_MAX6916 is not set -# CONFIG_RTC_DRV_R9701 is not set -# CONFIG_RTC_DRV_RX4581 is not set -# CONFIG_RTC_DRV_RX6110 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_PCF2123 is not set -# CONFIG_RTC_DRV_MCP795 is not set -CONFIG_RTC_I2C_AND_SPI=y - -# -# SPI and I2C RTC drivers -# -CONFIG_RTC_DRV_DS3232=y -CONFIG_RTC_DRV_DS3232_HWMON=y -# CONFIG_RTC_DRV_PCF2127 is not set -# CONFIG_RTC_DRV_RV3029C2 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1685_FAMILY is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_DS2404 is not set -CONFIG_RTC_DRV_EFI=y -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_MSM6242 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_RP5C01 is not set -# CONFIG_RTC_DRV_V3020 is not set -# CONFIG_RTC_DRV_ZYNQMP is not set - -# -# on-CPU RTC drivers -# -CONFIG_HAVE_S3C_RTC=y -CONFIG_RTC_DRV_S3C=y -# CONFIG_RTC_DRV_SH is not set -# CONFIG_RTC_DRV_PL030 is not set -CONFIG_RTC_DRV_PL031=y -CONFIG_RTC_DRV_SUN6I=y -# CONFIG_RTC_DRV_MV is not set -CONFIG_RTC_DRV_ARMADA38X=y -# CONFIG_RTC_DRV_FTRTC010 is not set -# CONFIG_RTC_DRV_PM8XXX is not set -CONFIG_RTC_DRV_TEGRA=y -# CONFIG_RTC_DRV_SNVS is not set -CONFIG_RTC_DRV_XGENE=y -# CONFIG_RTC_DRV_R7301 is not set - -# -# HID Sensor RTC drivers -# -# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set -CONFIG_DMADEVICES=y -# CONFIG_DMADEVICES_DEBUG is not set - -# -# DMA Devices -# -CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_DMA_ACPI=y -CONFIG_DMA_OF=y -# CONFIG_ALTERA_MSGDMA is not set -# CONFIG_AMBA_PL08X is not set -CONFIG_BCM_SBA_RAID=m -CONFIG_DMA_BCM2835=m -# CONFIG_DMA_SUN6I is not set -# CONFIG_FSL_EDMA is not set -# CONFIG_INTEL_IDMA64 is not set -CONFIG_K3_DMA=y -# CONFIG_MV_XOR is not set -CONFIG_MV_XOR_V2=y -CONFIG_PL330_DMA=y -CONFIG_TEGRA20_APB_DMA=y -# CONFIG_TEGRA210_ADMA is not set -# CONFIG_XGENE_DMA is not set -# CONFIG_XILINX_DMA is not set -# CONFIG_XILINX_ZYNQMP_DMA is not set -# CONFIG_ZX_DMA is not set -CONFIG_QCOM_BAM_DMA=y -CONFIG_QCOM_HIDMA_MGMT=y -CONFIG_QCOM_HIDMA=y -# CONFIG_DW_DMAC is not set -# CONFIG_DW_DMAC_PCI is not set -CONFIG_RENESAS_DMA=y -CONFIG_SH_DMAE_BASE=y -# CONFIG_SH_DMAE is not set -CONFIG_RCAR_DMAC=y -CONFIG_RENESAS_USB_DMAC=y -# CONFIG_SUDMAC is not set - -# -# DMA Clients -# -# CONFIG_ASYNC_TX_DMA is not set -# CONFIG_DMATEST is not set -CONFIG_DMA_ENGINE_RAID=y - -# -# DMABUF options -# -CONFIG_SYNC_FILE=y -# CONFIG_SW_SYNC is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set -CONFIG_VFIO_IOMMU_TYPE1=y -CONFIG_VFIO_VIRQFD=y -CONFIG_VFIO=y -# CONFIG_VFIO_NOIOMMU is not set -CONFIG_VFIO_PCI=y -CONFIG_VFIO_PCI_MMAP=y -CONFIG_VFIO_PCI_INTX=y -# CONFIG_VFIO_PLATFORM is not set -# CONFIG_VFIO_MDEV is not set -CONFIG_IRQ_BYPASS_MANAGER=y -# CONFIG_VIRT_DRIVERS is not set -CONFIG_VIRTIO=y - -# -# Virtio drivers -# -CONFIG_VIRTIO_PCI=y -CONFIG_VIRTIO_PCI_LEGACY=y -CONFIG_VIRTIO_BALLOON=y -# CONFIG_VIRTIO_INPUT is not set -CONFIG_VIRTIO_MMIO=y -# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set - -# -# Microsoft Hyper-V guest support -# -# CONFIG_HYPERV_TSCPAGE is not set - -# -# Xen driver support -# -CONFIG_XEN_BALLOON=y -CONFIG_XEN_SCRUB_PAGES=y -CONFIG_XEN_DEV_EVTCHN=y -CONFIG_XEN_BACKEND=y -CONFIG_XENFS=y -CONFIG_XEN_COMPAT_XENFS=y -CONFIG_XEN_SYS_HYPERVISOR=y -CONFIG_XEN_XENBUS_FRONTEND=y -CONFIG_XEN_GNTDEV=y -CONFIG_XEN_GRANT_DEV_ALLOC=y -CONFIG_SWIOTLB_XEN=y -# CONFIG_XEN_PVCALLS_BACKEND is not set -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_EFI=y -CONFIG_XEN_AUTO_XLATE=y -# CONFIG_STAGING is not set -# CONFIG_GOLDFISH is not set -CONFIG_CHROME_PLATFORMS=y -# CONFIG_CROS_EC_CHARDEV is not set -CONFIG_CROS_EC_PROTO=y -# CONFIG_CROS_KBD_LED_BACKLIGHT is not set -CONFIG_CLKDEV_LOOKUP=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# -CONFIG_COMMON_CLK_VERSATILE=y -CONFIG_CLK_SP810=y -CONFIG_CLK_VEXPRESS_OSC=y -# CONFIG_CLK_HSDK is not set -# CONFIG_COMMON_CLK_MAX77686 is not set -CONFIG_COMMON_CLK_RK808=y -# CONFIG_COMMON_CLK_HI655X is not set -CONFIG_COMMON_CLK_SCPI=y -# CONFIG_COMMON_CLK_SI5351 is not set -# CONFIG_COMMON_CLK_SI514 is not set -# CONFIG_COMMON_CLK_SI570 is not set -# CONFIG_COMMON_CLK_CDCE706 is not set -# CONFIG_COMMON_CLK_CDCE925 is not set -CONFIG_COMMON_CLK_CS2000_CP=y -CONFIG_COMMON_CLK_S2MPS11=y -CONFIG_CLK_QORIQ=y -CONFIG_COMMON_CLK_XGENE=y -# CONFIG_COMMON_CLK_NXP is not set -CONFIG_COMMON_CLK_PWM=y -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_PIC32 is not set -CONFIG_COMMON_CLK_VC5=y -CONFIG_COMMON_CLK_IPROC=y -CONFIG_CLK_BCM_NS2=y -CONFIG_CLK_BCM_SR=y -CONFIG_COMMON_CLK_HI3516CV300=y -CONFIG_COMMON_CLK_HI3519=y -CONFIG_COMMON_CLK_HI3660=y -CONFIG_COMMON_CLK_HI3798CV200=y -CONFIG_COMMON_CLK_HI6220=y -CONFIG_RESET_HISI=y -CONFIG_STUB_CLK_HI6220=y -CONFIG_COMMON_CLK_MEDIATEK=y -CONFIG_COMMON_CLK_MT6797=y -# CONFIG_COMMON_CLK_MT6797_MMSYS is not set -# CONFIG_COMMON_CLK_MT6797_IMGSYS is not set -# CONFIG_COMMON_CLK_MT6797_VDECSYS is not set -# CONFIG_COMMON_CLK_MT6797_VENCSYS is not set -CONFIG_COMMON_CLK_MT8173=y -CONFIG_COMMON_CLK_AMLOGIC=y -CONFIG_COMMON_CLK_GXBB=y -CONFIG_ARMADA_37XX_CLK=y -CONFIG_ARMADA_AP806_SYSCON=y -CONFIG_ARMADA_CP110_SYSCON=y -CONFIG_QCOM_GDSC=y -CONFIG_QCOM_RPMCC=y -CONFIG_COMMON_CLK_QCOM=y -CONFIG_QCOM_CLK_SMD_RPM=y -# CONFIG_APQ_GCC_8084 is not set -# CONFIG_APQ_MMCC_8084 is not set -# CONFIG_IPQ_GCC_4019 is not set -# CONFIG_IPQ_GCC_806X is not set -# CONFIG_IPQ_LCC_806X is not set -CONFIG_IPQ_GCC_8074=y -# CONFIG_MSM_GCC_8660 is not set -CONFIG_MSM_GCC_8916=y -# CONFIG_MSM_GCC_8960 is not set -# CONFIG_MSM_LCC_8960 is not set -# CONFIG_MDM_GCC_9615 is not set -# CONFIG_MDM_LCC_9615 is not set -# CONFIG_MSM_MMCC_8960 is not set -# CONFIG_MSM_GCC_8974 is not set -# CONFIG_MSM_MMCC_8974 is not set -CONFIG_MSM_GCC_8994=y -CONFIG_MSM_GCC_8996=y -CONFIG_MSM_MMCC_8996=y -CONFIG_CLK_RENESAS=y -CONFIG_CLK_R8A7795=y -CONFIG_CLK_R8A7796=y -CONFIG_CLK_R8A77965=y -CONFIG_CLK_R8A77970=y -CONFIG_CLK_R8A77980=y -CONFIG_CLK_R8A77990=y -CONFIG_CLK_R8A77995=y -CONFIG_CLK_RCAR_GEN3_CPG=y -# CONFIG_CLK_RCAR_USB2_CLOCK_SEL is not set -CONFIG_CLK_RENESAS_CPG_MSSR=y -CONFIG_CLK_RENESAS_DIV6=y -CONFIG_COMMON_CLK_SAMSUNG=y -CONFIG_EXYNOS_ARM64_COMMON_CLK=y -CONFIG_EXYNOS_AUDSS_CLK_CON=y -CONFIG_SUNXI_CCU=y -CONFIG_SUN50I_A64_CCU=y -# CONFIG_SUN8I_A83T_CCU is not set -CONFIG_SUN8I_H3_CCU=y -# CONFIG_SUN8I_DE2_CCU is not set -CONFIG_SUN8I_R_CCU=y -CONFIG_CLK_TEGRA_BPMP=y -CONFIG_CLK_UNIPHIER=y -CONFIG_HWSPINLOCK=y -CONFIG_HWSPINLOCK_QCOM=y -# CONFIG_HWSPINLOCK_SPRD is not set -CONFIG_HWSPINLOCK_RCAR=y - -# -# Clock Source drivers -# -CONFIG_TIMER_OF=y -CONFIG_TIMER_ACPI=y -CONFIG_TIMER_PROBE=y -CONFIG_CLKSRC_MMIO=y -CONFIG_ROCKCHIP_TIMER=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y -CONFIG_FSL_ERRATUM_A008585=y -CONFIG_HISILICON_ERRATUM_161010101=y -CONFIG_ARM64_ERRATUM_858921=y -CONFIG_ARM_TIMER_SP804=y -# CONFIG_ATMEL_PIT is not set -CONFIG_MTK_TIMER=y -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set -CONFIG_CLKSRC_VERSATILE=y -CONFIG_MAILBOX=y -CONFIG_ARM_MHU=y -CONFIG_PLATFORM_MHU=y -# CONFIG_PL320_MBOX is not set -# CONFIG_ROCKCHIP_MBOX is not set -CONFIG_PCC=y -# CONFIG_ALTERA_MBOX is not set -CONFIG_BCM2835_MBOX=y -CONFIG_HI6220_MBOX=y -# CONFIG_MAILBOX_TEST is not set -CONFIG_QCOM_APCS_IPC=y -CONFIG_TEGRA_HSP_MBOX=y -# CONFIG_XGENE_SLIMPRO_MBOX is not set -# CONFIG_BCM_PDC_MBOX is not set -CONFIG_BCM_FLEXRM_MBOX=y -CONFIG_IOMMU_API=y -CONFIG_IOMMU_SUPPORT=y - -# -# Generic IOMMU Pagetable Support -# -CONFIG_IOMMU_IO_PGTABLE=y -CONFIG_IOMMU_IO_PGTABLE_LPAE=y -# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set -# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set -CONFIG_IOMMU_IOVA=y -CONFIG_OF_IOMMU=y -CONFIG_IOMMU_DMA=y -CONFIG_ROCKCHIP_IOMMU=y -CONFIG_TEGRA_IOMMU_SMMU=y -# CONFIG_EXYNOS_IOMMU is not set -CONFIG_IPMMU_VMSA=y -CONFIG_IPMMU_VMSA_CTX_NUM=8 -CONFIG_IPMMU_VMSA_WHITELIST=y -CONFIG_ARM_SMMU=y -CONFIG_ARM_SMMU_V3=y -# CONFIG_MTK_IOMMU is not set -# CONFIG_QCOM_IOMMU is not set - -# -# Remoteproc drivers -# -# CONFIG_REMOTEPROC is not set - -# -# Rpmsg drivers -# -CONFIG_RPMSG=y -# CONFIG_RPMSG_CHAR is not set -# CONFIG_RPMSG_QCOM_GLINK_RPM is not set -# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set -CONFIG_RPMSG_QCOM_SMD=y - -# -# SOC (System On Chip) specific Drivers -# - -# -# Amlogic SoC drivers -# -CONFIG_MESON_GX_SOCINFO=y - -# -# Broadcom SoC drivers -# -CONFIG_RASPBERRYPI_POWER=y -# CONFIG_SOC_BRCMSTB is not set -CONFIG_FSL_GUTS=y - -# -# i.MX SoC drivers -# -CONFIG_MTK_INFRACFG=y -# CONFIG_MTK_PMIC_WRAP is not set -CONFIG_MTK_SCPSYS=y - -# -# Qualcomm SoC drivers -# -# CONFIG_QCOM_GSBI is not set -CONFIG_QCOM_MDT_LOADER=y -CONFIG_QCOM_SMEM=y -CONFIG_QCOM_SMD_RPM=y -CONFIG_QCOM_SMEM_STATE=y -CONFIG_QCOM_SMP2P=y -CONFIG_QCOM_SMSM=y -# CONFIG_QCOM_WCNSS_CTRL is not set -CONFIG_SOC_RENESAS=y -CONFIG_RCAR_CPU_TOPOLOGY=y -CONFIG_SYSC_R8A7795=y -CONFIG_SYSC_R8A7796=y -CONFIG_SYSC_R8A77965=y -CONFIG_SYSC_R8A77970=y -CONFIG_SYSC_R8A77980=y -CONFIG_SYSC_R8A77990=y -CONFIG_SYSC_R8A77995=y -CONFIG_RST_RCAR=y -CONFIG_SYSC_RCAR=y -CONFIG_RCAR_THERMAL_EMS=y -CONFIG_RCAR_POWER_AVS=y -CONFIG_ROCKCHIP_GRF=y -CONFIG_ROCKCHIP_PM_DOMAINS=y -CONFIG_SOC_SAMSUNG=y -CONFIG_EXYNOS_PMU=y -CONFIG_EXYNOS_PM_DOMAINS=y -CONFIG_SUNXI_SRAM=y -CONFIG_ARCH_TEGRA_132_SOC=y -CONFIG_ARCH_TEGRA_210_SOC=y -CONFIG_ARCH_TEGRA_186_SOC=y -CONFIG_SOC_TEGRA_FUSE=y -CONFIG_SOC_TEGRA_FLOWCTRL=y -CONFIG_SOC_TEGRA_PMC=y -CONFIG_SOC_TEGRA_PMC_TEGRA186=y -CONFIG_SOC_TEGRA_POWERGATE_BPMP=y -# CONFIG_SOC_TI is not set -# CONFIG_SOC_ZTE is not set -CONFIG_PM_DEVFREQ=y - -# -# DEVFREQ Governors -# -CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y -CONFIG_DEVFREQ_GOV_PERFORMANCE=y -CONFIG_DEVFREQ_GOV_POWERSAVE=y -CONFIG_DEVFREQ_GOV_USERSPACE=y -CONFIG_DEVFREQ_GOV_PASSIVE=y - -# -# DEVFREQ Drivers -# -# CONFIG_ARM_EXYNOS_BUS_DEVFREQ is not set -# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set -# CONFIG_PM_DEVFREQ_EVENT is not set -CONFIG_EXTCON=y - -# -# Extcon Device Drivers -# -# CONFIG_EXTCON_ADC_JACK is not set -# CONFIG_EXTCON_AXP288 is not set -# CONFIG_EXTCON_GPIO is not set -# CONFIG_EXTCON_MAX3355 is not set -# CONFIG_EXTCON_QCOM_SPMI_MISC is not set -# CONFIG_EXTCON_RT8973A is not set -# CONFIG_EXTCON_SM5502 is not set -CONFIG_EXTCON_USB_GPIO=y -# CONFIG_EXTCON_USBC_CROS_EC is not set -CONFIG_MEMORY=y -# CONFIG_ARM_PL172_MPMC is not set -CONFIG_TEGRA_MC=y -CONFIG_IIO=y -# CONFIG_IIO_BUFFER is not set -# CONFIG_IIO_CONFIGFS is not set -# CONFIG_IIO_TRIGGER is not set -# CONFIG_IIO_SW_DEVICE is not set -# CONFIG_IIO_SW_TRIGGER is not set - -# -# Accelerometers -# -# CONFIG_ADXL345_I2C is not set -# CONFIG_ADXL345_SPI is not set -# CONFIG_BMA180 is not set -# CONFIG_BMA220 is not set -# CONFIG_BMC150_ACCEL is not set -# CONFIG_DA280 is not set -# CONFIG_DA311 is not set -# CONFIG_DMARD06 is not set -# CONFIG_DMARD09 is not set -# CONFIG_DMARD10 is not set -# CONFIG_IIO_ST_ACCEL_3AXIS is not set -# CONFIG_KXSD9 is not set -# CONFIG_KXCJK1013 is not set -# CONFIG_MC3230 is not set -# CONFIG_MMA7455_I2C is not set -# CONFIG_MMA7455_SPI is not set -# CONFIG_MMA7660 is not set -# CONFIG_MMA8452 is not set -# CONFIG_MMA9551 is not set -# CONFIG_MMA9553 is not set -# CONFIG_MXC4005 is not set -# CONFIG_MXC6255 is not set -# CONFIG_SCA3000 is not set -# CONFIG_STK8312 is not set -# CONFIG_STK8BA50 is not set - -# -# Analog to digital converters -# -# CONFIG_AD7266 is not set -# CONFIG_AD7291 is not set -# CONFIG_AD7298 is not set -# CONFIG_AD7476 is not set -# CONFIG_AD7766 is not set -# CONFIG_AD7791 is not set -# CONFIG_AD7793 is not set -# CONFIG_AD7887 is not set -# CONFIG_AD7923 is not set -# CONFIG_AD799X is not set -# CONFIG_AXP20X_ADC is not set -# CONFIG_AXP288_ADC is not set -# CONFIG_BCM_IPROC_ADC is not set -# CONFIG_BERLIN2_ADC is not set -# CONFIG_CC10001_ADC is not set -# CONFIG_ENVELOPE_DETECTOR is not set -CONFIG_EXYNOS_ADC=y -# CONFIG_HI8435 is not set -# CONFIG_HX711 is not set -# CONFIG_INA2XX_ADC is not set -# CONFIG_LTC2471 is not set -# CONFIG_LTC2485 is not set -# CONFIG_LTC2497 is not set -# CONFIG_MAX1027 is not set -# CONFIG_MAX11100 is not set -# CONFIG_MAX1118 is not set -# CONFIG_MAX1363 is not set -# CONFIG_MAX9611 is not set -# CONFIG_MCP320X is not set -# CONFIG_MCP3422 is not set -# CONFIG_MEDIATEK_MT6577_AUXADC is not set -CONFIG_MESON_SARADC=y -# CONFIG_NAU7802 is not set -# CONFIG_QCOM_SPMI_IADC is not set -# CONFIG_QCOM_SPMI_VADC is not set -CONFIG_ROCKCHIP_SARADC=m -# CONFIG_TI_ADC081C is not set -# CONFIG_TI_ADC0832 is not set -# CONFIG_TI_ADC084S021 is not set -# CONFIG_TI_ADC12138 is not set -# CONFIG_TI_ADC108S102 is not set -# CONFIG_TI_ADC128S052 is not set -# CONFIG_TI_ADC161S626 is not set -# CONFIG_TI_ADS1015 is not set -# CONFIG_TI_ADS7950 is not set -# CONFIG_TI_ADS8688 is not set -# CONFIG_TI_TLC4541 is not set -# CONFIG_VF610_ADC is not set - -# -# Amplifiers -# -# CONFIG_AD8366 is not set - -# -# Chemical Sensors -# -# CONFIG_ATLAS_PH_SENSOR is not set -# CONFIG_CCS811 is not set -# CONFIG_IAQCORE is not set -# CONFIG_VZ89X is not set -# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set - -# -# Hid Sensor IIO Common -# - -# -# SSP Sensor Common -# -# CONFIG_IIO_SSP_SENSORHUB is not set - -# -# Counters -# - -# -# Digital to analog converters -# -# CONFIG_AD5064 is not set -# CONFIG_AD5360 is not set -# CONFIG_AD5380 is not set -# CONFIG_AD5421 is not set -# CONFIG_AD5446 is not set -# CONFIG_AD5449 is not set -# CONFIG_AD5592R is not set -# CONFIG_AD5593R is not set -# CONFIG_AD5504 is not set -# CONFIG_AD5624R_SPI is not set -# CONFIG_LTC2632 is not set -# CONFIG_AD5686 is not set -# CONFIG_AD5755 is not set -# CONFIG_AD5761 is not set -# CONFIG_AD5764 is not set -# CONFIG_AD5791 is not set -# CONFIG_AD7303 is not set -# CONFIG_AD8801 is not set -# CONFIG_DPOT_DAC is not set -# CONFIG_M62332 is not set -# CONFIG_MAX517 is not set -# CONFIG_MAX5821 is not set -# CONFIG_MCP4725 is not set -# CONFIG_MCP4922 is not set -# CONFIG_VF610_DAC is not set - -# -# IIO dummy driver -# - -# -# Frequency Synthesizers DDS/PLL -# - -# -# Clock Generator/Distribution -# -# CONFIG_AD9523 is not set - -# -# Phase-Locked Loop (PLL) frequency synthesizers -# -# CONFIG_ADF4350 is not set - -# -# Digital gyroscope sensors -# -# CONFIG_ADIS16080 is not set -# CONFIG_ADIS16130 is not set -# CONFIG_ADIS16136 is not set -# CONFIG_ADIS16260 is not set -# CONFIG_ADXRS450 is not set -# CONFIG_BMG160 is not set -# CONFIG_MPU3050_I2C is not set -# CONFIG_IIO_ST_GYRO_3AXIS is not set -# CONFIG_ITG3200 is not set - -# -# Health Sensors -# - -# -# Heart Rate Monitors -# -# CONFIG_AFE4403 is not set -# CONFIG_AFE4404 is not set -# CONFIG_MAX30100 is not set -# CONFIG_MAX30102 is not set - -# -# Humidity sensors -# -# CONFIG_AM2315 is not set -# CONFIG_DHT11 is not set -# CONFIG_HDC100X is not set -# CONFIG_HTS221 is not set -# CONFIG_HTU21 is not set -# CONFIG_SI7005 is not set -# CONFIG_SI7020 is not set - -# -# Inertial measurement units -# -# CONFIG_ADIS16400 is not set -# CONFIG_ADIS16480 is not set -# CONFIG_BMI160_I2C is not set -# CONFIG_BMI160_SPI is not set -# CONFIG_KMX61 is not set -# CONFIG_INV_MPU6050_I2C is not set -# CONFIG_INV_MPU6050_SPI is not set -# CONFIG_IIO_ST_LSM6DSX is not set - -# -# Light sensors -# -# CONFIG_ACPI_ALS is not set -# CONFIG_ADJD_S311 is not set -# CONFIG_AL3320A is not set -# CONFIG_APDS9300 is not set -# CONFIG_APDS9960 is not set -# CONFIG_BH1750 is not set -# CONFIG_BH1780 is not set -# CONFIG_CM32181 is not set -# CONFIG_CM3232 is not set -# CONFIG_CM3323 is not set -# CONFIG_CM3605 is not set -# CONFIG_CM36651 is not set -# CONFIG_GP2AP020A00F is not set -# CONFIG_SENSORS_ISL29018 is not set -# CONFIG_SENSORS_ISL29028 is not set -# CONFIG_ISL29125 is not set -# CONFIG_JSA1212 is not set -# CONFIG_RPR0521 is not set -# CONFIG_LTR501 is not set -# CONFIG_MAX44000 is not set -# CONFIG_OPT3001 is not set -# CONFIG_PA12203001 is not set -# CONFIG_SI1145 is not set -# CONFIG_STK3310 is not set -# CONFIG_TCS3414 is not set -# CONFIG_TCS3472 is not set -# CONFIG_SENSORS_TSL2563 is not set -# CONFIG_TSL2583 is not set -# CONFIG_TSL4531 is not set -# CONFIG_US5182D is not set -# CONFIG_VCNL4000 is not set -# CONFIG_VEML6070 is not set -# CONFIG_VL6180 is not set - -# -# Magnetometer sensors -# -# CONFIG_AK8974 is not set -# CONFIG_AK8975 is not set -# CONFIG_AK09911 is not set -# CONFIG_BMC150_MAGN_I2C is not set -# CONFIG_BMC150_MAGN_SPI is not set -# CONFIG_MAG3110 is not set -# CONFIG_MMC35240 is not set -# CONFIG_IIO_ST_MAGN_3AXIS is not set -# CONFIG_SENSORS_HMC5843_I2C is not set -# CONFIG_SENSORS_HMC5843_SPI is not set - -# -# Multiplexers -# -# CONFIG_IIO_MUX is not set - -# -# Inclinometer sensors -# - -# -# Digital potentiometers -# -# CONFIG_DS1803 is not set -# CONFIG_MAX5481 is not set -# CONFIG_MAX5487 is not set -# CONFIG_MCP4131 is not set -# CONFIG_MCP4531 is not set -# CONFIG_TPL0102 is not set - -# -# Digital potentiostats -# -# CONFIG_LMP91000 is not set - -# -# Pressure sensors -# -# CONFIG_ABP060MG is not set -# CONFIG_BMP280 is not set -# CONFIG_HP03 is not set -# CONFIG_MPL115_I2C is not set -# CONFIG_MPL115_SPI is not set -# CONFIG_MPL3115 is not set -# CONFIG_MS5611 is not set -# CONFIG_MS5637 is not set -# CONFIG_IIO_ST_PRESS is not set -# CONFIG_T5403 is not set -# CONFIG_HP206C is not set -# CONFIG_ZPA2326 is not set - -# -# Lightning sensors -# -# CONFIG_AS3935 is not set - -# -# Proximity and distance sensors -# -# CONFIG_LIDAR_LITE_V2 is not set -# CONFIG_SRF04 is not set -# CONFIG_SX9500 is not set -# CONFIG_SRF08 is not set - -# -# Temperature sensors -# -# CONFIG_MAXIM_THERMOCOUPLE is not set -# CONFIG_MLX90614 is not set -# CONFIG_TMP006 is not set -# CONFIG_TMP007 is not set -# CONFIG_TSYS01 is not set -# CONFIG_TSYS02D is not set -# CONFIG_NTB is not set -# CONFIG_VME_BUS is not set -CONFIG_PWM=y -CONFIG_PWM_SYSFS=y -CONFIG_PWM_BCM_IPROC=y -CONFIG_PWM_BCM2835=m -# CONFIG_PWM_BERLIN is not set -# CONFIG_PWM_BRCMSTB is not set -CONFIG_PWM_CROS_EC=m -# CONFIG_PWM_FSL_FTM is not set -# CONFIG_PWM_HIBVT is not set -CONFIG_PWM_MESON=m -# CONFIG_PWM_MTK_DISP is not set -# CONFIG_PWM_MEDIATEK is not set -# CONFIG_PWM_PCA9685 is not set -CONFIG_PWM_RCAR=y -# CONFIG_PWM_RENESAS_TPU is not set -CONFIG_PWM_ROCKCHIP=y -CONFIG_PWM_SAMSUNG=y -# CONFIG_PWM_SUN4I is not set -CONFIG_PWM_TEGRA=m -# CONFIG_PWM_ZX is not set -CONFIG_IRQCHIP=y -CONFIG_ARM_GIC=y -CONFIG_ARM_GIC_MAX_NR=1 -CONFIG_ARM_GIC_V2M=y -CONFIG_ARM_GIC_V3=y -CONFIG_ARM_GIC_V3_ITS=y -CONFIG_ALPINE_MSI=y -CONFIG_BRCMSTB_L2_IRQ=y -CONFIG_DW_APB_ICTL=y -CONFIG_HISILICON_IRQ_MBIGEN=y -CONFIG_RENESAS_IRQC=y -CONFIG_MVEBU_GICP=y -CONFIG_MVEBU_ICU=y -CONFIG_MVEBU_ODMI=y -CONFIG_MVEBU_PIC=y -CONFIG_LS_SCFG_MSI=y -CONFIG_PARTITION_PERCPU=y -CONFIG_QCOM_IRQ_COMBINER=y -CONFIG_IRQ_UNIPHIER_AIDET=y -# CONFIG_IPACK_BUS is not set -CONFIG_ARCH_HAS_RESET_CONTROLLER=y -CONFIG_RESET_CONTROLLER=y -# CONFIG_RESET_ATH79 is not set -CONFIG_RESET_BERLIN=y -# CONFIG_RESET_IMX7 is not set -# CONFIG_RESET_LANTIQ is not set -# CONFIG_RESET_LPC18XX is not set -CONFIG_RESET_MESON=y -# CONFIG_RESET_PISTACHIO is not set -CONFIG_RESET_SOCFPGA=y -# CONFIG_RESET_STM32 is not set -CONFIG_RESET_SUNXI=y -# CONFIG_RESET_TI_SYSCON is not set -CONFIG_RESET_UNIPHIER=y -# CONFIG_RESET_ZX2967 is not set -# CONFIG_RESET_ZYNQ is not set -CONFIG_COMMON_RESET_HI3660=y -CONFIG_COMMON_RESET_HI6220=y -CONFIG_RESET_TEGRA_BPMP=y -# CONFIG_FMC is not set - -# -# PHY Subsystem -# -CONFIG_GENERIC_PHY=y -CONFIG_PHY_XGENE=y -CONFIG_PHY_SUN4I_USB=y -# CONFIG_PHY_SUN9I_USB is not set -CONFIG_PHY_MESON8B_USB2=y -CONFIG_PHY_MESON_GXL_USB2=y -# CONFIG_BCM_KONA_USB2_PHY is not set -# CONFIG_PHY_BCM_NS_USB2 is not set -# CONFIG_PHY_BCM_NS_USB3 is not set -CONFIG_PHY_NS2_PCIE=y -CONFIG_PHY_NS2_USB_DRD=y -CONFIG_PHY_BRCM_SATA=y -CONFIG_PHY_HI6220_USB=y -# CONFIG_PHY_BERLIN_SATA is not set -# CONFIG_PHY_BERLIN_USB is not set -CONFIG_PHY_MVEBU_CP110_COMPHY=y -# CONFIG_PHY_PXA_28NM_HSIC is not set -# CONFIG_PHY_PXA_28NM_USB2 is not set -# CONFIG_PHY_MTK_TPHY is not set -# CONFIG_PHY_CPCAP_USB is not set -# CONFIG_PHY_QCOM_APQ8064_SATA is not set -# CONFIG_PHY_QCOM_IPQ806X_SATA is not set -# CONFIG_PHY_QCOM_QMP is not set -# CONFIG_PHY_QCOM_QUSB2 is not set -# CONFIG_PHY_QCOM_UFS is not set -CONFIG_PHY_QCOM_USB_HS=y -# CONFIG_PHY_QCOM_USB_HSIC is not set -# CONFIG_PHY_RCAR_GEN2 is not set -CONFIG_PHY_RCAR_GEN3_USB2=y -CONFIG_PHY_RCAR_GEN3_USB3=y -# CONFIG_PHY_ROCKCHIP_DP is not set -CONFIG_PHY_ROCKCHIP_EMMC=y -CONFIG_PHY_ROCKCHIP_INNO_USB2=y -CONFIG_PHY_ROCKCHIP_PCIE=m -# CONFIG_PHY_ROCKCHIP_TYPEC is not set -# CONFIG_PHY_ROCKCHIP_USB is not set -CONFIG_PHY_EXYNOS_DP_VIDEO=y -CONFIG_PHY_EXYNOS_MIPI_VIDEO=y -# CONFIG_PHY_EXYNOS_PCIE is not set -CONFIG_PHY_SAMSUNG_USB2=y -# CONFIG_PHY_EXYNOS4210_USB2 is not set -# CONFIG_PHY_EXYNOS4X12_USB2 is not set -# CONFIG_PHY_EXYNOS5250_USB2 is not set -CONFIG_PHY_EXYNOS5_USBDRD=y -CONFIG_PHY_TEGRA_XUSB=y -# CONFIG_PHY_TUSB1210 is not set -# CONFIG_POWERCAP is not set -# CONFIG_MCB is not set - -# -# Performance monitor support -# -CONFIG_ARM_PMU=y -CONFIG_ARM_PMU_ACPI=y -CONFIG_QCOM_L2_PMU=y -CONFIG_QCOM_L3_PMU=y -# CONFIG_XGENE_PMU is not set -CONFIG_RAS=y - -# -# Android -# -# CONFIG_ANDROID is not set -# CONFIG_LIBNVDIMM is not set -# CONFIG_DAX is not set -CONFIG_NVMEM=y -# CONFIG_MTK_EFUSE is not set -CONFIG_QCOM_QFPROM=y -# CONFIG_ROCKCHIP_EFUSE is not set -CONFIG_NVMEM_BCM_OCOTP=y -# CONFIG_NVMEM_SUNXI_SID is not set -CONFIG_MESON_EFUSE=m -# CONFIG_STM is not set -# CONFIG_INTEL_TH is not set -# CONFIG_FPGA is not set - -# -# FSI support -# -# CONFIG_FSI is not set -CONFIG_TEE=y - -# -# TEE drivers -# -CONFIG_OPTEE=y - -# -# Firmware Drivers -# -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_PSCI_CHECKER is not set -CONFIG_ARM_SCPI_PROTOCOL=y -CONFIG_ARM_SCPI_POWER_DOMAIN=y -# CONFIG_FIRMWARE_MEMMAP is not set -CONFIG_DMIID=y -# CONFIG_DMI_SYSFS is not set -CONFIG_RASPBERRYPI_FIRMWARE=y -# CONFIG_FW_CFG_SYSFS is not set -CONFIG_QCOM_SCM=y -CONFIG_QCOM_SCM_64=y -CONFIG_HAVE_ARM_SMCCC=y -# CONFIG_GOOGLE_FIRMWARE is not set - -# -# EFI (Extensible Firmware Interface) Support -# -# CONFIG_EFI_VARS is not set -CONFIG_EFI_ESRT=y -CONFIG_EFI_PARAMS_FROM_FDT=y -CONFIG_EFI_RUNTIME_WRAPPERS=y -CONFIG_EFI_ARMSTUB=y -CONFIG_EFI_CAPSULE_LOADER=y -# CONFIG_EFI_TEST is not set -# CONFIG_RESET_ATTACK_MITIGATION is not set -CONFIG_UEFI_CPER=y -# CONFIG_EFI_DEV_PATH_PARSER is not set -CONFIG_MESON_SM=y - -# -# Tegra firmware driver -# -CONFIG_TEGRA_IVC=y -CONFIG_TEGRA_BPMP=y -CONFIG_ACPI=y -CONFIG_ACPI_GENERIC_GSI=y -CONFIG_ACPI_CCA_REQUIRED=y -# CONFIG_ACPI_DEBUGGER is not set -CONFIG_ACPI_SPCR_TABLE=y -# CONFIG_ACPI_EC_DEBUGFS is not set -CONFIG_ACPI_BUTTON=y -CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set -CONFIG_ACPI_PROCESSOR_IDLE=y -CONFIG_ACPI_MCFG=y -CONFIG_ACPI_CPPC_LIB=y -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_NUMA=y -# CONFIG_ACPI_CUSTOM_DSDT is not set -CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y -CONFIG_ACPI_TABLE_UPGRADE=y -# CONFIG_ACPI_DEBUG is not set -# CONFIG_ACPI_PCI_SLOT is not set -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HED=y -# CONFIG_ACPI_CUSTOM_METHOD is not set -# CONFIG_ACPI_BGRT is not set -CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y -CONFIG_HAVE_ACPI_APEI=y -CONFIG_ACPI_APEI=y -CONFIG_ACPI_APEI_GHES=y -CONFIG_ACPI_APEI_PCIEAER=y -CONFIG_ACPI_APEI_SEA=y -CONFIG_ACPI_APEI_MEMORY_FAILURE=y -CONFIG_ACPI_APEI_EINJ=y -# CONFIG_ACPI_APEI_ERST_DEBUG is not set -# CONFIG_PMIC_OPREGION is not set -# CONFIG_ACPI_CONFIGFS is not set -CONFIG_ACPI_IORT=y -CONFIG_ACPI_GTDT=y - -# -# File systems -# -CONFIG_DCACHE_WORD_ACCESS=y -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -# CONFIG_EXT4_FS_SECURITY is not set -# CONFIG_EXT4_ENCRYPTION is not set -# CONFIG_EXT4_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -CONFIG_BTRFS_FS=m -CONFIG_BTRFS_FS_POSIX_ACL=y -# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set -# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set -# CONFIG_BTRFS_DEBUG is not set -# CONFIG_BTRFS_ASSERT is not set -# CONFIG_NILFS2_FS is not set -# CONFIG_F2FS_FS is not set -# CONFIG_FS_DAX is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=y -# CONFIG_EXPORTFS_BLOCK_OPS is not set -CONFIG_FILE_LOCKING=y -CONFIG_MANDATORY_FILE_LOCKING=y -# CONFIG_FS_ENCRYPTION is not set -CONFIG_FSNOTIFY=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_FANOTIFY=y -CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y -CONFIG_QUOTA=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_PRINT_QUOTA_WARNING=y -# CONFIG_QUOTA_DEBUG is not set -# CONFIG_QFMT_V1 is not set -# CONFIG_QFMT_V2 is not set -CONFIG_QUOTACTL=y -CONFIG_AUTOFS4_FS=y -CONFIG_FUSE_FS=m -CONFIG_CUSE=m -CONFIG_OVERLAY_FS=m -# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set -# CONFIG_OVERLAY_FS_INDEX is not set - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -# CONFIG_MSDOS_FS is not set -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_FAT_DEFAULT_UTF8 is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_PROC_VMCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -# CONFIG_PROC_CHILDREN is not set -CONFIG_KERNFS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_TMPFS_XATTR is not set -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_ARCH_HAS_GIGANTIC_PAGE=y -CONFIG_CONFIGFS_FS=y -CONFIG_EFIVAR_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ORANGEFS_FS is not set -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_ECRYPT_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_FILE_CACHE=y -# CONFIG_SQUASHFS_FILE_DIRECT is not set -CONFIG_SQUASHFS_DECOMP_SINGLE=y -# CONFIG_SQUASHFS_DECOMP_MULTI is not set -# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set -# CONFIG_SQUASHFS_XATTR is not set -CONFIG_SQUASHFS_ZLIB=y -# CONFIG_SQUASHFS_LZ4 is not set -# CONFIG_SQUASHFS_LZO is not set -# CONFIG_SQUASHFS_XZ is not set -# CONFIG_SQUASHFS_ZSTD is not set -# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX6FS_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_PSTORE=y -CONFIG_PSTORE_ZLIB_COMPRESS=y -# CONFIG_PSTORE_LZO_COMPRESS is not set -# CONFIG_PSTORE_LZ4_COMPRESS is not set -# CONFIG_PSTORE_CONSOLE is not set -# CONFIG_PSTORE_PMSG is not set -# CONFIG_PSTORE_RAM is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V2=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_SWAP is not set -CONFIG_NFS_V4_1=y -CONFIG_NFS_V4_2=y -CONFIG_PNFS_FILE_LAYOUT=y -CONFIG_PNFS_FLEXFILE_LAYOUT=m -CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" -# CONFIG_NFS_V4_1_MIGRATION is not set -CONFIG_NFS_V4_SECURITY_LABEL=y -CONFIG_ROOT_NFS=y -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_USE_KERNEL_DNS=y -# CONFIG_NFSD is not set -CONFIG_GRACE_PERIOD=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_SUNRPC_BACKCHANNEL=y -# CONFIG_SUNRPC_DEBUG is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=y -# CONFIG_9P_FS_POSIX_ACL is not set -# CONFIG_9P_FS_SECURITY is not set -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_MAC_ROMAN is not set -# CONFIG_NLS_MAC_CELTIC is not set -# CONFIG_NLS_MAC_CENTEURO is not set -# CONFIG_NLS_MAC_CROATIAN is not set -# CONFIG_NLS_MAC_CYRILLIC is not set -# CONFIG_NLS_MAC_GAELIC is not set -# CONFIG_NLS_MAC_GREEK is not set -# CONFIG_NLS_MAC_ICELAND is not set -# CONFIG_NLS_MAC_INUIT is not set -# CONFIG_NLS_MAC_ROMANIAN is not set -# CONFIG_NLS_MAC_TURKISH is not set -# CONFIG_NLS_UTF8 is not set -# CONFIG_DLM is not set -CONFIG_HAVE_KVM_IRQCHIP=y -CONFIG_HAVE_KVM_IRQFD=y -CONFIG_HAVE_KVM_IRQ_ROUTING=y -CONFIG_HAVE_KVM_EVENTFD=y -CONFIG_KVM_MMIO=y -CONFIG_HAVE_KVM_MSI=y -CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y -CONFIG_KVM_VFIO=y -CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y -CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y -CONFIG_KVM_COMPAT=y -CONFIG_VIRTUALIZATION=y -CONFIG_KVM=y -CONFIG_KVM_ARM_HOST=y -CONFIG_KVM_ARM_PMU=y -# CONFIG_VHOST_NET is not set -# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set - -# -# Kernel hacking -# - -# -# printk and dmesg options -# -CONFIG_PRINTK_TIME=y -CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_BOOT_PRINTK_DELAY is not set -# CONFIG_DYNAMIC_DEBUG is not set - -# -# Compile-time checks and compiler options -# -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_INFO_REDUCED is not set -# CONFIG_DEBUG_INFO_SPLIT is not set -# CONFIG_DEBUG_INFO_DWARF4 is not set -# CONFIG_GDB_SCRIPTS is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=2048 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_PAGE_OWNER is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -CONFIG_MAGIC_SYSRQ_SERIAL=y -CONFIG_DEBUG_KERNEL=y - -# -# Memory Debugging -# -# CONFIG_PAGE_EXTENSION is not set -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_PAGE_POISONING is not set -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_VM is not set -CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -# CONFIG_DEBUG_VIRTUAL is not set -CONFIG_DEBUG_MEMORY_INIT=y -# CONFIG_DEBUG_PER_CPU_MAPS is not set -CONFIG_HAVE_ARCH_KASAN=y -# CONFIG_KASAN is not set -CONFIG_ARCH_HAS_KCOV=y -# CONFIG_KCOV is not set -# CONFIG_DEBUG_SHIRQ is not set - -# -# Debug Lockups and Hangs -# -# CONFIG_SOFTLOCKUP_DETECTOR is not set -# CONFIG_DETECT_HUNG_TASK is not set -# CONFIG_WQ_WATCHDOG is not set -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -# CONFIG_SCHED_DEBUG is not set -CONFIG_SCHED_INFO=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_SCHED_STACK_END_CHECK is not set -# CONFIG_DEBUG_TIMEKEEPING is not set -# CONFIG_DEBUG_PREEMPT is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_LOCK_TORTURE_TEST is not set -# CONFIG_WW_MUTEX_SELFTEST is not set -# CONFIG_STACKTRACE is not set -# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_PI_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set - -# -# RCU Debugging -# -# CONFIG_PROVE_RCU is not set -# CONFIG_TORTURE_TEST is not set -# CONFIG_RCU_PERF_TEST is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -# CONFIG_RCU_TRACE is not set -# CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_LATENCYTOP is not set -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set -# CONFIG_DMA_API_DEBUG is not set - -# -# Runtime Testing -# -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_TEST_SORT is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_RBTREE_TEST is not set -# CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_PERCPU_TEST is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_TEST_HEXDUMP is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_BITMAP is not set -# CONFIG_TEST_UUID is not set -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_TEST_HASH is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_TEST_FIRMWARE is not set -# CONFIG_TEST_SYSCTL is not set -# CONFIG_TEST_UDELAY is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_TEST_KMOD is not set -CONFIG_MEMTEST=y -# CONFIG_BUG_ON_DATA_CORRUPTION is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y -# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set -# CONFIG_UBSAN is not set -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM64_PTDUMP_CORE is not set -# CONFIG_ARM64_PTDUMP_DEBUGFS is not set -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set -# CONFIG_DEBUG_WX is not set -# CONFIG_DEBUG_ALIGN_RODATA is not set -# CONFIG_DEBUG_EFI is not set -# CONFIG_ARM64_RELOC_TEST is not set -# CONFIG_CORESIGHT is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_COMPAT=y -# CONFIG_PERSISTENT_KEYRINGS is not set -# CONFIG_BIG_KEYS is not set -# CONFIG_ENCRYPTED_KEYS is not set -# CONFIG_KEY_DH_OPERATIONS is not set -# CONFIG_SECURITY_DMESG_RESTRICT is not set -CONFIG_SECURITY=y -# CONFIG_SECURITY_WRITABLE_HOOKS is not set -# CONFIG_SECURITYFS is not set -# CONFIG_SECURITY_NETWORK is not set -# CONFIG_SECURITY_PATH is not set -CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y -# CONFIG_HARDENED_USERCOPY is not set -# CONFIG_FORTIFY_SOURCE is not set -# CONFIG_STATIC_USERMODEHELPER is not set -# CONFIG_SECURITY_SMACK is not set -# CONFIG_SECURITY_TOMOYO is not set -# CONFIG_SECURITY_APPARMOR is not set -# CONFIG_SECURITY_LOADPIN is not set -# CONFIG_SECURITY_YAMA is not set -CONFIG_INTEGRITY=y -# CONFIG_INTEGRITY_SIGNATURE is not set -CONFIG_INTEGRITY_AUDIT=y -# CONFIG_IMA is not set -# CONFIG_EVM is not set -CONFIG_DEFAULT_SECURITY_DAC=y -CONFIG_DEFAULT_SECURITY="" -CONFIG_XOR_BLOCKS=m -CONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=y -CONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=y -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_AKCIPHER2=y -CONFIG_CRYPTO_KPP2=y -CONFIG_CRYPTO_KPP=m -CONFIG_CRYPTO_ACOMP2=y -# CONFIG_CRYPTO_RSA is not set -# CONFIG_CRYPTO_DH is not set -CONFIG_CRYPTO_ECDH=m -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y -CONFIG_CRYPTO_GF128MUL=y -CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_NULL2=y -# CONFIG_CRYPTO_PCRYPT is not set -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_CRYPTO_CRYPTD=y -# CONFIG_CRYPTO_MCRYPTD is not set -CONFIG_CRYPTO_AUTHENC=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIMD=y -CONFIG_CRYPTO_ENGINE=m - -# -# Authenticated Encryption with Associated Data -# -CONFIG_CRYPTO_CCM=m -CONFIG_CRYPTO_GCM=m -# CONFIG_CRYPTO_CHACHA20POLY1305 is not set -CONFIG_CRYPTO_SEQIV=m -CONFIG_CRYPTO_ECHAINIV=y - -# -# Block modes -# -# CONFIG_CRYPTO_CBC is not set -CONFIG_CRYPTO_CTR=m -# CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=m -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set -# CONFIG_CRYPTO_KEYWRAP is not set - -# -# Hash modes -# -CONFIG_CRYPTO_CMAC=m -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_CRC32 is not set -CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_GHASH=m -# CONFIG_CRYPTO_POLY1305 is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_SHA3 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_TI is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -CONFIG_CRYPTO_CHACHA20=m -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_LZO is not set -# CONFIG_CRYPTO_842 is not set -# CONFIG_CRYPTO_LZ4 is not set -# CONFIG_CRYPTO_LZ4HC is not set - -# -# Random Number Generation -# -CONFIG_CRYPTO_ANSI_CPRNG=y -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_DRBG_HMAC=y -# CONFIG_CRYPTO_DRBG_HASH is not set -# CONFIG_CRYPTO_DRBG_CTR is not set -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_JITTERENTROPY=y -# CONFIG_CRYPTO_USER_API_HASH is not set -# CONFIG_CRYPTO_USER_API_SKCIPHER is not set -# CONFIG_CRYPTO_USER_API_RNG is not set -# CONFIG_CRYPTO_USER_API_AEAD is not set -CONFIG_CRYPTO_HW=y -# CONFIG_CRYPTO_DEV_MARVELL_CESA is not set -# CONFIG_CRYPTO_DEV_FSL_CAAM is not set -# CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set -# CONFIG_CRYPTO_DEV_EXYNOS_RNG is not set -# CONFIG_CRYPTO_DEV_S5P is not set -# CONFIG_CRYPTO_DEV_CCP is not set -# CONFIG_CAVIUM_CPT is not set -# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set -# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set -# CONFIG_CRYPTO_DEV_QCE is not set -# CONFIG_CRYPTO_DEV_ROCKCHIP is not set -CONFIG_CRYPTO_DEV_VIRTIO=m -CONFIG_CRYPTO_DEV_BCM_SPU=m -# CONFIG_CRYPTO_DEV_SAFEXCEL is not set -# CONFIG_ASYMMETRIC_KEY_TYPE is not set - -# -# Certificates for signature checking -# -# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set -CONFIG_ARM64_CRYPTO=y -CONFIG_CRYPTO_SHA256_ARM64=y -CONFIG_CRYPTO_SHA512_ARM64=m -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SHA2_ARM64_CE=y -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m -CONFIG_CRYPTO_CRC32_ARM64_CE=m -CONFIG_CRYPTO_AES_ARM64=y -CONFIG_CRYPTO_AES_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_AES_ARM64_NEON_BLK=m -CONFIG_CRYPTO_CHACHA20_NEON=m -CONFIG_CRYPTO_AES_ARM64_BS=m -# CONFIG_BINARY_PRINTF is not set - -# -# Library routines -# -CONFIG_RAID6_PQ=m -CONFIG_BITREVERSE=y -CONFIG_HAVE_ARCH_BITREVERSE=y -CONFIG_RATIONAL=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_NET_UTILS=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_IO=y -CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y -# CONFIG_CRC_CCITT is not set -CONFIG_CRC16=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC32_SELFTEST is not set -CONFIG_CRC32_SLICEBY8=y -# CONFIG_CRC32_SLICEBY4 is not set -# CONFIG_CRC32_SARWATE is not set -# CONFIG_CRC32_BIT is not set -# CONFIG_CRC4 is not set -CONFIG_CRC7=y -CONFIG_LIBCRC32C=m -# CONFIG_CRC8 is not set -CONFIG_XXHASH=m -CONFIG_AUDIT_GENERIC=y -CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y -CONFIG_AUDIT_COMPAT_GENERIC=y -# CONFIG_RANDOM32_SELFTEST is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_LZO_COMPRESS=y -CONFIG_LZO_DECOMPRESS=y -CONFIG_LZ4_DECOMPRESS=y -CONFIG_ZSTD_COMPRESS=m -CONFIG_ZSTD_DECOMPRESS=m -CONFIG_XZ_DEC=y -CONFIG_XZ_DEC_X86=y -CONFIG_XZ_DEC_POWERPC=y -CONFIG_XZ_DEC_IA64=y -CONFIG_XZ_DEC_ARM=y -CONFIG_XZ_DEC_ARMTHUMB=y -CONFIG_XZ_DEC_SPARC=y -CONFIG_XZ_DEC_BCJ=y -# CONFIG_XZ_DEC_TEST is not set -CONFIG_DECOMPRESS_GZIP=y -CONFIG_DECOMPRESS_BZIP2=y -CONFIG_DECOMPRESS_LZMA=y -CONFIG_DECOMPRESS_XZ=y -CONFIG_DECOMPRESS_LZO=y -CONFIG_DECOMPRESS_LZ4=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_RADIX_TREE_MULTIORDER=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HAS_DMA=y -# CONFIG_DMA_NOOP_OPS is not set -# CONFIG_DMA_VIRT_OPS is not set -CONFIG_CPU_RMAP=y -CONFIG_DQL=y -CONFIG_GLOB=y -# CONFIG_GLOB_SELFTEST is not set -CONFIG_NLATTR=y -# CONFIG_CORDIC is not set -# CONFIG_DDR is not set -# CONFIG_IRQ_POLL is not set -CONFIG_LIBFDT=y -CONFIG_OID_REGISTRY=y -CONFIG_UCS2_STRING=y -CONFIG_FONT_SUPPORT=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -# CONFIG_SG_SPLIT is not set -CONFIG_SG_POOL=y -CONFIG_ARCH_HAS_SG_CHAIN=y -CONFIG_SBITMAP=y -# CONFIG_STRING_SELFTEST is not set diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg deleted file mode 100644 index a3923c19..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_RPMSG_VIRTIO=y diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg deleted file mode 100644 index 327c753a..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_HID_MULTITOUCH=y diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg deleted file mode 100644 index 7446787d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg +++ /dev/null @@ -1,68 +0,0 @@ -CONFIG_MEDIA_USB_SUPPORT=y - -# -# Webcam devices -# -CONFIG_USB_VIDEO_CLASS=y -CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y -CONFIG_USB_GSPCA=m -# CONFIG_USB_M5602 is not set -# CONFIG_USB_STV06XX is not set -# CONFIG_USB_GL860 is not set -# CONFIG_USB_GSPCA_BENQ is not set -# CONFIG_USB_GSPCA_CONEX is not set -# CONFIG_USB_GSPCA_CPIA1 is not set -# CONFIG_USB_GSPCA_DTCS033 is not set -# CONFIG_USB_GSPCA_ETOMS is not set -# CONFIG_USB_GSPCA_FINEPIX is not set -# CONFIG_USB_GSPCA_JEILINJ is not set -# CONFIG_USB_GSPCA_JL2005BCD is not set -# CONFIG_USB_GSPCA_KINECT is not set -# CONFIG_USB_GSPCA_KONICA is not set -# CONFIG_USB_GSPCA_MARS is not set -# CONFIG_USB_GSPCA_MR97310A is not set -# CONFIG_USB_GSPCA_NW80X is not set -# CONFIG_USB_GSPCA_OV519 is not set -# CONFIG_USB_GSPCA_OV534 is not set -# CONFIG_USB_GSPCA_OV534_9 is not set -# CONFIG_USB_GSPCA_PAC207 is not set -# CONFIG_USB_GSPCA_PAC7302 is not set -# CONFIG_USB_GSPCA_PAC7311 is not set -# CONFIG_USB_GSPCA_SE401 is not set -# CONFIG_USB_GSPCA_SN9C2028 is not set -# CONFIG_USB_GSPCA_SN9C20X is not set -# CONFIG_USB_GSPCA_SONIXB is not set -# CONFIG_USB_GSPCA_SONIXJ is not set -# CONFIG_USB_GSPCA_SPCA500 is not set -# CONFIG_USB_GSPCA_SPCA501 is not set -# CONFIG_USB_GSPCA_SPCA505 is not set -# CONFIG_USB_GSPCA_SPCA506 is not set -# CONFIG_USB_GSPCA_SPCA508 is not set -# CONFIG_USB_GSPCA_SPCA561 is not set -# CONFIG_USB_GSPCA_SPCA1528 is not set -# CONFIG_USB_GSPCA_SQ905 is not set -# CONFIG_USB_GSPCA_SQ905C is not set -# CONFIG_USB_GSPCA_SQ930X is not set -# CONFIG_USB_GSPCA_STK014 is not set -# CONFIG_USB_GSPCA_STK1135 is not set -# CONFIG_USB_GSPCA_STV0680 is not set -# CONFIG_USB_GSPCA_SUNPLUS is not set -# CONFIG_USB_GSPCA_T613 is not set -# CONFIG_USB_GSPCA_TOPRO is not set -# CONFIG_USB_GSPCA_TOUPTEK is not set -# CONFIG_USB_GSPCA_TV8532 is not set -# CONFIG_USB_GSPCA_VC032X is not set -# CONFIG_USB_GSPCA_VICAM is not set -# CONFIG_USB_GSPCA_XIRLINK_CIT is not set -# CONFIG_USB_GSPCA_ZC3XX is not set -# CONFIG_USB_PWC is not set -# CONFIG_VIDEO_CPIA2 is not set -# CONFIG_USB_ZR364XX is not set -# CONFIG_USB_STKWEBCAM is not set -# CONFIG_USB_S2255 is not set -# CONFIG_VIDEO_USBTV is not set - -# -# Webcam, TV (analog/digital) USB devices -# -# CONFIG_VIDEO_EM28XX is not set diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg deleted file mode 100644 index f58b942c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="r8a779x_usb3_v2.dlmem r8a779x_usb3_v3.dlmem" -CONFIG_EXTRA_FIRMWARE_DIR="firmware" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb deleted file mode 100644 index 9dac5ff1..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb +++ /dev/null @@ -1,85 +0,0 @@ -DESCRIPTION = "Linux kernel for the R-Car Generation 3 based board" - -require include/avb-control.inc -require include/iccom-control.inc -require recipes-kernel/linux/linux-yocto.inc -require include/cas-control.inc -require include/adsp-control.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" -COMPATIBLE_MACHINE = "salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu" - -RENESAS_BSP_URL = " \ - git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git" -BRANCH = "v4.14.75-ltsi/rcar-3.9.6" -SRCREV = "1d76a004d3a19367669b861559c1fbbf546b3065" - -SRC_URI = "${RENESAS_BSP_URL};protocol=git;nocheckout=1;branch=${BRANCH}" - -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" - -# Fix inaccessible SSI for Renesas ADSP firmware -SRC_URI_append = " \ - file://0001-Revert-ASoC-rsnd-ssi-wait-maximum-5ms-for-status-che.patch \ -" - -LINUX_VERSION ?= "4.14.75" -PV = "${LINUX_VERSION}+git${SRCPV}" -PR = "r1" - -SRC_URI_append = " \ - file://defconfig \ - file://touch.cfg \ - ${@oe.utils.conditional("USE_AVB", "1", " file://usb-video-class.cfg", "", d)} \ -" - -# Enable RPMSG_VIRTIO depend on ICCOM -SUPPORT_ICCOM = " \ - file://0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch \ - file://iccom.cfg \ -" - -SRC_URI_append = " \ - ${@oe.utils.conditional("USE_ICCOM", "1", "${SUPPORT_ICCOM}", "", d)} \ -" - -# Add SCHED_DEBUG config fragment to support CAS -SRC_URI_append = " \ - ${@oe.utils.conditional("USE_CAS", "1", " file://capacity_aware_migration_strategy.cfg", "",d)} \ -" - -# Add ADSP ALSA driver -SUPPORT_ADSP_ASOC = " \ - file://0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch \ - file://0002-ADSP-add-ADSP-sound-driver-source.patch \ - file://0003-ADSP-add-build-for-ADSP-sound-driver.patch \ - file://0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch \ - file://0005-ADSP-integrate-ADSP-sound-for-E3-board.patch \ - file://0006-ADSP-remove-HDMI-support-from-rcar-sound.patch \ - file://adsp.cfg \ -" - -SRC_URI_append = " \ - ${@oe.utils.conditional("USE_ADSP", "1", "${SUPPORT_ADSP_ASOC}", "", d)} \ -" - -# Install USB3.0 firmware to rootfs -USB3_FIRMWARE_V2 = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/r8a779x_usb3_v2.dlmem;md5sum=645db7e9056029efa15f158e51cc8a11" -USB3_FIRMWARE_V3 = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/r8a779x_usb3_v3.dlmem;md5sum=687d5d42f38f9850f8d5a6071dca3109" - -SRC_URI_append = " \ - ${USB3_FIRMWARE_V2} \ - ${USB3_FIRMWARE_V3} \ - ${@bb.utils.contains('MACHINE_FEATURES','usb3','file://usb3.cfg','',d)} \ -" - -# W/A Fix build issue with Linux v4.14 -SRC_URI_append = " \ - file://0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch \ -" - -do_download_firmware () { - install -m 755 ${WORKDIR}/r8a779x_usb3_v*.dlmem ${STAGING_KERNEL_DIR}/firmware -} - -addtask do_download_firmware after do_configure before do_compile diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb deleted file mode 100644 index b264cbb5..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "ADSP Framework for Linux" -LICENSE = "CLOSED" - -inherit distro_features_check - -REQUIRED_DISTRO_FEATURES = "adsp" - -SRC_URI = "file://RCG3AHFWN0201ZDP.tar.gz" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/RCG3AHFWN0201ZDP" - -do_install() { - # create the firmware dir - install -d ${D}/lib/firmware - - # install the firmware bin - install -m 0644 ${S}/lib/firmware/xf-rcar.fw ${D}/lib/firmware -} - -PACKAGES = " \ - ${PN} \ -" - -FILES_${PN} = " \ - /lib/firmware \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb deleted file mode 100644 index 52b26271..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb +++ /dev/null @@ -1,61 +0,0 @@ -DESCRIPTION = "ADSP Interface for Linux" -LICENSE = "CLOSED" - -inherit distro_features_check - -REQUIRED_DISTRO_FEATURES = "adsp" - -DEPENDS += "kernel-module-xtensa-hifi" - -SRC_URI = "file://RCG3AHIFL4101ZDP.tar.gz" - -S = "${WORKDIR}/RCG3AHIFL4101ZDP" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -# Don't need to do_configure -do_configure[noexec] = "1" - -# Don't use EXTRA_OEMAKE default value to avoid default CFLAGS, LDFLAGS -# of poky override the CFLAGS, LDFLAGS inside RCG3AHIFL4101ZDP/Makefile -EXTRA_OEMAKE = "INCSHARED=${STAGING_INCDIR}" -CFLAGS += "-Wno-packed-not-aligned" - -do_compile() { - cd ${S} - oe_runmake -} - -do_install() { - # Create destination directory - install -d ${D}/${libdir} - install -d ${D}/${includedir} - install -d ${D}/${includedir}/sys/fio - install -d ${D}/${includedir}/os/linux - - # Copy library - install -m 0755 ${S}/libRCG3AHIFL4101ZDP.so.1.0 ${D}/${libdir} - - # Copy shared header files - install -m 0644 ${S}/include/*.h ${D}/${includedir} - install -m 0644 ${S}/include/sys/fio/*.h ${D}/${includedir}/sys/fio/ - install -m 0644 ${S}/include/os/linux/*.h ${D}/${includedir}/os/linux/ - - # Create the symbolic link - cd ${D}/${libdir} - ln -s libRCG3AHIFL4101ZDP.so.1.0 libRCG3AHIFL4101ZDP.so.1 - ln -s libRCG3AHIFL4101ZDP.so.1 libRCG3AHIFL4101ZDP.so -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-dbg \ -" - -INSANE_SKIP_${PN} += "dev-so" - -FILES_${PN} += " \ - ${libdir}/*.so* \ - ${includedir} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc deleted file mode 100644 index 0a46e7b3..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc +++ /dev/null @@ -1,8 +0,0 @@ -require include/rcar-gen3-modules-common.inc - -inherit distro_features_check - -REQUIRED_DISTRO_FEATURES = "avb" - -SRC_URI = "git://github.com/renesas-rcar/avb-applications.git;branch=rcar-gen3" -SRCREV = "8398f6e66eaf487eaf8e9a2a8d60f222456c06a6" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb deleted file mode 100644 index e668d13b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb +++ /dev/null @@ -1,121 +0,0 @@ -DESCRIPTION = "Renesas Ethernet AVB demo applications" - -require avb-applications.inc - -LICENSE = "MIT & BSD" -LIC_FILES_CHKSUM = " \ - file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9 \ - file://lib/msrp/LICENSE.BSD;md5=60ba0ea0afdcbf8d26ce31ce1503aba3 \ - file://lib/avdecc/jdksavdecc-c/COPYRIGHT;md5=6592ded5140540a936b8d98ed1b6a577 \ - file://avblauncher/inih/LICENSE.txt;md5=a7a95d2af90376e85a05318794e6f202 \ -" - -DEPENDS = "kernel-module-avb-streaming libyaml cmake-native" - -S = "${WORKDIR}/git/avb-demoapps" - -includedir = "${RENESAS_DATADIR}/include" - -# submodule is extracted before do_populate_lic -addtask do_init_submodule after do_unpack before do_patch - -do_init_submodule() { - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - export HTTP_PROXY=${HTTP_PROXY} - export HTTPS_PROXY=${HTTPS_PROXY} - cd ${S} - git submodule init - git submodule update -} - -EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}'" - -do_install_append() { - oe_runmake install INSTALL_DIR=${D}/${bindir} - - # Create install directories - install -d ${D}/${sysconfdir}/linuxptp - install -d ${D}/${sysconfdir}/daemon_cl - install -d ${D}/${sysconfdir}/avblauncher - - # Install - install -m 644 ${S}/etc/linuxptp/avb-demoapps.cfg ${D}/${sysconfdir}/linuxptp - install -m 644 ${S}/etc/daemon_cl/gptp_cfg.ini ${D}/${sysconfdir}/daemon_cl - install -m 755 ${S}/etc/avblauncher/mse_aaf_pcm.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/mse_cvf_h264.sh ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/mse_cvf_h264_d13.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/mse_cvf_mjpeg.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/mse_iec61883_4.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/mse_iec61883_6.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 755 ${S}/etc/avblauncher/simple_application.sh ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/simple_listener.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/simple_talker.ini ${D}/${sysconfdir}/avblauncher - install -m 644 ${S}/etc/avblauncher/avdecc_entity_audio.yaml ${D}/${sysconfdir}/avblauncher -} - -PACKAGES =+ " \ - ${PN}-simple \ - ${PN}-mrpdummy \ - ${PN}-avblauncher \ -" - -ALLOW_EMPTY_${PN} = "1" - -FILES_${PN}-mrpdummy = " \ - ${bindir}/mrpdummy \ -" - -FILES_${PN}-avblauncher = " \ - ${sysconfdir}/daemon_cl/gptp_cfg.ini \ - ${sysconfdir}/avblauncher/mse_aaf_pcm.sh \ - ${sysconfdir}/avblauncher/mse_aaf_pcm_listener.ini \ - ${sysconfdir}/avblauncher/mse_aaf_pcm_talker.ini \ - ${sysconfdir}/avblauncher/mse_cvf_h264.sh \ - ${sysconfdir}/avblauncher/mse_cvf_h264_d13.sh \ - ${sysconfdir}/avblauncher/mse_cvf_h264_d13_listener.ini \ - ${sysconfdir}/avblauncher/mse_cvf_h264_d13_talker.ini \ - ${sysconfdir}/avblauncher/mse_cvf_h264_listener.ini \ - ${sysconfdir}/avblauncher/mse_cvf_h264_talker.ini \ - ${sysconfdir}/avblauncher/mse_cvf_mjpeg.sh \ - ${sysconfdir}/avblauncher/mse_cvf_mjpeg_listener.ini \ - ${sysconfdir}/avblauncher/mse_cvf_mjpeg_talker.ini \ - ${sysconfdir}/avblauncher/mse_iec61883_4.sh \ - ${sysconfdir}/avblauncher/mse_iec61883_4_listener.ini \ - ${sysconfdir}/avblauncher/mse_iec61883_4_talker.ini \ - ${sysconfdir}/avblauncher/mse_iec61883_6.sh \ - ${sysconfdir}/avblauncher/mse_iec61883_6_listener.ini \ - ${sysconfdir}/avblauncher/mse_iec61883_6_talker.ini \ - ${sysconfdir}/avblauncher/simple_application.sh \ - ${sysconfdir}/avblauncher/simple_listener.ini \ - ${sysconfdir}/avblauncher/simple_talker.ini \ - ${sysconfdir}/avblauncher/avdecc_entity_audio.yaml \ - ${bindir}/avblauncher \ -" - -FILES_${PN}-simple = " \ - ${sysconfdir}/linuxptp/avb-demoapps.cfg \ - ${bindir}/simple_talker \ - ${bindir}/simple_listener \ -" - -RDEPENDS_${PN} = " \ - ${PN}-simple \ - ${PN}-avblauncher \ -" - -RDEPENDS_${PN}-avblauncher = " \ - ${PN}-mrpdummy \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb deleted file mode 100644 index 5c002776..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb +++ /dev/null @@ -1,17 +0,0 @@ -DESCRIPTION = "Utility tool of the AVB Streaming Driver for Linux for the R-Car Gen3" - -require avb-applications.inc - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9" - -DEPENDS = "kernel-module-avb-streaming" - -S = "${WORKDIR}/git/avbtool" - -EXTRA_OEMAKE = "'CC=${CC}'" - -do_install_append() { - install -d ${D}/${bindir} - install -m 755 ${S}/avbtool ${D}/${bindir} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb deleted file mode 100644 index 094d3265..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb +++ /dev/null @@ -1,74 +0,0 @@ -DESCRIPTION = "R-Car Gen3 Color Management System" -LICENSE = "CLOSED" - -require include/cms-control.inc - -SRC_CMSBCM = "${@bb.utils.contains('USE_CMSBCM', '1', 'file://RTM0AC0000JRCMBCV0SL41C.tar.gz;subdir=cms/bcm', '', d)}" -SRC_CMSBLC = "${@bb.utils.contains('USE_CMSBLC', '1', 'file://RTM0AC0000JRCMBLC0SL41C.tar.gz;subdir=cms/blc', '', d)}" -SRC_CMSDGC = "${@bb.utils.contains('USE_CMSDGC', '1', 'file://RTM0AC0000JRCMDGV0SL41C.tar.gz;subdir=cms/dgc', '', d)}" - -SRC_URI = " \ - ${SRC_CMSBCM} \ - ${SRC_CMSBLC} \ - ${SRC_CMSDGC} \ -" - -S = "${WORKDIR}/cms" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install() { - # Create the lib directory - install -d ${D}/${libdir} - - if [ "X${USE_CMSBCM}" = "X1" ]; then - install -d ${D}/${includedir}/cms/bcm - install -m 755 ${S}/bcm/${baselib}/libcmsbcm.so.2.0.0 ${D}/${libdir} - install -m 644 ${S}/bcm/include/*.h ${D}/${includedir}/cms/bcm - - cd ${D}/${libdir} - ln -s libcmsbcm.so.2.0.0 libcmsbcm.so.1 - ln -s libcmsbcm.so.1 libcmsbcm.so - fi - - if [ "X${USE_CMSBLC}" = "X1" ]; then - install -d ${D}/${includedir}/cms/blc - install -m 755 ${S}/blc/${baselib}/libcmsblc.so.2.0.0 ${D}/${libdir} - install -m 644 ${S}/blc/include/*.h ${D}/${includedir}/cms/blc - - cd ${D}/${libdir} - ln -s libcmsblc.so.2.0.0 libcmsblc.so.1 - ln -s libcmsblc.so.1 libcmsblc.so - fi - - if [ "X${USE_CMSDGC}" = "X1" ]; then - install -d ${D}/${includedir}/cms/dgc - install -m 755 ${S}/dgc/${baselib}/libcmsdgc.so.2.0.0 ${D}/${libdir} - install -m 644 ${S}/dgc/include/*.h ${D}/${includedir}/cms/dgc - - cd ${D}/${libdir} - ln -s libcmsdgc.so.2.0.0 libcmsdgc.so.1 - ln -s libcmsdgc.so.1 libcmsdgc.so - fi -} - -FILES_${PN} = " \ - ${libdir}/*.so.* \ - ${libdir}/lib*.so \ -" - -FILES_${PN}-dev = " \ - ${includedir} \ -" - -INSANE_SKIP_${PN} = "dev-so" - -# Skip debug strip of do_populate_sysroot() -INHIBIT_SYSROOT_STRIP = "1" - -# Skip debug split and strip of do_package() -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb deleted file mode 100644 index a3553b5c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb +++ /dev/null @@ -1,74 +0,0 @@ -DESCRIPTION = "ISDB-T DTV Software Package for Linux for the R-Car Gen3" -LICENSE = "CLOSED" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -inherit distro_features_check - -DEPENDS = " \ - kernel-module-vspmif mmngr-user-module \ - vspmif-user-module kernel-module-vspm \ - omx-user-module kernel-module-uvcs-drv \ - kernel-module-scu-src kernel-module-ssp \ - kernel-module-tddmac kernel-module-tsif \ -" - -PN = "dtv-user-module" -PR = "r0" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -REQUIRED_DISTRO_FEATURES = "dtv" - -SRC_URI_DTV_SW = "file://Software.tar.gz" -SRC_URI_DTV_UDF = "file://Reference.tar.gz" - -SRC_URI = " \ - ${SRC_URI_DTV_SW} \ - ${SRC_URI_DTV_UDF} \ -" - -S = "${WORKDIR}" - -includedir = "${RENESAS_DATADIR}/include" - -# do_configure() nothing -do_configure[noexec] = "1" -# do_compile() nothing -do_compile[noexec] = "1" - -do_install() { - # Create destination folders - install -d ${D}/${libdir} - install -d ${D}${RENESAS_DATADIR}/include - install -d ${D}${RENESAS_DATADIR}/src/dtv/reference - - # Copy library - install -m 644 ${S}/${baselib}/*.a ${D}/${libdir}/ - - # Copy shared header files - install -m 644 ${S}/include/*.h ${D}${RENESAS_DATADIR}/include - - # Copy reference files - install -m 644 ${S}/userfunc/*.h ${D}${RENESAS_DATADIR}/src/dtv/reference - install -m 644 ${S}/userfunc/*.c ${D}${RENESAS_DATADIR}/src/dtv/reference -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-staticdev \ -" - -FILES_${PN} = "" -ALLOW_EMPTY_${PN} = "1" - -FILES_${PN}-dev = " \ - ${RENESAS_DATADIR}/include/*.h \ - ${RENESAS_DATADIR}/src/dtv/reference/* \ -" -FILES_${PN}-staticdev = " \ - ${libdir}/*.a \ -" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb deleted file mode 100644 index 7fad4010..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb +++ /dev/null @@ -1,53 +0,0 @@ -DESCRIPTION = "DVD Encryption Library for Linux RCar Gen3" -LICENSE = "CLOSED" - -require include/rcar-gen3-path-common.inc - -inherit distro_features_check -REQUIRED_DISTRO_FEATURES = "dvd_encryption_library" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI = " \ - file://Software.tar.gz \ -" - -S = "${WORKDIR}" - -includedir = "${RENESAS_DATADIR}/include" - -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -do_install() { - install -d ${D}${base_libdir}/optee_armtz - install -d ${D}${RENESAS_DATADIR}/include - install -d ${D}${libdir} - - install -m 644 ${S}/TEE/DynamicTA/*.ta \ - ${D}${base_libdir}/optee_armtz/ - install -m 644 ${S}/TEEC/include/avc_copdvd.h \ - ${D}${RENESAS_DATADIR}/include/ - install -m 644 ${S}/TEEC/lib/libcopdvd.a \ - ${D}${libdir} -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-staticdev \ -" - -FILES_${PN} = " \ - ${base_libdir}/optee_armtz/*.ta \ -" - -FILES_${PN}-dev = " \ - ${RENESAS_DATADIR}/include/avc_copdvd.h \ -" - -FILES_${PN}-staticdev = " \ - ${libdir}/libcopdvd.a \ -" - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb deleted file mode 100644 index f3d0b134..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb +++ /dev/null @@ -1,64 +0,0 @@ -DESCRIPTION = "DVD Core-Middleware for Linux for the R-Car Gen3" -LICENSE = "CLOSED" - -require include/rcar-gen3-modules-common.inc -require include/dtv-dvd-control.inc - -inherit distro_features_check - -DEPENDS = " \ - kernel-module-vspmif mmngr-user-module \ - vspmif-user-module kernel-module-vspm \ - omx-user-module kernel-module-uvcs-drv \ -" - -PN = "dvd-user-module" -PR = "r0" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -REQUIRED_DISTRO_FEATURES = "dvd" - -SRC_URI_DVD_SW = "file://Software.tar.gz" - -SRC_URI = " \ - ${SRC_URI_DVD_SW} \ -" - -S = "${WORKDIR}" - -includedir = "${RENESAS_DATADIR}/include" - -# do_configure() nothing -do_configure[noexec] = "1" -# do_compile() nothing -do_compile[noexec] = "1" - -do_install() { - # Create destination folders - install -d ${D}/${libdir} - install -d ${D}${RENESAS_DATADIR}/include - - # Copy library - install -m 644 ${S}/${baselib}/*.a ${D}/${libdir} - - # Copy shared header files - install -m 644 ${S}/include/*.h ${D}${RENESAS_DATADIR}/include -} - -PACKAGES = " \ - ${PN} \ - ${PN}-dev \ - ${PN}-staticdev \ -" - -FILES_${PN} = "" -ALLOW_EMPTY_${PN} = "1" - -FILES_${PN}-dev = " \ - ${RENESAS_DATADIR}/include/*.h \ -" -FILES_${PN}-staticdev = " \ - ${libdir}/*.a \ -" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf deleted file mode 100644 index 5fca3ee8..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf +++ /dev/null @@ -1,131 +0,0 @@ -[omxh264dec] -type-name=GstOMXH264Dec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.H264 -rank=512 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/x-h264,alignment=(string)au,stream-format=(string)byte-stream,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] - -[omxaaclcdec] -type-name=GstOMXAACDec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.AUDIO.DECODER.AACLC -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport -sink-template-caps=audio/mpeg,mpegversion=(int){2,4},stream-format=(string){raw,adts},rate=(int)[8000,96000],channels=(int)[1,2],framed=(boolean)true -src-template-caps=audio/x-raw,rate=(int)[8000,96000],channels=(int)[1,2],format=(string)S16LE - -[omxmpeg4videodec] -type-name=GstOMXMPEG4VideoDec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.MPEG4 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/mpeg,mpegversion=(int)4,systemstream=(boolean)false,parsed=(boolean)true,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] - -[omxvc1dec] -type-name=GstOMXWMVDec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.VC1 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/x-wmv,wmvversion=(int)3,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] - -[omxh265dec] -type-name=GstOMXH265Dec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.H265 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/x-h265,alignment=(string)au,stream-format=(string)byte-stream,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] - -[omxaacdec] -type-name=GstOMXAACDec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.AUDIO.DECODER.AAC -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport -sink-template-caps=audio/mpeg,mpegversion=(int){2,4},stream-format=(string){raw,adts},rate=(int)[8000,48000],channels=(int)[1,6],framed=(boolean)true -src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2,6},format=(string)S16LE - -[omxmp3dec] -type-name=GstOMXMP3Dec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.AUDIO.DECODER.MP3 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport -sink-template-caps=audio/mpeg,mpegversion=(int)1,layer=(int)[1,3],mpegaudioversion=(int)[1,3],rate=(int)[8000,48000],channels=(int)[1,2],parsed=(boolean) true -src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2},format=(string)S16LE - -[omxwmadec] -type-name=GstOMXWMADec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.AUDIO.DECODER.WMA -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;skip-handle-codec-data -sink-template-caps=audio/x-wma,wmaversion=(int)2,rate=(int)[8000,48000],channels=(int){1,2},block_align=(int)[0,2147483647],bitrate=(int)[0,2147483647] -src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2},format=(string)S16LE - -[omxh264enc] -type-name=GstOMXH264Enc -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.ENCODER.H264 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;renesas-encmc-stride-align -sink-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[80,3840],height=(int)[80,2160] -src-template-caps=video/x-h264,stream-format=(string)byte-stream,width=(int)[80,3840],height=(int)[80,2160] - -[omxvp8dec] -type-name=GstOMXVP8Dec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.VP8 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/x-vp8,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] - -[omxvp8enc] -type-name=GstOMXVP8Enc -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.ENCODER.VP8 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;renesas-encmc-stride-align -sink-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[80,1920],height=(int)[80,1080] -src-template-caps=video/x-vp8,width=(int)[80,1920],height=(int)[80,1080] - -[omxvp9dec] -type-name=GstOMXVP9Dec -core-name=@RENESAS_DATADIR@/lib/libomxr_core.so -component-name=OMX.RENESAS.VIDEO.DECODER.VP9 -rank=256 -in-port-index=0 -out-port-index=1 -hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure -sink-template-caps=video/x-vp9,width=(int)[1, MAX],height=(int)[1, MAX] -src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bbappend deleted file mode 100644 index 583a9c3b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bbappend +++ /dev/null @@ -1,38 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" - -SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI_append = " \ - git://github.com/renesas-rcar/gst-omx.git;branch=RCAR-GEN3/1.14.4 \ - file://gstomx.conf \ -" - -require include/rcar-gen3-path-common.inc - -DEPENDS += "omx-user-module mmngrbuf-user-module" - -SRCREV = "ac0a9d331ef492f216e90753bd7aae7d0811bcc5" - -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://omx/gstomx.h;beginline=1;endline=22;md5=e2c6664eda77dc22095adbed9cb6c6e4 \ -" - -S = "${WORKDIR}/git" - -GSTREAMER_1_0_OMX_TARGET = "rcar" -GSTREAMER_1_0_OMX_CORE_NAME = "${libdir}/libomxr_core.so" -EXTRA_OECONF_append = " --enable-experimental" - -do_configure_prepend() { - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - export HTTP_PROXY=${HTTP_PROXY} - export HTTPS_PROXY=${HTTPS_PROXY} - cd ${S} - install -m 0644 ${WORKDIR}/gstomx.conf ${S}/config/rcar/ - sed -i 's,@RENESAS_DATADIR@,${RENESAS_DATADIR},g' ${S}/config/rcar/gstomx.conf - ./autogen.sh --noconfigure - cd ${B} -} - -RDEPENDS_${PN}_append = " omx-user-module" -RDEPENDS_${PN}_remove = "libomxil" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-ebisu_r8a77990.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-ebisu_r8a77990.conf deleted file mode 100644 index 25a3fa1e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-ebisu_r8a77990.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video8 -output-device-name=/dev/video9 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf deleted file mode 100644 index 4807dc3d..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video12 -output-device-name=/dev/video13 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf deleted file mode 100644 index 890c5ad9..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3nulcb_r8a77965.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video6 -output-device-name=/dev/video7 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf deleted file mode 100644 index 890c5ad9..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video6 -output-device-name=/dev/video7 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7795.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7795.conf deleted file mode 100644 index 586b13b0..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7795.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video20 -output-device-name=/dev/video21 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7796.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7796.conf deleted file mode 100644 index 74a8ab9b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a7796.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video14 -output-device-name=/dev/video15 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a77965.conf b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a77965.conf deleted file mode 100644 index 74a8ab9b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-salvator-x_r8a77965.conf +++ /dev/null @@ -1,2 +0,0 @@ -input-device-name=/dev/video14 -output-device-name=/dev/video15 diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb deleted file mode 100644 index 631487cd..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb +++ /dev/null @@ -1,52 +0,0 @@ -SUMMARY = "GStreamer VSP filter plugin" -SECTION = "multimedia" -LICENSE = "GPLv2+" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base pkgconfig" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" -inherit autotools pkgconfig - -PN = "gstreamer1.0-plugin-vspfilter" - -EXTRA_AUTORECONF_append = " -I ${STAGING_DATADIR}/aclocal" - -VSPFILTER_CONF_r8a7795 = "gstvspfilter-${MACHINE}_r8a7795.conf" -VSPFILTER_CONF_r8a7796 = "gstvspfilter-${MACHINE}_r8a7796.conf" -VSPFILTER_CONF_r8a77965 = "gstvspfilter-${MACHINE}_r8a77965.conf" -VSPFILTER_CONF_r8a77990 = "gstvspfilter-${MACHINE}_r8a77990.conf" - -SRC_URI = " \ - git://github.com/renesas-rcar/gst-plugin-vspfilter.git;branch=RCAR-GEN3/1.0.1 \ - file://${VSPFILTER_CONF} \ -" - -SRCREV = "53061d6710619851e2d85576a5142eb5f3fa0c84" - -S = "${WORKDIR}/git" - -# submodule is extracted before do_populate_lic -addtask do_init_submodule after do_unpack before do_patch - -do_init_submodule() { - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - export HTTP_PROXY=${HTTP_PROXY} - export HTTPS_PROXY=${HTTPS_PROXY} - cd ${S} - git submodule init - git submodule update -} - -FILES_${PN} = " \ - ${libdir}/gstreamer-1.0/libgstvspfilter.so \ - ${sysconfdir}/gstvspfilter.conf" -FILES_${PN}-dev = "${libdir}/gstreamer-1.0/libgstvspfilter.la" -FILES_${PN}-staticdev = "${libdir}/gstreamer-1.0/libgstvspfilter.a" -FILES_${PN}-dbg = " \ - ${libdir}/gstreamer-1.0/.debug \ - ${prefix}/src" - -do_install_append() { - install -Dm 644 ${WORKDIR}/${VSPFILTER_CONF} ${D}/etc/gstvspfilter.conf -} - -RDEPENDS_${PN} = "kernel-module-vsp2driver" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bbappend deleted file mode 100644 index 8a5d5862..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bbappend +++ /dev/null @@ -1,27 +0,0 @@ -SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz" -SRC_URI_append = " git://github.com/renesas-rcar/gst-plugins-bad.git;branch=RCAR-GEN3/1.14.4" - -SRCREV = "34917c1788f037d884501074517337087de701f0" - -DEPENDS += "weston" - -S = "${WORKDIR}/git" - -# submodule is extracted before do_populate_lic -addtask do_init_submodule after do_unpack before do_patch - -do_init_submodule() { - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - export HTTP_PROXY=${HTTP_PROXY} - export HTTPS_PROXY=${HTTPS_PROXY} - cd ${S} - git submodule init - git submodule update -} - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend deleted file mode 100644 index 98268b33..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bbappend +++ /dev/null @@ -1,32 +0,0 @@ -SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz" -SRC_URI_append = " git://github.com/renesas-rcar/gst-plugins-good.git;branch=RCAR-GEN3/1.14.4" - -SRCREV = "11b76b496300a62c984f3dff5f4dfd772b16b9c0" - -DEPENDS += "mmngrbuf-user-module" - -S = "${WORKDIR}/git" - -EXTRA_OECONF_append = " \ - --enable-cont-frame-capture \ - --enable-ignore-fps-of-video-standard \ -" - -# submodule is extracted before do_populate_lic -addtask do_init_submodule after do_unpack before do_patch - -do_init_submodule() { - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - export HTTP_PROXY=${HTTP_PROXY} - export HTTPS_PROXY=${HTTPS_PROXY} - cd ${S} - git submodule init - git submodule update -} - -do_configure_prepend() { - cd ${S} - ./autogen.sh --noconfigure - cd ${B} -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb deleted file mode 100644 index ac4cf30b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Memory Manager User module for Renesas R-Car Gen3" -require mmngr_lib.inc -require include/rcar-gen3-path-common.inc - -DEPENDS = "kernel-module-mmngr" -PN = "mmngr-user-module" -PR = "r0" - -S = "${WORKDIR}/git/libmmngr/mmngr" - -EXTRA_OECONF = "${@bb.utils.contains("DISTRO_FEATURES", "mm-test", \ - " --enable-mmngr-test", "", d)}" - -exec_prefix = "/usr" -bindir = "${RENESAS_DATADIR}/bin" -includedir = "${RENESAS_DATADIR}/include" -CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" - -do_install_append() { - if [ -f ${D}${RENESAS_DATADIR}/bin/mmtp ]; then - if [ X${WS} = "X32" ]; then - mv ${D}${RENESAS_DATADIR}/bin/mmtp ${D}${RENESAS_DATADIR}/bin/mmtp${WS} - fi - fi -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc deleted file mode 100644 index 5def237b..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc +++ /dev/null @@ -1,18 +0,0 @@ -# Common path of MMNGR and MMNGRBUF module -LICENSE = "MIT" -LIC_FILES_CHKSUM = "\ - file://${WORKDIR}/git/COPYING.MIT;md5=30a99e0d36a3da1f5cf93c070ad7888a" - -MMNGR_LIB_URI = "git://github.com/renesas-rcar/mmngr_lib.git" - -SRC_URI = "${MMNGR_LIB_URI};branch=rcar_gen3" -SRCREV = "e55a8356c906486ee0be78b2a1fde227e7a578f4" - -# Get Wordsize of test app and change their names later to avoid override -WS_aarch64 = "" -WS_virtclass-multilib-lib32 = "32" - -# These modules are machine specific. -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit autotools diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb deleted file mode 100644 index 690169fd..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Memory Manager Buffer User module for Renesas R-Car Gen3" -require mmngr_lib.inc -require include/rcar-gen3-path-common.inc - -DEPENDS = "kernel-module-mmngrbuf" -PN = "mmngrbuf-user-module" -PR = "r0" - -S = "${WORKDIR}/git/libmmngr/mmngrbuf" - -EXTRA_OECONF = "${@bb.utils.contains("DISTRO_FEATURES", "mm-test", \ - " --enable-mmngrbuf-test", "", d)}" - -exec_prefix = "/usr" -bindir = "${RENESAS_DATADIR}/bin" -includedir = "${RENESAS_DATADIR}/include" -CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" - -do_install_append() { - if [ -f ${D}${RENESAS_DATADIR}/bin/mmbuftp ]; then - if [ X${WS} = "X32" ]; then - mv ${D}${RENESAS_DATADIR}/bin/mmbuftp ${D}${RENESAS_DATADIR}/bin/mmbuftp${WS} - fi - fi -} diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc deleted file mode 100644 index 6f3f8474..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc +++ /dev/null @@ -1,2 +0,0 @@ -deltask do_configure -deltask do_compile diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb deleted file mode 100644 index f31792bf..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb +++ /dev/null @@ -1,61 +0,0 @@ -DESCRIPTION = "ALAC decoder library" -SECTION = "libs" -LICENSE = "Apache-2.0 & APSL-2.0" -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=5cf67868b9e038eccb149ec80809d9f5 \ - file://APPLE_LICENSE.txt;md5=b180a94f894d2a868d40ea43da2bbaba \ -" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -DEPENDS = " \ - kernel-module-mmngr mmngr-user-module \ - vspmif-user-module kernel-module-vspmif \ - kernel-module-vspm kernel-module-vsp2driver \ -" - -RDEPENDS_${PN} += "mmngr-user-module vspmif-user-module" - -SRC_URI = "git://github.com/renesas-rcar/alac_decoder.git;branch=master" -SRCREV = "5d7e5c91a932bedb36284591612bfbb3342cd672" - -S = "${WORKDIR}/git" -B = "${S}/build/linux_armyocto/lib" - -EXTRA_OEMAKE = "ARCH=${ARCH}" - -ARCH = "arm" -ARCH_aarch64 = "arm64" - -do_install() { - # Create directories - install -d ${D}/${libdir} - install -d ${D}/${includedir} - - # Install library - install -m 755 ${S}/build/linux_armyocto/libALACDLA_L.so.2.0 ${D}/${libdir}/ - - # Create symbolic link - cd ${D}/${libdir} - ln -s libALACDLA_L.so.2.0 libALACDLA_L.so.2 - ln -s libALACDLA_L.so.2 libALACDLA_L.so - - # Install shared header file - install -m 644 ${S}/lib/alacd_Lib.h ${D}/${includedir}/ -} - -FILES_${PN} += " \ - ${libdir}/libALACDLA_L.so.* \ - ${libdir}/libALACDLA_L.so \ -" - -FILES_${PN}-dev = "${includedir}/*.h" - -INSANE_SKIP_${PN} += "dev-so" - -# Skip debug strip of do_populate_sysroot() -INHIBIT_SYSROOT_STRIP = "1" - -# Skip debug split and strip of do_package() -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb deleted file mode 100644 index 453195e1..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb +++ /dev/null @@ -1,50 +0,0 @@ -DESCRIPTION = "FLAC decoder library" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING.Xiph;md5=a2c4b71c0198682376d483eb5bcc9197" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI = "git://github.com/renesas-rcar/flac_decoder.git;branch=master" -SRCREV = "70c0a7ae7dc8cac2056adf5eb175e3c54f892c27" - -S = "${WORKDIR}/git" -B = "${S}/build/linux_armyocto/lib" - -EXTRA_OEMAKE = "ARCH=${ARCH}" - -ARCH = "arm" -ARCH_aarch64 = "arm64" - -do_install() { - # Create directories - install -d ${D}/${libdir} - install -d ${D}/${includedir} - - # Install library - install -m 755 ${S}/build/linux_armyocto/libFLACDLA_L.so.2.0 ${D}/${libdir}/ - - # Create symbolic link - cd ${D}/${libdir} - ln -s libFLACDLA_L.so.2.0 libFLACDLA_L.so.2 - ln -s libFLACDLA_L.so.2 libFLACDLA_L.so - - # Install shared header file - install -m 644 ${S}/lib/flacd_Lib.h ${D}/${includedir}/ -} - -FILES_${PN} += " \ - ${libdir}/libFLACDLA_L.so.* \ - ${libdir}/libFLACDLA_L.so \ -" - -FILES_${PN}-dev = "${includedir}/*.h" - -INSANE_SKIP_${PN} += "dev-so" - -# Skip debug strip of do_populate_sysroot() -INHIBIT_SYSROOT_STRIP = "1" - -# Skip debug split and strip of do_package() -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb deleted file mode 100644 index 7be578fe..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb +++ /dev/null @@ -1,489 +0,0 @@ -DESCRIPTION = "OMX Media Components R-Car Gen3" -LICENSE = "CLOSED" -require include/omx-control.inc -require include/rcar-gen3-modules-common.inc - -DEPENDS = " \ - kernel-module-mmngr mmngr-user-module \ - vspmif-user-module kernel-module-vspmif \ - kernel-module-vspm kernel-module-vsp2driver \ -" - -# Task Control. Compile is not performed when not installing OMX Video and Audio Libs. -# Note) dummy-omx-user-module.inc does not exist. -INCLUDE_FILE = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "dummy", "deltask", d )}' -include ${INCLUDE_FILE}-omx-user-module.inc - -DEPENDS += '${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )}' - -inherit autotools -require include/checksum_control.inc - -includedir = "${RENESAS_DATADIR}/include" -CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -OMX_EVA_PREFIX = '${@oe.utils.conditional("USE_OMX_EVA_PKG", "1", "EVA", "", d )}' - -# SRC file name -SRC_URI_OMX = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XCMCTL30SL41C.tar.bz2;unpack=0", "", d )}' -SRC_URI_VCMND = '${@oe.utils.conditional("USE_VIDEO_DEC", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XVCMND30SL41C.tar.bz2;unpack=0", "", d )}' -SRC_URI_VCMNE = '${@oe.utils.conditional("USE_VIDEO_ENC", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XVCMNE30SL41C.tar.bz2;unpack=0", "", d )}' -SRC_URI_H264D = '${@oe.utils.conditional("USE_H264D_OMX", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XV264D30SL41C.tar.bz2", "", d )}' -SRC_URI_H264E = '${@oe.utils.conditional("USE_H264E_OMX", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XV264E30SL41C.tar.bz2", "", d )}' - -SRC_URI_H263D = '${@oe.utils.conditional("USE_H263D_OMX", "1", "file://RTM0AC0000XV263D30SL41C.tar.bz2", "", d )}' -SRC_URI_H265D = '${@oe.utils.conditional("USE_H265D_OMX", "1", "file://RTM0AC0000XV265D30SL41C.tar.bz2", "", d )}' -SRC_URI_MPEG2D = '${@oe.utils.conditional("USE_MPEG2D_OMX", "1", "file://RTM0AC0000XVM2VD30SL41C.tar.bz2", "", d )}' -SRC_URI_MPEG4D = '${@oe.utils.conditional("USE_MPEG4D_OMX", "1", "file://RTM0AC0000XVM4VD30SL41C.tar.bz2", "", d )}' -SRC_URI_VC1D = '${@oe.utils.conditional("USE_VC1D_OMX", "1", "file://RTM0AC0000XVVC1D30SL41C.tar.bz2", "", d )}' -SRC_URI_DIVXD = '${@oe.utils.conditional("USE_DIVXD_OMX", "1", "file://RTM0AC0000XVDVXD30SL41C.tar.bz2", "", d )}' -SRC_URI_RVD = '${@oe.utils.conditional("USE_RVD_OMX", "1", "file://RTM0AC0000XVRLVD30SL41C.tar.bz2", "", d )}' -SRC_URI_VP8D = '${@oe.utils.conditional("USE_VP8D_OMX", "1", "file://RTM0AC0000XVVP8D30SL41C.tar.bz2", "", d )}' -SRC_URI_VP8E = '${@oe.utils.conditional("USE_VP8E_OMX", "1", "file://RTM0AC0000XVVP8E30SL41C.tar.bz2", "", d )}' -SRC_URI_VP9D = '${@oe.utils.conditional("USE_VP9D_OMX", "1", "file://RTM0AC0000XVVP9D30SL41C.tar.bz2", "", d )}' -SRC_URI_ACMND = '${@oe.utils.conditional("USE_AUDIO_OMX", "1", "file://RTM0AC0000XACMND30SL41C.tar.gz", "", d )}' -SRC_URI_AACLC = '${@oe.utils.conditional("USE_AACLCD_OMX", "1", "file://RTM0AC0000XAAACD30SL41C.tar.gz", "", d )}' -SRC_URI_AACPV2 = '${@oe.utils.conditional("USE_AACPV2D_OMX", "1", "file://RTM0AC0000XAAAPD30SL41C.tar.gz", "", d )}' -SRC_URI_MP3 = '${@oe.utils.conditional("USE_MP3D_OMX", "1", "file://RTM0AC0000XAMP3D30SL41C.tar.gz", "", d )}' -SRC_URI_AACLCE = '${@oe.utils.conditional("USE_AACLCE_OMX", "1", "file://RTM0AC0000XAAACE30SL41C.tar.gz", "", d )}' -SRC_URI_WMA = '${@oe.utils.conditional("USE_WMAD_OMX", "1", "file://RTM0AC0000XAWMAD30SL41C.tar.gz", "", d )}' -SRC_URI_ALACD = '${@oe.utils.conditional("USE_ALACD_OMX", "1", "file://RTM0AC0000XAALAD30SL41C.tar.gz", "", d )}' -SRC_URI_FLACD = '${@oe.utils.conditional("USE_FLACD_OMX", "1", "file://RTM0AC0000XAFLAD30SL41C.tar.gz", "", d )}' -SRC_URI_DDD = '${@oe.utils.conditional("USE_DDD_OMX", "1", "file://RTM0AC0000XADD5D30SL41C.tar.gz", "", d )}' -SRC_URI_AACMZ = '${@oe.utils.conditional("USE_AACLC_MDW", "1", "file://RTM0AC0000ADAACMZ1SL41C.tar.gz", "", d )}' -SRC_URI_AACPV2MZ = '${@oe.utils.conditional("USE_AACPV2_MDW", "1", "file://RTM0AC0000ADAAPMZ1SL41C.tar.gz", "", d )}' -SRC_URI_MP3MZ = '${@oe.utils.conditional("USE_MP3_MDW", "1", "file://RTM0AC0000ADMP3MZ1SL41C.tar.gz", "", d )}' -SRC_URI_WMAMZ = '${@oe.utils.conditional("USE_WMA_MDW", "1", "file://RTM0AC0000ADWMAMZ1SL41C.tar.gz", "", d )}' -SRC_URI_DDMZ = '${@oe.utils.conditional("USE_DD_MDW", "1", "file://RTM0AC0000ADDD5MZ1SL41C.tar.gz", "", d )}' -SRC_URI_AEAACMZ = '${@oe.utils.conditional("USE_AACLCE_MDW", "1", "file://RTM0AC0000AEAACMZ1SL41C.tar.gz", "", d )}' - -SRC_URI = " \ - ${SRC_URI_OMX} \ - ${SRC_URI_VCMND} \ - ${SRC_URI_VCMNE} \ - ${SRC_URI_H263D} \ - ${SRC_URI_H264D} \ - ${SRC_URI_H264E} \ - ${SRC_URI_H265D} \ - ${SRC_URI_MPEG2D} \ - ${SRC_URI_MPEG4D} \ - ${SRC_URI_VC1D} \ - ${SRC_URI_DIVXD} \ - ${SRC_URI_RVD} \ - ${SRC_URI_ACMND} \ - ${SRC_URI_AACLC} \ - ${SRC_URI_AACPV2} \ - ${SRC_URI_MP3} \ - ${SRC_URI_WMA} \ - ${SRC_URI_ALACD} \ - ${SRC_URI_FLACD} \ - ${SRC_URI_DDD} \ - ${SRC_URI_AACLCE} \ - ${SRC_URI_AACMZ} \ - ${SRC_URI_AACPV2MZ} \ - ${SRC_URI_MP3MZ} \ - ${SRC_URI_WMAMZ} \ - ${SRC_URI_DDMZ} \ - ${SRC_URI_AEAACMZ} \ - ${SRC_URI_VP8D} \ - ${SRC_URI_VP8E} \ - ${SRC_URI_VP9D} \ -" - -# SRC directory name -OMX_COMMON_SRC = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "${OMX_EVA_PREFIX}RTM0AC0000XCMCTL30SL41C", "", d )}' -OMX_VIDEO_DEC_COMMON_SRC = '${@oe.utils.conditional("USE_VIDEO_DEC", "1", "${OMX_EVA_PREFIX}RTM0AC0000XVCMND30SL41C", "", d )}' -OMX_VIDEO_ENC_COMMON_SRC = '${@oe.utils.conditional("USE_VIDEO_ENC", "1", "${OMX_EVA_PREFIX}RTM0AC0000XVCMNE30SL41C", "", d )}' - -OMX_H264_DEC_SRC = '${@oe.utils.conditional("USE_H264D_OMX", "1", "${OMX_EVA_PREFIX}RTM0AC0000XV264D30SL41C", "", d )}' -OMX_H264_ENC_SRC = '${@oe.utils.conditional("USE_H264E_OMX", "1", "${OMX_EVA_PREFIX}RTM0AC0000XV264E30SL41C", "", d )}' - -OMX_H263_DEC_SRC = '${@oe.utils.conditional("USE_H263D_OMX", "1", "RTM0AC0000XV263D30SL41C", "", d )}' -OMX_H265_DEC_SRC = '${@oe.utils.conditional("USE_H265D_OMX", "1", "RTM0AC0000XV265D30SL41C", "", d )}' -OMX_MPEG2_DEC_SRC = '${@oe.utils.conditional("USE_MPEG2D_OMX", "1", "RTM0AC0000XVM2VD30SL41C", "", d )}' -OMX_MPEG4_DEC_SRC = '${@oe.utils.conditional("USE_MPEG4D_OMX", "1", "RTM0AC0000XVM4VD30SL41C", "", d )}' -OMX_VC1_DEC_SRC = '${@oe.utils.conditional("USE_VC1D_OMX", "1", "RTM0AC0000XVVC1D30SL41C", "", d )}' -OMX_DIVX_DEC_SRC = '${@oe.utils.conditional("USE_DIVXD_OMX", "1", "RTM0AC0000XVDVXD30SL41C", "", d )}' -OMX_RV_DEC_SRC = '${@oe.utils.conditional("USE_RVD_OMX", "1", "RTM0AC0000XVRLVD30SL41C", "", d )}' -OMX_VP8_DEC_SRC = '${@oe.utils.conditional("USE_VP8D_OMX", "1", "RTM0AC0000XVVP8D30SL41C", "", d )}' -OMX_VP8_ENC_SRC = '${@oe.utils.conditional("USE_VP8E_OMX", "1", "RTM0AC0000XVVP8E30SL41C", "", d )}' -OMX_VP9_DEC_SRC = '${@oe.utils.conditional("USE_VP9D_OMX", "1", "RTM0AC0000XVVP9D30SL41C", "", d )}' - -OMX_VIDEO_SRC_LIST = " \ - ${OMX_COMMON_SRC} \ - ${OMX_VIDEO_DEC_COMMON_SRC} \ - ${OMX_VIDEO_ENC_COMMON_SRC} \ - ${OMX_H263_DEC_SRC} \ - ${OMX_H264_DEC_SRC} \ - ${OMX_H264_ENC_SRC} \ - ${OMX_H265_DEC_SRC} \ - ${OMX_MPEG2_DEC_SRC} \ - ${OMX_MPEG4_DEC_SRC} \ - ${OMX_VC1_DEC_SRC} \ - ${OMX_DIVX_DEC_SRC} \ - ${OMX_RV_DEC_SRC} \ - ${OMX_VP8_DEC_SRC} \ - ${OMX_VP8_ENC_SRC} \ - ${OMX_VP9_DEC_SRC} \ -" - -AAC_MIDDLEWARE_SRC = "RTM0AC0000ADAACMZ1SL41C" -AACPV2_MIDDLEWARE_SRC = "RTM0AC0000ADAAPMZ1SL41C" -MP3_MIDDLEWARE_SRC = "RTM0AC0000ADMP3MZ1SL41C" -WMA_MIDDLEWARE_SRC = "RTM0AC0000ADWMAMZ1SL41C" -DD_MIDDLEWARE_SRC = "RTM0AC0000ADDD5MZ1SL41C" -AEAAC_MIDDLEWARE_SRC = "RTM0AC0000AEAACMZ1SL41C" - -OMX_AUDIO_COMMON_SRC = '${@oe.utils.conditional("USE_AUDIO_OMX", "1", "RTM0AC0000XACMND30SL41C", "", d )}' -OMX_AACLC_DEC_SRC = '${@oe.utils.conditional("USE_AACLCD_OMX", "1", "RTM0AC0000XAAACD30SL41C", "", d )}' -OMX_AACPV2_DEC_SRC = '${@oe.utils.conditional("USE_AACPV2D_OMX", "1", "RTM0AC0000XAAAPD30SL41C", "", d )}' -OMX_MP3_DEC_SRC = '${@oe.utils.conditional("USE_MP3D_OMX", "1", "RTM0AC0000XAMP3D30SL41C", "", d )}' -OMX_WMA_DEC_SRC = '${@oe.utils.conditional("USE_WMAD_OMX", "1", "RTM0AC0000XAWMAD30SL41C", "", d )}' -OMX_ALAC_DEC_SRC = '${@oe.utils.conditional("USE_ALACD_OMX", "1", "RTM0AC0000XAALAD30SL41C", "", d )}' -OMX_FLAC_DEC_SRC = '${@oe.utils.conditional("USE_FLACD_OMX", "1", "RTM0AC0000XAFLAD30SL41C", "", d )}' -OMX_DD_DEC_SRC = '${@oe.utils.conditional("USE_DDD_OMX", "1", "RTM0AC0000XADD5D30SL41C", "", d )}' -OMX_AACLC_ENC_SRC = '${@oe.utils.conditional("USE_AACLCE_OMX", "1", "RTM0AC0000XAAACE30SL41C", "", d )}' - -OMX_AUDIO_SRC_LIST = " \ - ${OMX_AUDIO_COMMON_SRC} \ - ${OMX_AACLC_DEC_SRC} \ - ${OMX_AACPV2_DEC_SRC} \ - ${OMX_MP3_DEC_SRC} \ - ${OMX_WMA_DEC_SRC} \ - ${OMX_ALAC_DEC_SRC} \ - ${OMX_FLAC_DEC_SRC} \ - ${OMX_DD_DEC_SRC} \ - ${OMX_AACLC_ENC_SRC} \ -" - -S = "${WORKDIR}/omx/" - -# Create ${S} directory -do_unpack_prepend() { - os.system("install -d ${S}") -} - -do_unpack_append() { - bb.build.exec_func('setup_build_tree', d) -} - -setup_build_tree() { - for omxmc in ${OMX_COMMON_SRC} ${OMX_VIDEO_DEC_COMMON_SRC} ${OMX_VIDEO_ENC_COMMON_SRC} - do - tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${WORKDIR} - tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/src --strip=2 - tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/include --strip=1 - done -} - -B = "${S}" - -EXTRA_OECONF = "OMXR_DEFAULT_CONFIG_FILE_NAME=${sysconfdir}/omxr/omxr_config_base.txt" - -do_configure() { - export uvcsdrv_dir="${INCSHARED}" - chmod u+x autogen.sh - ./autogen.sh - oe_runconf -} - -do_install_omx_video() { - cd ${D}/${libdir} - for omxmc in ${OMX_VIDEO_SRC_LIST} - do - src="${WORKDIR}/${omxmc}" - install -m 755 ${src}/${baselib}/lib*.so.* ${D}/${libdir} - install -m 644 ${src}/include/*.h ${D}/${includedir} - install -m 644 ${src}/config/*.txt ${D}/${sysconfdir}/omxr - done - - if [ "X${USE_OMX_COMMON}" = "X1" ] ; then - ln -s libomxr_core.so.3.0.0 libomxr_core.so.3 - ln -s libomxr_core.so.3 libomxr_core.so - - ln -s libomxr_mc_cmn.so.3.0.0 libomxr_mc_cmn.so.3 - ln -s libomxr_mc_cmn.so.3 libomxr_mc_cmn.so - fi - - if [ "X${USE_VIDEO_OMX}" = "X1" ] ; then - ln -s libomxr_mc_vcmn.so.3.0.0 libomxr_mc_vcmn.so.3 - ln -s libomxr_mc_vcmn.so.3 libomxr_mc_vcmn.so - fi - - if [ "X${USE_VIDEO_DEC}" = "X1" ] ; then - ln -s libomxr_mc_vdcmn.so.3.0.0 libomxr_mc_vdcmn.so.3 - ln -s libomxr_mc_vdcmn.so.3 libomxr_mc_vdcmn.so - - ln -s libuvcs_dec.so.3.0.0 libuvcs_dec.so.3 - ln -s libuvcs_dec.so.3 libuvcs_dec.so - fi - - if [ "X${USE_VIDEO_ENC}" = "X1" ] ; then - ln -s libomxr_mc_vecmn.so.3.0.0 libomxr_mc_vecmn.so.3 - ln -s libomxr_mc_vecmn.so.3 libomxr_mc_vecmn.so - - ln -s libuvcs_enc.so.3.0.0 libuvcs_enc.so.3 - ln -s libuvcs_enc.so.3 libuvcs_enc.so - fi - - if [ "X${USE_H263D_OMX}" = "X1" ]; then - ln -s libomxr_mc_h263d.so.3.0.0 libomxr_mc_h263d.so.3 - ln -s libomxr_mc_h263d.so.3 libomxr_mc_h263d.so - - ln -s libuvcs_hv3d.so.3.0.0 libuvcs_hv3d.so.3 - ln -s libuvcs_hv3d.so.3 libuvcs_hv3d.so - fi - - if [ "X${USE_H264D_OMX}" = "X1" ]; then - ln -s libomxr_mc_h264d.so.3.0.0 libomxr_mc_h264d.so.3 - ln -s libomxr_mc_h264d.so.3 libomxr_mc_h264d.so - - ln -s libuvcs_avcd.so.3.0.0 libuvcs_avcd.so.3 - ln -s libuvcs_avcd.so.3 libuvcs_avcd.so - fi - - if [ "X${USE_H264E_OMX}" = "X1" ]; then - ln -s libomxr_mc_h264e.so.3.0.0 libomxr_mc_h264e.so.3 - ln -s libomxr_mc_h264e.so.3 libomxr_mc_h264e.so - - ln -s libuvcs_avce.so.3.0.0 libuvcs_avce.so.3 - ln -s libuvcs_avce.so.3 libuvcs_avce.so - fi - - if [ "X${USE_H265D_OMX}" = "X1" ]; then - ln -s libomxr_mc_hevd.so.3.0.0 libomxr_mc_hevd.so.3 - ln -s libomxr_mc_hevd.so.3 libomxr_mc_hevd.so - - ln -s libuvcs_hevd.so.3.0.0 libuvcs_hevd.so.3 - ln -s libuvcs_hevd.so.3 libuvcs_hevd.so - fi - - if [ "X${USE_MPEG2D_OMX}" = "X1" ]; then - ln -s libomxr_mc_m2vd.so.3.0.0 libomxr_mc_m2vd.so.3 - ln -s libomxr_mc_m2vd.so.3 libomxr_mc_m2vd.so - - ln -s libuvcs_m2vd.so.3.0.0 libuvcs_m2vd.so.3 - ln -s libuvcs_m2vd.so.3 libuvcs_m2vd.so - fi - - if [ "X${USE_MPEG4D_OMX}" = "X1" ]; then - ln -s libomxr_mc_m4vd.so.3.0.0 libomxr_mc_m4vd.so.3 - ln -s libomxr_mc_m4vd.so.3 libomxr_mc_m4vd.so - - ln -s libuvcs_m4vd.so.3.0.0 libuvcs_m4vd.so.3 - ln -s libuvcs_m4vd.so.3 libuvcs_m4vd.so - fi - - if [ "X${USE_VC1D_OMX}" = "X1" ]; then - ln -s libomxr_mc_vc1d.so.3.0.0 libomxr_mc_vc1d.so.3 - ln -s libomxr_mc_vc1d.so.3 libomxr_mc_vc1d.so - - ln -s libuvcs_vc1d.so.3.0.0 libuvcs_vc1d.so.3 - ln -s libuvcs_vc1d.so.3 libuvcs_vc1d.so - fi - - if [ "X${USE_DIVXD_OMX}" = "X1" ]; then - ln -s libomxr_mc_divxd.so.3.0.0 libomxr_mc_divxd.so.3 - ln -s libomxr_mc_divxd.so.3 libomxr_mc_divxd.so - - ln -s libuvcs_dvxd.so.3.0.0 libuvcs_dvxd.so.3 - ln -s libuvcs_dvxd.so.3 libuvcs_dvxd.so - fi - - if [ "X${USE_RVD_OMX}" = "X1" ]; then - ln -s libomxr_mc_rlvd.so.3.0.0 libomxr_mc_rlvd.so.3 - ln -s libomxr_mc_rlvd.so.3 libomxr_mc_rlvd.so - - ln -s libuvcs_rlvd.so.3.0.0 libuvcs_rlvd.so.3 - ln -s libuvcs_rlvd.so.3 libuvcs_rlvd.so - fi - - if [ "X${USE_VP8D_OMX}" = "X1" ]; then - ln -s libomxr_mc_vp8d.so.3.0.0 libomxr_mc_vp8d.so.3 - ln -s libomxr_mc_vp8d.so.3 libomxr_mc_vp8d.so - - ln -s libuvcs_vp8d.so.3.0.0 libuvcs_vp8d.so.3 - ln -s libuvcs_vp8d.so.3 libuvcs_vp8d.so - fi - - if [ "X${USE_VP8E_OMX}" = "X1" ]; then - ln -s libomxr_mc_vp8e.so.3.0.0 libomxr_mc_vp8e.so.3 - ln -s libomxr_mc_vp8e.so.3 libomxr_mc_vp8e.so - - ln -s libuvcs_vp8e.so.3.0.0 libuvcs_vp8e.so.3 - ln -s libuvcs_vp8e.so.3 libuvcs_vp8e.so - fi - - if [ "X${USE_VP9D_OMX}" = "X1" ]; then - ln -s libomxr_mc_vp9d.so.3.0.0 libomxr_mc_vp9d.so.3 - ln -s libomxr_mc_vp9d.so.3 libomxr_mc_vp9d.so - - ln -s libuvcs_vp9d.so.3.0.0 libuvcs_vp9d.so.3 - ln -s libuvcs_vp9d.so.3 libuvcs_vp9d.so - fi -} - -do_install_audio_middleware() { - cd ${D}/${libdir} - - if [ "X${USE_AACLC_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${AAC_MIDDLEWARE_SRC}/${baselib}/libAACDLA_L.so.3.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${AAC_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libAACDLA_L.so.3.0 libAACDLA_L.so.3 - ln -s libAACDLA_L.so.3 libAACDLA_L.so - fi - - if [ "X${USE_AACPV2_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${AACPV2_MIDDLEWARE_SRC}/${baselib}/libRSACPDLA_L.so.2.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${AACPV2_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libRSACPDLA_L.so.2.0 libRSACPDLA_L.so.2 - ln -s libRSACPDLA_L.so.2 libRSACPDLA_L.so - fi - - if [ "X${USE_MP3_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${MP3_MIDDLEWARE_SRC}/${baselib}/libMP3DLA_L.so.2.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${MP3_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libMP3DLA_L.so.2.0 libMP3DLA_L.so.2 - ln -s libMP3DLA_L.so.2 libMP3DLA_L.so - fi - - if [ "X${USE_WMA_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${WMA_MIDDLEWARE_SRC}/${baselib}/libWMASTDLA_L.so.2.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${WMA_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libWMASTDLA_L.so.2.0 libWMASTDLA_L.so.2 - ln -s libWMASTDLA_L.so.2 libWMASTDLA_L.so - fi - - if [ "X${USE_DD_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${DD_MIDDLEWARE_SRC}/${baselib}/libRSDACDLA_L.so.2.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${DD_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libRSDACDLA_L.so.2.0 libRSDACDLA_L.so.2 - ln -s libRSDACDLA_L.so.2 libRSDACDLA_L.so - fi - - if [ "X${USE_AACLCE_MDW}" = "X1" ]; then - install -m 755 ${WORKDIR}/${AEAAC_MIDDLEWARE_SRC}/${baselib}/libRSAACELA_L.so.3.0 \ - ${D}/${libdir} - install -m 644 ${WORKDIR}/${AEAAC_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} - - ln -s libRSAACELA_L.so.3.0 libRSAACELA_L.so.3 - ln -s libRSAACELA_L.so.3 libRSAACELA_L.so - fi -} - -do_install_omx_audio() { - cd ${D}/${libdir} - for omxmc in ${OMX_AUDIO_SRC_LIST} - do - src="${WORKDIR}/${omxmc}/" - install -m 755 ${src}/${baselib}/lib*.so.* ${D}/${libdir} - if [ -d ${src}/include ]; then - install -m 644 ${src}/include/*.h ${D}/${includedir} - fi - install -m 644 ${src}/config/*.txt ${D}/${sysconfdir}/omxr - done - - if [ "X${USE_AUDIO_OMX}" = "X1" ]; then - ln -s libomxr_mc_acmn.so.3.0.0 libomxr_mc_acmn.so.3 - ln -s libomxr_mc_acmn.so.3 libomxr_mc_acmn.so - fi - - if [ "X${USE_AACLCD_OMX}" = "X1" ]; then - ln -s libomxr_mc_aacd.so.3.0.0 libomxr_mc_aacd.so.3 - ln -s libomxr_mc_aacd.so.3 libomxr_mc_aacd.so - fi - - if [ "X${USE_AACPV2D_OMX}" = "X1" ]; then - ln -s libomxr_mc_aapd.so.3.0.0 libomxr_mc_aapd.so.3 - ln -s libomxr_mc_aapd.so.3 libomxr_mc_aapd.so - fi - - if [ "X${USE_MP3D_OMX}" = "X1" ]; then - ln -s libomxr_mc_mp3d.so.3.0.0 libomxr_mc_mp3d.so.3 - ln -s libomxr_mc_mp3d.so.3 libomxr_mc_mp3d.so - fi - - if [ "X${USE_WMAD_OMX}" = "X1" ]; then - ln -s libomxr_mc_wmad.so.3.0.0 libomxr_mc_wmad.so.3 - ln -s libomxr_mc_wmad.so.3 libomxr_mc_wmad.so - fi - - if [ "X${USE_ALACD_OMX}" = "X1" ]; then - ln -s libomxr_mc_alacd.so.3.0.0 libomxr_mc_alacd.so.3 - ln -s libomxr_mc_alacd.so.3 libomxr_mc_alacd.so - fi - - if [ "X${USE_FLACD_OMX}" = "X1" ]; then - ln -s libomxr_mc_flacd.so.3.0.0 libomxr_mc_flacd.so.3 - ln -s libomxr_mc_flacd.so.3 libomxr_mc_flacd.so - fi - - if [ "X${USE_AACLCE_OMX}" = "X1" ]; then - ln -s libomxr_mc_aace.so.3.0.0 libomxr_mc_aace.so.3 - ln -s libomxr_mc_aace.so.3 libomxr_mc_aace.so - fi - - if [ "X${USE_DDD_OMX}" = "X1" ]; then - ln -s libomxr_mc_ddd.so.3.0.0 libomxr_mc_ddd.so.3 - ln -s libomxr_mc_ddd.so.3 libomxr_mc_ddd.so - fi -} - -do_install () { - if [ "X${USE_OMX_COMMON}" = "X1" ]; then - oe_runmake 'DESTDIR=${D}' install - # Info dir listing isn't interesting at this point so remove it if it exists. - if [ -e "${D}/${infodir}/dir" ]; then - rm -f ${D}/${infodir}/dir - fi - fi -} - -do_install_append() { - # Create destination directory - install -d ${D}/${libdir} - install -d ${D}/${includedir} - if [ "X${USE_OMX_COMMON}" = "X1" ]; then - install -d ${D}/${sysconfdir}/omxr - fi - - # Copy omx video library - do_install_omx_video - # Copy audio middleware library - do_install_audio_middleware - # Copy omx audio library - do_install_omx_audio -} - -INSANE_SKIP_${PN} = "dev-so" - -FILES_${PN} += " \ - ${libdir}/*.so \ -" - -FILES_${PN}-dev = " \ - ${includedir} \ - ${libdir}/*.la \ -" - -RDEPENDS_${PN} += "mmngr-user-module vspmif-user-module" -RDEPENDS_${PN} += '${@oe.utils.conditional("USE_ALACD_OMX", "1", "libalacdla-l", "", d )}' -RDEPENDS_${PN} += '${@oe.utils.conditional("USE_FLACD_OMX", "1", "libflacdla-l", "", d )}' - -# Skip debug strip of do_populate_sysroot() -INHIBIT_SYSROOT_STRIP = "1" - -# Skip debug split and strip of do_package() -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch deleted file mode 100644 index dbc1eccb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 5e9eff188ada13e1c1986d5611a42e0779fe7fd1 Mon Sep 17 00:00:00 2001 -From: Thao Nguyen -Date: Mon, 18 Sep 2017 17:09:21 +0700 -Subject: [PATCH] Fix QA issue when build with Yocto - -Yocto project has updated Linker Hash Style Changed in YP2.4. -Makefile should be updated to avoid QA error. - -ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/proj/yocto/gen3/v3.4.0-pt2/build/tmp/work/aarch64-poky-linux/open-avb/1.1+gitAUTOINC+5e43fa5ae2-r0/packages-split/open-avb-gptp/usr/bin/daemon_cl' [ldflags] -ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. -ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: Function failed: do_package_qa - -Signed-off-by: Thao Nguyen -Signed-off-by: Masaru Nagai ---- - daemons/gptp/linux/build/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/daemons/gptp/linux/build/Makefile b/daemons/gptp/linux/build/Makefile -index 1e00b1a..99fbf84 100644 ---- a/daemons/gptp/linux/build/Makefile -+++ b/daemons/gptp/linux/build/Makefile -@@ -131,7 +131,7 @@ LDFLAGS_G += -lpthread -lrt - - CFLAGS = $(CFLAGS_G) - CPPFLAGS = $(CPPFLAGS_G) --LDFLAGS = $(LDFLAGS_G) -+LDFLAGS += $(LDFLAGS_G) - - all: $(OBJ_DIR)/daemon_cl - --- -1.9.1 - diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb deleted file mode 100644 index 486a5b6e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb +++ /dev/null @@ -1,74 +0,0 @@ -DESCRIPTION = "OpenAvnu - an AVnu sponsored repository for Time Sensitive Network (TSN and AVB) technology" -HOMEPAGE = "https://github.com/AVnu/OpenAvnu" -LICENSE = "BSD & MIT & GPLv2 & LGPLv2" -LIC_FILES_CHKSUM = " \ - file://daemons/LICENSE;md5=81ccd62d4bc28bafc5e1a2576536b927 \ - file://daemons/shaper/LICENSE;md5=53e60f7a40864e4c075831415f2ecc59 \ - file://kmod/igb/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://kmod/igb/LICENSE;md5=e2c0cd0820d168b0b26e19f13df4dc56 \ - file://lib/igb/LICENSE;md5=9bc783ca40be823a8b237df5eed80fc4 \ - file://lib/avtp_pipeline/LICENSE;md5=485c2c585be88b59c3ee70a016f27959 \ - file://examples/LICENSE;md5=81ccd62d4bc28bafc5e1a2576536b927 \ - file://examples/gstreamer-avb-plugins/COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \ - file://examples/gstreamer-avb-plugins/COPYING.MIT;md5=bba6cdb9c2b03c849ed4975ed9ed90dc \ -" - -DEPENDS = "libpcap" - -PV = "1.1+git${SRCPV}" - -SRCREV = "5e43fa5ae27fbd2b89c320670a32143ce93e0e16" -SRC_URI = "git://github.com/AVnu/OpenAvnu.git;branch=master" - -# Fix QA issue of ldflags -SRC_URI_append = " file://0001-Fix-QA-issue-when-build-with-Yocto.patch" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}'" - -do_configure() { - oe_runmake daemons_all_clean -} - -do_compile() { - oe_runmake daemons_all -} - -do_install() { - install -d ${D}/${bindir} - install -m 755 daemons/maap/linux/build/maap_daemon ${D}/${bindir} - install -m 755 daemons/mrpd/mrpd daemons/mrpd/mrpctl ${D}/${bindir} - install -m 755 daemons/gptp/linux/build/obj/daemon_cl ${D}/${bindir} -} - -PACKAGES =+ " \ - ${PN}-gptp \ - ${PN}-mrpd \ - ${PN}-maap \ -" - -ALLOW_EMPTY_${PN} = "1" - -FILES_${PN}-gptp = " \ - ${bindir}/daemon_cl \ -" - -FILES_${PN}-mrpd = " \ - ${bindir}/mrpd \ - ${bindir}/mrpctl \ -" - -FILES_${PN}-maap = " \ - ${bindir}/maap_daemon \ -" - -RDEPENDS_${PN} = " \ - ${PN}-gptp \ - ${PN}-mrpd \ - ${PN}-maap \ -" - -RDEPENDS_${PN}-maap = " \ - libpcap \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb deleted file mode 100644 index e6894409..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb +++ /dev/null @@ -1,85 +0,0 @@ -SUMMARY = "GStreamer 1.0 package groups" -LICENSE = "MIT" - -require include/omx-control.inc - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good" -DEPENDS += "gstreamer1.0-plugins-bad" -DEPENDS += "gstreamer1.0-plugins-ugly" -DEPENDS += "${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-omx", "", d)}" - -LIC_FILES_CHKSUM = " \ - file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ -" - -PR = "r0" - -inherit packagegroup - -PACKAGES = " \ - packagegroup-gstreamer1.0-plugins \ - packagegroup-gstreamer1.0-plugins-base \ - packagegroup-gstreamer1.0-plugins-audio \ - packagegroup-gstreamer1.0-plugins-video \ - ${@oe.utils.conditional("USE_OMX_COMMON", "1", "packagegroup-gstreamer1.0-omx", "", d)} \ - packagegroup-gstreamer1.0-plugins-debug \ -" - -RDEPENDS_packagegroup-gstreamer1.0-plugins = " \ - packagegroup-gstreamer1.0-plugins-base \ - packagegroup-gstreamer1.0-plugins-audio \ - packagegroup-gstreamer1.0-plugins-video \ - ${@oe.utils.conditional("USE_OMX_COMMON", "1", "packagegroup-gstreamer1.0-omx", "", d)} \ - packagegroup-gstreamer1.0-plugins-debug \ -" - -RDEPENDS_packagegroup-gstreamer1.0-plugins-base = " \ - gstreamer1.0-meta-base \ - gstreamer1.0-plugins-base-typefindfunctions \ - gstreamer1.0-plugins-good-id3demux \ - gstreamer1.0-plugins-good-autodetect \ - ${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-plugin-vspfilter", "", d)} \ -" - -RDEPENDS_packagegroup-gstreamer1.0-plugins-audio = " \ - gstreamer1.0-meta-audio \ - gstreamer1.0-plugins-good-audioparsers \ - gstreamer1.0-plugins-base-audiotestsrc \ - gstreamer1.0-plugins-base-audioconvert \ - gstreamer1.0-plugins-base-audioresample \ - gstreamer1.0-plugins-base-alsa \ - gstreamer1.0-plugins-base-ogg \ - gstreamer1.0-plugins-base-vorbis \ -" - -RDEPENDS_packagegroup-gstreamer1.0-plugins-video = " \ - gstreamer1.0-meta-video \ - gstreamer1.0-plugins-base-videotestsrc \ - gstreamer1.0-plugins-base-videoconvert \ - gstreamer1.0-plugins-base-playback \ - gstreamer1.0-plugins-base-videoscale \ - gstreamer1.0-plugins-base-videorate \ - gstreamer1.0-plugins-good-matroska \ - gstreamer1.0-plugins-good-isomp4 \ - gstreamer1.0-plugins-good-avi \ - gstreamer1.0-plugins-good-videofilter \ - gstreamer1.0-plugins-good-videomixer \ - gstreamer1.0-plugins-good-videocrop \ - gstreamer1.0-plugins-good-video4linux2 \ - gstreamer1.0-plugins-good-jpeg \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \ - 'gstreamer1.0-plugins-bad-waylandsink', '', d)} \ - gstreamer1.0-plugins-bad-videoparsersbad \ - gstreamer1.0-plugins-bad-mpegtsdemux \ - gstreamer1.0-plugins-bad-jpegformat \ - gstreamer1.0-plugins-ugly-asf \ - gstreamer1.0-libav \ -" - -RDEPENDS_packagegroup-gstreamer1.0-omx = " \ - ${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-omx", "", d)} \ -" - -RDEPENDS_packagegroup-gstreamer1.0-plugins-debug = " \ - gstreamer1.0-meta-debug \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb deleted file mode 100644 index 7e8e7e43..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Multimedia kernel modules package groups" -LICENSE = "GPLv2 & MIT" - -require include/omx-control.inc - -DEPENDS = "kernel-module-mmngr kernel-module-mmngrbuf \ - kernel-module-vspm kernel-module-vspmif \ - kernel-module-vsp2driver \ -" - -DEPENDS += '${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )}' - -PR = "r0" - -inherit packagegroup - -PACKAGES = " \ - packagegroup-multimedia-kernel-modules \ -" - -RDEPENDS_packagegroup-multimedia-kernel-modules = " \ - kernel-module-mmngr \ - kernel-module-mmngrbuf \ - kernel-module-vspm \ - kernel-module-vspmif \ - kernel-module-vsp2driver \ -" - -RDEPENDS_packagegroup-multimedia-kernel-modules += " \ - ${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )} \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb deleted file mode 100644 index 323f6aeb..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Multimedia user libraries modules package groups" -LICENSE = "MIT" - -DEPENDS = "mmngr-user-module mmngrbuf-user-module \ - vspmif-user-module libalacdla-l libflacdla-l \ -" - -PR = "r0" - -inherit packagegroup - -PACKAGES = " \ - packagegroup-multimedia-libs \ -" - -RDEPENDS_packagegroup-multimedia-libs = " \ - mmngr-user-module mmngrbuf-user-module \ - vspmif-user-module \ - libalacdla-l libflacdla-l \ -" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb deleted file mode 100644 index 0070563c..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "VSP Manager Interface test app for R-Car Gen3" - -require vspmif.inc - -DEPENDS = "vspmif-user-module mmngr-user-module" -PN = "vspmif-tp-user-module" -PR = "r0" - -S = "${WORKDIR}/git" -VSPMIF_TP_DIR = "vspm_if-tp-user/files/vspm_if" - -# Get Wordsize of test app and change their names later to avoid override -WS_aarch64 = "" -WS_virtclass-multilib-lib32 = "32" - -do_compile() { - cd ${S}/${VSPMIF_TP_DIR} - make all -} - -do_install() { - # Create destination folder - install -d ${D}${RENESAS_DATADIR}/bin/ - - # Copy user test program - if [ X${WS} = "X32" ]; then - install -m 755 ${S}/${VSPMIF_TP_DIR}/vspm_tp ${D}${RENESAS_DATADIR}/bin/vspm_tp32 - install -m 755 ${S}/${VSPMIF_TP_DIR}/fdpm_tp ${D}${RENESAS_DATADIR}/bin/fdpm_tp32 - else - install -m 755 ${S}/${VSPMIF_TP_DIR}/vspm_tp ${D}${RENESAS_DATADIR}/bin/ - install -m 755 ${S}/${VSPMIF_TP_DIR}/fdpm_tp ${D}${RENESAS_DATADIR}/bin/ - fi -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dbg \ -" -FILES_${PN} = " \ - ${@oe.utils.conditional('WS', '32', '${RENESAS_DATADIR}/bin/vspm_tp32 ${RENESAS_DATADIR}/bin/fdpm_tp32', \ - '${RENESAS_DATADIR}/bin/vspm_tp ${RENESAS_DATADIR}/bin/fdpm_tp', d)}" - -FILES_${PN}-dbg = " \ - ${RENESAS_DATADIR}/bin/.debug/*" - -RPROVIDES_${PN} += "vspmif-tp-user-module" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb deleted file mode 100644 index bf7fef63..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb +++ /dev/null @@ -1,49 +0,0 @@ -DESCRIPTION = "VSP Manager Interface library for R-Car Gen3" - -require vspmif.inc - -DEPENDS = "kernel-module-vspmif mmngr-user-module" -PN = "vspmif-user-module" -PR = "r0" - -S = "${WORKDIR}/git" -VSPMIF_LIB_DIR = "vspm_if-module/files/vspm_if" - -EXTRA_OEMAKE = "ARCH=${TARGET_ARCH}" - -includedir = "${RENESAS_DATADIR}/include" - -do_compile() { - export VSPM_LEGACY_IF="1" - - # Build shared library - cd ${S}/${VSPMIF_LIB_DIR}/if - rm -rf ${S}/${VSPMIF_LIB_DIR}/if/libvspm.so* - oe_runmake -} - -do_install() { - # Create destination folders - install -d ${D}/${libdir} - install -d ${D}/${includedir} - - # Copy shared library - install -m 755 ${S}/${VSPMIF_LIB_DIR}/if/libvspm.so* ${D}/${libdir}/ - cd ${D}/${libdir}/ - ln -sf libvspm.so.1.0.0 libvspm.so.1 - ln -sf libvspm.so.1 libvspm.so - - # Copy shared header files - install -m 644 ${S}/${VSPMIF_LIB_DIR}/include/vspm_public.h ${D}/${includedir}/ - install -m 644 ${S}/${VSPMIF_LIB_DIR}/include/fdpm_api.h ${D}/${includedir}/ -} - -PACKAGES = "\ - ${PN} \ - ${PN}-dev \ - ${PN}-dbg \ -" - -RPROVIDES_${PN} += "vspmif-user-module" -INSANE_SKIP_${PN} += "libdir" -INSANE_SKIP_${PN}-dev += "libdir" diff --git a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc b/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc deleted file mode 100644 index 34e8587e..00000000 --- a/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc +++ /dev/null @@ -1,15 +0,0 @@ -LICENSE = "MIT" -LIC_FILES_CHKSUM = " \ - file://COPYING.MIT;md5=30a99e0d36a3da1f5cf93c070ad7888a \ -" - -require include/rcar-gen3-modules-common.inc - -VSPMIF_LIB_URL = "git://github.com/renesas-rcar/vspmif_lib.git" -BRANCH = "rcar_gen3" -SRCREV = "06fe8b1341801079f8a2b964ea95980967dcf789" - -SRC_URI = "${VSPMIF_LIB_URL};branch=${BRANCH}" - -# This module is machine specific. -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-renesas/.gitignore b/bsp/meta-renesas/.gitignore new file mode 100644 index 00000000..5cc4bc0a --- /dev/null +++ b/bsp/meta-renesas/.gitignore @@ -0,0 +1,2 @@ +*.tar.bz2 +*.tar.gz diff --git a/bsp/meta-renesas/COPYING.MIT b/bsp/meta-renesas/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/bsp/meta-renesas/COPYING.MIT @@ -0,0 +1,17 @@ +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. diff --git a/bsp/meta-renesas/MAINTAINERS b/bsp/meta-renesas/MAINTAINERS new file mode 100644 index 00000000..4921617a --- /dev/null +++ b/bsp/meta-renesas/MAINTAINERS @@ -0,0 +1,28 @@ +This file contains a list of BSP maintainers for the BSPs contained in +the meta-renesas repository. + +Descriptions of section entries: + + M: Mail patches to: FullName + F: Files and directories with wildcard patterns. + A trailing slash includes all files and subdirectory files. + F: meta-XXXXX/ all files in and below meta-XXXXX + F: meta-XXXXX/* all files in meta-XXXXX, but not below + One pattern per line. Multiple F: lines acceptable. + +Please keep this list in alphabetical order. + +Maintainers List (try to look for most precise areas first) + + ----------------------------------- +Renesas ARM SoCs R-Car Generation 3 +M: Takamitsu Honda +F: meta-rcar-gen3 + +Renesas ARM SoCs R-Car Generation 2 +M: Takamitsu Honda +F: meta-rcar-gen2 + +COMMON +M: Takamitsu Honda +F: common diff --git a/bsp/meta-renesas/README.md b/bsp/meta-renesas/README.md new file mode 100644 index 00000000..7eb9de96 --- /dev/null +++ b/bsp/meta-renesas/README.md @@ -0,0 +1,28 @@ +# OpenEmbedded/Yocto BSP layer for Renesas Electronics's SoCs + +This layer provides support for Renesas Electronics's platforms for use with +OpenEmbedded and/or Yocto. + +Layer maintainer: Takamitsu Honda + +## Supported Boards/Machines + + +In addition, this also provides layer which supports boards using Renesas SoCs. +Layer and boards that support is the following: + + meta-rcar-gen3 + - Renesas Electronics Corporation. Salvator-X (R8A7795/R8A7796/R8A77965) + - Renesas Electronics Corporation. R-Car Starter Kit premier(H3ULCB) (R8A7795) + - Renesas Electronics Corporation. R-Car Starter Kit pro(M3ULCB) (R8A7796) + - Renesas Electronics Corporation. R-Car Starter Kit pro(M3NULCB) (R8A77965) + - Renesas Electronics Corporation. R-Car Ebisu (R8A77990) + +Please see README in the layer directory for the description of the board. + +## Original BSP image + +The meta-renesas layer provides original BSP image. The following: + +* core-image-minimal +* core-image-weston diff --git a/bsp/meta-renesas/meta-rcar-gen3/COPYING.MIT b/bsp/meta-renesas/meta-rcar-gen3/COPYING.MIT new file mode 100644 index 00000000..89de3547 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/COPYING.MIT @@ -0,0 +1,17 @@ +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. diff --git a/bsp/meta-renesas/meta-rcar-gen3/README.evaproprietary.md b/bsp/meta-renesas/meta-rcar-gen3/README.evaproprietary.md new file mode 100644 index 00000000..69a33d8c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/README.evaproprietary.md @@ -0,0 +1,121 @@ +# R-Car Gen3 Evaluation Software Package for Linux + + +The meta-rcar-gen3 layer of meta-renesas supports the Click-through licensed +Linux Drivers and Gfx/MMP packages. + +This README describes how to use these features and setting local.conf. + +```bash + I/ Build configuration + II/ Obtain and Install Renesas Graphics Drivers +``` + +**NOTE:** + +* However, to have a completed local.conf, please also refer to Build +Instruction in [meta-renesas/meta-rcar-gen3/README.md](README.md). + +* In addition, these libraries are not provided with recipes. If you would like +to use, you will need to get them from Renesas. + +## I/ Build configuration + + +* Add the target board to local.conf + + * For Salvator-X board + + ```bash + MACHINE = "salvator-x" + ``` + + * For R-Car Starter Kit Premier(H3ULCB) board + + ```bash + MACHINE = "h3ulcb" + ``` + + * For R-Car Starter Kit Pro(M3ULCB) board + + ```bash + MACHINE = "m3ulcb" + ``` + + * For R-Car Starter Kit Pro(M3NULCB) board + + ```bash + MACHINE = "m3nulcb" + ``` + + * For Ebisu board + + ```bash + MACHINE = "ebisu" + ``` + +* Set SOC family name + + * For H3: r8a7795 + + ```bash + SOC_FAMILY = "r8a7795" + ``` + + * For M3: r8a7796 + + ```bash + SOC_FAMILY = "r8a7796" + ``` + + * For M3N: r8a77965 + + ```bash + SOC_FAMILY = "r8a77965" + ``` + + * For E3: r8a77990 + + ```bash + # Already added in machine config: ebisu.conf + SOC_FAMILY = "r8a77990" + ``` + +* When using the click-through version of the gfx/mmp packages, you need to add +the following to your local.conf + +```bash + DISTRO_FEATURES_append = " use_eva_pkg" +``` + +## II/ Obtain and Install Renesas Graphics Drivers + + +Before setting up the build environment, you need to download the proprietary +drivers. + +* Download Renesas graphic drivers with a "click through" license from +[Renesas website][rcar Linux Drivers] and unzip them into a folder. + +**NOTE:** + +* You have to register with a free account on MyRenesas and accept the license +conditions before downloading the drivers. +The operation is fast and simple nevertheless mandatory to access evaluation of +non open-source drivers for free. +Once you registered, you can download two zip files. + +```bash +$ cd +$ unzip -o R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip +$ unzip -o R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip +``` + +To install them into the correct place in the Yocto BSP, a copy script is used. + +```bash +$ cd ./meta-renesas +$ sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh +``` + +[rcar Linux Drivers]: https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html diff --git a/bsp/meta-renesas/meta-rcar-gen3/README.md b/bsp/meta-renesas/meta-rcar-gen3/README.md new file mode 100644 index 00000000..aabb63c9 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/README.md @@ -0,0 +1,233 @@ +# meta-rcar-gen3 + + +This layer provides the support for the evaluation board mounted ARM SoCs of +Renesas Electronics, called the R-Car Generation 3. + +Currently, this supports boards and the SoCs of the following: + +```bash + - Board: Salvator-X / SoC: R8A7795 (R-Car H3), R8A7796 (R-Car M3), R8A77965 (R-Car M3N) + - Board: R-Car Starter Kit premier(H3ULCB) / SoC: R8A7795 (R-Car H3) + - Board: R-Car Starter Kit pro(M3ULCB) / SoC: R8A7796 (R-Car M3) + - Board: R-Car Starter Kit pro(M3NULCB) / SoC: R8A77965 (R-Car M3N) + - Board: Ebisu / SoC: R8A77990 (R-Car E3) +``` + +## Branch Policy + + +* This is Community Yocto BSP to follow Yocto/Poky releases. + +* It is not supported to the level of the Customer Yocto BSP. + +## Tag Policy + + +* Releases are created from the respective working branch. + +* After a Customer Yocto BSP version releases, the Community Yocto BSP will be +rebased and released accordingly. + +* dunfell-X: + + * The versions used on dunfell (Yocto Project 3.1) will start on + dunfell-Yocto-v3.21.0 to keep the major version numbers in sync. + +## Contribution + + +* Please submit any patches for this layer to: takamitsu.honda.pv@renesas.com + +* Please see the MAINTAINERS file for more details. + +## Layer Dependencies + + +This layer depends on: + +* poky + +```bash + URI: git://git.yoctoproject.org/poky + layers: meta, meta-poky, meta-yocto-bsp + branch: dunfell +``` + +* meta-openembedded + +```bash + URI: git://git.openembedded.org/meta-openembedded + layers: meta-oe, meta-python + branch: dunfell +``` + +## Build Instructions + + +The following instructions require a Poky installation (or equivalent). + +* This also needs git user name and email defined: + +```bash + $ git config --global user.email "you@example.com" + $ git config --global user.name "Your Name" +``` + +* Initialize a build using the 'oe-init-build-env' script in Poky. e.g.: + +```bash + $ source poky/oe-init-build-env +``` + +* After that, initialized configure bblayers.conf by adding meta-rcar-gen3 layer. +e.g.: + +```bash + BBLAYERS ?= " \ + /poky/meta \ + /poky/meta-poky \ + /poky/meta-yocto-bsp \ + /meta-renesas/meta-rcar-gen3 \ + /meta-openembedded/meta-python \ + /meta-openembedded/meta-oe \ + " +``` + +* To build a specific target BSP, configure the associated machine in local.conf: + +```bash + MACHINE ??= "" +``` + +Board|MACHINE +-----|------- +Salvator-X/XS|MACHINE="salvator-x" +Ebisu|MACHINE="ebisu" +Starter Kit Pro (M3ULCB)|MACHINE="m3ulcb" +Starter Kit Pro (M3NULCB)|MACHINE="m3nulcb" +Starter Kit Premier (H3ULCB)|MACHINE="h3ulcb" + +* Select the SOC + + * For H3: r8a7795 + + ```bash + SOC_FAMILY = "r8a7795" + ``` + + * For M3: r8a7796 + + ```bash + SOC_FAMILY = "r8a7796" + ``` + + * For M3N: r8a77965 + + ```bash + SOC_FAMILY = "r8a77965" + ``` + + * For E3: r8a77990 + + ```bash + # Already added in machine config: ebisu.conf + SOC_FAMILY = "r8a77990" + ``` + +* Configure for systemd init in local.conf: + +```bash + DISTRO_FEATURES_append = " systemd" + VIRTUAL-RUNTIME_init_manager = "systemd" +``` + +* Configure for ivi-shell and ivi-extension + +```bash + DISTRO_FEATURES_append = " ivi-shell" +``` + +* Configure for USB 3.0 + +```bash + MACHINE_FEATURES_append = " usb3" +``` + +* Enable tuning support for Capacity Aware migration Strategy (CAS) + +```bash + MACHINE_FEATURES_append = " cas" +``` + +* For a list of sample local.conf file, please refer to: [docs/sample/conf/](docs/sample/conf/) + +* Build the target file system image using bitbake: + +```bash + $ bitbake core-image-minimal +``` + +After completing the images for the target machine will be available in the +output directory 'tmp/deploy/images/'. + +Images generated: + +* Image (generic Linux Kernel binary image file) + +* \-\.dtb (DTB for target machine) + +* core-image-minimal-\.tar.bz2 (rootfs tar+bzip2) + +* core-image-minimal-\.ext4 (rootfs ext4 format) + +## Build Instructions for SDK + + +NOTE: + +**This may be changed in the near feature. These instructions are tentative.** + +Should define the staticdev in SDK image feature for installing the static libs +to SDK in local.conf. + +```bash + SDKIMAGE_FEATURES_append = " staticdev-pkgs" +``` + +### For 64-bit target SDK (aarch64) + + +Use `bitbake -c populate_sdk` for generating the toolchain SDK + +```bash + $ bitbake core-image-minimal -c populate_sdk +``` + +The SDK can be found in the output directory `tmp/deploy/sdk` + +* `poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh` + +### Usage of toolchain SDK + + +Install the SDK to the default: `/opt/poky/x.x` + +* For 64-bit target SDK + +```bash + $ sh poky-glibc-x86_64-core-image-minimal-aarch64-toolchain-x.x.sh +``` + +* For 64-bit application, using environment script in `/opt/poky/x.x` + +```bash + $ source /opt/poky/x.x/environment-setup-aarch64-poky-linux +``` + +## R-Car Generation 3 Information + + +Refer to the following for more information from eLinux website + +https://elinux.org/R-Car diff --git a/bsp/meta-renesas/meta-rcar-gen3/README.proprietary.md b/bsp/meta-renesas/meta-rcar-gen3/README.proprietary.md new file mode 100644 index 00000000..22da393d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/README.proprietary.md @@ -0,0 +1,219 @@ +# Proprietary libraries for meta-rcar-gen3 + + +The meta-rcar-gen3 layer of meta-renesas is supported Graphic GLES(GSX) +libraries, proprietary library of multimedia, and ICCOM software. + +This README describes how to use these features and setting to local.conf. + +```bash + I/ Board configuration + II/ Build with GLES + III/ Build with Renesas multimedia libraries + IV/ Enable Linux ICCOM driver and Linux ICCOM library +``` + +There are 2 main paths: + +* Please check section II to config for GLES. +* Please check section III to enable Multimedia functions. + +If you would like to use Linux ICCOM driver and Linux ICCOM library, please +check section IV. + +**NOTE:** + +* However, to have a completed local.conf, please also refer to Build +Instruction in [meta-renesas/meta-rcar-gen3/README.md](README.md). + +* In addition, these libraries are not provided with recipes. If you would like +to use, you will need to get them from Renesas. + +## I/ Board configuration + + +* Add this line to local.conf + + * For Salvator-X board + + ```bash + MACHINE = "salvator-x" + ``` + + * For R-Car Starter Kit Premier(H3ULCB) board + + ```bash + MACHINE = "h3ulcb" + ``` + + * For R-Car Starter Kit Pro(M3ULCB) board + + ```bash + MACHINE = "m3ulcb" + ``` + + * For R-Car Starter Kit Pro(M3NULCB) board + + ```bash + MACHINE = "m3nulcb" + ``` + + * For Ebisu board + + ```bash + MACHINE = "ebisu" + ``` + +* Set SOC family name + + * For H3: r8a7795 + + ```bash + SOC_FAMILY = "r8a7795" + ``` + + * For M3: r8a7796 + + ```bash + SOC_FAMILY = "r8a7796" + ``` + + * For M3N: r8a77965 + + ```bash + SOC_FAMILY = "r8a77965" + ``` + + * For E3: r8a77990 + + ```bash + # Already added in machine config: ebisu.conf + SOC_FAMILY = "r8a77990" + ``` + +## II/ Build with GLES + + +For wayland with GSX + +* Please copy proprietary libraries to the directory of recipes. + +* Set local.conf the following. + +```bash + # Enable Gfx Pkgs + MACHINE_FEATURES_append = " gsx" + MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + + # for Wayland/Weston + DISTRO_FEATURES_NATIVESDK_append = " wayland" + DISTRO_FEATURES_append = " pam" + PREFERRED_PROVIDER_virtual/libgles1 = "" + PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" + PREFERRED_PROVIDER_virtual/egl = "libegl" + PREFERRED_PROVIDER_virtual/libgl = "" + PREFERRED_PROVIDER_virtual/mesa = "" + PREFERRED_PROVIDER_libgbm = "libgbm" + PREFERRED_PROVIDER_libgbm-dev = "libgbm" + BBMASK = "mesa-gl" +``` + +* Run `bitbake core-image-weston` + +## III/ Build with Renesas multimedia libraries + + +Multimedia portions depend on GLES portions. + +### A/ Configuration for Multimedia features + + +* Please copy proprietary libraries to the directory of recipes. + +* Please set local.conf the following. + +```bash + # Enable multimedia features. + # This provides package group of plug-ins of the GStreamer, multimedia + # libraries and kernel drivers. + + MACHINE_FEATURES_append = " multimedia" +``` + +### B/ Configuration for optional codecs and middleware + + +* Please copy proprietary libraries to the directory of recipes. + +* Add features to DISTRO_FEATURES_append to local.conf + +```bash + # Additional configuration in OMX module + " h263dec_lib" - for OMX Media Component H263 Decoder Library + " h264dec_lib" - for OMX Media Component H264 Decoder Library + " h264enc_lib" - for OMX Media Component H.264 Encoder Library + " h265dec_lib" - for OMX Media Component H265 Decoder Library + " mpeg2dec_lib" - for OMX Media Component MPEG2 Decoder Library + " mpeg4dec_lib" - for OMX Media Component MPEG4 Decoder Library + " vc1dec_lib" - for OMX Media Component VC-1 Decoder Library + " divxdec_lib" - for OMX Media Component DivX Decoder Library + " rvdec_lib" - for OMX Media Component RealVideo Decoder Library + " alacdec_lib" - for OMX Media Component ALAC Decoder Library + " flacdec_lib" - for OMX Media Component FLAC Decoder Library + " aaclcdec_lib" - for OMX Media Component AAC-LC Decoder Library + " aaclcdec_mdw" - for AAC-LC 2ch Decoder Middleware for Linux + " aacpv2dec_lib" - for OMX Media Component aacPlus V2 Decoder Library + " aacpv2dec_mdw" - for aacPlus V2 Decoder Middleware for Linux + " mp3dec_lib" - for OMX Media Component MP3 Decoder Library + " mp3dec_mdw" - for MP3 Decoder Middleware for Linux + " wmadec_lib" - for OMX Media Component WMA Standard Decoder Library + " wmadec_mdw" - for WMA Standard Decoder Middleware for Linux + " dddec_lib" - for OMX Media Component Dolby(R) Digital Decoder Library + " dddec_mdw" - for Dolby(R) Digital Decoder Middleware for Linux + " aaclcenc_lib" - for OMX Media Component AAC-LC Encoder Library + " vp8dec_lib" - for OMX Media Component VP8 Decoder Library for Linux + " vp8enc_lib" - for OMX Media Component VP8 Encoder Library for Linux + " vp9dec_lib" - for OMX Media Component VP9 Decoder Library for Linux + " aaclcenc_mdw" - for AAC-LC Encoder Middleware for Linux + " cmsbcm" - for CMS Basic Color Management Middleware for Linux + " cmsblc" - for CMS CMM3 Backlight Control Middleware for Linux + " cmsdgc" - for CMS VSP2 Dynamic Gamma Correction Middleware for Linux + " dtv" - for ISDB-T DTV Software Package for Linux + " dvd" - for DVD Core-Middleware for Linux + " adsp" - for ADSP driver, ADSP interface and ADSP framework for Linux + " avb" - for AVB Software Package for Linux +``` + +Ex: +``` + DISTRO_FEATURES_append = " h264dec_lib h265dec_lib mpeg2dec_lib aaclcdec_lib aaclcdec_mdw" +``` + +### C/ Configuration for test packages + + +Must ensure that Multimedia features have been enabled. +(Please refer to III/A to enable Multimedia.) + +* Please add feature to DISTRO_FEATURES_append to local.conf. + +```bash + # Configuration for multimedia test package + + DISTRO_FEATURES_append = " mm-test" +``` + +## IV/ Enable Linux ICCOM driver and Linux ICCOM library + + +For Linux ICCOM driver and Linux ICCOM library + +* Please copy proprietary libraries to the directory of recipes. + +* Please set local.conf the following. + +```bash + DISTRO_FEATURES_append = " iccom" +``` +END. + diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/layer.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/layer.conf new file mode 100644 index 00000000..5b57bd7a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "rcar-gen3" +BBFILE_PATTERN_rcar-gen3 = "^${LAYERDIR}/" +BBFILE_PRIORITY_rcar-gen3 = "6" +LAYERSERIES_COMPAT_rcar-gen3 = "dunfell" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/ebisu.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/ebisu.conf new file mode 100644 index 00000000..59ded187 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/ebisu.conf @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: Ebisu machine +#@DESCRIPTION: Machine configuration for running Ebisu + +SOC_FAMILY = "r8a77990" + +DEFAULTTUNE ?= "cortexa53" +require conf/machine/include/tune-cortexa53.inc +require conf/machine/include/rcar_common.inc + +# Device tree for E3 +KERNEL_DEVICETREE = " \ + renesas/r8a77990-ebisu.dtb \ + renesas/r8a77990-ebisu-4d.dtb \ + renesas/r8a77990-es10-ebisu.dtb \ + renesas/r8a77990-es10-ebisu-4d.dtb \ +" + +# E3 u-boot configure +UBOOT_CONFIG ??= "ebisu ebisu-4d" +UBOOT_CONFIG[ebisu] = "r8a77990_ebisu_defconfig" +UBOOT_CONFIG[ebisu-4d] = "r8a77990_ebisu-4d_defconfig" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/h3ulcb.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/h3ulcb.conf new file mode 100644 index 00000000..78e6e4ff --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/h3ulcb.conf @@ -0,0 +1,21 @@ +#@TYPE: Machine +#@NAME: H3ULCB machine +#@DESCRIPTION: Machine configuration for running H3ULCB + +SOC_FAMILY = "r8a7795" + +DEFAULTTUNE ?= "cortexa57-cortexa53" +require conf/machine/include/tune-cortexa57-cortexa53.inc +require conf/machine/include/rcar_ulcb.inc + +# Device tree for H3ULCB +KERNEL_DEVICETREE = " \ + renesas/r8a7795-h3ulcb.dtb \ + renesas/r8a7795-es1-h3ulcb.dtb \ + renesas/r8a7795-h3ulcb-4x2g.dtb \ +" + +# H3ULCB u-boot configure +UBOOT_CONFIG ??= "h3ulcb h3ulcb-4x2g" +UBOOT_CONFIG[h3ulcb] = "r8a7795_ulcb_defconfig" +UBOOT_CONFIG[h3ulcb-4x2g] = "r8a7795_ulcb-4x2g_defconfig" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7795.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7795.inc new file mode 100644 index 00000000..dda3d76d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7795.inc @@ -0,0 +1,3 @@ +SOC_FAMILY =. "rcar-gen3:" +require conf/machine/include/soc-family.inc +LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7796.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7796.inc new file mode 100644 index 00000000..dda3d76d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a7796.inc @@ -0,0 +1,3 @@ +SOC_FAMILY =. "rcar-gen3:" +require conf/machine/include/soc-family.inc +LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77965.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77965.inc new file mode 100644 index 00000000..dda3d76d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77965.inc @@ -0,0 +1,3 @@ +SOC_FAMILY =. "rcar-gen3:" +require conf/machine/include/soc-family.inc +LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77990.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77990.inc new file mode 100644 index 00000000..dda3d76d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/r8a77990.inc @@ -0,0 +1,3 @@ +SOC_FAMILY =. "rcar-gen3:" +require conf/machine/include/soc-family.inc +LINUXLIBCVERSION = "4.14%" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_common.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_common.inc new file mode 100644 index 00000000..90b385c1 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_common.inc @@ -0,0 +1,33 @@ +require conf/machine/include/${SOC_FAMILY}.inc + +# 32BIT package install (default is disable) +# This variables can be used only in multilib. +USE_32BIT_PKGS ?= "0" +USE_32BIT_WAYLAND ?= "0" +USE_32BIT_MMP ?= "0" + +MACHINE_FEATURES = "" + +KERNEL_IMAGETYPE = "Image" +IMAGE_FSTYPES_append = " tar.bz2 ext4" + +SERIAL_CONSOLES = "115200;ttySC0" + +# Configuration for kernel +PREFERRED_PROVIDER_virtual/kernel = "linux-renesas" + +# Configuration for ARM Trusted Firmware +EXTRA_IMAGEDEPENDS += " arm-trusted-firmware optee-os" + +# u-boot +PREFERRED_VERSION_u-boot = "v2018.09%" +EXTRA_IMAGEDEPENDS += " u-boot" + +# libdrm +PREFERRED_VERSION_libdrm = "2.4.100" + +# Add variable to Build Configuration in build log +BUILDCFG_VARS_append = " SOC_FAMILY" + +# Command using to build kernel-module-gles +HOSTTOOLS += "sync" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_ulcb.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_ulcb.inc new file mode 100644 index 00000000..1c107ef1 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/rcar_ulcb.inc @@ -0,0 +1,3 @@ +require conf/machine/include/rcar_common.inc + +MACHINEOVERRIDES .= ":ulcb" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc new file mode 100644 index 00000000..b4944e0f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/include/tune-cortexa57.inc @@ -0,0 +1,20 @@ +DEFAULTTUNE ?= "cortexa57" + +TUNEVALID[cortexa57] = "Enable Cortex-A57 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa57', ' -mcpu=cortex-a57', '', d)}" + +MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "cortexa57", "cortexa57:", "" ,d)}" +TUNECONFLICTS[aarch64] = "armv4 armv5 armv6 armv7 armv7a" + +require conf/machine/include/arm/arch-armv8a.inc + +# Little Endian base configs +AVAILTUNES += "cortexa57 cortexa57-crypto" +ARMPKGARCH_tune-cortexa57 = "cortexa57" +ARMPKGARCH_tune-cortexa57-crypto = "cortexa57" +TUNE_FEATURES_tune-cortexa57 = "aarch64 cortexa57 crc" +TUNE_FEATURES_tune-cortexa57-crypto = "aarch64 cortexa57 crc crypto" +PACKAGE_EXTRA_ARCHS_tune-cortexa57 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa57" +PACKAGE_EXTRA_ARCHS_tune-cortexa57-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa57 cortexa57-crypto" +BASE_LIB_tune-cortexa57 = "lib64" +BASE_LIB_tune-cortexa57-crypto = "lib64" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3nulcb.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3nulcb.conf new file mode 100644 index 00000000..a6054d7d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3nulcb.conf @@ -0,0 +1,15 @@ +#@TYPE: Machine +#@NAME: M3NULCB machine +#@DESCRIPTION: Machine configuration for running M3NULCB + +SOC_FAMILY = "r8a77965" + +DEFAULTTUNE ?= "cortexa57" +require conf/machine/include/tune-cortexa57.inc +require conf/machine/include/rcar_ulcb.inc + +# Device tree for M3NULCB +KERNEL_DEVICETREE = "renesas/r8a77965-m3nulcb.dtb" + +# M3NULCB u-boot configure +UBOOT_MACHINE = "r8a77965_ulcb_defconfig" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3ulcb.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3ulcb.conf new file mode 100644 index 00000000..80c4a6e8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/m3ulcb.conf @@ -0,0 +1,20 @@ +#@TYPE: Machine +#@NAME: M3ULCB machine +#@DESCRIPTION: Machine configuration for running M3ULCB + +SOC_FAMILY = "r8a7796" + +DEFAULTTUNE ?= "cortexa57-cortexa53" +require conf/machine/include/tune-cortexa57-cortexa53.inc +require conf/machine/include/rcar_ulcb.inc + +# Device tree for M3ULCB +KERNEL_DEVICETREE = " \ + renesas/r8a7796-m3ulcb.dtb \ + renesas/r8a7796-m3ulcb-2x4g.dtb \ +" + +# M3ULCB u-boot configure +UBOOT_CONFIG ??= "m3ulcb m3ulcb-2x4g" +UBOOT_CONFIG[m3ulcb] = "r8a7796_ulcb_defconfig" +UBOOT_CONFIG[m3ulcb-2x4g] = "r8a7796_ulcb-2x4g_defconfig" diff --git a/bsp/meta-renesas/meta-rcar-gen3/conf/machine/salvator-x.conf b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/salvator-x.conf new file mode 100644 index 00000000..92a4f8d6 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/conf/machine/salvator-x.conf @@ -0,0 +1,52 @@ +#@TYPE: Machine +#@NAME: Salvator-X machine +#@DESCRIPTION: Machine configuration for running Salvator-X + +require conf/machine/include/rcar_common.inc + +# Add default tune for H3/M3 +DEFAULTTUNE ?= "cortexa57-cortexa53" +# Add default tune for M3N +DEFAULTTUNE_r8a77965 = "cortexa57" + +# Add tune configure file for M3N +TUNE_CONF ?= "conf/machine/include/tune-cortexa57-cortexa53.inc" +TUNE_CONF_r8a77965 = "conf/machine/include/tune-cortexa57.inc" + +require ${TUNE_CONF} + +# Device tree for H3 +KERNEL_DEVICETREE_r8a7795 = " \ + renesas/r8a7795-es1-salvator-x.dtb \ + renesas/r8a7795-salvator-x.dtb \ + renesas/r8a7795-salvator-xs.dtb \ + renesas/r8a7795-salvator-xs-2x2g.dtb \ + renesas/r8a7795-salvator-xs-4x2g.dtb \ +" +# Device tree for M3 +KERNEL_DEVICETREE_r8a7796 = " \ + renesas/r8a7796-salvator-x.dtb \ + renesas/r8a7796-salvator-xs.dtb \ + renesas/r8a7796-salvator-xs-2x4g.dtb \ +" +# Device tree for M3N +KERNEL_DEVICETREE_r8a77965 = " \ + renesas/r8a77965-salvator-x.dtb \ + renesas/r8a77965-salvator-xs.dtb \ +" + +# H3 u-boot configure +UBOOT_CONFIG_r8a7795 ??= "r8a7795_salvator-x r8a7795_salvator-xs r8a7795_salvator-xs-2x2g r8a7795_salvator-xs-4x2g" +UBOOT_CONFIG[r8a7795_salvator-x] = "r8a7795_salvator-x_defconfig" +UBOOT_CONFIG[r8a7795_salvator-xs] = "r8a7795_salvator-xs_defconfig" +UBOOT_CONFIG[r8a7795_salvator-xs-2x2g] = "r8a7795_salvator-xs-2x2g_defconfig" +UBOOT_CONFIG[r8a7795_salvator-xs-4x2g] = "r8a7795_salvator-xs-4x2g_defconfig" +# M3 u-boot configure +UBOOT_CONFIG_r8a7796 ??= "r8a7796_salvator-x r8a7796_salvator-xs r8a7796_salvator-xs-2x4g" +UBOOT_CONFIG[r8a7796_salvator-x] = "r8a7796_salvator-x_defconfig" +UBOOT_CONFIG[r8a7796_salvator-xs] = "r8a7796_salvator-xs_defconfig" +UBOOT_CONFIG[r8a7796_salvator-xs-2x4g] = "r8a7796_salvator-xs-2x4g_defconfig" +# M3N u-boot configure +UBOOT_CONFIG_r8a77965 ??= "r8a77965_salvator-x r8a77965_salvator-xs" +UBOOT_CONFIG[r8a77965_salvator-x] = "r8a77965_salvator-x_defconfig" +UBOOT_CONFIG[r8a77965_salvator-xs] = "r8a77965_salvator-xs_defconfig" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf new file mode 100644 index 00000000..d7ebf051 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + ${TOPDIR}/../meta-openembedded/meta-python \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf new file mode 100644 index 00000000..4edf3633 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local-wayland.conf @@ -0,0 +1,305 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "ebisu" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" + +# Mask the wayland related to GFX +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Mask the gstreamer recipe for MMP +BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for USB 3.0 +MACHINE_FEATURES_append = " usb3" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf new file mode 100644 index 00000000..314b215b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/bsp/local.conf @@ -0,0 +1,298 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "ebisu" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Enable pam distro feature +DISTRO_FEATURES_append = " pam" + +# Configuration for USB 3.0 +MACHINE_FEATURES_append = " usb3" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf new file mode 100644 index 00000000..9dfc9cb8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/gfx-only/local-wayland.conf @@ -0,0 +1,311 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "ebisu" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for USB 3.0 +MACHINE_FEATURES_append = " usb3" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf new file mode 100644 index 00000000..61f03a80 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/ebisu/poky-gcc/mmp/local-wayland.conf @@ -0,0 +1,417 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "ebisu" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" + +# Enable Multimedia features +MACHINE_FEATURES_append = " multimedia" + +# for gstreamer omx plugins +LICENSE_FLAGS_WHITELIST = "commercial" +# for mmp test program +DISTRO_FEATURES_append = " mm-test" + +# for weston v4l2 renderer +#DISTRO_FEATURES_append = " v4l2-renderer" + +# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) +#DISTRO_FEATURES_append = " h263dec_lib" + +# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) +DISTRO_FEATURES_append = " h264dec_lib" + +# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) +#DISTRO_FEATURES_append = " h264enc_lib" + +# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) +#DISTRO_FEATURES_append = " h265dec_lib" + +# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) +#DISTRO_FEATURES_append = " mpeg2dec_lib" + +# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) +#DISTRO_FEATURES_append = " mpeg4dec_lib" + +# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) +#DISTRO_FEATURES_append = " vc1dec_lib" + +# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) +#DISTRO_FEATURES_append = " divxdec_lib" + +# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) +#DISTRO_FEATURES_append = " rvdec_lib" + +# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) +#DISTRO_FEATURES_append = " alacdec_lib" + +# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) +#DISTRO_FEATURES_append = " flacdec_lib" + +# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), +# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) +DISTRO_FEATURES_append = " aaclcdec_lib" +DISTRO_FEATURES_append = " aaclcdec_mdw" + +# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), +# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) +#DISTRO_FEATURES_append = " aacpv2dec_lib" +#DISTRO_FEATURES_append = " aacpv2dec_mdw" + +# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), +# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) +#DISTRO_FEATURES_append = " mp3dec_lib" +#DISTRO_FEATURES_append = " mp3dec_mdw" + +# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), +# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) +#DISTRO_FEATURES_append = " wmadec_lib" +#DISTRO_FEATURES_append = " wmadec_mdw" + +# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) +# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) +#DISTRO_FEATURES_append = " aaclcenc_lib" +#DISTRO_FEATURES_append = " aaclcenc_mdw" + +# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), +# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) +#DISTRO_FEATURES_append = " dddec_lib" +#DISTRO_FEATURES_append = " dddec_mdw" + +# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) +#DISTRO_FEATURES_append = " vp8dec_lib" + +# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) +#DISTRO_FEATURES_append = " vp8enc_lib" + +# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) +#DISTRO_FEATURES_append = " vp9dec_lib" + +# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) +#DISTRO_FEATURES_append = " cmsbcm" + +# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) +#DISTRO_FEATURES_append = " cmsblc" + +# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) +#DISTRO_FEATURES_append = " cmsdgc" + +# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) +# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) +#DISTRO_FEATURES_append = " dvd" +#DISTRO_FEATURES_append = " dvd_encryption_library" + +# ADSP Driver for Linux (RCG3AHPDL4101ZDO) +# ADSP Interface for Linux (RCG3AHIFL4101ZDP) +# ADSP Framework (RCG3AHFWN0201ZDP) +#DISTRO_FEATURES_append = " adsp" + +# AVB Software Package for Linux +#DISTRO_FEATURES_append = " avb" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Evaluation packages +#DISTRO_FEATURES_append = " use_eva_pkg" + +# Configuration for ivi-shell and ivi-extension +#DISTRO_FEATURES_append = " ivi-shell" + +# Configuration for USB 3.0 +MACHINE_FEATURES_append = " usb3" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf new file mode 100644 index 00000000..d7ebf051 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + ${TOPDIR}/../meta-openembedded/meta-python \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf new file mode 100644 index 00000000..7885e6f2 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local-wayland.conf @@ -0,0 +1,305 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "h3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" + +# Mask the wayland related to GFX +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Mask the gstreamer recipe for MMP +BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf new file mode 100644 index 00000000..7ebd5c99 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/bsp/local.conf @@ -0,0 +1,298 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "h3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Enable pam distro feature +DISTRO_FEATURES_append = " pam" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf new file mode 100644 index 00000000..18f3e4e6 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/gfx-only/local-wayland.conf @@ -0,0 +1,311 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "h3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf new file mode 100644 index 00000000..cd6cca96 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/h3ulcb/poky-gcc/mmp/local-wayland.conf @@ -0,0 +1,417 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "h3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" + +# Enable Multimedia features +MACHINE_FEATURES_append = " multimedia" + +# for gstreamer omx plugins +LICENSE_FLAGS_WHITELIST = "commercial" +# for mmp test program +DISTRO_FEATURES_append = " mm-test" + +# for weston v4l2 renderer +#DISTRO_FEATURES_append = " v4l2-renderer" + +# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) +#DISTRO_FEATURES_append = " h263dec_lib" + +# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) +DISTRO_FEATURES_append = " h264dec_lib" + +# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) +#DISTRO_FEATURES_append = " h264enc_lib" + +# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) +#DISTRO_FEATURES_append = " h265dec_lib" + +# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) +#DISTRO_FEATURES_append = " mpeg2dec_lib" + +# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) +#DISTRO_FEATURES_append = " mpeg4dec_lib" + +# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) +#DISTRO_FEATURES_append = " vc1dec_lib" + +# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) +#DISTRO_FEATURES_append = " divxdec_lib" + +# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) +#DISTRO_FEATURES_append = " rvdec_lib" + +# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) +#DISTRO_FEATURES_append = " alacdec_lib" + +# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) +#DISTRO_FEATURES_append = " flacdec_lib" + +# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), +# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) +DISTRO_FEATURES_append = " aaclcdec_lib" +DISTRO_FEATURES_append = " aaclcdec_mdw" + +# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), +# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) +#DISTRO_FEATURES_append = " aacpv2dec_lib" +#DISTRO_FEATURES_append = " aacpv2dec_mdw" + +# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), +# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) +#DISTRO_FEATURES_append = " mp3dec_lib" +#DISTRO_FEATURES_append = " mp3dec_mdw" + +# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), +# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) +#DISTRO_FEATURES_append = " wmadec_lib" +#DISTRO_FEATURES_append = " wmadec_mdw" + +# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) +# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) +#DISTRO_FEATURES_append = " aaclcenc_lib" +#DISTRO_FEATURES_append = " aaclcenc_mdw" + +# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), +# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) +#DISTRO_FEATURES_append = " dddec_lib" +#DISTRO_FEATURES_append = " dddec_mdw" + +# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) +#DISTRO_FEATURES_append = " vp8dec_lib" + +# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) +#DISTRO_FEATURES_append = " vp8enc_lib" + +# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) +#DISTRO_FEATURES_append = " cmsbcm" + +# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) +#DISTRO_FEATURES_append = " cmsblc" + +# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) +#DISTRO_FEATURES_append = " cmsdgc" + +# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) +#DISTRO_FEATURES_append = " dtv" + +# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) +# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) +#DISTRO_FEATURES_append = " dvd" +#DISTRO_FEATURES_append = " dvd_encryption_library" + +# ADSP Driver for Linux (RCG3AHPDL4101ZDO) +# ADSP Interface for Linux (RCG3AHIFL4101ZDP) +# ADSP Framework (RCG3AHFWN0201ZDP) +#DISTRO_FEATURES_append = " adsp" + +# AVB Software Package for Linux +#DISTRO_FEATURES_append = " avb" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Evaluation packages +#DISTRO_FEATURES_append = " use_eva_pkg" + +# Configuration for ivi-shell and ivi-extension +#DISTRO_FEATURES_append = " ivi-shell" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf new file mode 100644 index 00000000..d7ebf051 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + ${TOPDIR}/../meta-openembedded/meta-python \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf new file mode 100644 index 00000000..01fdc941 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local-wayland.conf @@ -0,0 +1,302 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3nulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" + +# Mask the wayland related to GFX +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Mask the gstreamer recipe for MMP +BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf new file mode 100644 index 00000000..74ef129e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/bsp/local.conf @@ -0,0 +1,295 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3nulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Enable pam distro feature +DISTRO_FEATURES_append = " pam" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf new file mode 100644 index 00000000..b54fb86c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/gfx-only/local-wayland.conf @@ -0,0 +1,308 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3nulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf new file mode 100644 index 00000000..238b9191 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3nulcb/poky-gcc/mmp/local-wayland.conf @@ -0,0 +1,414 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3nulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" + +# Enable Multimedia features +MACHINE_FEATURES_append = " multimedia" + +# for gstreamer omx plugins +LICENSE_FLAGS_WHITELIST = "commercial" +# for mmp test program +DISTRO_FEATURES_append = " mm-test" + +# for weston v4l2 renderer +#DISTRO_FEATURES_append = " v4l2-renderer" + +# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) +#DISTRO_FEATURES_append = " h263dec_lib" + +# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) +DISTRO_FEATURES_append = " h264dec_lib" + +# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) +#DISTRO_FEATURES_append = " h264enc_lib" + +# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) +#DISTRO_FEATURES_append = " h265dec_lib" + +# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) +#DISTRO_FEATURES_append = " mpeg2dec_lib" + +# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) +#DISTRO_FEATURES_append = " mpeg4dec_lib" + +# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) +#DISTRO_FEATURES_append = " vc1dec_lib" + +# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) +#DISTRO_FEATURES_append = " divxdec_lib" + +# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) +#DISTRO_FEATURES_append = " rvdec_lib" + +# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) +#DISTRO_FEATURES_append = " alacdec_lib" + +# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) +#DISTRO_FEATURES_append = " flacdec_lib" + +# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), +# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) +DISTRO_FEATURES_append = " aaclcdec_lib" +DISTRO_FEATURES_append = " aaclcdec_mdw" + +# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), +# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) +#DISTRO_FEATURES_append = " aacpv2dec_lib" +#DISTRO_FEATURES_append = " aacpv2dec_mdw" + +# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), +# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) +#DISTRO_FEATURES_append = " mp3dec_lib" +#DISTRO_FEATURES_append = " mp3dec_mdw" + +# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), +# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) +#DISTRO_FEATURES_append = " wmadec_lib" +#DISTRO_FEATURES_append = " wmadec_mdw" + +# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) +# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) +#DISTRO_FEATURES_append = " aaclcenc_lib" +#DISTRO_FEATURES_append = " aaclcenc_mdw" + +# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), +# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) +#DISTRO_FEATURES_append = " dddec_lib" +#DISTRO_FEATURES_append = " dddec_mdw" + +# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) +#DISTRO_FEATURES_append = " vp8dec_lib" + +# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) +#DISTRO_FEATURES_append = " vp8enc_lib" + +# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) +#DISTRO_FEATURES_append = " vp9dec_lib" + +# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) +#DISTRO_FEATURES_append = " cmsbcm" + +# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) +#DISTRO_FEATURES_append = " cmsblc" + +# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) +#DISTRO_FEATURES_append = " cmsdgc" + +# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) +#DISTRO_FEATURES_append = " dtv" + +# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) +# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) +#DISTRO_FEATURES_append = " dvd" +#DISTRO_FEATURES_append = " dvd_encryption_library" + +# ADSP Driver for Linux (RCG3AHPDL4101ZDO) +# ADSP Interface for Linux (RCG3AHIFL4101ZDP) +# ADSP Framework (RCG3AHFWN0201ZDP) +#DISTRO_FEATURES_append = " adsp" + +# AVB Software Package for Linux +#DISTRO_FEATURES_append = " avb" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for ivi-shell and ivi-extension +#DISTRO_FEATURES_append = " ivi-shell" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf new file mode 100644 index 00000000..d7ebf051 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + ${TOPDIR}/../meta-openembedded/meta-python \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf new file mode 100644 index 00000000..2009fcb7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local-wayland.conf @@ -0,0 +1,305 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" + +# Mask the wayland related to GFX +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Mask the gstreamer recipe for MMP +BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf new file mode 100644 index 00000000..01ba6b19 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/bsp/local.conf @@ -0,0 +1,298 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Enable pam distro feature +DISTRO_FEATURES_append = " pam" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf new file mode 100644 index 00000000..7927e247 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/gfx-only/local-wayland.conf @@ -0,0 +1,311 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf new file mode 100644 index 00000000..549c4bb3 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/m3ulcb/poky-gcc/mmp/local-wayland.conf @@ -0,0 +1,417 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "m3ulcb" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" + +# Enable Multimedia features +MACHINE_FEATURES_append = " multimedia" + +# for gstreamer omx plugins +LICENSE_FLAGS_WHITELIST = "commercial" +# for mmp test program +DISTRO_FEATURES_append = " mm-test" + +# for weston v4l2 renderer +#DISTRO_FEATURES_append = " v4l2-renderer" + +# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) +#DISTRO_FEATURES_append = " h263dec_lib" + +# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) +DISTRO_FEATURES_append = " h264dec_lib" + +# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) +#DISTRO_FEATURES_append = " h264enc_lib" + +# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) +#DISTRO_FEATURES_append = " h265dec_lib" + +# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) +#DISTRO_FEATURES_append = " mpeg2dec_lib" + +# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) +#DISTRO_FEATURES_append = " mpeg4dec_lib" + +# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) +#DISTRO_FEATURES_append = " vc1dec_lib" + +# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) +#DISTRO_FEATURES_append = " divxdec_lib" + +# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) +#DISTRO_FEATURES_append = " rvdec_lib" + +# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) +#DISTRO_FEATURES_append = " alacdec_lib" + +# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) +#DISTRO_FEATURES_append = " flacdec_lib" + +# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), +# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) +DISTRO_FEATURES_append = " aaclcdec_lib" +DISTRO_FEATURES_append = " aaclcdec_mdw" + +# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), +# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) +#DISTRO_FEATURES_append = " aacpv2dec_lib" +#DISTRO_FEATURES_append = " aacpv2dec_mdw" + +# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), +# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) +#DISTRO_FEATURES_append = " mp3dec_lib" +#DISTRO_FEATURES_append = " mp3dec_mdw" + +# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), +# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) +#DISTRO_FEATURES_append = " wmadec_lib" +#DISTRO_FEATURES_append = " wmadec_mdw" + +# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) +# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) +#DISTRO_FEATURES_append = " aaclcenc_lib" +#DISTRO_FEATURES_append = " aaclcenc_mdw" + +# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), +# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) +#DISTRO_FEATURES_append = " dddec_lib" +#DISTRO_FEATURES_append = " dddec_mdw" + +# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) +#DISTRO_FEATURES_append = " vp8dec_lib" + +# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) +#DISTRO_FEATURES_append = " vp8enc_lib" + +# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) +#DISTRO_FEATURES_append = " cmsbcm" + +# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) +#DISTRO_FEATURES_append = " cmsblc" + +# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) +#DISTRO_FEATURES_append = " cmsdgc" + +# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) +#DISTRO_FEATURES_append = " dtv" + +# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) +# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) +#DISTRO_FEATURES_append = " dvd" +#DISTRO_FEATURES_append = " dvd_encryption_library" + +# ADSP Driver for Linux (RCG3AHPDL4101ZDO) +# ADSP Interface for Linux (RCG3AHIFL4101ZDP) +# ADSP Framework (RCG3AHFWN0201ZDP) +#DISTRO_FEATURES_append = " adsp" + +# AVB Software Package for Linux +#DISTRO_FEATURES_append = " avb" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Evaluation packages +#DISTRO_FEATURES_append = " use_eva_pkg" + +# Configuration for ivi-shell and ivi-extension +#DISTRO_FEATURES_append = " ivi-shell" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf new file mode 100644 index 00000000..d7ebf051 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + ${TOPDIR}/../meta-openembedded/meta-python \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf new file mode 100644 index 00000000..c56623ba --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-ltp.conf @@ -0,0 +1,309 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "salvator-x" + +# This sets the SoC +# H3: r8a7795, M3: r8a7796, M3N: r8a77965 +SOC_FAMILY = "r8a7795" +#SOC_FAMILY = "r8a7796" +#SOC_FAMILY = "r8a77965" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for USB 3.0 +#MACHINE_FEATURES_append = " usb3" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Additional packages for LTP +DISTRO_FEATURES_append = " pam" +CORE_IMAGE_EXTRA_INSTALL_append = " ltp" +IMAGE_INSTALL_append = " binutils elfutils file quota tar bzip2 sudo shadow glibc-utils net-tools procps cdrkit kernel-modules" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf new file mode 100644 index 00000000..80d6cddc --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local-wayland.conf @@ -0,0 +1,314 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "salvator-x" + +# This sets the SoC +# H3: r8a7795, M3: r8a7796, M3N: r8a77965 +SOC_FAMILY = "r8a7795" +#SOC_FAMILY = "r8a7796" +#SOC_FAMILY = "r8a77965" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" + +# Mask the wayland related to GFX +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Mask the gstreamer recipe for MMP +BBMASK .= "|meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for USB 3.0 +#MACHINE_FEATURES_append = " usb3" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf new file mode 100644 index 00000000..f57972ae --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/bsp/local.conf @@ -0,0 +1,307 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "salvator-x" + +# This sets the SoC +# H3: r8a7795, M3: r8a7796, M3N: r8a77965 +SOC_FAMILY = "r8a7795" +#SOC_FAMILY = "r8a7796" +#SOC_FAMILY = "r8a77965" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Mask graphic Pkgs +BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Enable pam distro feature +DISTRO_FEATURES_append = " pam" + +# Configuration for USB 3.0 +#MACHINE_FEATURES_append = " usb3" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf new file mode 100644 index 00000000..23876c25 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/gfx-only/local-wayland.conf @@ -0,0 +1,320 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "salvator-x" + +# This sets the SoC +# H3: r8a7795, M3: r8a7796, M3N: r8a77965 +SOC_FAMILY = "r8a7795" +#SOC_FAMILY = "r8a7796" +#SOC_FAMILY = "r8a77965" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" +# Mask MMP recipes +BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Configuration for USB 3.0 +#MACHINE_FEATURES_append = " usb3" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf new file mode 100644 index 00000000..70d19537 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/bblayers.conf @@ -0,0 +1,15 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ${TOPDIR}/../poky/meta \ + ${TOPDIR}/../poky/meta-poky \ + ${TOPDIR}/../poky/meta-yocto-bsp \ + ${TOPDIR}/../meta-renesas/meta-rcar-gen3 \ + ${TOPDIR}/../meta-openembedded/meta-python \ + ${TOPDIR}/../meta-openembedded/meta-oe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf new file mode 100644 index 00000000..55301425 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/conf/salvator-x/poky-gcc/mmp/local-wayland.conf @@ -0,0 +1,429 @@ +# +# This file is your local configuration file and is where all local user settings +# are placed. The comments in this file give some guide to the options a new user +# to the system might want to change but pretty much any configuration option can +# be set in this file. More adventurous users can look at local.conf.extended +# which contains other examples of configuration which can be placed in this file +# but new users likely won't need any of them initially. +# +# Lines starting with the '#' character are commented out and in some cases the +# default values are provided as comments to show people example syntax. Enabling +# the option is a question of removing the # character and making any change to the +# variable as required. + +# +# Machine Selection +# +# You need to select a specific machine to target the build with. There are a selection +# of emulated machines available which can boot and run in the QEMU emulator: +# +#MACHINE ?= "qemuarm" +#MACHINE ?= "qemuarm64" +#MACHINE ?= "qemumips" +#MACHINE ?= "qemumips64" +#MACHINE ?= "qemuppc" +#MACHINE ?= "qemux86" +#MACHINE ?= "qemux86-64" +# +# There are also the following hardware board target machines included for +# demonstration purposes: +# +#MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86-64 if no other machine is selected: +MACHINE ??= "salvator-x" + +# This sets the SoC +# H3: r8a7795, M3: r8a7796, M3N: r8a77965 +SOC_FAMILY = "r8a7795" +#SOC_FAMILY = "r8a7796" +#SOC_FAMILY = "r8a77965" + +# +# Where to place downloads +# +# During a first build the system will download many different source code tarballs +# from various upstream projects. This can take a while, particularly if your network +# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you +# can preserve this directory to speed up this part of subsequent builds. This directory +# is safe to share between multiple builds on the same machine too. +# +# The default is a downloads directory under TOPDIR which is the build directory. +# +#DL_DIR ?= "${TOPDIR}/downloads" + +# +# Where to place shared-state files +# +# BitBake has the capability to accelerate builds based on previously built output. +# This is done using "shared state" files which can be thought of as cache objects +# and this option determines where those files are placed. +# +# You can wipe out TMPDIR leaving this directory intact and the build would regenerate +# from these files if no changes were made to the configuration. If changes were made +# to the configuration, only shared state files where the state was still valid would +# be used (done using checksums). +# +# The default is a sstate-cache directory under TOPDIR. +# +#SSTATE_DIR ?= "${TOPDIR}/sstate-cache" + +# +# Where to place the build output +# +# This option specifies where the bulk of the building work should be done and +# where BitBake should place its temporary files and output. Keep in mind that +# this includes the extraction and compilation of many applications and the toolchain +# which can use Gigabytes of hard disk space. +# +# The default is a tmp directory under TOPDIR. +# +#TMPDIR = "${TOPDIR}/tmp" + +# +# Default policy config +# +# The distribution setting controls which policy settings are used as defaults. +# The default value is fine for general Yocto project use, at least initially. +# Ultimately when creating custom policy, people will likely end up subclassing +# these defaults. +# +DISTRO ?= "poky" +# As an example of a subclass there is a "bleeding" edge policy configuration +# where many versions are set to the absolute latest code from the upstream +# source control systems. This is just mentioned here as an example, its not +# useful to most new users. +# DISTRO ?= "poky-bleeding" + +# +# Package Management configuration +# +# This variable lists which packaging formats to enable. Multiple package backends +# can be enabled at once and the first item listed in the variable will be used +# to generate the root filesystems. +# Options are: +# - 'package_deb' for debian style deb files +# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) +# - 'package_rpm' for rpm style packages +# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk" +# We default to rpm: +PACKAGE_CLASSES ?= "package_rpm" + +# +# SDK target architecture +# +# This variable specifies the architecture to build SDK items for and means +# you can build the SDK packages for architectures other than the machine you are +# running the build on (i.e. building i686 packages on an x86_64 host). +# Supported values are i686 and x86_64 +#SDKMACHINE ?= "i686" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# Runtime testing of images +# +# The build system can test booting virtual machine images under qemu (an emulator) +# after any root filesystems are created and run tests against those images. It can also +# run tests against any SDK that are built. To enable this uncomment these lines. +# See classes/test{image,sdk}.bbclass for further details. +#IMAGE_CLASSES += "testimage testsdk" +#TESTIMAGE_AUTO_qemuall = "1" + +# +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necesary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + +# +# Shared-state files from other locations +# +# As mentioned above, shared state files are prebuilt cache data objects which can +# used to accelerate build time. This variable can be used to configure the system +# to search other mirror locations for these objects before it builds the data itself. +# +# This can be a filesystem directory, or a remote url such as http or ftp. These +# would contain the sstate-cache results from previous builds (possibly from other +# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the +# cache locations to check for the shared objects. +# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH +# at the end as shown in the examples below. This will be substituted with the +# correct path within the directory structure. +#SSTATE_MIRRORS ?= "\ +#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \ +#file://.* file:///some/local/dir/sstate/PATH" + +# +# Yocto Project SState Mirror +# +# The Yocto Project has prebuilt artefacts available for its releases, you can enable +# use of these by uncommenting the following line. This will mean the build uses +# the network to check for artefacts at the start of builds, which does slow it down +# equally, it will also speed up the builds by not having to build things if they are +# present in the cache. It assumes you can download something faster than you can build it +# which will depend on your network. +# +#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/2.5/PATH;downloadfilename=PATH" + +# +# Qemu configuration +# +# By default native qemu will build with a builtin VNC server where graphical output can be +# seen. The line below enables the SDL UI frontend too. +PACKAGECONFIG_append_pn-qemu-system-native = " sdl" +# By default libsdl2-native will be built, if you want to use your host's libSDL instead of +# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below. +#ASSUME_PROVIDED += "libsdl2-native" + +# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds +# a handy set of menus for controlling the emulator. +#PACKAGECONFIG_append_pn-qemu-system-native = " gtk+" + +# +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with ":" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "1" + +# Add systemd configuration +DISTRO_FEATURES_append = " systemd" +VIRTUAL-RUNTIME_init_manager = "systemd" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append = " staticdev-pkgs" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +DISTRO_FEATURES_NATIVESDK_append = " wayland" +DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "libegl" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +BBMASK = "mesa-gl" + +# Enable Multimedia features +MACHINE_FEATURES_append = " multimedia" + +# for gstreamer omx plugins +LICENSE_FLAGS_WHITELIST = "commercial" +# for mmp test program +DISTRO_FEATURES_append = " mm-test" + +# for weston v4l2 renderer +#DISTRO_FEATURES_append = " v4l2-renderer" + +# OMX H263 decoder library for Linux (RTM0AC0000XV263D30SL41C) +#DISTRO_FEATURES_append = " h263dec_lib" + +# OMX H264 decoder library for Linux (RTM0AC0000XV264D30SL41C) +DISTRO_FEATURES_append = " h264dec_lib" + +# OMX H264 encoder library for Linux (RTM0AC0000XV264E30SL41C) +#DISTRO_FEATURES_append = " h264enc_lib" + +# OMX H265 decoder library for Linux (RTM0AC0000XV265D30SL41C) +#DISTRO_FEATURES_append = " h265dec_lib" + +# OMX MPEG2 decoder library for Linux (RTM0AC0000XVM2VD30SL41C) +#DISTRO_FEATURES_append = " mpeg2dec_lib" + +# OMX Media Component MPEG4 Decoder Library for Linux (RTM0AC0000XVM4VD30SL41C) +#DISTRO_FEATURES_append = " mpeg4dec_lib" + +# OMX Media Component VC-1 Decoder Library for Linux (RTM0AC0000XVVC1D30SL41C) +#DISTRO_FEATURES_append = " vc1dec_lib" + +# OMX Media Component DivXD Decoder Library for Linux (RTM0AC0000XVDVXD30SL41C) +#DISTRO_FEATURES_append = " divxdec_lib" + +# OMX Media Component RealVideo Decoder Library for Linux (RTM0AC0000XVRLVD30SL41C) +#DISTRO_FEATURES_append = " rvdec_lib" + +# OMX Media Component ALAC Decoder Library for Linux (RTM0AC0000XAALAD30SL41C) +#DISTRO_FEATURES_append = " alacdec_lib" + +# OMX Media Component FLAC Decoder Library for Linux (RTM0AC0000XAFLAD30SL41C) +#DISTRO_FEATURES_append = " flacdec_lib" + +# OMX AAC-LC decoder library for Linux (RTM0AC0000XAAACD30SL41C), +# AAC-LC 2ch decoder middleware library for Linux (RTM0AC0000ADAACMZ1SL41C) +DISTRO_FEATURES_append = " aaclcdec_lib" +DISTRO_FEATURES_append = " aaclcdec_mdw" + +# OMX aacPlus V2 decoder library for Linux (RTM0AC0000XAAAPD30SL41C), +# aacPlus V2 decoder middleware library for Linux (RTM0AC0000ADAAPMZ1SL41C) +#DISTRO_FEATURES_append = " aacpv2dec_lib" +#DISTRO_FEATURES_append = " aacpv2dec_mdw" + +# OMX MP3 decoder library for Linux (RTM0AC0000XAMP3D30SL41C), +# MP3 decoder middleware library for Linux (RTM0AC0000ADMP3MZ1SL41C) +#DISTRO_FEATURES_append = " mp3dec_lib" +#DISTRO_FEATURES_append = " mp3dec_mdw" + +# OMX WMA decoder library for Linux (RTM0AC0000XAWMAD30SL41C), +# WMA decoder middleware library for Linux (RTM0AC0000ADWMAMZ1SL41C) +#DISTRO_FEATURES_append = " wmadec_lib" +#DISTRO_FEATURES_append = " wmadec_mdw" + +# OMX AAC-LC encoder library for Linux (RTM0AC0000XAAACE30SL41C) +# AAC-LC encoder middleware library for Linux (RTM0AC0000AEAACMZ1SL41C) +#DISTRO_FEATURES_append = " aaclcenc_lib" +#DISTRO_FEATURES_append = " aaclcenc_mdw" + +# OMX Dolby(R) Digital decoder library for Linux (RTM0AC0000XADD5D30SL41C), +# Dolby(R) Digital decoder middleware library for Linux (RTM0AC0000ADDD5MZ1SL41C) +#DISTRO_FEATURES_append = " dddec_lib" +#DISTRO_FEATURES_append = " dddec_mdw" + +# OMX Media Component VP8 Decoder Library for Linux (RTM0AC0000XVVP8D30SL41C) +#DISTRO_FEATURES_append = " vp8dec_lib" + +# OMX Media Component VP8 Encoder Library for Linux (RTM0AC0000XVVP8E30SL41C) +#DISTRO_FEATURES_append = " vp8enc_lib" + +# OMX Media Component VP9 Decoder Library for Linux (RTM0AC0000XVVP9D30SL41C) +#DISTRO_FEATURES_append = " vp9dec_lib" + +# CMS Basic Color Management Middleware for Linux (RTM0AC0000JRCMBCV0SL41C) +#DISTRO_FEATURES_append = " cmsbcm" + +# CMS CMM3 Backlight Control Middleware for Linux (RTM0AC0000JRCMBLC0SL41C) +#DISTRO_FEATURES_append = " cmsblc" + +# CMS VSP2 Dynamic Gamma Correction Middleware for Linux (RTM0AC0000JRCMDGV0SL41C) +#DISTRO_FEATURES_append = " cmsdgc" + +# ISDB-T DTV Software Package for Linux (RTM0RC0000TE020000SL41C) +#DISTRO_FEATURES_append = " dtv" + +# DVD Core-Middleware for Linux (RTM0RC0000XDVDC301SL41C) +# DVD Encryption Library for Linux (RTM0RC0000XDVDF301SL41C) +#DISTRO_FEATURES_append = " dvd" +#DISTRO_FEATURES_append = " dvd_encryption_library" + +# ADSP Driver for Linux (RCG3AHPDL4101ZDO) +# ADSP Interface for Linux (RCG3AHIFL4101ZDP) +# ADSP Framework (RCG3AHFWN0201ZDP) +#DISTRO_FEATURES_append = " adsp" + +# AVB Software Package for Linux +#DISTRO_FEATURES_append = " avb" + +# Linux ICCOM driver (RCG3ZLIDL4101ZNO) +# Linux ICCOM library (RCG3ZLILL4101ZNO) +#DISTRO_FEATURES_append = " iccom" + +# Evaluation packages +#DISTRO_FEATURES_append = " use_eva_pkg" + +# Configuration for ivi-shell and ivi-extension +#DISTRO_FEATURES_append = " ivi-shell" + +# Configuration for USB 3.0 +#MACHINE_FEATURES_append = " usb3" + +# Add Capacity Aware migration Strategy (CAS) +MACHINE_FEATURES_append = " cas" + +# Remove ptest to reduce the build time +DISTRO_FEATURES_remove = "ptest" + +# Reproducible Builds +# Set Timestamps at the build start +export SOURCE_DATE_EPOCH = "${@time.strftime('%s', time.localtime())}" +REPRODUCIBLE_TIMESTAMP_ROOTFS = "${@time.strftime('%s', time.localtime())}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh new file mode 100755 index 00000000..fd867b34 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh @@ -0,0 +1,1032 @@ +#!/bin/sh + +# Copyright (C) Renesas Electronics Corporation 2016-2018 All rights reserved. + +usage() +{ +cat << EOF + usage: `basename $0` [-f] [-d] source-directory + -f: fource copy. ignore md5check + -d: debug mode + + Ex) + `basename $0` -f my_package_dir +EOF +} + +##### MD5 list ##### +. `dirname $0`/md5list.txt + +##### Library List ##### +# Audio Library +# Please add omx audio library to "_audio_list" +# Don't use space in xxx_name. +# audio_list=",, \ +# ,, \ +# ,," +_audio_list="AAC-LC_decoder_lib,EVARTM0AC0000XAAACD30SL41C,RTM0AC0000XAAACD30SL41C.tar.gz \ + AAC-LC_encoder_lib,EVARTM0AC0000XAAACE30SL41C,RTM0AC0000XAAACE30SL41C.tar.gz" + +# Audio M/W Library +# Please add omx audio library to "_audio_mw_list" +# Don't use space in xxx_name. +# audio_mw_list=",, \ +# ,, \ +# ,," +_audio_mw_list="AAC-LC_decoder_M/W,EVARTM0AC0000ADAACMZ1SL41C,RTM0AC0000ADAACMZ1SL41C.tar.gz \ + AAC-LC_encoder_M/W,EVARTM0AC0000AEAACMZ1SL41C,RTM0AC0000AEAACMZ1SL41C.tar.gz" + +# Video Decoder Library +# Please add omx video decoder library to "_video_dec_list" +# Don't use space in xxx_name. +# video_dec_list=",, \ +# ,, \ +# ,," +_video_dec_list="H264_decoder,EVARTM0AC0000XV264D30SL41C,EVARTM0AC0000XV264D30SL41C.tar.bz2" + +# Video Encoder Library +# Please add omx video encoder library to "_video_enc_list" +# Don't use space in xxx_name. +# video_enc_list=",, \ +# ,, \ +# ,," +_video_enc_list="H264_encoder,EVARTM0AC0000XV264E30SL41C,EVARTM0AC0000XV264E30SL41C.tar.bz2" + +# Common library packages +# Don't use space in xxx_name. +# XXX_list=",, \ +# ,, \ +# ,," +_omx_common_list="omx_common_lib,EVARTM0AC0000XCMCTL30SL41C,EVARTM0AC0000XCMCTL30SL41C.tar.bz2" +_uvcs_list="uvcs_lib,RCG3VUDRL4101ZDO,RCG3VUDRL4101ZDO.tar.bz2" +_video_enc_common_list="video_enc_common,EVARTM0AC0000XVCMNE30SL41C,EVARTM0AC0000XVCMNE30SL41C.tar.bz2" +_video_dec_common_list="video_dec_common,EVARTM0AC0000XVCMND30SL41C,EVARTM0AC0000XVCMND30SL41C.tar.bz2" +_audio_common_list="audio_common,EVARTM0AC0000XACMND30SL41C,RTM0AC0000XACMND30SL41C.tar.gz" + +# GFX +# Please add GFX to "_gfx_list" +# Don't use space in xxx_name. +# gfx_list=",,, \ +# ,,, \ +# ,,," +_gfx_list="EVARTM0RC7795GLPG0001SL41C,EVA_r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ + EVARTM0RC7796GLPG0001SL41C,EVA_r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2" + +##### static value +_MODE_ZIP=1 +_MODE_TAR=2 +_GFX_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles" +_GFX_UM_INST_DIR="../meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module" +_UVCS_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv" +_OMX_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module" + +##### common function + +# $1: search file name +# $2: search directory +# return global variable +# _find_filename: find filename +# _extract_mode: _MODE_ZIP or _MODE_TAR +func_cmn_find_file() +{ +# echo "$1" +# echo "$2" + if [ -z "$1" ]; then + func_error "ERROR: func_cmn_find_file: empty filename" + fi + + if [ -z "$2" ]; then + _search_dir=${_src_full} + else + _search_dir=$2 + fi + + # search zip file +# zip_count=`find ${_search_dir} -maxdepth 1 -name "$1*.zip" | wc -l` + zip_count=`ls ${_search_dir}/$1*.zip 2>/dev/null | wc -l` + + # search tar file +# tar_count=`find ${_search_dir} -maxdepth 1 -name "$1*.tar.*" | wc -l` + tar_count=`ls ${_search_dir}/$1*.tar.* 2>/dev/null | wc -l` + + # duplicate file check + if [ 1 -lt `expr $zip_count + $tar_count` ]; then + echo "file1_zip = $zip_count" + echo "file1_tar = $tar_count" + func_error "ERROR: $1: too many files" + fi + + # set result + if [ 1 = $zip_count ]; then + _find_filename=$(ls ${_search_dir}/$1*.zip) + _extract_mode=${_MODE_ZIP} + elif [ 1 = $tar_count ]; then + _find_filename=$(ls ${_search_dir}/$1*.tar.*) + _extract_mode=${_MODE_TAR} + else + _find_filename="" + fi +} + +# $1: Mode +# $2: archive file name +func_cmn_extract_archive() +{ + case $1 in + $_MODE_ZIP) +# echo "Zip mode" + unzip -oq $2 + ;; + $_MODE_TAR) +# echo "Tar mode" + tar xf $2 + ;; + *) + func_error "ERROR: func_cmn_extract_archive: mode error." + exit 1 + ;; + esac +} + +# $1: set target filename. +# $2: set MD5 expectation value. +func_cmn_md5_check() +{ + _md5_func_param_filename=$1 + _md5_func_param_expectation=$2 + if [ ! -e ${_md5_func_param_filename} ]; then + func_error "func_cmn_md5_check : ERROR ${_md5_func_param_filename} not found." + fi + + _calc_md5=$(md5sum ${_md5_func_param_filename} | cut -d " " -f1) + + if [ -n "${_no_md5check}" ] || [ -z ${_md5_func_param_expectation} ]; then + echo "Skip MD5 : `basename ${_md5_func_param_filename}`" + return + fi + + if [ -n "${_debug}" ]; then + echo "MD5 target file = ${_md5_func_param_filename}" + echo "calc_md5 = ${_calc_md5}" + echo "expect_value = ${_md5_func_param_expectation}" + fi + + if [ ${_calc_md5} = ${_md5_func_param_expectation} ]; then + echo "MD5 OK : `basename ${_md5_func_param_filename}`" + else + echo "calc_md5 = ${_calc_md5}" + echo "expect_value = ${_md5_func_param_expectation}" + func_error "MD5 ERROR : ${_md5_func_param_filename}" + fi +} + +##### Error function +# $1: error message +func_error() +{ + echo "$1" + # cleanup temp directory. + func_clean_tempdir + exit 1 +} + +##### cleanup temp directory +func_clean_tempdir() +{ + echo "cleanup temp directory" + rm -rf ${TMPWORK} +} + +##### Template function for Single package + +# $1: package name +# $2: search target filename +# $3: search directory (full path) +# return +# _find_filename : the found file (full path) +# _extract_top_dir_name +func_search_file_in_package() +{ + # search package file + func_cmn_find_file $1 $3 + if [ -n "${_debug}" ]; then + echo "" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + # Get directory name + # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # search file + num=`find ${top_dir} -name $2 | wc -l` + if [ ${num} -eq 1 ]; then + _find_filename=`find ${top_dir} -name $2` + else + # same filename exists. + _find_filename=`find ${top_dir} -name $2 | grep Software` + fi + + # set mode + if [ `echo ${_find_filename} | grep '\.'zip` ]; then + _extract_mode=${_MODE_ZIP} + else + _extract_mode=${_MODE_TAR} + fi + + # set return value + _extract_top_dir_name=${top_dir} +} + +# $1: package name +# $2: copy filename (md5 target) +# $3: expect MD5 value +# $4: search directory (full path) +# return +# _find_file_name +# _extract_top_dir_name +func_search_and_md5check() +{ + # search package file + func_cmn_find_file $1 $4 + if [ -n "${_debug}" ]; then + echo "" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + # MD5 + # Get directory name + # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # call func_cmn_md5_check +# func_cmn_md5_check "${top_dir}/$1/Software/$2" "$3" + + # set return value + _extract_top_dir_name=${top_dir} +} + +##### Template function for Group package +# $1: group package name +# $2: single package name +# $3: copy filename (md5 target) +# $4: expect MD5 value +# $5: search directory (full path) +# return +# _find_file_name +# _extract_top_dir_name +# +# NOTE) This function support level1 packaging. "grp pkg in grp pkg" dose note support. +func_search_and_md5check_grp() +{ + # search group package @SRCDIR + func_cmn_find_file $1 $5 + if [ -n "${_debug}" ]; then + echo "search group package" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + echo "" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract group package @TMPWORK + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + cd ${_find_filename} + # check group pachage structure + # _/Package_Info.txt + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + if [ ! -e ${top_dir}/Package_Info.txt ]; then + echo "grp package = $1" + echo "single package = $2" + func_error "ERROR: Package_Info.txt not found in Group package." + fi + + # search single package @TMPWORK/TOPDIR// + func_cmn_find_file $2 "${TMPWORK}/${top_dir}/$1" + if [ -n "${_debug}" ]; then + echo "search single package" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + echo "" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # mv TMPWORK/. + mv ${_find_filename} ${TMPWORK}/. + + # delete group package + rm -rf ${TMPWORK}/${top_dir} + + # call search and md5check @TMPWORK + func_search_and_md5check $2 $3 $4 ${TMPWORK} +} + +##### File search and MD5check for Package list +# $1: package list +# $2: rigid flag (1: true, other: false) +# +# return +# 1: [Success] One or more files were found. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_md5check () +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'${pkg_name}` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + # rigid flag = TRUE. Not found = ERROR + if [ "X$2" = "X1" ]; then + return 0 + fi + else + find_flag=1 + fi + done + + return ${find_flag} +} + +##### File search and install (without MD5check) for Package list +# +# $1: package list +# $2: install directory +# +# return +# 1: [Success] One or more files were installed. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_install_wo_md5check() +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'$pkg_name` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + copyfile_name=$(basename ${copyfile_name}) + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + # file search + func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + else + find_flag=1 + + # install + install -d $2 + install -m 0644 ${_find_filename} $2 + echo "Installed $sw_name" + echo " : ${pkg_name}" + fi + done + + return ${find_flag} +} + +##### File search and install for Package list +# +# $1: package list +# $2: install directory +# +# return +# 1: [Success] One or more files were installed. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_install() +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'$pkg_name` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + # seach & MD5 check + func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + else + find_flag=1 + + # Get directory name + # _find_filename = pkg file (full path). It is not copyfile. + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # install + install -d $2 + install -m 0644 ${top_dir}/${pkg_name}/Software/${copyfile_name} $2 + echo "Installed $sw_name" + echo " : ${pkg_name}" + fi + done + + return ${find_flag} +} + +##### Package function + +# For 3D graphics packages +func_gfx() +{ + echo "" + echo "Copying for Graphic Packages" + + copy_flag=0 + + for i in ${_gfx_list} + do + user_pkg_name=`echo $i | cut -d "," -f 1` + user_copyfile_name=`echo $i | cut -d "," -f 2` + user_md5_val=`eval echo '$_MD5_'${user_pkg_name}` + kern_pkg_name=`echo $i | cut -d "," -f 3` + kern_copyfile_name=`echo $i | cut -d "," -f 4` + kern_md5_val=`eval echo '$_MD5_'${kern_pkg_name}` + + if [ -n "${_debug}" ]; then + echo "" + echo "user_pkg_name = ${user_pkg_name}" + echo "user_copyfile_name= ${user_copyfile_name}" + echo "user_md5_val = ${user_md5_val}" + echo "kern_pkg_name = ${kern_pkg_name}" + echo "kern_copyfile_name= ${kern_copyfile_name}" + echo "kern_md5_val = ${kern_md5_val}" + fi + + # user module (file1) + func_search_and_md5check "${user_pkg_name}" "${user_copyfile_name}" "${user_md5_val}" "${_src_full}" + + if [ -z "${_find_filename}" ]; then + echo "${user_pkg_name} not found!" + continue + fi + + file1_top_dir=${_extract_top_dir_name} + echo "file1 top : ${file1_top_dir}" + + # kernel module (file2) + func_search_and_md5check "${kern_pkg_name}" "${kern_copyfile_name}" "${kern_md5_val}" "${_src_full}" + + # file1 exist, but file2 not exist + if [ -z "${_find_filename}" ]; then + func_error "ERROR: func_gfx: package file for Graphic is incomplete." + fi + + file2_top_dir=${_extract_top_dir_name} + echo "file2 top : ${file2_top_dir}" + + # Finally copy is performed + copy_flag=1 + install -d ${_GFX_UM_INST_DIR} + install -m 0644 ${file1_top_dir}/${user_pkg_name}/Software/${user_copyfile_name} ${_GFX_UM_INST_DIR}/`echo ${user_copyfile_name} | cut -b 5-200` + install -d ${_GFX_KM_INST_DIR} + install -m 0644 ${file2_top_dir}/${kern_pkg_name}/Software/${kern_copyfile_name} ${_GFX_KM_INST_DIR} + echo "Installed GFX package" + echo " : ${user_pkg_name}" + echo " : ${kern_pkg_name}" + echo "" + done + + if [ ${copy_flag} -eq 0 ]; then + return + fi + + echo "" + echo "Packages for GFX module were found and copied." + echo /=======================================================/ +} + +##### For Multi Media + +# For Audio library copy +# +# Global +# _audio_list: audio library list +# Return +# 0: Not found +# 1: Success +func_audio_lib() +{ + # MD5 check: OMX Media Component Audio Common Library for Linux + func_list_search_and_md5check "${_audio_common_list}" "1" + if [ $? -eq 0 ]; then + echo "Audio Common Library not found!" + echo "" + return 0 + fi + + # MD5 check: audio library. + func_list_search_and_md5check "${_audio_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "Audio library not found." + return 0 + fi + + # Add audio common library to list + _audio_list="${_audio_common_list} ${_audio_list}" + + # Install omx common lib (if not installed) + func_install_omx_common + + # Install Audio library packages + func_list_search_and_install_wo_md5check "${_audio_list}" "${_OMX_UM_INST_DIR}" + _audio_common_install=1 + + return 1 +} + +# For Audio library +func_audio() +{ + echo "" + echo "Copying for Audio Common Packages" + + _audio_common_install=0 + + # Audio requires OMX common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # Audio Library + func_audio_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Audio Packages" + echo "" + return + fi + + echo "" + echo "Packages for Audio module were found and copied." + echo /=======================================================/ +} + +# For Audio M/W +# Global +# _audio_mw_list: audio M/W library list +# Return +# 0: Not found +# 1: Success +func_audio_mw() +{ + echo "" + echo "Copying for Audio M/W Packages" + + # MD5 check + func_list_search_and_md5check "${_audio_mw_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "Packages for Audio M/W module were not found." + return 0 + fi + + # Install Audio M/W library packages + func_list_search_and_install_wo_md5check "${_audio_mw_list}" "${_OMX_UM_INST_DIR}" + + echo "" + echo "Packages for Audio M/W module were found and copied." + echo /=======================================================/ + + return 1 +} + +# install OMX common library +func_install_omx_common() +{ + if [ ${_omx_common_install} -eq 0 ]; then + echo "" + echo "Install for OMX Common Packages" + func_list_search_and_install_wo_md5check "${_omx_common_list}" "${_OMX_UM_INST_DIR}" + _omx_common_install=1 + fi +} + +# install uvcs driver +func_install_uvcs() +{ + if [ ${_uvcs_install} -eq 0 ]; then + echo "" + echo "Installed UVCS driver" + func_list_search_and_install_wo_md5check "${_uvcs_list}" "${_UVCS_INST_DIR}" + _uvcs_install=1 + fi +} + +# search & MD5 check for OMX Video Decoder library +# Global +# _video_dec_list: video decoder list +# Return +# 0: Not found +# 1: Success +func_video_decoder_lib() +{ + echo "" + echo "Copying for Video Decoder Library Packages" + + # MD5 check: Decoder Common Library (rigid flag=TRUE) + func_list_search_and_md5check "${_video_dec_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Video Decoder Common Library not found!" + return 0 + fi + + # MD5 check: Video Decoder Library + func_list_search_and_md5check "${_video_dec_list}" + if [ $? -eq 0 ]; then + # library not found. + return 0 + fi + + # install OMX common lib (if not installed) + func_install_omx_common + + # install UVCS driver (if not installed) + func_install_uvcs + + # Add video decoder common lib to list + _video_dec_list="${_video_dec_common_list} ${_video_dec_list}" + + # install searched library + func_list_search_and_install_wo_md5check "${_video_dec_list}" "${_OMX_UM_INST_DIR}" + _video_decoder_common_install=1 + + return 1 +} + +# search & MD5 check for OMX Video Encoder library +# Global +# _video_enc_list: video encoder list +# Return +# 0: Not found +# 1: Success +func_video_encoder_lib() +{ + echo "" + echo "Copying for Video Encoder Library Packages" + + + # MD5 check Encoder Common Library (rigid flag=TRUE) + func_list_search_and_md5check "${_video_enc_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Video Encoder Common Library not found!" + return 0 + fi + _video_encoder_common_install=0 + + # Video Encoder Library + # MD5 check + func_list_search_and_md5check "${_video_enc_list}" + if [ $? -eq 0 ]; then + # library not found. + return 0 + fi + + # install common lib (if not installed) + func_install_omx_common + + # install UVCS driver (if not installed) + func_install_uvcs + + # Add Video encoder common library to list + _video_enc_list="${_video_enc_common_list} ${_video_enc_list}" + + # install searched library + func_list_search_and_install_wo_md5check "${_video_enc_list}" "${_OMX_UM_INST_DIR}" + _video_encoder_common_install=1 + + return 1 +} + +# For Video decoder +# Global +# _video_dec_list: video decoder list +# Return +# 0: Not found +# 1: Success +func_video_decoder() +{ + echo "" + echo "Copying for Video Decoder Packages" + + # OMX Common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # UVCS driver + if [ ${_uvcs_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_uvcs_list}" "1" + if [ $? -eq 0 ]; then + echo "UVCS driver not found!" + echo "" + return + fi + else + echo "UVCS driver already installed" + fi + + # OMX Decoder + # Decoder common Lib + func_video_decoder_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Video Decoder Packages" + echo "" + return + fi + + echo "" + echo "Packages for video decoder module were found and copied." + echo /=======================================================/ +} + +# For Video encoder +func_video_encoder() +{ + echo "" + echo "Copying for Video Encoder Packages" + + # OMX Common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # UVCS driver + if [ ${_uvcs_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_uvcs_list}" "1" + if [ $? -eq 0 ]; then + echo "UVCS driver not found!" + echo "" + return + fi + else + echo "UVCS driver already installed" + fi + + # OMX Encoder + # Encoder common Lib + func_video_encoder_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Video Encoder Packages" + echo "" + return + fi + + echo "" + echo "Packages for video encoder module were found and copied." + echo /=======================================================/ +} + +################################ +# Copy Script Main routine +################################ +echo "Copyscript for R-Car Gen3" +echo +#### 1) Checking current directory +if [ ! -d meta-rcar-gen3 ]; then + echo "ERROR: Please extract meta-renesas and cd to it, before execute $0" + exit 1 +fi + +#### 2) Checking Arguments +if [ "X$1" = "X" ]; then + usage + exit 1 +fi + +while [ $# -gt 0 ] ; do + case "$1" in + -f|--force) + _no_md5check=1 + ;; + -d|--debug) + _debug=1 + ;; + *) + _src_dirname=$(basename $1) + _src_path=$(cd $(dirname $1) && pwd) + _src_full=${_src_path}/${_src_dirname} + ;; + esac + shift +done + +#### 3) Checking ClickThrough present + +COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip 2>/dev/null | wc --lines) +if [ ${COUNTFILE} -eq 0 ]; then + echo "R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip not found!" + usage + exit 1 +fi +if [ ${COUNTFILE} -gt 1 ]; then + echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip file found!" + echo "Clean your directory \"${_src_full}\"" + exit 1 +fi + +COUNTFILE=$(ls ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip 2>/dev/null | wc --lines) +if [ ${COUNTFILE} -eq 0 ]; then + echo "R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip not found!" + exit 1 +fi +if [ ${COUNTFILE} -gt 1 ]; then + echo "More than one (${COUNTFILE}) R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip file found!" + echo "Clean your directory \"${_src_full}\"" + usage + exit 1 +fi + +unzip -d ${_src_full} -oq ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.zip +unzip -d ${_src_full} -oq ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.zip + +tar -C ${_src_full} -zxf ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-*.tar.gz --strip-components 2 +tar -C ${_src_full} -zxf ${_src_full}/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz --strip-components 2 + +# source directory check +if [ ! -d ${_src_path}/${_src_dirname} ]; then + echo "${_src_path}/${_src_dirname} not found." + usage + exit 1 +fi + +if [ -n "${_debug}" ]; then + echo "src = ${_src_dirname}" + echo "src_path = ${_src_path}" + echo "src_full = ${_src_full}" + echo "no_md5check = ${_no_md5check}" + echo "" +fi + +##### 3) create temp directory +TMPWORK=${PWD}/CP_SCRIPT_TEMP +if [ -d ${TMPWORK} ]; then + echo "ERROR: Work directory already exist." + exit 1 +fi +install -d -m 700 ${TMPWORK} +cd ${TMPWORK} + +##### 4) copy +# initialize flag +_omx_common_install=0 +_uvcs_install=0 +_audio_common_install=0 +_video_decoder_common_install=0 +_video_encoder_common_install=0 + +func_gfx +func_audio +func_audio_mw +func_video_decoder +func_video_encoder + +##### 5) cleanup temp directory +func_clean_tempdir + +##### End +echo "Complete copying !" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh new file mode 100755 index 00000000..2ce4148b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh @@ -0,0 +1,1329 @@ +#!/bin/sh + +# Copyright (C) Renesas Electronics Corporation 2015-2018 All rights reserved. + +usage() +{ +cat << EOF + usage: `basename $0` [-f] [-d] source-directory + -f: fource copy. ignore md5check + -d: debug mode + + Ex) + `basename $0` -f my_package_dir +EOF +} + +##### MD5 list ##### +. `dirname $0`/md5list.txt + +##### Library List ##### +# Audio Library +# Please add omx audio library to "_audio_list" +# Don't use space in xxx_name. +# audio_list=",, \ +# ,, \ +# ,," +_audio_list="AAC-LC_decoder_lib,RTM0AC0000XAAACD30SL41C,RTM0AC0000XAAACD30SL41C.tar.gz \ + aacPlusV2_decoder_lib,RTM0AC0000XAAAPD30SL41C,RTM0AC0000XAAAPD30SL41C.tar.gz \ + MP3_decoder_lib,RTM0AC0000XAMP3D30SL41C,RTM0AC0000XAMP3D30SL41C.tar.gz \ + WMA_decoder_lib,RTM0AC0000XAWMAD30SL41C,RTM0AC0000XAWMAD30SL41C.tar.gz \ + AAC-LC_encoder_lib,RTM0AC0000XAAACE30SL41C,RTM0AC0000XAAACE30SL41C.tar.gz \ + ALAC_decoder_lib,RTM0AC0000XAALAD30SL41C,RTM0AC0000XAALAD30SL41C.tar.gz \ + FLAC_decoder_lib,RTM0AC0000XAFLAD30SL41C,RTM0AC0000XAFLAD30SL41C.tar.gz \ + Dolby_decoder_lib,RTM0AC0000XADD5D30SL41C,RTM0AC0000XADD5D30SL41C.tar.gz" + +# Audio M/W Library +# Please add omx audio library to "_audio_mw_list" +# Don't use space in xxx_name. +# audio_mw_list=",, \ +# ,, \ +# ,," +_audio_mw_list="AAC-LC_decoder_M/W,RTM0AC0000ADAACMZ1SL41C,RTM0AC0000ADAACMZ1SL41C.tar.gz \ + aacPlusV2_decoder_M/W,RTM0AC0000ADAAPMZ1SL41C,RTM0AC0000ADAAPMZ1SL41C.tar.gz \ + MP3_decoder_M/W,RTM0AC0000ADMP3MZ1SL41C,RTM0AC0000ADMP3MZ1SL41C.tar.gz \ + WMA_decoder_M/W,RTM0AC0000ADWMAMZ1SL41C,RTM0AC0000ADWMAMZ1SL41C.tar.gz \ + AAC-LC_encoder_M/W,RTM0AC0000AEAACMZ1SL41C,RTM0AC0000AEAACMZ1SL41C.tar.gz \ + DDD_decoder_M/W,RTM0AC0000ADDD5MZ1SL41C,RTM0AC0000ADDD5MZ1SL41C.tar.gz" + +# Video Decoder Library +# Please add omx video decoder library to "_video_dec_list" +# Don't use space in xxx_name. +# video_dec_list=",, \ +# ,, \ +# ,," +_video_dec_list="H263_decoder,RTM0AC0000XV263D30SL41C,RTM0AC0000XV263D30SL41C.tar.bz2 \ + H264_decoder,RTM0AC0000XV264D30SL41C,RTM0AC0000XV264D30SL41C.tar.bz2 \ + H265_decoder,RTM0AC0000XV265D30SL41C,RTM0AC0000XV265D30SL41C.tar.bz2 \ + MPEG2_decoder,RTM0AC0000XVM2VD30SL41C,RTM0AC0000XVM2VD30SL41C.tar.bz2 \ + MPEG4_decoder,RTM0AC0000XVM4VD30SL41C,RTM0AC0000XVM4VD30SL41C.tar.bz2 \ + VC1_decoder,RTM0AC0000XVVC1D30SL41C,RTM0AC0000XVVC1D30SL41C.tar.bz2 \ + DivX_decoder,RTM0AC0000XVDVXD30SL41C,RTM0AC0000XVDVXD30SL41C.tar.bz2 \ + RealVideo_decoder,RTM0AC0000XVRLVD30SL41C,RTM0AC0000XVRLVD30SL41C.tar.bz2 \ + VP8_decoder,RTM0AC0000XVVP8D30SL41C,RTM0AC0000XVVP8D30SL41C.tar.bz2 \ + VP9_decoder,RTM0AC0000XVVP9D30SL41C,RTM0AC0000XVVP9D30SL41C.tar.bz2" + +# Video Encoder Library +# Please add omx video encoder library to "_video_enc_list" +# Don't use space in xxx_name. +# video_enc_list=",, \ +# ,, \ +# ,," +_video_enc_list="H264_encoder,RTM0AC0000XV264E30SL41C,RTM0AC0000XV264E30SL41C.tar.bz2 \ + VP8_encoder,RTM0AC0000XVVP8E30SL41C,RTM0AC0000XVVP8E30SL41C.tar.bz2" + +# Common library packages +# Don't use space in xxx_name. +# XXX_list=",, \ +# ,, \ +# ,," +_omx_common_list="omx_common_lib,RTM0AC0000XCMCTL30SL41C,RTM0AC0000XCMCTL30SL41C.tar.bz2" +_uvcs_list="uvcs_lib,RCG3VUDRL4101ZDO,RCG3VUDRL4101ZDO.tar.bz2" +_video_enc_common_list="video_enc_common,RTM0AC0000XVCMNE30SL41C,RTM0AC0000XVCMNE30SL41C.tar.bz2" +_video_dec_common_list="video_dec_common,RTM0AC0000XVCMND30SL41C,RTM0AC0000XVCMND30SL41C.tar.bz2" +_audio_common_list="audio_common,RTM0AC0000XACMND30SL41C,RTM0AC0000XACMND30SL41C.tar.gz" + + +# DTV Library +# Please add DTV library to "_dtv_list" +# Don't use space in xxx_name. +# dtv_xx_list=",,, \ +# ,,, \ +# ,,," +_dtv_km_list="dtv_km,RCG3T001L4101ZDO,Software.tar.gz" +_dtv_um_list="dtv_lib,RTM0RC0000TE020000SL41C,Software.tar.gz,RTM0RC0000TE020000SL41C1 \ + dtv_userfunc,RTM0RC0000TE020000SL41C,../Reference/Reference.tar.gz,RTM0RC0000TE020000SL41C2" + +# DVD Library +# Please add DVD library to "_dvd_list" +# Don't use space in xxx_name. +# dvd_list=",,, \ +# ,,, \ +# ,,," +_dvd_list="dvd_lib,RTM0RC0000XDVDC301SL41C,Software.tar.gz \ + dvd_encrypt_lib,RTM0RC0000XDVDF301SL41C,Software.tar.gz" + +# CMS Library +# Please add CMS library to "_cms_list" +# Don't use space in xxx_name. +# cms_list=",, \ +# ,, \ +# ,," +_cms_list="bcm,RTM0AC0000JRCMBCV0SL41C,RTM0AC0000JRCMBCV0SL41C.tar.gz \ + blc,RTM0AC0000JRCMBLC0SL41C,RTM0AC0000JRCMBLC0SL41C.tar.gz \ + dgc,RTM0AC0000JRCMDGV0SL41C,RTM0AC0000JRCMDGV0SL41C.tar.gz" + +# ADSP +# Please add ADSP to "_adsp_list" +# Don't use space in xxx_name. +# adsp_xx_list=",, \ +# ,, \ +# ,," +_adsp_um_list="adsp_fw,RCG3AHFWN0201ZDP,RCG3AHFWN0201ZDP.tar.gz \ + adsp_if,RCG3AHIFL4101ZDP,RCG3AHIFL4101ZDP.tar.gz" +_adsp_km_list="adsp_driver,RCG3AHPDL4101ZDO,RCG3AHPDL4101ZDO.tar.gz" + +# GFX +# Please add GFX to "_gfx_list" +# Don't use space in xxx_name. +# gfx_list=",,, \ +# ,,, \ +# ,,," +_gfx_list="RTM0RC7795GLPG0001SL41C,r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ + RTM0RC7796GLPG0001SL41C,r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2 \ + RTM0RC7796GLPGB001SL41C,r8a77965_linux_gsx_binaries_gles.tar.bz2,RCN3G001L4101ZDO,GSX_KM_M3N.tar.bz2 \ + RTM0RC7799GLPG0001SL41C,r8a77990_linux_gsx_binaries_gles.tar.bz2,RCE3G001L4101ZDO,GSX_KM_E3.tar.bz2 \ + INFRTM0RC7795GLPG0001SL41C,INF_r8a77951_linux_gsx_binaries_gles.tar.bz2,RCH3G001L4101ZDO,GSX_KM_H3.tar.bz2 \ + INFRTM0RC7796GLPG0001SL41C,INF_r8a77960_linux_gsx_binaries_gles.tar.bz2,RCM3G001L4101ZDO,GSX_KM_M3.tar.bz2 \ + INFRTM0RC7796GLPGB001SL41C,INF_r8a77965_linux_gsx_binaries_gles.tar.bz2,RCN3G001L4101ZDO,GSX_KM_M3N.tar.bz2 \ + INFRTM0RC7799GLPG0001SL41C,INF_r8a77990_linux_gsx_binaries_gles.tar.bz2,RCE3G001L4101ZDO,GSX_KM_E3.tar.bz2" + +# ICCOM +# Please add ICCOM to "_iccom_list" +# Don't use space in xxx_name. +# iccom_xx_list=",,, \ +# ,,, \ +# ,,," +_iccom_km_list="iccom_mfis,RCG3ZLIDL4101ZNO,iccom-mfis.tar.bz2,RCG3ZLIDL4101ZNO1 \ + iccom_sample,RCG3ZLIDL4101ZNO,iccom-hwspinlock-sample.tar.bz2,RCG3ZLIDL4101ZNO2" +_iccom_um_list="iccom_lib,RCG3ZLILL4101ZNO,libiccom.tar.bz2,RCG3ZLILL4101ZNO" + +# Crypto Package list +# Please add crypto (zip) package name to "_crypto_pkg_list" +# Don't use space in xxx_name. +# crypto_pkg_list=" " +_crypto_pkg_list="RTM0AC0000ADDD5MZ1SL41C" + +##### static value +_MODE_ZIP=1 +_MODE_TAR=2 +_MODE_CRYPTO_ZIP=3 +_GFX_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles" +_GFX_UM_INST_DIR="../meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module" +_UVCS_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv" +_OMX_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module" +_DTV_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-dtv/files" +_DTV_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module" +_DVD_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module \ + ../meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module" +_CMS_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module" +_ADSP_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-adsp/xtensa-hifi" +_ADSP_UM_INST_DIR="../meta-rcar-gen3/recipes-multimedia/adsp-module/files" +_ICCOM_KM_INST_DIR="../meta-rcar-gen3/recipes-kernel/kernel-module-iccom/files" +_ICCOM_UM_INST_DIR="../meta-rcar-gen3/recipes-connectivity/iccom-module/files" + +##### common function + +# $1: search file name +# $2: search directory +# return global variable +# _find_filename: find filename +# _extract_mode: _MODE_ZIP or _MODE_TAR +func_cmn_find_file() +{ +# echo "$1" +# echo "$2" + if [ -z "$1" ]; then + func_error "ERROR: func_cmn_find_file: empty filename" + fi + + if [ -z "$2" ]; then + _search_dir=${_src_full} + else + _search_dir=$2 + fi + + # search zip file +# zip_count=`find ${_search_dir} -maxdepth 1 -name "$1*.zip" | wc -l` + zip_count=`ls ${_search_dir}/$1*.zip 2>/dev/null | wc -l` + + # search tar file +# tar_count=`find ${_search_dir} -maxdepth 1 -name "$1*.tar.*" | wc -l` + tar_count=`ls ${_search_dir}/$1*.tar.* 2>/dev/null | wc -l` + + # duplicate file check + if [ 1 -lt `expr $zip_count + $tar_count` ]; then + echo "file1_zip = $zip_count" + echo "file1_tar = $tar_count" + func_error "ERROR: $1: too many files" + fi + + crypto_zip_count=0 + for i in ${_crypto_pkg_list} + do + if [ $1 = $i ]; then + crypto_zip_count=$zip_count + zip_count=0 + fi + done + + # set result + if [ 1 = $zip_count ]; then + _find_filename=$(ls ${_search_dir}/$1*.zip) + _extract_mode=${_MODE_ZIP} + elif [ 1 = $tar_count ]; then + _find_filename=$(ls ${_search_dir}/$1*.tar.*) + _extract_mode=${_MODE_TAR} + elif [ 1 = $crypto_zip_count ]; then + _find_filename=$(ls ${_search_dir}/$1*.zip) + _extract_mode=${_MODE_CRYPTO_ZIP} + else + _find_filename="" + fi +} + +# $1: Mode +# $2: archive file name +func_cmn_extract_archive() +{ + case $1 in + $_MODE_ZIP) +# echo "Zip mode" + unzip -oq $2 + ;; + $_MODE_TAR) +# echo "Tar mode" + tar xf $2 + ;; + $_MODE_CRYPTO_ZIP) +# echo "Crypto Zip mode" + unzip -oq $2 + top_dir=$(basename $2) + top_dir=${top_dir%.*} + cd ${top_dir} + unzip -oq *.zip + if [ $? -gt 0 ]; then + func_error "ERROR: FAILED ZIP PASSWORD" + fi + cd ${TMPWORK} + ;; + *) + func_error "ERROR: func_cmn_extract_archive: mode error." + exit 1 + ;; + esac +} + +# $1: set target filename. +# $2: set MD5 expectation value. +func_cmn_md5_check() +{ + _md5_func_param_filename=$1 + _md5_func_param_expectation=$2 + if [ ! -e ${_md5_func_param_filename} ]; then + func_error "func_cmn_md5_check : ERROR ${_md5_func_param_filename} not found." + fi + + _calc_md5=$(md5sum ${_md5_func_param_filename} | cut -d " " -f1) + + if [ -n "${_no_md5check}" ] || [ -z ${_md5_func_param_expectation} ]; then + echo "Skip MD5 : `basename ${_md5_func_param_filename}`" + return + fi + + if [ -n "${_debug}" ]; then + echo "MD5 target file = ${_md5_func_param_filename}" + echo "calc_md5 = ${_calc_md5}" + echo "expect_value = ${_md5_func_param_expectation}" + fi + + if [ ${_calc_md5} = ${_md5_func_param_expectation} ]; then + echo "MD5 OK : `basename ${_md5_func_param_filename}`" + else + echo "calc_md5 = ${_calc_md5}" + echo "expect_value = ${_md5_func_param_expectation}" + func_error "MD5 ERROR : ${_md5_func_param_filename}" + fi +} + +##### Error function +# $1: error message +func_error() +{ + echo "$1" + # cleanup temp directory. + func_clean_tempdir + exit 1 +} + +##### cleanup temp directory +func_clean_tempdir() +{ + echo "cleanup temp directory" + rm -rf ${TMPWORK} +} + +##### Template function for Single package + +# $1: package name +# $2: search target filename +# $3: search directory (full path) +# return +# _find_filename : the found file (full path) +# _extract_top_dir_name +func_search_file_in_package() +{ + # search package file + func_cmn_find_file $1 $3 + if [ -n "${_debug}" ]; then + echo "" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + # Get directory name + # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # search file + num=`find ${top_dir} -name $2 | wc -l` + if [ ${num} -eq 1 ]; then + _find_filename=`find ${top_dir} -name $2` + else + # same filename exists. + _find_filename=`find ${top_dir} -name $2 | grep Software` + fi + + # set mode + if [ `echo ${_find_filename} | grep '\.'zip` ]; then + _extract_mode=${_MODE_ZIP} + else + _extract_mode=${_MODE_TAR} + fi + + # set return value + _extract_top_dir_name=${top_dir} +} + +# $1: package name +# $2: copy filename (md5 target) +# $3: expect MD5 value +# $4: search directory (full path) +# return +# _find_file_name +# _extract_top_dir_name +func_search_and_md5check() +{ + # search package file + func_cmn_find_file $1 $4 + if [ -n "${_debug}" ]; then + echo "" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + # MD5 + # Get directory name + # {PATH}/Package_Version.tar.gz or XXXX.zip --> Package_Version + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # call func_cmn_md5_check + func_cmn_md5_check "${top_dir}/$1/Software/$2" "$3" + + # set return value + _extract_top_dir_name=${top_dir} +} + +##### Template function for Group package +# $1: group package name +# $2: single package name +# $3: copy filename (md5 target) +# $4: expect MD5 value +# $5: search directory (full path) +# return +# _find_file_name +# _extract_top_dir_name +# +# NOTE) This function supports level1 packaging. Do not support "grp pkg in grp pkg". +func_search_and_md5check_grp() +{ + # search group package @SRCDIR + func_cmn_find_file $1 $5 + if [ -n "${_debug}" ]; then + echo "search group package" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + echo "" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # extract group package @TMPWORK + func_cmn_extract_archive ${_extract_mode} "${_find_filename}" + + cd ${_find_filename} + # check group pachage structure + # _/Package_Info.txt + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + if [ ! -e ${top_dir}/Package_Info.txt ]; then + echo "grp package = $1" + echo "single package = $2" + func_error "ERROR: Package_Info.txt not found in Group package." + fi + + # search single package @TMPWORK/TOPDIR// + func_cmn_find_file $2 "${TMPWORK}/${top_dir}/$1" + if [ -n "${_debug}" ]; then + echo "search single package" + echo "FileName = ${_find_filename}" + echo "Mode = ${_extract_mode}" + echo "" + fi + + if [ -z "${_find_filename}" ]; then + return + fi + + # mv TMPWORK/. + mv ${_find_filename} ${TMPWORK}/. + + # delete group package + rm -rf ${TMPWORK}/${top_dir} + + # call search and md5check @TMPWORK + func_search_and_md5check $2 $3 $4 ${TMPWORK} +} + +##### File search and MD5check for Package list +# $1: package list +# $2: rigid flag (1: true, other: false) +# +# return +# 1: [Success] One or more files were found. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_md5check () +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'${pkg_name}` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + # rigid flag = TRUE. Not found = ERROR + if [ "X$2" = "X1" ]; then + return 0 + fi + else + find_flag=1 + fi + done + + return ${find_flag} +} + +##### File search and install (without MD5check) for Package list +# +# $1: package list +# $2: install directory +# +# return +# 1: [Success] One or more files were installed. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_install_wo_md5check() +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'$pkg_name` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + copyfile_name=$(basename ${copyfile_name}) + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + # file search + func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + else + find_flag=1 + + # install + install -d $2 + install -m 0644 ${_find_filename} $2 + echo "Installed $sw_name" + echo " : ${pkg_name}" + fi + done + + return ${find_flag} +} + +##### File search and install for Package list +# +# $1: package list +# $2: install directory +# +# return +# 1: [Success] One or more files were installed. +# 0: [Fail] File not found +# +# package list format +# list =",,, \ +# ,,, \ +# ,,," +# +# Note) Don't use space in xxx_name. +# Note) md5_variable_name is defined in md5list.txt. +# Prefix "_MD5_" is added automaticary. ex) FOO --> _MD5_FOO +# It is omissible. The default is "_MD5_". +func_list_search_and_install() +{ + find_flag=0 + + for i in $1 + do + sw_name=`echo $i | cut -d "," -f 1` + pkg_name=`echo $i | cut -d "," -f 2` + copyfile_name=`echo $i | cut -d "," -f 3` + md5_val=`echo $i | cut -d "," -f 4` + + # is empty. Default MD5 name is "_MD5_" + if [ -z "${md5_val}" ]; then + md5_val=`eval echo '$_MD5_'$pkg_name` + else + md5_val=`eval echo '$_MD5_'${md5_val}` + fi + + if [ -n "${_debug}" ]; then + echo "" + echo "sw_name = $sw_name" + echo "pkg_name = $pkg_name" + echo "copyfile_name = $copyfile_name" + echo "md5_val = $md5_val" + fi + + # seach & MD5 check + func_search_and_md5check "${pkg_name}" "${copyfile_name}" "${md5_val}" "${_src_full}" + if [ -z "${_find_filename}" ]; then + echo "${sw_name} not found!" + else + find_flag=1 + + # Get directory name + # _find_filename = pkg file (full path). It is not copyfile. + top_dir=$(basename ${_find_filename}) + top_dir=${top_dir%.*} + + # install + install -d $2 + install -m 0644 ${top_dir}/${pkg_name}/Software/${copyfile_name} $2 + echo "Installed $sw_name" + echo " : ${pkg_name}" + fi + done + + return ${find_flag} +} + +##### Package function + +# For 3D graphics packages +func_gfx() +{ + echo "" + echo "Copying for Graphic Packages" + + copy_flag=0 + + for i in ${_gfx_list} + do + user_pkg_name=`echo $i | cut -d "," -f 1` + user_copyfile_name=`echo $i | cut -d "," -f 2` + user_md5_val=`eval echo '$_MD5_'${user_pkg_name}` + kern_pkg_name=`echo $i | cut -d "," -f 3` + kern_copyfile_name=`echo $i | cut -d "," -f 4` + kern_md5_val=`eval echo '$_MD5_'${kern_pkg_name}` + + if [ -n "${_debug}" ]; then + echo "" + echo "user_pkg_name = ${user_pkg_name}" + echo "user_copyfile_name= ${user_copyfile_name}" + echo "user_md5_val = ${user_md5_val}" + echo "kern_pkg_name = ${kern_pkg_name}" + echo "kern_copyfile_name= ${kern_copyfile_name}" + echo "kern_md5_val = ${kern_md5_val}" + fi + + # user module (file1) + func_search_and_md5check "${user_pkg_name}" "${user_copyfile_name}" "${user_md5_val}" "${_src_full}" + + if [ -z "${_find_filename}" ]; then + echo "${user_pkg_name} not found!" + continue + fi + + file1_top_dir=${_extract_top_dir_name} + echo "file1 top : ${file1_top_dir}" + + # kernel module (file2) + func_search_and_md5check "${kern_pkg_name}" "${kern_copyfile_name}" "${kern_md5_val}" "${_src_full}" + + # file1 exist, but file2 not exist + if [ -z "${_find_filename}" ]; then + func_error "ERROR: func_gfx: package file for Graphic is incomplete." + fi + + file2_top_dir=${_extract_top_dir_name} + echo "file2 top : ${file2_top_dir}" + + # Finally copy is performed + copy_flag=1 + install -d ${_GFX_UM_INST_DIR} + install -m 0644 ${file1_top_dir}/${user_pkg_name}/Software/${user_copyfile_name} ${_GFX_UM_INST_DIR}/${user_copyfile_name##INF_} + install -d ${_GFX_KM_INST_DIR} + install -m 0644 ${file2_top_dir}/${kern_pkg_name}/Software/${kern_copyfile_name} ${_GFX_KM_INST_DIR} + echo "Installed GFX package" + echo " : ${user_pkg_name}" + echo " : ${kern_pkg_name}" + echo "" + done + + if [ ${copy_flag} -eq 0 ]; then + return + fi + + echo "" + echo "Packages for GFX module were found and copied." + echo /=======================================================/ +} + +##### For Multi Media + +# For Audio library copy +# +# Global +# _audio_list: audio library list +# Return +# 0: Not found +# 1: Success +func_audio_lib() +{ + # MD5 check: OMX Media Component Audio Common Library for Linux + func_list_search_and_md5check "${_audio_common_list}" "1" + if [ $? -eq 0 ]; then + echo "Audio Common Library not found!" + echo "" + return 0 + fi + + # MD5 check: audio library. + func_list_search_and_md5check "${_audio_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "Audio library not found." + return 0 + fi + + # Add audio common library to list + _audio_list="${_audio_common_list} ${_audio_list}" + + # Install omx common lib (if not installed) + func_install_omx_common + + # Install Audio library packages + func_list_search_and_install_wo_md5check "${_audio_list}" "${_OMX_UM_INST_DIR}" + _audio_common_install=1 + + return 1 +} + +# For Audio library +func_audio() +{ + echo "" + echo "Copying for Audio Common Packages" + + _audio_common_install=0 + + # Audio requires OMX common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # Audio Library + func_audio_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Audio Packages" + echo "" + return + fi + + echo "" + echo "Packages for Audio module were found and copied." + echo /=======================================================/ +} + +# For Audio M/W +# Global +# _audio_mw_list: audio M/W library list +# Return +# 0: Not found +# 1: Success +func_audio_mw() +{ + echo "" + echo "Copying for Audio M/W Packages" + + # MD5 check + func_list_search_and_md5check "${_audio_mw_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "Packages for Audio M/W module were not found." + return 0 + fi + + # Install Audio M/W library packages + func_list_search_and_install_wo_md5check "${_audio_mw_list}" "${_OMX_UM_INST_DIR}" + + echo "" + echo "Packages for Audio M/W module were found and copied." + echo /=======================================================/ + + return 1 +} + +# install OMX common library +func_install_omx_common() +{ + if [ ${_omx_common_install} -eq 0 ]; then + echo "" + echo "Install for OMX Common Packages" + func_list_search_and_install_wo_md5check "${_omx_common_list}" "${_OMX_UM_INST_DIR}" + _omx_common_install=1 + fi +} + +# install uvcs driver +func_install_uvcs() +{ + if [ ${_uvcs_install} -eq 0 ]; then + echo "" + echo "Installed UVCS driver" + func_list_search_and_install_wo_md5check "${_uvcs_list}" "${_UVCS_INST_DIR}" + _uvcs_install=1 + fi +} + +# search & MD5 check for OMX Video Decoder library +# Global +# _video_dec_list: video decoder list +# Return +# 0: Not found +# 1: Success +func_video_decoder_lib() +{ + echo "" + echo "Copying for Video Decoder Library Packages" + + # MD5 check: Decoder Common Library (rigid flag=TRUE) + func_list_search_and_md5check "${_video_dec_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Video Decoder Common Library not found!" + return 0 + fi + + # MD5 check: Video Decoder Library + func_list_search_and_md5check "${_video_dec_list}" + if [ $? -eq 0 ]; then + # library not found. + return 0 + fi + + # install OMX common lib (if not installed) + func_install_omx_common + + # install UVCS driver (if not installed) + func_install_uvcs + + # Add video decoder common lib to list + _video_dec_list="${_video_dec_common_list} ${_video_dec_list}" + + # install searched library + func_list_search_and_install_wo_md5check "${_video_dec_list}" "${_OMX_UM_INST_DIR}" + _video_decoder_common_install=1 + + return 1 +} + +# search & MD5 check for OMX Video Encoder library +# Global +# _video_enc_list: video encoder list +# Return +# 0: Not found +# 1: Success +func_video_encoder_lib() +{ + echo "" + echo "Copying for Video Encoder Library Packages" + + + # MD5 check Encoder Common Library (rigid flag=TRUE) + func_list_search_and_md5check "${_video_enc_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Video Encoder Common Library not found!" + return 0 + fi + _video_encoder_common_install=0 + + # Video Encoder Library + # MD5 check + func_list_search_and_md5check "${_video_enc_list}" + if [ $? -eq 0 ]; then + # library not found. + return 0 + fi + + # install common lib (if not installed) + func_install_omx_common + + # install UVCS driver (if not installed) + func_install_uvcs + + # Add Video encoder common library to list + _video_enc_list="${_video_enc_common_list} ${_video_enc_list}" + + # install searched library + func_list_search_and_install_wo_md5check "${_video_enc_list}" "${_OMX_UM_INST_DIR}" + _video_encoder_common_install=1 + + return 1 +} + +# For Video decoder +# Global +# _video_dec_list: video decoder list +# Return +# 0: Not found +# 1: Success +func_video_decoder() +{ + echo "" + echo "Copying for Video Decoder Packages" + + # OMX Common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # UVCS driver + if [ ${_uvcs_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_uvcs_list}" "1" + if [ $? -eq 0 ]; then + echo "UVCS driver not found!" + echo "" + return + fi + else + echo "UVCS driver already installed" + fi + + # OMX Decoder + # Decoder common Lib + func_video_decoder_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Video Decoder Packages" + echo "" + return + fi + + echo "" + echo "Packages for video decoder module were found and copied." + echo /=======================================================/ +} + +# For Video encoder +func_video_encoder() +{ + echo "" + echo "Copying for Video Encoder Packages" + + # OMX Common library + if [ ${_omx_common_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_omx_common_list}" "1" + if [ $? -eq 0 ]; then + echo "OMX Common Library not found!" + echo "" + return + fi + else + echo "OMX Common Library already installed" + fi + + # UVCS driver + if [ ${_uvcs_install} -eq 0 ]; then + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_uvcs_list}" "1" + if [ $? -eq 0 ]; then + echo "UVCS driver not found!" + echo "" + return + fi + else + echo "UVCS driver already installed" + fi + + # OMX Encoder + # Encoder common Lib + func_video_encoder_lib + if [ $? -eq 0 ]; then + echo "" + echo "Skip Video Encoder Packages" + echo "" + return + fi + + echo "" + echo "Packages for video encoder module were found and copied." + echo /=======================================================/ +} + +# For DTV kernel module +func_dtv_kern() +{ + echo "" + echo "Copying for DTV kernel module" + + _dtv_kern_install=0 + + func_list_search_and_md5check "${_dtv_km_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "DTV kernel library not found!" + return + fi + + pkg_name=`echo ${_dtv_km_list} | cut -d "," -f 2` + copyfile_name=`echo ${_dtv_km_list} | cut -d "," -f 3` + + # extract --> archive --> copied + echo "Installed DTV kernel modules" + func_search_file_in_package "${pkg_name}" "${copyfile_name}" "${_src_full}" + func_cmn_extract_archive "${_extract_mode}" "${_find_filename}" + + dtv_driver_list="ssp_drv scu_src_drv tsif_drv tddmac_drv" + for i in ${dtv_driver_list} + do + tar cfz $i.tar.gz $i + install -d ${_DTV_KM_INST_DIR} + install -m 644 $i.tar.gz ${_DTV_KM_INST_DIR} + echo " : $i.tar.gz" + done + + _dtv_kern_install=1 + + echo "" + echo "DTV kernel module were found and copied." + echo /=======================================================/ +} + +# For DTV lib +func_dtv_lib() +{ + echo "" + echo "Copying for DTV Library Packages" + + # DTV kernel modules + if [ ${_dtv_kern_install} -eq 0 ]; then + echo "DTV kernel module not found!" + echo "Skip DTV Package" + echo "" + return + fi + + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_dtv_um_list}" "1" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "DTV library not found" + return + fi + + # install + func_list_search_and_install_wo_md5check "${_dtv_um_list}" "${_DTV_UM_INST_DIR}" + + echo "" + echo "DTV Package were found and copied." + echo /=======================================================/ +} + +# For DVD lib +func_dvd_lib() +{ + echo "" + echo "Copying for DVD Library Packages" + + # MD5 check (rigid flag=TRUE) + func_list_search_and_md5check "${_dvd_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "" + echo "DVD library not found" + return + fi + + index="1" + # install searched library + for i in ${_dvd_list}; do + install_dir=`echo ${_DVD_UM_INST_DIR} | cut -d " " -f ${index}` + func_list_search_and_install_wo_md5check ${i} ${install_dir} + index=`expr ${index} + 1` + done + + echo "" + echo "DVD Package were found and copied." + echo /=======================================================/ +} + +# For DTV/DVD main routine +func_dtv_dvd() +{ + echo "" + echo "Copying for DTV/DVD Packages" + + # DTV package + func_dtv_kern + func_dtv_lib + + # DVD package + func_dvd_lib +} + +# For CMS main routine +func_cms() +{ + echo "" + echo "Copying for CMS Packages" + + copy_flag=0 + + # MD5 check + func_list_search_and_md5check "${_cms_list}" + if [ $? -eq 0 ]; then + # library not found. + echo "Skip CMS package" + echo "" + return + fi + + # Install library + func_list_search_and_install_wo_md5check "${_cms_list}" "${_CMS_UM_INST_DIR}" + + echo "" + echo "Packages for CMS were found and copied." + echo /=======================================================/ +} + +# For ADSP main routine +func_adsp() +{ + echo "" + echo "Copying for ADSP Packages" + + # MD5 check (rigid flag = TRUE) + # In ADSP, all files are necesarry + func_list_search_and_md5check "${_adsp_km_list}" "1" + if [ $? -eq 0 ]; then + # library not found. + echo "Skip ADSP Package" + echo "" + return + fi + + func_list_search_and_md5check "${_adsp_um_list}" "1" + if [ $? -eq 0 ]; then + # library not found. + echo "Skip ADSP Package" + echo "" + return + fi + + # Install kernel module + func_list_search_and_install_wo_md5check "${_adsp_km_list}" "${_ADSP_KM_INST_DIR}" + + # Install user module + func_list_search_and_install_wo_md5check "${_adsp_um_list}" "${_ADSP_UM_INST_DIR}" + + echo "" + echo "Packages for ADSP were found and copied." + echo /=======================================================/ +} + +# For ICCOM main routine +func_iccom() +{ + echo "" + echo "Copying for ICCOM Packages" + + # MD5 check (rigid flag = TRUE) + # In ICCOM, all files are necesarry + func_list_search_and_md5check "${_iccom_km_list}" "1" + if [ $? -eq 0 ]; then + # library not found. + echo "Skip ICCOM Package" + echo "" + return + fi + + func_list_search_and_md5check "${_iccom_um_list}" "1" + if [ $? -eq 0 ]; then + # library not found. + echo "Skip ICCOM Package" + echo "" + return + fi + + # Install kernel module + func_list_search_and_install_wo_md5check "${_iccom_km_list}" "${_ICCOM_KM_INST_DIR}" + + # Install user module + func_list_search_and_install_wo_md5check "${_iccom_um_list}" "${_ICCOM_UM_INST_DIR}" + + echo "" + echo "Packages for ICCOM were found and copied." + echo /=======================================================/ +} + +################################ +# Copy Script Main routine +################################ +echo "Copyscript for R-Car Gen3" +echo +#### 1) Checking current directory +if [ ! -d meta-rcar-gen3 ]; then + echo "ERROR: Please extract meta-renesas and cd to it, before execute $0" + exit 1 +fi + +#### 2) Checking Arguments +if [ "X$1" = "X" ]; then + usage + exit 1 +fi + +while [ $# -gt 0 ] ; do + case "$1" in + -f|--force) + _no_md5check=1 + ;; + -d|--debug) + _debug=1 + ;; + *) + _src_dirname=$(basename $1) + _src_path=$(cd $(dirname $1) && pwd) + _src_full=${_src_path}/${_src_dirname} + ;; + esac + shift +done + +# source directory check +if [ ! -d ${_src_path}/${_src_dirname} ]; then + echo "${_src_path}/${_src_dirname} not found." + usage + exit 1 +fi + +if [ -n "${_debug}" ]; then + echo "src = ${_src_dirname}" + echo "src_path = ${_src_path}" + echo "src_full = ${_src_full}" + echo "no_md5check = ${_no_md5check}" + echo "" +fi + +##### 3) create temp directory +TMPWORK=${PWD}/CP_SCRIPT_TEMP +if [ -d ${TMPWORK} ]; then + echo "ERROR: Work directory already exist." + exit 1 +fi +install -d -m 700 ${TMPWORK} +cd ${TMPWORK} + +##### 4) copy +# initialize flag +_omx_common_install=0 +_uvcs_install=0 +_audio_common_install=0 +_video_decoder_common_install=0 +_video_encoder_common_install=0 +_dtv_kern_install=0 + +func_gfx +func_audio +func_audio_mw +func_video_decoder +func_video_encoder +func_dtv_dvd +func_cms +func_adsp +func_iccom + +##### 5) cleanup temp directory +func_clean_tempdir + +##### End +echo "Complete copying !" diff --git a/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/md5list.txt b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/md5list.txt new file mode 100644 index 00000000..14a9cb74 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/md5list.txt @@ -0,0 +1,64 @@ +# GFX +_MD5_RTM0RC7795GLPG0001SL41C="" +_MD5_RCH3G001L4101ZDO="" +_MD5_RTM0RC7796GLPG0001SL41C="" +_MD5_RCM3G001L4101ZDO="" +_MD5_RTM0RC7796GLPGB001SL41C="" +_MD5_RCN3G001L4101ZDO="" +_MD5_RTM0RC7799GLPG0001SL41C="" +_MD5_RCE3G001L4101ZDO="" +_MD5_INFRTM0RC7795GLPG0001SL41C="" +_MD5_INFRTM0RC7796GLPG0001SL41C="" +_MD5_INFRTM0RC7796GLPGB001SL41C="" +_MD5_INFRTM0RC7799GLPG0001SL41C="" +# OMX AUDIO +_MD5_RTM0AC0000ADAACMZ1SL41C="" +_MD5_RTM0AC0000XAAACD30SL41C="" +_MD5_RTM0AC0000XACMND30SL41C="" +_MD5_RTM0AC0000ADAAPMZ1SL41C="" +_MD5_RTM0AC0000ADMP3MZ1SL41C="" +_MD5_RTM0AC0000ADWMAMZ1SL41C="" +_MD5_RTM0AC0000XAAAPD30SL41C="" +_MD5_RTM0AC0000XAMP3D30SL41C="" +_MD5_RTM0AC0000XAWMAD30SL41C="" +_MD5_RTM0AC0000AEAACMZ1SL41C="" +_MD5_RTM0AC0000XAAACE30SL41C="" +_MD5_RTM0AC0000XAALAD30SL41C="" +_MD5_RTM0AC0000XAFLAD30SL41C="" +_MD5_RTM0AC0000XADD5D30SL41C="" +_MD5_RTM0AC0000ADDD5MZ1SL41C="" +# OMX VIDEO +_MD5_RTM0AC0000XV263D30SL41C="" +_MD5_RTM0AC0000XV264D30SL41C="" +_MD5_RTM0AC0000XCMCTL30SL41C="" +_MD5_RCG3VUDRL4101ZDO="" +_MD5_RTM0AC0000XVCMND30SL41C="" +_MD5_RTM0AC0000XV265D30SL41C="" +_MD5_RTM0AC0000XVM2VD30SL41C="" +_MD5_RTM0AC0000XVM4VD30SL41C="" +_MD5_RTM0AC0000XVVC1D30SL41C="" +_MD5_RTM0AC0000XVCMNE30SL41C="" +_MD5_RTM0AC0000XV264E30SL41C="" +_MD5_RTM0AC0000XVDVXD30SL41C="" +_MD5_RTM0AC0000XVRLVD30SL41C="" +_MD5_RTM0AC0000XVVP8D30SL41C="" +_MD5_RTM0AC0000XVVP8E30SL41C="" +_MD5_RTM0AC0000XVVP9D30SL41C="" +# DTV/DVD +_MD5_RCG3T001L4101ZDO="" +_MD5_RTM0RC0000TE020000SL41C1="" +_MD5_RTM0RC0000TE020000SL41C2="" +_MD5_RTM0RC0000XDVDC301SL41C="" +_MD5_RTM0RC0000XDVDF301SL41C="" +# CMS +_MD5_RTM0AC0000JRCMBCV0SL41C="" +_MD5_RTM0AC0000JRCMBLC0SL41C="" +_MD5_RTM0AC0000JRCMDGV0SL41C="" +# ADSP +_MD5_RCG3AHFWN0201ZDP="" +_MD5_RCG3AHIFL4101ZDP="" +_MD5_RCG3AHPDL4101ZDO="" +# ICCOM +_MD5_RCG3ZLIDL4101ZNO1="" +_MD5_RCG3ZLIDL4101ZNO2="" +_MD5_RCG3ZLILL4101ZNO="" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/adsp-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/adsp-control.inc new file mode 100644 index 00000000..44a8d146 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/adsp-control.inc @@ -0,0 +1,2 @@ +# USE_ADSP for Audio DSP +USE_ADSP = "${@bb.utils.contains('DISTRO_FEATURES', 'adsp', '1', '0', d)}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/arm-trusted-firmware-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/arm-trusted-firmware-control.inc new file mode 100644 index 00000000..013598df --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/arm-trusted-firmware-control.inc @@ -0,0 +1,58 @@ +# This function is to generate IPL binaries for H3/H3ULCB (SoC: r8a7795), E3 (SoC: r8a7790) + +# IPL build options for H3/E3/H3ULCB +EXTRA_ATFW_OPT ?= "" +EXTRA_ATFW_CONF ?= "" + +do_ipl_opt_compile () { + oe_runmake distclean + oe_runmake bl2 bl31 dummytool PLAT=${PLATFORM} ${EXTRA_ATFW_OPT} ${ATFW_OPT_LOSSY} +} + +do_ipl_opt_deploy () { + install -d ${DEPLOYDIR} + + # Copy IPL to deploy folder + install -m 0644 ${S}/build/${PLATFORM}/release/bl2/bl2.elf ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.elf + install -m 0644 ${S}/build/${PLATFORM}/release/bl2.bin ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.bin + install -m 0644 ${S}/build/${PLATFORM}/release/bl2.srec ${DEPLOYDIR}/bl2-${MACHINE}-${EXTRA_ATFW_CONF}.srec + install -m 0644 ${S}/build/${PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.elf + install -m 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.bin + install -m 0644 ${S}/build/${PLATFORM}/release/bl31.srec ${DEPLOYDIR}/bl31-${MACHINE}-${EXTRA_ATFW_CONF}.srec + install -m 0644 ${S}/tools/dummy_create/bootparam_sa0.srec ${DEPLOYDIR}/bootparam_sa0-${EXTRA_ATFW_CONF}.srec + install -m 0644 ${S}/tools/dummy_create/cert_header_sa6.srec ${DEPLOYDIR}/cert_header_sa6-${EXTRA_ATFW_CONF}.srec +} + +# For IPL compile options for H3/H3ULCB (SoC: r8a7795), E3 (SoC: r8a7790) +python do_extra_ipl_opt() { + soc = d.getVar('SOC_FAMILY') + soc = soc.split(':')[1] + machine = d.getVar('MACHINE_ARCH') + + if soc == "r8a7795": + # For H3 SiP DDR 4GiB (2GiB x 2ch) + if machine != "h3ulcb": + d.setVar('EXTRA_ATFW_CONF', '2x2g') + d.setVar('EXTRA_ATFW_OPT', ' LSI=H3 RCAR_DRAM_SPLIT=2 RCAR_DRAM_CHANNEL=5 ') + bb.build.exec_func('do_ipl_opt_compile', d) + bb.build.exec_func('do_ipl_opt_deploy', d) + + # For H3/H3ULCB SiP DDR 8GiB (2GiB x 4ch) + d.setVar('EXTRA_ATFW_CONF', '4x2g') + d.setVar('EXTRA_ATFW_OPT', ' LSI=H3 RCAR_DRAM_SPLIT=1 ') + d.setVar('EXTRA_ATFW_OPT_append_ulcb', ' RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0 ') + bb.build.exec_func('do_ipl_opt_compile', d) + bb.build.exec_func('do_ipl_opt_deploy', d) + + # For E3 SiP DDR 2GiB + if soc == "r8a77990": + d.setVar('EXTRA_ATFW_CONF', '4d') + d.setVar('EXTRA_ATFW_OPT', ' LSI=E3 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=1 RCAR_DRAM_DDR3L_MEMDUAL=1 ') + bb.build.exec_func('do_ipl_opt_compile', d) + bb.build.exec_func('do_ipl_opt_deploy', d) +} + +do_ipl_opt_compile[dirs] = "${B}" +do_ipl_opt_deploy[dirs] = "${B}" + +addtask extra_ipl_opt after do_configure before do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/avb-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/avb-control.inc new file mode 100644 index 00000000..6ed7f536 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/avb-control.inc @@ -0,0 +1,2 @@ +# USE_AVB for AVB Software Package for Linux +USE_AVB = "${@'1' if 'avb' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/cas-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/cas-control.inc new file mode 100644 index 00000000..18ccc74d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/cas-control.inc @@ -0,0 +1,17 @@ +SOC="${@d.getVar('SOC_FAMILY').split(':')[1]}" +CAS="${@'1' if 'cas' in '${MACHINE_FEATURES}' else '0'}" + +# USE_CAS for H3 (SoC: r8a7795) or M3 (SoC: r8a7796) +USE_CAS="${@'1' if '${CAS}' == '1' and ('${SOC}' == 'r8a7795' or '${SOC}' == 'r8a7796') else '0'}" + +# Trap incorrect CAS setting for M3N/E3 +WARN="${@'1' if '${CAS}' == '1' and '${USE_CAS}' == '0' else '0'}" + +# This function is to show a warning message when enabling CAS feature on M3N/E3 +python do_cas_checking() { + warn=d.getVar('WARN') + if warn == "1" : + bb.warn("CAS only supports H3 (SoC: r8a7795), M3 (SoC: r8a7796), this feature will be disabled automatically") +} + +addtask cas_checking before do_configure after do_patch diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/cms-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/cms-control.inc new file mode 100644 index 00000000..2ebfa517 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/cms-control.inc @@ -0,0 +1,18 @@ +# USE_CMSBCM for Basic Color Management Middleware for Linux +USE_CMSBCM = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsbcm', '1', '0', d)}" + +# USE_CMSBLC for Backlight Control Middleware for Linux +USE_CMSBLC = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsblc', '1', '0', d)}" + +# USE_CMSDGC for Dynamic Gamma Correction Middleware for Linux +USE_CMSDGC = "${@bb.utils.contains('DISTRO_FEATURES', 'cmsdgc', '1', '0', d)}" + +# CMS Flag list +LIST_CMS_FLAG = " \ + ${USE_CMSBCM} \ + ${USE_CMSBLC} \ + ${USE_CMSDGC} \ +" + +# USE_CMS for Color Management Middleware +USE_CMS = "${@'1' if '1' in '${LIST_CMS_FLAG}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/dtv-dvd-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/dtv-dvd-control.inc new file mode 100644 index 00000000..07c4d5f0 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/dtv-dvd-control.inc @@ -0,0 +1,19 @@ +# USE_DTV for ISDB-T DTV Software Package +USE_DTV = "${@'1' if 'dtv' in '${DISTRO_FEATURES}' else '0'}" + +# USE_DVD for DVD Core-Middleware for Linux +USE_DVD = "${@'1' if 'dvd' in '${DISTRO_FEATURES}' else '0'}" + +# USE_DVD_ENCRYPTION_LIB for DVD Encryption Library for Linux +USE_DVD_ENCRYPTION_LIB = "${@'1' if 'dvd_encryption_library' in '${DISTRO_FEATURES}' else '0'}" + +# This function to prevent build DTV feature with E3 +python do_dtv_checking () { + soc = d.getVar('SOC_FAMILY') + soc = soc.split(':')[1] + use_dtv = d.getVar('USE_DTV') + if use_dtv == "1" and soc == "r8a77990": + bb.fatal("E3 (SoC: r8a77990) does not support SSP, please disable DTV feature in your local configuration") +} + +addtask dtv_checking before do_configure after do_patch diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/gles-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/gles-control.inc new file mode 100644 index 00000000..045caa32 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/gles-control.inc @@ -0,0 +1,6 @@ +USE_GLES = "${@'1' if 'gsx' in '${MACHINE_FEATURES}' else '0'}" +USE_GLES_WAYLAND = \ + "${@'1' if '${USE_GLES}' == '1' and 'wayland' in '${DISTRO_FEATURES}' else '0'}" +USE_WAYLAND_IVI_SHELL = \ + "${@'1' if 'ivi-shell' in '${DISTRO_FEATURES}' and \ + 'wayland' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/iccom-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/iccom-control.inc new file mode 100644 index 00000000..bb8bd2cc --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/iccom-control.inc @@ -0,0 +1,2 @@ +# USE_ICCOM for Linux ICCOM driver, Linux ICCOM library +USE_ICCOM = "${@'1' if 'iccom' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/multimedia-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/multimedia-control.inc new file mode 100644 index 00000000..beeabc15 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/multimedia-control.inc @@ -0,0 +1,9 @@ +# USE_MULTIMEDIA for Renesas Multimedia package +USE_MULTIMEDIA = "${@'1' if 'multimedia' in '${MACHINE_FEATURES}' else '0'}" +USE_MULTIMEDIA_TP = "${@'1' if 'mm-test' in '${DISTRO_FEATURES}' else '0'}" + +# For wayland +USE_WAYLAND = "${@'1' if 'wayland' in '${DISTRO_FEATURES}' else '0'}" + +# USE_V4L2_RENDERER for weston v4l2-renderer +USE_V4L2_RENDERER = "${@'1' if 'v4l2-renderer' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/omx-control.inc b/bsp/meta-renesas/meta-rcar-gen3/include/omx-control.inc new file mode 100644 index 00000000..69093e8f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/omx-control.inc @@ -0,0 +1,156 @@ +## Additional configuration in OMX module, include +# USE_H263D_OMX for OMX Media Component H263 OMX Library +USE_H263D_OMX = "${@'1' if 'h263dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_H264D_OMX for OMX Media Component H264 OMX Library +USE_H264D_OMX = "${@'1' if 'h264dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_H264E_OMX for OMX Media Component H264 Encoder Library +USE_H264E_OMX = "${@'1' if 'h264enc_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_H265D_OMX for OMX Media Component H265 OMX Library +USE_H265D_OMX = "${@'1' if 'h265dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_MPEG2_OMX for OMX Media Component MPEG2 OMX Library +USE_MPEG2D_OMX = "${@'1' if 'mpeg2dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_MPEG4D_OMX for OMX Media Component MPEG4 Decoder Library +USE_MPEG4D_OMX = "${@'1' if 'mpeg4dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_VC1D_OMX for OMX Media Component VC-1 Decoder Library +USE_VC1D_OMX = "${@'1' if 'vc1dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_DIVXD_OMX for OMX Media Component DivX Decoder Library +USE_DIVXD_OMX = "${@'1' if 'divxdec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_RVD_OMX for OMX Media Component RealVideo Decoder Library +USE_RVD_OMX = "${@'1' if 'rvdec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACLCD_OMX for OMX Media Component AACLC OMX Library +USE_AACLCD_OMX = "${@'1' if 'aaclcdec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACPV2D_OMX for OMX Media Component aacPlus V2 OMX Library +USE_AACPV2D_OMX = "${@'1' if 'aacpv2dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_MP3D_OMX for OMX Media Component MP3 OMX Library +USE_MP3D_OMX = "${@'1' if 'mp3dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_WMAD_OMX for OMX Media Component WMA OMX Library +USE_WMAD_OMX = "${@'1' if 'wmadec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_ALACD_OMX for OMX Media Component ALAC decoder Library +USE_ALACD_OMX = "${@'1' if 'alacdec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_FLACD_OMX for OMX Media Component FLAC decoder Library +USE_FLACD_OMX = "${@'1' if 'flacdec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_DDD_OMX for OMX Media Component Dolby(R) Digital decoder Library +USE_DDD_OMX = "${@'1' if 'dddec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACLCE_OMX for OMX Media Component AAC-LC encoder Library +USE_AACLCE_OMX = "${@'1' if 'aaclcenc_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACLC_MDW for AACLC MDW Library +USE_AACLC_MDW = "${@'1' if 'aaclcdec_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACPV2_MDW for aacPlus V2 MDW Library +USE_AACPV2_MDW = "${@'1' if 'aacpv2dec_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_MP3_MDW for MP3 MDW Library +USE_MP3_MDW = "${@'1' if 'mp3dec_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_WMA_MDW for WMA MDW Library +USE_WMA_MDW = "${@'1' if 'wmadec_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_DD_MDW for Dolby(R) Digital MDW Library +USE_DD_MDW = "${@'1' if 'dddec_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_AACLCE_OMX for AAC-LC encoder middleware Library +USE_AACLCE_MDW = "${@'1' if 'aaclcenc_mdw' in '${DISTRO_FEATURES}' else '0'}" + +# USE_VP8D_OMX for OMX Media Component VP8 Decoder Library +USE_VP8D_OMX = "${@'1' if 'vp8dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_VP8E_OMX for OMX Media Component VP8 Encoder Library +USE_VP8E_OMX = "${@'1' if 'vp8enc_lib' in '${DISTRO_FEATURES}' else '0'}" + +# USE_VP9D_OMX for OMX Media Component VP9 Decoder Library +USE_VP9D_OMX = "${@'1' if 'vp9dec_lib' in '${DISTRO_FEATURES}' else '0'}" + +# This function is to make sure vp9dec_lib only build with M3N or E3 +# and warns user to build vp9dec_lib for M3 v3.0 only +python () { + soc = d.getVar('SOC_FAMILY') + soc = soc.split(':')[1] + use_vp9d = d.getVar('USE_VP9D_OMX') + if use_vp9d == "1": + if soc != 'r8a77965' and soc != 'r8a77990': + if soc == 'r8a7796': + bb.warn("vp9dec_lib supports M3 v3.0 only, it does not work on other M3 versions.") + else: + bb.warn("vp9dec_lib only supports M3N (SoC: r8a77965), E3 (SoC: r8a77990), M3 v3.0 (SoC: r8a7796). Disabling.") + d.setVar('USE_VP9D_OMX', '0') +} + +# OMX Video Decoder Flag list +LIST_OMX_VIDEO_DEC_FLAG = " \ + ${USE_H263D_OMX} \ + ${USE_H264D_OMX} \ + ${USE_H265D_OMX} \ + ${USE_MPEG2D_OMX} \ + ${USE_MPEG4D_OMX} \ + ${USE_VC1D_OMX} \ + ${USE_DIVXD_OMX} \ + ${USE_RVD_OMX} \ + ${USE_VP8D_OMX} \ + ${USE_VP9D_OMX} \ +" + +# OMX Video Encoder Flag list +LIST_OMX_VIDEO_ENC_FLAG = " \ + ${USE_H264E_OMX} \ + ${USE_VP8E_OMX} \ +" + +# OMX Audio Flag list (except MDW) +LIST_OMX_AUDIO_FLAG = " \ + ${USE_AACLCD_OMX} \ + ${USE_AACPV2D_OMX} \ + ${USE_MP3D_OMX} \ + ${USE_WMAD_OMX} \ + ${USE_AACLCE_OMX} \ + ${USE_ALACD_OMX} \ + ${USE_FLACD_OMX} \ + ${USE_DDD_OMX} \ +" + +# Audio M/W Flag list +LIST_AUDIO_MDW_FLAG = " \ + ${USE_AACLC_MDW} \ + ${USE_AACPV2_MDW} \ + ${USE_MP3_MDW} \ + ${USE_WMA_MDW} \ + ${USE_DD_MDW} \ + ${USE_AACLCE_MDW} \ +" + +# USE_OMX_VIDEO_DEC for Video Decoder Common Libs +USE_VIDEO_DEC = "${@'1' if '1' in '${LIST_OMX_VIDEO_DEC_FLAG}' else '0'}" + +# USE_OMX_VIDEO_DEC for Video Encoder Common Libs +USE_VIDEO_ENC = "${@'1' if '1' in '${LIST_OMX_VIDEO_ENC_FLAG}' else '0'}" + +# USE_VIDEO_OMX for Enable/Disable OMX Video +USE_VIDEO_OMX = "${@'1' if '1' in '${USE_VIDEO_DEC} ${USE_VIDEO_ENC}' else '0'}" + +# USE_AUDIO_OMX for Audio Common Libs +USE_AUDIO_OMX = "${@'1' if '1' in '${LIST_OMX_AUDIO_FLAG}' else '0'}" + +# USE_OMX_COMMON for OMX Common Libs +USE_OMX_COMMON = "${@'1' if '1' in '${USE_VIDEO_OMX} ${USE_AUDIO_OMX}' else '0'}" + +# USE_OMX_USER_MODULE for OMX User Module +# Note) List of USE_OMX_COMMON = {USE_VIDEO_OMX} + {USE_AUDIO_OMX} +USE_OMX_USER_MODULE = "${@'1' if '1' in '${USE_OMX_COMMON} ${LIST_AUDIO_MDW_FLAG}' else '0'}" + +USE_OMX_EVA_PKG = "${@'1' if 'use_eva_pkg' in '${DISTRO_FEATURES}' else '0'}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-modules-common.inc b/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-modules-common.inc new file mode 100644 index 00000000..9805862a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-modules-common.inc @@ -0,0 +1,11 @@ +export BUILDDIR = "${STAGING_INCDIR}/.." +export INCSHARED = "${STAGING_INCDIR}" +export LIBSHARED = "${STAGING_LIBDIR}" +export KERNELSRC = "${STAGING_KERNEL_DIR}" +export CROSS_COMPILE = "${TARGET_PREFIX}" +export KERNELDIR = "${STAGING_KERNEL_DIR}" +export LDFLAGS = "" +export CP = "cp" +require include/rcar-gen3-path-common.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" diff --git a/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-path-common.inc b/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-path-common.inc new file mode 100644 index 00000000..d3dcfffc --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/include/rcar-gen3-path-common.inc @@ -0,0 +1 @@ +RENESAS_DATADIR ?= "/usr/local" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2.inc new file mode 100644 index 00000000..fa5ac272 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2.inc @@ -0,0 +1,3 @@ +PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm libgbm" +PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm libgbm" + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend new file mode 100644 index 00000000..fdb7855d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-benchmark/glmark2/glmark2_git.bbappend @@ -0,0 +1,2 @@ +require ${@"glmark2.inc" if "rcar-gen3" in d.getVar("OVERRIDES") else ""} + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb new file mode 100644 index 00000000..2fe6630c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bb @@ -0,0 +1,60 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy +require include/multimedia-control.inc +require include/arm-trusted-firmware-control.inc + +S = "${WORKDIR}/git" + +BRANCH = "rcar_gen3" +SRC_URI = "git://github.com/renesas-rcar/arm-trusted-firmware.git;branch=${BRANCH}" +SRCREV = "af9f429a48b438e314289f17947ad5d8036f398e" + +PV = "v1.5+renesas+git${SRCPV}" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" +PLATFORM = "rcar" +ATFW_OPT_LOSSY = "${@oe.utils.conditional("USE_MULTIMEDIA", "1", "RCAR_LOSSY_ENABLE=1", "", d)}" +ATFW_OPT_r8a7795 = "LSI=H3 RCAR_DRAM_SPLIT=1 RCAR_DRAM_LPDDR4_MEMCONF=0 ${ATFW_OPT_LOSSY}" +ATFW_OPT_r8a7796 = "LSI=M3 RCAR_DRAM_SPLIT=2 ${ATFW_OPT_LOSSY}" +ATFW_OPT_r8a77965 = "LSI=M3N ${ATFW_OPT_LOSSY}" +ATFW_OPT_r8a77990 = "LSI=E3 RCAR_SA0_SIZE=0 RCAR_AVS_SETTING_ENABLE=0 RCAR_DRAM_DDR3L_MEMCONF=0 RCAR_DRAM_DDR3L_MEMDUAL=0" +ATFW_OPT_append_ulcb = " RCAR_GEN3_ULCB=1 PMIC_LEVEL_MODE=0" + +# requires CROSS_COMPILE set by hand as there is no configure script +export CROSS_COMPILE="${TARGET_PREFIX}" + +# 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" + +do_compile() { + oe_runmake distclean + oe_runmake bl2 bl31 dummytool PLAT=${PLATFORM} ${ATFW_OPT} +} + +# do_install() nothing +do_install[noexec] = "1" + +do_deploy() { + # Create deploy folder + install -d ${DEPLOYDIR} + + # Copy IPL to deploy folder + install -m 0644 ${S}/build/${PLATFORM}/release/bl2/bl2.elf ${DEPLOYDIR}/bl2-${MACHINE}.elf + install -m 0644 ${S}/build/${PLATFORM}/release/bl2.bin ${DEPLOYDIR}/bl2-${MACHINE}.bin + install -m 0644 ${S}/build/${PLATFORM}/release/bl2.srec ${DEPLOYDIR}/bl2-${MACHINE}.srec + install -m 0644 ${S}/build/${PLATFORM}/release/bl31/bl31.elf ${DEPLOYDIR}/bl31-${MACHINE}.elf + install -m 0644 ${S}/build/${PLATFORM}/release/bl31.bin ${DEPLOYDIR}/bl31-${MACHINE}.bin + install -m 0644 ${S}/build/${PLATFORM}/release/bl31.srec ${DEPLOYDIR}/bl31-${MACHINE}.srec + install -m 0644 ${S}/tools/dummy_create/bootparam_sa0.srec ${DEPLOYDIR}/bootparam_sa0.srec + install -m 0644 ${S}/tools/dummy_create/cert_header_sa6.srec ${DEPLOYDIR}/cert_header_sa6.srec +} +addtask deploy before do_build after do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch new file mode 100644 index 00000000..db8bdace --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch @@ -0,0 +1,28 @@ +From 30dd2986fb64aba7ee78d4e231c344e2c39d7999 Mon Sep 17 00:00:00 2001 +From: Simon Hughes +Date: Thu, 21 Jun 2018 17:22:23 +0100 +Subject: [PATCH] Fix for teec_trace.c snprintf -Werror=format-truncation= + error. + +Signed-off-by: Simon Hughes +--- + libteec/src/teec_trace.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libteec/src/teec_trace.c b/libteec/src/teec_trace.c +index 78b79d6..c91bc43 100644 +--- a/libteec/src/teec_trace.c ++++ b/libteec/src/teec_trace.c +@@ -106,7 +106,8 @@ int _dprintf(const char *function, int flen, int line, int level, + */ + int thread_id = syscall(SYS_gettid); /* perf issue ? */ + +- snprintf(prefixed, MAX_PRINT_SIZE, ++ int len = 0; ++ len = snprintf(prefixed+len, MAX_PRINT_SIZE, + "%s [%d] %s:%s:%d: %s", + trace_level_strings[level], thread_id, prefix, func, + line, raw); +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch new file mode 100644 index 00000000..fddc7fc1 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch @@ -0,0 +1,208 @@ +From 04a72e88f768722edff453694e70535d36a8b1b4 Mon Sep 17 00:00:00 2001 +From: Hiroki Negishi +Date: Mon, 1 Apr 2019 13:10:57 +0900 +Subject: [PATCH] tee-supplicant: use MMC_IOC_MULTI_CMD for RPMB access + +To access RPMB, host should switch to RPMB partition. +And in RPMB partition, host should finish RPMB sequence. + +In case of using MMC_IOC_CMD as RPMB ioctl, eMMC driver switches +partition to user data area between WRITE command and READ command. +This may cause General failure. +In case of MMC_IOC_MULTI_CMD, eMMC driver keeps RPMB partition. + +This patch changes RPMB ioctl from MMC_IOC_CMD into MMC_IOC_MULTI_CMD +and changes ioctl parameters according to mmc utils. + +Signed-off-by: Hiroki Negishi +--- + tee-supplicant/src/rpmb.c | 120 +++++++++++++++++++++++----------------------- + 1 file changed, 61 insertions(+), 59 deletions(-) + +diff --git a/tee-supplicant/src/rpmb.c b/tee-supplicant/src/rpmb.c +index cac9932..29da690 100644 +--- a/tee-supplicant/src/rpmb.c ++++ b/tee-supplicant/src/rpmb.c +@@ -114,6 +114,7 @@ static pthread_mutex_t rpmb_mutex = PTHREAD_MUTEX_INITIALIZER; + */ + + #define MMC_BLOCK_MAJOR 179 ++#define RPMB_MULTI_CMD_MAX_CMDS 3 + + /* mmc_ioc_cmd.opcode */ + #define MMC_SEND_EXT_CSD 8 +@@ -130,6 +131,9 @@ static pthread_mutex_t rpmb_mutex = PTHREAD_MUTEX_INITIALIZER; + + #define MMC_CMD_ADTC (1 << 5) /* Addressed data transfer command */ + ++#define MMC_RSP_SPI_S1 (1 << 7) /* one status byte */ ++#define MMC_RSP_SPI_R1 (MMC_RSP_SPI_S1) ++ + /* mmc_ioc_cmd.write_flag */ + #define MMC_CMD23_ARG_REL_WR (1 << 31) /* CMD23 reliable write */ + +@@ -610,26 +614,38 @@ static uint32_t read_ext_csd(int fd, uint8_t *ext_csd) + return TEEC_SUCCESS; + } + ++static inline void set_single_cmd(struct mmc_ioc_cmd *ioc, __u32 opcode, ++ int write_flag, unsigned int blocks) ++{ ++ ioc->opcode = opcode; ++ ioc->write_flag = write_flag; ++ ioc->arg = 0x0; ++ ioc->blksz = 512; ++ ioc->blocks = blocks; ++ ioc->flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; ++} ++ + static uint32_t rpmb_data_req(int fd, struct rpmb_data_frame *req_frm, + size_t req_nfrm, struct rpmb_data_frame *rsp_frm, + size_t rsp_nfrm) + { +- int st; ++ int err; + size_t i; + uint16_t msg_type = ntohs(req_frm->msg_type); +- struct mmc_ioc_cmd cmd; ++ struct mmc_ioc_cmd *ioc; ++ struct mmc_ioc_multi_cmd *mioc; ++ struct rpmb_data_frame frame_status = {0}; + +- memset(&cmd, 0, sizeof(cmd)); +- cmd.blksz = 512; +- cmd.blocks = req_nfrm; +- cmd.data_ptr = (uintptr_t)req_frm; +- cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; +- cmd.opcode = MMC_WRITE_MULTIPLE_BLOCK; +- cmd.write_flag = 1; ++ mioc = (struct mmc_ioc_multi_cmd *) ++ malloc(sizeof(struct mmc_ioc_multi_cmd) + ++ RPMB_MULTI_CMD_MAX_CMDS * sizeof(struct mmc_ioc_cmd)); ++ if (!mioc) ++ return -ENOMEM; + + for (i = 1; i < req_nfrm; i++) { + if (req_frm[i].msg_type != msg_type) { + EMSG("All request frames shall be of the same type"); ++ free(mioc); + return TEEC_ERROR_BAD_PARAMETERS; + } + } +@@ -642,77 +658,63 @@ static uint32_t rpmb_data_req(int fd, struct rpmb_data_frame *req_frm, + case RPMB_MSG_TYPE_REQ_AUTH_DATA_WRITE: + if (rsp_nfrm != 1) { + EMSG("Expected only one response frame"); ++ free(mioc); + return TEEC_ERROR_BAD_PARAMETERS; + } + +- /* Send write request frame(s) */ +- cmd.write_flag |= MMC_CMD23_ARG_REL_WR; +- /* +- * Black magic: tested on a HiKey board with a HardKernel eMMC +- * module. When postsleep values are zero, the kernel logs +- * random errors: "mmc_blk_ioctl_cmd: Card Status=0x00000E00" +- * and ioctl() fails. +- */ +- cmd.postsleep_min_us = 20000; +- cmd.postsleep_max_us = 50000; +- st = IOCTL(fd, MMC_IOC_CMD, &cmd); +- if (st < 0) +- return TEEC_ERROR_GENERIC; +- cmd.postsleep_min_us = 0; +- cmd.postsleep_max_us = 0; +- +- /* Send result request frame */ +- memset(rsp_frm, 0, 1); +- rsp_frm->msg_type = htons(RPMB_MSG_TYPE_REQ_RESULT_READ); +- cmd.data_ptr = (uintptr_t)rsp_frm; +- cmd.write_flag &= ~MMC_CMD23_ARG_REL_WR; +- st = IOCTL(fd, MMC_IOC_CMD, &cmd); +- if (st < 0) +- return TEEC_ERROR_GENERIC; +- +- /* Read response frame */ +- cmd.opcode = MMC_READ_MULTIPLE_BLOCK; +- cmd.write_flag = 0; +- cmd.blocks = rsp_nfrm; +- st = IOCTL(fd, MMC_IOC_CMD, &cmd); +- if (st < 0) +- return TEEC_ERROR_GENERIC; ++ mioc->num_of_cmds = 3; ++ ++ /* Write request */ ++ ioc = &mioc->cmds[0]; ++ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, (1 << 31) | 1, 1); ++ mmc_ioc_cmd_set_data((*ioc), req_frm); ++ ++ /* Result request */ ++ ioc = &mioc->cmds[1]; ++ frame_status.msg_type = htobe16(RPMB_MSG_TYPE_REQ_RESULT_READ); ++ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, 1, 1); ++ mmc_ioc_cmd_set_data((*ioc), &frame_status); ++ ++ /* Get response */ ++ ioc = &mioc->cmds[2]; ++ set_single_cmd(ioc, MMC_READ_MULTIPLE_BLOCK, 0, 1); ++ mmc_ioc_cmd_set_data((*ioc), rsp_frm); ++ + break; + + case RPMB_MSG_TYPE_REQ_WRITE_COUNTER_VAL_READ: + if (rsp_nfrm != 1) { + EMSG("Expected only one response frame"); ++ free(mioc); + return TEEC_ERROR_BAD_PARAMETERS; + } + + /* Fall through */ + case RPMB_MSG_TYPE_REQ_AUTH_DATA_READ: +- if (req_nfrm != 1) { +- EMSG("Expected only one request frame"); +- return TEEC_ERROR_BAD_PARAMETERS; +- } ++ mioc->num_of_cmds = 2; ++ ++ /* Read request */ ++ ioc = &mioc->cmds[0]; ++ set_single_cmd(ioc, MMC_WRITE_MULTIPLE_BLOCK, 1, 1); ++ mmc_ioc_cmd_set_data((*ioc), req_frm); ++ ++ /* Get response */ ++ ioc = &mioc->cmds[1]; ++ set_single_cmd(ioc, MMC_READ_MULTIPLE_BLOCK, 0, rsp_nfrm); ++ mmc_ioc_cmd_set_data((*ioc), rsp_frm); + +- /* Send request frame */ +- st = IOCTL(fd, MMC_IOC_CMD, &cmd); +- if (st < 0) +- return TEEC_ERROR_GENERIC; +- +- /* Read response frames */ +- cmd.data_ptr = (uintptr_t)rsp_frm; +- cmd.opcode = MMC_READ_MULTIPLE_BLOCK; +- cmd.write_flag = 0; +- cmd.blocks = rsp_nfrm; +- st = IOCTL(fd, MMC_IOC_CMD, &cmd); +- if (st < 0) +- return TEEC_ERROR_GENERIC; + break; + + default: + EMSG("Unsupported message type: %d", msg_type); ++ free(mioc); + return TEEC_ERROR_GENERIC; + } + +- return TEEC_SUCCESS; ++ err = ioctl(fd, MMC_IOC_MULTI_CMD, mioc); ++ ++ free(mioc); ++ return err; + } + + static uint32_t rpmb_get_dev_info(uint16_t dev_id, struct rpmb_dev_info *info) +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service new file mode 100644 index 00000000..37fc4f75 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client/optee.service @@ -0,0 +1,9 @@ +[Unit] +Description=optee services + +[Service] +ExecStart=/usr/bin/tee-supplicant +ExecStop=/usr/bin/killall -s KILL tee-supplicant + +[Install] +WantedBy=multi-user.target diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb new file mode 100644 index 00000000..0319f217 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-client_git.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "OP-TEE Client" +LICENSE = "BSD-2-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" +PR = "r0" +PV = "3.1.0+renesas+git${SRCPV}" +BRANCH = "master" +SRC_URI = "git://github.com/OP-TEE/optee_client.git;branch=${BRANCH}" +SRCREV = "3f16662284a69fdec97b1712064be94d1fed7ae7" + +SRC_URI += " \ + file://optee.service \ + file://0001-tee-supplicant-use-MMC_IOC_MULTI_CMD-for-RPMB-access.patch \ + file://0001-Fix-for-teec_trace.c-snprintf-Werror-format-truncati.patch \ +" + +inherit python3native systemd +SYSTEMD_SERVICE_${PN} = "optee.service" + +COMPATIBLE_MACHINE = "salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}/git" + +# Recipe which fail to compile when enabling _FORTIFY_SOURCE=2 option +SECURITY_CFLAGS_pn-optee-client = "" + +EXTRA_OEMAKE = "RPMB_EMU=0" + +do_install () { + # Create destination directories + install -d ${D}/${libdir} + install -d ${D}/${includedir} + + # Install library + install -m 0755 ${S}/out/export/lib/libteec.so.1.0 ${D}/${libdir} + + # Create symbolic link + cd ${D}/${libdir} + ln -sf libteec.so.1.0 libteec.so.1 + ln -sf libteec.so.1 libteec.so + + # Install header files + install -m 0644 ${S}/out/export/include/* ${D}/${includedir} + + # Install systemd service configure file for OP-TEE client + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}/${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/optee.service ${D}/${systemd_system_unitdir} + fi +} + +# install the tee-supplicant for 64 bit only. +do_install_append_aarch64 () { + # Create destination directory + install -d ${D}/${bindir} + + # Install binary to bindir + install -m 0755 ${S}/out/export/bin/tee-supplicant ${D}/${bindir} +} + +RPROVIDES_${PN} += "optee-client" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch new file mode 100644 index 00000000..bad7b27c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-core-define-syscall_t-as-void-void.patch @@ -0,0 +1,75 @@ +From f6d17e33e7b95c90a2521cfd37cd5cb511909fc4 Mon Sep 17 00:00:00 2001 +From: Jerome Forissier +Date: Thu, 5 Jul 2018 13:07:52 +0200 +Subject: [PATCH] core: define syscall_t as void (*)(void) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +syscall_t is currently typedef'ed as TEE_Result (*)(void). It is used to +represent a pointer to any system call, in the syscall table for instance. +As such, the exact type behind syscall_t cannot reflect all the syscalls +since they have different prototypes. The current declaration with a +TEE_Result return type was probably chosen because it was a common +characteristic of all syscalls to return a TEE_Result. + +However, this type causes compilation warnings with GCC 8.1: + +core/arch/arm/tee/arch_svc.c:43:36: warning: cast between incompatible function types from ‘void (*)(long unsigned int)’ to ‘TEE_Result (*)(void)’ {aka ‘unsigned int (*)(void)’} [-Wcast-function-type] + #define SYSCALL_ENTRY(_fn) { .fn = (syscall_t)_fn } + ^ +core/arch/arm/tee/arch_svc.c:50:2: note: in expansion of macro ‘SYSCALL_ENTRY’ + SYSCALL_ENTRY(syscall_sys_return), + ^~~~~~~~~~~~~ + +The solution is to use 'void (*)(void)' instead, as explained in the GCC +documentation: + + -Wcast-function-type + + Warn when a function pointer is cast to an incompatible function + pointer. [...] The function type void (*) (void) is special and matches + everything, which can be used to suppress this warning. [...] + +Link: [1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +Signed-off-by: Jerome Forissier +Acked-by: Jens Wiklander +--- + core/arch/arm/tee/arch_svc.c | 2 +- + core/arch/arm/tee/arch_svc_private.h | 7 +++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/core/arch/arm/tee/arch_svc.c b/core/arch/arm/tee/arch_svc.c +index eb142ec..b2dd193 100644 +--- a/core/arch/arm/tee/arch_svc.c ++++ b/core/arch/arm/tee/arch_svc.c +@@ -208,7 +208,7 @@ void __weak tee_svc_handler(struct thread_svc_regs *regs) + } + + if (scn > TEE_SCN_MAX) +- scf = syscall_not_supported; ++ scf = (syscall_t)syscall_not_supported; + else + scf = tee_svc_syscall_table[scn].fn; + +diff --git a/core/arch/arm/tee/arch_svc_private.h b/core/arch/arm/tee/arch_svc_private.h +index c0b3a73..695e733 100644 +--- a/core/arch/arm/tee/arch_svc_private.h ++++ b/core/arch/arm/tee/arch_svc_private.h +@@ -7,8 +7,11 @@ + + #include + +-/* void argument but in reality it can be any number of arguments */ +-typedef TEE_Result (*syscall_t)(void); ++/* ++ * Generic "pointer to function" type. Actual syscalls take zero or more ++ * arguments and return TEE_Result. ++ */ ++typedef void (*syscall_t)(void); + + /* Helper function for tee_svc_handler() */ + uint32_t tee_svc_do_call(struct thread_svc_regs *regs, syscall_t func); +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-scripts-update-scripts-to-use-python3.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-scripts-update-scripts-to-use-python3.patch new file mode 100644 index 00000000..9621cf6c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os/0001-scripts-update-scripts-to-use-python3.patch @@ -0,0 +1,427 @@ +From 0d4941123b5a88351f5954f6de00892f85ed5abc Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin +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 +--- + 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(' [...]".format( \ +- sys.argv[0]) ++ print("Usage: {0}
[...]".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/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb new file mode 100644 index 00000000..23574e7a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bb @@ -0,0 +1,69 @@ +DESCRIPTION = "OP-TEE OS" + +LICENSE = "BSD-2-Clause & BSD-3-Clause" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=69663ab153298557a59c67a60a743e5b \ + file://${WORKDIR}/git_official/LICENSE;md5=69663ab153298557a59c67a60a743e5b \ +" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy python3native + +PV = "3.1.0+renesas+git${SRCPV}" + +BRANCH = "rcar_gen3" +SRCREV_renesas = "c20fa00ff94bb6c40c11330ca280aa3f2807b8e8" +SRCREV_officialgit = "e77020396508fc086d7a4d6137388b116e4a662f" +SRCREV_FORMAT = "renesas_officialgit" + +SRC_URI = " \ + git://github.com/renesas-rcar/optee_os.git;branch=${BRANCH};name=renesas \ + git://github.com/OP-TEE/optee_os.git;branch=master;name=officialgit;destsuffix=git_official \ +" + +SRC_URI_append = " \ + file://0001-core-define-syscall_t-as-void-void.patch \ + file://0001-scripts-update-scripts-to-use-python3.patch \ +" + +COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" +PLATFORM = "rcar" + +DEPENDS = "python3-pycrypto-native" + +export CROSS_COMPILE64="${TARGET_PREFIX}" + +# Let the Makefile handle setting up the flags as it is a standalone application +LD[unexport] = "1" +LDFLAGS[unexport] = "1" +export CCcore="${CC}" +export LDcore="${LD}" +libdir[unexport] = "1" + +S = "${WORKDIR}/git" +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +do_configure() { + git -C ${WORKDIR}/git_official checkout -B official 3.1.0 + git -C ${WORKDIR}/git_official cherry-pick -n ${SRCREV_officialgit} + cp -rn ${WORKDIR}/git_official/core/lib/libtomcrypt ${B}/core/lib/. +} + +do_compile() { + oe_runmake PLATFORM=${PLATFORM} CFG_ARM64_core=y +} + +# do_install() nothing +do_install[noexec] = "1" + +do_deploy() { + # Create deploy folder + install -d ${DEPLOYDIR} + + # Copy TEE OS to deploy folder + install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.elf ${DEPLOYDIR}/tee-${MACHINE}.elf + install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.bin ${DEPLOYDIR}/tee-${MACHINE}.bin + install -m 0644 ${S}/out/arm-plat-${PLATFORM}/core/tee.srec ${DEPLOYDIR}/tee-${MACHINE}.srec +} +addtask deploy before do_build after do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb new file mode 100644 index 00000000..8fb0198f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-tp-user-module.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "QOS Interface test app for R-Car Gen3" + +require qosif.inc + +DEPENDS = "qosif-user-module" +PN = "qosif-tp-user-module" +PR = "r0" + +S = "${WORKDIR}/git" +QOSIF_TP_DIR = "qos_if-tp-user/files/qos_if" + +includedir = "${RENESAS_DATADIR}/include" + +do_compile() { + cd ${S}/${QOSIF_TP_DIR} + oe_runmake +} + +do_install() { + # Create destination directory + install -d ${D}${RENESAS_DATADIR}/bin/ + + # Copy user test program + install -m 755 ${S}/${QOSIF_TP_DIR}/qos_tp ${D}${RENESAS_DATADIR}/bin/ +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dbg \ +" + +FILES_${PN} = "${RENESAS_DATADIR}/bin/qos_tp" + +FILES_${PN}-dbg = " \ + ${RENESAS_DATADIR}/bin/.debug/* \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb new file mode 100644 index 00000000..c836fe31 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif-user-module.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "QOS Interface library for R-Car Gen3" + +require qosif.inc + +DEPENDS = "kernel-module-qos" +PN = "qosif-user-module" +PR = "r0" + +S = "${WORKDIR}/git" +QOSIF_LIB_DIR = "qos_if-module/files/qos_if" + +EXTRA_OEMAKE = "ARCH=${TARGET_ARCH}" + +includedir = "${RENESAS_DATADIR}/include" + +do_compile() { + # Build shared library + cd ${S}/${QOSIF_LIB_DIR}/if + rm -rf ${S}/${QOSIF_LIB_DIR}/if/libqos.so* + oe_runmake +} + +do_install() { + # Create destination directories + install -d ${D}/${libdir} + install -d ${D}/${includedir} + + # Copy shared library + install -m 755 ${S}/${QOSIF_LIB_DIR}/if/libqos.so* ${D}/${libdir}/ + cd ${D}/${libdir}/ + ln -sf libqos.so.1.0.0 libqos.so.1 + ln -sf libqos.so.1 libqos.so + + # Install shared header file + install -m 644 ${S}/${QOSIF_LIB_DIR}/include/qos_public.h ${D}/${includedir}/ +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ +" + +FILES_${PN} = " \ + ${libdir}/libqos.so* \ +" + +INSANE_SKIP_${PN} = "dev-so" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif.inc new file mode 100644 index 00000000..0b6cf905 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/qos/qosif.inc @@ -0,0 +1,15 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9 \ +" + +require include/rcar-gen3-modules-common.inc + +QOSIF_LIB_URL = "git://github.com/renesas-rcar/qos_lib.git" +BRANCH = "rcar-gen3" +SRCREV = "84ea8d562a55d1fbd7b6acf08a498d33a92dc392" + +SRC_URI = "${QOSIF_LIB_URL};branch=${BRANCH}" + +# This module is machine specific. +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc new file mode 100644 index 00000000..f66ac8fb --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot-common_2018.09.inc @@ -0,0 +1,9 @@ +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" +DEPENDS += "flex-native bison-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" +PE = "1" + +S = "${WORKDIR}/git" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc new file mode 100644 index 00000000..f009d18d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot.inc @@ -0,0 +1,310 @@ +SUMMARY = "Universal Boot Loader for embedded devices" +PROVIDES = "virtual/bootloader" + +B = "${WORKDIR}/build" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit uboot-config uboot-extlinux-config uboot-sign deploy + +DEPENDS += "swig-native python3-native" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' +EXTRA_OEMAKE += 'PYTHON=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' + +PACKAGECONFIG ??= "openssl" +# u-boot will compile its own tools during the build, with specific +# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as +# a host build dependency. +PACKAGECONFIG[openssl] = ",,openssl-native" + +# Allow setting an additional version string that will be picked up by the +# u-boot build system and appended to the u-boot version. If the .scmversion +# file already exists it will not be overwritten. +UBOOT_LOCALVERSION ?= "" + +# Some versions of u-boot use .bin and others use .img. By default use .bin +# but enable individual recipes to change this value. +UBOOT_SUFFIX ??= "bin" +UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}" +UBOOT_MAKE_TARGET ?= "all" + +# Output the ELF generated. Some platforms can use the ELF file and directly +# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging +# purposes. +UBOOT_ELF ?= "" +UBOOT_ELF_SUFFIX ?= "elf" +UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" + +# Some versions of u-boot build an SPL (Second Program Loader) image that +# should be packaged along with the u-boot binary as well as placed in the +# deploy directory. For those versions they can set the following variables +# to allow packaging the SPL. +SPL_BINARY ?= "" +SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" +SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" +SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" + +# Additional environment variables or a script can be installed alongside +# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' +# or 'boot.scr', should be packaged along with u-boot as well as placed in the +# deploy directory. Machine configurations needing one of these files should +# include it in the SRC_URI and set the UBOOT_ENV parameter. +UBOOT_ENV_SUFFIX ?= "txt" +UBOOT_ENV ?= "" +UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" + +# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf +# to find EXTLINUX conf file. +UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" +UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" +UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" + +do_compile () { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then + sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk + fi + + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + + if [ -n "${UBOOT_CONFIG}" ] + then + unset i j k + 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 + oe_runmake -C ${S} O=${B}/${config} ${config} + oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} + for binary in ${UBOOT_BINARIES}; do + k=$(expr $k + 1); + if [ $k -eq $i ]; then + cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} + fi + done + unset k + fi + done + unset j + done + unset i + else + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} + oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} + fi + +} + +do_install () { + 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 ${D}/boot + install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${D}/boot + install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + fi + + if [ -n "${UBOOT_ELF}" ] + then + 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 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + fi + fi + + if [ -e ${WORKDIR}/fw_env.config ] ; then + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + fi + + if [ -n "${SPL_BINARY}" ] + then + 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 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} + fi + fi + + if [ -n "${UBOOT_ENV}" ] + then + install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} + ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + fi + + if [ "${UBOOT_EXTLINUX}" = "1" ] + then + install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME} + fi + +} + +FILES_${PN} = "/boot ${sysconfdir}" + +do_deploy () { + 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} + install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + cd ${DEPLOYDIR} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${DEPLOYDIR} + install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + cd ${DEPLOYDIR} + rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + fi + + if [ -n "${UBOOT_ELF}" ] + then + 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 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + fi + + + if [ -n "${SPL_BINARY}" ] + then + 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 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + fi + + + if [ -n "${UBOOT_ENV}" ] + then + install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} + rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + fi + + if [ "${UBOOT_EXTLINUX}" = "1" ] + then + install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK} + ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} + ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} + fi +} + +addtask deploy before do_build after do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb new file mode 100644 index 00000000..ed416608 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-bsp/u-boot/u-boot_2018.09.bb @@ -0,0 +1,43 @@ +require u-boot-common_${PV}.inc +require u-boot.inc + +DEPENDS += "bc-native dtc-native" + +UBOOT_URL = "git://github.com/renesas-rcar/u-boot.git" +BRANCH = "v2018.09/rcar-3.9.9" + +SRC_URI = "${UBOOT_URL};branch=${BRANCH}" +SRCREV = "6ea9ca82bb31dd1784d23a85dcdbaa0924bbfeee" +PV = "v2018.09+git${SRCPV}" + +UBOOT_SREC_SUFFIX = "srec" +UBOOT_SREC ?= "u-boot-elf.${UBOOT_SREC_SUFFIX}" +UBOOT_SREC_IMAGE ?= "u-boot-elf-${MACHINE}-${PV}-${PR}.${UBOOT_SREC_SUFFIX}" +UBOOT_SREC_SYMLINK ?= "u-boot-elf-${MACHINE}.${UBOOT_SREC_SUFFIX}" + +do_deploy_append() { + 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 + type=${type#*_} + install -m 644 ${B}/${config}/${UBOOT_SREC} ${DEPLOYDIR}/u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} + cd ${DEPLOYDIR} + ln -sf u-boot-elf-${type}-${PV}-${PR}.${UBOOT_SREC_SUFFIX} u-boot-elf-${type}.${UBOOT_SREC_SUFFIX} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_SREC} ${DEPLOYDIR}/${UBOOT_SREC_IMAGE} + cd ${DEPLOYDIR} + rm -f ${UBOOT_SREC} ${UBOOT_SREC_SYMLINK} + ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC_SYMLINK} + ln -sf ${UBOOT_SREC_IMAGE} ${UBOOT_SREC} + fi +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb new file mode 100644 index 00000000..ed4401f8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-tp-user-module.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "Linux ICCOM library test applications for Renesas R-Car Gen3" + +require iccom-user-module.inc +require include/multimedia-control.inc +require include/rcar-gen3-path-common.inc + +DEPENDS = " \ + kernel-module-iccom-mfis \ + iccom-user-module \ + ${@oe.utils.conditional('USE_MULTIMEDIA', '1', 'mmngr-user-module', '', d )} \ +" + +export USE_MMNGR="${USE_MULTIMEDIA}" + +PN = "iccom-tp-user-module" +PR = "r0" + +S = "${WORKDIR}/libiccom" + +do_compile() { + cd ${S}/sample_test + make + + cd ${S}/sample_test_fatal + make + + cd ${S}/sample_sharedmem + make + + cd ${S}/sample_lock + make + + cd ${S}/sample_pvconv + make +} + +do_install() { + # Create destination directory + install -d ${D}${RENESAS_DATADIR}/bin + + # Install test applications + install -m 755 ${S}/sample_test/sample_test ${D}${RENESAS_DATADIR}/bin/ + install -m 755 ${S}/sample_test_fatal/sample_test_fatal ${D}${RENESAS_DATADIR}/bin/ + install -m 755 ${S}/sample_sharedmem/sample_sharedmem ${D}${RENESAS_DATADIR}/bin/ + install -m 755 ${S}/sample_lock/sample_lock ${D}${RENESAS_DATADIR}/bin/ + install -m 755 ${S}/sample_pvconv/sample_pvconv ${D}${RENESAS_DATADIR}/bin/ +} + +FILES_${PN} = " \ + ${RENESAS_DATADIR}/bin/sample_test \ + ${RENESAS_DATADIR}/bin/sample_test_fatal \ + ${RENESAS_DATADIR}/bin/sample_sharedmem \ + ${RENESAS_DATADIR}/bin/sample_lock \ + ${RENESAS_DATADIR}/bin/sample_pvconv \ +" + +# Skip debug split +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb new file mode 100644 index 00000000..d943f0c7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "Linux ICCOM library for Renesas R-Car Gen3" + +require iccom-user-module.inc +require include/rcar-gen3-path-common.inc + +DEPENDS = " \ + kernel-module-iccom-mfis \ +" + +PN = "iccom-user-module" +PR = "r0" + +# log output level : INFO=0 LOW=1 MED=2 HIGH=3 ERROR=4 FATAL=5 NONE=255 +# (the setting of 4 means that ERROR and FATAL log are output) +export MEG_LEV="4" + +S = "${WORKDIR}/libiccom" +B = "${S}/source" + +includedir = "${RENESAS_DATADIR}/include" + +do_install() { + # Create destination directories + install -d ${D}/${libdir} + install -d ${D}${RENESAS_DATADIR}/include + + # Install library + install -m 755 ${B}/libiccom.so ${D}/${libdir}/ + + # Install shared header file + install -m 644 ${S}/include/iccom_if_app.h ${D}${RENESAS_DATADIR}/include/ +} + +FILES_${PN} = " \ + ${libdir}/libiccom.so \ +" + +FILES_${PN}-dev = " \ + ${RENESAS_DATADIR}/include/iccom_if_app.h \ +" + +# Skip debug split +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc new file mode 100644 index 00000000..e9945cec --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-connectivity/iccom-module/iccom-user-module.inc @@ -0,0 +1,8 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=442d4e9f738ff4d05ae6215ae20caa6c" + +inherit features_check + +REQUIRED_DISTRO_FEATURES = "iccom" + +SRC_URI = "file://libiccom.tar.bz2" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files/fstab b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files/fstab new file mode 100644 index 00000000..30898a42 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files/fstab @@ -0,0 +1,11 @@ +# stock fstab - you probably want to override this with a machine specific one + +/dev/root / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 +tmpfs /var/volatile tmpfs uid=65534,gid=65534 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend new file mode 100644 index 00000000..0dca3d62 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/base-files/base-files_%.bbappend @@ -0,0 +1,11 @@ +require include/rcar-gen3-path-common.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" + +SRC_URI_append_rcar-gen3 = " \ + file://fstab \ +" + +do_install_append_rcar-gen3 () { + echo "export LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:${RENESAS_DATADIR}/lib\"" >> ${D}${sysconfdir}/profile +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend new file mode 100644 index 00000000..70688000 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/images/core-image-minimal.bbappend @@ -0,0 +1 @@ +require ${@"recipes-graphics/images/core-image-renesas-base.inc" if "rcar-gen3" in d.getVar("OVERRIDES") else ""} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend new file mode 100644 index 00000000..7efa4695 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/ncurses/ncurses_%.bbappend @@ -0,0 +1,2 @@ +# nativesdk don't generally look in base_libdir +base_libdir_class-nativesdk = "${libdir}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 00000000..84eca35f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -0,0 +1,6 @@ +# In YP2.1.2, nativesdk-wayland is lacking. +RDEPENDS_${PN}_append = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland nativesdk-wayland-dev', '', d)} \ + nativesdk-perl nativesdk-perl-dev \ + nativesdk-perl-modules \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd/add-non-owned-item-for-safe-transitioning.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd/add-non-owned-item-for-safe-transitioning.patch new file mode 100644 index 00000000..631db30e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd/add-non-owned-item-for-safe-transitioning.patch @@ -0,0 +1,14 @@ +diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c +index b2ac648..553a77a 100644 +--- a/src/basic/fs-util.c ++++ b/src/basic/fs-util.c +@@ -668,6 +668,9 @@ static bool unsafe_transition(const struct stat *a, const struct stat *b) { + if (a->st_uid == 0) /* Transitioning from privileged to unprivileged is always fine */ + return false; + ++ if (b->st_uid == 65534) /* Transitioning to a non-owned is OK too */ ++ return false; ++ + return a->st_uid != b->st_uid; /* Otherwise we need to stay within the same UID */ + } + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend new file mode 100644 index 00000000..b2d76b79 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-core/systemd/systemd_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " file://add-non-owned-item-for-safe-transitioning.patch" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cairo/cairo_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cairo/cairo_%.bbappend new file mode 100644 index 00000000..8b3cca45 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cairo/cairo_%.bbappend @@ -0,0 +1,3 @@ +require include/gles-control.inc + +DEPENDS_append_rcar-gen3 = "${@ ' gles-user-module' if '${USE_GLES_WAYLAND}' == '1' else ''}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend new file mode 100644 index 00000000..12a5417e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend @@ -0,0 +1,4 @@ +require include/gles-control.inc +DEPENDS_append_rcar-gen3 = " \ + ${@'gles-user-module libgbm' if '${USE_GLES_WAYLAND}' == '1' else ''} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb new file mode 100644 index 00000000..084e5cee --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb @@ -0,0 +1,136 @@ +require include/gles-control.inc +require include/rcar-gen3-path-common.inc + +DESCRIPTION = "PowerVR GPU user module" +LICENSE = "CLOSED" + +PN = "gles-user-module" +PR = "r0" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}/rogue" +GLES = "gsx" + +SRC_URI_r8a7795 = "file://r8a77951_linux_gsx_binaries_gles.tar.bz2" +SRC_URI_r8a7796 = "file://r8a77960_linux_gsx_binaries_gles.tar.bz2" +SRC_URI_r8a77965 = "file://r8a77965_linux_gsx_binaries_gles.tar.bz2" +SRC_URI_r8a77990 = "file://r8a77990_linux_gsx_binaries_gles.tar.bz2" + +SRC_URI_append = " \ + file://change-shell.patch \ + file://rc.pvr.service \ +" + +inherit update-rc.d systemd + +INITSCRIPT_NAME = "pvrinit" +INITSCRIPT_PARAMS = "start 7 5 2 . stop 62 0 1 6 ." +SYSTEMD_SERVICE_${PN} = "rc.pvr.service" + +do_populate_lic[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Install configuration files + install -d ${D}${sysconfdir}/init.d + install -m 644 ${S}/etc/powervr.ini ${D}${sysconfdir} + install -m 755 ${S}/etc/init.d/rc.pvr ${D}${sysconfdir}/init.d/pvrinit + install -m 755 ${S}/etc/init.d/rc.pvr ${D}${sysconfdir}/init.d/ + install -d ${D}${sysconfdir}/udev/rules.d + install -m 644 ${S}/etc/udev/rules.d/72-pvr-seat.rules ${D}${sysconfdir}/udev/rules.d/ + + # Install header files + install -d ${D}${includedir}/EGL + install -m 644 ${S}/usr/include/EGL/*.h ${D}${includedir}/EGL/ + install -d ${D}${includedir}/GLES2 + install -m 644 ${S}/usr/include/GLES2/*.h ${D}${includedir}/GLES2/ + install -d ${D}${includedir}/GLES3 + install -m 644 ${S}/usr/include/GLES3/*.h ${D}${includedir}/GLES3/ + install -d ${D}${includedir}/KHR + install -m 644 ${S}/usr/include/KHR/khrplatform.h ${D}${includedir}/KHR/khrplatform.h + + # Install pre-builded binaries + install -d ${D}${libdir} + install -m 755 ${S}/usr/lib/*.so ${D}${libdir}/ + install -d ${D}${RENESAS_DATADIR}/bin + install -m 755 ${S}/usr/local/bin/dlcsrv_REL ${D}${RENESAS_DATADIR}/bin/dlcsrv_REL + install -d ${D}/lib/firmware + install -m 644 ${S}/lib/firmware/* ${D}/lib/firmware/ + + # Install pkgconfig + install -d ${D}${libdir}/pkgconfig + install -m 644 ${S}/usr/lib/pkgconfig/*.pc ${D}${libdir}/pkgconfig/ + + # Create symbolic link + cd ${D}${libdir} + ln -s libEGL.so libEGL.so.1 + ln -s libGLESv2.so libGLESv2.so.2 + + if [ "${USE_GLES_WAYLAND}" = "1" ]; then + # Set the "WindowSystem" parameter for wayland + if [ "${GLES}" = "gsx" ]; then + sed -i -e "s/WindowSystem=libpvrDRM_WSEGL.so/WindowSystem=libpvrWAYLAND_WSEGL.so/g" \ + ${D}${sysconfdir}/powervr.ini + fi + fi + + # Install systemd service + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} ; then + install -d ${D}${systemd_system_unitdir}/ + install -m 644 ${WORKDIR}/rc.pvr.service ${D}${systemd_system_unitdir}/ + + # Fix weston dependency, needs to be weston@.service + sed -i 's/^RequiredBy=weston.service$/RequiredBy=weston@.service/' \ + ${D}${systemd_system_unitdir}/rc.pvr.service + + install -d ${D}${exec_prefix}/bin + install -m 755 ${S}/etc/init.d/rc.pvr ${D}${exec_prefix}/bin/pvrinit + fi +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dev \ +" + +FILES_${PN} = " \ + ${sysconfdir}/* \ + ${libdir}/* \ + /lib/firmware/rgx.fw* \ + ${RENESAS_DATADIR}/bin/* \ + ${exec_prefix}/bin/* \ +" + +FILES_${PN}-dev = " \ + ${includedir}/* \ + ${libdir}/pkgconfig/* \ +" + +PROVIDES = "virtual/libgles2" +RPROVIDES_${PN} += " \ + ${GLES}-user-module \ + libgles2-mesa \ + libgles2-mesa-dev \ + libgles2 \ + libgles2-dev \ +" + +RDEPENDS_${PN} = " \ + kernel-module-gles \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ +" + +INSANE_SKIP_${PN} = "ldflags build-deps file-rdeps" +INSANE_SKIP_${PN}-dev = "ldflags build-deps file-rdeps" +INSANE_SKIP_${PN} += "arch" +INSANE_SKIP_${PN}-dev += "arch" +INSANE_SKIP_${PN}-dbg = "arch" + +# Skip debug strip of do_populate_sysroot() +INHIBIT_SYSROOT_STRIP = "1" + +# Skip debug split and strip of do_package() +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch new file mode 100644 index 00000000..f6025709 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch @@ -0,0 +1,10 @@ +Index: rogue/etc/init.d/rc.pvr +=================================================================== +--- rogue.orig/etc/init.d/rc.pvr ++++ rogue/etc/init.d/rc.pvr +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + ############################################################################ ### + # File rc.pvr + # Copyright Copyright (C) 2013-2016 Renesas Electronics Corporation diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service new file mode 100644 index 00000000..da7fc300 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service @@ -0,0 +1,13 @@ +[Unit] +Description=PowerVR consumer services +Before=weston.service + +[Service] +ExecStart=/usr/bin/pvrinit start +ExecStop=/usr/bin/pvrinit stop +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +RequiredBy=weston.service diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc new file mode 100644 index 00000000..b64abad9 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-base.inc @@ -0,0 +1,68 @@ +require include/iccom-control.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +# Basic packages +IMAGE_INSTALL_append = " \ + bash \ + v4l-utils \ + i2c-tools \ + coreutils \ +" + +# Support secure environment +IMAGE_INSTALL_append = " \ + optee-client \ +" + +# Add overrides for selection 32 bit or 64 bit target +OVERRIDES .= ":${TARGET_SYS}" + +# Qos user packages only supports 64bit. +QOS_USER_PKGS = "" +QOS_USER_PKGS_aarch64-poky-linux = " \ + qosif-user-module \ + qosif-tp-user-module \ +" + +# Installation for QoS packages +IMAGE_INSTALL_append = " \ + kernel-module-qos \ + ${QOS_USER_PKGS} \ +" + +# Renesas Basic packages for 32bit +BASIC_32BIT_PKGS = " \ + lib32-coreutils \ + lib32-libstdc++ \ + lib32-optee-client \ +" + +# Installation for 32bit packages +IMAGE_INSTALL_append = " \ + ${@oe.utils.conditional("USE_32BIT_PKGS", "1", "${BASIC_32BIT_PKGS}", "", d)} \ +" + +# Kernel modules of ICCOM +ICCOM_KERNEL_PKGS = " \ + kernel-module-iccom-mfis \ + kernel-module-iccom-hwspinlock-sample \ +" + +# User modules of ICCOM only supports 64bit +ICCOM_USER_PKGS = "" +ICCOM_USER_PKGS_aarch64-poky-linux = " \ + iccom-user-module \ + iccom-tp-user-module \ +" + +# ICCOM Packages +ICCOM_PKGS = " \ + ${ICCOM_KERNEL_PKGS} \ + ${ICCOM_USER_PKGS} \ +" + +# Installation for ICCOM Packages +IMAGE_INSTALL_append = " \ + ${@oe.utils.conditional("USE_ICCOM", "1", " ${ICCOM_PKGS}", "", d)} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc new file mode 100644 index 00000000..88062204 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-renesas-mmp-base.inc @@ -0,0 +1,102 @@ +require include/multimedia-control.inc +require include/cms-control.inc +require include/adsp-control.inc +require include/dtv-dvd-control.inc +require include/avb-control.inc +require include/omx-control.inc + +# Common Multi Media Packages (MMP) +MULTIMEDIA_PKGS = " \ + packagegroup-multimedia-kernel-modules \ + packagegroup-multimedia-libs \ +" + +# MMP test Packages +MULTIMEDIA_TP_PKGS = " \ + vspmif-tp-user-module \ +" + +# OMX MMP Packages +OMX_MULTIMEDIA_PKGS = " \ + omx-user-module \ +" + +# CMS MMP Packages +CMS_MULTIMEDIA_PKGS = " \ + cms-user-module \ +" + +# Kernel modules of DTV +DTV_KERNEL_PKGS = " \ + kernel-module-scu-src \ + kernel-module-ssp \ + kernel-module-tddmac \ + kernel-module-tsif \ +" + +# DTV Packages +DTV_PKGS = " \ + ${DTV_KERNEL_PKGS} \ + dtv-user-module \ +" + +# DVD Packages +DVD_PKGS = " \ + dvd-user-module \ +" + +# DVD Encryption Library packages +DVD_ENCRYPTION_PKGS = " \ + dvd-encryption-module \ +" + +# ADSP Packages +ADSP_PKGS = " \ + kernel-module-xtensa-hifi \ + adsp-if-module \ + adsp-fw-module \ +" + +# Kernel modules of AVB +AVB_KERNEL_PKGS = " \ + kernel-module-avb-streaming \ + kernel-module-avb-mch \ + kernel-module-avb-mse \ +" + +# AVB Packages +AVB_PKGS = " \ + ${AVB_KERNEL_PKGS} \ + avbtool \ + linuxptp \ + openavnu-mrpd \ + openavnu-gptp \ + openavnu-maap \ + avb-demoapps-avblauncher \ + avb-demoapps-mrpdummy \ + avb-demoapps-simple \ +" + +# Renesas MMP 32bit packages +MMP_32BIT_PKGS = " \ + ${@oe.utils.conditional("USE_MULTIMEDIA", "1", "lib32-packagegroup-multimedia-libs lib32-omx-user-module", "", d)} \ + ${@oe.utils.conditional("USE_MULTIMEDIA_TP", "1", "lib32-vspmif-tp-user-module", "", d)} \ + ${@oe.utils.conditional("USE_CMS", "1", "lib32-cms-user-module", "", d)} \ + ${@oe.utils.conditional("USE_DTV", "1", "lib32-dtv-user-module", "", d)} \ + ${@oe.utils.conditional("USE_DVD", "1", "lib32-dvd-user-module", "", d)} \ + ${@oe.utils.conditional("USE_ADSP", "1", "lib32-adsp-if-module", "", d)} \ +" + +# Install pkg selection +IMAGE_INSTALL_append = " \ + ${@oe.utils.conditional("USE_MULTIMEDIA", "1", " ${MULTIMEDIA_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_MULTIMEDIA_TP", "1", " ${MULTIMEDIA_TP_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_OMX_USER_MODULE", "1", " ${OMX_MULTIMEDIA_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_CMS", "1", " ${CMS_MULTIMEDIA_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_DTV", "1", " ${DTV_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_DVD", "1", " ${DVD_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_DVD_ENCRYPTION_LIB", "1", " ${DVD_ENCRYPTION_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_ADSP", "1", " ${ADSP_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_AVB", "1", " ${AVB_PKGS}", "", d)} \ + ${@oe.utils.conditional("USE_32BIT_MMP", "1", " ${MMP_32BIT_PKGS}", "", d)} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb new file mode 100644 index 00000000..fd4e6a09 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston-sdk.bb @@ -0,0 +1,15 @@ +require recipes-graphics/images/core-image-weston.bb +require core-image-renesas-base.inc +require core-image-weston.inc + +DESCRIPTION = "Image with weston support that includes everything within \ +core-image-weston plus meta-toolchain, development headers and libraries to \ +form a standalone SDK." + +IMAGE_FEATURES += " \ + dev-pkgs tools-sdk \ + tools-debug debug-tweaks \ + ssh-server-openssh \ +" + +IMAGE_INSTALL_append = " kernel-devsrc ltp" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend new file mode 100644 index 00000000..41f1cb04 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.bbappend @@ -0,0 +1,2 @@ +require ${@"core-image-renesas-base.inc" if "rcar-gen3" in d.getVar("OVERRIDES") else ""} +require ${@"core-image-weston.inc" if "rcar-gen3" in d.getVar("OVERRIDES") else ""} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc new file mode 100644 index 00000000..4ae567a1 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/images/core-image-weston.inc @@ -0,0 +1,16 @@ +require include/gles-control.inc +require core-image-renesas-mmp-base.inc + +# Gstreamer Packages +GSTREAMER_PKGS = "packagegroup-gstreamer1.0-plugins" + +# Install packages for Wayland Env +# default: Basic packages, Gstreamer packages +# optional: GFX packages +IMAGE_INSTALL_append = " \ + ${GSTREAMER_PKGS} \ + packagegroup-wayland-community \ + packagegroup-graphics-renesas-proprietary \ + packagegroup-graphics-renesas-wayland \ + libx11-locale \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-dummy.inc new file mode 100644 index 00000000..e69de29b diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc new file mode 100644 index 00000000..eee68630 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa-wayland.inc @@ -0,0 +1,24 @@ +# FIXME: can not override PACKAGECONFIG. +PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=false" +PACKAGECONFIG[egl] = "-Degl=true" + +# Disable the gbm modules of mesa +PACKAGECONFIG_remove = "gbm" + +# Remove the gbm and egl packages. These are provided in other recipes. +PACKAGES_remove = " \ + libgbm-dev libgbm \ + libegl-mesa-dev libegl-mesa \ + libegl-dev libegl \ + libgles2-mesa libgles2-mesa-dev \ + libwayland-egl libwayland-egl-dev \ +" + +do_install_append() { + # Remove libegl-mesa modules and headers + rm -f ${D}/${libdir}/libEGL.la + rm -f ${D}/${libdir}/libEGL.so* + rm -f ${D}/${libdir}/pkgconfig/egl.pc + rm -rf ${D}/${includedir}/EGL + rm -rf ${D}/${includedir}/KHR +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 00000000..022144ef --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,10 @@ +require include/gles-control.inc + +def map_libs(d): + if oe.utils.conditional('USE_GLES_WAYLAND', "1", "1", "0", d) == "1": + return "wayland" + + return "dummy" + +MESATARGET := "${@map_libs(d)}" +include mesa-${MESATARGET}.inc diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb new file mode 100644 index 00000000..b5cff820 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/packagegroups/packagegroup-graphic-renesas.bb @@ -0,0 +1,39 @@ +SUMMARY = "Renesas package group for Weston" +LICENSE = "CLOSED & MIT" + +inherit packagegroup +require include/gles-control.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +PACKAGES = " \ + packagegroup-wayland-community \ + packagegroup-graphics-renesas-proprietary \ + packagegroup-graphics-renesas-wayland \ +" + +PR = "r0" + +RDEPENDS_packagegroup-wayland-community = " \ + wayland \ + weston \ + weston-examples \ + alsa-utils \ + alsa-tools \ + libdrm-tests \ + libdrm-kms \ +" + +RDEPENDS_packagegroup-graphics-renesas-proprietary = " \ + ${@bb.utils.contains('USE_GLES', '1', \ + 'kernel-module-gles gles-user-module' , \ + '', d)} \ +" + +DEPENDS_packagegroup-graphics-renesas-wayland = "libegl" + +RDEPENDS_packagegroup-graphics-renesas-wayland = " \ + ${@bb.utils.contains('USE_GLES_WAYLAND', '1', \ + 'libgbm libgbm-dev wayland-kms', \ + '', d)} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb new file mode 100644 index 00000000..06c56f73 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb @@ -0,0 +1,21 @@ +SUMMARY = "Recipe for libegl" +LICENSE = "CLOSED" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = "gles-user-module \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ +" + +PR = "r0" + +RDEPENDS_${PN} = " \ + gles-user-module \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ +" + +PROVIDES = "virtual/egl" +RPROVIDES_${PN} += " \ + libegl \ + libegl1 \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb new file mode 100644 index 00000000..87d52f0e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb @@ -0,0 +1,36 @@ +SUMMARY = "gbm library" +LICENSE = "MIT" +SECTION = "libs" + +LIC_FILES_CHKSUM = " \ + file://gbm.c;beginline=4;endline=22;md5=5cdaac262c876e98e47771f11c7036b5" + +SRCREV = "953f6515dc07c717360c499273dccc227857e6ed" +SRC_URI = "git://github.com/renesas-rcar/libgbm;branch=match-mesa-19.0.1" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +DEPENDS = "wayland-kms udev" + +inherit autotools pkgconfig + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ + ${PN}-staticdev \ +" + +FILES_${PN} = " \ + ${libdir}/libgbm.so.* \ + ${libdir}/gbm/libgbm_kms.so.* \ + ${libdir}/gbm/*.so \ + ${libdir}/*.so \ +" +FILES_${PN}-dev += "${libdir}/gbm/*.la" +FILES_${PN}-dbg += "${libdir}/gbm/.debug/*" +FILES_${PN}-staticdev += "${libdir}/gbm/*.a" + +INSANE_SKIP_${PN} += "dev-so" +PROVIDES += "virtual/libgbm" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb new file mode 100644 index 00000000..134e8d2e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "KMS library for Wayland" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = " \ + file://wayland-kms.c;beginline=6;endline=24;md5=5cdaac262c876e98e47771f11c7036b5" + +PV_append = "+git${SRCREV}" + +SRCREV = "15184e5bd3701938a6b30b8f03b471477fc742e8" +SRC_URI = "git://github.com/renesas-rcar/wayland-kms.git;branch=rcar-gen3" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +S = "${WORKDIR}/git" +DEPENDS = "libdrm wayland gles-user-module wayland-native" + +inherit autotools pkgconfig + +FILES_${PN} = "${libdir}/libwayland-kms.so.*" +FILES_${PN}-dev = " \ + ${libdir}/libwayland-kms.la \ + ${libdir}/libwayland-kms.so \ + ${libdir}/pkgconfig/* \ + ${includedir}/* \ +" +FILES_${PN}-staticdev += "${libdir}/libwayland-kms.a" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..17225873 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,48 @@ +require include/gles-control.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " \ + file://weston.ini \ + file://weston.sh \ +" + +do_install_append_rcar-gen3() { + if [ "X${USE_GLES}" = "X1" ]; then + sed -e "/^After=/s/$/ dbus.service multi-user.target/" \ + -e "s/\$OPTARGS/--idle-time=0 \$OPTARGS/" \ + -i ${D}/${systemd_system_unitdir}/weston@.service + fi + + install -d ${D}/${sysconfdir}/xdg/weston + # install weston.ini as sample settings of gl-renderer + install -m 644 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/ + + # Checking for ivi-shell configuration + # If ivi-shell is enable, we will add its configs to weston.ini + if [ "X${USE_WAYLAND_IVI_SHELL}" = "X1" ]; then + sed -i '/repaint-window=34/c\repaint-window=34\nshell=ivi-shell.so' \ + ${D}/${sysconfdir}/xdg/weston/weston.ini + sed -e '$a\\' \ + -e '$a\[ivi-shell]' \ + -e '$a\ivi-module=ivi-controller.so' \ + -e '$a\ivi-input-module=ivi-input-controller.so' \ + -e '$a\transition-duration=300' \ + -e '$a\cursor-theme=default' \ + -i ${D}/${sysconfdir}/xdg/weston/weston.ini + fi + + # Set XDG_RUNTIME_DIR to /run/user/$UID (e.g. run/user/0) + install -d ${D}/${sysconfdir}/profile.d + install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh + + # Fix weston.service and weston@.service run simultaneously. + mv ${D}/${sysconfdir}/init.d/weston ${D}/${sysconfdir}/init.d/weston@ +} + +FILES_${PN}_append_rcar-gen3 = " \ + ${sysconfdir}/profile.d/weston.sh \ +" + +INITSCRIPT_NAME = "weston@" + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..f31c2906 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,2 @@ +[core] +repaint-window=34 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh new file mode 100755 index 00000000..33ed8a4a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/$UID +fi diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch new file mode 100644 index 00000000..2c797df8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch @@ -0,0 +1,49 @@ +From 51048463dae4ace13776bb77675316007083a6ee Mon Sep 17 00:00:00 2001 +From: Tomohito Esaki +Date: Mon, 30 Mar 2020 17:10:54 +0900 +Subject: [PATCH] drm: change timing to set color format for primary plane + without universal plane + +Without universal plane, the weston crashes with null pointer access in +set_gbm_format function because that function called before output +enable function. By changing timing to set color format for primary +plane in this case, this issue fixes. + +Signed-off-by: Tomohito Esaki +--- + libweston/backend-drm/drm.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index 3c5ca65..2aea82f 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -1389,12 +1389,6 @@ drm_output_set_gbm_format(struct weston_output *base, + + if (parse_gbm_format(gbm_format, b->gbm_format, &output->gbm_format) == -1) + output->gbm_format = b->gbm_format; +- +- /* Without universal planes, we can't discover which formats are +- * supported by the primary plane; we just hope that the GBM format +- * works. */ +- if (!b->universal_planes) +- output->scanout_plane->formats[0].format = output->gbm_format; + } + + static void +@@ -1626,6 +1620,12 @@ drm_output_init_crtc(struct drm_output *output, drmModeRes *resources) + goto err_crtc; + } + ++ /* Without universal planes, we can't discover which formats are ++ * supported by the primary plane; we just hope that the GBM format ++ * works. */ ++ if (!b->universal_planes) ++ output->scanout_plane->formats[0].format = output->gbm_format; ++ + /* Failing to find a cursor plane is not fatal, as we'll fall back + * to software cursor. */ + output->cursor_plane = +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 00000000..c2f75afc --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,23 @@ +require include/gles-control.inc +require include/multimedia-control.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " \ + file://0001-drm-change-timing-to-set-color-format-for-primary-pl.patch \ +" + +PACKAGECONFIG_remove_virtclass-multilib-lib32 = "launch" + +DEPENDS_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" + +RDEPENDS_${PN}_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)} \ +" +RDEPENDS_${PN}-examples_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" + +EXTRA_OECONF_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', '', \ + ' WESTON_NATIVE_BACKEND="fbdev-backend.so"', d)}" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc new file mode 100644 index 00000000..3a6d2aef --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg.inc @@ -0,0 +1,180 @@ +SUMMARY = "The X.Org X server" +HOMEPAGE = "http://www.x.org" +SECTION = "x11/base" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" + +# xf86-*-* packages depend on an X server built with the xfree86 DDX +# so we have a virtual to represent that: +# deprecated, we should use virtual/xserver instead +PROVIDES = "virtual/xserver-xf86" + +# Other packages tend to just care that there is *an* X server: +PROVIDES += "virtual/xserver" + +PE = "2" +INC_PR = "r8" + +XORG_PN = "xorg-server" +SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" +SRC_URI += "file://macro_tweak.patch" + +S = "${WORKDIR}/${XORG_PN}-${PV}" + +inherit autotools pkgconfig + +inherit features_check +REQUIRED_DISTRO_FEATURES = "x11" + +PROTO_DEPS = "xorgproto" +LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" +DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util" + +# Split out some modules and extensions from the main package +# These aren't needed for basic operations and only take up space: +# 32.0k libdri.so +# 91.0k libexa.so +# 336.0k libglx.so +# 1360k libint10.so +# 180.0k libwfb.so +# 320.0k libxaa.so +# 124.0k libxf1bpp.so +# 84.0k libxf4bpp.so +# librecord.so +# libextmod.so +# libdbe.so + +PACKAGES =+ "${PN}-sdl \ + ${PN}-fbdev \ + ${PN}-xvfb \ + ${PN}-utils \ + ${PN}-xephyr \ + ${PN}-xwayland \ + ${PN}-multimedia-modules \ + ${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-glx \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + ${PN}-module-libint10 \ + ${PN}-module-libafb \ + ${PN}-module-libwfb \ + ${PN}-module-libmfb \ + ${PN}-module-libcfb \ + ${PN}-module-exa \ + ${PN}-module-xaa \ + ${PN}-module-libxf1bpp \ + ${PN}-module-libxf4bpp \ + xf86-video-modesetting" + +SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" +INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" + +XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" +RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" +RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" +RDEPENDS_${PN}-xvfb += "xkeyboard-config" +RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})" + +FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d" +FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" +FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled" +FILES_${PN}-sdl = "${bindir}/Xsdl" +FILES_${PN}-fbdev = "${bindir}/Xfbdev" +FILES_${PN}-xvfb = "${bindir}/Xvfb" +FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" +FILES_${PN}-xephyr = "${bindir}/Xephyr" +FILES_${PN}-xwayland = "${bindir}/Xwayland" +FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" +FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" +FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" +FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" +FILES_${PN}-extension-record = "${libdir}/xorg/modules/extensions/librecord.so" +FILES_${PN}-extension-extmod = "${libdir}/xorg/modules/extensions/libextmod.so" +FILES_${PN}-extension-dbe = "${libdir}/xorg/modules/extensions/libdbe.so" +FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" +FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" +FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" +FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" +FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" +FILES_${PN}-module-exa = "${libdir}/xorg/modules/libexa.so" +FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" +FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" +FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" +FILES_xf86-video-modesetting = "${libdir}/xorg/modules/drivers/modesetting_drv.so" + +EXTRA_OECONF += "--with-fop=no \ + --with-pic \ + --disable-static \ + --disable-record \ + --disable-dmx \ + --disable-xnest \ + --enable-xvfb \ + --enable-composite \ + --without-dtrace \ + --with-int10=x86emu \ + --sysconfdir=/etc/X11 \ + --localstatedir=/var \ + --with-xkb-output=/var/lib/xkb \ +" + +OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" +PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl wayland', 'xwayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd systemd-logind', '', d)} \ +" + +PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" +PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,xorgproto virtual/mesa" +PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,xorgproto" +# DRI3 requires xshmfence to also be enabled +PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,xorgproto" +PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,xorgproto virtual/libgl virtual/libx11" +PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl" +PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" +PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence" +PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," +PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" +PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xorgproto" +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" + +# Xorg requires a SHA1 implementation, pick one +XORG_CRYPTO ??= "openssl" +PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl" +PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle" +PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt" + +do_install_append () { + # Its assumed base-files creates this for us + rmdir ${D}${localstatedir}/log/ +} + +# Add runtime provides for the ABI versions of the video and input subsystems, +# so that drivers can depend on the relevant version. +python populate_packages_prepend() { + import subprocess + + # Set PKG_CONFIG_PATH so pkg-config looks at the .pc files that are going + # into the new package, not the staged ones. + newenv = dict(os.environ) + newenv["PKG_CONFIG_PATH"] = d.expand("${PKGD}${libdir}/pkgconfig/") + + def get_abi(name): + abis = { + "video": "abi_videodrv", + "input": "abi_xinput" + } + p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name], + shell=True, env=newenv, stdout=subprocess.PIPE) + stdout, stderr = p.communicate() + output = stdout.decode("utf-8").split(".")[0] + mlprefix = d.getVar('MLPREFIX') or '' + return "%sxorg-abi-%s-%s" % (mlprefix, name, output) + + pn = d.getVar("PN") + d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) + d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch new file mode 100644 index 00000000..964d5dd4 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch @@ -0,0 +1,40 @@ +From a309323328d9d6e0bf5d9ea1d75920e53b9beef3 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Fri, 5 Jan 2018 11:58:42 +1000 +Subject: [PATCH] config: fix NULL value detection for ID_INPUT being unset + +Erroneous condition caused us to keep going with all devices that didn't have +ID_INPUT set. + +Fixes: 5aad81445c8c3d6 +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104382 +Reviewed-by: Adam Jackson +Signed-off-by: Peter Hutterer + +Upstream-status: Backport +https://patchwork.freedesktop.org/patch/196090/ +Affects: < 1.20.0 +[Yocto # 12899] + +Signed-off-by: Armin Kuster + +--- + config/udev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/udev.c b/config/udev.c +index e198e8609..3a73189e2 100644 +--- a/config/udev.c ++++ b/config/udev.c +@@ -135,7 +135,7 @@ device_added(struct udev_device *udev_device) + #endif + + value = udev_device_get_property_value(udev_device, "ID_INPUT"); +- if (value && !strcmp(value, "0")) { ++ if (!value || !strcmp(value, "0")) { + LogMessageVerb(X_INFO, 10, + "config/udev: ignoring device %s without " + "property ID_INPUT set\n", path); +-- +2.17.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch new file mode 100644 index 00000000..16ec3edb --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch @@ -0,0 +1,61 @@ +Discover monotonic clock using compile-time check + +monotonic clock check does not work when cross-compiling. + +Upstream-Status: Denied [Does not work on OpenBSD] +Signed-off-by: Jussi Kukkonen + + + +Original patch follows: + +When xorg-xserver is being cross-compiled, there is currently no way +for us to detect whether the monotonic clock is available on the +target system, because we aren't able to run a test program on the host +system. Currently, in this situation, we default to not use the +monotonic clock. One problem with this situation is that the user will +be treated as idle when the date is updated. + +To fix this situation, we now use a compile-time check to detect whether the +monotonic clock is available. This check can run just fine when we are +cross-compiling. + +Signed-off-by: David James +--- + configure.ac | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f7ab48c..26e85cd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include +- +-int main(int argc, char *argv[[]]) { +- struct timespec tp; +- +- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) ++#include ++int main() { ++#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) ++ #error No monotonic clock ++#endif + return 0; +- else +- return 1; + } +- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], +- [MONOTONIC_CLOCK="cross compiling"]) ++]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +-- +2.1.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch new file mode 100644 index 00000000..d05eec5b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch @@ -0,0 +1,53 @@ +From d77cdc5e1eee26821ab98c947abea53fb7b18fe5 Mon Sep 17 00:00:00 2001 +From: California Sullivan +Date: Fri, 16 Mar 2018 17:23:11 -0700 +Subject: [PATCH] xf86pciBus.c: use Intel ddx only for pre-gen4 hardware + +Use intel ddx only on pre-gen4 hw, newer ones will fall back to modesetting +Author: Timo Aaltonen + +Instead of defaulting to the Intel driver for all Intel hardware, only +default it for older hardware for which it has shown to be better for. + +Others fall through to the -modesetting default. + +Upstream-Status: Pending [Debian/Fedora patch +https://src.fedoraproject.org/rpms/xorg-x11-server/c/ee515e44b07e37689abf48cf2fffb41578f3bc1d] + +Signed-off-by: California Sullivan +--- + hw/xfree86/common/xf86pciBus.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c +index e61ae0cd4..d70c99197 100644 +--- a/hw/xfree86/common/xf86pciBus.c ++++ b/hw/xfree86/common/xf86pciBus.c +@@ -1173,7 +1173,23 @@ xf86VideoPtrToDriverList(struct pci_device *dev, + case 0x0bef: + /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */ + break; +- default: ++ /* Default to intel only on pre-gen4 chips */ ++ case 0x3577: ++ case 0x2562: ++ case 0x3582: ++ case 0x358e: ++ case 0x2572: ++ case 0x2582: ++ case 0x258a: ++ case 0x2592: ++ case 0x2772: ++ case 0x27a2: ++ case 0x27ae: ++ case 0x29b2: ++ case 0x29c2: ++ case 0x29d2: ++ case 0xa001: ++ case 0xa011: + driverList[0] = "intel"; + break; + } +-- +2.14.3 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch new file mode 100644 index 00000000..beed6cb4 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch @@ -0,0 +1,47 @@ +From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Mon, 30 Jan 2017 16:32:06 -0600 +Subject: [PATCH] Remove check for useSIGIO option + +Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO +option. + +As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO +and OsReleaseSIGIO. + +No longer the check for useSIGIO is needed + +Upstream-Status: Pending + +Signed-off-by: Prabhu Sundararaj +--- + hw/xfree86/os-support/shared/sigio.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c +index 884a71c..be76498 100644 +--- a/hw/xfree86/os-support/shared/sigio.c ++++ b/hw/xfree86/os-support/shared/sigio.c +@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) + int i; + int installed = FALSE; + +- if (!xf86Info.useSIGIO) +- return 0; +- + for (i = 0; i < MAX_FUNCS; i++) { + if (!xf86SigIOFuncs[i].f) { + if (xf86IsPipe(fd)) +@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) + int max; + int ret; + +- if (!xf86Info.useSIGIO) +- return 0; +- + max = 0; + ret = 0; + for (i = 0; i < MAX_FUNCS; i++) { +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch new file mode 100644 index 00000000..5243761f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch @@ -0,0 +1,46 @@ +From 5028ef46ff4ab0930224b71024a7349b05610d42 Mon Sep 17 00:00:00 2001 +From: Stefan Agner +Date: Thu, 22 Dec 2016 15:41:06 +0100 +Subject: [PATCH] modesetting: Fix 16 bit depth/bpp mode + +When setting DefaultDepth to 16 in the Screen section, the current +code requests a 32 bpp framebuffer, however the X-Server seems to +assumes 16 bpp. + +Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp +conversion in shadow update") + +Signed-off-by: Stefan Agner + +Upstream-Status: Submitted [1] + +[1] https://lists.x.org/archives/xorg-devel/2016-December/052113.html +--- + hw/xfree86/drivers/modesetting/driver.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c +index d7030e5..647ad83 100644 +--- a/hw/xfree86/drivers/modesetting/driver.c ++++ b/hw/xfree86/drivers/modesetting/driver.c +@@ -930,7 +930,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) + "Using 24bpp hw front buffer with 32bpp shadow\n"); + defaultbpp = 32; + } else { +- ms->drmmode.kbpp = defaultbpp; ++ ms->drmmode.kbpp = 0; + } + bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb; + +@@ -950,6 +950,8 @@ PreInit(ScrnInfoPtr pScrn, int flags) + return FALSE; + } + xf86PrintDepthBpp(pScrn); ++ if (!ms->drmmode.kbpp) ++ ms->drmmode.kbpp = pScrn->bitsPerPixel; + + /* Process the options */ + xf86CollectOptions(pScrn, NULL); +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch new file mode 100644 index 00000000..c36e4e73 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/macro_tweak.patch @@ -0,0 +1,25 @@ +This is the revised version of files/macro_tweak.patch for +xorg-server 1.8.99.904 and newer. + +Upstream-Status: Pending + +Signed-off-by: Yu Ke + +Index: xorg-server-1.19.6/xorg-server.m4 +=================================================================== +--- xorg-server-1.19.6.orig/xorg-server.m4 ++++ xorg-server-1.19.6/xorg-server.m4 +@@ -28,10 +28,12 @@ dnl + # Checks for the MACRO define in xorg-server.h (from the sdk). If it + # is defined, then add the given PROTO to $REQUIRED_MODULES. + ++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR) ++ + AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + SAVE_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" ++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include "xorg-server.h" + #if !defined $1 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch new file mode 100644 index 00000000..4be441fb --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch @@ -0,0 +1,18 @@ +inb/outb family for arm is only implemented on glibc +so assumption across linux is wrong + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h +=================================================================== +--- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h ++++ xorg-server-1.18.0/hw/xfree86/common/compiler.h +@@ -758,7 +758,7 @@ inl(unsigned short port) + return xf86ReadMmio32Le((void *) ioBase, port); + } + +-#elif defined(__arm__) && defined(__linux__) ++#elif defined(__arm__) && defined(__GLIBC__) + + /* for Linux on ARM, we use the LIBC inx/outx routines */ + /* note that the appropriate setup via "ioperm" needs to be done */ diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend new file mode 100644 index 00000000..c51bcd54 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -0,0 +1,3 @@ +# Glamor for Xorg requires gbm >= 10.2.0. +# Glamor is not necessary with current env, so disable it. +PACKAGECONFIG_remove_rcar-gen3 = "glamor" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb new file mode 100644 index 00000000..bec021d6 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg_1.19.6.bb @@ -0,0 +1,35 @@ +require xserver-xorg.inc + +COMPATIBLE_MACHINE = "(salvator-x|ebisu|ulcb)" + +SRC_URI += "file://musl-arm-inb-outb.patch \ + file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \ + file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \ + file://0003-Remove-check-for-useSIGIO-option.patch \ + file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \ + file://0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch \ + " +SRC_URI[md5sum] = "3e47777ff034a331aed2322b078694a8" +SRC_URI[sha256sum] = "a732502f1db000cf36a376cd0c010ffdbf32ecdd7f1fa08ba7f5bdf9601cc197" + +# These extensions are now integrated into the server, so declare the migration +# path for in-place upgrades. + +RREPLACES_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " +RPROVIDES_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " +RCONFLICTS_${PN} = "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-record \ + ${PN}-extension-extmod \ + ${PN}-extension-dbe \ + " diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb new file mode 100644 index 00000000..5b7ec898 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-adsp/kernel-module-xtensa-hifi.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "ADSP Driver for Linux" +LICENSE = "GPLv2 & MIT" + +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=55979d94ccbb973fdea772250e0c54d6 \ + file://MIT-COPYING;md5=f932f6ad0feea4f97b6e8316e172070e \ +" + +inherit module features_check + +REQUIRED_DISTRO_FEATURES = "adsp" + +FILESEXTRAPATHS_prepend := "${THISDIR}/xtensa-hifi:" + +SRC_URI = "file://RCG3AHPDL4101ZDO.tar.gz" + +S = "${WORKDIR}/RCG3AHPDL4101ZDO" + +# Define the extra config for using module.bbclass to build ADSP driver +EXTRA_OEMAKE_append = " KDIR=${STAGING_KERNEL_DIR}" + +# Build ADSP kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +# Enable build target for E3 board +do_configure_prepend_r8a77990(){ + sed -i 's|-DTARGET_BOARD_E3=0|-DTARGET_BOARD_E3=1|g' ${S}/Kbuild +} + +do_install_append(){ + # Create install directories + install -d ${D}/${includedir} + install -d ${D}/${includedir}/sys/xt-shmem + + # Install shared header files + install -m 644 ${S}/include/*.h ${D}/${includedir}/ + install -m 644 ${S}/include/sys/xt-shmem/*.h ${D}/${includedir}/sys/xt-shmem/ +} + +# The ADSP driver need adsp firmware for running +RDEPENDS_${PN}_append = " adsp-fw-module" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb new file mode 100644 index 00000000..8423642c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mch.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "AVB MCH Driver for Linux for the R-Car Gen3" + +require include/avb-control.inc +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=96e553279b3fff0d6168dafe0b596197 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas" + +REQUIRED_DISTRO_FEATURES = "avb" + +SRC_URI = "git://github.com/renesas-rcar/avb-mch.git;branch=rcar-gen3" +SRCREV = "5c02335afa0c6c692798dc07e65c9eb21943fb2f" + +S = "${WORKDIR}/git" + +includedir = "${RENESAS_DATADIR}/include" + +# Build AVB MCH kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install_append() { + # Create destination directories + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/ravb_mch.h ${KERNELSRC}/include + + # Install shared header files to ${includedir} + install -m 644 ${S}/ravb_mch.h ${D}/${includedir} +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb new file mode 100644 index 00000000..4dd910ae --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-mse.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "AVB MSE Driver for Linux for the R-Car Gen3" + +require include/avb-control.inc +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=98449101c5d5452a9429b88d6ead1ba4 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas kernel-module-avb-streaming kernel-module-avb-mch" + +REQUIRED_DISTRO_FEATURES = "avb" + +SRC_URI = "git://github.com/renesas-rcar/avb-mse.git;branch=rcar-gen3" +SRCREV = "d290b4a5d7afab654a8b3a356934be2c1406c378" + +S = "${WORKDIR}/git" + +includedir = "${RENESAS_DATADIR}/include" + +# Build AVB MSE kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install_append() { + # Create destination directories + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/ravb_mse.h ${KERNELSRC}/include + install -m 644 ${S}/ravb_mse_kernel.h ${KERNELSRC}/include + + # Install shared header files to ${includedir} + install -m 644 ${S}/ravb_mse.h ${D}/${includedir} + install -m 644 ${S}/ravb_mse_kernel.h ${D}/${includedir} +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb new file mode 100644 index 00000000..fc3ddf48 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-avb/kernel-module-avb-streaming.bb @@ -0,0 +1,39 @@ +DESCRIPTION = "AVB Streaming Driver for Linux for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc +require include/avb-control.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=704e38c3a28fde2e7fa153d3e0e787a4 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas" + +REQUIRED_DISTRO_FEATURES = "avb" + +SRC_URI = "git://github.com/renesas-rcar/avb-streaming.git;branch=rcar-gen3" +SRCREV = "526c794e5667d4b260934ef1e3934a094f01f404" + +S = "${WORKDIR}/git" + +includedir = "${RENESAS_DATADIR}/include" + +# Build AVB Streaming kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install_append () { + # Create destination directories + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/ravb_eavb.h ${KERNELSRC}/include + + # Install shared header files to ${includedir} + install -m 644 ${S}/ravb_eavb.h ${D}/${includedir} +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb new file mode 100644 index 00000000..64da9c4a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-scu-src.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "DTV Driver part of scu_src for Linux for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://scu_src_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://scu_src_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas" +PN = "kernel-module-scu-src" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "dtv" + +SRC_URI = "file://scu_src_drv.tar.gz" + +S = "${WORKDIR}" + +EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" +EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" +EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" + +# Build DTV kernel modules without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/scu_src_drv/drv + oe_runmake +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + + # Install kernel module + install -m 644 ${S}/scu_src_drv/drv/scu_src_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/scu_src_drv/include/*.h ${KERNELSRC}/include + install -m 644 ${S}/scu_src_drv/drv/Module.symvers ${KERNELSRC}/include/scu-drv.symvers +} + +PACKAGES = "\ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/scu_src_drv.ko \ +" + +RPROVIDES_${PN} += "kernel-module-scu-src kernel-module-scu-src-drv" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb new file mode 100644 index 00000000..b741a88f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-ssp.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "DTV Driver part of ssp for Linux for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://ssp_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://ssp_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas" +PN = "kernel-module-ssp" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "dtv" + +SRC_URI = "file://ssp_drv.tar.gz" + +S = "${WORKDIR}" + +EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" +EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" +EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" + +# Build DTV SSP kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/ssp_drv/drv + oe_runmake +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + + # Install kernel module + install -m 644 ${S}/ssp_drv/drv/ssp_dev.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/ssp_drv/include/*.h ${KERNELSRC}/include + install -m 644 ${S}/ssp_drv/drv/Module.symvers ${KERNELSRC}/include/ssp_drv.symvers +} + +PACKAGES = "\ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/ssp_dev.ko \ +" + +RPROVIDES_${PN} += "kernel-module-ssp" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb new file mode 100644 index 00000000..42e0d019 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tddmac.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "DTV Driver part of tddmac for Linux for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://tddmac_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://tddmac_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ +" + +inherit module features_check + +DEPENDS = "linux-renesas" +PN = "kernel-module-tddmac" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "dtv" + +SRC_URI = "file://tddmac_drv.tar.gz" + +S = "${WORKDIR}" + +EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" +EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" +EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" + +# Build DTV tddmac kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/tddmac_drv/drv + oe_runmake +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + + # Install kernel module + install -m 644 ${S}/tddmac_drv/drv/tddmac.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/tddmac_drv/include/*.h ${KERNELSRC}/include + install -m 644 ${S}/tddmac_drv/drv/Module.symvers ${KERNELSRC}/include/tddmac_drv.symvers +} + +PACKAGES = "\ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/tddmac.ko \ +" + +RPROVIDES_${PN} += "kernel-module-tddmac" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb new file mode 100644 index 00000000..001f9b72 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-dtv/kernel-module-tsif.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "DTV Driver part of tsif for Linux for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://tsif_drv/include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://tsif_drv/include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ +" + +inherit module features_check + +PN = "kernel-module-tsif" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "dtv" + +SRC_URI = "file://tsif_drv.tar.gz" + +S = "${WORKDIR}" + +EXTRA_OEMAKE_r8a7795 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_H3" +EXTRA_OEMAKE_r8a7796 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3" +EXTRA_OEMAKE_r8a77965 += "DTV_MAKE_HW_SWITCH=HW_SUPPORT_M3N" + +# Build DTV tsif kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/tsif_drv/drv + oe_runmake +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + + # Install kernel module + install -m 644 ${S}/tsif_drv/drv/tsif_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR). + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/tsif_drv/include/*.h ${KERNELSRC}/include + install -m 644 ${S}/tsif_drv/drv/Module.symvers ${KERNELSRC}/include/tsif_drv.symvers +} + +PACKAGES = "\ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/tsif_drv.ko \ +" + +RPROVIDES_${PN} += "kernel-module-tsif kernel-module-tsif-drv" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb new file mode 100644 index 00000000..50a6765c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "Kernel module of PowerVR GPU" +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e \ + file://MIT-COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054 \ +" +inherit module +PN = "kernel-module-gles" +PR = "r0" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI_r8a7795 = 'file://GSX_KM_H3.tar.bz2' +SRC_URI_r8a7796 = 'file://GSX_KM_M3.tar.bz2' +SRC_URI_r8a77965 = 'file://GSX_KM_M3N.tar.bz2' +SRC_URI_r8a77990 = 'file://GSX_KM_E3.tar.bz2' + +S = "${WORKDIR}/rogue_km" + +# W/A fix build errors with GCC 8.1 +SRC_URI_append = " file://0001-Silence-warnings-being-treated-as-errors.patch" + +KBUILD_DIR_r8a7795 = "${S}/build/linux/r8a7795_linux" +KBUILD_DIR_r8a7796 = "${S}/build/linux/r8a7796_linux" +KBUILD_DIR_r8a77965 = "${S}/build/linux/r8a77965_linux" +KBUILD_DIR_r8a77990 = "${S}/build/linux/r8a7799_linux" +KBUILD_OUTDIR_r8a7795 = "binary_r8a7795_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a7796 = "binary_r8a7796_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a77965 = "binary_r8a77965_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a77990 = "binary_r8a7799_linux_release/target_aarch64/kbuild/" + +B = "${KBUILD_DIR}" + +EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" +EXTRA_OEMAKE += "CROSS_COMPILE=${CROSS_COMPILE}" + +# Build GFX kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +module_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + cd ${KBUILD_DIR} + oe_runmake +} + +module_do_install() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + install -d ${D}/lib/modules/${KERNEL_VERSION} + cd ${KBUILD_DIR} + oe_runmake DISCIMAGE="${D}" install +} + +# Ship the module symbol file to kernel build dir +SYSROOT_PREPROCESS_FUNCS = "module_sysroot_symbol" + +module_sysroot_symbol() { + install -m 644 ${S}/${KBUILD_OUTDIR}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/GLES.symvers +} + +# Clean up the module symbol file +CLEANFUNCS = "module_clean_symbol" + +module_clean_symbol() { + rm -f ${STAGING_KERNEL_BUILDDIR}/GLES.symvers +} + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/pvrsrvkm.ko \ + ${sysconfdir}/modules-load.d \ +" + +RPROVIDES_${PN} += "kernel-module-pvrsrvkm kernel-module-dc-linuxfb" + +# Auto load pvrsrvkm +KERNEL_MODULE_AUTOLOAD_append = " pvrsrvkm" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch new file mode 100644 index 00000000..a9ddfa51 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch @@ -0,0 +1,25 @@ +Current GFX source code will get compilation error with GCC 9.x, +because it is defined in makefile to use -Wall to enable all Warnings +check. +-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation +-Wmissing-attributes -Waddress-of-packed-member +are new Warnings from GCC 9. + +Signed-off-by: Khang Nguyen +--- + build/linux/buildvars.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: rogue_km/build/linux/buildvars.mk +=================================================================== +--- rogue_km.orig/build/linux/buildvars.mk ++++ rogue_km/build/linux/buildvars.mk +@@ -51,7 +51,7 @@ + + # These flags are used for kernel, User C and User C++ + # +-COMMON_FLAGS := -W -Wall ++COMMON_FLAGS := -W -Wall -Wno-cast-function-type -Wno-sizeof-pointer-div -Wno-stringop-truncation -Wno-missing-attributes -Wno-address-of-packed-member + + # Enable 64-bit file & memory handling on 32-bit systems. + # diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb new file mode 100644 index 00000000..b63f393b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-hwspinlock-sample.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Linux ICCOM hwspinlock Sample Driver for Renesas R-Car Gen3" + +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +inherit module features_check + +DEPENDS = "linux-renesas" +PN = "kernel-module-iccom-hwspinlock-sample" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "iccom" + +SRC_URI = "file://iccom-hwspinlock-sample.tar.bz2" + +S = "${WORKDIR}/iccom-hwspinlock-sample" +B = "${S}/iccom-hwspinlock-sample" + +# Build ICCOM kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install () { + # Create destination directory + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install kernel module + install -m 644 ${B}/iccom_hwspinlock_sample.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ +} + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/iccom_hwspinlock_sample.ko \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb new file mode 100644 index 00000000..24a2048f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-iccom/kernel-module-iccom-mfis.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Linux ICCOM MFIS Driver for Renesas R-Car Gen3" + +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +inherit module features_check + +DEPENDS = "linux-renesas" +PN = "kernel-module-iccom-mfis" +PR = "r0" + +REQUIRED_DISTRO_FEATURES = "iccom" + +SRC_URI = "file://iccom-mfis.tar.bz2" + +S = "${WORKDIR}/iccom-mfis" +B = "${S}/iccom-mfis/drv" + +# Build ICCOM MFIS kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install () { + # Create destination directory + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install kernel module + install -m 644 ${B}/iccom_mfis.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ +} + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/iccom_mfis.ko \ +" + +# Autoload ICCOM MFIS Driver +KERNEL_MODULE_AUTOLOAD_append = " iccom_mfis" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb new file mode 100644 index 00000000..694163ef --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bb @@ -0,0 +1,75 @@ +DESCRIPTION = "Memory Manager Kernel module for Renesas R-Car Gen3" + +require mmngr_drv.inc +require include/dtv-dvd-control.inc + +DEPENDS = "linux-renesas" +PN = "kernel-module-mmngr" +PR = "r0" + +S = "${WORKDIR}/git" +MMNGR_DRV_DIR = "mmngr_drv/mmngr/mmngr-module/files/mmngr" + +MMNGR_CFG_salvator-x = "MMNGR_SALVATORX" +MMNGR_CFG_h3ulcb = "MMNGR_SALVATORX" +MMNGR_CFG_m3ulcb = "MMNGR_SALVATORX" +MMNGR_CFG_m3nulcb = "MMNGR_SALVATORX" +MMNGR_CFG_ebisu = "MMNGR_EBISU" + +includedir = "${RENESAS_DATADIR}/include" +SSTATE_DUPWHITELIST += "${STAGING_INCDIR}" + +# Build Memory Manager kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + export MMNGR_CONFIG=${MMNGR_CFG} + + if [ "X${USE_DTV}" = "X1" ]; then + export MMNGR_SSP_CONFIG="MMNGR_SSP_ENABLE" + else + export MMNGR_SSP_CONFIG="MMNGR_SSP_DISABLE" + fi + + export MMNGR_IPMMU_MMU_CONFIG="IPMMU_MMU_DISABLE" + + cd ${S}/${MMNGR_DRV_DIR}/drv + install -d ${INCSHARED} + make all +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/mmngr.symvers + + # Install kernel module + install -m 644 ${S}/${MMNGR_DRV_DIR}/drv/mmngr.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public.h ${KERNELSRC}/include/ + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private.h ${KERNELSRC}/include/ + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${KERNELSRC}/include/ + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${KERNELSRC}/include/ + + # Install shared header file to ${includedir} + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_public_cmn.h ${D}/${includedir}/ + install -m 644 ${S}/${MMNGR_DRV_DIR}/include/mmngr_private_cmn.h ${D}/${includedir}/ +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dev \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/mmngr.ko \ +" + +RPROVIDES_${PN} += "kernel-module-mmngr" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb new file mode 100644 index 00000000..3ae960b5 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bb @@ -0,0 +1,60 @@ +DESCRIPTION = "Memory Manager Buffer Kernel module for Renesas R-Car Gen3" + +require mmngr_drv.inc + +DEPENDS = "linux-renesas" +PN = "kernel-module-mmngrbuf" +PR = "r0" + +S = "${WORKDIR}/git" +MMNGRBUF_DRV_DIR = "mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf" + +# Support HW overlay mode +SRC_URI_append = "\ + file://0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch \ +" + +includedir = "${RENESAS_DATADIR}/include" +SSTATE_DUPWHITELIST += "${STAGING_INCDIR}" + +# Build Memory Manager Buffer kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/${MMNGRBUF_DRV_DIR}/drv + install -d ${INCSHARED} + make all +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/mmngrbuf.symvers + + # Install kernel module + install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/drv/mmngrbuf.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private.h ${KERNELSRC}/include/ + install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private_cmn.h ${KERNELSRC}/include/ + + # Install shared header files to ${includedir} + install -m 644 ${S}/${MMNGRBUF_DRV_DIR}/include/mmngr_buf_private_cmn.h ${D}/${includedir}/ +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dev \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/mmngrbuf.ko \ +" + +RPROVIDES_${PN} += "kernel-module-mmngrbuf" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch new file mode 100644 index 00000000..7e5ca0aa --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf/0001-mmngr_drv-mmngrbuf-Take-care-of-any-migration-of-sca.patch @@ -0,0 +1,35 @@ +From 43d2cc7496340eea3f96cb3c3cf66139e0878f3c Mon Sep 17 00:00:00 2001 +From: Hai Nguyen Pham +Date: Tue, 26 Mar 2019 15:56:30 +0700 +Subject: [PATCH] mmngr_drv: mmngrbuf: Take care of any migration of + scatterlist + +MMNGRBUF should take care of any migration of scatterlist for +all (shared) users of the DMA buffer. Although we only care about +DMA addresses at the moment, this will benefit the DRM system that +uses the buffer allocated by MMNGR directly. + +Initialize the scatterlist entry so that it can be happily traversed. + +Signed-off-by: Hai Nguyen Pham +--- + mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c +index fe3db08..d9189e9 100644 +--- a/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c ++++ b/mmngr_drv/mmngrbuf/mmngrbuf-module/files/mmngrbuf/drv/mmngr_buf_drv.c +@@ -256,6 +256,9 @@ static struct sg_table *dmabuf_map_dma_buf(struct dma_buf_attachment *attach, + return NULL; + } + ++ sg_set_page(sgt->sgl, pfn_to_page(PFN_DOWN(priv->hard_addr)), ++ priv->size, offset_in_page(priv->hard_addr)); ++ + sg_dma_address(sgt->sgl) = priv->hard_addr; + sg_dma_len(sgt->sgl) = priv->size; + +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc new file mode 100644 index 00000000..77a0bced --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/mmngr_drv.inc @@ -0,0 +1,13 @@ +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ +" + +require include/rcar-gen3-modules-common.inc +inherit module + +MMNGR_DRV_URI = "git://github.com/renesas-rcar/mmngr_drv.git" + +SRC_URI = "${MMNGR_DRV_URI};branch=rcar_gen3" +SRCREV = "85d0042924de379307115533d7b6284333409bb3" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb new file mode 100644 index 00000000..5b02fb92 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-qos/kernel-module-qos.bb @@ -0,0 +1,62 @@ +DESCRIPTION = "QoS driver for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ +" + +inherit module + +DEPENDS = "linux-renesas" +PN = "kernel-module-qos" +PR = "r0" + +QOS_DRV_URL = "git://github.com/renesas-rcar/qos_drv.git" +BRANCH = "rcar-gen3" +SRCREV = "d32fbee4d7b76056c37935ff31102c3583801a29" + +SRC_URI = "${QOS_DRV_URL};branch=${BRANCH}" + +S = "${WORKDIR}/git" +QOS_DRV_DIR = "qos-module/files/qos/drv" + +includedir = "${RENESAS_DATADIR}/include" + +# Build Qos kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/${QOS_DRV_DIR}/ + oe_runmake +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${D}/${includedir} + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${QOS_DRV_DIR}/Module.symvers ${KERNELSRC}/include/qos.symvers + + # Install kernel module + install -m 644 ${S}/${QOS_DRV_DIR}/qos.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files + install -m 644 ${S}/${QOS_DRV_DIR}/qos.h ${KERNELSRC}/include/ + install -m 644 ${S}/${QOS_DRV_DIR}/qos_public_common.h ${KERNELSRC}/include/ + install -m 644 ${S}/${QOS_DRV_DIR}/qos_public_common.h ${D}/${includedir}/ +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/qos.ko \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb new file mode 100644 index 00000000..eb2d33b6 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bb @@ -0,0 +1,70 @@ +DESCRIPTION = "Kernel module of UVCS" +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://include/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/lkm/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/core/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/cmn/GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://include/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ + file://src/lkm/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ + file://src/core/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ + file://src/cmn/MIT-COPYING;md5=fea016ce2bdf2ec10080f69e9381d378 \ +" +require include/omx-control.inc +require include/rcar-gen3-path-common.inc + +inherit module +PR = "r0" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +SRC_URI = "${@oe.utils.conditional('USE_VIDEO_OMX', '1', 'file://RCG3VUDRL4101ZDO.tar.bz2', '', d)}" + +S = "${WORKDIR}/RCG3VUDRL4101ZDO" + +EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" +EXTRA_OEMAKE += "CROSS_COMPILE=${CROSS_COMPILE}" + +B="${S}/src/makefile" + +includedir = "${RENESAS_DATADIR}/include" + +do_compile_prepend() { + export UVCS_SRC="${S}/src" + export UVCS_INC="${S}" + export VCP4_SRC="${S}/src" +} + +# Build UVCS kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_install() { + # Create destination directory + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${D}/${includedir}/ + + # Install kernel module + install -m 644 ${B}/uvcs_drv.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install module symbol file + install -m 644 ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/UVCS.symvers + + # Install shared header file + install -m 644 ${S}/include/uvcs_ioctl.h ${D}/${includedir}/ +} + +# Clean up the module symbol file +CLEANFUNCS = "module_clean_symbol" + +module_clean_symbol() { + rm -f ${STAGING_KERNEL_BUILDDIR}/UVCS.symvers +} + +PACKAGES = " \ + ${PN} \ + ${PN}-sstate \ +" + +FILES_${PN}-sstate = " \ + ${includedir}/uvcs_ioctl.h \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb new file mode 100644 index 00000000..be8f8e01 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bb @@ -0,0 +1,65 @@ +DESCRIPTION = "VSP2Driver for the R-Car Gen3" + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=192063521ce782a445a3c9f99a8ad560 \ +" + +require include/rcar-gen3-modules-common.inc + +inherit module + +DEPENDS = "linux-renesas kernel-module-vspm" +PN = "kernel-module-vsp2driver" +PR = "r0" + +VSP2DRIVER_URL = " \ + git://github.com/renesas-rcar/vsp2driver.git" +BRANCH = "rcar-gen3" +SRCREV = "0ecf35aa05c103ba4d3ab83e3320a22fccd912c3" + +SRC_URI = "${VSP2DRIVER_URL};branch=${BRANCH}" + +SRC_URI_append = " file://0001-Handle-data_offset-setting-from-V4L2-API.patch" + +S = "${WORKDIR}/git" + +# Build VSP2 driver kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/vsp2driver + make all +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/vsp2driver/Module.symvers ${KERNELSRC}/include/vsp2.symvers + + # Copy kernel module + install -m 644 ${S}/vsp2driver/vsp2.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/vsp2driver/linux/vsp2.h ${KERNELSRC}/include/ +} + +PACKAGES = "\ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/vsp2.ko \ + ${sysconfdir}/modules-load.d \ +" + +RPROVIDES_${PN} += "kernel-module-vsp2driver kernel-module-vsp2" + +# Autoload VSP2Driver +KERNEL_MODULE_AUTOLOAD_append = " vsp2" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch new file mode 100644 index 00000000..3aab1740 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver/0001-Handle-data_offset-setting-from-V4L2-API.patch @@ -0,0 +1,29 @@ +From 50dd867589931beef05dbcdb17a37a8a678e4b13 Mon Sep 17 00:00:00 2001 +From: Damian Hobson-Garcia +Date: Fri, 10 May 2019 13:34:42 +0900 +Subject: [PATCH] Handle data_offset setting from V4L2 API + +The data in each buffer does not necessarily start at the +beginning of the buffer. Adjust as necessary according to +the data_offset field specified from user space. +--- + vsp2driver/vsp2_video.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vsp2driver/vsp2_video.c b/vsp2driver/vsp2_video.c +index 8875578..0abf81c 100644 +--- a/vsp2driver/vsp2_video.c ++++ b/vsp2driver/vsp2_video.c +@@ -764,7 +764,8 @@ static int vsp2_video_buffer_prepare(struct vb2_buffer *vb) + } + + for (i = 0; i < vb->num_planes; ++i) { +- buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i); ++ buf->mem.addr[i] = vb2_dma_contig_plane_dma_addr(vb, i) + ++ vb->planes[i].data_offset; + + if (vb2_plane_size(vb, i) < format->plane_fmt[i].sizeimage) + return -EINVAL; +-- +2.17.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb new file mode 100644 index 00000000..9b723614 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bb @@ -0,0 +1,102 @@ +DESCRIPTION = "VSP Manager for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=0ebf15a927e436cec699371cd890775c \ +" + +inherit module + +DEPENDS = "linux-renesas" +PN = "kernel-module-vspm" +PR = "r0" + +VSPM_DRV_URL = "git://github.com/renesas-rcar/vspm_drv.git" +BRANCH = "rcar_gen3" +SRCREV = "7f854a9a1c4760255a54b7c14891d1545ed1bf43" + +SRC_URI = "${VSPM_DRV_URL};branch=${BRANCH}" + +# Fix patch for upscaling issue +SRC_URI_append = " \ + file://0001-Set-UDS-horizontal-scaling-phase-to-auto.patch \ +" + +S = "${WORKDIR}/git" +VSPM_DRV_DIR = "vspm-module/files/vspm" +includedir = "${RENESAS_DATADIR}/include" + +# Build VSP Manager kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/${VSPM_DRV_DIR}/drv + make all +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${KERNELSRC}/include + install -d ${D}/${includedir} + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${VSPM_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/vspm.symvers + + # Install kernel module + install -m 644 ${S}/${VSPM_DRV_DIR}/drv/vspm.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_public.h ${KERNELSRC}/include/ + install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_cmn.h ${KERNELSRC}/include/ + install -m 644 ${S}/${VSPM_DRV_DIR}/include/vsp_drv.h ${KERNELSRC}/include/ + install -m 644 ${S}/${VSPM_DRV_DIR}/include/fdp_drv.h ${KERNELSRC}/include/ + + # Install shared header files + install -m 644 ${S}/${VSPM_DRV_DIR}/include/vspm_cmn.h ${D}/${includedir}/ + install -m 644 ${S}/${VSPM_DRV_DIR}/include/vsp_drv.h ${D}/${includedir}/ + install -m 644 ${S}/${VSPM_DRV_DIR}/include/fdp_drv.h ${D}/${includedir}/ +} + +do_populate_sysroot[sstate-inputdirs] += "${S}/${VSPM_DRV_DIR}/include/" +do_populate_sysroot[sstate-outputdirs] += "${KERNELSRC}/include/" +do_populate_sysroot_setscene[prefuncs] = "vspm_sstate_check_func" +SSTATE_DUPWHITELIST = "${KERNELSRC}/include" + +vspm_sstate_check_func() { + # An error is returned when unpack of kernel source has not been completed yet. + # By returning error, rebuild task runs by force (Invalidating sstate). + # This module installs shared header files in ${KERNELSRC}/include by + # sstate cache. + # Those files will be deleted by unpack task of kernel. + if [ ${WITHIN_EXT_SDK} -eq 1 ]; then + : + else + if [ ! -d "${KERNELSRC}/include" ]; then + exit 1 + fi + fi +} + +# Should also clean deploy/licenses directory +# for module when do_clean. +do_clean[cleandirs] += "${LICENSE_DIRECTORY}/${PN}" + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/vspm.ko \ +" + +RPROVIDES_${PN} += "kernel-module-vspm" + +# Autoload VSPM +KERNEL_MODULE_AUTOLOAD_append = " vspm" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch new file mode 100644 index 00000000..17bf6233 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm/0001-Set-UDS-horizontal-scaling-phase-to-auto.patch @@ -0,0 +1,40 @@ +From dd7dffa07065100c3164ca94a1d4395712e647cd Mon Sep 17 00:00:00 2001 +From: Damian Hobson-Garcia +Date: Mon, 3 Jun 2019 12:33:57 +0900 +Subject: [PATCH] Set UDS horizontal scaling phase to auto + +Use the register default settings for the scaling phase instead +of manually calculating them. + +The default setting seems to calculate the phase correctly, +which the manual settings seem to shift the output image to the left +my an amount proportional to the scaling ratio. i.e x16 scaling +will shift the output by 16 pixels. +--- + vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c b/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c +index 8f63565..6f89bae 100644 +--- a/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c ++++ b/vspm-module/files/vspm/drv/vsp/vsp_drv_phy.c +@@ -1454,16 +1454,6 @@ static void vsp_ins_replace_part_uds_module( + r_temp *= ratio; + } + +- /* add horizontal filter phase of control register */ +- uds_info->val_ctrl |= VSP_UDS_CTRL_AMDSLH; +- +- /* replace scaling filter horizontal phase */ +- if (l_temp & 0xfff) +- uds_info->val_hphase = (4096 - (l_temp & 0xfff)) << 16; +- else +- uds_info->val_hphase = 0; +- if (r_temp & 0xfff) +- uds_info->val_hphase |= (4096 - (r_temp & 0xfff)); + } else { + l_temp *= 4096; + r_temp *= 4096; +-- +2.17.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb new file mode 100644 index 00000000..95e71c44 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bb @@ -0,0 +1,67 @@ +DESCRIPTION = "VSP Manager Interface driver for the R-Car Gen3" + +require include/rcar-gen3-modules-common.inc + +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://MIT-COPYING;md5=0ebf15a927e436cec699371cd890775c \ +" + +inherit module + +DEPENDS = "linux-renesas kernel-module-vspm" +PN = "kernel-module-vspmif" +PR = "r0" + +VSPMIF_DRV_URL = " \ + git://github.com/renesas-rcar/vspmif_drv.git" +BRANCH = "rcar_gen3" +SRCREV = "6172cc7273aae0345db894faa5ab59777549c247" + +SRC_URI = "${VSPMIF_DRV_URL};branch=${BRANCH}" + +S = "${WORKDIR}/git" +VSPMIF_DRV_DIR = "vspm_if-module/files/vspm_if" + +includedir = "${RENESAS_DATADIR}/include" + +# Build VSP Manager Interface kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +do_compile() { + cd ${S}/${VSPMIF_DRV_DIR}/drv + make all +} + +do_install () { + # Create destination directories + install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/ + install -d ${D}/${includedir} + install -d ${KERNELSRC}/include + + # Install shared library to KERNELSRC(STAGING_KERNEL_DIR) for reference from other modules + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${VSPMIF_DRV_DIR}/drv/Module.symvers ${KERNELSRC}/include/vspm_if.symvers + + # Install kernel module + install -m 644 ${S}/${VSPMIF_DRV_DIR}/drv/vspm_if.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/ + + # Install shared header files to KERNELSRC(STAGING_KERNEL_DIR) + # This file installed in SDK by kernel-devsrc pkg. + install -m 644 ${S}/${VSPMIF_DRV_DIR}/include/vspm_if.h ${KERNELSRC}/include/ + + # Install shared header file + install -m 644 ${S}/${VSPMIF_DRV_DIR}/include/vspm_if.h ${D}/${includedir}/ +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dev \ +" + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/vspm_if.ko \ +" + +RPROVIDES_${PN} += "kernel-module-vspmif kernel-module-vspm-if" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch new file mode 100644 index 00000000..765053fa --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch @@ -0,0 +1,32 @@ +From 5f378e5db591a4a119b6cface6037cbded240506 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Thu, 25 Oct 2018 13:25:10 +0700 +Subject: [PATCH 1/6] ADSP: add document for compatible string + "renesas,rcar_adsp_sound_gen3" + +Signed-off-by: tienphitran +--- + .../devicetree/bindings/sound/renesas,adsp.txt | 11 +++++++++++ + 1 file changed, 11 insertions(+) + create mode 100644 Documentation/devicetree/bindings/sound/renesas,adsp.txt + +diff --git a/Documentation/devicetree/bindings/sound/renesas,adsp.txt b/Documentation/devicetree/bindings/sound/renesas,adsp.txt +new file mode 100644 +index 000000000000..b529bcadea82 +--- /dev/null ++++ b/Documentation/devicetree/bindings/sound/renesas,adsp.txt +@@ -0,0 +1,11 @@ ++Renesas ADSP sound driver ++ ++Required properties: ++- compatible : "renesas,rcar_adsp_sound_gen3" ++ ++Example: ++ ++rcar_adsp_sound: adsp_sound@0 { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++}; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch new file mode 100644 index 00000000..9c38a327 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch @@ -0,0 +1,61 @@ +From a39cada70268aadff7153e4f782bcd90a5c69d07 Mon Sep 17 00:00:00 2001 +From: Hendrik Brueckner +Date: Mon, 4 Dec 2017 10:56:46 +0100 +Subject: [PATCH] arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT + program type + +Correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type +by exporting the user_pt_regs structure instead of the pt_regs structure +that is in-kernel only. + +Signed-off-by: Hendrik Brueckner +Reviewed-by: Thomas Richter +Acked-by: Alexei Starovoitov +Cc: Will Deacon +Cc: Mark Rutland +Cc: Arnaldo Carvalho de Melo +Signed-off-by: Daniel Borkmann +--- + arch/arm64/include/asm/perf_event.h | 2 ++ + arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ + 2 files changed, 11 insertions(+) + create mode 100644 arch/arm64/include/uapi/asm/bpf_perf_event.h + +diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h +index 8d5cbec..f9ccc36 100644 +--- a/arch/arm64/include/asm/perf_event.h ++++ b/arch/arm64/include/asm/perf_event.h +@@ -18,6 +18,7 @@ + #define __ASM_PERF_EVENT_H + + #include ++#include + + #define ARMV8_PMU_MAX_COUNTERS 32 + #define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1) +@@ -79,6 +80,7 @@ struct pt_regs; + extern unsigned long perf_instruction_pointer(struct pt_regs *regs); + extern unsigned long perf_misc_flags(struct pt_regs *regs); + #define perf_misc_flags(regs) perf_misc_flags(regs) ++#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs + #endif + + #define perf_arch_fetch_caller_regs(regs, __ip) { \ +diff --git a/arch/arm64/include/uapi/asm/bpf_perf_event.h b/arch/arm64/include/uapi/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..b551b74 +--- /dev/null ++++ b/arch/arm64/include/uapi/asm/bpf_perf_event.h +@@ -0,0 +1,9 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ ++#define _UAPI__ASM_BPF_PERF_EVENT_H__ ++ ++#include ++ ++typedef struct user_pt_regs bpf_user_pt_regs_t; ++ ++#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */ +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch new file mode 100644 index 00000000..9ce66d64 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch @@ -0,0 +1,89 @@ +From f8358c2afe0be62cffe4cca58c5373951ecc1c8d Mon Sep 17 00:00:00 2001 +From: Khang Nguyen +Date: Mon, 13 Apr 2020 21:49:28 +0900 +Subject: [PATCH] drm: rcar-du: Set primary plane zpos immutably at + initializing + +This patch backports a fix from [1] for an issue occurs on Weston 8.0.0. + +[1]: +https://lists.freedesktop.org/archives/dri-devel/2020-April/261224.html + +According to drm_plane_create_zpos_property() function documentation, +all planes zpos range should be set if zpos property is supported. +However, the rcar-du driver didn't set primary plane zpos range. Since +the primary plane's zpos is fixed, set it immutably. + +Signed-off-by: Khang Nguyen +Signed-off-by: Tram Huynh +--- + drivers/gpu/drm/rcar-du/rcar_du_plane.c | 13 ++++++++----- + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 18 ++++++++++-------- + 2 files changed, 18 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c +index 1b70db3..5818c59 100644 +--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c ++++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c +@@ -825,15 +825,18 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) + drm_plane_helper_add(&plane->plane, + &rcar_du_plane_helper_funcs); + +- if (type == DRM_PLANE_TYPE_PRIMARY) +- continue; ++ if (type == DRM_PLANE_TYPE_PRIMARY){ ++ drm_plane_create_zpos_immutable_property(&plane->plane, ++ 0); ++ } else { + +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.alpha, 255); +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey, + RCAR_DU_COLORKEY_NONE); +- drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); ++ drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); ++ } + } + + return 0; +diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +index c44d336..0c352a0 100644 +--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c ++++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +@@ -633,20 +633,22 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, + drm_plane_helper_add(&plane->plane, + &rcar_du_vsp_plane_helper_funcs); + +- if (type == DRM_PLANE_TYPE_PRIMARY) +- continue; +- +- drm_object_attach_property(&plane->plane.base, ++ if (type == DRM_PLANE_TYPE_PRIMARY) { ++ drm_plane_create_zpos_immutable_property(&plane->plane, ++ 0); ++ } else { ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.alpha, 255); +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey, + RCAR_DU_COLORKEY_NONE); +- if (rcdu->props.colorkey_alpha) +- drm_object_attach_property(&plane->plane.base, ++ if (rcdu->props.colorkey_alpha) ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey_alpha, + 0); +- drm_plane_create_zpos_property(&plane->plane, 1, 1, ++ drm_plane_create_zpos_property(&plane->plane, 1, 1, + vsp->num_planes - 1); ++ } + } + + return 0; +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-perf-tools-Add-Python-3-support.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-perf-tools-Add-Python-3-support.patch new file mode 100644 index 00000000..74ce61e5 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-perf-tools-Add-Python-3-support.patch @@ -0,0 +1,917 @@ +From 8804547988bb772a00cd4bb832fe4e1a79f552b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Fri, 19 Jan 2018 21:56:41 +0100 +Subject: [PATCH] perf tools: Add Python 3 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Added Python 3 support while keeping Python 2.7 compatibility. + +Committer notes: + +This doesn't make it to auto detect python 3, one has to explicitely ask +it to build with python 3 devel files, here are the instructions +provided by Jaroslav: + + --- + $ cp -a tools/perf tools/python3-perf + $ make V=1 prefix=/usr -C tools/perf PYTHON=/usr/bin/python2 all + $ make V=1 prefix=/usr -C tools/python3-perf PYTHON=/usr/bin/python3 all + $ make V=1 prefix=/usr -C tools/python3-perf PYTHON=/usr/bin/python3 DESTDIR=%{buildroot} install-python_ext + $ make V=1 prefix=/usr -C tools/perf PYTHON=/usr/bin/python2 DESTDIR=%{buildroot} install-python_ext + --- + +We need to make this automatic, just like the existing tests for checking if +the python2 devel files are in place, allowing the build with python3 if +available, fallbacking to python2 and then just disabling it if none are +available. + +So, using the PYTHON variable to build it using O= we get: + +Before this patch: + + $ rpm -q python3 python3-devel + python3-3.6.4-7.fc27.x86_64 + python3-devel-3.6.4-7.fc27.x86_64 + $ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make O=/tmp/build/perf PYTHON=/usr/bin/python3 -C tools/perf install-bin + make: Entering directory '/home/acme/git/linux/tools/perf' + + Makefile.config:670: Python 3 is not yet supported; please set + Makefile.config:671: PYTHON and/or PYTHON_CONFIG appropriately. + Makefile.config:672: If you also have Python 2 installed, then + Makefile.config:673: try something like: + Makefile.config:674: + Makefile.config:675: make PYTHON=python2 + Makefile.config:676: + Makefile.config:677: Otherwise, disable Python support entirely: + Makefile.config:678: + Makefile.config:679: make NO_LIBPYTHON=1 + Makefile.config:680: + Makefile.config:681: *** . Stop. + make[1]: *** [Makefile.perf:212: sub-make] Error 2 + make: *** [Makefile:110: install-bin] Error 2 + make: Leaving directory '/home/acme/git/linux/tools/perf' + $ + +After: + + $ make O=/tmp/build/perf PYTHON=python3 -C tools/perf install-bin + $ ldd ~/bin/perf | grep python + libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f58a31e8000) + $ rpm -qf /lib64/libpython3.6m.so.1.0 + python3-libs-3.6.4-7.fc27.x86_64 + $ + +Now verify that when using the binding the right ELF file is loaded, +using perf trace: + + $ perf trace -e open* perf test python + 0.051 ( 0.016 ms): perf/3927 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 + + 18: 'import perf' in python : + 8.849 ( 0.013 ms): sh/3929 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 + + 25.572 ( 0.008 ms): python3/3931 openat(dfd: CWD, filename: /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so, flags: CLOEXEC) = 3 + + Ok + + $ + +And using tools/perf/python/twatch.py, to show PERF_RECORD_ metaevents: + + $ python3 tools/perf/python/twatch.py + cpu: 3, pid: 16060, tid: 16060 { type: fork, pid: 5207, ppid: 16060, tid: 5207, ptid: 16060, time: 10798513015459} + cpu: 3, pid: 16060, tid: 16060 { type: fork, pid: 5208, ppid: 16060, tid: 5208, ptid: 16060, time: 10798513562503} + cpu: 0, pid: 5208, tid: 5208 { type: comm, pid: 5208, tid: 5208, comm: grep } + cpu: 2, pid: 5207, tid: 5207 { type: comm, pid: 5207, tid: 5207, comm: ps } + cpu: 2, pid: 5207, tid: 5207 { type: exit, pid: 5207, ppid: 5207, tid: 5207, ptid: 5207, time: 10798551337484} + cpu: 3, pid: 5208, tid: 5208 { type: exit, pid: 5208, ppid: 5208, tid: 5208, ptid: 5208, time: 10798551292153} + cpu: 3, pid: 601, tid: 601 { type: fork, pid: 5209, ppid: 601, tid: 5209, ptid: 601, time: 10801779977324} + ^CTraceback (most recent call last): + File "tools/perf/python/twatch.py", line 68, in + main() + File "tools/perf/python/twatch.py", line 40, in main + evlist.poll(timeout = -1) + KeyboardInterrupt + $ + + # ps ax|grep twatch + 5197 pts/8 S+ 0:00 python3 tools/perf/python/twatch.py + # ls -la /proc/5197/smaps + -r--r--r--. 1 acme acme 0 Feb 19 13:14 /proc/5197/smaps + # grep python /proc/5197/smaps + 558111307000-558111309000 r-xp 00000000 fd:00 3151710 /usr/bin/python3.6 + 558111508000-558111509000 r--p 00001000 fd:00 3151710 /usr/bin/python3.6 + 558111509000-55811150a000 rw-p 00002000 fd:00 3151710 /usr/bin/python3.6 + 7ffad6fc1000-7ffad7008000 r-xp 00000000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7008000-7ffad7207000 ---p 00047000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7207000-7ffad7208000 r--p 00046000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7208000-7ffad7215000 rw-p 00047000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffadea77000-7ffaded3d000 r-xp 00000000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffaded3d000-7ffadef3c000 ---p 002c6000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffadef3c000-7ffadef42000 r--p 002c5000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffadef42000-7ffadefa5000 rw-p 002cb000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + # + +And with this patch, but building normally, without specifying the +PYTHON=python3 part, which will make it use python2 if its devel files are +available, like in this test: + + $ make O=/tmp/build/perf -C tools/perf install-bin + $ ldd ~/bin/perf | grep python + libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f6a44410000) + $ ldd /tmp/build/perf/python_ext_build/lib/perf.so | grep python + libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fed28a2c000) + $ + + [acme@jouet perf]$ tools/perf/python/twatch.py + cpu: 0, pid: 2817, tid: 2817 { type: fork, pid: 2817, ppid: 2817, tid: 8910, ptid: 2817, time: 11126454335306} + cpu: 0, pid: 2817, tid: 2817 { type: comm, pid: 2817, tid: 8910, comm: worker } + $ ps ax | grep twatch.py + 8909 pts/8 S+ 0:00 /usr/bin/python tools/perf/python/twatch.py + $ grep python /proc/8909/smaps + 5579de658000-5579de659000 r-xp 00000000 fd:00 3156044 /usr/bin/python2.7 + 5579de858000-5579de859000 r--p 00000000 fd:00 3156044 /usr/bin/python2.7 + 5579de859000-5579de85a000 rw-p 00001000 fd:00 3156044 /usr/bin/python2.7 + 7f0de01f7000-7f0de023e000 r-xp 00000000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de023e000-7f0de043d000 ---p 00047000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de043d000-7f0de043e000 r--p 00046000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de043e000-7f0de044b000 rw-p 00047000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de6f0f000-7f0de6f13000 r-xp 00000000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de6f13000-7f0de7113000 ---p 00004000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7113000-7f0de7114000 r--p 00004000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7114000-7f0de7115000 rw-p 00005000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7e73000-7f0de8052000 r-xp 00000000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8052000-7f0de8251000 ---p 001df000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8251000-7f0de8255000 r--p 001de000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8255000-7f0de8291000 rw-p 001e2000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + $ + +Signed-off-by: Jaroslav Å karvada +Tested-by: Arnaldo Carvalho de Melo +Cc: Adrian Hunter +Cc: David Ahern +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: Wang Nan +LPU-Reference: 20180119205641.24242-1-jskarvad@redhat.com +Link: https://lkml.kernel.org/n/tip-8d7dt9kqp83vsz25hagug8fu@git.kernel.org +[ Removed explicit check for python version, allowing it to really build with python3 ] +Signed-off-by: Arnaldo Carvalho de Melo + +Upstream status: Backport [https://github.com/torvalds/linux/commit/66dfdff03d196e51322c6a85c0d8db8bb2bdd655] +Signed-off-by: Naveen Saini +--- + tools/perf/Makefile.config | 23 +-- + tools/perf/Makefile.perf | 4 +- + .../scripts/python/Perf-Trace-Util/Context.c | 34 +++- + tools/perf/util/python.c | 95 ++++++++--- + .../scripting-engines/trace-event-python.c | 147 +++++++++++++----- + tools/perf/util/setup.py | 6 +- + 6 files changed, 221 insertions(+), 88 deletions(-) + +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index f362ee46506a..ecdc3770d899 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -622,25 +622,10 @@ else + ifneq ($(feature-libpython), 1) + $(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev) + else +- ifneq ($(feature-libpython-version), 1) +- $(warning Python 3 is not yet supported; please set) +- $(warning PYTHON and/or PYTHON_CONFIG appropriately.) +- $(warning If you also have Python 2 installed, then) +- $(warning try something like:) +- $(warning $(and ,)) +- $(warning $(and ,) make PYTHON=python2) +- $(warning $(and ,)) +- $(warning Otherwise, disable Python support entirely:) +- $(warning $(and ,)) +- $(warning $(and ,) make NO_LIBPYTHON=1) +- $(warning $(and ,)) +- $(error $(and ,)) +- else +- LDFLAGS += $(PYTHON_EMBED_LDFLAGS) +- EXTLIBS += $(PYTHON_EMBED_LIBADD) +- LANG_BINDINGS += $(obj-perf)python/perf.so +- $(call detected,CONFIG_LIBPYTHON) +- endif ++ LDFLAGS += $(PYTHON_EMBED_LDFLAGS) ++ EXTLIBS += $(PYTHON_EMBED_LIBADD) ++ LANG_BINDINGS += $(obj-perf)python/perf.so ++ $(call detected,CONFIG_LIBPYTHON) + endif + endif + endif +diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf +index 349ea5133d83..6879321c612d 100644 +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -294,7 +294,7 @@ PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ + PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/ + export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP + +-python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so ++python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf*.so + + PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) + PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI) +@@ -444,7 +444,7 @@ $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_D + $(PYTHON_WORD) util/setup.py \ + --quiet build_ext; \ + mkdir -p $(OUTPUT)python && \ +- cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ ++ cp $(PYTHON_EXTBUILD_LIB)perf*.so $(OUTPUT)python/ + + please_set_SHELL_PATH_to_a_more_modern_shell: + $(Q)$$(:) +diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Context.c b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +index fcd1dd667906..1a0d27757eec 100644 +--- a/tools/perf/scripts/python/Perf-Trace-Util/Context.c ++++ b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +@@ -23,7 +23,17 @@ + #include "../../../perf.h" + #include "../../../util/trace-event.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyCapsule_GetPointer(arg1, arg2) \ ++ PyCObject_AsVoidPtr(arg1) ++ + PyMODINIT_FUNC initperf_trace_context(void); ++#else ++#define _PyCapsule_GetPointer(arg1, arg2) \ ++ PyCapsule_GetPointer((arg1), (arg2)) ++ ++PyMODINIT_FUNC PyInit_perf_trace_context(void); ++#endif + + static PyObject *perf_trace_context_common_pc(PyObject *obj, PyObject *args) + { +@@ -34,7 +44,7 @@ static PyObject *perf_trace_context_common_pc(PyObject *obj, PyObject *args) + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_pc(scripting_context); + + return Py_BuildValue("i", retval); +@@ -50,7 +60,7 @@ static PyObject *perf_trace_context_common_flags(PyObject *obj, + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_flags(scripting_context); + + return Py_BuildValue("i", retval); +@@ -66,7 +76,7 @@ static PyObject *perf_trace_context_common_lock_depth(PyObject *obj, + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_lock_depth(scripting_context); + + return Py_BuildValue("i", retval); +@@ -82,7 +92,25 @@ static PyMethodDef ContextMethods[] = { + { NULL, NULL, 0, NULL} + }; + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf_trace_context(void) + { + (void) Py_InitModule("perf_trace_context", ContextMethods); + } ++#else ++PyMODINIT_FUNC PyInit_perf_trace_context(void) ++{ ++ static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "perf_trace_context", /* m_name */ ++ "", /* m_doc */ ++ -1, /* m_size */ ++ ContextMethods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++ return PyModule_Create(&moduledef); ++} ++#endif +diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c +index 8e49d9cafcfc..16620c37fd8c 100644 +--- a/tools/perf/util/python.c ++++ b/tools/perf/util/python.c +@@ -12,6 +12,30 @@ + #include "print_binary.h" + #include "thread_map.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyUnicode_FromString(arg) \ ++ PyString_FromString(arg) ++#define _PyUnicode_AsString(arg) \ ++ PyString_AsString(arg) ++#define _PyUnicode_FromFormat(...) \ ++ PyString_FromFormat(__VA_ARGS__) ++#define _PyLong_FromLong(arg) \ ++ PyInt_FromLong(arg) ++ ++#else ++ ++#define _PyUnicode_FromString(arg) \ ++ PyUnicode_FromString(arg) ++#define _PyUnicode_FromFormat(...) \ ++ PyUnicode_FromFormat(__VA_ARGS__) ++#define _PyLong_FromLong(arg) \ ++ PyLong_FromLong(arg) ++#endif ++ ++#ifndef Py_TYPE ++#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) ++#endif ++ + /* + * Provide these two so that we don't have to link against callchain.c and + * start dragging hist.c, etc. +@@ -49,7 +73,11 @@ int eprintf(int level, int var, const char *fmt, ...) + # define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size, + #endif + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf(void); ++#else ++PyMODINIT_FUNC PyInit_perf(void); ++#endif + + #define member_def(type, member, ptype, help) \ + { #member, ptype, \ +@@ -107,7 +135,7 @@ static PyObject *pyrf_mmap_event__repr(struct pyrf_event *pevent) + pevent->event.mmap.pgoff, pevent->event.mmap.filename) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -138,7 +166,7 @@ static PyMemberDef pyrf_task_event__members[] = { + + static PyObject *pyrf_task_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: %s, pid: %u, ppid: %u, tid: %u, " ++ return _PyUnicode_FromFormat("{ type: %s, pid: %u, ppid: %u, tid: %u, " + "ptid: %u, time: %" PRIu64 "}", + pevent->event.header.type == PERF_RECORD_FORK ? "fork" : "exit", + pevent->event.fork.pid, +@@ -171,7 +199,7 @@ static PyMemberDef pyrf_comm_event__members[] = { + + static PyObject *pyrf_comm_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: comm, pid: %u, tid: %u, comm: %s }", ++ return _PyUnicode_FromFormat("{ type: comm, pid: %u, tid: %u, comm: %s }", + pevent->event.comm.pid, + pevent->event.comm.tid, + pevent->event.comm.comm); +@@ -202,7 +230,7 @@ static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent) + { + struct throttle_event *te = (struct throttle_event *)(&pevent->event.header + 1); + +- return PyString_FromFormat("{ type: %sthrottle, time: %" PRIu64 ", id: %" PRIu64 ++ return _PyUnicode_FromFormat("{ type: %sthrottle, time: %" PRIu64 ", id: %" PRIu64 + ", stream_id: %" PRIu64 " }", + pevent->event.header.type == PERF_RECORD_THROTTLE ? "" : "un", + te->time, te->id, te->stream_id); +@@ -237,7 +265,7 @@ static PyObject *pyrf_lost_event__repr(struct pyrf_event *pevent) + pevent->event.lost.id, pevent->event.lost.lost) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -264,7 +292,7 @@ static PyMemberDef pyrf_read_event__members[] = { + + static PyObject *pyrf_read_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: read, pid: %u, tid: %u }", ++ return _PyUnicode_FromFormat("{ type: read, pid: %u, tid: %u }", + pevent->event.read.pid, + pevent->event.read.tid); + /* +@@ -299,7 +327,7 @@ static PyObject *pyrf_sample_event__repr(struct pyrf_event *pevent) + if (asprintf(&s, "{ type: sample }") < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -330,7 +358,7 @@ tracepoint_field(struct pyrf_event *pe, struct format_field *field) + } + if (field->flags & FIELD_IS_STRING && + is_printable_array(data + offset, len)) { +- ret = PyString_FromString((char *)data + offset); ++ ret = _PyUnicode_FromString((char *)data + offset); + } else { + ret = PyByteArray_FromStringAndSize((const char *) data + offset, len); + field->flags &= ~FIELD_IS_STRING; +@@ -352,7 +380,7 @@ tracepoint_field(struct pyrf_event *pe, struct format_field *field) + static PyObject* + get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name) + { +- const char *str = PyString_AsString(PyObject_Str(attr_name)); ++ const char *str = _PyUnicode_AsString(PyObject_Str(attr_name)); + struct perf_evsel *evsel = pevent->evsel; + struct format_field *field; + +@@ -416,7 +444,7 @@ static PyObject *pyrf_context_switch_event__repr(struct pyrf_event *pevent) + !!(pevent->event.header.misc & PERF_RECORD_MISC_SWITCH_OUT)) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -528,7 +556,7 @@ static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus, + static void pyrf_cpu_map__delete(struct pyrf_cpu_map *pcpus) + { + cpu_map__put(pcpus->cpus); +- pcpus->ob_type->tp_free((PyObject*)pcpus); ++ Py_TYPE(pcpus)->tp_free((PyObject*)pcpus); + } + + static Py_ssize_t pyrf_cpu_map__length(PyObject *obj) +@@ -597,7 +625,7 @@ static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads, + static void pyrf_thread_map__delete(struct pyrf_thread_map *pthreads) + { + thread_map__put(pthreads->threads); +- pthreads->ob_type->tp_free((PyObject*)pthreads); ++ Py_TYPE(pthreads)->tp_free((PyObject*)pthreads); + } + + static Py_ssize_t pyrf_thread_map__length(PyObject *obj) +@@ -759,7 +787,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel, + static void pyrf_evsel__delete(struct pyrf_evsel *pevsel) + { + perf_evsel__exit(&pevsel->evsel); +- pevsel->ob_type->tp_free((PyObject*)pevsel); ++ Py_TYPE(pevsel)->tp_free((PyObject*)pevsel); + } + + static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, +@@ -850,7 +878,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist, + static void pyrf_evlist__delete(struct pyrf_evlist *pevlist) + { + perf_evlist__exit(&pevlist->evlist); +- pevlist->ob_type->tp_free((PyObject*)pevlist); ++ Py_TYPE(pevlist)->tp_free((PyObject*)pevlist); + } + + static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist, +@@ -902,12 +930,16 @@ static PyObject *pyrf_evlist__get_pollfd(struct pyrf_evlist *pevlist, + + for (i = 0; i < evlist->pollfd.nr; ++i) { + PyObject *file; ++#if PY_MAJOR_VERSION < 3 + FILE *fp = fdopen(evlist->pollfd.entries[i].fd, "r"); + + if (fp == NULL) + goto free_list; + + file = PyFile_FromFile(fp, "perf", "r", NULL); ++#else ++ file = PyFile_FromFd(evlist->pollfd.entries[i].fd, "perf", "r", -1, NULL, NULL, NULL, 1); ++#endif + if (file == NULL) + goto free_list; + +@@ -1194,9 +1226,9 @@ static PyObject *pyrf__tracepoint(struct pyrf_evsel *pevsel, + + tp_format = trace_event__tp_format(sys, name); + if (IS_ERR(tp_format)) +- return PyInt_FromLong(-1); ++ return _PyLong_FromLong(-1); + +- return PyInt_FromLong(tp_format->id); ++ return _PyLong_FromLong(tp_format->id); + } + + static PyMethodDef perf__methods[] = { +@@ -1209,11 +1241,31 @@ static PyMethodDef perf__methods[] = { + { .ml_name = NULL, } + }; + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf(void) ++#else ++PyMODINIT_FUNC PyInit_perf(void) ++#endif + { + PyObject *obj; + int i; +- PyObject *dict, *module = Py_InitModule("perf", perf__methods); ++ PyObject *dict; ++#if PY_MAJOR_VERSION < 3 ++ PyObject *module = Py_InitModule("perf", perf__methods); ++#else ++ static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "perf", /* m_name */ ++ "", /* m_doc */ ++ -1, /* m_size */ ++ perf__methods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++ PyObject *module = PyModule_Create(&moduledef); ++#endif + + if (module == NULL || + pyrf_event__setup_types() < 0 || +@@ -1221,7 +1273,11 @@ PyMODINIT_FUNC initperf(void) + pyrf_evsel__setup_types() < 0 || + pyrf_thread_map__setup_types() < 0 || + pyrf_cpu_map__setup_types() < 0) ++#if PY_MAJOR_VERSION < 3 + return; ++#else ++ return module; ++#endif + + /* The page_size is placed in util object. */ + page_size = sysconf(_SC_PAGE_SIZE); +@@ -1270,7 +1326,7 @@ PyMODINIT_FUNC initperf(void) + goto error; + + for (i = 0; perf__constants[i].name != NULL; i++) { +- obj = PyInt_FromLong(perf__constants[i].value); ++ obj = _PyLong_FromLong(perf__constants[i].value); + if (obj == NULL) + goto error; + PyDict_SetItemString(dict, perf__constants[i].name, obj); +@@ -1280,6 +1336,9 @@ PyMODINIT_FUNC initperf(void) + error: + if (PyErr_Occurred()) + PyErr_SetString(PyExc_ImportError, "perf: Init failed!"); ++#if PY_MAJOR_VERSION >= 3 ++ return module; ++#endif + } + + /* +diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c +index f03fa7a835a1..8db28d4ff4b6 100644 +--- a/tools/perf/util/scripting-engines/trace-event-python.c ++++ b/tools/perf/util/scripting-engines/trace-event-python.c +@@ -50,7 +50,37 @@ + #include "print_binary.h" + #include "stat.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyUnicode_FromString(arg) \ ++ PyString_FromString(arg) ++#define _PyUnicode_FromStringAndSize(arg1, arg2) \ ++ PyString_FromStringAndSize((arg1), (arg2)) ++#define _PyBytes_FromStringAndSize(arg1, arg2) \ ++ PyString_FromStringAndSize((arg1), (arg2)) ++#define _PyLong_FromLong(arg) \ ++ PyInt_FromLong(arg) ++#define _PyLong_AsLong(arg) \ ++ PyInt_AsLong(arg) ++#define _PyCapsule_New(arg1, arg2, arg3) \ ++ PyCObject_FromVoidPtr((arg1), (arg2)) ++ + PyMODINIT_FUNC initperf_trace_context(void); ++#else ++#define _PyUnicode_FromString(arg) \ ++ PyUnicode_FromString(arg) ++#define _PyUnicode_FromStringAndSize(arg1, arg2) \ ++ PyUnicode_FromStringAndSize((arg1), (arg2)) ++#define _PyBytes_FromStringAndSize(arg1, arg2) \ ++ PyBytes_FromStringAndSize((arg1), (arg2)) ++#define _PyLong_FromLong(arg) \ ++ PyLong_FromLong(arg) ++#define _PyLong_AsLong(arg) \ ++ PyLong_AsLong(arg) ++#define _PyCapsule_New(arg1, arg2, arg3) \ ++ PyCapsule_New((arg1), (arg2), (arg3)) ++ ++PyMODINIT_FUNC PyInit_perf_trace_context(void); ++#endif + + #define TRACE_EVENT_TYPE_MAX \ + ((1 << (sizeof(unsigned short) * 8)) - 1) +@@ -136,7 +166,7 @@ static int get_argument_count(PyObject *handler) + PyObject *arg_count_obj = PyObject_GetAttrString(code_obj, + "co_argcount"); + if (arg_count_obj) { +- arg_count = (int) PyInt_AsLong(arg_count_obj); ++ arg_count = (int) _PyLong_AsLong(arg_count_obj); + Py_DECREF(arg_count_obj); + } + Py_DECREF(code_obj); +@@ -183,10 +213,10 @@ static void define_value(enum print_arg_type field_type, + + value = eval_flag(field_value); + +- PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_name)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(value)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_str)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(value)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_str)); + + try_call_object(handler_name, t); + +@@ -224,10 +254,10 @@ static void define_field(enum print_arg_type field_type, + if (!t) + Py_FatalError("couldn't create Python tuple"); + +- PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); + if (field_type == PRINT_FLAGS) +- PyTuple_SetItem(t, n++, PyString_FromString(delim)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(delim)); + + try_call_object(handler_name, t); + +@@ -326,12 +356,12 @@ static PyObject *get_field_numeric_entry(struct event_format *event, + if (field->flags & FIELD_IS_SIGNED) { + if ((long long)val >= LONG_MIN && + (long long)val <= LONG_MAX) +- obj = PyInt_FromLong(val); ++ obj = _PyLong_FromLong(val); + else + obj = PyLong_FromLongLong(val); + } else { + if (val <= LONG_MAX) +- obj = PyInt_FromLong(val); ++ obj = _PyLong_FromLong(val); + else + obj = PyLong_FromUnsignedLongLong(val); + } +@@ -390,9 +420,9 @@ static PyObject *python_process_callchain(struct perf_sample *sample, + pydict_set_item_string_decref(pysym, "end", + PyLong_FromUnsignedLongLong(node->sym->end)); + pydict_set_item_string_decref(pysym, "binding", +- PyInt_FromLong(node->sym->binding)); ++ _PyLong_FromLong(node->sym->binding)); + pydict_set_item_string_decref(pysym, "name", +- PyString_FromStringAndSize(node->sym->name, ++ _PyUnicode_FromStringAndSize(node->sym->name, + node->sym->namelen)); + pydict_set_item_string_decref(pyelem, "sym", pysym); + } +@@ -407,7 +437,7 @@ static PyObject *python_process_callchain(struct perf_sample *sample, + dsoname = map->dso->name; + } + pydict_set_item_string_decref(pyelem, "dso", +- PyString_FromString(dsoname)); ++ _PyUnicode_FromString(dsoname)); + } + + callchain_cursor_advance(&callchain_cursor); +@@ -484,16 +514,16 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, + if (!dict_sample) + Py_FatalError("couldn't create Python dictionary"); + +- pydict_set_item_string_decref(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel))); +- pydict_set_item_string_decref(dict, "attr", PyString_FromStringAndSize( ++ pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(perf_evsel__name(evsel))); ++ pydict_set_item_string_decref(dict, "attr", _PyUnicode_FromStringAndSize( + (const char *)&evsel->attr, sizeof(evsel->attr))); + + pydict_set_item_string_decref(dict_sample, "pid", +- PyInt_FromLong(sample->pid)); ++ _PyLong_FromLong(sample->pid)); + pydict_set_item_string_decref(dict_sample, "tid", +- PyInt_FromLong(sample->tid)); ++ _PyLong_FromLong(sample->tid)); + pydict_set_item_string_decref(dict_sample, "cpu", +- PyInt_FromLong(sample->cpu)); ++ _PyLong_FromLong(sample->cpu)); + pydict_set_item_string_decref(dict_sample, "ip", + PyLong_FromUnsignedLongLong(sample->ip)); + pydict_set_item_string_decref(dict_sample, "time", +@@ -503,17 +533,17 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, + set_sample_read_in_dict(dict_sample, sample, evsel); + pydict_set_item_string_decref(dict, "sample", dict_sample); + +- pydict_set_item_string_decref(dict, "raw_buf", PyString_FromStringAndSize( ++ pydict_set_item_string_decref(dict, "raw_buf", _PyBytes_FromStringAndSize( + (const char *)sample->raw_data, sample->raw_size)); + pydict_set_item_string_decref(dict, "comm", +- PyString_FromString(thread__comm_str(al->thread))); ++ _PyUnicode_FromString(thread__comm_str(al->thread))); + if (al->map) { + pydict_set_item_string_decref(dict, "dso", +- PyString_FromString(al->map->dso->name)); ++ _PyUnicode_FromString(al->map->dso->name)); + } + if (al->sym) { + pydict_set_item_string_decref(dict, "symbol", +- PyString_FromString(al->sym->name)); ++ _PyUnicode_FromString(al->sym->name)); + } + + pydict_set_item_string_decref(dict, "callchain", callchain); +@@ -573,9 +603,9 @@ static void python_process_tracepoint(struct perf_sample *sample, + scripting_context->event_data = data; + scripting_context->pevent = evsel->tp_format->pevent; + +- context = PyCObject_FromVoidPtr(scripting_context, NULL); ++ context = _PyCapsule_New(scripting_context, NULL, NULL); + +- PyTuple_SetItem(t, n++, PyString_FromString(handler_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(handler_name)); + PyTuple_SetItem(t, n++, context); + + /* ip unwinding */ +@@ -584,18 +614,18 @@ static void python_process_tracepoint(struct perf_sample *sample, + Py_INCREF(callchain); + + if (!dict) { +- PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(s)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(ns)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(pid)); +- PyTuple_SetItem(t, n++, PyString_FromString(comm)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(s)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(ns)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(pid)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(comm)); + PyTuple_SetItem(t, n++, callchain); + } else { +- pydict_set_item_string_decref(dict, "common_cpu", PyInt_FromLong(cpu)); +- pydict_set_item_string_decref(dict, "common_s", PyInt_FromLong(s)); +- pydict_set_item_string_decref(dict, "common_ns", PyInt_FromLong(ns)); +- pydict_set_item_string_decref(dict, "common_pid", PyInt_FromLong(pid)); +- pydict_set_item_string_decref(dict, "common_comm", PyString_FromString(comm)); ++ pydict_set_item_string_decref(dict, "common_cpu", _PyLong_FromLong(cpu)); ++ pydict_set_item_string_decref(dict, "common_s", _PyLong_FromLong(s)); ++ pydict_set_item_string_decref(dict, "common_ns", _PyLong_FromLong(ns)); ++ pydict_set_item_string_decref(dict, "common_pid", _PyLong_FromLong(pid)); ++ pydict_set_item_string_decref(dict, "common_comm", _PyUnicode_FromString(comm)); + pydict_set_item_string_decref(dict, "common_callchain", callchain); + } + for (field = event->format.fields; field; field = field->next) { +@@ -614,7 +644,7 @@ static void python_process_tracepoint(struct perf_sample *sample, + } + if (field->flags & FIELD_IS_STRING && + is_printable_array(data + offset, len)) { +- obj = PyString_FromString((char *) data + offset); ++ obj = _PyUnicode_FromString((char *) data + offset); + } else { + obj = PyByteArray_FromStringAndSize((const char *) data + offset, len); + field->flags &= ~FIELD_IS_STRING; +@@ -664,7 +694,7 @@ static PyObject *tuple_new(unsigned int sz) + static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) + { + #if BITS_PER_LONG == 64 +- return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); ++ return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); + #endif + #if BITS_PER_LONG == 32 + return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); +@@ -673,12 +703,12 @@ static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) + + static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) + { +- return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); ++ return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); + } + + static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) + { +- return PyTuple_SetItem(t, pos, PyString_FromString(s)); ++ return PyTuple_SetItem(t, pos, _PyUnicode_FromString(s)); + } + + static int python_export_evsel(struct db_export *dbe, struct perf_evsel *evsel) +@@ -1024,8 +1054,8 @@ process_stat(struct perf_evsel *counter, int cpu, int thread, u64 tstamp, + return; + } + +- PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(thread)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(thread)); + + tuple_set_u64(t, n++, tstamp); + tuple_set_u64(t, n++, count->val); +@@ -1207,27 +1237,58 @@ static void set_table_handlers(struct tables *tables) + SET_TABLE_HANDLER(call_return); + } + ++#if PY_MAJOR_VERSION < 3 ++static void _free_command_line(const char **command_line, int num) ++{ ++ free(command_line); ++} ++#else ++static void _free_command_line(wchar_t **command_line, int num) ++{ ++ int i; ++ for (i = 0; i < num; i++) ++ PyMem_RawFree(command_line[i]); ++ free(command_line); ++} ++#endif ++ ++ + /* + * Start trace script + */ + static int python_start_script(const char *script, int argc, const char **argv) + { + struct tables *tables = &tables_global; ++#if PY_MAJOR_VERSION < 3 + const char **command_line; ++#else ++ wchar_t **command_line; ++#endif + char buf[PATH_MAX]; + int i, err = 0; + FILE *fp; + ++#if PY_MAJOR_VERSION < 3 + command_line = malloc((argc + 1) * sizeof(const char *)); + command_line[0] = script; + for (i = 1; i < argc + 1; i++) + command_line[i] = argv[i - 1]; ++#else ++ command_line = malloc((argc + 1) * sizeof(wchar_t *)); ++ command_line[0] = Py_DecodeLocale(script, NULL); ++ for (i = 1; i < argc + 1; i++) ++ command_line[i] = Py_DecodeLocale(argv[i - 1], NULL); ++#endif + + Py_Initialize(); + ++#if PY_MAJOR_VERSION < 3 + initperf_trace_context(); +- + PySys_SetArgv(argc + 1, (char **)command_line); ++#else ++ PyInit_perf_trace_context(); ++ PySys_SetArgv(argc + 1, command_line); ++#endif + + fp = fopen(script, "r"); + if (!fp) { +@@ -1257,12 +1318,12 @@ static int python_start_script(const char *script, int argc, const char **argv) + goto error; + } + +- free(command_line); ++ _free_command_line(command_line, argc + 1); + + return err; + error: + Py_Finalize(); +- free(command_line); ++ _free_command_line(command_line, argc + 1); + + return err; + } +diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py +index 23f1bf175179..a5f9e236cc71 100644 +--- a/tools/perf/util/setup.py ++++ b/tools/perf/util/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python + + from os import getenv + +@@ -37,11 +37,11 @@ build_tmp = getenv('PYTHON_EXTBUILD_TMP') + libtraceevent = getenv('LIBTRACEEVENT') + libapikfs = getenv('LIBAPI') + +-ext_sources = [f.strip() for f in file('util/python-ext-sources') ++ext_sources = [f.strip() for f in open('util/python-ext-sources') + if len(f.strip()) > 0 and f[0] != '#'] + + # use full paths with source files +-ext_sources = map(lambda x: '%s/%s' % (src_perf, x) , ext_sources) ++ext_sources = list(map(lambda x: '%s/%s' % (src_perf, x) , ext_sources)) + + perf = Extension('perf', + sources = ext_sources, +-- +2.17.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch new file mode 100644 index 00000000..8c0a2af7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch @@ -0,0 +1,27 @@ +From 1cdbf4ed4717eefa2b6237c1e63e351b62990522 Mon Sep 17 00:00:00 2001 +From: Dien Pham +Date: Fri, 23 Feb 2018 18:29:32 +0700 +Subject: [PATCH] rpmsg: Add message to be able to configure RPMSG_VIRTIO from + defconfig + +Signed-off-by: Dien Pham +--- + drivers/rpmsg/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/rpmsg/Kconfig b/drivers/rpmsg/Kconfig +index 0fe6eac..5b1e61b 100644 +--- a/drivers/rpmsg/Kconfig ++++ b/drivers/rpmsg/Kconfig +@@ -47,7 +47,7 @@ config RPMSG_QCOM_SMD + platforms. + + config RPMSG_VIRTIO +- tristate ++ tristate "Enable remote processor message and virtual I/O configure" + select RPMSG + select VIRTIO + +-- +1.9.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch new file mode 100644 index 00000000..14719fba --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-ADSP-add-ADSP-sound-driver-source.patch @@ -0,0 +1,7204 @@ +From 829c17a722611c39cda6926f0fac46fa586c70ef Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Mon, 17 Jun 2019 17:04:02 +0700 +Subject: [PATCH 2/6] ADSP: add ADSP sound driver source + +Signed-off-by: tienphitran + +diff --git a/include/adsp_drv/xf-adsp-drv-ext.h b/include/adsp_drv/xf-adsp-drv-ext.h +new file mode 100644 +index 0000000..6c3dbc0 +--- /dev/null ++++ b/include/adsp_drv/xf-adsp-drv-ext.h +@@ -0,0 +1,58 @@ ++/***************************************************************************** ++ * \file xf-adsp-driver-ext.h ++ * \brief Header file for ADSP driver extension part ++ * \addtogroup ADSP Driver ++ ****************************************************************************** ++ * \date Oct. 21, 2017 ++ * \author Renesas Electronics Corporation ++ ****************************************************************************** ++ * \par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_DRV_EXT_H ++#define __XF_ADSP_DRV_EXT_H ++ ++/*********************************************************** ++ * Extension client APIs ++ * ********************************************************/ ++ ++struct xf_adsp_base_cmd { ++ /* register new client for ADSP base control */ ++ int (*client_register)(void **private_data); ++ /* unregister client */ ++ int (*client_unregister)(void *private_data); ++ /* get data from proxy */ ++ int (*recv)(void *private_data, void *buf); ++ /* send data to proxy */ ++ int (*send)(void *private_data, void *buf); ++ /* wait the valid message in the response queue */ ++ int (*poll)(void *private_data, int *condition); ++}; ++ ++/* create ADSP base control data */ ++int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd); ++ ++/* destroy ADSP base control data */ ++int xf_adsp_base_destroy(void); ++ ++#endif +diff --git a/sound/soc/adsp/Kconfig b/sound/soc/adsp/Kconfig +new file mode 100644 +index 0000000..605261f +--- /dev/null ++++ b/sound/soc/adsp/Kconfig +@@ -0,0 +1,14 @@ ++## SoC for ADSP driver configuration ++menu "ASoC ADSP driver" ++ ++config SND_SOC_ADSP ++ tristate "SoC Audio for R-Car ADSP" ++ select SND_SIMPLE_CARD ++ select SND_SIMPLE_SCU_CARD ++ select SND_AUDIO_GRAPH_CARD ++ select SND_AUDIO_GRAPH_SCU_CARD ++ default y ++ help ++ This option enables ALSA ADSP sound supports ADSP module ++ ++endmenu +diff --git a/sound/soc/adsp/Makefile b/sound/soc/adsp/Makefile +new file mode 100644 +index 0000000..8277fdb +--- /dev/null ++++ b/sound/soc/adsp/Makefile +@@ -0,0 +1,3 @@ ++## Makefile for SoC ADSP driver ++snd-soc-adsp-objs := xf-adsp-alsa.o xf-adsp-base.o ++obj-$(CONFIG_SND_SOC_ADSP) += snd-soc-adsp.o +diff --git a/sound/soc/adsp/xf-adsp-alsa.c b/sound/soc/adsp/xf-adsp-alsa.c +new file mode 100644 +index 0000000..493ff84 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-alsa.c +@@ -0,0 +1,3939 @@ ++/** *************************************************************************** ++ * \file xf-adsp-alsa.c ++ * \brief Source file for ADSP ALSA Driver ++ * \addtogroup ADSP Driver ++ ****************************************************************************** ++ * \date Oct. 21, 2017 ++ * \author Renesas Electronics Corporation ++ ****************************************************************************** ++ * \par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ *****************************************************************************/ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "xf-adsp-base.h" ++ ++/* Name of Volume control for playback */ ++#define PLAYBACK_VOLUME_CTR_NAME "PlaybackVolume" ++ ++/* Name of Volume control for capture */ ++#define CAPTURE_VOLUME_CTR_NAME "CaptureVolume" ++ ++/* Name of Sample Rate control for playback */ ++#define PLAYBACK_OUT_RATE_CTR_NAME "PlaybackOutRate" ++ ++/* Name of Output Channel control for playback */ ++#define PLAYBACK_OUT_CHANNEL_CTR_NAME "PlaybackOutChannel" ++ ++/* Name of Sample Rate control for capture */ ++#define CAPTURE_IN_RATE_CTR_NAME "CaptureInRate" ++ ++/* Name of Equalizer parameters control for playback */ ++#define PLAYBACK_EQZ_CTR_NAME "PlaybackEQZControl" ++ ++/* Name of Equalizer parameters control for capture */ ++#define CAPTURE_EQZ_CTR_NAME "CaptureEQZControl" ++ ++/* Name of Equalizer Switch control for playback */ ++#define PLAYBACK_EQZ_SWITCH_CTR_NAME "PlaybackEQZSwitch" ++ ++/* Name of Equalizer Switch control for capture */ ++#define CAPTURE_EQZ_SWITCH_CTR_NAME "CaptureEQZSwitch" ++ ++/* Name of Volume control for TDM playback */ ++#define TDM_PLAYBACK_VOLUME_CTR_NAME "TDMPlaybackVolume" ++ ++/* Name of Volume control for TDM capture */ ++#define TDM_CAPTURE_VOLUME_CTR_NAME "TDMCaptureVolume" ++ ++/* Name of Sample Rate control for TDM playback */ ++#define TDM_PLAYBACK_OUT_RATE_CTR_NAME "TDMPlaybackOutRate" ++ ++/* Name of Sample Rate control for TDM capture */ ++#define TDM_CAPTURE_IN_RATE_CTR_NAME "TDMCaptureInRate" ++ ++/* Prefix of Playback control name */ ++#define PREFIX_OF_PLAYBACK_CTR_NAME PLAYBACK_VOLUME_CTR_NAME[0] ++ ++/* Prefix of Capture control name */ ++#define PREFIX_OF_CAPTURE_CTR_NAME CAPTURE_VOLUME_CTR_NAME[0] ++ ++/* Prefix of TDM control name */ ++#define PREFIX_OF_TDM_CTR_NAME TDM_PLAYBACK_VOLUME_CTR_NAME[0] ++ ++/* Prefix of TDM playback */ ++#define TDM_PLAYBACK TDM_PLAYBACK_VOLUME_CTR_NAME[3] ++ ++/* Prefix of TDM record */ ++#define TDM_CAPTURE TDM_CAPTURE_VOLUME_CTR_NAME[3] ++ ++/* Number of control for playback & capture */ ++#define RDR_CONTROL_NUM (9) ++ ++/* Number of controls for TDM */ ++#define TDM_CONTROL_NUM (4) ++ ++/* Indicate playback stream */ ++#define DIRECT_PLAYBACK (0) ++ ++/* Indicate capture stream */ ++#define DIRECT_CAPTURE (1) ++ ++/* Indicate stream number */ ++#define DIRECT_NUM (2) ++ ++/* Supported frame size for playback/record function in driver */ ++#define FRAME_SIZE (1024) ++ ++/* Supported frame size for TDM playback/record function in driver */ ++#define TDM_FRAME_SIZE (1024) ++ ++/* Supported sample rate in driver */ ++#define SND_ADSP_SAMPLE_RATES (SNDRV_PCM_RATE_32000 | \ ++ SNDRV_PCM_RATE_44100 | \ ++ SNDRV_PCM_RATE_48000) ++ ++/* Supported PCM width in driver */ ++#define SND_ADSP_PCM_WIDTHS (SNDRV_PCM_FMTBIT_S16_LE | \ ++ SNDRV_PCM_FMTBIT_S24_LE) ++ ++/* Macro to control DAI index */ ++/* DAI 0 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX0 (0) ++ ++/* DAI 1 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX1 (1) ++ ++/* DAI 2 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX2 (2) ++ ++/* DAI 3 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX3 (3) ++ ++/* DAI 4 index for playback/record functions of TDM formats */ ++#define TDM_DAI_IDX (4) ++ ++/* Maximum number of DAI supported by driver */ ++#define MAX_DAI_IDX (5) ++ ++/* Renderer/Capture software information */ ++/* Minimum channel number supported */ ++#define MIN_CHANNEL (1) ++ ++/* Maximum channel number supported */ ++#define MAX_CHANNEL (2) ++ ++/* Minimum buffer size in byte */ ++#define MIN_BUF_SIZE (FRAME_SIZE * MIN_CHANNEL * 2) ++ ++/* Maximum buffer size in byte */ ++#define MAX_BUF_SIZE (FRAME_SIZE * MAX_CHANNEL * 4) ++ ++/* Minimum numbers of period in the buffer */ ++#define MIN_PERIOD (1) ++ ++/* Maximum numbers of period in the buffer */ ++#define MAX_PERIOD (4) ++ ++/* Maximun numbers of bytes in ALSA buffer */ ++#define MAX_BUFFER_BYTES (MAX_PERIOD * MAX_BUF_SIZE) ++ ++/* TDM software information */ ++/*< Minimum channel number supported in TDM plugin */ ++#define TDM_MIN_CHANNEL (6) ++ ++/* Maximum channel number supported in TDM plugin */ ++#define TDM_MAX_CHANNEL (8) ++ ++/* Minimum buffer size in byte for TDM format */ ++#define TDM_MIN_BUF_SIZE (TDM_FRAME_SIZE * TDM_MIN_CHANNEL * 2) ++ ++/* Maximum buffer size in byte for TDM format */ ++#define TDM_MAX_BUF_SIZE (TDM_FRAME_SIZE * TDM_MAX_CHANNEL * 4) ++ ++/* Minimum numbers of period in the buffer for TDM format */ ++#define TDM_MIN_PERIOD (1) ++ ++/* Maximum numbers of period in the buffer for TDM format */ ++#define TDM_MAX_PERIOD (4) ++ ++/* Maximum numbers of bytes in ALSA buffer for TDM format */ ++#define TDM_MAX_BUFFER_BYTES (TDM_MAX_PERIOD * TDM_MAX_BUF_SIZE) ++ ++/* Volume scale used when user set */ ++#define VOLUME_SCALE (100) ++ ++/* Maximum element in Equalizer parameter control */ ++#define MAX_EQZ_PARAM_NUMBER (55) ++ ++/* Equalizer control is disabled */ ++#define EQZ_OFF (0) ++ ++/* Equalizer control is enabled */ ++#define EQZ_ON (1) ++ ++/* Component status */ ++/* Handle state is NULL */ ++#define XF_HANDLE_NULL (0) ++ ++/* Handle state is CREATED after creating handle successfully */ ++#define XF_HANDLE_CREATED BIT(0) ++ ++/* Handle state is READY after finishing handle init */ ++#define XF_HANDLE_READY BIT(1) ++ ++/* channels */ ++/* Mono stream */ ++#define MONAURAL (1) ++ ++/* Stereo stream */ ++#define STEREO (2) ++ ++/* define number of bytes in a sample of 24 bits format types */ ++/* store 24 bits data in 4 bytes LE */ ++#define FMTBIT_S24_LE_BYTES_PER_SAMPLE (4) ++ ++/* store 24 bits data in 3 bytes LE */ ++#define FMTBIT_S24_3LE_BYTES_PER_SAMPLE (3) ++ ++/* helper macro to get bytes per sample number */ ++#define BYTES_PER_SAMPLE(fmt) (FMTBIT_##fmt##_BYTES_PER_SAMPLE) ++ ++/* check component is created */ ++#define COMPONENT_IS_CREATED(n) (((n & XF_HANDLE_CREATED) != 0) ? TRUE : FALSE) ++ ++/* check component is ready */ ++#define COMPONENT_IS_READY(n) (((n & XF_HANDLE_READY) != 0) ? TRUE : FALSE) ++ ++/* indicator of stream order */ ++#define MIX_UNUSED (0) ++#define FIRST_RUN (2) ++#define SECOND_RUN (1) ++ ++/* check MIX usage */ ++#define MIX_ENABLED(mix_ctl) ((mix_ctl == SECOND_RUN) ? TRUE : FALSE) ++ ++/******************************************************************* ++ * base structures for ADSP ALSA driver ++ * ****************************************************************/ ++ ++/** \struct snd_adsp_control ++ * \brief Structure stores parameters from user ++ */ ++struct snd_adsp_control { ++ /* Volume rate for playback/record */ ++ int vol_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Volume rate for TDM playback/TDM record */ ++ int tdm_vol_rate[DIRECT_NUM]; ++ ++ /* Out sample rate with Renderer, in sample rate with Capture */ ++ int sample_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Out sample rate for TDM Renderer, in sample rate for TDM Capture */ ++ int tdm_sample_rate[DIRECT_NUM]; ++ ++ /* Output channel of playback */ ++ int rdr_out_ch[MAX_DAI_IDX - 1]; ++ ++ /* Equalizer parameters */ ++ struct xf_adsp_equalizer_params eqz_params[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Equalizer switch */ ++ int eqz_switch[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Indicator of MIX usage */ ++ int mix_usage; ++}; ++ ++/** \struct snd_adsp_base_info ++ * \brief Structure stores some base information of a stream ++ */ ++struct snd_adsp_base_info { ++ /* high resolution timer data */ ++ struct hrtimer hrtimer; ++ ++ /* kernel time value in nanosecond */ ++ ktime_t ktime; ++ ++ /* save interrupt state before getting lock */ ++ unsigned long flag; ++ ++ /* high resolution timer state */ ++ int hrt_state; ++ ++ /* target handle id of ALSA driver */ ++ int handle_id; ++ ++ /* data buffer */ ++ char *buffer[XF_BUF_POOL_SIZE]; ++ ++ /* size of each allocated data buffer */ ++ int buf_bytes; ++ ++ /* data index of buffer */ ++ int buf_idx; ++ ++ /* queue index of buffer */ ++ int buf_queue; ++ ++ /* HW index in bytes */ ++ int hw_idx; ++ ++ /* number of bytes in a period */ ++ int period_bytes; ++ ++ /* substream runtime object */ ++ struct snd_pcm_substream *substream; ++ ++ /* indirect PCM data transfer */ ++ struct snd_pcm_indirect pcm_indirect; ++ ++ /* spinlock data */ ++ spinlock_t lock; ++ ++ /* runtime error indicator */ ++ int runtime_err; ++}; ++ ++/** \struct snd_adsp_playback ++ * \brief Structure stores data for playback function ++ */ ++struct snd_adsp_playback { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* Renderer component data */ ++ struct xf_adsp_renderer *renderer; ++ ++ /* Equalizer component data */ ++ struct xf_adsp_equalizer *equalizer; ++ ++ /* Renderer component state */ ++ int rdr_state; ++ ++ /* Equalizer component state */ ++ int eqz_state; ++}; ++ ++/** \struct snd_adsp_record ++ * \brief Structure stores data for record function ++ */ ++struct snd_adsp_record { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* Capture component data */ ++ struct xf_adsp_capture *capture; ++ ++ /* Equalizer component data */ ++ struct xf_adsp_equalizer *equalizer; ++ ++ /* Capture component state */ ++ int cap_state; ++ ++ /* Equalizer component state */ ++ int eqz_state; ++}; ++ ++/** \struct snd_adsp_tdm_playback ++ * \brief Structure stores data for TDM playback function ++ */ ++struct snd_adsp_tdm_playback { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* TDM Renderer component data */ ++ struct xf_adsp_tdm_renderer *tdm_renderer; ++ ++ /* TDM Renderer component state */ ++ int state; ++}; ++ ++/** \struct snd_adsp_tdm_record ++ * \brief Structure stores data for TDM record function ++ */ ++struct snd_adsp_tdm_record { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* TDM Capture component data */ ++ struct xf_adsp_tdm_capture *tdm_capture; ++ ++ /* TDM Capture component state */ ++ int state; ++}; ++ ++/** \struct snd_adsp_card ++ * \brief Structure stores data for ALSA sound card ++ */ ++struct snd_adsp_card { ++ /* playback data */ ++ struct snd_adsp_playback *playback[MAX_DAI_IDX - 1]; ++ ++ /* record data */ ++ struct snd_adsp_record *record[MAX_DAI_IDX - 1]; ++ ++ /* TDM playback data */ ++ struct snd_adsp_tdm_playback *tdm_playback; ++ ++ /* TDM record data */ ++ struct snd_adsp_tdm_record *tdm_record; ++ ++ /* Structure contains params information for control */ ++ struct snd_adsp_control ctr_if; ++}; ++ ++/** HW configuration of ALSA ADSP card for Renderer/Capture */ ++static struct snd_pcm_hardware snd_pcm_adsp_hw = { ++ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ ++ | SNDRV_PCM_INFO_RESUME ++ | SNDRV_PCM_INFO_BLOCK_TRANSFER ++ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), ++ .formats = SND_ADSP_PCM_WIDTHS, ++ .rates = SND_ADSP_SAMPLE_RATES, ++ .rate_min = 32000, ++ .rate_max = 48000, ++ .channels_min = MIN_CHANNEL, ++ .channels_max = MAX_CHANNEL, ++ ++ /* maximum buffer size in bytes */ ++ .buffer_bytes_max = MAX_BUFFER_BYTES, ++ ++ /* minimum size of the periods (frame) in bytes */ ++ .period_bytes_min = MIN_BUF_SIZE, ++ ++ /* maximum size of the periods (frame) in bytes */ ++ .period_bytes_max = MAX_BUF_SIZE, ++ ++ /* minimum periods (frames) in a buffer */ ++ .periods_min = MIN_PERIOD, ++ ++ /* maximum periods (frames) in a buffer */ ++ .periods_max = MAX_PERIOD, ++}; ++ ++/* HW configuration of ALSA ADSP card for TDM */ ++static struct snd_pcm_hardware snd_pcm_adsp_tdm_hw = { ++ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ ++ | SNDRV_PCM_INFO_RESUME ++ | SNDRV_PCM_INFO_BLOCK_TRANSFER ++ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), ++ .formats = SND_ADSP_PCM_WIDTHS, ++ .rates = SND_ADSP_SAMPLE_RATES, ++ .rate_min = 32000, ++ .rate_max = 48000, ++ .channels_min = TDM_MIN_CHANNEL, ++ .channels_max = TDM_MAX_CHANNEL, ++ ++ /* maximum buffer size in bytes */ ++ .buffer_bytes_max = TDM_MAX_BUFFER_BYTES, ++ ++ /* minimum size of the periods (frame) in bytes */ ++ .period_bytes_min = TDM_MIN_BUF_SIZE, ++ ++ /* maximum size of the periods (frame) in bytes */ ++ .period_bytes_max = TDM_MAX_BUF_SIZE, ++ ++ /* minimum periods (frames) in a buffer */ ++ .periods_min = TDM_MIN_PERIOD, ++ ++ /* maximum periods (frames) in a buffer */ ++ .periods_max = TDM_MAX_PERIOD, ++}; ++ ++/******************************************************************* ++ * function declaration ++ * ****************************************************************/ ++ ++static int ++snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream); ++static void * ++snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream); ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream); ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_hrt(struct hrtimer *hrt); ++static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt); ++static int snd_adsp_playback_init(struct snd_adsp_playback **data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_record_init(struct snd_adsp_record **data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_record_prepare(struct snd_adsp_record *record, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback); ++static int snd_adsp_record_deinit(struct snd_adsp_record *record); ++static int snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **data, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **data, ++ struct snd_pcm_substream *substream); ++static int ++snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, ++ struct snd_pcm_substream *substream); ++static int ++snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback); ++static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record); ++static int snd_adsp_pcm_open(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_close(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *hw_params); ++static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx); ++static snd_pcm_uframes_t ++snd_adsp_pcm_pointer(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream); ++static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, ++ struct snd_pcm_indirect *rec, size_t bytes); ++static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int ++snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int ++snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static void snd_adsp_get_eqz_params_from_control( ++ struct xf_adsp_equalizer_params *eqz_params, ++ struct xf_adsp_equalizer_params *eqz_ctr_params, ++ bool flag); ++static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime); ++static int snd_adsp_probe(struct platform_device *pdev); ++static int snd_adsp_remove(struct platform_device *pdev); ++ ++/******************************************************************* ++ * callback function of ADSP control interface ++ * ****************************************************************/ ++/** ************************************************************************** ++ * \brief event handler callback to notify error from ADSP ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_event_handler(void *data) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) ++ base->runtime_err = TRUE; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief empty buf done callback for playback/TDM playback functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->buf_queue++; ++ base->hw_idx += length; /* increase the DMA buffer index */ ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief fill buf done callback for playback/TDM playback functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief empty buf done callback for record/TDM record functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief fill buf done callback for record/TDM record functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->buf_queue++; ++ base->hw_idx += length; /* increase the DMA buffer index */ ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ return 0; ++} ++ ++/** callback functions for playback/TDM playback */ ++static struct xf_callback_func rdr_callbacks = /* PRQA S 3218 */ ++{ ++ .empty_buf_done = &snd_adsp_rdr_empty_buf_done, /* PRQA S 1053 2 */ ++ .fill_buf_done = &snd_adsp_rdr_fill_buf_done, ++ .event_handler = &snd_adsp_event_handler ++}; ++ ++/** callback functions for record/TDM record */ ++static struct xf_callback_func cap_callbacks = /* PRQA S 3218 */ ++{ ++ .empty_buf_done = &snd_adsp_cap_empty_buf_done, /* PRQA S 1053 2 */ ++ .fill_buf_done = &snd_adsp_cap_fill_buf_done, ++ .event_handler = &snd_adsp_event_handler ++}; ++ ++/******************************************************************* ++ * helper functions to get some internal data ++ * ****************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Get current index of CPU DAI from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval id Index of current CPU DAI ++ *****************************************************************************/ ++static int ++snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd; ++ ++ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; ++ return rtd->cpu_dai->id; ++} ++ ++/** ************************************************************************** ++ * \brief Get ADSP ALSA driver's data from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval pointer Pointer to driver's data ++ *****************************************************************************/ ++static void * ++snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd; ++ ++ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; ++ return snd_soc_dai_get_drvdata(rtd->cpu_dai); ++} ++ ++/** ************************************************************************** ++ * \brief Get base's data of playback/record from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval pointer Pointer to playback/record's base data ++ *****************************************************************************/ ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ struct snd_adsp_base_info *base; ++ int dai_idx; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ++ /* get DAI index of substream */ ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ++ /* get base data of the substream */ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ base = !adsp_card->playback[dai_idx] ? ++ NULL : &adsp_card->playback[dai_idx]->base; ++ } else { ++ base = !adsp_card->record[dai_idx] ? ++ NULL : &adsp_card->record[dai_idx]->base; ++ } ++ } else { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ base = !adsp_card->tdm_playback ? ++ NULL : &adsp_card->tdm_playback->base; ++ } else { ++ base = !adsp_card->tdm_record ? ++ NULL : &adsp_card->tdm_record->base; ++ } ++ } ++ ++ return base; ++} ++ ++/** *************************************************************************** ++ * \brief Get playback/record/TDM playback/TDM record's base data ++ * from hr timer data ++ * ++ * \param[in] hrt Pointer to hr timer data ++ * \retval pointer Pointer to playback/record's base data ++ *****************************************************************************/ ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_hrt(struct hrtimer *hrt) ++{ ++ return (struct snd_adsp_base_info *)hrt; ++} ++ ++/***************************************************************************** ++ * hrtimer interrupt function ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Interrupt function of high resolution timer ++ * ++ * \param[in] hrt Pointer to hr timer data ++ * \retval HRTIMER_RESTART Restart the timer after expire time ++ *****************************************************************************/ ++static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt) ++{ ++ struct snd_adsp_base_info *base = snd_adsp_get_base_from_hrt(hrt); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ if (base->hw_idx != 0) { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ /* update PCM status for the next period */ ++ snd_pcm_period_elapsed(base->substream); ++ } else { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ hrtimer_forward_now(hrt, base->ktime); ++ ++ return HRTIMER_RESTART; ++} ++ ++/***************************************************************************** ++ * internal functions to manage playback and record functions ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Initialize playback data ++ * ++ * \param[out] playback_data Pointer to store playback data ++ * \param[in] eqz_flag Flag to indicate equalizer usage ++ * \param[in] substream Pointer to substream data ++ * \retval EINVAL Failed to initialize playback data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_init(struct snd_adsp_playback **playback_data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_playback *playback; ++ ++ /* allocate memory for playback data */ ++ playback = kmalloc(sizeof(*playback), GFP_KERNEL); ++ if (!playback) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(playback, 0, sizeof(struct snd_adsp_playback)); ++ ++ /* save the playback data */ ++ *playback_data = playback; ++ ++ /* set handle state as NULL state */ ++ playback->rdr_state = XF_HANDLE_NULL; ++ playback->eqz_state = XF_HANDLE_NULL; ++ playback->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register renderer component */ ++ if (xf_adsp_renderer_create(&playback->renderer, ++ &rdr_callbacks, ++ (void *)&playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark renderer component created */ ++ playback->rdr_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as renderer ID */ ++ playback->base.handle_id = playback->renderer->handle_id; ++ ++ if (eqz_flag == EQZ_ON) { ++ /* create equalizer component when equalizer is used */ ++ if (xf_adsp_equalizer_create(&playback->equalizer, ++ &rdr_callbacks, ++ (void *)&playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark equalizer component created */ ++ playback->eqz_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as equalizer ID */ ++ playback->base.handle_id = playback->equalizer->handle_id; ++ } ++ ++ /* init lock */ ++ spin_lock_init(&playback->base.lock); ++ ++ /* save the substream data */ ++ playback->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&playback->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ playback->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ playback->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Initialize record data ++ * ++ * \param[out] record_data Pointer to store record data ++ * \param[in] eqz_flag Flag to indicate equalizer usage ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize record data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_init(struct snd_adsp_record **record_data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_record *record; ++ ++ /* allocate memory for record data */ ++ record = kmalloc(sizeof(*record), GFP_KERNEL); ++ if (!record) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(record, 0, sizeof(struct snd_adsp_record)); ++ ++ /* save the record data */ ++ *record_data = record; ++ ++ /* set handle state as NULL state */ ++ record->cap_state = XF_HANDLE_NULL; ++ record->eqz_state = XF_HANDLE_NULL; ++ record->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register capture component */ ++ if (xf_adsp_capture_create(&record->capture, ++ &cap_callbacks, ++ (void *)&record->base) < 0) ++ return -EINVAL; ++ ++ /* mark capture component created */ ++ record->cap_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as capture ID */ ++ record->base.handle_id = record->capture->handle_id; ++ ++ /* create equalizer component in case of it being used */ ++ if (eqz_flag == EQZ_ON) { ++ if (xf_adsp_equalizer_create(&record->equalizer, ++ &cap_callbacks, ++ (void *)&record->base) < 0) ++ return -EINVAL; ++ ++ /* mark equalizer component created */ ++ record->eqz_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as equalizer ID */ ++ record->base.handle_id = record->equalizer->handle_id; ++ } ++ ++ /* init lock */ ++ spin_lock_init(&record->base.lock); ++ ++ /* save the substream data */ ++ record->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&record->base.hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ record->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ record->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare playback function ++ * ++ * \param[out] playback Pointer to playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, hw_buffer_size; ++ int out_rate; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_renderer *renderer; ++ struct xf_adsp_equalizer *equalizer; ++ struct snd_adsp_base_info *base; ++ int i; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ renderer = playback->renderer; ++ equalizer = playback->equalizer; ++ base = &playback->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ch = runtime->channels; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ vol_rate = ctr_if->vol_rate[DIRECT_PLAYBACK][dai_idx]; ++ out_rate = ctr_if->sample_rate[DIRECT_PLAYBACK][dai_idx]; ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = (base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* it should equal to a period size in bytes */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes; ++ ++ /* set parameters when Renderer is not ready */ ++ if (COMPONENT_IS_READY(playback->rdr_state) == FALSE) { ++ struct xf_adsp_renderer_params *params = &renderer->params; ++ ++ /* apply renderer parameters */ ++ params->in_rate = fs; ++ params->channel = ch; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ if (ctr_if->mix_usage == SECOND_RUN) ++ params->mix_ctrl = ctr_if->mix_usage; ++ else ++ params->mix_ctrl = MIX_UNUSED; ++ ++ /* set flow as ADSP->PDMA0->SRC0->PDMA1->SSI0 */ ++ params->dev1 = SRC0; ++ params->dev2 = SSI00; ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ ++ /* when MIX is enabled, change to DMAC transfer type to save */ ++ /* hw FIFO */ ++ if (MIX_ENABLED(params->mix_ctrl) == TRUE) ++ params->dma1 = ADMAC_CH01; ++ ++ /* set volume rate if it is set by user or default value */ ++ /* is 100% */ ++ if (vol_rate >= 0) ++ params->vol_rate = vol_rate; ++ else ++ params->vol_rate = (1 << 20); ++ ++ /* set output channel if it is set by user */ ++ if (ctr_if->rdr_out_ch[dai_idx] >= MONAURAL) ++ params->out_channel = ctr_if->rdr_out_ch[dai_idx]; ++ else ++ params->out_channel = params->channel; ++ ++ /* set sample rate output if it is set by user */ ++ if (out_rate >= 0) ++ params->out_rate = out_rate; ++ ++ /* set parameters to ADSP Renderer plugin */ ++ if (xf_adsp_renderer_set_params(renderer) != 0) ++ return -EINVAL; ++ ++ /* allocate buffer pool to prepare the execution */ ++ renderer->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(renderer->buf_pool)) /* PRQA S 306*/ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ renderer->buf_pool, i); ++ ++ base->buf_queue++; ++ memset(base->buffer[i], 0, base->buf_bytes); ++ } ++ ++ /* mark Renderer ready */ ++ playback->rdr_state |= XF_HANDLE_READY; ++ ++ /* set parameters for Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { ++ /* apply Equalizer parameter setting */ ++ equalizer->params.channel = ch; ++ equalizer->params.pcm_width = pcm_width; ++ equalizer->params.rate = fs; ++ ++ /* get equalizer parameters from control interface */ ++ /* data */ ++ snd_adsp_get_eqz_params_from_control( ++ &equalizer->params, ++ &ctr_if->eqz_params[DIRECT_PLAYBACK][dai_idx], ++ true); ++ ++ /* set parameters to Equalizer plugin */ ++ if (xf_adsp_equalizer_set_params(equalizer) != 0) ++ return -EINVAL; ++ ++ /* route Equalizer to Renderer */ ++ if (xf_adsp_route(equalizer->handle_id, ++ renderer->handle_id, ++ XF_BUF_POOL_SIZE, ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ /* mark Equalizer ready */ ++ playback->eqz_state |= XF_HANDLE_READY; ++ ++ /* prepare data before start PCM */ ++ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ /* send buffer to plugin to kick */ ++ /* init-processing */ ++ if (xf_adsp_empty_this_buffer( ++ base->handle_id, ++ base->buffer[i], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ } else { ++ /* send zero buffer to plugin to kick */ ++ /* init-processing */ ++ if (xf_adsp_empty_this_buffer(base->handle_id, ++ base->buffer[0], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ /* wait until all the buffer have been consummed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset HW index */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare record function ++ * ++ * \param[out] record Pointer to record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_prepare(struct snd_adsp_record *record, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, in_rate; ++ int hw_buffer_size, hw_queue_size; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_capture *capture; ++ struct xf_adsp_equalizer *equalizer; ++ struct snd_adsp_base_info *base; ++ int i; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ capture = record->capture; ++ equalizer = record->equalizer; ++ base = &record->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ch = runtime->channels; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ vol_rate = ctr_if->vol_rate[DIRECT_CAPTURE][dai_idx]; ++ in_rate = ctr_if->sample_rate[DIRECT_CAPTURE][dai_idx]; ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* total size of allocated buffers */ ++ hw_queue_size = base->period_bytes * XF_BUF_POOL_SIZE; ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ base->pcm_indirect.hw_queue_size = hw_queue_size; ++ ++ /* prepare parameters to set to Capture plugin when it is not yet */ ++ /* ready */ ++ if (COMPONENT_IS_READY(record->cap_state) == FALSE) { ++ struct xf_adsp_capture_params *params = &capture->params; ++ ++ /* apply capture parameters */ ++ params->out_rate = fs; ++ params->channel = ch; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ params->dev1 = SRC0; ++ params->dev2 = SSI10; ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ ++ /* set volume rate if it is set by user or default volume as */ ++ /* 100% */ ++ if (vol_rate >= 0) ++ params->vol_rate = vol_rate; ++ else ++ params->vol_rate = (1 << 20); ++ ++ /* set sample rate input if it is set by user */ ++ if (in_rate >= 0) ++ params->in_rate = in_rate; ++ ++ /* allocate buffer pool to prepare the execution */ ++ capture->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(capture->buf_pool)) /* PRQA S 306 */ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ capture->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* set parameters to ADSP Capture plugin */ ++ if (xf_adsp_capture_set_params(capture) != 0) ++ return -EINVAL; ++ ++ /* mark Capture ready */ ++ record->cap_state |= XF_HANDLE_READY; ++ ++ /* set parameters for Equalizer if it's used */ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ /* apply Equalizer parameter setting */ ++ equalizer->params.channel = ch; ++ equalizer->params.pcm_width = pcm_width; ++ equalizer->params.rate = fs; ++ ++ /* get equalizer parameter from control interface */ ++ /* data */ ++ snd_adsp_get_eqz_params_from_control( ++ &equalizer->params, ++ &ctr_if->eqz_params[DIRECT_CAPTURE][dai_idx], ++ true); ++ ++ /* set parameters to Equalizer plugin */ ++ if (xf_adsp_equalizer_set_params(equalizer) != 0) ++ return -EINVAL; ++ ++ /* route Capture to Equalizer */ ++ if (xf_adsp_route(capture->handle_id, ++ equalizer->handle_id, ++ XF_BUF_POOL_SIZE, ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ /* mark Equalizer ready */ ++ record->eqz_state |= XF_HANDLE_READY; ++ } ++ ++ /* kick init process by sending a zero buffer length */ ++ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until finishing initialization */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ /* send buffer to plugin */ ++ if (xf_adsp_fill_this_buffer( ++ base->handle_id, ++ base->buffer[i], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ /* wait until all the buffer have been responsed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ } ++ ++ /* reset hw data position */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize playback function ++ * ++ * \param[out] playback Pointer to playback data ++ * \retval -EINVAL Failed to deinitialize playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if playback has been created already */ ++ if (playback) { ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(playback->rdr_state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process *//* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(playback->base.handle_id, ++ NULL, 0); ++ ++ /* free buffer pool */ /* PRQA S 3200 1 */ ++ xf_adsp_free_mem_pool(playback->renderer->buf_pool); ++ ++ /* destroy Renderer */ ++ if (xf_adsp_renderer_destroy(playback->renderer) != 0) ++ ret = -EINVAL; ++ ++ playback->renderer = NULL; ++ } ++ ++ /* destroy Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { ++ if (xf_adsp_equalizer_destroy(playback->equalizer)) ++ ret = -EINVAL; ++ ++ playback->equalizer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(playback->base.hrt_state) == TRUE) ++ hrtimer_cancel(&playback->base.hrtimer); ++ ++ /* free playback data */ ++ kfree(playback); ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize record function ++ * ++ * \param[out] record Pointer to record data ++ * \retval -EINVAL Failed to deinitialize record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_deinit(struct snd_adsp_record *record) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if record has been created already */ ++ if (!record) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(record->cap_state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process *//* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(record->base.handle_id, NULL, 0); ++ ++ /* free buffer pool */ /* PRQA S 3200 1 */ ++ xf_adsp_free_mem_pool(record->capture->buf_pool); ++ ++ if (xf_adsp_capture_destroy(record->capture)) ++ ret = -EINVAL; ++ ++ record->capture = NULL; ++ } ++ ++ /* destroy Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ if (xf_adsp_equalizer_destroy(record->equalizer) != 0) ++ ret = -EINVAL; ++ ++ record->equalizer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(record->base.hrt_state) == TRUE) ++ hrtimer_cancel(&record->base.hrtimer); ++ ++ /* free record data */ ++ kfree(record); ++ ++ return ret; ++} ++ ++/***************************************************************************** ++ * internal functions to manage TDM playback and TDM record functions ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Initialize TDM playback data ++ * ++ * \param[out] tdm_playback_data Pointer to store TDM playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize TDM playback data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **tdm_playback_data, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_tdm_playback *tdm_playback; ++ ++ /* allocate memory for TDM playback data */ ++ tdm_playback = kmalloc(sizeof(*tdm_playback), GFP_KERNEL); ++ ++ if (!tdm_playback) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(tdm_playback, 0, sizeof(struct snd_adsp_tdm_playback)); ++ ++ /* save the TDM playback data */ ++ *tdm_playback_data = tdm_playback; ++ ++ /* set handle state as NULL state */ ++ tdm_playback->state = XF_HANDLE_NULL; ++ tdm_playback->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register TDM renderer component */ ++ if (xf_adsp_tdm_renderer_create(&tdm_playback->tdm_renderer, ++ &rdr_callbacks, ++ (void *)&tdm_playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark TDM renderer component created */ ++ tdm_playback->state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as TDM renderer ID */ ++ tdm_playback->base.handle_id = tdm_playback->tdm_renderer->handle_id; ++ ++ /* init lock */ ++ spin_lock_init(&tdm_playback->base.lock); ++ ++ /* save the substream data */ ++ tdm_playback->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&tdm_playback->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ tdm_playback->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ tdm_playback->base.hrt_state = XF_HANDLE_CREATED; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Initialize TDM record data ++ * ++ * \param[out] tdm_record_data Pointer to store TDM record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize TDM record data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **tdm_record_data, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_tdm_record *tdm_record; ++ ++ /* allocate memory for TDM record data */ ++ tdm_record = kmalloc(sizeof(*tdm_record), GFP_KERNEL); ++ if (!tdm_record) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(tdm_record, 0, sizeof(struct snd_adsp_tdm_record)); ++ ++ /* save the TDM record data */ ++ *tdm_record_data = tdm_record; ++ ++ /* set handle state as NULL state */ ++ tdm_record->state = XF_HANDLE_NULL; ++ tdm_record->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register TDM Capture component */ ++ if (xf_adsp_tdm_capture_create(&tdm_record->tdm_capture, ++ &cap_callbacks, ++ (void *)&tdm_record->base) != 0) ++ return -EINVAL; ++ ++ /* mark TDM capture component created */ ++ tdm_record->state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as TDM capture ID */ ++ tdm_record->base.handle_id = tdm_record->tdm_capture->handle_id; ++ ++ /* init lock */ ++ spin_lock_init(&tdm_record->base.lock); ++ ++ /* save the substream data */ ++ tdm_record->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&tdm_record->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ tdm_record->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ tdm_record->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare TDM playback function ++ * ++ * \param[out] tdm_playback Pointer to TDM playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare TDM playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_tdm_renderer *tdm_renderer; ++ struct snd_adsp_base_info *base; ++ int i; ++ int pcm_width, ch_mode, fs, frame_size, hw_buffer_size; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ tdm_renderer = tdm_playback->tdm_renderer; ++ base = &tdm_playback->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ ++ ch_mode = (runtime->channels == 8) ? ++ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; ++ ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* it should equal to a period size in bytes */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes; ++ ++ /* prepare parameters to set to TDM playback as it is not ready */ ++ if (COMPONENT_IS_READY(tdm_playback->state) == FALSE) { ++ struct xf_adsp_tdm_renderer_params *params; ++ ++ params = &tdm_renderer->params; ++ ++ /* apply renderer parameters */ ++ params->in_rate = fs; ++ params->ch_mode = ch_mode; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ /* setting Audio device indexes */ ++ params->dma1 = ADMAC_CH00; /* use DMAC for transfer data */ ++ params->dma2 = PDMA_CH03; ++ params->dev1 = SRC1; ++ params->dev2 = SSI30; /* set SSI index to SSI30 */ ++ ++ /* set volume rate if it is set by user or default value as */ ++ /* 100% */ ++ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] >= 0) ++ ? ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] : (1 << 20); ++ ++ /* set output sampling rate if it is set by user */ ++ if (ctr_if->tdm_sample_rate[DIRECT_PLAYBACK] >= 0) ++ params->out_rate = ++ ctr_if->tdm_sample_rate[DIRECT_PLAYBACK]; ++ ++ /* set parameters to ADSP TDM Renderer plugin */ ++ if (xf_adsp_tdm_renderer_set_params(tdm_renderer) != 0) ++ return -EINVAL; ++ ++ /* allocate buffer pool to prepare the execution */ ++ tdm_renderer->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(tdm_renderer->buf_pool)) /* PRQA S 306*/ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ tdm_renderer->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* mark TDM Renderer created */ ++ tdm_playback->state |= XF_HANDLE_READY; ++ ++ /* send zero buffer to plugin to kick init-processing */ ++ memset(base->buffer[0], 0, base->buf_bytes); ++ ++ if (xf_adsp_empty_this_buffer(base->handle_id, base->buffer[0], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until all the buffer have been consummed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset HW index */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare TDM record function ++ * ++ * \param[out] tdm_record Pointer to TDM record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare TDM record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card = ++ snd_adsp_get_drvdata_from_substream(substream); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct xf_adsp_tdm_capture *tdm_capture = tdm_record->tdm_capture; ++ struct snd_adsp_base_info *base = &tdm_record->base; ++ int i; ++ int pcm_width, ch_mode, fs, frame_size; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ++ ch_mode = (runtime->channels == 8) ? ++ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; ++ ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ base->buf_bytes = (pcm_width == 16) ? ++ base->period_bytes : ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / ++ BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* total size of allocated buffers */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes * ++ XF_BUF_POOL_SIZE; ++ ++ /* prepare parameters to set to TDM Capture as it is not yet ready */ ++ if (COMPONENT_IS_READY(tdm_record->state) == FALSE) { ++ struct xf_adsp_tdm_capture_params *params; ++ ++ params = &tdm_capture->params; ++ ++ /* apply capture parameters */ ++ params->out_rate = fs; ++ params->ch_mode = ch_mode; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ /* setting Audio device indexes */ ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ params->dev1 = SRC0; ++ params->dev2 = SSI40; /* set input device is SSI40 */ ++ ++ /* set volume rate if it is set by user or default value as */ ++ /* 100% */ ++ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_CAPTURE] >= 0) ++ ? ctr_if->tdm_vol_rate[DIRECT_CAPTURE] : (1 << 20); ++ ++ /* set input rate if it is set by user */ ++ if (ctr_if->tdm_sample_rate[DIRECT_CAPTURE] >= 0) { ++ params->in_rate = ++ ctr_if->tdm_sample_rate[DIRECT_CAPTURE]; ++ } ++ ++ /* allocate buffer pool to prepare the execution */ ++ tdm_capture->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(tdm_capture->buf_pool)) /* PRQA S 306 */ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ tdm_capture->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* set parameters to ADSP TDM Capture plugin */ ++ if (xf_adsp_tdm_capture_set_params(tdm_capture) != 0) ++ return -EINVAL; ++ ++ /* mark TDM Capture ready */ ++ tdm_record->state |= XF_HANDLE_READY; ++ ++ /* kick init process by sending a zero buffer length */ ++ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until finishing initialization */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset hw data position */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize TDM playback function ++ * ++ * \param[out] tdm_playback Pointer to TDM playback data ++ * \retval -EINVAL Failed to deinitialize TDM playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if TDM playback has been created */ ++ if (!tdm_playback) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(tdm_playback->state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process */ ++ /* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(tdm_playback->base.handle_id, ++ NULL, 0); ++ ++ /* free buffer pool *//* PRQA S 3200 2 */ ++ xf_adsp_free_mem_pool(tdm_playback->tdm_renderer->buf_pool); ++ ++ /* destroy TDM Renderer component */ ++ if (xf_adsp_tdm_renderer_destroy( ++ tdm_playback->tdm_renderer) != 0) ++ ret = -EINVAL; ++ ++ tdm_playback->tdm_renderer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(tdm_playback->base.hrt_state) == TRUE) ++ hrtimer_cancel(&tdm_playback->base.hrtimer); ++ ++ /* free playback data */ ++ kfree(tdm_playback); ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize TDM record function ++ * ++ * \param[out] tdm_record Pointer to TDM record data ++ * \retval -EINVAL Failed to deinitialize TDM record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if TDM record has been created already */ ++ if (!tdm_record) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(tdm_record->state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process */ ++ /* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(tdm_record->base.handle_id, NULL, 0); ++ ++ /* free buffer pool *//* PRQA S 3200 2 */ ++ xf_adsp_free_mem_pool(tdm_record->tdm_capture->buf_pool); ++ ++ /* destroy TDM Capture component */ ++ if (xf_adsp_tdm_capture_destroy(tdm_record->tdm_capture) != 0) ++ ret = -EINVAL; ++ ++ tdm_record->tdm_capture = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(tdm_record->base.hrt_state) == TRUE) ++ hrtimer_cancel(&tdm_record->base.hrtimer); ++ ++ /* free record data */ ++ kfree(tdm_record); ++ ++ return ret; ++} ++ ++/***************************************************************************** ++ * callback functions of ADSP ALSA driver ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Open a playback/TDM playback or record/TDM record stream ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_open(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ struct snd_adsp_control *ctr_if; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ /* register data for playback/record functions */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* perform playback initialization */ ++ if (snd_adsp_playback_init( ++ &adsp_card->playback[dai_idx], ++ ctr_if->eqz_switch[DIRECT_PLAYBACK][dai_idx], ++ substream) < 0) { ++ /* perform playback de-initialization when */ ++ /* the initialization fails */ ++ snd_adsp_playback_deinit( ++ adsp_card->playback[dai_idx]); ++ ++ adsp_card->playback[dai_idx] = NULL; ++ return -EINVAL; ++ } ++ } else { ++ /* perform record initialization */ ++ if (snd_adsp_record_init( ++ &adsp_card->record[dai_idx], ++ ctr_if->eqz_switch[DIRECT_CAPTURE][dai_idx], ++ substream) < 0) { ++ /* perform record de-initialization when the */ ++ /* initialization fails */ ++ snd_adsp_record_deinit( ++ adsp_card->record[dai_idx]); ++ ++ adsp_card->record[dai_idx] = NULL; ++ return -EINVAL; ++ } ++ } ++ ++ /* save the hardware parameters */ ++ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_hw); ++ ++ /* each period has a frame size */ ++ snd_pcm_hw_constraint_single(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, ++ FRAME_SIZE); ++ } else { ++ /* register data for TDM playback/record functions */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* perform TDM playback initialization */ ++ if (snd_adsp_tdm_playback_init( ++ &adsp_card->tdm_playback, ++ substream) < 0) { ++ /* perform TDM playback de-initialization */ ++ /* when the initialization fails */ ++ snd_adsp_tdm_playback_deinit( ++ adsp_card->tdm_playback); ++ ++ adsp_card->tdm_playback = NULL; ++ return -EINVAL; ++ } ++ } else { ++ /* perform TDM record initialization */ ++ if (snd_adsp_tdm_record_init(&adsp_card->tdm_record, ++ substream) < 0) { ++ /* perform TDM record de-initialization */ ++ /* when the initialization fails */ ++ snd_adsp_tdm_record_deinit( ++ adsp_card->tdm_record); ++ ++ adsp_card->tdm_record = NULL; ++ return -EINVAL; ++ } ++ } ++ ++ /* save the hardware parameters */ ++ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_tdm_hw); ++ ++ /* each period has a frame size */ ++ snd_pcm_hw_constraint_single(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, ++ TDM_FRAME_SIZE); ++ } ++ ++ snd_pcm_hw_constraint_integer(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS); ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Close a playback/TDM playback or record/TDM record stream ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_close(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card *adsp_card = ++ snd_adsp_get_drvdata_from_substream(substream); ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ int err = 0; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ /* destroy Renderer/Capture or Equalizer (if used) */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ if (snd_adsp_playback_deinit( ++ adsp_card->playback[dai_idx]) < 0) ++ err = -EINVAL; ++ ++ adsp_card->playback[dai_idx] = NULL; ++ } else { ++ if (snd_adsp_record_deinit( ++ adsp_card->record[dai_idx]) < 0) ++ err = -EINVAL; ++ ++ adsp_card->record[dai_idx] = NULL; ++ } ++ } else { ++ /* destroy TDM Renderer/TDM Capture */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ if (snd_adsp_tdm_playback_deinit( ++ adsp_card->tdm_playback) < 0) ++ err = -EINVAL; ++ ++ adsp_card->tdm_playback = NULL; ++ } else { ++ if (snd_adsp_tdm_record_deinit( ++ adsp_card->tdm_record) < 0) ++ err = -EINVAL; ++ ++ adsp_card->tdm_record = NULL; ++ } ++ } ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Allocate ALSA buffer and calculate expire time of hr timer ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -ENOMEM Cannot allocate ALSA buffer ++ *****************************************************************************/ ++static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *hw_params) ++{ ++ struct snd_adsp_base_info *base; ++ int err = 0; ++ ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ /* set expire time of hrtimer, this value should be time for */ ++ /* transfer a frame */ ++ base->ktime = ns_to_ktime((1000000000 / params_rate(hw_params)) * ++ params_period_size(hw_params)); ++ ++ err = snd_pcm_lib_malloc_pages(substream, ++ params_buffer_bytes(hw_params)); ++ ++ /* reset DMA buffer area */ ++ memset(substream->runtime->dma_area, 0, substream->runtime->dma_bytes); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Free the allocated ALSA buffer ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Cannot deallocate buffer ++ *****************************************************************************/ ++static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream) ++{ ++ return snd_pcm_lib_free_pages(substream); ++} ++ ++/** ************************************************************************** ++ * \brief Prepare playback/TDM playback or record/TDM record function ++ * before transferring data ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card * ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ int err = 0; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ /* get playback prepared to execute */ ++ err = snd_adsp_playback_prepare( ++ adsp_card->playback[dai_idx], substream); ++ else ++ /* get record prepared to execute */ ++ err = snd_adsp_record_prepare( ++ adsp_card->record[dai_idx], substream); ++ } else { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ /* get TDM playback prepared to execute */ ++ err = snd_adsp_tdm_playback_prepare( ++ adsp_card->tdm_playback, substream); ++ else ++ /* get TDM record prepared to execute */ ++ err = snd_adsp_tdm_record_prepare( ++ adsp_card->tdm_record, substream); ++ } ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Trigger playback/TDM playback or record/TDM record stream ++ * to go to next phase ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ switch (idx) { ++ case SNDRV_PCM_TRIGGER_START: ++ case SNDRV_PCM_TRIGGER_RESUME: ++ /* start high-resolution timer */ ++ hrtimer_start(&base->hrtimer, base->ktime, HRTIMER_MODE_REL); ++ ++ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { ++ int buf_queue = 0; ++ ++ /* get current available buffer */ ++ spin_lock_irqsave(&base->lock, base->flag); ++ buf_queue = base->buf_queue; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* send all available buffer to plugin to */ ++ /* get data */ ++ for (; buf_queue > 0; buf_queue--) { ++ if (xf_adsp_fill_this_buffer( ++ base->handle_id, ++ base->buffer[base->buf_idx], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ base->buf_idx++; ++ ++ if (base->buf_idx >= XF_BUF_POOL_SIZE) ++ base->buf_idx = 0; ++ } ++ } ++ break; ++ case SNDRV_PCM_TRIGGER_STOP: ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ break; ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Return HW data position ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval position HW data position ++ *****************************************************************************/ ++static snd_pcm_uframes_t ++snd_adsp_pcm_pointer(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ unsigned int hw_idx, hw_buffer_size; ++ snd_pcm_uframes_t pointer; ++ ++ /* convert hw index to correct as submitted bytes */ ++ spin_lock_irqsave(&base->lock, base->flag); ++ hw_idx = (base->hw_idx / base->buf_bytes) * base->period_bytes; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ hw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ if (hw_idx >= hw_buffer_size) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->hw_idx -= (hw_buffer_size / base->period_bytes) * ++ base->buf_bytes; ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ pointer = snd_pcm_indirect_playback_pointer(substream, ++ &base->pcm_indirect, ++ hw_idx); ++ else ++ pointer = snd_pcm_indirect_capture_pointer(substream, ++ &base->pcm_indirect, ++ hw_idx); ++ ++ return pointer; ++} ++ ++/** ************************************************************************** ++ * \brief Call read/write process to transfer data ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ if (base->runtime_err) ++ return -EINVAL; ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ snd_pcm_indirect_playback_transfer(substream, ++ &base->pcm_indirect, ++ snd_adsp_pcm_transfer); ++ else ++ snd_pcm_indirect_capture_transfer(substream, ++ &base->pcm_indirect, ++ snd_adsp_pcm_transfer); ++ ++ return 0; ++} ++ ++/** *************************************************************************** ++ * \brief Copy data from source buffer to destination buffer ++ * ++ * \params[in] dst Destination buffer pointer ++ * \params[out] src Source buffer pointer ++ * \params[in] dst_size Destination buffer size in byte ++ * \params[in] src_size Source buffer size in byte ++ * \retval None ++ *****************************************************************************/ ++static inline void ++snd_adsp_copy_data(void *dst, void *src, int dst_size, int src_size) ++{ ++ unsigned char *data_dst = dst; ++ unsigned char *data_src = src; ++ int i; ++ ++ if (dst_size == src_size) { ++ /* src and dst bufs are same size, does not need to convert */ ++ memcpy(data_dst, data_src, dst_size); ++ ++ } else if (dst_size < src_size) { ++ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_3LE)); ++ i += BYTES_PER_SAMPLE(S24_3LE)) { ++ *(u32 *)data_dst = *(u32 *)data_src; ++ ++ data_dst += BYTES_PER_SAMPLE(S24_3LE); ++ data_src += BYTES_PER_SAMPLE(S24_LE); ++ } ++ ++ /* copy a S24_3LE sample from S24_LE sample */ ++ data_dst[0] = data_src[0]; ++ data_dst[1] = data_src[1]; ++ data_dst[2] = data_src[2]; ++ ++ } else { ++ unsigned int tmp; ++ ++ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_LE)); ++ i += BYTES_PER_SAMPLE(S24_LE)) { ++ tmp = *(u32 *)data_src; ++ *(u32 *)data_dst = tmp & 0x0FFFFFF; ++ ++ data_dst += BYTES_PER_SAMPLE(S24_LE); ++ data_src += BYTES_PER_SAMPLE(S24_3LE); ++ } ++ ++ /* copy a S24_LE sample from S24_3LE sample */ ++ data_dst[0] = data_src[0]; ++ data_dst[1] = data_src[1]; ++ data_dst[2] = data_src[2]; ++ data_dst[3] = 0; ++ } ++} ++ ++/** ************************************************************************** ++ * \brief Transfer data process between ALSA buffer and ADSP buffer ++ * ++ * \param[in] substream Pointer to substream object ++ * \param[in] rec Pointer to indirect PCM data ++ * \param[in] bytes Number of byte need to be transferred ++ * \retval None ++ *****************************************************************************/ ++static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, ++ struct snd_pcm_indirect *rec, ++ size_t bytes) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ int direct = substream->stream; ++ int trans_bytes = bytes; ++ int buf_bytes, period_bytes; ++ void *dma_buf, *data_buff; ++ ++ /* get the DMA buffer pointer */ ++ dma_buf = (void *)(substream->runtime->dma_area + rec->sw_data); ++ ++ /* get information from base */ ++ buf_bytes = base->buf_bytes; ++ period_bytes = base->period_bytes; ++ ++ /* make sure the available buffer and transfer size - TBD */ ++ while (trans_bytes > 0) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ if (base->buf_queue > 0 && trans_bytes >= period_bytes) { ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* get the buffer pointer from stream */ ++ data_buff = base->buffer[base->buf_idx]; ++ ++ if (direct == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* copy data from user *//* PRQA S 3200 2 */ ++ snd_adsp_copy_data(data_buff, dma_buf, ++ buf_bytes, period_bytes); ++ ++ /* send buffer to plugin */ ++ if (xf_adsp_empty_this_buffer(base->handle_id, ++ data_buff, ++ buf_bytes) < 0) ++ base->runtime_err = TRUE; ++ } else { ++ /* copy data to user *//* PRQA S 3200 2 */ ++ snd_adsp_copy_data(dma_buf, data_buff, ++ period_bytes, buf_bytes); ++ ++ /* send buffer to plugin */ ++ if (xf_adsp_fill_this_buffer(base->handle_id, ++ data_buff, ++ buf_bytes) < 0) ++ base->runtime_err = TRUE; ++ } ++ ++ base->buf_idx++; ++ if (base->buf_idx >= XF_BUF_POOL_SIZE) ++ base->buf_idx = 0; ++ } else { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ break; ++ } ++ ++ trans_bytes -= period_bytes; ++ } ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Volume control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of volume control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 799; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get volume value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to volume value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ int handle_state, handle_id; ++ int volume, cmd_idx, direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine command index, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* get the volume's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get the volume's value from the plugin */ ++ if (xf_adsp_get_param(handle_id, cmd_idx, &volume) != 0) ++ return -EINVAL; ++ ++ /* check the value after getting it and adjust it */ ++ ucontrol->value.integer.value[0] = (volume == 0xFFFFFFFF) ? ++ (-1) : (volume * VOLUME_SCALE) >> 20; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ ucontrol->value.integer.value[0] = ++ (ctr_if->vol_rate[direction][index] * ++ VOLUME_SCALE) >> 20; ++ else ++ ucontrol->value.integer.value[0] = ++ (ctr_if->tdm_vol_rate[direction] * ++ VOLUME_SCALE) >> 20; ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set volume value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to volume value ++ * \retval 1 Volume change ++ * \retval 0 Volume does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1*/ ++static int ++snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ int volume; ++ int ret; ++ int handle_state, handle_id, cmd_idx, volume_get; ++ int direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state and handle ID */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* get the value to set */ ++ if (ucontrol->value.integer.value[0] == -1) { ++ volume = 0xFFFFFFFF; ++ } else { ++ /* round up the value if needed */ ++ volume = (ucontrol->value.integer.value[0] * (1 << 20)) / ++ VOLUME_SCALE; ++ ++ if ((ucontrol->value.integer.value[0] * (1 << 20)) > ++ (VOLUME_SCALE * volume)) ++ volume += 1; ++ } ++ ++ /* determine command index, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* set volume to plugin */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* TDM does not support set volume in runtime state */ ++ if (kcontrol->id.name[0] == PREFIX_OF_TDM_CTR_NAME) ++ return -EINVAL; ++ ++ /* apply set volume value to ADSP from user setting */ ++ if (xf_adsp_set_param(handle_id, cmd_idx, volume) != 0) ++ return -EINVAL; ++ ++ /* get volume from ADSP after setting to confirm */ ++ if (xf_adsp_get_param(handle_id, cmd_idx, &volume_get) != 0) ++ return -EINVAL; ++ ++ /* check if the value has changed */ ++ ret = (volume_get == volume) ? 1 : 0; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ ctr_if->vol_rate[direction][index] = volume; ++ else ++ ctr_if->tdm_vol_rate[direction] = volume; ++ ++ ret = 1; ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Sample Rate Converter control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of sample rate ++ * converter control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 48000; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get sample rate value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to sample rate value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int *rate; ++ int handle_id, handle_state, cmd_idx, direction; ++ unsigned int index; ++ ++ rate = (int *)&ucontrol->value.integer.value[0]; /* PRQA S 310 */ ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state and handle ID */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine command, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* get parameter from plugin */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ if (xf_adsp_get_param(handle_id, cmd_idx, rate) != 0) ++ return -EINVAL; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ *rate = adsp_card->ctr_if.sample_rate[direction][index]; ++ else ++ *rate = adsp_card->ctr_if.tdm_sample_rate[direction]; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set sample rate value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to sample rate value ++ * \retval 1 Sample rate change ++ * \retval 0 Sample rate does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1 */ ++static int ++snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ unsigned int index; ++ int rate; ++ int handle_state, cmd_idx, direction; ++ int ret = 1; ++ ++ rate = (int)ucontrol->value.integer.value[0]; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine command, direction and handle state */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) ++ handle_state = adsp_card->tdm_playback->state; ++ ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) ++ handle_state = adsp_card->tdm_record->state; ++ } ++ } ++ ++ /* get the value to set */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ return -EINVAL; ++ ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ adsp_card->ctr_if.sample_rate[direction][index] = rate; ++ else ++ adsp_card->ctr_if.tdm_sample_rate[direction] = rate; ++ ++ ret = 1; ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Equalizer control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Equalizer control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = MAX_EQZ_PARAM_NUMBER; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 0x7fffffff; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get equalizer parameters value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer parameters value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int handle_state, direction; ++ int i, j, filter_index; ++ unsigned int index; ++ struct xf_adsp_equalizer *equalizer; ++ struct xf_adsp_equalizer_params *eqz_params; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determin direction of stream */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state, handle ID, equalizer pointer */ ++ handle_state = XF_HANDLE_NULL; ++ equalizer = NULL; ++ ++ /* get component's state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->eqz_state; ++ equalizer = adsp_card->playback[index]->equalizer; ++ } ++ } else { ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->eqz_state; ++ equalizer = adsp_card->record[index]->equalizer; ++ } ++ } ++ ++ /* perform parameters' values getting */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get equalizer's parameters */ ++ if (xf_adsp_equalizer_get_params(equalizer) != 0) ++ return -EINVAL; ++ ++ eqz_params = &equalizer->params; ++ } else { ++ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; ++ } ++ ++ /* get equalizer type: PARAMETRIC or GRAPHIC */ ++ ucontrol->value.integer.value[0] = eqz_params->eqz_type; ++ ++ /* get parameters' value from Equalizer plugin */ ++ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ for (i = 0, filter_index = 1; ++ filter_index <= XA_REL_EQZ_FILTER_NUM; ++ i++, filter_index++) { ++ /* get filter index */ ++ ucontrol->value.integer.value[(i * 6) + 1] = ++ filter_index; ++ ++ /* get frequency centre */ ++ ucontrol->value.integer.value[(i * 6) + 2] = ++ eqz_params->p_coef.fc[i]; ++ ++ /* get bandwidth */ ++ ucontrol->value.integer.value[(i * 6) + 3] = ++ eqz_params->p_coef.band_width[i]; ++ ++ /* get filter type */ ++ ucontrol->value.integer.value[(i * 6) + 4] = ++ eqz_params->p_coef.type[i]; ++ ++ /* get gain base */ ++ ucontrol->value.integer.value[(i * 6) + 5] = ++ eqz_params->p_coef.gain_base[i]; ++ ++ /* get gain */ ++ ucontrol->value.integer.value[(i * 6) + 6] = ++ eqz_params->p_coef.gain[i]; ++ } ++ } else { ++ for (i = 0, filter_index = 1; ++ filter_index <= XA_REL_EQZ_GRAPHIC_BAND_NUM; ++ i++, filter_index++) { ++ /* get band index */ ++ ucontrol->value.integer.value[(i * 2) + 1] = ++ filter_index; ++ ++ /* get graphic gain */ ++ ucontrol->value.integer.value[(i * 2) + 2] = ++ eqz_params->g_coef.gain_g[i]; ++ } ++ ++ j = (i * 2) + 1; ++ ++ /* make the rest of values silent */ ++ while (j < MAX_EQZ_PARAM_NUMBER) { ++ ucontrol->value.integer.value[j] = -1; ++ j++; ++ } ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set equalizer parameters value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer parameters value ++ * \retval 1 Equalizer parameters change ++ * \retval 0 Equalizer parameters does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1*/ ++static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int handle_state, direction, filter_idx; ++ int i; ++ int index; ++ struct xf_adsp_equalizer_params *eqz_params = NULL; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* get the handle state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->eqz_state; ++ } else { ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->eqz_state; ++ } ++ ++ /* perform equalizer's parameters setting */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ return -EINVAL; ++ ++ /* PRQA S 310 1*/ ++ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; ++ ++ i = 0; ++ /* PRQA S 3440 1*/ ++ eqz_params->eqz_type = ucontrol->value.integer.value[i]; ++ i++; ++ filter_idx = 0; ++ ++ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ while (i < MAX_EQZ_PARAM_NUMBER) { ++ /* get index filter */ ++ /* PRQA S 3440*/ ++ filter_idx = ucontrol->value.integer.value[i]; ++ i++; ++ ++ /* valid index filter is range */ ++ /* (1 to XA_REL_EQZ_FILTER_NUM) */ ++ if (filter_idx >= 1 && ++ filter_idx <= XA_REL_EQZ_FILTER_NUM) { ++ /* PRQA S 3440 5*/ ++ eqz_params->p_coef.fc[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.band_width[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.type[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.gain_base[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.gain[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ } ++ /* index filter = -1 means that user */ ++ /* does not set this filter */ ++ else if (filter_idx == -1 || filter_idx == 0) { ++ i += 5; ++ } else { ++ return -EINVAL; ++ } ++ } ++ } else if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_GRAPHIC) { ++ while (i < ((XA_REL_EQZ_GRAPHIC_BAND_NUM * 2) + 1)) { ++ /*get index filter */ ++ /* PRQA S 3440 */ ++ filter_idx = ucontrol->value.integer.value[i++]; ++ ++ if (filter_idx >= 1 && ++ filter_idx <= XA_REL_EQZ_GRAPHIC_BAND_NUM) { ++ eqz_params->g_coef.gain_g[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ i++; ++ ++ } else if (filter_idx == -1 || filter_idx == 0) { ++ i += 1; ++ } else { ++ return -EINVAL; ++ } ++ } ++ } else { ++ return -EINVAL; ++ } ++ ++ return 1; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Equalizer Switch control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Equalizer ++ * Switch control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = 0; ++ uinfo->value.integer.max = 1; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get equalizer switch value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer switch value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* get the Equalizer switch status */ ++ ucontrol->value.integer.value[0] = ++ adsp_card->ctr_if.eqz_switch[direction][index]; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set equalizer switch value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer switch value ++ * \retval 1 Equalizer switch change ++ * \retval 0 Equalizer switch does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1 */ ++static int ++snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int eqz_switch; ++ int handle_state, direction; ++ unsigned int index; ++ int ret = 0; ++ ++ eqz_switch = ucontrol->value.integer.value[0]; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine handle state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ } else { ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->cap_state; ++ } ++ ++ /* set the status of Equalizer */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* runtime setting is not supported */ ++ ret = -EINVAL; ++ } else { ++ adsp_card->ctr_if.eqz_switch[direction][index] = eqz_switch; ++ ret = 1; ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Renderer output channel ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Renderer output channel ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = MONAURAL; ++ uinfo->value.integer.max = STEREO; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get Renderer output channel's value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to Renderer output channel value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int rdr_out_ch; ++ unsigned int index; ++ int handle_state, handle_id; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine handle state and handle ID */ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ handle_id = adsp_card->playback[index]->renderer->handle_id; ++ } ++ ++ /* get Renderer output channel's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get Renderer output channel's value from Renderer plugin */ ++ if (xf_adsp_get_param(handle_id, ++ XA_RDR_CONFIG_PARAM_OUT_CHANNELS, ++ &rdr_out_ch) != 0) { ++ return -EINVAL; ++ } ++ ++ ucontrol->value.integer.value[0] = rdr_out_ch; ++ } else { ++ ucontrol->value.integer.value[0] = ++ adsp_card->ctr_if.rdr_out_ch[index]; ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set Renderer output channel's value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to Renderer output channel value ++ * \retval 1 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ unsigned int index; ++ int handle_state; ++ int ret = 1; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine handle state and handle ID */ ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ /* get Renderer output channel's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ /* not support runtime setting */ ++ ret = -EINVAL; ++ else ++ adsp_card->ctr_if.rdr_out_ch[index] = ++ ucontrol->value.integer.value[0]; ++ ++ return ret; ++} ++ ++/** control interface for playback's volume rate */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_playback_volume_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ } ++}; ++ ++/** control interface for Capture's volume rate */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_capture_volume_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ } ++}; ++ ++/** control interface for playback's output sample rate */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_playback_sample_rate_out_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ } ++}; ++ ++/** control interface for Capture's input sample rate */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_capture_sample_rate_in_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ } ++}; ++ ++/** control interface for Equalizer parameters in playback */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_playback_equalizer_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ } ++}; ++ ++/** control interface for Equalizer parameters in record */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_capture_equalizer_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ } ++}; ++ ++/** control interface for Equalizer usage in playback */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_playback_equalizer_switch_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ } ++}; ++ ++/** control interface for Equalizer usage in record */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_capture_equalizer_switch_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ } ++}; ++ ++/** control interface for playback's output channel */ ++static struct snd_kcontrol_new ++snd_adsp_playback_out_channel_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ } ++}; ++ ++/** control interface for TDM playback's volume rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_playback_volume_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++}; ++ ++/** control interface for TDM capture's volume rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_capture_volume_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++}; ++ ++/** control interface for TDM playback's output sample rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_playback_sample_rate_out_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++}; ++ ++/** control interface for TDM capture's input sample rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_capture_sample_rate_in_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++}; ++ ++/** PCM callback function of the sound card */ ++static struct snd_pcm_ops snd_adsp_pcm_ops = { ++ .open = &snd_adsp_pcm_open, /* PRQA S 1053 10 */ ++ .close = &snd_adsp_pcm_close, ++ .ioctl = &snd_pcm_lib_ioctl, ++ .hw_params = &snd_adsp_pcm_hw_params, ++ .hw_free = &snd_adsp_pcm_hw_free, ++ .prepare = &snd_adsp_pcm_prepare, ++ .trigger = &snd_adsp_pcm_trigger, ++ .pointer = &snd_adsp_pcm_pointer, ++ .ack = &snd_adsp_pcm_ack ++}; ++ ++/******************************************************************* ++ * Internal functions ++ * ****************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Process information get from control structure ++ * ++ * \param[in] eqz_params Equalizer parameters object ++ * \param[in] eqz_ctr_params Equalizer parameters stored in control object ++ * \param[in] flag Indicate playback or capture stream ++ *****************************************************************************/ ++static void snd_adsp_get_eqz_params_from_control( ++ struct xf_adsp_equalizer_params *eqz_params, ++ struct xf_adsp_equalizer_params *eqz_ctr_params, bool flag) ++{ ++ int filter_idx; ++ ++ if (flag) { ++ if (eqz_ctr_params->eqz_type >= 0) ++ eqz_params->eqz_type = eqz_ctr_params->eqz_type; ++ ++ for (filter_idx = 0; filter_idx < XA_REL_EQZ_FILTER_NUM; ++ filter_idx++) { ++ if (eqz_ctr_params->p_coef.fc[filter_idx] >= 0) ++ eqz_params->p_coef.fc[filter_idx] = ++ eqz_ctr_params->p_coef.fc[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.band_width[filter_idx] >= 0) ++ eqz_params->p_coef.band_width[filter_idx] = ++ eqz_ctr_params->p_coef.band_width[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.type[filter_idx] >= 0) ++ eqz_params->p_coef.type[filter_idx] = ++ eqz_ctr_params->p_coef.type[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.gain_base[filter_idx] >= 0) ++ eqz_params->p_coef.gain_base[filter_idx] = ++ eqz_ctr_params->p_coef.gain_base[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.gain[filter_idx] >= 0) ++ eqz_params->p_coef.gain[filter_idx] = ++ eqz_ctr_params->p_coef.gain[filter_idx]; ++ } ++ for (filter_idx = 0; filter_idx < XA_REL_EQZ_GRAPHIC_BAND_NUM; ++ filter_idx++) { ++ if (eqz_ctr_params->g_coef.gain_g[filter_idx] >= 0) ++ eqz_params->g_coef.gain_g[filter_idx] = ++ eqz_ctr_params->g_coef.gain_g[filter_idx]; ++ } ++ } else { ++ memcpy(eqz_ctr_params, eqz_params, sizeof(*eqz_params)); ++ } ++} ++ ++/******************************************************************* ++ * ALSA ADSP Platform driver interface ++ * ****************************************************************/ ++ ++/** **************************************************************************** ++ * \brief Register control interface and preallocate ALSA buffer ++ * ++ * \param[in] runtime Pointer to runtime PCM data ++ * \retval 0 Success ++ * \retval -EINVAL Cannot register control interface ++ ******************************************************************************/ ++static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime) ++{ ++ int i = 0, err = 0; ++ int id; ++ struct snd_card *card; ++ struct snd_adsp_card *adsp_card; ++ int alsa_buf_sz = 0; ++ ++ /* get sound card data */ ++ card = runtime->card->snd_card; ++ ++ /* get driver data */ ++ adsp_card = snd_soc_dai_get_drvdata(runtime->cpu_dai); ++ ++ /* get the ID of CPU DAI */ ++ id = runtime->cpu_dai->id; ++ ++ /* register control interfaces */ ++ if (id == RDR_DAI_IDX0 || id == RDR_DAI_IDX1 || ++ id == RDR_DAI_IDX2 || id == RDR_DAI_IDX3) { ++ struct snd_kcontrol *kctl[RDR_CONTROL_NUM]; ++ void *rdr_ctr[RDR_CONTROL_NUM] = { ++ &snd_adsp_playback_volume_control[id], /* PRQA S 1031 */ ++ &snd_adsp_capture_volume_control[id], ++ &snd_adsp_playback_sample_rate_out_control[id], ++ &snd_adsp_capture_sample_rate_in_control[id], ++ &snd_adsp_playback_equalizer_control[id], ++ &snd_adsp_capture_equalizer_control[id], ++ &snd_adsp_playback_equalizer_switch_control[id], ++ &snd_adsp_capture_equalizer_switch_control[id], ++ &snd_adsp_playback_out_channel_control[id] ++ }; ++ ++ /* add basic control instance */ ++ for (i = 0; i < RDR_CONTROL_NUM; i++) { ++ kctl[i] = snd_ctl_new1(rdr_ctr[i], adsp_card); ++ err = snd_ctl_add(card, kctl[i]); ++ if (err < 0) ++ return -EINVAL; ++ } ++ ++ /* assign ALSA buffer size */ ++ alsa_buf_sz = MAX_BUFFER_BYTES; ++ ++ /* enable MIX feature from the 2nd playback/record stream */ ++ if (adsp_card->ctr_if.mix_usage == MIX_UNUSED) ++ adsp_card->ctr_if.mix_usage = FIRST_RUN; ++ else if (adsp_card->ctr_if.mix_usage == FIRST_RUN) ++ adsp_card->ctr_if.mix_usage = SECOND_RUN; ++ ++ } else { ++ struct snd_kcontrol *kctl[TDM_CONTROL_NUM]; ++ void *tdm_ctr[TDM_CONTROL_NUM] = { ++ &snd_adsp_tdm_playback_volume_control, ++ &snd_adsp_tdm_playback_sample_rate_out_control, ++ &snd_adsp_tdm_capture_volume_control, ++ &snd_adsp_tdm_capture_sample_rate_in_control ++ }; ++ ++ /* add basic control instances */ ++ for (i = 0; i < TDM_CONTROL_NUM; i++) { ++ kctl[i] = snd_ctl_new1(tdm_ctr[i], adsp_card); ++ err = snd_ctl_add(card, kctl[i]); ++ if (err < 0) ++ return -EINVAL; ++ } ++ ++ /* assign ALSA buffer size */ ++ alsa_buf_sz = TDM_MAX_BUFFER_BYTES; ++ } ++ ++ return snd_pcm_lib_preallocate_pages_for_all(runtime->pcm, ++ SNDRV_DMA_TYPE_CONTINUOUS, ++ snd_dma_continuous_data(GFP_KERNEL), ++ alsa_buf_sz, alsa_buf_sz); ++} ++ ++/* **************************************************************************** ++ * ALSA ADSP DAI register ++ * ***************************************************************************/ ++ ++/** callback function of platform driver */ ++static struct snd_soc_platform_driver snd_adsp_platform = { ++ .pcm_new = &snd_adsp_pcm_new, /* PRQA S 1053 *//* PRQA S 0674 */ ++ .ops = &snd_adsp_pcm_ops, ++}; ++ ++/** component information of driver */ ++static const struct snd_soc_component_driver snd_adsp_component = { ++ .name = "snd_adsp", /* PRQA S 1053 */ ++}; ++ ++/** DAI information of ADSP ALSA driver */ ++static struct snd_soc_dai_driver snd_adsp_dai[MAX_DAI_IDX] = { ++ { ++ /* PRQA S 1053 */ ++ .id = RDR_DAI_IDX0, ++ .name = "adsp-dai.0", ++ .playback.stream_name = "Playback0", ++ .capture.stream_name = "Capture0", ++ }, ++ { ++ .id = RDR_DAI_IDX1, ++ .name = "adsp-dai.1", ++ .playback.stream_name = "Playback1", ++ .capture.stream_name = "Capture1", ++ }, ++ { ++ .id = RDR_DAI_IDX2, ++ .name = "adsp-dai.2", ++ .playback.stream_name = "Playback2", ++ .capture.stream_name = "Capture2", ++ }, ++ { ++ .id = RDR_DAI_IDX3, ++ .name = "adsp-dai.3", ++ .playback.stream_name = "Playback3", ++ .capture.stream_name = "Capture3", ++ }, ++ { ++ .id = TDM_DAI_IDX, ++ .name = "adsp-tdm-dai", ++ .playback.stream_name = "TDM Playback", ++ .capture.stream_name = "TDM Capture", ++ } ++}; ++ ++/** *************************************************************************** ++ * \brief Register platform driver and ADSP ALSA sound card ++ * ++ * \param[in] pdev Pointer to platform driver data ++ * \retval 0 Success ++ * \retval -ENOMEM Cannot allocate driver's data ++ * \retval -EINVAL Cannot register platform driver or sound card ++ ****************************************************************************/ ++static int snd_adsp_probe(struct platform_device *pdev) ++{ ++ struct snd_adsp_card *adsp_card; ++ int i; ++ ++ /* allocate a card data structure */ ++ adsp_card = kmalloc(sizeof(*adsp_card), GFP_KERNEL); ++ if (!adsp_card) ++ return -ENOMEM; ++ ++ /* init parameters */ ++ memset(adsp_card, 0, sizeof(*adsp_card)); /* PRQA S 3200 */ ++ ++ /* PRQA S 3200 1*/ ++ memset(&adsp_card->ctr_if, -1, sizeof(struct snd_adsp_control)); ++ ++ /* disable Equalizer for all streams */ ++ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { ++ adsp_card->ctr_if.eqz_switch[DIRECT_CAPTURE][i] = 0; ++ adsp_card->ctr_if.eqz_switch[DIRECT_PLAYBACK][i] = 0; ++ } ++ ++ /* disable MIX function for all */ ++ adsp_card->ctr_if.mix_usage = MIX_UNUSED; ++ ++ /* save driver data */ ++ dev_set_drvdata(&pdev->dev, adsp_card); ++ ++ /* register platform device */ ++ if (snd_soc_register_platform(&pdev->dev, &snd_adsp_platform) < 0) { ++ snd_soc_unregister_platform(&pdev->dev); ++ return -EINVAL; ++ } ++ ++ /* fill format information of sound DAI driver for Rdr/Cap function */ ++ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { ++ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].playback.channels_min = MIN_CHANNEL; ++ snd_adsp_dai[i].playback.channels_max = MAX_CHANNEL; ++ ++ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].capture.channels_min = MIN_CHANNEL; ++ snd_adsp_dai[i].capture.channels_max = MAX_CHANNEL; ++ } ++ ++ /* fill format information of sound DAI driver for TDM function */ ++ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].playback.channels_min = TDM_MIN_CHANNEL; ++ snd_adsp_dai[i].playback.channels_max = TDM_MAX_CHANNEL; ++ ++ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].capture.channels_min = TDM_MIN_CHANNEL; ++ snd_adsp_dai[i].capture.channels_max = TDM_MAX_CHANNEL; ++ ++ /* register CPU dai */ ++ if (snd_soc_register_component(&pdev->dev, &snd_adsp_component, ++ snd_adsp_dai, ++ ARRAY_SIZE(snd_adsp_dai)) < 0) { ++ snd_soc_unregister_platform(&pdev->dev); ++ return -EINVAL; ++ } ++ ++ dev_info(&pdev->dev, "probed\n"); ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Unregister platform driver and ADSP ALSA sound card ++ * ++ * \param[in] pdev Pointer platform driver data ++ * \retval 0 Success ++ * \retval -EINVAL Invalid driver's data ++ *****************************************************************************/ ++static int snd_adsp_remove(struct platform_device *pdev) ++{ ++ /* get ADSP sound card data */ ++ struct snd_adsp_card *adsp_card = dev_get_drvdata(&pdev->dev); ++ ++ if (!adsp_card) ++ return -ENODEV; ++ ++ /* release the ADSP sound card */ ++ kfree(adsp_card); ++ ++ /* unregister platform driver */ ++ snd_soc_unregister_component(&pdev->dev); ++ snd_soc_unregister_platform(&pdev->dev); ++ ++ /* success */ ++ return 0; ++} ++ ++/** ADSP ALSA driver information */ ++static const struct of_device_id snd_adsp_id[] = { ++ { .compatible = "renesas,rcar_adsp_sound_gen3", }, /* PRQA S 1053 */ ++}; ++MODULE_DEVICE_TABLE(of, snd_adsp_id); ++ ++/** platform driver of ADSP ALSA sound card */ ++static struct platform_driver snd_adsp_driver = { ++ .driver = { /* PRQA S 1053 */ ++ .name = "rcar_adsp_sound", ++ .of_match_table = snd_adsp_id, ++ }, ++ .probe = snd_adsp_probe, ++ .remove = snd_adsp_remove, ++}; ++module_platform_driver(snd_adsp_driver); /* PRQA S 0651 */ ++ ++MODULE_AUTHOR("Renesas AudioDSP"); ++MODULE_DESCRIPTION("Platform driver for ADSP"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:ADSP-PCM-AUDIO"); +diff --git a/sound/soc/adsp/xf-adsp-base.c b/sound/soc/adsp/xf-adsp-base.c +new file mode 100644 +index 0000000..3ad9445 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-base.c +@@ -0,0 +1,2259 @@ ++/** *************************************************************************** ++ *\file xf-adsp-base.c ++ *\brief Source file for ADSP Base Control layer ++ *\addtogroup ADSP Driver ++ ****************************************************************************** ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ ****************************************************************************** ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#include ++#include ++#include ++ ++#include "xf-adsp-base.h" ++ ++#define XF_AUX_POOL_SIZE (16) /**< size of auxiliary pool*/ ++#define XF_AUX_POOL_MSG_LENGTH (256) /**< size of auxiliary buffer */ ++ ++#define XF_PROXY_ALIGN (64) /**< proxy alignment */ ++ ++/** \def XF_ALIGNED(size) ++ * Get properly aligned buffer length ++ */ ++#define XF_ALIGNED(size)\ ++((((size) + XF_PROXY_ALIGN) - 1) & ~(XF_PROXY_ALIGN - 1)) /* PRQA S 3453 */ ++ ++#ifndef offset_of ++/** \def offset_of(type, member) ++ * Return the offset of member in type structuer in byte ++ */ ++#define offset_of(type, member) \ ++ ((int)(long int)&(((const type *)(0))->member)) /* PRQA S 3453 */ ++#endif ++ ++/************************************************* ++ * Variable and and function declaration ++ * **********************************************/ ++ ++/** ADSP base control data */ ++static struct xf_adsp_base *base; ++ ++/* function declaration */ ++static int xf_adsp_base_register_handle(void *private_data, ++ struct xf_callback_func *cb, ++ int comp_id); ++static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id); ++static int xf_adsp_base_free_handle(int handle_id); ++static void xf_adsp_base_init_handle(void); ++static int xf_adsp_base_get_valid_handle(void); ++static int xf_send_and_receive(struct xf_message *msg); ++static int xf_response_thread(void *data); ++static void xf_buffer_put(struct xf_buffer *buffer); ++static u32 xf_buffer_length(struct xf_buffer *b); ++static struct xf_buffer *xf_buffer_get(struct xf_pool *pool); ++static void *xf_buffer_data(struct xf_buffer *b); ++static int xf_adsp_unregister(int comp_id); ++static int xf_adsp_register(char *name, int *comp_id); ++ ++/************************************************* ++ * Helper function to process pool data ++ * **********************************************/ ++ ++/** *********************************************************** ++ * \brief get buffer from given pool ++ * ++ * \param[in] pool Data pool address ++ * \retval b Pointer to buffer address in pool ++ **************************************************************/ ++static struct xf_buffer *xf_buffer_get(struct xf_pool *pool) ++{ ++ struct xf_buffer *b; ++ ++ b = pool->free; ++ if (b) { ++ pool->free = b->link.next; ++ b->link.pool = pool; ++ } ++ return b; ++} ++ ++/*********************************************************** ++ *\brief return buffer back to pool ++ * ++ *\param[in] buffer Pointer to the buffer data ++ ************************************************************/ ++static void xf_buffer_put(struct xf_buffer *buffer) ++{ ++ struct xf_pool *pool = buffer->link.pool; ++ ++ buffer->link.next = pool->free; ++ pool->free = buffer; ++} ++ ++/*********************************************************** ++ *\brief get the address of the given buffer data ++ * ++ *\param[in] b Pointer to the buffer data ++ *\retval address Address of buffer data ++ ************************************************************/ ++static void *xf_buffer_data(struct xf_buffer *b) ++{ ++ return b->address; ++} ++ ++/************************************************************ ++ *\brief get the length of the given buffer data ++ * ++ *\param[in] b Pointer to the buffer data ++ *\retval length Size of buffer data ++ ************************************************************/ ++static u32 xf_buffer_length(struct xf_buffer *b) /* PRQA S 3673 */ ++{ ++ return b->link.pool->length; ++} ++ ++/************************************************************ ++ *\brief set data to the given command message ++ * ++ *\param[out] m Pointer to the command message ++ *\param[in] id Message ID ++ *\param[in] opcode Message opcode ++ *\param[in] length Message length ++ *\param[in] buf Pointer to the buffer data ++ *\param[in] next Pointer to the next message ++ *\retval m Pointer to the command message ++ ************************************************************/ ++static inline struct xf_message * ++xf_create_msg(struct xf_message *m, u32 id, u32 opcode, u32 length, void *buf, ++ struct xf_message *next) ++{ ++ if (m) { ++ m->id = id; ++ m->opcode = opcode; ++ m->length = length; ++ m->buffer = buf; ++ m->next = next; ++ } ++ ++ return m; ++} ++ ++/***************************************************************** ++ *\brief synchronous send and wait for response message from proxy ++ * ++ *\param[in] msg Pointer to the command message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ ****************************************************************/ ++static int xf_send_and_receive(struct xf_message *msg) ++{ ++ int err; ++ int opcode = msg->opcode; ++ ++ /* reset the base flag */ ++ spin_lock(&base->lock); ++ base->base_flag = FALSE; ++ spin_unlock(&base->lock); ++ ++ err = base->cmd.send(base->client, (void *)msg); ++ if (err != 0) ++ return err; ++ ++ /* sleep and wait for the response wake up event */ ++ if (wait_event_interruptible(base->base_wait, ++ base->base_flag || base->err_flag)) { ++ return -EINVAL; ++ } ++ ++ if (base->err_flag != 0) { ++ spin_lock(&base->lock); ++ base->err_flag = FALSE; ++ spin_unlock(&base->lock); ++ return -EINVAL; ++ } ++ ++ /* save the response message */ ++ /* PRQA S 3200 */ ++ memcpy(msg, &base->base_msg, sizeof(struct xf_message)); ++ ++ /* check if the reponsed message is right */ ++ if (msg->opcode != opcode) ++ return -EINVAL; ++ ++ return 0; ++} ++ ++/************************************************************* ++ *\brief send a message to proxy ++ * ++ *\param[in] msg Pointer to the command message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++static inline int xf_send(struct xf_message *msg) ++{ ++ return base->cmd.send(base->client, (void *)msg); ++} ++ ++/** *********************************************************** ++ *\brief receive message from proxy ++ * ++ *\param[in] msg Pointer to store the response message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++static inline int xf_receive(struct xf_message *msg) ++{ ++ /* do not wait here */ ++ return base->cmd.recv(base->client, (void *)msg); ++} ++ ++/** *********************************************************** ++ *\brief thread for receive response data ++ **************************************************************/ ++static int xf_response_thread(void *data) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ int id; ++ ++ /* set polling to wait the response message */ ++ spin_lock(&base->lock); ++ base->wait_flag = FALSE; ++ spin_unlock(&base->lock); ++ ++ while (!kthread_should_stop()) { ++ if (base->cmd.poll(base->client, &base->wait_flag) != 0) ++ continue; ++ ++ if (xf_receive(&msg) != 0) ++ continue; ++ ++ /* get the handle id */ ++ id = XF_AP_CLIENT(msg.id); ++ ++ /* check the destination of the response message */ ++ if (id == 0) { ++ /* message is from base control */ ++ /* PRQA S 3200 1*/ ++ memcpy(&base->base_msg, &msg, ++ sizeof(struct xf_message)); ++ ++ spin_lock(&base->lock); ++ base->base_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ continue; ++ } ++ ++ /* get handle data */ ++ handle = xf_adsp_base_get_handle(id); ++ ++ if (handle == 0) ++ continue; ++ ++ switch (msg.opcode) { ++ case XF_EMPTY_THIS_BUFFER: /* PRQA S 0594 */ ++ handle->cb->empty_buf_done(handle->private_data, ++ msg.opcode, ++ msg.length, ++ msg.buffer); ++ break; ++ case XF_FILL_THIS_BUFFER: /* PRQA S 0594 */ ++ handle->cb->fill_buf_done(handle->private_data, ++ msg.opcode, ++ msg.length, ++ msg.buffer); ++ break; ++ case XF_SET_PARAM: /* PRQA S 0594 4 */ ++ case XF_GET_PARAM: ++ case XF_ROUTE: ++ case XF_UNROUTE: ++ /* message is from base control */ ++ memcpy(&base->base_msg, &msg, ++ sizeof(struct xf_message)); /* PRQA S 3200 */ ++ ++ spin_lock(&base->lock); ++ base->base_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ break; ++ default: ++ /* error has occurred */ ++ handle->cb->event_handler(handle->private_data); ++ ++ xf_adsp_base_free_handle(id); /* PRQA S 3200 */ ++ ++ spin_lock(&base->lock); ++ base->err_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ break; ++ } ++ } ++ ++ pr_info("ADSP base thread was exited\n"); ++ ++ do_exit(0); ++ return 0; ++} ++ ++/************************************************************* ++ * \brief register component to ADSP ++ * ++ * \param[in] name Name string of component ++ * \param[out] comp_id Store the registered component ID ++ * \retval 0 Success ++ * \retval -EINVAL Failed ++ **************************************************************/ ++static int xf_adsp_register(char *name, int *comp_id) /* PRQA S 3673 */ ++{ ++ struct xf_message msg; ++ struct xf_buffer *b = xf_buffer_get(base->aux_pool); ++ int err = 0; ++ ++ msg.id = __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)); ++ msg.opcode = XF_REGISTER; ++ msg.length = strlen(name) + 1; ++ msg.buffer = xf_buffer_data(b); ++ ++ /* copy identify name of ADSP component */ ++ if (msg.length <= xf_buffer_length(b)) ++ strncpy(msg.buffer, name, msg.length); /* PRQA S 3200 */ ++ else ++ strncpy(msg.buffer, name, xf_buffer_length(b));/* PRQA S 3200 */ ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the registered component ID */ ++ *comp_id = XF_MSG_SRC(msg.id); ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ * \brief unregister component from ADSP ++ * \param[in] comp_id Registered component ID ++ * \retval 0 Success ++ * \retval -EINVAL Failed ++ **************************************************************/ ++static int xf_adsp_unregister(int comp_id) ++{ ++ struct xf_message msg; ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), comp_id), ++ XF_UNREGISTER, 0, NULL, NULL); /* PRQA S 3200 */ ++ ++ return xf_send_and_receive(&msg); ++} ++ ++/*************************************************************** ++ * APIs for ADSP component helper ++ * ************************************************************/ ++/** *********************************************************** ++ * \brief allocate memory pool from shared memory ++ * \param[in] pool_size Number of buffer need to allocate ++ * \param[in] buf_length Size of each buffer in bytes ++ * \retval pool Pointer to allocated pool ++ * \retval -EINVAL Invalid base data ++ * \retval -ENOMEM Out of memory resource ++ **************************************************************/ ++struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length) ++{ ++ void *data; ++ u32 number; ++ struct xf_buffer *b; ++ struct xf_message msg; ++ struct xf_pool *pool; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return ERR_PTR(-EINVAL); /* PRQA S 0306 */ ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), ++ XF_ALLOC, ++ buf_length * pool_size, NULL, NULL); /* PRQA S 3200 */ ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ ++ ++ /* PRQA S 0306 1 */ ++ pool = kmalloc(offset_of(struct xf_pool, buffer) + ++ (pool_size * sizeof(struct xf_buffer)), GFP_KERNEL); ++ ++ if (!pool) ++ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ ++ ++ pool->length = buf_length; ++ pool->number = pool_size; ++ pool->p = msg.buffer; ++ ++ number = pool_size; ++ for (pool->free = b = &pool->buffer[0], data = pool->p; ++ number > 0; number--, b++) { /* PRQA S 2462,3418,0489 */ ++ /* set address of the buffer */ ++ b->address = data; ++ ++ /* fill buffer into free list */ ++ if (number == 1) ++ b->link.next = NULL; ++ else ++ b->link.next = b + 1; /* PRQA S 0489 */ ++ ++ /* advance data pointer in contigous buffer */ ++ data += buf_length; /* PRQA S 0550 */ ++ } ++ ++ return pool; ++} ++ ++/** *********************************************************** ++ *\brief return memory to shared memory ++ *\param[in] pool Data pool address ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or pool data ++ **************************************************************/ ++int xf_adsp_free_mem_pool(struct xf_pool *pool) ++{ ++ struct xf_message msg; ++ ++ /* check the sane ADSP base pool data*/ ++ if (!base || !pool) ++ return -EINVAL; ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), ++ XF_FREE, pool->number * pool->length, ++ pool->p, NULL); /* PRQA S 3200 */ ++ ++ xf_send_and_receive(&msg); /* PRQA S 3200 */ ++ ++ kfree(pool); ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief get buffer from given pool ++ * ++ *\param[in] pool Data pool address ++ *\param[in] index Buffer index ++ *\retval b Pointer to buffer address in pool ++ *\retval -EINVAL Invalid pool or index ++ **************************************************************/ ++char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index) ++{ ++ struct xf_buffer *buf[XF_BUF_POOL_SIZE] = {0}; ++ char *data; ++ int i; ++ ++ /* check the sane pool data*/ ++ if (!pool) ++ return ERR_PTR(-EINVAL); /* PRQA S 306 */ ++ ++ /* check the index is valid */ ++ if (index > (pool->number - 1)) ++ return ERR_PTR(-EINVAL); /* PRQA S 306 */ ++ ++ /* get buffer from pool */ ++ for (i = 0; i <= index; i++) ++ buf[i] = xf_buffer_get(pool); ++ ++ /* get data from buffer */ ++ data = xf_buffer_data(buf[index]); ++ ++ /* return buffer to pool */ ++ for (i = index; i >= 0; i--) ++ xf_buffer_put(buf[i]); ++ ++ return data; ++} ++ ++/** *********************************************************** ++ *\brief send empty this buffer command to ADSP framework ++ * ++ *\param[in] handle_id ID of the registered handle ++ *\param[in] buffer Pointer to data buffer ++ *\param[in] length Size of buffer in bytes ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ /* submit message to port 0 of component */ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_EMPTY_THIS_BUFFER, length, buffer, NULL); ++ ++ xf_send(&msg); /* PRQA S 3200 */ ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief send fill this buffer command to ADSP framework ++ * ++ *\param[in] handle_id ID of the registered handle ++ *\param[in] buffer Pointer to data buffer ++ *\param[in] length Size of buffer in bytes ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ /* submit message to port 1 of component */ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 1)), ++ XF_FILL_THIS_BUFFER, length, buffer, NULL); ++ ++ xf_send(&msg); /* PRQA S 3200 */ ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief route data between two registered ADSP plugins ++ * ++ *\param[in] src_handle_id Handle ID of source plugin ++ *\param[in] dst_handle_id Handle ID of sink plugin ++ *\param[in] buf_cnt Number of buffer in tunnel ++ *\param[in] buf_size Size of each buffer in tunnel ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int ++xf_adsp_route(int src_handle_id, int dst_handle_id, int buf_cnt, int buf_size) ++{ ++ struct xf_route_port_msg *route_msg; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ struct xf_handle *dst_handle, *src_handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ /* get handle data */ ++ dst_handle = xf_adsp_base_get_handle(dst_handle_id); ++ src_handle = xf_adsp_base_get_handle(src_handle_id); ++ ++ if (!dst_handle || !src_handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ route_msg = xf_buffer_data(b); ++ ++ /* route information */ ++ route_msg->dst = __XF_PORT_SPEC2(dst_handle->comp_id, 0); ++ route_msg->alloc_align = 4; ++ route_msg->alloc_number = buf_cnt; ++ route_msg->alloc_size = buf_size; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, src_handle_id), ++ __XF_PORT_SPEC2(src_handle->comp_id, 1)), ++ XF_ROUTE, sizeof(*route_msg), route_msg, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief set a single parameter ++ * ++ *\param[in] handle_id ID of registered handle ++ *\param[in] index Sub-command index of parameter ++ *\param[in] value the setting value ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_set_param(int handle_id, int index, int value) ++{ ++ struct xf_message msg; ++ struct xf_buffer *b; ++ struct xf_set_param_msg *msg_params; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ msg_params->item[0].id = index; ++ msg_params->item[0].value = value; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(1), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get a single parameter ++ * ++ *\param[in] handle_id ID of registered handle ++ *\param[in] index Sub-command index of parameter ++ *\param[out] value Store the getting value ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_get_param(int handle_id, int index, int *value) ++{ ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base and value data */ ++ if (!base || !value) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ msg_params->c.id[0] = index; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(1), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ *value = msg_params->r.value[0]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/*************************************************** ++ * APIs for ADSP base control ++ * ************************************************/ ++ ++/** *********************************************************** ++ *\brief initialize ADSP base's instance ++ * ++ *\retval 0 Success ++ *\retval -EINVAL ADSP base's instance has been initialized ++ *\retval -ENOMEM Cannot allocate memory for ADSP base ++ *\retval -EBUSY Cannot register client to proxy ++ **************************************************************/ ++int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd) ++{ ++ int err = 0; ++ ++ if (base != 0) ++ return -EINVAL; ++ ++ if (!cmd || !cmd->recv || !cmd->send || !cmd->poll || ++ !cmd->client_register || !cmd->client_unregister) ++ return -EINVAL; ++ ++ base = kmalloc(sizeof(*base), GFP_KERNEL); ++ if (!base) ++ return -ENOMEM; ++ ++ memset(base, 0, sizeof(struct xf_adsp_base)); /* PRQA S 3200 */ ++ ++ /* store the proxy command */ ++ memcpy(&base->cmd, cmd, sizeof(struct xf_adsp_base_cmd)); ++ ++ /* create client to connect from proxy driver */ ++ err = base->cmd.client_register(&base->client); ++ if (err != 0) ++ goto err3; /* PRQA S 2001 */ ++ ++ /* initialize waiting queue */ ++ init_waitqueue_head(&base->base_wait); ++ ++ /* initialize handle */ ++ xf_adsp_base_init_handle(); ++ ++ /* create thread to get the responsed message from proxy */ ++ base->rsp_thread = kthread_run(&xf_response_thread, ++ (void *)base, "adsp base"); ++ ++ if (base->rsp_thread != 0) { ++ pr_info("ADSP base thread has been started.\n"); ++ } else { ++ pr_info("Failed in create base thread\n"); ++ err = -ENOMEM; ++ goto err2; /* PRQA S 2001 */ ++ } ++ ++ /* allocate auxiliary pool for component usage */ ++ base->aux_pool = xf_adsp_allocate_mem_pool( ++ XF_AUX_POOL_SIZE, ++ XF_ALIGNED(XF_AUX_POOL_MSG_LENGTH)); ++ ++ if (IS_ERR(base->aux_pool)) { /* PRQA S 306 */ ++ err = -ENOMEM; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ pr_info("ADSP base was created\n"); ++ return 0; ++ ++err1: ++ /* cancel the waitting queue */ ++ spin_lock(&base->lock); ++ base->wait_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ /* stop thread inadvance */ ++ kthread_stop(base->rsp_thread); ++ ++err2: ++ base->cmd.client_unregister(base->client); ++ ++err3: ++ kfree(base); ++ base = NULL; ++ ++ return err; ++} ++EXPORT_SYMBOL(xf_adsp_base_create); /* PRQA S 0651 */ ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP base's instance ++ * ++ *\retval 0 Success ++ *\retval -EINVAL Invalid ADSP base's instance ++ **************************************************************/ ++int xf_adsp_base_destroy(void) ++{ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ /* free auxiliary pool to shared memory */ ++ xf_adsp_free_mem_pool(base->aux_pool); /* PRQA S 3200 */ ++ ++ /* cancel wait the response message, go to stop process */ ++ spin_lock(&base->lock); ++ base->wait_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ /* stop response thread */ ++ kthread_stop(base->rsp_thread); ++ ++ /* unregister client */ ++ base->cmd.client_unregister(base->client); ++ ++ kfree(base); ++ base = NULL; ++ ++ pr_info("ADSP base was destroyed\n"); ++ return 0; ++} ++EXPORT_SYMBOL(xf_adsp_base_destroy); /* PRQA S 0651 */ ++ ++/** *********************************************************** ++ * \brief initialize handle instance ++ **************************************************************/ ++static inline void xf_adsp_base_init_handle(void) ++{ ++ int i; ++ ++ for (i = 0; i < MAX_HANDLE; i++) ++ base->handle[i] = NULL; ++} ++ ++/** *********************************************************** ++ *\brief get the next available handle ID for register ++ * ++ *\retval -1 Unavailable handle ID ++ *\retval 0 to 255 Available handle ID ++ **************************************************************/ ++static inline int xf_adsp_base_get_valid_handle(void) ++{ ++ int id = -1; ++ int i; ++ ++ for (i = 0; i < MAX_HANDLE; i++) { ++ /* get the id of the first available handler */ ++ if (!base->handle[i]) { ++ id = i; ++ break; ++ } ++ } ++ ++ return id; ++} ++ ++/** *********************************************************** ++ *\brief register a handle instance for component usage ++ * ++ *\param[in] private_data Private data of this component ++ *\param[in] cb Callback function ++ *\param[in] comp_id ID of register component ++ *\retval id ID of registered handle ++ *\retval -EINVAL Cannot get the handle instance ++ *\retval -ENOMEM Cannot allocate handle memory ++ **************************************************************/ ++static int xf_adsp_base_register_handle(void *private_data, ++ struct xf_callback_func *cb, ++ int comp_id) ++{ ++ struct xf_handle *handle; ++ int id; ++ ++ /* get the next handle id */ ++ id = xf_adsp_base_get_valid_handle(); ++ ++ /* check available handle in base */ ++ if (id < 0) ++ return -EINVAL; ++ ++ /* allocate handle data */ ++ handle = kmalloc(sizeof(*handle), GFP_KERNEL); ++ if (!handle) ++ return -ENOMEM; ++ ++ /* save handle data */ ++ handle->private_data = private_data; ++ handle->cb = cb; ++ handle->comp_id = comp_id; ++ ++ /* save the hanle data */ ++ base->handle[id] = handle; ++ ++ /* return the id numbering in base handle */ ++ return (id + 1); ++} ++ ++/** *********************************************************** ++ *\brief get handle instance from handle ID ++ * ++ *\param[in] handle_id ID of registered handle ++ *\retval handle Pointer to handle instance ++ **************************************************************/ ++static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id) ++{ ++ return base->handle[handle_id - 1]; ++} ++ ++/** *********************************************************** ++ *\brief free the registered handle instance ++ * ++ *\param[in] handle_id ID of registered handle ++ *\retval 0 Success ++ *\retval -EINVAL Invalid handle ID ++ **************************************************************/ ++static int xf_adsp_base_free_handle(int handle_id) ++{ ++ if (handle_id < 1 || handle_id > MAX_HANDLE) ++ return -EINVAL; ++ ++ kfree(base->handle[handle_id - 1]); ++ base->handle[handle_id - 1] = NULL; ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Renderer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Renderer parameters ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_renderer_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ params = &renderer->params; ++ ++ /* get Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_CHANNELS; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; ++ msg_params->item[i++].value = params->out_channel; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_MIX_CONTROL; ++ msg_params->item[i++].value = params->mix_ctrl; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_STATE; ++ msg_params->item[i++].value = params->state; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Renderer parameters ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 */ ++int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_adsp_renderer_params *rdr_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ rdr_params = &renderer->params; ++ ++ /* get Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_CHANNELS; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_MIX_CONTROL; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_STATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ rdr_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ rdr_params->channel = msg_params->r.value[i++]; ++ rdr_params->pcm_width = msg_params->r.value[i++]; ++ rdr_params->frame_size = msg_params->r.value[i++]; ++ rdr_params->dev1 = msg_params->r.value[i++]; ++ rdr_params->dev2 = msg_params->r.value[i++]; ++ rdr_params->dma1 = msg_params->r.value[i++]; ++ rdr_params->dma2 = msg_params->r.value[i++]; ++ rdr_params->out_rate = msg_params->r.value[i++]; ++ rdr_params->vol_rate = msg_params->r.value[i++]; ++ rdr_params->out_channel = msg_params->r.value[i++]; ++ rdr_params->mix_ctrl = msg_params->r.value[i++]; ++ rdr_params->state = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Renderer component ++ * ++ *\param[in,out] renderer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_renderer *rdr; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ rdr = kmalloc(sizeof(*rdr), GFP_KERNEL); ++ if (!rdr) ++ return -ENOMEM; ++ ++ memset(rdr, 0, sizeof(struct xf_adsp_renderer)); /* PRQA S 3200 */ ++ ++ /* register renderer component */ ++ err = xf_adsp_register("renderer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register Renderer to ADSP base control */ ++ rdr->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (rdr->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from Renderer plugin */ ++ err = xf_adsp_renderer_get_params(rdr); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save renderer compoent data */ ++ *renderer = rdr; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(rdr); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Renderer component ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ handle_id = renderer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(renderer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Capture component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Capture parameters ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_capture_set_params(struct xf_adsp_capture *capture) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_capture_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ params = &capture->params; ++ ++ /* get Capture's handle data */ ++ handle = xf_adsp_base_get_handle(capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_CHANNELS; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_STATE; ++ msg_params->item[i++].value = params->state; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Capture parameters ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 */ ++int xf_adsp_capture_get_params(struct xf_adsp_capture *capture) ++{ ++ struct xf_adsp_capture_params *cap_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ cap_params = &capture->params; ++ ++ /* get Capture's handle data */ ++ handle = xf_adsp_base_get_handle(capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 11 1*/ ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_CHANNELS; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_STATE; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ cap_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 11 */ ++ cap_params->channel = msg_params->r.value[i++]; ++ cap_params->pcm_width = msg_params->r.value[i++]; ++ cap_params->frame_size = msg_params->r.value[i++]; ++ cap_params->dev1 = msg_params->r.value[i++]; ++ cap_params->dev2 = msg_params->r.value[i++]; ++ cap_params->dma1 = msg_params->r.value[i++]; ++ cap_params->dma2 = msg_params->r.value[i++]; ++ cap_params->out_rate = msg_params->r.value[i++]; ++ cap_params->vol_rate = msg_params->r.value[i++]; ++ cap_params->state = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Capture component ++ * ++ *\param[in,out] capture Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Capture instance ++ *****************************************************************************/ ++int xf_adsp_capture_create(struct xf_adsp_capture **capture, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_capture *cap; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ cap = kmalloc(sizeof(*cap), GFP_KERNEL); ++ if (!cap) ++ return -ENOMEM; ++ ++ memset(cap, 0, sizeof(struct xf_adsp_capture)); /* PRQA S 3200 */ ++ ++ /* register capture component */ ++ err = xf_adsp_register("capture", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register capture to ADSP base control */ ++ cap->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (cap->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from capture plugin */ ++ err = xf_adsp_capture_get_params(cap); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save capture compoent data */ ++ *capture = cap; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(cap); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Capture component ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Capture data ++ **************************************************************/ ++int xf_adsp_capture_destroy(struct xf_adsp_capture *capture) /* PRQA S 3673 */ ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ handle_id = capture->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(capture); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Equalizer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Equalizer parameters ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_equalizer_params *params; ++ struct xf_buffer *b; ++ int i, n; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ params = &equalizer->params; ++ ++ /* get Equalizer's handle data */ ++ handle = xf_adsp_base_get_handle(equalizer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_COEF_FS; ++ msg_params->item[i++].value = params->rate; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_CH; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; ++ msg_params->item[i++].value = params->eqz_type; ++ ++ if (params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ struct xf_equalizer_parametric_coef *coef = ¶ms->p_coef; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; ++ msg_params->item[i++].value = coef->type[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; ++ msg_params->item[i++].value = coef->fc[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; ++ msg_params->item[i++].value = coef->band_width[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; ++ msg_params->item[i++].value = coef->gain[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; ++ msg_params->item[i++].value = coef->gain_base[n]; ++ } ++ } else { ++ struct xf_equalizer_graphic_coef *coef = ¶ms->g_coef; ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; ++ msg_params->item[i++].value = coef->gain_g[n]; ++ } ++ } ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Equalizer parameters ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_adsp_equalizer_params *eqz_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i, n; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ eqz_params = &equalizer->params; ++ ++ /* get Equalizer's handle data */ ++ handle = xf_adsp_base_get_handle(equalizer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_COEF_FS; /* PRQA S 3440 4 */ ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_CH; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ /* PRQA S 3440 5 */ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; ++ } ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) ++ /* PRQA S 3440 1 */ ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ eqz_params->rate = msg_params->r.value[i++]; /* PRQA S 3440 4 */ ++ eqz_params->channel = msg_params->r.value[i++]; ++ eqz_params->pcm_width = msg_params->r.value[i++]; ++ eqz_params->eqz_type = msg_params->r.value[i++]; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ /* PRQA S 3440 5 */ ++ eqz_params->p_coef.type[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.fc[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.band_width[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.gain[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.gain_base[n] = msg_params->r.value[i++]; ++ } ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { ++ /* PRQA S 3440 1 */ ++ eqz_params->g_coef.gain_g[n] = msg_params->r.value[i++]; ++ } ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Equalizer component ++ * ++ *\param[in,out] equalizer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Equalier instance ++ *****************************************************************************/ ++int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_equalizer *eqz; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ eqz = kmalloc(sizeof(*eqz), GFP_KERNEL); ++ if (!eqz) ++ return -ENOMEM; ++ ++ memset(eqz, 0, sizeof(struct xf_adsp_equalizer)); /* PRQA S 3200 */ ++ ++ /* register equalizer component */ ++ err = xf_adsp_register("equalizer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register equalizer to ADSP base control */ ++ eqz->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (eqz->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from equalizer plugin */ ++ err = xf_adsp_equalizer_get_params(eqz); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save equalizer compoent data */ ++ *equalizer = eqz; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(eqz); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Equalizer component ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Equalizer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base and Equalizer data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ handle_id = equalizer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(equalizer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for TDM Renderer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP TDM Renderer parameters ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_tdm_renderer_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ params = &tdm_renderer->params; ++ ++ /* get TDM Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->item[i++].value = params->ch_mode; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP TDM Renderer parameters ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_adsp_tdm_renderer_params *params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ params = &tdm_renderer->params; ++ ++ /* get TDM Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ params->ch_mode = msg_params->r.value[i++]; ++ params->pcm_width = msg_params->r.value[i++]; ++ params->frame_size = msg_params->r.value[i++]; ++ params->dev1 = msg_params->r.value[i++]; ++ params->dev2 = msg_params->r.value[i++]; ++ params->dma1 = msg_params->r.value[i++]; ++ params->dma2 = msg_params->r.value[i++]; ++ params->out_rate = msg_params->r.value[i++]; ++ params->vol_rate = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create TDM Renderer component ++ * ++ *\param[in,out] tdm_renderer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, ++ struct xf_callback_func *cb, ++ void *private_data) ++{ ++ struct xf_adsp_tdm_renderer *tdm_rdr; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ tdm_rdr = kmalloc(sizeof(*tdm_rdr), GFP_KERNEL); ++ if (!tdm_rdr) ++ return -ENOMEM; ++ ++ /* PRQA S 3200 */ ++ memset(tdm_rdr, 0, sizeof(struct xf_adsp_tdm_renderer)); ++ ++ /* register TDM Renderer component */ ++ err = xf_adsp_register("tdm-renderer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register TDM Renderer to ADSP base control */ ++ tdm_rdr->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (tdm_rdr->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from plugin */ ++ err = xf_adsp_tdm_renderer_get_params(tdm_rdr); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save compoent data */ ++ *tdm_renderer = tdm_rdr; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(tdm_rdr); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP TDM Renderer component ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 1*/ ++int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ handle_id = tdm_renderer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(tdm_renderer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for TDM Capture component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP TDM Capture parameters ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_tdm_capture_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ params = &tdm_capture->params; ++ ++ /* get TDM Capture's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->item[i++].value = params->ch_mode; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP TDM Capture parameters ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_adsp_tdm_capture_params *params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ params = &tdm_capture->params; ++ ++ /* get TDM Capture's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ params->ch_mode = msg_params->r.value[i++]; ++ params->pcm_width = msg_params->r.value[i++]; ++ params->frame_size = msg_params->r.value[i++]; ++ params->dev1 = msg_params->r.value[i++]; ++ params->dev2 = msg_params->r.value[i++]; ++ params->dma1 = msg_params->r.value[i++]; ++ params->dma2 = msg_params->r.value[i++]; ++ params->out_rate = msg_params->r.value[i++]; ++ params->vol_rate = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create TDM Capture component ++ * ++ *\param[in,out] tdm_capture Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_tdm_capture *tdm_cap; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ tdm_cap = kmalloc(sizeof(*tdm_cap), GFP_KERNEL); ++ if (!tdm_cap) ++ return -ENOMEM; ++ ++ /* PRQA S 3200 */ ++ memset(tdm_cap, 0, sizeof(struct xf_adsp_tdm_capture)); ++ ++ /* register TDM Capture component */ ++ err = xf_adsp_register("tdm-capture", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register TDM Capture to ADSP base control */ ++ tdm_cap->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (tdm_cap->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from plugin */ ++ err = xf_adsp_tdm_capture_get_params(tdm_cap); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save compoent data */ ++ *tdm_capture = tdm_cap; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(tdm_cap); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP TDM Capture component ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ handle_id = tdm_capture->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(tdm_capture); ++ ++ return 0; ++} +diff --git a/sound/soc/adsp/xf-adsp-base.h b/sound/soc/adsp/xf-adsp-base.h +new file mode 100644 +index 0000000..27eb084 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-base.h +@@ -0,0 +1,275 @@ ++/** ************************************************************************* ++ *\file xf-adsp-base.h ++ *\brief Header file for ADSP Base Control layer ++ *\addtogroup ADSP Driver ++ **************************************************************************** ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ **************************************************************************** ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_BASE_H ++#define __XF_ADSP_BASE_H ++ ++#include "xf-adsp-config.h" ++#include ++ ++#define XF_BUF_POOL_SIZE (4) /**< number of buffer in a data pool */ ++ ++/**< maximum number of DSP component can be registered */ ++#define MAX_HANDLE (256) ++ ++/* define boolean */ ++#define TRUE (1) ++#define FALSE (0) ++ ++/** \struct xf_callback_func ++ * \brief callback function for ADSP's response message ++ */ ++struct xf_callback_func { ++ /** callback for empty buffer done message */ ++ int (*empty_buf_done)(void *data, int opcode, int length, char *buffer); ++ ++ /** callback for fill buffer done message */ ++ int (*fill_buf_done)(void *data, int opcode, int length, char *buffer); ++ ++ /** callback for event handler */ ++ int (*event_handler)(void *data); ++}; ++ ++/** \struct xf_adsp_renderer_params ++ * \brief parameter structure for Renderer component ++ */ ++struct xf_adsp_renderer_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++ int out_channel; /**< output channels */ ++ int mix_ctrl; /**< mix control flag */ ++ int state; /**< operation state */ ++}; ++ ++/** \struct xf_adsp_renderer ++ * \brief Renderer component structure ++ */ ++struct xf_adsp_renderer { ++ struct xf_adsp_renderer_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_adsp_capture_params ++ *\brief parameter structure of Capture component ++ */ ++struct xf_adsp_capture_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++ int state; /**< operation state */ ++}; ++ ++/** \struct xf_adsp_capture ++ * \brief Capture component structure ++ */ ++struct xf_adsp_capture { ++ struct xf_adsp_capture_params params; /**< parameter structuer*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_equalizer_parametric_coef ++ *\brief Parametric Equalizer type's parameters ++ */ ++struct xf_equalizer_parametric_coef { ++ int type[XA_REL_EQZ_FILTER_NUM]; /**< Filter type */ ++ int fc[XA_REL_EQZ_FILTER_NUM]; /**< Filter center frequency */ ++ int gain[XA_REL_EQZ_FILTER_NUM]; /**< Filter gain */ ++ int band_width[XA_REL_EQZ_FILTER_NUM]; /**< Filter band width */ ++ int gain_base[XA_REL_EQZ_FILTER_NUM]; /**< Filter base gain */ ++}; ++ ++/** \struct xf_equalizer_graphic_coef ++ * \brief Graphic Equalizer type's parameters ++ */ ++struct xf_equalizer_graphic_coef { ++ int gain_g[XA_REL_EQZ_GRAPHIC_BAND_NUM];/**< Graphic equalizer gain */ ++}; ++ ++/** \struct xf_adsp_equalizer_params ++ *\brief Equalizer parameters ++ */ ++struct xf_adsp_equalizer_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int rate; /**< sampling rate */ ++ int eqz_type; /**< Equalizer type */ ++ struct xf_equalizer_parametric_coef p_coef; /**< Parametric params */ ++ struct xf_equalizer_graphic_coef g_coef; /**< Graphic params */ ++}; ++ ++/** \struct xf_adsp_equalizer ++ * \brief Equalizer component's structure ++ */ ++struct xf_adsp_equalizer { ++ struct xf_adsp_equalizer_params params;/**< Equalizer parameters */ ++ struct xf_pool *buf_pool; /**< buffer pool for transfer data */ ++ int handle_id; /**< ID of registered handle */ ++}; ++ ++/** \struct xf_adsp_tdm_renderer_params ++ * \brief parameter structure for TDM Renderer component ++ */ ++struct xf_adsp_tdm_renderer_params { ++ int ch_mode; /**< channel mode */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++}; ++ ++/** \struct xf_adsp_tdm_renderer ++ * \brief TDM Renderer component structure ++ */ ++struct xf_adsp_tdm_renderer { ++ struct xf_adsp_tdm_renderer_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle */ ++}; ++ ++/** \struct xf_adsp_tdm_capture_params ++ * \brief parameter structure for TDM Capture component ++ */ ++struct xf_adsp_tdm_capture_params { ++ int ch_mode; /**< channel mode */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++}; ++ ++/** \struct xf_adsp_tdm_capture ++ * \brief TDM Capture component structure ++ */ ++struct xf_adsp_tdm_capture { ++ struct xf_adsp_tdm_capture_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_handle ++ * \brief Handle struct for each ADSP component ++ */ ++struct xf_handle { ++ int comp_id;/**< ADSP component ID */ ++ struct xf_callback_func *cb;/**< callback functions */ ++ void *private_data; /**< private data for callback functions*/ ++}; ++ ++/** \struct xf_adsp_base ++ * \brief Base component structure ++ */ ++struct xf_adsp_base { ++ struct xf_adsp_base_cmd cmd; /**< proxy commands */ ++ void *client; /**< client data which registered to proxy */ ++ struct xf_pool *aux_pool; /**< auxiliary buffer pool data */ ++ struct xf_handle *handle[MAX_HANDLE]; /**< handler data */ ++ struct task_struct *rsp_thread;/**< thread for response message*/ ++ wait_queue_head_t base_wait; /**< ADSP base's waiting queue */ ++ struct xf_message base_msg; /**< ADSP base's response message */ ++ int base_flag; /**< flag to control its waiting queue */ ++ int err_flag; /**< flag to indicate a error from plugins */ ++ int wait_flag; /**< flag to control the polling waiting*/ ++ spinlock_t lock; /**< spinlock data */ ++}; ++ ++struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length); ++int xf_adsp_free_mem_pool(struct xf_pool *pool); ++char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index); ++ ++int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length); ++int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length); ++ ++int xf_adsp_route(int src_handle_id, int dst_handle_id ++ , int buf_cnt, int buf_size); ++ ++int xf_adsp_set_param(int handle_id, int index, int value); ++int xf_adsp_get_param(int handle_id, int index, int *value); ++ ++int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer); ++int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer); ++int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer); ++ ++int xf_adsp_capture_create(struct xf_adsp_capture **capture, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_capture_destroy(struct xf_adsp_capture *capture); ++int xf_adsp_capture_set_params(struct xf_adsp_capture *capture); ++int xf_adsp_capture_get_params(struct xf_adsp_capture *capture); ++ ++int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer); ++int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer); ++int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer); ++ ++int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, ++ struct xf_callback_func *cb, ++ void *private_data); ++int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer); ++int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer); ++int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer); ++ ++int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, ++ struct xf_callback_func *cb, ++ void *private_data); ++int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture); ++int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture); ++int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture); ++ ++#endif +diff --git a/sound/soc/adsp/xf-adsp-config.h b/sound/soc/adsp/xf-adsp-config.h +new file mode 100644 +index 0000000..818a46a +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-config.h +@@ -0,0 +1,604 @@ ++/** **************************************************************************** ++ *\file xf-adsp-config.h ++ *\brief Header file for ADSP configuration ++ *\addtogroup ADSP Driver ++ ******************************************************************************* ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ ******************************************************************************* ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_CONFIG_H ++#define __XF_ADSP_CONFIG_H ++ ++/* Equalizer definition */ ++#define XA_REL_EQZ_FILTER_NUM (9) /**< number of filter */ ++#define XA_REL_EQZ_GRAPHIC_BAND_NUM (5) /**< number of graphic band */ ++ ++struct xf_buffer { ++ void *address; ++ union { /* PRQA S 750 3 */ ++ struct xf_buffer *next; ++ struct xf_pool *pool; ++ } link; ++}; ++ ++struct xf_pool { ++ /* length of individual buffer in a pool */ ++ u32 length; ++ ++ /* number of buffer in a pool */ ++ u32 number; ++ ++ /* pointer to pool memory */ ++ void *p; ++ ++ /* pointer to first free buffer in a pool */ ++ struct xf_buffer *free; ++ ++ /* individual buffer */ ++ struct xf_buffer buffer[0]; /* PRQA S 1037 */ ++}; ++ ++struct xf_message { ++ /* pointer to the next item in the list */ ++ struct xf_message *next; ++ ++ /* shmem session_id */ ++ u32 id; ++ ++ /* operation code */ ++ u32 opcode; ++ ++ /* length of attached message buffer */ ++ u32 length; ++ ++ /* message buffer */ ++ void *buffer; ++}; ++ ++/******************************************************************************* ++ * XF_GET_PARAM message ++ ******************************************************************************/ ++ ++/* ...message body (command/response) */ ++union xf_get_param_msg { /* PRQA S 750 18 */ ++ /* ...command structure */ ++ struct { ++ /* ...array of parameters requested */ ++ u32 id[0]; /* PRQA S 1037 */ ++ ++ } __attribute__((__packed__)) c; ++ ++ /* ...response structure */ ++ struct { ++ /* ...array of parameters values */ ++ u32 value[0];/* PRQA S 1037 */ ++ ++ } __attribute__((__packed__)) r; ++ ++}; ++ ++/* ...length of the XF_GET_PARAM command/response */ ++/* PRQA S 3453 2 */ ++#define XF_GET_PARAM_CMD_LEN(params) (sizeof(u32) * (params)) ++#define XF_GET_PARAM_RSP_LEN(params) (sizeof(u32) * (params)) ++ ++/******************************************************************************* ++ * XF_SET_PARAM message ++ ******************************************************************************/ ++ ++/* ...component initialization parameter */ ++struct xf_set_param_item { ++ /* ...index of parameter passed to SET_CONFIG_PARAM call */ ++ u32 id; ++ ++ /* ...value of parameter */ ++ u32 value; ++ ++} __attribute__ ((__packed__)); ++ ++/* ...message body (no response message? - tbd) */ ++struct xf_set_param_msg { ++ /* ...command message */ ++ struct xf_set_param_item item[0]; /* PRQA S 1037 */ ++ ++} __attribute__ ((__packed__)); ++ ++/* ...length of the command message */ ++/* PRQA S 3453 */ ++#define XF_SET_PARAM_CMD_LEN(params) \ ++ (sizeof(struct xf_set_param_item) * (params)) ++ ++/******************************************************************************* ++ * XF_ROUTE definition ++ ******************************************************************************/ ++ ++/* ...port routing command */ ++struct xf_route_port_msg { ++ /* ...source port specification */ ++ u32 src; ++ ++ /* ...destination port specification */ ++ u32 dst; ++ ++ /* ...number of buffers to allocate */ ++ u32 alloc_number; ++ ++ /* ...length of buffer to allocate */ ++ u32 alloc_size; ++ ++ /* ...alignment restriction for a buffer */ ++ u32 alloc_align; ++ ++} __attribute__((__packed__)); ++ ++/******************************************************************************* ++ * XF_UNROUTE definition ++ ******************************************************************************/ ++ ++/* ...port unrouting command */ ++struct xf_unroute_port_msg { ++ /* ...source port specification */ ++ u32 src; ++ ++ /* ...destination port specification */ ++ u32 dst; ++ ++} __attribute__((__packed__)); ++ ++/* ...Capture states */ ++enum xa_capture_state { ++ XA_CAP_STATE_RUN = 0, ++ XA_CAP_STATE_IDLE = 1, ++ XA_CAP_STATE_PAUSE = 2 ++}; ++ ++/* ...Renderer states */ ++enum xa_renderer_state { ++ XA_RDR_STATE_RUN = 0, ++ XA_RDR_STATE_IDLE = 1, ++ XA_RDR_STATE_PAUSE = 2 ++}; ++ ++/******************************************************************************* ++ * Message routing composition - move somewhere else - tbd ++ ******************************************************************************/ ++ ++/* ...adjust IPC client of message going from user-space */ ++#define XF_MSG_AP_FROM_USER(id, client) \ ++ (((id) & ~(0xF << 2)) | ((client) << 2)) ++ ++/* ...wipe out IPC client from message going to user-space */ ++#define XF_MSG_AP_TO_USER(id) \ ++ ((id) & ~(0xF << 18)) ++ ++/* ...port specification (12 bits) */ ++#define __XF_PORT_SPEC(core, id, port) ((core) | ((id) << 2) | ((port) << 8)) ++#define __XF_PORT_SPEC2(id, port) ((id) | ((port) << 8)) ++#define XF_PORT_CORE(spec) ((spec) & 0x3) ++#define XF_PORT_CLIENT(spec) (((spec) >> 2) & 0x3F) ++#define XF_PORT_ID(spec) (((spec) >> 8) & 0xF) ++ ++/* ...message id contains source and destination ports specification */ ++#define __XF_MSG_ID(src, dst) (((src) & 0xFFFF) | (((dst) & 0xFFFF) << 16)) ++#define XF_MSG_SRC(id) (((id) >> 0) & 0xFFFF) ++#define XF_MSG_SRC_CORE(id) (((id) >> 0) & 0x3) ++#define XF_MSG_SRC_CLIENT(id) (((id) >> 2) & 0x3F) ++#define XF_MSG_SRC_PORT(id) (((id) >> 8) & 0xF) ++#define XF_MSG_SRC_PROXY(id) (((id) >> 15) & 0x1) ++#define XF_MSG_DST(id) (((id) >> 16) & 0xFFFF) ++#define XF_MSG_DST_CORE(id) (((id) >> 16) & 0x3) ++#define XF_MSG_DST_CLIENT(id) (((id) >> 18) & 0x3F) ++#define XF_MSG_DST_PORT(id) (((id) >> 24) & 0xF) ++#define XF_MSG_DST_PROXY(id) (((id) >> 31) & 0x1) ++ ++/* ...special treatment of AP-proxy destination field */ ++#define XF_AP_IPC_CLIENT(id) (((id) >> 18) & 0xF) ++#define XF_AP_CLIENT(id) (((id) >> 22) & 0x1FF) ++#define __XF_AP_PROXY(core) ((core) | 0x8000) ++#define __XF_DSP_PROXY(core) ((core) | 0x8000) ++#define __XF_AP_CLIENT(core, client) ((core) | ((client) << 6) | 0x8000) ++ ++/******************************************************************************* ++ * Opcode composition ++ ******************************************************************************/ ++ ++/* ...opcode composition with command/response data tags */ ++#define __XF_OPCODE(c, r, op) (((c) << 31) | ((r) << 30) | ((op) & 0x3F)) ++ ++/* ...accessors */ ++#define XF_OPCODE_CDATA(opcode) ((opcode) & (1 << 31)) ++#define XF_OPCODE_RDATA(opcode) ((opcode) & (1 << 30)) ++#define XF_OPCODE_TYPE(opcode) ((opcode) & (0x3F)) ++ ++/******************************************************************************* ++ * Opcode types ++ ******************************************************************************/ ++ ++/* ...unregister client */ ++#define XF_UNREGISTER __XF_OPCODE(0, 0, 0) ++ ++/* ...register client at proxy */ ++#define XF_REGISTER __XF_OPCODE(1, 0, 1) ++ ++/* ...port routing command */ ++#define XF_ROUTE __XF_OPCODE(1, 0, 2) ++ ++/* ...port unrouting command */ ++#define XF_UNROUTE __XF_OPCODE(1, 0, 3) ++ ++/* ...shared buffer allocation */ ++#define XF_ALLOC __XF_OPCODE(0, 0, 4) ++ ++/* ...shared buffer freeing */ ++#define XF_FREE __XF_OPCODE(0, 0, 5) ++ ++/* ...set component parameters */ ++#define XF_SET_PARAM __XF_OPCODE(1, 0, 6) ++ ++/* ...get component parameters */ ++#define XF_GET_PARAM __XF_OPCODE(1, 1, 7) ++ ++/* ...input buffer reception */ ++#define XF_EMPTY_THIS_BUFFER __XF_OPCODE(1, 0, 8) ++ ++/* ...output buffer reception */ ++#define XF_FILL_THIS_BUFFER __XF_OPCODE(0, 1, 9) ++ ++/* ...flush specific port */ ++#define XF_FLUSH __XF_OPCODE(0, 0, 10) ++ ++/* ...start component operation */ ++#define XF_START __XF_OPCODE(0, 0, 11) ++ ++/* ...stop component operation */ ++#define XF_STOP __XF_OPCODE(0, 0, 12) ++ ++/* ...pause component operation */ ++#define XF_PAUSE __XF_OPCODE(0, 0, 13) ++ ++/* ...resume component operation */ ++#define XF_RESUME __XF_OPCODE(0, 0, 14) ++ ++/* ...total amount of supported decoder commands */ ++#define __XF_OP_NUM (15) ++ ++/************************************************* ++ * Renderer - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_config_param_renderer { ++ XA_RDR_CONFIG_PARAM_STATE = 0, ++ XA_RDR_CONFIG_PARAM_PCM_WIDTH = 1, ++ XA_RDR_CONFIG_PARAM_CHANNELS = 2, ++ XA_RDR_CONFIG_PARAM_SAMPLE_RATE = 3, ++ XA_RDR_CONFIG_PARAM_FRAME_SIZE = 4, ++ XA_RDR_CONFIG_PARAM_OUTPUT1 = 5, ++ XA_RDR_CONFIG_PARAM_DMACHANNEL1 = 6, ++ XA_RDR_CONFIG_PARAM_OUTPUT2 = 7, ++ XA_RDR_CONFIG_PARAM_DMACHANNEL2 = 8, ++ XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 9, ++ XA_RDR_CONFIG_PARAM_VOLUME_RATE = 10, ++ XA_RDR_CONFIG_PARAM_OUT_CHANNELS = 11, ++ XA_RDR_CONFIG_PARAM_MIX_CONTROL = 12, ++ XA_RDR_CONFIG_PARAM_NUM = 13 ++}; ++ ++/************************************************* ++ * Capture - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_config_param_capture { ++ XA_CAP_CONFIG_PARAM_CB = 0, ++ XA_CAP_CONFIG_PARAM_STATE = 1, ++ XA_CAP_CONFIG_PARAM_PCM_WIDTH = 2, ++ XA_CAP_CONFIG_PARAM_CHANNELS = 3, ++ XA_CAP_CONFIG_PARAM_SAMPLE_RATE = 4, ++ XA_CAP_CONFIG_PARAM_FRAME_SIZE = 5, ++ XA_CAP_CONFIG_PARAM_INPUT1 = 6, ++ XA_CAP_CONFIG_PARAM_DMACHANNEL1 = 7, ++ XA_CAP_CONFIG_PARAM_INPUT2 = 8, ++ XA_CAP_CONFIG_PARAM_DMACHANNEL2 = 9, ++ XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 10, ++ XA_CAP_CONFIG_PARAM_VOLUME_RATE = 11, ++ XA_CAP_CONFIG_PARAM_NUM = 12 ++}; ++ ++/************************************************* ++ * Equalizer - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_rel_eqz_filter_type { ++ XA_REL_EQZ_TYPE_THROUGH = 0, ++ XA_REL_EQZ_TYPE_PEAK = 1, ++ XA_REL_EQZ_TYPE_BASS = 2, ++ XA_REL_EQZ_TYPE_TREBLE = 3 ++}; ++ ++enum xa_rel_eqz_type { ++ XA_REL_EQZ_TYPE_PARAMETRIC = 0, ++ XA_REL_EQZ_TYPE_GRAPHIC = 1 ++}; ++ ++/*****************************************************************************/ ++/* Additional subcommand indices */ ++/*****************************************************************************/ ++ ++enum xa_add_cmd_type_generic { ++ /* XA_API_CMD_SET_CONFIG_PARAM indices */ ++ XA_EQZ_CONFIG_PARAM_COEF_FS = 0x0000, ++ XA_EQZ_CONFIG_PARAM_PCM_WIDTH = 0x0001, ++ XA_EQZ_CONFIG_PARAM_CH = 0x0002, ++ XA_EQZ_CONFIG_PARAM_EQZ_TYPE = 0x0003, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC = 0x0010, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_FC = 0x0011, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_FC = 0x0012, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_FC = 0x0013, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_FC = 0x0014, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_FC = 0x0015, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_FC = 0x0016, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_FC = 0x0017, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_FC = 0x0018, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE = 0x0020, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_TYPE = 0x0021, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_TYPE = 0x0022, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_TYPE = 0x0023, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_TYPE = 0x0024, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_TYPE = 0x0025, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_TYPE = 0x0026, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_TYPE = 0x0027, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_TYPE = 0x0028, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW = 0x0030, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BW = 0x0031, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BW = 0x0032, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BW = 0x0033, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BW = 0x0034, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BW = 0x0035, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BW = 0x0036, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BW = 0x0037, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BW = 0x0038, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA = 0x0040, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_GA = 0x0041, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_GA = 0x0042, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_GA = 0x0043, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_GA = 0x0044, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_GA = 0x0045, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_GA = 0x0046, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_GA = 0x0047, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_GA = 0x0048, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA = 0x0050, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BA = 0x0051, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BA = 0x0052, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BA = 0x0053, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BA = 0x0054, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BA = 0x0055, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BA = 0x0056, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BA = 0x0057, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BA = 0x0058, ++ ++ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA = 0x0060, ++ XA_EQZ_CONFIG_PARAM_BAND_1_GCOEF_GA = 0x0061, ++ XA_EQZ_CONFIG_PARAM_BAND_2_GCOEF_GA = 0x0062, ++ XA_EQZ_CONFIG_PARAM_BAND_3_GCOEF_GA = 0x0063, ++ XA_EQZ_CONFIG_PARAM_BAND_4_GCOEF_GA = 0x0064 ++}; ++ ++/* ...tdm-renderer-specific configuration parameters */ ++enum xa_config_param_tdm_renderer { ++ XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH = 0, ++ XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE = 1, ++ XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE = 2, ++ XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE = 3, ++ XA_TDM_RDR_CONFIG_PARAM_OUTPUT1 = 4, ++ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1 = 5, ++ XA_TDM_RDR_CONFIG_PARAM_OUTPUT2 = 6, ++ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2 = 7, ++ XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, ++ XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE = 9 ++}; ++ ++enum xa_rel_tdm_renderer_channel_mode { ++ XA_TDM_RDR_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ ++ /**< 1 six-channels plus 1 two-channels TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_6_2 = 2, ++ XA_TDM_RDR_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ ++}; ++ ++/* ...TDM Capture-specific configuration parameters */ ++enum xa_config_param_tdm_capture { ++ XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH = 0, ++ XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE = 1, ++ XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE = 2, ++ XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE = 3, ++ XA_TDM_CAP_CONFIG_PARAM_INPUT1 = 4, ++ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1 = 5, ++ XA_TDM_CAP_CONFIG_PARAM_INPUT2 = 6, ++ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2 = 7, ++ XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, ++ XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE = 9 ++}; ++ ++enum xa_rel_tdm_capture_channel_mode { ++ XA_TDM_CAP_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ ++ /**< 1 six-channels plus 1 two-channels TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_6_2 = 2, ++ XA_TDM_CAP_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ ++}; ++ ++/*****************************************************************************/ ++/* HW supported */ ++/*****************************************************************************/ ++/* ...SSI modules supported by HW */ ++enum ssi_module { ++ SSI00 = 0, ++ SSI01 = 1, ++ SSI02 = 2, ++ SSI03 = 3, ++ SSI04 = 4, ++ SSI05 = 5, ++ SSI06 = 6, ++ SSI07 = 7, ++ SSI10 = 10, ++ SSI11 = 11, ++ SSI12 = 12, ++ SSI13 = 13, ++ SSI14 = 14, ++ SSI15 = 15, ++ SSI16 = 16, ++ SSI17 = 17, ++ SSI20 = 20, ++ SSI21 = 21, ++ SSI22 = 22, ++ SSI23 = 23, ++ SSI24 = 24, ++ SSI25 = 25, ++ SSI26 = 26, ++ SSI27 = 27, ++ SSI30 = 30, ++ SSI31 = 31, ++ SSI32 = 32, ++ SSI33 = 33, ++ SSI34 = 34, ++ SSI35 = 35, ++ SSI36 = 36, ++ SSI37 = 37, ++ SSI40 = 40, ++ SSI41 = 41, ++ SSI42 = 42, ++ SSI43 = 43, ++ SSI44 = 44, ++ SSI45 = 45, ++ SSI46 = 46, ++ SSI47 = 47, ++ SSI5 = 50, ++ SSI6 = 60, ++ SSI7 = 70, ++ SSI8 = 80, ++ SSI90 = 90, ++ SSI91 = 91, ++ SSI92 = 92, ++ SSI93 = 93, ++ SSI94 = 94, ++ SSI95 = 95, ++ SSI96 = 96, ++ SSI97 = 97 ++}; ++ ++/* ...SRC modules supported by HW */ ++enum src_module { ++ SRC0 = 110, /* SRC0 */ ++ SRC1 = 111, /* SRC1 */ ++ SRC2 = 112, /* SRC2 */ ++ SRC3 = 113, /* SRC3 */ ++ SRC4 = 114, /* SRC4 */ ++ SRC5 = 115, /* SRC5 */ ++ SRC6 = 116, /* SRC6 */ ++ SRC7 = 117, /* SRC7 */ ++ SRC8 = 118, /* SRC8 */ ++ SRC9 = 119, /* SRC9 */ ++ SRCMAX = 120 /* Maximum number of SRC modules */ ++}; ++ ++/* ...PDMA supported by HW */ ++enum { ++ PDMA_CH00 = 0, ++ PDMA_CH01 = 1, ++ PDMA_CH02 = 2, ++ PDMA_CH03 = 3, ++ PDMA_CH04 = 4, ++ PDMA_CH05 = 5, ++ PDMA_CH06 = 6, ++ PDMA_CH07 = 7, ++ PDMA_CH08 = 8, ++ PDMA_CH09 = 9, ++ PDMA_CH10 = 10, ++ PDMA_CH11 = 11, ++ PDMA_CH12 = 12, ++ PDMA_CH13 = 13, ++ PDMA_CH14 = 14, ++ PDMA_CH15 = 15, ++ PDMA_CH16 = 16, ++ PDMA_CH17 = 17, ++ PDMA_CH18 = 18, ++ PDMA_CH19 = 19, ++ PDMA_CH20 = 20, ++ PDMA_CH21 = 21, ++ PDMA_CH22 = 22, ++ PDMA_CH23 = 23, ++ PDMA_CH24 = 24, ++ PDMA_CH25 = 25, ++ PDMA_CH26 = 26, ++ PDMA_CH27 = 27, ++ PDMA_CH28 = 28, ++ PDMA_CHMAX = 29 ++}; ++ ++/* ...DMAC supported by HW */ ++enum { ++ ADMAC_CH00 = PDMA_CHMAX + 0, ++ ADMAC_CH01 = PDMA_CHMAX + 1, ++ ADMAC_CH02 = PDMA_CHMAX + 2, ++ ADMAC_CH03 = PDMA_CHMAX + 3, ++ ADMAC_CH04 = PDMA_CHMAX + 4, ++ ADMAC_CH05 = PDMA_CHMAX + 5, ++ ADMAC_CH06 = PDMA_CHMAX + 6, ++ ADMAC_CH07 = PDMA_CHMAX + 7, ++ ADMAC_CH08 = PDMA_CHMAX + 8, ++ ADMAC_CH09 = PDMA_CHMAX + 9, ++ ADMAC_CH10 = PDMA_CHMAX + 10, ++ ADMAC_CH11 = PDMA_CHMAX + 11, ++ ADMAC_CH12 = PDMA_CHMAX + 12, ++ ADMAC_CH13 = PDMA_CHMAX + 13, ++ ADMAC_CH14 = PDMA_CHMAX + 14, ++ ADMAC_CH15 = PDMA_CHMAX + 15, ++ ADMAC_CH16 = PDMA_CHMAX + 16, ++ ADMAC_CH17 = PDMA_CHMAX + 17, ++ ADMAC_CH18 = PDMA_CHMAX + 18, ++ ADMAC_CH19 = PDMA_CHMAX + 19, ++ ADMAC_CH20 = PDMA_CHMAX + 20, ++ ADMAC_CH21 = PDMA_CHMAX + 21, ++ ADMAC_CH22 = PDMA_CHMAX + 22, ++ ADMAC_CH23 = PDMA_CHMAX + 23, ++ ADMAC_CH24 = PDMA_CHMAX + 24, ++ ADMAC_CH25 = PDMA_CHMAX + 25, ++ ADMAC_CH26 = PDMA_CHMAX + 26, ++ ADMAC_CH27 = PDMA_CHMAX + 27, ++ ADMAC_CH28 = PDMA_CHMAX + 28, ++ ADMAC_CH29 = PDMA_CHMAX + 29, ++ ADMAC_CH30 = PDMA_CHMAX + 30, ++ ADMAC_CH31 = PDMA_CHMAX + 31, ++ ADMAC_CHMAX = PDMA_CHMAX + 32 ++}; ++ ++#endif +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch new file mode 100644 index 00000000..ecab4120 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-ADSP-add-build-for-ADSP-sound-driver.patch @@ -0,0 +1,35 @@ +From 3ae5cb9feda031f660becc94f5496d5ee9b90e22 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Mon, 15 Oct 2018 17:57:56 +0700 +Subject: [PATCH 3/6] ADSP: add build for ADSP sound driver + +Signed-off-by: tienphitran +--- + sound/soc/Kconfig | 1 + + sound/soc/Makefile | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig +index c0abad2067e1..f5f6abbd6e14 100644 +--- a/sound/soc/Kconfig ++++ b/sound/soc/Kconfig +@@ -71,6 +71,7 @@ source "sound/soc/txx9/Kconfig" + source "sound/soc/ux500/Kconfig" + source "sound/soc/xtensa/Kconfig" + source "sound/soc/zte/Kconfig" ++source "sound/soc/adsp/Kconfig" + + # Supported codecs + source "sound/soc/codecs/Kconfig" +diff --git a/sound/soc/Makefile b/sound/soc/Makefile +index bf8c1e2ce0bf..6e77abba2b01 100644 +--- a/sound/soc/Makefile ++++ b/sound/soc/Makefile +@@ -52,3 +52,4 @@ obj-$(CONFIG_SND_SOC) += txx9/ + obj-$(CONFIG_SND_SOC) += ux500/ + obj-$(CONFIG_SND_SOC) += xtensa/ + obj-$(CONFIG_SND_SOC) += zte/ ++obj-$(CONFIG_SND_SOC) += adsp/ +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch new file mode 100644 index 00000000..6d95d65f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch @@ -0,0 +1,185 @@ +From 825517f3f8ebe551d297db16e4582c0eae646f05 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Wed, 31 Oct 2018 16:12:36 +0700 +Subject: [PATCH 4/6] ADSP: integrate ADSP sound for H3, M3, M3N board + +Signed-off-by: tienphitran +[takeshi.kihara.df: fix W=1 dtc warning] +Signed-off-by: Takeshi Kihara +--- + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 ++ + arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 ++ + arch/arm64/boot/dts/renesas/r8a77965.dtsi | 5 ++ + .../boot/dts/renesas/salvator-common.dtsi | 84 +++++++++++++++++-- + 4 files changed, 94 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +index 1896e5250dff..8dfda0fda91c 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +@@ -793,6 +793,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +index c00d1da64198..726c0d07fe59 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +@@ -798,6 +798,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +index 454a67b132f4..799b005ade92 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +@@ -227,6 +227,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +index 922b9cc4797c..2c1d49c4bcaa 100644 +--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi ++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +@@ -153,11 +153,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture", ++ "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -419,8 +435,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -731,6 +766,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -769,7 +843,7 @@ + rsnd_port0: port@0 { + reg = <0>; + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch new file mode 100644 index 00000000..34b32d8f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch @@ -0,0 +1,272 @@ +From 455f26d0de1cf6eaeb0aa5b58725e3e34d8d34bd Mon Sep 17 00:00:00 2001 +From: Nguyen Dang +Date: Tue, 6 Nov 2018 11:36:15 +0700 +Subject: [PATCH 5/6] ADSP: integrate ADSP sound for E3 board + +Signed-off-by: Nguyen Dang +[takeshi.kihara.df: fix W=1 dtc warning] +[takeshi.kihara.df: support for dt file separation by E3 ES1.0 SoC] +Signed-off-by: Takeshi Kihara +--- + .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 84 +++++++++++++++++-- + .../boot/dts/renesas/r8a77990-es10-ebisu.dts | 84 +++++++++++++++++-- + arch/arm64/boot/dts/renesas/r8a77990.dtsi | 5 ++ + 3 files changed, 163 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +index 26081a6e1866..20fdb4085d87 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +@@ -221,11 +221,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture", ++ "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -501,8 +517,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -702,6 +737,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -737,7 +811,7 @@ + ports { + rsnd_port0: port@0 { + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +diff --git a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts +index 087d5533f3db..61e18309c4a4 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts +@@ -221,11 +221,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture", ++ "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -501,8 +517,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -702,6 +737,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -737,7 +811,7 @@ + ports { + rsnd_port0: port@0 { + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi +index bd4d71e2b93e..845399adcbdb 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi +@@ -181,6 +181,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch new file mode 100644 index 00000000..3f601b64 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch @@ -0,0 +1,101 @@ +From acd7751ebcce90a442588f37fc6731990b5e09ea Mon Sep 17 00:00:00 2001 +From: Nguyen Dang +Date: Tue, 6 Nov 2018 11:46:25 +0700 +Subject: [PATCH v2 6/6] ADSP: remove HDMI support from rcar-sound + +Signed-off-by: Nguyen Dang +[takeshi.kihara.df: support for dt file separation by M3v3.0 SoC] +Signed-off-by: Takeshi Kihara +--- + arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 6 ------ + arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 6 ------ + arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 5 ----- + arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts | 5 ----- + arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts | 5 ----- + 5 files changed, 27 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +index 6928afbd8e06..b268afd7df85 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +@@ -104,12 +104,6 @@ + status = "okay"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1 /* HDMI0 */ +- &rsnd_port2>; /* HDMI1 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +index 498f78875dbd..b6ec3036e9fd 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +@@ -114,12 +114,6 @@ + status = "okay"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1 /* HDMI0 */ +- &rsnd_port2>; /* HDMI1 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts +index cf92aa3939e3..4faf935c4a32 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts +@@ -88,11 +88,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts +index 664dc9250bbb..13960f69b2f7 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts +@@ -96,11 +96,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts +index 7d39dc96ac8a..1cd6f0463361 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts +@@ -88,11 +88,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +-- +2.21.0 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb new file mode 100644 index 00000000..6afa4ef4 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux-libc-headers/linux-libc-headers_4.14.bb @@ -0,0 +1,48 @@ +require recipes-kernel/linux-libc-headers/linux-libc-headers.inc +require include/iccom-control.inc +require include/adsp-control.inc + +RENESAS_BSP_URL = " \ + git://github.com/renesas-rcar/linux-bsp.git" +BRANCH = "v4.14.75-ltsi/rcar-3.9.9" +SRCREV = "4d2a32e5d314e2c77346f13e8736e97ca3e1b90b" + +SRC_URI = "${RENESAS_BSP_URL};branch=${BRANCH}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +# Add python3 support to fix Perf build failure +SRC_URI_append = " \ + file://0001-perf-tools-Add-Python-3-support.patch \ +" + +# Fix patch for Weston 8.0.0 issue +SRC_URI_append = " \ + file://0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch \ +" + +# Enable RPMSG_VIRTIO depend on ICCOM +SRC_URI_append = " \ + ${@oe.utils.conditional("USE_ICCOM", "1", " file://0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch", "", d)} \ +" + +# Add ADSP ALSA driver +SUPPORT_ADSP_ASOC = " \ + file://0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch \ + file://0002-ADSP-add-ADSP-sound-driver-source.patch \ + file://0003-ADSP-add-build-for-ADSP-sound-driver.patch \ + file://0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch \ + file://0005-ADSP-integrate-ADSP-sound-for-E3-board.patch \ + file://0006-ADSP-remove-HDMI-support-from-rcar-sound.patch \ +" + +SRC_URI_append = " \ + ${@oe.utils.conditional("USE_ADSP", "1", "${SUPPORT_ADSP_ASOC}", "", d)} \ +" + +S = "${WORKDIR}/git" + +# W/A Fix build issue with Linux v4.14 +SRC_URI_append = " \ + file://0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch new file mode 100644 index 00000000..765053fa --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch @@ -0,0 +1,32 @@ +From 5f378e5db591a4a119b6cface6037cbded240506 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Thu, 25 Oct 2018 13:25:10 +0700 +Subject: [PATCH 1/6] ADSP: add document for compatible string + "renesas,rcar_adsp_sound_gen3" + +Signed-off-by: tienphitran +--- + .../devicetree/bindings/sound/renesas,adsp.txt | 11 +++++++++++ + 1 file changed, 11 insertions(+) + create mode 100644 Documentation/devicetree/bindings/sound/renesas,adsp.txt + +diff --git a/Documentation/devicetree/bindings/sound/renesas,adsp.txt b/Documentation/devicetree/bindings/sound/renesas,adsp.txt +new file mode 100644 +index 000000000000..b529bcadea82 +--- /dev/null ++++ b/Documentation/devicetree/bindings/sound/renesas,adsp.txt +@@ -0,0 +1,11 @@ ++Renesas ADSP sound driver ++ ++Required properties: ++- compatible : "renesas,rcar_adsp_sound_gen3" ++ ++Example: ++ ++rcar_adsp_sound: adsp_sound@0 { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++}; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch new file mode 100644 index 00000000..9c38a327 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch @@ -0,0 +1,61 @@ +From a39cada70268aadff7153e4f782bcd90a5c69d07 Mon Sep 17 00:00:00 2001 +From: Hendrik Brueckner +Date: Mon, 4 Dec 2017 10:56:46 +0100 +Subject: [PATCH] arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT + program type + +Correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type +by exporting the user_pt_regs structure instead of the pt_regs structure +that is in-kernel only. + +Signed-off-by: Hendrik Brueckner +Reviewed-by: Thomas Richter +Acked-by: Alexei Starovoitov +Cc: Will Deacon +Cc: Mark Rutland +Cc: Arnaldo Carvalho de Melo +Signed-off-by: Daniel Borkmann +--- + arch/arm64/include/asm/perf_event.h | 2 ++ + arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ + 2 files changed, 11 insertions(+) + create mode 100644 arch/arm64/include/uapi/asm/bpf_perf_event.h + +diff --git a/arch/arm64/include/asm/perf_event.h b/arch/arm64/include/asm/perf_event.h +index 8d5cbec..f9ccc36 100644 +--- a/arch/arm64/include/asm/perf_event.h ++++ b/arch/arm64/include/asm/perf_event.h +@@ -18,6 +18,7 @@ + #define __ASM_PERF_EVENT_H + + #include ++#include + + #define ARMV8_PMU_MAX_COUNTERS 32 + #define ARMV8_PMU_COUNTER_MASK (ARMV8_PMU_MAX_COUNTERS - 1) +@@ -79,6 +80,7 @@ struct pt_regs; + extern unsigned long perf_instruction_pointer(struct pt_regs *regs); + extern unsigned long perf_misc_flags(struct pt_regs *regs); + #define perf_misc_flags(regs) perf_misc_flags(regs) ++#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs + #endif + + #define perf_arch_fetch_caller_regs(regs, __ip) { \ +diff --git a/arch/arm64/include/uapi/asm/bpf_perf_event.h b/arch/arm64/include/uapi/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..b551b74 +--- /dev/null ++++ b/arch/arm64/include/uapi/asm/bpf_perf_event.h +@@ -0,0 +1,9 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ ++#define _UAPI__ASM_BPF_PERF_EVENT_H__ ++ ++#include ++ ++typedef struct user_pt_regs bpf_user_pt_regs_t; ++ ++#endif /* _UAPI__ASM_BPF_PERF_EVENT_H__ */ +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch new file mode 100644 index 00000000..9ce66d64 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch @@ -0,0 +1,89 @@ +From f8358c2afe0be62cffe4cca58c5373951ecc1c8d Mon Sep 17 00:00:00 2001 +From: Khang Nguyen +Date: Mon, 13 Apr 2020 21:49:28 +0900 +Subject: [PATCH] drm: rcar-du: Set primary plane zpos immutably at + initializing + +This patch backports a fix from [1] for an issue occurs on Weston 8.0.0. + +[1]: +https://lists.freedesktop.org/archives/dri-devel/2020-April/261224.html + +According to drm_plane_create_zpos_property() function documentation, +all planes zpos range should be set if zpos property is supported. +However, the rcar-du driver didn't set primary plane zpos range. Since +the primary plane's zpos is fixed, set it immutably. + +Signed-off-by: Khang Nguyen +Signed-off-by: Tram Huynh +--- + drivers/gpu/drm/rcar-du/rcar_du_plane.c | 13 ++++++++----- + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 18 ++++++++++-------- + 2 files changed, 18 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c +index 1b70db3..5818c59 100644 +--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c ++++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c +@@ -825,15 +825,18 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) + drm_plane_helper_add(&plane->plane, + &rcar_du_plane_helper_funcs); + +- if (type == DRM_PLANE_TYPE_PRIMARY) +- continue; ++ if (type == DRM_PLANE_TYPE_PRIMARY){ ++ drm_plane_create_zpos_immutable_property(&plane->plane, ++ 0); ++ } else { + +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.alpha, 255); +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey, + RCAR_DU_COLORKEY_NONE); +- drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); ++ drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); ++ } + } + + return 0; +diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +index c44d336..0c352a0 100644 +--- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c ++++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +@@ -633,20 +633,22 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, + drm_plane_helper_add(&plane->plane, + &rcar_du_vsp_plane_helper_funcs); + +- if (type == DRM_PLANE_TYPE_PRIMARY) +- continue; +- +- drm_object_attach_property(&plane->plane.base, ++ if (type == DRM_PLANE_TYPE_PRIMARY) { ++ drm_plane_create_zpos_immutable_property(&plane->plane, ++ 0); ++ } else { ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.alpha, 255); +- drm_object_attach_property(&plane->plane.base, ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey, + RCAR_DU_COLORKEY_NONE); +- if (rcdu->props.colorkey_alpha) +- drm_object_attach_property(&plane->plane.base, ++ if (rcdu->props.colorkey_alpha) ++ drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey_alpha, + 0); +- drm_plane_create_zpos_property(&plane->plane, 1, 1, ++ drm_plane_create_zpos_property(&plane->plane, 1, 1, + vsp->num_planes - 1); ++ } + } + + return 0; +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-perf-tools-Add-Python-3-support.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-perf-tools-Add-Python-3-support.patch new file mode 100644 index 00000000..74ce61e5 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-perf-tools-Add-Python-3-support.patch @@ -0,0 +1,917 @@ +From 8804547988bb772a00cd4bb832fe4e1a79f552b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Fri, 19 Jan 2018 21:56:41 +0100 +Subject: [PATCH] perf tools: Add Python 3 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Added Python 3 support while keeping Python 2.7 compatibility. + +Committer notes: + +This doesn't make it to auto detect python 3, one has to explicitely ask +it to build with python 3 devel files, here are the instructions +provided by Jaroslav: + + --- + $ cp -a tools/perf tools/python3-perf + $ make V=1 prefix=/usr -C tools/perf PYTHON=/usr/bin/python2 all + $ make V=1 prefix=/usr -C tools/python3-perf PYTHON=/usr/bin/python3 all + $ make V=1 prefix=/usr -C tools/python3-perf PYTHON=/usr/bin/python3 DESTDIR=%{buildroot} install-python_ext + $ make V=1 prefix=/usr -C tools/perf PYTHON=/usr/bin/python2 DESTDIR=%{buildroot} install-python_ext + --- + +We need to make this automatic, just like the existing tests for checking if +the python2 devel files are in place, allowing the build with python3 if +available, fallbacking to python2 and then just disabling it if none are +available. + +So, using the PYTHON variable to build it using O= we get: + +Before this patch: + + $ rpm -q python3 python3-devel + python3-3.6.4-7.fc27.x86_64 + python3-devel-3.6.4-7.fc27.x86_64 + $ rm -rf /tmp/build/perf/ ; mkdir -p /tmp/build/perf ; make O=/tmp/build/perf PYTHON=/usr/bin/python3 -C tools/perf install-bin + make: Entering directory '/home/acme/git/linux/tools/perf' + + Makefile.config:670: Python 3 is not yet supported; please set + Makefile.config:671: PYTHON and/or PYTHON_CONFIG appropriately. + Makefile.config:672: If you also have Python 2 installed, then + Makefile.config:673: try something like: + Makefile.config:674: + Makefile.config:675: make PYTHON=python2 + Makefile.config:676: + Makefile.config:677: Otherwise, disable Python support entirely: + Makefile.config:678: + Makefile.config:679: make NO_LIBPYTHON=1 + Makefile.config:680: + Makefile.config:681: *** . Stop. + make[1]: *** [Makefile.perf:212: sub-make] Error 2 + make: *** [Makefile:110: install-bin] Error 2 + make: Leaving directory '/home/acme/git/linux/tools/perf' + $ + +After: + + $ make O=/tmp/build/perf PYTHON=python3 -C tools/perf install-bin + $ ldd ~/bin/perf | grep python + libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f58a31e8000) + $ rpm -qf /lib64/libpython3.6m.so.1.0 + python3-libs-3.6.4-7.fc27.x86_64 + $ + +Now verify that when using the binding the right ELF file is loaded, +using perf trace: + + $ perf trace -e open* perf test python + 0.051 ( 0.016 ms): perf/3927 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 + + 18: 'import perf' in python : + 8.849 ( 0.013 ms): sh/3929 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC ) = 3 + + 25.572 ( 0.008 ms): python3/3931 openat(dfd: CWD, filename: /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so, flags: CLOEXEC) = 3 + + Ok + + $ + +And using tools/perf/python/twatch.py, to show PERF_RECORD_ metaevents: + + $ python3 tools/perf/python/twatch.py + cpu: 3, pid: 16060, tid: 16060 { type: fork, pid: 5207, ppid: 16060, tid: 5207, ptid: 16060, time: 10798513015459} + cpu: 3, pid: 16060, tid: 16060 { type: fork, pid: 5208, ppid: 16060, tid: 5208, ptid: 16060, time: 10798513562503} + cpu: 0, pid: 5208, tid: 5208 { type: comm, pid: 5208, tid: 5208, comm: grep } + cpu: 2, pid: 5207, tid: 5207 { type: comm, pid: 5207, tid: 5207, comm: ps } + cpu: 2, pid: 5207, tid: 5207 { type: exit, pid: 5207, ppid: 5207, tid: 5207, ptid: 5207, time: 10798551337484} + cpu: 3, pid: 5208, tid: 5208 { type: exit, pid: 5208, ppid: 5208, tid: 5208, ptid: 5208, time: 10798551292153} + cpu: 3, pid: 601, tid: 601 { type: fork, pid: 5209, ppid: 601, tid: 5209, ptid: 601, time: 10801779977324} + ^CTraceback (most recent call last): + File "tools/perf/python/twatch.py", line 68, in + main() + File "tools/perf/python/twatch.py", line 40, in main + evlist.poll(timeout = -1) + KeyboardInterrupt + $ + + # ps ax|grep twatch + 5197 pts/8 S+ 0:00 python3 tools/perf/python/twatch.py + # ls -la /proc/5197/smaps + -r--r--r--. 1 acme acme 0 Feb 19 13:14 /proc/5197/smaps + # grep python /proc/5197/smaps + 558111307000-558111309000 r-xp 00000000 fd:00 3151710 /usr/bin/python3.6 + 558111508000-558111509000 r--p 00001000 fd:00 3151710 /usr/bin/python3.6 + 558111509000-55811150a000 rw-p 00002000 fd:00 3151710 /usr/bin/python3.6 + 7ffad6fc1000-7ffad7008000 r-xp 00000000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7008000-7ffad7207000 ---p 00047000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7207000-7ffad7208000 r--p 00046000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffad7208000-7ffad7215000 rw-p 00047000 00:2d 220196 /tmp/build/perf/python/perf.cpython-36m-x86_64-linux-gnu.so + 7ffadea77000-7ffaded3d000 r-xp 00000000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffaded3d000-7ffadef3c000 ---p 002c6000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffadef3c000-7ffadef42000 r--p 002c5000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + 7ffadef42000-7ffadefa5000 rw-p 002cb000 fd:00 3151795 /usr/lib64/libpython3.6m.so.1.0 + # + +And with this patch, but building normally, without specifying the +PYTHON=python3 part, which will make it use python2 if its devel files are +available, like in this test: + + $ make O=/tmp/build/perf -C tools/perf install-bin + $ ldd ~/bin/perf | grep python + libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f6a44410000) + $ ldd /tmp/build/perf/python_ext_build/lib/perf.so | grep python + libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fed28a2c000) + $ + + [acme@jouet perf]$ tools/perf/python/twatch.py + cpu: 0, pid: 2817, tid: 2817 { type: fork, pid: 2817, ppid: 2817, tid: 8910, ptid: 2817, time: 11126454335306} + cpu: 0, pid: 2817, tid: 2817 { type: comm, pid: 2817, tid: 8910, comm: worker } + $ ps ax | grep twatch.py + 8909 pts/8 S+ 0:00 /usr/bin/python tools/perf/python/twatch.py + $ grep python /proc/8909/smaps + 5579de658000-5579de659000 r-xp 00000000 fd:00 3156044 /usr/bin/python2.7 + 5579de858000-5579de859000 r--p 00000000 fd:00 3156044 /usr/bin/python2.7 + 5579de859000-5579de85a000 rw-p 00001000 fd:00 3156044 /usr/bin/python2.7 + 7f0de01f7000-7f0de023e000 r-xp 00000000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de023e000-7f0de043d000 ---p 00047000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de043d000-7f0de043e000 r--p 00046000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de043e000-7f0de044b000 rw-p 00047000 00:2d 230695 /tmp/build/perf/python/perf.so + 7f0de6f0f000-7f0de6f13000 r-xp 00000000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de6f13000-7f0de7113000 ---p 00004000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7113000-7f0de7114000 r--p 00004000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7114000-7f0de7115000 rw-p 00005000 fd:00 134975 /usr/lib64/python2.7/lib-dynload/_localemodule.so + 7f0de7e73000-7f0de8052000 r-xp 00000000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8052000-7f0de8251000 ---p 001df000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8251000-7f0de8255000 r--p 001de000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + 7f0de8255000-7f0de8291000 rw-p 001e2000 fd:00 3173292 /usr/lib64/libpython2.7.so.1.0 + $ + +Signed-off-by: Jaroslav Å karvada +Tested-by: Arnaldo Carvalho de Melo +Cc: Adrian Hunter +Cc: David Ahern +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: Wang Nan +LPU-Reference: 20180119205641.24242-1-jskarvad@redhat.com +Link: https://lkml.kernel.org/n/tip-8d7dt9kqp83vsz25hagug8fu@git.kernel.org +[ Removed explicit check for python version, allowing it to really build with python3 ] +Signed-off-by: Arnaldo Carvalho de Melo + +Upstream status: Backport [https://github.com/torvalds/linux/commit/66dfdff03d196e51322c6a85c0d8db8bb2bdd655] +Signed-off-by: Naveen Saini +--- + tools/perf/Makefile.config | 23 +-- + tools/perf/Makefile.perf | 4 +- + .../scripts/python/Perf-Trace-Util/Context.c | 34 +++- + tools/perf/util/python.c | 95 ++++++++--- + .../scripting-engines/trace-event-python.c | 147 +++++++++++++----- + tools/perf/util/setup.py | 6 +- + 6 files changed, 221 insertions(+), 88 deletions(-) + +diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config +index f362ee46506a..ecdc3770d899 100644 +--- a/tools/perf/Makefile.config ++++ b/tools/perf/Makefile.config +@@ -622,25 +622,10 @@ else + ifneq ($(feature-libpython), 1) + $(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev) + else +- ifneq ($(feature-libpython-version), 1) +- $(warning Python 3 is not yet supported; please set) +- $(warning PYTHON and/or PYTHON_CONFIG appropriately.) +- $(warning If you also have Python 2 installed, then) +- $(warning try something like:) +- $(warning $(and ,)) +- $(warning $(and ,) make PYTHON=python2) +- $(warning $(and ,)) +- $(warning Otherwise, disable Python support entirely:) +- $(warning $(and ,)) +- $(warning $(and ,) make NO_LIBPYTHON=1) +- $(warning $(and ,)) +- $(error $(and ,)) +- else +- LDFLAGS += $(PYTHON_EMBED_LDFLAGS) +- EXTLIBS += $(PYTHON_EMBED_LIBADD) +- LANG_BINDINGS += $(obj-perf)python/perf.so +- $(call detected,CONFIG_LIBPYTHON) +- endif ++ LDFLAGS += $(PYTHON_EMBED_LDFLAGS) ++ EXTLIBS += $(PYTHON_EMBED_LIBADD) ++ LANG_BINDINGS += $(obj-perf)python/perf.so ++ $(call detected,CONFIG_LIBPYTHON) + endif + endif + endif +diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf +index 349ea5133d83..6879321c612d 100644 +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -294,7 +294,7 @@ PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ + PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/ + export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP + +-python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so ++python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT)python/perf*.so + + PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) + PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI) +@@ -444,7 +444,7 @@ $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_D + $(PYTHON_WORD) util/setup.py \ + --quiet build_ext; \ + mkdir -p $(OUTPUT)python && \ +- cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ ++ cp $(PYTHON_EXTBUILD_LIB)perf*.so $(OUTPUT)python/ + + please_set_SHELL_PATH_to_a_more_modern_shell: + $(Q)$$(:) +diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Context.c b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +index fcd1dd667906..1a0d27757eec 100644 +--- a/tools/perf/scripts/python/Perf-Trace-Util/Context.c ++++ b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +@@ -23,7 +23,17 @@ + #include "../../../perf.h" + #include "../../../util/trace-event.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyCapsule_GetPointer(arg1, arg2) \ ++ PyCObject_AsVoidPtr(arg1) ++ + PyMODINIT_FUNC initperf_trace_context(void); ++#else ++#define _PyCapsule_GetPointer(arg1, arg2) \ ++ PyCapsule_GetPointer((arg1), (arg2)) ++ ++PyMODINIT_FUNC PyInit_perf_trace_context(void); ++#endif + + static PyObject *perf_trace_context_common_pc(PyObject *obj, PyObject *args) + { +@@ -34,7 +44,7 @@ static PyObject *perf_trace_context_common_pc(PyObject *obj, PyObject *args) + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_pc(scripting_context); + + return Py_BuildValue("i", retval); +@@ -50,7 +60,7 @@ static PyObject *perf_trace_context_common_flags(PyObject *obj, + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_flags(scripting_context); + + return Py_BuildValue("i", retval); +@@ -66,7 +76,7 @@ static PyObject *perf_trace_context_common_lock_depth(PyObject *obj, + if (!PyArg_ParseTuple(args, "O", &context)) + return NULL; + +- scripting_context = PyCObject_AsVoidPtr(context); ++ scripting_context = _PyCapsule_GetPointer(context, NULL); + retval = common_lock_depth(scripting_context); + + return Py_BuildValue("i", retval); +@@ -82,7 +92,25 @@ static PyMethodDef ContextMethods[] = { + { NULL, NULL, 0, NULL} + }; + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf_trace_context(void) + { + (void) Py_InitModule("perf_trace_context", ContextMethods); + } ++#else ++PyMODINIT_FUNC PyInit_perf_trace_context(void) ++{ ++ static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "perf_trace_context", /* m_name */ ++ "", /* m_doc */ ++ -1, /* m_size */ ++ ContextMethods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++ return PyModule_Create(&moduledef); ++} ++#endif +diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c +index 8e49d9cafcfc..16620c37fd8c 100644 +--- a/tools/perf/util/python.c ++++ b/tools/perf/util/python.c +@@ -12,6 +12,30 @@ + #include "print_binary.h" + #include "thread_map.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyUnicode_FromString(arg) \ ++ PyString_FromString(arg) ++#define _PyUnicode_AsString(arg) \ ++ PyString_AsString(arg) ++#define _PyUnicode_FromFormat(...) \ ++ PyString_FromFormat(__VA_ARGS__) ++#define _PyLong_FromLong(arg) \ ++ PyInt_FromLong(arg) ++ ++#else ++ ++#define _PyUnicode_FromString(arg) \ ++ PyUnicode_FromString(arg) ++#define _PyUnicode_FromFormat(...) \ ++ PyUnicode_FromFormat(__VA_ARGS__) ++#define _PyLong_FromLong(arg) \ ++ PyLong_FromLong(arg) ++#endif ++ ++#ifndef Py_TYPE ++#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) ++#endif ++ + /* + * Provide these two so that we don't have to link against callchain.c and + * start dragging hist.c, etc. +@@ -49,7 +73,11 @@ int eprintf(int level, int var, const char *fmt, ...) + # define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size, + #endif + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf(void); ++#else ++PyMODINIT_FUNC PyInit_perf(void); ++#endif + + #define member_def(type, member, ptype, help) \ + { #member, ptype, \ +@@ -107,7 +135,7 @@ static PyObject *pyrf_mmap_event__repr(struct pyrf_event *pevent) + pevent->event.mmap.pgoff, pevent->event.mmap.filename) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -138,7 +166,7 @@ static PyMemberDef pyrf_task_event__members[] = { + + static PyObject *pyrf_task_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: %s, pid: %u, ppid: %u, tid: %u, " ++ return _PyUnicode_FromFormat("{ type: %s, pid: %u, ppid: %u, tid: %u, " + "ptid: %u, time: %" PRIu64 "}", + pevent->event.header.type == PERF_RECORD_FORK ? "fork" : "exit", + pevent->event.fork.pid, +@@ -171,7 +199,7 @@ static PyMemberDef pyrf_comm_event__members[] = { + + static PyObject *pyrf_comm_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: comm, pid: %u, tid: %u, comm: %s }", ++ return _PyUnicode_FromFormat("{ type: comm, pid: %u, tid: %u, comm: %s }", + pevent->event.comm.pid, + pevent->event.comm.tid, + pevent->event.comm.comm); +@@ -202,7 +230,7 @@ static PyObject *pyrf_throttle_event__repr(struct pyrf_event *pevent) + { + struct throttle_event *te = (struct throttle_event *)(&pevent->event.header + 1); + +- return PyString_FromFormat("{ type: %sthrottle, time: %" PRIu64 ", id: %" PRIu64 ++ return _PyUnicode_FromFormat("{ type: %sthrottle, time: %" PRIu64 ", id: %" PRIu64 + ", stream_id: %" PRIu64 " }", + pevent->event.header.type == PERF_RECORD_THROTTLE ? "" : "un", + te->time, te->id, te->stream_id); +@@ -237,7 +265,7 @@ static PyObject *pyrf_lost_event__repr(struct pyrf_event *pevent) + pevent->event.lost.id, pevent->event.lost.lost) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -264,7 +292,7 @@ static PyMemberDef pyrf_read_event__members[] = { + + static PyObject *pyrf_read_event__repr(struct pyrf_event *pevent) + { +- return PyString_FromFormat("{ type: read, pid: %u, tid: %u }", ++ return _PyUnicode_FromFormat("{ type: read, pid: %u, tid: %u }", + pevent->event.read.pid, + pevent->event.read.tid); + /* +@@ -299,7 +327,7 @@ static PyObject *pyrf_sample_event__repr(struct pyrf_event *pevent) + if (asprintf(&s, "{ type: sample }") < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -330,7 +358,7 @@ tracepoint_field(struct pyrf_event *pe, struct format_field *field) + } + if (field->flags & FIELD_IS_STRING && + is_printable_array(data + offset, len)) { +- ret = PyString_FromString((char *)data + offset); ++ ret = _PyUnicode_FromString((char *)data + offset); + } else { + ret = PyByteArray_FromStringAndSize((const char *) data + offset, len); + field->flags &= ~FIELD_IS_STRING; +@@ -352,7 +380,7 @@ tracepoint_field(struct pyrf_event *pe, struct format_field *field) + static PyObject* + get_tracepoint_field(struct pyrf_event *pevent, PyObject *attr_name) + { +- const char *str = PyString_AsString(PyObject_Str(attr_name)); ++ const char *str = _PyUnicode_AsString(PyObject_Str(attr_name)); + struct perf_evsel *evsel = pevent->evsel; + struct format_field *field; + +@@ -416,7 +444,7 @@ static PyObject *pyrf_context_switch_event__repr(struct pyrf_event *pevent) + !!(pevent->event.header.misc & PERF_RECORD_MISC_SWITCH_OUT)) < 0) { + ret = PyErr_NoMemory(); + } else { +- ret = PyString_FromString(s); ++ ret = _PyUnicode_FromString(s); + free(s); + } + return ret; +@@ -528,7 +556,7 @@ static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus, + static void pyrf_cpu_map__delete(struct pyrf_cpu_map *pcpus) + { + cpu_map__put(pcpus->cpus); +- pcpus->ob_type->tp_free((PyObject*)pcpus); ++ Py_TYPE(pcpus)->tp_free((PyObject*)pcpus); + } + + static Py_ssize_t pyrf_cpu_map__length(PyObject *obj) +@@ -597,7 +625,7 @@ static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads, + static void pyrf_thread_map__delete(struct pyrf_thread_map *pthreads) + { + thread_map__put(pthreads->threads); +- pthreads->ob_type->tp_free((PyObject*)pthreads); ++ Py_TYPE(pthreads)->tp_free((PyObject*)pthreads); + } + + static Py_ssize_t pyrf_thread_map__length(PyObject *obj) +@@ -759,7 +787,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel, + static void pyrf_evsel__delete(struct pyrf_evsel *pevsel) + { + perf_evsel__exit(&pevsel->evsel); +- pevsel->ob_type->tp_free((PyObject*)pevsel); ++ Py_TYPE(pevsel)->tp_free((PyObject*)pevsel); + } + + static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, +@@ -850,7 +878,7 @@ static int pyrf_evlist__init(struct pyrf_evlist *pevlist, + static void pyrf_evlist__delete(struct pyrf_evlist *pevlist) + { + perf_evlist__exit(&pevlist->evlist); +- pevlist->ob_type->tp_free((PyObject*)pevlist); ++ Py_TYPE(pevlist)->tp_free((PyObject*)pevlist); + } + + static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist, +@@ -902,12 +930,16 @@ static PyObject *pyrf_evlist__get_pollfd(struct pyrf_evlist *pevlist, + + for (i = 0; i < evlist->pollfd.nr; ++i) { + PyObject *file; ++#if PY_MAJOR_VERSION < 3 + FILE *fp = fdopen(evlist->pollfd.entries[i].fd, "r"); + + if (fp == NULL) + goto free_list; + + file = PyFile_FromFile(fp, "perf", "r", NULL); ++#else ++ file = PyFile_FromFd(evlist->pollfd.entries[i].fd, "perf", "r", -1, NULL, NULL, NULL, 1); ++#endif + if (file == NULL) + goto free_list; + +@@ -1194,9 +1226,9 @@ static PyObject *pyrf__tracepoint(struct pyrf_evsel *pevsel, + + tp_format = trace_event__tp_format(sys, name); + if (IS_ERR(tp_format)) +- return PyInt_FromLong(-1); ++ return _PyLong_FromLong(-1); + +- return PyInt_FromLong(tp_format->id); ++ return _PyLong_FromLong(tp_format->id); + } + + static PyMethodDef perf__methods[] = { +@@ -1209,11 +1241,31 @@ static PyMethodDef perf__methods[] = { + { .ml_name = NULL, } + }; + ++#if PY_MAJOR_VERSION < 3 + PyMODINIT_FUNC initperf(void) ++#else ++PyMODINIT_FUNC PyInit_perf(void) ++#endif + { + PyObject *obj; + int i; +- PyObject *dict, *module = Py_InitModule("perf", perf__methods); ++ PyObject *dict; ++#if PY_MAJOR_VERSION < 3 ++ PyObject *module = Py_InitModule("perf", perf__methods); ++#else ++ static struct PyModuleDef moduledef = { ++ PyModuleDef_HEAD_INIT, ++ "perf", /* m_name */ ++ "", /* m_doc */ ++ -1, /* m_size */ ++ perf__methods, /* m_methods */ ++ NULL, /* m_reload */ ++ NULL, /* m_traverse */ ++ NULL, /* m_clear */ ++ NULL, /* m_free */ ++ }; ++ PyObject *module = PyModule_Create(&moduledef); ++#endif + + if (module == NULL || + pyrf_event__setup_types() < 0 || +@@ -1221,7 +1273,11 @@ PyMODINIT_FUNC initperf(void) + pyrf_evsel__setup_types() < 0 || + pyrf_thread_map__setup_types() < 0 || + pyrf_cpu_map__setup_types() < 0) ++#if PY_MAJOR_VERSION < 3 + return; ++#else ++ return module; ++#endif + + /* The page_size is placed in util object. */ + page_size = sysconf(_SC_PAGE_SIZE); +@@ -1270,7 +1326,7 @@ PyMODINIT_FUNC initperf(void) + goto error; + + for (i = 0; perf__constants[i].name != NULL; i++) { +- obj = PyInt_FromLong(perf__constants[i].value); ++ obj = _PyLong_FromLong(perf__constants[i].value); + if (obj == NULL) + goto error; + PyDict_SetItemString(dict, perf__constants[i].name, obj); +@@ -1280,6 +1336,9 @@ PyMODINIT_FUNC initperf(void) + error: + if (PyErr_Occurred()) + PyErr_SetString(PyExc_ImportError, "perf: Init failed!"); ++#if PY_MAJOR_VERSION >= 3 ++ return module; ++#endif + } + + /* +diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c +index f03fa7a835a1..8db28d4ff4b6 100644 +--- a/tools/perf/util/scripting-engines/trace-event-python.c ++++ b/tools/perf/util/scripting-engines/trace-event-python.c +@@ -50,7 +50,37 @@ + #include "print_binary.h" + #include "stat.h" + ++#if PY_MAJOR_VERSION < 3 ++#define _PyUnicode_FromString(arg) \ ++ PyString_FromString(arg) ++#define _PyUnicode_FromStringAndSize(arg1, arg2) \ ++ PyString_FromStringAndSize((arg1), (arg2)) ++#define _PyBytes_FromStringAndSize(arg1, arg2) \ ++ PyString_FromStringAndSize((arg1), (arg2)) ++#define _PyLong_FromLong(arg) \ ++ PyInt_FromLong(arg) ++#define _PyLong_AsLong(arg) \ ++ PyInt_AsLong(arg) ++#define _PyCapsule_New(arg1, arg2, arg3) \ ++ PyCObject_FromVoidPtr((arg1), (arg2)) ++ + PyMODINIT_FUNC initperf_trace_context(void); ++#else ++#define _PyUnicode_FromString(arg) \ ++ PyUnicode_FromString(arg) ++#define _PyUnicode_FromStringAndSize(arg1, arg2) \ ++ PyUnicode_FromStringAndSize((arg1), (arg2)) ++#define _PyBytes_FromStringAndSize(arg1, arg2) \ ++ PyBytes_FromStringAndSize((arg1), (arg2)) ++#define _PyLong_FromLong(arg) \ ++ PyLong_FromLong(arg) ++#define _PyLong_AsLong(arg) \ ++ PyLong_AsLong(arg) ++#define _PyCapsule_New(arg1, arg2, arg3) \ ++ PyCapsule_New((arg1), (arg2), (arg3)) ++ ++PyMODINIT_FUNC PyInit_perf_trace_context(void); ++#endif + + #define TRACE_EVENT_TYPE_MAX \ + ((1 << (sizeof(unsigned short) * 8)) - 1) +@@ -136,7 +166,7 @@ static int get_argument_count(PyObject *handler) + PyObject *arg_count_obj = PyObject_GetAttrString(code_obj, + "co_argcount"); + if (arg_count_obj) { +- arg_count = (int) PyInt_AsLong(arg_count_obj); ++ arg_count = (int) _PyLong_AsLong(arg_count_obj); + Py_DECREF(arg_count_obj); + } + Py_DECREF(code_obj); +@@ -183,10 +213,10 @@ static void define_value(enum print_arg_type field_type, + + value = eval_flag(field_value); + +- PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_name)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(value)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_str)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(value)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_str)); + + try_call_object(handler_name, t); + +@@ -224,10 +254,10 @@ static void define_field(enum print_arg_type field_type, + if (!t) + Py_FatalError("couldn't create Python tuple"); + +- PyTuple_SetItem(t, n++, PyString_FromString(ev_name)); +- PyTuple_SetItem(t, n++, PyString_FromString(field_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name)); + if (field_type == PRINT_FLAGS) +- PyTuple_SetItem(t, n++, PyString_FromString(delim)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(delim)); + + try_call_object(handler_name, t); + +@@ -326,12 +356,12 @@ static PyObject *get_field_numeric_entry(struct event_format *event, + if (field->flags & FIELD_IS_SIGNED) { + if ((long long)val >= LONG_MIN && + (long long)val <= LONG_MAX) +- obj = PyInt_FromLong(val); ++ obj = _PyLong_FromLong(val); + else + obj = PyLong_FromLongLong(val); + } else { + if (val <= LONG_MAX) +- obj = PyInt_FromLong(val); ++ obj = _PyLong_FromLong(val); + else + obj = PyLong_FromUnsignedLongLong(val); + } +@@ -390,9 +420,9 @@ static PyObject *python_process_callchain(struct perf_sample *sample, + pydict_set_item_string_decref(pysym, "end", + PyLong_FromUnsignedLongLong(node->sym->end)); + pydict_set_item_string_decref(pysym, "binding", +- PyInt_FromLong(node->sym->binding)); ++ _PyLong_FromLong(node->sym->binding)); + pydict_set_item_string_decref(pysym, "name", +- PyString_FromStringAndSize(node->sym->name, ++ _PyUnicode_FromStringAndSize(node->sym->name, + node->sym->namelen)); + pydict_set_item_string_decref(pyelem, "sym", pysym); + } +@@ -407,7 +437,7 @@ static PyObject *python_process_callchain(struct perf_sample *sample, + dsoname = map->dso->name; + } + pydict_set_item_string_decref(pyelem, "dso", +- PyString_FromString(dsoname)); ++ _PyUnicode_FromString(dsoname)); + } + + callchain_cursor_advance(&callchain_cursor); +@@ -484,16 +514,16 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, + if (!dict_sample) + Py_FatalError("couldn't create Python dictionary"); + +- pydict_set_item_string_decref(dict, "ev_name", PyString_FromString(perf_evsel__name(evsel))); +- pydict_set_item_string_decref(dict, "attr", PyString_FromStringAndSize( ++ pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(perf_evsel__name(evsel))); ++ pydict_set_item_string_decref(dict, "attr", _PyUnicode_FromStringAndSize( + (const char *)&evsel->attr, sizeof(evsel->attr))); + + pydict_set_item_string_decref(dict_sample, "pid", +- PyInt_FromLong(sample->pid)); ++ _PyLong_FromLong(sample->pid)); + pydict_set_item_string_decref(dict_sample, "tid", +- PyInt_FromLong(sample->tid)); ++ _PyLong_FromLong(sample->tid)); + pydict_set_item_string_decref(dict_sample, "cpu", +- PyInt_FromLong(sample->cpu)); ++ _PyLong_FromLong(sample->cpu)); + pydict_set_item_string_decref(dict_sample, "ip", + PyLong_FromUnsignedLongLong(sample->ip)); + pydict_set_item_string_decref(dict_sample, "time", +@@ -503,17 +533,17 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, + set_sample_read_in_dict(dict_sample, sample, evsel); + pydict_set_item_string_decref(dict, "sample", dict_sample); + +- pydict_set_item_string_decref(dict, "raw_buf", PyString_FromStringAndSize( ++ pydict_set_item_string_decref(dict, "raw_buf", _PyBytes_FromStringAndSize( + (const char *)sample->raw_data, sample->raw_size)); + pydict_set_item_string_decref(dict, "comm", +- PyString_FromString(thread__comm_str(al->thread))); ++ _PyUnicode_FromString(thread__comm_str(al->thread))); + if (al->map) { + pydict_set_item_string_decref(dict, "dso", +- PyString_FromString(al->map->dso->name)); ++ _PyUnicode_FromString(al->map->dso->name)); + } + if (al->sym) { + pydict_set_item_string_decref(dict, "symbol", +- PyString_FromString(al->sym->name)); ++ _PyUnicode_FromString(al->sym->name)); + } + + pydict_set_item_string_decref(dict, "callchain", callchain); +@@ -573,9 +603,9 @@ static void python_process_tracepoint(struct perf_sample *sample, + scripting_context->event_data = data; + scripting_context->pevent = evsel->tp_format->pevent; + +- context = PyCObject_FromVoidPtr(scripting_context, NULL); ++ context = _PyCapsule_New(scripting_context, NULL, NULL); + +- PyTuple_SetItem(t, n++, PyString_FromString(handler_name)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(handler_name)); + PyTuple_SetItem(t, n++, context); + + /* ip unwinding */ +@@ -584,18 +614,18 @@ static void python_process_tracepoint(struct perf_sample *sample, + Py_INCREF(callchain); + + if (!dict) { +- PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(s)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(ns)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(pid)); +- PyTuple_SetItem(t, n++, PyString_FromString(comm)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(s)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(ns)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(pid)); ++ PyTuple_SetItem(t, n++, _PyUnicode_FromString(comm)); + PyTuple_SetItem(t, n++, callchain); + } else { +- pydict_set_item_string_decref(dict, "common_cpu", PyInt_FromLong(cpu)); +- pydict_set_item_string_decref(dict, "common_s", PyInt_FromLong(s)); +- pydict_set_item_string_decref(dict, "common_ns", PyInt_FromLong(ns)); +- pydict_set_item_string_decref(dict, "common_pid", PyInt_FromLong(pid)); +- pydict_set_item_string_decref(dict, "common_comm", PyString_FromString(comm)); ++ pydict_set_item_string_decref(dict, "common_cpu", _PyLong_FromLong(cpu)); ++ pydict_set_item_string_decref(dict, "common_s", _PyLong_FromLong(s)); ++ pydict_set_item_string_decref(dict, "common_ns", _PyLong_FromLong(ns)); ++ pydict_set_item_string_decref(dict, "common_pid", _PyLong_FromLong(pid)); ++ pydict_set_item_string_decref(dict, "common_comm", _PyUnicode_FromString(comm)); + pydict_set_item_string_decref(dict, "common_callchain", callchain); + } + for (field = event->format.fields; field; field = field->next) { +@@ -614,7 +644,7 @@ static void python_process_tracepoint(struct perf_sample *sample, + } + if (field->flags & FIELD_IS_STRING && + is_printable_array(data + offset, len)) { +- obj = PyString_FromString((char *) data + offset); ++ obj = _PyUnicode_FromString((char *) data + offset); + } else { + obj = PyByteArray_FromStringAndSize((const char *) data + offset, len); + field->flags &= ~FIELD_IS_STRING; +@@ -664,7 +694,7 @@ static PyObject *tuple_new(unsigned int sz) + static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) + { + #if BITS_PER_LONG == 64 +- return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); ++ return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); + #endif + #if BITS_PER_LONG == 32 + return PyTuple_SetItem(t, pos, PyLong_FromLongLong(val)); +@@ -673,12 +703,12 @@ static int tuple_set_u64(PyObject *t, unsigned int pos, u64 val) + + static int tuple_set_s32(PyObject *t, unsigned int pos, s32 val) + { +- return PyTuple_SetItem(t, pos, PyInt_FromLong(val)); ++ return PyTuple_SetItem(t, pos, _PyLong_FromLong(val)); + } + + static int tuple_set_string(PyObject *t, unsigned int pos, const char *s) + { +- return PyTuple_SetItem(t, pos, PyString_FromString(s)); ++ return PyTuple_SetItem(t, pos, _PyUnicode_FromString(s)); + } + + static int python_export_evsel(struct db_export *dbe, struct perf_evsel *evsel) +@@ -1024,8 +1054,8 @@ process_stat(struct perf_evsel *counter, int cpu, int thread, u64 tstamp, + return; + } + +- PyTuple_SetItem(t, n++, PyInt_FromLong(cpu)); +- PyTuple_SetItem(t, n++, PyInt_FromLong(thread)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(cpu)); ++ PyTuple_SetItem(t, n++, _PyLong_FromLong(thread)); + + tuple_set_u64(t, n++, tstamp); + tuple_set_u64(t, n++, count->val); +@@ -1207,27 +1237,58 @@ static void set_table_handlers(struct tables *tables) + SET_TABLE_HANDLER(call_return); + } + ++#if PY_MAJOR_VERSION < 3 ++static void _free_command_line(const char **command_line, int num) ++{ ++ free(command_line); ++} ++#else ++static void _free_command_line(wchar_t **command_line, int num) ++{ ++ int i; ++ for (i = 0; i < num; i++) ++ PyMem_RawFree(command_line[i]); ++ free(command_line); ++} ++#endif ++ ++ + /* + * Start trace script + */ + static int python_start_script(const char *script, int argc, const char **argv) + { + struct tables *tables = &tables_global; ++#if PY_MAJOR_VERSION < 3 + const char **command_line; ++#else ++ wchar_t **command_line; ++#endif + char buf[PATH_MAX]; + int i, err = 0; + FILE *fp; + ++#if PY_MAJOR_VERSION < 3 + command_line = malloc((argc + 1) * sizeof(const char *)); + command_line[0] = script; + for (i = 1; i < argc + 1; i++) + command_line[i] = argv[i - 1]; ++#else ++ command_line = malloc((argc + 1) * sizeof(wchar_t *)); ++ command_line[0] = Py_DecodeLocale(script, NULL); ++ for (i = 1; i < argc + 1; i++) ++ command_line[i] = Py_DecodeLocale(argv[i - 1], NULL); ++#endif + + Py_Initialize(); + ++#if PY_MAJOR_VERSION < 3 + initperf_trace_context(); +- + PySys_SetArgv(argc + 1, (char **)command_line); ++#else ++ PyInit_perf_trace_context(); ++ PySys_SetArgv(argc + 1, command_line); ++#endif + + fp = fopen(script, "r"); + if (!fp) { +@@ -1257,12 +1318,12 @@ static int python_start_script(const char *script, int argc, const char **argv) + goto error; + } + +- free(command_line); ++ _free_command_line(command_line, argc + 1); + + return err; + error: + Py_Finalize(); +- free(command_line); ++ _free_command_line(command_line, argc + 1); + + return err; + } +diff --git a/tools/perf/util/setup.py b/tools/perf/util/setup.py +index 23f1bf175179..a5f9e236cc71 100644 +--- a/tools/perf/util/setup.py ++++ b/tools/perf/util/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python + + from os import getenv + +@@ -37,11 +37,11 @@ build_tmp = getenv('PYTHON_EXTBUILD_TMP') + libtraceevent = getenv('LIBTRACEEVENT') + libapikfs = getenv('LIBAPI') + +-ext_sources = [f.strip() for f in file('util/python-ext-sources') ++ext_sources = [f.strip() for f in open('util/python-ext-sources') + if len(f.strip()) > 0 and f[0] != '#'] + + # use full paths with source files +-ext_sources = map(lambda x: '%s/%s' % (src_perf, x) , ext_sources) ++ext_sources = list(map(lambda x: '%s/%s' % (src_perf, x) , ext_sources)) + + perf = Extension('perf', + sources = ext_sources, +-- +2.17.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch new file mode 100644 index 00000000..8c0a2af7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch @@ -0,0 +1,27 @@ +From 1cdbf4ed4717eefa2b6237c1e63e351b62990522 Mon Sep 17 00:00:00 2001 +From: Dien Pham +Date: Fri, 23 Feb 2018 18:29:32 +0700 +Subject: [PATCH] rpmsg: Add message to be able to configure RPMSG_VIRTIO from + defconfig + +Signed-off-by: Dien Pham +--- + drivers/rpmsg/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/rpmsg/Kconfig b/drivers/rpmsg/Kconfig +index 0fe6eac..5b1e61b 100644 +--- a/drivers/rpmsg/Kconfig ++++ b/drivers/rpmsg/Kconfig +@@ -47,7 +47,7 @@ config RPMSG_QCOM_SMD + platforms. + + config RPMSG_VIRTIO +- tristate ++ tristate "Enable remote processor message and virtual I/O configure" + select RPMSG + select VIRTIO + +-- +1.9.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch new file mode 100644 index 00000000..14719fba --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0002-ADSP-add-ADSP-sound-driver-source.patch @@ -0,0 +1,7204 @@ +From 829c17a722611c39cda6926f0fac46fa586c70ef Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Mon, 17 Jun 2019 17:04:02 +0700 +Subject: [PATCH 2/6] ADSP: add ADSP sound driver source + +Signed-off-by: tienphitran + +diff --git a/include/adsp_drv/xf-adsp-drv-ext.h b/include/adsp_drv/xf-adsp-drv-ext.h +new file mode 100644 +index 0000000..6c3dbc0 +--- /dev/null ++++ b/include/adsp_drv/xf-adsp-drv-ext.h +@@ -0,0 +1,58 @@ ++/***************************************************************************** ++ * \file xf-adsp-driver-ext.h ++ * \brief Header file for ADSP driver extension part ++ * \addtogroup ADSP Driver ++ ****************************************************************************** ++ * \date Oct. 21, 2017 ++ * \author Renesas Electronics Corporation ++ ****************************************************************************** ++ * \par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_DRV_EXT_H ++#define __XF_ADSP_DRV_EXT_H ++ ++/*********************************************************** ++ * Extension client APIs ++ * ********************************************************/ ++ ++struct xf_adsp_base_cmd { ++ /* register new client for ADSP base control */ ++ int (*client_register)(void **private_data); ++ /* unregister client */ ++ int (*client_unregister)(void *private_data); ++ /* get data from proxy */ ++ int (*recv)(void *private_data, void *buf); ++ /* send data to proxy */ ++ int (*send)(void *private_data, void *buf); ++ /* wait the valid message in the response queue */ ++ int (*poll)(void *private_data, int *condition); ++}; ++ ++/* create ADSP base control data */ ++int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd); ++ ++/* destroy ADSP base control data */ ++int xf_adsp_base_destroy(void); ++ ++#endif +diff --git a/sound/soc/adsp/Kconfig b/sound/soc/adsp/Kconfig +new file mode 100644 +index 0000000..605261f +--- /dev/null ++++ b/sound/soc/adsp/Kconfig +@@ -0,0 +1,14 @@ ++## SoC for ADSP driver configuration ++menu "ASoC ADSP driver" ++ ++config SND_SOC_ADSP ++ tristate "SoC Audio for R-Car ADSP" ++ select SND_SIMPLE_CARD ++ select SND_SIMPLE_SCU_CARD ++ select SND_AUDIO_GRAPH_CARD ++ select SND_AUDIO_GRAPH_SCU_CARD ++ default y ++ help ++ This option enables ALSA ADSP sound supports ADSP module ++ ++endmenu +diff --git a/sound/soc/adsp/Makefile b/sound/soc/adsp/Makefile +new file mode 100644 +index 0000000..8277fdb +--- /dev/null ++++ b/sound/soc/adsp/Makefile +@@ -0,0 +1,3 @@ ++## Makefile for SoC ADSP driver ++snd-soc-adsp-objs := xf-adsp-alsa.o xf-adsp-base.o ++obj-$(CONFIG_SND_SOC_ADSP) += snd-soc-adsp.o +diff --git a/sound/soc/adsp/xf-adsp-alsa.c b/sound/soc/adsp/xf-adsp-alsa.c +new file mode 100644 +index 0000000..493ff84 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-alsa.c +@@ -0,0 +1,3939 @@ ++/** *************************************************************************** ++ * \file xf-adsp-alsa.c ++ * \brief Source file for ADSP ALSA Driver ++ * \addtogroup ADSP Driver ++ ****************************************************************************** ++ * \date Oct. 21, 2017 ++ * \author Renesas Electronics Corporation ++ ****************************************************************************** ++ * \par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ *****************************************************************************/ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "xf-adsp-base.h" ++ ++/* Name of Volume control for playback */ ++#define PLAYBACK_VOLUME_CTR_NAME "PlaybackVolume" ++ ++/* Name of Volume control for capture */ ++#define CAPTURE_VOLUME_CTR_NAME "CaptureVolume" ++ ++/* Name of Sample Rate control for playback */ ++#define PLAYBACK_OUT_RATE_CTR_NAME "PlaybackOutRate" ++ ++/* Name of Output Channel control for playback */ ++#define PLAYBACK_OUT_CHANNEL_CTR_NAME "PlaybackOutChannel" ++ ++/* Name of Sample Rate control for capture */ ++#define CAPTURE_IN_RATE_CTR_NAME "CaptureInRate" ++ ++/* Name of Equalizer parameters control for playback */ ++#define PLAYBACK_EQZ_CTR_NAME "PlaybackEQZControl" ++ ++/* Name of Equalizer parameters control for capture */ ++#define CAPTURE_EQZ_CTR_NAME "CaptureEQZControl" ++ ++/* Name of Equalizer Switch control for playback */ ++#define PLAYBACK_EQZ_SWITCH_CTR_NAME "PlaybackEQZSwitch" ++ ++/* Name of Equalizer Switch control for capture */ ++#define CAPTURE_EQZ_SWITCH_CTR_NAME "CaptureEQZSwitch" ++ ++/* Name of Volume control for TDM playback */ ++#define TDM_PLAYBACK_VOLUME_CTR_NAME "TDMPlaybackVolume" ++ ++/* Name of Volume control for TDM capture */ ++#define TDM_CAPTURE_VOLUME_CTR_NAME "TDMCaptureVolume" ++ ++/* Name of Sample Rate control for TDM playback */ ++#define TDM_PLAYBACK_OUT_RATE_CTR_NAME "TDMPlaybackOutRate" ++ ++/* Name of Sample Rate control for TDM capture */ ++#define TDM_CAPTURE_IN_RATE_CTR_NAME "TDMCaptureInRate" ++ ++/* Prefix of Playback control name */ ++#define PREFIX_OF_PLAYBACK_CTR_NAME PLAYBACK_VOLUME_CTR_NAME[0] ++ ++/* Prefix of Capture control name */ ++#define PREFIX_OF_CAPTURE_CTR_NAME CAPTURE_VOLUME_CTR_NAME[0] ++ ++/* Prefix of TDM control name */ ++#define PREFIX_OF_TDM_CTR_NAME TDM_PLAYBACK_VOLUME_CTR_NAME[0] ++ ++/* Prefix of TDM playback */ ++#define TDM_PLAYBACK TDM_PLAYBACK_VOLUME_CTR_NAME[3] ++ ++/* Prefix of TDM record */ ++#define TDM_CAPTURE TDM_CAPTURE_VOLUME_CTR_NAME[3] ++ ++/* Number of control for playback & capture */ ++#define RDR_CONTROL_NUM (9) ++ ++/* Number of controls for TDM */ ++#define TDM_CONTROL_NUM (4) ++ ++/* Indicate playback stream */ ++#define DIRECT_PLAYBACK (0) ++ ++/* Indicate capture stream */ ++#define DIRECT_CAPTURE (1) ++ ++/* Indicate stream number */ ++#define DIRECT_NUM (2) ++ ++/* Supported frame size for playback/record function in driver */ ++#define FRAME_SIZE (1024) ++ ++/* Supported frame size for TDM playback/record function in driver */ ++#define TDM_FRAME_SIZE (1024) ++ ++/* Supported sample rate in driver */ ++#define SND_ADSP_SAMPLE_RATES (SNDRV_PCM_RATE_32000 | \ ++ SNDRV_PCM_RATE_44100 | \ ++ SNDRV_PCM_RATE_48000) ++ ++/* Supported PCM width in driver */ ++#define SND_ADSP_PCM_WIDTHS (SNDRV_PCM_FMTBIT_S16_LE | \ ++ SNDRV_PCM_FMTBIT_S24_LE) ++ ++/* Macro to control DAI index */ ++/* DAI 0 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX0 (0) ++ ++/* DAI 1 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX1 (1) ++ ++/* DAI 2 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX2 (2) ++ ++/* DAI 3 index for playback/record functions of stereo/mono formats */ ++#define RDR_DAI_IDX3 (3) ++ ++/* DAI 4 index for playback/record functions of TDM formats */ ++#define TDM_DAI_IDX (4) ++ ++/* Maximum number of DAI supported by driver */ ++#define MAX_DAI_IDX (5) ++ ++/* Renderer/Capture software information */ ++/* Minimum channel number supported */ ++#define MIN_CHANNEL (1) ++ ++/* Maximum channel number supported */ ++#define MAX_CHANNEL (2) ++ ++/* Minimum buffer size in byte */ ++#define MIN_BUF_SIZE (FRAME_SIZE * MIN_CHANNEL * 2) ++ ++/* Maximum buffer size in byte */ ++#define MAX_BUF_SIZE (FRAME_SIZE * MAX_CHANNEL * 4) ++ ++/* Minimum numbers of period in the buffer */ ++#define MIN_PERIOD (1) ++ ++/* Maximum numbers of period in the buffer */ ++#define MAX_PERIOD (4) ++ ++/* Maximun numbers of bytes in ALSA buffer */ ++#define MAX_BUFFER_BYTES (MAX_PERIOD * MAX_BUF_SIZE) ++ ++/* TDM software information */ ++/*< Minimum channel number supported in TDM plugin */ ++#define TDM_MIN_CHANNEL (6) ++ ++/* Maximum channel number supported in TDM plugin */ ++#define TDM_MAX_CHANNEL (8) ++ ++/* Minimum buffer size in byte for TDM format */ ++#define TDM_MIN_BUF_SIZE (TDM_FRAME_SIZE * TDM_MIN_CHANNEL * 2) ++ ++/* Maximum buffer size in byte for TDM format */ ++#define TDM_MAX_BUF_SIZE (TDM_FRAME_SIZE * TDM_MAX_CHANNEL * 4) ++ ++/* Minimum numbers of period in the buffer for TDM format */ ++#define TDM_MIN_PERIOD (1) ++ ++/* Maximum numbers of period in the buffer for TDM format */ ++#define TDM_MAX_PERIOD (4) ++ ++/* Maximum numbers of bytes in ALSA buffer for TDM format */ ++#define TDM_MAX_BUFFER_BYTES (TDM_MAX_PERIOD * TDM_MAX_BUF_SIZE) ++ ++/* Volume scale used when user set */ ++#define VOLUME_SCALE (100) ++ ++/* Maximum element in Equalizer parameter control */ ++#define MAX_EQZ_PARAM_NUMBER (55) ++ ++/* Equalizer control is disabled */ ++#define EQZ_OFF (0) ++ ++/* Equalizer control is enabled */ ++#define EQZ_ON (1) ++ ++/* Component status */ ++/* Handle state is NULL */ ++#define XF_HANDLE_NULL (0) ++ ++/* Handle state is CREATED after creating handle successfully */ ++#define XF_HANDLE_CREATED BIT(0) ++ ++/* Handle state is READY after finishing handle init */ ++#define XF_HANDLE_READY BIT(1) ++ ++/* channels */ ++/* Mono stream */ ++#define MONAURAL (1) ++ ++/* Stereo stream */ ++#define STEREO (2) ++ ++/* define number of bytes in a sample of 24 bits format types */ ++/* store 24 bits data in 4 bytes LE */ ++#define FMTBIT_S24_LE_BYTES_PER_SAMPLE (4) ++ ++/* store 24 bits data in 3 bytes LE */ ++#define FMTBIT_S24_3LE_BYTES_PER_SAMPLE (3) ++ ++/* helper macro to get bytes per sample number */ ++#define BYTES_PER_SAMPLE(fmt) (FMTBIT_##fmt##_BYTES_PER_SAMPLE) ++ ++/* check component is created */ ++#define COMPONENT_IS_CREATED(n) (((n & XF_HANDLE_CREATED) != 0) ? TRUE : FALSE) ++ ++/* check component is ready */ ++#define COMPONENT_IS_READY(n) (((n & XF_HANDLE_READY) != 0) ? TRUE : FALSE) ++ ++/* indicator of stream order */ ++#define MIX_UNUSED (0) ++#define FIRST_RUN (2) ++#define SECOND_RUN (1) ++ ++/* check MIX usage */ ++#define MIX_ENABLED(mix_ctl) ((mix_ctl == SECOND_RUN) ? TRUE : FALSE) ++ ++/******************************************************************* ++ * base structures for ADSP ALSA driver ++ * ****************************************************************/ ++ ++/** \struct snd_adsp_control ++ * \brief Structure stores parameters from user ++ */ ++struct snd_adsp_control { ++ /* Volume rate for playback/record */ ++ int vol_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Volume rate for TDM playback/TDM record */ ++ int tdm_vol_rate[DIRECT_NUM]; ++ ++ /* Out sample rate with Renderer, in sample rate with Capture */ ++ int sample_rate[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Out sample rate for TDM Renderer, in sample rate for TDM Capture */ ++ int tdm_sample_rate[DIRECT_NUM]; ++ ++ /* Output channel of playback */ ++ int rdr_out_ch[MAX_DAI_IDX - 1]; ++ ++ /* Equalizer parameters */ ++ struct xf_adsp_equalizer_params eqz_params[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Equalizer switch */ ++ int eqz_switch[DIRECT_NUM][MAX_DAI_IDX - 1]; ++ ++ /* Indicator of MIX usage */ ++ int mix_usage; ++}; ++ ++/** \struct snd_adsp_base_info ++ * \brief Structure stores some base information of a stream ++ */ ++struct snd_adsp_base_info { ++ /* high resolution timer data */ ++ struct hrtimer hrtimer; ++ ++ /* kernel time value in nanosecond */ ++ ktime_t ktime; ++ ++ /* save interrupt state before getting lock */ ++ unsigned long flag; ++ ++ /* high resolution timer state */ ++ int hrt_state; ++ ++ /* target handle id of ALSA driver */ ++ int handle_id; ++ ++ /* data buffer */ ++ char *buffer[XF_BUF_POOL_SIZE]; ++ ++ /* size of each allocated data buffer */ ++ int buf_bytes; ++ ++ /* data index of buffer */ ++ int buf_idx; ++ ++ /* queue index of buffer */ ++ int buf_queue; ++ ++ /* HW index in bytes */ ++ int hw_idx; ++ ++ /* number of bytes in a period */ ++ int period_bytes; ++ ++ /* substream runtime object */ ++ struct snd_pcm_substream *substream; ++ ++ /* indirect PCM data transfer */ ++ struct snd_pcm_indirect pcm_indirect; ++ ++ /* spinlock data */ ++ spinlock_t lock; ++ ++ /* runtime error indicator */ ++ int runtime_err; ++}; ++ ++/** \struct snd_adsp_playback ++ * \brief Structure stores data for playback function ++ */ ++struct snd_adsp_playback { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* Renderer component data */ ++ struct xf_adsp_renderer *renderer; ++ ++ /* Equalizer component data */ ++ struct xf_adsp_equalizer *equalizer; ++ ++ /* Renderer component state */ ++ int rdr_state; ++ ++ /* Equalizer component state */ ++ int eqz_state; ++}; ++ ++/** \struct snd_adsp_record ++ * \brief Structure stores data for record function ++ */ ++struct snd_adsp_record { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* Capture component data */ ++ struct xf_adsp_capture *capture; ++ ++ /* Equalizer component data */ ++ struct xf_adsp_equalizer *equalizer; ++ ++ /* Capture component state */ ++ int cap_state; ++ ++ /* Equalizer component state */ ++ int eqz_state; ++}; ++ ++/** \struct snd_adsp_tdm_playback ++ * \brief Structure stores data for TDM playback function ++ */ ++struct snd_adsp_tdm_playback { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* TDM Renderer component data */ ++ struct xf_adsp_tdm_renderer *tdm_renderer; ++ ++ /* TDM Renderer component state */ ++ int state; ++}; ++ ++/** \struct snd_adsp_tdm_record ++ * \brief Structure stores data for TDM record function ++ */ ++struct snd_adsp_tdm_record { ++ /* base information of stream */ ++ struct snd_adsp_base_info base; ++ ++ /* TDM Capture component data */ ++ struct xf_adsp_tdm_capture *tdm_capture; ++ ++ /* TDM Capture component state */ ++ int state; ++}; ++ ++/** \struct snd_adsp_card ++ * \brief Structure stores data for ALSA sound card ++ */ ++struct snd_adsp_card { ++ /* playback data */ ++ struct snd_adsp_playback *playback[MAX_DAI_IDX - 1]; ++ ++ /* record data */ ++ struct snd_adsp_record *record[MAX_DAI_IDX - 1]; ++ ++ /* TDM playback data */ ++ struct snd_adsp_tdm_playback *tdm_playback; ++ ++ /* TDM record data */ ++ struct snd_adsp_tdm_record *tdm_record; ++ ++ /* Structure contains params information for control */ ++ struct snd_adsp_control ctr_if; ++}; ++ ++/** HW configuration of ALSA ADSP card for Renderer/Capture */ ++static struct snd_pcm_hardware snd_pcm_adsp_hw = { ++ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ ++ | SNDRV_PCM_INFO_RESUME ++ | SNDRV_PCM_INFO_BLOCK_TRANSFER ++ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), ++ .formats = SND_ADSP_PCM_WIDTHS, ++ .rates = SND_ADSP_SAMPLE_RATES, ++ .rate_min = 32000, ++ .rate_max = 48000, ++ .channels_min = MIN_CHANNEL, ++ .channels_max = MAX_CHANNEL, ++ ++ /* maximum buffer size in bytes */ ++ .buffer_bytes_max = MAX_BUFFER_BYTES, ++ ++ /* minimum size of the periods (frame) in bytes */ ++ .period_bytes_min = MIN_BUF_SIZE, ++ ++ /* maximum size of the periods (frame) in bytes */ ++ .period_bytes_max = MAX_BUF_SIZE, ++ ++ /* minimum periods (frames) in a buffer */ ++ .periods_min = MIN_PERIOD, ++ ++ /* maximum periods (frames) in a buffer */ ++ .periods_max = MAX_PERIOD, ++}; ++ ++/* HW configuration of ALSA ADSP card for TDM */ ++static struct snd_pcm_hardware snd_pcm_adsp_tdm_hw = { ++ .info = (SNDRV_PCM_INFO_INTERLEAVED /* PRQA S 1053 14 */ ++ | SNDRV_PCM_INFO_RESUME ++ | SNDRV_PCM_INFO_BLOCK_TRANSFER ++ | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), ++ .formats = SND_ADSP_PCM_WIDTHS, ++ .rates = SND_ADSP_SAMPLE_RATES, ++ .rate_min = 32000, ++ .rate_max = 48000, ++ .channels_min = TDM_MIN_CHANNEL, ++ .channels_max = TDM_MAX_CHANNEL, ++ ++ /* maximum buffer size in bytes */ ++ .buffer_bytes_max = TDM_MAX_BUFFER_BYTES, ++ ++ /* minimum size of the periods (frame) in bytes */ ++ .period_bytes_min = TDM_MIN_BUF_SIZE, ++ ++ /* maximum size of the periods (frame) in bytes */ ++ .period_bytes_max = TDM_MAX_BUF_SIZE, ++ ++ /* minimum periods (frames) in a buffer */ ++ .periods_min = TDM_MIN_PERIOD, ++ ++ /* maximum periods (frames) in a buffer */ ++ .periods_max = TDM_MAX_PERIOD, ++}; ++ ++/******************************************************************* ++ * function declaration ++ * ****************************************************************/ ++ ++static int ++snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer); ++static int ++snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream); ++static void * ++snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream); ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream); ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_hrt(struct hrtimer *hrt); ++static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt); ++static int snd_adsp_playback_init(struct snd_adsp_playback **data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_record_init(struct snd_adsp_record **data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_record_prepare(struct snd_adsp_record *record, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback); ++static int snd_adsp_record_deinit(struct snd_adsp_record *record); ++static int snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **data, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **data, ++ struct snd_pcm_substream *substream); ++static int ++snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, ++ struct snd_pcm_substream *substream); ++static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, ++ struct snd_pcm_substream *substream); ++static int ++snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback); ++static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record); ++static int snd_adsp_pcm_open(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_close(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *hw_params); ++static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx); ++static snd_pcm_uframes_t ++snd_adsp_pcm_pointer(struct snd_pcm_substream *substream); ++static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream); ++static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, ++ struct snd_pcm_indirect *rec, size_t bytes); ++static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int ++snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo); ++static int ++snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static int ++snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol); ++static void snd_adsp_get_eqz_params_from_control( ++ struct xf_adsp_equalizer_params *eqz_params, ++ struct xf_adsp_equalizer_params *eqz_ctr_params, ++ bool flag); ++static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime); ++static int snd_adsp_probe(struct platform_device *pdev); ++static int snd_adsp_remove(struct platform_device *pdev); ++ ++/******************************************************************* ++ * callback function of ADSP control interface ++ * ****************************************************************/ ++/** ************************************************************************** ++ * \brief event handler callback to notify error from ADSP ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_event_handler(void *data) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) ++ base->runtime_err = TRUE; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief empty buf done callback for playback/TDM playback functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_rdr_empty_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->buf_queue++; ++ base->hw_idx += length; /* increase the DMA buffer index */ ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief fill buf done callback for playback/TDM playback functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_rdr_fill_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief empty buf done callback for record/TDM record functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_cap_empty_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief fill buf done callback for record/TDM record functions ++ * ++ * \param[in] data Pointer to ADSP ALSA sound card ++ * \param[in] opcode Opcode of message ++ * \param[in] length Length of data buffer ++ * \param[in] buffer Pointer to data buffer ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_cap_fill_buf_done(void *data, int opcode, int length, char *buffer) ++{ ++ struct snd_adsp_base_info *base = (struct snd_adsp_base_info *)data; ++ ++ if (base) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->buf_queue++; ++ base->hw_idx += length; /* increase the DMA buffer index */ ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ return 0; ++} ++ ++/** callback functions for playback/TDM playback */ ++static struct xf_callback_func rdr_callbacks = /* PRQA S 3218 */ ++{ ++ .empty_buf_done = &snd_adsp_rdr_empty_buf_done, /* PRQA S 1053 2 */ ++ .fill_buf_done = &snd_adsp_rdr_fill_buf_done, ++ .event_handler = &snd_adsp_event_handler ++}; ++ ++/** callback functions for record/TDM record */ ++static struct xf_callback_func cap_callbacks = /* PRQA S 3218 */ ++{ ++ .empty_buf_done = &snd_adsp_cap_empty_buf_done, /* PRQA S 1053 2 */ ++ .fill_buf_done = &snd_adsp_cap_fill_buf_done, ++ .event_handler = &snd_adsp_event_handler ++}; ++ ++/******************************************************************* ++ * helper functions to get some internal data ++ * ****************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Get current index of CPU DAI from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval id Index of current CPU DAI ++ *****************************************************************************/ ++static int ++snd_adsp_get_dai_id_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd; ++ ++ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; ++ return rtd->cpu_dai->id; ++} ++ ++/** ************************************************************************** ++ * \brief Get ADSP ALSA driver's data from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval pointer Pointer to driver's data ++ *****************************************************************************/ ++static void * ++snd_adsp_get_drvdata_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd; ++ ++ rtd = (struct snd_soc_pcm_runtime *)substream->private_data; ++ return snd_soc_dai_get_drvdata(rtd->cpu_dai); ++} ++ ++/** ************************************************************************** ++ * \brief Get base's data of playback/record from runtime data of substream ++ * ++ * \param[in] substream Pointer to PCM stream data ++ * \retval pointer Pointer to playback/record's base data ++ *****************************************************************************/ ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_substream(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ struct snd_adsp_base_info *base; ++ int dai_idx; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ++ /* get DAI index of substream */ ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ++ /* get base data of the substream */ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ base = !adsp_card->playback[dai_idx] ? ++ NULL : &adsp_card->playback[dai_idx]->base; ++ } else { ++ base = !adsp_card->record[dai_idx] ? ++ NULL : &adsp_card->record[dai_idx]->base; ++ } ++ } else { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ base = !adsp_card->tdm_playback ? ++ NULL : &adsp_card->tdm_playback->base; ++ } else { ++ base = !adsp_card->tdm_record ? ++ NULL : &adsp_card->tdm_record->base; ++ } ++ } ++ ++ return base; ++} ++ ++/** *************************************************************************** ++ * \brief Get playback/record/TDM playback/TDM record's base data ++ * from hr timer data ++ * ++ * \param[in] hrt Pointer to hr timer data ++ * \retval pointer Pointer to playback/record's base data ++ *****************************************************************************/ ++static struct snd_adsp_base_info * ++snd_adsp_get_base_from_hrt(struct hrtimer *hrt) ++{ ++ return (struct snd_adsp_base_info *)hrt; ++} ++ ++/***************************************************************************** ++ * hrtimer interrupt function ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Interrupt function of high resolution timer ++ * ++ * \param[in] hrt Pointer to hr timer data ++ * \retval HRTIMER_RESTART Restart the timer after expire time ++ *****************************************************************************/ ++static enum hrtimer_restart snd_adsp_hrtimer_func(struct hrtimer *hrt) ++{ ++ struct snd_adsp_base_info *base = snd_adsp_get_base_from_hrt(hrt); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ if (base->hw_idx != 0) { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ /* update PCM status for the next period */ ++ snd_pcm_period_elapsed(base->substream); ++ } else { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ hrtimer_forward_now(hrt, base->ktime); ++ ++ return HRTIMER_RESTART; ++} ++ ++/***************************************************************************** ++ * internal functions to manage playback and record functions ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Initialize playback data ++ * ++ * \param[out] playback_data Pointer to store playback data ++ * \param[in] eqz_flag Flag to indicate equalizer usage ++ * \param[in] substream Pointer to substream data ++ * \retval EINVAL Failed to initialize playback data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_init(struct snd_adsp_playback **playback_data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_playback *playback; ++ ++ /* allocate memory for playback data */ ++ playback = kmalloc(sizeof(*playback), GFP_KERNEL); ++ if (!playback) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(playback, 0, sizeof(struct snd_adsp_playback)); ++ ++ /* save the playback data */ ++ *playback_data = playback; ++ ++ /* set handle state as NULL state */ ++ playback->rdr_state = XF_HANDLE_NULL; ++ playback->eqz_state = XF_HANDLE_NULL; ++ playback->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register renderer component */ ++ if (xf_adsp_renderer_create(&playback->renderer, ++ &rdr_callbacks, ++ (void *)&playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark renderer component created */ ++ playback->rdr_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as renderer ID */ ++ playback->base.handle_id = playback->renderer->handle_id; ++ ++ if (eqz_flag == EQZ_ON) { ++ /* create equalizer component when equalizer is used */ ++ if (xf_adsp_equalizer_create(&playback->equalizer, ++ &rdr_callbacks, ++ (void *)&playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark equalizer component created */ ++ playback->eqz_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as equalizer ID */ ++ playback->base.handle_id = playback->equalizer->handle_id; ++ } ++ ++ /* init lock */ ++ spin_lock_init(&playback->base.lock); ++ ++ /* save the substream data */ ++ playback->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&playback->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ playback->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ playback->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Initialize record data ++ * ++ * \param[out] record_data Pointer to store record data ++ * \param[in] eqz_flag Flag to indicate equalizer usage ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize record data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_init(struct snd_adsp_record **record_data, ++ int eqz_flag, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_record *record; ++ ++ /* allocate memory for record data */ ++ record = kmalloc(sizeof(*record), GFP_KERNEL); ++ if (!record) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(record, 0, sizeof(struct snd_adsp_record)); ++ ++ /* save the record data */ ++ *record_data = record; ++ ++ /* set handle state as NULL state */ ++ record->cap_state = XF_HANDLE_NULL; ++ record->eqz_state = XF_HANDLE_NULL; ++ record->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register capture component */ ++ if (xf_adsp_capture_create(&record->capture, ++ &cap_callbacks, ++ (void *)&record->base) < 0) ++ return -EINVAL; ++ ++ /* mark capture component created */ ++ record->cap_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as capture ID */ ++ record->base.handle_id = record->capture->handle_id; ++ ++ /* create equalizer component in case of it being used */ ++ if (eqz_flag == EQZ_ON) { ++ if (xf_adsp_equalizer_create(&record->equalizer, ++ &cap_callbacks, ++ (void *)&record->base) < 0) ++ return -EINVAL; ++ ++ /* mark equalizer component created */ ++ record->eqz_state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as equalizer ID */ ++ record->base.handle_id = record->equalizer->handle_id; ++ } ++ ++ /* init lock */ ++ spin_lock_init(&record->base.lock); ++ ++ /* save the substream data */ ++ record->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&record->base.hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ record->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ record->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare playback function ++ * ++ * \param[out] playback Pointer to playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_prepare(struct snd_adsp_playback *playback, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, hw_buffer_size; ++ int out_rate; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_renderer *renderer; ++ struct xf_adsp_equalizer *equalizer; ++ struct snd_adsp_base_info *base; ++ int i; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ renderer = playback->renderer; ++ equalizer = playback->equalizer; ++ base = &playback->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ch = runtime->channels; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ vol_rate = ctr_if->vol_rate[DIRECT_PLAYBACK][dai_idx]; ++ out_rate = ctr_if->sample_rate[DIRECT_PLAYBACK][dai_idx]; ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = (base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* it should equal to a period size in bytes */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes; ++ ++ /* set parameters when Renderer is not ready */ ++ if (COMPONENT_IS_READY(playback->rdr_state) == FALSE) { ++ struct xf_adsp_renderer_params *params = &renderer->params; ++ ++ /* apply renderer parameters */ ++ params->in_rate = fs; ++ params->channel = ch; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ if (ctr_if->mix_usage == SECOND_RUN) ++ params->mix_ctrl = ctr_if->mix_usage; ++ else ++ params->mix_ctrl = MIX_UNUSED; ++ ++ /* set flow as ADSP->PDMA0->SRC0->PDMA1->SSI0 */ ++ params->dev1 = SRC0; ++ params->dev2 = SSI00; ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ ++ /* when MIX is enabled, change to DMAC transfer type to save */ ++ /* hw FIFO */ ++ if (MIX_ENABLED(params->mix_ctrl) == TRUE) ++ params->dma1 = ADMAC_CH01; ++ ++ /* set volume rate if it is set by user or default value */ ++ /* is 100% */ ++ if (vol_rate >= 0) ++ params->vol_rate = vol_rate; ++ else ++ params->vol_rate = (1 << 20); ++ ++ /* set output channel if it is set by user */ ++ if (ctr_if->rdr_out_ch[dai_idx] >= MONAURAL) ++ params->out_channel = ctr_if->rdr_out_ch[dai_idx]; ++ else ++ params->out_channel = params->channel; ++ ++ /* set sample rate output if it is set by user */ ++ if (out_rate >= 0) ++ params->out_rate = out_rate; ++ ++ /* set parameters to ADSP Renderer plugin */ ++ if (xf_adsp_renderer_set_params(renderer) != 0) ++ return -EINVAL; ++ ++ /* allocate buffer pool to prepare the execution */ ++ renderer->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(renderer->buf_pool)) /* PRQA S 306*/ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ renderer->buf_pool, i); ++ ++ base->buf_queue++; ++ memset(base->buffer[i], 0, base->buf_bytes); ++ } ++ ++ /* mark Renderer ready */ ++ playback->rdr_state |= XF_HANDLE_READY; ++ ++ /* set parameters for Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { ++ /* apply Equalizer parameter setting */ ++ equalizer->params.channel = ch; ++ equalizer->params.pcm_width = pcm_width; ++ equalizer->params.rate = fs; ++ ++ /* get equalizer parameters from control interface */ ++ /* data */ ++ snd_adsp_get_eqz_params_from_control( ++ &equalizer->params, ++ &ctr_if->eqz_params[DIRECT_PLAYBACK][dai_idx], ++ true); ++ ++ /* set parameters to Equalizer plugin */ ++ if (xf_adsp_equalizer_set_params(equalizer) != 0) ++ return -EINVAL; ++ ++ /* route Equalizer to Renderer */ ++ if (xf_adsp_route(equalizer->handle_id, ++ renderer->handle_id, ++ XF_BUF_POOL_SIZE, ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ /* mark Equalizer ready */ ++ playback->eqz_state |= XF_HANDLE_READY; ++ ++ /* prepare data before start PCM */ ++ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ /* send buffer to plugin to kick */ ++ /* init-processing */ ++ if (xf_adsp_empty_this_buffer( ++ base->handle_id, ++ base->buffer[i], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ } else { ++ /* send zero buffer to plugin to kick */ ++ /* init-processing */ ++ if (xf_adsp_empty_this_buffer(base->handle_id, ++ base->buffer[0], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ /* wait until all the buffer have been consummed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset HW index */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare record function ++ * ++ * \param[out] record Pointer to record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_prepare(struct snd_adsp_record *record, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx, pcm_width, ch, fs, frame_size, vol_rate, in_rate; ++ int hw_buffer_size, hw_queue_size; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_capture *capture; ++ struct xf_adsp_equalizer *equalizer; ++ struct snd_adsp_base_info *base; ++ int i; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ capture = record->capture; ++ equalizer = record->equalizer; ++ base = &record->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ch = runtime->channels; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ vol_rate = ctr_if->vol_rate[DIRECT_CAPTURE][dai_idx]; ++ in_rate = ctr_if->sample_rate[DIRECT_CAPTURE][dai_idx]; ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* total size of allocated buffers */ ++ hw_queue_size = base->period_bytes * XF_BUF_POOL_SIZE; ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ base->pcm_indirect.hw_queue_size = hw_queue_size; ++ ++ /* prepare parameters to set to Capture plugin when it is not yet */ ++ /* ready */ ++ if (COMPONENT_IS_READY(record->cap_state) == FALSE) { ++ struct xf_adsp_capture_params *params = &capture->params; ++ ++ /* apply capture parameters */ ++ params->out_rate = fs; ++ params->channel = ch; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ params->dev1 = SRC0; ++ params->dev2 = SSI10; ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ ++ /* set volume rate if it is set by user or default volume as */ ++ /* 100% */ ++ if (vol_rate >= 0) ++ params->vol_rate = vol_rate; ++ else ++ params->vol_rate = (1 << 20); ++ ++ /* set sample rate input if it is set by user */ ++ if (in_rate >= 0) ++ params->in_rate = in_rate; ++ ++ /* allocate buffer pool to prepare the execution */ ++ capture->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(capture->buf_pool)) /* PRQA S 306 */ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ capture->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* set parameters to ADSP Capture plugin */ ++ if (xf_adsp_capture_set_params(capture) != 0) ++ return -EINVAL; ++ ++ /* mark Capture ready */ ++ record->cap_state |= XF_HANDLE_READY; ++ ++ /* set parameters for Equalizer if it's used */ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ /* apply Equalizer parameter setting */ ++ equalizer->params.channel = ch; ++ equalizer->params.pcm_width = pcm_width; ++ equalizer->params.rate = fs; ++ ++ /* get equalizer parameter from control interface */ ++ /* data */ ++ snd_adsp_get_eqz_params_from_control( ++ &equalizer->params, ++ &ctr_if->eqz_params[DIRECT_CAPTURE][dai_idx], ++ true); ++ ++ /* set parameters to Equalizer plugin */ ++ if (xf_adsp_equalizer_set_params(equalizer) != 0) ++ return -EINVAL; ++ ++ /* route Capture to Equalizer */ ++ if (xf_adsp_route(capture->handle_id, ++ equalizer->handle_id, ++ XF_BUF_POOL_SIZE, ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ /* mark Equalizer ready */ ++ record->eqz_state |= XF_HANDLE_READY; ++ } ++ ++ /* kick init process by sending a zero buffer length */ ++ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until finishing initialization */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ /* PRQA S 2462 1 */ /* PRQA S 2463 1 */ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ /* send buffer to plugin */ ++ if (xf_adsp_fill_this_buffer( ++ base->handle_id, ++ base->buffer[i], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ /* wait until all the buffer have been responsed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ } ++ ++ /* reset hw data position */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize playback function ++ * ++ * \param[out] playback Pointer to playback data ++ * \retval -EINVAL Failed to deinitialize playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_playback_deinit(struct snd_adsp_playback *playback) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if playback has been created already */ ++ if (playback) { ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(playback->rdr_state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process *//* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(playback->base.handle_id, ++ NULL, 0); ++ ++ /* free buffer pool */ /* PRQA S 3200 1 */ ++ xf_adsp_free_mem_pool(playback->renderer->buf_pool); ++ ++ /* destroy Renderer */ ++ if (xf_adsp_renderer_destroy(playback->renderer) != 0) ++ ret = -EINVAL; ++ ++ playback->renderer = NULL; ++ } ++ ++ /* destroy Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(playback->eqz_state) == TRUE) { ++ if (xf_adsp_equalizer_destroy(playback->equalizer)) ++ ret = -EINVAL; ++ ++ playback->equalizer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(playback->base.hrt_state) == TRUE) ++ hrtimer_cancel(&playback->base.hrtimer); ++ ++ /* free playback data */ ++ kfree(playback); ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize record function ++ * ++ * \param[out] record Pointer to record data ++ * \retval -EINVAL Failed to deinitialize record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_record_deinit(struct snd_adsp_record *record) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if record has been created already */ ++ if (!record) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(record->cap_state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process *//* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(record->base.handle_id, NULL, 0); ++ ++ /* free buffer pool */ /* PRQA S 3200 1 */ ++ xf_adsp_free_mem_pool(record->capture->buf_pool); ++ ++ if (xf_adsp_capture_destroy(record->capture)) ++ ret = -EINVAL; ++ ++ record->capture = NULL; ++ } ++ ++ /* destroy Equalizer if it is used */ ++ if (COMPONENT_IS_CREATED(record->eqz_state) == TRUE) { ++ if (xf_adsp_equalizer_destroy(record->equalizer) != 0) ++ ret = -EINVAL; ++ ++ record->equalizer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(record->base.hrt_state) == TRUE) ++ hrtimer_cancel(&record->base.hrtimer); ++ ++ /* free record data */ ++ kfree(record); ++ ++ return ret; ++} ++ ++/***************************************************************************** ++ * internal functions to manage TDM playback and TDM record functions ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Initialize TDM playback data ++ * ++ * \param[out] tdm_playback_data Pointer to store TDM playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize TDM playback data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_init(struct snd_adsp_tdm_playback **tdm_playback_data, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_tdm_playback *tdm_playback; ++ ++ /* allocate memory for TDM playback data */ ++ tdm_playback = kmalloc(sizeof(*tdm_playback), GFP_KERNEL); ++ ++ if (!tdm_playback) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(tdm_playback, 0, sizeof(struct snd_adsp_tdm_playback)); ++ ++ /* save the TDM playback data */ ++ *tdm_playback_data = tdm_playback; ++ ++ /* set handle state as NULL state */ ++ tdm_playback->state = XF_HANDLE_NULL; ++ tdm_playback->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register TDM renderer component */ ++ if (xf_adsp_tdm_renderer_create(&tdm_playback->tdm_renderer, ++ &rdr_callbacks, ++ (void *)&tdm_playback->base) < 0) ++ return -EINVAL; ++ ++ /* mark TDM renderer component created */ ++ tdm_playback->state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as TDM renderer ID */ ++ tdm_playback->base.handle_id = tdm_playback->tdm_renderer->handle_id; ++ ++ /* init lock */ ++ spin_lock_init(&tdm_playback->base.lock); ++ ++ /* save the substream data */ ++ tdm_playback->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&tdm_playback->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ tdm_playback->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ tdm_playback->base.hrt_state = XF_HANDLE_CREATED; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Initialize TDM record data ++ * ++ * \param[out] tdm_record_data Pointer to store TDM record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to initialize TDM record data ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_record_init(struct snd_adsp_tdm_record **tdm_record_data, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_tdm_record *tdm_record; ++ ++ /* allocate memory for TDM record data */ ++ tdm_record = kmalloc(sizeof(*tdm_record), GFP_KERNEL); ++ if (!tdm_record) ++ return -EINVAL; ++ ++ /* init params */ ++ memset(tdm_record, 0, sizeof(struct snd_adsp_tdm_record)); ++ ++ /* save the TDM record data */ ++ *tdm_record_data = tdm_record; ++ ++ /* set handle state as NULL state */ ++ tdm_record->state = XF_HANDLE_NULL; ++ tdm_record->base.hrt_state = XF_HANDLE_NULL; ++ ++ /* register TDM Capture component */ ++ if (xf_adsp_tdm_capture_create(&tdm_record->tdm_capture, ++ &cap_callbacks, ++ (void *)&tdm_record->base) != 0) ++ return -EINVAL; ++ ++ /* mark TDM capture component created */ ++ tdm_record->state = XF_HANDLE_CREATED; ++ ++ /* set target handle ID as TDM capture ID */ ++ tdm_record->base.handle_id = tdm_record->tdm_capture->handle_id; ++ ++ /* init lock */ ++ spin_lock_init(&tdm_record->base.lock); ++ ++ /* save the substream data */ ++ tdm_record->base.substream = substream; ++ ++ /* init high resolution timer for updating hw status */ ++ hrtimer_init(&tdm_record->base.hrtimer, ++ CLOCK_MONOTONIC, ++ HRTIMER_MODE_REL); ++ ++ /* PRQA S 0563 1 */ ++ tdm_record->base.hrtimer.function = &snd_adsp_hrtimer_func; ++ tdm_record->base.hrt_state = XF_HANDLE_CREATED; ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare TDM playback function ++ * ++ * \param[out] tdm_playback Pointer to TDM playback data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare TDM playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_prepare(struct snd_adsp_tdm_playback *tdm_playback, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card; ++ struct snd_adsp_control *ctr_if; ++ struct snd_pcm_runtime *runtime; ++ struct xf_adsp_tdm_renderer *tdm_renderer; ++ struct snd_adsp_base_info *base; ++ int i; ++ int pcm_width, ch_mode, fs, frame_size, hw_buffer_size; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ runtime = substream->runtime; ++ tdm_renderer = tdm_playback->tdm_renderer; ++ base = &tdm_playback->base; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ ++ ch_mode = (runtime->channels == 8) ? ++ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; ++ ++ hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ ++ if (pcm_width == 16) ++ base->buf_bytes = base->period_bytes; ++ else ++ base->buf_bytes = ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = hw_buffer_size; ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* it should equal to a period size in bytes */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes; ++ ++ /* prepare parameters to set to TDM playback as it is not ready */ ++ if (COMPONENT_IS_READY(tdm_playback->state) == FALSE) { ++ struct xf_adsp_tdm_renderer_params *params; ++ ++ params = &tdm_renderer->params; ++ ++ /* apply renderer parameters */ ++ params->in_rate = fs; ++ params->ch_mode = ch_mode; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ /* setting Audio device indexes */ ++ params->dma1 = ADMAC_CH00; /* use DMAC for transfer data */ ++ params->dma2 = PDMA_CH03; ++ params->dev1 = SRC1; ++ params->dev2 = SSI30; /* set SSI index to SSI30 */ ++ ++ /* set volume rate if it is set by user or default value as */ ++ /* 100% */ ++ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] >= 0) ++ ? ctr_if->tdm_vol_rate[DIRECT_PLAYBACK] : (1 << 20); ++ ++ /* set output sampling rate if it is set by user */ ++ if (ctr_if->tdm_sample_rate[DIRECT_PLAYBACK] >= 0) ++ params->out_rate = ++ ctr_if->tdm_sample_rate[DIRECT_PLAYBACK]; ++ ++ /* set parameters to ADSP TDM Renderer plugin */ ++ if (xf_adsp_tdm_renderer_set_params(tdm_renderer) != 0) ++ return -EINVAL; ++ ++ /* allocate buffer pool to prepare the execution */ ++ tdm_renderer->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(tdm_renderer->buf_pool)) /* PRQA S 306*/ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ tdm_renderer->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* mark TDM Renderer created */ ++ tdm_playback->state |= XF_HANDLE_READY; ++ ++ /* send zero buffer to plugin to kick init-processing */ ++ memset(base->buffer[0], 0, base->buf_bytes); ++ ++ if (xf_adsp_empty_this_buffer(base->handle_id, base->buffer[0], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until all the buffer have been consummed */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset HW index */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Prepare TDM record function ++ * ++ * \param[out] tdm_record Pointer to TDM record data ++ * \param[in] substream Pointer to substream data ++ * \retval -EINVAL Failed to prepare TDM record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_tdm_record_prepare(struct snd_adsp_tdm_record *tdm_record, ++ struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_card *adsp_card = ++ snd_adsp_get_drvdata_from_substream(substream); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct xf_adsp_tdm_capture *tdm_capture = tdm_record->tdm_capture; ++ struct snd_adsp_base_info *base = &tdm_record->base; ++ int i; ++ int pcm_width, ch_mode, fs, frame_size; ++ ++ /* runtime parameter */ ++ fs = runtime->rate; ++ ++ ch_mode = (runtime->channels == 8) ? ++ XA_TDM_RDR_CHANNEL_MODE_1X8 : XA_TDM_RDR_CHANNEL_MODE_1X6; ++ ++ pcm_width = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? 16 : 24; ++ frame_size = runtime->period_size; ++ ++ /* get number of bytes in a period */ ++ base->period_bytes = snd_pcm_lib_period_bytes(substream); ++ base->buf_bytes = (pcm_width == 16) ? ++ base->period_bytes : ((base->period_bytes * ++ BYTES_PER_SAMPLE(S24_3LE)) / ++ BYTES_PER_SAMPLE(S24_LE)); ++ ++ /* pcm indirect configuration */ ++ base->pcm_indirect.hw_buffer_size = snd_pcm_lib_buffer_bytes(substream); ++ base->pcm_indirect.sw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ /* total size of allocated buffers */ ++ base->pcm_indirect.hw_queue_size = base->period_bytes * ++ XF_BUF_POOL_SIZE; ++ ++ /* prepare parameters to set to TDM Capture as it is not yet ready */ ++ if (COMPONENT_IS_READY(tdm_record->state) == FALSE) { ++ struct xf_adsp_tdm_capture_params *params; ++ ++ params = &tdm_capture->params; ++ ++ /* apply capture parameters */ ++ params->out_rate = fs; ++ params->ch_mode = ch_mode; ++ params->pcm_width = pcm_width; ++ params->frame_size = frame_size; ++ ++ /* setting Audio device indexes */ ++ params->dma1 = PDMA_CH00; ++ params->dma2 = PDMA_CH01; ++ params->dev1 = SRC0; ++ params->dev2 = SSI40; /* set input device is SSI40 */ ++ ++ /* set volume rate if it is set by user or default value as */ ++ /* 100% */ ++ params->vol_rate = (ctr_if->tdm_vol_rate[DIRECT_CAPTURE] >= 0) ++ ? ctr_if->tdm_vol_rate[DIRECT_CAPTURE] : (1 << 20); ++ ++ /* set input rate if it is set by user */ ++ if (ctr_if->tdm_sample_rate[DIRECT_CAPTURE] >= 0) { ++ params->in_rate = ++ ctr_if->tdm_sample_rate[DIRECT_CAPTURE]; ++ } ++ ++ /* allocate buffer pool to prepare the execution */ ++ tdm_capture->buf_pool = xf_adsp_allocate_mem_pool( ++ XF_BUF_POOL_SIZE, base->buf_bytes); ++ ++ if (IS_ERR(tdm_capture->buf_pool)) /* PRQA S 306 */ ++ return -EINVAL; ++ ++ for (i = 0; i < XF_BUF_POOL_SIZE; i++) { ++ base->buffer[i] = xf_adsp_get_data_from_pool( ++ tdm_capture->buf_pool, i); ++ ++ base->buf_queue++; ++ } ++ ++ /* set parameters to ADSP TDM Capture plugin */ ++ if (xf_adsp_tdm_capture_set_params(tdm_capture) != 0) ++ return -EINVAL; ++ ++ /* mark TDM Capture ready */ ++ tdm_record->state |= XF_HANDLE_READY; ++ ++ /* kick init process by sending a zero buffer length */ ++ xf_adsp_fill_this_buffer(base->handle_id, base->buffer[0], 0); ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* wait until finishing initialization */ ++ while (base->buf_queue != XF_BUF_POOL_SIZE) { ++ schedule_timeout_interruptible(2); ++ if (signal_pending(current)) ++ break; ++ ++ /* check the error from initialization */ ++ if (base->runtime_err) ++ return -EINVAL; ++ } ++ ++ /* reset hw data position */ ++ base->hw_idx = 0; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize TDM playback function ++ * ++ * \param[out] tdm_playback Pointer to TDM playback data ++ * \retval -EINVAL Failed to deinitialize TDM playback function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_tdm_playback_deinit(struct snd_adsp_tdm_playback *tdm_playback) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if TDM playback has been created */ ++ if (!tdm_playback) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(tdm_playback->state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process */ ++ /* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(tdm_playback->base.handle_id, ++ NULL, 0); ++ ++ /* free buffer pool *//* PRQA S 3200 2 */ ++ xf_adsp_free_mem_pool(tdm_playback->tdm_renderer->buf_pool); ++ ++ /* destroy TDM Renderer component */ ++ if (xf_adsp_tdm_renderer_destroy( ++ tdm_playback->tdm_renderer) != 0) ++ ret = -EINVAL; ++ ++ tdm_playback->tdm_renderer = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(tdm_playback->base.hrt_state) == TRUE) ++ hrtimer_cancel(&tdm_playback->base.hrtimer); ++ ++ /* free playback data */ ++ kfree(tdm_playback); ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Deinitialize TDM record function ++ * ++ * \param[out] tdm_record Pointer to TDM record data ++ * \retval -EINVAL Failed to deinitialize TDM record function ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_tdm_record_deinit(struct snd_adsp_tdm_record *tdm_record) ++{ ++ int ret = 0; ++ ++ /* perform de-initialization if TDM record has been created already */ ++ if (!tdm_record) ++ return ret; ++ ++ /* perform completion process */ ++ if (COMPONENT_IS_CREATED(tdm_record->state) == TRUE) { ++ /* send buffer with zero length to plugin for */ ++ /* completion process */ ++ /* PRQA S 3200 2 */ ++ xf_adsp_empty_this_buffer(tdm_record->base.handle_id, NULL, 0); ++ ++ /* free buffer pool *//* PRQA S 3200 2 */ ++ xf_adsp_free_mem_pool(tdm_record->tdm_capture->buf_pool); ++ ++ /* destroy TDM Capture component */ ++ if (xf_adsp_tdm_capture_destroy(tdm_record->tdm_capture) != 0) ++ ret = -EINVAL; ++ ++ tdm_record->tdm_capture = NULL; ++ } ++ ++ /* canncel timer interrupt */ ++ if (COMPONENT_IS_CREATED(tdm_record->base.hrt_state) == TRUE) ++ hrtimer_cancel(&tdm_record->base.hrtimer); ++ ++ /* free record data */ ++ kfree(tdm_record); ++ ++ return ret; ++} ++ ++/***************************************************************************** ++ * callback functions of ADSP ALSA driver ++ * ***************************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Open a playback/TDM playback or record/TDM record stream ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_open(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card *adsp_card; ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ struct snd_adsp_control *ctr_if; ++ ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ ctr_if = &adsp_card->ctr_if; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ /* register data for playback/record functions */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* perform playback initialization */ ++ if (snd_adsp_playback_init( ++ &adsp_card->playback[dai_idx], ++ ctr_if->eqz_switch[DIRECT_PLAYBACK][dai_idx], ++ substream) < 0) { ++ /* perform playback de-initialization when */ ++ /* the initialization fails */ ++ snd_adsp_playback_deinit( ++ adsp_card->playback[dai_idx]); ++ ++ adsp_card->playback[dai_idx] = NULL; ++ return -EINVAL; ++ } ++ } else { ++ /* perform record initialization */ ++ if (snd_adsp_record_init( ++ &adsp_card->record[dai_idx], ++ ctr_if->eqz_switch[DIRECT_CAPTURE][dai_idx], ++ substream) < 0) { ++ /* perform record de-initialization when the */ ++ /* initialization fails */ ++ snd_adsp_record_deinit( ++ adsp_card->record[dai_idx]); ++ ++ adsp_card->record[dai_idx] = NULL; ++ return -EINVAL; ++ } ++ } ++ ++ /* save the hardware parameters */ ++ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_hw); ++ ++ /* each period has a frame size */ ++ snd_pcm_hw_constraint_single(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, ++ FRAME_SIZE); ++ } else { ++ /* register data for TDM playback/record functions */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* perform TDM playback initialization */ ++ if (snd_adsp_tdm_playback_init( ++ &adsp_card->tdm_playback, ++ substream) < 0) { ++ /* perform TDM playback de-initialization */ ++ /* when the initialization fails */ ++ snd_adsp_tdm_playback_deinit( ++ adsp_card->tdm_playback); ++ ++ adsp_card->tdm_playback = NULL; ++ return -EINVAL; ++ } ++ } else { ++ /* perform TDM record initialization */ ++ if (snd_adsp_tdm_record_init(&adsp_card->tdm_record, ++ substream) < 0) { ++ /* perform TDM record de-initialization */ ++ /* when the initialization fails */ ++ snd_adsp_tdm_record_deinit( ++ adsp_card->tdm_record); ++ ++ adsp_card->tdm_record = NULL; ++ return -EINVAL; ++ } ++ } ++ ++ /* save the hardware parameters */ ++ snd_soc_set_runtime_hwparams(substream, &snd_pcm_adsp_tdm_hw); ++ ++ /* each period has a frame size */ ++ snd_pcm_hw_constraint_single(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIOD_SIZE, ++ TDM_FRAME_SIZE); ++ } ++ ++ snd_pcm_hw_constraint_integer(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS); ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Close a playback/TDM playback or record/TDM record stream ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_close(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card *adsp_card = ++ snd_adsp_get_drvdata_from_substream(substream); ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ int err = 0; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ /* destroy Renderer/Capture or Equalizer (if used) */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ if (snd_adsp_playback_deinit( ++ adsp_card->playback[dai_idx]) < 0) ++ err = -EINVAL; ++ ++ adsp_card->playback[dai_idx] = NULL; ++ } else { ++ if (snd_adsp_record_deinit( ++ adsp_card->record[dai_idx]) < 0) ++ err = -EINVAL; ++ ++ adsp_card->record[dai_idx] = NULL; ++ } ++ } else { ++ /* destroy TDM Renderer/TDM Capture */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ if (snd_adsp_tdm_playback_deinit( ++ adsp_card->tdm_playback) < 0) ++ err = -EINVAL; ++ ++ adsp_card->tdm_playback = NULL; ++ } else { ++ if (snd_adsp_tdm_record_deinit( ++ adsp_card->tdm_record) < 0) ++ err = -EINVAL; ++ ++ adsp_card->tdm_record = NULL; ++ } ++ } ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Allocate ALSA buffer and calculate expire time of hr timer ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -ENOMEM Cannot allocate ALSA buffer ++ *****************************************************************************/ ++static int snd_adsp_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *hw_params) ++{ ++ struct snd_adsp_base_info *base; ++ int err = 0; ++ ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ /* set expire time of hrtimer, this value should be time for */ ++ /* transfer a frame */ ++ base->ktime = ns_to_ktime((1000000000 / params_rate(hw_params)) * ++ params_period_size(hw_params)); ++ ++ err = snd_pcm_lib_malloc_pages(substream, ++ params_buffer_bytes(hw_params)); ++ ++ /* reset DMA buffer area */ ++ memset(substream->runtime->dma_area, 0, substream->runtime->dma_bytes); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Free the allocated ALSA buffer ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Cannot deallocate buffer ++ *****************************************************************************/ ++static int snd_adsp_pcm_hw_free(struct snd_pcm_substream *substream) ++{ ++ return snd_pcm_lib_free_pages(substream); ++} ++ ++/** ************************************************************************** ++ * \brief Prepare playback/TDM playback or record/TDM record function ++ * before transferring data ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_prepare(struct snd_pcm_substream *substream) ++{ ++ /* get ADSP soundcard and CPU DAI index */ ++ struct snd_adsp_card * ++ adsp_card = snd_adsp_get_drvdata_from_substream(substream); ++ int dai_idx = snd_adsp_get_dai_id_from_substream(substream); ++ int err = 0; ++ ++ if (dai_idx == RDR_DAI_IDX0 || dai_idx == RDR_DAI_IDX1 || ++ dai_idx == RDR_DAI_IDX2 || dai_idx == RDR_DAI_IDX3) { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ /* get playback prepared to execute */ ++ err = snd_adsp_playback_prepare( ++ adsp_card->playback[dai_idx], substream); ++ else ++ /* get record prepared to execute */ ++ err = snd_adsp_record_prepare( ++ adsp_card->record[dai_idx], substream); ++ } else { ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ /* get TDM playback prepared to execute */ ++ err = snd_adsp_tdm_playback_prepare( ++ adsp_card->tdm_playback, substream); ++ else ++ /* get TDM record prepared to execute */ ++ err = snd_adsp_tdm_record_prepare( ++ adsp_card->tdm_record, substream); ++ } ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ * \brief Trigger playback/TDM playback or record/TDM record stream ++ * to go to next phase ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_trigger(struct snd_pcm_substream *substream, int idx) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ switch (idx) { ++ case SNDRV_PCM_TRIGGER_START: ++ case SNDRV_PCM_TRIGGER_RESUME: ++ /* start high-resolution timer */ ++ hrtimer_start(&base->hrtimer, base->ktime, HRTIMER_MODE_REL); ++ ++ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { ++ int buf_queue = 0; ++ ++ /* get current available buffer */ ++ spin_lock_irqsave(&base->lock, base->flag); ++ buf_queue = base->buf_queue; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* send all available buffer to plugin to */ ++ /* get data */ ++ for (; buf_queue > 0; buf_queue--) { ++ if (xf_adsp_fill_this_buffer( ++ base->handle_id, ++ base->buffer[base->buf_idx], ++ base->buf_bytes) != 0) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&base->lock, base->flag); ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ base->buf_idx++; ++ ++ if (base->buf_idx >= XF_BUF_POOL_SIZE) ++ base->buf_idx = 0; ++ } ++ } ++ break; ++ case SNDRV_PCM_TRIGGER_STOP: ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ break; ++ default: ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Return HW data position ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval position HW data position ++ *****************************************************************************/ ++static snd_pcm_uframes_t ++snd_adsp_pcm_pointer(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ unsigned int hw_idx, hw_buffer_size; ++ snd_pcm_uframes_t pointer; ++ ++ /* convert hw index to correct as submitted bytes */ ++ spin_lock_irqsave(&base->lock, base->flag); ++ hw_idx = (base->hw_idx / base->buf_bytes) * base->period_bytes; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ hw_buffer_size = base->pcm_indirect.hw_buffer_size; ++ ++ if (hw_idx >= hw_buffer_size) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ ++ base->hw_idx -= (hw_buffer_size / base->period_bytes) * ++ base->buf_bytes; ++ ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ } ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ pointer = snd_pcm_indirect_playback_pointer(substream, ++ &base->pcm_indirect, ++ hw_idx); ++ else ++ pointer = snd_pcm_indirect_capture_pointer(substream, ++ &base->pcm_indirect, ++ hw_idx); ++ ++ return pointer; ++} ++ ++/** ************************************************************************** ++ * \brief Call read/write process to transfer data ++ * ++ * \param[in] substream Pointer to substream object ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_pcm_ack(struct snd_pcm_substream *substream) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ ++ if (base->runtime_err) ++ return -EINVAL; ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ snd_pcm_indirect_playback_transfer(substream, ++ &base->pcm_indirect, ++ snd_adsp_pcm_transfer); ++ else ++ snd_pcm_indirect_capture_transfer(substream, ++ &base->pcm_indirect, ++ snd_adsp_pcm_transfer); ++ ++ return 0; ++} ++ ++/** *************************************************************************** ++ * \brief Copy data from source buffer to destination buffer ++ * ++ * \params[in] dst Destination buffer pointer ++ * \params[out] src Source buffer pointer ++ * \params[in] dst_size Destination buffer size in byte ++ * \params[in] src_size Source buffer size in byte ++ * \retval None ++ *****************************************************************************/ ++static inline void ++snd_adsp_copy_data(void *dst, void *src, int dst_size, int src_size) ++{ ++ unsigned char *data_dst = dst; ++ unsigned char *data_src = src; ++ int i; ++ ++ if (dst_size == src_size) { ++ /* src and dst bufs are same size, does not need to convert */ ++ memcpy(data_dst, data_src, dst_size); ++ ++ } else if (dst_size < src_size) { ++ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_3LE)); ++ i += BYTES_PER_SAMPLE(S24_3LE)) { ++ *(u32 *)data_dst = *(u32 *)data_src; ++ ++ data_dst += BYTES_PER_SAMPLE(S24_3LE); ++ data_src += BYTES_PER_SAMPLE(S24_LE); ++ } ++ ++ /* copy a S24_3LE sample from S24_LE sample */ ++ data_dst[0] = data_src[0]; ++ data_dst[1] = data_src[1]; ++ data_dst[2] = data_src[2]; ++ ++ } else { ++ unsigned int tmp; ++ ++ for (i = 0; i < (dst_size - BYTES_PER_SAMPLE(S24_LE)); ++ i += BYTES_PER_SAMPLE(S24_LE)) { ++ tmp = *(u32 *)data_src; ++ *(u32 *)data_dst = tmp & 0x0FFFFFF; ++ ++ data_dst += BYTES_PER_SAMPLE(S24_LE); ++ data_src += BYTES_PER_SAMPLE(S24_3LE); ++ } ++ ++ /* copy a S24_LE sample from S24_3LE sample */ ++ data_dst[0] = data_src[0]; ++ data_dst[1] = data_src[1]; ++ data_dst[2] = data_src[2]; ++ data_dst[3] = 0; ++ } ++} ++ ++/** ************************************************************************** ++ * \brief Transfer data process between ALSA buffer and ADSP buffer ++ * ++ * \param[in] substream Pointer to substream object ++ * \param[in] rec Pointer to indirect PCM data ++ * \param[in] bytes Number of byte need to be transferred ++ * \retval None ++ *****************************************************************************/ ++static void snd_adsp_pcm_transfer(struct snd_pcm_substream *substream, ++ struct snd_pcm_indirect *rec, ++ size_t bytes) ++{ ++ struct snd_adsp_base_info * ++ base = snd_adsp_get_base_from_substream(substream); ++ int direct = substream->stream; ++ int trans_bytes = bytes; ++ int buf_bytes, period_bytes; ++ void *dma_buf, *data_buff; ++ ++ /* get the DMA buffer pointer */ ++ dma_buf = (void *)(substream->runtime->dma_area + rec->sw_data); ++ ++ /* get information from base */ ++ buf_bytes = base->buf_bytes; ++ period_bytes = base->period_bytes; ++ ++ /* make sure the available buffer and transfer size - TBD */ ++ while (trans_bytes > 0) { ++ spin_lock_irqsave(&base->lock, base->flag); ++ if (base->buf_queue > 0 && trans_bytes >= period_bytes) { ++ base->buf_queue--; ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ ++ /* get the buffer pointer from stream */ ++ data_buff = base->buffer[base->buf_idx]; ++ ++ if (direct == SNDRV_PCM_STREAM_PLAYBACK) { ++ /* copy data from user *//* PRQA S 3200 2 */ ++ snd_adsp_copy_data(data_buff, dma_buf, ++ buf_bytes, period_bytes); ++ ++ /* send buffer to plugin */ ++ if (xf_adsp_empty_this_buffer(base->handle_id, ++ data_buff, ++ buf_bytes) < 0) ++ base->runtime_err = TRUE; ++ } else { ++ /* copy data to user *//* PRQA S 3200 2 */ ++ snd_adsp_copy_data(dma_buf, data_buff, ++ period_bytes, buf_bytes); ++ ++ /* send buffer to plugin */ ++ if (xf_adsp_fill_this_buffer(base->handle_id, ++ data_buff, ++ buf_bytes) < 0) ++ base->runtime_err = TRUE; ++ } ++ ++ base->buf_idx++; ++ if (base->buf_idx >= XF_BUF_POOL_SIZE) ++ base->buf_idx = 0; ++ } else { ++ spin_unlock_irqrestore(&base->lock, base->flag); ++ break; ++ } ++ ++ trans_bytes -= period_bytes; ++ } ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Volume control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of volume control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_volume_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 799; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get volume value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to volume value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_volume_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ int handle_state, handle_id; ++ int volume, cmd_idx, direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine command index, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* get the volume's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get the volume's value from the plugin */ ++ if (xf_adsp_get_param(handle_id, cmd_idx, &volume) != 0) ++ return -EINVAL; ++ ++ /* check the value after getting it and adjust it */ ++ ucontrol->value.integer.value[0] = (volume == 0xFFFFFFFF) ? ++ (-1) : (volume * VOLUME_SCALE) >> 20; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ ucontrol->value.integer.value[0] = ++ (ctr_if->vol_rate[direction][index] * ++ VOLUME_SCALE) >> 20; ++ else ++ ucontrol->value.integer.value[0] = ++ (ctr_if->tdm_vol_rate[direction] * ++ VOLUME_SCALE) >> 20; ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set volume value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to volume value ++ * \retval 1 Volume change ++ * \retval 0 Volume does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1*/ ++static int ++snd_adsp_control_volume_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ struct snd_adsp_control *ctr_if = &adsp_card->ctr_if; ++ int volume; ++ int ret; ++ int handle_state, handle_id, cmd_idx, volume_get; ++ int direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state and handle ID */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* get the value to set */ ++ if (ucontrol->value.integer.value[0] == -1) { ++ volume = 0xFFFFFFFF; ++ } else { ++ /* round up the value if needed */ ++ volume = (ucontrol->value.integer.value[0] * (1 << 20)) / ++ VOLUME_SCALE; ++ ++ if ((ucontrol->value.integer.value[0] * (1 << 20)) > ++ (VOLUME_SCALE * volume)) ++ volume += 1; ++ } ++ ++ /* determine command index, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* set volume to plugin */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* TDM does not support set volume in runtime state */ ++ if (kcontrol->id.name[0] == PREFIX_OF_TDM_CTR_NAME) ++ return -EINVAL; ++ ++ /* apply set volume value to ADSP from user setting */ ++ if (xf_adsp_set_param(handle_id, cmd_idx, volume) != 0) ++ return -EINVAL; ++ ++ /* get volume from ADSP after setting to confirm */ ++ if (xf_adsp_get_param(handle_id, cmd_idx, &volume_get) != 0) ++ return -EINVAL; ++ ++ /* check if the value has changed */ ++ ret = (volume_get == volume) ? 1 : 0; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ ctr_if->vol_rate[direction][index] = volume; ++ else ++ ctr_if->tdm_vol_rate[direction] = volume; ++ ++ ret = 1; ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Sample Rate Converter control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of sample rate ++ * converter control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_sample_rate_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 48000; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get sample rate value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to sample rate value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_sample_rate_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int *rate; ++ int handle_id, handle_state, cmd_idx, direction; ++ unsigned int index; ++ ++ rate = (int *)&ucontrol->value.integer.value[0]; /* PRQA S 310 */ ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state and handle ID */ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine command, direction, handle state, handle ID */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ handle_id = ++ adsp_card->playback[index]->renderer->handle_id; ++ } ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ handle_id = ++ adsp_card->record[index]->capture->handle_id; ++ } ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) { ++ handle_state = adsp_card->tdm_playback->state; ++ ++ handle_id = ++ adsp_card->tdm_playback->tdm_renderer->handle_id; ++ } ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) { ++ handle_state = adsp_card->tdm_record->state; ++ ++ handle_id = ++ adsp_card->tdm_record->tdm_capture->handle_id; ++ } ++ } ++ } ++ ++ /* get parameter from plugin */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ if (xf_adsp_get_param(handle_id, cmd_idx, rate) != 0) ++ return -EINVAL; ++ } else { ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ *rate = adsp_card->ctr_if.sample_rate[direction][index]; ++ else ++ *rate = adsp_card->ctr_if.tdm_sample_rate[direction]; ++ } ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set sample rate value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to sample rate value ++ * \retval 1 Sample rate change ++ * \retval 0 Sample rate does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1 */ ++static int ++snd_adsp_control_sample_rate_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ unsigned int index; ++ int rate; ++ int handle_state, cmd_idx, direction; ++ int ret = 1; ++ ++ rate = (int)ucontrol->value.integer.value[0]; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine command, direction and handle state */ ++ if (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) { ++ cmd_idx = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ } else if (kcontrol->id.name[0] == PREFIX_OF_CAPTURE_CTR_NAME) { ++ cmd_idx = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->cap_state; ++ ++ } else { ++ if (kcontrol->id.name[3] == TDM_PLAYBACK) { ++ cmd_idx = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ direction = DIRECT_PLAYBACK; ++ ++ if (adsp_card->tdm_playback) ++ handle_state = adsp_card->tdm_playback->state; ++ ++ } else { ++ cmd_idx = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ direction = DIRECT_CAPTURE; ++ ++ if (adsp_card->tdm_record) ++ handle_state = adsp_card->tdm_record->state; ++ } ++ } ++ ++ /* get the value to set */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ return -EINVAL; ++ ++ if (kcontrol->id.name[0] != PREFIX_OF_TDM_CTR_NAME) ++ adsp_card->ctr_if.sample_rate[direction][index] = rate; ++ else ++ adsp_card->ctr_if.tdm_sample_rate[direction] = rate; ++ ++ ret = 1; ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Equalizer control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Equalizer control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = MAX_EQZ_PARAM_NUMBER; ++ uinfo->value.integer.min = -1; ++ uinfo->value.integer.max = 0x7fffffff; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get equalizer parameters value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer parameters value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int handle_state, direction; ++ int i, j, filter_index; ++ unsigned int index; ++ struct xf_adsp_equalizer *equalizer; ++ struct xf_adsp_equalizer_params *eqz_params; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determin direction of stream */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state, handle ID, equalizer pointer */ ++ handle_state = XF_HANDLE_NULL; ++ equalizer = NULL; ++ ++ /* get component's state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->eqz_state; ++ equalizer = adsp_card->playback[index]->equalizer; ++ } ++ } else { ++ if (adsp_card->record[index]) { ++ handle_state = adsp_card->record[index]->eqz_state; ++ equalizer = adsp_card->record[index]->equalizer; ++ } ++ } ++ ++ /* perform parameters' values getting */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get equalizer's parameters */ ++ if (xf_adsp_equalizer_get_params(equalizer) != 0) ++ return -EINVAL; ++ ++ eqz_params = &equalizer->params; ++ } else { ++ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; ++ } ++ ++ /* get equalizer type: PARAMETRIC or GRAPHIC */ ++ ucontrol->value.integer.value[0] = eqz_params->eqz_type; ++ ++ /* get parameters' value from Equalizer plugin */ ++ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ for (i = 0, filter_index = 1; ++ filter_index <= XA_REL_EQZ_FILTER_NUM; ++ i++, filter_index++) { ++ /* get filter index */ ++ ucontrol->value.integer.value[(i * 6) + 1] = ++ filter_index; ++ ++ /* get frequency centre */ ++ ucontrol->value.integer.value[(i * 6) + 2] = ++ eqz_params->p_coef.fc[i]; ++ ++ /* get bandwidth */ ++ ucontrol->value.integer.value[(i * 6) + 3] = ++ eqz_params->p_coef.band_width[i]; ++ ++ /* get filter type */ ++ ucontrol->value.integer.value[(i * 6) + 4] = ++ eqz_params->p_coef.type[i]; ++ ++ /* get gain base */ ++ ucontrol->value.integer.value[(i * 6) + 5] = ++ eqz_params->p_coef.gain_base[i]; ++ ++ /* get gain */ ++ ucontrol->value.integer.value[(i * 6) + 6] = ++ eqz_params->p_coef.gain[i]; ++ } ++ } else { ++ for (i = 0, filter_index = 1; ++ filter_index <= XA_REL_EQZ_GRAPHIC_BAND_NUM; ++ i++, filter_index++) { ++ /* get band index */ ++ ucontrol->value.integer.value[(i * 2) + 1] = ++ filter_index; ++ ++ /* get graphic gain */ ++ ucontrol->value.integer.value[(i * 2) + 2] = ++ eqz_params->g_coef.gain_g[i]; ++ } ++ ++ j = (i * 2) + 1; ++ ++ /* make the rest of values silent */ ++ while (j < MAX_EQZ_PARAM_NUMBER) { ++ ucontrol->value.integer.value[j] = -1; ++ j++; ++ } ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set equalizer parameters value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer parameters value ++ * \retval 1 Equalizer parameters change ++ * \retval 0 Equalizer parameters does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1*/ ++static int snd_adsp_control_eqz_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int handle_state, direction, filter_idx; ++ int i; ++ int index; ++ struct xf_adsp_equalizer_params *eqz_params = NULL; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* get the handle state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->eqz_state; ++ } else { ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->eqz_state; ++ } ++ ++ /* perform equalizer's parameters setting */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ return -EINVAL; ++ ++ /* PRQA S 310 1*/ ++ eqz_params = &adsp_card->ctr_if.eqz_params[direction][index]; ++ ++ i = 0; ++ /* PRQA S 3440 1*/ ++ eqz_params->eqz_type = ucontrol->value.integer.value[i]; ++ i++; ++ filter_idx = 0; ++ ++ if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ while (i < MAX_EQZ_PARAM_NUMBER) { ++ /* get index filter */ ++ /* PRQA S 3440*/ ++ filter_idx = ucontrol->value.integer.value[i]; ++ i++; ++ ++ /* valid index filter is range */ ++ /* (1 to XA_REL_EQZ_FILTER_NUM) */ ++ if (filter_idx >= 1 && ++ filter_idx <= XA_REL_EQZ_FILTER_NUM) { ++ /* PRQA S 3440 5*/ ++ eqz_params->p_coef.fc[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.band_width[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.type[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.gain_base[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ eqz_params->p_coef.gain[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ ++ i++; ++ } ++ /* index filter = -1 means that user */ ++ /* does not set this filter */ ++ else if (filter_idx == -1 || filter_idx == 0) { ++ i += 5; ++ } else { ++ return -EINVAL; ++ } ++ } ++ } else if (eqz_params->eqz_type == XA_REL_EQZ_TYPE_GRAPHIC) { ++ while (i < ((XA_REL_EQZ_GRAPHIC_BAND_NUM * 2) + 1)) { ++ /*get index filter */ ++ /* PRQA S 3440 */ ++ filter_idx = ucontrol->value.integer.value[i++]; ++ ++ if (filter_idx >= 1 && ++ filter_idx <= XA_REL_EQZ_GRAPHIC_BAND_NUM) { ++ eqz_params->g_coef.gain_g[filter_idx - 1] = ++ ucontrol->value.integer.value[i]; ++ i++; ++ ++ } else if (filter_idx == -1 || filter_idx == 0) { ++ i += 1; ++ } else { ++ return -EINVAL; ++ } ++ } ++ } else { ++ return -EINVAL; ++ } ++ ++ return 1; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Equalizer Switch control ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Equalizer ++ * Switch control ++ * \retval 0 Success ++ *****************************************************************************/ ++static int snd_adsp_control_eqz_switch_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = 0; ++ uinfo->value.integer.max = 1; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get equalizer switch value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer switch value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_eqz_switch_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int direction; ++ unsigned int index; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* get the Equalizer switch status */ ++ ucontrol->value.integer.value[0] = ++ adsp_card->ctr_if.eqz_switch[direction][index]; ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set equalizer switch value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to equalizer switch value ++ * \retval 1 Equalizer switch change ++ * \retval 0 Equalizer switch does not change ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++/* PRQA S 3673 1 */ ++static int ++snd_adsp_control_eqz_switch_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int eqz_switch; ++ int handle_state, direction; ++ unsigned int index; ++ int ret = 0; ++ ++ eqz_switch = ucontrol->value.integer.value[0]; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ /* determine the direction */ ++ direction = (kcontrol->id.name[0] == PREFIX_OF_PLAYBACK_CTR_NAME) ? ++ DIRECT_PLAYBACK : DIRECT_CAPTURE; ++ ++ /* set handle state as NULL state */ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine handle state */ ++ if (direction == DIRECT_PLAYBACK) { ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ } else { ++ if (adsp_card->record[index]) ++ handle_state = adsp_card->record[index]->cap_state; ++ } ++ ++ /* set the status of Equalizer */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* runtime setting is not supported */ ++ ret = -EINVAL; ++ } else { ++ adsp_card->ctr_if.eqz_switch[direction][index] = eqz_switch; ++ ret = 1; ++ } ++ ++ return ret; ++} ++ ++/** ************************************************************************** ++ * \brief Get info of Renderer output channel ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] uinfo Pointer to info structure of Renderer output channel ++ * \retval 0 Success ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_info(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_info *uinfo) ++{ ++ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; ++ uinfo->count = 1; ++ uinfo->value.integer.min = MONAURAL; ++ uinfo->value.integer.max = STEREO; ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Get Renderer output channel's value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to Renderer output channel value ++ * \retval 0 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ int rdr_out_ch; ++ unsigned int index; ++ int handle_state, handle_id; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ handle_state = XF_HANDLE_NULL; ++ handle_id = -1; ++ ++ /* determine handle state and handle ID */ ++ if (adsp_card->playback[index]) { ++ handle_state = adsp_card->playback[index]->rdr_state; ++ handle_id = adsp_card->playback[index]->renderer->handle_id; ++ } ++ ++ /* get Renderer output channel's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) { ++ /* get Renderer output channel's value from Renderer plugin */ ++ if (xf_adsp_get_param(handle_id, ++ XA_RDR_CONFIG_PARAM_OUT_CHANNELS, ++ &rdr_out_ch) != 0) { ++ return -EINVAL; ++ } ++ ++ ucontrol->value.integer.value[0] = rdr_out_ch; ++ } else { ++ ucontrol->value.integer.value[0] = ++ adsp_card->ctr_if.rdr_out_ch[index]; ++ } ++ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Set Renderer output channel's value ++ * ++ * \param[in] kcontrol Pointer to control instance ++ * \param[in] ucontrol Pointer to Renderer output channel value ++ * \retval 1 Success ++ * \retval -EINVAL Error ++ *****************************************************************************/ ++static int ++snd_adsp_control_rdr_out_channel_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_adsp_card *adsp_card = snd_kcontrol_chip(kcontrol); ++ unsigned int index; ++ int handle_state; ++ int ret = 1; ++ ++ /* get the index */ ++ index = kcontrol->id.index; ++ ++ handle_state = XF_HANDLE_NULL; ++ ++ /* determine handle state and handle ID */ ++ if (adsp_card->playback[index]) ++ handle_state = adsp_card->playback[index]->rdr_state; ++ ++ /* get Renderer output channel's value */ ++ if (COMPONENT_IS_READY(handle_state) == TRUE) ++ /* not support runtime setting */ ++ ret = -EINVAL; ++ else ++ adsp_card->ctr_if.rdr_out_ch[index] = ++ ucontrol->value.integer.value[0]; ++ ++ return ret; ++} ++ ++/** control interface for playback's volume rate */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_playback_volume_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ } ++}; ++ ++/** control interface for Capture's volume rate */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_capture_volume_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++ } ++}; ++ ++/** control interface for playback's output sample rate */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_playback_sample_rate_out_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ } ++}; ++ ++/** control interface for Capture's input sample rate */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_capture_sample_rate_in_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++ } ++}; ++ ++/** control interface for Equalizer parameters in playback */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_playback_equalizer_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ } ++}; ++ ++/** control interface for Equalizer parameters in record */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_capture_equalizer_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_EQZ_CTR_NAME, ++ .info = &snd_adsp_control_eqz_info, ++ .get = &snd_adsp_control_eqz_get, ++ .put = &snd_adsp_control_eqz_put ++ } ++}; ++ ++/** control interface for Equalizer usage in playback */ ++/* PRQA S 3218 */ ++static struct snd_kcontrol_new ++snd_adsp_playback_equalizer_switch_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ } ++}; ++ ++/** control interface for Equalizer usage in record */ ++/* PRQA S 3218 1*/ ++static struct snd_kcontrol_new ++snd_adsp_capture_equalizer_switch_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX1, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX2, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX3, ++ .name = CAPTURE_EQZ_SWITCH_CTR_NAME, ++ .info = &snd_adsp_control_eqz_switch_info, ++ .get = &snd_adsp_control_eqz_switch_get, ++ .put = &snd_adsp_control_eqz_switch_put ++ } ++}; ++ ++/** control interface for playback's output channel */ ++static struct snd_kcontrol_new ++snd_adsp_playback_out_channel_control[MAX_DAI_IDX - 1] = { ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .index = RDR_DAI_IDX0, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX1, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX2, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ }, ++ { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ++ .index = RDR_DAI_IDX3, ++ .name = PLAYBACK_OUT_CHANNEL_CTR_NAME, ++ .info = &snd_adsp_control_rdr_out_channel_info, ++ .get = &snd_adsp_control_rdr_out_channel_get, ++ .put = &snd_adsp_control_rdr_out_channel_put ++ } ++}; ++ ++/** control interface for TDM playback's volume rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_playback_volume_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_PLAYBACK_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++}; ++ ++/** control interface for TDM capture's volume rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_capture_volume_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_CAPTURE_VOLUME_CTR_NAME, ++ .info = &snd_adsp_control_volume_info, ++ .get = &snd_adsp_control_volume_get, ++ .put = &snd_adsp_control_volume_put ++}; ++ ++/** control interface for TDM playback's output sample rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_playback_sample_rate_out_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_PLAYBACK_OUT_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++}; ++ ++/** control interface for TDM capture's input sample rate */ ++static struct snd_kcontrol_new snd_adsp_tdm_capture_sample_rate_in_control = { ++ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, /* PRQA S 1053 5 */ ++ .name = TDM_CAPTURE_IN_RATE_CTR_NAME, ++ .info = &snd_adsp_control_sample_rate_info, ++ .get = &snd_adsp_control_sample_rate_get, ++ .put = &snd_adsp_control_sample_rate_put ++}; ++ ++/** PCM callback function of the sound card */ ++static struct snd_pcm_ops snd_adsp_pcm_ops = { ++ .open = &snd_adsp_pcm_open, /* PRQA S 1053 10 */ ++ .close = &snd_adsp_pcm_close, ++ .ioctl = &snd_pcm_lib_ioctl, ++ .hw_params = &snd_adsp_pcm_hw_params, ++ .hw_free = &snd_adsp_pcm_hw_free, ++ .prepare = &snd_adsp_pcm_prepare, ++ .trigger = &snd_adsp_pcm_trigger, ++ .pointer = &snd_adsp_pcm_pointer, ++ .ack = &snd_adsp_pcm_ack ++}; ++ ++/******************************************************************* ++ * Internal functions ++ * ****************************************************************/ ++ ++/** ************************************************************************** ++ * \brief Process information get from control structure ++ * ++ * \param[in] eqz_params Equalizer parameters object ++ * \param[in] eqz_ctr_params Equalizer parameters stored in control object ++ * \param[in] flag Indicate playback or capture stream ++ *****************************************************************************/ ++static void snd_adsp_get_eqz_params_from_control( ++ struct xf_adsp_equalizer_params *eqz_params, ++ struct xf_adsp_equalizer_params *eqz_ctr_params, bool flag) ++{ ++ int filter_idx; ++ ++ if (flag) { ++ if (eqz_ctr_params->eqz_type >= 0) ++ eqz_params->eqz_type = eqz_ctr_params->eqz_type; ++ ++ for (filter_idx = 0; filter_idx < XA_REL_EQZ_FILTER_NUM; ++ filter_idx++) { ++ if (eqz_ctr_params->p_coef.fc[filter_idx] >= 0) ++ eqz_params->p_coef.fc[filter_idx] = ++ eqz_ctr_params->p_coef.fc[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.band_width[filter_idx] >= 0) ++ eqz_params->p_coef.band_width[filter_idx] = ++ eqz_ctr_params->p_coef.band_width[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.type[filter_idx] >= 0) ++ eqz_params->p_coef.type[filter_idx] = ++ eqz_ctr_params->p_coef.type[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.gain_base[filter_idx] >= 0) ++ eqz_params->p_coef.gain_base[filter_idx] = ++ eqz_ctr_params->p_coef.gain_base[filter_idx]; ++ ++ if (eqz_ctr_params->p_coef.gain[filter_idx] >= 0) ++ eqz_params->p_coef.gain[filter_idx] = ++ eqz_ctr_params->p_coef.gain[filter_idx]; ++ } ++ for (filter_idx = 0; filter_idx < XA_REL_EQZ_GRAPHIC_BAND_NUM; ++ filter_idx++) { ++ if (eqz_ctr_params->g_coef.gain_g[filter_idx] >= 0) ++ eqz_params->g_coef.gain_g[filter_idx] = ++ eqz_ctr_params->g_coef.gain_g[filter_idx]; ++ } ++ } else { ++ memcpy(eqz_ctr_params, eqz_params, sizeof(*eqz_params)); ++ } ++} ++ ++/******************************************************************* ++ * ALSA ADSP Platform driver interface ++ * ****************************************************************/ ++ ++/** **************************************************************************** ++ * \brief Register control interface and preallocate ALSA buffer ++ * ++ * \param[in] runtime Pointer to runtime PCM data ++ * \retval 0 Success ++ * \retval -EINVAL Cannot register control interface ++ ******************************************************************************/ ++static int snd_adsp_pcm_new(struct snd_soc_pcm_runtime *runtime) ++{ ++ int i = 0, err = 0; ++ int id; ++ struct snd_card *card; ++ struct snd_adsp_card *adsp_card; ++ int alsa_buf_sz = 0; ++ ++ /* get sound card data */ ++ card = runtime->card->snd_card; ++ ++ /* get driver data */ ++ adsp_card = snd_soc_dai_get_drvdata(runtime->cpu_dai); ++ ++ /* get the ID of CPU DAI */ ++ id = runtime->cpu_dai->id; ++ ++ /* register control interfaces */ ++ if (id == RDR_DAI_IDX0 || id == RDR_DAI_IDX1 || ++ id == RDR_DAI_IDX2 || id == RDR_DAI_IDX3) { ++ struct snd_kcontrol *kctl[RDR_CONTROL_NUM]; ++ void *rdr_ctr[RDR_CONTROL_NUM] = { ++ &snd_adsp_playback_volume_control[id], /* PRQA S 1031 */ ++ &snd_adsp_capture_volume_control[id], ++ &snd_adsp_playback_sample_rate_out_control[id], ++ &snd_adsp_capture_sample_rate_in_control[id], ++ &snd_adsp_playback_equalizer_control[id], ++ &snd_adsp_capture_equalizer_control[id], ++ &snd_adsp_playback_equalizer_switch_control[id], ++ &snd_adsp_capture_equalizer_switch_control[id], ++ &snd_adsp_playback_out_channel_control[id] ++ }; ++ ++ /* add basic control instance */ ++ for (i = 0; i < RDR_CONTROL_NUM; i++) { ++ kctl[i] = snd_ctl_new1(rdr_ctr[i], adsp_card); ++ err = snd_ctl_add(card, kctl[i]); ++ if (err < 0) ++ return -EINVAL; ++ } ++ ++ /* assign ALSA buffer size */ ++ alsa_buf_sz = MAX_BUFFER_BYTES; ++ ++ /* enable MIX feature from the 2nd playback/record stream */ ++ if (adsp_card->ctr_if.mix_usage == MIX_UNUSED) ++ adsp_card->ctr_if.mix_usage = FIRST_RUN; ++ else if (adsp_card->ctr_if.mix_usage == FIRST_RUN) ++ adsp_card->ctr_if.mix_usage = SECOND_RUN; ++ ++ } else { ++ struct snd_kcontrol *kctl[TDM_CONTROL_NUM]; ++ void *tdm_ctr[TDM_CONTROL_NUM] = { ++ &snd_adsp_tdm_playback_volume_control, ++ &snd_adsp_tdm_playback_sample_rate_out_control, ++ &snd_adsp_tdm_capture_volume_control, ++ &snd_adsp_tdm_capture_sample_rate_in_control ++ }; ++ ++ /* add basic control instances */ ++ for (i = 0; i < TDM_CONTROL_NUM; i++) { ++ kctl[i] = snd_ctl_new1(tdm_ctr[i], adsp_card); ++ err = snd_ctl_add(card, kctl[i]); ++ if (err < 0) ++ return -EINVAL; ++ } ++ ++ /* assign ALSA buffer size */ ++ alsa_buf_sz = TDM_MAX_BUFFER_BYTES; ++ } ++ ++ return snd_pcm_lib_preallocate_pages_for_all(runtime->pcm, ++ SNDRV_DMA_TYPE_CONTINUOUS, ++ snd_dma_continuous_data(GFP_KERNEL), ++ alsa_buf_sz, alsa_buf_sz); ++} ++ ++/* **************************************************************************** ++ * ALSA ADSP DAI register ++ * ***************************************************************************/ ++ ++/** callback function of platform driver */ ++static struct snd_soc_platform_driver snd_adsp_platform = { ++ .pcm_new = &snd_adsp_pcm_new, /* PRQA S 1053 *//* PRQA S 0674 */ ++ .ops = &snd_adsp_pcm_ops, ++}; ++ ++/** component information of driver */ ++static const struct snd_soc_component_driver snd_adsp_component = { ++ .name = "snd_adsp", /* PRQA S 1053 */ ++}; ++ ++/** DAI information of ADSP ALSA driver */ ++static struct snd_soc_dai_driver snd_adsp_dai[MAX_DAI_IDX] = { ++ { ++ /* PRQA S 1053 */ ++ .id = RDR_DAI_IDX0, ++ .name = "adsp-dai.0", ++ .playback.stream_name = "Playback0", ++ .capture.stream_name = "Capture0", ++ }, ++ { ++ .id = RDR_DAI_IDX1, ++ .name = "adsp-dai.1", ++ .playback.stream_name = "Playback1", ++ .capture.stream_name = "Capture1", ++ }, ++ { ++ .id = RDR_DAI_IDX2, ++ .name = "adsp-dai.2", ++ .playback.stream_name = "Playback2", ++ .capture.stream_name = "Capture2", ++ }, ++ { ++ .id = RDR_DAI_IDX3, ++ .name = "adsp-dai.3", ++ .playback.stream_name = "Playback3", ++ .capture.stream_name = "Capture3", ++ }, ++ { ++ .id = TDM_DAI_IDX, ++ .name = "adsp-tdm-dai", ++ .playback.stream_name = "TDM Playback", ++ .capture.stream_name = "TDM Capture", ++ } ++}; ++ ++/** *************************************************************************** ++ * \brief Register platform driver and ADSP ALSA sound card ++ * ++ * \param[in] pdev Pointer to platform driver data ++ * \retval 0 Success ++ * \retval -ENOMEM Cannot allocate driver's data ++ * \retval -EINVAL Cannot register platform driver or sound card ++ ****************************************************************************/ ++static int snd_adsp_probe(struct platform_device *pdev) ++{ ++ struct snd_adsp_card *adsp_card; ++ int i; ++ ++ /* allocate a card data structure */ ++ adsp_card = kmalloc(sizeof(*adsp_card), GFP_KERNEL); ++ if (!adsp_card) ++ return -ENOMEM; ++ ++ /* init parameters */ ++ memset(adsp_card, 0, sizeof(*adsp_card)); /* PRQA S 3200 */ ++ ++ /* PRQA S 3200 1*/ ++ memset(&adsp_card->ctr_if, -1, sizeof(struct snd_adsp_control)); ++ ++ /* disable Equalizer for all streams */ ++ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { ++ adsp_card->ctr_if.eqz_switch[DIRECT_CAPTURE][i] = 0; ++ adsp_card->ctr_if.eqz_switch[DIRECT_PLAYBACK][i] = 0; ++ } ++ ++ /* disable MIX function for all */ ++ adsp_card->ctr_if.mix_usage = MIX_UNUSED; ++ ++ /* save driver data */ ++ dev_set_drvdata(&pdev->dev, adsp_card); ++ ++ /* register platform device */ ++ if (snd_soc_register_platform(&pdev->dev, &snd_adsp_platform) < 0) { ++ snd_soc_unregister_platform(&pdev->dev); ++ return -EINVAL; ++ } ++ ++ /* fill format information of sound DAI driver for Rdr/Cap function */ ++ for (i = 0; i < (MAX_DAI_IDX - 1); i++) { ++ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].playback.channels_min = MIN_CHANNEL; ++ snd_adsp_dai[i].playback.channels_max = MAX_CHANNEL; ++ ++ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].capture.channels_min = MIN_CHANNEL; ++ snd_adsp_dai[i].capture.channels_max = MAX_CHANNEL; ++ } ++ ++ /* fill format information of sound DAI driver for TDM function */ ++ snd_adsp_dai[i].playback.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].playback.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].playback.channels_min = TDM_MIN_CHANNEL; ++ snd_adsp_dai[i].playback.channels_max = TDM_MAX_CHANNEL; ++ ++ snd_adsp_dai[i].capture.rates = SND_ADSP_SAMPLE_RATES; ++ snd_adsp_dai[i].capture.formats = SND_ADSP_PCM_WIDTHS; ++ snd_adsp_dai[i].capture.channels_min = TDM_MIN_CHANNEL; ++ snd_adsp_dai[i].capture.channels_max = TDM_MAX_CHANNEL; ++ ++ /* register CPU dai */ ++ if (snd_soc_register_component(&pdev->dev, &snd_adsp_component, ++ snd_adsp_dai, ++ ARRAY_SIZE(snd_adsp_dai)) < 0) { ++ snd_soc_unregister_platform(&pdev->dev); ++ return -EINVAL; ++ } ++ ++ dev_info(&pdev->dev, "probed\n"); ++ ++ /* success */ ++ return 0; ++} ++ ++/** ************************************************************************** ++ * \brief Unregister platform driver and ADSP ALSA sound card ++ * ++ * \param[in] pdev Pointer platform driver data ++ * \retval 0 Success ++ * \retval -EINVAL Invalid driver's data ++ *****************************************************************************/ ++static int snd_adsp_remove(struct platform_device *pdev) ++{ ++ /* get ADSP sound card data */ ++ struct snd_adsp_card *adsp_card = dev_get_drvdata(&pdev->dev); ++ ++ if (!adsp_card) ++ return -ENODEV; ++ ++ /* release the ADSP sound card */ ++ kfree(adsp_card); ++ ++ /* unregister platform driver */ ++ snd_soc_unregister_component(&pdev->dev); ++ snd_soc_unregister_platform(&pdev->dev); ++ ++ /* success */ ++ return 0; ++} ++ ++/** ADSP ALSA driver information */ ++static const struct of_device_id snd_adsp_id[] = { ++ { .compatible = "renesas,rcar_adsp_sound_gen3", }, /* PRQA S 1053 */ ++}; ++MODULE_DEVICE_TABLE(of, snd_adsp_id); ++ ++/** platform driver of ADSP ALSA sound card */ ++static struct platform_driver snd_adsp_driver = { ++ .driver = { /* PRQA S 1053 */ ++ .name = "rcar_adsp_sound", ++ .of_match_table = snd_adsp_id, ++ }, ++ .probe = snd_adsp_probe, ++ .remove = snd_adsp_remove, ++}; ++module_platform_driver(snd_adsp_driver); /* PRQA S 0651 */ ++ ++MODULE_AUTHOR("Renesas AudioDSP"); ++MODULE_DESCRIPTION("Platform driver for ADSP"); ++MODULE_LICENSE("GPL v2"); ++MODULE_ALIAS("platform:ADSP-PCM-AUDIO"); +diff --git a/sound/soc/adsp/xf-adsp-base.c b/sound/soc/adsp/xf-adsp-base.c +new file mode 100644 +index 0000000..3ad9445 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-base.c +@@ -0,0 +1,2259 @@ ++/** *************************************************************************** ++ *\file xf-adsp-base.c ++ *\brief Source file for ADSP Base Control layer ++ *\addtogroup ADSP Driver ++ ****************************************************************************** ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ ****************************************************************************** ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#include ++#include ++#include ++ ++#include "xf-adsp-base.h" ++ ++#define XF_AUX_POOL_SIZE (16) /**< size of auxiliary pool*/ ++#define XF_AUX_POOL_MSG_LENGTH (256) /**< size of auxiliary buffer */ ++ ++#define XF_PROXY_ALIGN (64) /**< proxy alignment */ ++ ++/** \def XF_ALIGNED(size) ++ * Get properly aligned buffer length ++ */ ++#define XF_ALIGNED(size)\ ++((((size) + XF_PROXY_ALIGN) - 1) & ~(XF_PROXY_ALIGN - 1)) /* PRQA S 3453 */ ++ ++#ifndef offset_of ++/** \def offset_of(type, member) ++ * Return the offset of member in type structuer in byte ++ */ ++#define offset_of(type, member) \ ++ ((int)(long int)&(((const type *)(0))->member)) /* PRQA S 3453 */ ++#endif ++ ++/************************************************* ++ * Variable and and function declaration ++ * **********************************************/ ++ ++/** ADSP base control data */ ++static struct xf_adsp_base *base; ++ ++/* function declaration */ ++static int xf_adsp_base_register_handle(void *private_data, ++ struct xf_callback_func *cb, ++ int comp_id); ++static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id); ++static int xf_adsp_base_free_handle(int handle_id); ++static void xf_adsp_base_init_handle(void); ++static int xf_adsp_base_get_valid_handle(void); ++static int xf_send_and_receive(struct xf_message *msg); ++static int xf_response_thread(void *data); ++static void xf_buffer_put(struct xf_buffer *buffer); ++static u32 xf_buffer_length(struct xf_buffer *b); ++static struct xf_buffer *xf_buffer_get(struct xf_pool *pool); ++static void *xf_buffer_data(struct xf_buffer *b); ++static int xf_adsp_unregister(int comp_id); ++static int xf_adsp_register(char *name, int *comp_id); ++ ++/************************************************* ++ * Helper function to process pool data ++ * **********************************************/ ++ ++/** *********************************************************** ++ * \brief get buffer from given pool ++ * ++ * \param[in] pool Data pool address ++ * \retval b Pointer to buffer address in pool ++ **************************************************************/ ++static struct xf_buffer *xf_buffer_get(struct xf_pool *pool) ++{ ++ struct xf_buffer *b; ++ ++ b = pool->free; ++ if (b) { ++ pool->free = b->link.next; ++ b->link.pool = pool; ++ } ++ return b; ++} ++ ++/*********************************************************** ++ *\brief return buffer back to pool ++ * ++ *\param[in] buffer Pointer to the buffer data ++ ************************************************************/ ++static void xf_buffer_put(struct xf_buffer *buffer) ++{ ++ struct xf_pool *pool = buffer->link.pool; ++ ++ buffer->link.next = pool->free; ++ pool->free = buffer; ++} ++ ++/*********************************************************** ++ *\brief get the address of the given buffer data ++ * ++ *\param[in] b Pointer to the buffer data ++ *\retval address Address of buffer data ++ ************************************************************/ ++static void *xf_buffer_data(struct xf_buffer *b) ++{ ++ return b->address; ++} ++ ++/************************************************************ ++ *\brief get the length of the given buffer data ++ * ++ *\param[in] b Pointer to the buffer data ++ *\retval length Size of buffer data ++ ************************************************************/ ++static u32 xf_buffer_length(struct xf_buffer *b) /* PRQA S 3673 */ ++{ ++ return b->link.pool->length; ++} ++ ++/************************************************************ ++ *\brief set data to the given command message ++ * ++ *\param[out] m Pointer to the command message ++ *\param[in] id Message ID ++ *\param[in] opcode Message opcode ++ *\param[in] length Message length ++ *\param[in] buf Pointer to the buffer data ++ *\param[in] next Pointer to the next message ++ *\retval m Pointer to the command message ++ ************************************************************/ ++static inline struct xf_message * ++xf_create_msg(struct xf_message *m, u32 id, u32 opcode, u32 length, void *buf, ++ struct xf_message *next) ++{ ++ if (m) { ++ m->id = id; ++ m->opcode = opcode; ++ m->length = length; ++ m->buffer = buf; ++ m->next = next; ++ } ++ ++ return m; ++} ++ ++/***************************************************************** ++ *\brief synchronous send and wait for response message from proxy ++ * ++ *\param[in] msg Pointer to the command message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ ****************************************************************/ ++static int xf_send_and_receive(struct xf_message *msg) ++{ ++ int err; ++ int opcode = msg->opcode; ++ ++ /* reset the base flag */ ++ spin_lock(&base->lock); ++ base->base_flag = FALSE; ++ spin_unlock(&base->lock); ++ ++ err = base->cmd.send(base->client, (void *)msg); ++ if (err != 0) ++ return err; ++ ++ /* sleep and wait for the response wake up event */ ++ if (wait_event_interruptible(base->base_wait, ++ base->base_flag || base->err_flag)) { ++ return -EINVAL; ++ } ++ ++ if (base->err_flag != 0) { ++ spin_lock(&base->lock); ++ base->err_flag = FALSE; ++ spin_unlock(&base->lock); ++ return -EINVAL; ++ } ++ ++ /* save the response message */ ++ /* PRQA S 3200 */ ++ memcpy(msg, &base->base_msg, sizeof(struct xf_message)); ++ ++ /* check if the reponsed message is right */ ++ if (msg->opcode != opcode) ++ return -EINVAL; ++ ++ return 0; ++} ++ ++/************************************************************* ++ *\brief send a message to proxy ++ * ++ *\param[in] msg Pointer to the command message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++static inline int xf_send(struct xf_message *msg) ++{ ++ return base->cmd.send(base->client, (void *)msg); ++} ++ ++/** *********************************************************** ++ *\brief receive message from proxy ++ * ++ *\param[in] msg Pointer to store the response message ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++static inline int xf_receive(struct xf_message *msg) ++{ ++ /* do not wait here */ ++ return base->cmd.recv(base->client, (void *)msg); ++} ++ ++/** *********************************************************** ++ *\brief thread for receive response data ++ **************************************************************/ ++static int xf_response_thread(void *data) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ int id; ++ ++ /* set polling to wait the response message */ ++ spin_lock(&base->lock); ++ base->wait_flag = FALSE; ++ spin_unlock(&base->lock); ++ ++ while (!kthread_should_stop()) { ++ if (base->cmd.poll(base->client, &base->wait_flag) != 0) ++ continue; ++ ++ if (xf_receive(&msg) != 0) ++ continue; ++ ++ /* get the handle id */ ++ id = XF_AP_CLIENT(msg.id); ++ ++ /* check the destination of the response message */ ++ if (id == 0) { ++ /* message is from base control */ ++ /* PRQA S 3200 1*/ ++ memcpy(&base->base_msg, &msg, ++ sizeof(struct xf_message)); ++ ++ spin_lock(&base->lock); ++ base->base_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ continue; ++ } ++ ++ /* get handle data */ ++ handle = xf_adsp_base_get_handle(id); ++ ++ if (handle == 0) ++ continue; ++ ++ switch (msg.opcode) { ++ case XF_EMPTY_THIS_BUFFER: /* PRQA S 0594 */ ++ handle->cb->empty_buf_done(handle->private_data, ++ msg.opcode, ++ msg.length, ++ msg.buffer); ++ break; ++ case XF_FILL_THIS_BUFFER: /* PRQA S 0594 */ ++ handle->cb->fill_buf_done(handle->private_data, ++ msg.opcode, ++ msg.length, ++ msg.buffer); ++ break; ++ case XF_SET_PARAM: /* PRQA S 0594 4 */ ++ case XF_GET_PARAM: ++ case XF_ROUTE: ++ case XF_UNROUTE: ++ /* message is from base control */ ++ memcpy(&base->base_msg, &msg, ++ sizeof(struct xf_message)); /* PRQA S 3200 */ ++ ++ spin_lock(&base->lock); ++ base->base_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ break; ++ default: ++ /* error has occurred */ ++ handle->cb->event_handler(handle->private_data); ++ ++ xf_adsp_base_free_handle(id); /* PRQA S 3200 */ ++ ++ spin_lock(&base->lock); ++ base->err_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ wake_up(&base->base_wait); ++ break; ++ } ++ } ++ ++ pr_info("ADSP base thread was exited\n"); ++ ++ do_exit(0); ++ return 0; ++} ++ ++/************************************************************* ++ * \brief register component to ADSP ++ * ++ * \param[in] name Name string of component ++ * \param[out] comp_id Store the registered component ID ++ * \retval 0 Success ++ * \retval -EINVAL Failed ++ **************************************************************/ ++static int xf_adsp_register(char *name, int *comp_id) /* PRQA S 3673 */ ++{ ++ struct xf_message msg; ++ struct xf_buffer *b = xf_buffer_get(base->aux_pool); ++ int err = 0; ++ ++ msg.id = __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)); ++ msg.opcode = XF_REGISTER; ++ msg.length = strlen(name) + 1; ++ msg.buffer = xf_buffer_data(b); ++ ++ /* copy identify name of ADSP component */ ++ if (msg.length <= xf_buffer_length(b)) ++ strncpy(msg.buffer, name, msg.length); /* PRQA S 3200 */ ++ else ++ strncpy(msg.buffer, name, xf_buffer_length(b));/* PRQA S 3200 */ ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the registered component ID */ ++ *comp_id = XF_MSG_SRC(msg.id); ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ * \brief unregister component from ADSP ++ * \param[in] comp_id Registered component ID ++ * \retval 0 Success ++ * \retval -EINVAL Failed ++ **************************************************************/ ++static int xf_adsp_unregister(int comp_id) ++{ ++ struct xf_message msg; ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), comp_id), ++ XF_UNREGISTER, 0, NULL, NULL); /* PRQA S 3200 */ ++ ++ return xf_send_and_receive(&msg); ++} ++ ++/*************************************************************** ++ * APIs for ADSP component helper ++ * ************************************************************/ ++/** *********************************************************** ++ * \brief allocate memory pool from shared memory ++ * \param[in] pool_size Number of buffer need to allocate ++ * \param[in] buf_length Size of each buffer in bytes ++ * \retval pool Pointer to allocated pool ++ * \retval -EINVAL Invalid base data ++ * \retval -ENOMEM Out of memory resource ++ **************************************************************/ ++struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length) ++{ ++ void *data; ++ u32 number; ++ struct xf_buffer *b; ++ struct xf_message msg; ++ struct xf_pool *pool; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return ERR_PTR(-EINVAL); /* PRQA S 0306 */ ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), ++ XF_ALLOC, ++ buf_length * pool_size, NULL, NULL); /* PRQA S 3200 */ ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ ++ ++ /* PRQA S 0306 1 */ ++ pool = kmalloc(offset_of(struct xf_pool, buffer) + ++ (pool_size * sizeof(struct xf_buffer)), GFP_KERNEL); ++ ++ if (!pool) ++ return ERR_PTR(-ENOMEM); /* PRQA S 0306 */ ++ ++ pool->length = buf_length; ++ pool->number = pool_size; ++ pool->p = msg.buffer; ++ ++ number = pool_size; ++ for (pool->free = b = &pool->buffer[0], data = pool->p; ++ number > 0; number--, b++) { /* PRQA S 2462,3418,0489 */ ++ /* set address of the buffer */ ++ b->address = data; ++ ++ /* fill buffer into free list */ ++ if (number == 1) ++ b->link.next = NULL; ++ else ++ b->link.next = b + 1; /* PRQA S 0489 */ ++ ++ /* advance data pointer in contigous buffer */ ++ data += buf_length; /* PRQA S 0550 */ ++ } ++ ++ return pool; ++} ++ ++/** *********************************************************** ++ *\brief return memory to shared memory ++ *\param[in] pool Data pool address ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or pool data ++ **************************************************************/ ++int xf_adsp_free_mem_pool(struct xf_pool *pool) ++{ ++ struct xf_message msg; ++ ++ /* check the sane ADSP base pool data*/ ++ if (!base || !pool) ++ return -EINVAL; ++ ++ xf_create_msg(&msg, __XF_MSG_ID(__XF_AP_PROXY(0), __XF_DSP_PROXY(0)), ++ XF_FREE, pool->number * pool->length, ++ pool->p, NULL); /* PRQA S 3200 */ ++ ++ xf_send_and_receive(&msg); /* PRQA S 3200 */ ++ ++ kfree(pool); ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief get buffer from given pool ++ * ++ *\param[in] pool Data pool address ++ *\param[in] index Buffer index ++ *\retval b Pointer to buffer address in pool ++ *\retval -EINVAL Invalid pool or index ++ **************************************************************/ ++char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index) ++{ ++ struct xf_buffer *buf[XF_BUF_POOL_SIZE] = {0}; ++ char *data; ++ int i; ++ ++ /* check the sane pool data*/ ++ if (!pool) ++ return ERR_PTR(-EINVAL); /* PRQA S 306 */ ++ ++ /* check the index is valid */ ++ if (index > (pool->number - 1)) ++ return ERR_PTR(-EINVAL); /* PRQA S 306 */ ++ ++ /* get buffer from pool */ ++ for (i = 0; i <= index; i++) ++ buf[i] = xf_buffer_get(pool); ++ ++ /* get data from buffer */ ++ data = xf_buffer_data(buf[index]); ++ ++ /* return buffer to pool */ ++ for (i = index; i >= 0; i--) ++ xf_buffer_put(buf[i]); ++ ++ return data; ++} ++ ++/** *********************************************************** ++ *\brief send empty this buffer command to ADSP framework ++ * ++ *\param[in] handle_id ID of the registered handle ++ *\param[in] buffer Pointer to data buffer ++ *\param[in] length Size of buffer in bytes ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ /* submit message to port 0 of component */ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_EMPTY_THIS_BUFFER, length, buffer, NULL); ++ ++ xf_send(&msg); /* PRQA S 3200 */ ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief send fill this buffer command to ADSP framework ++ * ++ *\param[in] handle_id ID of the registered handle ++ *\param[in] buffer Pointer to data buffer ++ *\param[in] length Size of buffer in bytes ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length) ++{ ++ struct xf_message msg; ++ struct xf_handle *handle; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ /* submit message to port 1 of component */ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 1)), ++ XF_FILL_THIS_BUFFER, length, buffer, NULL); ++ ++ xf_send(&msg); /* PRQA S 3200 */ ++ ++ return 0; ++} ++ ++/** *********************************************************** ++ *\brief route data between two registered ADSP plugins ++ * ++ *\param[in] src_handle_id Handle ID of source plugin ++ *\param[in] dst_handle_id Handle ID of sink plugin ++ *\param[in] buf_cnt Number of buffer in tunnel ++ *\param[in] buf_size Size of each buffer in tunnel ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int ++xf_adsp_route(int src_handle_id, int dst_handle_id, int buf_cnt, int buf_size) ++{ ++ struct xf_route_port_msg *route_msg; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ struct xf_handle *dst_handle, *src_handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ /* get handle data */ ++ dst_handle = xf_adsp_base_get_handle(dst_handle_id); ++ src_handle = xf_adsp_base_get_handle(src_handle_id); ++ ++ if (!dst_handle || !src_handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ route_msg = xf_buffer_data(b); ++ ++ /* route information */ ++ route_msg->dst = __XF_PORT_SPEC2(dst_handle->comp_id, 0); ++ route_msg->alloc_align = 4; ++ route_msg->alloc_number = buf_cnt; ++ route_msg->alloc_size = buf_size; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, src_handle_id), ++ __XF_PORT_SPEC2(src_handle->comp_id, 1)), ++ XF_ROUTE, sizeof(*route_msg), route_msg, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief set a single parameter ++ * ++ *\param[in] handle_id ID of registered handle ++ *\param[in] index Sub-command index of parameter ++ *\param[in] value the setting value ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_set_param(int handle_id, int index, int value) ++{ ++ struct xf_message msg; ++ struct xf_buffer *b; ++ struct xf_set_param_msg *msg_params; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ msg_params->item[0].id = index; ++ msg_params->item[0].value = value; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(1), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get a single parameter ++ * ++ *\param[in] handle_id ID of registered handle ++ *\param[in] index Sub-command index of parameter ++ *\param[out] value Store the getting value ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_get_param(int handle_id, int index, int *value) ++{ ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base and value data */ ++ if (!base || !value) ++ return -EINVAL; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ msg_params->c.id[0] = index; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(1), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ *value = msg_params->r.value[0]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/*************************************************** ++ * APIs for ADSP base control ++ * ************************************************/ ++ ++/** *********************************************************** ++ *\brief initialize ADSP base's instance ++ * ++ *\retval 0 Success ++ *\retval -EINVAL ADSP base's instance has been initialized ++ *\retval -ENOMEM Cannot allocate memory for ADSP base ++ *\retval -EBUSY Cannot register client to proxy ++ **************************************************************/ ++int xf_adsp_base_create(struct xf_adsp_base_cmd *cmd) ++{ ++ int err = 0; ++ ++ if (base != 0) ++ return -EINVAL; ++ ++ if (!cmd || !cmd->recv || !cmd->send || !cmd->poll || ++ !cmd->client_register || !cmd->client_unregister) ++ return -EINVAL; ++ ++ base = kmalloc(sizeof(*base), GFP_KERNEL); ++ if (!base) ++ return -ENOMEM; ++ ++ memset(base, 0, sizeof(struct xf_adsp_base)); /* PRQA S 3200 */ ++ ++ /* store the proxy command */ ++ memcpy(&base->cmd, cmd, sizeof(struct xf_adsp_base_cmd)); ++ ++ /* create client to connect from proxy driver */ ++ err = base->cmd.client_register(&base->client); ++ if (err != 0) ++ goto err3; /* PRQA S 2001 */ ++ ++ /* initialize waiting queue */ ++ init_waitqueue_head(&base->base_wait); ++ ++ /* initialize handle */ ++ xf_adsp_base_init_handle(); ++ ++ /* create thread to get the responsed message from proxy */ ++ base->rsp_thread = kthread_run(&xf_response_thread, ++ (void *)base, "adsp base"); ++ ++ if (base->rsp_thread != 0) { ++ pr_info("ADSP base thread has been started.\n"); ++ } else { ++ pr_info("Failed in create base thread\n"); ++ err = -ENOMEM; ++ goto err2; /* PRQA S 2001 */ ++ } ++ ++ /* allocate auxiliary pool for component usage */ ++ base->aux_pool = xf_adsp_allocate_mem_pool( ++ XF_AUX_POOL_SIZE, ++ XF_ALIGNED(XF_AUX_POOL_MSG_LENGTH)); ++ ++ if (IS_ERR(base->aux_pool)) { /* PRQA S 306 */ ++ err = -ENOMEM; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ pr_info("ADSP base was created\n"); ++ return 0; ++ ++err1: ++ /* cancel the waitting queue */ ++ spin_lock(&base->lock); ++ base->wait_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ /* stop thread inadvance */ ++ kthread_stop(base->rsp_thread); ++ ++err2: ++ base->cmd.client_unregister(base->client); ++ ++err3: ++ kfree(base); ++ base = NULL; ++ ++ return err; ++} ++EXPORT_SYMBOL(xf_adsp_base_create); /* PRQA S 0651 */ ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP base's instance ++ * ++ *\retval 0 Success ++ *\retval -EINVAL Invalid ADSP base's instance ++ **************************************************************/ ++int xf_adsp_base_destroy(void) ++{ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ /* free auxiliary pool to shared memory */ ++ xf_adsp_free_mem_pool(base->aux_pool); /* PRQA S 3200 */ ++ ++ /* cancel wait the response message, go to stop process */ ++ spin_lock(&base->lock); ++ base->wait_flag = TRUE; ++ spin_unlock(&base->lock); ++ ++ /* stop response thread */ ++ kthread_stop(base->rsp_thread); ++ ++ /* unregister client */ ++ base->cmd.client_unregister(base->client); ++ ++ kfree(base); ++ base = NULL; ++ ++ pr_info("ADSP base was destroyed\n"); ++ return 0; ++} ++EXPORT_SYMBOL(xf_adsp_base_destroy); /* PRQA S 0651 */ ++ ++/** *********************************************************** ++ * \brief initialize handle instance ++ **************************************************************/ ++static inline void xf_adsp_base_init_handle(void) ++{ ++ int i; ++ ++ for (i = 0; i < MAX_HANDLE; i++) ++ base->handle[i] = NULL; ++} ++ ++/** *********************************************************** ++ *\brief get the next available handle ID for register ++ * ++ *\retval -1 Unavailable handle ID ++ *\retval 0 to 255 Available handle ID ++ **************************************************************/ ++static inline int xf_adsp_base_get_valid_handle(void) ++{ ++ int id = -1; ++ int i; ++ ++ for (i = 0; i < MAX_HANDLE; i++) { ++ /* get the id of the first available handler */ ++ if (!base->handle[i]) { ++ id = i; ++ break; ++ } ++ } ++ ++ return id; ++} ++ ++/** *********************************************************** ++ *\brief register a handle instance for component usage ++ * ++ *\param[in] private_data Private data of this component ++ *\param[in] cb Callback function ++ *\param[in] comp_id ID of register component ++ *\retval id ID of registered handle ++ *\retval -EINVAL Cannot get the handle instance ++ *\retval -ENOMEM Cannot allocate handle memory ++ **************************************************************/ ++static int xf_adsp_base_register_handle(void *private_data, ++ struct xf_callback_func *cb, ++ int comp_id) ++{ ++ struct xf_handle *handle; ++ int id; ++ ++ /* get the next handle id */ ++ id = xf_adsp_base_get_valid_handle(); ++ ++ /* check available handle in base */ ++ if (id < 0) ++ return -EINVAL; ++ ++ /* allocate handle data */ ++ handle = kmalloc(sizeof(*handle), GFP_KERNEL); ++ if (!handle) ++ return -ENOMEM; ++ ++ /* save handle data */ ++ handle->private_data = private_data; ++ handle->cb = cb; ++ handle->comp_id = comp_id; ++ ++ /* save the hanle data */ ++ base->handle[id] = handle; ++ ++ /* return the id numbering in base handle */ ++ return (id + 1); ++} ++ ++/** *********************************************************** ++ *\brief get handle instance from handle ID ++ * ++ *\param[in] handle_id ID of registered handle ++ *\retval handle Pointer to handle instance ++ **************************************************************/ ++static inline struct xf_handle *xf_adsp_base_get_handle(int handle_id) ++{ ++ return base->handle[handle_id - 1]; ++} ++ ++/** *********************************************************** ++ *\brief free the registered handle instance ++ * ++ *\param[in] handle_id ID of registered handle ++ *\retval 0 Success ++ *\retval -EINVAL Invalid handle ID ++ **************************************************************/ ++static int xf_adsp_base_free_handle(int handle_id) ++{ ++ if (handle_id < 1 || handle_id > MAX_HANDLE) ++ return -EINVAL; ++ ++ kfree(base->handle[handle_id - 1]); ++ base->handle[handle_id - 1] = NULL; ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Renderer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Renderer parameters ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_renderer_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ params = &renderer->params; ++ ++ /* get Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_CHANNELS; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; ++ msg_params->item[i++].value = params->out_channel; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_MIX_CONTROL; ++ msg_params->item[i++].value = params->mix_ctrl; ++ ++ msg_params->item[i].id = XA_RDR_CONFIG_PARAM_STATE; ++ msg_params->item[i++].value = params->state; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Renderer parameters ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 */ ++int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_adsp_renderer_params *rdr_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ rdr_params = &renderer->params; ++ ++ /* get Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_CHANNELS; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_OUT_CHANNELS; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_MIX_CONTROL; ++ msg_params->c.id[i++] = XA_RDR_CONFIG_PARAM_STATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ rdr_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ rdr_params->channel = msg_params->r.value[i++]; ++ rdr_params->pcm_width = msg_params->r.value[i++]; ++ rdr_params->frame_size = msg_params->r.value[i++]; ++ rdr_params->dev1 = msg_params->r.value[i++]; ++ rdr_params->dev2 = msg_params->r.value[i++]; ++ rdr_params->dma1 = msg_params->r.value[i++]; ++ rdr_params->dma2 = msg_params->r.value[i++]; ++ rdr_params->out_rate = msg_params->r.value[i++]; ++ rdr_params->vol_rate = msg_params->r.value[i++]; ++ rdr_params->out_channel = msg_params->r.value[i++]; ++ rdr_params->mix_ctrl = msg_params->r.value[i++]; ++ rdr_params->state = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Renderer component ++ * ++ *\param[in,out] renderer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_renderer *rdr; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ rdr = kmalloc(sizeof(*rdr), GFP_KERNEL); ++ if (!rdr) ++ return -ENOMEM; ++ ++ memset(rdr, 0, sizeof(struct xf_adsp_renderer)); /* PRQA S 3200 */ ++ ++ /* register renderer component */ ++ err = xf_adsp_register("renderer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register Renderer to ADSP base control */ ++ rdr->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (rdr->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from Renderer plugin */ ++ err = xf_adsp_renderer_get_params(rdr); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save renderer compoent data */ ++ *renderer = rdr; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(rdr); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Renderer component ++ * ++ *\param[in] renderer Pointer to Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !renderer) ++ return -EINVAL; ++ ++ handle_id = renderer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(renderer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Capture component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Capture parameters ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_capture_set_params(struct xf_adsp_capture *capture) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_capture_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ params = &capture->params; ++ ++ /* get Capture's handle data */ ++ handle = xf_adsp_base_get_handle(capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_CHANNELS; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ msg_params->item[i].id = XA_CAP_CONFIG_PARAM_STATE; ++ msg_params->item[i++].value = params->state; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Capture parameters ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 */ ++int xf_adsp_capture_get_params(struct xf_adsp_capture *capture) ++{ ++ struct xf_adsp_capture_params *cap_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ cap_params = &capture->params; ++ ++ /* get Capture's handle data */ ++ handle = xf_adsp_base_get_handle(capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 11 1*/ ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_CHANNELS; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->c.id[i++] = XA_CAP_CONFIG_PARAM_STATE; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ cap_params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 11 */ ++ cap_params->channel = msg_params->r.value[i++]; ++ cap_params->pcm_width = msg_params->r.value[i++]; ++ cap_params->frame_size = msg_params->r.value[i++]; ++ cap_params->dev1 = msg_params->r.value[i++]; ++ cap_params->dev2 = msg_params->r.value[i++]; ++ cap_params->dma1 = msg_params->r.value[i++]; ++ cap_params->dma2 = msg_params->r.value[i++]; ++ cap_params->out_rate = msg_params->r.value[i++]; ++ cap_params->vol_rate = msg_params->r.value[i++]; ++ cap_params->state = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Capture component ++ * ++ *\param[in,out] capture Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Capture instance ++ *****************************************************************************/ ++int xf_adsp_capture_create(struct xf_adsp_capture **capture, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_capture *cap; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ cap = kmalloc(sizeof(*cap), GFP_KERNEL); ++ if (!cap) ++ return -ENOMEM; ++ ++ memset(cap, 0, sizeof(struct xf_adsp_capture)); /* PRQA S 3200 */ ++ ++ /* register capture component */ ++ err = xf_adsp_register("capture", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register capture to ADSP base control */ ++ cap->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (cap->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from capture plugin */ ++ err = xf_adsp_capture_get_params(cap); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save capture compoent data */ ++ *capture = cap; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(cap); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Capture component ++ * ++ *\param[in] capture Pointer to Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Capture data ++ **************************************************************/ ++int xf_adsp_capture_destroy(struct xf_adsp_capture *capture) /* PRQA S 3673 */ ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !capture) ++ return -EINVAL; ++ ++ handle_id = capture->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(capture); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for Equalizer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP Equalizer parameters ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_equalizer_params *params; ++ struct xf_buffer *b; ++ int i, n; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ params = &equalizer->params; ++ ++ /* get Equalizer's handle data */ ++ handle = xf_adsp_base_get_handle(equalizer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_COEF_FS; ++ msg_params->item[i++].value = params->rate; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_CH; ++ msg_params->item[i++].value = params->channel; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; ++ msg_params->item[i++].value = params->eqz_type; ++ ++ if (params->eqz_type == XA_REL_EQZ_TYPE_PARAMETRIC) { ++ struct xf_equalizer_parametric_coef *coef = ¶ms->p_coef; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; ++ msg_params->item[i++].value = coef->type[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; ++ msg_params->item[i++].value = coef->fc[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; ++ msg_params->item[i++].value = coef->band_width[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; ++ msg_params->item[i++].value = coef->gain[n]; ++ ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; ++ msg_params->item[i++].value = coef->gain_base[n]; ++ } ++ } else { ++ struct xf_equalizer_graphic_coef *coef = ¶ms->g_coef; ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { ++ msg_params->item[i].id = ++ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; ++ msg_params->item[i++].value = coef->gain_g[n]; ++ } ++ } ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP Equalizer parameters ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_adsp_equalizer_params *eqz_params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i, n; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ eqz_params = &equalizer->params; ++ ++ /* get Equalizer's handle data */ ++ handle = xf_adsp_base_get_handle(equalizer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_COEF_FS; /* PRQA S 3440 4 */ ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_CH; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_EQZ_TYPE; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ /* PRQA S 3440 5 */ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA + n; ++ ++ msg_params->c.id[i++] = ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA + n; ++ } ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) ++ /* PRQA S 3440 1 */ ++ msg_params->c.id[i++] = XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA + n; ++ ++ /* PRQA S 3200 2 */ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, equalizer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ eqz_params->rate = msg_params->r.value[i++]; /* PRQA S 3440 4 */ ++ eqz_params->channel = msg_params->r.value[i++]; ++ eqz_params->pcm_width = msg_params->r.value[i++]; ++ eqz_params->eqz_type = msg_params->r.value[i++]; ++ ++ for (n = 0; n < XA_REL_EQZ_FILTER_NUM; n++) { ++ /* PRQA S 3440 5 */ ++ eqz_params->p_coef.type[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.fc[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.band_width[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.gain[n] = msg_params->r.value[i++]; ++ eqz_params->p_coef.gain_base[n] = msg_params->r.value[i++]; ++ } ++ ++ for (n = 0; n < XA_REL_EQZ_GRAPHIC_BAND_NUM; n++) { ++ /* PRQA S 3440 1 */ ++ eqz_params->g_coef.gain_g[n] = msg_params->r.value[i++]; ++ } ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create Equalizer component ++ * ++ *\param[in,out] equalizer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Equalier instance ++ *****************************************************************************/ ++int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_equalizer *eqz; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ eqz = kmalloc(sizeof(*eqz), GFP_KERNEL); ++ if (!eqz) ++ return -ENOMEM; ++ ++ memset(eqz, 0, sizeof(struct xf_adsp_equalizer)); /* PRQA S 3200 */ ++ ++ /* register equalizer component */ ++ err = xf_adsp_register("equalizer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register equalizer to ADSP base control */ ++ eqz->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (eqz->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from equalizer plugin */ ++ err = xf_adsp_equalizer_get_params(eqz); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save equalizer compoent data */ ++ *equalizer = eqz; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(eqz); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP Equalizer component ++ * ++ *\param[in] equalizer Pointer to Equalizer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Equalizer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base and Equalizer data */ ++ if (!base || !equalizer) ++ return -EINVAL; ++ ++ handle_id = equalizer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(equalizer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for TDM Renderer component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP TDM Renderer parameters ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_tdm_renderer_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ params = &tdm_renderer->params; ++ ++ /* get TDM Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->item[i++].value = params->ch_mode; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP TDM Renderer parameters ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_adsp_tdm_renderer_params *params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ params = &tdm_renderer->params; ++ ++ /* get TDM Renderer's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_renderer->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT1; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUTPUT2; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_renderer->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ params->ch_mode = msg_params->r.value[i++]; ++ params->pcm_width = msg_params->r.value[i++]; ++ params->frame_size = msg_params->r.value[i++]; ++ params->dev1 = msg_params->r.value[i++]; ++ params->dev2 = msg_params->r.value[i++]; ++ params->dma1 = msg_params->r.value[i++]; ++ params->dma2 = msg_params->r.value[i++]; ++ params->out_rate = msg_params->r.value[i++]; ++ params->vol_rate = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create TDM Renderer component ++ * ++ *\param[in,out] tdm_renderer Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, ++ struct xf_callback_func *cb, ++ void *private_data) ++{ ++ struct xf_adsp_tdm_renderer *tdm_rdr; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ tdm_rdr = kmalloc(sizeof(*tdm_rdr), GFP_KERNEL); ++ if (!tdm_rdr) ++ return -ENOMEM; ++ ++ /* PRQA S 3200 */ ++ memset(tdm_rdr, 0, sizeof(struct xf_adsp_tdm_renderer)); ++ ++ /* register TDM Renderer component */ ++ err = xf_adsp_register("tdm-renderer", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register TDM Renderer to ADSP base control */ ++ tdm_rdr->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (tdm_rdr->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from plugin */ ++ err = xf_adsp_tdm_renderer_get_params(tdm_rdr); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save compoent data */ ++ *tdm_renderer = tdm_rdr; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(tdm_rdr); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP TDM Renderer component ++ * ++ *\param[in] tdm_renderer Pointer to TDM Renderer component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 1*/ ++int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_renderer) ++ return -EINVAL; ++ ++ handle_id = tdm_renderer->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(tdm_renderer); ++ ++ return 0; ++} ++ ++/*********************************************************************** ++ * APIs for TDM Capture component ++ * ********************************************************************/ ++ ++/** *********************************************************** ++ *\brief set ADSP TDM Capture parameters ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_message msg; ++ struct xf_set_param_msg *msg_params; ++ struct xf_adsp_tdm_capture_params *params; ++ struct xf_buffer *b; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ params = &tdm_capture->params; ++ ++ /* get TDM Capture's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->item[i++].value = params->in_rate; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->item[i++].value = params->ch_mode; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->item[i++].value = params->pcm_width; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->item[i++].value = params->frame_size; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->item[i++].value = params->dev1; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->item[i++].value = params->dev2; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->item[i++].value = params->dma1; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->item[i++].value = params->dma2; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->item[i++].value = params->out_rate; ++ ++ msg_params->item[i].id = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ msg_params->item[i++].value = params->vol_rate; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_SET_PARAM, XF_SET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief get ADSP TDM Capture parameters ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Failed ++ **************************************************************/ ++/* PRQA S 1505 1*/ ++int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_adsp_tdm_capture_params *params; ++ struct xf_message msg; ++ struct xf_buffer *b; ++ union xf_get_param_msg *msg_params; ++ int i; ++ struct xf_handle *handle; ++ int err = 0; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ params = &tdm_capture->params; ++ ++ /* get TDM Capture's handle data */ ++ handle = xf_adsp_base_get_handle(tdm_capture->handle_id); ++ if (!handle) ++ return -EINVAL; ++ ++ b = xf_buffer_get(base->aux_pool); ++ msg_params = xf_buffer_data(b); ++ ++ i = 0; ++ /* PRQA S 3440 13 1*/ ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT1; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_INPUT2; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE; ++ msg_params->c.id[i++] = XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE; ++ ++ /* PRQA S 3200 2*/ ++ xf_create_msg(&msg, ++ __XF_MSG_ID(__XF_AP_CLIENT(0, tdm_capture->handle_id), ++ __XF_PORT_SPEC2(handle->comp_id, 0)), ++ XF_GET_PARAM, XF_GET_PARAM_CMD_LEN(i), msg_params, NULL); ++ ++ err = xf_send_and_receive(&msg); ++ if (err != 0) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* save the received parameters */ ++ i = 0; ++ params->in_rate = msg_params->r.value[i++]; /* PRQA S 3440 13 */ ++ params->ch_mode = msg_params->r.value[i++]; ++ params->pcm_width = msg_params->r.value[i++]; ++ params->frame_size = msg_params->r.value[i++]; ++ params->dev1 = msg_params->r.value[i++]; ++ params->dev2 = msg_params->r.value[i++]; ++ params->dma1 = msg_params->r.value[i++]; ++ params->dma2 = msg_params->r.value[i++]; ++ params->out_rate = msg_params->r.value[i++]; ++ params->vol_rate = msg_params->r.value[i++]; ++ ++exit: ++ /* return msg to pool */ ++ xf_buffer_put(b); ++ ++ return err; ++} ++ ++/** ************************************************************************** ++ *\brief create TDM Capture component ++ * ++ *\param[in,out] tdm_capture Pointer to the registered component ++ *\param[in] cb Callback function ++ *\param[in] private_data Private data ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base instance or register fail ++ *\retval -ENOMEM Cannot allocate Renderer instance ++ *****************************************************************************/ ++int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, ++ struct xf_callback_func *cb, void *private_data) ++{ ++ struct xf_adsp_tdm_capture *tdm_cap; ++ int err; ++ int comp_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base) ++ return -EINVAL; ++ ++ tdm_cap = kmalloc(sizeof(*tdm_cap), GFP_KERNEL); ++ if (!tdm_cap) ++ return -ENOMEM; ++ ++ /* PRQA S 3200 */ ++ memset(tdm_cap, 0, sizeof(struct xf_adsp_tdm_capture)); ++ ++ /* register TDM Capture component */ ++ err = xf_adsp_register("tdm-capture", &comp_id); ++ if (err != 0) ++ goto err2; /* PRQA S 2001 */ ++ ++ /* register TDM Capture to ADSP base control */ ++ tdm_cap->handle_id = xf_adsp_base_register_handle(private_data, ++ cb, comp_id); ++ ++ if (tdm_cap->handle_id <= 0) { ++ err = -EINVAL; ++ goto err1; /* PRQA S 2001 */ ++ } ++ ++ /* get the default parameter from plugin */ ++ err = xf_adsp_tdm_capture_get_params(tdm_cap); ++ if (err != 0) ++ goto err1; /* PRQA S 2001 */ ++ ++ /* save compoent data */ ++ *tdm_capture = tdm_cap; ++ ++ return 0; ++ ++err1: ++ xf_adsp_unregister(comp_id); /* PRQA S 3200 */ ++ ++err2: ++ kfree(tdm_cap); ++ ++ return err; ++} ++ ++/** *********************************************************** ++ *\brief deinitialize ADSP TDM Capture component ++ * ++ *\param[in] tdm_capture Pointer to TDM Capture component ++ *\retval 0 Success ++ *\retval -EINVAL Invalid base or Renderer data ++ **************************************************************/ ++/* PRQA S 3673 */ ++int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture) ++{ ++ struct xf_handle *handle; ++ int handle_id; ++ ++ /* check the sane ADSP base data */ ++ if (!base || !tdm_capture) ++ return -EINVAL; ++ ++ handle_id = tdm_capture->handle_id; ++ ++ handle = xf_adsp_base_get_handle(handle_id); ++ if (!handle) ++ goto exit; /* PRQA S 2001 */ ++ ++ /* unregister component */ ++ xf_adsp_unregister(handle->comp_id); /* PRQA S 3200 */ ++ ++ /* free handle data from base control */ ++ xf_adsp_base_free_handle(handle_id); /* PRQA S 3200 */ ++ ++exit: ++ kfree(tdm_capture); ++ ++ return 0; ++} +diff --git a/sound/soc/adsp/xf-adsp-base.h b/sound/soc/adsp/xf-adsp-base.h +new file mode 100644 +index 0000000..27eb084 +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-base.h +@@ -0,0 +1,275 @@ ++/** ************************************************************************* ++ *\file xf-adsp-base.h ++ *\brief Header file for ADSP Base Control layer ++ *\addtogroup ADSP Driver ++ **************************************************************************** ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ **************************************************************************** ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_BASE_H ++#define __XF_ADSP_BASE_H ++ ++#include "xf-adsp-config.h" ++#include ++ ++#define XF_BUF_POOL_SIZE (4) /**< number of buffer in a data pool */ ++ ++/**< maximum number of DSP component can be registered */ ++#define MAX_HANDLE (256) ++ ++/* define boolean */ ++#define TRUE (1) ++#define FALSE (0) ++ ++/** \struct xf_callback_func ++ * \brief callback function for ADSP's response message ++ */ ++struct xf_callback_func { ++ /** callback for empty buffer done message */ ++ int (*empty_buf_done)(void *data, int opcode, int length, char *buffer); ++ ++ /** callback for fill buffer done message */ ++ int (*fill_buf_done)(void *data, int opcode, int length, char *buffer); ++ ++ /** callback for event handler */ ++ int (*event_handler)(void *data); ++}; ++ ++/** \struct xf_adsp_renderer_params ++ * \brief parameter structure for Renderer component ++ */ ++struct xf_adsp_renderer_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++ int out_channel; /**< output channels */ ++ int mix_ctrl; /**< mix control flag */ ++ int state; /**< operation state */ ++}; ++ ++/** \struct xf_adsp_renderer ++ * \brief Renderer component structure ++ */ ++struct xf_adsp_renderer { ++ struct xf_adsp_renderer_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_adsp_capture_params ++ *\brief parameter structure of Capture component ++ */ ++struct xf_adsp_capture_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++ int state; /**< operation state */ ++}; ++ ++/** \struct xf_adsp_capture ++ * \brief Capture component structure ++ */ ++struct xf_adsp_capture { ++ struct xf_adsp_capture_params params; /**< parameter structuer*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_equalizer_parametric_coef ++ *\brief Parametric Equalizer type's parameters ++ */ ++struct xf_equalizer_parametric_coef { ++ int type[XA_REL_EQZ_FILTER_NUM]; /**< Filter type */ ++ int fc[XA_REL_EQZ_FILTER_NUM]; /**< Filter center frequency */ ++ int gain[XA_REL_EQZ_FILTER_NUM]; /**< Filter gain */ ++ int band_width[XA_REL_EQZ_FILTER_NUM]; /**< Filter band width */ ++ int gain_base[XA_REL_EQZ_FILTER_NUM]; /**< Filter base gain */ ++}; ++ ++/** \struct xf_equalizer_graphic_coef ++ * \brief Graphic Equalizer type's parameters ++ */ ++struct xf_equalizer_graphic_coef { ++ int gain_g[XA_REL_EQZ_GRAPHIC_BAND_NUM];/**< Graphic equalizer gain */ ++}; ++ ++/** \struct xf_adsp_equalizer_params ++ *\brief Equalizer parameters ++ */ ++struct xf_adsp_equalizer_params { ++ int channel; /**< channel number */ ++ int pcm_width; /**< PCM width */ ++ int rate; /**< sampling rate */ ++ int eqz_type; /**< Equalizer type */ ++ struct xf_equalizer_parametric_coef p_coef; /**< Parametric params */ ++ struct xf_equalizer_graphic_coef g_coef; /**< Graphic params */ ++}; ++ ++/** \struct xf_adsp_equalizer ++ * \brief Equalizer component's structure ++ */ ++struct xf_adsp_equalizer { ++ struct xf_adsp_equalizer_params params;/**< Equalizer parameters */ ++ struct xf_pool *buf_pool; /**< buffer pool for transfer data */ ++ int handle_id; /**< ID of registered handle */ ++}; ++ ++/** \struct xf_adsp_tdm_renderer_params ++ * \brief parameter structure for TDM Renderer component ++ */ ++struct xf_adsp_tdm_renderer_params { ++ int ch_mode; /**< channel mode */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++}; ++ ++/** \struct xf_adsp_tdm_renderer ++ * \brief TDM Renderer component structure ++ */ ++struct xf_adsp_tdm_renderer { ++ struct xf_adsp_tdm_renderer_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle */ ++}; ++ ++/** \struct xf_adsp_tdm_capture_params ++ * \brief parameter structure for TDM Capture component ++ */ ++struct xf_adsp_tdm_capture_params { ++ int ch_mode; /**< channel mode */ ++ int pcm_width; /**< PCM width */ ++ int frame_size; /**< frame size */ ++ int in_rate; /**< input sampling rate */ ++ int out_rate; /**< output sampling rate */ ++ int vol_rate; /**< volume rate */ ++ int dev1; /**< 1st device index */ ++ int dev2; /**< 2nd device index */ ++ int dma1; /**< 1st DMA index */ ++ int dma2; /**< 2nd DMA index */ ++}; ++ ++/** \struct xf_adsp_tdm_capture ++ * \brief TDM Capture component structure ++ */ ++struct xf_adsp_tdm_capture { ++ struct xf_adsp_tdm_capture_params params; /**< parameter structure*/ ++ struct xf_pool *buf_pool; /**< buffer pool for data transfer */ ++ int handle_id; /**< ID of registered handle*/ ++}; ++ ++/** \struct xf_handle ++ * \brief Handle struct for each ADSP component ++ */ ++struct xf_handle { ++ int comp_id;/**< ADSP component ID */ ++ struct xf_callback_func *cb;/**< callback functions */ ++ void *private_data; /**< private data for callback functions*/ ++}; ++ ++/** \struct xf_adsp_base ++ * \brief Base component structure ++ */ ++struct xf_adsp_base { ++ struct xf_adsp_base_cmd cmd; /**< proxy commands */ ++ void *client; /**< client data which registered to proxy */ ++ struct xf_pool *aux_pool; /**< auxiliary buffer pool data */ ++ struct xf_handle *handle[MAX_HANDLE]; /**< handler data */ ++ struct task_struct *rsp_thread;/**< thread for response message*/ ++ wait_queue_head_t base_wait; /**< ADSP base's waiting queue */ ++ struct xf_message base_msg; /**< ADSP base's response message */ ++ int base_flag; /**< flag to control its waiting queue */ ++ int err_flag; /**< flag to indicate a error from plugins */ ++ int wait_flag; /**< flag to control the polling waiting*/ ++ spinlock_t lock; /**< spinlock data */ ++}; ++ ++struct xf_pool *xf_adsp_allocate_mem_pool(int pool_size, int buf_length); ++int xf_adsp_free_mem_pool(struct xf_pool *pool); ++char *xf_adsp_get_data_from_pool(struct xf_pool *pool, int index); ++ ++int xf_adsp_empty_this_buffer(int handle_id, char *buffer, int length); ++int xf_adsp_fill_this_buffer(int handle_id, char *buffer, int length); ++ ++int xf_adsp_route(int src_handle_id, int dst_handle_id ++ , int buf_cnt, int buf_size); ++ ++int xf_adsp_set_param(int handle_id, int index, int value); ++int xf_adsp_get_param(int handle_id, int index, int *value); ++ ++int xf_adsp_renderer_create(struct xf_adsp_renderer **renderer, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_renderer_destroy(struct xf_adsp_renderer *renderer); ++int xf_adsp_renderer_set_params(struct xf_adsp_renderer *renderer); ++int xf_adsp_renderer_get_params(struct xf_adsp_renderer *renderer); ++ ++int xf_adsp_capture_create(struct xf_adsp_capture **capture, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_capture_destroy(struct xf_adsp_capture *capture); ++int xf_adsp_capture_set_params(struct xf_adsp_capture *capture); ++int xf_adsp_capture_get_params(struct xf_adsp_capture *capture); ++ ++int xf_adsp_equalizer_create(struct xf_adsp_equalizer **equalizer, ++ struct xf_callback_func *cb, void *private_data); ++int xf_adsp_equalizer_destroy(struct xf_adsp_equalizer *equalizer); ++int xf_adsp_equalizer_set_params(struct xf_adsp_equalizer *equalizer); ++int xf_adsp_equalizer_get_params(struct xf_adsp_equalizer *equalizer); ++ ++int xf_adsp_tdm_renderer_create(struct xf_adsp_tdm_renderer **tdm_renderer, ++ struct xf_callback_func *cb, ++ void *private_data); ++int xf_adsp_tdm_renderer_destroy(struct xf_adsp_tdm_renderer *tdm_renderer); ++int xf_adsp_tdm_renderer_set_params(struct xf_adsp_tdm_renderer *tdm_renderer); ++int xf_adsp_tdm_renderer_get_params(struct xf_adsp_tdm_renderer *tdm_renderer); ++ ++int xf_adsp_tdm_capture_create(struct xf_adsp_tdm_capture **tdm_capture, ++ struct xf_callback_func *cb, ++ void *private_data); ++int xf_adsp_tdm_capture_destroy(struct xf_adsp_tdm_capture *tdm_capture); ++int xf_adsp_tdm_capture_set_params(struct xf_adsp_tdm_capture *tdm_capture); ++int xf_adsp_tdm_capture_get_params(struct xf_adsp_tdm_capture *tdm_capture); ++ ++#endif +diff --git a/sound/soc/adsp/xf-adsp-config.h b/sound/soc/adsp/xf-adsp-config.h +new file mode 100644 +index 0000000..818a46a +--- /dev/null ++++ b/sound/soc/adsp/xf-adsp-config.h +@@ -0,0 +1,604 @@ ++/** **************************************************************************** ++ *\file xf-adsp-config.h ++ *\brief Header file for ADSP configuration ++ *\addtogroup ADSP Driver ++ ******************************************************************************* ++ *\date Oct. 21, 2017 ++ *\author Renesas Electronics Corporation ++ ******************************************************************************* ++ *\par Copyright ++ * ++ * Copyright(c) 2016 Renesas Electoronics Corporation ++ * ++ * 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. ++ ******************************************************************************/ ++ ++#ifndef __XF_ADSP_CONFIG_H ++#define __XF_ADSP_CONFIG_H ++ ++/* Equalizer definition */ ++#define XA_REL_EQZ_FILTER_NUM (9) /**< number of filter */ ++#define XA_REL_EQZ_GRAPHIC_BAND_NUM (5) /**< number of graphic band */ ++ ++struct xf_buffer { ++ void *address; ++ union { /* PRQA S 750 3 */ ++ struct xf_buffer *next; ++ struct xf_pool *pool; ++ } link; ++}; ++ ++struct xf_pool { ++ /* length of individual buffer in a pool */ ++ u32 length; ++ ++ /* number of buffer in a pool */ ++ u32 number; ++ ++ /* pointer to pool memory */ ++ void *p; ++ ++ /* pointer to first free buffer in a pool */ ++ struct xf_buffer *free; ++ ++ /* individual buffer */ ++ struct xf_buffer buffer[0]; /* PRQA S 1037 */ ++}; ++ ++struct xf_message { ++ /* pointer to the next item in the list */ ++ struct xf_message *next; ++ ++ /* shmem session_id */ ++ u32 id; ++ ++ /* operation code */ ++ u32 opcode; ++ ++ /* length of attached message buffer */ ++ u32 length; ++ ++ /* message buffer */ ++ void *buffer; ++}; ++ ++/******************************************************************************* ++ * XF_GET_PARAM message ++ ******************************************************************************/ ++ ++/* ...message body (command/response) */ ++union xf_get_param_msg { /* PRQA S 750 18 */ ++ /* ...command structure */ ++ struct { ++ /* ...array of parameters requested */ ++ u32 id[0]; /* PRQA S 1037 */ ++ ++ } __attribute__((__packed__)) c; ++ ++ /* ...response structure */ ++ struct { ++ /* ...array of parameters values */ ++ u32 value[0];/* PRQA S 1037 */ ++ ++ } __attribute__((__packed__)) r; ++ ++}; ++ ++/* ...length of the XF_GET_PARAM command/response */ ++/* PRQA S 3453 2 */ ++#define XF_GET_PARAM_CMD_LEN(params) (sizeof(u32) * (params)) ++#define XF_GET_PARAM_RSP_LEN(params) (sizeof(u32) * (params)) ++ ++/******************************************************************************* ++ * XF_SET_PARAM message ++ ******************************************************************************/ ++ ++/* ...component initialization parameter */ ++struct xf_set_param_item { ++ /* ...index of parameter passed to SET_CONFIG_PARAM call */ ++ u32 id; ++ ++ /* ...value of parameter */ ++ u32 value; ++ ++} __attribute__ ((__packed__)); ++ ++/* ...message body (no response message? - tbd) */ ++struct xf_set_param_msg { ++ /* ...command message */ ++ struct xf_set_param_item item[0]; /* PRQA S 1037 */ ++ ++} __attribute__ ((__packed__)); ++ ++/* ...length of the command message */ ++/* PRQA S 3453 */ ++#define XF_SET_PARAM_CMD_LEN(params) \ ++ (sizeof(struct xf_set_param_item) * (params)) ++ ++/******************************************************************************* ++ * XF_ROUTE definition ++ ******************************************************************************/ ++ ++/* ...port routing command */ ++struct xf_route_port_msg { ++ /* ...source port specification */ ++ u32 src; ++ ++ /* ...destination port specification */ ++ u32 dst; ++ ++ /* ...number of buffers to allocate */ ++ u32 alloc_number; ++ ++ /* ...length of buffer to allocate */ ++ u32 alloc_size; ++ ++ /* ...alignment restriction for a buffer */ ++ u32 alloc_align; ++ ++} __attribute__((__packed__)); ++ ++/******************************************************************************* ++ * XF_UNROUTE definition ++ ******************************************************************************/ ++ ++/* ...port unrouting command */ ++struct xf_unroute_port_msg { ++ /* ...source port specification */ ++ u32 src; ++ ++ /* ...destination port specification */ ++ u32 dst; ++ ++} __attribute__((__packed__)); ++ ++/* ...Capture states */ ++enum xa_capture_state { ++ XA_CAP_STATE_RUN = 0, ++ XA_CAP_STATE_IDLE = 1, ++ XA_CAP_STATE_PAUSE = 2 ++}; ++ ++/* ...Renderer states */ ++enum xa_renderer_state { ++ XA_RDR_STATE_RUN = 0, ++ XA_RDR_STATE_IDLE = 1, ++ XA_RDR_STATE_PAUSE = 2 ++}; ++ ++/******************************************************************************* ++ * Message routing composition - move somewhere else - tbd ++ ******************************************************************************/ ++ ++/* ...adjust IPC client of message going from user-space */ ++#define XF_MSG_AP_FROM_USER(id, client) \ ++ (((id) & ~(0xF << 2)) | ((client) << 2)) ++ ++/* ...wipe out IPC client from message going to user-space */ ++#define XF_MSG_AP_TO_USER(id) \ ++ ((id) & ~(0xF << 18)) ++ ++/* ...port specification (12 bits) */ ++#define __XF_PORT_SPEC(core, id, port) ((core) | ((id) << 2) | ((port) << 8)) ++#define __XF_PORT_SPEC2(id, port) ((id) | ((port) << 8)) ++#define XF_PORT_CORE(spec) ((spec) & 0x3) ++#define XF_PORT_CLIENT(spec) (((spec) >> 2) & 0x3F) ++#define XF_PORT_ID(spec) (((spec) >> 8) & 0xF) ++ ++/* ...message id contains source and destination ports specification */ ++#define __XF_MSG_ID(src, dst) (((src) & 0xFFFF) | (((dst) & 0xFFFF) << 16)) ++#define XF_MSG_SRC(id) (((id) >> 0) & 0xFFFF) ++#define XF_MSG_SRC_CORE(id) (((id) >> 0) & 0x3) ++#define XF_MSG_SRC_CLIENT(id) (((id) >> 2) & 0x3F) ++#define XF_MSG_SRC_PORT(id) (((id) >> 8) & 0xF) ++#define XF_MSG_SRC_PROXY(id) (((id) >> 15) & 0x1) ++#define XF_MSG_DST(id) (((id) >> 16) & 0xFFFF) ++#define XF_MSG_DST_CORE(id) (((id) >> 16) & 0x3) ++#define XF_MSG_DST_CLIENT(id) (((id) >> 18) & 0x3F) ++#define XF_MSG_DST_PORT(id) (((id) >> 24) & 0xF) ++#define XF_MSG_DST_PROXY(id) (((id) >> 31) & 0x1) ++ ++/* ...special treatment of AP-proxy destination field */ ++#define XF_AP_IPC_CLIENT(id) (((id) >> 18) & 0xF) ++#define XF_AP_CLIENT(id) (((id) >> 22) & 0x1FF) ++#define __XF_AP_PROXY(core) ((core) | 0x8000) ++#define __XF_DSP_PROXY(core) ((core) | 0x8000) ++#define __XF_AP_CLIENT(core, client) ((core) | ((client) << 6) | 0x8000) ++ ++/******************************************************************************* ++ * Opcode composition ++ ******************************************************************************/ ++ ++/* ...opcode composition with command/response data tags */ ++#define __XF_OPCODE(c, r, op) (((c) << 31) | ((r) << 30) | ((op) & 0x3F)) ++ ++/* ...accessors */ ++#define XF_OPCODE_CDATA(opcode) ((opcode) & (1 << 31)) ++#define XF_OPCODE_RDATA(opcode) ((opcode) & (1 << 30)) ++#define XF_OPCODE_TYPE(opcode) ((opcode) & (0x3F)) ++ ++/******************************************************************************* ++ * Opcode types ++ ******************************************************************************/ ++ ++/* ...unregister client */ ++#define XF_UNREGISTER __XF_OPCODE(0, 0, 0) ++ ++/* ...register client at proxy */ ++#define XF_REGISTER __XF_OPCODE(1, 0, 1) ++ ++/* ...port routing command */ ++#define XF_ROUTE __XF_OPCODE(1, 0, 2) ++ ++/* ...port unrouting command */ ++#define XF_UNROUTE __XF_OPCODE(1, 0, 3) ++ ++/* ...shared buffer allocation */ ++#define XF_ALLOC __XF_OPCODE(0, 0, 4) ++ ++/* ...shared buffer freeing */ ++#define XF_FREE __XF_OPCODE(0, 0, 5) ++ ++/* ...set component parameters */ ++#define XF_SET_PARAM __XF_OPCODE(1, 0, 6) ++ ++/* ...get component parameters */ ++#define XF_GET_PARAM __XF_OPCODE(1, 1, 7) ++ ++/* ...input buffer reception */ ++#define XF_EMPTY_THIS_BUFFER __XF_OPCODE(1, 0, 8) ++ ++/* ...output buffer reception */ ++#define XF_FILL_THIS_BUFFER __XF_OPCODE(0, 1, 9) ++ ++/* ...flush specific port */ ++#define XF_FLUSH __XF_OPCODE(0, 0, 10) ++ ++/* ...start component operation */ ++#define XF_START __XF_OPCODE(0, 0, 11) ++ ++/* ...stop component operation */ ++#define XF_STOP __XF_OPCODE(0, 0, 12) ++ ++/* ...pause component operation */ ++#define XF_PAUSE __XF_OPCODE(0, 0, 13) ++ ++/* ...resume component operation */ ++#define XF_RESUME __XF_OPCODE(0, 0, 14) ++ ++/* ...total amount of supported decoder commands */ ++#define __XF_OP_NUM (15) ++ ++/************************************************* ++ * Renderer - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_config_param_renderer { ++ XA_RDR_CONFIG_PARAM_STATE = 0, ++ XA_RDR_CONFIG_PARAM_PCM_WIDTH = 1, ++ XA_RDR_CONFIG_PARAM_CHANNELS = 2, ++ XA_RDR_CONFIG_PARAM_SAMPLE_RATE = 3, ++ XA_RDR_CONFIG_PARAM_FRAME_SIZE = 4, ++ XA_RDR_CONFIG_PARAM_OUTPUT1 = 5, ++ XA_RDR_CONFIG_PARAM_DMACHANNEL1 = 6, ++ XA_RDR_CONFIG_PARAM_OUTPUT2 = 7, ++ XA_RDR_CONFIG_PARAM_DMACHANNEL2 = 8, ++ XA_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 9, ++ XA_RDR_CONFIG_PARAM_VOLUME_RATE = 10, ++ XA_RDR_CONFIG_PARAM_OUT_CHANNELS = 11, ++ XA_RDR_CONFIG_PARAM_MIX_CONTROL = 12, ++ XA_RDR_CONFIG_PARAM_NUM = 13 ++}; ++ ++/************************************************* ++ * Capture - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_config_param_capture { ++ XA_CAP_CONFIG_PARAM_CB = 0, ++ XA_CAP_CONFIG_PARAM_STATE = 1, ++ XA_CAP_CONFIG_PARAM_PCM_WIDTH = 2, ++ XA_CAP_CONFIG_PARAM_CHANNELS = 3, ++ XA_CAP_CONFIG_PARAM_SAMPLE_RATE = 4, ++ XA_CAP_CONFIG_PARAM_FRAME_SIZE = 5, ++ XA_CAP_CONFIG_PARAM_INPUT1 = 6, ++ XA_CAP_CONFIG_PARAM_DMACHANNEL1 = 7, ++ XA_CAP_CONFIG_PARAM_INPUT2 = 8, ++ XA_CAP_CONFIG_PARAM_DMACHANNEL2 = 9, ++ XA_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 10, ++ XA_CAP_CONFIG_PARAM_VOLUME_RATE = 11, ++ XA_CAP_CONFIG_PARAM_NUM = 12 ++}; ++ ++/************************************************* ++ * Equalizer - specific configuration parameters ++ * **********************************************/ ++ ++enum xa_rel_eqz_filter_type { ++ XA_REL_EQZ_TYPE_THROUGH = 0, ++ XA_REL_EQZ_TYPE_PEAK = 1, ++ XA_REL_EQZ_TYPE_BASS = 2, ++ XA_REL_EQZ_TYPE_TREBLE = 3 ++}; ++ ++enum xa_rel_eqz_type { ++ XA_REL_EQZ_TYPE_PARAMETRIC = 0, ++ XA_REL_EQZ_TYPE_GRAPHIC = 1 ++}; ++ ++/*****************************************************************************/ ++/* Additional subcommand indices */ ++/*****************************************************************************/ ++ ++enum xa_add_cmd_type_generic { ++ /* XA_API_CMD_SET_CONFIG_PARAM indices */ ++ XA_EQZ_CONFIG_PARAM_COEF_FS = 0x0000, ++ XA_EQZ_CONFIG_PARAM_PCM_WIDTH = 0x0001, ++ XA_EQZ_CONFIG_PARAM_CH = 0x0002, ++ XA_EQZ_CONFIG_PARAM_EQZ_TYPE = 0x0003, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_FC = 0x0010, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_FC = 0x0011, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_FC = 0x0012, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_FC = 0x0013, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_FC = 0x0014, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_FC = 0x0015, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_FC = 0x0016, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_FC = 0x0017, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_FC = 0x0018, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_TYPE = 0x0020, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_TYPE = 0x0021, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_TYPE = 0x0022, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_TYPE = 0x0023, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_TYPE = 0x0024, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_TYPE = 0x0025, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_TYPE = 0x0026, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_TYPE = 0x0027, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_TYPE = 0x0028, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BW = 0x0030, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BW = 0x0031, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BW = 0x0032, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BW = 0x0033, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BW = 0x0034, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BW = 0x0035, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BW = 0x0036, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BW = 0x0037, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BW = 0x0038, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_GA = 0x0040, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_GA = 0x0041, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_GA = 0x0042, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_GA = 0x0043, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_GA = 0x0044, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_GA = 0x0045, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_GA = 0x0046, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_GA = 0x0047, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_GA = 0x0048, ++ ++ XA_EQZ_CONFIG_PARAM_FILTER_0_COEF_BA = 0x0050, ++ XA_EQZ_CONFIG_PARAM_FILTER_1_COEF_BA = 0x0051, ++ XA_EQZ_CONFIG_PARAM_FILTER_2_COEF_BA = 0x0052, ++ XA_EQZ_CONFIG_PARAM_FILTER_3_COEF_BA = 0x0053, ++ XA_EQZ_CONFIG_PARAM_FILTER_4_COEF_BA = 0x0054, ++ XA_EQZ_CONFIG_PARAM_FILTER_5_COEF_BA = 0x0055, ++ XA_EQZ_CONFIG_PARAM_FILTER_6_COEF_BA = 0x0056, ++ XA_EQZ_CONFIG_PARAM_FILTER_7_COEF_BA = 0x0057, ++ XA_EQZ_CONFIG_PARAM_FILTER_8_COEF_BA = 0x0058, ++ ++ XA_EQZ_CONFIG_PARAM_BAND_0_GCOEF_GA = 0x0060, ++ XA_EQZ_CONFIG_PARAM_BAND_1_GCOEF_GA = 0x0061, ++ XA_EQZ_CONFIG_PARAM_BAND_2_GCOEF_GA = 0x0062, ++ XA_EQZ_CONFIG_PARAM_BAND_3_GCOEF_GA = 0x0063, ++ XA_EQZ_CONFIG_PARAM_BAND_4_GCOEF_GA = 0x0064 ++}; ++ ++/* ...tdm-renderer-specific configuration parameters */ ++enum xa_config_param_tdm_renderer { ++ XA_TDM_RDR_CONFIG_PARAM_PCM_WIDTH = 0, ++ XA_TDM_RDR_CONFIG_PARAM_CHANNEL_MODE = 1, ++ XA_TDM_RDR_CONFIG_PARAM_IN_SAMPLE_RATE = 2, ++ XA_TDM_RDR_CONFIG_PARAM_FRAME_SIZE = 3, ++ XA_TDM_RDR_CONFIG_PARAM_OUTPUT1 = 4, ++ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL1 = 5, ++ XA_TDM_RDR_CONFIG_PARAM_OUTPUT2 = 6, ++ XA_TDM_RDR_CONFIG_PARAM_DMACHANNEL2 = 7, ++ XA_TDM_RDR_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, ++ XA_TDM_RDR_CONFIG_PARAM_VOLUME_RATE = 9 ++}; ++ ++enum xa_rel_tdm_renderer_channel_mode { ++ XA_TDM_RDR_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ ++ /**< 1 six-channels plus 1 two-channels TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_6_2 = 2, ++ XA_TDM_RDR_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ ++ XA_TDM_RDR_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ ++}; ++ ++/* ...TDM Capture-specific configuration parameters */ ++enum xa_config_param_tdm_capture { ++ XA_TDM_CAP_CONFIG_PARAM_PCM_WIDTH = 0, ++ XA_TDM_CAP_CONFIG_PARAM_CHANNEL_MODE = 1, ++ XA_TDM_CAP_CONFIG_PARAM_IN_SAMPLE_RATE = 2, ++ XA_TDM_CAP_CONFIG_PARAM_FRAME_SIZE = 3, ++ XA_TDM_CAP_CONFIG_PARAM_INPUT1 = 4, ++ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL1 = 5, ++ XA_TDM_CAP_CONFIG_PARAM_INPUT2 = 6, ++ XA_TDM_CAP_CONFIG_PARAM_DMACHANNEL2 = 7, ++ XA_TDM_CAP_CONFIG_PARAM_OUT_SAMPLE_RATE = 8, ++ XA_TDM_CAP_CONFIG_PARAM_VOLUME_RATE = 9 ++}; ++ ++enum xa_rel_tdm_capture_channel_mode { ++ XA_TDM_CAP_CHANNEL_MODE_2X4 = 0, /**< 4 stereo TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_1X8 = 1, /**< 1 eight-channel TDM data*/ ++ /**< 1 six-channels plus 1 two-channels TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_6_2 = 2, ++ XA_TDM_CAP_CHANNEL_MODE_2X3 = 3, /**< 3 stereo TDM data */ ++ XA_TDM_CAP_CHANNEL_MODE_1X6 = 4 /**< 1 six-channel TDM data */ ++}; ++ ++/*****************************************************************************/ ++/* HW supported */ ++/*****************************************************************************/ ++/* ...SSI modules supported by HW */ ++enum ssi_module { ++ SSI00 = 0, ++ SSI01 = 1, ++ SSI02 = 2, ++ SSI03 = 3, ++ SSI04 = 4, ++ SSI05 = 5, ++ SSI06 = 6, ++ SSI07 = 7, ++ SSI10 = 10, ++ SSI11 = 11, ++ SSI12 = 12, ++ SSI13 = 13, ++ SSI14 = 14, ++ SSI15 = 15, ++ SSI16 = 16, ++ SSI17 = 17, ++ SSI20 = 20, ++ SSI21 = 21, ++ SSI22 = 22, ++ SSI23 = 23, ++ SSI24 = 24, ++ SSI25 = 25, ++ SSI26 = 26, ++ SSI27 = 27, ++ SSI30 = 30, ++ SSI31 = 31, ++ SSI32 = 32, ++ SSI33 = 33, ++ SSI34 = 34, ++ SSI35 = 35, ++ SSI36 = 36, ++ SSI37 = 37, ++ SSI40 = 40, ++ SSI41 = 41, ++ SSI42 = 42, ++ SSI43 = 43, ++ SSI44 = 44, ++ SSI45 = 45, ++ SSI46 = 46, ++ SSI47 = 47, ++ SSI5 = 50, ++ SSI6 = 60, ++ SSI7 = 70, ++ SSI8 = 80, ++ SSI90 = 90, ++ SSI91 = 91, ++ SSI92 = 92, ++ SSI93 = 93, ++ SSI94 = 94, ++ SSI95 = 95, ++ SSI96 = 96, ++ SSI97 = 97 ++}; ++ ++/* ...SRC modules supported by HW */ ++enum src_module { ++ SRC0 = 110, /* SRC0 */ ++ SRC1 = 111, /* SRC1 */ ++ SRC2 = 112, /* SRC2 */ ++ SRC3 = 113, /* SRC3 */ ++ SRC4 = 114, /* SRC4 */ ++ SRC5 = 115, /* SRC5 */ ++ SRC6 = 116, /* SRC6 */ ++ SRC7 = 117, /* SRC7 */ ++ SRC8 = 118, /* SRC8 */ ++ SRC9 = 119, /* SRC9 */ ++ SRCMAX = 120 /* Maximum number of SRC modules */ ++}; ++ ++/* ...PDMA supported by HW */ ++enum { ++ PDMA_CH00 = 0, ++ PDMA_CH01 = 1, ++ PDMA_CH02 = 2, ++ PDMA_CH03 = 3, ++ PDMA_CH04 = 4, ++ PDMA_CH05 = 5, ++ PDMA_CH06 = 6, ++ PDMA_CH07 = 7, ++ PDMA_CH08 = 8, ++ PDMA_CH09 = 9, ++ PDMA_CH10 = 10, ++ PDMA_CH11 = 11, ++ PDMA_CH12 = 12, ++ PDMA_CH13 = 13, ++ PDMA_CH14 = 14, ++ PDMA_CH15 = 15, ++ PDMA_CH16 = 16, ++ PDMA_CH17 = 17, ++ PDMA_CH18 = 18, ++ PDMA_CH19 = 19, ++ PDMA_CH20 = 20, ++ PDMA_CH21 = 21, ++ PDMA_CH22 = 22, ++ PDMA_CH23 = 23, ++ PDMA_CH24 = 24, ++ PDMA_CH25 = 25, ++ PDMA_CH26 = 26, ++ PDMA_CH27 = 27, ++ PDMA_CH28 = 28, ++ PDMA_CHMAX = 29 ++}; ++ ++/* ...DMAC supported by HW */ ++enum { ++ ADMAC_CH00 = PDMA_CHMAX + 0, ++ ADMAC_CH01 = PDMA_CHMAX + 1, ++ ADMAC_CH02 = PDMA_CHMAX + 2, ++ ADMAC_CH03 = PDMA_CHMAX + 3, ++ ADMAC_CH04 = PDMA_CHMAX + 4, ++ ADMAC_CH05 = PDMA_CHMAX + 5, ++ ADMAC_CH06 = PDMA_CHMAX + 6, ++ ADMAC_CH07 = PDMA_CHMAX + 7, ++ ADMAC_CH08 = PDMA_CHMAX + 8, ++ ADMAC_CH09 = PDMA_CHMAX + 9, ++ ADMAC_CH10 = PDMA_CHMAX + 10, ++ ADMAC_CH11 = PDMA_CHMAX + 11, ++ ADMAC_CH12 = PDMA_CHMAX + 12, ++ ADMAC_CH13 = PDMA_CHMAX + 13, ++ ADMAC_CH14 = PDMA_CHMAX + 14, ++ ADMAC_CH15 = PDMA_CHMAX + 15, ++ ADMAC_CH16 = PDMA_CHMAX + 16, ++ ADMAC_CH17 = PDMA_CHMAX + 17, ++ ADMAC_CH18 = PDMA_CHMAX + 18, ++ ADMAC_CH19 = PDMA_CHMAX + 19, ++ ADMAC_CH20 = PDMA_CHMAX + 20, ++ ADMAC_CH21 = PDMA_CHMAX + 21, ++ ADMAC_CH22 = PDMA_CHMAX + 22, ++ ADMAC_CH23 = PDMA_CHMAX + 23, ++ ADMAC_CH24 = PDMA_CHMAX + 24, ++ ADMAC_CH25 = PDMA_CHMAX + 25, ++ ADMAC_CH26 = PDMA_CHMAX + 26, ++ ADMAC_CH27 = PDMA_CHMAX + 27, ++ ADMAC_CH28 = PDMA_CHMAX + 28, ++ ADMAC_CH29 = PDMA_CHMAX + 29, ++ ADMAC_CH30 = PDMA_CHMAX + 30, ++ ADMAC_CH31 = PDMA_CHMAX + 31, ++ ADMAC_CHMAX = PDMA_CHMAX + 32 ++}; ++ ++#endif +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch new file mode 100644 index 00000000..ecab4120 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0003-ADSP-add-build-for-ADSP-sound-driver.patch @@ -0,0 +1,35 @@ +From 3ae5cb9feda031f660becc94f5496d5ee9b90e22 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Mon, 15 Oct 2018 17:57:56 +0700 +Subject: [PATCH 3/6] ADSP: add build for ADSP sound driver + +Signed-off-by: tienphitran +--- + sound/soc/Kconfig | 1 + + sound/soc/Makefile | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig +index c0abad2067e1..f5f6abbd6e14 100644 +--- a/sound/soc/Kconfig ++++ b/sound/soc/Kconfig +@@ -71,6 +71,7 @@ source "sound/soc/txx9/Kconfig" + source "sound/soc/ux500/Kconfig" + source "sound/soc/xtensa/Kconfig" + source "sound/soc/zte/Kconfig" ++source "sound/soc/adsp/Kconfig" + + # Supported codecs + source "sound/soc/codecs/Kconfig" +diff --git a/sound/soc/Makefile b/sound/soc/Makefile +index bf8c1e2ce0bf..6e77abba2b01 100644 +--- a/sound/soc/Makefile ++++ b/sound/soc/Makefile +@@ -52,3 +52,4 @@ obj-$(CONFIG_SND_SOC) += txx9/ + obj-$(CONFIG_SND_SOC) += ux500/ + obj-$(CONFIG_SND_SOC) += xtensa/ + obj-$(CONFIG_SND_SOC) += zte/ ++obj-$(CONFIG_SND_SOC) += adsp/ +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch new file mode 100644 index 00000000..6d95d65f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch @@ -0,0 +1,185 @@ +From 825517f3f8ebe551d297db16e4582c0eae646f05 Mon Sep 17 00:00:00 2001 +From: tienphitran +Date: Wed, 31 Oct 2018 16:12:36 +0700 +Subject: [PATCH 4/6] ADSP: integrate ADSP sound for H3, M3, M3N board + +Signed-off-by: tienphitran +[takeshi.kihara.df: fix W=1 dtc warning] +Signed-off-by: Takeshi Kihara +--- + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 ++ + arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 ++ + arch/arm64/boot/dts/renesas/r8a77965.dtsi | 5 ++ + .../boot/dts/renesas/salvator-common.dtsi | 84 +++++++++++++++++-- + 4 files changed, 94 insertions(+), 5 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +index 1896e5250dff..8dfda0fda91c 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +@@ -793,6 +793,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +index c00d1da64198..726c0d07fe59 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +@@ -798,6 +798,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +index 454a67b132f4..799b005ade92 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi +@@ -227,6 +227,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +index 922b9cc4797c..2c1d49c4bcaa 100644 +--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi ++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi +@@ -153,11 +153,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture", ++ "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -419,8 +435,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -731,6 +766,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -769,7 +843,7 @@ + rsnd_port0: port@0 { + reg = <0>; + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch new file mode 100644 index 00000000..34b32d8f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0005-ADSP-integrate-ADSP-sound-for-E3-board.patch @@ -0,0 +1,272 @@ +From 455f26d0de1cf6eaeb0aa5b58725e3e34d8d34bd Mon Sep 17 00:00:00 2001 +From: Nguyen Dang +Date: Tue, 6 Nov 2018 11:36:15 +0700 +Subject: [PATCH 5/6] ADSP: integrate ADSP sound for E3 board + +Signed-off-by: Nguyen Dang +[takeshi.kihara.df: fix W=1 dtc warning] +[takeshi.kihara.df: support for dt file separation by E3 ES1.0 SoC] +Signed-off-by: Takeshi Kihara +--- + .../arm64/boot/dts/renesas/r8a77990-ebisu.dts | 84 +++++++++++++++++-- + .../boot/dts/renesas/r8a77990-es10-ebisu.dts | 84 +++++++++++++++++-- + arch/arm64/boot/dts/renesas/r8a77990.dtsi | 5 ++ + 3 files changed, 163 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +index 26081a6e1866..20fdb4085d87 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +@@ -221,11 +221,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture", ++ "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -501,8 +517,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -702,6 +737,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -737,7 +811,7 @@ + ports { + rsnd_port0: port@0 { + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +diff --git a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts +index 087d5533f3db..61e18309c4a4 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77990-es10-ebisu.dts +@@ -221,11 +221,27 @@ + }; + + sound_card: sound { +- compatible = "audio-graph-card"; ++ compatible = "audio-graph-scu-card"; + + label = "rcar-sound"; + +- dais = <&rsnd_port0>; ++ prefix = "ak4613"; ++ routing = "ak4613 Playback", "DAI0 Playback", ++ "DAI0 Capture", "ak4613 Capture", ++ "ak4613 Playback", "Playback0", ++ "ak4613 Playback", "Playback1", ++ "ak4613 Playback", "Playback2", ++ "ak4613 Playback", "Playback3", ++ "Capture0", "ak4613 Capture", ++ "Capture1", "ak4613 Capture", ++ "Capture2", "ak4613 Capture", ++ "Capture3", "ak4613 Capture"; ++ ++ dais = <&adsp_port0 ++ &adsp_port1 ++ &adsp_port2 ++ &adsp_port3 ++ &rsnd_port0>; + }; + + vbus0_usb2: regulator-vbus0-usb2 { +@@ -501,8 +517,27 @@ + asahi-kasei,out5-single-end; + asahi-kasei,out6-single-end; + +- port { +- ak4613_endpoint: endpoint { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ak4613_endpoint0: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&adsp_endpoint0>; ++ }; ++ ak4613_endpoint1: endpoint@1 { ++ reg = <1>; ++ remote-endpoint = <&adsp_endpoint1>; ++ }; ++ ak4613_endpoint2: endpoint@2 { ++ reg = <2>; ++ remote-endpoint = <&adsp_endpoint2>; ++ }; ++ ak4613_endpoint3: endpoint@3 { ++ reg = <3>; ++ remote-endpoint = <&adsp_endpoint3>; ++ }; ++ ak4613_endpoint4: endpoint@4 { ++ reg = <4>; + remote-endpoint = <&rsnd_endpoint0>; + }; + }; +@@ -702,6 +737,45 @@ + status = "okay"; + }; + ++&rcar_adsp_sound { ++ status = "okay"; ++ /* Multiple DAI */ ++ #sound-dai-cells = <1>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ adsp_port0: port@0 { ++ reg = <0>; ++ adsp_endpoint0: endpoint { ++ remote-endpoint = <&ak4613_endpoint0>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port1: port@1 { ++ reg = <1>; ++ adsp_endpoint1: endpoint { ++ remote-endpoint = <&ak4613_endpoint1>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port2: port@2 { ++ reg = <2>; ++ adsp_endpoint2: endpoint { ++ remote-endpoint = <&ak4613_endpoint2>; ++ dai-format = "left_j"; ++ }; ++ }; ++ adsp_port3: port@3 { ++ reg = <3>; ++ adsp_endpoint3: endpoint { ++ remote-endpoint = <&ak4613_endpoint3>; ++ dai-format = "left_j"; ++ }; ++ }; ++ }; ++}; ++ + &rcar_sound { + pinctrl-0 = <&sound_pins &sound_clk_pins>; + pinctrl-names = "default"; +@@ -737,7 +811,7 @@ + ports { + rsnd_port0: port@0 { + rsnd_endpoint0: endpoint { +- remote-endpoint = <&ak4613_endpoint>; ++ remote-endpoint = <&ak4613_endpoint4>; + + dai-format = "left_j"; + bitclock-master = <&rsnd_endpoint0>; +diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi +index bd4d71e2b93e..845399adcbdb 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi +@@ -181,6 +181,11 @@ + method = "smc"; + }; + ++ rcar_adsp_sound: adsp_sound { ++ compatible = "renesas,rcar_adsp_sound_gen3"; ++ status = "disabled"; ++ }; ++ + /* External SCIF clock - to be overridden by boards that provide it */ + scif_clk: scif { + compatible = "fixed-clock"; +-- +2.19.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch new file mode 100644 index 00000000..3f601b64 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/0006-ADSP-remove-HDMI-support-from-rcar-sound.patch @@ -0,0 +1,101 @@ +From acd7751ebcce90a442588f37fc6731990b5e09ea Mon Sep 17 00:00:00 2001 +From: Nguyen Dang +Date: Tue, 6 Nov 2018 11:46:25 +0700 +Subject: [PATCH v2 6/6] ADSP: remove HDMI support from rcar-sound + +Signed-off-by: Nguyen Dang +[takeshi.kihara.df: support for dt file separation by M3v3.0 SoC] +Signed-off-by: Takeshi Kihara +--- + arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 6 ------ + arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 6 ------ + arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 5 ----- + arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts | 5 ----- + arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts | 5 ----- + 5 files changed, 27 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +index 6928afbd8e06..b268afd7df85 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +@@ -104,12 +104,6 @@ + status = "okay"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1 /* HDMI0 */ +- &rsnd_port2>; /* HDMI1 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +index 498f78875dbd..b6ec3036e9fd 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +@@ -114,12 +114,6 @@ + status = "okay"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1 /* HDMI0 */ +- &rsnd_port2>; /* HDMI1 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts +index cf92aa3939e3..4faf935c4a32 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts +@@ -88,11 +88,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts +index 664dc9250bbb..13960f69b2f7 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs-2x4g.dts +@@ -96,11 +96,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts +index 7d39dc96ac8a..1cd6f0463361 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dts +@@ -88,11 +88,6 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + +-&sound_card { +- dais = <&rsnd_port0 /* ak4613 */ +- &rsnd_port1>; /* HDMI0 */ +-}; +- + &hdmi0 { + status = "okay"; + +-- +2.21.0 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/Make-perf-able-to-build-with-latest-libbfd.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/Make-perf-able-to-build-with-latest-libbfd.patch new file mode 100644 index 00000000..1747f2d9 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/Make-perf-able-to-build-with-latest-libbfd.patch @@ -0,0 +1,36 @@ +Index: perf-1.0/tools/perf/util/srcline.c +=================================================================== +--- perf-1.0.orig/tools/perf/util/srcline.c ++++ perf-1.0/tools/perf/util/srcline.c +@@ -139,16 +139,30 @@ static void find_address_in_section(bfd + 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; diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg new file mode 100644 index 00000000..f19e8d29 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/adsp.cfg @@ -0,0 +1,3 @@ +CONFIG_SND_SOC_ADSP=y +CONFIG_SND_SOC_I2C_AND_SPI=y + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg new file mode 100644 index 00000000..e8b09aa7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/capacity_aware_migration_strategy.cfg @@ -0,0 +1 @@ +CONFIG_SCHED_DEBUG=y diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg new file mode 100644 index 00000000..a3923c19 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/iccom.cfg @@ -0,0 +1 @@ +CONFIG_RPMSG_VIRTIO=y diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg new file mode 100644 index 00000000..327c753a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/touch.cfg @@ -0,0 +1 @@ +CONFIG_HID_MULTITOUCH=y diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg new file mode 100644 index 00000000..7446787d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb-video-class.cfg @@ -0,0 +1,68 @@ +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +# CONFIG_USB_M5602 is not set +# CONFIG_USB_STV06XX is not set +# CONFIG_USB_GL860 is not set +# CONFIG_USB_GSPCA_BENQ is not set +# CONFIG_USB_GSPCA_CONEX is not set +# CONFIG_USB_GSPCA_CPIA1 is not set +# CONFIG_USB_GSPCA_DTCS033 is not set +# CONFIG_USB_GSPCA_ETOMS is not set +# CONFIG_USB_GSPCA_FINEPIX is not set +# CONFIG_USB_GSPCA_JEILINJ is not set +# CONFIG_USB_GSPCA_JL2005BCD is not set +# CONFIG_USB_GSPCA_KINECT is not set +# CONFIG_USB_GSPCA_KONICA is not set +# CONFIG_USB_GSPCA_MARS is not set +# CONFIG_USB_GSPCA_MR97310A is not set +# CONFIG_USB_GSPCA_NW80X is not set +# CONFIG_USB_GSPCA_OV519 is not set +# CONFIG_USB_GSPCA_OV534 is not set +# CONFIG_USB_GSPCA_OV534_9 is not set +# CONFIG_USB_GSPCA_PAC207 is not set +# CONFIG_USB_GSPCA_PAC7302 is not set +# CONFIG_USB_GSPCA_PAC7311 is not set +# CONFIG_USB_GSPCA_SE401 is not set +# CONFIG_USB_GSPCA_SN9C2028 is not set +# CONFIG_USB_GSPCA_SN9C20X is not set +# CONFIG_USB_GSPCA_SONIXB is not set +# CONFIG_USB_GSPCA_SONIXJ is not set +# CONFIG_USB_GSPCA_SPCA500 is not set +# CONFIG_USB_GSPCA_SPCA501 is not set +# CONFIG_USB_GSPCA_SPCA505 is not set +# CONFIG_USB_GSPCA_SPCA506 is not set +# CONFIG_USB_GSPCA_SPCA508 is not set +# CONFIG_USB_GSPCA_SPCA561 is not set +# CONFIG_USB_GSPCA_SPCA1528 is not set +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +# CONFIG_USB_GSPCA_SQ930X is not set +# CONFIG_USB_GSPCA_STK014 is not set +# CONFIG_USB_GSPCA_STK1135 is not set +# CONFIG_USB_GSPCA_STV0680 is not set +# CONFIG_USB_GSPCA_SUNPLUS is not set +# CONFIG_USB_GSPCA_T613 is not set +# CONFIG_USB_GSPCA_TOPRO is not set +# CONFIG_USB_GSPCA_TOUPTEK is not set +# CONFIG_USB_GSPCA_TV8532 is not set +# CONFIG_USB_GSPCA_VC032X is not set +# CONFIG_USB_GSPCA_VICAM is not set +# CONFIG_USB_GSPCA_XIRLINK_CIT is not set +# CONFIG_USB_GSPCA_ZC3XX is not set +# CONFIG_USB_PWC is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_USB_ZR364XX is not set +# CONFIG_USB_STKWEBCAM is not set +# CONFIG_USB_S2255 is not set +# CONFIG_VIDEO_USBTV is not set + +# +# Webcam, TV (analog/digital) USB devices +# +# CONFIG_VIDEO_EM28XX is not set diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg new file mode 100644 index 00000000..f58b942c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/usb3.cfg @@ -0,0 +1,4 @@ +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="r8a779x_usb3_v2.dlmem r8a779x_usb3_v3.dlmem" +CONFIG_EXTRA_FIRMWARE_DIR="firmware" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb new file mode 100644 index 00000000..d629ba1f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bb @@ -0,0 +1,93 @@ +DESCRIPTION = "Linux kernel for the R-Car Generation 3 based board" + +require include/avb-control.inc +require include/iccom-control.inc +require recipes-kernel/linux/linux-yocto.inc +require include/cas-control.inc +require include/adsp-control.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" +COMPATIBLE_MACHINE = "salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu" + +RENESAS_BSP_URL = " \ + git://github.com/renesas-rcar/linux-bsp.git" +BRANCH = "v4.14.75-ltsi/rcar-3.9.9" +SRCREV = "4d2a32e5d314e2c77346f13e8736e97ca3e1b90b" + +SRC_URI = "${RENESAS_BSP_URL};protocol=git;nocheckout=1;branch=${BRANCH}" + +LINUX_VERSION ?= "4.14.75" +PV = "${LINUX_VERSION}+git${SRCPV}" +PR = "r1" + +# For generating defconfig +KCONFIG_MODE = "--alldefconfig" +KBUILD_DEFCONFIG = "defconfig" + +SRC_URI_append = " \ + file://touch.cfg \ + ${@oe.utils.conditional("USE_AVB", "1", " file://usb-video-class.cfg", "", d)} \ +" + +# Add python3 support to fix Perf build failure +# Add patch to build perf with new libbfd +SRC_URI_append = " \ + file://0001-perf-tools-Add-Python-3-support.patch \ + file://Make-perf-able-to-build-with-latest-libbfd.patch \ +" + +# Fix patch for Weston 8.0.0 issue +SRC_URI_append = " \ + file://0001-drm-rcar-du-Set-primary-plane-zpos-immutably-at-init.patch \ +" + +# Enable RPMSG_VIRTIO depend on ICCOM +SUPPORT_ICCOM = " \ + file://0001-rpmsg-Add-message-to-be-able-to-configure-RPMSG_VIRT.patch \ + file://iccom.cfg \ +" + +SRC_URI_append = " \ + ${@oe.utils.conditional("USE_ICCOM", "1", "${SUPPORT_ICCOM}", "", d)} \ +" + +# Add SCHED_DEBUG config fragment to support CAS +SRC_URI_append = " \ + ${@oe.utils.conditional("USE_CAS", "1", " file://capacity_aware_migration_strategy.cfg", "",d)} \ +" + +# Add ADSP ALSA driver +SUPPORT_ADSP_ASOC = " \ + file://0001-ADSP-add-document-for-compatible-string-renesas-rcar.patch \ + file://0002-ADSP-add-ADSP-sound-driver-source.patch \ + file://0003-ADSP-add-build-for-ADSP-sound-driver.patch \ + file://0004-ADSP-integrate-ADSP-sound-for-H3-M3-M3N-board.patch \ + file://0005-ADSP-integrate-ADSP-sound-for-E3-board.patch \ + file://0006-ADSP-remove-HDMI-support-from-rcar-sound.patch \ + file://adsp.cfg \ +" + +SRC_URI_append = " \ + ${@oe.utils.conditional("USE_ADSP", "1", "${SUPPORT_ADSP_ASOC}", "", d)} \ +" + +# Install USB3.0 firmware to rootfs +USB3_FIRMWARE_V2 = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/r8a779x_usb3_v2.dlmem;md5sum=645db7e9056029efa15f158e51cc8a11" +USB3_FIRMWARE_V3 = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/r8a779x_usb3_v3.dlmem;md5sum=687d5d42f38f9850f8d5a6071dca3109" + +SRC_URI_append = " \ + ${USB3_FIRMWARE_V2} \ + ${USB3_FIRMWARE_V3} \ + ${@bb.utils.contains('MACHINE_FEATURES','usb3','file://usb3.cfg','',d)} \ +" + +# W/A Fix build issue with Linux v4.14 +SRC_URI_append = " \ + file://0001-arm64-bpf-correct-broken-uapi-for-BPF_PROG_TYPE_PERF.patch \ +" + +do_download_firmware () { + install -m 755 ${WORKDIR}/r8a779x_usb3_v*.dlmem ${STAGING_KERNEL_DIR}/firmware +} + +addtask do_download_firmware after do_configure before do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb new file mode 100644 index 00000000..2a7e37a3 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-fw-module.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "ADSP Framework for Linux" +LICENSE = "CLOSED" + +inherit features_check + +REQUIRED_DISTRO_FEATURES = "adsp" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +SRC_URI = "file://RCG3AHFWN0201ZDP.tar.gz" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +S = "${WORKDIR}/RCG3AHFWN0201ZDP" + +do_install() { + # create the firmware dir + install -d ${D}/lib/firmware + + # install the firmware bin + install -m 0644 ${S}/lib/firmware/xf-rcar.fw ${D}/lib/firmware +} + +PACKAGES = " \ + ${PN} \ +" + +FILES_${PN} = " \ + /lib/firmware \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb new file mode 100644 index 00000000..ea12f564 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/adsp-module/adsp-if-module.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "ADSP Interface for Linux" +LICENSE = "CLOSED" + +inherit features_check + +REQUIRED_DISTRO_FEATURES = "adsp" + +DEPENDS += "kernel-module-xtensa-hifi" + +SRC_URI = "file://RCG3AHIFL4101ZDP.tar.gz" + +S = "${WORKDIR}/RCG3AHIFL4101ZDP" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# Don't need to do_configure +do_configure[noexec] = "1" + +# Don't use EXTRA_OEMAKE default value to avoid default CFLAGS, LDFLAGS +# of poky override the CFLAGS, LDFLAGS inside RCG3AHIFL4101ZDP/Makefile +EXTRA_OEMAKE = "INCSHARED=${STAGING_INCDIR}" + +do_compile() { + cd ${S} + oe_runmake +} + +do_install() { + # Create destination directory + install -d ${D}/${libdir} + install -d ${D}/${includedir} + install -d ${D}/${includedir}/sys/fio + install -d ${D}/${includedir}/os/linux + + # Copy library + install -m 0755 ${S}/libRCG3AHIFL4101ZDP.so.1.0 ${D}/${libdir} + + # Copy shared header files + install -m 0644 ${S}/include/*.h ${D}/${includedir} + install -m 0644 ${S}/include/sys/fio/*.h ${D}/${includedir}/sys/fio/ + install -m 0644 ${S}/include/os/linux/*.h ${D}/${includedir}/os/linux/ + + # Create the symbolic link + cd ${D}/${libdir} + ln -s libRCG3AHIFL4101ZDP.so.1.0 libRCG3AHIFL4101ZDP.so.1 + ln -s libRCG3AHIFL4101ZDP.so.1 libRCG3AHIFL4101ZDP.so +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ +" + +INSANE_SKIP_${PN} += "dev-so" + +FILES_${PN} += " \ + ${libdir}/*.so* \ + ${includedir} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc new file mode 100644 index 00000000..1a82eed4 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-applications.inc @@ -0,0 +1,8 @@ +require include/rcar-gen3-modules-common.inc + +inherit features_check + +REQUIRED_DISTRO_FEATURES = "avb" + +SRC_URI = "gitsm://github.com/renesas-rcar/avb-applications.git;branch=rcar-gen3" +SRCREV = "8398f6e66eaf487eaf8e9a2a8d60f222456c06a6" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb new file mode 100644 index 00000000..455768bf --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avb-demoapps.bb @@ -0,0 +1,108 @@ +DESCRIPTION = "Renesas Ethernet AVB demo applications" + +require avb-applications.inc + +LICENSE = "MIT & BSD" +LIC_FILES_CHKSUM = " \ + file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9 \ + file://lib/msrp/LICENSE.BSD;md5=60ba0ea0afdcbf8d26ce31ce1503aba3 \ + file://lib/avdecc/jdksavdecc-c/COPYRIGHT;md5=6592ded5140540a936b8d98ed1b6a577 \ + file://avblauncher/inih/LICENSE.txt;md5=a7a95d2af90376e85a05318794e6f202 \ +" + +DEPENDS = "kernel-module-avb-streaming libyaml cmake-native" + +S = "${WORKDIR}/git/avb-demoapps" + +includedir = "${RENESAS_DATADIR}/include" + +EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}'" + +do_install_append() { + oe_runmake install INSTALL_DIR=${D}/${bindir} + + # Create install directories + install -d ${D}/${sysconfdir}/linuxptp + install -d ${D}/${sysconfdir}/daemon_cl + install -d ${D}/${sysconfdir}/avblauncher + + # Install + install -m 644 ${S}/etc/linuxptp/avb-demoapps.cfg ${D}/${sysconfdir}/linuxptp + install -m 644 ${S}/etc/daemon_cl/gptp_cfg.ini ${D}/${sysconfdir}/daemon_cl + install -m 755 ${S}/etc/avblauncher/mse_aaf_pcm.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_aaf_pcm_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/mse_cvf_h264.sh ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/mse_cvf_h264_d13.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_d13_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_h264_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/mse_cvf_mjpeg.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_cvf_mjpeg_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/mse_iec61883_4.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_iec61883_4_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/mse_iec61883_6.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/mse_iec61883_6_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 755 ${S}/etc/avblauncher/simple_application.sh ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/simple_listener.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/simple_talker.ini ${D}/${sysconfdir}/avblauncher + install -m 644 ${S}/etc/avblauncher/avdecc_entity_audio.yaml ${D}/${sysconfdir}/avblauncher +} + +PACKAGES =+ " \ + ${PN}-simple \ + ${PN}-mrpdummy \ + ${PN}-avblauncher \ +" + +ALLOW_EMPTY_${PN} = "1" + +FILES_${PN}-mrpdummy = " \ + ${bindir}/mrpdummy \ +" + +FILES_${PN}-avblauncher = " \ + ${sysconfdir}/daemon_cl/gptp_cfg.ini \ + ${sysconfdir}/avblauncher/mse_aaf_pcm.sh \ + ${sysconfdir}/avblauncher/mse_aaf_pcm_listener.ini \ + ${sysconfdir}/avblauncher/mse_aaf_pcm_talker.ini \ + ${sysconfdir}/avblauncher/mse_cvf_h264.sh \ + ${sysconfdir}/avblauncher/mse_cvf_h264_d13.sh \ + ${sysconfdir}/avblauncher/mse_cvf_h264_d13_listener.ini \ + ${sysconfdir}/avblauncher/mse_cvf_h264_d13_talker.ini \ + ${sysconfdir}/avblauncher/mse_cvf_h264_listener.ini \ + ${sysconfdir}/avblauncher/mse_cvf_h264_talker.ini \ + ${sysconfdir}/avblauncher/mse_cvf_mjpeg.sh \ + ${sysconfdir}/avblauncher/mse_cvf_mjpeg_listener.ini \ + ${sysconfdir}/avblauncher/mse_cvf_mjpeg_talker.ini \ + ${sysconfdir}/avblauncher/mse_iec61883_4.sh \ + ${sysconfdir}/avblauncher/mse_iec61883_4_listener.ini \ + ${sysconfdir}/avblauncher/mse_iec61883_4_talker.ini \ + ${sysconfdir}/avblauncher/mse_iec61883_6.sh \ + ${sysconfdir}/avblauncher/mse_iec61883_6_listener.ini \ + ${sysconfdir}/avblauncher/mse_iec61883_6_talker.ini \ + ${sysconfdir}/avblauncher/simple_application.sh \ + ${sysconfdir}/avblauncher/simple_listener.ini \ + ${sysconfdir}/avblauncher/simple_talker.ini \ + ${sysconfdir}/avblauncher/avdecc_entity_audio.yaml \ + ${bindir}/avblauncher \ +" + +FILES_${PN}-simple = " \ + ${sysconfdir}/linuxptp/avb-demoapps.cfg \ + ${bindir}/simple_talker \ + ${bindir}/simple_listener \ +" + +RDEPENDS_${PN} = " \ + ${PN}-simple \ + ${PN}-avblauncher \ +" + +RDEPENDS_${PN}-avblauncher = " \ + ${PN}-mrpdummy \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb new file mode 100644 index 00000000..5c002776 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/avb-applications/avbtool.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Utility tool of the AVB Streaming Driver for Linux for the R-Car Gen3" + +require avb-applications.inc + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=96659f2a7571bfa27483882a653c3bb9" + +DEPENDS = "kernel-module-avb-streaming" + +S = "${WORKDIR}/git/avbtool" + +EXTRA_OEMAKE = "'CC=${CC}'" + +do_install_append() { + install -d ${D}/${bindir} + install -m 755 ${S}/avbtool ${D}/${bindir} +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb new file mode 100644 index 00000000..ff2b8d2a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/cms-module/cms-user-module.bb @@ -0,0 +1,75 @@ +DESCRIPTION = "R-Car Gen3 Color Management System" +LICENSE = "CLOSED" + +require include/cms-control.inc + +SRC_CMSBCM = "${@bb.utils.contains('USE_CMSBCM', '1', 'file://RTM0AC0000JRCMBCV0SL41C.tar.gz;subdir=cms/bcm', '', d)}" +SRC_CMSBLC = "${@bb.utils.contains('USE_CMSBLC', '1', 'file://RTM0AC0000JRCMBLC0SL41C.tar.gz;subdir=cms/blc', '', d)}" +SRC_CMSDGC = "${@bb.utils.contains('USE_CMSDGC', '1', 'file://RTM0AC0000JRCMDGV0SL41C.tar.gz;subdir=cms/dgc', '', d)}" + +SRC_URI = " \ + ${SRC_CMSBCM} \ + ${SRC_CMSBLC} \ + ${SRC_CMSDGC} \ +" + +S = "${WORKDIR}/cms" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Create the lib directory + install -d ${D}/${libdir} + + if [ "X${USE_CMSBCM}" = "X1" ]; then + install -d ${D}/${includedir}/cms/bcm + install -m 755 ${S}/bcm/${baselib}/libcmsbcm.so.2.0.0 ${D}/${libdir} + install -m 644 ${S}/bcm/include/*.h ${D}/${includedir}/cms/bcm + + cd ${D}/${libdir} + ln -s libcmsbcm.so.2.0.0 libcmsbcm.so.1 + ln -s libcmsbcm.so.1 libcmsbcm.so + fi + + if [ "X${USE_CMSBLC}" = "X1" ]; then + install -d ${D}/${includedir}/cms/blc + install -m 755 ${S}/blc/${baselib}/libcmsblc.so.2.0.0 ${D}/${libdir} + install -m 644 ${S}/blc/include/*.h ${D}/${includedir}/cms/blc + + cd ${D}/${libdir} + ln -s libcmsblc.so.2.0.0 libcmsblc.so.1 + ln -s libcmsblc.so.1 libcmsblc.so + fi + + if [ "X${USE_CMSDGC}" = "X1" ]; then + install -d ${D}/${includedir}/cms/dgc + install -m 755 ${S}/dgc/${baselib}/libcmsdgc.so.2.0.0 ${D}/${libdir} + install -m 644 ${S}/dgc/include/*.h ${D}/${includedir}/cms/dgc + + cd ${D}/${libdir} + ln -s libcmsdgc.so.2.0.0 libcmsdgc.so.1 + ln -s libcmsdgc.so.1 libcmsdgc.so + fi +} + +FILES_${PN} = " \ + ${libdir}/*.so.* \ + ${libdir}/lib*.so \ +" + +FILES_${PN}-dev = " \ + ${includedir} \ +" + +INSANE_SKIP_${PN} = "dev-so" + +# Skip debug strip of do_populate_sysroot() +INHIBIT_SYSROOT_STRIP = "1" + +# Skip debug split and strip of do_package() +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb new file mode 100644 index 00000000..a5b86453 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dtv-module/dtv-user-module.bb @@ -0,0 +1,74 @@ +DESCRIPTION = "ISDB-T DTV Software Package for Linux for the R-Car Gen3" +LICENSE = "CLOSED" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +inherit features_check + +DEPENDS = " \ + kernel-module-vspmif mmngr-user-module \ + vspmif-user-module kernel-module-vspm \ + omx-user-module kernel-module-uvcs-drv \ + kernel-module-scu-src kernel-module-ssp \ + kernel-module-tddmac kernel-module-tsif \ +" + +PN = "dtv-user-module" +PR = "r0" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +REQUIRED_DISTRO_FEATURES = "dtv" + +SRC_URI_DTV_SW = "file://Software.tar.gz" +SRC_URI_DTV_UDF = "file://Reference.tar.gz" + +SRC_URI = " \ + ${SRC_URI_DTV_SW} \ + ${SRC_URI_DTV_UDF} \ +" + +S = "${WORKDIR}" + +includedir = "${RENESAS_DATADIR}/include" + +# do_configure() nothing +do_configure[noexec] = "1" +# do_compile() nothing +do_compile[noexec] = "1" + +do_install() { + # Create destination folders + install -d ${D}/${libdir} + install -d ${D}${RENESAS_DATADIR}/include + install -d ${D}${RENESAS_DATADIR}/src/dtv/reference + + # Copy library + install -m 644 ${S}/${baselib}/*.a ${D}/${libdir}/ + + # Copy shared header files + install -m 644 ${S}/include/*.h ${D}${RENESAS_DATADIR}/include + + # Copy reference files + install -m 644 ${S}/userfunc/*.h ${D}${RENESAS_DATADIR}/src/dtv/reference + install -m 644 ${S}/userfunc/*.c ${D}${RENESAS_DATADIR}/src/dtv/reference +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-staticdev \ +" + +FILES_${PN} = "" +ALLOW_EMPTY_${PN} = "1" + +FILES_${PN}-dev = " \ + ${RENESAS_DATADIR}/include/*.h \ + ${RENESAS_DATADIR}/src/dtv/reference/* \ +" +FILES_${PN}-staticdev = " \ + ${libdir}/*.a \ +" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb new file mode 100644 index 00000000..8651b4f7 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-encryption-module.bb @@ -0,0 +1,54 @@ +DESCRIPTION = "DVD Encryption Library for Linux RCar Gen3" +LICENSE = "CLOSED" + +require include/rcar-gen3-path-common.inc + +inherit features_check +REQUIRED_DISTRO_FEATURES = "dvd_encryption_library" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +SRC_URI = " \ + file://Software.tar.gz \ +" + +S = "${WORKDIR}" + +includedir = "${RENESAS_DATADIR}/include" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${base_libdir}/optee_armtz + install -d ${D}${RENESAS_DATADIR}/include + install -d ${D}${libdir} + + install -m 644 ${S}/TEE/DynamicTA/*.ta \ + ${D}${base_libdir}/optee_armtz/ + install -m 644 ${S}/TEEC/include/avc_copdvd.h \ + ${D}${RENESAS_DATADIR}/include/ + install -m 644 ${S}/TEEC/lib/libcopdvd.a \ + ${D}${libdir} +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-staticdev \ +" + +FILES_${PN} = " \ + ${base_libdir}/optee_armtz/*.ta \ +" + +FILES_${PN}-dev = " \ + ${RENESAS_DATADIR}/include/avc_copdvd.h \ +" + +FILES_${PN}-staticdev = " \ + ${libdir}/libcopdvd.a \ +" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb new file mode 100644 index 00000000..35908075 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/dvd-module/dvd-user-module.bb @@ -0,0 +1,64 @@ +DESCRIPTION = "DVD Core-Middleware for Linux for the R-Car Gen3" +LICENSE = "CLOSED" + +require include/rcar-gen3-modules-common.inc +require include/dtv-dvd-control.inc + +inherit features_check + +DEPENDS = " \ + kernel-module-vspmif mmngr-user-module \ + vspmif-user-module kernel-module-vspm \ + omx-user-module kernel-module-uvcs-drv \ +" + +PN = "dvd-user-module" +PR = "r0" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +REQUIRED_DISTRO_FEATURES = "dvd" + +SRC_URI_DVD_SW = "file://Software.tar.gz" + +SRC_URI = " \ + ${SRC_URI_DVD_SW} \ +" + +S = "${WORKDIR}" + +includedir = "${RENESAS_DATADIR}/include" + +# do_configure() nothing +do_configure[noexec] = "1" +# do_compile() nothing +do_compile[noexec] = "1" + +do_install() { + # Create destination folders + install -d ${D}/${libdir} + install -d ${D}${RENESAS_DATADIR}/include + + # Copy library + install -m 644 ${S}/${baselib}/*.a ${D}/${libdir} + + # Copy shared header files + install -m 644 ${S}/include/*.h ${D}${RENESAS_DATADIR}/include +} + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-staticdev \ +" + +FILES_${PN} = "" +ALLOW_EMPTY_${PN} = "1" + +FILES_${PN}-dev = " \ + ${RENESAS_DATADIR}/include/*.h \ +" +FILES_${PN}-staticdev = " \ + ${libdir}/*.a \ +" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf new file mode 100644 index 00000000..5fca3ee8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx/gstomx.conf @@ -0,0 +1,131 @@ +[omxh264dec] +type-name=GstOMXH264Dec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.H264 +rank=512 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/x-h264,alignment=(string)au,stream-format=(string)byte-stream,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] + +[omxaaclcdec] +type-name=GstOMXAACDec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.AUDIO.DECODER.AACLC +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport +sink-template-caps=audio/mpeg,mpegversion=(int){2,4},stream-format=(string){raw,adts},rate=(int)[8000,96000],channels=(int)[1,2],framed=(boolean)true +src-template-caps=audio/x-raw,rate=(int)[8000,96000],channels=(int)[1,2],format=(string)S16LE + +[omxmpeg4videodec] +type-name=GstOMXMPEG4VideoDec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.MPEG4 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/mpeg,mpegversion=(int)4,systemstream=(boolean)false,parsed=(boolean)true,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] + +[omxvc1dec] +type-name=GstOMXWMVDec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.VC1 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/x-wmv,wmvversion=(int)3,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] + +[omxh265dec] +type-name=GstOMXH265Dec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.H265 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/x-h265,alignment=(string)au,stream-format=(string)byte-stream,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] + +[omxaacdec] +type-name=GstOMXAACDec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.AUDIO.DECODER.AAC +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport +sink-template-caps=audio/mpeg,mpegversion=(int){2,4},stream-format=(string){raw,adts},rate=(int)[8000,48000],channels=(int)[1,6],framed=(boolean)true +src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2,6},format=(string)S16LE + +[omxmp3dec] +type-name=GstOMXMP3Dec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.AUDIO.DECODER.MP3 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport +sink-template-caps=audio/mpeg,mpegversion=(int)1,layer=(int)[1,3],mpegaudioversion=(int)[1,3],rate=(int)[8000,48000],channels=(int)[1,2],parsed=(boolean) true +src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2},format=(string)S16LE + +[omxwmadec] +type-name=GstOMXWMADec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.AUDIO.DECODER.WMA +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;skip-handle-codec-data +sink-template-caps=audio/x-wma,wmaversion=(int)2,rate=(int)[8000,48000],channels=(int){1,2},block_align=(int)[0,2147483647],bitrate=(int)[0,2147483647] +src-template-caps=audio/x-raw,rate=(int)[8000,48000],channels=(int){1,2},format=(string)S16LE + +[omxh264enc] +type-name=GstOMXH264Enc +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.ENCODER.H264 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;renesas-encmc-stride-align +sink-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[80,3840],height=(int)[80,2160] +src-template-caps=video/x-h264,stream-format=(string)byte-stream,width=(int)[80,3840],height=(int)[80,2160] + +[omxvp8dec] +type-name=GstOMXVP8Dec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.VP8 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/x-vp8,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] + +[omxvp8enc] +type-name=GstOMXVP8Enc +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.ENCODER.VP8 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;renesas-encmc-stride-align +sink-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[80,1920],height=(int)[80,1080] +src-template-caps=video/x-vp8,width=(int)[80,1920],height=(int)[80,1080] + +[omxvp9dec] +type-name=GstOMXVP9Dec +core-name=@RENESAS_DATADIR@/lib/libomxr_core.so +component-name=OMX.RENESAS.VIDEO.DECODER.VP9 +rank=256 +in-port-index=0 +out-port-index=1 +hacks=no-disable-outport;default-pix-aspect-ratio;no-component-reconfigure +sink-template-caps=video/x-vp9,width=(int)[1, MAX],height=(int)[1, MAX] +src-template-caps=video/x-raw,format=(string){NV12,I420},width=(int)[1, MAX],height=(int)[1, MAX] diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bbappend new file mode 100644 index 00000000..4e045950 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bbappend @@ -0,0 +1,33 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:" + +SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" +SRC_URI_append = " \ + gitsm://github.com/renesas-rcar/gst-omx.git;branch=RCAR-GEN3/1.16.2 \ + file://gstomx.conf \ +" + +require include/rcar-gen3-path-common.inc + +DEPENDS += "omx-user-module mmngrbuf-user-module" + +SRCREV = "8c65e10e4547384d6bf0611cf1ae9e752e184622" + +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ + file://omx/gstomx.h;beginline=1;endline=22;md5=e2c6664eda77dc22095adbed9cb6c6e4 \ +" + +S = "${WORKDIR}/git" + +GSTREAMER_1_0_OMX_TARGET = "rcar" +GSTREAMER_1_0_OMX_CORE_NAME = "${libdir}/libomxr_core.so" +EXTRA_OEMESON_append = " -Dheader_path=${STAGING_DIR_TARGET}/usr/local/include" + +do_configure_prepend() { + cd ${S} + install -m 0644 ${WORKDIR}/gstomx.conf ${S}/config/rcar/ + sed -i 's,@RENESAS_DATADIR@,${RENESAS_DATADIR},g' ${S}/config/rcar/gstomx.conf + cd ${B} +} + +RDEPENDS_${PN}_append = " omx-user-module" +RDEPENDS_${PN}_remove = "libomxil" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-ebisu_r8a77990.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-ebisu_r8a77990.conf new file mode 100644 index 00000000..25a3fa1e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-ebisu_r8a77990.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video8 +output-device-name=/dev/video9 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-h3ulcb_r8a7795.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-h3ulcb_r8a7795.conf new file mode 100644 index 00000000..4807dc3d --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-h3ulcb_r8a7795.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video12 +output-device-name=/dev/video13 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3nulcb_r8a77965.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3nulcb_r8a77965.conf new file mode 100644 index 00000000..890c5ad9 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3nulcb_r8a77965.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video6 +output-device-name=/dev/video7 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3ulcb_r8a7796.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3ulcb_r8a7796.conf new file mode 100644 index 00000000..890c5ad9 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-m3ulcb_r8a7796.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video6 +output-device-name=/dev/video7 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7795.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7795.conf new file mode 100644 index 00000000..586b13b0 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7795.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video20 +output-device-name=/dev/video21 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7796.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7796.conf new file mode 100644 index 00000000..74a8ab9b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a7796.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video14 +output-device-name=/dev/video15 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a77965.conf b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a77965.conf new file mode 100644 index 00000000..74a8ab9b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config/gstvspfilter-salvator-x_r8a77965.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video14 +output-device-name=/dev/video15 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config_1.0.1.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config_1.0.1.bb new file mode 100644 index 00000000..1d03f479 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter-config_1.0.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "GStreamer VSP filter plugin runtime configuration" +SECTION = "multimedia" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +VSPFILTER_CONF_r8a7795 = "gstvspfilter-${MACHINE}_r8a7795.conf" +VSPFILTER_CONF_r8a7796 = "gstvspfilter-${MACHINE}_r8a7796.conf" +VSPFILTER_CONF_r8a77965 = "gstvspfilter-${MACHINE}_r8a77965.conf" +VSPFILTER_CONF_r8a77990 = "gstvspfilter-${MACHINE}_r8a77990.conf" + +SRC_URI = " file://${VSPFILTER_CONF} " + +do_configure[noexec] = "1" + +do_compile[noexec] = "1" + +do_install() { + install -Dm 644 ${WORKDIR}/${VSPFILTER_CONF} ${D}/${sysconfdir}/gstvspfilter.conf +} + +FILES_${PN} = " ${sysconfdir}/gstvspfilter.conf " + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb new file mode 100644 index 00000000..a3d16ac0 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bb @@ -0,0 +1,35 @@ +SUMMARY = "GStreamer VSP filter plugin" +SECTION = "multimedia" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +SRC_URI = " \ + gitsm://github.com/renesas-rcar/gst-plugin-vspfilter.git;branch=RCAR-GEN3/1.0.1 \ +" +SRCREV = "c66854c46af649be65eb371aa42ef35dcc858acf" + +S = "${WORKDIR}/git" + + +inherit autotools pkgconfig + +DEPENDS += "gstreamer1.0 gstreamer1.0-plugins-base pkgconfig" + +EXTRA_AUTORECONF_append = " -I ${STAGING_DATADIR}/aclocal" + +FILES_${PN} = " \ + ${libdir}/gstreamer-1.0/libgstvspfilter.so \ +" + +FILES_${PN}-dev = "${libdir}/gstreamer-1.0/libgstvspfilter.la" + +FILES_${PN}-staticdev = "${libdir}/gstreamer-1.0/libgstvspfilter.a" + +FILES_${PN}-dbg = " \ + ${libdir}/gstreamer-1.0/.debug \ + ${prefix}/src \ +" + +RDEPENDS_${PN} = "kernel-module-vsp2driver gstreamer1.0-plugin-vspfilter-config" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend new file mode 100644 index 00000000..63df2f40 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bbappend @@ -0,0 +1,8 @@ +SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz" +SRC_URI_append = " gitsm://github.com/renesas-rcar/gst-plugins-bad.git;branch=RCAR-GEN3/1.16.2" + +SRCREV = "4459dc7686a2c20ed9097734e11d17631f71105a" + +DEPENDS += "weston" + +S = "${WORKDIR}/git" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bbappend new file mode 100644 index 00000000..f9bd2f3b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bbappend @@ -0,0 +1,13 @@ +SRC_URI_remove = "http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz" +SRC_URI_append = " gitsm://github.com/renesas-rcar/gst-plugins-good.git;branch=RCAR-GEN3/1.16.2" + +SRCREV = "5588c8b83e77d5419e498ada54eef0c183486172" + +DEPENDS += "mmngrbuf-user-module" + +S = "${WORKDIR}/git" + +EXTRA_OEMESON_append = " \ + -Dcont-frame-capture=true \ + -Dignore-fps-of-video-standard=true \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb new file mode 100644 index 00000000..ac4cf30b --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Memory Manager User module for Renesas R-Car Gen3" +require mmngr_lib.inc +require include/rcar-gen3-path-common.inc + +DEPENDS = "kernel-module-mmngr" +PN = "mmngr-user-module" +PR = "r0" + +S = "${WORKDIR}/git/libmmngr/mmngr" + +EXTRA_OECONF = "${@bb.utils.contains("DISTRO_FEATURES", "mm-test", \ + " --enable-mmngr-test", "", d)}" + +exec_prefix = "/usr" +bindir = "${RENESAS_DATADIR}/bin" +includedir = "${RENESAS_DATADIR}/include" +CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" + +do_install_append() { + if [ -f ${D}${RENESAS_DATADIR}/bin/mmtp ]; then + if [ X${WS} = "X32" ]; then + mv ${D}${RENESAS_DATADIR}/bin/mmtp ${D}${RENESAS_DATADIR}/bin/mmtp${WS} + fi + fi +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc new file mode 100644 index 00000000..8afa6a50 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr_lib.inc @@ -0,0 +1,19 @@ +# Common path of MMNGR and MMNGRBUF module +LICENSE = "MIT" +LIC_FILES_CHKSUM = "\ + file://${WORKDIR}/git/COPYING.MIT;md5=30a99e0d36a3da1f5cf93c070ad7888a" + +MMNGR_LIB_URI = "git://github.com/renesas-rcar/mmngr_lib.git" + +SRC_URI = "${MMNGR_LIB_URI};branch=rcar_gen3" +SRCREV = "e55a8356c906486ee0be78b2a1fde227e7a578f4" + +# Get Wordsize of test app and change their names later to avoid override +WS_aarch64 = "" +WS_virtclass-multilib-lib32 = "32" + +# These modules are machine specific. +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +inherit autotools diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb new file mode 100644 index 00000000..690169fd --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Memory Manager Buffer User module for Renesas R-Car Gen3" +require mmngr_lib.inc +require include/rcar-gen3-path-common.inc + +DEPENDS = "kernel-module-mmngrbuf" +PN = "mmngrbuf-user-module" +PR = "r0" + +S = "${WORKDIR}/git/libmmngr/mmngrbuf" + +EXTRA_OECONF = "${@bb.utils.contains("DISTRO_FEATURES", "mm-test", \ + " --enable-mmngrbuf-test", "", d)}" + +exec_prefix = "/usr" +bindir = "${RENESAS_DATADIR}/bin" +includedir = "${RENESAS_DATADIR}/include" +CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" + +do_install_append() { + if [ -f ${D}${RENESAS_DATADIR}/bin/mmbuftp ]; then + if [ X${WS} = "X32" ]; then + mv ${D}${RENESAS_DATADIR}/bin/mmbuftp ${D}${RENESAS_DATADIR}/bin/mmbuftp${WS} + fi + fi +} diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc new file mode 100644 index 00000000..6f3f8474 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/deltask-omx-user-module.inc @@ -0,0 +1,2 @@ +deltask do_configure +deltask do_compile diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb new file mode 100644 index 00000000..0ed61b4f --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libalacdla-l.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "ALAC decoder library" +SECTION = "libs" +LICENSE = "Apache-2.0 & APSL-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=5cf67868b9e038eccb149ec80809d9f5 \ + file://APPLE_LICENSE.txt;md5=b180a94f894d2a868d40ea43da2bbaba \ +" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = " \ + kernel-module-mmngr mmngr-user-module \ + vspmif-user-module kernel-module-vspmif \ + kernel-module-vspm kernel-module-vsp2driver \ +" + +RDEPENDS_${PN} += "mmngr-user-module vspmif-user-module" + +SRC_URI = "git://github.com/renesas-rcar/alac_decoder.git;branch=master" +SRCREV = "5d7e5c91a932bedb36284591612bfbb3342cd672" + +S = "${WORKDIR}/git" +B = "${S}/build/linux_armyocto/lib" + +EXTRA_OEMAKE = "ARCH=${ARCH}" + +ARCH = "arm" +ARCH_aarch64 = "arm64" + +do_install() { + # Create directories + install -d ${D}/${libdir} + install -d ${D}/${includedir} + + # Install library + install -m 755 ${S}/build/linux_armyocto/libALACDLA_L.so.2.0 ${D}/${libdir}/ + + # Create symbolic link + cd ${D}/${libdir} + ln -s libALACDLA_L.so.2.0 libALACDLA_L.so.2 + ln -s libALACDLA_L.so.2 libALACDLA_L.so + + # Install shared header file + install -m 644 ${S}/lib/alacd_Lib.h ${D}/${includedir}/ +} + +FILES_${PN} += " \ + ${libdir}/libALACDLA_L.so.* \ + ${libdir}/libALACDLA_L.so \ +" + +FILES_${PN}-dev = "${includedir}/*.h" + +INSANE_SKIP_${PN} += "dev-so" + +# Skip debug strip of do_populate_sysroot() +INHIBIT_SYSROOT_STRIP = "1" + +# Skip debug split and strip of do_package() +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb new file mode 100644 index 00000000..1d0d77a2 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/libflacdla-l.bb @@ -0,0 +1,51 @@ +DESCRIPTION = "FLAC decoder library" +SECTION = "libs" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING.Xiph;md5=a2c4b71c0198682376d483eb5bcc9197" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +SRC_URI = "git://github.com/renesas-rcar/flac_decoder.git;branch=master" +SRCREV = "70c0a7ae7dc8cac2056adf5eb175e3c54f892c27" + +S = "${WORKDIR}/git" +B = "${S}/build/linux_armyocto/lib" + +EXTRA_OEMAKE = "ARCH=${ARCH}" + +ARCH = "arm" +ARCH_aarch64 = "arm64" + +do_install() { + # Create directories + install -d ${D}/${libdir} + install -d ${D}/${includedir} + + # Install library + install -m 755 ${S}/build/linux_armyocto/libFLACDLA_L.so.2.0 ${D}/${libdir}/ + + # Create symbolic link + cd ${D}/${libdir} + ln -s libFLACDLA_L.so.2.0 libFLACDLA_L.so.2 + ln -s libFLACDLA_L.so.2 libFLACDLA_L.so + + # Install shared header file + install -m 644 ${S}/lib/flacd_Lib.h ${D}/${includedir}/ +} + +FILES_${PN} += " \ + ${libdir}/libFLACDLA_L.so.* \ + ${libdir}/libFLACDLA_L.so \ +" + +FILES_${PN}-dev = "${includedir}/*.h" + +INSANE_SKIP_${PN} += "dev-so" + +# Skip debug strip of do_populate_sysroot() +INHIBIT_SYSROOT_STRIP = "1" + +# Skip debug split and strip of do_package() +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb new file mode 100644 index 00000000..598be288 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bb @@ -0,0 +1,490 @@ +DESCRIPTION = "OMX Media Components R-Car Gen3" +LICENSE = "CLOSED" +require include/omx-control.inc +require include/rcar-gen3-modules-common.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = " \ + kernel-module-mmngr mmngr-user-module \ + vspmif-user-module kernel-module-vspmif \ + kernel-module-vspm kernel-module-vsp2driver \ +" + +# Task Control. Compile is not performed when not installing OMX Video and Audio Libs. +# Note) dummy-omx-user-module.inc does not exist. +INCLUDE_FILE = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "dummy", "deltask", d )}' +include ${INCLUDE_FILE}-omx-user-module.inc + +DEPENDS += '${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )}' + +inherit autotools + +includedir = "${RENESAS_DATADIR}/include" +CFLAGS += " -I${STAGING_DIR_HOST}${RENESAS_DATADIR}/include" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +OMX_EVA_PREFIX = '${@oe.utils.conditional("USE_OMX_EVA_PKG", "1", "EVA", "", d )}' + +# SRC file name +SRC_URI_OMX = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XCMCTL30SL41C.tar.bz2;unpack=0", "", d )}' +SRC_URI_VCMND = '${@oe.utils.conditional("USE_VIDEO_DEC", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XVCMND30SL41C.tar.bz2;unpack=0", "", d )}' +SRC_URI_VCMNE = '${@oe.utils.conditional("USE_VIDEO_ENC", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XVCMNE30SL41C.tar.bz2;unpack=0", "", d )}' +SRC_URI_H264D = '${@oe.utils.conditional("USE_H264D_OMX", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XV264D30SL41C.tar.bz2", "", d )}' +SRC_URI_H264E = '${@oe.utils.conditional("USE_H264E_OMX", "1", "file://${OMX_EVA_PREFIX}RTM0AC0000XV264E30SL41C.tar.bz2", "", d )}' + +SRC_URI_H263D = '${@oe.utils.conditional("USE_H263D_OMX", "1", "file://RTM0AC0000XV263D30SL41C.tar.bz2", "", d )}' +SRC_URI_H265D = '${@oe.utils.conditional("USE_H265D_OMX", "1", "file://RTM0AC0000XV265D30SL41C.tar.bz2", "", d )}' +SRC_URI_MPEG2D = '${@oe.utils.conditional("USE_MPEG2D_OMX", "1", "file://RTM0AC0000XVM2VD30SL41C.tar.bz2", "", d )}' +SRC_URI_MPEG4D = '${@oe.utils.conditional("USE_MPEG4D_OMX", "1", "file://RTM0AC0000XVM4VD30SL41C.tar.bz2", "", d )}' +SRC_URI_VC1D = '${@oe.utils.conditional("USE_VC1D_OMX", "1", "file://RTM0AC0000XVVC1D30SL41C.tar.bz2", "", d )}' +SRC_URI_DIVXD = '${@oe.utils.conditional("USE_DIVXD_OMX", "1", "file://RTM0AC0000XVDVXD30SL41C.tar.bz2", "", d )}' +SRC_URI_RVD = '${@oe.utils.conditional("USE_RVD_OMX", "1", "file://RTM0AC0000XVRLVD30SL41C.tar.bz2", "", d )}' +SRC_URI_VP8D = '${@oe.utils.conditional("USE_VP8D_OMX", "1", "file://RTM0AC0000XVVP8D30SL41C.tar.bz2", "", d )}' +SRC_URI_VP8E = '${@oe.utils.conditional("USE_VP8E_OMX", "1", "file://RTM0AC0000XVVP8E30SL41C.tar.bz2", "", d )}' +SRC_URI_VP9D = '${@oe.utils.conditional("USE_VP9D_OMX", "1", "file://RTM0AC0000XVVP9D30SL41C.tar.bz2", "", d )}' +SRC_URI_ACMND = '${@oe.utils.conditional("USE_AUDIO_OMX", "1", "file://RTM0AC0000XACMND30SL41C.tar.gz", "", d )}' +SRC_URI_AACLC = '${@oe.utils.conditional("USE_AACLCD_OMX", "1", "file://RTM0AC0000XAAACD30SL41C.tar.gz", "", d )}' +SRC_URI_AACPV2 = '${@oe.utils.conditional("USE_AACPV2D_OMX", "1", "file://RTM0AC0000XAAAPD30SL41C.tar.gz", "", d )}' +SRC_URI_MP3 = '${@oe.utils.conditional("USE_MP3D_OMX", "1", "file://RTM0AC0000XAMP3D30SL41C.tar.gz", "", d )}' +SRC_URI_AACLCE = '${@oe.utils.conditional("USE_AACLCE_OMX", "1", "file://RTM0AC0000XAAACE30SL41C.tar.gz", "", d )}' +SRC_URI_WMA = '${@oe.utils.conditional("USE_WMAD_OMX", "1", "file://RTM0AC0000XAWMAD30SL41C.tar.gz", "", d )}' +SRC_URI_ALACD = '${@oe.utils.conditional("USE_ALACD_OMX", "1", "file://RTM0AC0000XAALAD30SL41C.tar.gz", "", d )}' +SRC_URI_FLACD = '${@oe.utils.conditional("USE_FLACD_OMX", "1", "file://RTM0AC0000XAFLAD30SL41C.tar.gz", "", d )}' +SRC_URI_DDD = '${@oe.utils.conditional("USE_DDD_OMX", "1", "file://RTM0AC0000XADD5D30SL41C.tar.gz", "", d )}' +SRC_URI_AACMZ = '${@oe.utils.conditional("USE_AACLC_MDW", "1", "file://RTM0AC0000ADAACMZ1SL41C.tar.gz", "", d )}' +SRC_URI_AACPV2MZ = '${@oe.utils.conditional("USE_AACPV2_MDW", "1", "file://RTM0AC0000ADAAPMZ1SL41C.tar.gz", "", d )}' +SRC_URI_MP3MZ = '${@oe.utils.conditional("USE_MP3_MDW", "1", "file://RTM0AC0000ADMP3MZ1SL41C.tar.gz", "", d )}' +SRC_URI_WMAMZ = '${@oe.utils.conditional("USE_WMA_MDW", "1", "file://RTM0AC0000ADWMAMZ1SL41C.tar.gz", "", d )}' +SRC_URI_DDMZ = '${@oe.utils.conditional("USE_DD_MDW", "1", "file://RTM0AC0000ADDD5MZ1SL41C.tar.gz", "", d )}' +SRC_URI_AEAACMZ = '${@oe.utils.conditional("USE_AACLCE_MDW", "1", "file://RTM0AC0000AEAACMZ1SL41C.tar.gz", "", d )}' + +SRC_URI = " \ + ${SRC_URI_OMX} \ + ${SRC_URI_VCMND} \ + ${SRC_URI_VCMNE} \ + ${SRC_URI_H263D} \ + ${SRC_URI_H264D} \ + ${SRC_URI_H264E} \ + ${SRC_URI_H265D} \ + ${SRC_URI_MPEG2D} \ + ${SRC_URI_MPEG4D} \ + ${SRC_URI_VC1D} \ + ${SRC_URI_DIVXD} \ + ${SRC_URI_RVD} \ + ${SRC_URI_ACMND} \ + ${SRC_URI_AACLC} \ + ${SRC_URI_AACPV2} \ + ${SRC_URI_MP3} \ + ${SRC_URI_WMA} \ + ${SRC_URI_ALACD} \ + ${SRC_URI_FLACD} \ + ${SRC_URI_DDD} \ + ${SRC_URI_AACLCE} \ + ${SRC_URI_AACMZ} \ + ${SRC_URI_AACPV2MZ} \ + ${SRC_URI_MP3MZ} \ + ${SRC_URI_WMAMZ} \ + ${SRC_URI_DDMZ} \ + ${SRC_URI_AEAACMZ} \ + ${SRC_URI_VP8D} \ + ${SRC_URI_VP8E} \ + ${SRC_URI_VP9D} \ +" + +# SRC directory name +OMX_COMMON_SRC = '${@oe.utils.conditional("USE_OMX_COMMON", "1", "${OMX_EVA_PREFIX}RTM0AC0000XCMCTL30SL41C", "", d )}' +OMX_VIDEO_DEC_COMMON_SRC = '${@oe.utils.conditional("USE_VIDEO_DEC", "1", "${OMX_EVA_PREFIX}RTM0AC0000XVCMND30SL41C", "", d )}' +OMX_VIDEO_ENC_COMMON_SRC = '${@oe.utils.conditional("USE_VIDEO_ENC", "1", "${OMX_EVA_PREFIX}RTM0AC0000XVCMNE30SL41C", "", d )}' + +OMX_H264_DEC_SRC = '${@oe.utils.conditional("USE_H264D_OMX", "1", "${OMX_EVA_PREFIX}RTM0AC0000XV264D30SL41C", "", d )}' +OMX_H264_ENC_SRC = '${@oe.utils.conditional("USE_H264E_OMX", "1", "${OMX_EVA_PREFIX}RTM0AC0000XV264E30SL41C", "", d )}' + +OMX_H263_DEC_SRC = '${@oe.utils.conditional("USE_H263D_OMX", "1", "RTM0AC0000XV263D30SL41C", "", d )}' +OMX_H265_DEC_SRC = '${@oe.utils.conditional("USE_H265D_OMX", "1", "RTM0AC0000XV265D30SL41C", "", d )}' +OMX_MPEG2_DEC_SRC = '${@oe.utils.conditional("USE_MPEG2D_OMX", "1", "RTM0AC0000XVM2VD30SL41C", "", d )}' +OMX_MPEG4_DEC_SRC = '${@oe.utils.conditional("USE_MPEG4D_OMX", "1", "RTM0AC0000XVM4VD30SL41C", "", d )}' +OMX_VC1_DEC_SRC = '${@oe.utils.conditional("USE_VC1D_OMX", "1", "RTM0AC0000XVVC1D30SL41C", "", d )}' +OMX_DIVX_DEC_SRC = '${@oe.utils.conditional("USE_DIVXD_OMX", "1", "RTM0AC0000XVDVXD30SL41C", "", d )}' +OMX_RV_DEC_SRC = '${@oe.utils.conditional("USE_RVD_OMX", "1", "RTM0AC0000XVRLVD30SL41C", "", d )}' +OMX_VP8_DEC_SRC = '${@oe.utils.conditional("USE_VP8D_OMX", "1", "RTM0AC0000XVVP8D30SL41C", "", d )}' +OMX_VP8_ENC_SRC = '${@oe.utils.conditional("USE_VP8E_OMX", "1", "RTM0AC0000XVVP8E30SL41C", "", d )}' +OMX_VP9_DEC_SRC = '${@oe.utils.conditional("USE_VP9D_OMX", "1", "RTM0AC0000XVVP9D30SL41C", "", d )}' + +OMX_VIDEO_SRC_LIST = " \ + ${OMX_COMMON_SRC} \ + ${OMX_VIDEO_DEC_COMMON_SRC} \ + ${OMX_VIDEO_ENC_COMMON_SRC} \ + ${OMX_H263_DEC_SRC} \ + ${OMX_H264_DEC_SRC} \ + ${OMX_H264_ENC_SRC} \ + ${OMX_H265_DEC_SRC} \ + ${OMX_MPEG2_DEC_SRC} \ + ${OMX_MPEG4_DEC_SRC} \ + ${OMX_VC1_DEC_SRC} \ + ${OMX_DIVX_DEC_SRC} \ + ${OMX_RV_DEC_SRC} \ + ${OMX_VP8_DEC_SRC} \ + ${OMX_VP8_ENC_SRC} \ + ${OMX_VP9_DEC_SRC} \ +" + +AAC_MIDDLEWARE_SRC = "RTM0AC0000ADAACMZ1SL41C" +AACPV2_MIDDLEWARE_SRC = "RTM0AC0000ADAAPMZ1SL41C" +MP3_MIDDLEWARE_SRC = "RTM0AC0000ADMP3MZ1SL41C" +WMA_MIDDLEWARE_SRC = "RTM0AC0000ADWMAMZ1SL41C" +DD_MIDDLEWARE_SRC = "RTM0AC0000ADDD5MZ1SL41C" +AEAAC_MIDDLEWARE_SRC = "RTM0AC0000AEAACMZ1SL41C" + +OMX_AUDIO_COMMON_SRC = '${@oe.utils.conditional("USE_AUDIO_OMX", "1", "RTM0AC0000XACMND30SL41C", "", d )}' +OMX_AACLC_DEC_SRC = '${@oe.utils.conditional("USE_AACLCD_OMX", "1", "RTM0AC0000XAAACD30SL41C", "", d )}' +OMX_AACPV2_DEC_SRC = '${@oe.utils.conditional("USE_AACPV2D_OMX", "1", "RTM0AC0000XAAAPD30SL41C", "", d )}' +OMX_MP3_DEC_SRC = '${@oe.utils.conditional("USE_MP3D_OMX", "1", "RTM0AC0000XAMP3D30SL41C", "", d )}' +OMX_WMA_DEC_SRC = '${@oe.utils.conditional("USE_WMAD_OMX", "1", "RTM0AC0000XAWMAD30SL41C", "", d )}' +OMX_ALAC_DEC_SRC = '${@oe.utils.conditional("USE_ALACD_OMX", "1", "RTM0AC0000XAALAD30SL41C", "", d )}' +OMX_FLAC_DEC_SRC = '${@oe.utils.conditional("USE_FLACD_OMX", "1", "RTM0AC0000XAFLAD30SL41C", "", d )}' +OMX_DD_DEC_SRC = '${@oe.utils.conditional("USE_DDD_OMX", "1", "RTM0AC0000XADD5D30SL41C", "", d )}' +OMX_AACLC_ENC_SRC = '${@oe.utils.conditional("USE_AACLCE_OMX", "1", "RTM0AC0000XAAACE30SL41C", "", d )}' + +OMX_AUDIO_SRC_LIST = " \ + ${OMX_AUDIO_COMMON_SRC} \ + ${OMX_AACLC_DEC_SRC} \ + ${OMX_AACPV2_DEC_SRC} \ + ${OMX_MP3_DEC_SRC} \ + ${OMX_WMA_DEC_SRC} \ + ${OMX_ALAC_DEC_SRC} \ + ${OMX_FLAC_DEC_SRC} \ + ${OMX_DD_DEC_SRC} \ + ${OMX_AACLC_ENC_SRC} \ +" + +S = "${WORKDIR}/omx/" + +# Create ${S} directory +do_unpack_prepend() { + os.system("install -d ${S}") +} + +do_unpack_append() { + bb.build.exec_func('setup_build_tree', d) +} + +setup_build_tree() { + for omxmc in ${OMX_COMMON_SRC} ${OMX_VIDEO_DEC_COMMON_SRC} ${OMX_VIDEO_ENC_COMMON_SRC} + do + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${WORKDIR} + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/src --strip=2 + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/include --strip=1 + done +} + +B = "${S}" + +EXTRA_OECONF = "OMXR_DEFAULT_CONFIG_FILE_NAME=${sysconfdir}/omxr/omxr_config_base.txt" + +do_configure() { + export uvcsdrv_dir="${INCSHARED}" + chmod u+x autogen.sh + ./autogen.sh + oe_runconf +} + +do_install_omx_video() { + cd ${D}/${libdir} + for omxmc in ${OMX_VIDEO_SRC_LIST} + do + src="${WORKDIR}/${omxmc}" + install -m 755 ${src}/${baselib}/lib*.so.* ${D}/${libdir} + install -m 644 ${src}/include/*.h ${D}/${includedir} + install -m 644 ${src}/config/*.txt ${D}/${sysconfdir}/omxr + done + + if [ "X${USE_OMX_COMMON}" = "X1" ] ; then + ln -s libomxr_core.so.3.0.0 libomxr_core.so.3 + ln -s libomxr_core.so.3 libomxr_core.so + + ln -s libomxr_mc_cmn.so.3.0.0 libomxr_mc_cmn.so.3 + ln -s libomxr_mc_cmn.so.3 libomxr_mc_cmn.so + fi + + if [ "X${USE_VIDEO_OMX}" = "X1" ] ; then + ln -s libomxr_mc_vcmn.so.3.0.0 libomxr_mc_vcmn.so.3 + ln -s libomxr_mc_vcmn.so.3 libomxr_mc_vcmn.so + fi + + if [ "X${USE_VIDEO_DEC}" = "X1" ] ; then + ln -s libomxr_mc_vdcmn.so.3.0.0 libomxr_mc_vdcmn.so.3 + ln -s libomxr_mc_vdcmn.so.3 libomxr_mc_vdcmn.so + + ln -s libuvcs_dec.so.3.0.0 libuvcs_dec.so.3 + ln -s libuvcs_dec.so.3 libuvcs_dec.so + fi + + if [ "X${USE_VIDEO_ENC}" = "X1" ] ; then + ln -s libomxr_mc_vecmn.so.3.0.0 libomxr_mc_vecmn.so.3 + ln -s libomxr_mc_vecmn.so.3 libomxr_mc_vecmn.so + + ln -s libuvcs_enc.so.3.0.0 libuvcs_enc.so.3 + ln -s libuvcs_enc.so.3 libuvcs_enc.so + fi + + if [ "X${USE_H263D_OMX}" = "X1" ]; then + ln -s libomxr_mc_h263d.so.3.0.0 libomxr_mc_h263d.so.3 + ln -s libomxr_mc_h263d.so.3 libomxr_mc_h263d.so + + ln -s libuvcs_hv3d.so.3.0.0 libuvcs_hv3d.so.3 + ln -s libuvcs_hv3d.so.3 libuvcs_hv3d.so + fi + + if [ "X${USE_H264D_OMX}" = "X1" ]; then + ln -s libomxr_mc_h264d.so.3.0.0 libomxr_mc_h264d.so.3 + ln -s libomxr_mc_h264d.so.3 libomxr_mc_h264d.so + + ln -s libuvcs_avcd.so.3.0.0 libuvcs_avcd.so.3 + ln -s libuvcs_avcd.so.3 libuvcs_avcd.so + fi + + if [ "X${USE_H264E_OMX}" = "X1" ]; then + ln -s libomxr_mc_h264e.so.3.0.0 libomxr_mc_h264e.so.3 + ln -s libomxr_mc_h264e.so.3 libomxr_mc_h264e.so + + ln -s libuvcs_avce.so.3.0.0 libuvcs_avce.so.3 + ln -s libuvcs_avce.so.3 libuvcs_avce.so + fi + + if [ "X${USE_H265D_OMX}" = "X1" ]; then + ln -s libomxr_mc_hevd.so.3.0.0 libomxr_mc_hevd.so.3 + ln -s libomxr_mc_hevd.so.3 libomxr_mc_hevd.so + + ln -s libuvcs_hevd.so.3.0.0 libuvcs_hevd.so.3 + ln -s libuvcs_hevd.so.3 libuvcs_hevd.so + fi + + if [ "X${USE_MPEG2D_OMX}" = "X1" ]; then + ln -s libomxr_mc_m2vd.so.3.0.0 libomxr_mc_m2vd.so.3 + ln -s libomxr_mc_m2vd.so.3 libomxr_mc_m2vd.so + + ln -s libuvcs_m2vd.so.3.0.0 libuvcs_m2vd.so.3 + ln -s libuvcs_m2vd.so.3 libuvcs_m2vd.so + fi + + if [ "X${USE_MPEG4D_OMX}" = "X1" ]; then + ln -s libomxr_mc_m4vd.so.3.0.0 libomxr_mc_m4vd.so.3 + ln -s libomxr_mc_m4vd.so.3 libomxr_mc_m4vd.so + + ln -s libuvcs_m4vd.so.3.0.0 libuvcs_m4vd.so.3 + ln -s libuvcs_m4vd.so.3 libuvcs_m4vd.so + fi + + if [ "X${USE_VC1D_OMX}" = "X1" ]; then + ln -s libomxr_mc_vc1d.so.3.0.0 libomxr_mc_vc1d.so.3 + ln -s libomxr_mc_vc1d.so.3 libomxr_mc_vc1d.so + + ln -s libuvcs_vc1d.so.3.0.0 libuvcs_vc1d.so.3 + ln -s libuvcs_vc1d.so.3 libuvcs_vc1d.so + fi + + if [ "X${USE_DIVXD_OMX}" = "X1" ]; then + ln -s libomxr_mc_divxd.so.3.0.0 libomxr_mc_divxd.so.3 + ln -s libomxr_mc_divxd.so.3 libomxr_mc_divxd.so + + ln -s libuvcs_dvxd.so.3.0.0 libuvcs_dvxd.so.3 + ln -s libuvcs_dvxd.so.3 libuvcs_dvxd.so + fi + + if [ "X${USE_RVD_OMX}" = "X1" ]; then + ln -s libomxr_mc_rlvd.so.3.0.0 libomxr_mc_rlvd.so.3 + ln -s libomxr_mc_rlvd.so.3 libomxr_mc_rlvd.so + + ln -s libuvcs_rlvd.so.3.0.0 libuvcs_rlvd.so.3 + ln -s libuvcs_rlvd.so.3 libuvcs_rlvd.so + fi + + if [ "X${USE_VP8D_OMX}" = "X1" ]; then + ln -s libomxr_mc_vp8d.so.3.0.0 libomxr_mc_vp8d.so.3 + ln -s libomxr_mc_vp8d.so.3 libomxr_mc_vp8d.so + + ln -s libuvcs_vp8d.so.3.0.0 libuvcs_vp8d.so.3 + ln -s libuvcs_vp8d.so.3 libuvcs_vp8d.so + fi + + if [ "X${USE_VP8E_OMX}" = "X1" ]; then + ln -s libomxr_mc_vp8e.so.3.0.0 libomxr_mc_vp8e.so.3 + ln -s libomxr_mc_vp8e.so.3 libomxr_mc_vp8e.so + + ln -s libuvcs_vp8e.so.3.0.0 libuvcs_vp8e.so.3 + ln -s libuvcs_vp8e.so.3 libuvcs_vp8e.so + fi + + if [ "X${USE_VP9D_OMX}" = "X1" ]; then + ln -s libomxr_mc_vp9d.so.3.0.0 libomxr_mc_vp9d.so.3 + ln -s libomxr_mc_vp9d.so.3 libomxr_mc_vp9d.so + + ln -s libuvcs_vp9d.so.3.0.0 libuvcs_vp9d.so.3 + ln -s libuvcs_vp9d.so.3 libuvcs_vp9d.so + fi +} + +do_install_audio_middleware() { + cd ${D}/${libdir} + + if [ "X${USE_AACLC_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${AAC_MIDDLEWARE_SRC}/${baselib}/libAACDLA_L.so.3.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${AAC_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libAACDLA_L.so.3.0 libAACDLA_L.so.3 + ln -s libAACDLA_L.so.3 libAACDLA_L.so + fi + + if [ "X${USE_AACPV2_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${AACPV2_MIDDLEWARE_SRC}/${baselib}/libRSACPDLA_L.so.2.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${AACPV2_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libRSACPDLA_L.so.2.0 libRSACPDLA_L.so.2 + ln -s libRSACPDLA_L.so.2 libRSACPDLA_L.so + fi + + if [ "X${USE_MP3_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${MP3_MIDDLEWARE_SRC}/${baselib}/libMP3DLA_L.so.2.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${MP3_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libMP3DLA_L.so.2.0 libMP3DLA_L.so.2 + ln -s libMP3DLA_L.so.2 libMP3DLA_L.so + fi + + if [ "X${USE_WMA_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${WMA_MIDDLEWARE_SRC}/${baselib}/libWMASTDLA_L.so.2.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${WMA_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libWMASTDLA_L.so.2.0 libWMASTDLA_L.so.2 + ln -s libWMASTDLA_L.so.2 libWMASTDLA_L.so + fi + + if [ "X${USE_DD_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${DD_MIDDLEWARE_SRC}/${baselib}/libRSDACDLA_L.so.2.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${DD_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libRSDACDLA_L.so.2.0 libRSDACDLA_L.so.2 + ln -s libRSDACDLA_L.so.2 libRSDACDLA_L.so + fi + + if [ "X${USE_AACLCE_MDW}" = "X1" ]; then + install -m 755 ${WORKDIR}/${AEAAC_MIDDLEWARE_SRC}/${baselib}/libRSAACELA_L.so.3.0 \ + ${D}/${libdir} + install -m 644 ${WORKDIR}/${AEAAC_MIDDLEWARE_SRC}/include/*.h ${D}/${includedir} + + ln -s libRSAACELA_L.so.3.0 libRSAACELA_L.so.3 + ln -s libRSAACELA_L.so.3 libRSAACELA_L.so + fi +} + +do_install_omx_audio() { + cd ${D}/${libdir} + for omxmc in ${OMX_AUDIO_SRC_LIST} + do + src="${WORKDIR}/${omxmc}/" + install -m 755 ${src}/${baselib}/lib*.so.* ${D}/${libdir} + if [ -d ${src}/include ]; then + install -m 644 ${src}/include/*.h ${D}/${includedir} + fi + install -m 644 ${src}/config/*.txt ${D}/${sysconfdir}/omxr + done + + if [ "X${USE_AUDIO_OMX}" = "X1" ]; then + ln -s libomxr_mc_acmn.so.3.0.0 libomxr_mc_acmn.so.3 + ln -s libomxr_mc_acmn.so.3 libomxr_mc_acmn.so + fi + + if [ "X${USE_AACLCD_OMX}" = "X1" ]; then + ln -s libomxr_mc_aacd.so.3.0.0 libomxr_mc_aacd.so.3 + ln -s libomxr_mc_aacd.so.3 libomxr_mc_aacd.so + fi + + if [ "X${USE_AACPV2D_OMX}" = "X1" ]; then + ln -s libomxr_mc_aapd.so.3.0.0 libomxr_mc_aapd.so.3 + ln -s libomxr_mc_aapd.so.3 libomxr_mc_aapd.so + fi + + if [ "X${USE_MP3D_OMX}" = "X1" ]; then + ln -s libomxr_mc_mp3d.so.3.0.0 libomxr_mc_mp3d.so.3 + ln -s libomxr_mc_mp3d.so.3 libomxr_mc_mp3d.so + fi + + if [ "X${USE_WMAD_OMX}" = "X1" ]; then + ln -s libomxr_mc_wmad.so.3.0.0 libomxr_mc_wmad.so.3 + ln -s libomxr_mc_wmad.so.3 libomxr_mc_wmad.so + fi + + if [ "X${USE_ALACD_OMX}" = "X1" ]; then + ln -s libomxr_mc_alacd.so.3.0.0 libomxr_mc_alacd.so.3 + ln -s libomxr_mc_alacd.so.3 libomxr_mc_alacd.so + fi + + if [ "X${USE_FLACD_OMX}" = "X1" ]; then + ln -s libomxr_mc_flacd.so.3.0.0 libomxr_mc_flacd.so.3 + ln -s libomxr_mc_flacd.so.3 libomxr_mc_flacd.so + fi + + if [ "X${USE_AACLCE_OMX}" = "X1" ]; then + ln -s libomxr_mc_aace.so.3.0.0 libomxr_mc_aace.so.3 + ln -s libomxr_mc_aace.so.3 libomxr_mc_aace.so + fi + + if [ "X${USE_DDD_OMX}" = "X1" ]; then + ln -s libomxr_mc_ddd.so.3.0.0 libomxr_mc_ddd.so.3 + ln -s libomxr_mc_ddd.so.3 libomxr_mc_ddd.so + fi +} + +do_install () { + if [ "X${USE_OMX_COMMON}" = "X1" ]; then + oe_runmake 'DESTDIR=${D}' install + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}/${infodir}/dir" ]; then + rm -f ${D}/${infodir}/dir + fi + fi +} + +do_install_append() { + # Create destination directory + install -d ${D}/${libdir} + install -d ${D}/${includedir} + if [ "X${USE_OMX_COMMON}" = "X1" ]; then + install -d ${D}/${sysconfdir}/omxr + fi + + # Copy omx video library + do_install_omx_video + # Copy audio middleware library + do_install_audio_middleware + # Copy omx audio library + do_install_omx_audio +} + +INSANE_SKIP_${PN} = "dev-so" + +FILES_${PN} += " \ + ${libdir}/*.so \ +" + +FILES_${PN}-dev = " \ + ${includedir} \ + ${libdir}/*.la \ +" + +RDEPENDS_${PN} += "mmngr-user-module vspmif-user-module" +RDEPENDS_${PN} += '${@oe.utils.conditional("USE_ALACD_OMX", "1", "libalacdla-l", "", d )}' +RDEPENDS_${PN} += '${@oe.utils.conditional("USE_FLACD_OMX", "1", "libflacdla-l", "", d )}' + +# Skip debug strip of do_populate_sysroot() +INHIBIT_SYSROOT_STRIP = "1" + +# Skip debug split and strip of do_package() +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch new file mode 100644 index 00000000..dbc1eccb --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu/0001-Fix-QA-issue-when-build-with-Yocto.patch @@ -0,0 +1,34 @@ +From 5e9eff188ada13e1c1986d5611a42e0779fe7fd1 Mon Sep 17 00:00:00 2001 +From: Thao Nguyen +Date: Mon, 18 Sep 2017 17:09:21 +0700 +Subject: [PATCH] Fix QA issue when build with Yocto + +Yocto project has updated Linker Hash Style Changed in YP2.4. +Makefile should be updated to avoid QA error. + +ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/proj/yocto/gen3/v3.4.0-pt2/build/tmp/work/aarch64-poky-linux/open-avb/1.1+gitAUTOINC+5e43fa5ae2-r0/packages-split/open-avb-gptp/usr/bin/daemon_cl' [ldflags] +ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: QA run found fatal errors. Please consider fixing them. +ERROR: open-avb-1.1+gitAUTOINC+5e43fa5ae2-r0 do_package_qa: Function failed: do_package_qa + +Signed-off-by: Thao Nguyen +Signed-off-by: Masaru Nagai +--- + daemons/gptp/linux/build/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/daemons/gptp/linux/build/Makefile b/daemons/gptp/linux/build/Makefile +index 1e00b1a..99fbf84 100644 +--- a/daemons/gptp/linux/build/Makefile ++++ b/daemons/gptp/linux/build/Makefile +@@ -131,7 +131,7 @@ LDFLAGS_G += -lpthread -lrt + + CFLAGS = $(CFLAGS_G) + CPPFLAGS = $(CPPFLAGS_G) +-LDFLAGS = $(LDFLAGS_G) ++LDFLAGS += $(LDFLAGS_G) + + all: $(OBJ_DIR)/daemon_cl + +-- +1.9.1 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb new file mode 100644 index 00000000..5972d063 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/openavnu/openavnu_git.bb @@ -0,0 +1,75 @@ +DESCRIPTION = "OpenAvnu - an AVnu sponsored repository for Time Sensitive Network (TSN and AVB) technology" +HOMEPAGE = "https://github.com/AVnu/OpenAvnu" +LICENSE = "BSD & MIT & GPLv2 & LGPLv2" +LIC_FILES_CHKSUM = " \ + file://daemons/LICENSE;md5=81ccd62d4bc28bafc5e1a2576536b927 \ + file://daemons/shaper/LICENSE;md5=53e60f7a40864e4c075831415f2ecc59 \ + file://kmod/igb/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://kmod/igb/LICENSE;md5=e2c0cd0820d168b0b26e19f13df4dc56 \ + file://lib/igb/LICENSE;md5=9bc783ca40be823a8b237df5eed80fc4 \ + file://lib/avtp_pipeline/LICENSE;md5=485c2c585be88b59c3ee70a016f27959 \ + file://examples/LICENSE;md5=81ccd62d4bc28bafc5e1a2576536b927 \ + file://examples/gstreamer-avb-plugins/COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \ + file://examples/gstreamer-avb-plugins/COPYING.MIT;md5=bba6cdb9c2b03c849ed4975ed9ed90dc \ +" + +DEPENDS = "libpcap" +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +PV = "1.1+git${SRCPV}" + +SRCREV = "5e43fa5ae27fbd2b89c320670a32143ce93e0e16" +SRC_URI = "git://github.com/AVnu/OpenAvnu.git;branch=master" + +# Fix QA issue of ldflags +SRC_URI_append = " file://0001-Fix-QA-issue-when-build-with-Yocto.patch" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}'" + +do_configure() { + oe_runmake daemons_all_clean +} + +do_compile() { + oe_runmake daemons_all +} + +do_install() { + install -d ${D}/${bindir} + install -m 755 daemons/maap/linux/build/maap_daemon ${D}/${bindir} + install -m 755 daemons/mrpd/mrpd daemons/mrpd/mrpctl ${D}/${bindir} + install -m 755 daemons/gptp/linux/build/obj/daemon_cl ${D}/${bindir} +} + +PACKAGES =+ " \ + ${PN}-gptp \ + ${PN}-mrpd \ + ${PN}-maap \ +" + +ALLOW_EMPTY_${PN} = "1" + +FILES_${PN}-gptp = " \ + ${bindir}/daemon_cl \ +" + +FILES_${PN}-mrpd = " \ + ${bindir}/mrpd \ + ${bindir}/mrpctl \ +" + +FILES_${PN}-maap = " \ + ${bindir}/maap_daemon \ +" + +RDEPENDS_${PN} = " \ + ${PN}-gptp \ + ${PN}-mrpd \ + ${PN}-maap \ +" + +RDEPENDS_${PN}-maap = " \ + libpcap \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb new file mode 100644 index 00000000..ae79153a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-gstreamer1.0-plugins.bb @@ -0,0 +1,87 @@ +SUMMARY = "GStreamer 1.0 package groups" +LICENSE = "MIT" + +require include/omx-control.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good" +DEPENDS += "gstreamer1.0-plugins-bad" +DEPENDS += "gstreamer1.0-plugins-ugly" +DEPENDS += "${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-omx", "", d)}" + +LIC_FILES_CHKSUM = " \ + file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ +" + +PR = "r0" + +inherit packagegroup + +PACKAGES = " \ + packagegroup-gstreamer1.0-plugins \ + packagegroup-gstreamer1.0-plugins-base \ + packagegroup-gstreamer1.0-plugins-audio \ + packagegroup-gstreamer1.0-plugins-video \ + ${@oe.utils.conditional("USE_OMX_COMMON", "1", "packagegroup-gstreamer1.0-omx", "", d)} \ + packagegroup-gstreamer1.0-plugins-debug \ +" + +RDEPENDS_packagegroup-gstreamer1.0-plugins = " \ + packagegroup-gstreamer1.0-plugins-base \ + packagegroup-gstreamer1.0-plugins-audio \ + packagegroup-gstreamer1.0-plugins-video \ + ${@oe.utils.conditional("USE_OMX_COMMON", "1", "packagegroup-gstreamer1.0-omx", "", d)} \ + packagegroup-gstreamer1.0-plugins-debug \ +" + +RDEPENDS_packagegroup-gstreamer1.0-plugins-base = " \ + gstreamer1.0-meta-base \ + gstreamer1.0-plugins-base-typefindfunctions \ + gstreamer1.0-plugins-good-id3demux \ + gstreamer1.0-plugins-good-autodetect \ + ${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-plugin-vspfilter", "", d)} \ +" + +RDEPENDS_packagegroup-gstreamer1.0-plugins-audio = " \ + gstreamer1.0-meta-audio \ + gstreamer1.0-plugins-good-audioparsers \ + gstreamer1.0-plugins-base-audiotestsrc \ + gstreamer1.0-plugins-base-audioconvert \ + gstreamer1.0-plugins-base-audioresample \ + gstreamer1.0-plugins-base-alsa \ + gstreamer1.0-plugins-base-ogg \ + gstreamer1.0-plugins-base-vorbis \ +" + +RDEPENDS_packagegroup-gstreamer1.0-plugins-video = " \ + gstreamer1.0-meta-video \ + gstreamer1.0-plugins-base-videotestsrc \ + gstreamer1.0-plugins-base-videoconvert \ + gstreamer1.0-plugins-base-playback \ + gstreamer1.0-plugins-base-videoscale \ + gstreamer1.0-plugins-base-videorate \ + gstreamer1.0-plugins-good-matroska \ + gstreamer1.0-plugins-good-isomp4 \ + gstreamer1.0-plugins-good-avi \ + gstreamer1.0-plugins-good-videofilter \ + gstreamer1.0-plugins-good-videomixer \ + gstreamer1.0-plugins-good-videocrop \ + gstreamer1.0-plugins-good-video4linux2 \ + gstreamer1.0-plugins-good-jpeg \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \ + 'gstreamer1.0-plugins-bad-waylandsink', '', d)} \ + gstreamer1.0-plugins-bad-videoparsersbad \ + gstreamer1.0-plugins-bad-mpegtsdemux \ + gstreamer1.0-plugins-bad-jpegformat \ + gstreamer1.0-plugins-ugly-asf \ + gstreamer1.0-libav \ +" + +RDEPENDS_packagegroup-gstreamer1.0-omx = " \ + ${@oe.utils.conditional("USE_OMX_COMMON", "1", "gstreamer1.0-omx", "", d)} \ +" + +RDEPENDS_packagegroup-gstreamer1.0-plugins-debug = " \ + gstreamer1.0-meta-debug \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb new file mode 100644 index 00000000..b62e11e8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-kernel.bb @@ -0,0 +1,33 @@ +SUMMARY = "Multimedia kernel modules package groups" +LICENSE = "GPLv2 & MIT" + +require include/omx-control.inc + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = "kernel-module-mmngr kernel-module-mmngrbuf \ + kernel-module-vspm kernel-module-vspmif \ + kernel-module-vsp2driver \ +" + +DEPENDS += '${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )}' + +PR = "r0" + +inherit packagegroup + +PACKAGES = " \ + packagegroup-multimedia-kernel-modules \ +" + +RDEPENDS_packagegroup-multimedia-kernel-modules = " \ + kernel-module-mmngr \ + kernel-module-mmngrbuf \ + kernel-module-vspm \ + kernel-module-vspmif \ + kernel-module-vsp2driver \ +" + +RDEPENDS_packagegroup-multimedia-kernel-modules += " \ + ${@oe.utils.conditional("USE_VIDEO_OMX", "1", "kernel-module-uvcs-drv", "", d )} \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb new file mode 100644 index 00000000..3c74e691 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/packagegroups/packagegroup-multimedia-libs.bb @@ -0,0 +1,22 @@ +SUMMARY = "Multimedia user libraries modules package groups" +LICENSE = "MIT" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = "mmngr-user-module mmngrbuf-user-module \ + vspmif-user-module libalacdla-l libflacdla-l \ +" + +PR = "r0" + +inherit packagegroup + +PACKAGES = " \ + packagegroup-multimedia-libs \ +" + +RDEPENDS_packagegroup-multimedia-libs = " \ + mmngr-user-module mmngrbuf-user-module \ + vspmif-user-module \ + libalacdla-l libflacdla-l \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb new file mode 100644 index 00000000..0070563c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-tp-user-module.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "VSP Manager Interface test app for R-Car Gen3" + +require vspmif.inc + +DEPENDS = "vspmif-user-module mmngr-user-module" +PN = "vspmif-tp-user-module" +PR = "r0" + +S = "${WORKDIR}/git" +VSPMIF_TP_DIR = "vspm_if-tp-user/files/vspm_if" + +# Get Wordsize of test app and change their names later to avoid override +WS_aarch64 = "" +WS_virtclass-multilib-lib32 = "32" + +do_compile() { + cd ${S}/${VSPMIF_TP_DIR} + make all +} + +do_install() { + # Create destination folder + install -d ${D}${RENESAS_DATADIR}/bin/ + + # Copy user test program + if [ X${WS} = "X32" ]; then + install -m 755 ${S}/${VSPMIF_TP_DIR}/vspm_tp ${D}${RENESAS_DATADIR}/bin/vspm_tp32 + install -m 755 ${S}/${VSPMIF_TP_DIR}/fdpm_tp ${D}${RENESAS_DATADIR}/bin/fdpm_tp32 + else + install -m 755 ${S}/${VSPMIF_TP_DIR}/vspm_tp ${D}${RENESAS_DATADIR}/bin/ + install -m 755 ${S}/${VSPMIF_TP_DIR}/fdpm_tp ${D}${RENESAS_DATADIR}/bin/ + fi +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dbg \ +" +FILES_${PN} = " \ + ${@oe.utils.conditional('WS', '32', '${RENESAS_DATADIR}/bin/vspm_tp32 ${RENESAS_DATADIR}/bin/fdpm_tp32', \ + '${RENESAS_DATADIR}/bin/vspm_tp ${RENESAS_DATADIR}/bin/fdpm_tp', d)}" + +FILES_${PN}-dbg = " \ + ${RENESAS_DATADIR}/bin/.debug/*" + +RPROVIDES_${PN} += "vspmif-tp-user-module" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb new file mode 100644 index 00000000..bf7fef63 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif-user-module.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "VSP Manager Interface library for R-Car Gen3" + +require vspmif.inc + +DEPENDS = "kernel-module-vspmif mmngr-user-module" +PN = "vspmif-user-module" +PR = "r0" + +S = "${WORKDIR}/git" +VSPMIF_LIB_DIR = "vspm_if-module/files/vspm_if" + +EXTRA_OEMAKE = "ARCH=${TARGET_ARCH}" + +includedir = "${RENESAS_DATADIR}/include" + +do_compile() { + export VSPM_LEGACY_IF="1" + + # Build shared library + cd ${S}/${VSPMIF_LIB_DIR}/if + rm -rf ${S}/${VSPMIF_LIB_DIR}/if/libvspm.so* + oe_runmake +} + +do_install() { + # Create destination folders + install -d ${D}/${libdir} + install -d ${D}/${includedir} + + # Copy shared library + install -m 755 ${S}/${VSPMIF_LIB_DIR}/if/libvspm.so* ${D}/${libdir}/ + cd ${D}/${libdir}/ + ln -sf libvspm.so.1.0.0 libvspm.so.1 + ln -sf libvspm.so.1 libvspm.so + + # Copy shared header files + install -m 644 ${S}/${VSPMIF_LIB_DIR}/include/vspm_public.h ${D}/${includedir}/ + install -m 644 ${S}/${VSPMIF_LIB_DIR}/include/fdpm_api.h ${D}/${includedir}/ +} + +PACKAGES = "\ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ +" + +RPROVIDES_${PN} += "vspmif-user-module" +INSANE_SKIP_${PN} += "libdir" +INSANE_SKIP_${PN}-dev += "libdir" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc new file mode 100644 index 00000000..34e8587e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-multimedia/vspmif-module/vspmif.inc @@ -0,0 +1,15 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://COPYING.MIT;md5=30a99e0d36a3da1f5cf93c070ad7888a \ +" + +require include/rcar-gen3-modules-common.inc + +VSPMIF_LIB_URL = "git://github.com/renesas-rcar/vspmif_lib.git" +BRANCH = "rcar_gen3" +SRCREV = "06fe8b1341801079f8a2b964ea95980967dcf789" + +SRC_URI = "${VSPMIF_LIB_URL};branch=${BRANCH}" + +# This module is machine specific. +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-rtlwifi/recipes-bsp/drivers/rtl8821cu.bb b/bsp/meta-rtlwifi/recipes-bsp/drivers/rtl8821cu.bb index 1aa4f3b4..fd34805c 100644 --- a/bsp/meta-rtlwifi/recipes-bsp/drivers/rtl8821cu.bb +++ b/bsp/meta-rtlwifi/recipes-bsp/drivers/rtl8821cu.bb @@ -1,14 +1,14 @@ SUMMARY = "RTL8821CU kernel driver (wifi)" DESCRIPTION = "RTL8821CU kernel driver" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://Kconfig;md5=bc2a2406eb72158dee196a8486a2aec9" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRCREV = "3d9d2401a8912fd96efdec3bf0c88a4e8bab2d76" +SRCREV = "2dace83e5f4cada52bbe3930b864c3eb82390b1f" SRC_URI = "git://github.com/spriteguard/rtl8821CU;protocol=https " S = "${WORKDIR}/git" -PV = "1.0-git" +PV = "5.8.1.2-git" DEPENDS = "virtual/kernel" diff --git a/bsp/meta-sancloud/.gitignore b/bsp/meta-sancloud/.gitignore new file mode 100644 index 00000000..397b289b --- /dev/null +++ b/bsp/meta-sancloud/.gitignore @@ -0,0 +1,2 @@ +/build +/layers diff --git a/bsp/meta-sancloud/.gitlab-ci.yml b/bsp/meta-sancloud/.gitlab-ci.yml new file mode 100644 index 00000000..99f53b28 --- /dev/null +++ b/bsp/meta-sancloud/.gitlab-ci.yml @@ -0,0 +1,49 @@ +stages: + - build + +.build: + stage: build + image: crops/poky + before_script: + - export PATH=~/.local/bin:$PATH + - wget https://bootstrap.pypa.io/get-pip.py + - python3 get-pip.py + - python3 -m pip install kas + - wget -q 'https://downloads.rclone.org/rclone-current-linux-amd64.zip' + - unzip -q rclone-current-linux-amd64.zip + - mv rclone-*-linux-amd64/rclone ~/.local/bin/ + - rm -rf rclone-*-linux-amd64* + after_script: + - rm -rf build + artifacts: + name: images + expose_as: images + expire_in: 3 days + paths: + - images + cache: + paths: + - layers + +bbe-poky: + extends: .build + script: + - ./scripts/ci-build.sh $CI_JOB_NAME core-image-base + - | + if [[ -n "$B2_KEY_ID" ]]; then + rclone config create b2 b2 account $B2_KEY_ID key $B2_APP_KEY > /dev/null + rclone copy --ignore-existing build/sstate-cache/ b2:sc-yocto/poky/sstate/ + rclone copy --ignore-existing build/tmp/deploy/sources/mirror/ b2:sc-yocto/mirror/ + fi + +bbe-arago: + extends: .build + image: registry.gitlab.com/sancloudltd/buildimg/gcc-arm-9.2:latest + script: + - ./scripts/ci-build.sh $CI_JOB_NAME tisdk-base-image tisdk-default-image + - | + if [[ -n "$B2_KEY_ID" ]]; then + rclone config create b2 b2 account $B2_KEY_ID key $B2_APP_KEY > /dev/null + rclone copy --ignore-existing build/sstate-cache/ b2:sc-yocto/arago/sstate/ + rclone copy --ignore-existing build/tmp/deploy/sources/mirror/ b2:sc-yocto/mirror/ + fi diff --git a/bsp/meta-sancloud/COPYING b/bsp/meta-sancloud/COPYING index d4bf6d69..4459f844 100644 --- a/bsp/meta-sancloud/COPYING +++ b/bsp/meta-sancloud/COPYING @@ -1,4 +1,4 @@ -Copyright (C) 2018-2019, Sancloud Ltd +Copyright (C) 2018-2020, Sancloud Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bsp/meta-sancloud/ChangeLog.md b/bsp/meta-sancloud/ChangeLog.md new file mode 100644 index 00000000..3c7b3cc9 --- /dev/null +++ b/bsp/meta-sancloud/ChangeLog.md @@ -0,0 +1,14 @@ +# ChangeLog for meta-sancloud + +## dunfell-r1 (2020-07-07) + +Initial release for the Yocto Project 3.1 "dunfell" release series. + +Component versions: + +* Linux v5.4.40-sc1 & v5.4.43-rt25-sc1 + * Including patches from TI 07.00.00.005 & 07.00.00.005-rt releases +* poky 3.1.1 +* meta-ti & meta-arago 07.00.00 +* Corresponding versions of meta-openembedded, meta-arm, meta-rtlwifi and + meta-qt5 diff --git a/bsp/meta-sancloud/README.md b/bsp/meta-sancloud/README.md index 4356460f..c0c080b0 100644 --- a/bsp/meta-sancloud/README.md +++ b/bsp/meta-sancloud/README.md @@ -1,14 +1,14 @@ -[](https://www.sancloud.co.uk/) - Yocto BSP layer for the SanCloud boards ======================================= Quick links ----------- +[](https://www.sancloud.co.uk/) + * [SanCloud website](https://www.sancloud.co.uk/) -* [BeagleBone Enhanced Description](https://www.sancloud.co.uk/?page_id=254) +* [BeagleBone Enhanced Description](https://www.sancloud.co.uk/beaglebone-enhanced-bbe) * [Sancloud repositories on GitHub](https://github.com/SanCloudLtd) @@ -21,19 +21,42 @@ Currently supported hardware with corresponding Yocto Project MACHINE names: * `bbe`: Sancloud BeagleBone Enhanced (BBE) -This BSP is layer is tested in two primary configurations: +This BSP is layer supports the following configurations: * Automotive Grade Linux (AGL) * Arago Distribution - -Additionally, this BSP layer should work with the distro-less configuration -included in openembedded-core as well as the Poky distribution. +* Poky Reference Distribution + +Getting started with Poky +------------------------- + +This BSP layer is listed in the +[OpenEmbedded Layer Index](http://layers.openembedded.org/) +which makes getting started very easy. Once your OpenEmbedded/Yocto Project +build environment is set up you can use the `bitbake-layers layerindex-fetch` +command to download this layer with all its dependencies and add these layers +to your bblayers.conf file automatically. + +If you do not have a Yocto Project build environment set up please first +follow the +[Yocto Project Quick Build Guide](https://www.yoctoproject.org/docs/3.1.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html) +to ensure that your Linux system has the correct packages installed and that +a simple build succeeds. Once you know that your Linux system is set up +correctly you can download the appropriate Yocto Project version and build an +image for the BBE using the following commands: + + git clone -b dunfell git://git.yoctoproject.org/poky + cd poky + source oe-init-build-env + bitbake-layers layerindex-fetch meta-sancloud + echo 'MACHINE = "bbe"' >> conf/local.conf + bitbake core-image-base Getting Started with AGL ------------------------ -This BSP layer is included in the most recent stable branch of AGL, code-named -Grumpy Guppy. AGL sources can be downloaded by following the +This BSP layer is included in recent releases of AGL. AGL sources can be +downloaded by following the [upstream instructions](https://wiki.automotivelinux.org/agl-distro/source-code). Once the AGL sources have been downloaded and you're in the top-level AGL directory, run the following commands to build the AGL Demo image for the @@ -42,12 +65,47 @@ Sancloud BBE: source meta-agl/scripts/aglsetup.sh -m bbe agl-demo agl-devel bitbake agl-demo-platform -Getting started with Arago --------------------------- +Getting started with Arago/Poky using kas +----------------------------------------- + +This BSP layer includes build configuration files for use with the +[kas build tool](https://github.com/siemens/kas). This tool can fetch all +layer dependencies (including bitbake) and set up a build directory with +appropriate configuration for the BBE and the chosen distro. It can be +installed by running `pip install kas` as long as you have a recent Python +version. + +### Poky + +To use kas to build the Poky distro for the BBE, run the following command in +the top directory of this repository: + + kas build kas/bbe-poky.yml + +### Arago + +To build the Arago distro for the BBE the appropriate ARM toolchain first +needs to be installed. This typically requires commands to be ran as root or +via sudo. For the dunfell branch, download +[gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz](https://bit.ly/arm-none-linux-gnueabihf-2019-12) +and unpack into /opt. This can be done at the command line using the +following commands: + + wget 'https://bit.ly/arm-none-linux-gnueabihf-2019-12' -O gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz + sudo tar xf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C /opt + +Once the toolchain is installed in the correct location, run the following +command in the top level of this repository: + + kas build kas/bbe-arago.yml + +### Customisation -A pre-integrated Arago Distribution repository is available at -https://github.com/SanCloudLtd/sancloud-arago. Please follow the instructions -in the README.md file in that repository to get started. +The build configuration files in the kas directory can be used as the basis of +further customisation and integration work. It's recommended to copy the build +configuration files into your own repository (adding a `url:` entry for the +meta-sancloud layer) and work there so that your changes can be tracked +separately from future BSP updates in this repository. Support ------- diff --git a/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc b/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc new file mode 100644 index 00000000..b608d15f --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-enable-archiver.inc @@ -0,0 +1,8 @@ +INHERIT += "archiver" +BB_GENERATE_MIRROR_TARBALLS = "1" +BB_GENERATE_SHALLOW_TARBALLS = "1" +BB_GIT_SHALLOW = "1" +ARCHIVER_MODE[src] = "mirror" +ARCHIVER_MODE[mirror] = "combined" +ARCHIVER_MIRROR_EXCLUDE = "file://" +COPYLEFT_LICENSE_INCLUDE = "*" diff --git a/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc b/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc new file mode 100644 index 00000000..4c08462c --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-mirrors.inc @@ -0,0 +1,14 @@ +PREMIRRORS ??= "\ +bzr://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +cvs://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +git://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +gitsm://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +hg://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +osc://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +p4://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +svn://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n" + +MIRRORS =+ "\ +ftp://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +http://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n \ +https://.*/.* https://cdn.sancloud.info/file/sc-yocto/mirror/ \n" diff --git a/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc b/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc new file mode 100644 index 00000000..21dcf593 --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-sstate-arago.inc @@ -0,0 +1,2 @@ +SSTATE_MIRRORS =+ "\ +file://.* https://cdn.sancloud.info/file/sc-yocto/arago/sstate/PATH \n" diff --git a/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc b/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc new file mode 100644 index 00000000..8f2c7d26 --- /dev/null +++ b/bsp/meta-sancloud/conf/include/sancloud-sstate-poky.inc @@ -0,0 +1,2 @@ +SSTATE_MIRRORS =+ "\ +file://.* https://cdn.sancloud.info/file/sc-yocto/poky/sstate/PATH \n" diff --git a/bsp/meta-sancloud/conf/layer.conf b/bsp/meta-sancloud/conf/layer.conf index 195a6e27..118b9d8c 100644 --- a/bsp/meta-sancloud/conf/layer.conf +++ b/bsp/meta-sancloud/conf/layer.conf @@ -9,9 +9,14 @@ BBFILE_COLLECTIONS += "meta-sancloud" BBFILE_PATTERN_meta-sancloud := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-sancloud = "9" -LAYERSERIES_COMPAT_meta-sancloud = "thud" +LAYERSERIES_COMPAT_meta-sancloud = "dunfell" LAYERDEPENDS_meta-sancloud = " \ core \ meta-ti \ rtlwifi \ " + +BBFILES_DYNAMIC += " \ + meta-arago-distro:${LAYERDIR}/dynamic-layers/meta-arago-distro/*/*/*.bbappend \ + meta-kernel:${LAYERDIR}/dynamic-layers/meta-kernel/*/*/*.bbappend \ + " diff --git a/bsp/meta-sancloud/conf/machine/bbe.conf b/bsp/meta-sancloud/conf/machine/bbe.conf index cc58b098..da9e1026 100644 --- a/bsp/meta-sancloud/conf/machine/bbe.conf +++ b/bsp/meta-sancloud/conf/machine/bbe.conf @@ -2,35 +2,47 @@ #@NAME: SanCloud BeagleBone Enhanced Development Board #@DESCRIPTION: Machine configuration for the BeagleBone Enhanced http://www.sancloud.co.uk/?page_id=254 Board +################################################################################ +# Basic machine config + MACHINEOVERRIDES =. "beaglebone:" + +IMAGE_FSTYPES += "wic.bmap" +WKS_FILE ?= "sancloud_bbe.wks" + require conf/machine/include/ti33x.inc +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "u-boot-script-bbe" + MACHINE_EXTRA_RDEPENDS += " \ kernel-modules linux-firmware-rtl8723 usbutils \ - iw crda rtl8723bu kernel-module-8723bu \ + iw wireless-regdb-static rtl8723bu kernel-module-8723bu \ " -ARAGO_IMAGE_EXTRA_INSTALL += "packagegroup-base" +SERIAL_CONSOLE = "115200 ttyS0" -EXTRA_IMAGEDEPENDS += "u-boot-bbe" +################################################################################ +# U-boot -IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap" -WKS_FILE ?= "sancloud_bbe.wks" -do_image_wic[depends] += "u-boot-bbe:do_build" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" -SERIAL_CONSOLE = "115200 ttyS0" +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" +UBOOT_MACHINE = "am335x_evm_config" + +EXTRA_IMAGEDEPENDS += "u-boot" -BBE_RT_KERNEL ??= "0" -PREFERRED_PROVIDER_virtual/kernel_bbe = '${@oe.utils.conditional("BBE_RT_KERNEL","1","linux-bbe-rt","linux-bbe",d)}' -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-bbe" -PREFERRED_PROVIDER_u-boot = "u-boot-bbe" +################################################################################ +# Kernel KERNEL_DEVICETREE = " \ am335x-sancloud-bbe.dtb \ - am335x-sancloud-bbei-wifi.dtb \ - am335x-sancloud-bbe-icu4.dtb \ " KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" -SPL_BINARY = "MLO" -UBOOT_SUFFIX = "img" -UBOOT_MACHINE = "am335x_evm_config" +BBE_KERNEL_PROVIDER ??= "ti" +require conf/machine/include/bbe-kernel-${BBE_KERNEL_PROVIDER}.inc + +################################################################################ +# Arago distro support + +ARAGO_IMAGE_EXTRA_INSTALL += "packagegroup-base" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc new file mode 100644 index 00000000..48e624d5 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-lts.inc @@ -0,0 +1,2 @@ +require conf/machine/include/bbe-kernel-stable.inc +PREFERRED_VERSION_linux-stable = "5.4%" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc new file mode 100644 index 00000000..983626e9 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-mainline.inc @@ -0,0 +1,3 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-mainline" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} multi_v7_defconfig" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc new file mode 100644 index 00000000..610e2ee2 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-stable.inc @@ -0,0 +1,7 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-stable" +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} multi_v7_defconfig" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc new file mode 100644 index 00000000..26876dd9 --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti-rt.inc @@ -0,0 +1,5 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-bbe-rt" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc new file mode 100644 index 00000000..49f3102a --- /dev/null +++ b/bsp/meta-sancloud/conf/machine/include/bbe-kernel-ti.inc @@ -0,0 +1,5 @@ +PREFERRED_PROVIDER_virtual/kernel_bbe = "linux-bbe" +KERNEL_DEVICETREE += " \ + am335x-sancloud-bbei-wifi.dtb \ + am335x-sancloud-bbe-icu4.dtb \ + " diff --git a/bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..286060de --- /dev/null +++ b/bsp/meta-sancloud/dynamic-layers/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,3 @@ +do_configure_append_bbe() { + sed -i '/\[core\]/a gbm-format=rgb565' ${WORKDIR}/weston.ini +} diff --git a/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch new file mode 100644 index 00000000..af489edb --- /dev/null +++ b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable/0001-arm-dts-Update-SanCloud-DTS-files.patch @@ -0,0 +1,609 @@ +From eee32ba116512ecb5297b5395c8a9e89dafabfe5 Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Sat, 23 May 2020 10:46:43 +0100 +Subject: [PATCH] arm: dts: Update SanCloud DTS files + +Signed-off-by: Paul Barker +--- + .../boot/dts/am335x-sancloud-bbe-common.dtsi | 128 +++++++++++ + .../arm/boot/dts/am335x-sancloud-bbe-icu4.dts | 198 ++++++++++++++++++ + arch/arm/boot/dts/am335x-sancloud-bbe.dts | 124 +---------- + .../boot/dts/am335x-sancloud-bbei-wifi.dts | 109 ++++++++++ + 4 files changed, 436 insertions(+), 123 deletions(-) + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts + create mode 100644 arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts + +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi b/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi +new file mode 100644 +index 000000000000..74092cfbd56c +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe-common.dtsi +@@ -0,0 +1,128 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++ ++#include ++ ++&am33xx_pinmux { ++ pinctrl-names = "default"; ++ ++ cpsw_default: cpsw_default { ++ pinctrl-single,pins = < ++ /* Slave 1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txen.rgmii1_tctl */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ ++ >; ++ }; ++ ++ cpsw_sleep: cpsw_sleep { ++ pinctrl-single,pins = < ++ /* Slave 1 reset value */ ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ >; ++ }; ++ ++ davinci_mdio_default: davinci_mdio_default { ++ pinctrl-single,pins = < ++ /* MDIO */ ++ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) ++ AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) ++ >; ++ }; ++ ++ davinci_mdio_sleep: davinci_mdio_sleep { ++ pinctrl-single,pins = < ++ /* MDIO reset value */ ++ AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) ++ >; ++ }; ++ ++ usb_hub_ctrl: usb_hub_ctrl { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7) /* rmii1_refclk.gpio0_29 */ ++ >; ++ }; ++ ++ mpu6050_pins: pinmux_mpu6050_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT, MUX_MODE7) /* uart0_ctsn.gpio1_8 */ ++ >; ++ }; ++ ++ lps3331ap_pins: pinmux_lps3331ap_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT, MUX_MODE7) /* gpmc_a10.gpio1_26 */ ++ >; ++ }; ++}; ++ ++&mac { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&cpsw_default>; ++ pinctrl-1 = <&cpsw_sleep>; ++ status = "okay"; ++}; ++ ++&davinci_mdio { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&davinci_mdio_default>; ++ pinctrl-1 = <&davinci_mdio_sleep>; ++ status = "okay"; ++ ++ ethphy0: ethernet-phy@0 { ++ reg = <0>; ++ }; ++}; ++ ++&cpsw_emac0 { ++ phy-handle = <ðphy0>; ++ phy-mode = "rgmii-id"; ++}; ++ ++&i2c0 { ++ lps331ap: barometer@5c { ++ compatible = "st,lps331ap-press"; ++ st,drdy-int-pin = <1>; ++ reg = <0x5c>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <26 IRQ_TYPE_EDGE_RISING>; ++ }; ++ ++ mpu6050: accelerometer@68 { ++ compatible = "invensense,mpu6050"; ++ reg = <0x68>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <2 IRQ_TYPE_EDGE_RISING>; ++ orientation = <0xff 0 0 0 1 0 0 0 0xff>; ++ }; ++ ++ usb2512b: usb-hub@2c { ++ compatible = "microchip,usb2512b"; ++ reg = <0x2c>; ++ reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; ++ /* wifi on port 4 */ ++ }; ++}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts b/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts +new file mode 100644 +index 000000000000..3de12eff6567 +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe-icu4.dts +@@ -0,0 +1,198 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++#include "am335x-boneblack-common.dtsi" ++#include "am335x-sancloud-bbe-common.dtsi" ++ ++/ { ++ model = "SanCloud BeagleBone Enhanced + ICU4 Automotive Cape"; ++ compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; ++}; ++ ++/ { ++ icu_leds { ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&user_leds_s1>; ++ pinctrl-1 = <&user_leds_s1_sleep>; ++ ++ compatible = "gpio-leds"; ++ ++ icu_led@2 { ++ label = "beaglebone:red:led1"; ++ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "mmc0"; ++ default-state = "off"; ++ }; ++ ++ icu_led@3 { ++ label = "beaglebone:green:led2"; ++ gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ default-state = "off"; ++ }; ++ ++ icu_led@1 { ++ label = "beaglebone:red:led3"; ++ gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ ++ icu_led@6 { ++ label = "beaglebone:green:led4"; ++ gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ ++ icu_led@5 { ++ label = "beaglebone:red:led5"; ++ gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; //"cpu0"; ++ default-state = "off"; ++ }; ++ ++ icu_led@4 { /*CANNOT USE ON V1*/ ++ label = "beaglebone:green:led6"; ++ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "none"; ++ default-state = "off"; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio_buttons_s0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* 17 -> 18 BBE SK7000*/ ++ switch1 { ++ label = "ignition"; ++ linux,code = <0x8f>; /*KEY_WAKEUP*/ ++ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; ++ gpio-key; ++ debounce-interval = <10>; ++ }; ++ ++ /* 18 -> 17 BBE SK7000*/ ++ switch2 { ++ label = "power_on"; ++ linux,code = <0x3b>; /*KEY_F1*/ ++ gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; ++ gpio-key; ++ debounce-interval = <10>; ++ }; ++ }; ++}; ++ ++&am33xx_pinmux { ++ pinctrl-0 = <&usb_hub_ctrl>; ++ ++ user_leds_default: user_leds_default { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a8.gpio1_24 */ ++ >; ++ }; ++ ++ user_leds_sleep: user_leds_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a6.gpio1_22 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a8.gpio1_24 */ ++ >; ++ }; ++ ++ dcan0_pins_s0: dcan0_pins_s0 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE2) /* d_can0_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE2) /* d_can0_tx, SLEWCTRL_FAST | OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ ++ dcan0_pins_s0_sleep: dcan0_pins_s0_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* d_can0_rx, SLEWCTRL_FAST | RECV_ENABLE | INPUT_PULLUP | MODE2 */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7) /* d_can0_tx, SLEWCTRL_FAST | OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ ++ user_leds_s1: user_leds_s1 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mcasp0_fsr.gpio3_19LED1*/ ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 LED2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a1.gpio1_17 LED3*/ ++ AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* eCAP0_in_PWM0_out.gpio0_7 LED4*/ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a0.gpio1_16 LED5*/ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* uart1_txd.gpio0_15 LED6*/ ++ >; ++ }; ++ ++ user_leds_s1_sleep: user_leds_s1_sleep { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_INPUT_PULLDOWN, MUX_MODE7) /* mcasp0_fsr.gpio3_19LED1*/ ++ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_INPUT_PULLDOWN, MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 LED2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A1, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a1.gpio1_17 LED3*/ ++ AM33XX_PADCONF(AM335X_PIN_ECAP0_IN_PWM0_OUT, PIN_INPUT_PULLDOWN, MUX_MODE7) /* eCAP0_in_PWM0_out.gpio0_7 LED4*/ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A0, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_a0.gpio1_16 LED5*/ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT_PULLDOWN, MUX_MODE7) /* uart1_txd.gpio0_15 LED6*/ ++ >; ++ }; ++ ++ gpio_buttons_s0: gpio_buttons_s0 { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLDOWN, MUX_MODE7) /*gpmc_ad11.gpio0_27 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /*gpmc_clk.gpio2_1 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /*gpmc_ben1.gpio1_28 */ ++ >; ++ }; ++ ++ i2c1_pins: pinmux_i2c1_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT, MUX_MODE2) /* i2c1_sca */ ++ AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT, MUX_MODE2) /* i2c1_scl */ ++ >; ++ }; ++}; ++ ++&dcan0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default", "sleep"; /* Apply default pinmuxing */ ++ pinctrl-0 = <&dcan0_pins_s0>; ++ pinctrl-1 = <&dcan0_pins_s0_sleep>; ++ status = "okay"; /* Switch on DCAN0 */ ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mpu6050_pins &lps3331ap_pins>; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ status = "okay"; ++ clock-frequency = <400000>; ++ ++ rtc@68 { ++ device_type = "rtc"; ++ reg = <0x68>; ++ compatible = "ds1337"; ++ }; ++}; ++ ++/* Prevent i2c2 working as we need it for DCAN0 interface */ ++&i2c2 { ++ status = "disabled"; ++}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbe.dts b/arch/arm/boot/dts/am335x-sancloud-bbe.dts +index e5fdb7abb0d5..640bc1cb7e86 100644 +--- a/arch/arm/boot/dts/am335x-sancloud-bbe.dts ++++ b/arch/arm/boot/dts/am335x-sancloud-bbe.dts +@@ -7,131 +7,9 @@ + #include "am33xx.dtsi" + #include "am335x-bone-common.dtsi" + #include "am335x-boneblack-common.dtsi" +-#include ++#include "am335x-sancloud-bbe-common.dtsi" + + / { + model = "SanCloud BeagleBone Enhanced"; + compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + }; +- +-&am33xx_pinmux { +- pinctrl-names = "default"; +- +- cpsw_default: cpsw_default { +- pinctrl-single,pins = < +- /* Slave 1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txen.rgmii1_tctl */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd3.rgmii1_td3 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd2.rgmii1_td2 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd1.rgmii1_td1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txd0.rgmii1_td0 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mii1_txclk.rgmii1_tclk */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */ +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */ +- >; +- }; +- +- cpsw_sleep: cpsw_sleep { +- pinctrl-single,pins = < +- /* Slave 1 reset value */ +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MII1_RXD0, PIN_INPUT_PULLDOWN, MUX_MODE7) +- >; +- }; +- +- davinci_mdio_default: davinci_mdio_default { +- pinctrl-single,pins = < +- /* MDIO */ +- AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0) +- AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0) +- >; +- }; +- +- davinci_mdio_sleep: davinci_mdio_sleep { +- pinctrl-single,pins = < +- /* MDIO reset value */ +- AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7) +- AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7) +- >; +- }; +- +- usb_hub_ctrl: usb_hub_ctrl { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7) /* rmii1_refclk.gpio0_29 */ +- >; +- }; +- +- mpu6050_pins: pinmux_mpu6050_pins { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT, MUX_MODE7) /* uart0_ctsn.gpio1_8 */ +- >; +- }; +- +- lps3331ap_pins: pinmux_lps3331ap_pins { +- pinctrl-single,pins = < +- AM33XX_PADCONF(AM335X_PIN_GPMC_A10, PIN_INPUT, MUX_MODE7) /* gpmc_a10.gpio1_26 */ +- >; +- }; +-}; +- +-&mac { +- pinctrl-names = "default", "sleep"; +- pinctrl-0 = <&cpsw_default>; +- pinctrl-1 = <&cpsw_sleep>; +- status = "okay"; +-}; +- +-&davinci_mdio { +- pinctrl-names = "default", "sleep"; +- pinctrl-0 = <&davinci_mdio_default>; +- pinctrl-1 = <&davinci_mdio_sleep>; +- status = "okay"; +- +- ethphy0: ethernet-phy@0 { +- reg = <0>; +- }; +-}; +- +-&cpsw_emac0 { +- phy-handle = <ðphy0>; +- phy-mode = "rgmii-id"; +-}; +- +-&i2c0 { +- lps331ap: barometer@5c { +- compatible = "st,lps331ap-press"; +- st,drdy-int-pin = <1>; +- reg = <0x5c>; +- interrupt-parent = <&gpio1>; +- interrupts = <26 IRQ_TYPE_EDGE_RISING>; +- }; +- +- mpu6050: accelerometer@68 { +- compatible = "invensense,mpu6050"; +- reg = <0x68>; +- interrupt-parent = <&gpio0>; +- interrupts = <2 IRQ_TYPE_EDGE_RISING>; +- orientation = <0xff 0 0 0 1 0 0 0 0xff>; +- }; +- +- usb2512b: usb-hub@2c { +- compatible = "microchip,usb2512b"; +- reg = <0x2c>; +- reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; +- /* wifi on port 4 */ +- }; +-}; +diff --git a/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts b/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts +new file mode 100644 +index 000000000000..813f025e0d6d +--- /dev/null ++++ b/arch/arm/boot/dts/am335x-sancloud-bbei-wifi.dts +@@ -0,0 +1,109 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2019 Sancloud Ltd ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ */ ++/dts-v1/; ++ ++#include "am33xx.dtsi" ++#include "am335x-bone-common.dtsi" ++#include "am335x-boneblack-common.dtsi" ++#include "am335x-sancloud-bbe-common.dtsi" ++ ++/ { ++ model = "SanCloud BeagleBone Enhanced Industrial WiFi"; ++ compatible = "sancloud,am335x-boneenhanced", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; ++ ++ wlan_en_reg: fixedregulator@2 { ++ compatible = "regulator-fixed"; ++ regulator-name = "wlan-en-regulator"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us= <100000>; ++ ++ /* RADIO_EN */ ++ gpio = <&gpio1 25 0>; ++ enable-active-high; ++ }; ++}; ++ ++&am33xx_pinmux { ++ mmc3_pins: pinmux_mmc3_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_GPMC_A9, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a9.gpio1_25: RADIO_EN */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_csn3.mmc2_cmd */ ++ AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_clk.mmc2_clk */ ++ >; ++ }; ++ ++ bluetooth_pins: pinmux_bluetooth_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_INPUT_PULLUP, MUX_MODE7) /* event_intr0.gpio0_19 */ ++ >; ++ }; ++ ++ uart1_pins: pinmux_uart1_pins { ++ pinctrl-single,pins = < ++ AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT, MUX_MODE0) /* uart1_rxd */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_INPUT, MUX_MODE0) /* uart1_txd */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE0) /* uart1_ctsn */ ++ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) /* uart1_rtsn */ ++ >; ++ }; ++ ++ nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { ++ pinctrl-single,pins = <>; ++ }; ++ ++ nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { ++ pinctrl-single,pins = <>; ++ }; ++}; ++ ++&tda19988 { ++ status = "disabled"; ++}; ++ ++&i2c2 { ++ status = "disabled"; ++}; ++ ++&mmc3 { ++ status = "okay"; ++ vmmc-supply = <&wlan_en_reg>; ++ bus-width = <4>; ++ non-removable; ++ cap-power-off-card; ++ ti,needs-special-hs-handling; ++ keep-power-in-suspend; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins>; ++ dmas = <&edma_xbar 12 0 1 ++ &edma_xbar 13 0 2>; ++ dma-names = "tx", "rx"; ++ clock-frequency = <50000000>; ++ max-frequency = <50000000>; ++}; ++ ++&uart1 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins &bluetooth_pins>; ++ ++ bluetooth { ++ status = "okay"; ++ compatible = "qcom,qca6174-bt"; ++ enable-gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; ++ clocks = <&l4ls_clkctrl AM3_L4LS_UART2_CLKCTRL 0>; ++ interrupt-parent = <&gpio0>; ++ interrupts = <19 IRQ_TYPE_EDGE_RISING>; ++ }; ++}; ++ ++&lcdc { ++ status = "disabled"; ++}; +-- +2.26.2 + diff --git a/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend new file mode 100644 index 00000000..72ad30be --- /dev/null +++ b/bsp/meta-sancloud/dynamic-layers/meta-kernel/recipes-kernel/linux/linux-stable_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-arm-dts-Update-SanCloud-DTS-files.patch" diff --git a/bsp/meta-sancloud/kas/bbe-arago.yml b/bsp/meta-sancloud/kas/bbe-arago.yml new file mode 100644 index 00000000..e1d87db0 --- /dev/null +++ b/bsp/meta-sancloud/kas/bbe-arago.yml @@ -0,0 +1,20 @@ +header: + version: 8 + includes: + - dev/bbe-arago.yml + +repos: + poky: + refspec: febbe2944c0c4a04b85fa98fdc261186115954d8 + meta-openembedded: + refspec: e413c1ef621688e69bb7830bb3151ed23b30b73e + meta-arm: + refspec: 0bd9c740267c0926e89bcfdb489790b7bf1fbd4b + meta-ti: + refspec: f2b2b2095f1a9d3ef705f7518d9db1e3141da2fb + meta-rtlwifi: + refspec: 91dd94630dad98389bfe4e15207e771754bde75c + meta-arago: + refspec: 41cfd83e13955178bffae84ebbe5a915b79181fd + meta-qt5: + refspec: fdd19517e17240b0b61765bd02fc483a1bde986f diff --git a/bsp/meta-sancloud/kas/bbe-poky.yml b/bsp/meta-sancloud/kas/bbe-poky.yml new file mode 100644 index 00000000..6a52bc40 --- /dev/null +++ b/bsp/meta-sancloud/kas/bbe-poky.yml @@ -0,0 +1,16 @@ +header: + version: 8 + includes: + - dev/bbe-poky.yml + +repos: + poky: + refspec: febbe2944c0c4a04b85fa98fdc261186115954d8 + meta-openembedded: + refspec: e413c1ef621688e69bb7830bb3151ed23b30b73e + meta-arm: + refspec: 0bd9c740267c0926e89bcfdb489790b7bf1fbd4b + meta-ti: + refspec: f2b2b2095f1a9d3ef705f7518d9db1e3141da2fb + meta-rtlwifi: + refspec: 91dd94630dad98389bfe4e15207e771754bde75c diff --git a/bsp/meta-sancloud/kas/dev/bbe-arago.yml b/bsp/meta-sancloud/kas/dev/bbe-arago.yml new file mode 100644 index 00000000..903035e4 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-arago.yml @@ -0,0 +1,42 @@ +header: + version: 8 + includes: + - bbe-poky.yml + +distro: arago +target: + - tisdk-default-image + - tisdk-base-image + +repos: + meta-arago: + url: http://arago-project.org/git/meta-arago.git + path: layers/meta-arago + refspec: dunfell + layers: + meta-arago-distro: + meta-arago-extras: + patches: + skip-packagegroup-sysvinit-boot: + repo: meta-sancloud + path: kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch + fix-do-create-srcipk: + repo: meta-sancloud + path: kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch + meta-qt5: + url: https://github.com/meta-qt5/meta-qt5.git + path: layers/meta-qt5 + refspec: dunfell + meta-openembedded: + layers: + meta-networking: + meta-arm: + layers: + meta-arm-toolchain: + +local_conf_header: + arago: | + PACKAGE_CLASSES = "package_ipk" + TCMODEAPPEND = "" + sstate: | + require conf/include/sancloud-sstate-arago.inc diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml new file mode 100644 index 00000000..51ced230 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-lts.yml @@ -0,0 +1,8 @@ +header: + version: 8 + includes: + - bbe-poky-kernel-stable.yml + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "lts" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml new file mode 100644 index 00000000..c39e2dfb --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-mainline.yml @@ -0,0 +1,8 @@ +header: + version: 8 + includes: + - bbe-poky-kernel-stable.yml + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "mainline" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml new file mode 100644 index 00000000..81b70a73 --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky-kernel-stable.yml @@ -0,0 +1,14 @@ +header: + version: 8 + includes: + - bbe-poky.yml + +repos: + meta-kernel: + url: https://gitlab.com/openembedded/community/meta-kernel.git + path: layers/meta-kernel + refspec: master + +local_conf_header: + linux_kernel: | + BBE_KERNEL_PROVIDER = "stable" diff --git a/bsp/meta-sancloud/kas/dev/bbe-poky.yml b/bsp/meta-sancloud/kas/dev/bbe-poky.yml new file mode 100644 index 00000000..0d8f7c5e --- /dev/null +++ b/bsp/meta-sancloud/kas/dev/bbe-poky.yml @@ -0,0 +1,68 @@ +header: + version: 8 + +machine: bbe +distro: poky +target: + - core-image-base + +repos: + meta-sancloud: + poky: + url: https://git.yoctoproject.org/git/poky + path: layers/poky + refspec: dunfell + layers: + meta: + meta-poky: + meta-openembedded: + url: https://github.com/openembedded/meta-openembedded.git + path: layers/meta-openembedded + refspec: dunfell + layers: + meta-oe: + meta-python: + meta-arm: + url: https://git.yoctoproject.org/git/meta-arm + path: layers/meta-arm + refspec: dunfell + layers: + meta-arm: + meta-ti: + url: https://git.yoctoproject.org/git/meta-ti + path: layers/meta-ti + refspec: dunfell + meta-rtlwifi: + url: https://github.com/EmbeddedAndroid/meta-rtlwifi.git + path: layers/meta-rtlwifi + refspec: master + +bblayers_conf_header: + base: | + POKY_BBLAYERS_CONF_VERSION = "2" + BBPATH = "${TOPDIR}" + BBFILES ?= "" + +local_conf_header: + base: | + PACKAGE_CLASSES ?= "package_rpm" + SDKMACHINE ?= "x86_64" + EXTRA_IMAGE_FEATURES ?= "debug-tweaks" + USER_CLASSES ?= "buildstats image-mklibs image-prelink" + PATCHRESOLVE = "noop" + BB_DISKMON_DIRS ?= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" + CONF_VERSION = "1" + TCLIBCAPPEND = "" + require conf/include/sancloud-mirrors.inc + sstate: | + require conf/include/sancloud-sstate-poky.inc + archiver: | + require conf/include/sancloud-enable-archiver.inc diff --git a/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch b/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch new file mode 100644 index 00000000..dce9abb7 --- /dev/null +++ b/bsp/meta-sancloud/kas/patches/meta-arago/0001-linux-copy-defconfig-Only-move-do_create_srcipk-task.patch @@ -0,0 +1,32 @@ +From aa5193801eb5052eba389f51deacbce7ec74c589 Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Sun, 21 Jun 2020 15:20:02 +0100 +Subject: [master/dunfell][PATCH] linux: copy-defconfig: Only move + do_create_srcipk task if it is defined +To: meta-arago@arago-project.org + +Signed-off-by: Paul Barker +--- + .../recipes-kernel/linux/copy-defconfig.inc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc b/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc +index 10ecf8ea..65b615cb 100644 +--- a/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc ++++ b/meta-arago-distro/recipes-kernel/linux/copy-defconfig.inc +@@ -17,6 +17,9 @@ do_configure_append() { + fi + } + +-# Move create_srcipk task so that the release defconfig is included. +-deltask do_create_srcipk +-addtask create_srcipk after do_configure before do_compile ++python __anonymous() { ++ # Move create_srcipk task so that the release defconfig is included. ++ if d.getVarFlag('do_create_srcipk', "task"): ++ bb.build.deltask('do_create_srcipk', d) ++ bb.build.addtask('do_create_srcipk', 'do_configure', 'do_compile', d) ++} +-- +2.27.0 + diff --git a/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch b/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch new file mode 100644 index 00000000..df66e945 --- /dev/null +++ b/bsp/meta-sancloud/kas/patches/meta-arago/0001-packagegroup-arago-sysvinit-boot-Skip-recipe-if-sysv.patch @@ -0,0 +1,35 @@ +From 39c79d5d514ff05fa749bda20d72af18f4b95e12 Mon Sep 17 00:00:00 2001 +From: Paul Barker +Date: Tue, 9 Jun 2020 11:22:06 +0100 +Subject: [master/dunfell][PATCH] packagegroup-arago-sysvinit-boot: Skip recipe + if sysvinit is not enabled +To: meta-arago@arago-project.org + +This change fixes the following error seen at parse time when the +meta-arago-distro layer is present but sysvinit is not in +DISTRO_FEATURES: + + ERROR: .../meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb: Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (sysvinit) matches the entries enabled in DISTRO_FEATURES + ERROR: Failed to parse recipe: .../meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb + +Signed-off-by: Paul Barker +--- + .../packagegroups/packagegroup-arago-sysvinit-boot.bb | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb +index 2eb2d777..a6e21745 100644 +--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb ++++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-sysvinit-boot.bb +@@ -1,3 +1,8 @@ ++python __anonymous() { ++ if not "sysvinit" in d.getVar("DISTRO_FEATURES").split(): ++ raise bb.parse.SkipRecipe("sysvinit is not enabled") ++} ++ + require recipes-core/packagegroups/packagegroup-core-boot.bb + + PR = "r0" +-- +2.26.2 + diff --git a/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf b/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf deleted file mode 100644 index a2537125..00000000 --- a/bsp/meta-sancloud/meta-sancloud-arago/conf/layer.conf +++ /dev/null @@ -1,17 +0,0 @@ -# We have a conf and classes directory, append to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have a recipes directory containing .bb and .bbappend files, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "meta-sancloud-arago" -BBFILE_PATTERN_meta-sancloud-arago := "^${LAYERDIR}/" -BBFILE_PRIORITY_meta-sancloud-arago = "9" - -LAYERSERIES_COMPAT_meta-sancloud-arago = "thud" -LAYERDEPENDS_meta-sancloud-arago = " \ - core \ - meta-ti \ - meta-sancloud \ - " diff --git a/bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend b/bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend deleted file mode 100644 index 286060de..00000000 --- a/bsp/meta-sancloud/meta-sancloud-arago/recipes-graphics/wayland/weston-conf_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -do_configure_append_bbe() { - sed -i '/\[core\]/a gbm-format=rgb565' ${WORKDIR}/weston.ini -} diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd b/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd new file mode 100644 index 00000000..4adec45b --- /dev/null +++ b/bsp/meta-sancloud/recipes-bsp/u-boot/files/boot.cmd @@ -0,0 +1,17 @@ +# Select MMC partition containing this script +setenv devtype mmc +setenv bootpart ${devnum}:${distro_bootpart} + +# Load kernel +run loadimage + +# Load devicetree +run findfdt +run loadfdt + +# Set kernel arguments +part uuid ${devtype} ${bootpart} uuid +setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait ${optargs} + +# Boot Linux +bootz ${loadaddr} - ${fdtaddr} diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb deleted file mode 100644 index 85c56a15..00000000 --- a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-bbe.bb +++ /dev/null @@ -1,16 +0,0 @@ -HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" -SECTION = "bootloaders" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" - -DEPENDS += "flex-native bison-native" - -require recipes-bsp/u-boot/u-boot.inc - -SRC_URI = "git://github.com/SanCloudLtd/u-boot.git;protocol=https;branch=uboot-bbe-2019.10" -SRCREV = "81a1432e5c4514cc3ca1fec78023afbee638c4f0" -PV = "2019.10+git${SRCPV}" - -S = "${WORKDIR}/git" - -PROVIDES += "u-boot" diff --git a/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb new file mode 100644 index 00000000..d97f0708 --- /dev/null +++ b/bsp/meta-sancloud/recipes-bsp/u-boot/u-boot-script-bbe.bb @@ -0,0 +1,20 @@ +SUMMARY = "U-boot script for the BBE" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "file://boot.cmd" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_compile() { + mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr +} + +do_install() { + install -d ${D}/boot + install -m 0644 boot.scr ${D}/boot +} + +FILES_${PN} = "/boot" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc deleted file mode 100644 index 2bf8992a..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19.inc +++ /dev/null @@ -1,24 +0,0 @@ -SECTION = "kernel" -DESCRIPTION = "Linux kernel for SanCloud BeagleBone devices" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -inherit kernel - -require recipes-kernel/linux/cmem.inc -require recipes-kernel/linux/ti-uio.inc - -# Look in the generic major.minor directory for files -FILESEXTRAPATHS_prepend = "${THISDIR}/linux-bbe-4.19:" - -SRC_URI = "git://github.com/SanCloudLtd/linux.git;protocol=https;branch=${BRANCH}" - -S = "${WORKDIR}/git" - -do_configure_append() { - oe_runmake -C ${S} O=${B} sancloud_bbe_defconfig -} - -# Pull in the devicetree files into the rootfs & add run-time dependency for PM -# firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-devicetree amx3-cm3" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi deleted file mode 100644 index 714b1d78..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/am335x-pru-uio.dtsi +++ /dev/null @@ -1,192 +0,0 @@ -&pruss_soc_bus { - uio_pruss_mdio: uio_pruss_mdio@32400 { - compatible = "ti,davinci_mdio"; - reg = <0x32400 0x90>; - clocks = <&dpll_core_m4_ck>; - clock-names = "fck"; - bus_freq = <1000000>; - #address-cells = <1>; - #size-cells = <0>; - status = "disabled"; - }; - - uio_pruss_mem: uio_pruss_mem { - compatible = "ti,uio-module-drv"; - mem = <0x4a300000 0x2000>, - <0x4a302000 0x2000>, - <0x4a310000 0x3000>, - <0x4a320000 0x2000>, - <0x4a326000 0x2000>, - <0x4a32e000 0x31c>, - <0x4a332000 0x58>; - mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", - "iep", "mii_rt"; - - status = "okay"; - }; - uio_pruss_mem2: uio_pruss_mem2 { - compatible = "ti,uio-module-drv"; - mem = <0x4a328000 0xd4>, - <0x4a330000 0x174>, - <0x4a332400 0x90>, - <0x40302000 0x0e000>; - mem-names = "uart", "ecap", "mdio", "ocmc"; - status = "okay"; - }; - - uio_pruss_evt0: uio_pruss_evt0 { - compatible = "ti,uio-module-drv"; - interrupts = <20>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt1: uio_pruss_evt1 { - compatible = "ti,uio-module-drv"; - interrupts = <21>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt2: uio_pruss_evt2 { - compatible = "ti,uio-module-drv"; - interrupts = <22>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt3: uio_pruss_evt3 { - compatible = "ti,uio-module-drv"; - interrupts = <23>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt4: uio_pruss_evt4 { - compatible = "ti,uio-module-drv"; - interrupts = <24>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt5: uio_pruss_evt5 { - compatible = "ti,uio-module-drv"; - interrupts = <25>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt6: uio_pruss_evt6 { - compatible = "ti,uio-module-drv"; - interrupts = <26>; - interrupt-mode = <1>; - status = "okay"; - }; - uio_pruss_evt7: uio_pruss_evt7 { - compatible = "ti,uio-module-drv"; - interrupts = <27>; - interrupt-mode = <1>; - status = "okay"; - }; - - uio_pruss_0_mem: uio_pruss_0_mem { - compatible = "ti,uio-module-drv"; - mem = <0x4a334000 0x2000>, - <0x4a322000 0x400>, - <0x4a322400 0x100>; - mem-names = "iram", "control", "debug"; - status = "okay"; - }; - - uio_pruss_1_mem: uio_pruss_1_mem { - compatible = "ti,uio-module-drv"; - mem = <0x4a338000 0x2000>, - <0x4a324000 0x400>, - <0x4a324400 0x100>; - mem-names = "iram", "control", "debug"; - status = "okay"; - }; -}; - -&am33xx_pinmux { - uio_pruss_mdio_eth_default: uio_pruss_mdio_eht_default { - pinctrl-single,pins = < - AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */ - AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */ - AM33XX_IOPAD(0x89c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* gpmc_ben0_cle.gpio2_5 */ - /* disable CPSW MDIO */ - AM33XX_IOPAD(0x948, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_data.gpio0_0 */ - AM33XX_IOPAD(0x94c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_clk.gpio0_1 */ - AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */ - AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */ - AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */ - AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */ - AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */ - AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */ - AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */ - AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */ - AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */ - AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */ - AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */ - AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */ - AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */ - AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */ - AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */ - - AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */ - AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */ - AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */ - AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */ - AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */ - AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */ - AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */ - AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */ - AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */ - AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */ - AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */ - AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */ - AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */ - AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */ - AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */ - AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */ - >; - }; -}; - -&uio_pruss_mdio { - pinctrl-0 = <&uio_pruss_mdio_eth_default>; - pinctrl-names = "default"; - reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; - reset-delay-us = <2>; /* PHY datasheet states 1uS min */ - status = "okay"; - - uio_pruss_eth0_phy: ethernet-phy@1 { - reg = <1>; - }; - - uio_pruss_eth1_phy: ethernet-phy@3 { - reg = <3>; - }; -}; - -&pruss { - status = "disabled"; -}; - -&pru0 { - status = "disabled"; -}; - -&pru1 { - status = "disabled"; -}; - -&pruss_intc { - status = "disabled"; -}; - -&pruss_mdio { - status = "disabled"; -}; - -&pruss_emac0 { - status = "disabled"; -}; - -&pruss_emac1 { - status = "disabled"; -}; diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi deleted file mode 100644 index 23119861..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-4.19/cmem.dtsi +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This is a placeholder for CMEM reserved memory declarations. This - * is simply an example and does not actually reserve any memory for - * CMEM. - * - * The commented sections below provide an example for how to provide - * a reserved memory region for CMEM to use as a buffer pool. - */ -/ { -/* - reserved-memory { - cmem_block_mem_0: cmem_block_mem@a0000000 { - reg = <0x0 0xa0000000 0x0 0x0a000000>; - no-map; - status = "okay"; - }; - }; -*/ - - cmem { - compatible = "ti,cmem"; - #address-cells = <1>; - #size-cells = <0>; - - #pool-size-cells = <2>; - - status = "disabled"; -/* - status = "okay"; - - cmem_block_0: cmem_block@0 { - reg = <0>; - memory-region = <&cmem_block_mem_0>; - cmem-buf-pools = <1 0x0 0x0a000000>; - }; -*/ - }; -}; diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc new file mode 100644 index 00000000..f12c1f44 --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4.inc @@ -0,0 +1,32 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for SanCloud BeagleBone devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +inherit kernel + +require recipes-kernel/linux/cmem.inc +require recipes-kernel/linux/ti-uio.inc + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS_prepend = "${THISDIR}/linux-bbe-5.4:" + +SRC_URI = "git://github.com/SanCloudLtd/linux.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +KERNEL_CONFIG_COMMAND = "oe_runmake -C ${S} CC="${KERNEL_CC}" LD="${KERNEL_LD}" O=${B} sancloud_bbe_defconfig" + +# Pull in the devicetree files into the rootfs & add run-time dependency for PM +# and prueth firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base += " \ + ${KERNEL_PACKAGE_NAME}-devicetree \ + amx3-cm3 \ + prueth-fw \ + " + +# Special configuration for remoteproc/rpmsg IPC modules +module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" +module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" +module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" +KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi new file mode 100644 index 00000000..93a40ab5 --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/am335x-pru-uio.dtsi @@ -0,0 +1,192 @@ +&pruss_soc_bus { + uio_pruss_mdio: uio_mdio@4a332400 { + compatible = "ti,davinci_mdio"; + reg = <0x4a332400 0x90>; + clocks = <&dpll_core_m4_ck>; + clock-names = "fck"; + bus_freq = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + uio_pruss_mem: uio_pruss_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a300000 0x2000>, + <0x4a302000 0x2000>, + <0x4a310000 0x3000>, + <0x4a320000 0x2000>, + <0x4a326000 0x2000>, + <0x4a32e000 0x31c>, + <0x4a332000 0x58>; + mem-names = "dram0", "dram1", "shrdram2", "intc", "cfg", + "iep", "mii_rt"; + + status = "okay"; + }; + uio_pruss_mem2: uio_pruss_mem2 { + compatible = "ti,uio-module-drv"; + mem = <0x4a328000 0xd4>, + <0x4a330000 0x174>, + <0x4a332400 0x90>, + <0x40302000 0x0e000>; + mem-names = "uart", "ecap", "mdio", "ocmc"; + status = "okay"; + }; + + uio_pruss_evt0: uio_pruss_evt0 { + compatible = "ti,uio-module-drv"; + interrupts = <20>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt1: uio_pruss_evt1 { + compatible = "ti,uio-module-drv"; + interrupts = <21>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt2: uio_pruss_evt2 { + compatible = "ti,uio-module-drv"; + interrupts = <22>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt3: uio_pruss_evt3 { + compatible = "ti,uio-module-drv"; + interrupts = <23>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt4: uio_pruss_evt4 { + compatible = "ti,uio-module-drv"; + interrupts = <24>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt5: uio_pruss_evt5 { + compatible = "ti,uio-module-drv"; + interrupts = <25>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt6: uio_pruss_evt6 { + compatible = "ti,uio-module-drv"; + interrupts = <26>; + interrupt-mode = <1>; + status = "okay"; + }; + uio_pruss_evt7: uio_pruss_evt7 { + compatible = "ti,uio-module-drv"; + interrupts = <27>; + interrupt-mode = <1>; + status = "okay"; + }; + + uio_pruss_0_mem: uio_pruss_0_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a334000 0x2000>, + <0x4a322000 0x400>, + <0x4a322400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; + + uio_pruss_1_mem: uio_pruss_1_mem { + compatible = "ti,uio-module-drv"; + mem = <0x4a338000 0x2000>, + <0x4a324000 0x400>, + <0x4a324400 0x100>; + mem-names = "iram", "control", "debug"; + status = "okay"; + }; +}; + +&am33xx_pinmux { + uio_pruss_mdio_eth_default: uio_pruss_mdio_eht_default { + pinctrl-single,pins = < + AM33XX_IOPAD(0x88c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_clk.pr1_mdio_mdclk */ + AM33XX_IOPAD(0x888, (PIN_INPUT | MUX_MODE5)) /* gpmc_csn3.pr1_mdio_data */ + AM33XX_IOPAD(0x89c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* gpmc_ben0_cle.gpio2_5 */ + /* disable CPSW MDIO */ + AM33XX_IOPAD(0x948, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_data.gpio0_0 */ + AM33XX_IOPAD(0x94c, (PIN_INPUT_PULLUP | MUX_MODE7)) /* mdio_clk.gpio0_1 */ + AM33XX_IOPAD(0x8a0, (PIN_INPUT | MUX_MODE2)) /* dss_data0.pr1_mii_mt0_clk */ + AM33XX_IOPAD(0x8b4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data5.pr1_mii0_txd0 */ + AM33XX_IOPAD(0x8b0, (PIN_OUTPUT | MUX_MODE2)) /* dss_data4.pr1_mii0_txd1 */ + AM33XX_IOPAD(0x8ac, (PIN_OUTPUT | MUX_MODE2)) /* dss_data3.pr1_mii0_txd2 */ + AM33XX_IOPAD(0x8a8, (PIN_OUTPUT | MUX_MODE2)) /* dss_data2.pr1_mii0_txd3 */ + AM33XX_IOPAD(0x8cc, (PIN_INPUT | MUX_MODE5)) /* dss_data11.pr1_mii0_rxd0 */ + AM33XX_IOPAD(0x8c8, (PIN_INPUT | MUX_MODE5)) /* dss_data10.pr1_mii0_rxd1 */ + AM33XX_IOPAD(0x8c4, (PIN_INPUT | MUX_MODE5)) /* dss_data9.pr1_mii0_rxd2 */ + AM33XX_IOPAD(0x8c0, (PIN_INPUT | MUX_MODE5)) /* dss_data8.pr1_mii0_rxd3 */ + AM33XX_IOPAD(0x8a4, (PIN_OUTPUT | MUX_MODE2)) /* dss_data1.pr1_mii0_txen */ + AM33XX_IOPAD(0x8d8, (PIN_INPUT | MUX_MODE5)) /* dss_data14.pr1_mii_mr0_clk */ + AM33XX_IOPAD(0x8dc, (PIN_INPUT | MUX_MODE5)) /* dss_data15.pr1_mii0_rxdv */ + AM33XX_IOPAD(0x8d4, (PIN_INPUT | MUX_MODE5)) /* dss_data13.pr1_mii0_rxer */ + AM33XX_IOPAD(0x8d0, (PIN_INPUT | MUX_MODE5)) /* dss_data12.pr1_mii0_rxlink */ + AM33XX_IOPAD(0x8e8, (PIN_INPUT | MUX_MODE2)) /* dss_pclk.pr1_mii0_crs */ + + AM33XX_IOPAD(0x840, (PIN_INPUT | MUX_MODE5)) /* gpmc_a0.pr1_mii_mt1_clk */ + AM33XX_IOPAD(0x850, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a4.pr1_mii1_txd0 */ + AM33XX_IOPAD(0x84c, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a3.pr1_mii1_txd1 */ + AM33XX_IOPAD(0x848, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a2.pr1_mii1_txd2 */ + AM33XX_IOPAD(0x844, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_a1.pr1_mii1_txd3 */ + AM33XX_IOPAD(0x860, (PIN_INPUT | MUX_MODE5)) /* gpmc_a8.pr1_mii1_rxd0 */ + AM33XX_IOPAD(0x85c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a7.pr1_mii1_rxd1 */ + AM33XX_IOPAD(0x858, (PIN_INPUT | MUX_MODE5)) /* gpmc_a6.pr1_mii1_rxd2 */ + AM33XX_IOPAD(0x854, (PIN_INPUT | MUX_MODE5)) /* gpmc_a5.pr1_mii1_rxd3 */ + AM33XX_IOPAD(0x874, (PIN_OUTPUT | MUX_MODE5)) /* gpmc_wpn.pr1_mii1_txen */ + AM33XX_IOPAD(0x864, (PIN_INPUT | MUX_MODE5)) /* gpmc_a9.pr1_mii_mr1_clk */ + AM33XX_IOPAD(0x868, (PIN_INPUT | MUX_MODE5)) /* gpmc_a10.pr1_mii1_rxdv */ + AM33XX_IOPAD(0x86c, (PIN_INPUT | MUX_MODE5)) /* gpmc_a11.pr1_mii1_rxer */ + AM33XX_IOPAD(0x878, (PIN_INPUT | MUX_MODE5)) /* gpmc_ben1.pr1_mii1_rxlink */ + AM33XX_IOPAD(0x8ec, (PIN_INPUT | MUX_MODE2)) /* lcd_ac_bias_en.pr1_mii1_crs */ + AM33XX_IOPAD(0x870, (PIN_INPUT | MUX_MODE5)) /* gpmc_wait0.pr1_mii1_col */ + >; + }; +}; + +&uio_pruss_mdio { + pinctrl-0 = <&uio_pruss_mdio_eth_default>; + pinctrl-names = "default"; + reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + reset-delay-us = <2>; /* PHY datasheet states 1uS min */ + status = "okay"; + + uio_pruss_eth0_phy: ethernet-phy@1 { + reg = <1>; + }; + + uio_pruss_eth1_phy: ethernet-phy@3 { + reg = <3>; + }; +}; + +&pruss { + status = "disabled"; +}; + +&pru0 { + status = "disabled"; +}; + +&pru1 { + status = "disabled"; +}; + +&pruss_intc { + status = "disabled"; +}; + +&pruss_mdio { + status = "disabled"; +}; + +&pruss_emac0 { + status = "disabled"; +}; + +&pruss_emac1 { + status = "disabled"; +}; diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi new file mode 100644 index 00000000..23119861 --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-5.4/cmem.dtsi @@ -0,0 +1,38 @@ +/* + * This is a placeholder for CMEM reserved memory declarations. This + * is simply an example and does not actually reserve any memory for + * CMEM. + * + * The commented sections below provide an example for how to provide + * a reserved memory region for CMEM to use as a buffer pool. + */ +/ { +/* + reserved-memory { + cmem_block_mem_0: cmem_block_mem@a0000000 { + reg = <0x0 0xa0000000 0x0 0x0a000000>; + no-map; + status = "okay"; + }; + }; +*/ + + cmem { + compatible = "ti,cmem"; + #address-cells = <1>; + #size-cells = <0>; + + #pool-size-cells = <2>; + + status = "disabled"; +/* + status = "okay"; + + cmem_block_0: cmem_block@0 { + reg = <0>; + memory-region = <&cmem_block_mem_0>; + cmem-buf-pools = <1 0x0 0x0a000000>; + }; +*/ + }; +}; diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb deleted file mode 100644 index cea5de6e..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_4.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -BRANCH = "linux-sancloud-rt-4.19.y" -SRCREV = "8cab3d65bea71044d2efbe2b30cfa6ca5c1cd1ad" -PV = "4.19.94+git${SRCPV}" - -require linux-bbe-4.19.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb new file mode 100644 index 00000000..5c8d41bf --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe-rt_5.4.bb @@ -0,0 +1,5 @@ +BRANCH = "linux-sancloud-rt-5.4.y" +SRCREV = "37c7505fe68ae6ade1af735eb4031f3d25f7491c" +PV = "5.4.43+git${SRCPV}" + +require linux-bbe-5.4.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb deleted file mode 100644 index 0aeabaef..00000000 --- a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_4.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -BRANCH = "linux-sancloud-4.19.y" -SRCREV = "1657cbc7b7cf883f629ce5c0b05761401cbbf292" -PV = "4.19.94+git${SRCPV}" - -require linux-bbe-4.19.inc diff --git a/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb new file mode 100644 index 00000000..34fb401b --- /dev/null +++ b/bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_5.4.bb @@ -0,0 +1,5 @@ +BRANCH = "linux-sancloud-5.4.y" +SRCREV = "aa7f8f7fec8744ade6af31fbb45ba807559ae47c" +PV = "5.4.40+git${SRCPV}" + +require linux-bbe-5.4.inc diff --git a/bsp/meta-sancloud/scripts/ci-build.sh b/bsp/meta-sancloud/scripts/ci-build.sh new file mode 100755 index 00000000..a94b5108 --- /dev/null +++ b/bsp/meta-sancloud/scripts/ci-build.sh @@ -0,0 +1,12 @@ +#! /bin/bash + +set -e + +CONF=$1 +shift 1 +IMAGES=$@ + +( kas shell kas/dev/${CONF}.yml -c "bitbake --setscene-only ${IMAGES}" || true ) | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' +kas shell kas/dev/${CONF}.yml -c "bitbake --skip-setscene ${IMAGES}" | sed -e '/^NOTE: .*Started$/d' -e '/^NOTE: Running /d' + +mv build/tmp/deploy/images . diff --git a/bsp/meta-sancloud/scripts/release-build.sh b/bsp/meta-sancloud/scripts/release-build.sh new file mode 100755 index 00000000..5ebfce31 --- /dev/null +++ b/bsp/meta-sancloud/scripts/release-build.sh @@ -0,0 +1,33 @@ +#! /bin/bash + +set -euo pipefail + +if [[ $# != 1 ]]; then + echo "ERROR: A single argument must be given to this script to specify the version" + exit 1 +fi + +VERSION=$1 + +mkdir -p release release/sources + +# Create layer tarball +git archive --prefix=meta-sancloud-${VERSION}/ -o release/meta-sancloud-${VERSION}.tar.gz ${VERSION} + +# Create pre-built images +kas build kas/bbe-poky.yml +mv build/tmp/deploy/images release/poky-images +mv build/tmp/deploy/sources/mirror/* release/sources/ +rm -rf build/tmp + +kas build kas/bbe-arago.yml +mv build/tmp/deploy/images release/arago-images +mv build/tmp/deploy/sources/mirror/* release/sources/ +rm -rf build/tmp + +# Automatically generate release notes from tag message +cat > release/ReleaseNotes.txt << EOF +Release Notes +============= +EOF +git tag -l --format='%(contents)' ${VERSION} | sed 1d >> release/ReleaseNotes.txt diff --git a/bsp/meta-sancloud/scripts/release-tag.sh b/bsp/meta-sancloud/scripts/release-tag.sh new file mode 100755 index 00000000..a44ed84b --- /dev/null +++ b/bsp/meta-sancloud/scripts/release-tag.sh @@ -0,0 +1,15 @@ +#! /bin/bash + +set -euo pipefail + +if [[ $# != 1 ]]; then + echo "ERROR: A single argument must be given to this script to specify the version" + exit 1 +fi + +VERSION=$1 + +echo "meta-sancloud ${VERSION}" > tag.txt +markdown-extract -fr "^${VERSION}" ChangeLog.md >> tag.txt +git tag -a -F tag.txt "${VERSION}" HEAD +rm -f tag.txt diff --git a/bsp/meta-synopsys/conf/layer.conf b/bsp/meta-synopsys/conf/layer.conf index 005bbf67..6d4e526c 100644 --- a/bsp/meta-synopsys/conf/layer.conf +++ b/bsp/meta-synopsys/conf/layer.conf @@ -11,7 +11,7 @@ BBFILE_PRIORITY_synopsys = "6" # This should only be incremented on significant changes that will # cause compatibility issues with other layers LAYERVERSION_synopsys = "1" -LAYERSERIES_COMPAT_synopsys-layer = "sumo thud" +LAYERSERIES_COMPAT_synopsys-layer = "zeus dunfell" LAYERDEPENDS_synopsys = "core" BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ diff --git a/bsp/meta-synopsys/conf/machine/hsdk.conf b/bsp/meta-synopsys/conf/machine/hsdk.conf index 18f020f3..d6b3bd5a 100644 --- a/bsp/meta-synopsys/conf/machine/hsdk.conf +++ b/bsp/meta-synopsys/conf/machine/hsdk.conf @@ -4,7 +4,7 @@ SERIAL_CONSOLES = "115200;ttyS0" KERNEL_IMAGETYPE = "uImage" -WKS_FILE ?= "hsdk-bootpart.wks" +WKS_FILE ?= "sdimage-hsdk.wks" IMAGE_FSTYPES += "wic" IMAGE_BOOT_FILES ?= "uImage uboot.env" IMAGE_INSTALL_append += " u-boot" diff --git a/bsp/meta-synopsys/conf/machine/include/arch-arc.inc b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc index 01831a46..0dce7128 100644 --- a/bsp/meta-synopsys/conf/machine/include/arch-arc.inc +++ b/bsp/meta-synopsys/conf/machine/include/arch-arc.inc @@ -4,7 +4,9 @@ TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'arceb', 'arc', MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " qemu-usermode" -PREFERRED_PROVIDER_virtual/kernel ?= "linux-arc" +# In order to use newer/custom Linux version change +# "linux-yocto" below to "linux-arc" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" # Otherwise huge binaries (>32MiB) might fail to link due to # limitation of 25-bit R_ARC_S25H_PCREL_PLT relocation diff --git a/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend b/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend deleted file mode 100644 index 59ef6dd7..00000000 --- a/bsp/meta-synopsys/recipes-core/expat/expat_2.2.6.bbappend +++ /dev/null @@ -1 +0,0 @@ -CFLAGS_append = " -O1" diff --git a/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch b/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch deleted file mode 100644 index 46f8de8e..00000000 --- a/bsp/meta-synopsys/recipes-core/glibc/files/0031-Add-ARC-architecture.patch +++ /dev/null @@ -1,8475 +0,0 @@ -glibc: Update to arc-2018.09-rc2 tag - -This was generated from Synopsys GitHub Glibc WIP fork [1] this way: ------------------>8----------------- -git diff glibc-2.28..arc-2018.09-rc2 ':!NEWS' ------------------>8----------------- - -[1] https://github.com/foss-for-synopsys-dwc-arc-processors/glibc - -Signed-off-by: Alexey Brodkin - -Upstream-Status: Pending ---- -diff --git a/elf/elf.h b/elf/elf.h -index 7e2b072a7f75..5b0b20d58934 100644 ---- a/elf/elf.h -+++ b/elf/elf.h -@@ -330,7 +330,7 @@ typedef struct - #define EM_CLOUDSHIELD 192 /* CloudShield */ - #define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */ - #define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */ --#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */ -+#define EM_ARCV2 195 /* Synopsys ARCv2 ISA */ - #define EM_OPEN8 196 /* Open8 RISC */ - #define EM_RL78 197 /* Renesas RL78 */ - #define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */ -@@ -3925,6 +3925,74 @@ enum - #define R_NDS32_TLS_TPOFF 102 - #define R_NDS32_TLS_DESC 119 - -+/* ARCompact/ARCv2 specific relocs */ -+#define R_ARC_NONE 0x0 -+#define R_ARC_8 0x1 -+#define R_ARC_16 0x2 -+#define R_ARC_24 0x3 -+#define R_ARC_32 0x4 -+#define R_ARC_B26 0x5 -+#define R_ARC_B22_PCREL 0x6 -+#define R_ARC_H30 0x7 -+#define R_ARC_N8 0x8 -+#define R_ARC_N16 0x9 -+#define R_ARC_N24 0xA -+#define R_ARC_N32 0xB -+#define R_ARC_SDA 0xC -+#define R_ARC_SECTOFF 0xD -+#define R_ARC_S21H_PCREL 0xE -+#define R_ARC_S21W_PCREL 0xF -+#define R_ARC_S25H_PCREL 0x10 -+#define R_ARC_S25W_PCREL 0x11 -+#define R_ARC_SDA32 0x12 -+#define R_ARC_SDA_LDST 0x13 -+#define R_ARC_SDA_LDST1 0x14 -+#define R_ARC_SDA_LDST2 0x15 -+#define R_ARC_SDA16_LD 0x16 -+#define R_ARC_SDA16_LD1 0x17 -+#define R_ARC_SDA16_LD2 0x18 -+#define R_ARC_S13_PCREL 0x19 -+#define R_ARC_W 0x1A -+#define R_ARC_32_ME 0x1B -+#define R_ARC_N32_ME 0x1C -+#define R_ARC_SECTOFF_ME 0x1D -+#define R_ARC_SDA32_ME 0x1E -+#define R_ARC_W_ME 0x1F -+#define R_ARC_H30_ME 0x20 -+#define R_ARC_SECTOFF_U8 0x21 -+#define R_ARC_SECTOFF_S9 0x22 -+#define R_AC_SECTOFF_U8 0x23 -+#define R_AC_SECTOFF_U8_1 0x24 -+#define R_AC_SECTOFF_U8_2 0x25 -+#define R_AC_SECTOFF_S9 0x26 -+#define R_AC_SECTOFF_S9_1 0x27 -+#define R_AC_SECTOFF_S9_2 0x28 -+#define R_ARC_SECTOFF_ME_1 0x29 -+#define R_ARC_SECTOFF_ME_2 0x2A -+#define R_ARC_SECTOFF_1 0x2B -+#define R_ARC_SECTOFF_2 0x2C -+#define R_ARC_PC32 0x32 -+#define R_ARC_GOTPC32 0x33 -+#define R_ARC_PLT32 0x34 -+#define R_ARC_COPY 0x35 -+#define R_ARC_GLOB_DAT 0x36 -+#define R_ARC_JUMP_SLOT 0x37 -+#define R_ARC_RELATIVE 0x38 -+#define R_ARC_GOTOFF 0x39 -+#define R_ARC_GOTPC 0x3A -+#define R_ARC_GOT32 0x3B -+ -+#define R_ARC_TLS_DTPMOD 0x42 -+#define R_ARC_TLS_DTPOFF 0x43 -+#define R_ARC_TLS_TPOFF 0x44 -+#define R_ARC_TLS_GD_GOT 0x45 -+#define R_ARC_TLS_GD_LD 0x46 -+#define R_ARC_TLS_GD_CALL 0x47 -+#define R_ARC_TLS_IE_GOT 0x48 -+#define R_ARC_TLS_DTPOFF_S9 0x4a -+#define R_ARC_TLS_LE_S9 0x4a -+#define R_ARC_TLS_LE_32 0x4b -+ - __END_DECLS - - #endif /* elf.h */ -diff --git a/posix/tst-getaddrinfo4.c b/posix/tst-getaddrinfo4.c -index dc9e423448af..0139dee777a1 100644 ---- a/posix/tst-getaddrinfo4.c -+++ b/posix/tst-getaddrinfo4.c -@@ -39,6 +39,7 @@ try (const char *service, int family, int flags) - case 0: - case EAI_AGAIN: - case EAI_NONAME: -+ case EAI_NODATA: - printf ("SUCCESS getaddrinfo(service=%s, family=%d, flags=%d): %s: %m\n", - service ?: "NULL", family, flags, gai_strerror (res)); - return 0; -diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py -index 8ef463f57ad6..07171a7ad7b7 100755 ---- a/scripts/build-many-glibcs.py -+++ b/scripts/build-many-glibcs.py -@@ -165,6 +165,9 @@ class Context(object): - 'cfg': ['--disable-multi-arch']}]) - self.add_config(arch='aarch64_be', - os_name='linux-gnu') -+ self.add_config(arch='arc', -+ os_name='linux-gnu', -+ gcc_cfg=['--disable-multilib', '--with-cpu=archs']) - self.add_config(arch='alpha', - os_name='linux-gnu') - self.add_config(arch='arm', -@@ -778,13 +781,13 @@ class Context(object): - git_branch = 'binutils-%s-branch' % version.translate(trans) - return self.git_checkout(component, git_url, git_branch, update) - elif component == 'gcc': -+ git_url = 'git://gcc.gnu.org/git/gcc.git' - if version == 'mainline': -- branch = 'trunk' -+ branch = 'master' - else: - trans = str.maketrans({'.': '_'}) -- branch = 'branches/gcc-%s-branch' % version.translate(trans) -- svn_url = 'svn://gcc.gnu.org/svn/gcc/%s' % branch -- return self.gcc_checkout(svn_url, update) -+ branch = 'gcc-%s-branch' % version.translate(trans) -+ return self.git_checkout(component, git_url, branch, update) - elif component == 'glibc': - git_url = 'git://sourceware.org/git/glibc.git' - if version == 'mainline': -@@ -1245,6 +1248,7 @@ class Config(object): - def install_linux_headers(self, cmdlist): - """Install Linux kernel headers.""" - arch_map = {'aarch64': 'arm64', -+ 'arc': 'arc', - 'alpha': 'alpha', - 'arm': 'arm', - 'hppa': 'parisc', -@@ -1640,11 +1644,11 @@ def get_parser(): - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('-j', dest='parallelism', - help='Run this number of jobs in parallel', -- type=int, default=os.cpu_count()) -+ type=int, default=1) - parser.add_argument('--keep', dest='keep', - help='Whether to keep all build directories, ' - 'none or only those from failed builds', -- default='none', choices=('none', 'all', 'failed')) -+ default='all', choices=('none', 'all', 'failed')) - parser.add_argument('--replace-sources', action='store_true', - help='Remove and replace source directories ' - 'with the wrong version of a component') -diff --git a/stdlib/longlong.h b/stdlib/longlong.h -index c7c6977c9fd6..fb982dd530c9 100644 ---- a/stdlib/longlong.h -+++ b/stdlib/longlong.h -@@ -197,17 +197,17 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); - : "=r" ((USItype) (sh)), \ - "=&r" ((USItype) (sl)) \ - : "%r" ((USItype) (ah)), \ -- "rIJ" ((USItype) (bh)), \ -+ "rICal" ((USItype) (bh)), \ - "%r" ((USItype) (al)), \ -- "rIJ" ((USItype) (bl))) -+ "rICal" ((USItype) (bl))) - #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \ - : "=r" ((USItype) (sh)), \ - "=&r" ((USItype) (sl)) \ - : "r" ((USItype) (ah)), \ -- "rIJ" ((USItype) (bh)), \ -+ "rICal" ((USItype) (bh)), \ - "r" ((USItype) (al)), \ -- "rIJ" ((USItype) (bl))) -+ "rICal" ((USItype) (bl))) - - #define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) - #ifdef __ARC_NORM__ -@@ -221,8 +221,8 @@ extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); - } \ - while (0) - #define COUNT_LEADING_ZEROS_0 32 --#endif --#endif -+#endif /* __ARC_NORM__ */ -+#endif /* __arc__ */ - - #if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \ - && W_TYPE_SIZE == 32 -@@ -858,42 +858,6 @@ extern UDItype __umulsidi3 (USItype, USItype); - #endif - #endif /* __mips__ */ - --#if defined (__ns32000__) && W_TYPE_SIZE == 32 --#define umul_ppmm(w1, w0, u, v) \ -- ({union {UDItype __ll; \ -- struct {USItype __l, __h;} __i; \ -- } __xx; \ -- __asm__ ("meid %2,%0" \ -- : "=g" (__xx.__ll) \ -- : "%0" ((USItype) (u)), \ -- "g" ((USItype) (v))); \ -- (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) --#define __umulsidi3(u, v) \ -- ({UDItype __w; \ -- __asm__ ("meid %2,%0" \ -- : "=g" (__w) \ -- : "%0" ((USItype) (u)), \ -- "g" ((USItype) (v))); \ -- __w; }) --#define udiv_qrnnd(q, r, n1, n0, d) \ -- ({union {UDItype __ll; \ -- struct {USItype __l, __h;} __i; \ -- } __xx; \ -- __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ -- __asm__ ("deid %2,%0" \ -- : "=g" (__xx.__ll) \ -- : "0" (__xx.__ll), \ -- "g" ((USItype) (d))); \ -- (r) = __xx.__i.__l; (q) = __xx.__i.__h; }) --#define count_trailing_zeros(count,x) \ -- do { \ -- __asm__ ("ffsd %2,%0" \ -- : "=r" ((USItype) (count)) \ -- : "0" ((USItype) 0), \ -- "r" ((USItype) (x))); \ -- } while (0) --#endif /* __ns32000__ */ -- - /* FIXME: We should test _IBMR2 here when we add assembly support for the - system vendor compilers. - FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good -@@ -1086,7 +1050,7 @@ extern UDItype __umulsidi3 (USItype, USItype); - } while (0) - #endif - --#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32 -+#if defined(__sh__) && W_TYPE_SIZE == 32 - #ifndef __sh1__ - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ( \ -@@ -1159,21 +1123,6 @@ extern UDItype __umulsidi3 (USItype, USItype); - - #endif /* __sh__ */ - --#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32 --#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) --#define count_leading_zeros(count, x) \ -- do \ -- { \ -- UDItype x_ = (USItype)(x); \ -- SItype c_; \ -- \ -- __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \ -- (count) = c_ - 31; \ -- } \ -- while (0) --#define COUNT_LEADING_ZEROS_0 32 --#endif -- - #if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \ - && W_TYPE_SIZE == 32 - #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -diff --git a/sysdeps/arc/Implies b/sysdeps/arc/Implies -new file mode 100644 -index 000000000000..7d69983412d8 ---- /dev/null -+++ b/sysdeps/arc/Implies -@@ -0,0 +1,4 @@ -+wordsize-32 -+ieee754/soft-fp -+ieee754/dbl-64 -+ieee754/flt-32 -diff --git a/sysdeps/arc/Makefile b/sysdeps/arc/Makefile -new file mode 100644 -index 000000000000..a88eda115b95 ---- /dev/null -+++ b/sysdeps/arc/Makefile -@@ -0,0 +1,25 @@ -+# ARC Makefile -+# Copyright (C) 1993-2018 Free Software Foundation, Inc. -+# This file is part of the GNU C Library. -+ -+# The GNU C Library is free software; you can redistribute it and/or -+# modify it under the terms of the GNU Lesser General Public -+# License as published by the Free Software Foundation; either -+# version 2.1 of the License, or (at your option) any later version. -+ -+# The GNU C Library is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# Lesser General Public License for more details. -+ -+# You should have received a copy of the GNU Lesser General Public -+# License along with the GNU C Library. If not, see -+# . -+ -+# We don't support long doubles as a distinct type. We don't need to set -+# this variable; it's here mostly for documentational purposes. -+long-double-fcts = no -+ -+ifeq ($(subdir),debug) -+CFLAGS-backtrace.c += -funwind-tables -+endif -diff --git a/sysdeps/arc/Versions b/sysdeps/arc/Versions -new file mode 100644 -index 000000000000..1041bccc1f1a ---- /dev/null -+++ b/sysdeps/arc/Versions -@@ -0,0 +1,14 @@ -+libc { -+ GLIBC_2.27 { -+ __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2; __extendsfdf2; -+ __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi; -+ __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi; -+ __floatdidf; __floatdisf; __floatsidf; __floatsisf; -+ __floatundidf; __floatundisf; __floatunsidf; __floatunsisf; -+ __gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2; __ltdf2; __ltsf2; -+ __muldf3; __mulsf3; __nedf2; __nesf2; __negdf2; __negsf2; -+ __subdf3; __subsf3; __truncdfsf2; __unorddf2; __unordsf2; -+ __syscall_error; -+ __mcount; -+ } -+} -diff --git a/sysdeps/arc/__longjmp.S b/sysdeps/arc/__longjmp.S -new file mode 100644 -index 000000000000..5ef271536bcc ---- /dev/null -+++ b/sysdeps/arc/__longjmp.S -@@ -0,0 +1,50 @@ -+/* longjmp for ARC. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public License as -+ published by the Free Software Foundation; either version 2.1 of the -+ License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+ -+;@ r0 = jump buffer from which regs will be restored -+;@ r1 = value that setjmp( ) will return due to this longjmp -+ -+ENTRY(__longjmp) -+ -+ ld_s r13, [r0] -+ ld_s r14, [r0,4] -+ ld r15, [r0,8] -+ ld r16, [r0,12] -+ ld r17, [r0,16] -+ ld r18, [r0,20] -+ ld r19, [r0,24] -+ ld r20, [r0,28] -+ ld r21, [r0,32] -+ ld r22, [r0,36] -+ ld r23, [r0,40] -+ ld r24, [r0,44] -+ ld r25, [r0,48] -+ -+ ld blink, [r0,60] -+ ld fp, [r0,52] -+ ld sp, [r0,56] -+ -+ mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place -+ -+ j.d [blink] ; to caller of setjmp location, right after the call -+ mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp -+ -+END(__longjmp) -diff --git a/sysdeps/arc/abort-instr.h b/sysdeps/arc/abort-instr.h -new file mode 100644 -index 000000000000..474098e9a819 ---- /dev/null -+++ b/sysdeps/arc/abort-instr.h -@@ -0,0 +1,2 @@ -+/* FLAG 1 is privilege mode only instruction, hence will crash any program */ -+#define ABORT_INSTRUCTION asm ("flag 1") -diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h -new file mode 100644 -index 000000000000..1a8d976794d0 ---- /dev/null -+++ b/sysdeps/arc/atomic-machine.h -@@ -0,0 +1,89 @@ -+/* Low-level functions for atomic operations. ARC version. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _ARC_BITS_ATOMIC_H -+#define _ARC_BITS_ATOMIC_H 1 -+ -+#include -+ -+typedef int32_t atomic32_t; -+typedef uint32_t uatomic32_t; -+typedef int_fast32_t atomic_fast32_t; -+typedef uint_fast32_t uatomic_fast32_t; -+ -+typedef intptr_t atomicptr_t; -+typedef uintptr_t uatomicptr_t; -+typedef intmax_t atomic_max_t; -+typedef uintmax_t uatomic_max_t; -+ -+#define __HAVE_64B_ATOMICS 0 -+#define USE_ATOMIC_COMPILER_BUILTINS 0 -+#define ATOMIC_EXCHANGE_USES_CAS 1 -+ -+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ -+ (abort (), (__typeof (*mem)) 0) -+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ -+ (abort (), (__typeof (*mem)) 0) -+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ -+ (abort (), (__typeof (*mem)) 0) -+ -+#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \ -+ (abort (), 0) -+#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ -+ (abort (), 0) -+#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \ -+ (abort (), 0) -+ -+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ -+ ({ \ -+ __typeof(*(mem)) prev; \ -+ \ -+ __asm__ __volatile__( \ -+ "1: llock %0, [%1] \n" \ -+ " brne %0, %2, 2f \n" \ -+ " scond %3, [%1] \n" \ -+ " bnz 1b \n" \ -+ "2: \n" \ -+ : "=&r"(prev) \ -+ : "r"(mem), "ir"(oldval), \ -+ "r"(newval) /* can't be "ir". scond can't take limm for "b" */\ -+ : "cc", "memory"); \ -+ \ -+ prev; \ -+ }) -+ -+# define atomic_exchange_acq(mem, newvalue) \ -+ ({ \ -+ __typeof(*(mem)) __val = (newvalue); \ -+ \ -+ __asm__ __volatile__( \ -+ "1: ex %0, [%1] \n" \ -+ : "+r"(__val) \ -+ : "r"(mem) \ -+ : "memory"); \ -+ \ -+ __val; \ -+ }) -+ -+#ifdef __ARC700__ -+#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); }) -+#else -+#define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); }) -+#endif -+ -+#endif /* _ARC_BITS_ATOMIC_H */ -diff --git a/sysdeps/arc/bits/endian.h b/sysdeps/arc/bits/endian.h -new file mode 100644 -index 000000000000..88fbcf39a58a ---- /dev/null -+++ b/sysdeps/arc/bits/endian.h -@@ -0,0 +1,12 @@ -+/* The ARC architecture has selectable endianness. */ -+ -+#ifndef _ENDIAN_H -+# error "Never use directly; include instead." -+#endif -+ -+#ifdef __BIG_ENDIAN__ -+# define __BYTE_ORDER __BIG_ENDIAN -+#endif -+#ifdef __LITTLE_ENDIAN__ -+# define __BYTE_ORDER __LITTLE_ENDIAN -+#endif -diff --git a/sysdeps/arc/bits/fenv.h b/sysdeps/arc/bits/fenv.h -new file mode 100644 -index 000000000000..df576e8dd5e3 ---- /dev/null -+++ b/sysdeps/arc/bits/fenv.h -@@ -0,0 +1,52 @@ -+/* Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _FENV_H -+# error "Never use directly; include instead." -+#endif -+ -+/* ARC hardware FPU does not support exceptions, -+ nor does the software floating-point support. */ -+#define FE_ALL_EXCEPT 0 -+ -+/* ARC supports only round-to-nearest. The software -+ floating-point support also acts this way. */ -+enum -+ { -+ __FE_UNDEFINED = 0, -+ -+ FE_TONEAREST = -+#define FE_TONEAREST 1 -+ FE_TONEAREST, -+ }; -+ -+/* Type representing exception flags. */ -+typedef unsigned int fexcept_t; -+ -+/* Type representing floating-point environment. */ -+typedef unsigned int fenv_t; -+ -+/* If the default argument is used we use this value. */ -+#define FE_DFL_ENV ((const fenv_t *) -1) -+ -+#if __GLIBC_USE (IEC_60559_BFP_EXT) -+/* Type representing floating-point control modes. */ -+typedef unsigned int femode_t; -+ -+/* Default floating-point control modes. */ -+# define FE_DFL_MODE ((const femode_t *) -1L) -+#endif -diff --git a/sysdeps/arc/bits/link.h b/sysdeps/arc/bits/link.h -new file mode 100644 -index 000000000000..1f4da2d9941c ---- /dev/null -+++ b/sysdeps/arc/bits/link.h -@@ -0,0 +1,52 @@ -+/* Machine-specific declarations for dynamic linker interface, ARC version. -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _LINK_H -+# error "Never include directly; use instead." -+#endif -+ -+/* Registers for entry into PLT on ARC. */ -+typedef struct La_arc_regs -+{ -+ uint32_t lr_reg[8]; /* r0 through r7 (upto 8 args) */ -+} La_arc_regs; -+ -+/* Return values for calls from PLT on ARC. */ -+typedef struct La_arc_retval -+{ -+ /* For ARCv2, a 64-bit integer return value can use 2 regs */ -+ uint32_t lrv_reg[2]; -+} La_arc_retval; -+ -+__BEGIN_DECLS -+ -+extern Elf32_Addr la_arc_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, -+ uintptr_t *__refcook, -+ uintptr_t *__defcook, -+ La_arc_regs *__regs, -+ unsigned int *__flags, -+ const char *__symname, -+ long int *__framesizep); -+extern unsigned int la_arc_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, -+ uintptr_t *__refcook, -+ uintptr_t *__defcook, -+ const La_arc_regs *__inregs, -+ La_arc_retval *__outregs, -+ const char *symname); -+ -+__END_DECLS -diff --git a/sysdeps/arc/bits/setjmp.h b/sysdeps/arc/bits/setjmp.h -new file mode 100644 -index 000000000000..3a014955ee5a ---- /dev/null -+++ b/sysdeps/arc/bits/setjmp.h -@@ -0,0 +1,33 @@ -+/* Define the machine-dependent type `jmp_buf'. ARC version. -+ Copyright (C) 1992-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _BITS_SETJMP_H -+#define _BITS_SETJMP_H 1 -+ -+#if !defined(_SETJMP_H) && !defined(_PTHREAD_H) -+# error "Never include directly; use instead." -+#endif -+ -+#ifndef __ASSEMBLER__ -+ -+/* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer), -+ * blink (branch-n-link) */ -+typedef int __jmp_buf[32]; -+#endif -+ -+#endif -diff --git a/sysdeps/arc/bsd-_setjmp.S b/sysdeps/arc/bsd-_setjmp.S -new file mode 100644 -index 000000000000..4e6a2da560c4 ---- /dev/null -+++ b/sysdeps/arc/bsd-_setjmp.S -@@ -0,0 +1 @@ -+/* _setjmp is in setjmp.S */ -diff --git a/sysdeps/arc/bsd-setjmp.S b/sysdeps/arc/bsd-setjmp.S -new file mode 100644 -index 000000000000..1da848d2f1ee ---- /dev/null -+++ b/sysdeps/arc/bsd-setjmp.S -@@ -0,0 +1 @@ -+/* setjmp is in setjmp.S */ -diff --git a/sysdeps/arc/configure b/sysdeps/arc/configure -new file mode 100644 -index 000000000000..2033957d0d9f ---- /dev/null -+++ b/sysdeps/arc/configure -@@ -0,0 +1,17 @@ -+# This file is generated from configure.ac by Autoconf. DO NOT EDIT! -+ # Local configure fragment for sysdeps/arc. -+ -+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h -+ -+libc_cv_have_sdata_section=no -+ -+# For ARC, historically ; was used for comments and not newline -+# Later # also got added to comment list, but ; couldn't be switched to -+# canonical newline as there's lots of code out there which will break -+libc_cv_asm_line_sep='`' -+cat >>confdefs.h <<_ACEOF -+#define ASM_LINE_SEP $libc_cv_asm_line_sep -+_ACEOF -+ -+ -+libc_cv_fpie=no -diff --git a/sysdeps/arc/configure.ac b/sysdeps/arc/configure.ac -new file mode 100644 -index 000000000000..91e58efb35c8 ---- /dev/null -+++ b/sysdeps/arc/configure.ac -@@ -0,0 +1,13 @@ -+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -+# Local configure fragment for sysdeps/arc. -+ -+AC_DEFINE(PI_STATIC_AND_HIDDEN) -+libc_cv_have_sdata_section=no -+ -+# For ARC, historically ; was used for comments and not newline -+# Later # also got added to comment list, but ; couldn't be switched to -+# canonical newline as there's lots of code out there which will break -+libc_cv_asm_line_sep='`' -+AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) -+ -+libc_cv_fpie=no -diff --git a/sysdeps/arc/crti.S b/sysdeps/arc/crti.S -new file mode 100644 -index 000000000000..ea741b30e3cf ---- /dev/null -+++ b/sysdeps/arc/crti.S -@@ -0,0 +1,79 @@ -+/* Special .init and .fini section support for ARC. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file with other -+ programs, and to distribute those programs without any restriction -+ coming from the use of this file. (The GNU Lesser General Public -+ License restrictions do apply in other respects; for example, they -+ cover modification of the file, and distribution when not linked -+ into another program.) -+ -+ Note that people who make modified versions of this file are not -+ obligated to grant this special exception for their modified -+ versions; it is their choice whether to do so. The GNU Lesser -+ General Public License gives permission to release a modified -+ version without this exception; this exception also makes it -+ possible to release a modified version which carries forward this -+ exception. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+ -+#ifndef PREINIT_FUNCTION -+# define PREINIT_FUNCTION __gmon_start__ -+#endif -+ -+#ifndef PREINIT_FUNCTION_WEAK -+# define PREINIT_FUNCTION_WEAK 1 -+#endif -+ -+#if PREINIT_FUNCTION_WEAK -+ weak_extern (PREINIT_FUNCTION) -+#else -+ .hidden PREINIT_FUNCTION -+#endif -+ -+ .section .init -+ .align 4 -+ .global _init -+ .hidden _init -+ .type _init,@function -+_init: -+ st.a blink, [sp,-4] -+ st.a fp, [sp,-4] -+ mov fp, sp -+#if PREINIT_FUNCTION_WEAK -+ ld r0, [pcl, @PREINIT_FUNCTION@gotpc] -+ tst r0, r0 -+ jlnz [r0] -+#else -+ bl PREINIT_FUNCTION -+#endif -+ -+ .section .fini -+ .align 4 -+ .global _fini -+ .hidden _fini -+ .type _fini,@function -+_fini: -+ st.a blink,[sp,-4] -+ st.a fp,[sp,-4] -+ mov fp,sp -+ .align 4 -diff --git a/sysdeps/arc/crtn.S b/sysdeps/arc/crtn.S -new file mode 100644 -index 000000000000..c6c58c5593c9 ---- /dev/null -+++ b/sysdeps/arc/crtn.S -@@ -0,0 +1,56 @@ -+/* Special .init and .fini section support for ARC. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file with other -+ programs, and to distribute those programs without any restriction -+ coming from the use of this file. (The GNU Lesser General Public -+ License restrictions do apply in other respects; for example, they -+ cover modification of the file, and distribution when not linked -+ into another program.) -+ -+ Note that people who make modified versions of this file are not -+ obligated to grant this special exception for their modified -+ versions; it is their choice whether to do so. The GNU Lesser -+ General Public License gives permission to release a modified -+ version without this exception; this exception also makes it -+ possible to release a modified version which carries forward this -+ exception. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+ .section .init -+ .align 4 -+ .global _init -+ .type _init,@function -+ ; EPILOGUE -+ ld.ab fp,[sp,4] -+ ld blink,[sp,0] -+ j.d [blink] -+ add sp,sp,4 -+; .size _init,.-_init -+ -+ .section .fini -+ .align 4 -+ .global _fini -+ .type _fini,@function -+ ; EPILOGUE -+ ld.ab fp,[sp,4] -+ ld blink,[sp,0] -+ j.d [blink] -+ add sp,sp,4 -+; .size _fini,.-_fini -diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h -new file mode 100644 -index 000000000000..f4757904084a ---- /dev/null -+++ b/sysdeps/arc/dl-machine.h -@@ -0,0 +1,339 @@ -+/* Machine-dependent ELF dynamic relocation inline functions. ARC version. -+ Copyright (C) 1995-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef dl_machine_h -+#define dl_machine_h -+ -+#define ELF_MACHINE_NAME "arc" -+ -+#include -+ -+#ifndef ENTRY_POINT -+#error ENTRY_POINT needs to be defined for ARC -+#endif -+ -+#include -+#include -+#include -+ -+/* -+ * Dynamic Linking ABI for ARCv2 ISA -+ * -+ * PLT -+ * -------------------------------- <---- DT_PLTGOT -+ * | ld r11, [pcl, off-to-GOT[1] | 0 -+ * | | 4 -+ * plt0 | ld r10, [pcl, off-to-GOT[2] | 8 -+ * | | 12 -+ * | j [r10] | 16 -+ * -------------------------------- -+ * | Base address of GOT | 20 -+ * -------------------------------- -+ * | ld r12, [pcl, off-to-GOT[3] | 24 -+ * plt1 | | -+ * | j.d [r12] | 32 -+ * | mov r12, pcl | 36 -+ * -------------------------------- -+ * | | 40 -+ * ~ ~ -+ * ~ ~ -+ * | | -+ * -------------------------------- -+ * -+ * .got -+ * -------------- -+ * | [0] | -+ * | ... | Runtime address for data symbols -+ * | [n] | -+ * -------------- -+ * -+ * .got.plt -+ * -------------- -+ * | [0] | Build address of .dynamic -+ * -------------- -+ * | [1] | Module info - setup by ld.so -+ * -------------- -+ * | [2] | resolver entry point -+ * -------------- -+ * | [3] | -+ * | ... | Runtime address for function symbols -+ * | [f] | -+ * -------------- -+ * -+ * For ARCompact, the PLT is 12 bytes due to short instructions -+ * -+ * -------------------------------- -+ * | ld r12, [pcl, off-to-GOT[3] | 24 (12 bytes each) -+ * plt1 | | -+ * | j_s.d [r12] | 32 -+ * | mov_s r12, pcl | 34 -+ * -------------------------------- -+ * | | 36 -+ * -+ */ -+ -+/* Return nonzero iff ELF header is compatible with the running host. */ -+static inline int -+elf_machine_matches_host (const Elf32_Ehdr *ehdr) -+{ -+ return (ehdr->e_machine == EM_ARCV2 /* ARC HS */ -+ || ehdr->e_machine == EM_ARC_COMPACT); /* ARC 700 */ -+} -+ -+/* -+ * Get build time address of .dynamic as setup in GOT[0] -+ * This is called very early in _dl_start() so it has not been relocated to -+ * runtime value -+ */ -+static inline Elf32_Addr -+elf_machine_dynamic (void) -+{ -+ extern const Elf32_Addr _GLOBAL_OFFSET_TABLE_[] attribute_hidden; -+ return _GLOBAL_OFFSET_TABLE_[0]; -+} -+ -+ -+/* Return the run-time load address of the shared object. */ -+static inline Elf32_Addr -+elf_machine_load_address (void) -+{ -+ Elf32_Addr build_addr, run_addr; -+ -+ /* For build address, below generates -+ * ld r0, [pcl, _GLOBAL_OFFSET_TABLE_@pcl] -+ */ -+ build_addr = elf_machine_dynamic(); -+ __asm__ ("add %0, pcl, _DYNAMIC@pcl \n" : "=r" (run_addr)); -+ -+ return run_addr - build_addr; -+} -+ -+/* Set up the loaded object described by L so its unrelocated PLT -+ entries will jump to the on-demand fixup code in dl-runtime.c. */ -+ -+static inline int __attribute__ ((always_inline)) -+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) -+{ -+ extern void _dl_runtime_resolve (Elf32_Word); -+ -+ if (l->l_info[DT_JMPREL] && lazy) -+ { -+ /* On ARC DT_PLTGOT point to .plt whose 5th word (after the PLT header) -+ * contains the address of .got */ -+ Elf32_Addr *plt_base = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]); -+ Elf32_Addr *got = (Elf32_Addr *) (plt_base[5] + l->l_addr); -+ -+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */ -+ -+ /* This function will get called to fix up the GOT entry indicated by -+ the offset on the stack, and then jump to the resolved address. */ -+ got[2] = (Elf32_Addr) &_dl_runtime_resolve; -+ } -+ -+ return lazy; -+} -+ -+/* What this code does: -+ -ldso starts execution here when kernel returns from execve() -+ -calls into generic ldso entry point _dl_start( ) -+ -optionally adjusts argc for executable if exec passed as cmd -+ -calls into app main with address of finaliser */ -+ -+#define RTLD_START asm ("\ -+.text \n\ -+.globl __start \n\ -+.type __start, @function \n\ -+__start: \n\ -+ ; (1). bootstrap ld.so \n\ -+ bl.d _dl_start \n\ -+ mov_s r0, sp ; pass ptr to aux vector tbl \n\ -+ mov r13, r0 ; safekeep app elf entry point \n\ -+ \n\ -+ ; (2). If ldso ran with executable as arg \n\ -+ ; skip the extra args calc by dl_start() \n\ -+ ld_s r1, [sp] ; orig argc \n\ -+ ld r12, [pcl, _dl_skip_args@pcl] \n\ -+ breq r12, 0, 1f \n\ -+ \n\ -+ add2 sp, sp, r12 ; discard argv entries from stack\n\ -+ sub_s r1, r1, r12 ; adjusted argc, on stack \n\ -+ st_s r1, [sp] \n\ -+ add r2, sp, 4 \n\ -+ ld r3, [pcl, _dl_argv@gotpc] ; ST doesn't support this addressing mode \n\ -+ st r2, [r3] \n\ -+1: \n\ -+ ; (3). call preinit stuff \n\ -+ ld r0, [pcl, _rtld_local@pcl] \n\ -+ add r2, sp, 4 ; argv \n\ -+ add2 r3, r2, r1 \n\ -+ add r3, r3, 4 ; env \n\ -+ bl _dl_init@plt \n\ -+ \n\ -+ ; (4) call app elf entry point \n\ -+ add r0, pcl, _dl_fini@pcl \n\ -+ j [r13] \n\ -+ \n\ -+ .size __start,.-__start \n\ -+ .previous \n\ -+"); -+ -+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so -+ PLT entries should not be allowed to define the value. -+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one -+ of the main executable's symbols, as for a COPY reloc. */ -+#define elf_machine_type_class(type) \ -+ ((((type) == R_ARC_JUMP_SLOT \ -+ || (type) == R_ARC_TLS_DTPMOD \ -+ || (type) == R_ARC_TLS_DTPOFF \ -+ || (type) == R_ARC_TLS_TPOFF) * ELF_RTYPE_CLASS_PLT) \ -+ | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY)) -+ -+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ -+#define ELF_MACHINE_JMP_SLOT R_ARC_JUMP_SLOT -+ -+/* ARC uses Elf32_Rela relocations. */ -+#define ELF_MACHINE_NO_REL 1 -+#define ELF_MACHINE_NO_RELA 0 -+ -+/* Fixup a PLT entry to bounce directly to the function at VALUE. */ -+ -+static inline Elf32_Addr -+elf_machine_fixup_plt (struct link_map *map, lookup_t t, -+ const ElfW(Sym) *refsym, const ElfW(Sym) *sym, -+ const Elf32_Rela *reloc, -+ Elf32_Addr *reloc_addr, Elf32_Addr value) -+{ -+ return *reloc_addr = value; -+} -+ -+/* Return the final value of a plt relocation. */ -+static inline Elf32_Addr -+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc, -+ Elf32_Addr value) -+{ -+ return value; -+} -+ -+/* Names of the architecture-specific auditing callback functions. */ -+#define ARCH_LA_PLTENTER arc_gnu_pltenter -+#define ARCH_LA_PLTEXIT arc_gnu_pltexit -+ -+#endif /* dl_machine_h */ -+ -+#ifdef RESOLVE_MAP -+ -+auto inline void __attribute__ ((always_inline)) -+elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, -+ const ElfW(Sym) *sym, const struct r_found_version *version, -+ void *const reloc_addr_arg, int skip_ifunc) -+{ -+ Elf32_Addr *const reloc_addr = reloc_addr_arg; -+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info); -+ -+ if (__glibc_unlikely (r_type == R_ARC_RELATIVE)) -+ *reloc_addr += map->l_addr; -+ else if (__glibc_unlikely (r_type == R_ARC_NONE)) -+ return; -+ else -+ { -+ const Elf32_Sym *const refsym = sym; -+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); -+ Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true); -+ -+ switch (r_type) -+ { -+ case R_ARC_COPY: -+ if (sym == NULL) -+ /* This can happen in trace mode if an object could not be -+ found. */ -+ break; -+ if (sym->st_size > refsym->st_size -+ || (sym->st_size < refsym->st_size && GLRO(dl_verbose))) -+ { -+ const char *strtab; -+ -+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); -+ _dl_error_printf ("\ -+%s: Symbol `%s' has different size in shared object, consider re-linking\n", -+ rtld_progname ?: "", -+ strtab + refsym->st_name); -+ } -+ memcpy (reloc_addr_arg, (void *) value, -+ MIN (sym->st_size, refsym->st_size)); -+ break; -+ case R_ARC_GLOB_DAT: -+ case R_ARC_JUMP_SLOT: -+ *reloc_addr = value; -+ break; -+ case R_ARC_TLS_DTPMOD: -+ /* Get the information from the link map returned by the -+ resolv function. */ -+ if (sym_map != NULL) -+ *reloc_addr = sym_map->l_tls_modid; -+ break; -+ -+ case R_ARC_TLS_DTPOFF: -+ if (sym != NULL) -+ { -+ *reloc_addr += sym->st_value; -+ } -+ break; -+ -+ case R_ARC_TLS_TPOFF: -+ if (sym != NULL) -+ { -+ CHECK_STATIC_TLS (map, sym_map); -+ *reloc_addr = sym_map->l_tls_offset + sym->st_value + reloc->r_addend; -+ } -+ break; -+ case R_ARC_32: -+ *reloc_addr += value + reloc->r_addend; -+ break; -+ -+ case R_ARC_PC32: -+ *reloc_addr += value + reloc->r_addend - (unsigned long) reloc_addr; -+ break; -+ -+ default: -+ _dl_reloc_bad_type (map, r_type, 0); -+ break; -+ } -+ } -+} -+ -+auto inline void __attribute__((always_inline)) -+elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, -+ void *const reloc_addr_arg) -+{ -+ Elf32_Addr *const reloc_addr = reloc_addr_arg; -+ *reloc_addr += l_addr; // + reloc->r_addend; -+} -+ -+auto inline void __attribute__((always_inline)) -+elf_machine_lazy_rel (struct link_map *map, -+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc, -+ int skip_ifunc) -+{ -+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); -+ if (ELF32_R_TYPE (reloc->r_info) == R_ARC_JUMP_SLOT) -+ *reloc_addr += l_addr; -+ else -+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1); -+} -+ -+#endif /* RESOLVE_MAP */ -diff --git a/sysdeps/arc/dl-runtime.c b/sysdeps/arc/dl-runtime.c -new file mode 100644 -index 000000000000..76d39fab5ab8 ---- /dev/null -+++ b/sysdeps/arc/dl-runtime.c -@@ -0,0 +1,21 @@ -+/* PLT jump into resolver passes PC of PLTn, while _dl_fixup expects the -+ address of corresponding .rela.plt entry */ -+ -+#ifdef __A7__ -+#define ARC_PLT_SIZE 12 -+#else -+#define ARC_PLT_SIZE 16 -+#endif -+ -+#define reloc_index \ -+({ \ -+ unsigned long plt0 = D_PTR (l, l_info[DT_PLTGOT]); \ -+ unsigned long pltn = reloc_arg; \ -+ /* exclude PL0 and PLT1 */ \ -+ unsigned long idx = (pltn - plt0)/ARC_PLT_SIZE - 2; \ -+ idx; \ -+}) -+ -+#define reloc_offset reloc_index * sizeof (PLTREL) -+ -+#include -diff --git a/sysdeps/arc/dl-sysdep.h b/sysdeps/arc/dl-sysdep.h -new file mode 100644 -index 000000000000..a3e734c1020c ---- /dev/null -+++ b/sysdeps/arc/dl-sysdep.h -@@ -0,0 +1,25 @@ -+/* System-specific settings for dynamic linker code. ARC version. -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include_next -+ -+/* _dl_argv cannot be attribute_relro, because _dl_start_user -+ might write into it after _dl_start returns. */ -+#define DL_ARGV_NOT_RELRO 1 -+ -+#define DL_EXTERN_PROTECTED_DATA -diff --git a/sysdeps/arc/dl-tls.h b/sysdeps/arc/dl-tls.h -new file mode 100644 -index 000000000000..42b5df9ca4da ---- /dev/null -+++ b/sysdeps/arc/dl-tls.h -@@ -0,0 +1,30 @@ -+/* Thread-local storage handling in the ELF dynamic linker. ARC version. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+ -+/* Type used for the representation of TLS information in the GOT. */ -+typedef struct -+{ -+ unsigned long int ti_module; -+ unsigned long int ti_offset; -+} tls_index; -+ -+extern void *__tls_get_addr (tls_index *ti); -+ -+/* Value used for dtv entries for which the allocation is delayed. */ -+#define TLS_DTV_UNALLOCATED ((void *) -1l) -diff --git a/sysdeps/arc/dl-trampoline.S b/sysdeps/arc/dl-trampoline.S -new file mode 100644 -index 000000000000..0fc9786ec1d3 ---- /dev/null -+++ b/sysdeps/arc/dl-trampoline.S -@@ -0,0 +1,81 @@ -+/* PLT trampolines. ARC version. -+ Copyright (C) 2005-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+ -+#include -+#include -+ -+; Save the registers which resolver could possibly clobber -+; r0-r9: args to the function - symbol being resolved -+; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved -+ -+.macro SAVE_CALLER_SAVED -+ push_s r0 -+ push_s r1 -+ push_s r2 -+ push_s r3 -+ st.a r4, [sp, -4] -+ st.a r5, [sp, -4] -+ st.a r6, [sp, -4] -+ st.a r7, [sp, -4] -+ st.a r8, [sp, -4] -+ st.a r9, [sp, -4] -+ cfi_adjust_cfa_offset (40) -+ push_s blink -+ cfi_adjust_cfa_offset (4) -+ cfi_rel_offset (blink, 0) -+.endm -+ -+.macro RESTORE_CALLER_SAVED_BUT_R0 -+ ld.ab blink,[sp, 4] -+ cfi_adjust_cfa_offset (-4) -+ cfi_restore (blink) -+ ld.ab r9, [sp, 4] -+ ld.ab r8, [sp, 4] -+ ld.ab r7, [sp, 4] -+ ld.ab r6, [sp, 4] -+ ld.ab r5, [sp, 4] -+ ld.ab r4, [sp, 4] -+ pop_s r3 -+ pop_s r2 -+ pop_s r1 -+ cfi_adjust_cfa_offset (-36) -+.endm -+ -+; Upon entry, PLTn, which led us here, sets up the following regs -+; r11 = Module info (tpnt pointer as expected by resolver) -+; r12 = PC of the PLTn itself - needed by resolver to find -+; corresponding .rela.plt entry -+ -+ENTRY(_dl_runtime_resolve) -+ ; args to func being resolved, which resolver might clobber -+ SAVE_CALLER_SAVED -+ -+ mov_s r1, r12 -+ bl.d _dl_fixup -+ mov r0, r11 -+ -+ RESTORE_CALLER_SAVED_BUT_R0 -+ j_s.d [r0] ; r0 has resolved function addr -+ pop_s r0 ; restore first arg to resolved call -+ cfi_adjust_cfa_offset (-4) -+ cfi_restore (r0) -+ -+END(_dl_runtime_resolve) -diff --git a/sysdeps/arc/entry.h b/sysdeps/arc/entry.h -new file mode 100644 -index 000000000000..adb01d981afd ---- /dev/null -+++ b/sysdeps/arc/entry.h -@@ -0,0 +1,5 @@ -+#ifndef __ASSEMBLY__ -+extern void __start (void) attribute_hidden; -+#endif -+ -+#define ENTRY_POINT __start -diff --git a/sysdeps/arc/gccframe.h b/sysdeps/arc/gccframe.h -new file mode 100644 -index 000000000000..54a1225284b6 ---- /dev/null -+++ b/sysdeps/arc/gccframe.h -@@ -0,0 +1,21 @@ -+/* Definition of object in frame unwind info. ARC version. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#define FIRST_PSEUDO_REGISTER 40 -+ -+#include -diff --git a/sysdeps/arc/gmp-mparam.h b/sysdeps/arc/gmp-mparam.h -new file mode 100644 -index 000000000000..2b09517766e3 ---- /dev/null -+++ b/sysdeps/arc/gmp-mparam.h -@@ -0,0 +1,23 @@ -+/* gmp-mparam.h -- Compiler/machine parameter header file. -+ -+Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ -+This file is part of the GNU MP Library. -+ -+The GNU MP Library is free software; you can redistribute it and/or modify -+it under the terms of the GNU Lesser General Public License as published by -+the Free Software Foundation; either version 2.1 of the License, or (at your -+option) any later version. -+ -+The GNU MP Library is distributed in the hope that it will be useful, but -+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -+License for more details. -+ -+You should have received a copy of the GNU Lesser General Public License -+along with the GNU MP Library; see the file COPYING.LIB. If not, see -+. */ -+ -+#include -+ -+#define IEEE_DOUBLE_BIG_ENDIAN 0 -diff --git a/sysdeps/arc/jmpbuf-offsets.h b/sysdeps/arc/jmpbuf-offsets.h -new file mode 100644 -index 000000000000..c9cf4bc2e355 ---- /dev/null -+++ b/sysdeps/arc/jmpbuf-offsets.h -@@ -0,0 +1,46 @@ -+/* Private macros for accessing __jmp_buf contents. ARC version. -+ Copyright (C) 2006-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+/* Save offsets within __jmp_buf. */ -+/* We don't use most of these symbols; they are here for documentation. */ -+ -+/* Callee Regs */ -+#define JB_R13 0 -+#define JB_R14 1 -+#define JB_R15 2 -+#define JB_R16 3 -+#define JB_R17 4 -+#define JB_R18 5 -+#define JB_R19 6 -+#define JB_R20 7 -+#define JB_R21 8 -+#define JB_R22 9 -+#define JB_R23 10 -+#define JB_R24 11 -+#define JB_R25 12 -+ -+/* Frame Pointer, Stack Pointer, Branch-n-link */ -+#define JB_FP 13 -+#define JB_SP 14 -+#define JB_BLINK 15 -+ -+/* We save space for some extra state to accommodate future changes. */ -+#define JB_NUM 32 /* words */ -+ -+/* Helper for generic ____longjmp_chk(). */ -+#define JB_FRAME_ADDRESS(buf) ((void *) (unsigned long) (buf[JB_SP])) -diff --git a/sysdeps/arc/jmpbuf-unwind.h b/sysdeps/arc/jmpbuf-unwind.h -new file mode 100644 -index 000000000000..d87ac13b3416 ---- /dev/null -+++ b/sysdeps/arc/jmpbuf-unwind.h -@@ -0,0 +1,47 @@ -+/* Examine __jmp_buf for unwinding frames. ARC version. -+ Copyright (C) 2005-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+#include -+#include -+ -+/* Test if longjmp to JMPBUF would unwind the frame -+ containing a local variable at ADDRESS. */ -+ -+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \ -+ ((void *) (address) < (void *) demangle (jmpbuf[JB_SP])) -+ -+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \ -+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj) -+ -+static inline uintptr_t __attribute__ ((unused)) -+_jmpbuf_sp (__jmp_buf jmpbuf) -+{ -+ uintptr_t sp = jmpbuf[JB_SP]; -+#ifdef PTR_DEMANGLE -+ PTR_DEMANGLE (sp); -+#endif -+ return sp; -+} -+ -+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ -+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf_sp (_jmpbuf) - (_adj))) -+ -+/* We use the normal longjmp for unwinding. */ -+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) -diff --git a/sysdeps/arc/ldsodefs.h b/sysdeps/arc/ldsodefs.h -new file mode 100644 -index 000000000000..3fafc683da2e ---- /dev/null -+++ b/sysdeps/arc/ldsodefs.h -@@ -0,0 +1,43 @@ -+/* Run-time dynamic linker data structures for loaded ELF shared objects. -+ Copyright (C) 2000-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _ARC_LDSODEFS_H -+#define _ARC_LDSODEFS_H 1 -+ -+#include -+ -+struct La_arc_regs; -+struct La_arc_retval; -+ -+#define ARCH_PLTENTER_MEMBERS \ -+ ElfW(Addr) (*arc_gnu_pltenter) (ElfW(Sym) *, unsigned int, \ -+ uintptr_t *, uintptr_t *, \ -+ const struct La_arc_regs *, \ -+ unsigned int *, const char *, \ -+ long int *); -+ -+#define ARCH_PLTEXIT_MEMBERS \ -+ unsigned int (*arc_gnu_pltexit) (ElfW(Sym) *, unsigned int, \ -+ uintptr_t *, uintptr_t *, \ -+ const struct La_arc_regs *, \ -+ struct La_arc_retval *, \ -+ const char *); -+ -+#include_next -+ -+#endif -diff --git a/sysdeps/arc/libc-tls.c b/sysdeps/arc/libc-tls.c -new file mode 100644 -index 000000000000..c6c865daac3e ---- /dev/null -+++ b/sysdeps/arc/libc-tls.c -@@ -0,0 +1,27 @@ -+/* Thread-local storage handling in the ELF dynamic linker. ARC version. -+ Copyright (C) 2005-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+ -+void * -+__tls_get_addr (tls_index *ti) -+{ -+ dtv_t *dtv = THREAD_DTV (); -+ return (char *) dtv[1].pointer.val + ti->ti_offset; -+} -diff --git a/sysdeps/arc/libm-test-ulps b/sysdeps/arc/libm-test-ulps -new file mode 100644 -index 000000000000..0e8ef313fa94 ---- /dev/null -+++ b/sysdeps/arc/libm-test-ulps -@@ -0,0 +1,390 @@ -+# Begin of automatic generation -+ -+# Maximal error of functions: -+Function: "acos": -+float: 1 -+ifloat: 1 -+ -+Function: "acosh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "asin": -+float: 1 -+ifloat: 1 -+ -+Function: "asinh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "atan": -+float: 1 -+ifloat: 1 -+ -+Function: "atan2": -+float: 1 -+ifloat: 1 -+ -+Function: "atanh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "cabs": -+double: 1 -+idouble: 1 -+ -+Function: Real part of "cacos": -+double: 1 -+float: 2 -+idouble: 1 -+ifloat: 2 -+ -+Function: Imaginary part of "cacos": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Real part of "cacosh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Imaginary part of "cacosh": -+double: 1 -+float: 2 -+idouble: 1 -+ifloat: 2 -+ -+Function: "carg": -+float: 1 -+ifloat: 1 -+ -+Function: Real part of "casin": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "casin": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Real part of "casinh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Imaginary part of "casinh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "catan": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "catan": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "catanh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "catanh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "cbrt": -+double: 3 -+float: 1 -+idouble: 3 -+ifloat: 1 -+ -+Function: Real part of "ccos": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "ccos": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "ccosh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "ccosh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "cexp": -+double: 2 -+float: 1 -+idouble: 2 -+ifloat: 1 -+ -+Function: Imaginary part of "cexp": -+double: 1 -+float: 2 -+idouble: 1 -+ifloat: 2 -+ -+Function: Real part of "clog": -+double: 3 -+float: 3 -+idouble: 3 -+ifloat: 3 -+ -+Function: Imaginary part of "clog": -+float: 1 -+ifloat: 1 -+ -+Function: Real part of "clog10": -+double: 3 -+float: 4 -+idouble: 3 -+ifloat: 4 -+ -+Function: Imaginary part of "clog10": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "cos": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "cosh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "cpow": -+double: 2 -+float: 5 -+idouble: 2 -+ifloat: 5 -+ -+Function: Imaginary part of "cpow": -+float: 2 -+ifloat: 2 -+ -+Function: Real part of "csin": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "csinh": -+float: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "csinh": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Real part of "csqrt": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Imaginary part of "csqrt": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Real part of "ctan": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: Imaginary part of "ctan": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Real part of "ctanh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: Imaginary part of "ctanh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "erf": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "erfc": -+double: 3 -+float: 2 -+idouble: 3 -+ifloat: 2 -+ -+Function: "exp10": -+double: 2 -+idouble: 2 -+ -+Function: "exp2": -+double: 1 -+idouble: 1 -+ -+Function: "expm1": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "gamma": -+double: 4 -+float: 3 -+idouble: 4 -+ifloat: 3 -+ -+Function: "hypot": -+double: 1 -+idouble: 1 -+ -+Function: "j0": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "j1": -+double: 1 -+float: 2 -+idouble: 1 -+ifloat: 2 -+ -+Function: "jn": -+double: 4 -+float: 4 -+idouble: 4 -+ifloat: 4 -+ -+Function: "lgamma": -+double: 4 -+float: 3 -+idouble: 4 -+ifloat: 3 -+ -+Function: "log10": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "log1p": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "log2": -+double: 2 -+float: 1 -+idouble: 2 -+ifloat: 1 -+ -+Function: "pow": -+double: 1 -+idouble: 1 -+ -+Function: "sin": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "sincos": -+double: 1 -+float: 1 -+idouble: 1 -+ifloat: 1 -+ -+Function: "sinh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "tan": -+float: 1 -+ifloat: 1 -+ -+Function: "tanh": -+double: 2 -+float: 2 -+idouble: 2 -+ifloat: 2 -+ -+Function: "tgamma": -+double: 5 -+float: 4 -+idouble: 5 -+ifloat: 4 -+ -+Function: "y0": -+double: 2 -+float: 1 -+idouble: 2 -+ifloat: 1 -+ -+Function: "y1": -+double: 3 -+float: 2 -+idouble: 3 -+ifloat: 2 -+ -+Function: "yn": -+double: 3 -+float: 3 -+idouble: 3 -+ifloat: 3 -+ -+# end of automatic generation -diff --git a/sysdeps/arc/libm-test-ulps-name b/sysdeps/arc/libm-test-ulps-name -new file mode 100644 -index 000000000000..8c4fba4f9ae0 ---- /dev/null -+++ b/sysdeps/arc/libm-test-ulps-name -@@ -0,0 +1 @@ -+ARC -diff --git a/sysdeps/arc/machine-gmon.h b/sysdeps/arc/machine-gmon.h -new file mode 100644 -index 000000000000..55facf77a858 ---- /dev/null -+++ b/sysdeps/arc/machine-gmon.h -@@ -0,0 +1,33 @@ -+/* Machine-dependent definitions for profiling support. ARC version. -+ Copyright (C) 1996-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+ -+#define _MCOUNT_DECL(frompc, selfpc) -+static void __mcount_internal (unsigned long frompc, unsigned long selfpc) -+ -+/* this is very simple as gcc does all the heavy lifting at _mcount call site -+ * - sets up caller's blink in r0, so frompc is setup correctly -+ * - preserve argument registers for original call */ -+ -+#define MCOUNT \ -+void _mcount (void *frompc) \ -+{ \ -+ __mcount_internal ((unsigned long int) frompc, \ -+ (unsigned long int) __builtin_return_address(0)); \ -+} -diff --git a/sysdeps/arc/math-tests.h b/sysdeps/arc/math-tests.h -new file mode 100644 -index 000000000000..2fe08698ff49 ---- /dev/null -+++ b/sysdeps/arc/math-tests.h -@@ -0,0 +1,28 @@ -+/* Configuration for math tests. ARC version. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* Current ARC soft-float does not support exceptions or rounding -+ modes. */ -+#define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST) -+#define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST) -+#define ROUNDING_TESTS_long_double(MODE) ((MODE) == FE_TONEAREST) -+#define EXCEPTION_TESTS_float 0 -+#define EXCEPTION_TESTS_double 0 -+#define EXCEPTION_TESTS_long_double 0 -+ -+#include_next -diff --git a/sysdeps/arc/math_private.h b/sysdeps/arc/math_private.h -new file mode 100644 -index 000000000000..35046d842533 ---- /dev/null -+++ b/sysdeps/arc/math_private.h -@@ -0,0 +1,6 @@ -+#ifndef ARC_MATH_PRIVATE_H -+#define ARC_MATH_PRIVATE_H -+ -+#include_next -+ -+#endif -diff --git a/sysdeps/arc/memusage.h b/sysdeps/arc/memusage.h -new file mode 100644 -index 000000000000..536f1fdbf614 ---- /dev/null -+++ b/sysdeps/arc/memusage.h -@@ -0,0 +1,23 @@ -+/* Machine-specific definitions for memory usage profiling, ARC version. -+ Copyright (C) 2000-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; }) -+ -+#define uatomic32_t unsigned int -+ -+#include -diff --git a/sysdeps/arc/nptl/Makefile b/sysdeps/arc/nptl/Makefile -new file mode 100644 -index 000000000000..afeb58a8c1cb ---- /dev/null -+++ b/sysdeps/arc/nptl/Makefile -@@ -0,0 +1,22 @@ -+# NPTL makefile fragment for ARC. -+# Copyright (C) 2005-2018 Free Software Foundation, Inc. -+# -+# This file is part of the GNU C Library. -+# -+# The GNU C Library is free software; you can redistribute it and/or -+# modify it under the terms of the GNU Lesser General Public -+# License as published by the Free Software Foundation; either -+# version 2.1 of the License, or (at your option) any later version. -+# -+# The GNU C Library is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# Lesser General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public -+# License along with the GNU C Library. If not, see -+# . -+ -+ifeq ($(subdir),csu) -+gen-as-const-headers += tcb-offsets.sym -+endif -diff --git a/sysdeps/arc/nptl/bits/pthreadtypes-arch.h b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h -new file mode 100644 -index 000000000000..473d9ec2bf0d ---- /dev/null -+++ b/sysdeps/arc/nptl/bits/pthreadtypes-arch.h -@@ -0,0 +1,72 @@ -+/* Machine-specific pthread type layouts. ARC version. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _BITS_PTHREADTYPES_ARCH_H -+#define _BITS_PTHREADTYPES_ARCH_H 1 -+ -+#include -+ -+#define __SIZEOF_PTHREAD_ATTR_T 36 -+#define __SIZEOF_PTHREAD_MUTEX_T 24 -+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -+#define __SIZEOF_PTHREAD_COND_T 48 -+#define __SIZEOF_PTHREAD_CONDATTR_T 4 -+#define __SIZEOF_PTHREAD_RWLOCK_T 32 -+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -+#define __SIZEOF_PTHREAD_BARRIER_T 20 -+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -+ -+/* Data structure for mutex handling. */ -+#define __PTHREAD_COMPAT_PADDING_MID -+#define __PTHREAD_COMPAT_PADDING_END -+#define __PTHREAD_MUTEX_LOCK_ELISION 0 -+#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -+#define __PTHREAD_MUTEX_USE_UNION 1 -+ -+#define __LOCK_ALIGNMENT -+#define __ONCE_ALIGNMENT -+ -+struct __pthread_rwlock_arch_t -+{ -+ unsigned int __readers; -+ unsigned int __writers; -+ unsigned int __wrphase_futex; -+ unsigned int __writers_futex; -+ unsigned int __pad3; -+ unsigned int __pad4; -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned char __pad1; -+ unsigned char __pad2; -+ unsigned char __shared; -+ /* FLAGS must stay at this position in the structure to maintain -+ binary compatibility. */ -+ unsigned char __flags; -+#else -+ /* FLAGS must stay at this position in the structure to maintain -+ binary compatibility. */ -+ unsigned char __flags; -+ unsigned char __shared; -+ unsigned char __pad1; -+ unsigned char __pad2; -+#endif -+ int __cur_writer; -+}; -+ -+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 -+ -+#endif /* bits/pthreadtypes-arch.h */ -diff --git a/sysdeps/arc/nptl/bits/semaphore.h b/sysdeps/arc/nptl/bits/semaphore.h -new file mode 100644 -index 000000000000..1ecc8ab8a65b ---- /dev/null -+++ b/sysdeps/arc/nptl/bits/semaphore.h -@@ -0,0 +1,32 @@ -+/* Machine-specific POSIX semaphore type layouts. ARC version. -+ Copyright (C) 2002-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _SEMAPHORE_H -+# error "Never use directly; include instead." -+#endif -+ -+#define __SIZEOF_SEM_T 16 -+ -+/* Value returned if `sem_open' failed. */ -+#define SEM_FAILED ((sem_t *) 0) -+ -+typedef union -+{ -+ char __size[__SIZEOF_SEM_T]; -+ long int __align; -+} sem_t; -diff --git a/sysdeps/arc/nptl/pthread-offsets.h b/sysdeps/arc/nptl/pthread-offsets.h -new file mode 100644 -index 000000000000..9617354dc7e3 ---- /dev/null -+++ b/sysdeps/arc/nptl/pthread-offsets.h -@@ -0,0 +1,5 @@ -+#define __PTHREAD_MUTEX_NUSERS_OFFSET 16 -+#define __PTHREAD_MUTEX_KIND_OFFSET 12 -+#define __PTHREAD_MUTEX_SPINS_OFFSET 20 -+#define __PTHREAD_MUTEX_ELISION_OFFSET 22 -+#define __PTHREAD_MUTEX_LIST_OFFSET 20 -diff --git a/sysdeps/arc/nptl/pthreaddef.h b/sysdeps/arc/nptl/pthreaddef.h -new file mode 100644 -index 000000000000..41e13c53038c ---- /dev/null -+++ b/sysdeps/arc/nptl/pthreaddef.h -@@ -0,0 +1,32 @@ -+/* pthread machine parameter definitions, ARC version. -+ Copyright (C) 2002-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+/* Default stack size. */ -+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024) -+ -+/* Required stack pointer alignment at beginning. */ -+#define STACK_ALIGN 4 -+ -+/* Minimal stack size after allocating thread descriptor and guard size. */ -+#define MINIMAL_REST_STACK 2048 -+ -+/* Alignment requirement for TCB. */ -+#define TCB_ALIGNMENT 4 -+ -+/* Location of current stack frame. */ -+#define CURRENT_STACK_FRAME __builtin_frame_address (0) -diff --git a/sysdeps/arc/nptl/tcb-offsets.sym b/sysdeps/arc/nptl/tcb-offsets.sym -new file mode 100644 -index 000000000000..56950e0676ed ---- /dev/null -+++ b/sysdeps/arc/nptl/tcb-offsets.sym -@@ -0,0 +1,11 @@ -+#include -+#include -+ -+-- Derive offsets relative to the thread register. -+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) -+ -+MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads) -+TLS_PRE_TCB_SIZE sizeof (struct pthread) -+TLS_TCB_SIZE sizeof(tcbhead_t) -+ -+PTHREAD_TID offsetof(struct pthread, tid) -diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h -new file mode 100644 -index 000000000000..b6c2023ef3f6 ---- /dev/null -+++ b/sysdeps/arc/nptl/tls.h -@@ -0,0 +1,150 @@ -+/* Definition for thread-local data handling. NPTL/ARC version. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _ARC_NPTL_TLS_H -+#define _ARC_NPTL_TLS_H 1 -+ -+#include -+ -+#ifndef __ASSEMBLER__ -+# include -+# include -+# include -+ -+#include -+ -+/* Get system call information. */ -+# include -+ -+/* The TLS blocks start right after the TCB. */ -+# define TLS_DTV_AT_TP 1 -+# define TLS_TCB_AT_TP 0 -+ -+/* Get the thread descriptor definition. */ -+# include -+ -+typedef struct -+{ -+ dtv_t *dtv; -+ uintptr_t pointer_guard; -+} tcbhead_t; -+ -+register struct pthread *__thread_self __asm__("r25"); -+ -+/* This is the size of the initial TCB. */ -+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) -+ -+/* Alignment requirements for the initial TCB. */ -+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) -+ -+/* This is the size of the TCB. */ -+#ifndef TLS_TCB_SIZE -+# define TLS_TCB_SIZE sizeof (tcbhead_t) -+#endif -+ -+/* Alignment requirements for the TCB. */ -+# define TLS_TCB_ALIGN __alignof__ (struct pthread) -+ -+/* This is the size we need before TCB. */ -+# define TLS_PRE_TCB_SIZE sizeof (struct pthread) -+ -+/* Install the dtv pointer. The pointer passed is to the element with -+ index -1 which contain the length. */ -+# define INSTALL_DTV(tcbp, dtvp) \ -+ (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1) -+ -+/* Install new dtv for current thread. */ -+# define INSTALL_NEW_DTV(dtv) \ -+ (THREAD_DTV() = (dtv)) -+ -+/* Return dtv of given thread descriptor. */ -+# define GET_DTV(tcbp) \ -+ (((tcbhead_t *) (tcbp))->dtv) -+ -+/* Code to initially initialize the thread pointer. */ -+# define TLS_INIT_TP(tcbp) \ -+ ({ \ -+ long result_var; \ -+ __builtin_set_thread_pointer(tcbp); \ -+ result_var = INTERNAL_SYSCALL (arc_settls, err, 1, (tcbp)); \ -+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \ -+ ? "unknown error" : NULL; \ -+ }) -+ -+/* Value passed to 'clone' for initialization of the thread register. */ -+# define TLS_DEFINE_INIT_TP(tp, pd) void *tp = (pd) + 1 -+ -+/* Return the address of the dtv for the current thread. */ -+# define THREAD_DTV() \ -+ (((tcbhead_t *) __builtin_thread_pointer ())->dtv) -+ -+/* Return the thread descriptor for the current thread. */ -+# define THREAD_SELF \ -+ ((struct pthread *)__builtin_thread_pointer () - 1) -+ -+/* Magic for libthread_db to know how to do THREAD_SELF. */ -+# define DB_THREAD_SELF \ -+ CONST_THREAD_AREA (32, sizeof (struct pthread)) -+ -+/* Access to data in the thread descriptor is easy. */ -+# define THREAD_GETMEM(descr, member) \ -+ descr->member -+# define THREAD_GETMEM_NC(descr, member, idx) \ -+ descr->member[idx] -+# define THREAD_SETMEM(descr, member, value) \ -+ descr->member = (value) -+# define THREAD_SETMEM_NC(descr, member, idx, value) \ -+ descr->member[idx] = (value) -+ -+/* Get and set the global scope generation counter in struct pthread. */ -+#define THREAD_GSCOPE_IN_TCB 1 -+#define THREAD_GSCOPE_FLAG_UNUSED 0 -+#define THREAD_GSCOPE_FLAG_USED 1 -+#define THREAD_GSCOPE_FLAG_WAIT 2 -+#define THREAD_GSCOPE_RESET_FLAG() \ -+ do \ -+ { int __res \ -+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \ -+ THREAD_GSCOPE_FLAG_UNUSED); \ -+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \ -+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \ -+ } \ -+ while (0) -+#define THREAD_GSCOPE_SET_FLAG() \ -+ do \ -+ { \ -+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ -+ atomic_write_barrier (); \ -+ } \ -+ while (0) -+#define THREAD_GSCOPE_WAIT() \ -+ GL(dl_wait_lookup_done) () -+ -+#else -+ -+# include -+ -+# r25 is dedicated TLS register for ARC -+.macro THREAD_SELF reg -+ # struct pthread is just ahead of TCB -+ sub \reg, r25, TLS_PRE_TCB_SIZE -+.endm -+ -+#endif /* __ASSEMBLER__ */ -+ -+#endif /* tls.h */ -diff --git a/sysdeps/arc/preconfigure b/sysdeps/arc/preconfigure -new file mode 100644 -index 000000000000..8a24fcb18319 ---- /dev/null -+++ b/sysdeps/arc/preconfigure -@@ -0,0 +1,6 @@ -+case "$machine" in -+arc*) -+ base_machine=arc -+ machine=arc -+ ;; -+esac -diff --git a/sysdeps/arc/setjmp.S b/sysdeps/arc/setjmp.S -new file mode 100644 -index 000000000000..cbd44e538339 ---- /dev/null -+++ b/sysdeps/arc/setjmp.S -@@ -0,0 +1,64 @@ -+/* setjmp for ARC. -+ Copyright (C) 1991-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+ -+#include -+ -+;@ r0 = jump buffer into which regs will be saved -+ENTRY(setjmp) -+ b.d __sigsetjmp -+ mov r1, 1 ; save signals -+END(setjmp) -+ -+;@ r0 = jump buffer into which regs will be saved -+ENTRY(_setjmp) -+ b.d __sigsetjmp -+ mov r1, 0 ; don't save signals -+END(_setjmp) -+libc_hidden_def(_setjmp) -+ -+;@ r0 = jump buffer into which regs will be saved -+;@ r1 = do we need to save signals -+ENTRY(__sigsetjmp) -+ -+ st_s r13, [r0] -+ st_s r14, [r0,4] -+ st r15, [r0,8] -+ st r16, [r0,12] -+ st r17, [r0,16] -+ st r18, [r0,20] -+ st r19, [r0,24] -+ st r20, [r0,28] -+ st r21, [r0,32] -+ st r22, [r0,36] -+ st r23, [r0,40] -+ st r24, [r0,44] -+ st r25, [r0,48] -+ st fp, [r0,52] -+ st sp, [r0,56] -+ -+ ; make a note of where longjmp will return to. -+ ; that will be right next to this setjmp call-site which will be -+ ; contained in blink, since "C" caller of this routine will do -+ ; a branch-n-link -+ -+ st blink, [r0,60] -+ b __sigjmp_save -+ -+END(__sigsetjmp) -+libc_hidden_def(__sigsetjmp) -diff --git a/sysdeps/arc/sfp-machine.h b/sysdeps/arc/sfp-machine.h -new file mode 100644 -index 000000000000..95eefc187430 ---- /dev/null -+++ b/sysdeps/arc/sfp-machine.h -@@ -0,0 +1,51 @@ -+#define _FP_W_TYPE_SIZE 32 -+#define _FP_W_TYPE unsigned long -+#define _FP_WS_TYPE signed long -+#define _FP_I_TYPE long -+ -+#define _FP_MUL_MEAT_S(R,X,Y) \ -+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_D(R,X,Y) \ -+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_Q(R,X,Y) \ -+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) -+ -+#define _FP_MUL_MEAT_DW_S(R,X,Y) \ -+ _FP_MUL_MEAT_DW_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_DW_D(R,X,Y) \ -+ _FP_MUL_MEAT_DW_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_DW_Q(R,X,Y) \ -+ _FP_MUL_MEAT_DW_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) -+ -+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y) -+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) -+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) -+ -+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 -+#define _FP_NANSIGN_S 0 -+#define _FP_NANSIGN_D 0 -+#define _FP_NANSIGN_Q 0 -+ -+#define _FP_KEEPNANFRACP 1 -+#define _FP_QNANNEGATEDP 0 -+ -+/* This is arbitrarily taken from the PowerPC version. */ -+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ -+ do { \ -+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ -+ { \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R,Y); \ -+ } \ -+ else \ -+ { \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R,X); \ -+ } \ -+ R##_c = FP_CLS_NAN; \ -+ } while (0) -+ -+#define _FP_TININESS_AFTER_ROUNDING 0 -diff --git a/sysdeps/arc/sotruss-lib.c b/sysdeps/arc/sotruss-lib.c -new file mode 100644 -index 000000000000..fc6a009e913a ---- /dev/null -+++ b/sysdeps/arc/sotruss-lib.c -@@ -0,0 +1,51 @@ -+/* Override generic sotruss-lib.c to define actual functions for ARC. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#define HAVE_ARCH_PLTENTER -+#define HAVE_ARCH_PLTEXIT -+ -+#include -+ -+ElfW(Addr) -+la_arc_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)), -+ unsigned int ndx __attribute__ ((unused)), -+ uintptr_t *refcook, uintptr_t *defcook, -+ La_arc_regs *regs, unsigned int *flags, -+ const char *symname, long int *framesizep) -+{ -+ print_enter (refcook, defcook, symname, -+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2], -+ *flags); -+ -+ /* No need to copy anything, we will not need the parameters in any case. */ -+ *framesizep = 0; -+ -+ return sym->st_value; -+} -+ -+unsigned int -+la_arc_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook, -+ uintptr_t *defcook, -+ const struct La_arc_regs *inregs, -+ struct La_arc_retval *outregs, const char *symname) -+{ -+ print_exit (refcook, defcook, symname, outregs->lrv_reg[0]); -+ -+ return 0; -+} -diff --git a/sysdeps/arc/stackinfo.h b/sysdeps/arc/stackinfo.h -new file mode 100644 -index 000000000000..42821ada1027 ---- /dev/null -+++ b/sysdeps/arc/stackinfo.h -@@ -0,0 +1,33 @@ -+/* Stack environment definitions for ARC. -+ Copyright (C) 2012-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+/* This file contains a bit of information about the stack allocation -+ of the processor. */ -+ -+#ifndef _STACKINFO_H -+#define _STACKINFO_H 1 -+ -+#include -+ -+/* On ARC the stack grows down. */ -+#define _STACK_GROWS_DOWN 1 -+ -+/* Default to a non-executable stack. */ -+#define DEFAULT_STACK_PERMS (PF_R|PF_W) -+ -+#endif /* stackinfo.h */ -diff --git a/sysdeps/arc/start.S b/sysdeps/arc/start.S -new file mode 100644 -index 000000000000..79e73e27d00d ---- /dev/null -+++ b/sysdeps/arc/start.S -@@ -0,0 +1,89 @@ -+/* Startup code for ARC -+ Copyright (C) 1995-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file with other -+ programs, and to distribute those programs without any restriction -+ coming from the use of this file. (The GNU Lesser General Public -+ License restrictions do apply in other respects; for example, they -+ cover modification of the file, and distribution when not linked -+ into another program.) -+ -+ Note that people who make modified versions of this file are not -+ obligated to grant this special exception for their modified -+ versions; it is their choice whether to do so. The GNU Lesser -+ General Public License gives permission to release a modified -+ version without this exception; this exception also makes it -+ possible to release a modified version which carries forward this -+ exception. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+ -+#define __ASSEMBLY__ 1 -+#include -+#ifndef ENTRY_POINT -+#error ENTRY_POINT needs to be defined for ARC -+#endif -+ -+/* When we enter this piece of code, the program stack looks like this: -+ -+ argc argument counter (integer) -+ argv[0] program name (pointer) -+ argv[1...N] program args (pointers) -+ argv[argc-1] end of args (integer) -+ NULL -+ env[0...N] environment variables (pointers) -+ NULL -+*/ -+ .text -+ .align 4 -+ .global __start -+ .type __start,@function -+__start: -+ mov fp, 0 -+ ld_s r1, [sp] ; argc -+ -+ mov_s r5, r0 ; rltd_fini -+ add_s r2, sp, 4 ; argv -+ and sp, sp, -8 -+ mov r6, sp -+ -+#ifdef SHARED -+ ld r0, [pcl, @main@gotpc] -+ ld r3, [pcl, @__libc_csu_init@gotpc] -+ ld r4, [pcl, @__libc_csu_fini@gotpc] -+ bl __libc_start_main@plt -+#else -+ mov_s r0, main -+ mov_s r3, __libc_csu_init -+ mov r4, __libc_csu_fini -+ bl __libc_start_main -+#endif -+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */ -+ -+ /* Should never get here.... */ -+ flag 1 -+ .size __start,.-__start -+ -+/* Define a symbol for the first piece of initialized data. */ -+ .data -+ .globl __data_start -+__data_start: -+ .long 0 -+ .weak data_start -+ data_start = __data_start -diff --git a/sysdeps/arc/sysdep.h b/sysdeps/arc/sysdep.h -new file mode 100644 -index 000000000000..920611277089 ---- /dev/null -+++ b/sysdeps/arc/sysdep.h -@@ -0,0 +1,51 @@ -+/* Assembler macros for ARC. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public License as -+ published by the Free Software Foundation; either version 2.1 of the -+ License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#ifdef __ASSEMBLER__ -+ -+/* Syntactic details of assembler. -+ * One weirness is ; is not newline but comment -+ * Although # is also for comment -+ */ -+ -+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name -+ -+#define ENTRY(name) \ -+ .align 4 ASM_LINE_SEP \ -+ .globl C_SYMBOL_NAME(name) ASM_LINE_SEP \ -+ .type C_SYMBOL_NAME(name),%function ASM_LINE_SEP \ -+ C_LABEL(name) ASM_LINE_SEP \ -+ cfi_startproc ASM_LINE_SEP \ -+ CALL_MCOUNT -+ -+#undef END -+#define END(name) \ -+ cfi_endproc ASM_LINE_SEP \ -+ ASM_SIZE_DIRECTIVE(name) -+ -+#ifdef SHARED -+#define PLTJMP(_x) _x##@plt -+#else -+#define PLTJMP(_x) _x -+#endif -+ -+# define CALL_MCOUNT /* Do nothing for now. */ -+ -+#endif /* __ASSEMBLER__ */ -diff --git a/sysdeps/arc/tls-macros.h b/sysdeps/arc/tls-macros.h -new file mode 100644 -index 000000000000..51855edef6e7 ---- /dev/null -+++ b/sysdeps/arc/tls-macros.h -@@ -0,0 +1,29 @@ -+/* Macros to support TLS testing in times of missing compiler support. */ -+ -+/* For now */ -+#define TLS_LD(x) TLS_IE(x) -+ -+#define TLS_GD(x) \ -+ ({ int *__result; \ -+ __asm__ ("add r0, pcl, @" #x "@tlsgd \n" \ -+ ".tls_gd_ld " #x "`bl __tls_get_addr@plt \n" \ -+ "mov %0, r0 \n" \ -+ : "=&r" (__result) \ -+ ::"r0","r1","r2","r3","r4","r5","r6","r7", \ -+ "r8","r9","r10","r11","r12"); \ -+ __result; }) -+ -+#define TLS_LE(x) \ -+ ({ int *__result; \ -+ void *tp = __builtin_thread_pointer(); \ -+ __asm__ ("add %0, %1, @" #x "@tpoff \n" \ -+ : "=r" (__result) : "r"(tp)); \ -+ __result; }) -+ -+#define TLS_IE(x) \ -+ ({ int *__result; \ -+ void *tp = __builtin_thread_pointer(); \ -+ __asm__ ("ld %0, [pcl, @" #x "@tlsie] \n" \ -+ "add %0, %1, %0 \n" \ -+ : "=&r" (__result) : "r" (tp)); \ -+ __result; }) -diff --git a/sysdeps/arc/tst-audit.h b/sysdeps/arc/tst-audit.h -new file mode 100644 -index 000000000000..8ae3734cd50c ---- /dev/null -+++ b/sysdeps/arc/tst-audit.h -@@ -0,0 +1,23 @@ -+/* Definitions for testing PLT entry/exit auditing. ARC version. -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#define pltenter la_arc_gnu_pltenter -+#define pltexit la_arc_gnu_pltexit -+#define La_regs La_arc_regs -+#define La_retval La_arc_retval -+#define int_retval lrv_reg[0] -diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh -index e39b2d6d5214..6a5c10d54e87 100644 ---- a/sysdeps/unix/make-syscalls.sh -+++ b/sysdeps/unix/make-syscalls.sh -@@ -7,7 +7,7 @@ - # - # This script is used to process the syscall data encoded in the various - # syscalls.list files to produce thin assembly syscall wrappers around the --# appropriate OS syscall. See syscall-template.s for more details on the -+# appropriate OS syscall. See syscall-template.S for more details on the - # actual wrapper. - # - # Syscall Signature Prefixes: -diff --git a/sysdeps/unix/sysv/linux/arc/Implies b/sysdeps/unix/sysv/linux/arc/Implies -new file mode 100644 -index 000000000000..7f739a0340b6 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/Implies -@@ -0,0 +1,3 @@ -+arc/nptl -+unix/sysv/linux/generic/wordsize-32 -+unix/sysv/linux/generic -diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile -new file mode 100644 -index 000000000000..a6c6dfc6ec64 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/Makefile -@@ -0,0 +1,20 @@ -+ifeq ($(subdir),stdlib) -+gen-as-const-headers += ucontext_i.sym -+endif -+ -+ifeq ($(subdir),signal) -+sysdep_routines += sigrestorer -+endif -+ -+ifeq ($(subdir),misc) -+# MIPS/Tile-style cacheflush routine -+sysdep_headers += sys/cachectl.h -+sysdep_routines += cacheflush -+endif -+ -+ifeq ($(subdir),elf) -+ifeq ($(build-shared),yes) -+# This is needed for DSO loading from static binaries. -+sysdep-dl-routines += dl-static -+endif -+endif -diff --git a/sysdeps/unix/sysv/linux/arc/Versions b/sysdeps/unix/sysv/linux/arc/Versions -new file mode 100644 -index 000000000000..87974e40aa75 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/Versions -@@ -0,0 +1,16 @@ -+ld { -+ GLIBC_PRIVATE { -+ # used for loading by static libraries -+ _dl_var_init; -+ } -+} -+libc { -+ GLIBC_2.27 { -+ _flush_cache; -+ cacheflush; -+ } -+ GLIBC_PRIVATE { -+ # A copy of sigaction lives in libpthread, and needs these. -+ __default_rt_sa_restorer; -+ } -+} -diff --git a/sysdeps/unix/sysv/linux/arc/bits/mman.h b/sysdeps/unix/sysv/linux/arc/bits/mman.h -new file mode 100644 -index 000000000000..d52a82eae4ad ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/bits/mman.h -@@ -0,0 +1,42 @@ -+/* Definitions for POSIX memory map interface. Linux/ARC version. -+ -+ Copyright (C) 1997-2018 Free Software Foundation, Inc. -+ -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _SYS_MMAN_H -+# error "Never use directly; include instead." -+#endif -+ -+/* The following definitions basically come from the kernel headers. -+ But the kernel header is not namespace clean. */ -+ -+/* These are Linux-specific. */ -+#ifdef __USE_MISC -+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ -+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -+# define MAP_LOCKED 0x02000 /* Lock the mapping. */ -+# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ -+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ -+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -+# define MAP_STACK 0x20000 /* Allocation is for a stack. */ -+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ -+#endif -+ -+/* Include generic Linux declarations. */ -+#include -diff --git a/sysdeps/unix/sysv/linux/arc/bits/sigaction.h b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h -new file mode 100644 -index 000000000000..47e86c06ce98 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/bits/sigaction.h -@@ -0,0 +1,85 @@ -+/* The proper definitions for Linux's sigaction. -+ Copyright (C) 1993-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _BITS_SIGACTION_H -+#define _BITS_SIGACTION_H 1 -+ -+#ifndef _SIGNAL_H -+# error "Never include directly; use instead." -+#endif -+ -+/* Structure describing the action to be taken when a signal arrives. -+ * The generic struct is NOT ABI compatible with asm-generic Linux syscall variant*/ -+ -+struct sigaction -+ { -+ /* Signal handler. */ -+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED -+ union -+ { -+ /* Used if SA_SIGINFO is not set. */ -+ __sighandler_t sa_handler; -+ /* Used if SA_SIGINFO is set. */ -+ void (*sa_sigaction) (int, siginfo_t *, void *); -+ } -+ __sigaction_handler; -+# define sa_handler __sigaction_handler.sa_handler -+# define sa_sigaction __sigaction_handler.sa_sigaction -+#else -+ __sighandler_t sa_handler; -+#endif -+ -+ /* Special flags. */ -+ int sa_flags; -+ -+ /* Restore handler. */ -+ void (*sa_restorer) (void); -+ -+ /* Additional set of signals to be blocked. */ -+ __sigset_t sa_mask; -+ }; -+ -+/* Bits in `sa_flags'. */ -+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -+#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -+#define SA_SIGINFO 4 /* Invoke signal-catching function with -+ three arguments instead of one. */ -+#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC -+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -+#endif -+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 -+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when -+ its handler is being executed. */ -+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -+#endif -+#ifdef __USE_MISC -+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ -+ -+/* Some aliases for the SA_ constants. */ -+# define SA_NOMASK SA_NODEFER -+# define SA_ONESHOT SA_RESETHAND -+# define SA_STACK SA_ONSTACK -+#endif -+ -+/* Values for the HOW argument to `sigprocmask'. */ -+#define SIG_BLOCK 0 /* Block signals. */ -+#define SIG_UNBLOCK 1 /* Unblock signals. */ -+#define SIG_SETMASK 2 /* Set the set of blocked signals. */ -+ -+#endif -\ No newline at end of file -diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/c++-types.data -new file mode 100644 -index 000000000000..303f4570c8ee ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/c++-types.data -@@ -0,0 +1,67 @@ -+blkcnt64_t:x -+blkcnt_t:l -+blksize_t:i -+caddr_t:Pc -+clockid_t:i -+clock_t:l -+daddr_t:i -+dev_t:y -+fd_mask:l -+fsblkcnt64_t:y -+fsblkcnt_t:m -+fsfilcnt64_t:y -+fsfilcnt_t:m -+fsid_t:8__fsid_t -+gid_t:j -+id_t:j -+ino64_t:y -+ino_t:m -+int16_t:s -+int32_t:i -+int64_t:x -+int8_t:a -+intptr_t:i -+key_t:i -+loff_t:x -+mode_t:j -+nlink_t:j -+off64_t:x -+off_t:l -+pid_t:i -+pthread_attr_t:14pthread_attr_t -+pthread_barrier_t:17pthread_barrier_t -+pthread_barrierattr_t:21pthread_barrierattr_t -+pthread_cond_t:14pthread_cond_t -+pthread_condattr_t:18pthread_condattr_t -+pthread_key_t:j -+pthread_mutex_t:15pthread_mutex_t -+pthread_mutexattr_t:19pthread_mutexattr_t -+pthread_once_t:i -+pthread_rwlock_t:16pthread_rwlock_t -+pthread_rwlockattr_t:20pthread_rwlockattr_t -+pthread_spinlock_t:i -+pthread_t:m -+quad_t:x -+register_t:i -+rlim64_t:y -+rlim_t:m -+sigset_t:10__sigset_t -+size_t:j -+socklen_t:j -+ssize_t:i -+suseconds_t:l -+time_t:l -+u_char:h -+uid_t:j -+uint:j -+u_int:j -+u_int16_t:t -+u_int32_t:j -+u_int64_t:y -+u_int8_t:h -+ulong:m -+u_long:m -+u_quad_t:y -+useconds_t:j -+ushort:t -+u_short:t -diff --git a/sysdeps/unix/sysv/linux/arc/cacheflush.c b/sysdeps/unix/sysv/linux/arc/cacheflush.c -new file mode 100644 -index 000000000000..7b14211eccf7 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/cacheflush.c -@@ -0,0 +1,29 @@ -+/* cacheflush system call for ARC Linux. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+#include -+ -+/* Flush cache(s). */ -+int -+_flush_cache (char *addr, const int nbytes, const int op) -+{ -+ return INLINE_SYSCALL (cacheflush, 3, addr, nbytes, op); -+} -+weak_alias (_flush_cache, cacheflush) -diff --git a/sysdeps/unix/sysv/linux/arc/clone.S b/sysdeps/unix/sysv/linux/arc/clone.S -new file mode 100644 -index 000000000000..04f2df5ef06d ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/clone.S -@@ -0,0 +1,100 @@ -+/* clone() implementation for ARC. -+ Copyright (C) 2008-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Andrew Jenner , 2008. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+ -+#include -+#define _ERRNO_H 1 -+#include -+#include -+ -+#define CLONE_SETTLS 0x00080000 -+ -+; int clone(int (*fn)(void *), void *child_stack, -+; int flags, void *arg, ... -+; /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */); -+; -+; NOTE: I'm assuming that the last 3 args are NOT var-args and in case all -+; 3 are not relevant, caller will nevertheless pass those as NULL. -+; Current (Jul 2012) upstream powerpc/clone.S assumes similarly. -+; Our LTP (from 2007) doesn't seem to have tests to prove otherwise -+ -+; clone syscall in kernel (ABI: CONFIG_CLONE_BACKWARDS) -+; -+; int sys_clone(unsigned long clone_flags, -+; unsigned long newsp, -+; int __user *parent_tidptr, -+; void *tls, -+; int __user *child_tidptr) -+ -+ENTRY(__clone) -+ cmp r0, 0 ; @fn can't be NULL -+ cmp.ne r1, 0 ; @child_stack can't be NULL -+ bz .L__sys_err -+ -+ ; save some of the orig args -+ ; r0 containg @fn will be clobbered AFTER syscall (with ret val) -+ ; rest are clobbered BEFORE syscall due to different arg ordering -+ mov r10, r0 ; @fn -+ mov r11, r3 ; @args -+ mov r12, r2 ; @clone_flags -+ mov r9, r5 ; @tls -+ -+ ; adjust libc args for syscall -+ -+ mov r0, r2 ; libc @flags is 1st syscall arg -+ mov r2, r4 ; libc @ptid -+ mov r3, r5 ; libc @tls -+ mov r4, r6 ; libc @ctid -+ mov r8, __NR_clone -+ ARC_TRAP_INSN -+ -+ cmp r0, 0 ; return code : 0 new process, !0 parent -+ blt .L__sys_err2 ; < 0 (signed) error -+ jnz [blink] ; Parent returns -+ -+ ; ----- child starts here --------- -+ -+ ; Setup TP register (only recent kernels v4.19+ do that) -+ and.f 0, r12, CLONE_SETTLS -+ mov.nz r25, r9 -+ -+ ; child jumps off to @fn with @arg as argument, and returns here -+ jl.d [r10] -+ mov r0, r11 -+ -+ ; exit() with result from @fn (already in r0) -+ mov r8, __NR_exit -+ ARC_TRAP_INSN -+ ; In case it ever came back -+ flag 1 -+ -+.L__sys_err: -+ mov r0, -EINVAL -+.L__sys_err2: -+ ; (1) No need to make -ve kernel error code as positive errno -+ ; __syscall_error expects the -ve error code returned by kernel -+ ; (2) r0 still had orig -ve kernel error code -+ ; (3) Tail call to __syscall_error so we dont have to come back -+ ; here hence instead of jmp-n-link (reg push/pop) we do jmp -+ ; (4) No need to route __syscall_error via PLT, B is inherently -+ ; position independent -+ b __syscall_error -+PSEUDO_END (__clone) -+libc_hidden_def (__clone) -+weak_alias (__clone, clone) -diff --git a/sysdeps/unix/sysv/linux/arc/configure b/sysdeps/unix/sysv/linux/arc/configure -new file mode 100644 -index 000000000000..f74fa7cb0259 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/configure -@@ -0,0 +1,4 @@ -+# This file is generated from configure.in by Autoconf. DO NOT EDIT! -+ # Local configure fragment for sysdeps/unix/sysv/linux/arc. -+ -+arch_minimum_kernel=3.9.0 -diff --git a/sysdeps/unix/sysv/linux/arc/configure.ac b/sysdeps/unix/sysv/linux/arc/configure.ac -new file mode 100644 -index 000000000000..a9528032d32a ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/configure.ac -@@ -0,0 +1,4 @@ -+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -+# Local configure fragment for sysdeps/unix/sysv/linux/arc. -+ -+arch_minimum_kernel=3.9.0 -diff --git a/sysdeps/unix/sysv/linux/arc/dl-static.c b/sysdeps/unix/sysv/linux/arc/dl-static.c -new file mode 100644 -index 000000000000..2683ee5e7e2a ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/dl-static.c -@@ -0,0 +1,84 @@ -+/* Variable initialization. ARC version. -+ Copyright (C) 2001-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+ -+#ifdef SHARED -+ -+void -+_dl_var_init (void *array[]) -+{ -+ /* It has to match "variables" below. */ -+ enum -+ { -+ DL_PAGESIZE = 0 -+ }; -+ -+ GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]); -+} -+ -+#else -+ -+static void *variables[] = -+{ -+ &GLRO(dl_pagesize) -+}; -+ -+static void -+_dl_unprotect_relro (struct link_map *l) -+{ -+ ElfW(Addr) start = ((l->l_addr + l->l_relro_addr) -+ & ~(GLRO(dl_pagesize) - 1)); -+ ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size) -+ & ~(GLRO(dl_pagesize) - 1)); -+ -+ if (start != end) -+ __mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE); -+} -+ -+void -+_dl_static_init (struct link_map *l) -+{ -+ struct link_map *rtld_map = l; -+ struct r_scope_elem **scope; -+ const ElfW(Sym) *ref = NULL; -+ lookup_t loadbase; -+ void (*f) (void *[]); -+ size_t i; -+ -+ loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope, -+ NULL, 0, 1, NULL); -+ -+ for (scope = l->l_local_scope; *scope != NULL; scope++) -+ for (i = 0; i < (*scope)->r_nlist; i++) -+ if ((*scope)->r_list[i] == loadbase) -+ { -+ rtld_map = (*scope)->r_list[i]; -+ break; -+ } -+ -+ if (ref != NULL) -+ { -+ f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref); -+ _dl_unprotect_relro (rtld_map); -+ f (variables); -+ _dl_protect_relro (rtld_map); -+ } -+} -+ -+#endif -diff --git a/sysdeps/unix/sysv/linux/arc/getcontext.S b/sysdeps/unix/sysv/linux/arc/getcontext.S -new file mode 100644 -index 000000000000..af31f581e846 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/getcontext.S -@@ -0,0 +1,65 @@ -+/* Save current context for ARC -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include "ucontext-macros.h" -+ -+/* int getcontext (ucontext_t *ucp) -+ -+ Save machine context in @ucp and return 0 on success, -1 on error -+ - saves callee saved registers only -+ - layout mandated by uncontext_t:m_context (hence different from setjmp) -+*/ -+ -+ENTRY(__getcontext) -+ -+ /* callee saved registers */ -+ SAVE_REG(r13, r0, 37) -+ SAVE_REG(r14, r0, 36) -+ SAVE_REG(r15, r0, 35) -+ SAVE_REG(r16, r0, 34) -+ SAVE_REG(r17, r0, 33) -+ SAVE_REG(r18, r0, 32) -+ SAVE_REG(r19, r0, 31) -+ SAVE_REG(r20, r0, 30) -+ SAVE_REG(r21, r0, 29) -+ SAVE_REG(r22, r0, 28) -+ SAVE_REG(r23, r0, 27) -+ SAVE_REG(r24, r0, 26) -+ SAVE_REG(r25, r0, 25) -+ -+ SAVE_REG(blink, r0, 7) -+ SAVE_REG(fp, r0, 8) -+ SAVE_REG(sp, r0, 23) -+ -+ /* save 0 in r0 placeholder to return 0 when this @ucp activated */ -+ mov r9, 0 -+ SAVE_REG(r9, r0, 22) -+ -+ /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */ -+ mov r3, _NSIG8 -+ add r2, r0, UCONTEXT_SIGMASK -+ mov r1, 0 -+ mov r0, SIG_BLOCK -+ mov r8, __NR_rt_sigprocmask -+ ARC_TRAP_INSN -+ brhi r0, -1024, .Lcall_syscall_err -+ j.d [blink] -+ mov r0, 0 ; success ; error case handled in .Lcall_syscall_err -+ -+PSEUDO_END(__getcontext) -+weak_alias(__getcontext, getcontext) -diff --git a/sysdeps/unix/sysv/linux/arc/ipc_priv.h b/sysdeps/unix/sysv/linux/arc/ipc_priv.h -new file mode 100644 -index 000000000000..5f6e9815d169 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ipc_priv.h -@@ -0,0 +1,21 @@ -+/* Old SysV permission definition for Linux. ARC version. -+ Copyright (C) 2016-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include /* For __key_t */ -+ -+#define __IPC_64 0x0 -diff --git a/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h -new file mode 100644 -index 000000000000..2fec69d21657 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h -@@ -0,0 +1,6 @@ -+#define JMP_BUF_SIZE (32 + 1 + 1024/32) * 4 -+#define SIGJMP_BUF_SIZE (32 + 1 + 1024/32) * 4 -+#define JMP_BUF_ALIGN 4 -+#define SIGJMP_BUF_ALIGN 4 -+#define MASK_WAS_SAVED_OFFSET 32 * 4 -+#define SAVED_MASK_OFFSET 33 * 4 -diff --git a/sysdeps/unix/sysv/linux/arc/kernel-features.h b/sysdeps/unix/sysv/linux/arc/kernel-features.h -new file mode 100644 -index 000000000000..d8f667ca4759 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/kernel-features.h -@@ -0,0 +1,28 @@ -+/* Set flags signalling availability of kernel features based on given -+ kernel version number. -+ -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* The minimum supported kernel version for ARC is 3.9, -+ guaranteeing many kernel features. */ -+ -+#include_next -+ -+#undef __ASSUME_CLONE_DEFAULT -+#define __ASSUME_CLONE_BACKWARDS 1 -diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/ld.abilist -new file mode 100644 -index 000000000000..1aad547f8a4b ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ld.abilist -@@ -0,0 +1,9 @@ -+GLIBC_2.27 __libc_stack_end D 0x4 -+GLIBC_2.27 __stack_chk_guard D 0x4 -+GLIBC_2.27 __tls_get_addr F -+GLIBC_2.27 _dl_mcount F -+GLIBC_2.27 _r_debug D 0x14 -+GLIBC_2.27 calloc F -+GLIBC_2.27 free F -+GLIBC_2.27 malloc F -+GLIBC_2.27 realloc F -diff --git a/sysdeps/unix/sysv/linux/arc/ldconfig.h b/sysdeps/unix/sysv/linux/arc/ldconfig.h -new file mode 100644 -index 000000000000..c38ce20edaea ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ldconfig.h -@@ -0,0 +1,25 @@ -+/* dynamic linker names for ARC -+ Copyright (C) 2001-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+#define SYSDEP_KNOWN_INTERPRETER_NAMES \ -+ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, -+#define SYSDEP_KNOWN_LIBRARY_NAMES \ -+ { "libc.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libm.so.6", FLAG_ELF_LIBC6 }, -diff --git a/sysdeps/unix/sysv/linux/arc/ldsodefs.h b/sysdeps/unix/sysv/linux/arc/ldsodefs.h -new file mode 100644 -index 000000000000..005c49a7b7cd ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ldsodefs.h -@@ -0,0 +1,32 @@ -+/* Run-time dynamic linker data structures for loaded ELF shared objects. ARC -+ Copyright (C) 2001-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _LDSODEFS_H -+ -+/* Get the real definitions. */ -+#include_next -+ -+/* Now define our stuff. */ -+ -+/* We need special support to initialize DSO loaded for statically linked -+ binaries. */ -+extern void _dl_static_init (struct link_map *map); -+#undef DL_STATIC_INIT -+#define DL_STATIC_INIT(map) _dl_static_init (map) -+ -+#endif /* ldsodefs.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist -new file mode 100644 -index 000000000000..18968d3c01d1 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist -@@ -0,0 +1 @@ -+GLIBC_2.27 __ctype_get_mb_cur_max F -diff --git a/sysdeps/unix/sysv/linux/arc/libanl.abilist b/sysdeps/unix/sysv/linux/arc/libanl.abilist -new file mode 100644 -index 000000000000..711fc87c2af1 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libanl.abilist -@@ -0,0 +1,4 @@ -+GLIBC_2.27 gai_cancel F -+GLIBC_2.27 gai_error F -+GLIBC_2.27 gai_suspend F -+GLIBC_2.27 getaddrinfo_a F -diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist -new file mode 100644 -index 000000000000..b25e35d50280 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist -@@ -0,0 +1,2091 @@ -+GLIBC_2.27 _Exit F -+GLIBC_2.27 _IO_2_1_stderr_ D 0x98 -+GLIBC_2.27 _IO_2_1_stdin_ D 0x98 -+GLIBC_2.27 _IO_2_1_stdout_ D 0x98 -+GLIBC_2.27 _IO_adjust_column F -+GLIBC_2.27 _IO_adjust_wcolumn F -+GLIBC_2.27 _IO_default_doallocate F -+GLIBC_2.27 _IO_default_finish F -+GLIBC_2.27 _IO_default_pbackfail F -+GLIBC_2.27 _IO_default_uflow F -+GLIBC_2.27 _IO_default_xsgetn F -+GLIBC_2.27 _IO_default_xsputn F -+GLIBC_2.27 _IO_do_write F -+GLIBC_2.27 _IO_doallocbuf F -+GLIBC_2.27 _IO_fclose F -+GLIBC_2.27 _IO_fdopen F -+GLIBC_2.27 _IO_feof F -+GLIBC_2.27 _IO_ferror F -+GLIBC_2.27 _IO_fflush F -+GLIBC_2.27 _IO_fgetpos F -+GLIBC_2.27 _IO_fgetpos64 F -+GLIBC_2.27 _IO_fgets F -+GLIBC_2.27 _IO_file_attach F -+GLIBC_2.27 _IO_file_close F -+GLIBC_2.27 _IO_file_close_it F -+GLIBC_2.27 _IO_file_doallocate F -+GLIBC_2.27 _IO_file_finish F -+GLIBC_2.27 _IO_file_fopen F -+GLIBC_2.27 _IO_file_init F -+GLIBC_2.27 _IO_file_jumps D 0x54 -+GLIBC_2.27 _IO_file_open F -+GLIBC_2.27 _IO_file_overflow F -+GLIBC_2.27 _IO_file_read F -+GLIBC_2.27 _IO_file_seek F -+GLIBC_2.27 _IO_file_seekoff F -+GLIBC_2.27 _IO_file_setbuf F -+GLIBC_2.27 _IO_file_stat F -+GLIBC_2.27 _IO_file_sync F -+GLIBC_2.27 _IO_file_underflow F -+GLIBC_2.27 _IO_file_write F -+GLIBC_2.27 _IO_file_xsputn F -+GLIBC_2.27 _IO_flockfile F -+GLIBC_2.27 _IO_flush_all F -+GLIBC_2.27 _IO_flush_all_linebuffered F -+GLIBC_2.27 _IO_fopen F -+GLIBC_2.27 _IO_fprintf F -+GLIBC_2.27 _IO_fputs F -+GLIBC_2.27 _IO_fread F -+GLIBC_2.27 _IO_free_backup_area F -+GLIBC_2.27 _IO_free_wbackup_area F -+GLIBC_2.27 _IO_fsetpos F -+GLIBC_2.27 _IO_fsetpos64 F -+GLIBC_2.27 _IO_ftell F -+GLIBC_2.27 _IO_ftrylockfile F -+GLIBC_2.27 _IO_funlockfile F -+GLIBC_2.27 _IO_fwrite F -+GLIBC_2.27 _IO_getc F -+GLIBC_2.27 _IO_getline F -+GLIBC_2.27 _IO_getline_info F -+GLIBC_2.27 _IO_gets F -+GLIBC_2.27 _IO_init F -+GLIBC_2.27 _IO_init_marker F -+GLIBC_2.27 _IO_init_wmarker F -+GLIBC_2.27 _IO_iter_begin F -+GLIBC_2.27 _IO_iter_end F -+GLIBC_2.27 _IO_iter_file F -+GLIBC_2.27 _IO_iter_next F -+GLIBC_2.27 _IO_least_wmarker F -+GLIBC_2.27 _IO_link_in F -+GLIBC_2.27 _IO_list_all D 0x4 -+GLIBC_2.27 _IO_list_lock F -+GLIBC_2.27 _IO_list_resetlock F -+GLIBC_2.27 _IO_list_unlock F -+GLIBC_2.27 _IO_marker_delta F -+GLIBC_2.27 _IO_marker_difference F -+GLIBC_2.27 _IO_padn F -+GLIBC_2.27 _IO_peekc_locked F -+GLIBC_2.27 _IO_popen F -+GLIBC_2.27 _IO_printf F -+GLIBC_2.27 _IO_proc_close F -+GLIBC_2.27 _IO_proc_open F -+GLIBC_2.27 _IO_putc F -+GLIBC_2.27 _IO_puts F -+GLIBC_2.27 _IO_remove_marker F -+GLIBC_2.27 _IO_seekmark F -+GLIBC_2.27 _IO_seekoff F -+GLIBC_2.27 _IO_seekpos F -+GLIBC_2.27 _IO_seekwmark F -+GLIBC_2.27 _IO_setb F -+GLIBC_2.27 _IO_setbuffer F -+GLIBC_2.27 _IO_setvbuf F -+GLIBC_2.27 _IO_sgetn F -+GLIBC_2.27 _IO_sprintf F -+GLIBC_2.27 _IO_sputbackc F -+GLIBC_2.27 _IO_sputbackwc F -+GLIBC_2.27 _IO_sscanf F -+GLIBC_2.27 _IO_str_init_readonly F -+GLIBC_2.27 _IO_str_init_static F -+GLIBC_2.27 _IO_str_overflow F -+GLIBC_2.27 _IO_str_pbackfail F -+GLIBC_2.27 _IO_str_seekoff F -+GLIBC_2.27 _IO_str_underflow F -+GLIBC_2.27 _IO_sungetc F -+GLIBC_2.27 _IO_sungetwc F -+GLIBC_2.27 _IO_switch_to_get_mode F -+GLIBC_2.27 _IO_switch_to_main_wget_area F -+GLIBC_2.27 _IO_switch_to_wbackup_area F -+GLIBC_2.27 _IO_switch_to_wget_mode F -+GLIBC_2.27 _IO_un_link F -+GLIBC_2.27 _IO_ungetc F -+GLIBC_2.27 _IO_unsave_markers F -+GLIBC_2.27 _IO_unsave_wmarkers F -+GLIBC_2.27 _IO_vfprintf F -+GLIBC_2.27 _IO_vfscanf F -+GLIBC_2.27 _IO_vsprintf F -+GLIBC_2.27 _IO_wdefault_doallocate F -+GLIBC_2.27 _IO_wdefault_finish F -+GLIBC_2.27 _IO_wdefault_pbackfail F -+GLIBC_2.27 _IO_wdefault_uflow F -+GLIBC_2.27 _IO_wdefault_xsgetn F -+GLIBC_2.27 _IO_wdefault_xsputn F -+GLIBC_2.27 _IO_wdo_write F -+GLIBC_2.27 _IO_wdoallocbuf F -+GLIBC_2.27 _IO_wfile_jumps D 0x54 -+GLIBC_2.27 _IO_wfile_overflow F -+GLIBC_2.27 _IO_wfile_seekoff F -+GLIBC_2.27 _IO_wfile_sync F -+GLIBC_2.27 _IO_wfile_underflow F -+GLIBC_2.27 _IO_wfile_xsputn F -+GLIBC_2.27 _IO_wmarker_delta F -+GLIBC_2.27 _IO_wsetb F -+GLIBC_2.27 ___brk_addr D 0x4 -+GLIBC_2.27 __adjtimex F -+GLIBC_2.27 __after_morecore_hook D 0x4 -+GLIBC_2.27 __argz_count F -+GLIBC_2.27 __argz_next F -+GLIBC_2.27 __argz_stringify F -+GLIBC_2.27 __asprintf F -+GLIBC_2.27 __asprintf_chk F -+GLIBC_2.27 __assert F -+GLIBC_2.27 __assert_fail F -+GLIBC_2.27 __assert_perror_fail F -+GLIBC_2.27 __backtrace F -+GLIBC_2.27 __backtrace_symbols F -+GLIBC_2.27 __backtrace_symbols_fd F -+GLIBC_2.27 __bsd_getpgrp F -+GLIBC_2.27 __bzero F -+GLIBC_2.27 __check_rhosts_file D 0x4 -+GLIBC_2.27 __chk_fail F -+GLIBC_2.27 __clone F -+GLIBC_2.27 __close F -+GLIBC_2.27 __cmsg_nxthdr F -+GLIBC_2.27 __confstr_chk F -+GLIBC_2.27 __connect F -+GLIBC_2.27 __ctype_b_loc F -+GLIBC_2.27 __ctype_get_mb_cur_max F -+GLIBC_2.27 __ctype_tolower_loc F -+GLIBC_2.27 __ctype_toupper_loc F -+GLIBC_2.27 __curbrk D 0x4 -+GLIBC_2.27 __cxa_at_quick_exit F -+GLIBC_2.27 __cxa_atexit F -+GLIBC_2.27 __cxa_finalize F -+GLIBC_2.27 __cxa_thread_atexit_impl F -+GLIBC_2.27 __cyg_profile_func_enter F -+GLIBC_2.27 __cyg_profile_func_exit F -+GLIBC_2.27 __daylight D 0x4 -+GLIBC_2.27 __dcgettext F -+GLIBC_2.27 __default_morecore F -+GLIBC_2.27 __dgettext F -+GLIBC_2.27 __dprintf_chk F -+GLIBC_2.27 __dup2 F -+GLIBC_2.27 __duplocale F -+GLIBC_2.27 __endmntent F -+GLIBC_2.27 __environ D 0x4 -+GLIBC_2.27 __errno_location F -+GLIBC_2.27 __explicit_bzero_chk F -+GLIBC_2.27 __fbufsize F -+GLIBC_2.27 __fcntl F -+GLIBC_2.27 __fdelt_chk F -+GLIBC_2.27 __fdelt_warn F -+GLIBC_2.27 __ffs F -+GLIBC_2.27 __fgets_chk F -+GLIBC_2.27 __fgets_unlocked_chk F -+GLIBC_2.27 __fgetws_chk F -+GLIBC_2.27 __fgetws_unlocked_chk F -+GLIBC_2.27 __finite F -+GLIBC_2.27 __finitef F -+GLIBC_2.27 __flbf F -+GLIBC_2.27 __fork F -+GLIBC_2.27 __fpending F -+GLIBC_2.27 __fprintf_chk F -+GLIBC_2.27 __fpu_control D 0x4 -+GLIBC_2.27 __fpurge F -+GLIBC_2.27 __fread_chk F -+GLIBC_2.27 __fread_unlocked_chk F -+GLIBC_2.27 __freadable F -+GLIBC_2.27 __freading F -+GLIBC_2.27 __free_hook D 0x4 -+GLIBC_2.27 __freelocale F -+GLIBC_2.27 __fsetlocking F -+GLIBC_2.27 __fwprintf_chk F -+GLIBC_2.27 __fwritable F -+GLIBC_2.27 __fwriting F -+GLIBC_2.27 __fxstat F -+GLIBC_2.27 __fxstat64 F -+GLIBC_2.27 __fxstatat F -+GLIBC_2.27 __fxstatat64 F -+GLIBC_2.27 __getauxval F -+GLIBC_2.27 __getcwd_chk F -+GLIBC_2.27 __getdelim F -+GLIBC_2.27 __getdomainname_chk F -+GLIBC_2.27 __getgroups_chk F -+GLIBC_2.27 __gethostname_chk F -+GLIBC_2.27 __getlogin_r_chk F -+GLIBC_2.27 __getmntent_r F -+GLIBC_2.27 __getpagesize F -+GLIBC_2.27 __getpgid F -+GLIBC_2.27 __getpid F -+GLIBC_2.27 __gets_chk F -+GLIBC_2.27 __gettimeofday F -+GLIBC_2.27 __getwd_chk F -+GLIBC_2.27 __gmtime_r F -+GLIBC_2.27 __h_errno_location F -+GLIBC_2.27 __isalnum_l F -+GLIBC_2.27 __isalpha_l F -+GLIBC_2.27 __isascii_l F -+GLIBC_2.27 __isblank_l F -+GLIBC_2.27 __iscntrl_l F -+GLIBC_2.27 __isctype F -+GLIBC_2.27 __isdigit_l F -+GLIBC_2.27 __isgraph_l F -+GLIBC_2.27 __isinf F -+GLIBC_2.27 __isinff F -+GLIBC_2.27 __islower_l F -+GLIBC_2.27 __isnan F -+GLIBC_2.27 __isnanf F -+GLIBC_2.27 __isoc99_fscanf F -+GLIBC_2.27 __isoc99_fwscanf F -+GLIBC_2.27 __isoc99_scanf F -+GLIBC_2.27 __isoc99_sscanf F -+GLIBC_2.27 __isoc99_swscanf F -+GLIBC_2.27 __isoc99_vfscanf F -+GLIBC_2.27 __isoc99_vfwscanf F -+GLIBC_2.27 __isoc99_vscanf F -+GLIBC_2.27 __isoc99_vsscanf F -+GLIBC_2.27 __isoc99_vswscanf F -+GLIBC_2.27 __isoc99_vwscanf F -+GLIBC_2.27 __isoc99_wscanf F -+GLIBC_2.27 __isprint_l F -+GLIBC_2.27 __ispunct_l F -+GLIBC_2.27 __isspace_l F -+GLIBC_2.27 __isupper_l F -+GLIBC_2.27 __iswalnum_l F -+GLIBC_2.27 __iswalpha_l F -+GLIBC_2.27 __iswblank_l F -+GLIBC_2.27 __iswcntrl_l F -+GLIBC_2.27 __iswctype F -+GLIBC_2.27 __iswctype_l F -+GLIBC_2.27 __iswdigit_l F -+GLIBC_2.27 __iswgraph_l F -+GLIBC_2.27 __iswlower_l F -+GLIBC_2.27 __iswprint_l F -+GLIBC_2.27 __iswpunct_l F -+GLIBC_2.27 __iswspace_l F -+GLIBC_2.27 __iswupper_l F -+GLIBC_2.27 __iswxdigit_l F -+GLIBC_2.27 __isxdigit_l F -+GLIBC_2.27 __ivaliduser F -+GLIBC_2.27 __key_decryptsession_pk_LOCAL D 0x4 -+GLIBC_2.27 __key_encryptsession_pk_LOCAL D 0x4 -+GLIBC_2.27 __key_gendes_LOCAL D 0x4 -+GLIBC_2.27 __libc_allocate_rtsig F -+GLIBC_2.27 __libc_calloc F -+GLIBC_2.27 __libc_current_sigrtmax F -+GLIBC_2.27 __libc_current_sigrtmin F -+GLIBC_2.27 __libc_free F -+GLIBC_2.27 __libc_freeres F -+GLIBC_2.27 __libc_init_first F -+GLIBC_2.27 __libc_mallinfo F -+GLIBC_2.27 __libc_malloc F -+GLIBC_2.27 __libc_mallopt F -+GLIBC_2.27 __libc_memalign F -+GLIBC_2.27 __libc_pvalloc F -+GLIBC_2.27 __libc_realloc F -+GLIBC_2.27 __libc_sa_len F -+GLIBC_2.27 __libc_start_main F -+GLIBC_2.27 __libc_valloc F -+GLIBC_2.27 __longjmp_chk F -+GLIBC_2.27 __lseek F -+GLIBC_2.27 __lxstat F -+GLIBC_2.27 __lxstat64 F -+GLIBC_2.27 __malloc_hook D 0x4 -+GLIBC_2.27 __mbrlen F -+GLIBC_2.27 __mbrtowc F -+GLIBC_2.27 __mbsnrtowcs_chk F -+GLIBC_2.27 __mbsrtowcs_chk F -+GLIBC_2.27 __mbstowcs_chk F -+GLIBC_2.27 __memalign_hook D 0x4 -+GLIBC_2.27 __memcpy_chk F -+GLIBC_2.27 __memmove_chk F -+GLIBC_2.27 __mempcpy F -+GLIBC_2.27 __mempcpy_chk F -+GLIBC_2.27 __memset_chk F -+GLIBC_2.27 __monstartup F -+GLIBC_2.27 __morecore D 0x4 -+GLIBC_2.27 __nanosleep F -+GLIBC_2.27 __newlocale F -+GLIBC_2.27 __nl_langinfo_l F -+GLIBC_2.27 __nss_configure_lookup F -+GLIBC_2.27 __nss_database_lookup F -+GLIBC_2.27 __nss_hostname_digits_dots F -+GLIBC_2.27 __nss_next F -+GLIBC_2.27 __obstack_printf_chk F -+GLIBC_2.27 __obstack_vprintf_chk F -+GLIBC_2.27 __open F -+GLIBC_2.27 __open64 F -+GLIBC_2.27 __open64_2 F -+GLIBC_2.27 __open_2 F -+GLIBC_2.27 __openat64_2 F -+GLIBC_2.27 __openat_2 F -+GLIBC_2.27 __overflow F -+GLIBC_2.27 __pipe F -+GLIBC_2.27 __poll F -+GLIBC_2.27 __poll_chk F -+GLIBC_2.27 __posix_getopt F -+GLIBC_2.27 __ppoll_chk F -+GLIBC_2.27 __pread64 F -+GLIBC_2.27 __pread64_chk F -+GLIBC_2.27 __pread_chk F -+GLIBC_2.27 __printf_chk F -+GLIBC_2.27 __printf_fp F -+GLIBC_2.27 __profile_frequency F -+GLIBC_2.27 __progname D 0x4 -+GLIBC_2.27 __progname_full D 0x4 -+GLIBC_2.27 __ptsname_r_chk F -+GLIBC_2.27 __pwrite64 F -+GLIBC_2.27 __rawmemchr F -+GLIBC_2.27 __rcmd_errstr D 0x4 -+GLIBC_2.27 __read F -+GLIBC_2.27 __read_chk F -+GLIBC_2.27 __readlink_chk F -+GLIBC_2.27 __readlinkat_chk F -+GLIBC_2.27 __realloc_hook D 0x4 -+GLIBC_2.27 __realpath_chk F -+GLIBC_2.27 __recv_chk F -+GLIBC_2.27 __recvfrom_chk F -+GLIBC_2.27 __register_atfork F -+GLIBC_2.27 __res_init F -+GLIBC_2.27 __res_nclose F -+GLIBC_2.27 __res_ninit F -+GLIBC_2.27 __res_randomid F -+GLIBC_2.27 __res_state F -+GLIBC_2.27 __rpc_thread_createerr F -+GLIBC_2.27 __rpc_thread_svc_fdset F -+GLIBC_2.27 __rpc_thread_svc_max_pollfd F -+GLIBC_2.27 __rpc_thread_svc_pollfd F -+GLIBC_2.27 __sbrk F -+GLIBC_2.27 __sched_cpualloc F -+GLIBC_2.27 __sched_cpucount F -+GLIBC_2.27 __sched_cpufree F -+GLIBC_2.27 __sched_get_priority_max F -+GLIBC_2.27 __sched_get_priority_min F -+GLIBC_2.27 __sched_getparam F -+GLIBC_2.27 __sched_getscheduler F -+GLIBC_2.27 __sched_setscheduler F -+GLIBC_2.27 __sched_yield F -+GLIBC_2.27 __select F -+GLIBC_2.27 __send F -+GLIBC_2.27 __setmntent F -+GLIBC_2.27 __setpgid F -+GLIBC_2.27 __sigaction F -+GLIBC_2.27 __signbit F -+GLIBC_2.27 __signbitf F -+GLIBC_2.27 __sigpause F -+GLIBC_2.27 __sigsetjmp F -+GLIBC_2.27 __sigsuspend F -+GLIBC_2.27 __snprintf_chk F -+GLIBC_2.27 __sprintf_chk F -+GLIBC_2.27 __stack_chk_fail F -+GLIBC_2.27 __statfs F -+GLIBC_2.27 __stpcpy F -+GLIBC_2.27 __stpcpy_chk F -+GLIBC_2.27 __stpncpy F -+GLIBC_2.27 __stpncpy_chk F -+GLIBC_2.27 __strcasecmp F -+GLIBC_2.27 __strcasecmp_l F -+GLIBC_2.27 __strcasestr F -+GLIBC_2.27 __strcat_chk F -+GLIBC_2.27 __strcoll_l F -+GLIBC_2.27 __strcpy_chk F -+GLIBC_2.27 __strdup F -+GLIBC_2.27 __strerror_r F -+GLIBC_2.27 __strfmon_l F -+GLIBC_2.27 __strftime_l F -+GLIBC_2.27 __strncasecmp_l F -+GLIBC_2.27 __strncat_chk F -+GLIBC_2.27 __strncpy_chk F -+GLIBC_2.27 __strndup F -+GLIBC_2.27 __strsep_g F -+GLIBC_2.27 __strtod_internal F -+GLIBC_2.27 __strtod_l F -+GLIBC_2.27 __strtof_internal F -+GLIBC_2.27 __strtof_l F -+GLIBC_2.27 __strtok_r F -+GLIBC_2.27 __strtol_internal F -+GLIBC_2.27 __strtol_l F -+GLIBC_2.27 __strtold_internal F -+GLIBC_2.27 __strtold_l F -+GLIBC_2.27 __strtoll_internal F -+GLIBC_2.27 __strtoll_l F -+GLIBC_2.27 __strtoul_internal F -+GLIBC_2.27 __strtoul_l F -+GLIBC_2.27 __strtoull_internal F -+GLIBC_2.27 __strtoull_l F -+GLIBC_2.27 __strverscmp F -+GLIBC_2.27 __strxfrm_l F -+GLIBC_2.27 __swprintf_chk F -+GLIBC_2.27 __syscall_error F -+GLIBC_2.27 __sysconf F -+GLIBC_2.27 __syslog_chk F -+GLIBC_2.27 __sysv_signal F -+GLIBC_2.27 __timezone D 0x4 -+GLIBC_2.27 __toascii_l F -+GLIBC_2.27 __tolower_l F -+GLIBC_2.27 __toupper_l F -+GLIBC_2.27 __towctrans F -+GLIBC_2.27 __towctrans_l F -+GLIBC_2.27 __towlower_l F -+GLIBC_2.27 __towupper_l F -+GLIBC_2.27 __ttyname_r_chk F -+GLIBC_2.27 __tzname D 0x8 -+GLIBC_2.27 __uflow F -+GLIBC_2.27 __underflow F -+GLIBC_2.27 __uselocale F -+GLIBC_2.27 __vasprintf_chk F -+GLIBC_2.27 __vdprintf_chk F -+GLIBC_2.27 __vfork F -+GLIBC_2.27 __vfprintf_chk F -+GLIBC_2.27 __vfscanf F -+GLIBC_2.27 __vfwprintf_chk F -+GLIBC_2.27 __vprintf_chk F -+GLIBC_2.27 __vsnprintf F -+GLIBC_2.27 __vsnprintf_chk F -+GLIBC_2.27 __vsprintf_chk F -+GLIBC_2.27 __vsscanf F -+GLIBC_2.27 __vswprintf_chk F -+GLIBC_2.27 __vsyslog_chk F -+GLIBC_2.27 __vwprintf_chk F -+GLIBC_2.27 __wait F -+GLIBC_2.27 __waitpid F -+GLIBC_2.27 __wcpcpy_chk F -+GLIBC_2.27 __wcpncpy_chk F -+GLIBC_2.27 __wcrtomb_chk F -+GLIBC_2.27 __wcscasecmp_l F -+GLIBC_2.27 __wcscat_chk F -+GLIBC_2.27 __wcscoll_l F -+GLIBC_2.27 __wcscpy_chk F -+GLIBC_2.27 __wcsftime_l F -+GLIBC_2.27 __wcsncasecmp_l F -+GLIBC_2.27 __wcsncat_chk F -+GLIBC_2.27 __wcsncpy_chk F -+GLIBC_2.27 __wcsnrtombs_chk F -+GLIBC_2.27 __wcsrtombs_chk F -+GLIBC_2.27 __wcstod_internal F -+GLIBC_2.27 __wcstod_l F -+GLIBC_2.27 __wcstof_internal F -+GLIBC_2.27 __wcstof_l F -+GLIBC_2.27 __wcstol_internal F -+GLIBC_2.27 __wcstol_l F -+GLIBC_2.27 __wcstold_internal F -+GLIBC_2.27 __wcstold_l F -+GLIBC_2.27 __wcstoll_internal F -+GLIBC_2.27 __wcstoll_l F -+GLIBC_2.27 __wcstombs_chk F -+GLIBC_2.27 __wcstoul_internal F -+GLIBC_2.27 __wcstoul_l F -+GLIBC_2.27 __wcstoull_internal F -+GLIBC_2.27 __wcstoull_l F -+GLIBC_2.27 __wcsxfrm_l F -+GLIBC_2.27 __wctomb_chk F -+GLIBC_2.27 __wctrans_l F -+GLIBC_2.27 __wctype_l F -+GLIBC_2.27 __wmemcpy_chk F -+GLIBC_2.27 __wmemmove_chk F -+GLIBC_2.27 __wmempcpy_chk F -+GLIBC_2.27 __wmemset_chk F -+GLIBC_2.27 __woverflow F -+GLIBC_2.27 __wprintf_chk F -+GLIBC_2.27 __write F -+GLIBC_2.27 __wuflow F -+GLIBC_2.27 __wunderflow F -+GLIBC_2.27 __xmknod F -+GLIBC_2.27 __xmknodat F -+GLIBC_2.27 __xpg_basename F -+GLIBC_2.27 __xpg_sigpause F -+GLIBC_2.27 __xpg_strerror_r F -+GLIBC_2.27 __xstat F -+GLIBC_2.27 __xstat64 F -+GLIBC_2.27 _authenticate F -+GLIBC_2.27 _dl_mcount_wrapper F -+GLIBC_2.27 _dl_mcount_wrapper_check F -+GLIBC_2.27 _environ D 0x4 -+GLIBC_2.27 _exit F -+GLIBC_2.27 _flush_cache F -+GLIBC_2.27 _flushlbf F -+GLIBC_2.27 _libc_intl_domainname D 0x5 -+GLIBC_2.27 _longjmp F -+GLIBC_2.27 _mcleanup F -+GLIBC_2.27 _mcount F -+GLIBC_2.27 _nl_default_dirname D 0x12 -+GLIBC_2.27 _nl_domain_bindings D 0x4 -+GLIBC_2.27 _nl_msg_cat_cntr D 0x4 -+GLIBC_2.27 _null_auth D 0xc -+GLIBC_2.27 _obstack_allocated_p F -+GLIBC_2.27 _obstack_begin F -+GLIBC_2.27 _obstack_begin_1 F -+GLIBC_2.27 _obstack_free F -+GLIBC_2.27 _obstack_memory_used F -+GLIBC_2.27 _obstack_newchunk F -+GLIBC_2.27 _res D 0x200 -+GLIBC_2.27 _res_hconf D 0x30 -+GLIBC_2.27 _rpc_dtablesize F -+GLIBC_2.27 _seterr_reply F -+GLIBC_2.27 _setjmp F -+GLIBC_2.27 _sys_errlist D 0x21c -+GLIBC_2.27 _sys_nerr D 0x4 -+GLIBC_2.27 _sys_siglist D 0x104 -+GLIBC_2.27 _tolower F -+GLIBC_2.27 _toupper F -+GLIBC_2.27 a64l F -+GLIBC_2.27 abort F -+GLIBC_2.27 abs F -+GLIBC_2.27 accept F -+GLIBC_2.27 accept4 F -+GLIBC_2.27 access F -+GLIBC_2.27 acct F -+GLIBC_2.27 addmntent F -+GLIBC_2.27 addseverity F -+GLIBC_2.27 adjtime F -+GLIBC_2.27 adjtimex F -+GLIBC_2.27 alarm F -+GLIBC_2.27 aligned_alloc F -+GLIBC_2.27 alphasort F -+GLIBC_2.27 alphasort64 F -+GLIBC_2.27 argp_err_exit_status D 0x4 -+GLIBC_2.27 argp_error F -+GLIBC_2.27 argp_failure F -+GLIBC_2.27 argp_help F -+GLIBC_2.27 argp_parse F -+GLIBC_2.27 argp_program_bug_address D 0x4 -+GLIBC_2.27 argp_program_version D 0x4 -+GLIBC_2.27 argp_program_version_hook D 0x4 -+GLIBC_2.27 argp_state_help F -+GLIBC_2.27 argp_usage F -+GLIBC_2.27 argz_add F -+GLIBC_2.27 argz_add_sep F -+GLIBC_2.27 argz_append F -+GLIBC_2.27 argz_count F -+GLIBC_2.27 argz_create F -+GLIBC_2.27 argz_create_sep F -+GLIBC_2.27 argz_delete F -+GLIBC_2.27 argz_extract F -+GLIBC_2.27 argz_insert F -+GLIBC_2.27 argz_next F -+GLIBC_2.27 argz_replace F -+GLIBC_2.27 argz_stringify F -+GLIBC_2.27 asctime F -+GLIBC_2.27 asctime_r F -+GLIBC_2.27 asprintf F -+GLIBC_2.27 atof F -+GLIBC_2.27 atoi F -+GLIBC_2.27 atol F -+GLIBC_2.27 atoll F -+GLIBC_2.27 authdes_create F -+GLIBC_2.27 authdes_getucred F -+GLIBC_2.27 authdes_pk_create F -+GLIBC_2.27 authnone_create F -+GLIBC_2.27 authunix_create F -+GLIBC_2.27 authunix_create_default F -+GLIBC_2.27 backtrace F -+GLIBC_2.27 backtrace_symbols F -+GLIBC_2.27 backtrace_symbols_fd F -+GLIBC_2.27 basename F -+GLIBC_2.27 bcmp F -+GLIBC_2.27 bcopy F -+GLIBC_2.27 bind F -+GLIBC_2.27 bind_textdomain_codeset F -+GLIBC_2.27 bindresvport F -+GLIBC_2.27 bindtextdomain F -+GLIBC_2.27 brk F -+GLIBC_2.27 bsd_signal F -+GLIBC_2.27 bsearch F -+GLIBC_2.27 btowc F -+GLIBC_2.27 bzero F -+GLIBC_2.27 c16rtomb F -+GLIBC_2.27 c32rtomb F -+GLIBC_2.27 cacheflush F -+GLIBC_2.27 calloc F -+GLIBC_2.27 callrpc F -+GLIBC_2.27 canonicalize_file_name F -+GLIBC_2.27 capget F -+GLIBC_2.27 capset F -+GLIBC_2.27 catclose F -+GLIBC_2.27 catgets F -+GLIBC_2.27 catopen F -+GLIBC_2.27 cbc_crypt F -+GLIBC_2.27 cfgetispeed F -+GLIBC_2.27 cfgetospeed F -+GLIBC_2.27 cfmakeraw F -+GLIBC_2.27 cfsetispeed F -+GLIBC_2.27 cfsetospeed F -+GLIBC_2.27 cfsetspeed F -+GLIBC_2.27 chdir F -+GLIBC_2.27 chflags F -+GLIBC_2.27 chmod F -+GLIBC_2.27 chown F -+GLIBC_2.27 chroot F -+GLIBC_2.27 clearenv F -+GLIBC_2.27 clearerr F -+GLIBC_2.27 clearerr_unlocked F -+GLIBC_2.27 clnt_broadcast F -+GLIBC_2.27 clnt_create F -+GLIBC_2.27 clnt_pcreateerror F -+GLIBC_2.27 clnt_perrno F -+GLIBC_2.27 clnt_perror F -+GLIBC_2.27 clnt_spcreateerror F -+GLIBC_2.27 clnt_sperrno F -+GLIBC_2.27 clnt_sperror F -+GLIBC_2.27 clntraw_create F -+GLIBC_2.27 clnttcp_create F -+GLIBC_2.27 clntudp_bufcreate F -+GLIBC_2.27 clntudp_create F -+GLIBC_2.27 clntunix_create F -+GLIBC_2.27 clock F -+GLIBC_2.27 clock_adjtime F -+GLIBC_2.27 clock_getcpuclockid F -+GLIBC_2.27 clock_getres F -+GLIBC_2.27 clock_gettime F -+GLIBC_2.27 clock_nanosleep F -+GLIBC_2.27 clock_settime F -+GLIBC_2.27 clone F -+GLIBC_2.27 close F -+GLIBC_2.27 closedir F -+GLIBC_2.27 closelog F -+GLIBC_2.27 confstr F -+GLIBC_2.27 connect F -+GLIBC_2.27 copy_file_range F -+GLIBC_2.27 copysign F -+GLIBC_2.27 copysignf F -+GLIBC_2.27 copysignl F -+GLIBC_2.27 creat F -+GLIBC_2.27 creat64 F -+GLIBC_2.27 ctermid F -+GLIBC_2.27 ctime F -+GLIBC_2.27 ctime_r F -+GLIBC_2.27 cuserid F -+GLIBC_2.27 daemon F -+GLIBC_2.27 daylight D 0x4 -+GLIBC_2.27 dcgettext F -+GLIBC_2.27 dcngettext F -+GLIBC_2.27 delete_module F -+GLIBC_2.27 des_setparity F -+GLIBC_2.27 dgettext F -+GLIBC_2.27 difftime F -+GLIBC_2.27 dirfd F -+GLIBC_2.27 dirname F -+GLIBC_2.27 div F -+GLIBC_2.27 dl_iterate_phdr F -+GLIBC_2.27 dngettext F -+GLIBC_2.27 dprintf F -+GLIBC_2.27 drand48 F -+GLIBC_2.27 drand48_r F -+GLIBC_2.27 dup F -+GLIBC_2.27 dup2 F -+GLIBC_2.27 dup3 F -+GLIBC_2.27 duplocale F -+GLIBC_2.27 dysize F -+GLIBC_2.27 eaccess F -+GLIBC_2.27 ecb_crypt F -+GLIBC_2.27 ecvt F -+GLIBC_2.27 ecvt_r F -+GLIBC_2.27 endaliasent F -+GLIBC_2.27 endfsent F -+GLIBC_2.27 endgrent F -+GLIBC_2.27 endhostent F -+GLIBC_2.27 endmntent F -+GLIBC_2.27 endnetent F -+GLIBC_2.27 endnetgrent F -+GLIBC_2.27 endprotoent F -+GLIBC_2.27 endpwent F -+GLIBC_2.27 endrpcent F -+GLIBC_2.27 endservent F -+GLIBC_2.27 endsgent F -+GLIBC_2.27 endspent F -+GLIBC_2.27 endttyent F -+GLIBC_2.27 endusershell F -+GLIBC_2.27 endutent F -+GLIBC_2.27 endutxent F -+GLIBC_2.27 environ D 0x4 -+GLIBC_2.27 envz_add F -+GLIBC_2.27 envz_entry F -+GLIBC_2.27 envz_get F -+GLIBC_2.27 envz_merge F -+GLIBC_2.27 envz_remove F -+GLIBC_2.27 envz_strip F -+GLIBC_2.27 epoll_create F -+GLIBC_2.27 epoll_create1 F -+GLIBC_2.27 epoll_ctl F -+GLIBC_2.27 epoll_pwait F -+GLIBC_2.27 epoll_wait F -+GLIBC_2.27 erand48 F -+GLIBC_2.27 erand48_r F -+GLIBC_2.27 err F -+GLIBC_2.27 error F -+GLIBC_2.27 error_at_line F -+GLIBC_2.27 error_message_count D 0x4 -+GLIBC_2.27 error_one_per_line D 0x4 -+GLIBC_2.27 error_print_progname D 0x4 -+GLIBC_2.27 errx F -+GLIBC_2.27 ether_aton F -+GLIBC_2.27 ether_aton_r F -+GLIBC_2.27 ether_hostton F -+GLIBC_2.27 ether_line F -+GLIBC_2.27 ether_ntoa F -+GLIBC_2.27 ether_ntoa_r F -+GLIBC_2.27 ether_ntohost F -+GLIBC_2.27 euidaccess F -+GLIBC_2.27 eventfd F -+GLIBC_2.27 eventfd_read F -+GLIBC_2.27 eventfd_write F -+GLIBC_2.27 execl F -+GLIBC_2.27 execle F -+GLIBC_2.27 execlp F -+GLIBC_2.27 execv F -+GLIBC_2.27 execve F -+GLIBC_2.27 execvp F -+GLIBC_2.27 execvpe F -+GLIBC_2.27 exit F -+GLIBC_2.27 explicit_bzero F -+GLIBC_2.27 faccessat F -+GLIBC_2.27 fallocate F -+GLIBC_2.27 fallocate64 F -+GLIBC_2.27 fanotify_init F -+GLIBC_2.27 fanotify_mark F -+GLIBC_2.27 fattach F -+GLIBC_2.27 fchdir F -+GLIBC_2.27 fchflags F -+GLIBC_2.27 fchmod F -+GLIBC_2.27 fchmodat F -+GLIBC_2.27 fchown F -+GLIBC_2.27 fchownat F -+GLIBC_2.27 fclose F -+GLIBC_2.27 fcloseall F -+GLIBC_2.27 fcntl F -+GLIBC_2.27 fcvt F -+GLIBC_2.27 fcvt_r F -+GLIBC_2.27 fdatasync F -+GLIBC_2.27 fdetach F -+GLIBC_2.27 fdopen F -+GLIBC_2.27 fdopendir F -+GLIBC_2.27 feof F -+GLIBC_2.27 feof_unlocked F -+GLIBC_2.27 ferror F -+GLIBC_2.27 ferror_unlocked F -+GLIBC_2.27 fexecve F -+GLIBC_2.27 fflush F -+GLIBC_2.27 fflush_unlocked F -+GLIBC_2.27 ffs F -+GLIBC_2.27 ffsl F -+GLIBC_2.27 ffsll F -+GLIBC_2.27 fgetc F -+GLIBC_2.27 fgetc_unlocked F -+GLIBC_2.27 fgetgrent F -+GLIBC_2.27 fgetgrent_r F -+GLIBC_2.27 fgetpos F -+GLIBC_2.27 fgetpos64 F -+GLIBC_2.27 fgetpwent F -+GLIBC_2.27 fgetpwent_r F -+GLIBC_2.27 fgets F -+GLIBC_2.27 fgets_unlocked F -+GLIBC_2.27 fgetsgent F -+GLIBC_2.27 fgetsgent_r F -+GLIBC_2.27 fgetspent F -+GLIBC_2.27 fgetspent_r F -+GLIBC_2.27 fgetwc F -+GLIBC_2.27 fgetwc_unlocked F -+GLIBC_2.27 fgetws F -+GLIBC_2.27 fgetws_unlocked F -+GLIBC_2.27 fgetxattr F -+GLIBC_2.27 fileno F -+GLIBC_2.27 fileno_unlocked F -+GLIBC_2.27 finite F -+GLIBC_2.27 finitef F -+GLIBC_2.27 finitel F -+GLIBC_2.27 flistxattr F -+GLIBC_2.27 flock F -+GLIBC_2.27 flockfile F -+GLIBC_2.27 fmemopen F -+GLIBC_2.27 fmtmsg F -+GLIBC_2.27 fnmatch F -+GLIBC_2.27 fopen F -+GLIBC_2.27 fopen64 F -+GLIBC_2.27 fopencookie F -+GLIBC_2.27 fork F -+GLIBC_2.27 fpathconf F -+GLIBC_2.27 fprintf F -+GLIBC_2.27 fputc F -+GLIBC_2.27 fputc_unlocked F -+GLIBC_2.27 fputs F -+GLIBC_2.27 fputs_unlocked F -+GLIBC_2.27 fputwc F -+GLIBC_2.27 fputwc_unlocked F -+GLIBC_2.27 fputws F -+GLIBC_2.27 fputws_unlocked F -+GLIBC_2.27 fread F -+GLIBC_2.27 fread_unlocked F -+GLIBC_2.27 free F -+GLIBC_2.27 freeaddrinfo F -+GLIBC_2.27 freeifaddrs F -+GLIBC_2.27 freelocale F -+GLIBC_2.27 fremovexattr F -+GLIBC_2.27 freopen F -+GLIBC_2.27 freopen64 F -+GLIBC_2.27 frexp F -+GLIBC_2.27 frexpf F -+GLIBC_2.27 frexpl F -+GLIBC_2.27 fscanf F -+GLIBC_2.27 fseek F -+GLIBC_2.27 fseeko F -+GLIBC_2.27 fseeko64 F -+GLIBC_2.27 fsetpos F -+GLIBC_2.27 fsetpos64 F -+GLIBC_2.27 fsetxattr F -+GLIBC_2.27 fstatfs F -+GLIBC_2.27 fstatfs64 F -+GLIBC_2.27 fstatvfs F -+GLIBC_2.27 fstatvfs64 F -+GLIBC_2.27 fsync F -+GLIBC_2.27 ftell F -+GLIBC_2.27 ftello F -+GLIBC_2.27 ftello64 F -+GLIBC_2.27 ftime F -+GLIBC_2.27 ftok F -+GLIBC_2.27 ftruncate F -+GLIBC_2.27 ftruncate64 F -+GLIBC_2.27 ftrylockfile F -+GLIBC_2.27 fts64_children F -+GLIBC_2.27 fts64_close F -+GLIBC_2.27 fts64_open F -+GLIBC_2.27 fts64_read F -+GLIBC_2.27 fts64_set F -+GLIBC_2.27 fts_children F -+GLIBC_2.27 fts_close F -+GLIBC_2.27 fts_open F -+GLIBC_2.27 fts_read F -+GLIBC_2.27 fts_set F -+GLIBC_2.27 ftw F -+GLIBC_2.27 ftw64 F -+GLIBC_2.27 funlockfile F -+GLIBC_2.27 futimens F -+GLIBC_2.27 futimes F -+GLIBC_2.27 futimesat F -+GLIBC_2.27 fwide F -+GLIBC_2.27 fwprintf F -+GLIBC_2.27 fwrite F -+GLIBC_2.27 fwrite_unlocked F -+GLIBC_2.27 fwscanf F -+GLIBC_2.27 gai_strerror F -+GLIBC_2.27 gcvt F -+GLIBC_2.27 get_avphys_pages F -+GLIBC_2.27 get_current_dir_name F -+GLIBC_2.27 get_myaddress F -+GLIBC_2.27 get_nprocs F -+GLIBC_2.27 get_nprocs_conf F -+GLIBC_2.27 get_phys_pages F -+GLIBC_2.27 getaddrinfo F -+GLIBC_2.27 getaliasbyname F -+GLIBC_2.27 getaliasbyname_r F -+GLIBC_2.27 getaliasent F -+GLIBC_2.27 getaliasent_r F -+GLIBC_2.27 getauxval F -+GLIBC_2.27 getc F -+GLIBC_2.27 getc_unlocked F -+GLIBC_2.27 getchar F -+GLIBC_2.27 getchar_unlocked F -+GLIBC_2.27 getcontext F -+GLIBC_2.27 getcwd F -+GLIBC_2.27 getdate F -+GLIBC_2.27 getdate_err D 0x4 -+GLIBC_2.27 getdate_r F -+GLIBC_2.27 getdelim F -+GLIBC_2.27 getdirentries F -+GLIBC_2.27 getdirentries64 F -+GLIBC_2.27 getdomainname F -+GLIBC_2.27 getdtablesize F -+GLIBC_2.27 getegid F -+GLIBC_2.27 getentropy F -+GLIBC_2.27 getenv F -+GLIBC_2.27 geteuid F -+GLIBC_2.27 getfsent F -+GLIBC_2.27 getfsfile F -+GLIBC_2.27 getfsspec F -+GLIBC_2.27 getgid F -+GLIBC_2.27 getgrent F -+GLIBC_2.27 getgrent_r F -+GLIBC_2.27 getgrgid F -+GLIBC_2.27 getgrgid_r F -+GLIBC_2.27 getgrnam F -+GLIBC_2.27 getgrnam_r F -+GLIBC_2.27 getgrouplist F -+GLIBC_2.27 getgroups F -+GLIBC_2.27 gethostbyaddr F -+GLIBC_2.27 gethostbyaddr_r F -+GLIBC_2.27 gethostbyname F -+GLIBC_2.27 gethostbyname2 F -+GLIBC_2.27 gethostbyname2_r F -+GLIBC_2.27 gethostbyname_r F -+GLIBC_2.27 gethostent F -+GLIBC_2.27 gethostent_r F -+GLIBC_2.27 gethostid F -+GLIBC_2.27 gethostname F -+GLIBC_2.27 getifaddrs F -+GLIBC_2.27 getipv4sourcefilter F -+GLIBC_2.27 getitimer F -+GLIBC_2.27 getline F -+GLIBC_2.27 getloadavg F -+GLIBC_2.27 getlogin F -+GLIBC_2.27 getlogin_r F -+GLIBC_2.27 getmntent F -+GLIBC_2.27 getmntent_r F -+GLIBC_2.27 getmsg F -+GLIBC_2.27 getnameinfo F -+GLIBC_2.27 getnetbyaddr F -+GLIBC_2.27 getnetbyaddr_r F -+GLIBC_2.27 getnetbyname F -+GLIBC_2.27 getnetbyname_r F -+GLIBC_2.27 getnetent F -+GLIBC_2.27 getnetent_r F -+GLIBC_2.27 getnetgrent F -+GLIBC_2.27 getnetgrent_r F -+GLIBC_2.27 getnetname F -+GLIBC_2.27 getopt F -+GLIBC_2.27 getopt_long F -+GLIBC_2.27 getopt_long_only F -+GLIBC_2.27 getpagesize F -+GLIBC_2.27 getpass F -+GLIBC_2.27 getpeername F -+GLIBC_2.27 getpgid F -+GLIBC_2.27 getpgrp F -+GLIBC_2.27 getpid F -+GLIBC_2.27 getpmsg F -+GLIBC_2.27 getppid F -+GLIBC_2.27 getpriority F -+GLIBC_2.27 getprotobyname F -+GLIBC_2.27 getprotobyname_r F -+GLIBC_2.27 getprotobynumber F -+GLIBC_2.27 getprotobynumber_r F -+GLIBC_2.27 getprotoent F -+GLIBC_2.27 getprotoent_r F -+GLIBC_2.27 getpt F -+GLIBC_2.27 getpublickey F -+GLIBC_2.27 getpw F -+GLIBC_2.27 getpwent F -+GLIBC_2.27 getpwent_r F -+GLIBC_2.27 getpwnam F -+GLIBC_2.27 getpwnam_r F -+GLIBC_2.27 getpwuid F -+GLIBC_2.27 getpwuid_r F -+GLIBC_2.27 getrandom F -+GLIBC_2.27 getresgid F -+GLIBC_2.27 getresuid F -+GLIBC_2.27 getrlimit F -+GLIBC_2.27 getrlimit64 F -+GLIBC_2.27 getrpcbyname F -+GLIBC_2.27 getrpcbyname_r F -+GLIBC_2.27 getrpcbynumber F -+GLIBC_2.27 getrpcbynumber_r F -+GLIBC_2.27 getrpcent F -+GLIBC_2.27 getrpcent_r F -+GLIBC_2.27 getrpcport F -+GLIBC_2.27 getrusage F -+GLIBC_2.27 gets F -+GLIBC_2.27 getsecretkey F -+GLIBC_2.27 getservbyname F -+GLIBC_2.27 getservbyname_r F -+GLIBC_2.27 getservbyport F -+GLIBC_2.27 getservbyport_r F -+GLIBC_2.27 getservent F -+GLIBC_2.27 getservent_r F -+GLIBC_2.27 getsgent F -+GLIBC_2.27 getsgent_r F -+GLIBC_2.27 getsgnam F -+GLIBC_2.27 getsgnam_r F -+GLIBC_2.27 getsid F -+GLIBC_2.27 getsockname F -+GLIBC_2.27 getsockopt F -+GLIBC_2.27 getsourcefilter F -+GLIBC_2.27 getspent F -+GLIBC_2.27 getspent_r F -+GLIBC_2.27 getspnam F -+GLIBC_2.27 getspnam_r F -+GLIBC_2.27 getsubopt F -+GLIBC_2.27 gettext F -+GLIBC_2.27 gettimeofday F -+GLIBC_2.27 getttyent F -+GLIBC_2.27 getttynam F -+GLIBC_2.27 getuid F -+GLIBC_2.27 getusershell F -+GLIBC_2.27 getutent F -+GLIBC_2.27 getutent_r F -+GLIBC_2.27 getutid F -+GLIBC_2.27 getutid_r F -+GLIBC_2.27 getutline F -+GLIBC_2.27 getutline_r F -+GLIBC_2.27 getutmp F -+GLIBC_2.27 getutmpx F -+GLIBC_2.27 getutxent F -+GLIBC_2.27 getutxid F -+GLIBC_2.27 getutxline F -+GLIBC_2.27 getw F -+GLIBC_2.27 getwc F -+GLIBC_2.27 getwc_unlocked F -+GLIBC_2.27 getwchar F -+GLIBC_2.27 getwchar_unlocked F -+GLIBC_2.27 getwd F -+GLIBC_2.27 getxattr F -+GLIBC_2.27 glob F -+GLIBC_2.27 glob64 F -+GLIBC_2.27 glob_pattern_p F -+GLIBC_2.27 globfree F -+GLIBC_2.27 globfree64 F -+GLIBC_2.27 gmtime F -+GLIBC_2.27 gmtime_r F -+GLIBC_2.27 gnu_dev_major F -+GLIBC_2.27 gnu_dev_makedev F -+GLIBC_2.27 gnu_dev_minor F -+GLIBC_2.27 gnu_get_libc_release F -+GLIBC_2.27 gnu_get_libc_version F -+GLIBC_2.27 grantpt F -+GLIBC_2.27 group_member F -+GLIBC_2.27 gsignal F -+GLIBC_2.27 gtty F -+GLIBC_2.27 h_errlist D 0x14 -+GLIBC_2.27 h_nerr D 0x4 -+GLIBC_2.27 hasmntopt F -+GLIBC_2.27 hcreate F -+GLIBC_2.27 hcreate_r F -+GLIBC_2.27 hdestroy F -+GLIBC_2.27 hdestroy_r F -+GLIBC_2.27 herror F -+GLIBC_2.27 host2netname F -+GLIBC_2.27 hsearch F -+GLIBC_2.27 hsearch_r F -+GLIBC_2.27 hstrerror F -+GLIBC_2.27 htonl F -+GLIBC_2.27 htons F -+GLIBC_2.27 iconv F -+GLIBC_2.27 iconv_close F -+GLIBC_2.27 iconv_open F -+GLIBC_2.27 if_freenameindex F -+GLIBC_2.27 if_indextoname F -+GLIBC_2.27 if_nameindex F -+GLIBC_2.27 if_nametoindex F -+GLIBC_2.27 imaxabs F -+GLIBC_2.27 imaxdiv F -+GLIBC_2.27 in6addr_any D 0x10 -+GLIBC_2.27 in6addr_loopback D 0x10 -+GLIBC_2.27 index F -+GLIBC_2.27 inet6_opt_append F -+GLIBC_2.27 inet6_opt_find F -+GLIBC_2.27 inet6_opt_finish F -+GLIBC_2.27 inet6_opt_get_val F -+GLIBC_2.27 inet6_opt_init F -+GLIBC_2.27 inet6_opt_next F -+GLIBC_2.27 inet6_opt_set_val F -+GLIBC_2.27 inet6_option_alloc F -+GLIBC_2.27 inet6_option_append F -+GLIBC_2.27 inet6_option_find F -+GLIBC_2.27 inet6_option_init F -+GLIBC_2.27 inet6_option_next F -+GLIBC_2.27 inet6_option_space F -+GLIBC_2.27 inet6_rth_add F -+GLIBC_2.27 inet6_rth_getaddr F -+GLIBC_2.27 inet6_rth_init F -+GLIBC_2.27 inet6_rth_reverse F -+GLIBC_2.27 inet6_rth_segments F -+GLIBC_2.27 inet6_rth_space F -+GLIBC_2.27 inet_addr F -+GLIBC_2.27 inet_aton F -+GLIBC_2.27 inet_lnaof F -+GLIBC_2.27 inet_makeaddr F -+GLIBC_2.27 inet_netof F -+GLIBC_2.27 inet_network F -+GLIBC_2.27 inet_nsap_addr F -+GLIBC_2.27 inet_nsap_ntoa F -+GLIBC_2.27 inet_ntoa F -+GLIBC_2.27 inet_ntop F -+GLIBC_2.27 inet_pton F -+GLIBC_2.27 init_module F -+GLIBC_2.27 initgroups F -+GLIBC_2.27 initstate F -+GLIBC_2.27 initstate_r F -+GLIBC_2.27 innetgr F -+GLIBC_2.27 inotify_add_watch F -+GLIBC_2.27 inotify_init F -+GLIBC_2.27 inotify_init1 F -+GLIBC_2.27 inotify_rm_watch F -+GLIBC_2.27 insque F -+GLIBC_2.27 ioctl F -+GLIBC_2.27 iruserok F -+GLIBC_2.27 iruserok_af F -+GLIBC_2.27 isalnum F -+GLIBC_2.27 isalnum_l F -+GLIBC_2.27 isalpha F -+GLIBC_2.27 isalpha_l F -+GLIBC_2.27 isascii F -+GLIBC_2.27 isastream F -+GLIBC_2.27 isatty F -+GLIBC_2.27 isblank F -+GLIBC_2.27 isblank_l F -+GLIBC_2.27 iscntrl F -+GLIBC_2.27 iscntrl_l F -+GLIBC_2.27 isctype F -+GLIBC_2.27 isdigit F -+GLIBC_2.27 isdigit_l F -+GLIBC_2.27 isfdtype F -+GLIBC_2.27 isgraph F -+GLIBC_2.27 isgraph_l F -+GLIBC_2.27 isinf F -+GLIBC_2.27 isinff F -+GLIBC_2.27 isinfl F -+GLIBC_2.27 islower F -+GLIBC_2.27 islower_l F -+GLIBC_2.27 isnan F -+GLIBC_2.27 isnanf F -+GLIBC_2.27 isnanl F -+GLIBC_2.27 isprint F -+GLIBC_2.27 isprint_l F -+GLIBC_2.27 ispunct F -+GLIBC_2.27 ispunct_l F -+GLIBC_2.27 isspace F -+GLIBC_2.27 isspace_l F -+GLIBC_2.27 isupper F -+GLIBC_2.27 isupper_l F -+GLIBC_2.27 iswalnum F -+GLIBC_2.27 iswalnum_l F -+GLIBC_2.27 iswalpha F -+GLIBC_2.27 iswalpha_l F -+GLIBC_2.27 iswblank F -+GLIBC_2.27 iswblank_l F -+GLIBC_2.27 iswcntrl F -+GLIBC_2.27 iswcntrl_l F -+GLIBC_2.27 iswctype F -+GLIBC_2.27 iswctype_l F -+GLIBC_2.27 iswdigit F -+GLIBC_2.27 iswdigit_l F -+GLIBC_2.27 iswgraph F -+GLIBC_2.27 iswgraph_l F -+GLIBC_2.27 iswlower F -+GLIBC_2.27 iswlower_l F -+GLIBC_2.27 iswprint F -+GLIBC_2.27 iswprint_l F -+GLIBC_2.27 iswpunct F -+GLIBC_2.27 iswpunct_l F -+GLIBC_2.27 iswspace F -+GLIBC_2.27 iswspace_l F -+GLIBC_2.27 iswupper F -+GLIBC_2.27 iswupper_l F -+GLIBC_2.27 iswxdigit F -+GLIBC_2.27 iswxdigit_l F -+GLIBC_2.27 isxdigit F -+GLIBC_2.27 isxdigit_l F -+GLIBC_2.27 jrand48 F -+GLIBC_2.27 jrand48_r F -+GLIBC_2.27 key_decryptsession F -+GLIBC_2.27 key_decryptsession_pk F -+GLIBC_2.27 key_encryptsession F -+GLIBC_2.27 key_encryptsession_pk F -+GLIBC_2.27 key_gendes F -+GLIBC_2.27 key_get_conv F -+GLIBC_2.27 key_secretkey_is_set F -+GLIBC_2.27 key_setnet F -+GLIBC_2.27 key_setsecret F -+GLIBC_2.27 kill F -+GLIBC_2.27 killpg F -+GLIBC_2.27 klogctl F -+GLIBC_2.27 l64a F -+GLIBC_2.27 labs F -+GLIBC_2.27 lchmod F -+GLIBC_2.27 lchown F -+GLIBC_2.27 lckpwdf F -+GLIBC_2.27 lcong48 F -+GLIBC_2.27 lcong48_r F -+GLIBC_2.27 ldexp F -+GLIBC_2.27 ldexpf F -+GLIBC_2.27 ldexpl F -+GLIBC_2.27 ldiv F -+GLIBC_2.27 lfind F -+GLIBC_2.27 lgetxattr F -+GLIBC_2.27 link F -+GLIBC_2.27 linkat F -+GLIBC_2.27 listen F -+GLIBC_2.27 listxattr F -+GLIBC_2.27 llabs F -+GLIBC_2.27 lldiv F -+GLIBC_2.27 llistxattr F -+GLIBC_2.27 llseek F -+GLIBC_2.27 localeconv F -+GLIBC_2.27 localtime F -+GLIBC_2.27 localtime_r F -+GLIBC_2.27 lockf F -+GLIBC_2.27 lockf64 F -+GLIBC_2.27 longjmp F -+GLIBC_2.27 lrand48 F -+GLIBC_2.27 lrand48_r F -+GLIBC_2.27 lremovexattr F -+GLIBC_2.27 lsearch F -+GLIBC_2.27 lseek F -+GLIBC_2.27 lseek64 F -+GLIBC_2.27 lsetxattr F -+GLIBC_2.27 lutimes F -+GLIBC_2.27 madvise F -+GLIBC_2.27 makecontext F -+GLIBC_2.27 mallinfo F -+GLIBC_2.27 malloc F -+GLIBC_2.27 malloc_info F -+GLIBC_2.27 malloc_stats F -+GLIBC_2.27 malloc_trim F -+GLIBC_2.27 malloc_usable_size F -+GLIBC_2.27 mallopt F -+GLIBC_2.27 mallwatch D 0x4 -+GLIBC_2.27 mblen F -+GLIBC_2.27 mbrlen F -+GLIBC_2.27 mbrtoc16 F -+GLIBC_2.27 mbrtoc32 F -+GLIBC_2.27 mbrtowc F -+GLIBC_2.27 mbsinit F -+GLIBC_2.27 mbsnrtowcs F -+GLIBC_2.27 mbsrtowcs F -+GLIBC_2.27 mbstowcs F -+GLIBC_2.27 mbtowc F -+GLIBC_2.27 mcheck F -+GLIBC_2.27 mcheck_check_all F -+GLIBC_2.27 mcheck_pedantic F -+GLIBC_2.27 memalign F -+GLIBC_2.27 memccpy F -+GLIBC_2.27 memchr F -+GLIBC_2.27 memcmp F -+GLIBC_2.27 memcpy F -+GLIBC_2.27 memfd_create F -+GLIBC_2.27 memfrob F -+GLIBC_2.27 memmem F -+GLIBC_2.27 memmove F -+GLIBC_2.27 mempcpy F -+GLIBC_2.27 memrchr F -+GLIBC_2.27 memset F -+GLIBC_2.27 mincore F -+GLIBC_2.27 mkdir F -+GLIBC_2.27 mkdirat F -+GLIBC_2.27 mkdtemp F -+GLIBC_2.27 mkfifo F -+GLIBC_2.27 mkfifoat F -+GLIBC_2.27 mkostemp F -+GLIBC_2.27 mkostemp64 F -+GLIBC_2.27 mkostemps F -+GLIBC_2.27 mkostemps64 F -+GLIBC_2.27 mkstemp F -+GLIBC_2.27 mkstemp64 F -+GLIBC_2.27 mkstemps F -+GLIBC_2.27 mkstemps64 F -+GLIBC_2.27 mktemp F -+GLIBC_2.27 mktime F -+GLIBC_2.27 mlock F -+GLIBC_2.27 mlock2 F -+GLIBC_2.27 mlockall F -+GLIBC_2.27 mmap F -+GLIBC_2.27 mmap64 F -+GLIBC_2.27 modf F -+GLIBC_2.27 modff F -+GLIBC_2.27 modfl F -+GLIBC_2.27 moncontrol F -+GLIBC_2.27 monstartup F -+GLIBC_2.27 mount F -+GLIBC_2.27 mprobe F -+GLIBC_2.27 mprotect F -+GLIBC_2.27 mrand48 F -+GLIBC_2.27 mrand48_r F -+GLIBC_2.27 mremap F -+GLIBC_2.27 msgctl F -+GLIBC_2.27 msgget F -+GLIBC_2.27 msgrcv F -+GLIBC_2.27 msgsnd F -+GLIBC_2.27 msync F -+GLIBC_2.27 mtrace F -+GLIBC_2.27 munlock F -+GLIBC_2.27 munlockall F -+GLIBC_2.27 munmap F -+GLIBC_2.27 muntrace F -+GLIBC_2.27 name_to_handle_at F -+GLIBC_2.27 nanosleep F -+GLIBC_2.27 netname2host F -+GLIBC_2.27 netname2user F -+GLIBC_2.27 newlocale F -+GLIBC_2.27 nfsservctl F -+GLIBC_2.27 nftw F -+GLIBC_2.27 nftw64 F -+GLIBC_2.27 ngettext F -+GLIBC_2.27 nice F -+GLIBC_2.27 nl_langinfo F -+GLIBC_2.27 nl_langinfo_l F -+GLIBC_2.27 nrand48 F -+GLIBC_2.27 nrand48_r F -+GLIBC_2.27 ntohl F -+GLIBC_2.27 ntohs F -+GLIBC_2.27 ntp_adjtime F -+GLIBC_2.27 ntp_gettime F -+GLIBC_2.27 ntp_gettimex F -+GLIBC_2.27 obstack_alloc_failed_handler D 0x4 -+GLIBC_2.27 obstack_exit_failure D 0x4 -+GLIBC_2.27 obstack_free F -+GLIBC_2.27 obstack_printf F -+GLIBC_2.27 obstack_vprintf F -+GLIBC_2.27 on_exit F -+GLIBC_2.27 open F -+GLIBC_2.27 open64 F -+GLIBC_2.27 open_by_handle_at F -+GLIBC_2.27 open_memstream F -+GLIBC_2.27 open_wmemstream F -+GLIBC_2.27 openat F -+GLIBC_2.27 openat64 F -+GLIBC_2.27 opendir F -+GLIBC_2.27 openlog F -+GLIBC_2.27 optarg D 0x4 -+GLIBC_2.27 opterr D 0x4 -+GLIBC_2.27 optind D 0x4 -+GLIBC_2.27 optopt D 0x4 -+GLIBC_2.27 parse_printf_format F -+GLIBC_2.27 passwd2des F -+GLIBC_2.27 pathconf F -+GLIBC_2.27 pause F -+GLIBC_2.27 pclose F -+GLIBC_2.27 perror F -+GLIBC_2.27 personality F -+GLIBC_2.27 pipe F -+GLIBC_2.27 pipe2 F -+GLIBC_2.27 pivot_root F -+GLIBC_2.27 pkey_alloc F -+GLIBC_2.27 pkey_free F -+GLIBC_2.27 pkey_get F -+GLIBC_2.27 pkey_mprotect F -+GLIBC_2.27 pkey_set F -+GLIBC_2.27 pmap_getmaps F -+GLIBC_2.27 pmap_getport F -+GLIBC_2.27 pmap_rmtcall F -+GLIBC_2.27 pmap_set F -+GLIBC_2.27 pmap_unset F -+GLIBC_2.27 poll F -+GLIBC_2.27 popen F -+GLIBC_2.27 posix_fadvise F -+GLIBC_2.27 posix_fadvise64 F -+GLIBC_2.27 posix_fallocate F -+GLIBC_2.27 posix_fallocate64 F -+GLIBC_2.27 posix_madvise F -+GLIBC_2.27 posix_memalign F -+GLIBC_2.27 posix_openpt F -+GLIBC_2.27 posix_spawn F -+GLIBC_2.27 posix_spawn_file_actions_addclose F -+GLIBC_2.27 posix_spawn_file_actions_adddup2 F -+GLIBC_2.27 posix_spawn_file_actions_addopen F -+GLIBC_2.27 posix_spawn_file_actions_destroy F -+GLIBC_2.27 posix_spawn_file_actions_init F -+GLIBC_2.27 posix_spawnattr_destroy F -+GLIBC_2.27 posix_spawnattr_getflags F -+GLIBC_2.27 posix_spawnattr_getpgroup F -+GLIBC_2.27 posix_spawnattr_getschedparam F -+GLIBC_2.27 posix_spawnattr_getschedpolicy F -+GLIBC_2.27 posix_spawnattr_getsigdefault F -+GLIBC_2.27 posix_spawnattr_getsigmask F -+GLIBC_2.27 posix_spawnattr_init F -+GLIBC_2.27 posix_spawnattr_setflags F -+GLIBC_2.27 posix_spawnattr_setpgroup F -+GLIBC_2.27 posix_spawnattr_setschedparam F -+GLIBC_2.27 posix_spawnattr_setschedpolicy F -+GLIBC_2.27 posix_spawnattr_setsigdefault F -+GLIBC_2.27 posix_spawnattr_setsigmask F -+GLIBC_2.27 posix_spawnp F -+GLIBC_2.27 ppoll F -+GLIBC_2.27 prctl F -+GLIBC_2.27 pread F -+GLIBC_2.27 pread64 F -+GLIBC_2.27 preadv F -+GLIBC_2.27 preadv2 F -+GLIBC_2.27 preadv64 F -+GLIBC_2.27 preadv64v2 F -+GLIBC_2.27 printf F -+GLIBC_2.27 printf_size F -+GLIBC_2.27 printf_size_info F -+GLIBC_2.27 prlimit F -+GLIBC_2.27 prlimit64 F -+GLIBC_2.27 process_vm_readv F -+GLIBC_2.27 process_vm_writev F -+GLIBC_2.27 profil F -+GLIBC_2.27 program_invocation_name D 0x4 -+GLIBC_2.27 program_invocation_short_name D 0x4 -+GLIBC_2.27 pselect F -+GLIBC_2.27 psiginfo F -+GLIBC_2.27 psignal F -+GLIBC_2.27 pthread_attr_destroy F -+GLIBC_2.27 pthread_attr_getdetachstate F -+GLIBC_2.27 pthread_attr_getinheritsched F -+GLIBC_2.27 pthread_attr_getschedparam F -+GLIBC_2.27 pthread_attr_getschedpolicy F -+GLIBC_2.27 pthread_attr_getscope F -+GLIBC_2.27 pthread_attr_init F -+GLIBC_2.27 pthread_attr_setdetachstate F -+GLIBC_2.27 pthread_attr_setinheritsched F -+GLIBC_2.27 pthread_attr_setschedparam F -+GLIBC_2.27 pthread_attr_setschedpolicy F -+GLIBC_2.27 pthread_attr_setscope F -+GLIBC_2.27 pthread_cond_broadcast F -+GLIBC_2.27 pthread_cond_destroy F -+GLIBC_2.27 pthread_cond_init F -+GLIBC_2.27 pthread_cond_signal F -+GLIBC_2.27 pthread_cond_timedwait F -+GLIBC_2.27 pthread_cond_wait F -+GLIBC_2.27 pthread_condattr_destroy F -+GLIBC_2.27 pthread_condattr_init F -+GLIBC_2.27 pthread_equal F -+GLIBC_2.27 pthread_exit F -+GLIBC_2.27 pthread_getschedparam F -+GLIBC_2.27 pthread_mutex_destroy F -+GLIBC_2.27 pthread_mutex_init F -+GLIBC_2.27 pthread_mutex_lock F -+GLIBC_2.27 pthread_mutex_unlock F -+GLIBC_2.27 pthread_self F -+GLIBC_2.27 pthread_setcancelstate F -+GLIBC_2.27 pthread_setcanceltype F -+GLIBC_2.27 pthread_setschedparam F -+GLIBC_2.27 ptrace F -+GLIBC_2.27 ptsname F -+GLIBC_2.27 ptsname_r F -+GLIBC_2.27 putc F -+GLIBC_2.27 putc_unlocked F -+GLIBC_2.27 putchar F -+GLIBC_2.27 putchar_unlocked F -+GLIBC_2.27 putenv F -+GLIBC_2.27 putgrent F -+GLIBC_2.27 putmsg F -+GLIBC_2.27 putpmsg F -+GLIBC_2.27 putpwent F -+GLIBC_2.27 puts F -+GLIBC_2.27 putsgent F -+GLIBC_2.27 putspent F -+GLIBC_2.27 pututline F -+GLIBC_2.27 pututxline F -+GLIBC_2.27 putw F -+GLIBC_2.27 putwc F -+GLIBC_2.27 putwc_unlocked F -+GLIBC_2.27 putwchar F -+GLIBC_2.27 putwchar_unlocked F -+GLIBC_2.27 pvalloc F -+GLIBC_2.27 pwrite F -+GLIBC_2.27 pwrite64 F -+GLIBC_2.27 pwritev F -+GLIBC_2.27 pwritev2 F -+GLIBC_2.27 pwritev64 F -+GLIBC_2.27 pwritev64v2 F -+GLIBC_2.27 qecvt F -+GLIBC_2.27 qecvt_r F -+GLIBC_2.27 qfcvt F -+GLIBC_2.27 qfcvt_r F -+GLIBC_2.27 qgcvt F -+GLIBC_2.27 qsort F -+GLIBC_2.27 qsort_r F -+GLIBC_2.27 quick_exit F -+GLIBC_2.27 quotactl F -+GLIBC_2.27 raise F -+GLIBC_2.27 rand F -+GLIBC_2.27 rand_r F -+GLIBC_2.27 random F -+GLIBC_2.27 random_r F -+GLIBC_2.27 rawmemchr F -+GLIBC_2.27 rcmd F -+GLIBC_2.27 rcmd_af F -+GLIBC_2.27 re_comp F -+GLIBC_2.27 re_compile_fastmap F -+GLIBC_2.27 re_compile_pattern F -+GLIBC_2.27 re_exec F -+GLIBC_2.27 re_match F -+GLIBC_2.27 re_match_2 F -+GLIBC_2.27 re_search F -+GLIBC_2.27 re_search_2 F -+GLIBC_2.27 re_set_registers F -+GLIBC_2.27 re_set_syntax F -+GLIBC_2.27 re_syntax_options D 0x4 -+GLIBC_2.27 read F -+GLIBC_2.27 readahead F -+GLIBC_2.27 readdir F -+GLIBC_2.27 readdir64 F -+GLIBC_2.27 readdir64_r F -+GLIBC_2.27 readdir_r F -+GLIBC_2.27 readlink F -+GLIBC_2.27 readlinkat F -+GLIBC_2.27 readv F -+GLIBC_2.27 realloc F -+GLIBC_2.27 reallocarray F -+GLIBC_2.27 realpath F -+GLIBC_2.27 reboot F -+GLIBC_2.27 recv F -+GLIBC_2.27 recvfrom F -+GLIBC_2.27 recvmmsg F -+GLIBC_2.27 recvmsg F -+GLIBC_2.27 regcomp F -+GLIBC_2.27 regerror F -+GLIBC_2.27 regexec F -+GLIBC_2.27 regfree F -+GLIBC_2.27 register_printf_function F -+GLIBC_2.27 register_printf_modifier F -+GLIBC_2.27 register_printf_specifier F -+GLIBC_2.27 register_printf_type F -+GLIBC_2.27 registerrpc F -+GLIBC_2.27 remap_file_pages F -+GLIBC_2.27 remove F -+GLIBC_2.27 removexattr F -+GLIBC_2.27 remque F -+GLIBC_2.27 rename F -+GLIBC_2.27 renameat F -+GLIBC_2.27 revoke F -+GLIBC_2.27 rewind F -+GLIBC_2.27 rewinddir F -+GLIBC_2.27 rexec F -+GLIBC_2.27 rexec_af F -+GLIBC_2.27 rexecoptions D 0x4 -+GLIBC_2.27 rindex F -+GLIBC_2.27 rmdir F -+GLIBC_2.27 rpc_createerr D 0x10 -+GLIBC_2.27 rpmatch F -+GLIBC_2.27 rresvport F -+GLIBC_2.27 rresvport_af F -+GLIBC_2.27 rtime F -+GLIBC_2.27 ruserok F -+GLIBC_2.27 ruserok_af F -+GLIBC_2.27 ruserpass F -+GLIBC_2.27 sbrk F -+GLIBC_2.27 scalbn F -+GLIBC_2.27 scalbnf F -+GLIBC_2.27 scalbnl F -+GLIBC_2.27 scandir F -+GLIBC_2.27 scandir64 F -+GLIBC_2.27 scandirat F -+GLIBC_2.27 scandirat64 F -+GLIBC_2.27 scanf F -+GLIBC_2.27 sched_get_priority_max F -+GLIBC_2.27 sched_get_priority_min F -+GLIBC_2.27 sched_getaffinity F -+GLIBC_2.27 sched_getcpu F -+GLIBC_2.27 sched_getparam F -+GLIBC_2.27 sched_getscheduler F -+GLIBC_2.27 sched_rr_get_interval F -+GLIBC_2.27 sched_setaffinity F -+GLIBC_2.27 sched_setparam F -+GLIBC_2.27 sched_setscheduler F -+GLIBC_2.27 sched_yield F -+GLIBC_2.27 secure_getenv F -+GLIBC_2.27 seed48 F -+GLIBC_2.27 seed48_r F -+GLIBC_2.27 seekdir F -+GLIBC_2.27 select F -+GLIBC_2.27 semctl F -+GLIBC_2.27 semget F -+GLIBC_2.27 semop F -+GLIBC_2.27 semtimedop F -+GLIBC_2.27 send F -+GLIBC_2.27 sendfile F -+GLIBC_2.27 sendfile64 F -+GLIBC_2.27 sendmmsg F -+GLIBC_2.27 sendmsg F -+GLIBC_2.27 sendto F -+GLIBC_2.27 setaliasent F -+GLIBC_2.27 setbuf F -+GLIBC_2.27 setbuffer F -+GLIBC_2.27 setcontext F -+GLIBC_2.27 setdomainname F -+GLIBC_2.27 setegid F -+GLIBC_2.27 setenv F -+GLIBC_2.27 seteuid F -+GLIBC_2.27 setfsent F -+GLIBC_2.27 setfsgid F -+GLIBC_2.27 setfsuid F -+GLIBC_2.27 setgid F -+GLIBC_2.27 setgrent F -+GLIBC_2.27 setgroups F -+GLIBC_2.27 sethostent F -+GLIBC_2.27 sethostid F -+GLIBC_2.27 sethostname F -+GLIBC_2.27 setipv4sourcefilter F -+GLIBC_2.27 setitimer F -+GLIBC_2.27 setjmp F -+GLIBC_2.27 setlinebuf F -+GLIBC_2.27 setlocale F -+GLIBC_2.27 setlogin F -+GLIBC_2.27 setlogmask F -+GLIBC_2.27 setmntent F -+GLIBC_2.27 setnetent F -+GLIBC_2.27 setnetgrent F -+GLIBC_2.27 setns F -+GLIBC_2.27 setpgid F -+GLIBC_2.27 setpgrp F -+GLIBC_2.27 setpriority F -+GLIBC_2.27 setprotoent F -+GLIBC_2.27 setpwent F -+GLIBC_2.27 setregid F -+GLIBC_2.27 setresgid F -+GLIBC_2.27 setresuid F -+GLIBC_2.27 setreuid F -+GLIBC_2.27 setrlimit F -+GLIBC_2.27 setrlimit64 F -+GLIBC_2.27 setrpcent F -+GLIBC_2.27 setservent F -+GLIBC_2.27 setsgent F -+GLIBC_2.27 setsid F -+GLIBC_2.27 setsockopt F -+GLIBC_2.27 setsourcefilter F -+GLIBC_2.27 setspent F -+GLIBC_2.27 setstate F -+GLIBC_2.27 setstate_r F -+GLIBC_2.27 settimeofday F -+GLIBC_2.27 setttyent F -+GLIBC_2.27 setuid F -+GLIBC_2.27 setusershell F -+GLIBC_2.27 setutent F -+GLIBC_2.27 setutxent F -+GLIBC_2.27 setvbuf F -+GLIBC_2.27 setxattr F -+GLIBC_2.27 sgetsgent F -+GLIBC_2.27 sgetsgent_r F -+GLIBC_2.27 sgetspent F -+GLIBC_2.27 sgetspent_r F -+GLIBC_2.27 shmat F -+GLIBC_2.27 shmctl F -+GLIBC_2.27 shmdt F -+GLIBC_2.27 shmget F -+GLIBC_2.27 shutdown F -+GLIBC_2.27 sigaction F -+GLIBC_2.27 sigaddset F -+GLIBC_2.27 sigaltstack F -+GLIBC_2.27 sigandset F -+GLIBC_2.27 sigblock F -+GLIBC_2.27 sigdelset F -+GLIBC_2.27 sigemptyset F -+GLIBC_2.27 sigfillset F -+GLIBC_2.27 siggetmask F -+GLIBC_2.27 sighold F -+GLIBC_2.27 sigignore F -+GLIBC_2.27 siginterrupt F -+GLIBC_2.27 sigisemptyset F -+GLIBC_2.27 sigismember F -+GLIBC_2.27 siglongjmp F -+GLIBC_2.27 signal F -+GLIBC_2.27 signalfd F -+GLIBC_2.27 sigorset F -+GLIBC_2.27 sigpause F -+GLIBC_2.27 sigpending F -+GLIBC_2.27 sigprocmask F -+GLIBC_2.27 sigqueue F -+GLIBC_2.27 sigrelse F -+GLIBC_2.27 sigreturn F -+GLIBC_2.27 sigset F -+GLIBC_2.27 sigsetmask F -+GLIBC_2.27 sigstack F -+GLIBC_2.27 sigsuspend F -+GLIBC_2.27 sigtimedwait F -+GLIBC_2.27 sigwait F -+GLIBC_2.27 sigwaitinfo F -+GLIBC_2.27 sleep F -+GLIBC_2.27 snprintf F -+GLIBC_2.27 sockatmark F -+GLIBC_2.27 socket F -+GLIBC_2.27 socketpair F -+GLIBC_2.27 splice F -+GLIBC_2.27 sprintf F -+GLIBC_2.27 sprofil F -+GLIBC_2.27 srand F -+GLIBC_2.27 srand48 F -+GLIBC_2.27 srand48_r F -+GLIBC_2.27 srandom F -+GLIBC_2.27 srandom_r F -+GLIBC_2.27 sscanf F -+GLIBC_2.27 ssignal F -+GLIBC_2.27 sstk F -+GLIBC_2.27 statfs F -+GLIBC_2.27 statfs64 F -+GLIBC_2.27 statvfs F -+GLIBC_2.27 statvfs64 F -+GLIBC_2.27 stderr D 0x4 -+GLIBC_2.27 stdin D 0x4 -+GLIBC_2.27 stdout D 0x4 -+GLIBC_2.27 stime F -+GLIBC_2.27 stpcpy F -+GLIBC_2.27 stpncpy F -+GLIBC_2.27 strcasecmp F -+GLIBC_2.27 strcasecmp_l F -+GLIBC_2.27 strcasestr F -+GLIBC_2.27 strcat F -+GLIBC_2.27 strchr F -+GLIBC_2.27 strchrnul F -+GLIBC_2.27 strcmp F -+GLIBC_2.27 strcoll F -+GLIBC_2.27 strcoll_l F -+GLIBC_2.27 strcpy F -+GLIBC_2.27 strcspn F -+GLIBC_2.27 strdup F -+GLIBC_2.27 strerror F -+GLIBC_2.27 strerror_l F -+GLIBC_2.27 strerror_r F -+GLIBC_2.27 strfmon F -+GLIBC_2.27 strfmon_l F -+GLIBC_2.27 strfromd F -+GLIBC_2.27 strfromf F -+GLIBC_2.27 strfromf32 F -+GLIBC_2.27 strfromf32x F -+GLIBC_2.27 strfromf64 F -+GLIBC_2.27 strfroml F -+GLIBC_2.27 strfry F -+GLIBC_2.27 strftime F -+GLIBC_2.27 strftime_l F -+GLIBC_2.27 strlen F -+GLIBC_2.27 strncasecmp F -+GLIBC_2.27 strncasecmp_l F -+GLIBC_2.27 strncat F -+GLIBC_2.27 strncmp F -+GLIBC_2.27 strncpy F -+GLIBC_2.27 strndup F -+GLIBC_2.27 strnlen F -+GLIBC_2.27 strpbrk F -+GLIBC_2.27 strptime F -+GLIBC_2.27 strptime_l F -+GLIBC_2.27 strrchr F -+GLIBC_2.27 strsep F -+GLIBC_2.27 strsignal F -+GLIBC_2.27 strspn F -+GLIBC_2.27 strstr F -+GLIBC_2.27 strtod F -+GLIBC_2.27 strtod_l F -+GLIBC_2.27 strtof F -+GLIBC_2.27 strtof32 F -+GLIBC_2.27 strtof32_l F -+GLIBC_2.27 strtof32x F -+GLIBC_2.27 strtof32x_l F -+GLIBC_2.27 strtof64 F -+GLIBC_2.27 strtof64_l F -+GLIBC_2.27 strtof_l F -+GLIBC_2.27 strtoimax F -+GLIBC_2.27 strtok F -+GLIBC_2.27 strtok_r F -+GLIBC_2.27 strtol F -+GLIBC_2.27 strtol_l F -+GLIBC_2.27 strtold F -+GLIBC_2.27 strtold_l F -+GLIBC_2.27 strtoll F -+GLIBC_2.27 strtoll_l F -+GLIBC_2.27 strtoq F -+GLIBC_2.27 strtoul F -+GLIBC_2.27 strtoul_l F -+GLIBC_2.27 strtoull F -+GLIBC_2.27 strtoull_l F -+GLIBC_2.27 strtoumax F -+GLIBC_2.27 strtouq F -+GLIBC_2.27 strverscmp F -+GLIBC_2.27 strxfrm F -+GLIBC_2.27 strxfrm_l F -+GLIBC_2.27 stty F -+GLIBC_2.27 svc_exit F -+GLIBC_2.27 svc_fdset D 0x80 -+GLIBC_2.27 svc_getreq F -+GLIBC_2.27 svc_getreq_common F -+GLIBC_2.27 svc_getreq_poll F -+GLIBC_2.27 svc_getreqset F -+GLIBC_2.27 svc_max_pollfd D 0x4 -+GLIBC_2.27 svc_pollfd D 0x4 -+GLIBC_2.27 svc_register F -+GLIBC_2.27 svc_run F -+GLIBC_2.27 svc_sendreply F -+GLIBC_2.27 svc_unregister F -+GLIBC_2.27 svcauthdes_stats D 0xc -+GLIBC_2.27 svcerr_auth F -+GLIBC_2.27 svcerr_decode F -+GLIBC_2.27 svcerr_noproc F -+GLIBC_2.27 svcerr_noprog F -+GLIBC_2.27 svcerr_progvers F -+GLIBC_2.27 svcerr_systemerr F -+GLIBC_2.27 svcerr_weakauth F -+GLIBC_2.27 svcfd_create F -+GLIBC_2.27 svcraw_create F -+GLIBC_2.27 svctcp_create F -+GLIBC_2.27 svcudp_bufcreate F -+GLIBC_2.27 svcudp_create F -+GLIBC_2.27 svcudp_enablecache F -+GLIBC_2.27 svcunix_create F -+GLIBC_2.27 svcunixfd_create F -+GLIBC_2.27 swab F -+GLIBC_2.27 swapcontext F -+GLIBC_2.27 swapoff F -+GLIBC_2.27 swapon F -+GLIBC_2.27 swprintf F -+GLIBC_2.27 swscanf F -+GLIBC_2.27 symlink F -+GLIBC_2.27 symlinkat F -+GLIBC_2.27 sync F -+GLIBC_2.27 sync_file_range F -+GLIBC_2.27 syncfs F -+GLIBC_2.27 sys_errlist D 0x21c -+GLIBC_2.27 sys_nerr D 0x4 -+GLIBC_2.27 sys_sigabbrev D 0x104 -+GLIBC_2.27 sys_siglist D 0x104 -+GLIBC_2.27 syscall F -+GLIBC_2.27 sysconf F -+GLIBC_2.27 sysctl F -+GLIBC_2.27 sysinfo F -+GLIBC_2.27 syslog F -+GLIBC_2.27 system F -+GLIBC_2.27 sysv_signal F -+GLIBC_2.27 tcdrain F -+GLIBC_2.27 tcflow F -+GLIBC_2.27 tcflush F -+GLIBC_2.27 tcgetattr F -+GLIBC_2.27 tcgetpgrp F -+GLIBC_2.27 tcgetsid F -+GLIBC_2.27 tcsendbreak F -+GLIBC_2.27 tcsetattr F -+GLIBC_2.27 tcsetpgrp F -+GLIBC_2.27 tdelete F -+GLIBC_2.27 tdestroy F -+GLIBC_2.27 tee F -+GLIBC_2.27 telldir F -+GLIBC_2.27 tempnam F -+GLIBC_2.27 textdomain F -+GLIBC_2.27 tfind F -+GLIBC_2.27 time F -+GLIBC_2.27 timegm F -+GLIBC_2.27 timelocal F -+GLIBC_2.27 timerfd_create F -+GLIBC_2.27 timerfd_gettime F -+GLIBC_2.27 timerfd_settime F -+GLIBC_2.27 times F -+GLIBC_2.27 timespec_get F -+GLIBC_2.27 timezone D 0x4 -+GLIBC_2.27 tmpfile F -+GLIBC_2.27 tmpfile64 F -+GLIBC_2.27 tmpnam F -+GLIBC_2.27 tmpnam_r F -+GLIBC_2.27 toascii F -+GLIBC_2.27 tolower F -+GLIBC_2.27 tolower_l F -+GLIBC_2.27 toupper F -+GLIBC_2.27 toupper_l F -+GLIBC_2.27 towctrans F -+GLIBC_2.27 towctrans_l F -+GLIBC_2.27 towlower F -+GLIBC_2.27 towlower_l F -+GLIBC_2.27 towupper F -+GLIBC_2.27 towupper_l F -+GLIBC_2.27 tr_break F -+GLIBC_2.27 truncate F -+GLIBC_2.27 truncate64 F -+GLIBC_2.27 tsearch F -+GLIBC_2.27 ttyname F -+GLIBC_2.27 ttyname_r F -+GLIBC_2.27 ttyslot F -+GLIBC_2.27 twalk F -+GLIBC_2.27 tzname D 0x8 -+GLIBC_2.27 tzset F -+GLIBC_2.27 ualarm F -+GLIBC_2.27 ulckpwdf F -+GLIBC_2.27 ulimit F -+GLIBC_2.27 umask F -+GLIBC_2.27 umount F -+GLIBC_2.27 umount2 F -+GLIBC_2.27 uname F -+GLIBC_2.27 ungetc F -+GLIBC_2.27 ungetwc F -+GLIBC_2.27 unlink F -+GLIBC_2.27 unlinkat F -+GLIBC_2.27 unlockpt F -+GLIBC_2.27 unsetenv F -+GLIBC_2.27 unshare F -+GLIBC_2.27 updwtmp F -+GLIBC_2.27 updwtmpx F -+GLIBC_2.27 uselocale F -+GLIBC_2.27 user2netname F -+GLIBC_2.27 usleep F -+GLIBC_2.27 ustat F -+GLIBC_2.27 utime F -+GLIBC_2.27 utimensat F -+GLIBC_2.27 utimes F -+GLIBC_2.27 utmpname F -+GLIBC_2.27 utmpxname F -+GLIBC_2.27 valloc F -+GLIBC_2.27 vasprintf F -+GLIBC_2.27 vdprintf F -+GLIBC_2.27 verr F -+GLIBC_2.27 verrx F -+GLIBC_2.27 versionsort F -+GLIBC_2.27 versionsort64 F -+GLIBC_2.27 vfork F -+GLIBC_2.27 vfprintf F -+GLIBC_2.27 vfscanf F -+GLIBC_2.27 vfwprintf F -+GLIBC_2.27 vfwscanf F -+GLIBC_2.27 vhangup F -+GLIBC_2.27 vlimit F -+GLIBC_2.27 vmsplice F -+GLIBC_2.27 vprintf F -+GLIBC_2.27 vscanf F -+GLIBC_2.27 vsnprintf F -+GLIBC_2.27 vsprintf F -+GLIBC_2.27 vsscanf F -+GLIBC_2.27 vswprintf F -+GLIBC_2.27 vswscanf F -+GLIBC_2.27 vsyslog F -+GLIBC_2.27 vtimes F -+GLIBC_2.27 vwarn F -+GLIBC_2.27 vwarnx F -+GLIBC_2.27 vwprintf F -+GLIBC_2.27 vwscanf F -+GLIBC_2.27 wait F -+GLIBC_2.27 wait3 F -+GLIBC_2.27 wait4 F -+GLIBC_2.27 waitid F -+GLIBC_2.27 waitpid F -+GLIBC_2.27 warn F -+GLIBC_2.27 warnx F -+GLIBC_2.27 wcpcpy F -+GLIBC_2.27 wcpncpy F -+GLIBC_2.27 wcrtomb F -+GLIBC_2.27 wcscasecmp F -+GLIBC_2.27 wcscasecmp_l F -+GLIBC_2.27 wcscat F -+GLIBC_2.27 wcschr F -+GLIBC_2.27 wcschrnul F -+GLIBC_2.27 wcscmp F -+GLIBC_2.27 wcscoll F -+GLIBC_2.27 wcscoll_l F -+GLIBC_2.27 wcscpy F -+GLIBC_2.27 wcscspn F -+GLIBC_2.27 wcsdup F -+GLIBC_2.27 wcsftime F -+GLIBC_2.27 wcsftime_l F -+GLIBC_2.27 wcslen F -+GLIBC_2.27 wcsncasecmp F -+GLIBC_2.27 wcsncasecmp_l F -+GLIBC_2.27 wcsncat F -+GLIBC_2.27 wcsncmp F -+GLIBC_2.27 wcsncpy F -+GLIBC_2.27 wcsnlen F -+GLIBC_2.27 wcsnrtombs F -+GLIBC_2.27 wcspbrk F -+GLIBC_2.27 wcsrchr F -+GLIBC_2.27 wcsrtombs F -+GLIBC_2.27 wcsspn F -+GLIBC_2.27 wcsstr F -+GLIBC_2.27 wcstod F -+GLIBC_2.27 wcstod_l F -+GLIBC_2.27 wcstof F -+GLIBC_2.27 wcstof32 F -+GLIBC_2.27 wcstof32_l F -+GLIBC_2.27 wcstof32x F -+GLIBC_2.27 wcstof32x_l F -+GLIBC_2.27 wcstof64 F -+GLIBC_2.27 wcstof64_l F -+GLIBC_2.27 wcstof_l F -+GLIBC_2.27 wcstoimax F -+GLIBC_2.27 wcstok F -+GLIBC_2.27 wcstol F -+GLIBC_2.27 wcstol_l F -+GLIBC_2.27 wcstold F -+GLIBC_2.27 wcstold_l F -+GLIBC_2.27 wcstoll F -+GLIBC_2.27 wcstoll_l F -+GLIBC_2.27 wcstombs F -+GLIBC_2.27 wcstoq F -+GLIBC_2.27 wcstoul F -+GLIBC_2.27 wcstoul_l F -+GLIBC_2.27 wcstoull F -+GLIBC_2.27 wcstoull_l F -+GLIBC_2.27 wcstoumax F -+GLIBC_2.27 wcstouq F -+GLIBC_2.27 wcswcs F -+GLIBC_2.27 wcswidth F -+GLIBC_2.27 wcsxfrm F -+GLIBC_2.27 wcsxfrm_l F -+GLIBC_2.27 wctob F -+GLIBC_2.27 wctomb F -+GLIBC_2.27 wctrans F -+GLIBC_2.27 wctrans_l F -+GLIBC_2.27 wctype F -+GLIBC_2.27 wctype_l F -+GLIBC_2.27 wcwidth F -+GLIBC_2.27 wmemchr F -+GLIBC_2.27 wmemcmp F -+GLIBC_2.27 wmemcpy F -+GLIBC_2.27 wmemmove F -+GLIBC_2.27 wmempcpy F -+GLIBC_2.27 wmemset F -+GLIBC_2.27 wordexp F -+GLIBC_2.27 wordfree F -+GLIBC_2.27 wprintf F -+GLIBC_2.27 write F -+GLIBC_2.27 writev F -+GLIBC_2.27 wscanf F -+GLIBC_2.27 xdecrypt F -+GLIBC_2.27 xdr_accepted_reply F -+GLIBC_2.27 xdr_array F -+GLIBC_2.27 xdr_authdes_cred F -+GLIBC_2.27 xdr_authdes_verf F -+GLIBC_2.27 xdr_authunix_parms F -+GLIBC_2.27 xdr_bool F -+GLIBC_2.27 xdr_bytes F -+GLIBC_2.27 xdr_callhdr F -+GLIBC_2.27 xdr_callmsg F -+GLIBC_2.27 xdr_char F -+GLIBC_2.27 xdr_cryptkeyarg F -+GLIBC_2.27 xdr_cryptkeyarg2 F -+GLIBC_2.27 xdr_cryptkeyres F -+GLIBC_2.27 xdr_des_block F -+GLIBC_2.27 xdr_double F -+GLIBC_2.27 xdr_enum F -+GLIBC_2.27 xdr_float F -+GLIBC_2.27 xdr_free F -+GLIBC_2.27 xdr_getcredres F -+GLIBC_2.27 xdr_hyper F -+GLIBC_2.27 xdr_int F -+GLIBC_2.27 xdr_int16_t F -+GLIBC_2.27 xdr_int32_t F -+GLIBC_2.27 xdr_int64_t F -+GLIBC_2.27 xdr_int8_t F -+GLIBC_2.27 xdr_key_netstarg F -+GLIBC_2.27 xdr_key_netstres F -+GLIBC_2.27 xdr_keybuf F -+GLIBC_2.27 xdr_keystatus F -+GLIBC_2.27 xdr_long F -+GLIBC_2.27 xdr_longlong_t F -+GLIBC_2.27 xdr_netnamestr F -+GLIBC_2.27 xdr_netobj F -+GLIBC_2.27 xdr_opaque F -+GLIBC_2.27 xdr_opaque_auth F -+GLIBC_2.27 xdr_pmap F -+GLIBC_2.27 xdr_pmaplist F -+GLIBC_2.27 xdr_pointer F -+GLIBC_2.27 xdr_quad_t F -+GLIBC_2.27 xdr_reference F -+GLIBC_2.27 xdr_rejected_reply F -+GLIBC_2.27 xdr_replymsg F -+GLIBC_2.27 xdr_rmtcall_args F -+GLIBC_2.27 xdr_rmtcallres F -+GLIBC_2.27 xdr_short F -+GLIBC_2.27 xdr_sizeof F -+GLIBC_2.27 xdr_string F -+GLIBC_2.27 xdr_u_char F -+GLIBC_2.27 xdr_u_hyper F -+GLIBC_2.27 xdr_u_int F -+GLIBC_2.27 xdr_u_long F -+GLIBC_2.27 xdr_u_longlong_t F -+GLIBC_2.27 xdr_u_quad_t F -+GLIBC_2.27 xdr_u_short F -+GLIBC_2.27 xdr_uint16_t F -+GLIBC_2.27 xdr_uint32_t F -+GLIBC_2.27 xdr_uint64_t F -+GLIBC_2.27 xdr_uint8_t F -+GLIBC_2.27 xdr_union F -+GLIBC_2.27 xdr_unixcred F -+GLIBC_2.27 xdr_vector F -+GLIBC_2.27 xdr_void F -+GLIBC_2.27 xdr_wrapstring F -+GLIBC_2.27 xdrmem_create F -+GLIBC_2.27 xdrrec_create F -+GLIBC_2.27 xdrrec_endofrecord F -+GLIBC_2.27 xdrrec_eof F -+GLIBC_2.27 xdrrec_skiprecord F -+GLIBC_2.27 xdrstdio_create F -+GLIBC_2.27 xencrypt F -+GLIBC_2.27 xprt_register F -+GLIBC_2.27 xprt_unregister F -+GLIBC_2.28 fcntl F -+GLIBC_2.28 fcntl64 F -+GLIBC_2.28 renameat2 F -+GLIBC_2.28 statx F -+GLIBC_2.28 thrd_current F -+GLIBC_2.28 thrd_equal F -+GLIBC_2.28 thrd_sleep F -+GLIBC_2.28 thrd_yield F -diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist -new file mode 100644 -index 000000000000..9484dca79ea6 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libcrypt.abilist -@@ -0,0 +1,7 @@ -+GLIBC_2.27 crypt F -+GLIBC_2.27 crypt_r F -+GLIBC_2.27 encrypt F -+GLIBC_2.27 encrypt_r F -+GLIBC_2.27 fcrypt F -+GLIBC_2.27 setkey F -+GLIBC_2.27 setkey_r F -diff --git a/sysdeps/unix/sysv/linux/arc/libdl.abilist b/sysdeps/unix/sysv/linux/arc/libdl.abilist -new file mode 100644 -index 000000000000..16adcae553d8 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libdl.abilist -@@ -0,0 +1,9 @@ -+GLIBC_2.27 dladdr F -+GLIBC_2.27 dladdr1 F -+GLIBC_2.27 dlclose F -+GLIBC_2.27 dlerror F -+GLIBC_2.27 dlinfo F -+GLIBC_2.27 dlmopen F -+GLIBC_2.27 dlopen F -+GLIBC_2.27 dlsym F -+GLIBC_2.27 dlvsym F -diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/libm.abilist -new file mode 100644 -index 000000000000..52b3db50a2bb ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libm.abilist -@@ -0,0 +1,753 @@ -+GLIBC_2.27 __acos_finite F -+GLIBC_2.27 __acosf_finite F -+GLIBC_2.27 __acosh_finite F -+GLIBC_2.27 __acoshf_finite F -+GLIBC_2.27 __asin_finite F -+GLIBC_2.27 __asinf_finite F -+GLIBC_2.27 __atan2_finite F -+GLIBC_2.27 __atan2f_finite F -+GLIBC_2.27 __atanh_finite F -+GLIBC_2.27 __atanhf_finite F -+GLIBC_2.27 __clog10 F -+GLIBC_2.27 __clog10f F -+GLIBC_2.27 __clog10l F -+GLIBC_2.27 __cosh_finite F -+GLIBC_2.27 __coshf_finite F -+GLIBC_2.27 __exp10_finite F -+GLIBC_2.27 __exp10f_finite F -+GLIBC_2.27 __exp2_finite F -+GLIBC_2.27 __exp2f_finite F -+GLIBC_2.27 __exp_finite F -+GLIBC_2.27 __expf_finite F -+GLIBC_2.27 __finite F -+GLIBC_2.27 __finitef F -+GLIBC_2.27 __fmod_finite F -+GLIBC_2.27 __fmodf_finite F -+GLIBC_2.27 __fpclassify F -+GLIBC_2.27 __fpclassifyf F -+GLIBC_2.27 __gamma_r_finite F -+GLIBC_2.27 __gammaf_r_finite F -+GLIBC_2.27 __hypot_finite F -+GLIBC_2.27 __hypotf_finite F -+GLIBC_2.27 __iseqsig F -+GLIBC_2.27 __iseqsigf F -+GLIBC_2.27 __issignaling F -+GLIBC_2.27 __issignalingf F -+GLIBC_2.27 __j0_finite F -+GLIBC_2.27 __j0f_finite F -+GLIBC_2.27 __j1_finite F -+GLIBC_2.27 __j1f_finite F -+GLIBC_2.27 __jn_finite F -+GLIBC_2.27 __jnf_finite F -+GLIBC_2.27 __lgamma_r_finite F -+GLIBC_2.27 __lgammaf_r_finite F -+GLIBC_2.27 __log10_finite F -+GLIBC_2.27 __log10f_finite F -+GLIBC_2.27 __log2_finite F -+GLIBC_2.27 __log2f_finite F -+GLIBC_2.27 __log_finite F -+GLIBC_2.27 __logf_finite F -+GLIBC_2.27 __pow_finite F -+GLIBC_2.27 __powf_finite F -+GLIBC_2.27 __remainder_finite F -+GLIBC_2.27 __remainderf_finite F -+GLIBC_2.27 __scalb_finite F -+GLIBC_2.27 __scalbf_finite F -+GLIBC_2.27 __signbit F -+GLIBC_2.27 __signbitf F -+GLIBC_2.27 __signgam D 0x4 -+GLIBC_2.27 __sinh_finite F -+GLIBC_2.27 __sinhf_finite F -+GLIBC_2.27 __sqrt_finite F -+GLIBC_2.27 __sqrtf_finite F -+GLIBC_2.27 __y0_finite F -+GLIBC_2.27 __y0f_finite F -+GLIBC_2.27 __y1_finite F -+GLIBC_2.27 __y1f_finite F -+GLIBC_2.27 __yn_finite F -+GLIBC_2.27 __ynf_finite F -+GLIBC_2.27 acos F -+GLIBC_2.27 acosf F -+GLIBC_2.27 acosf32 F -+GLIBC_2.27 acosf32x F -+GLIBC_2.27 acosf64 F -+GLIBC_2.27 acosh F -+GLIBC_2.27 acoshf F -+GLIBC_2.27 acoshf32 F -+GLIBC_2.27 acoshf32x F -+GLIBC_2.27 acoshf64 F -+GLIBC_2.27 acoshl F -+GLIBC_2.27 acosl F -+GLIBC_2.27 asin F -+GLIBC_2.27 asinf F -+GLIBC_2.27 asinf32 F -+GLIBC_2.27 asinf32x F -+GLIBC_2.27 asinf64 F -+GLIBC_2.27 asinh F -+GLIBC_2.27 asinhf F -+GLIBC_2.27 asinhf32 F -+GLIBC_2.27 asinhf32x F -+GLIBC_2.27 asinhf64 F -+GLIBC_2.27 asinhl F -+GLIBC_2.27 asinl F -+GLIBC_2.27 atan F -+GLIBC_2.27 atan2 F -+GLIBC_2.27 atan2f F -+GLIBC_2.27 atan2f32 F -+GLIBC_2.27 atan2f32x F -+GLIBC_2.27 atan2f64 F -+GLIBC_2.27 atan2l F -+GLIBC_2.27 atanf F -+GLIBC_2.27 atanf32 F -+GLIBC_2.27 atanf32x F -+GLIBC_2.27 atanf64 F -+GLIBC_2.27 atanh F -+GLIBC_2.27 atanhf F -+GLIBC_2.27 atanhf32 F -+GLIBC_2.27 atanhf32x F -+GLIBC_2.27 atanhf64 F -+GLIBC_2.27 atanhl F -+GLIBC_2.27 atanl F -+GLIBC_2.27 cabs F -+GLIBC_2.27 cabsf F -+GLIBC_2.27 cabsf32 F -+GLIBC_2.27 cabsf32x F -+GLIBC_2.27 cabsf64 F -+GLIBC_2.27 cabsl F -+GLIBC_2.27 cacos F -+GLIBC_2.27 cacosf F -+GLIBC_2.27 cacosf32 F -+GLIBC_2.27 cacosf32x F -+GLIBC_2.27 cacosf64 F -+GLIBC_2.27 cacosh F -+GLIBC_2.27 cacoshf F -+GLIBC_2.27 cacoshf32 F -+GLIBC_2.27 cacoshf32x F -+GLIBC_2.27 cacoshf64 F -+GLIBC_2.27 cacoshl F -+GLIBC_2.27 cacosl F -+GLIBC_2.27 canonicalize F -+GLIBC_2.27 canonicalizef F -+GLIBC_2.27 canonicalizef32 F -+GLIBC_2.27 canonicalizef32x F -+GLIBC_2.27 canonicalizef64 F -+GLIBC_2.27 canonicalizel F -+GLIBC_2.27 carg F -+GLIBC_2.27 cargf F -+GLIBC_2.27 cargf32 F -+GLIBC_2.27 cargf32x F -+GLIBC_2.27 cargf64 F -+GLIBC_2.27 cargl F -+GLIBC_2.27 casin F -+GLIBC_2.27 casinf F -+GLIBC_2.27 casinf32 F -+GLIBC_2.27 casinf32x F -+GLIBC_2.27 casinf64 F -+GLIBC_2.27 casinh F -+GLIBC_2.27 casinhf F -+GLIBC_2.27 casinhf32 F -+GLIBC_2.27 casinhf32x F -+GLIBC_2.27 casinhf64 F -+GLIBC_2.27 casinhl F -+GLIBC_2.27 casinl F -+GLIBC_2.27 catan F -+GLIBC_2.27 catanf F -+GLIBC_2.27 catanf32 F -+GLIBC_2.27 catanf32x F -+GLIBC_2.27 catanf64 F -+GLIBC_2.27 catanh F -+GLIBC_2.27 catanhf F -+GLIBC_2.27 catanhf32 F -+GLIBC_2.27 catanhf32x F -+GLIBC_2.27 catanhf64 F -+GLIBC_2.27 catanhl F -+GLIBC_2.27 catanl F -+GLIBC_2.27 cbrt F -+GLIBC_2.27 cbrtf F -+GLIBC_2.27 cbrtf32 F -+GLIBC_2.27 cbrtf32x F -+GLIBC_2.27 cbrtf64 F -+GLIBC_2.27 cbrtl F -+GLIBC_2.27 ccos F -+GLIBC_2.27 ccosf F -+GLIBC_2.27 ccosf32 F -+GLIBC_2.27 ccosf32x F -+GLIBC_2.27 ccosf64 F -+GLIBC_2.27 ccosh F -+GLIBC_2.27 ccoshf F -+GLIBC_2.27 ccoshf32 F -+GLIBC_2.27 ccoshf32x F -+GLIBC_2.27 ccoshf64 F -+GLIBC_2.27 ccoshl F -+GLIBC_2.27 ccosl F -+GLIBC_2.27 ceil F -+GLIBC_2.27 ceilf F -+GLIBC_2.27 ceilf32 F -+GLIBC_2.27 ceilf32x F -+GLIBC_2.27 ceilf64 F -+GLIBC_2.27 ceill F -+GLIBC_2.27 cexp F -+GLIBC_2.27 cexpf F -+GLIBC_2.27 cexpf32 F -+GLIBC_2.27 cexpf32x F -+GLIBC_2.27 cexpf64 F -+GLIBC_2.27 cexpl F -+GLIBC_2.27 cimag F -+GLIBC_2.27 cimagf F -+GLIBC_2.27 cimagf32 F -+GLIBC_2.27 cimagf32x F -+GLIBC_2.27 cimagf64 F -+GLIBC_2.27 cimagl F -+GLIBC_2.27 clog F -+GLIBC_2.27 clog10 F -+GLIBC_2.27 clog10f F -+GLIBC_2.27 clog10f32 F -+GLIBC_2.27 clog10f32x F -+GLIBC_2.27 clog10f64 F -+GLIBC_2.27 clog10l F -+GLIBC_2.27 clogf F -+GLIBC_2.27 clogf32 F -+GLIBC_2.27 clogf32x F -+GLIBC_2.27 clogf64 F -+GLIBC_2.27 clogl F -+GLIBC_2.27 conj F -+GLIBC_2.27 conjf F -+GLIBC_2.27 conjf32 F -+GLIBC_2.27 conjf32x F -+GLIBC_2.27 conjf64 F -+GLIBC_2.27 conjl F -+GLIBC_2.27 copysign F -+GLIBC_2.27 copysignf F -+GLIBC_2.27 copysignf32 F -+GLIBC_2.27 copysignf32x F -+GLIBC_2.27 copysignf64 F -+GLIBC_2.27 copysignl F -+GLIBC_2.27 cos F -+GLIBC_2.27 cosf F -+GLIBC_2.27 cosf32 F -+GLIBC_2.27 cosf32x F -+GLIBC_2.27 cosf64 F -+GLIBC_2.27 cosh F -+GLIBC_2.27 coshf F -+GLIBC_2.27 coshf32 F -+GLIBC_2.27 coshf32x F -+GLIBC_2.27 coshf64 F -+GLIBC_2.27 coshl F -+GLIBC_2.27 cosl F -+GLIBC_2.27 cpow F -+GLIBC_2.27 cpowf F -+GLIBC_2.27 cpowf32 F -+GLIBC_2.27 cpowf32x F -+GLIBC_2.27 cpowf64 F -+GLIBC_2.27 cpowl F -+GLIBC_2.27 cproj F -+GLIBC_2.27 cprojf F -+GLIBC_2.27 cprojf32 F -+GLIBC_2.27 cprojf32x F -+GLIBC_2.27 cprojf64 F -+GLIBC_2.27 cprojl F -+GLIBC_2.27 creal F -+GLIBC_2.27 crealf F -+GLIBC_2.27 crealf32 F -+GLIBC_2.27 crealf32x F -+GLIBC_2.27 crealf64 F -+GLIBC_2.27 creall F -+GLIBC_2.27 csin F -+GLIBC_2.27 csinf F -+GLIBC_2.27 csinf32 F -+GLIBC_2.27 csinf32x F -+GLIBC_2.27 csinf64 F -+GLIBC_2.27 csinh F -+GLIBC_2.27 csinhf F -+GLIBC_2.27 csinhf32 F -+GLIBC_2.27 csinhf32x F -+GLIBC_2.27 csinhf64 F -+GLIBC_2.27 csinhl F -+GLIBC_2.27 csinl F -+GLIBC_2.27 csqrt F -+GLIBC_2.27 csqrtf F -+GLIBC_2.27 csqrtf32 F -+GLIBC_2.27 csqrtf32x F -+GLIBC_2.27 csqrtf64 F -+GLIBC_2.27 csqrtl F -+GLIBC_2.27 ctan F -+GLIBC_2.27 ctanf F -+GLIBC_2.27 ctanf32 F -+GLIBC_2.27 ctanf32x F -+GLIBC_2.27 ctanf64 F -+GLIBC_2.27 ctanh F -+GLIBC_2.27 ctanhf F -+GLIBC_2.27 ctanhf32 F -+GLIBC_2.27 ctanhf32x F -+GLIBC_2.27 ctanhf64 F -+GLIBC_2.27 ctanhl F -+GLIBC_2.27 ctanl F -+GLIBC_2.27 drem F -+GLIBC_2.27 dremf F -+GLIBC_2.27 dreml F -+GLIBC_2.27 erf F -+GLIBC_2.27 erfc F -+GLIBC_2.27 erfcf F -+GLIBC_2.27 erfcf32 F -+GLIBC_2.27 erfcf32x F -+GLIBC_2.27 erfcf64 F -+GLIBC_2.27 erfcl F -+GLIBC_2.27 erff F -+GLIBC_2.27 erff32 F -+GLIBC_2.27 erff32x F -+GLIBC_2.27 erff64 F -+GLIBC_2.27 erfl F -+GLIBC_2.27 exp F -+GLIBC_2.27 exp10 F -+GLIBC_2.27 exp10f F -+GLIBC_2.27 exp10f32 F -+GLIBC_2.27 exp10f32x F -+GLIBC_2.27 exp10f64 F -+GLIBC_2.27 exp10l F -+GLIBC_2.27 exp2 F -+GLIBC_2.27 exp2f F -+GLIBC_2.27 exp2f32 F -+GLIBC_2.27 exp2f32x F -+GLIBC_2.27 exp2f64 F -+GLIBC_2.27 exp2l F -+GLIBC_2.27 expf F -+GLIBC_2.27 expf32 F -+GLIBC_2.27 expf32x F -+GLIBC_2.27 expf64 F -+GLIBC_2.27 expl F -+GLIBC_2.27 expm1 F -+GLIBC_2.27 expm1f F -+GLIBC_2.27 expm1f32 F -+GLIBC_2.27 expm1f32x F -+GLIBC_2.27 expm1f64 F -+GLIBC_2.27 expm1l F -+GLIBC_2.27 fabs F -+GLIBC_2.27 fabsf F -+GLIBC_2.27 fabsf32 F -+GLIBC_2.27 fabsf32x F -+GLIBC_2.27 fabsf64 F -+GLIBC_2.27 fabsl F -+GLIBC_2.27 fdim F -+GLIBC_2.27 fdimf F -+GLIBC_2.27 fdimf32 F -+GLIBC_2.27 fdimf32x F -+GLIBC_2.27 fdimf64 F -+GLIBC_2.27 fdiml F -+GLIBC_2.27 feclearexcept F -+GLIBC_2.27 fedisableexcept F -+GLIBC_2.27 feenableexcept F -+GLIBC_2.27 fegetenv F -+GLIBC_2.27 fegetexcept F -+GLIBC_2.27 fegetexceptflag F -+GLIBC_2.27 fegetmode F -+GLIBC_2.27 fegetround F -+GLIBC_2.27 feholdexcept F -+GLIBC_2.27 feraiseexcept F -+GLIBC_2.27 fesetenv F -+GLIBC_2.27 fesetexcept F -+GLIBC_2.27 fesetexceptflag F -+GLIBC_2.27 fesetmode F -+GLIBC_2.27 fesetround F -+GLIBC_2.27 fetestexcept F -+GLIBC_2.27 fetestexceptflag F -+GLIBC_2.27 feupdateenv F -+GLIBC_2.27 finite F -+GLIBC_2.27 finitef F -+GLIBC_2.27 finitel F -+GLIBC_2.27 floor F -+GLIBC_2.27 floorf F -+GLIBC_2.27 floorf32 F -+GLIBC_2.27 floorf32x F -+GLIBC_2.27 floorf64 F -+GLIBC_2.27 floorl F -+GLIBC_2.27 fma F -+GLIBC_2.27 fmaf F -+GLIBC_2.27 fmaf32 F -+GLIBC_2.27 fmaf32x F -+GLIBC_2.27 fmaf64 F -+GLIBC_2.27 fmal F -+GLIBC_2.27 fmax F -+GLIBC_2.27 fmaxf F -+GLIBC_2.27 fmaxf32 F -+GLIBC_2.27 fmaxf32x F -+GLIBC_2.27 fmaxf64 F -+GLIBC_2.27 fmaxl F -+GLIBC_2.27 fmaxmag F -+GLIBC_2.27 fmaxmagf F -+GLIBC_2.27 fmaxmagf32 F -+GLIBC_2.27 fmaxmagf32x F -+GLIBC_2.27 fmaxmagf64 F -+GLIBC_2.27 fmaxmagl F -+GLIBC_2.27 fmin F -+GLIBC_2.27 fminf F -+GLIBC_2.27 fminf32 F -+GLIBC_2.27 fminf32x F -+GLIBC_2.27 fminf64 F -+GLIBC_2.27 fminl F -+GLIBC_2.27 fminmag F -+GLIBC_2.27 fminmagf F -+GLIBC_2.27 fminmagf32 F -+GLIBC_2.27 fminmagf32x F -+GLIBC_2.27 fminmagf64 F -+GLIBC_2.27 fminmagl F -+GLIBC_2.27 fmod F -+GLIBC_2.27 fmodf F -+GLIBC_2.27 fmodf32 F -+GLIBC_2.27 fmodf32x F -+GLIBC_2.27 fmodf64 F -+GLIBC_2.27 fmodl F -+GLIBC_2.27 frexp F -+GLIBC_2.27 frexpf F -+GLIBC_2.27 frexpf32 F -+GLIBC_2.27 frexpf32x F -+GLIBC_2.27 frexpf64 F -+GLIBC_2.27 frexpl F -+GLIBC_2.27 fromfp F -+GLIBC_2.27 fromfpf F -+GLIBC_2.27 fromfpf32 F -+GLIBC_2.27 fromfpf32x F -+GLIBC_2.27 fromfpf64 F -+GLIBC_2.27 fromfpl F -+GLIBC_2.27 fromfpx F -+GLIBC_2.27 fromfpxf F -+GLIBC_2.27 fromfpxf32 F -+GLIBC_2.27 fromfpxf32x F -+GLIBC_2.27 fromfpxf64 F -+GLIBC_2.27 fromfpxl F -+GLIBC_2.27 gamma F -+GLIBC_2.27 gammaf F -+GLIBC_2.27 gammal F -+GLIBC_2.27 getpayload F -+GLIBC_2.27 getpayloadf F -+GLIBC_2.27 getpayloadf32 F -+GLIBC_2.27 getpayloadf32x F -+GLIBC_2.27 getpayloadf64 F -+GLIBC_2.27 getpayloadl F -+GLIBC_2.27 hypot F -+GLIBC_2.27 hypotf F -+GLIBC_2.27 hypotf32 F -+GLIBC_2.27 hypotf32x F -+GLIBC_2.27 hypotf64 F -+GLIBC_2.27 hypotl F -+GLIBC_2.27 ilogb F -+GLIBC_2.27 ilogbf F -+GLIBC_2.27 ilogbf32 F -+GLIBC_2.27 ilogbf32x F -+GLIBC_2.27 ilogbf64 F -+GLIBC_2.27 ilogbl F -+GLIBC_2.27 j0 F -+GLIBC_2.27 j0f F -+GLIBC_2.27 j0f32 F -+GLIBC_2.27 j0f32x F -+GLIBC_2.27 j0f64 F -+GLIBC_2.27 j0l F -+GLIBC_2.27 j1 F -+GLIBC_2.27 j1f F -+GLIBC_2.27 j1f32 F -+GLIBC_2.27 j1f32x F -+GLIBC_2.27 j1f64 F -+GLIBC_2.27 j1l F -+GLIBC_2.27 jn F -+GLIBC_2.27 jnf F -+GLIBC_2.27 jnf32 F -+GLIBC_2.27 jnf32x F -+GLIBC_2.27 jnf64 F -+GLIBC_2.27 jnl F -+GLIBC_2.27 ldexp F -+GLIBC_2.27 ldexpf F -+GLIBC_2.27 ldexpf32 F -+GLIBC_2.27 ldexpf32x F -+GLIBC_2.27 ldexpf64 F -+GLIBC_2.27 ldexpl F -+GLIBC_2.27 lgamma F -+GLIBC_2.27 lgamma_r F -+GLIBC_2.27 lgammaf F -+GLIBC_2.27 lgammaf32 F -+GLIBC_2.27 lgammaf32_r F -+GLIBC_2.27 lgammaf32x F -+GLIBC_2.27 lgammaf32x_r F -+GLIBC_2.27 lgammaf64 F -+GLIBC_2.27 lgammaf64_r F -+GLIBC_2.27 lgammaf_r F -+GLIBC_2.27 lgammal F -+GLIBC_2.27 lgammal_r F -+GLIBC_2.27 llogb F -+GLIBC_2.27 llogbf F -+GLIBC_2.27 llogbf32 F -+GLIBC_2.27 llogbf32x F -+GLIBC_2.27 llogbf64 F -+GLIBC_2.27 llogbl F -+GLIBC_2.27 llrint F -+GLIBC_2.27 llrintf F -+GLIBC_2.27 llrintf32 F -+GLIBC_2.27 llrintf32x F -+GLIBC_2.27 llrintf64 F -+GLIBC_2.27 llrintl F -+GLIBC_2.27 llround F -+GLIBC_2.27 llroundf F -+GLIBC_2.27 llroundf32 F -+GLIBC_2.27 llroundf32x F -+GLIBC_2.27 llroundf64 F -+GLIBC_2.27 llroundl F -+GLIBC_2.27 log F -+GLIBC_2.27 log10 F -+GLIBC_2.27 log10f F -+GLIBC_2.27 log10f32 F -+GLIBC_2.27 log10f32x F -+GLIBC_2.27 log10f64 F -+GLIBC_2.27 log10l F -+GLIBC_2.27 log1p F -+GLIBC_2.27 log1pf F -+GLIBC_2.27 log1pf32 F -+GLIBC_2.27 log1pf32x F -+GLIBC_2.27 log1pf64 F -+GLIBC_2.27 log1pl F -+GLIBC_2.27 log2 F -+GLIBC_2.27 log2f F -+GLIBC_2.27 log2f32 F -+GLIBC_2.27 log2f32x F -+GLIBC_2.27 log2f64 F -+GLIBC_2.27 log2l F -+GLIBC_2.27 logb F -+GLIBC_2.27 logbf F -+GLIBC_2.27 logbf32 F -+GLIBC_2.27 logbf32x F -+GLIBC_2.27 logbf64 F -+GLIBC_2.27 logbl F -+GLIBC_2.27 logf F -+GLIBC_2.27 logf32 F -+GLIBC_2.27 logf32x F -+GLIBC_2.27 logf64 F -+GLIBC_2.27 logl F -+GLIBC_2.27 lrint F -+GLIBC_2.27 lrintf F -+GLIBC_2.27 lrintf32 F -+GLIBC_2.27 lrintf32x F -+GLIBC_2.27 lrintf64 F -+GLIBC_2.27 lrintl F -+GLIBC_2.27 lround F -+GLIBC_2.27 lroundf F -+GLIBC_2.27 lroundf32 F -+GLIBC_2.27 lroundf32x F -+GLIBC_2.27 lroundf64 F -+GLIBC_2.27 lroundl F -+GLIBC_2.27 modf F -+GLIBC_2.27 modff F -+GLIBC_2.27 modff32 F -+GLIBC_2.27 modff32x F -+GLIBC_2.27 modff64 F -+GLIBC_2.27 modfl F -+GLIBC_2.27 nan F -+GLIBC_2.27 nanf F -+GLIBC_2.27 nanf32 F -+GLIBC_2.27 nanf32x F -+GLIBC_2.27 nanf64 F -+GLIBC_2.27 nanl F -+GLIBC_2.27 nearbyint F -+GLIBC_2.27 nearbyintf F -+GLIBC_2.27 nearbyintf32 F -+GLIBC_2.27 nearbyintf32x F -+GLIBC_2.27 nearbyintf64 F -+GLIBC_2.27 nearbyintl F -+GLIBC_2.27 nextafter F -+GLIBC_2.27 nextafterf F -+GLIBC_2.27 nextafterf32 F -+GLIBC_2.27 nextafterf32x F -+GLIBC_2.27 nextafterf64 F -+GLIBC_2.27 nextafterl F -+GLIBC_2.27 nextdown F -+GLIBC_2.27 nextdownf F -+GLIBC_2.27 nextdownf32 F -+GLIBC_2.27 nextdownf32x F -+GLIBC_2.27 nextdownf64 F -+GLIBC_2.27 nextdownl F -+GLIBC_2.27 nexttoward F -+GLIBC_2.27 nexttowardf F -+GLIBC_2.27 nexttowardl F -+GLIBC_2.27 nextup F -+GLIBC_2.27 nextupf F -+GLIBC_2.27 nextupf32 F -+GLIBC_2.27 nextupf32x F -+GLIBC_2.27 nextupf64 F -+GLIBC_2.27 nextupl F -+GLIBC_2.27 pow F -+GLIBC_2.27 powf F -+GLIBC_2.27 powf32 F -+GLIBC_2.27 powf32x F -+GLIBC_2.27 powf64 F -+GLIBC_2.27 powl F -+GLIBC_2.27 remainder F -+GLIBC_2.27 remainderf F -+GLIBC_2.27 remainderf32 F -+GLIBC_2.27 remainderf32x F -+GLIBC_2.27 remainderf64 F -+GLIBC_2.27 remainderl F -+GLIBC_2.27 remquo F -+GLIBC_2.27 remquof F -+GLIBC_2.27 remquof32 F -+GLIBC_2.27 remquof32x F -+GLIBC_2.27 remquof64 F -+GLIBC_2.27 remquol F -+GLIBC_2.27 rint F -+GLIBC_2.27 rintf F -+GLIBC_2.27 rintf32 F -+GLIBC_2.27 rintf32x F -+GLIBC_2.27 rintf64 F -+GLIBC_2.27 rintl F -+GLIBC_2.27 round F -+GLIBC_2.27 roundeven F -+GLIBC_2.27 roundevenf F -+GLIBC_2.27 roundevenf32 F -+GLIBC_2.27 roundevenf32x F -+GLIBC_2.27 roundevenf64 F -+GLIBC_2.27 roundevenl F -+GLIBC_2.27 roundf F -+GLIBC_2.27 roundf32 F -+GLIBC_2.27 roundf32x F -+GLIBC_2.27 roundf64 F -+GLIBC_2.27 roundl F -+GLIBC_2.27 scalb F -+GLIBC_2.27 scalbf F -+GLIBC_2.27 scalbl F -+GLIBC_2.27 scalbln F -+GLIBC_2.27 scalblnf F -+GLIBC_2.27 scalblnf32 F -+GLIBC_2.27 scalblnf32x F -+GLIBC_2.27 scalblnf64 F -+GLIBC_2.27 scalblnl F -+GLIBC_2.27 scalbn F -+GLIBC_2.27 scalbnf F -+GLIBC_2.27 scalbnf32 F -+GLIBC_2.27 scalbnf32x F -+GLIBC_2.27 scalbnf64 F -+GLIBC_2.27 scalbnl F -+GLIBC_2.27 setpayload F -+GLIBC_2.27 setpayloadf F -+GLIBC_2.27 setpayloadf32 F -+GLIBC_2.27 setpayloadf32x F -+GLIBC_2.27 setpayloadf64 F -+GLIBC_2.27 setpayloadl F -+GLIBC_2.27 setpayloadsig F -+GLIBC_2.27 setpayloadsigf F -+GLIBC_2.27 setpayloadsigf32 F -+GLIBC_2.27 setpayloadsigf32x F -+GLIBC_2.27 setpayloadsigf64 F -+GLIBC_2.27 setpayloadsigl F -+GLIBC_2.27 signgam D 0x4 -+GLIBC_2.27 significand F -+GLIBC_2.27 significandf F -+GLIBC_2.27 significandl F -+GLIBC_2.27 sin F -+GLIBC_2.27 sincos F -+GLIBC_2.27 sincosf F -+GLIBC_2.27 sincosf32 F -+GLIBC_2.27 sincosf32x F -+GLIBC_2.27 sincosf64 F -+GLIBC_2.27 sincosl F -+GLIBC_2.27 sinf F -+GLIBC_2.27 sinf32 F -+GLIBC_2.27 sinf32x F -+GLIBC_2.27 sinf64 F -+GLIBC_2.27 sinh F -+GLIBC_2.27 sinhf F -+GLIBC_2.27 sinhf32 F -+GLIBC_2.27 sinhf32x F -+GLIBC_2.27 sinhf64 F -+GLIBC_2.27 sinhl F -+GLIBC_2.27 sinl F -+GLIBC_2.27 sqrt F -+GLIBC_2.27 sqrtf F -+GLIBC_2.27 sqrtf32 F -+GLIBC_2.27 sqrtf32x F -+GLIBC_2.27 sqrtf64 F -+GLIBC_2.27 sqrtl F -+GLIBC_2.27 tan F -+GLIBC_2.27 tanf F -+GLIBC_2.27 tanf32 F -+GLIBC_2.27 tanf32x F -+GLIBC_2.27 tanf64 F -+GLIBC_2.27 tanh F -+GLIBC_2.27 tanhf F -+GLIBC_2.27 tanhf32 F -+GLIBC_2.27 tanhf32x F -+GLIBC_2.27 tanhf64 F -+GLIBC_2.27 tanhl F -+GLIBC_2.27 tanl F -+GLIBC_2.27 tgamma F -+GLIBC_2.27 tgammaf F -+GLIBC_2.27 tgammaf32 F -+GLIBC_2.27 tgammaf32x F -+GLIBC_2.27 tgammaf64 F -+GLIBC_2.27 tgammal F -+GLIBC_2.27 totalorder F -+GLIBC_2.27 totalorderf F -+GLIBC_2.27 totalorderf32 F -+GLIBC_2.27 totalorderf32x F -+GLIBC_2.27 totalorderf64 F -+GLIBC_2.27 totalorderl F -+GLIBC_2.27 totalordermag F -+GLIBC_2.27 totalordermagf F -+GLIBC_2.27 totalordermagf32 F -+GLIBC_2.27 totalordermagf32x F -+GLIBC_2.27 totalordermagf64 F -+GLIBC_2.27 totalordermagl F -+GLIBC_2.27 trunc F -+GLIBC_2.27 truncf F -+GLIBC_2.27 truncf32 F -+GLIBC_2.27 truncf32x F -+GLIBC_2.27 truncf64 F -+GLIBC_2.27 truncl F -+GLIBC_2.27 ufromfp F -+GLIBC_2.27 ufromfpf F -+GLIBC_2.27 ufromfpf32 F -+GLIBC_2.27 ufromfpf32x F -+GLIBC_2.27 ufromfpf64 F -+GLIBC_2.27 ufromfpl F -+GLIBC_2.27 ufromfpx F -+GLIBC_2.27 ufromfpxf F -+GLIBC_2.27 ufromfpxf32 F -+GLIBC_2.27 ufromfpxf32x F -+GLIBC_2.27 ufromfpxf64 F -+GLIBC_2.27 ufromfpxl F -+GLIBC_2.27 y0 F -+GLIBC_2.27 y0f F -+GLIBC_2.27 y0f32 F -+GLIBC_2.27 y0f32x F -+GLIBC_2.27 y0f64 F -+GLIBC_2.27 y0l F -+GLIBC_2.27 y1 F -+GLIBC_2.27 y1f F -+GLIBC_2.27 y1f32 F -+GLIBC_2.27 y1f32x F -+GLIBC_2.27 y1f64 F -+GLIBC_2.27 y1l F -+GLIBC_2.27 yn F -+GLIBC_2.27 ynf F -+GLIBC_2.27 ynf32 F -+GLIBC_2.27 ynf32x F -+GLIBC_2.27 ynf64 F -+GLIBC_2.27 ynl F -+GLIBC_2.28 daddl F -+GLIBC_2.28 ddivl F -+GLIBC_2.28 dmull F -+GLIBC_2.28 dsubl F -+GLIBC_2.28 f32addf32x F -+GLIBC_2.28 f32addf64 F -+GLIBC_2.28 f32divf32x F -+GLIBC_2.28 f32divf64 F -+GLIBC_2.28 f32mulf32x F -+GLIBC_2.28 f32mulf64 F -+GLIBC_2.28 f32subf32x F -+GLIBC_2.28 f32subf64 F -+GLIBC_2.28 f32xaddf64 F -+GLIBC_2.28 f32xdivf64 F -+GLIBC_2.28 f32xmulf64 F -+GLIBC_2.28 f32xsubf64 F -+GLIBC_2.28 fadd F -+GLIBC_2.28 faddl F -+GLIBC_2.28 fdiv F -+GLIBC_2.28 fdivl F -+GLIBC_2.28 fmul F -+GLIBC_2.28 fmull F -+GLIBC_2.28 fsub F -+GLIBC_2.28 fsubl F -diff --git a/sysdeps/unix/sysv/linux/arc/libnsl.abilist b/sysdeps/unix/sysv/linux/arc/libnsl.abilist -new file mode 100644 -index 000000000000..0767472d06e6 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libnsl.abilist -@@ -0,0 +1,120 @@ -+GLIBC_2.27 __free_fdresult F -+GLIBC_2.27 __nis_default_access F -+GLIBC_2.27 __nis_default_group F -+GLIBC_2.27 __nis_default_owner F -+GLIBC_2.27 __nis_default_ttl F -+GLIBC_2.27 __nis_finddirectory F -+GLIBC_2.27 __nisbind_connect F -+GLIBC_2.27 __nisbind_create F -+GLIBC_2.27 __nisbind_destroy F -+GLIBC_2.27 __nisbind_next F -+GLIBC_2.27 __yp_check F -+GLIBC_2.27 nis_add F -+GLIBC_2.27 nis_add_entry F -+GLIBC_2.27 nis_addmember F -+GLIBC_2.27 nis_checkpoint F -+GLIBC_2.27 nis_clone_directory F -+GLIBC_2.27 nis_clone_object F -+GLIBC_2.27 nis_clone_result F -+GLIBC_2.27 nis_creategroup F -+GLIBC_2.27 nis_destroy_object F -+GLIBC_2.27 nis_destroygroup F -+GLIBC_2.27 nis_dir_cmp F -+GLIBC_2.27 nis_domain_of F -+GLIBC_2.27 nis_domain_of_r F -+GLIBC_2.27 nis_first_entry F -+GLIBC_2.27 nis_free_directory F -+GLIBC_2.27 nis_free_object F -+GLIBC_2.27 nis_free_request F -+GLIBC_2.27 nis_freenames F -+GLIBC_2.27 nis_freeresult F -+GLIBC_2.27 nis_freeservlist F -+GLIBC_2.27 nis_freetags F -+GLIBC_2.27 nis_getnames F -+GLIBC_2.27 nis_getservlist F -+GLIBC_2.27 nis_ismember F -+GLIBC_2.27 nis_leaf_of F -+GLIBC_2.27 nis_leaf_of_r F -+GLIBC_2.27 nis_lerror F -+GLIBC_2.27 nis_list F -+GLIBC_2.27 nis_local_directory F -+GLIBC_2.27 nis_local_group F -+GLIBC_2.27 nis_local_host F -+GLIBC_2.27 nis_local_principal F -+GLIBC_2.27 nis_lookup F -+GLIBC_2.27 nis_mkdir F -+GLIBC_2.27 nis_modify F -+GLIBC_2.27 nis_modify_entry F -+GLIBC_2.27 nis_name_of F -+GLIBC_2.27 nis_name_of_r F -+GLIBC_2.27 nis_next_entry F -+GLIBC_2.27 nis_perror F -+GLIBC_2.27 nis_ping F -+GLIBC_2.27 nis_print_directory F -+GLIBC_2.27 nis_print_entry F -+GLIBC_2.27 nis_print_group F -+GLIBC_2.27 nis_print_group_entry F -+GLIBC_2.27 nis_print_link F -+GLIBC_2.27 nis_print_object F -+GLIBC_2.27 nis_print_result F -+GLIBC_2.27 nis_print_rights F -+GLIBC_2.27 nis_print_table F -+GLIBC_2.27 nis_read_obj F -+GLIBC_2.27 nis_remove F -+GLIBC_2.27 nis_remove_entry F -+GLIBC_2.27 nis_removemember F -+GLIBC_2.27 nis_rmdir F -+GLIBC_2.27 nis_servstate F -+GLIBC_2.27 nis_sperrno F -+GLIBC_2.27 nis_sperror F -+GLIBC_2.27 nis_sperror_r F -+GLIBC_2.27 nis_stats F -+GLIBC_2.27 nis_verifygroup F -+GLIBC_2.27 nis_write_obj F -+GLIBC_2.27 readColdStartFile F -+GLIBC_2.27 writeColdStartFile F -+GLIBC_2.27 xdr_cback_data F -+GLIBC_2.27 xdr_domainname F -+GLIBC_2.27 xdr_keydat F -+GLIBC_2.27 xdr_mapname F -+GLIBC_2.27 xdr_obj_p F -+GLIBC_2.27 xdr_peername F -+GLIBC_2.27 xdr_valdat F -+GLIBC_2.27 xdr_yp_buf F -+GLIBC_2.27 xdr_ypall F -+GLIBC_2.27 xdr_ypbind_binding F -+GLIBC_2.27 xdr_ypbind_resp F -+GLIBC_2.27 xdr_ypbind_resptype F -+GLIBC_2.27 xdr_ypbind_setdom F -+GLIBC_2.27 xdr_ypdelete_args F -+GLIBC_2.27 xdr_ypmap_parms F -+GLIBC_2.27 xdr_ypmaplist F -+GLIBC_2.27 xdr_yppush_status F -+GLIBC_2.27 xdr_yppushresp_xfr F -+GLIBC_2.27 xdr_ypreq_key F -+GLIBC_2.27 xdr_ypreq_nokey F -+GLIBC_2.27 xdr_ypreq_xfr F -+GLIBC_2.27 xdr_ypresp_all F -+GLIBC_2.27 xdr_ypresp_key_val F -+GLIBC_2.27 xdr_ypresp_maplist F -+GLIBC_2.27 xdr_ypresp_master F -+GLIBC_2.27 xdr_ypresp_order F -+GLIBC_2.27 xdr_ypresp_val F -+GLIBC_2.27 xdr_ypresp_xfr F -+GLIBC_2.27 xdr_ypstat F -+GLIBC_2.27 xdr_ypupdate_args F -+GLIBC_2.27 xdr_ypxfrstat F -+GLIBC_2.27 yp_all F -+GLIBC_2.27 yp_bind F -+GLIBC_2.27 yp_first F -+GLIBC_2.27 yp_get_default_domain F -+GLIBC_2.27 yp_maplist F -+GLIBC_2.27 yp_master F -+GLIBC_2.27 yp_match F -+GLIBC_2.27 yp_next F -+GLIBC_2.27 yp_order F -+GLIBC_2.27 yp_unbind F -+GLIBC_2.27 yp_update F -+GLIBC_2.27 ypbinderr_string F -+GLIBC_2.27 yperr_string F -+GLIBC_2.27 ypprot_err F -diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist -new file mode 100644 -index 000000000000..c370fda73db9 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist -@@ -0,0 +1,237 @@ -+GLIBC_2.27 _IO_flockfile F -+GLIBC_2.27 _IO_ftrylockfile F -+GLIBC_2.27 _IO_funlockfile F -+GLIBC_2.27 __close F -+GLIBC_2.27 __connect F -+GLIBC_2.27 __errno_location F -+GLIBC_2.27 __fcntl F -+GLIBC_2.27 __h_errno_location F -+GLIBC_2.27 __libc_allocate_rtsig F -+GLIBC_2.27 __libc_current_sigrtmax F -+GLIBC_2.27 __libc_current_sigrtmin F -+GLIBC_2.27 __lseek F -+GLIBC_2.27 __nanosleep F -+GLIBC_2.27 __open F -+GLIBC_2.27 __open64 F -+GLIBC_2.27 __pread64 F -+GLIBC_2.27 __pthread_cleanup_routine F -+GLIBC_2.27 __pthread_getspecific F -+GLIBC_2.27 __pthread_key_create F -+GLIBC_2.27 __pthread_mutex_destroy F -+GLIBC_2.27 __pthread_mutex_init F -+GLIBC_2.27 __pthread_mutex_lock F -+GLIBC_2.27 __pthread_mutex_trylock F -+GLIBC_2.27 __pthread_mutex_unlock F -+GLIBC_2.27 __pthread_mutexattr_destroy F -+GLIBC_2.27 __pthread_mutexattr_init F -+GLIBC_2.27 __pthread_mutexattr_settype F -+GLIBC_2.27 __pthread_once F -+GLIBC_2.27 __pthread_register_cancel F -+GLIBC_2.27 __pthread_register_cancel_defer F -+GLIBC_2.27 __pthread_rwlock_destroy F -+GLIBC_2.27 __pthread_rwlock_init F -+GLIBC_2.27 __pthread_rwlock_rdlock F -+GLIBC_2.27 __pthread_rwlock_tryrdlock F -+GLIBC_2.27 __pthread_rwlock_trywrlock F -+GLIBC_2.27 __pthread_rwlock_unlock F -+GLIBC_2.27 __pthread_rwlock_wrlock F -+GLIBC_2.27 __pthread_setspecific F -+GLIBC_2.27 __pthread_unregister_cancel F -+GLIBC_2.27 __pthread_unregister_cancel_restore F -+GLIBC_2.27 __pthread_unwind_next F -+GLIBC_2.27 __pwrite64 F -+GLIBC_2.27 __read F -+GLIBC_2.27 __res_state F -+GLIBC_2.27 __send F -+GLIBC_2.27 __sigaction F -+GLIBC_2.27 __wait F -+GLIBC_2.27 __write F -+GLIBC_2.27 _pthread_cleanup_pop F -+GLIBC_2.27 _pthread_cleanup_pop_restore F -+GLIBC_2.27 _pthread_cleanup_push F -+GLIBC_2.27 _pthread_cleanup_push_defer F -+GLIBC_2.27 accept F -+GLIBC_2.27 close F -+GLIBC_2.27 connect F -+GLIBC_2.27 fcntl F -+GLIBC_2.27 flockfile F -+GLIBC_2.27 fsync F -+GLIBC_2.27 ftrylockfile F -+GLIBC_2.27 funlockfile F -+GLIBC_2.27 lseek F -+GLIBC_2.27 lseek64 F -+GLIBC_2.27 msync F -+GLIBC_2.27 nanosleep F -+GLIBC_2.27 open F -+GLIBC_2.27 open64 F -+GLIBC_2.27 pause F -+GLIBC_2.27 pread F -+GLIBC_2.27 pread64 F -+GLIBC_2.27 pthread_attr_destroy F -+GLIBC_2.27 pthread_attr_getaffinity_np F -+GLIBC_2.27 pthread_attr_getdetachstate F -+GLIBC_2.27 pthread_attr_getguardsize F -+GLIBC_2.27 pthread_attr_getinheritsched F -+GLIBC_2.27 pthread_attr_getschedparam F -+GLIBC_2.27 pthread_attr_getschedpolicy F -+GLIBC_2.27 pthread_attr_getscope F -+GLIBC_2.27 pthread_attr_getstack F -+GLIBC_2.27 pthread_attr_getstackaddr F -+GLIBC_2.27 pthread_attr_getstacksize F -+GLIBC_2.27 pthread_attr_init F -+GLIBC_2.27 pthread_attr_setaffinity_np F -+GLIBC_2.27 pthread_attr_setdetachstate F -+GLIBC_2.27 pthread_attr_setguardsize F -+GLIBC_2.27 pthread_attr_setinheritsched F -+GLIBC_2.27 pthread_attr_setschedparam F -+GLIBC_2.27 pthread_attr_setschedpolicy F -+GLIBC_2.27 pthread_attr_setscope F -+GLIBC_2.27 pthread_attr_setstack F -+GLIBC_2.27 pthread_attr_setstackaddr F -+GLIBC_2.27 pthread_attr_setstacksize F -+GLIBC_2.27 pthread_barrier_destroy F -+GLIBC_2.27 pthread_barrier_init F -+GLIBC_2.27 pthread_barrier_wait F -+GLIBC_2.27 pthread_barrierattr_destroy F -+GLIBC_2.27 pthread_barrierattr_getpshared F -+GLIBC_2.27 pthread_barrierattr_init F -+GLIBC_2.27 pthread_barrierattr_setpshared F -+GLIBC_2.27 pthread_cancel F -+GLIBC_2.27 pthread_cond_broadcast F -+GLIBC_2.27 pthread_cond_destroy F -+GLIBC_2.27 pthread_cond_init F -+GLIBC_2.27 pthread_cond_signal F -+GLIBC_2.27 pthread_cond_timedwait F -+GLIBC_2.27 pthread_cond_wait F -+GLIBC_2.27 pthread_condattr_destroy F -+GLIBC_2.27 pthread_condattr_getclock F -+GLIBC_2.27 pthread_condattr_getpshared F -+GLIBC_2.27 pthread_condattr_init F -+GLIBC_2.27 pthread_condattr_setclock F -+GLIBC_2.27 pthread_condattr_setpshared F -+GLIBC_2.27 pthread_create F -+GLIBC_2.27 pthread_detach F -+GLIBC_2.27 pthread_equal F -+GLIBC_2.27 pthread_exit F -+GLIBC_2.27 pthread_getaffinity_np F -+GLIBC_2.27 pthread_getattr_default_np F -+GLIBC_2.27 pthread_getattr_np F -+GLIBC_2.27 pthread_getconcurrency F -+GLIBC_2.27 pthread_getcpuclockid F -+GLIBC_2.27 pthread_getname_np F -+GLIBC_2.27 pthread_getschedparam F -+GLIBC_2.27 pthread_getspecific F -+GLIBC_2.27 pthread_join F -+GLIBC_2.27 pthread_key_create F -+GLIBC_2.27 pthread_key_delete F -+GLIBC_2.27 pthread_kill F -+GLIBC_2.27 pthread_kill_other_threads_np F -+GLIBC_2.27 pthread_mutex_consistent F -+GLIBC_2.27 pthread_mutex_consistent_np F -+GLIBC_2.27 pthread_mutex_destroy F -+GLIBC_2.27 pthread_mutex_getprioceiling F -+GLIBC_2.27 pthread_mutex_init F -+GLIBC_2.27 pthread_mutex_lock F -+GLIBC_2.27 pthread_mutex_setprioceiling F -+GLIBC_2.27 pthread_mutex_timedlock F -+GLIBC_2.27 pthread_mutex_trylock F -+GLIBC_2.27 pthread_mutex_unlock F -+GLIBC_2.27 pthread_mutexattr_destroy F -+GLIBC_2.27 pthread_mutexattr_getkind_np F -+GLIBC_2.27 pthread_mutexattr_getprioceiling F -+GLIBC_2.27 pthread_mutexattr_getprotocol F -+GLIBC_2.27 pthread_mutexattr_getpshared F -+GLIBC_2.27 pthread_mutexattr_getrobust F -+GLIBC_2.27 pthread_mutexattr_getrobust_np F -+GLIBC_2.27 pthread_mutexattr_gettype F -+GLIBC_2.27 pthread_mutexattr_init F -+GLIBC_2.27 pthread_mutexattr_setkind_np F -+GLIBC_2.27 pthread_mutexattr_setprioceiling F -+GLIBC_2.27 pthread_mutexattr_setprotocol F -+GLIBC_2.27 pthread_mutexattr_setpshared F -+GLIBC_2.27 pthread_mutexattr_setrobust F -+GLIBC_2.27 pthread_mutexattr_setrobust_np F -+GLIBC_2.27 pthread_mutexattr_settype F -+GLIBC_2.27 pthread_once F -+GLIBC_2.27 pthread_rwlock_destroy F -+GLIBC_2.27 pthread_rwlock_init F -+GLIBC_2.27 pthread_rwlock_rdlock F -+GLIBC_2.27 pthread_rwlock_timedrdlock F -+GLIBC_2.27 pthread_rwlock_timedwrlock F -+GLIBC_2.27 pthread_rwlock_tryrdlock F -+GLIBC_2.27 pthread_rwlock_trywrlock F -+GLIBC_2.27 pthread_rwlock_unlock F -+GLIBC_2.27 pthread_rwlock_wrlock F -+GLIBC_2.27 pthread_rwlockattr_destroy F -+GLIBC_2.27 pthread_rwlockattr_getkind_np F -+GLIBC_2.27 pthread_rwlockattr_getpshared F -+GLIBC_2.27 pthread_rwlockattr_init F -+GLIBC_2.27 pthread_rwlockattr_setkind_np F -+GLIBC_2.27 pthread_rwlockattr_setpshared F -+GLIBC_2.27 pthread_setaffinity_np F -+GLIBC_2.27 pthread_setattr_default_np F -+GLIBC_2.27 pthread_setcancelstate F -+GLIBC_2.27 pthread_setcanceltype F -+GLIBC_2.27 pthread_setconcurrency F -+GLIBC_2.27 pthread_setname_np F -+GLIBC_2.27 pthread_setschedparam F -+GLIBC_2.27 pthread_setschedprio F -+GLIBC_2.27 pthread_setspecific F -+GLIBC_2.27 pthread_sigmask F -+GLIBC_2.27 pthread_sigqueue F -+GLIBC_2.27 pthread_spin_destroy F -+GLIBC_2.27 pthread_spin_init F -+GLIBC_2.27 pthread_spin_lock F -+GLIBC_2.27 pthread_spin_trylock F -+GLIBC_2.27 pthread_spin_unlock F -+GLIBC_2.27 pthread_testcancel F -+GLIBC_2.27 pthread_timedjoin_np F -+GLIBC_2.27 pthread_tryjoin_np F -+GLIBC_2.27 pthread_yield F -+GLIBC_2.27 pwrite F -+GLIBC_2.27 pwrite64 F -+GLIBC_2.27 raise F -+GLIBC_2.27 read F -+GLIBC_2.27 recv F -+GLIBC_2.27 recvfrom F -+GLIBC_2.27 recvmsg F -+GLIBC_2.27 sem_close F -+GLIBC_2.27 sem_destroy F -+GLIBC_2.27 sem_getvalue F -+GLIBC_2.27 sem_init F -+GLIBC_2.27 sem_open F -+GLIBC_2.27 sem_post F -+GLIBC_2.27 sem_timedwait F -+GLIBC_2.27 sem_trywait F -+GLIBC_2.27 sem_unlink F -+GLIBC_2.27 sem_wait F -+GLIBC_2.27 send F -+GLIBC_2.27 sendmsg F -+GLIBC_2.27 sendto F -+GLIBC_2.27 sigaction F -+GLIBC_2.27 sigwait F -+GLIBC_2.27 tcdrain F -+GLIBC_2.27 wait F -+GLIBC_2.27 waitpid F -+GLIBC_2.27 write F -+GLIBC_2.28 call_once F -+GLIBC_2.28 cnd_broadcast F -+GLIBC_2.28 cnd_destroy F -+GLIBC_2.28 cnd_init F -+GLIBC_2.28 cnd_signal F -+GLIBC_2.28 cnd_timedwait F -+GLIBC_2.28 cnd_wait F -+GLIBC_2.28 mtx_destroy F -+GLIBC_2.28 mtx_init F -+GLIBC_2.28 mtx_lock F -+GLIBC_2.28 mtx_timedlock F -+GLIBC_2.28 mtx_trylock F -+GLIBC_2.28 mtx_unlock F -+GLIBC_2.28 thrd_create F -+GLIBC_2.28 thrd_detach F -+GLIBC_2.28 thrd_exit F -+GLIBC_2.28 thrd_join F -+GLIBC_2.28 tss_create F -+GLIBC_2.28 tss_delete F -+GLIBC_2.28 tss_get F -+GLIBC_2.28 tss_set F -diff --git a/sysdeps/unix/sysv/linux/arc/libresolv.abilist b/sysdeps/unix/sysv/linux/arc/libresolv.abilist -new file mode 100644 -index 000000000000..69f26d515dd0 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libresolv.abilist -@@ -0,0 +1,79 @@ -+GLIBC_2.27 __b64_ntop F -+GLIBC_2.27 __b64_pton F -+GLIBC_2.27 __dn_comp F -+GLIBC_2.27 __dn_count_labels F -+GLIBC_2.27 __dn_expand F -+GLIBC_2.27 __dn_skipname F -+GLIBC_2.27 __fp_nquery F -+GLIBC_2.27 __fp_query F -+GLIBC_2.27 __fp_resstat F -+GLIBC_2.27 __hostalias F -+GLIBC_2.27 __loc_aton F -+GLIBC_2.27 __loc_ntoa F -+GLIBC_2.27 __p_cdname F -+GLIBC_2.27 __p_cdnname F -+GLIBC_2.27 __p_class F -+GLIBC_2.27 __p_class_syms D 0x54 -+GLIBC_2.27 __p_fqname F -+GLIBC_2.27 __p_fqnname F -+GLIBC_2.27 __p_option F -+GLIBC_2.27 __p_query F -+GLIBC_2.27 __p_rcode F -+GLIBC_2.27 __p_time F -+GLIBC_2.27 __p_type F -+GLIBC_2.27 __p_type_syms D 0x228 -+GLIBC_2.27 __putlong F -+GLIBC_2.27 __putshort F -+GLIBC_2.27 __res_close F -+GLIBC_2.27 __res_dnok F -+GLIBC_2.27 __res_hnok F -+GLIBC_2.27 __res_hostalias F -+GLIBC_2.27 __res_isourserver F -+GLIBC_2.27 __res_mailok F -+GLIBC_2.27 __res_mkquery F -+GLIBC_2.27 __res_nameinquery F -+GLIBC_2.27 __res_nmkquery F -+GLIBC_2.27 __res_nquery F -+GLIBC_2.27 __res_nquerydomain F -+GLIBC_2.27 __res_nsearch F -+GLIBC_2.27 __res_nsend F -+GLIBC_2.27 __res_ownok F -+GLIBC_2.27 __res_queriesmatch F -+GLIBC_2.27 __res_query F -+GLIBC_2.27 __res_querydomain F -+GLIBC_2.27 __res_search F -+GLIBC_2.27 __res_send F -+GLIBC_2.27 __sym_ntop F -+GLIBC_2.27 __sym_ntos F -+GLIBC_2.27 __sym_ston F -+GLIBC_2.27 _getlong F -+GLIBC_2.27 _getshort F -+GLIBC_2.27 inet_net_ntop F -+GLIBC_2.27 inet_net_pton F -+GLIBC_2.27 inet_neta F -+GLIBC_2.27 ns_datetosecs F -+GLIBC_2.27 ns_format_ttl F -+GLIBC_2.27 ns_get16 F -+GLIBC_2.27 ns_get32 F -+GLIBC_2.27 ns_initparse F -+GLIBC_2.27 ns_makecanon F -+GLIBC_2.27 ns_msg_getflag F -+GLIBC_2.27 ns_name_compress F -+GLIBC_2.27 ns_name_ntol F -+GLIBC_2.27 ns_name_ntop F -+GLIBC_2.27 ns_name_pack F -+GLIBC_2.27 ns_name_pton F -+GLIBC_2.27 ns_name_rollback F -+GLIBC_2.27 ns_name_skip F -+GLIBC_2.27 ns_name_uncompress F -+GLIBC_2.27 ns_name_unpack F -+GLIBC_2.27 ns_parse_ttl F -+GLIBC_2.27 ns_parserr F -+GLIBC_2.27 ns_put16 F -+GLIBC_2.27 ns_put32 F -+GLIBC_2.27 ns_samedomain F -+GLIBC_2.27 ns_samename F -+GLIBC_2.27 ns_skiprr F -+GLIBC_2.27 ns_sprintrr F -+GLIBC_2.27 ns_sprintrrf F -+GLIBC_2.27 ns_subdomain F -diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/librt.abilist -new file mode 100644 -index 000000000000..bfd262ecc57c ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/librt.abilist -@@ -0,0 +1,35 @@ -+GLIBC_2.27 __mq_open_2 F -+GLIBC_2.27 aio_cancel F -+GLIBC_2.27 aio_cancel64 F -+GLIBC_2.27 aio_error F -+GLIBC_2.27 aio_error64 F -+GLIBC_2.27 aio_fsync F -+GLIBC_2.27 aio_fsync64 F -+GLIBC_2.27 aio_init F -+GLIBC_2.27 aio_read F -+GLIBC_2.27 aio_read64 F -+GLIBC_2.27 aio_return F -+GLIBC_2.27 aio_return64 F -+GLIBC_2.27 aio_suspend F -+GLIBC_2.27 aio_suspend64 F -+GLIBC_2.27 aio_write F -+GLIBC_2.27 aio_write64 F -+GLIBC_2.27 lio_listio F -+GLIBC_2.27 lio_listio64 F -+GLIBC_2.27 mq_close F -+GLIBC_2.27 mq_getattr F -+GLIBC_2.27 mq_notify F -+GLIBC_2.27 mq_open F -+GLIBC_2.27 mq_receive F -+GLIBC_2.27 mq_send F -+GLIBC_2.27 mq_setattr F -+GLIBC_2.27 mq_timedreceive F -+GLIBC_2.27 mq_timedsend F -+GLIBC_2.27 mq_unlink F -+GLIBC_2.27 shm_open F -+GLIBC_2.27 shm_unlink F -+GLIBC_2.27 timer_create F -+GLIBC_2.27 timer_delete F -+GLIBC_2.27 timer_getoverrun F -+GLIBC_2.27 timer_gettime F -+GLIBC_2.27 timer_settime F -diff --git a/sysdeps/unix/sysv/linux/arc/libthread_db.abilist b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist -new file mode 100644 -index 000000000000..4122e563a1d3 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libthread_db.abilist -@@ -0,0 +1,40 @@ -+GLIBC_2.27 td_init F -+GLIBC_2.27 td_log F -+GLIBC_2.27 td_symbol_list F -+GLIBC_2.27 td_ta_clear_event F -+GLIBC_2.27 td_ta_delete F -+GLIBC_2.27 td_ta_enable_stats F -+GLIBC_2.27 td_ta_event_addr F -+GLIBC_2.27 td_ta_event_getmsg F -+GLIBC_2.27 td_ta_get_nthreads F -+GLIBC_2.27 td_ta_get_ph F -+GLIBC_2.27 td_ta_get_stats F -+GLIBC_2.27 td_ta_map_id2thr F -+GLIBC_2.27 td_ta_map_lwp2thr F -+GLIBC_2.27 td_ta_new F -+GLIBC_2.27 td_ta_reset_stats F -+GLIBC_2.27 td_ta_set_event F -+GLIBC_2.27 td_ta_setconcurrency F -+GLIBC_2.27 td_ta_thr_iter F -+GLIBC_2.27 td_ta_tsd_iter F -+GLIBC_2.27 td_thr_clear_event F -+GLIBC_2.27 td_thr_dbresume F -+GLIBC_2.27 td_thr_dbsuspend F -+GLIBC_2.27 td_thr_event_enable F -+GLIBC_2.27 td_thr_event_getmsg F -+GLIBC_2.27 td_thr_get_info F -+GLIBC_2.27 td_thr_getfpregs F -+GLIBC_2.27 td_thr_getgregs F -+GLIBC_2.27 td_thr_getxregs F -+GLIBC_2.27 td_thr_getxregsize F -+GLIBC_2.27 td_thr_set_event F -+GLIBC_2.27 td_thr_setfpregs F -+GLIBC_2.27 td_thr_setgregs F -+GLIBC_2.27 td_thr_setprio F -+GLIBC_2.27 td_thr_setsigpending F -+GLIBC_2.27 td_thr_setxregs F -+GLIBC_2.27 td_thr_sigsetmask F -+GLIBC_2.27 td_thr_tls_get_addr F -+GLIBC_2.27 td_thr_tlsbase F -+GLIBC_2.27 td_thr_tsd F -+GLIBC_2.27 td_thr_validate F -diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/libutil.abilist -new file mode 100644 -index 000000000000..cbfec8d46e60 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/libutil.abilist -@@ -0,0 +1,6 @@ -+GLIBC_2.27 forkpty F -+GLIBC_2.27 login F -+GLIBC_2.27 login_tty F -+GLIBC_2.27 logout F -+GLIBC_2.27 logwtmp F -+GLIBC_2.27 openpty F -diff --git a/sysdeps/unix/sysv/linux/arc/localplt.data b/sysdeps/unix/sysv/linux/arc/localplt.data -new file mode 100644 -index 000000000000..815f218daa67 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/localplt.data -@@ -0,0 +1,15 @@ -+libc.so: realloc -+libc.so: malloc -+libc.so: memalign -+libc.so: calloc -+libc.so: free -+libc.so: memcpy -+ld.so: malloc -+ld.so: calloc -+ld.so: realloc -+ld.so: free -+# The TLS-enabled version of these functions is interposed from libc.so. -+ld.so: _dl_signal_error -+ld.so: _dl_catch_error -+ld.so: _dl_signal_exception -+ld.so: _dl_catch_exception -diff --git a/sysdeps/unix/sysv/linux/arc/makecontext.c b/sysdeps/unix/sysv/linux/arc/makecontext.c -new file mode 100644 -index 000000000000..8d233f83da7e ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/makecontext.c -@@ -0,0 +1,75 @@ -+/* Create new context for ARC -+ Copyright (C) 2015-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+#include -+#include -+ -+void -+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) -+{ -+ extern void __startcontext (void) attribute_hidden; -+ unsigned long sp, *r; -+ va_list vl; -+ int i, reg_args, stack_args; -+ -+ sp = ((unsigned long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size) & ~7; -+ -+ ucp->uc_mcontext.scratch.sp = sp; -+ ucp->uc_mcontext.scratch.fp = 0; -+ -+ /* __startcontext is sort of trampoline to invoke @func -+ * From setcontext() pov, the resume address is __startcontext, -+ * set it up in BLINK place holder*/ -+ ucp->uc_mcontext.scratch.blink = (unsigned long) &__startcontext; -+ -+ /* __startcontext passed 2 types of args -+ * - args to @func setup in canonical r0-r7 -+ * - @func itself in r9, and next function in r10 -+ */ -+ ucp->uc_mcontext.callee.r13 = (unsigned long) func; -+ ucp->uc_mcontext.callee.r14 = (unsigned long) ucp->uc_link; -+ ucp->uc_mcontext.callee.r15 = 0; -+ -+ r = &ucp->uc_mcontext.scratch.r0; -+ -+ va_start (vl, argc); -+ -+ reg_args = argc > 8 ? 8 : argc; -+ for (i = 0; i < reg_args; i++) { -+ *r-- = va_arg(vl, unsigned long); -+ } -+ -+ stack_args = argc - reg_args; -+ -+ if (__glibc_unlikely(stack_args > 0)) { -+ -+ sp -= stack_args * sizeof (unsigned long); -+ ucp->uc_mcontext.scratch.sp = sp; -+ r = (unsigned long *)sp; -+ -+ for (i = 0; i < stack_args; i++) { -+ *r++ = va_arg(vl, unsigned long); -+ } -+ } -+ -+ va_end (vl); -+} -+ -+weak_alias (__makecontext, makecontext) -diff --git a/sysdeps/unix/sysv/linux/arc/mmap_internal.h b/sysdeps/unix/sysv/linux/arc/mmap_internal.h -new file mode 100644 -index 000000000000..3c8c55d57d0e ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/mmap_internal.h -@@ -0,0 +1,26 @@ -+/* mmap - map files or devices into memory. Linux/ARC version. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef MMAP_ARC_INTERNAL_H -+#define MMAP_ARC_INTERNAL_H -+ -+#define MMAP2_PAGE_UNIT 8192ULL /* 8K page is default for ARC */ -+ -+#include_next -+ -+#endif -diff --git a/sysdeps/unix/sysv/linux/arc/profil-counter.h b/sysdeps/unix/sysv/linux/arc/profil-counter.h -new file mode 100644 -index 000000000000..8a6a0bcf3d59 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/profil-counter.h -@@ -0,0 +1,2 @@ -+/* We can use the ix86 version. */ -+#include -diff --git a/sysdeps/unix/sysv/linux/arc/pt-vfork.S b/sysdeps/unix/sysv/linux/arc/pt-vfork.S -new file mode 100644 -index 000000000000..65cc3823ac87 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/pt-vfork.S -@@ -0,0 +1 @@ -+#include -diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S -new file mode 100644 -index 000000000000..6ec2ec0ddc79 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/setcontext.S -@@ -0,0 +1,95 @@ -+/* Set current context for ARC -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include "ucontext-macros.h" -+ -+/* -+ int setcontext (const ucontext_t *ucp) -+ - Restores the machine context in @ucp and resumes execution -+ (doesn't return to caller) -+*/ -+ -+ENTRY(__setcontext) -+ -+ mov r9, r0 /* stash @ucp across syscall */ -+ -+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */ -+ mov r3, _NSIG8 -+ mov r2, 0 -+ add r1, r0, UCONTEXT_SIGMASK -+ mov r0, SIG_SETMASK -+ mov r8, __NR_rt_sigprocmask -+ ARC_TRAP_INSN -+ brhi r0, -1024, .Lcall_syscall_err -+ -+ /* restore scratch/arg regs for makecontext() case */ -+ LOAD_REG(r0, r9, 22) -+ LOAD_REG(r1, r9, 21) -+ LOAD_REG(r2, r9, 20) -+ LOAD_REG(r3, r9, 19) -+ LOAD_REG(r4, r9, 18) -+ LOAD_REG(r5, r9, 17) -+ LOAD_REG(r6, r9, 16) -+ LOAD_REG(r7, r9, 15) -+ -+ /* restore callee saved registers */ -+ LOAD_REG(r13, r9, 37) -+ LOAD_REG(r14, r9, 36) -+ LOAD_REG(r15, r9, 35) -+ LOAD_REG(r16, r9, 34) -+ LOAD_REG(r17, r9, 33) -+ LOAD_REG(r18, r9, 32) -+ LOAD_REG(r19, r9, 31) -+ LOAD_REG(r20, r9, 30) -+ LOAD_REG(r21, r9, 29) -+ LOAD_REG(r22, r9, 28) -+ LOAD_REG(r23, r9, 27) -+ LOAD_REG(r24, r9, 26) -+ LOAD_REG(r25, r9, 25) -+ -+ LOAD_REG(blink, r9, 7) -+ LOAD_REG(fp, r9, 8) -+ LOAD_REG(sp, r9, 23) -+ -+ j [blink] -+ -+PSEUDO_END(__setcontext) -+weak_alias(__setcontext, setcontext) -+ -+ -+/* -+ Helper for activating makecontext() created context -+ - r13 has @func, r14 has uc_link -+*/ -+ -+ENTRY(__startcontext) -+ -+ cfi_register (blink, r15) -+ -+ /* call user @func, loaded in r13 by setcontext() */ -+ jl [r13] -+ -+ /* if uc_link (r14) call setcontext with that */ -+ mov r0, r14 -+ breq r0, 0, 1f -+ -+ bl __setcontext -+1: -+ /* exit with status 0 */ -+ b HIDDEN_JUMPTARGET(exit) -+END(__startcontext) -diff --git a/sysdeps/unix/sysv/linux/arc/shlib-versions b/sysdeps/unix/sysv/linux/arc/shlib-versions -new file mode 100644 -index 000000000000..fdfe223b4371 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/shlib-versions -@@ -0,0 +1,2 @@ -+DEFAULT GLIBC_2.27 -+ld=ld-linux-arc.so.2 -diff --git a/sysdeps/unix/sysv/linux/arc/sigaction.c b/sysdeps/unix/sysv/linux/arc/sigaction.c -new file mode 100644 -index 000000000000..b437af677d58 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sigaction.c -@@ -0,0 +1,63 @@ -+/* ARC specific sigaction and signal restorer -+ Copyright (C) 1997-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+extern void __default_rt_sa_restorer(void); -+ -+#define SA_RESTORER 0x04000000 -+ -+/* If @act is not NULL, change the action for @sig to @act. -+ If @oact is not NULL, put the old action for @sig in @oact. */ -+int -+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact) -+{ -+ struct sigaction kact; -+ const struct sigaction *arg; -+ -+ /* -+ * SA_RESTORER is only relevant for act != NULL case -+ * (!act means caller only wants to know @oact) -+ */ -+ if (act && !(act->sa_flags & SA_RESTORER)) { -+ kact.sa_restorer = __default_rt_sa_restorer; -+ kact.sa_flags = act->sa_flags | SA_RESTORER; -+ -+ kact.sa_handler = act->sa_handler; -+ kact.sa_mask = act->sa_mask; -+ -+ arg = &kact; -+ } else { -+ arg = act; -+ } -+ -+ /* -+ * syscall also expects sizeof(sa_mask) and asm-generic kernel syscall -+ * ABI mandates it be 2 words (8 bytes below) although glibc defines -+ * sigset_to be much larger (1024 / 32 == 64 bytes) -+ */ -+ return INLINE_SYSCALL(rt_sigaction, 4, sig, arg, oact, _NSIG / 8); -+} -+ -+libc_hidden_def (__libc_sigaction) -+ -+#include -diff --git a/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h -new file mode 100644 -index 000000000000..852bbd96d47f ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sigcontextinfo.h -@@ -0,0 +1,23 @@ -+/* ARC definitions for signal handling calling conventions. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include "kernel-features.h" -+ -+#define SIGCONTEXT int _code, struct ucontext_t * -+#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.scratch.ret) -diff --git a/sysdeps/unix/sysv/linux/arc/sigrestorer.S b/sysdeps/unix/sysv/linux/arc/sigrestorer.S -new file mode 100644 -index 000000000000..d74cf0ec00e3 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sigrestorer.S -@@ -0,0 +1,28 @@ -+/* Default sigreturn stub for ARC Linux. -+ Copyright (C) 2005-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+#include -+ -+ nop -+ENTRY(__default_rt_sa_restorer) -+ mov r8, __NR_rt_sigreturn -+ ARC_TRAP_INSN -+ j_s [blink] -+PSEUDO_END_NOERRNO(__default_rt_sa_restorer) -diff --git a/sysdeps/unix/sysv/linux/arc/swapcontext.S b/sysdeps/unix/sysv/linux/arc/swapcontext.S -new file mode 100644 -index 000000000000..ad6bf70ab5e2 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/swapcontext.S -@@ -0,0 +1,92 @@ -+/* Save and set current context for ARC -+ Copyright (C) 2009-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#include "ucontext-macros.h" -+ -+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */ -+ -+ENTRY(__swapcontext) -+ -+ /* save context into @oucp pointed to by r0 */ -+ -+ SAVE_REG(r13, r0, 37) -+ SAVE_REG(r14, r0, 36) -+ SAVE_REG(r15, r0, 35) -+ SAVE_REG(r16, r0, 34) -+ SAVE_REG(r17, r0, 33) -+ SAVE_REG(r18, r0, 32) -+ SAVE_REG(r19, r0, 31) -+ SAVE_REG(r20, r0, 30) -+ SAVE_REG(r21, r0, 29) -+ SAVE_REG(r22, r0, 28) -+ SAVE_REG(r23, r0, 27) -+ SAVE_REG(r24, r0, 26) -+ SAVE_REG(r25, r0, 25) -+ -+ SAVE_REG(blink, r0, 7) -+ SAVE_REG(fp, r0, 8) -+ SAVE_REG(sp, r0, 23) -+ -+ /* save 0 in r0 placeholder to return 0 when @oucp activated */ -+ mov r9, 0 -+ SAVE_REG(r9, r0, 22) -+ -+ /* load context from @ucp */ -+ -+ mov r9, r1 ; safekeep @ucp across syscall -+ -+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */ -+ mov r3, _NSIG8 -+ add r2, r0, UCONTEXT_SIGMASK -+ add r1, r1, UCONTEXT_SIGMASK -+ mov r0, SIG_SETMASK -+ mov r8, __NR_rt_sigprocmask -+ ARC_TRAP_INSN -+ brhi r0, -1024, .Lcall_syscall_err -+ -+ LOAD_REG(r0, r9, 22) -+ LOAD_REG(r1, r9, 21) -+ LOAD_REG(r2, r9, 20) -+ LOAD_REG(r3, r9, 19) -+ LOAD_REG(r4, r9, 18) -+ LOAD_REG(r5, r9, 17) -+ LOAD_REG(r6, r9, 16) -+ LOAD_REG(r7, r9, 15) -+ -+ LOAD_REG(r13, r9, 37) -+ LOAD_REG(r14, r9, 36) -+ LOAD_REG(r15, r9, 35) -+ LOAD_REG(r16, r9, 34) -+ LOAD_REG(r17, r9, 33) -+ LOAD_REG(r18, r9, 32) -+ LOAD_REG(r19, r9, 31) -+ LOAD_REG(r20, r9, 30) -+ LOAD_REG(r21, r9, 29) -+ LOAD_REG(r22, r9, 28) -+ LOAD_REG(r23, r9, 27) -+ LOAD_REG(r24, r9, 26) -+ LOAD_REG(r25, r9, 25) -+ -+ LOAD_REG(blink, r9, 7) -+ LOAD_REG(fp, r9, 8) -+ LOAD_REG(sp, r9, 23) -+ -+ j [blink] -+ -+PSEUDO_END(__swapcontext) -+weak_alias(__swapcontext, swapcontext) -diff --git a/sysdeps/unix/sysv/linux/arc/sys/cachectl.h b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h -new file mode 100644 -index 000000000000..c2ba820e50b7 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sys/cachectl.h -@@ -0,0 +1,36 @@ -+/* cacheflush - flush contents of instruction and/or data cache. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _SYS_CACHECTL_H -+#define _SYS_CACHECTL_H 1 -+ -+#include -+ -+/* Get the kernel definition for the op bits. */ -+#include -+ -+__BEGIN_DECLS -+ -+#ifdef __USE_MISC -+extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; -+#endif -+extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW; -+ -+__END_DECLS -+ -+#endif /* sys/cachectl.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/sys/procfs.h b/sysdeps/unix/sysv/linux/arc/sys/procfs.h -new file mode 100644 -index 000000000000..3c1689bc4b91 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sys/procfs.h -@@ -0,0 +1,123 @@ -+/* Core image file related definitions, ARC version. -+ Copyright (C) 1996-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _SYS_PROCFS_H -+#define _SYS_PROCFS_H 1 -+ -+/* This is somewhat modelled after the file of the same name on SVR4 -+ systems. It provides a definition of the core file format for ELF -+ used on Linux. It doesn't have anything to do with the /proc file -+ system, even though Linux has one. -+ -+ Anyway, the whole purpose of this file is for GDB and GDB only. -+ Don't read too much into it. Don't use it for anything other than -+ GDB unless you know what you are doing. */ -+ -+#include -+#include -+#include -+#include -+ -+__BEGIN_DECLS -+ -+/* Type for a general-purpose register. */ -+typedef unsigned long elf_greg_t; -+ -+/* And the whole bunch of them. We could have used `struct -+ user_regs' directly in the typedef, but tradition says that -+ the register set is an array, which does have some peculiar -+ semantics, so leave it that way. */ -+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+/* Register set for the floating-point registers. */ -+typedef struct { } elf_fpregset_t; -+ -+/* Signal info. */ -+struct elf_siginfo -+ { -+ int si_signo; /* Signal number. */ -+ int si_code; /* Extra code. */ -+ int si_errno; /* Errno. */ -+ }; -+ -+/* Definitions to generate Intel SVR4-like core files. These mostly -+ have the same names as the SVR4 types with "elf_" tacked on the -+ front to prevent clashes with Linux definitions, and the typedef -+ forms have been avoided. This is mostly like the SVR4 structure, -+ but more Linuxy, with things that Linux does not support and which -+ GDB doesn't really use excluded. */ -+ -+struct elf_prstatus -+ { -+ struct elf_siginfo pr_info; /* Info associated with signal. */ -+ short int pr_cursig; /* Current signal. */ -+ unsigned long int pr_sigpend; /* Set of pending signals. */ -+ unsigned long int pr_sighold; /* Set of held signals. */ -+ __pid_t pr_pid; -+ __pid_t pr_ppid; -+ __pid_t pr_pgrp; -+ __pid_t pr_sid; -+ struct timeval pr_utime; /* User time. */ -+ struct timeval pr_stime; /* System time. */ -+ struct timeval pr_cutime; /* Cumulative user time. */ -+ struct timeval pr_cstime; /* Cumulative system time. */ -+ elf_gregset_t pr_reg; /* GP registers. */ -+ int pr_fpvalid; /* True if math copro being used. */ -+ }; -+ -+ -+#define ELF_PRARGSZ (80) /* Number of chars for args. */ -+ -+struct elf_prpsinfo -+ { -+ char pr_state; /* Numeric process state. */ -+ char pr_sname; /* Char for pr_state. */ -+ char pr_zomb; /* Zombie. */ -+ char pr_nice; /* Nice val. */ -+ unsigned long int pr_flag; /* Flags. */ -+ unsigned short int pr_uid; -+ unsigned short int pr_gid; -+ int pr_pid, pr_ppid, pr_pgrp, pr_sid; -+ /* Lots missing */ -+ char pr_fname[16]; /* Filename of executable. */ -+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -+ }; -+ -+/* The rest of this file provides the types for emulation of the -+ Solaris interfaces that should be implemented by -+ users of libthread_db. */ -+ -+/* Addresses. */ -+typedef void *psaddr_t; -+ -+/* Register sets. Linux has different names. */ -+typedef elf_gregset_t prgregset_t; -+typedef elf_fpregset_t prfpregset_t; -+ -+/* We don't have any differences between processes and threads, -+ therefore have only one PID type. */ -+typedef __pid_t lwpid_t; -+ -+/* Process status and info. In the end we do provide typedefs for them. */ -+typedef struct elf_prstatus prstatus_t; -+typedef struct elf_prpsinfo prpsinfo_t; -+ -+__END_DECLS -+ -+#endif /* sys/procfs.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/sys/ucontext.h b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h -new file mode 100644 -index 000000000000..e91abc3d9fba ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h -@@ -0,0 +1,71 @@ -+/* struct ucontext definition, ARC version. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* System V/ARC ABI compliant context switching support. */ -+ -+#ifndef _SYS_UCONTEXT_H -+#define _SYS_UCONTEXT_H 1 -+ -+#include -+ -+#include -+#include -+ -+#ifdef __USE_MISC -+# define __ctx(fld) fld -+#else -+# define __ctx(fld) __ ## fld -+#endif -+ -+typedef struct -+ { -+ unsigned long __ctx(pad); -+ struct { -+ unsigned long __ctx(bta); -+ unsigned long __ctx(lp_start), __ctx(lp_end), __ctx(lp_count); -+ unsigned long __ctx(status32), __ctx(ret), __ctx(blink); -+ unsigned long __ctx(fp), __ctx(gp); -+ unsigned long __ctx(r12), __ctx(r11), __ctx(r10), __ctx(r9), __ctx(r8); -+ unsigned long __ctx(r7), __ctx(r6), __ctx(r5), __ctx(r4), __ctx(r3); -+ unsigned long __ctx(r2), __ctx(r1), __ctx(r0); -+ unsigned long __ctx(sp); -+ } __ctx(scratch); -+ unsigned long __ctx(pad2); -+ struct { -+ unsigned long __ctx(r25), __ctx(r24), __ctx(r23), __ctx(r22), __ctx(r21); -+ unsigned long __ctx(r20), __ctx(r19), __ctx(r18), __ctx(r17), __ctx(r16); -+ unsigned long __ctx(r15), __ctx(r14), __ctx(r13); -+ } __ctx(callee); -+ unsigned long __ctx(efa); -+ unsigned long __ctx(stop_pc); -+ unsigned long __ctx(r30), __ctx(r58), __ctx(r59); -+ } mcontext_t; -+ -+/* Userlevel context. */ -+typedef struct ucontext_t -+ { -+ unsigned long __ctx(uc_flags); -+ struct ucontext_t *uc_link; -+ stack_t uc_stack; -+ mcontext_t uc_mcontext; -+ sigset_t uc_sigmask; -+ } ucontext_t; -+ -+#undef __ctx -+ -+#endif /* sys/ucontext.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/sys/user.h b/sysdeps/unix/sysv/linux/arc/sys/user.h -new file mode 100644 -index 000000000000..1f7129799bf6 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sys/user.h -@@ -0,0 +1,32 @@ -+/* ptrace register data format definitions. -+ Copyright (C) 1998-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _SYS_USER_H -+#define _SYS_USER_H 1 -+ -+/* struct user_regs_struct is exported by kernel header -+ * However apps like strace also expect a struct user, so it's better to -+ * have a dummy implementation -+ */ -+#include -+ -+struct user { -+ int dummy; -+}; -+ -+#endif /* sys/user.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S -new file mode 100644 -index 000000000000..8f76fa43e95f ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/syscall.S -@@ -0,0 +1,38 @@ -+/* syscall - indirect system call. -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+ -+ENTRY (syscall) -+ mov_s r8, r0 -+ mov_s r0, r1 -+ mov_s r1, r2 -+ mov_s r2, r3 -+ mov_s r3, r4 -+#ifdef __ARC700__ -+ mov r4, r5 -+ mov r5, r6 -+#else -+ mov_s r4, r5 -+ mov_s r5, r6 -+#endif -+ -+ ARC_TRAP_INSN -+ brhi r0, -1024, .Lcall_syscall_err -+ j [blink] -+PSEUDO_END (syscall) -diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.c b/sysdeps/unix/sysv/linux/arc/sysdep.c -new file mode 100644 -index 000000000000..d9bcc305b846 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sysdep.c -@@ -0,0 +1,33 @@ -+/* ARC wrapper for setting errno -+ Copyright (C) 1997-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+ -+/* All syscall handler come here to avoid generated code bloat due to -+ * GOT reference to errno_location or it's equivalent -+ */ -+int __syscall_error(int err_no) -+{ -+ __set_errno(-err_no); -+ return -1; -+} -+ -+#if IS_IN (libc) -+hidden_def (__syscall_error) -+#endif -diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h -new file mode 100644 -index 000000000000..9ed06a3206b0 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/sysdep.h -@@ -0,0 +1,260 @@ -+/* Assembler macros for ARC. -+ Copyright (C) 2000-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#ifndef _LINUX_ARC_SYSDEP_H -+#define _LINUX_ARC_SYSDEP_H 1 -+ -+#include -+#include -+#include -+ -+/* For RTLD_PRIVATE_ERRNO. */ -+#include -+ -+#include -+ -+#undef SYS_ify -+#define SYS_ify(syscall_name) __NR_##syscall_name -+ -+#ifdef __ASSEMBLER__ -+ -+/* This is a "normal" system call stub: if there is an error, -+ it returns -1 and sets errno. */ -+ -+# undef PSEUDO -+# define PSEUDO(name, syscall_name, args) \ -+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP \ -+ brhi r0, -1024, .Lcall_syscall_err ASM_LINE_SEP -+ -+#define ret j [blink] -+ -+# undef PSEUDO_END -+# define PSEUDO_END(name) \ -+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \ -+ END (name) -+ -+/* --------- helper for SYSCALL_NOERRNO ----------- */ -+ -+/* This kind of system call stub never returns an error. -+ We return the return value register to the caller unexamined. */ -+ -+# undef PSEUDO_NOERRNO -+# define PSEUDO_NOERRNO(name, syscall_name, args) \ -+ .text ASM_LINE_SEP \ -+ ENTRY (name) ASM_LINE_SEP \ -+ DO_CALL (syscall_name, args) ASM_LINE_SEP \ -+ -+/* return the return value register unexamined -+ * r0 is both syscall return reg and function return reg, so no need to do -+ * anything -+ */ -+# define ret_NOERRNO \ -+ j_s [blink] ASM_LINE_SEP -+ -+# undef PSEUDO_END_NOERRNO -+# define PSEUDO_END_NOERRNO(name) \ -+ END (name) -+ -+/* --------- helper for SYSCALL_ERRVAL ----------- */ -+ -+/* This kind of system call stub returns the errno code as its return -+ value, or zero for success. We may massage the kernel's return value -+ to meet that ABI, but we never set errno here. */ -+ -+# undef PSEUDO_ERRVAL -+# define PSEUDO_ERRVAL(name, syscall_name, args) \ -+ PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP -+ -+/* don't set errno, return kernel error (in errno form) or zero */ -+# define ret_ERRVAL \ -+ rsub r0, r0, 0 ASM_LINE_SEP \ -+ ret_NOERRNO -+ -+# undef PSEUDO_END_ERRVAL -+# define PSEUDO_END_ERRVAL(name) \ -+ END (name) -+ -+ -+/* To reduce the code footprint, we confine the actual errno access -+ * to single place in __syscall_error() -+ * this takes raw kernel error value, sets errno and returns -1 -+ */ -+#if IS_IN (libc) -+#define CALL_ERRNO_SETTER_C bl PLTJMP(HIDDEN_JUMPTARGET(__syscall_error)) -+#else -+#define CALL_ERRNO_SETTER_C bl PLTJMP(__syscall_error) -+#endif -+ -+# define SYSCALL_ERROR_HANDLER \ -+.Lcall_syscall_err: ASM_LINE_SEP \ -+ st.a blink, [sp, -4] ASM_LINE_SEP \ -+ cfi_adjust_cfa_offset (4) ASM_LINE_SEP \ -+ cfi_rel_offset (blink, 0) ASM_LINE_SEP \ -+ CALL_ERRNO_SETTER_C ASM_LINE_SEP \ -+ ld.ab blink, [sp, 4] ASM_LINE_SEP \ -+ cfi_adjust_cfa_offset (-4) ASM_LINE_SEP \ -+ cfi_restore (blink) ASM_LINE_SEP \ -+ j [blink] -+ -+# define DO_CALL(syscall_name, args) \ -+ mov r8, SYS_ify (syscall_name) ASM_LINE_SEP \ -+ ARC_TRAP_INSN ASM_LINE_SEP -+ -+#define ARC_TRAP_INSN trap_s 0 -+ -+#else /* !__ASSEMBLER__ */ -+ -+# define SINGLE_THREAD_BY_GLOBAL 1 -+ -+/* In order to get __set_errno() definition in INLINE_SYSCALL. */ -+#include -+ -+extern int __syscall_error (int); -+ -+#if IS_IN (libc) -+hidden_proto (__syscall_error) -+#define CALL_ERRNO_SETTER "bl __syscall_error \n\t" -+#else -+#define CALL_ERRNO_SETTER "bl __syscall_error@plt \n\t" -+#endif -+ -+ -+/* Define a macro which expands into the inline wrapper code for a system -+ call. */ -+#undef INLINE_SYSCALL -+#define INLINE_SYSCALL(name, nr_args, args...) \ -+({ \ -+ register int __res __asm__("r0"); \ -+ __res = INTERNAL_SYSCALL_NCS(__NR_##name, , nr_args, args); \ -+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \ -+ { \ -+ asm volatile ("st.a blink, [sp, -4] \n\t" \ -+ CALL_ERRNO_SETTER \ -+ "ld.ab blink, [sp, 4] \n\t" \ -+ :"+r" (__res) \ -+ : \ -+ :"r1","r2","r3","r4","r5","r6", \ -+ "r7","r8","r9","r10","r11","r12" \ -+ ); \ -+ } \ -+ __res; \ -+}) -+ -+#undef INTERNAL_SYSCALL_DECL -+#define INTERNAL_SYSCALL_DECL(err) do { } while (0) -+ -+#undef INTERNAL_SYSCALL_ERRNO -+# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) -+ -+/* -1 to -1023 are valid errno values */ -+#undef INTERNAL_SYSCALL_ERROR_P -+#define INTERNAL_SYSCALL_ERROR_P(val, err) \ -+ ((unsigned int) (val) > -1024U) -+ -+#define ARC_TRAP_INSN "trap_s 0 \n\t" -+ -+#undef INTERNAL_SYSCALL_RAW -+#define INTERNAL_SYSCALL_RAW(name, err, nr_args, args...) \ -+({ \ -+ /* Per ABI, r0 is 1st arg and return reg */ \ -+ register int __ret __asm__("r0"); \ -+ register int _sys_num __asm__("r8"); \ -+ \ -+ LOAD_ARGS_##nr_args (name, args) \ -+ \ -+ __asm__ volatile ( \ -+ ARC_TRAP_INSN \ -+ : "+r" (__ret) \ -+ : "r"(_sys_num) ASM_ARGS_##nr_args \ -+ : "memory"); \ -+ \ -+ __ret; \ -+}) -+ -+/* Macros for setting up inline __asm__ input regs */ -+#define ASM_ARGS_0 -+#define ASM_ARGS_1 ASM_ARGS_0, "r" (__ret) -+#define ASM_ARGS_2 ASM_ARGS_1, "r" (_arg2) -+#define ASM_ARGS_3 ASM_ARGS_2, "r" (_arg3) -+#define ASM_ARGS_4 ASM_ARGS_3, "r" (_arg4) -+#define ASM_ARGS_5 ASM_ARGS_4, "r" (_arg5) -+#define ASM_ARGS_6 ASM_ARGS_5, "r" (_arg6) -+#define ASM_ARGS_7 ASM_ARGS_6, "r" (_arg7) -+ -+/* Macros for converting sys-call wrapper args into sys call args */ -+#define LOAD_ARGS_0(nm, arg) \ -+ _sys_num = (int) (nm); -+ -+#define LOAD_ARGS_1(nm, arg1) \ -+ __ret = (int) (arg1); \ -+ LOAD_ARGS_0 (nm, arg1) -+ -+/* -+ * Note that the use of _tmpX might look superflous, however it is needed -+ * to ensure that register variables are not clobbered if arg happens to be -+ * a function call itself. e.g. sched_setaffinity() calling getpid() for arg2 -+ * -+ * Also this specific order of recursive calling is important to segregate -+ * the tmp args evaluation (function call case described above) and assigment -+ * of register variables -+ */ -+#define LOAD_ARGS_2(nm, arg1, arg2) \ -+ int _tmp2 = (int) (arg2); \ -+ LOAD_ARGS_1 (nm, arg1) \ -+ register int _arg2 __asm__ ("r1") = _tmp2; -+ -+#define LOAD_ARGS_3(nm, arg1, arg2, arg3) \ -+ int _tmp3 = (int) (arg3); \ -+ LOAD_ARGS_2 (nm, arg1, arg2) \ -+ register int _arg3 __asm__ ("r2") = _tmp3; -+ -+#define LOAD_ARGS_4(nm, arg1, arg2, arg3, arg4) \ -+ int _tmp4 = (int) (arg4); \ -+ LOAD_ARGS_3 (nm, arg1, arg2, arg3) \ -+ register int _arg4 __asm__ ("r3") = _tmp4; -+ -+#define LOAD_ARGS_5(nm, arg1, arg2, arg3, arg4, arg5) \ -+ int _tmp5 = (int) (arg5); \ -+ LOAD_ARGS_4 (nm, arg1, arg2, arg3, arg4) \ -+ register int _arg5 __asm__ ("r4") = _tmp5; -+ -+#define LOAD_ARGS_6(nm, arg1, arg2, arg3, arg4, arg5, arg6) \ -+ int _tmp6 = (int) (arg6); \ -+ LOAD_ARGS_5 (nm, arg1, arg2, arg3, arg4, arg5) \ -+ register int _arg6 __asm__ ("r5") = _tmp6; -+ -+#define LOAD_ARGS_7(nm, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\ -+ int _tmp7 = (int) (arg7); \ -+ LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6) \ -+ register int _arg7 __asm__ ("r6") = _tmp7; -+ -+#undef INTERNAL_SYSCALL -+#define INTERNAL_SYSCALL(name, err, nr, args...) \ -+ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) -+ -+#undef INTERNAL_SYSCALL_NCS -+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ -+ INTERNAL_SYSCALL_RAW(number, err, nr, args) -+ -+/* Pointer mangling not yet supported */ -+# define PTR_MANGLE(var) (void) (var) -+# define PTR_DEMANGLE(var) (void) (var) -+ -+#endif /* !__ASSEMBLER__ */ -+ -+#endif /* linux/arc/sysdep.h */ -diff --git a/sysdeps/unix/sysv/linux/arc/ucontext-macros.h b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h -new file mode 100644 -index 000000000000..a5d861476f3c ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ucontext-macros.h -@@ -0,0 +1,29 @@ -+/* Macros for ucontext routines - ARC -+ Copyright (C) 2017-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library. If not, see -+ . */ -+ -+#ifndef _LINUX_ARC_UCONTEXT_MACROS_H -+#define _LINUX_ARC_UCONTEXT_MACROS_H -+ -+#include -+ -+#include "ucontext_i.h" -+ -+#define SAVE_REG(reg, rbase, off) st reg, [rbase, UCONTEXT_MCONTEXT + off * 4] -+#define LOAD_REG(reg, rbase, off) ld reg, [rbase, UCONTEXT_MCONTEXT + off * 4] -+ -+#endif -diff --git a/sysdeps/unix/sysv/linux/arc/ucontext_i.sym b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym -new file mode 100644 -index 000000000000..f0a209e581ab ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/ucontext_i.sym -@@ -0,0 +1,20 @@ -+#include -+#include -+#include -+#include -+ -+SIG_BLOCK -+SIG_SETMASK -+ -+-- sizeof(sigset_t) expected by kernel: see comment in ARC sigaction.c for details -+_NSIG8 (_NSIG / 8) -+ -+-- Offsets of the fields in the ucontext_t structure. -+#define ucontext(member) offsetof (ucontext_t, member) -+ -+UCONTEXT_FLAGS ucontext (uc_flags) -+UCONTEXT_LINK ucontext (uc_link) -+UCONTEXT_STACK ucontext (uc_stack) -+UCONTEXT_MCONTEXT ucontext (uc_mcontext) -+UCONTEXT_SIGMASK ucontext (uc_sigmask) -+UCONTEXT_SIZE sizeof (ucontext_t) -diff --git a/sysdeps/unix/sysv/linux/arc/vfork.S b/sysdeps/unix/sysv/linux/arc/vfork.S -new file mode 100644 -index 000000000000..6d7f63c9900b ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/arc/vfork.S -@@ -0,0 +1,42 @@ -+/* vfork for ARC Linux. -+ Copyright (C) 2005-2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+#include -+#include -+#include -+#define _SIGNAL_H -+#include /* For SIGCHLD */ -+ -+#define CLONE_VM 0x00000100 -+#define CLONE_VFORK 0x00004000 -+#define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD) -+ -+ENTRY(__vfork) -+ mov r0, CLONE_FLAGS_FOR_VFORK -+ mov_s r1, sp -+ mov r8, __NR_clone -+ ARC_TRAP_INSN -+ -+ cmp r0, 0 -+ jge [blink] ; child continues -+ -+ b __syscall_error -+PSEUDO_END (__vfork) -+libc_hidden_def (__vfork) -+ -+weak_alias (__vfork, vfork) -diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list -index 5306d538e644..d038840b67d3 100644 ---- a/sysdeps/unix/sysv/linux/syscall-names.list -+++ b/sysdeps/unix/sysv/linux/syscall-names.list -@@ -42,6 +42,9 @@ adjtimex - afs_syscall - alarm - alloc_hugepages -+arc_gettls -+arc_settls -+arc_usr_cmpxchg - arch_prctl - arm_fadvise64_64 - arm_sync_file_range -diff --git a/timezone/tst-tzset.c b/timezone/tst-tzset.c -index 27f986b56dab..fca704c2ad2d 100644 ---- a/timezone/tst-tzset.c -+++ b/timezone/tst-tzset.c -@@ -25,7 +25,6 @@ - #include - #include - --#define TIMEOUT 5 - static int do_test (void); - #define TEST_FUNCTION do_test () - #include "../test-skeleton.c" -diff --git a/timezone/zic.c b/timezone/zic.c -index e738386600c2..53b25256d78c 100644 ---- a/timezone/zic.c -+++ b/timezone/zic.c -@@ -36,7 +36,7 @@ typedef int_fast64_t zic_t; - #include - #endif - #ifdef S_IRUSR --#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) -+#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH) - #else - #define MKDIR_UMASK 0755 - #endif diff --git a/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch b/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch deleted file mode 100644 index 06556430..00000000 --- a/bsp/meta-synopsys/recipes-core/glibc/files/0032-Add-with-nonshared-cflags-option-to-configure.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 2add82381a59df74de413d11166a9840e870e072 Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Fri, 17 Aug 2018 11:44:39 +0200 -Subject: [PATCH] Add --with-nonshared-cflags option to configure - -Upstream status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;f=INSTALL;h=6413fcde4fe0272eee469aaf41c8bb1d6e6a270f] - -Signed-off-by: Alexey Brodkin ---- - INSTALL | 16 ++++++++++++++++ - Makeconfig | 2 +- - config.make.in | 1 + - configure | 14 ++++++++++++++ - configure.ac | 8 ++++++++ - manual/install.texi | 14 ++++++++++++++ - 6 files changed, 54 insertions(+), 1 deletion(-) - -diff --git a/INSTALL b/INSTALL -index 781cb8415b..3e566ebfef 100644 ---- a/INSTALL -+++ b/INSTALL -@@ -90,6 +90,22 @@ if 'CFLAGS' is specified it must enable optimization. For example: - library will still be usable, but functionality may be lost--for - example, you can't build a shared libc with old binutils. - -+'--with-nonshared-cflags=CFLAGS' -+ Use additional compiler flags CFLAGS to build the parts of the -+ library which are always statically linked into applications and -+ libraries even with shared linking (that is, the object files -+ contained in 'lib*_nonshared.a' libraries). The build process will -+ automatically use the appropriate flags, but this option can be -+ used to set additional flags required for building applications and -+ libraries, to match local policy. For example, if such a policy -+ requires that all code linked into applications must be built with -+ source fortification, -+ '--with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2' will make sure -+ that the objects in 'libc_nonshared.a' are compiled with this flag -+ (although this will not affect the generated code in this -+ particular case and potentially change debugging information and -+ metadata only). -+ - '--disable-shared' - Don't build shared libraries even if it is possible. Not all - systems support shared libraries; you need ELF support and -diff --git a/Makeconfig b/Makeconfig -index 608ffe648c..b0b27f0113 100644 ---- a/Makeconfig -+++ b/Makeconfig -@@ -1038,7 +1038,7 @@ object-suffixes-for-libc += .oS - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) -+CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) $(extra-nonshared-cflags) - CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 - libtype.oS = lib%_nonshared.a - endif -diff --git a/config.make.in b/config.make.in -index d9891b2cd8..a6fe48d31f 100644 ---- a/config.make.in -+++ b/config.make.in -@@ -110,6 +110,7 @@ BUILD_CC = @BUILD_CC@ - CFLAGS = @CFLAGS@ - CPPFLAGS-config = @CPPFLAGS@ - CPPUNDEFS = @CPPUNDEFS@ -+extra-nonshared-cflags = @extra_nonshared_cflags@ - ASFLAGS-config = @ASFLAGS_config@ - AR = @AR@ - NM = @NM@ -diff --git a/configure b/configure -index fde57d63fe..285a6537f0 100755 ---- a/configure -+++ b/configure -@@ -684,6 +684,7 @@ force_install - bindnow - hardcoded_path_in_tests - enable_timezone_tools -+extra_nonshared_cflags - use_default_link - sysheaders - ac_ct_CXX -@@ -762,6 +763,7 @@ with_binutils - with_selinux - with_headers - with_default_link -+with_nonshared_cflags - enable_sanity_checks - enable_shared - enable_profile -@@ -1482,6 +1484,8 @@ Optional Packages: - --with-headers=PATH location of system headers to use (for example - /usr/src/linux/include) [default=compiler default] - --with-default-link do not use explicit linker scripts -+ --with-nonshared-cflags=CFLAGS -+ build nonshared libraries with additional CFLAGS - --with-cpu=CPU select code for CPU variant - - Some influential environment variables: -@@ -3339,6 +3343,16 @@ else - fi - - -+ -+# Check whether --with-nonshared-cflags was given. -+if test "${with_nonshared_cflags+set}" = set; then : -+ withval=$with_nonshared_cflags; extra_nonshared_cflags=$withval -+else -+ extra_nonshared_cflags= -+fi -+ -+ -+ - # Check whether --enable-sanity-checks was given. - if test "${enable_sanity_checks+set}" = set; then : - enableval=$enable_sanity_checks; enable_sanity=$enableval -diff --git a/configure.ac b/configure.ac -index 014e09a5d5..8045d44dd0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -154,6 +154,14 @@ AC_ARG_WITH([default-link], - [use_default_link=$withval], - [use_default_link=default]) - -+dnl Additional build flags injection. -+AC_ARG_WITH([nonshared-cflags], -+ AC_HELP_STRING([--with-nonshared-cflags=CFLAGS], -+ [build nonshared libraries with additional CFLAGS]), -+ [extra_nonshared_cflags=$withval], -+ [extra_nonshared_cflags=]) -+AC_SUBST(extra_nonshared_cflags) -+ - AC_ARG_ENABLE([sanity-checks], - AC_HELP_STRING([--disable-sanity-checks], - [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]), -diff --git a/manual/install.texi b/manual/install.texi -index c39e63bf3b..5476bb66f7 100644 ---- a/manual/install.texi -+++ b/manual/install.texi -@@ -117,6 +117,20 @@ problem and suppress these constructs, so that the library will still be - usable, but functionality may be lost---for example, you can't build a - shared libc with old binutils. - -+@item --with-nonshared-cflags=@var{cflags} -+Use additional compiler flags @var{cflags} to build the parts of the -+library which are always statically linked into applications and -+libraries even with shared linking (that is, the object files contained -+in @file{lib*_nonshared.a} libraries). The build process will -+automatically use the appropriate flags, but this option can be used to -+set additional flags required for building applications and libraries, -+to match local policy. For example, if such a policy requires that all -+code linked into applications must be built with source fortification, -+@samp{--with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2} will make sure -+that the objects in @file{libc_nonshared.a} are compiled with this flag -+(although this will not affect the generated code in this particular -+case and potentially change debugging information and metadata only). -+ - @c disable static doesn't work currently - @c @item --disable-static - @c Don't build static libraries. Static libraries aren't that useful these --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend deleted file mode 100644 index 25f96bf3..00000000 --- a/bsp/meta-synopsys/recipes-core/glibc/glibc-initial_2.28.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += "file://0031-Add-ARC-architecture.patch \ - file://0032-Add-with-nonshared-cflags-option-to-configure.patch \ -" diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend deleted file mode 100644 index 25f96bf3..00000000 --- a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.28.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += "file://0031-Add-ARC-architecture.patch \ - file://0032-Add-with-nonshared-cflags-option-to-configure.patch \ -" diff --git a/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend new file mode 100644 index 00000000..f72214cf --- /dev/null +++ b/bsp/meta-synopsys/recipes-core/glibc/glibc_2.31.bbappend @@ -0,0 +1,33 @@ +CFLAGS_append += " -Wno-error" +EXTRA_OECONF += " --disable-werror --disable-multilib" +SRCBRANCH = "master" +SRCREV_glibc = "758caf37366c3bebd349cd3107341dbfd761189a" +SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ + file://etc/ld.so.conf \ + file://generate-supported.mk \ + file://makedbs.sh \ + \ + ${NATIVESDKFIXES} \ + file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ + file://0009-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \ + file://0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \ + file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \ + file://0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ + file://0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \ + file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \ + file://0017-yes-within-the-path-sets-wrong-config-variables.patch \ + file://0018-timezone-re-written-tzselect-as-posix-sh.patch \ + file://0019-Remove-bash-dependency-for-nscd-init-script.patch \ + file://0020-eglibc-Cross-building-and-testing-instructions.patch \ + file://0021-eglibc-Help-bootstrap-cross-toolchain.patch \ + file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \ + file://0023-eglibc-Forward-port-cross-locale-generation-support.patch \ + file://0024-Define-DUMMY_LOCALE_T-if-not-defined.patch \ + file://0025-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ + file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ + file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \ + file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ + " + + diff --git a/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch b/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch new file mode 100644 index 00000000..b6aeadd0 --- /dev/null +++ b/bsp/meta-synopsys/recipes-core/systemd/files/0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch @@ -0,0 +1,74 @@ +From c5e346905952fef0f163d91522dd43333f1f219d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 16 Apr 2020 16:49:30 +0200 +Subject: [PATCH] network: fix static assertion on IPPROTO_MAX range +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Builds with recent glibc would fail with: +../src/network/netdev/fou-tunnel.c: In function ‘config_parse_ip_protocol’: +../src/basic/macro.h:380:9: error: static assertion failed: "IPPROTO_MAX-1 <= UINT8_MAX" + 380 | static_assert(expr, #expr) + | ^~~~~~~~~~~~~ +../src/network/netdev/fou-tunnel.c:161:9: note: in expansion of macro ‘assert_cc’ + 161 | assert_cc(IPPROTO_MAX-1 <= UINT8_MAX); + | ^~~~~~~~~ + +This is because f9ac84f92f151e07586c55e14ed628d493a5929d (present in +glibc-2.31.9000-9.fc33.x86_64) added IPPROTO_MPTCP=262, following +v5.5-rc5-1002-gfaf391c382 in the kernel. + +(cherry picked from commit 3d58d7328a6ecbc61d3494803d705edd8a108d72) +--- + src/network/netdev/fou-tunnel.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +diff --git a/src/network/netdev/fou-tunnel.c b/src/network/netdev/fou-tunnel.c +index 3cc273c7fe..40abacd6f7 100644 +--- a/src/network/netdev/fou-tunnel.c ++++ b/src/network/netdev/fou-tunnel.c +@@ -149,7 +149,10 @@ int config_parse_ip_protocol( + void *data, + void *userdata) { + +- uint8_t *protocol = data; ++ uint8_t *ret = data; ++ unsigned protocol; ++ /* linux/fou.h defines the netlink field as one byte, so we need to reject protocols numbers that ++ * don't fit in one byte. */ + int r; + + assert(filename); +@@ -158,11 +161,11 @@ int config_parse_ip_protocol( + assert(rvalue); + assert(data); + +- assert_cc(IPPROTO_MAX-1 <= UINT8_MAX); +- + r = parse_ip_protocol(rvalue); +- if (r < 0) { +- r = safe_atou8(rvalue, protocol); ++ if (r >= 0) ++ protocol = r; ++ else { ++ r = safe_atou(rvalue, &protocol); + if (r < 0) + log_syntax(unit, LOG_ERR, filename, line, r, + "Failed to parse IP protocol '%s' for Foo over UDP tunnel, " +@@ -170,7 +173,14 @@ int config_parse_ip_protocol( + return 0; + } + +- *protocol = r; ++ if (protocol > UINT8_MAX) { ++ log_syntax(unit, LOG_ERR, filename, line, 0, ++ "IP protocol '%s' for FooOverUDP tunnel out of range, " ++ "ignoring assignment: %m", rvalue); ++ return 0; ++ } ++ ++ *ret = protocol; + return 0; + } + diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend b/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend deleted file mode 100644 index 6d076184..00000000 --- a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "\ - file://0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch \ -" - - diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch b/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch deleted file mode 100644 index d002368e..00000000 --- a/bsp/meta-synopsys/recipes-core/systemd/systemd-conf/0001-Add-MESA_LOADER_DRIVER_OVERRIDE-imx-drm-env-to-etc-s.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 37cba4c262828c9a33466e71206046dbeb151300 Mon Sep 17 00:00:00 2001 -From: Evgeniy Didin -Date: Tue, 2 Apr 2019 17:49:52 +0300 -Subject: [PATCH] Add MESA_LOADER_DRIVER_OVERRIDE=imx-drm env to - /etc/systemd/system.conf - -Signed-off-by: Evgeniy Didin ---- - src/core/system.conf.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/system.conf.in b/src/core/system.conf.in -index f0a59a79a5..2851151ad0 100644 ---- a/src/core/system.conf.in -+++ b/src/core/system.conf.in -@@ -38,7 +38,7 @@ - #DefaultRestartSec=100ms - #DefaultStartLimitIntervalSec=10s - #DefaultStartLimitBurst=5 --#DefaultEnvironment= -+DefaultEnvironment="MESA_LOADER_DRIVER_OVERRIDE=imx-drm" - #DefaultCPUAccounting=no - #DefaultIOAccounting=no - #DefaultIPAccounting=no --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend b/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend new file mode 100644 index 00000000..4f3c2a7c --- /dev/null +++ b/bsp/meta-synopsys/recipes-core/systemd/systemd_244.3.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append += "\ + file://0001-network-fix-static-assertion-on-IPPROTO_MAX-range.patch; \ +" diff --git a/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend b/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend deleted file mode 100644 index 50339c4e..00000000 --- a/bsp/meta-synopsys/recipes-core/util-linux/util-linux_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -EXTRA_OECONF += "--disable-tls" diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc b/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc index 2b397fb7..0dec79a8 100644 --- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc +++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils-arc.inc @@ -10,14 +10,12 @@ LIC_FILES_CHKSUM="\ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ " -SRCREV ?= "arc-2018.09-release" +SRCREV ?= "arc-2019.09-release" SRC_URI = "\ - git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb;protocol=https;branch=arc-2018.09; \ + git://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb;protocol=https;branch=arc-2019.09; \ file://0004-Point-scripts-location-to-libdir.patch \ - file://0005-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \ - file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \ " S = "${WORKDIR}/git" diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch index 6bdb407b..7c4346aa 100644 --- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch +++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch @@ -1,7 +1,7 @@ -From 4a99f058030c86794bb96b582a7dbd631f963b06 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 2 Mar 2015 01:58:54 +0000 -Subject: [PATCH 01/15] binutils-crosssdk: Generate relocatable SDKs +From 0ba27f807d86490d0563d776ec32719262a54bb4 Mon Sep 17 00:00:00 2001 +From: Evgeniy Didin +Date: Wed, 15 Apr 2020 13:13:19 +0300 +Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs This patch will modify the ELF linker scripts so that the crosssdk linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries @@ -12,41 +12,42 @@ Upstream-Status: Inappropriate [SDK specific] Signed-off-by: Laurentiu Palcu Signed-off-by: Khem Raj +Signed-off-by: Evgeniy Didin --- ld/genscripts.sh | 3 +++ ld/scripttempl/elf.sc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ld/genscripts.sh b/ld/genscripts.sh -index 370b22269d..a5c367aa8f 100755 +index cb2b081e9e9..db2e9fd569d 100755 --- a/ld/genscripts.sh +++ b/ld/genscripts.sh -@@ -279,6 +279,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}" +@@ -325,6 +325,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}" LD_FLAG=r DATA_ALIGNMENT=${DATA_ALIGNMENT_r} DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})" +PARTIAL_LINKING=" " ( echo "/* Script for ld -r: link without relocation */" - . ${CUSTOMIZER_SCRIPT} - . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc -@@ -287,10 +288,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})" + source_sh ${CUSTOMIZER_SCRIPT} + source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc +@@ -333,10 +334,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})" LD_FLAG=u DATA_ALIGNMENT=${DATA_ALIGNMENT_u} CONSTRUCTING=" " +PARTIAL_LINKING=" " ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */" - . ${CUSTOMIZER_SCRIPT} - . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc + source_sh ${CUSTOMIZER_SCRIPT} + source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu +unset PARTIAL_LINKING DATA_ALIGNMENT=${DATA_ALIGNMENT_} RELOCATING=" " diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..afa99f736d 100644 +index c3ad467bff4..a847ffecc19 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc -@@ -139,8 +139,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then +@@ -140,8 +140,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" fi fi @@ -58,5 +59,5 @@ index 444aef2942..afa99f736d 100644 if test -z "$PLT"; then IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }" -- -2.18.0 +2.16.2 diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch index 9a9e3196..9727821b 100644 --- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch +++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch @@ -1,7 +1,7 @@ -From a3667059fc0d52d890b505bed0e5050ea3d7002e Mon Sep 17 00:00:00 2001 +From 98f68c0892ba4bbd53b0a0a4cbbdf0b7197e0320 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 15 Jan 2016 06:31:09 +0000 -Subject: [PATCH 09/15] warn for uses of system directories when cross linking +Subject: [PATCH 08/15] warn for uses of system directories when cross linking 2008-07-02 Joseph Myers @@ -77,7 +77,7 @@ index d93c9b0830..5da2742bea 100644 #undef EXTRA_SHLIB_EXTENSION diff --git a/ld/configure b/ld/configure -index 2b291f0da8..facc386563 100755 +index 43c391c2b3..ff9f6b3c02 100755 --- a/ld/configure +++ b/ld/configure @@ -826,6 +826,7 @@ with_lib_path @@ -118,7 +118,7 @@ index 2b291f0da8..facc386563 100755 if test "${enable_gold+set}" = set; then : enableval=$enable_gold; case "${enableval}" in diff --git a/ld/configure.ac b/ld/configure.ac -index d10c553650..9f1b57b120 100644 +index d335f21091..7f692d9387 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -94,6 +94,16 @@ AC_SUBST(use_sysroot) @@ -139,7 +139,7 @@ index d10c553650..9f1b57b120 100644 dnl "install_as_default" is set to false if gold is the default linker. dnl "installed_linker" is the installed BFD linker name. diff --git a/ld/ld.h b/ld/ld.h -index ba914b921e..9df17dab6c 100644 +index b97d977f37..f3bbd2d55d 100644 --- a/ld/ld.h +++ b/ld/ld.h @@ -180,6 +180,14 @@ typedef struct @@ -158,10 +158,10 @@ index ba914b921e..9df17dab6c 100644 enum endian_enum endian; diff --git a/ld/ld.texi b/ld/ld.texi -index b9fe2324da..43486605e0 100644 +index 5179af3e0e..f78bf74682 100644 --- a/ld/ld.texi +++ b/ld/ld.texi -@@ -2479,6 +2479,18 @@ string identifying the original linked file does not change. +@@ -2524,6 +2524,18 @@ string identifying the original linked file does not change. Passing @code{none} for @var{style} disables the setting from any @code{--build-id} options earlier on the command line. @@ -181,7 +181,7 @@ index b9fe2324da..43486605e0 100644 @c man end diff --git a/ld/ldfile.c b/ld/ldfile.c -index a72ff13526..dc5148f748 100644 +index fcadc08c73..63e295ce8a 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -116,6 +116,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) @@ -209,7 +209,7 @@ index a72ff13526..dc5148f748 100644 /* Try to open a BFD for a lang_input_statement. */ diff --git a/ld/ldlex.h b/ld/ldlex.h -index 04d6fd5f96..d7df005bb2 100644 +index 32853debe4..8135361c49 100644 --- a/ld/ldlex.h +++ b/ld/ldlex.h @@ -148,6 +148,8 @@ enum option_values @@ -222,10 +222,10 @@ index 04d6fd5f96..d7df005bb2 100644 /* The initial parser states. */ diff --git a/ld/ldmain.c b/ld/ldmain.c -index f31eeb29c3..25f8497888 100644 +index 77cdbd0dd2..725512f126 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c -@@ -268,6 +268,8 @@ main (int argc, char **argv) +@@ -269,6 +269,8 @@ main (int argc, char **argv) command_line.warn_mismatch = TRUE; command_line.warn_search_mismatch = TRUE; command_line.check_section_addresses = -1; @@ -235,7 +235,7 @@ index f31eeb29c3..25f8497888 100644 /* We initialize DEMANGLING based on the environment variable COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the diff --git a/ld/lexsup.c b/ld/lexsup.c -index 86a033a383..4a40d48020 100644 +index 88e85c73f4..eed1b71456 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -543,6 +543,14 @@ static const struct ld_option ld_options[] = @@ -269,5 +269,5 @@ index 86a033a383..4a40d48020 100644 } -- -2.18.0 +2.20.1 diff --git a/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb b/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb index 09c6a886..a7928ecf 100644 --- a/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb +++ b/bsp/meta-synopsys/recipes-devtools/binutils/binutils_arc.bb @@ -45,5 +45,7 @@ do_install_class-native () { # Split out libbfd-*.so so including perf doesn't include extra stuff PACKAGE_BEFORE_PN += "libbfd" FILES_libbfd = "${libdir}/libbfd-*.so" +PACKAGE_BEFORE_PN += "libopcodes" +FILES_libopcodes = "${libdir}/libopcodes-*.so" BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc index 3807a697..f0f8146c 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc.inc @@ -6,7 +6,7 @@ PV = "arc" # BINV should be incremented to a revision after a minor gcc release -BINV = "8.2.1" +BINV = "9.2.1" FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-arc:" @@ -23,10 +23,10 @@ LIC_FILES_CHKSUM = "\ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ " -SRCREV ?= "arc-2018.09-release" +SRCREV ?= "arc-2019.09-release" SRC_URI = "\ - git://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git;protocol=https;branch=arc-2018.09; \ + git://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git;protocol=https;branch=arc-2019.09; \ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ file://0003-gcc-poison-system-directories.patch \ file://0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ @@ -36,7 +36,7 @@ SRC_URI = "\ file://0009-COLLECT_GCC_OPTIONS.patch \ file://0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ file://0011-fortran-cross-compile-hack.patch \ - file://0012-cpp-honor-sysroot.patch \ + file://0012-cpp-honor-sysroot.patch \ file://0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ file://0015-gcc-Fix-argument-list-too-long-error.patch \ file://0016-Disable-sdt.patch \ @@ -61,8 +61,7 @@ SRC_URI = "\ file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ file://0039-Fix-for-testsuite-failure.patch \ file://0040-Re-introduce-spe-commandline-options.patch \ - file://0041-ARC-Emit-blockage-regardless-to-avoid-delay-slot-sch.patch \ - file://0042-ARC-Dont-throw-errors-when-compiling-for-xarch.patch \ + file://0042-ARC-Dont-throw-errors-when-compiling-for-xarch.patch \ ${BACKPORTS} \ " BACKPORTS = "\ diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch index 05138976..a1116e75 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0003-gcc-poison-system-directories.patch @@ -1,11 +1,20 @@ -From 48c670d2678e0323d88eb72205e039f393cabe05 Mon Sep 17 00:00:00 2001 +From 68e78bc15de215fa15c7d8b56bd2e2b0539b34fa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH 03/39] gcc: poison-system-directories +Subject: [PATCH 02/36] gcc: poison-system-directories +Add /sw/include and /opt/include based on the original +zecke-no-host-includes.patch patch. The original patch checked for +/usr/include, /sw/include and /opt/include and then triggered a failure and +aborted. + +Instead, we add the two missing items to the current scan. If the user +wants this to be a failure, they can add "-Werror=poison-system-directories". + +Signed-off-by: Mark Hatle Signed-off-by: Khem Raj -Upstream-Status: Inappropriate [distribution: codesourcery] +Upstream-Status: Pending --- gcc/common.opt | 4 ++++ gcc/config.in | 6 ++++++ @@ -13,14 +22,14 @@ Upstream-Status: Inappropriate [distribution: codesourcery] gcc/configure.ac | 10 ++++++++++ gcc/doc/invoke.texi | 9 +++++++++ gcc/gcc.c | 2 ++ - gcc/incpath.c | 19 +++++++++++++++++++ - 7 files changed, 66 insertions(+) + gcc/incpath.c | 21 +++++++++++++++++++++ + 7 files changed, 68 insertions(+) diff --git a/gcc/common.opt b/gcc/common.opt -index d6ef85928f3..7b29efe3882 100644 +index d342c4f3749..c64fd4a6c50 100644 --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -679,6 +679,10 @@ Wreturn-local-addr +@@ -684,6 +684,10 @@ Wreturn-local-addr Common Var(warn_return_local_addr) Init(1) Warning Warn about returning a pointer/reference to a local or temporary variable. @@ -32,10 +41,10 @@ index d6ef85928f3..7b29efe3882 100644 Common Var(warn_shadow) Warning Warn when one variable shadows another. Same as -Wshadow=global. diff --git a/gcc/config.in b/gcc/config.in -index 5bccb408016..1c784a8276b 100644 +index a718ceaf3da..5713342efb1 100644 --- a/gcc/config.in +++ b/gcc/config.in -@@ -194,6 +194,12 @@ +@@ -200,6 +200,12 @@ #endif @@ -49,10 +58,10 @@ index 5bccb408016..1c784a8276b 100644 optimizer and back end) to be checked for dynamic type safety at runtime. This is quite expensive. */ diff --git a/gcc/configure b/gcc/configure -index 5c345ce0fd7..cafd05fd150 100755 +index 481071b4265..a6ea3a8a84c 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -953,6 +953,7 @@ with_system_zlib +@@ -995,6 +995,7 @@ with_system_zlib enable_maintainer_mode enable_link_mutex enable_version_specific_runtime_libs @@ -60,7 +69,7 @@ index 5c345ce0fd7..cafd05fd150 100755 enable_plugin enable_host_shared enable_libquadmath_support -@@ -1696,6 +1697,8 @@ Optional Features: +@@ -1748,6 +1749,8 @@ Optional Features: --enable-version-specific-runtime-libs specify that runtime libraries should be installed in a compiler-specific directory @@ -69,7 +78,7 @@ index 5c345ce0fd7..cafd05fd150 100755 --enable-plugin enable plugin support --enable-host-shared build host code as shared libraries --disable-libquadmath-support -@@ -29715,6 +29718,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : +@@ -29750,6 +29753,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : fi @@ -90,10 +99,10 @@ index 5c345ce0fd7..cafd05fd150 100755 diff --git a/gcc/configure.ac b/gcc/configure.ac -index 65dbf1f2f80..dd5b38195ce 100644 +index ce2825580c6..d42bbd4fd1c 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac -@@ -6341,6 +6341,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, +@@ -6378,6 +6378,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, [specify that runtime libraries should be installed in a compiler-specific directory])]) @@ -111,18 +120,18 @@ index 65dbf1f2f80..dd5b38195ce 100644 AC_SUBST(subdirs) AC_SUBST(srcdir) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 255149fcfb8..cb71b60fe3c 100644 +index 6ef36ce02aa..09414d8cc05 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -303,6 +303,7 @@ Objective-C and Objective-C++ Dialects}. - -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol +@@ -332,6 +332,7 @@ Objective-C and Objective-C++ Dialects}. + -Wpacked -Wpacked-bitfield-compat -Wpacked-not-aligned -Wpadded @gol -Wparentheses -Wno-pedantic-ms-format @gol -Wplacement-new -Wplacement-new=@var{n} @gol +-Wno-poison-system-directories @gol -Wpointer-arith -Wpointer-compare -Wno-pointer-to-int-cast @gol - -Wno-pragmas -Wredundant-decls -Wrestrict -Wno-return-local-addr @gol - -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol -@@ -5712,6 +5713,14 @@ made up of data only and thus requires no special treatment. But, for + -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol + -Wrestrict -Wno-return-local-addr @gol +@@ -6289,6 +6290,14 @@ made up of data only and thus requires no special treatment. But, for most targets, it is made up of code and thus requires the stack to be made executable in order for the program to work properly. @@ -138,20 +147,20 @@ index 255149fcfb8..cb71b60fe3c 100644 @opindex Wfloat-equal @opindex Wno-float-equal diff --git a/gcc/gcc.c b/gcc/gcc.c -index a716f708259..02b3cd39fc2 100644 +index 4f57765b012..a2601a6bb06 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1037,6 +1037,8 @@ proper position among the other output files. */ +@@ -1042,6 +1042,8 @@ proper position among the other output files. */ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ + %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ + %{Wno-poison-system-directories:--no-poison-system-directories} \ + %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static|no-pie|static-pie:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ + %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ + VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ diff --git a/gcc/incpath.c b/gcc/incpath.c -index b11c6a57939..e3b7a21966f 100644 +index bcbe2082905..5752298bbf2 100644 --- a/gcc/incpath.c +++ b/gcc/incpath.c @@ -26,6 +26,7 @@ @@ -190,5 +199,5 @@ index b11c6a57939..e3b7a21966f 100644 /* Use given -I paths for #include "..." but not #include <...>, and -- -2.17.0 +2.22.1 diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch index 721ea03f..f4fac914 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0007-optional-libstdc.patch @@ -1,7 +1,7 @@ -From fb7df63e9548c29b70601d642a1850fc455f8565 Mon Sep 17 00:00:00 2001 +From e7e504f4a90cfa395e7f8ee779f8c3ed687802ca Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 09:12:56 +0400 -Subject: [PATCH 07/39] optional libstdc +Subject: [PATCH 05/36] optional libstdc gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++ will not run correctly since by default the linker will try to link against libstdc++ @@ -25,10 +25,10 @@ Upstream-Status: Inappropriate [embedded specific] 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt -index 5013501b232..6312f2c8f90 100644 +index 916cc67b453..41619fa591c 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -1900,6 +1900,10 @@ nostdinc++ +@@ -1952,6 +1952,10 @@ nostdinc++ C++ ObjC++ Do not search standard system include directories for C++. @@ -40,7 +40,7 @@ index 5013501b232..6312f2c8f90 100644 C ObjC C++ ObjC++ Joined Separate ; Documented in common.opt diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c -index 443a1746da3..e9b51be62ef 100644 +index 6c4574a837d..0e2657f00ee 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, @@ -52,10 +52,10 @@ index 443a1746da3..e9b51be62ef 100644 library = -1; break; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index cb71b60fe3c..b0d481e3a30 100644 +index 09414d8cc05..a43969bc9f0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -211,6 +211,9 @@ in the following sections. +@@ -228,6 +228,9 @@ in the following sections. -fno-weak -nostdinc++ @gol -fvisibility-inlines-hidden @gol -fvisibility-ms-compat @gol @@ -64,19 +64,19 @@ index cb71b60fe3c..b0d481e3a30 100644 +-nostdlib++ @gol -fext-numeric-literals @gol -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol - -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol -@@ -509,7 +512,7 @@ Objective-C and Objective-C++ Dialects}. - -s -static -static-pie -static-libgcc -static-libstdc++ @gol + -Wdelete-non-virtual-dtor -Wdeprecated-copy -Wdeprecated-copy-dtor @gol +@@ -538,7 +541,7 @@ Objective-C and Objective-C++ Dialects}. + -pie -pthread -r -rdynamic @gol + -s -static -static-pie -static-libgcc -static-libstdc++ @gol -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol - -static-libmpx -static-libmpxwrappers @gol --shared -shared-libgcc -symbolic @gol +-shared -shared-libgcc -symbolic -nostdlib++ @gol -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol -u @var{symbol} -z @var{keyword}} -@@ -12331,6 +12334,33 @@ library subroutines. - constructors are called; @pxref{Collect2,,@code{collect2}, gccint, - GNU Compiler Collection (GCC) Internals}.) +@@ -13312,6 +13315,33 @@ Specify that the program entry point is @var{entry}. The argument is + interpreted by the linker; the GNU linker accepts either a symbol name + or an address. +@item -nostdlib++ +@opindex nostdlib++ @@ -109,17 +109,17 @@ index cb71b60fe3c..b0d481e3a30 100644 @opindex pie Produce a dynamically linked position independent executable on targets diff --git a/gcc/gcc.c b/gcc/gcc.c -index 02b3cd39fc2..8cd27a5dad5 100644 +index a2601a6bb06..cd6c6fc95db 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1047,6 +1047,7 @@ proper position among the other output files. */ +@@ -1052,6 +1052,7 @@ proper position among the other output files. */ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ - %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ + %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\ + %{!nostdlib++:}\ - %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}" + %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}" #endif -- -2.17.0 +2.22.1 diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch index 961f96f1..6af0a012 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0012-cpp-honor-sysroot.patch @@ -1,7 +1,7 @@ -From b3e8e7e8ae106e3207e9edc3d23dcce1464b755f Mon Sep 17 00:00:00 2001 +From 45e9cd39d9c62454d46b9e9473a0c1034ceca15d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 09:22:00 +0400 -Subject: [PATCH 12/39] cpp: honor sysroot. +Subject: [PATCH 09/36] cpp: honor sysroot. Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location @@ -26,21 +26,21 @@ Upstream-Status: Pending 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h -index f0802b8915c..f324d299849 100644 +index c6e42eda283..e1ddf066467 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h -@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see +@@ -66,5 +66,5 @@ along with GCC; see the file COPYING3. If not see {".ii", "@c++-cpp-output", 0, 0, 0}, {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2\ -+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + "%{!E:%{!M:%{!MM:" +- " cc1plus -fpreprocessed %i %(cc1_options) %2" ++ " cc1plus -fpreprocessed %i %I %(cc1_options) %2" + " %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, diff --git a/gcc/gcc.c b/gcc/gcc.c -index d355d65583a..570cdc00034 100644 +index 7da9c5d457b..4e7c45b268c 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -1343,7 +1343,7 @@ static const struct compiler default_compilers[] = +@@ -1349,7 +1349,7 @@ static const struct compiler default_compilers[] = %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, {".i", "@cpp-output", 0, 0, 0}, {"@cpp-output", @@ -50,5 +50,5 @@ index d355d65583a..570cdc00034 100644 {"@assembler", "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, -- -2.17.0 +2.22.1 diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch index 043bb9dd..66fb24d4 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch @@ -1,7 +1,7 @@ -From 53f1c382b1366c5621c8edead9c766950c290fd9 Mon Sep 17 00:00:00 2001 +From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 29 Mar 2013 09:24:50 +0400 -Subject: [PATCH 14/39] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER +Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER relative to SYSTEMLIBS_DIR This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER @@ -24,14 +24,14 @@ Upstream-Status: Inappropriate [OE configuration] gcc/config/linux.h | 8 ++++---- gcc/config/mips/linux.h | 12 ++++++------ gcc/config/riscv/linux.h | 2 +- - gcc/config/rs6000/linux64.h | 16 ++++++---------- + gcc/config/rs6000/linux64.h | 15 +++++---------- gcc/config/sh/linux.h | 2 +- gcc/config/sparc/linux.h | 2 +- gcc/config/sparc/linux64.h | 4 ++-- - 12 files changed, 30 insertions(+), 34 deletions(-) + 12 files changed, 29 insertions(+), 34 deletions(-) diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h -index 36b74dc1993..02373578af8 100644 +index 824861befec..6afacce3292 100644 --- a/gcc/config/alpha/linux-elf.h +++ b/gcc/config/alpha/linux-elf.h @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see @@ -46,10 +46,10 @@ index 36b74dc1993..02373578af8 100644 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" #elif DEFAULT_LIBC == LIBC_GLIBC diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index 8585fde3d41..b3af68cac57 100644 +index 66ec0ea3980..e4ade2e2ab0 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -62,8 +62,8 @@ +@@ -65,8 +65,8 @@ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ #undef GLIBC_DYNAMIC_LINKER @@ -61,7 +61,7 @@ index 8585fde3d41..b3af68cac57 100644 #define GLIBC_DYNAMIC_LINKER \ diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h -index cfcd9cb1a5c..a798e987ecb 100644 +index 9a360defd21..98f6e960b64 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -60,7 +60,7 @@ @@ -74,7 +74,7 @@ index cfcd9cb1a5c..a798e987ecb 100644 #define LINUX_TARGET_LINK_SPEC "%{h*} \ %{static:-Bstatic} \ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index 69f97f15b0d..71bc31d9231 100644 +index 9a6e2d99896..31efbb73016 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see @@ -87,7 +87,7 @@ index 69f97f15b0d..71bc31d9231 100644 #undef MUSL_DYNAMIC_LINKER #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index f2d913e30ac..8725f33d8a5 100644 +index c08221c4210..dbb474d792b 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -104,10 +104,10 @@ index f2d913e30ac..8725f33d8a5 100644 #undef MUSL_DYNAMIC_LINKER32 #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 2ea4ff92c1d..487b0c0923b 100644 +index c3c4a219e67..4b05d8e93d1 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h -@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -94,10 +94,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see GLIBC_DYNAMIC_LINKER must be defined for each target using them, or GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets supporting both 32-bit and 64-bit compilation. */ @@ -123,7 +123,7 @@ index 2ea4ff92c1d..487b0c0923b 100644 #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 2dfd0c18b90..12057c51b5e 100644 +index 6f79ac9c01a..25de96f9561 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see @@ -154,10 +154,10 @@ index 2dfd0c18b90..12057c51b5e 100644 #undef MUSL_DYNAMIC_LINKER32 #define MUSL_DYNAMIC_LINKER32 \ diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h -index aa8a28d5d..ebf9551c9 100644 +index 58dd18b89f3..112ba9cd764 100644 --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h -@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. +@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see GNU_USER_TARGET_OS_CPP_BUILTINS(); \ } while (0) @@ -167,10 +167,10 @@ index aa8a28d5d..ebf9551c9 100644 #define MUSL_ABI_SUFFIX \ "%{mabi=ilp32:-sf}" \ diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 90fe6566255..55695dadd91 100644 +index 9946d3fed94..45a9a7cae59 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h -@@ -420,16 +420,11 @@ extern int dot_symbols; +@@ -423,24 +423,19 @@ extern int dot_symbols; #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" @@ -189,21 +189,19 @@ index 90fe6566255..55695dadd91 100644 +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" #endif + #undef MUSL_DYNAMIC_LINKER32 #define MUSL_DYNAMIC_LINKER32 \ -@@ -437,8 +432,9 @@ extern int dot_symbols; +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + #undef MUSL_DYNAMIC_LINKER64 #define MUSL_DYNAMIC_LINKER64 \ - "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" +- "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" --#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" --#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" -+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" -+ - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ - "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h -index 6d2ccd012ba..ec78a89ce15 100644 +index c9897b7aca5..82f275319cc 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see @@ -216,10 +214,10 @@ index 6d2ccd012ba..ec78a89ce15 100644 #undef SUBTARGET_LINK_EMUL_SUFFIX #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h -index 9fb03af0fe9..401fddbbb22 100644 +index 08476f1d94d..80440e712ad 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h -@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); +@@ -84,7 +84,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); When the -shared link option is used a final link is not being done. */ @@ -229,7 +227,7 @@ index 9fb03af0fe9..401fddbbb22 100644 #undef LINK_SPEC #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h -index c1fe42165b7..26a79bfa2e3 100644 +index 789d1df4bd5..b920c680fb1 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see @@ -243,6 +241,3 @@ index c1fe42165b7..26a79bfa2e3 100644 #ifdef SPARC_BI_ARCH --- -2.17.0 - diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch index f8a7f41a..b99ac429 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-arc/0037-sync-gcc-stddef.h-with-musl.patch @@ -1,23 +1,23 @@ -From 602abaab15ffb60bf1797187a71b485042c56360 Mon Sep 17 00:00:00 2001 +From 39e2f61d262f9f6c7a91068998dea80791ef665e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 3 Feb 2017 12:56:00 -0800 -Subject: [PATCH 37/39] sync gcc stddef.h with musl +Subject: [PATCH 33/36] sync gcc stddef.h with musl musl defines ptrdiff_t size_t and wchar_t so dont define them here if musl is definining them -Signed-off-by: Khem Raj ---- Upstream-Status: Pending +Signed-off-by: Khem Raj +--- gcc/ginclude/stddef.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h -index 31b96a7e5e1..438a3ce7c56 100644 +index da692e1c01a..9a00c261adb 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h -@@ -134,6 +134,7 @@ _TYPE_wchar_t; +@@ -128,6 +128,7 @@ _TYPE_wchar_t; #ifndef ___int_ptrdiff_t_h #ifndef _GCC_PTRDIFF_T #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ @@ -25,7 +25,7 @@ index 31b96a7e5e1..438a3ce7c56 100644 #define _PTRDIFF_T #define _T_PTRDIFF_ #define _T_PTRDIFF -@@ -143,10 +144,12 @@ _TYPE_wchar_t; +@@ -137,10 +138,12 @@ _TYPE_wchar_t; #define ___int_ptrdiff_t_h #define _GCC_PTRDIFF_T #define _PTRDIFF_T_DECLARED @@ -38,7 +38,7 @@ index 31b96a7e5e1..438a3ce7c56 100644 #endif /* _PTRDIFF_T_DECLARED */ #endif /* _GCC_PTRDIFF_T */ #endif /* ___int_ptrdiff_t_h */ -@@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; +@@ -178,6 +181,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #ifndef _GCC_SIZE_T #ifndef _SIZET_ #ifndef __size_t @@ -46,15 +46,15 @@ index 31b96a7e5e1..438a3ce7c56 100644 #define __size_t__ /* BeOS */ #define __SIZE_T__ /* Cray Unicos/Mk */ #define _SIZE_T -@@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; +@@ -194,6 +198,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #define ___int_size_t_h #define _GCC_SIZE_T #define _SIZET_ +#define __DEFINED_size_t /* musl */ - #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + #if defined (__FreeBSD__) \ || defined(__DragonFly__) \ - || defined(__FreeBSD_kernel__) -@@ -235,6 +240,7 @@ typedef long ssize_t; + || defined(__FreeBSD_kernel__) \ +@@ -228,6 +233,7 @@ typedef long ssize_t; #endif /* _SIZE_T */ #endif /* __SIZE_T__ */ #endif /* __size_t__ */ @@ -62,7 +62,7 @@ index 31b96a7e5e1..438a3ce7c56 100644 #undef __need_size_t #endif /* _STDDEF_H or __need_size_t. */ -@@ -264,6 +270,7 @@ typedef long ssize_t; +@@ -257,6 +263,7 @@ typedef long ssize_t; #ifndef ___int_wchar_t_h #ifndef __INT_WCHAR_T_H #ifndef _GCC_WCHAR_T @@ -70,7 +70,7 @@ index 31b96a7e5e1..438a3ce7c56 100644 #define __wchar_t__ /* BeOS */ #define __WCHAR_T__ /* Cray Unicos/Mk */ #define _WCHAR_T -@@ -279,6 +286,7 @@ typedef long ssize_t; +@@ -272,6 +279,7 @@ typedef long ssize_t; #define __INT_WCHAR_T_H #define _GCC_WCHAR_T #define _WCHAR_T_DECLARED @@ -78,7 +78,7 @@ index 31b96a7e5e1..438a3ce7c56 100644 /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other -@@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t; +@@ -337,6 +345,7 @@ typedef __WCHAR_TYPE__ wchar_t; #endif #endif /* __WCHAR_T__ */ #endif /* __wchar_t__ */ @@ -87,5 +87,5 @@ index 31b96a7e5e1..438a3ce7c56 100644 #endif /* _STDDEF_H or __need_wchar_t. */ -- -2.17.0 +2.22.1 diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb index 22d4b05c..d9354f42 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-cross-initial_arc.bb @@ -1,2 +1,2 @@ require recipes-devtools/gcc/gcc-cross_${PV}.bb -require recipes-devtools/gcc/gcc-cross-initial.inc +require recipes-devtools/gcc/gcc-cross.inc diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb index c0b66267..886c7f12 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb +++ b/bsp/meta-synopsys/recipes-devtools/gcc/gcc-crosssdk-initial_arc.bb @@ -1,3 +1,3 @@ require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb -require recipes-devtools/gcc/gcc-crosssdk-initial.inc +require recipes-devtools/gcc/gcc-crosssdk.inc diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb b/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb index 21ad7653..340300cd 100644 --- a/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb +++ b/bsp/meta-synopsys/recipes-devtools/gcc/libgcc_arc.bb @@ -1,9 +1,2 @@ require recipes-devtools/gcc/gcc-${PV}.inc require recipes-devtools/gcc/libgcc.inc -INSANE_SKIP_${PN} = "ldflags staticdev" -INSANE_SKIP_${PN}-dev = "ldflags staticdev" -INSANE_SKIP_${PN} = "staticdev" -INSANE_SKIP_libgcc_eh = "staticdev" -INSANE_SKIP_libgcc_eh-dev = "staticdev" -INSANE_SKIP_libgcov-dev = "staticdev" -INSANE_SKIP_libgcov = "staticdev" diff --git a/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh b/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh new file mode 120000 index 00000000..00e62a0e --- /dev/null +++ b/bsp/meta-synopsys/recipes-devtools/gcc/ltmain.sh @@ -0,0 +1 @@ +/global/freeware/Linux/RHEL7/libtool/share/libtool/build-aux/ltmain.sh \ No newline at end of file diff --git a/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch b/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch deleted file mode 100644 index f26bdf3e..00000000 --- a/bsp/meta-synopsys/recipes-devtools/meson/files/0001-mesonbuild-Recognise-ARC-architecture.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 9f14ab34c27b99848d558576e365503eebe3882c Mon Sep 17 00:00:00 2001 -From: Alexey Brodkin -Date: Fri, 21 Sep 2018 00:11:57 +0300 -Subject: [PATCH] mesonbuild: Recognise ARC architecture - --------------------------->8----------------------- -root@nsimhs:~# python - -Python 2.7.15 (default, Sep 20 2018, 21:44:15) -[GCC 8.2.0] on linux2 -Type "help", "copyright", "credits" or "license" for more information. ->>> ->>> import platform ->>> print platform.machine() -arc --------------------------->8----------------------- - -Signed-off-by: Alexey Brodkin - -Upstream-satus: Submitted [https://github.com/mesonbuild/meson/pull/4234] ---- - mesonbuild/environment.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index d29a77f0e019..13354c720269 100644 ---- a/mesonbuild/environment.py -+++ b/mesonbuild/environment.py -@@ -76,6 +76,7 @@ build_filename = 'meson.build' - - known_cpu_families = ( - 'aarch64', -+ 'arc', - 'arm', - 'e2k', - 'ia64', --- -2.17.1 - diff --git a/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend b/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend deleted file mode 100644 index da0f1665..00000000 --- a/bsp/meta-synopsys/recipes-devtools/meson/meson_0.47.2.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI += "file://0001-mesonbuild-Recognise-ARC-architecture.patch " diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch index e0ccee2a..5d90d4bd 100644 --- a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch +++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-Add-ARC-CPU-support.patch @@ -1,18 +1,18 @@ -From e1a1c4b3daa5fdddae579405f32989156ff9db92 Mon Sep 17 00:00:00 2001 +From 9171149440fcb1e8c3459372716577cd81e62734 Mon Sep 17 00:00:00 2001 From: Evgeniy Didin -Date: Tue, 26 Mar 2019 10:24:17 +0300 -Subject: [PATCH] Add ARC support +Date: Thu, 2 Apr 2020 20:33:21 +0300 +Subject: [PATCH] mozjs: Introduce ARC support Signed-off-by: Evgeniy Didin --- - build/autoconf/config.guess | 3 +++ - build/moz.configure/init.configure | 3 +++ - mfbt/double-conversion/utils.h | 2 +- - python/mozbuild/mozbuild/configure/constants.py | 2 ++ + build/autoconf/config.guess | 3 +++ + build/moz.configure/init.configure | 3 +++ + mfbt/double-conversion/double-conversion/utils.h | 2 +- + python/mozbuild/mozbuild/configure/constants.py | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess -index 1277a862..e3c40ec7 100755 +index 1277a86..e3c40ec 100755 --- a/build/autoconf/config.guess +++ b/build/autoconf/config.guess @@ -1032,6 +1032,9 @@ EOF @@ -26,45 +26,45 @@ index 1277a862..e3c40ec7 100755 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 56e6730f..85a944c9 100644 +index 648ac2d..7618f08 100644 --- a/build/moz.configure/init.configure +++ b/build/moz.configure/init.configure -@@ -365,6 +365,9 @@ def split_triplet(triplet): +@@ -661,6 +661,9 @@ def split_triplet(triplet, allow_unknown=False): elif cpu in ('riscv32', 'riscv64'): canonical_cpu = cpu endianness = 'little' + elif cpu in ('arc'): + canonical_cpu = 'arc' + endianness = 'little' - else: - die('Unknown CPU type: %s' % cpu) - -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h -index 4f372180..c0680791 100644 ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -61,7 +61,7 @@ + elif allow_unknown: + canonical_cpu = cpu + endianness = 'unknown' +diff --git a/mfbt/double-conversion/double-conversion/utils.h b/mfbt/double-conversion/double-conversion/utils.h +index 5f17c04..f4ff736 100644 +--- a/mfbt/double-conversion/double-conversion/utils.h ++++ b/mfbt/double-conversion/double-conversion/utils.h +@@ -77,7 +77,7 @@ inline void abort_noreturn() { MOZ_CRASH(); } defined(__SH4__) || defined(__alpha__) || \ defined(_MIPS_ARCH_MIPS32R2) || \ defined(__AARCH64EL__) || defined(__aarch64__) || \ - defined(__riscv) + defined(__riscv) || defined(__arc__) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) + #elif defined(__mc68000__) + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py -index 4f8d6666..3cef1f50 100644 +index 1067b6a..1f700b8 100644 --- a/python/mozbuild/mozbuild/configure/constants.py +++ b/python/mozbuild/mozbuild/configure/constants.py -@@ -50,6 +50,7 @@ CPU_bitness = { +@@ -52,6 +52,7 @@ CPU_bitness = { 'ppc64': 64, 'riscv32': 32, 'riscv64': 64, + 'arc': 32, 's390': 32, 's390x': 64, - 'sparc': 32, -@@ -83,6 +84,7 @@ CPU_preprocessor_checks = OrderedDict(( + 'sh4': 32, +@@ -86,6 +87,7 @@ CPU_preprocessor_checks = OrderedDict(( ('ppc', '__powerpc__'), ('riscv32', '__riscv && __SIZEOF_POINTER__ == 4'), ('riscv64', '__riscv && __SIZEOF_POINTER__ == 8'), diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch new file mode 100644 index 00000000..b609889a --- /dev/null +++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs/0001-arc-Disable-atomic-operations.patch @@ -0,0 +1,42 @@ +From d8881cbf62d8bb5bc2acc57a5cf976138446c2bc Mon Sep 17 00:00:00 2001 +From: Evgeniy Didin +Date: Thu, 2 Apr 2020 20:59:21 +0300 +Subject: [PATCH] arc: Disable atomic operations + +Signed-off-by: Evgeniy Didin +--- + js/src/jit/AtomicOperations.h | 2 ++ + js/src/jit/none/AtomicOperations-feeling-lucky.h | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h +index fda0b14..d583e4b 100644 +--- a/js/src/jit/AtomicOperations.h ++++ b/js/src/jit/AtomicOperations.h +@@ -395,6 +395,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) { + #include "jit/none/AtomicOperations-feeling-lucky.h" + #elif defined(__riscv) + #include "jit/none/AtomicOperations-feeling-lucky.h" ++#elif defined(__arc__) ++#include "jit/none/AtomicOperations-feeling-lucky.h" + #else + #error "No AtomicOperations support provided for this platform" + #endif +diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h +index 42b1f3e..f49f680 100644 +--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h ++++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h +@@ -88,6 +88,10 @@ + #endif + #endif + ++#ifdef __arc__ ++#define GNUC_COMPATIBLE ++#endif ++ + // The default implementation tactic for gcc/clang is to use the newer + // __atomic intrinsics added for use in C++11 . Where that + // isn't available, we use GCC's older __sync functions instead. +-- +2.16.2 + diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend deleted file mode 100644 index 903f5815..00000000 --- a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_52.9.1.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/mozjs:" -SRC_URI_append += "\ - file://0001-Add-ARC-CPU-support.patch; \ -" - diff --git a/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend new file mode 100644 index 00000000..fa4a49e2 --- /dev/null +++ b/bsp/meta-synopsys/recipes-extended/mozjs/mozjs_60.9.0.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/mozjs:" +SRC_URI_append += "\ + file://0001-Add-ARC-CPU-support.patch; \ + file://0001-arc-Disable-atomic-operations.patch; \ +" + diff --git a/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend index 9b38eb6f..fa6b53ff 100644 --- a/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-synopsys/recipes-graphics/mesa/mesa_%.bbappend @@ -1,4 +1,4 @@ PACKAGECONFIG[wayland] += " wayland-protocols" PACKAGECONFIG_append = " gallium" -GALLIUMDRIVERS_append = ",imx,etnaviv" +GALLIUMDRIVERS_append = ",etnaviv" diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend b/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend new file mode 100644 index 00000000..626424a6 --- /dev/null +++ b/bsp/meta-synopsys/recipes-graphics/wayland/agl-compositor_git.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI += "\ + file://0001-Fix-build-with-GCC9.patch; \ +" + + diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch b/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch new file mode 100644 index 00000000..d66c79e5 --- /dev/null +++ b/bsp/meta-synopsys/recipes-graphics/wayland/files/0001-Fix-build-with-GCC9.patch @@ -0,0 +1,26 @@ +From 88bee9ba10dbbcd8d58d8444baf638a570b3679d Mon Sep 17 00:00:00 2001 +From: Evgeniy Didin +Date: Tue, 14 Jul 2020 15:03:27 +0300 +Subject: [PATCH] Fix build with GCC9 + +Signed-off-by: Evgeniy Didin +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index 99512d5..4adf9ce 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1235,7 +1235,7 @@ log_timestamp(char *buf, size_t len) + + strftime(timestr, sizeof(timestr), "%H:%M:%S", brokendown_time); + /* if datestr is empty it prints only timestr*/ +- snprintf(buf, len, "%s[%s.%03li]", datestr, ++ snprintf(buf, len, "%s[%s.%03lli]", datestr, + timestr, (tv.tv_usec / 1000)); + + return buf; +-- +2.16.2 + diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch deleted file mode 100644 index a7f2a34a..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 66b71951f8ce66f02040f8814e1d89db34c34a87 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sun, 22 Feb 2015 12:36:00 +0100 -Subject: [PATCH] os-compatibility: define CLOCK_BOOTTIME when not available - -CLOCK_BOOTTIME is supposed to be provided by the C library headers, -but uClibc 0.9.33.2 does not provide it. Instead of depending on an -uClibc patch, let's make Weston define it to the right value when not -already defined by the C library. - -Signed-off-by: Thomas Petazzoni ---- - shared/os-compatibility.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/shared/os-compatibility.h b/shared/os-compatibility.h -index 172bb7e..e369899 100644 ---- a/shared/os-compatibility.h -+++ b/shared/os-compatibility.h -@@ -26,6 +26,7 @@ - #include "config.h" - - #include -+#include - - #ifdef HAVE_EXECINFO_H - #include -@@ -37,6 +38,10 @@ backtrace(void **buffer, int size) - } - #endif - -+#ifndef CLOCK_BOOTTIME -+#define CLOCK_BOOTTIME 7 -+#endif -+ - int - os_socketpair_cloexec(int domain, int type, int protocol, int *sv); - --- -2.1.0 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch deleted file mode 100644 index 4ca79b72..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1005-protocol-add-weston-debug.xml.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 4fc1ee8d5b5c2a66fcc1a5bafad3eb95c3759bac Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:13:41 +0200 -Subject: [PATCH 05/46] protocol: add weston-debug.xml - -This is a new debugging extension for non-production environments. The -aim is to replace all build-time choosable debug prints in the -compositor with runtime subscribable debug streams. - -Signed-off-by: Pekka Paalanen - -Added new libweston-$MAJOR-protocols.pc file and install that -for external projects to find the XML files installed by libweston. - -Signed-off-by: Maniraj Devadoss - -Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop -unnecessary EXTRA_DIST of weston-debug.xml. - -Signed-off-by: Pekka Paalanen - -Add explicit advertisement of available debug interfaces. - -Signed-off-by: Daniel Stone -Reviewed-by: Emre Ucan ---- - Makefile.am | 10 +++ - configure.ac | 1 + - libweston/libweston-protocols.pc.in | 7 ++ - protocol/weston-debug.xml | 139 ++++++++++++++++++++++++++++++++++++ - 4 files changed, 157 insertions(+) - create mode 100644 libweston/libweston-protocols.pc.in - create mode 100644 protocol/weston-debug.xml - -diff --git a/Makefile.am b/Makefile.am -index 83546b7c..e38ac009 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -104,6 +104,10 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ - shared/platform.h \ - shared/weston-egl-ext.h - -+libweston_@LIBWESTON_MAJOR@_datadir = $(datadir)/weston/protocols -+dist_libweston_@LIBWESTON_MAJOR@_data_DATA = \ -+ protocol/weston-debug.xml -+ - lib_LTLIBRARIES += libweston-desktop-@LIBWESTON_MAJOR@.la - libweston_desktop_@LIBWESTON_MAJOR@_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON - libweston_desktop_@LIBWESTON_MAJOR@_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) -@@ -150,6 +154,8 @@ endif - nodist_libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ - protocol/weston-screenshooter-protocol.c \ - protocol/weston-screenshooter-server-protocol.h \ -+ protocol/weston-debug-protocol.c \ -+ protocol/weston-debug-server-protocol.h \ - protocol/text-cursor-position-protocol.c \ - protocol/text-cursor-position-server-protocol.h \ - protocol/text-input-unstable-v1-protocol.c \ -@@ -274,6 +280,10 @@ pkgconfig_DATA = \ - libweston-desktop/libweston-desktop-${LIBWESTON_MAJOR}.pc \ - compositor/weston.pc - -+noarch_pkgconfigdir = $(datadir)/pkgconfig -+noarch_pkgconfig_DATA = \ -+ libweston/libweston-${LIBWESTON_MAJOR}-protocols.pc -+ - wayland_sessiondir = $(datadir)/wayland-sessions - dist_wayland_session_DATA = compositor/weston.desktop - -diff --git a/configure.ac b/configure.ac -index ab9ff7c7..cb62a386 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -695,6 +695,7 @@ AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc]) - # libweston_abi_version here, and outside [] because of m4 quoting rules - AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[.pc:libweston/libweston.pc.in]) - AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-uninstalled.pc:libweston/libweston-uninstalled.pc.in]) -+AC_CONFIG_FILES([libweston/libweston-]libweston_major_version[-protocols.pc:libweston/libweston-protocols.pc.in]) - AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[.pc:libweston-desktop/libweston-desktop.pc.in]) - AC_CONFIG_FILES([libweston-desktop/libweston-desktop-]libweston_major_version[-uninstalled.pc:libweston-desktop/libweston-desktop-uninstalled.pc.in]) - -diff --git a/libweston/libweston-protocols.pc.in b/libweston/libweston-protocols.pc.in -new file mode 100644 -index 00000000..6547a0d5 ---- /dev/null -+++ b/libweston/libweston-protocols.pc.in -@@ -0,0 +1,7 @@ -+prefix=@prefix@ -+datarootdir=@datarootdir@ -+pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@/protocols -+ -+Name: libWeston Protocols -+Description: libWeston protocol files -+Version: @WESTON_VERSION@ -diff --git a/protocol/weston-debug.xml b/protocol/weston-debug.xml -new file mode 100644 -index 00000000..effa1a19 ---- /dev/null -+++ b/protocol/weston-debug.xml -@@ -0,0 +1,139 @@ -+ -+ -+ -+ -+ Copyright © 2017 Pekka Paalanen pq@iki.fi -+ Copyright © 2018 Zodiac Inflight Innovations -+ -+ 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 (including the next -+ paragraph) 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. -+ -+ -+ -+ -+ This is a generic debugging interface for Weston internals, the global -+ object advertized through wl_registry. -+ -+ WARNING: This interface by design allows a denial-of-service attack. It -+ should not be offered in production, or proper authorization mechnisms -+ must be enforced. -+ -+ The idea is for a client to provide a file descriptor that the server -+ uses for printing debug information. The server uses the file -+ descriptor in blocking writes mode, which exposes the denial-of-service -+ risk. The blocking mode is necessary to ensure all debug messages can -+ be easily printed in place. It also ensures message ordering if a -+ client subcribes to more than one debug stream. -+ -+ The available debugging features depend on the server. -+ -+ A debug stream can be one-shot where the server prints the requested -+ information and then closes it, or continuous where server keeps on -+ printing until the client stops it. Or anything in between. -+ -+ -+ -+ -+ Destroys the factory object, but does not affect any other objects. -+ -+ -+ -+ -+ -+ Advertises an available debug scope which the client may be able to -+ bind to. No information is provided by the server about the content -+ contained within the debug streams provided by the scope, once a -+ client has subscribed. -+ -+ -+ -+ -+ -+ -+ -+ -+ Subscribe to a named debug stream. The server will start printing -+ to the given file descriptor. -+ -+ If the named debug stream is a one-shot dump, the server will send -+ weston_debug_stream_v1.complete event once all requested data has -+ been printed. Otherwise, the server will continue streaming debug -+ prints until the subscription object is destroyed. -+ -+ If the debug stream name is unknown to the server, the server will -+ immediately respond with weston_debug_stream_v1.failure event. -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ Represents one subscribed debug stream, created with -+ weston_debug_v1.subscribe. When the object is created, it is associated -+ with a given file descriptor. The server will continue writing to the -+ file descriptor until the object is destroyed or the server sends an -+ event through the object. -+ -+ -+ -+ -+ Destroys the object, which causes the server to stop writing into -+ and closes the associated file descriptor if it was not closed -+ already. -+ -+ Use a wl_display.sync if the clients needs to guarantee the file -+ descriptor is closed before continuing. -+ -+ -+ -+ -+ -+ The server has successfully finished writing to and has closed the -+ associated file descriptor. -+ -+ This event is delivered only for one-shot debug streams where the -+ server dumps some data and stop. This is never delivered for -+ continuous debbug streams because they by definition never complete. -+ -+ -+ -+ -+ -+ The server has stopped writing to and has closed the -+ associated file descriptor. The data already written to the file -+ descriptor is correct, but it may be truncated. -+ -+ This event may be delivered at any time and for any kind of debug -+ stream. It may be due to a failure in or shutdown of the server. -+ The message argument may provide a hint of the reason. -+ -+ -+ -+ -+ -+ --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch deleted file mode 100644 index 83887c66..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1006-libweston-add-weston_debug-API-and-implementation.patch +++ /dev/null @@ -1,958 +0,0 @@ -From a5630eafec4f139adf1da4a5ba54894715d7b50f Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:13:42 +0200 -Subject: [PATCH 06/46] libweston: add weston_debug API and implementation - -weston_debug is both a libweston API for relaying debugging messages, -and the compositor-debug wayland protocol implementation for accessing those -debug messages from a Wayland client. - -weston_debug_compositor_{create,destroy}() are private API, hence not -exported. - -Signed-off-by: Pekka Paalanen - -append the debug scope name along with the timestamp in -weston_debug_scope_timestamp API - -Signed-off-by: Maniraj Devadoss -Reviewed-by: Pekka Paalanen - -Add explicit advertisement of debug scope names. - -Signed-off-by: Daniel Stone -Reviewed-by: Emre Ucan ---- - Makefile.am | 2 + - libweston/compositor.c | 5 + - libweston/compositor.h | 9 + - libweston/weston-debug.c | 732 +++++++++++++++++++++++++++++++++++++++++++++++ - libweston/weston-debug.h | 107 +++++++ - 5 files changed, 855 insertions(+) - create mode 100644 libweston/weston-debug.c - create mode 100644 libweston/weston-debug.h - -diff --git a/Makefile.am b/Makefile.am -index e38ac009..d5ed3e58 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -96,6 +96,8 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \ - libweston/linux-dmabuf.h \ - libweston/pixel-formats.c \ - libweston/pixel-formats.h \ -+ libweston/weston-debug.c \ -+ libweston/weston-debug.h \ - shared/helpers.h \ - shared/matrix.c \ - shared/matrix.h \ -diff --git a/libweston/compositor.c b/libweston/compositor.c -index 9deb7817..01616550 100644 ---- a/libweston/compositor.c -+++ b/libweston/compositor.c -@@ -6361,6 +6361,9 @@ weston_compositor_create(struct wl_display *display, void *user_data) - ec, bind_presentation)) - goto fail; - -+ if (weston_debug_compositor_create(ec) < 0) -+ goto fail; -+ - if (weston_input_init(ec) != 0) - goto fail; - -@@ -6702,6 +6705,8 @@ weston_compositor_destroy(struct weston_compositor *compositor) - if (compositor->heads_changed_source) - wl_event_source_remove(compositor->heads_changed_source); - -+ weston_debug_compositor_destroy(compositor); -+ - free(compositor); - } - -diff --git a/libweston/compositor.h b/libweston/compositor.h -index 8b7a1020..33f02b18 100644 ---- a/libweston/compositor.h -+++ b/libweston/compositor.h -@@ -1048,6 +1048,7 @@ struct weston_touch_calibrator; - - struct weston_desktop_xwayland; - struct weston_desktop_xwayland_interface; -+struct weston_debug_compositor; - - struct weston_compositor { - struct wl_signal destroy_signal; -@@ -1160,6 +1161,8 @@ struct weston_compositor { - weston_touch_calibration_save_func touch_calibration_save; - struct weston_layer calibrator_layer; - struct weston_touch_calibrator *touch_calibrator; -+ -+ struct weston_debug_compositor *weston_debug; - }; - - struct weston_buffer { -@@ -2318,6 +2321,12 @@ int - weston_compositor_enable_touch_calibrator(struct weston_compositor *compositor, - weston_touch_calibration_save_func save); - -+int -+weston_debug_compositor_create(struct weston_compositor *compositor); -+ -+void -+weston_debug_compositor_destroy(struct weston_compositor *compositor); -+ - #ifdef __cplusplus - } - #endif -diff --git a/libweston/weston-debug.c b/libweston/weston-debug.c -new file mode 100644 -index 00000000..04895ad5 ---- /dev/null -+++ b/libweston/weston-debug.c -@@ -0,0 +1,732 @@ -+/* -+ * Copyright © 2017 Pekka Paalanen -+ * Copyright © 2018 Zodiac Inflight Innovations -+ * -+ * 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 (including the -+ * next paragraph) 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. -+ */ -+ -+#include "config.h" -+ -+#include "weston-debug.h" -+#include "helpers.h" -+#include "compositor.h" -+ -+#include "weston-debug-server-protocol.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/** Main weston-debug context -+ * -+ * One per weston_compositor. -+ * -+ * \internal -+ */ -+struct weston_debug_compositor { -+ struct weston_compositor *compositor; -+ struct wl_listener compositor_destroy_listener; -+ struct wl_global *global; -+ struct wl_list scope_list; /**< weston_debug_scope::compositor_link */ -+}; -+ -+/** weston-debug message scope -+ * -+ * This is used for scoping debugging messages. Clients can subscribe to -+ * only the scopes they are interested in. A scope is identified by its name -+ * (also referred to as debug stream name). -+ */ -+struct weston_debug_scope { -+ char *name; -+ char *desc; -+ weston_debug_scope_cb begin_cb; -+ void *user_data; -+ struct wl_list stream_list; /**< weston_debug_stream::scope_link */ -+ struct wl_list compositor_link; -+}; -+ -+/** A debug stream created by a client -+ * -+ * A client provides a file descriptor for the server to write debug -+ * messages into. A weston_debug_stream is associated to one -+ * weston_debug_scope via the scope name, and the scope provides the messages. -+ * There can be several streams for the same scope, all streams getting the -+ * same messages. -+ */ -+struct weston_debug_stream { -+ int fd; /**< client provided fd */ -+ struct wl_resource *resource; /**< weston_debug_stream_v1 object */ -+ struct wl_list scope_link; -+}; -+ -+static struct weston_debug_scope * -+get_scope(struct weston_debug_compositor *wdc, const char *name) -+{ -+ struct weston_debug_scope *scope; -+ -+ wl_list_for_each(scope, &wdc->scope_list, compositor_link) -+ if (strcmp(name, scope->name) == 0) -+ return scope; -+ -+ return NULL; -+} -+ -+static void -+stream_close_unlink(struct weston_debug_stream *stream) -+{ -+ if (stream->fd != -1) -+ close(stream->fd); -+ stream->fd = -1; -+ -+ wl_list_remove(&stream->scope_link); -+ wl_list_init(&stream->scope_link); -+} -+ -+static void WL_PRINTF(2, 3) -+stream_close_on_failure(struct weston_debug_stream *stream, -+ const char *fmt, ...) -+{ -+ char *msg; -+ va_list ap; -+ int ret; -+ -+ stream_close_unlink(stream); -+ -+ va_start(ap, fmt); -+ ret = vasprintf(&msg, fmt, ap); -+ va_end(ap); -+ -+ if (ret > 0) { -+ weston_debug_stream_v1_send_failure(stream->resource, msg); -+ free(msg); -+ } else { -+ weston_debug_stream_v1_send_failure(stream->resource, -+ "MEMFAIL"); -+ } -+} -+ -+static struct weston_debug_stream * -+stream_create(struct weston_debug_compositor *wdc, const char *name, -+ int32_t streamfd, struct wl_resource *stream_resource) -+{ -+ struct weston_debug_stream *stream; -+ struct weston_debug_scope *scope; -+ -+ stream = zalloc(sizeof *stream); -+ if (!stream) -+ return NULL; -+ -+ stream->fd = streamfd; -+ stream->resource = stream_resource; -+ -+ scope = get_scope(wdc, name); -+ if (scope) { -+ wl_list_insert(&scope->stream_list, &stream->scope_link); -+ -+ if (scope->begin_cb) -+ scope->begin_cb(stream, scope->user_data); -+ } else { -+ wl_list_init(&stream->scope_link); -+ stream_close_on_failure(stream, -+ "Debug stream name '%s' is unknown.", -+ name); -+ } -+ -+ return stream; -+} -+ -+static void -+stream_destroy(struct wl_resource *stream_resource) -+{ -+ struct weston_debug_stream *stream; -+ -+ stream = wl_resource_get_user_data(stream_resource); -+ -+ if (stream->fd != -1) -+ close(stream->fd); -+ wl_list_remove(&stream->scope_link); -+ free(stream); -+} -+ -+static void -+weston_debug_stream_destroy(struct wl_client *client, -+ struct wl_resource *stream_resource) -+{ -+ wl_resource_destroy(stream_resource); -+} -+ -+static const struct weston_debug_stream_v1_interface -+ weston_debug_stream_impl = { -+ weston_debug_stream_destroy -+}; -+ -+static void -+weston_debug_destroy(struct wl_client *client, -+ struct wl_resource *global_resource) -+{ -+ wl_resource_destroy(global_resource); -+} -+ -+static void -+weston_debug_subscribe(struct wl_client *client, -+ struct wl_resource *global_resource, -+ const char *name, -+ int32_t streamfd, -+ uint32_t new_stream_id) -+{ -+ struct weston_debug_compositor *wdc; -+ struct wl_resource *stream_resource; -+ uint32_t version; -+ struct weston_debug_stream *stream; -+ -+ wdc = wl_resource_get_user_data(global_resource); -+ version = wl_resource_get_version(global_resource); -+ -+ stream_resource = wl_resource_create(client, -+ &weston_debug_stream_v1_interface, -+ version, new_stream_id); -+ if (!stream_resource) -+ goto fail; -+ -+ stream = stream_create(wdc, name, streamfd, stream_resource); -+ if (!stream) -+ goto fail; -+ -+ wl_resource_set_implementation(stream_resource, -+ &weston_debug_stream_impl, -+ stream, stream_destroy); -+ return; -+ -+fail: -+ close(streamfd); -+ wl_client_post_no_memory(client); -+} -+ -+static const struct weston_debug_v1_interface weston_debug_impl = { -+ weston_debug_destroy, -+ weston_debug_subscribe -+}; -+ -+static void -+bind_weston_debug(struct wl_client *client, -+ void *data, uint32_t version, uint32_t id) -+{ -+ struct weston_debug_compositor *wdc = data; -+ struct weston_debug_scope *scope; -+ struct wl_resource *resource; -+ -+ resource = wl_resource_create(client, -+ &weston_debug_v1_interface, -+ version, id); -+ if (!resource) { -+ wl_client_post_no_memory(client); -+ return; -+ } -+ wl_resource_set_implementation(resource, &weston_debug_impl, -+ wdc, NULL); -+ -+ wl_list_for_each(scope, &wdc->scope_list, compositor_link) { -+ weston_debug_v1_send_available(resource, scope->name, -+ scope->desc); -+ } -+} -+ -+/** Initialize weston-debug structure -+ * -+ * \param compositor The libweston compositor. -+ * \return 0 on success, -1 on failure. -+ * -+ * weston_debug_compositor is a singleton for each weston_compositor. -+ * -+ * Sets weston_compositor::weston_debug. -+ * -+ * \internal -+ */ -+int -+weston_debug_compositor_create(struct weston_compositor *compositor) -+{ -+ struct weston_debug_compositor *wdc; -+ -+ if (compositor->weston_debug) -+ return -1; -+ -+ wdc = zalloc(sizeof *wdc); -+ if (!wdc) -+ return -1; -+ -+ wdc->compositor = compositor; -+ wl_list_init(&wdc->scope_list); -+ -+ compositor->weston_debug = wdc; -+ -+ return 0; -+} -+ -+/** Destroy weston_debug_compositor structure -+ * -+ * \param compositor The libweston compositor whose weston-debug to tear down. -+ * -+ * Clears weston_compositor::weston_debug. -+ * -+ * \internal -+ */ -+void -+weston_debug_compositor_destroy(struct weston_compositor *compositor) -+{ -+ struct weston_debug_compositor *wdc = compositor->weston_debug; -+ struct weston_debug_scope *scope; -+ -+ if (wdc->global) -+ wl_global_destroy(wdc->global); -+ -+ wl_list_for_each(scope, &wdc->scope_list, compositor_link) -+ weston_log("Internal warning: debug scope '%s' has not been destroyed.\n", -+ scope->name); -+ -+ /* Remove head to not crash if scope removed later. */ -+ wl_list_remove(&wdc->scope_list); -+ -+ free(wdc); -+ -+ compositor->weston_debug = NULL; -+} -+ -+/** Enable weston-debug protocol extension -+ * -+ * \param compositor The libweston compositor where to enable. -+ * -+ * This enables the weston_debug_v1 Wayland protocol extension which any client -+ * can use to get debug messsages from the compositor. -+ * -+ * WARNING: This feature should not be used in production. If a client -+ * provides a file descriptor that blocks writes, it will block the whole -+ * compositor indefinitely. -+ * -+ * There is no control on which client is allowed to subscribe to debug -+ * messages. Any and all clients are allowed. -+ * -+ * The debug extension is disabled by default, and once enabled, cannot be -+ * disabled again. -+ */ -+WL_EXPORT void -+weston_compositor_enable_debug_protocol(struct weston_compositor *compositor) -+{ -+ struct weston_debug_compositor *wdc = compositor->weston_debug; -+ -+ assert(wdc); -+ if (wdc->global) -+ return; -+ -+ wdc->global = wl_global_create(compositor->wl_display, -+ &weston_debug_v1_interface, 1, -+ wdc, bind_weston_debug); -+ if (!wdc->global) -+ return; -+ -+ weston_log("WARNING: debug protocol has been enabled. " -+ "This is a potential denial-of-service attack vector and " -+ "information leak.\n"); -+} -+ -+/** Register a new debug stream name, creating a debug scope -+ * -+ * \param compositor The libweston compositor where to add. -+ * \param name The debug stream/scope name; must not be NULL. -+ * \param desc The debug scope description for humans; must not be NULL. -+ * \param begin_cb Optional callback when a client subscribes to this scope. -+ * \param user_data Optional user data pointer for the callback. -+ * \return A valid pointer on success, NULL on failure. -+ * -+ * This function is used to create a debug scope. All debug message printing -+ * happens for a scope, which allows clients to subscribe to the kind of -+ * debug messages they want by \c name. -+ * -+ * \c name must be unique in the \c weston_compositor instance. \c name and -+ * \c description must both be provided. The description is printed when a -+ * client asks for a list of supported debug scopes. -+ * -+ * \c begin_cb, if not NULL, is called when a client subscribes to the -+ * debug scope creating a debug stream. This is for debug scopes that need -+ * to print messages as a response to a client appearing, e.g. printing a -+ * list of windows on demand or a static preamble. The argument \c user_data -+ * is passed in to the callback and is otherwise unused. -+ * -+ * For one-shot debug streams, \c begin_cb should finally call -+ * weston_debug_stream_complete() to close the stream and tell the client -+ * the printing is complete. Otherwise the client expects more to be written -+ * to its file descriptor. -+ * -+ * The debug scope must be destroyed before destroying the -+ * \c weston_compositor. -+ * -+ * \memberof weston_debug_scope -+ * \sa weston_debug_stream, weston_debug_scope_cb -+ */ -+WL_EXPORT struct weston_debug_scope * -+weston_compositor_add_debug_scope(struct weston_compositor *compositor, -+ const char *name, -+ const char *description, -+ weston_debug_scope_cb begin_cb, -+ void *user_data) -+{ -+ struct weston_debug_compositor *wdc; -+ struct weston_debug_scope *scope; -+ -+ if (!compositor || !name || !description) { -+ weston_log("Error: cannot add a debug scope without name or description.\n"); -+ return NULL; -+ } -+ -+ wdc = compositor->weston_debug; -+ if (!wdc) { -+ weston_log("Error: cannot add debug scope '%s', infra not initialized.\n", -+ name); -+ return NULL; -+ } -+ -+ if (get_scope(wdc, name)){ -+ weston_log("Error: debug scope named '%s' is already registered.\n", -+ name); -+ return NULL; -+ } -+ -+ scope = zalloc(sizeof *scope); -+ if (!scope) { -+ weston_log("Error adding debug scope '%s': out of memory.\n", -+ name); -+ return NULL; -+ } -+ -+ scope->name = strdup(name); -+ scope->desc = strdup(description); -+ scope->begin_cb = begin_cb; -+ scope->user_data = user_data; -+ wl_list_init(&scope->stream_list); -+ -+ if (!scope->name || !scope->desc) { -+ weston_log("Error adding debug scope '%s': out of memory.\n", -+ name); -+ free(scope->name); -+ free(scope->desc); -+ free(scope); -+ return NULL; -+ } -+ -+ wl_list_insert(wdc->scope_list.prev, &scope->compositor_link); -+ -+ return scope; -+} -+ -+/** Destroy a debug scope -+ * -+ * \param scope The debug scope to destroy; may be NULL. -+ * -+ * Destroys the debug scope, closing all open streams subscribed to it and -+ * sending them each a \c weston_debug_stream_v1.failure event. -+ * -+ * \memberof weston_debug_scope -+ */ -+WL_EXPORT void -+weston_debug_scope_destroy(struct weston_debug_scope *scope) -+{ -+ struct weston_debug_stream *stream; -+ -+ if (!scope) -+ return; -+ -+ while (!wl_list_empty(&scope->stream_list)) { -+ stream = wl_container_of(scope->stream_list.prev, -+ stream, scope_link); -+ -+ stream_close_on_failure(stream, "debug name removed"); -+ } -+ -+ wl_list_remove(&scope->compositor_link); -+ free(scope->name); -+ free(scope->desc); -+ free(scope); -+} -+ -+/** Are there any active subscriptions to the scope? -+ * -+ * \param scope The debug scope to check; may be NULL. -+ * \return True if any streams are open for this scope, false otherwise. -+ * -+ * As printing some debugging messages may be relatively expensive, one -+ * can use this function to determine if there is a need to gather the -+ * debugging information at all. If this function returns false, all -+ * printing for this scope is dropped, so gathering the information is -+ * pointless. -+ * -+ * The return value of this function should not be stored, as new clients -+ * may subscribe to the debug scope later. -+ * -+ * If the given scope is NULL, this function will always return false, -+ * making it safe to use in teardown or destroy code, provided the -+ * scope is initialized to NULL before creation and set to NULL after -+ * destruction. -+ * -+ * \memberof weston_debug_scope -+ */ -+WL_EXPORT bool -+weston_debug_scope_is_enabled(struct weston_debug_scope *scope) -+{ -+ if (!scope) -+ return false; -+ -+ return !wl_list_empty(&scope->stream_list); -+} -+ -+/** Write data into a specific debug stream -+ * -+ * \param stream The debug stream to write into; must not be NULL. -+ * \param data[in] Pointer to the data to write. -+ * \param len Number of bytes to write. -+ * -+ * Writes the given data (binary verbatim) into the debug stream. -+ * If \c len is zero or negative, the write is silently dropped. -+ * -+ * Writing is continued until all data has been written or -+ * a write fails. If the write fails due to a signal, it is re-tried. -+ * Otherwise on failure, the stream is closed and -+ * \c weston_debug_stream_v1.failure event is sent to the client. -+ * -+ * \memberof weston_debug_stream -+ */ -+WL_EXPORT void -+weston_debug_stream_write(struct weston_debug_stream *stream, -+ const char *data, size_t len) -+{ -+ ssize_t len_ = len; -+ ssize_t ret; -+ int e; -+ -+ if (stream->fd == -1) -+ return; -+ -+ while (len_ > 0) { -+ ret = write(stream->fd, data, len_); -+ e = errno; -+ if (ret < 0) { -+ if (e == EINTR) -+ continue; -+ -+ stream_close_on_failure(stream, -+ "Error writing %zd bytes: %s (%d)", -+ len_, strerror(e), e); -+ break; -+ } -+ -+ len_ -= ret; -+ data += ret; -+ } -+} -+ -+/** Write a formatted string into a specific debug stream (varargs) -+ * -+ * \param stream The debug stream to write into. -+ * \param fmt Printf-style format string. -+ * \param ap Formatting arguments. -+ * -+ * The behavioral details are the same as for weston_debug_stream_write(). -+ * -+ * \memberof weston_debug_stream -+ */ -+WL_EXPORT void -+weston_debug_stream_vprintf(struct weston_debug_stream *stream, -+ const char *fmt, va_list ap) -+{ -+ char *str; -+ int len; -+ -+ len = vasprintf(&str, fmt, ap); -+ if (len >= 0) { -+ weston_debug_stream_write(stream, str, len); -+ free(str); -+ } else { -+ stream_close_on_failure(stream, "Out of memory"); -+ } -+} -+ -+/** Write a formatted string into a specific debug stream -+ * -+ * \param stream The debug stream to write into. -+ * \param fmt Printf-style format string and arguments. -+ * -+ * The behavioral details are the same as for weston_debug_stream_write(). -+ * -+ * \memberof weston_debug_stream -+ */ -+WL_EXPORT void -+weston_debug_stream_printf(struct weston_debug_stream *stream, -+ const char *fmt, ...) -+{ -+ va_list ap; -+ -+ va_start(ap, fmt); -+ weston_debug_stream_vprintf(stream, fmt, ap); -+ va_end(ap); -+} -+ -+/** Close the debug stream and send success event -+ * -+ * \param stream The debug stream to close. -+ * -+ * Closes the debug stream and sends \c weston_debug_stream_v1.complete -+ * event to the client. This tells the client the debug information dump -+ * is complete. -+ * -+ * \memberof weston_debug_stream -+ */ -+WL_EXPORT void -+weston_debug_stream_complete(struct weston_debug_stream *stream) -+{ -+ stream_close_unlink(stream); -+ weston_debug_stream_v1_send_complete(stream->resource); -+} -+ -+/** Write debug data for a scope -+ * -+ * \param scope The debug scope to write for; may be NULL, in which case -+ * nothing will be written. -+ * \param data[in] Pointer to the data to write. -+ * \param len Number of bytes to write. -+ * -+ * Writes the given data to all subscribed clients' streams. -+ * -+ * The behavioral details for each stream are the same as for -+ * weston_debug_stream_write(). -+ * -+ * \memberof weston_debug_scope -+ */ -+WL_EXPORT void -+weston_debug_scope_write(struct weston_debug_scope *scope, -+ const char *data, size_t len) -+{ -+ struct weston_debug_stream *stream; -+ -+ if (!scope) -+ return; -+ -+ wl_list_for_each(stream, &scope->stream_list, scope_link) -+ weston_debug_stream_write(stream, data, len); -+} -+ -+/** Write a formatted string for a scope (varargs) -+ * -+ * \param scope The debug scope to write for; may be NULL, in which case -+ * nothing will be written. -+ * \param fmt Printf-style format string. -+ * \param ap Formatting arguments. -+ * -+ * Writes to formatted string to all subscribed clients' streams. -+ * -+ * The behavioral details for each stream are the same as for -+ * weston_debug_stream_write(). -+ * -+ * \memberof weston_debug_scope -+ */ -+WL_EXPORT void -+weston_debug_scope_vprintf(struct weston_debug_scope *scope, -+ const char *fmt, va_list ap) -+{ -+ static const char oom[] = "Out of memory"; -+ char *str; -+ int len; -+ -+ if (!weston_debug_scope_is_enabled(scope)) -+ return; -+ -+ len = vasprintf(&str, fmt, ap); -+ if (len >= 0) { -+ weston_debug_scope_write(scope, str, len); -+ free(str); -+ } else { -+ weston_debug_scope_write(scope, oom, sizeof oom - 1); -+ } -+} -+ -+/** Write a formatted string for a scope -+ * -+ * \param scope The debug scope to write for; may be NULL, in which case -+ * nothing will be written. -+ * \param fmt Printf-style format string and arguments. -+ * -+ * Writes to formatted string to all subscribed clients' streams. -+ * -+ * The behavioral details for each stream are the same as for -+ * weston_debug_stream_write(). -+ * -+ * \memberof weston_debug_scope -+ */ -+WL_EXPORT void -+weston_debug_scope_printf(struct weston_debug_scope *scope, -+ const char *fmt, ...) -+{ -+ va_list ap; -+ -+ va_start(ap, fmt); -+ weston_debug_scope_vprintf(scope, fmt, ap); -+ va_end(ap); -+} -+ -+/** Write debug scope name and current time into string -+ * -+ * \param scope[in] debug scope; may be NULL -+ * \param buf[out] Buffer to store the string. -+ * \param len Available size in the buffer in bytes. -+ * \return \c buf -+ * -+ * Reads the current local wall-clock time and formats it into a string. -+ * and append the debug scope name to it, if a scope is available. -+ * The string is NUL-terminated, even if truncated. -+ */ -+WL_EXPORT char * -+weston_debug_scope_timestamp(struct weston_debug_scope *scope, -+ char *buf, size_t len) -+{ -+ struct timeval tv; -+ struct tm *bdt; -+ char string[128]; -+ size_t ret = 0; -+ -+ gettimeofday(&tv, NULL); -+ -+ bdt = localtime(&tv.tv_sec); -+ if (bdt) -+ ret = strftime(string, sizeof string, -+ "%Y-%m-%d %H:%M:%S", bdt); -+ -+ if (ret > 0) { -+ snprintf(buf, len, "[%s.%03ld][%s]", string, -+ tv.tv_usec / 1000, -+ (scope) ? scope->name : "no scope"); -+ } else { -+ snprintf(buf, len, "[?][%s]", -+ (scope) ? scope->name : "no scope"); -+ } -+ -+ return buf; -+} -diff --git a/libweston/weston-debug.h b/libweston/weston-debug.h -new file mode 100644 -index 00000000..c76cec85 ---- /dev/null -+++ b/libweston/weston-debug.h -@@ -0,0 +1,107 @@ -+/* -+ * Copyright © 2017 Pekka Paalanen -+ * -+ * 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 (including the -+ * next paragraph) 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. -+ */ -+ -+#ifndef WESTON_DEBUG_H -+#define WESTON_DEBUG_H -+ -+#include -+#include -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+struct weston_compositor; -+ -+void -+weston_compositor_enable_debug_protocol(struct weston_compositor *); -+ -+struct weston_debug_scope; -+struct weston_debug_stream; -+ -+/** weston_debug_scope callback -+ * -+ * \param stream The debug stream. -+ * \param user_data The \c user_data argument given to -+ * weston_compositor_add_debug_scope() -+ * -+ * \memberof weston_debug_scope -+ * \sa weston_debug_stream -+ */ -+typedef void (*weston_debug_scope_cb)(struct weston_debug_stream *stream, -+ void *user_data); -+ -+struct weston_debug_scope * -+weston_compositor_add_debug_scope(struct weston_compositor *compositor, -+ const char *name, -+ const char *description, -+ weston_debug_scope_cb begin_cb, -+ void *user_data); -+ -+void -+weston_debug_scope_destroy(struct weston_debug_scope *scope); -+ -+bool -+weston_debug_scope_is_enabled(struct weston_debug_scope *scope); -+ -+void -+weston_debug_scope_write(struct weston_debug_scope *scope, -+ const char *data, size_t len); -+ -+void -+weston_debug_scope_vprintf(struct weston_debug_scope *scope, -+ const char *fmt, va_list ap); -+ -+void -+weston_debug_scope_printf(struct weston_debug_scope *scope, -+ const char *fmt, ...) -+ __attribute__ ((format (printf, 2, 3))); -+ -+void -+weston_debug_stream_write(struct weston_debug_stream *stream, -+ const char *data, size_t len); -+ -+void -+weston_debug_stream_vprintf(struct weston_debug_stream *stream, -+ const char *fmt, va_list ap); -+ -+void -+weston_debug_stream_printf(struct weston_debug_stream *stream, -+ const char *fmt, ...) -+ __attribute__ ((format (printf, 2, 3))); -+ -+void -+weston_debug_stream_complete(struct weston_debug_stream *stream); -+ -+char * -+weston_debug_scope_timestamp(struct weston_debug_scope *scope, -+ char *buf, size_t len); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* WESTON_DEBUG_H */ --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch deleted file mode 100644 index 34422850..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1007-compositor-add-option-to-enable-weston_debug.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 771b7cfc11cec3638b0a4f47edeeaabe2ba46cb6 Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:13:43 +0200 -Subject: [PATCH 07/46] compositor: add option to enable weston_debug - -Let users enable the compositor debug protocol on the compositor command -line. This allows weston-debug tool to work. - -Signed-off-by: Pekka Paalanen -Signed-off-by: Maniraj Devadoss -Reviewed-by: Pekka Paalanen ---- - compositor/main.c | 7 +++++++ - man/weston.man | 11 +++++++++++ - 2 files changed, 18 insertions(+) - -diff --git a/compositor/main.c b/compositor/main.c -index b5b4fc59..2f34e111 100644 ---- a/compositor/main.c -+++ b/compositor/main.c -@@ -60,6 +60,7 @@ - #include "compositor-x11.h" - #include "compositor-wayland.h" - #include "windowed-output-api.h" -+#include "weston-debug.h" - - #define WINDOW_TITLE "Weston Compositor" - -@@ -508,6 +509,7 @@ usage(int error_code) - " -c, --config=FILE\tConfig file to load, defaults to weston.ini\n" - " --no-config\t\tDo not read weston.ini\n" - " --wait-for-debugger\tRaise SIGSTOP on start-up\n" -+ " --debug\t\tEnable debug extension\n" - " -h, --help\t\tThis help message\n\n"); - - #if defined(BUILD_DRM_COMPOSITOR) -@@ -2375,6 +2377,7 @@ int main(int argc, char *argv[]) - char *socket_name = NULL; - int32_t version = 0; - int32_t noconfig = 0; -+ int32_t debug_protocol = 0; - int32_t numlock_on; - char *config_file = NULL; - struct weston_config *config = NULL; -@@ -2399,6 +2402,7 @@ int main(int argc, char *argv[]) - { WESTON_OPTION_BOOLEAN, "no-config", 0, &noconfig }, - { WESTON_OPTION_STRING, "config", 'c', &config_file }, - { WESTON_OPTION_BOOLEAN, "wait-for-debugger", 0, &wait_for_debugger }, -+ { WESTON_OPTION_BOOLEAN, "debug", 0, &debug_protocol }, - }; - - wl_list_init(&wet.layoutput_list); -@@ -2486,6 +2490,9 @@ int main(int argc, char *argv[]) - } - segv_compositor = wet.compositor; - -+ if (debug_protocol) -+ weston_compositor_enable_debug_protocol(wet.compositor); -+ - if (weston_compositor_init_config(wet.compositor, config) < 0) - goto out; - -diff --git a/man/weston.man b/man/weston.man -index 44a73fa0..c09d4c2d 100644 ---- a/man/weston.man -+++ b/man/weston.man -@@ -133,6 +133,17 @@ If also - .B --no-config - is given, no configuration file will be read. - .TP -+.BR \-\-debug -+Enable debug protocol extension -+.I weston_debug_v1 -+which any client can use to receive debugging messages from the compositor. -+ -+.B WARNING: -+This is risky for two reasons. First, a client may cause a denial-of-service -+blocking the compositor by providing an unsuitable file descriptor, and -+second, the debug messages may expose sensitive information. This option -+should not be used in production. -+.TP - .BR \-\-version - Print the program version. - .TP --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch deleted file mode 100644 index e9e46002..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1010-xwm-dump_property-to-use-FILE-internally.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 0a3ef9902a210ab1fa0e4ed317ad7782f0399b51 Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:18:12 +0200 -Subject: [PATCH 10/46] xwm: dump_property() to use FILE internally - -Write the output of dump_property() out in one log call. When multiple -processes (weston and Xwayland) are writing to the same file, this will -keep the property dump uninterrupted by Xwayland debug prints. - -This is also preparation for more development in the same direction. - -Signed-off-by: Pekka Paalanen -Signed-off-by: Maniraj Devadoss -Reviewed-by: Pekka Paalanen -Reviewed-by: Daniel Stone ---- - xwayland/window-manager.c | 58 ++++++++++++++++++++++++----------------------- - 1 file changed, 30 insertions(+), 28 deletions(-) - -diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c -index 2b3defb7..3bf323a4 100644 ---- a/xwayland/window-manager.c -+++ b/xwayland/window-manager.c -@@ -410,20 +410,14 @@ dump_cardinal_array_elem(FILE *fp, unsigned format, - } - - static void --dump_cardinal_array(xcb_get_property_reply_t *reply) -+dump_cardinal_array(FILE *fp, xcb_get_property_reply_t *reply) - { - unsigned i = 0; -- FILE *fp; - void *arr; - char *str = NULL; -- size_t size = 0; - - assert(reply->type == XCB_ATOM_CARDINAL); - -- fp = open_memstream(&str, &size); -- if (!fp) -- return; -- - arr = xcb_get_property_value(reply); - - fprintf(fp, "["); -@@ -432,10 +426,6 @@ dump_cardinal_array(xcb_get_property_reply_t *reply) - arr, reply->value_len, i); - fprintf(fp, "]"); - -- if (fclose(fp) != 0) -- return; -- -- wm_log_continue("%s\n", str); - free(str); - } - -@@ -449,22 +439,29 @@ dump_property(struct weston_wm *wm, - xcb_window_t *window_value; - int width, len; - uint32_t i; -+ FILE *fp; -+ char *logstr; -+ size_t logsize; - -- width = wm_log_continue("%s: ", get_atom_name(wm->conn, property)); -- if (reply == NULL) { -- wm_log_continue("(no reply)\n"); -+ fp = open_memstream(&logstr, &logsize); -+ if (!fp) - return; -+ -+ width = fprintf(fp, "%s: ", get_atom_name(wm->conn, property)); -+ if (reply == NULL) { -+ fprintf(fp, "(no reply)\n"); -+ goto out; - } - -- width += wm_log_continue("%s/%d, length %d (value_len %d): ", -- get_atom_name(wm->conn, reply->type), -- reply->format, -- xcb_get_property_value_length(reply), -- reply->value_len); -+ width += fprintf(fp, "%s/%d, length %d (value_len %d): ", -+ get_atom_name(wm->conn, reply->type), -+ reply->format, -+ xcb_get_property_value_length(reply), -+ reply->value_len); - - if (reply->type == wm->atom.incr) { - incr_value = xcb_get_property_value(reply); -- wm_log_continue("%d\n", *incr_value); -+ fprintf(fp, "%d\n", *incr_value); - } else if (reply->type == wm->atom.utf8_string || - reply->type == wm->atom.string) { - text_value = xcb_get_property_value(reply); -@@ -472,29 +469,34 @@ dump_property(struct weston_wm *wm, - len = 40; - else - len = reply->value_len; -- wm_log_continue("\"%.*s\"\n", len, text_value); -+ fprintf(fp, "\"%.*s\"\n", len, text_value); - } else if (reply->type == XCB_ATOM_ATOM) { - atom_value = xcb_get_property_value(reply); - for (i = 0; i < reply->value_len; i++) { - name = get_atom_name(wm->conn, atom_value[i]); - if (width + strlen(name) + 2 > 78) { -- wm_log_continue("\n "); -+ fprintf(fp, "\n "); - width = 4; - } else if (i > 0) { -- width += wm_log_continue(", "); -+ width += fprintf(fp, ", "); - } - -- width += wm_log_continue("%s", name); -+ width += fprintf(fp, "%s", name); - } -- wm_log_continue("\n"); -+ fprintf(fp, "\n"); - } else if (reply->type == XCB_ATOM_CARDINAL) { -- dump_cardinal_array(reply); -+ dump_cardinal_array(fp, reply); - } else if (reply->type == XCB_ATOM_WINDOW && reply->format == 32) { - window_value = xcb_get_property_value(reply); -- wm_log_continue("win %u\n", *window_value); -+ fprintf(fp, "win %u\n", *window_value); - } else { -- wm_log_continue("huh?\n"); -+ fprintf(fp, "huh?\n"); - } -+ -+out: -+ if (fclose(fp) == 0) -+ wm_log_continue("%s", logstr); -+ free(logstr); - } - - static void --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch deleted file mode 100644 index 693bff29..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1011-xwm-move-FILE-to-the-callers-of-dump_property.patch +++ /dev/null @@ -1,267 +0,0 @@ -From b3b006559856037ab97200b93641640b88ec7db8 Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:18:13 +0200 -Subject: [PATCH 11/46] xwm: move FILE to the callers of dump_property() - -This is preparation for using the weston-debug infrastructure for -WM_DEBUG. dump_property() may be called from different debugging -contexts and often needs to be prefixed with more information. - -An alternative to this patch would be to pass in the weston_debug_scope -as an argument to dump_property(), but then all callers would need to be -converted to weston-debug infra in a single commit. - -Therefore require the callers to provide the FILE* to print to. - -Signed-off-by: Pekka Paalanen -Signed-off-by: Maniraj Devadoss -Reviewed-by: Pekka Paalanen -Reviewed-by: Daniel Stone ---- - xwayland/selection.c | 39 ++++++++++++++++++++++++--- - xwayland/window-manager.c | 67 +++++++++++++++++++---------------------------- - xwayland/xwayland.h | 3 ++- - 3 files changed, 65 insertions(+), 44 deletions(-) - -diff --git a/xwayland/selection.c b/xwayland/selection.c -index 59702246..e0eb3ffc 100644 ---- a/xwayland/selection.c -+++ b/xwayland/selection.c -@@ -34,6 +34,12 @@ - #include "xwayland.h" - #include "shared/helpers.h" - -+#ifdef WM_DEBUG -+#define wm_log(...) weston_log(__VA_ARGS__) -+#else -+#define wm_log(...) do {} while (0) -+#endif -+ - static int - writable_callback(int fd, uint32_t mask, void *data) - { -@@ -102,6 +108,9 @@ weston_wm_get_incr_chunk(struct weston_wm *wm) - { - xcb_get_property_cookie_t cookie; - xcb_get_property_reply_t *reply; -+ FILE *fp; -+ char *logstr; -+ size_t logsize; - - cookie = xcb_get_property(wm->conn, - 0, /* delete */ -@@ -115,7 +124,13 @@ weston_wm_get_incr_chunk(struct weston_wm *wm) - if (reply == NULL) - return; - -- dump_property(wm, wm->atom.wl_selection, reply); -+ fp = open_memstream(&logstr, &logsize); -+ if (fp) { -+ dump_property(fp, wm, wm->atom.wl_selection, reply); -+ if (fclose(fp) == 0) -+ wm_log("%s", logstr); -+ free(logstr); -+ } - - if (xcb_get_property_value_length(reply) > 0) { - /* reply's ownership is transferred to wm, which is responsible -@@ -178,6 +193,9 @@ weston_wm_get_selection_targets(struct weston_wm *wm) - xcb_atom_t *value; - char **p; - uint32_t i; -+ FILE *fp; -+ char *logstr; -+ size_t logsize; - - cookie = xcb_get_property(wm->conn, - 1, /* delete */ -@@ -191,7 +209,13 @@ weston_wm_get_selection_targets(struct weston_wm *wm) - if (reply == NULL) - return; - -- dump_property(wm, wm->atom.wl_selection, reply); -+ fp = open_memstream(&logstr, &logsize); -+ if (fp) { -+ dump_property(fp, wm, wm->atom.wl_selection, reply); -+ if (fclose(fp) == 0) -+ wm_log("%s", logstr); -+ free(logstr); -+ } - - if (reply->type != XCB_ATOM_ATOM) { - free(reply); -@@ -232,6 +256,9 @@ weston_wm_get_selection_data(struct weston_wm *wm) - { - xcb_get_property_cookie_t cookie; - xcb_get_property_reply_t *reply; -+ FILE *fp; -+ char *logstr; -+ size_t logsize; - - cookie = xcb_get_property(wm->conn, - 1, /* delete */ -@@ -243,7 +270,13 @@ weston_wm_get_selection_data(struct weston_wm *wm) - - reply = xcb_get_property_reply(wm->conn, cookie, NULL); - -- dump_property(wm, wm->atom.wl_selection, reply); -+ fp = open_memstream(&logstr, &logsize); -+ if (fp) { -+ dump_property(fp, wm, wm->atom.wl_selection, reply); -+ if (fclose(fp) == 0) -+ wm_log("%s", logstr); -+ free(logstr); -+ } - - if (reply == NULL) { - return; -diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c -index 3bf323a4..4a26f6e7 100644 ---- a/xwayland/window-manager.c -+++ b/xwayland/window-manager.c -@@ -210,23 +210,6 @@ wm_log(const char *fmt, ...) - #endif - } - --static int __attribute__ ((format (printf, 1, 2))) --wm_log_continue(const char *fmt, ...) --{ --#ifdef WM_DEBUG -- int l; -- va_list argp; -- -- va_start(argp, fmt); -- l = weston_vlog_continue(fmt, argp); -- va_end(argp); -- -- return l; --#else -- return 0; --#endif --} -- - static void - weston_output_weak_ref_init(struct weston_output_weak_ref *ref) - { -@@ -430,7 +413,7 @@ dump_cardinal_array(FILE *fp, xcb_get_property_reply_t *reply) - } - - void --dump_property(struct weston_wm *wm, -+dump_property(FILE *fp, struct weston_wm *wm, - xcb_atom_t property, xcb_get_property_reply_t *reply) - { - int32_t *incr_value; -@@ -439,18 +422,11 @@ dump_property(struct weston_wm *wm, - xcb_window_t *window_value; - int width, len; - uint32_t i; -- FILE *fp; -- char *logstr; -- size_t logsize; -- -- fp = open_memstream(&logstr, &logsize); -- if (!fp) -- return; - - width = fprintf(fp, "%s: ", get_atom_name(wm->conn, property)); - if (reply == NULL) { - fprintf(fp, "(no reply)\n"); -- goto out; -+ return; - } - - width += fprintf(fp, "%s/%d, length %d (value_len %d): ", -@@ -492,15 +468,10 @@ dump_property(struct weston_wm *wm, - } else { - fprintf(fp, "huh?\n"); - } -- --out: -- if (fclose(fp) == 0) -- wm_log_continue("%s", logstr); -- free(logstr); - } - - static void --read_and_dump_property(struct weston_wm *wm, -+read_and_dump_property(FILE *fp, struct weston_wm *wm, - xcb_window_t window, xcb_atom_t property) - { - xcb_get_property_reply_t *reply; -@@ -510,7 +481,7 @@ read_and_dump_property(struct weston_wm *wm, - property, XCB_ATOM_ANY, 0, 2048); - reply = xcb_get_property_reply(wm->conn, cookie, NULL); - -- dump_property(wm, property, reply); -+ dump_property(fp, wm, property, reply); - - free(reply); - } -@@ -1389,19 +1360,35 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even - xcb_property_notify_event_t *property_notify = - (xcb_property_notify_event_t *) event; - struct weston_wm_window *window; -+ FILE *fp; -+ char *logstr; -+ size_t logsize; - - if (!wm_lookup_window(wm, property_notify->window, &window)) - return; - - window->properties_dirty = 1; - -- wm_log("XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window); -- if (property_notify->state == XCB_PROPERTY_DELETE) -- wm_log_continue("deleted %s\n", -- get_atom_name(wm->conn, property_notify->atom)); -- else -- read_and_dump_property(wm, property_notify->window, -- property_notify->atom); -+ fp = open_memstream(&logstr, &logsize); -+ if (fp) { -+ fprintf(fp, "XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window); -+ if (property_notify->state == XCB_PROPERTY_DELETE) -+ fprintf(fp, "deleted %s\n", -+ get_atom_name(wm->conn, property_notify->atom)); -+ else -+ read_and_dump_property(fp, wm, property_notify->window, -+ property_notify->atom); -+ -+ if (fclose(fp) == 0) -+ wm_log("%s", logstr); -+ free(logstr); -+ } else { -+ /* read_and_dump_property() is a X11 roundtrip. -+ * Mimic it to maintain ordering semantics between debug -+ * and non-debug paths. -+ */ -+ get_atom_name(wm->conn, property_notify->atom); -+ } - - if (property_notify->atom == wm->atom.net_wm_name || - property_notify->atom == XCB_ATOM_WM_NAME) -diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h -index ca75f5b7..52da6786 100644 ---- a/xwayland/xwayland.h -+++ b/xwayland/xwayland.h -@@ -23,6 +23,7 @@ - * SOFTWARE. - */ - -+#include - #include - #include - #include -@@ -159,7 +160,7 @@ struct weston_wm { - }; - - void --dump_property(struct weston_wm *wm, xcb_atom_t property, -+dump_property(FILE *fp, struct weston_wm *wm, xcb_atom_t property, - xcb_get_property_reply_t *reply); - - const char * --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch deleted file mode 100644 index cc171a58..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch +++ /dev/null @@ -1,423 +0,0 @@ -From 9b72eb7930ef60aa44ab49c53b2aec9e7242cf1c Mon Sep 17 00:00:00 2001 -From: Pekka Paalanen -Date: Thu, 12 Oct 2017 13:18:14 +0200 -Subject: [PATCH 12/46] xwm: convert WM_DEBUG into a weston-debug scope - -Instead of a compile time choice, offer the XWM debugging messages -through the weston-debug protocol and tool on demand. Users will not -need to recompile weston to get XWM debugging, and it won't flood the -weston log. - -The debug scope needs to be initialized in launcher.c for it be -available from start, before the first X11 client tries to connect and -initializes XWM. - -Signed-off-by: Pekka Paalanen - -pass the wm_debug scope to weston_debug_scope_printf API to append -the scopename to the timestr - -Signed-off-by: Maniraj Devadoss -Reviewed-by: Pekka Paalanen -Reviewed-by: Daniel Stone ---- - xwayland/launcher.c | 7 ++ - xwayland/window-manager.c | 166 +++++++++++++++++++++++++--------------------- - xwayland/xwayland.h | 3 + - 3 files changed, 99 insertions(+), 77 deletions(-) - -diff --git a/xwayland/launcher.c b/xwayland/launcher.c -index 0ecdb205..c5b99385 100644 ---- a/xwayland/launcher.c -+++ b/xwayland/launcher.c -@@ -229,6 +229,8 @@ weston_xserver_destroy(struct wl_listener *l, void *data) - if (wxs->loop) - weston_xserver_shutdown(wxs); - -+ weston_debug_scope_destroy(wxs->wm_debug); -+ - free(wxs); - } - -@@ -391,5 +393,10 @@ weston_module_init(struct weston_compositor *compositor) - wxs->destroy_listener.notify = weston_xserver_destroy; - wl_signal_add(&compositor->destroy_signal, &wxs->destroy_listener); - -+ wxs->wm_debug = weston_compositor_add_debug_scope(wxs->compositor, -+ "xwm-wm-x11", -+ "XWM's window management X11 events\n", -+ NULL, NULL); -+ - return 0; - } -diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c -index 4a26f6e7..ccdae57f 100644 ---- a/xwayland/window-manager.c -+++ b/xwayland/window-manager.c -@@ -193,23 +193,27 @@ static void - xserver_map_shell_surface(struct weston_wm_window *window, - struct weston_surface *surface); - --static int __attribute__ ((format (printf, 1, 2))) --wm_log(const char *fmt, ...) -+static bool -+wm_debug_is_enabled(struct weston_wm *wm) - { --#ifdef WM_DEBUG -- int l; -- va_list argp; -+ return weston_debug_scope_is_enabled(wm->server->wm_debug); -+} - -- va_start(argp, fmt); -- l = weston_vlog(fmt, argp); -- va_end(argp); -+static void __attribute__ ((format (printf, 2, 3))) -+wm_printf(struct weston_wm *wm, const char *fmt, ...) -+{ -+ va_list ap; -+ char timestr[128]; - -- return l; --#else -- return 0; --#endif --} -+ if (wm_debug_is_enabled(wm)) -+ weston_debug_scope_printf(wm->server->wm_debug, "%s ", -+ weston_debug_scope_timestamp(wm->server->wm_debug, -+ timestr, sizeof timestr)); - -+ va_start(ap, fmt); -+ weston_debug_scope_vprintf(wm->server->wm_debug, fmt, ap); -+ va_end(ap); -+} - static void - weston_output_weak_ref_init(struct weston_output_weak_ref *ref) - { -@@ -717,10 +721,10 @@ weston_wm_handle_configure_request(struct weston_wm *wm, xcb_generic_event_t *ev - uint32_t mask, values[16]; - int x, y, width, height, i = 0; - -- wm_log("XCB_CONFIGURE_REQUEST (window %d) %d,%d @ %dx%d\n", -- configure_request->window, -- configure_request->x, configure_request->y, -- configure_request->width, configure_request->height); -+ wm_printf(wm, "XCB_CONFIGURE_REQUEST (window %d) %d,%d @ %dx%d\n", -+ configure_request->window, -+ configure_request->x, configure_request->y, -+ configure_request->width, configure_request->height); - - if (!wm_lookup_window(wm, configure_request->window, &window)) - return; -@@ -786,11 +790,11 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve - wm->server->compositor->xwayland_interface; - struct weston_wm_window *window; - -- wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n", -- configure_notify->window, -- configure_notify->x, configure_notify->y, -- configure_notify->width, configure_notify->height, -- configure_notify->override_redirect ? ", override" : ""); -+ wm_printf(wm, "XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n", -+ configure_notify->window, -+ configure_notify->x, configure_notify->y, -+ configure_notify->width, configure_notify->height, -+ configure_notify->override_redirect ? ", override" : ""); - - if (!wm_lookup_window(wm, configure_notify->window, &window)) - return; -@@ -839,7 +843,7 @@ weston_wm_create_surface(struct wl_listener *listener, void *data) - if (wl_resource_get_client(surface->resource) != wm->server->client) - return; - -- wm_log("XWM: create weston_surface %p\n", surface); -+ wm_printf(wm, "XWM: create weston_surface %p\n", surface); - - wl_list_for_each(window, &wm->unpaired_window_list, link) - if (window->surface_id == -@@ -1096,8 +1100,8 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event) - struct weston_output *output; - - if (our_resource(wm, map_request->window)) { -- wm_log("XCB_MAP_REQUEST (window %d, ours)\n", -- map_request->window); -+ wm_printf(wm, "XCB_MAP_REQUEST (window %d, ours)\n", -+ map_request->window); - return; - } - -@@ -1126,10 +1130,10 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event) - weston_wm_window_create_frame(window); /* sets frame_id */ - assert(window->frame_id != XCB_WINDOW_NONE); - -- wm_log("XCB_MAP_REQUEST (window %d, %p, frame %d, %dx%d @ %d,%d)\n", -- window->id, window, window->frame_id, -- window->width, window->height, -- window->map_request_x, window->map_request_y); -+ wm_printf(wm, "XCB_MAP_REQUEST (window %d, %p, frame %d, %dx%d @ %d,%d)\n", -+ window->id, window, window->frame_id, -+ window->width, window->height, -+ window->map_request_x, window->map_request_y); - - weston_wm_window_set_allow_commits(window, false); - weston_wm_window_set_wm_state(window, ICCCM_NORMAL_STATE); -@@ -1157,13 +1161,13 @@ weston_wm_handle_map_notify(struct weston_wm *wm, xcb_generic_event_t *event) - xcb_map_notify_event_t *map_notify = (xcb_map_notify_event_t *) event; - - if (our_resource(wm, map_notify->window)) { -- wm_log("XCB_MAP_NOTIFY (window %d, ours)\n", -- map_notify->window); -+ wm_printf(wm, "XCB_MAP_NOTIFY (window %d, ours)\n", -+ map_notify->window); - return; - } - -- wm_log("XCB_MAP_NOTIFY (window %d%s)\n", map_notify->window, -- map_notify->override_redirect ? ", override" : ""); -+ wm_printf(wm, "XCB_MAP_NOTIFY (window %d%s)\n", map_notify->window, -+ map_notify->override_redirect ? ", override" : ""); - } - - static void -@@ -1173,10 +1177,10 @@ weston_wm_handle_unmap_notify(struct weston_wm *wm, xcb_generic_event_t *event) - (xcb_unmap_notify_event_t *) event; - struct weston_wm_window *window; - -- wm_log("XCB_UNMAP_NOTIFY (window %d, event %d%s)\n", -- unmap_notify->window, -- unmap_notify->event, -- our_resource(wm, unmap_notify->window) ? ", ours" : ""); -+ wm_printf(wm, "XCB_UNMAP_NOTIFY (window %d, event %d%s)\n", -+ unmap_notify->window, -+ unmap_notify->event, -+ our_resource(wm, unmap_notify->window) ? ", ours" : ""); - - if (our_resource(wm, unmap_notify->window)) - return; -@@ -1216,7 +1220,7 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window) - cairo_t *cr; - int width, height; - -- wm_log("XWM: draw decoration, win %d\n", window->id); -+ wm_printf(window->wm, "XWM: draw decoration, win %d\n", window->id); - - weston_wm_window_get_frame_size(window, &width, &height); - -@@ -1279,8 +1283,8 @@ weston_wm_window_set_pending_state(struct weston_wm_window *window) - input_h = height; - } - -- wm_log("XWM: win %d geometry: %d,%d %dx%d\n", -- window->id, input_x, input_y, input_w, input_h); -+ wm_printf(window->wm, "XWM: win %d geometry: %d,%d %dx%d\n", -+ window->id, input_x, input_y, input_w, input_h); - - pixman_region32_fini(&window->surface->pending.input); - pixman_region32_init_rect(&window->surface->pending.input, -@@ -1347,7 +1351,7 @@ weston_wm_window_schedule_repaint(struct weston_wm_window *window) - if (window->repaint_source) - return; - -- wm_log("XWM: schedule repaint, win %d\n", window->id); -+ wm_printf(wm, "XWM: schedule repaint, win %d\n", window->id); - - window->repaint_source = - wl_event_loop_add_idle(wm->server->loop, -@@ -1360,18 +1364,24 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even - xcb_property_notify_event_t *property_notify = - (xcb_property_notify_event_t *) event; - struct weston_wm_window *window; -- FILE *fp; -+ FILE *fp = NULL; - char *logstr; - size_t logsize; -+ char timestr[128]; - - if (!wm_lookup_window(wm, property_notify->window, &window)) - return; - - window->properties_dirty = 1; - -- fp = open_memstream(&logstr, &logsize); -+ if (wm_debug_is_enabled(wm)) -+ fp = open_memstream(&logstr, &logsize); -+ - if (fp) { -- fprintf(fp, "XCB_PROPERTY_NOTIFY: window %d, ", property_notify->window); -+ fprintf(fp, "%s XCB_PROPERTY_NOTIFY: window %d, ", -+ weston_debug_scope_timestamp(wm->server->wm_debug, -+ timestr, sizeof timestr), -+ property_notify->window); - if (property_notify->state == XCB_PROPERTY_DELETE) - fprintf(fp, "deleted %s\n", - get_atom_name(wm->conn, property_notify->atom)); -@@ -1380,7 +1390,8 @@ weston_wm_handle_property_notify(struct weston_wm *wm, xcb_generic_event_t *even - property_notify->atom); - - if (fclose(fp) == 0) -- wm_log("%s", logstr); -+ weston_debug_scope_write(wm->server->wm_debug, -+ logstr, logsize); - free(logstr); - } else { - /* read_and_dump_property() is a X11 roundtrip. -@@ -1406,7 +1417,7 @@ weston_wm_window_create(struct weston_wm *wm, - - window = zalloc(sizeof *window); - if (window == NULL) { -- wm_log("failed to allocate window\n"); -+ wm_printf(wm, "failed to allocate window\n"); - return; - } - -@@ -1479,12 +1490,12 @@ weston_wm_handle_create_notify(struct weston_wm *wm, xcb_generic_event_t *event) - xcb_create_notify_event_t *create_notify = - (xcb_create_notify_event_t *) event; - -- wm_log("XCB_CREATE_NOTIFY (window %d, at (%d, %d), width %d, height %d%s%s)\n", -- create_notify->window, -- create_notify->x, create_notify->y, -- create_notify->width, create_notify->height, -- create_notify->override_redirect ? ", override" : "", -- our_resource(wm, create_notify->window) ? ", ours" : ""); -+ wm_printf(wm, "XCB_CREATE_NOTIFY (window %d, at (%d, %d), width %d, height %d%s%s)\n", -+ create_notify->window, -+ create_notify->x, create_notify->y, -+ create_notify->width, create_notify->height, -+ create_notify->override_redirect ? ", override" : "", -+ our_resource(wm, create_notify->window) ? ", ours" : ""); - - if (our_resource(wm, create_notify->window)) - return; -@@ -1502,10 +1513,10 @@ weston_wm_handle_destroy_notify(struct weston_wm *wm, xcb_generic_event_t *event - (xcb_destroy_notify_event_t *) event; - struct weston_wm_window *window; - -- wm_log("XCB_DESTROY_NOTIFY, win %d, event %d%s\n", -- destroy_notify->window, -- destroy_notify->event, -- our_resource(wm, destroy_notify->window) ? ", ours" : ""); -+ wm_printf(wm, "XCB_DESTROY_NOTIFY, win %d, event %d%s\n", -+ destroy_notify->window, -+ destroy_notify->event, -+ our_resource(wm, destroy_notify->window) ? ", ours" : ""); - - if (our_resource(wm, destroy_notify->window)) - return; -@@ -1523,11 +1534,11 @@ weston_wm_handle_reparent_notify(struct weston_wm *wm, xcb_generic_event_t *even - (xcb_reparent_notify_event_t *) event; - struct weston_wm_window *window; - -- wm_log("XCB_REPARENT_NOTIFY (window %d, parent %d, event %d%s)\n", -- reparent_notify->window, -- reparent_notify->parent, -- reparent_notify->event, -- reparent_notify->override_redirect ? ", override" : ""); -+ wm_printf(wm, "XCB_REPARENT_NOTIFY (window %d, parent %d, event %d%s)\n", -+ reparent_notify->window, -+ reparent_notify->parent, -+ reparent_notify->event, -+ reparent_notify->override_redirect ? ", override" : ""); - - if (reparent_notify->parent == wm->screen->root) { - weston_wm_window_create(wm, reparent_notify->window, 10, 10, -@@ -1734,7 +1745,7 @@ surface_destroy(struct wl_listener *listener, void *data) - container_of(listener, - struct weston_wm_window, surface_destroy_listener); - -- wm_log("surface for xid %d destroyed\n", window->id); -+ wm_printf(window->wm, "surface for xid %d destroyed\n", window->id); - - /* This should have been freed by the shell. - * Don't try to use it later. */ -@@ -1750,7 +1761,8 @@ weston_wm_window_handle_surface_id(struct weston_wm_window *window, - struct wl_resource *resource; - - if (window->surface_id != 0) { -- wm_log("already have surface id for window %d\n", window->id); -+ wm_printf(wm, "already have surface id for window %d\n", -+ window->id); - return; - } - -@@ -1782,14 +1794,14 @@ weston_wm_handle_client_message(struct weston_wm *wm, - (xcb_client_message_event_t *) event; - struct weston_wm_window *window; - -- wm_log("XCB_CLIENT_MESSAGE (%s %d %d %d %d %d win %d)\n", -- get_atom_name(wm->conn, client_message->type), -- client_message->data.data32[0], -- client_message->data.data32[1], -- client_message->data.data32[2], -- client_message->data.data32[3], -- client_message->data.data32[4], -- client_message->window); -+ wm_printf(wm, "XCB_CLIENT_MESSAGE (%s %d %d %d %d %d win %d)\n", -+ get_atom_name(wm->conn, client_message->type), -+ client_message->data.data32[0], -+ client_message->data.data32[1], -+ client_message->data.data32[2], -+ client_message->data.data32[3], -+ client_message->data.data32[4], -+ client_message->window); - - /* The window may get created and destroyed before we actually - * handle the message. If it doesn't exist, bail. -@@ -2007,9 +2019,9 @@ weston_wm_handle_button(struct weston_wm *wm, xcb_generic_event_t *event) - uint32_t button_id; - uint32_t double_click = 0; - -- wm_log("XCB_BUTTON_%s (detail %d)\n", -- button->response_type == XCB_BUTTON_PRESS ? -- "PRESS" : "RELEASE", button->detail); -+ wm_printf(wm, "XCB_BUTTON_%s (detail %d)\n", -+ button->response_type == XCB_BUTTON_PRESS ? -+ "PRESS" : "RELEASE", button->detail); - - if (!wm_lookup_window(wm, button->event, &window) || - !window->decorate) -@@ -2221,7 +2233,7 @@ weston_wm_handle_event(int fd, uint32_t mask, void *data) - weston_wm_handle_destroy_notify(wm, event); - break; - case XCB_MAPPING_NOTIFY: -- wm_log("XCB_MAPPING_NOTIFY\n"); -+ wm_printf(wm, "XCB_MAPPING_NOTIFY\n"); - break; - case XCB_PROPERTY_NOTIFY: - weston_wm_handle_property_notify(wm, event); -@@ -2837,8 +2849,8 @@ xserver_map_shell_surface(struct weston_wm_window *window, - window->surface, - &shell_client); - -- wm_log("XWM: map shell surface, win %d, weston_surface %p, xwayland surface %p\n", -- window->id, window->surface, window->shsurf); -+ wm_printf(wm, "XWM: map shell surface, win %d, weston_surface %p, xwayland surface %p\n", -+ window->id, window->surface, window->shsurf); - - if (window->name) - xwayland_interface->set_title(window->shsurf, window->name); -diff --git a/xwayland/xwayland.h b/xwayland/xwayland.h -index 52da6786..507d534d 100644 ---- a/xwayland/xwayland.h -+++ b/xwayland/xwayland.h -@@ -33,6 +33,7 @@ - #include "compositor.h" - #include "compositor/weston.h" - #include "xwayland-api.h" -+#include "weston-debug.h" - - #define SEND_EVENT_MASK (0x80) - #define EVENT_TYPE(event) ((event)->response_type & ~SEND_EVENT_MASK) -@@ -52,6 +53,8 @@ struct weston_xserver { - struct wl_listener destroy_listener; - weston_xwayland_spawn_xserver_func_t spawn_func; - void *user_data; -+ -+ struct weston_debug_scope *wm_debug; - }; - - struct weston_wm { --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch deleted file mode 100644 index ee4ab191..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1014-compositor-Add-weston_layer_mask_is_infinite.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 3b7756351d31a72da11ff09c56efa17960db1b20 Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Fri, 20 Jul 2018 08:38:25 +0100 -Subject: [PATCH 14/46] compositor: Add weston_layer_mask_is_infinite - -As a counterpart to weston_layer_set_mask_infinite(), returning if the -mask is the same as what is set. - -Signed-off-by: Daniel Stone -Reviewed-by: Pekka Paalanen ---- - libweston/compositor.c | 9 +++++++++ - libweston/compositor.h | 3 +++ - 2 files changed, 12 insertions(+) - -diff --git a/libweston/compositor.c b/libweston/compositor.c -index 01616550..a38c4c1b 100644 ---- a/libweston/compositor.c -+++ b/libweston/compositor.c -@@ -2746,6 +2746,15 @@ weston_layer_set_mask_infinite(struct weston_layer *layer) - UINT32_MAX, UINT32_MAX); - } - -+WL_EXPORT bool -+weston_layer_mask_is_infinite(struct weston_layer *layer) -+{ -+ return layer->mask.x1 == INT32_MIN && -+ layer->mask.y1 == INT32_MIN && -+ layer->mask.x2 == INT32_MIN + UINT32_MAX && -+ layer->mask.y2 == INT32_MIN + UINT32_MAX; -+} -+ - WL_EXPORT void - weston_output_schedule_repaint(struct weston_output *output) - { -diff --git a/libweston/compositor.h b/libweston/compositor.h -index 33f02b18..069fb03d 100644 ---- a/libweston/compositor.h -+++ b/libweston/compositor.h -@@ -1685,6 +1685,9 @@ weston_layer_set_mask(struct weston_layer *layer, int x, int y, int width, int h - void - weston_layer_set_mask_infinite(struct weston_layer *layer); - -+bool -+weston_layer_mask_is_infinite(struct weston_layer *layer); -+ - void - weston_plane_init(struct weston_plane *plane, - struct weston_compositor *ec, --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch deleted file mode 100644 index 13ba4c81..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1015-compositor-Add-scene-graph-debug-scope.patch +++ /dev/null @@ -1,297 +0,0 @@ -From ce62cb3d05505777893ccdfacbf2a013c82e4ce2 Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Fri, 20 Jul 2018 09:46:24 +0100 -Subject: [PATCH 15/46] compositor: Add scene-graph debug scope - -Add a 'scene-graph' debug scope which will dump out the current set of -outputs, layers, and views and as much information as possible about how -they are rendered and composited. - -Signed-off-by: Daniel Stone ---- - libweston/compositor.c | 225 +++++++++++++++++++++++++++++++++++++++++++++++++ - libweston/compositor.h | 4 + - 2 files changed, 229 insertions(+) - -diff --git a/libweston/compositor.c b/libweston/compositor.c -index a38c4c1b..2ca3da3b 100644 ---- a/libweston/compositor.c -+++ b/libweston/compositor.c -@@ -55,6 +55,8 @@ - #include "timeline.h" - - #include "compositor.h" -+#include "weston-debug.h" -+#include "linux-dmabuf.h" - #include "viewporter-server-protocol.h" - #include "presentation-time-server-protocol.h" - #include "shared/helpers.h" -@@ -6306,6 +6308,221 @@ timeline_key_binding_handler(struct weston_keyboard *keyboard, - weston_timeline_open(compositor); - } - -+static const char * -+output_repaint_status_text(struct weston_output *output) -+{ -+ switch (output->repaint_status) { -+ case REPAINT_NOT_SCHEDULED: -+ return "no repaint"; -+ case REPAINT_BEGIN_FROM_IDLE: -+ return "start_repaint_loop scheduled"; -+ case REPAINT_SCHEDULED: -+ return "repaint scheduled"; -+ case REPAINT_AWAITING_COMPLETION: -+ return "awaiting completion"; -+ } -+ -+ assert(!"output_repaint_status_text missing enum"); -+ return NULL; -+} -+ -+static void -+debug_scene_view_print_buffer(FILE *fp, struct weston_view *view) -+{ -+ struct weston_buffer *buffer = view->surface->buffer_ref.buffer; -+ struct wl_shm_buffer *shm; -+ struct linux_dmabuf_buffer *dmabuf; -+ -+ if (!buffer) { -+ fprintf(fp, "\t\t[buffer not available]\n"); -+ return; -+ } -+ -+ shm = wl_shm_buffer_get(buffer->resource); -+ if (shm) { -+ fprintf(fp, "\t\tSHM buffer\n"); -+ fprintf(fp, "\t\t\tformat: 0x%lx\n", -+ (unsigned long) wl_shm_buffer_get_format(shm)); -+ return; -+ } -+ -+ dmabuf = linux_dmabuf_buffer_get(buffer->resource); -+ if (dmabuf) { -+ fprintf(fp, "\t\tdmabuf buffer\n"); -+ fprintf(fp, "\t\t\tformat: 0x%lx\n", -+ (unsigned long) dmabuf->attributes.format); -+ fprintf(fp, "\t\t\tmodifier: 0x%llx\n", -+ (unsigned long long) dmabuf->attributes.modifier[0]); -+ return; -+ } -+ -+ fprintf(fp, "\t\tEGL buffer"); -+} -+ -+static void -+debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx) -+{ -+ struct weston_compositor *ec = view->surface->compositor; -+ struct weston_output *output; -+ char desc[512]; -+ pixman_box32_t *box; -+ uint32_t surface_id = 0; -+ pid_t pid = 0; -+ -+ if (view->surface->resource) { -+ struct wl_resource *resource = view->surface->resource; -+ wl_client_get_credentials(wl_resource_get_client(resource), -+ &pid, NULL, NULL); -+ surface_id = wl_resource_get_id(view->surface->resource); -+ } -+ -+ if (!view->surface->get_label || -+ view->surface->get_label(view->surface, desc, sizeof(desc)) < 0) { -+ strcpy(desc, "[no description available]"); -+ } -+ fprintf(fp, "\tView %d (role %s, PID %d, surface ID %u, %s, %p):\n", -+ view_idx, view->surface->role_name, pid, surface_id, -+ desc, view); -+ -+ box = pixman_region32_extents(&view->transform.boundingbox); -+ fprintf(fp, "\t\tposition: (%d, %d) -> (%d, %d)\n", -+ box->x1, box->y1, box->x2, box->y2); -+ box = pixman_region32_extents(&view->transform.opaque); -+ -+ if (pixman_region32_equal(&view->transform.opaque, -+ &view->transform.boundingbox)) { -+ fprintf(fp, "\t\t[fully opaque]\n"); -+ } else if (!pixman_region32_not_empty(&view->transform.opaque)) { -+ fprintf(fp, "\t\t[not opaque]\n"); -+ } else { -+ fprintf(fp, "\t\t[opaque: (%d, %d) -> (%d, %d)]\n", -+ box->x1, box->y1, box->x2, box->y2); -+ } -+ -+ if (view->alpha < 1.0) -+ fprintf(fp, "\t\talpha: %f\n", view->alpha); -+ -+ if (view->output_mask != 0) { -+ bool first_output = true; -+ fprintf(fp, "\t\toutputs: "); -+ wl_list_for_each(output, &ec->output_list, link) { -+ if (!(view->output_mask & (1 << output->id))) -+ continue; -+ fprintf(fp, "%s%d (%s)%s", -+ (first_output) ? "" : ", ", -+ output->id, output->name, -+ (view->output == output) ? " (primary)" : ""); -+ first_output = false; -+ } -+ } else { -+ fprintf(fp, "\t\t[no outputs]"); -+ } -+ -+ fprintf(fp, "\n"); -+ -+ debug_scene_view_print_buffer(fp, view); -+} -+ -+/** -+ * Output information on how libweston is currently composing the scene -+ * graph. -+ */ -+WL_EXPORT char * -+weston_compositor_print_scene_graph(struct weston_compositor *ec) -+{ -+ struct weston_output *output; -+ struct weston_layer *layer; -+ struct timespec now; -+ int layer_idx = 0; -+ FILE *fp; -+ char *ret; -+ size_t len; -+ int err; -+ -+ fp = open_memstream(&ret, &len); -+ assert(fp); -+ -+ weston_compositor_read_presentation_clock(ec, &now); -+ fprintf(fp, "Weston scene graph at %ld.%09ld:\n\n", -+ now.tv_sec, now.tv_nsec); -+ -+ wl_list_for_each(output, &ec->output_list, link) { -+ struct weston_head *head; -+ int head_idx = 0; -+ -+ fprintf(fp, "Output %d (%s):\n", output->id, output->name); -+ assert(output->enabled); -+ -+ fprintf(fp, "\tposition: (%d, %d) -> (%d, %d)\n", -+ output->x, output->y, -+ output->x + output->width, -+ output->y + output->height); -+ fprintf(fp, "\tmode: %dx%d@%.3fHz\n", -+ output->current_mode->width, -+ output->current_mode->height, -+ output->current_mode->refresh / 1000.0); -+ fprintf(fp, "\tscale: %d\n", output->scale); -+ -+ fprintf(fp, "\trepaint status: %s\n", -+ output_repaint_status_text(output)); -+ if (output->repaint_status == REPAINT_SCHEDULED) -+ fprintf(fp, "\tnext repaint: %ld.%09ld\n", -+ output->next_repaint.tv_sec, -+ output->next_repaint.tv_nsec); -+ -+ wl_list_for_each(head, &output->head_list, output_link) { -+ fprintf(fp, "\tHead %d (%s): %sconnected\n", -+ head_idx++, head->name, -+ (head->connected) ? "" : "not "); -+ } -+ } -+ -+ fprintf(fp, "\n"); -+ -+ wl_list_for_each(layer, &ec->layer_list, link) { -+ struct weston_view *view; -+ int view_idx = 0; -+ -+ fprintf(fp, "Layer %d (pos 0x%lx):\n", layer_idx++, -+ (unsigned long) layer->position); -+ -+ if (!weston_layer_mask_is_infinite(layer)) { -+ fprintf(fp, "\t[mask: (%d, %d) -> (%d,%d)]\n\n", -+ layer->mask.x1, layer->mask.y1, -+ layer->mask.x2, layer->mask.y2); -+ } -+ -+ wl_list_for_each(view, &layer->view_list.link, layer_link.link) -+ debug_scene_view_print(fp, view, view_idx++); -+ -+ if (wl_list_empty(&layer->view_list.link)) -+ fprintf(fp, "\t[no views]\n"); -+ -+ fprintf(fp, "\n"); -+ } -+ -+ err = fclose(fp); -+ assert(err == 0); -+ -+ return ret; -+} -+ -+/** -+ * Called when the 'scene-graph' debug scope is bound by a client. This -+ * one-shot weston-debug scope prints the current scene graph when bound, -+ * and then terminates the stream. -+ */ -+static void -+debug_scene_graph_cb(struct weston_debug_stream *stream, void *data) -+{ -+ struct weston_compositor *ec = data; -+ char *str = weston_compositor_print_scene_graph(ec); -+ -+ weston_debug_stream_printf(stream, "%s", str); -+ free(str); -+ weston_debug_stream_complete(stream); -+} -+ - /** Create the compositor. - * - * This functions creates and initializes a compositor instance. -@@ -6415,6 +6632,12 @@ weston_compositor_create(struct wl_display *display, void *user_data) - weston_compositor_add_debug_binding(ec, KEY_T, - timeline_key_binding_handler, ec); - -+ ec->debug_scene = -+ weston_compositor_add_debug_scope(ec, "scene-graph", -+ "Scene graph details\n", -+ debug_scene_graph_cb, -+ ec); -+ - return ec; - - fail: -@@ -6714,6 +6937,8 @@ weston_compositor_destroy(struct weston_compositor *compositor) - if (compositor->heads_changed_source) - wl_event_source_remove(compositor->heads_changed_source); - -+ weston_debug_scope_destroy(compositor->debug_scene); -+ compositor->debug_scene = NULL; - weston_debug_compositor_destroy(compositor); - - free(compositor); -diff --git a/libweston/compositor.h b/libweston/compositor.h -index 069fb03d..49013e14 100644 ---- a/libweston/compositor.h -+++ b/libweston/compositor.h -@@ -1163,6 +1163,7 @@ struct weston_compositor { - struct weston_touch_calibrator *touch_calibrator; - - struct weston_debug_compositor *weston_debug; -+ struct weston_debug_scope *debug_scene; - }; - - struct weston_buffer { -@@ -1933,6 +1934,9 @@ weston_buffer_reference(struct weston_buffer_reference *ref, - void - weston_compositor_get_time(struct timespec *time); - -+char * -+weston_compositor_print_scene_graph(struct weston_compositor *ec); -+ - void - weston_compositor_destroy(struct weston_compositor *ec); - struct weston_compositor * --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch deleted file mode 100644 index 2dff3bd3..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1017-compositor-drm-Add-backend-pointer-to-drm_output.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 64dbbee7f6570949edc8bca30e6cd026a9e70a59 Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Fri, 20 Jul 2018 19:00:06 +0100 -Subject: [PATCH 17/46] compositor-drm: Add backend pointer to drm_output - -Add this for convenience, so it's easier to access when we add the DRM -backend debug scope. - -Signed-off-by: Daniel Stone ---- - libweston/compositor-drm.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 94d78752..612e6a8f 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -463,6 +463,7 @@ struct drm_head { - - struct drm_output { - struct weston_output base; -+ struct drm_backend *backend; - - uint32_t crtc_id; /* object ID to pass to DRM functions */ - int pipe; /* index of CRTC in resource array / bitmasks */ -@@ -6104,6 +6105,8 @@ drm_output_create(struct weston_compositor *compositor, const char *name) - if (output == NULL) - return NULL; - -+ output->backend = b; -+ - weston_output_init(&output->base, compositor, name); - - output->base.enable = drm_output_enable; --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch deleted file mode 100644 index 932859ca..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1018-compositor-drm-Add-drm-backend-log-debug-scope.patch +++ /dev/null @@ -1,632 +0,0 @@ -From 1cbe1f952de2b22539e163c0055fa3dcbb2e2d54 Mon Sep 17 00:00:00 2001 -From: Daniel Stone -Date: Fri, 20 Jul 2018 10:21:28 +0100 -Subject: [PATCH 18/46] compositor-drm: Add drm-backend log debug scope - -Add a 'drm-debug' scope which prints verbose information about the DRM -backend's repaint cycle, including the decision tree on how views are -assigned (or not) to planes. - -Signed-off-by: Daniel Stone ---- - libweston/compositor-drm.c | 285 ++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 258 insertions(+), 27 deletions(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 612e6a8f..b21793e5 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -51,6 +51,7 @@ - - #include "compositor.h" - #include "compositor-drm.h" -+#include "weston-debug.h" - #include "shared/helpers.h" - #include "shared/timespec-util.h" - #include "gl-renderer.h" -@@ -73,6 +74,42 @@ - #define GBM_BO_USE_CURSOR GBM_BO_USE_CURSOR_64X64 - #endif - -+/** -+ * A small wrapper to print information into the 'drm-backend' debug scope. -+ * -+ * The following conventions are used to print variables: -+ * -+ * - fixed uint32_t values, including Weston object IDs such as weston_output -+ * IDs, DRM object IDs such as CRTCs or properties, and GBM/DRM formats: -+ * "%lu (0x%lx)" (unsigned long) value, (unsigned long) value -+ * -+ * - fixed uint64_t values, such as DRM property values (including object IDs -+ * when used as a value): -+ * "%llu (0x%llx)" (unsigned long long) value, (unsigned long long) value -+ * -+ * - non-fixed-width signed int: -+ * "%d" value -+ * -+ * - non-fixed-width unsigned int: -+ * "%u (0x%x)" value, value -+ * -+ * - non-fixed-width unsigned long: -+ * "%lu (0x%lx)" value, value -+ * -+ * Either the integer or hexadecimal forms may be omitted if it is known that -+ * one representation is not useful (e.g. width/height in hex are rarely what -+ * you want). -+ * -+ * This is to avoid implicit widening or narrowing when we use fixed-size -+ * types: uint32_t can be resolved by either unsigned int or unsigned long -+ * on a 32-bit system but only unsigned int on a 64-bit system, with uint64_t -+ * being unsigned long long on a 32-bit system and unsigned long on a 64-bit -+ * system. To avoid confusing side effects, we explicitly cast to the widest -+ * possible type and use a matching format specifier. -+ */ -+#define drm_debug(b, ...) \ -+ weston_debug_scope_printf((b)->debug, __VA_ARGS__) -+ - #define MAX_CLONED_CONNECTORS 4 - - /** -@@ -302,6 +339,8 @@ struct drm_backend { - bool shutting_down; - - bool aspect_ratio_supported; -+ -+ struct weston_debug_scope *debug; - }; - - struct drm_mode { -@@ -2357,6 +2396,10 @@ crtc_add_prop(drmModeAtomicReq *req, struct drm_output *output, - - ret = drmModeAtomicAddProperty(req, output->crtc_id, info->prop_id, - val); -+ drm_debug(output->backend, "\t\t\t[CRTC:%lu] %lu (%s) -> %llu (0x%llx)\n", -+ (unsigned long) output->crtc_id, -+ (unsigned long) info->prop_id, info->name, -+ (unsigned long long) val, (unsigned long long) val); - return (ret <= 0) ? -1 : 0; - } - -@@ -2372,6 +2415,10 @@ connector_add_prop(drmModeAtomicReq *req, struct drm_head *head, - - ret = drmModeAtomicAddProperty(req, head->connector_id, - info->prop_id, val); -+ drm_debug(head->backend, "\t\t\t[CONN:%lu] %lu (%s) -> %llu (0x%llx)\n", -+ (unsigned long) head->connector_id, -+ (unsigned long) info->prop_id, info->name, -+ (unsigned long long) val, (unsigned long long) val); - return (ret <= 0) ? -1 : 0; - } - -@@ -2387,6 +2434,10 @@ plane_add_prop(drmModeAtomicReq *req, struct drm_plane *plane, - - ret = drmModeAtomicAddProperty(req, plane->plane_id, info->prop_id, - val); -+ drm_debug(plane->backend, "\t\t\t[PLANE:%lu] %lu (%s) -> %llu (0x%llx)\n", -+ (unsigned long) plane->plane_id, -+ (unsigned long) info->prop_id, info->name, -+ (unsigned long long) val, (unsigned long long) val); - return (ret <= 0) ? -1 : 0; - } - -@@ -2405,6 +2456,9 @@ drm_mode_ensure_blob(struct drm_backend *backend, struct drm_mode *mode) - if (ret != 0) - weston_log("failed to create mode property blob: %m\n"); - -+ drm_debug(backend, "\t\t\t[atomic] created new mode blob %lu for %s", -+ (unsigned long) mode->blob_id, mode->mode_info.name); -+ - return ret; - } - -@@ -2414,17 +2468,23 @@ drm_output_apply_state_atomic(struct drm_output_state *state, - uint32_t *flags) - { - struct drm_output *output = state->output; -- struct drm_backend *backend = to_drm_backend(output->base.compositor); -+ struct drm_backend *b = to_drm_backend(output->base.compositor); - struct drm_plane_state *plane_state; - struct drm_mode *current_mode = to_drm_mode(output->base.current_mode); - struct drm_head *head; - int ret = 0; - -- if (state->dpms != output->state_cur->dpms) -+ drm_debug(b, "\t\t[atomic] %s output %lu (%s) state\n", -+ (*flags & DRM_MODE_ATOMIC_TEST_ONLY) ? "testing" : "applying", -+ (unsigned long) output->base.id, output->base.name); -+ -+ if (state->dpms != output->state_cur->dpms) { -+ drm_debug(b, "\t\t\t[atomic] DPMS state differs, modeset OK\n"); - *flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; -+ } - - if (state->dpms == WESTON_DPMS_ON) { -- ret = drm_mode_ensure_blob(backend, current_mode); -+ ret = drm_mode_ensure_blob(b, current_mode); - if (ret != 0) - return ret; - -@@ -2522,6 +2582,9 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, - uint32_t *unused; - int err; - -+ drm_debug(b, "\t\t[atomic] previous state invalid; " -+ "starting with fresh state\n"); -+ - /* If we need to reset all our state (e.g. because we've - * just started, or just been VT-switched in), explicitly - * disable all the CRTCs and connectors we aren't using. */ -@@ -2534,9 +2597,16 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, - - head = to_drm_head(head_base); - -+ drm_debug(b, "\t\t[atomic] disabling inactive head %s\n", -+ head_base->name); -+ - info = &head->props_conn[WDRM_CONNECTOR_CRTC_ID]; - err = drmModeAtomicAddProperty(req, head->connector_id, - info->prop_id, 0); -+ drm_debug(b, "\t\t\t[CONN:%lu] %lu (%s) -> 0\n", -+ (unsigned long) head->connector_id, -+ (unsigned long) info->prop_id, -+ info->name); - if (err <= 0) - ret = -1; - } -@@ -2573,12 +2643,21 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, - continue; - } - -+ drm_debug(b, "\t\t[atomic] disabling unused CRTC %lu\n", -+ (unsigned long) *unused); -+ -+ drm_debug(b, "\t\t\t[CRTC:%lu] %lu (%s) -> 0\n", -+ (unsigned long) *unused, -+ (unsigned long) info->prop_id, info->name); - err = drmModeAtomicAddProperty(req, *unused, - info->prop_id, 0); - if (err <= 0) - ret = -1; - - info = &infos[WDRM_CRTC_MODE_ID]; -+ drm_debug(b, "\t\t\t[CRTC:%lu] %lu (%s) -> 0\n", -+ (unsigned long) *unused, -+ (unsigned long) info->prop_id, info->name); - err = drmModeAtomicAddProperty(req, *unused, - info->prop_id, 0); - if (err <= 0) -@@ -2590,6 +2669,8 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state, - /* Disable all the planes; planes which are being used will - * override this state in the output-state application. */ - 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); - } -@@ -2972,6 +3053,14 @@ drm_repaint_begin(struct weston_compositor *compositor) - ret = drm_pending_state_alloc(b); - b->repaint_data = ret; - -+ if (weston_debug_scope_is_enabled(b->debug)) { -+ char *dbg = weston_compositor_print_scene_graph(compositor); -+ drm_debug(b, "[repaint] Beginning repaint; pending_state %p\n", -+ ret); -+ drm_debug(b, "%s", dbg); -+ free(dbg); -+ } -+ - return ret; - } - -@@ -2991,6 +3080,7 @@ drm_repaint_flush(struct weston_compositor *compositor, void *repaint_data) - struct drm_pending_state *pending_state = repaint_data; - - drm_pending_state_apply(pending_state); -+ drm_debug(b, "[repaint] flushed pending_state %p\n", pending_state); - b->repaint_data = NULL; - } - -@@ -3007,6 +3097,7 @@ drm_repaint_cancel(struct weston_compositor *compositor, void *repaint_data) - struct drm_pending_state *pending_state = repaint_data; - - drm_pending_state_free(pending_state); -+ drm_debug(b, "[repaint] cancel pending_state %p\n", pending_state); - b->repaint_data = NULL; - } - -@@ -3050,12 +3141,21 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state, - struct drm_fb *fb; - unsigned int i; - int ret; -+ enum { -+ NO_PLANES, -+ NO_PLANES_WITH_FORMAT, -+ NO_PLANES_ACCEPTED, -+ PLACED_ON_PLANE, -+ } availability = NO_PLANES; - - assert(!b->sprites_are_broken); - - fb = drm_fb_get_from_view(output_state, ev); -- if (!fb) -+ if (!fb) { -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " -+ " couldn't get fb\n", ev); - return NULL; -+ } - - wl_list_for_each(p, &b->plane_list, link) { - if (p->type != WDRM_PLANE_TYPE_OVERLAY) -@@ -3064,6 +3164,15 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state, - if (!drm_plane_is_available(p, output)) - continue; - -+ state = drm_output_state_get_plane(output_state, p); -+ if (state->fb) { -+ state = NULL; -+ continue; -+ } -+ -+ if (availability == NO_PLANES) -+ availability = NO_PLANES_WITH_FORMAT; -+ - /* Check whether the format is supported */ - for (i = 0; i < p->count_formats; i++) { - unsigned int j; -@@ -3084,15 +3193,14 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state, - if (i == p->count_formats) - continue; - -- state = drm_output_state_get_plane(output_state, p); -- if (state->fb) { -- state = NULL; -- continue; -- } -+ if (availability == NO_PLANES_WITH_FORMAT) -+ availability = NO_PLANES_ACCEPTED; - - state->ev = ev; - state->output = output; - if (!drm_plane_state_coords_for_view(state, ev)) { -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " -+ "unsuitable transform\n", ev); - drm_plane_state_put_back(state); - state = NULL; - continue; -@@ -3100,6 +3208,8 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state, - if (!b->atomic_modeset && - (state->src_w != state->dest_w << 16 || - state->src_h != state->dest_h << 16)) { -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " -+ "no scaling without atomic\n", ev); - drm_plane_state_put_back(state); - state = NULL; - continue; -@@ -3113,17 +3223,48 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state, - - /* In planes-only mode, we don't have an incremental state to - * test against, so we just hope it'll work. */ -- if (mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY) -+ if (mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY) { -+ drm_debug(b, "\t\t\t\t[overlay] provisionally placing " -+ "view %p on overlay %lu in planes-only mode\n", -+ ev, (unsigned long) p->plane_id); -+ availability = PLACED_ON_PLANE; - goto out; -+ } - - ret = drm_pending_state_test(output_state->pending_state); -- if (ret == 0) -+ if (ret == 0) { -+ drm_debug(b, "\t\t\t\t[overlay] provisionally placing " -+ "view %p on overlay %d in mixed mode\n", -+ ev, p->plane_id); -+ availability = PLACED_ON_PLANE; - goto out; -+ } -+ -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay %lu " -+ "in mixed mode: kernel test failed\n", -+ ev, (unsigned long) p->plane_id); - - drm_plane_state_put_back(state); - state = NULL; - } - -+ switch (availability) { -+ case NO_PLANES: -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " -+ "no free overlay planes\n", ev); -+ break; -+ case NO_PLANES_WITH_FORMAT: -+ drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " -+ "no free overlay planes matching format 0x%lx, " -+ "modifier 0x%llx\n", -+ ev, (unsigned long) fb->format, -+ (unsigned long long) fb->modifier); -+ break; -+ case NO_PLANES_ACCEPTED: -+ case PLACED_ON_PLANE: -+ break; -+ } -+ - out: - drm_fb_unref(fb); - return state; -@@ -3192,13 +3333,23 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state, - if (b->gbm == NULL) - return NULL; - -- if (ev->surface->buffer_ref.buffer == NULL) -+ if (ev->surface->buffer_ref.buffer == NULL) { -+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane " -+ "(no buffer available)\n", ev); - return NULL; -+ } - shmbuf = wl_shm_buffer_get(ev->surface->buffer_ref.buffer->resource); -- if (!shmbuf) -+ if (!shmbuf) { -+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane " -+ "(buffer isn't SHM)\n", ev); - return NULL; -- if (wl_shm_buffer_get_format(shmbuf) != WL_SHM_FORMAT_ARGB8888) -+ } -+ if (wl_shm_buffer_get_format(shmbuf) != WL_SHM_FORMAT_ARGB8888) { -+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane " -+ "(format 0x%lx unsuitable)\n", -+ ev, (unsigned long) wl_shm_buffer_get_format(shmbuf)); - return NULL; -+ } - - plane_state = - drm_output_state_get_plane(output_state, output->cursor_plane); -@@ -3216,8 +3367,11 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state, - plane_state->src_w > (unsigned) b->cursor_width << 16 || - plane_state->src_h > (unsigned) b->cursor_height << 16 || - plane_state->src_w != plane_state->dest_w << 16 || -- plane_state->src_h != plane_state->dest_h << 16) -+ plane_state->src_h != plane_state->dest_h << 16) { -+ drm_debug(b, "\t\t\t\t[cursor] not assigning view %p to cursor plane " -+ "(positioning requires cropping or scaling)\n", ev); - goto err; -+ } - - /* Since we're setting plane state up front, we need to work out - * whether or not we need to upload a new cursor. We can't use the -@@ -3240,8 +3394,10 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state, - plane_state->fb = - drm_fb_ref(output->gbm_cursor_fb[output->current_cursor]); - -- if (needs_update) -+ if (needs_update) { -+ drm_debug(b, "\t\t\t\t[cursor] copying new content to cursor BO\n"); - cursor_bo_update(plane_state, ev); -+ } - - /* The cursor API is somewhat special: in cursor_bo_update(), we upload - * a buffer which is always cursor_width x cursor_height, even if the -@@ -3252,6 +3408,9 @@ drm_output_prepare_cursor_view(struct drm_output_state *output_state, - plane_state->dest_w = b->cursor_width; - plane_state->dest_h = b->cursor_height; - -+ drm_debug(b, "\t\t\t\t[cursor] provisionally assigned view %p to cursor\n", -+ ev); -+ - return plane_state; - - err: -@@ -3347,18 +3506,32 @@ drm_output_propose_state(struct weston_output *output_base, - if (!scanout_fb || - (scanout_fb->type != BUFFER_GBM_SURFACE && - scanout_fb->type != BUFFER_PIXMAN_DUMB)) { -+ drm_debug(b, "\t\t[state] cannot propose mixed mode: " -+ "for output %s (%lu): no previous renderer " -+ "fb\n", -+ output->base.name, -+ (unsigned long) output->base.id); - drm_output_state_free(state); - return NULL; - } - - if (scanout_fb->width != output_base->current_mode->width || - scanout_fb->height != output_base->current_mode->height) { -+ drm_debug(b, "\t\t[state] cannot propose mixed mode " -+ "for output %s (%lu): previous fb has " -+ "different size\n", -+ output->base.name, -+ (unsigned long) output->base.id); - drm_output_state_free(state); - return NULL; - } - - scanout_state = drm_plane_state_duplicate(state, - plane->state_cur); -+ drm_debug(b, "\t\t[state] using renderer FB ID %lu for mixed " -+ "mode for output %s (%lu)\n", -+ (unsigned long) scanout_fb->fb_id, output->base.name, -+ (unsigned long) output->base.id); - } - - /* -@@ -3384,18 +3557,32 @@ drm_output_propose_state(struct weston_output *output_base, - bool totally_occluded = false; - bool overlay_occluded = false; - -+ drm_debug(b, "\t\t\t[view] evaluating view %p for " -+ "output %s (%lu)\n", -+ ev, output->base.name, -+ (unsigned long) output->base.id); -+ - /* If this view doesn't touch our output at all, there's no - * reason to do anything with it. */ -- if (!(ev->output_mask & (1u << output->base.id))) -+ if (!(ev->output_mask & (1u << output->base.id))) { -+ drm_debug(b, "\t\t\t\t[view] ignoring view %p " -+ "(not on our output)\n", ev); - continue; -+ } - - /* We only assign planes to views which are exclusively present - * on our output. */ -- if (ev->output_mask != (1u << output->base.id)) -+ if (ev->output_mask != (1u << output->base.id)) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(on multiple outputs)\n", ev); - force_renderer = true; -+ } - -- if (!ev->surface->buffer_ref.buffer) -+ if (!ev->surface->buffer_ref.buffer) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(no buffer available)\n", ev); - force_renderer = true; -+ } - - /* Ignore views we know to be totally occluded. */ - pixman_region32_init(&clipped_view); -@@ -3408,6 +3595,8 @@ drm_output_propose_state(struct weston_output *output_base, - &occluded_region); - totally_occluded = !pixman_region32_not_empty(&surface_overlap); - if (totally_occluded) { -+ drm_debug(b, "\t\t\t\t[view] ignoring view %p " -+ "(occluded on our output)\n", ev); - pixman_region32_fini(&surface_overlap); - pixman_region32_fini(&clipped_view); - continue; -@@ -3418,8 +3607,11 @@ drm_output_propose_state(struct weston_output *output_base, - * be part of, or occluded by, it, and cannot go on a plane. */ - pixman_region32_intersect(&surface_overlap, &renderer_region, - &clipped_view); -- if (pixman_region32_not_empty(&surface_overlap)) -+ if (pixman_region32_not_empty(&surface_overlap)) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(occluded by renderer views)\n", ev); - force_renderer = true; -+ } - - /* We do not control the stacking order of overlay planes; - * the scanout plane is strictly stacked bottom and the cursor -@@ -3428,8 +3620,11 @@ drm_output_propose_state(struct weston_output *output_base, - * planes overlapping each other. */ - pixman_region32_intersect(&surface_overlap, &occluded_region, - &clipped_view); -- if (pixman_region32_not_empty(&surface_overlap)) -+ if (pixman_region32_not_empty(&surface_overlap)) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(occluded by other overlay planes)\n", ev); - overlay_occluded = true; -+ } - pixman_region32_fini(&surface_overlap); - - /* The cursor plane is 'special' in the sense that we can still -@@ -3441,10 +3636,16 @@ drm_output_propose_state(struct weston_output *output_base, - /* If sprites are disabled or the view is not fully opaque, we - * must put the view into the renderer - unless it has already - * been placed in the cursor plane, which can handle alpha. */ -- if (!ps && !planes_ok) -+ if (!ps && !planes_ok) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(precluded by mode)\n", ev); - force_renderer = true; -- if (!ps && !drm_view_is_opaque(ev)) -+ } -+ if (!ps && !drm_view_is_opaque(ev)) { -+ drm_debug(b, "\t\t\t\t[view] not assigning view %p to plane " -+ "(view not fully opaque)\n", ev); - force_renderer = true; -+ } - - /* Only try to place scanout surfaces in planes-only mode; in - * mixed mode, we have already failed to place a view on the -@@ -3477,6 +3678,9 @@ drm_output_propose_state(struct weston_output *output_base, - * check if this is OK, and add ourselves to the renderer - * region if so. */ - if (!renderer_ok) { -+ drm_debug(b, "\t\t[view] failing state generation: " -+ "placing view %p to renderer not allowed\n", -+ ev); - pixman_region32_fini(&clipped_view); - goto err_region; - } -@@ -3496,8 +3700,11 @@ drm_output_propose_state(struct weston_output *output_base, - - /* Check to see if this state will actually work. */ - ret = drm_pending_state_test(state->pending_state); -- if (ret != 0) -+ if (ret != 0) { -+ drm_debug(b, "\t\t[view] failing state generation: " -+ "atomic test not OK\n"); - goto err; -+ } - - /* Counterpart to duplicating scanout state at the top of this - * function: if we have taken a renderer framebuffer and placed it in -@@ -3530,12 +3737,24 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data) - struct weston_view *ev; - struct weston_plane *primary = &output_base->compositor->primary_plane; - -+ drm_debug(b, "\t[repaint] preparing state for output %s (%lu)\n", -+ output_base->name, (unsigned long) output_base->id); -+ - if (!b->sprites_are_broken) { - state = drm_output_propose_state(output_base, pending_state, - DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY); -- if (!state) -+ if (!state) { -+ drm_debug(b, "\t[repaint] could not build planes-only " -+ "state, trying mixed\n"); - state = drm_output_propose_state(output_base, pending_state, - DRM_OUTPUT_PROPOSE_STATE_MIXED); -+ } -+ if (!state) { -+ drm_debug(b, "\t[repaint] could not build mixed-mode " -+ "state, trying renderer-only\n"); -+ } -+ } else { -+ drm_debug(b, "\t[state] no overlay plane support\n"); - } - - if (!state) -@@ -3582,10 +3801,16 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data) - } - } - -- if (target_plane) -+ if (target_plane) { -+ drm_debug(b, "\t[repaint] view %p on %s plane %lu\n", -+ ev, plane_type_enums[target_plane->type].name, -+ (unsigned long) target_plane->plane_id); - weston_view_move_to_plane(ev, &target_plane->base); -- else -+ } else { -+ drm_debug(b, "\t[repaint] view %p using renderer " -+ "composition\n", ev); - weston_view_move_to_plane(ev, primary); -+ } - - if (!target_plane || - target_plane->type == WDRM_PLANE_TYPE_CURSOR) { -@@ -6264,6 +6489,8 @@ drm_destroy(struct weston_compositor *ec) - - destroy_sprites(b); - -+ weston_debug_scope_destroy(b->debug); -+ b->debug = NULL; - weston_compositor_shutdown(ec); - - wl_list_for_each_safe(base, next, &ec->head_list, compositor_link) -@@ -6725,6 +6952,10 @@ drm_backend_create(struct weston_compositor *compositor, - b->pageflip_timeout = config->pageflip_timeout; - b->use_pixman_shadow = config->use_pixman_shadow; - -+ b->debug = weston_compositor_add_debug_scope(compositor, "drm-backend", -+ "Debug messages from DRM/KMS backend\n", -+ NULL, NULL); -+ - compositor->backend = &b->base; - - if (parse_gbm_format(config->gbm_format, GBM_FORMAT_XRGB8888, &b->gbm_format) < 0) --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch b/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch deleted file mode 100644 index f3a46b1a..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston/1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch +++ /dev/null @@ -1,89 +0,0 @@ -From a864f58f44d701164dbb32bfcdde8c6d761f28ee Mon Sep 17 00:00:00 2001 -From: Deepak Rawat -Date: Fri, 24 Aug 2018 13:16:03 -0700 -Subject: [PATCH 46/46] compositor-drm: Read FB2_MODIFIERS capability - -Not all drivers support fb2 modifiers so read the capability before -using drmModeAddFB2WithModifiers. - -Signed-off-by: Deepak Rawat ---- - libweston/compositor-drm.c | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index e024e66f..4cf0d31f 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -346,6 +346,8 @@ struct drm_backend { - - bool aspect_ratio_supported; - -+ bool fb_modifiers; -+ - struct weston_debug_scope *debug; - }; - -@@ -961,7 +963,7 @@ drm_fb_destroy_gbm(struct gbm_bo *bo, void *data) - } - - static int --drm_fb_addfb(struct drm_fb *fb) -+drm_fb_addfb(struct drm_backend *b, struct drm_fb *fb) - { - int ret = -EINVAL; - #ifdef HAVE_DRM_ADDFB2_MODIFIERS -@@ -971,7 +973,7 @@ drm_fb_addfb(struct drm_fb *fb) - - /* If we have a modifier set, we must only use the WithModifiers - * entrypoint; we cannot import it through legacy ioctls. */ -- if (fb->modifier != DRM_FORMAT_MOD_INVALID) { -+ if (b->fb_modifiers && fb->modifier != DRM_FORMAT_MOD_INVALID) { - /* KMS demands that if a modifier is set, it must be the same - * for all planes. */ - #ifdef HAVE_DRM_ADDFB2_MODIFIERS -@@ -1055,7 +1057,7 @@ drm_fb_create_dumb(struct drm_backend *b, int width, int height, - fb->height = height; - fb->fd = b->drm.fd; - -- if (drm_fb_addfb(fb) != 0) { -+ if (drm_fb_addfb(b, fb) != 0) { - weston_log("failed to create kms fb: %m\n"); - goto err_bo; - } -@@ -1228,7 +1230,7 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf, - goto err_free; - } - -- if (drm_fb_addfb(fb) != 0) -+ if (drm_fb_addfb(backend, fb) != 0) - goto err_free; - - return fb; -@@ -1301,7 +1303,7 @@ drm_fb_get_from_bo(struct gbm_bo *bo, struct drm_backend *backend, - goto err_free; - } - -- if (drm_fb_addfb(fb) != 0) { -+ if (drm_fb_addfb(backend, fb) != 0) { - if (type == BUFFER_GBM_SURFACE) - weston_log("failed to create kms fb: %m\n"); - goto err_free; -@@ -4062,6 +4064,14 @@ init_kms_caps(struct drm_backend *b) - weston_log("DRM: %s atomic modesetting\n", - b->atomic_modeset ? "supports" : "does not support"); - -+#ifdef HAVE_DRM_ADDFB2_MODIFIERS -+ ret = drmGetCap(b->drm.fd, DRM_CAP_ADDFB2_MODIFIERS, &cap); -+ if (ret == 0) -+ b->fb_modifiers = cap; -+ else -+#endif -+ b->fb_modifiers = 0; -+ - /* - * KMS support for hardware planes cannot properly synchronize - * without nuclear page flip. Without nuclear/atomic, hw plane --- -2.16.2 - diff --git a/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend b/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend deleted file mode 100644 index ac339435..00000000 --- a/bsp/meta-synopsys/recipes-graphics/wayland/weston_5.0.0.bbappend +++ /dev/null @@ -1,16 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/weston:" -SRC_URI_append += "\ - file://1001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch; \ - file://1005-protocol-add-weston-debug.xml.patch; \ - file://1006-libweston-add-weston_debug-API-and-implementation.patch; \ - file://1007-compositor-add-option-to-enable-weston_debug.patch; \ - file://1010-xwm-dump_property-to-use-FILE-internally.patch; \ - file://1011-xwm-move-FILE-to-the-callers-of-dump_property.patch; \ - file://1012-xwm-convert-WM_DEBUG-into-a-weston-debug-scope.patch; \ - file://1014-compositor-Add-weston_layer_mask_is_infinite.patch; \ - file://1015-compositor-Add-scene-graph-debug-scope.patch; \ - file://1017-compositor-drm-Add-backend-pointer-to-drm_output.patch; \ - file://1018-compositor-drm-Add-drm-backend-log-debug-scope.patch; \ - file://1046-compositor-drm-Read-FB2_MODIFIERS-capability.patch; \ -" - diff --git a/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 00000000..7180d22b --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -0,0 +1,4 @@ +FILES_${PN}-ath9k += " \ + /lib/firmware/ath9k_htc/htc*.fw \ +" + diff --git a/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index 7180d22b..00000000 --- a/bsp/meta-synopsys/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILES_${PN}-ath9k += " \ - /lib/firmware/ath9k_htc/htc*.fw \ -" - diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc index 9ec28f5c..52e626e6 100644 --- a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc.inc @@ -6,30 +6,8 @@ LICENSE = "GPLv2" inherit kernel -SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \ - file://0002-etnaviv-Make-archtecture-and-platform-agnostic.patch \ - file://0004-ARC-plat-hsdk-Add-support-of-Vivante-GPU.patch \ - file://0006-devres-Really-align-data-field-to-unsigned-long-long.patch \ - file://0007-ETHNAVIV-don-t-print-command-dump.patch \ - file://0006-Use-dev-mmcblk0p2-as-rootfs-storage.patch \ - file://0001-DRM-UDL-get-rid-of-useless-vblank-initialization.patch \ - file://1001-Agl-hsdk-defconfig.patch \ - file://3003-Experimental-ARC-increase-memory-to-1.5GB.patch \ - file://6001-ARC-adjust-memblock_reserve-of-kernel-memory.patch \ - file://8000-ARCv2-support-manual-regfile-save-on-interrupts.patch \ +SRC_URI = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${PV}.tar.xz \ " -#file://2001-ARC-prevent-showing-irrelevant-exception-info-in-sig.patch -#file://2002-ARC-split-show_faulting_vma-for-logic-and-representa.patch -#file://2003-ARC-ARCv2-Introduce-SmaRT-support.patch -#file://3003-Experimental-ARC-increase-memory-to-1.5GB.patch - -# file://1001-Agl-hsdk-defconfig.patch -# file://5001-Enable-FBDEV_DRM-emulation-for-HSDK.patch - -# file://4001-HSDK-add-highmem-zone.patch -# file://4002-ARC-temporary-disable-IOC.patch -# file://4003-ARC-cache-ops-add-assertions.patch - S = "${WORKDIR}/linux-${PV}" diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch new file mode 100644 index 00000000..9ca4f1eb --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0009-UDL-add-pseudo-deferred-io-for-modeset-drive.patch @@ -0,0 +1,79 @@ +From dba8746636e35f3e42bed62f5b7d7231adf569c8 Mon Sep 17 00:00:00 2001 +From: Eugeniy Paltsev +Date: Wed, 4 Apr 2018 21:55:21 +0300 +Subject: [PATCH v100500 9/9] UDL: add pseudo deferred io for modeset driver + +With blackjack and mud. +--- + drivers/gpu/drm/udl/udl_modeset.c | 42 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c +index 5bcae7649795..737471da16e4 100644 +--- a/drivers/gpu/drm/udl/udl_modeset.c ++++ b/drivers/gpu/drm/udl/udl_modeset.c +@@ -17,6 +17,45 @@ + #include + #include "udl_drv.h" + ++/* All hacks and mud stuff --- start */ ++#define DL_DEFIO_WRITE_DELAY (HZ / 40) /* deferred_io delay in jiffies */ ++ ++static struct delayed_work deferred_work; ++static struct drm_device *deferred_dev; ++ ++static void pal_modeset_damage(struct drm_device *dev) ++{ ++ struct udl_device *udl = dev->dev_private; ++ struct udl_framebuffer *ufb; ++ ++ if (!udl->crtc || !udl->crtc->primary->fb) ++ return; ++ ++ ufb = to_udl_fb(udl->crtc->primary->fb); ++ udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height); ++} ++ ++static void pal_deferred_io_work(struct work_struct *work) ++{ ++ pal_modeset_damage(deferred_dev); ++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY); ++} ++ ++static void pal_deferred_io_cleanup(void) ++{ ++ cancel_delayed_work_sync(&deferred_work); ++} ++ ++static void pal_deferred_io_init(struct drm_device *dev) ++{ ++ deferred_dev = dev; ++ ++ INIT_DELAYED_WORK(&deferred_work, pal_deferred_io_work); ++ ++ schedule_delayed_work(&deferred_work, DL_DEFIO_WRITE_DELAY); ++} ++/* All hacks and mud stuff --- end */ ++ + /* + * All DisplayLink bulk operations start with 0xAF, followed by specific code + * All operations are written to buffers which then later get sent to device +@@ -450,6 +489,8 @@ int udl_modeset_init(struct drm_device *dev) + + udl_connector_init(dev, encoder); + ++ pal_deferred_io_init(dev); ++ + return 0; + } + +@@ -467,5 +508,6 @@ void udl_modeset_restore(struct drm_device *dev) + + void udl_modeset_cleanup(struct drm_device *dev) + { ++ pal_deferred_io_cleanup(); + drm_mode_config_cleanup(dev); + } +-- +2.14.3 + diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch new file mode 100644 index 00000000..9c52b940 --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0010-UDL-defio-add-fb-lock-and-required-checks.patch @@ -0,0 +1,54 @@ +From f781b63e277a7bc821d9c3415bc84d3e075d5591 Mon Sep 17 00:00:00 2001 +From: Evgeniy Didin +Date: Wed, 19 Sep 2018 16:57:32 +0300 +Subject: [PATCH] UDL: defio: add fb lock and required checks + +Signed-off-by: Evgeniy Didin +--- + drivers/gpu/drm/udl/udl_modeset.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c +index 10794ce2619c..df30b81abf7a 100644 +--- a/drivers/gpu/drm/udl/udl_modeset.c ++++ b/drivers/gpu/drm/udl/udl_modeset.c +@@ -27,12 +27,26 @@ static void pal_modeset_damage(struct drm_device *dev) + { + struct udl_device *udl = dev->dev_private; + struct udl_framebuffer *ufb; ++ struct drm_framebuffer *fb; + +- if (!udl->crtc || !udl->crtc->primary->fb) ++ if (!udl) { ++ pr_warn(" PAL: UDL: no udl! %s:%d", __func__, __LINE__); ++ return; ++ } ++ ++ if (!udl->crtc || !udl->crtc->primary) + return; + ++ fb = udl->crtc->primary->fb; ++ if (!fb) ++ return; ++ ++ drm_modeset_lock_all(fb->dev); ++ + ufb = to_udl_fb(udl->crtc->primary->fb); + udl_handle_damage(ufb, 0, 0, ufb->base.width, ufb->base.height); ++ ++ drm_modeset_unlock_all(fb->dev); + } + + static void pal_deferred_io_work(struct work_struct *work) +@@ -44,6 +58,8 @@ static void pal_deferred_io_work(struct work_struct *work) + static void pal_deferred_io_cleanup(void) + { + cancel_delayed_work_sync(&deferred_work); ++ ++ pr_info(" PAL: UDL: cancel deferred io! %s:%d", __func__, __LINE__); + } + + static void pal_deferred_io_init(struct drm_device *dev) +-- +2.16.2 + diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch new file mode 100644 index 00000000..8c205bf6 --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0011-ARC-hsdk-Enable-U-Boot-support.patch @@ -0,0 +1,28 @@ +From 875c449cea26bbd35b11316fcbd3c53d22c98e9d Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Tue, 15 Jan 2019 16:18:39 +0300 +Subject: [PATCH] ARC: [hsdk]: Enable U-Boot support + +This is required to get from U-Boot either +customized kernel command line of even entire .dtb + +Upstream status: Inappropriate. + +Signed-off-by: Alexey Brodkin +--- + arch/arc/configs/hsdk_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig +index 2a1d2cbfee1a..ef9b90550b18 100644 +--- a/arch/arc/configs/hsdk_defconfig ++++ b/arch/arc/configs/hsdk_defconfig +@@ -77,3 +77,5 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 + # CONFIG_DEBUG_PREEMPT is not set + # CONFIG_FTRACE is not set + CONFIG_CRYPTO_ECHAINIV=y ++# CONFIG_ARC_SMP_HALT_ON_RESET is not set ++CONFIG_ARC_UBOOT_SUPPORT=y +-- +2.16.2 + diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch new file mode 100644 index 00000000..47a1cfd8 --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc/0012-ARC-hsdk-Enable-cgroups-support.patch @@ -0,0 +1,27 @@ +From c2ef210039765c77544c6cd86336f4dc4b7ff52a Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 16 Jan 2019 11:31:06 +0300 +Subject: [PATCH] ARC: [hsdk]: Enable cgroups support + +This is required for systemd, otherwise we get a message about +missing API filesystems. + +Upstream status: Inappropriate. + +Signed-off-by: Alexey Brodkin +--- + arch/arc/configs/hsdk_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arc/configs/hsdk_defconfig b/arch/arc/configs/hsdk_defconfig +index 109126c3d75c..4f1b917ba6f5 100644 +--- a/arch/arc/configs/hsdk_defconfig ++++ b/arch/arc/configs/hsdk_defconfig +@@ -82,3 +82,4 @@ CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 + CONFIG_CRYPTO_ECHAINIV=y + # CONFIG_ARC_SMP_HALT_ON_RESET is not set + CONFIG_ARC_UBOOT_SUPPORT=y ++CONFIG_CGROUPS=y +-- +2.16.2 + diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb deleted file mode 100644 index 6897b041..00000000 --- a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_4.19.9.bb +++ /dev/null @@ -1,4 +0,0 @@ -require linux-arc.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -SRC_URI[sha256sum] = "fc116cc6829c73944215d3b3ac0fc368dde9e8235b456744afffde001269dbf2" diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb new file mode 100644 index 00000000..e3af8e6e --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-arc_5.3.15.bb @@ -0,0 +1,6 @@ +require linux-arc.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +SRC_URI[md5sum] = "3919149d6dfd122f24570c873bce951d" +SRC_URI[sha256sum] = "cec8aaea89feac4a3555f1e4b90000244ff7c5e7640db242a7de796a006d1197" + diff --git a/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend b/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..15778bb0 --- /dev/null +++ b/bsp/meta-synopsys/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_append = "|hsdk|nsimhs" + +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}" + +SRC_URI += "\ + file://most_deps.cfg \ + " diff --git a/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend b/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend deleted file mode 100644 index 09e264cb..00000000 --- a/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_append := "${THISDIR}/files:" -SRC_URI_append = " \ - file://0001-Modify-daemon.conf-for-lack-of-hw-resources.patch \ -" -EXTRA_OECONF += "ac_cv_tls=no" diff --git a/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend b/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend new file mode 100644 index 00000000..09e264cb --- /dev/null +++ b/bsp/meta-synopsys/recipes-multimedia/pulseaudio/pulseaudio_13.0.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_append := "${THISDIR}/files:" +SRC_URI_append = " \ + file://0001-Modify-daemon.conf-for-lack-of-hw-resources.patch \ +" +EXTRA_OECONF += "ac_cv_tls=no" diff --git a/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend b/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend new file mode 100644 index 00000000..655b645c --- /dev/null +++ b/bsp/meta-synopsys/recipes-navigation/gpsd/gpsd_%.bbappend @@ -0,0 +1,2 @@ +CC_append += "-lpthread" +CCLD_append += "-lpthread" diff --git a/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend b/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend new file mode 100644 index 00000000..58c80da8 --- /dev/null +++ b/bsp/meta-synopsys/recipes-platform/images/agl-demo-platform-crosssdk.bbappend @@ -0,0 +1 @@ +TOOLCHAIN_TARGET_TASK_remove = "gcc-sanitizers" diff --git a/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch b/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch index de7fec59..40e7b08b 100644 --- a/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch +++ b/bsp/meta-synopsys/recipes-qt/qt5/qtbase/0001-Add-ARC-support-in-double-conversion.patch @@ -1,7 +1,7 @@ -From e7da33f233ffb38f0e9d0bf839c7712911bce109 Mon Sep 17 00:00:00 2001 +From 2fa8ccab832fde23d5e8e395dbaa6e7ed94dd00b Mon Sep 17 00:00:00 2001 From: Evgeniy Didin -Date: Tue, 26 Mar 2019 14:13:49 +0300 -Subject: [PATCH] double conversion: support ARC +Date: Thu, 2 Apr 2020 23:11:49 +0300 +Subject: [PATCH] double conversion: ARC support Signed-off-by: Evgeniy Didin --- @@ -9,18 +9,18 @@ Signed-off-by: Evgeniy Didin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h -index 69aa17171c..ae5342eb45 100644 +index 7622fe6162..f45c77c360 100644 --- a/src/3rdparty/double-conversion/include/double-conversion/utils.h +++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h -@@ -77,7 +77,7 @@ inline void abort_noreturn() { abort(); } - defined(__SH4__) || defined(__alpha__) || \ +@@ -94,7 +94,7 @@ int main(int argc, char** argv) { defined(_MIPS_ARCH_MIPS32R2) || \ - defined(__AARCH64EL__) || defined(__AARCH64EB__) || defined(__aarch64__) || \ -- defined(__riscv) -+ defined(__riscv) || defined(__arc__) + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + defined(__riscv) || defined(__EMSCRIPTEN__) || \ +- defined(__or1k__) ++ defined(__or1k__) || defined(__arc__) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(__mc68000__) - #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS + #elif defined(__mc68000__) || \ + defined(__pnacl__) || defined(__native_client__) -- 2.16.2 diff --git a/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend b/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend index f3ad0fc2..a11cdeb0 100644 --- a/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend +++ b/bsp/meta-synopsys/recipes-qt/qt5/qtbase_git.bbappend @@ -1,5 +1,4 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/qtbase:" -SRC_URI += "\ - file://0001-Add-ARC-support-in-double-conversion.patch \ - file://0002-Fix-build-for-ARC-with-glibc-due-to-lack-of-FENV.patch \ -" +#SRC_URI += "\ +# file://0001-Add-ARC-support-in-double-conversion.patch \ +#" diff --git a/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend b/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend new file mode 100644 index 00000000..db1c53e1 --- /dev/null +++ b/bsp/meta-synopsys/recipes-support/gnupg/gnupg_2.2.%.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append = " ac_cv_have_decl_sys_siglist=no" diff --git a/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend b/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend deleted file mode 100644 index 0c23363f..00000000 --- a/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.32.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI_append += "\ - file://0001-Add-ARC-CPU-support.patch; \ -" diff --git a/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend b/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend new file mode 100644 index 00000000..0c23363f --- /dev/null +++ b/bsp/meta-synopsys/recipes-support/libgpg-error/libgpg-error_1.37.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append += "\ + file://0001-Add-ARC-CPU-support.patch; \ +" diff --git a/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend b/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend deleted file mode 100644 index 5f059523..00000000 --- a/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.10.%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SRC_URI_append += "\ - file://0001-Add-support-for-the-ARC-architecture.patch; \ -" - diff --git a/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend b/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend new file mode 100644 index 00000000..5f059523 --- /dev/null +++ b/bsp/meta-synopsys/recipes-support/liburcu/liburcu_0.11.%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append += "\ + file://0001-Add-support-for-the-ARC-architecture.patch; \ +" + diff --git a/bsp/meta-ti/README b/bsp/meta-ti/README index 3df51b88..e6d342b9 100644 --- a/bsp/meta-ti/README +++ b/bsp/meta-ti/README @@ -8,7 +8,7 @@ This layer depends on: URI: git://git.openembedded.org/openembedded-core layers: meta -branch: thud +branch: master The base BSP part of meta-ti should work with different OpenEmbedded/Yocto @@ -18,8 +18,10 @@ distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago. Please follow the recommended setup procedures of your OE distribution. -Send pull requests, patches, comments or questions to meta-ti@yoctoproject.org +Send pull requests, patches, comments or questions to: +meta-ti@lists.yoctoproject.org + Please note - meta-ti mailing list requires subscription for posting: -https://lists.yoctoproject.org/listinfo/meta-ti +https://lists.yoctoproject.org/g/meta-ti Maintainers: Denys Dmytriyenko diff --git a/bsp/meta-ti/classes/ti-pdk-fetch.bbclass b/bsp/meta-ti/classes/ti-pdk-fetch.bbclass index 7108d001..fae32309 100644 --- a/bsp/meta-ti/classes/ti-pdk-fetch.bbclass +++ b/bsp/meta-ti/classes/ti-pdk-fetch.bbclass @@ -1,11 +1,12 @@ TI_PDK_GIT_URI ?= "git://git.ti.com/processor-sdk/pdk.git" TI_PDK_GIT_BRANCH ?= "master" TI_PDK_GIT_PROTOCOL ?= "git" -TI_PDK_SRCREV ?= "5ddf121a09af4ac58a18103848d4ab8e741e23d6" +TI_PDK_SRCREV ?= "0d2591302b03ddae9a25300818e03345658b9083" -TI_PDK_VERSION ?= "2020.1.22" +TI_PDK_VERSION ?= "07.00.00.34" PV = "${TI_PDK_VERSION}" +PE = "1" TI_PDK_COMP ?= "" TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}" diff --git a/bsp/meta-ti/classes/ti-pdk.bbclass b/bsp/meta-ti/classes/ti-pdk.bbclass index a07fdbb3..37305e89 100644 --- a/bsp/meta-ti/classes/ti-pdk.bbclass +++ b/bsp/meta-ti/classes/ti-pdk.bbclass @@ -10,9 +10,9 @@ DEPENDS_remove_ti33x = "ti-cgt6x-native" DEPENDS_remove_ti43x = "ti-cgt6x-native" DEPENDS_append_omapl1 = " ti-cgt-arm-native" DEPENDS_remove_am65xx = "gcc-arm-none-eabi-native ti-cgt6x-native" -DEPENDS_append_am65xx = " ti-cgt-arm-native gcc-linaro-baremetal-aarch64-native" -DEPENDS_remove_j7-evm = "gcc-arm-none-eabi-native" -DEPENDS_append_j7-evm = " ti-cgt-arm-native gcc-linaro-baremetal-aarch64-native ti-cgt7x-native" +DEPENDS_append_am65xx = " ti-cgt-arm-native gcc-aarch64-none-elf-native" +DEPENDS_remove_j7 = "gcc-arm-none-eabi-native" +DEPENDS_append_j7 = " ti-cgt-arm-native gcc-aarch64-none-elf-native ti-cgt7x-native" S = "${WORKDIR}/git" B = "${WORKDIR}/build" diff --git a/bsp/meta-ti/conf/layer.conf b/bsp/meta-ti/conf/layer.conf index 824443d4..7848d196 100644 --- a/bsp/meta-ti/conf/layer.conf +++ b/bsp/meta-ti/conf/layer.conf @@ -8,17 +8,18 @@ BBFILE_COLLECTIONS += "meta-ti" BBFILE_PATTERN_meta-ti := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-ti = "6" -LAYERSERIES_COMPAT_meta-ti = "sumo thud" +LAYERSERIES_COMPAT_meta-ti = "sumo thud warrior zeus dunfell" LICENSE_PATH += "${LAYERDIR}/licenses" -LAYERDEPENDS_meta-ti = "core" +LAYERDEPENDS_meta-ti = " \ + core \ + meta-arm \ +" SIGGEN_EXCLUDERECIPES_ABISAFE += " \ ti-sgx-ddk-km \ ti-sgx-ddk-um \ - ti-ipc \ - ti-ipc-rtos \ cmem-mod \ hplib-mod \ gdbserverproxy-module-drv \ diff --git a/bsp/meta-ti/conf/machine/am335x-evm.conf b/bsp/meta-ti/conf/machine/am335x-evm.conf index 3cb97d30..469c4d37 100644 --- a/bsp/meta-ti/conf/machine/am335x-evm.conf +++ b/bsp/meta-ti/conf/machine/am335x-evm.conf @@ -7,7 +7,7 @@ require conf/machine/include/ti33x.inc MACHINE_GUI_CLASS = "smallscreen" MACHINE_FEATURES += "touchscreen" -IMAGE_FSTYPES += "ubifs ubi tar.xz" +IMAGE_FSTYPES += "ubifs ubi" # Normally AM335 boards use ttyS0, but ICE uses ttyS3, so try both SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS3" @@ -24,7 +24,7 @@ SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" # UBI: logical eraseblock size: 126976 bytes # from ubiattach stdout: # UBI device number 0, total 1988 LEBs -MKUBIFS_ARGS ?= "-F -m 2048 -e 126976 -c 10200" +MKUBIFS_ARGS ?= "-F -m 2048 -e 126976 -c 9900" # do ubiattach /dev/ubi_ctrl -m 7 -O 2048 # from dmesg: diff --git a/bsp/meta-ti/conf/machine/am3517-evm.conf b/bsp/meta-ti/conf/machine/am3517-evm.conf index 87e3f1e0..c20e2f6a 100644 --- a/bsp/meta-ti/conf/machine/am3517-evm.conf +++ b/bsp/meta-ti/conf/machine/am3517-evm.conf @@ -7,7 +7,7 @@ require conf/machine/include/omap3.inc MACHINE_GUI_CLASS = "smallscreen" MACHINE_FEATURES += "touchscreen ethernet" -IMAGE_FSTYPES += "ubi tar.gz" +IMAGE_FSTYPES += "ubi tar.xz" EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048" SERIAL_CONSOLES = "115200;ttyS2" diff --git a/bsp/meta-ti/conf/machine/am37x-evm.conf b/bsp/meta-ti/conf/machine/am37x-evm.conf index e9d1838a..a512c8d0 100644 --- a/bsp/meta-ti/conf/machine/am37x-evm.conf +++ b/bsp/meta-ti/conf/machine/am37x-evm.conf @@ -7,7 +7,7 @@ require conf/machine/include/omap3.inc MACHINE_GUI_CLASS = "smallscreen" MACHINE_FEATURES += "touchscreen ethernet" -IMAGE_FSTYPES += "ubi tar.gz" +IMAGE_FSTYPES += "ubi tar.xz" EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048" KERNEL_DEVICETREE = "omap3-evm-37xx.dtb" diff --git a/bsp/meta-ti/conf/machine/am437x-evm.conf b/bsp/meta-ti/conf/machine/am437x-evm.conf index bd1053a4..4e3681d5 100644 --- a/bsp/meta-ti/conf/machine/am437x-evm.conf +++ b/bsp/meta-ti/conf/machine/am437x-evm.conf @@ -7,7 +7,7 @@ require conf/machine/include/ti43x.inc MACHINE_GUI_CLASS = "smallscreen" MACHINE_FEATURES += "touchscreen" -IMAGE_FSTYPES += "ubifs ubi tar.xz" +IMAGE_FSTYPES += "ubifs ubi" SERIAL_CONSOLES = "115200;ttyS0" @@ -22,7 +22,7 @@ SERIAL_CONSOLES = "115200;ttyS0" # UBI: logical eraseblock size: 253952 bytes # from ubiattach stdout: # UBI device number 0, total 994 LEBs -MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 5000" +MKUBIFS_ARGS = "-F -m 4096 -e 253952 -c 4800" # do ubiattach /dev/ubi_ctrl -m 11 -O 4096 # from dmesg: diff --git a/bsp/meta-ti/conf/machine/am57xx-evm.conf b/bsp/meta-ti/conf/machine/am57xx-evm.conf index a0b1b532..3b0c18af 100644 --- a/bsp/meta-ti/conf/machine/am57xx-evm.conf +++ b/bsp/meta-ti/conf/machine/am57xx-evm.conf @@ -6,18 +6,25 @@ require conf/machine/include/dra7xx.inc MACHINE_FEATURES += "touchscreen" -IMAGE_FSTYPES += "tar.xz" - SERIAL_CONSOLES = "115200;ttyS2" KERNEL_DEVICETREE = " \ - am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-beagle-x15-revc.dtb \ + am57xx-beagle-x15.dtb \ + am57xx-beagle-x15-revb1.dtb \ + am57xx-beagle-x15-revc.dtb \ am5729-beagleboneai.dtb \ - am57xx-evm.dtb am57xx-evm-cam-mt9t111.dtb am57xx-evm-cam-ov10635.dtb \ - am57xx-evm-reva3.dtb am57xx-evm-reva3-cam-mt9t111.dtb am57xx-evm-reva3-cam-ov10635.dtb \ - am571x-idk.dtb am571x-idk-lcd-osd101t2045.dtb am571x-idk-lcd-osd101t2587.dtb \ - am572x-idk.dtb am572x-idk-lcd-osd101t2045.dtb am572x-idk-lcd-osd101t2587.dtb \ - am574x-idk.dtb am574x-idk-lcd-osd101t2587.dtb \ + am57xx-evm.dtb \ + am57xx-evm-cam-ov10635.dtb \ + am57xx-evm-reva3.dtb \ + am57xx-evm-reva3-cam-ov10635.dtb \ + am571x-idk.dtb \ + am571x-idk-lcd-osd101t2045.dtb \ + am571x-idk-lcd-osd101t2587.dtb \ + am572x-idk.dtb \ + am572x-idk-lcd-osd101t2045.dtb \ + am572x-idk-lcd-osd101t2587.dtb \ + am574x-idk.dtb \ + am574x-idk-lcd-osd101t2587.dtb \ " KERNEL_DEVICETREE += "${@oe.utils.conditional('ENABLE_TI_UIO_DEVICES', '1', 'am574x-idk-pru-excl-uio.dtb am572x-idk-pru-excl-uio.dtb am571x-idk-pru-excl-uio.dtb', '', d)}" diff --git a/bsp/meta-ti/conf/machine/am65xx-evm-k3r5-sr2.conf b/bsp/meta-ti/conf/machine/am65xx-evm-k3r5-sr2.conf new file mode 100644 index 00000000..c0b3cd51 --- /dev/null +++ b/bsp/meta-ti/conf/machine/am65xx-evm-k3r5-sr2.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: AM65xx SR2.0 EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM65xx SR2.0 EVM (R5F core) + +# Booting SR2 requires different SYSFW, the rest is handled at runtime + +require conf/machine/am65xx-evm-k3r5.conf +SOC_FAMILY_append = ":k3r5-sr2" + +SYSFW_SOC = "am65x_sr2" +SYSFW_SYMLINK = "sysfw.itb" diff --git a/bsp/meta-ti/conf/machine/am65xx-evm-k3r5.conf b/bsp/meta-ti/conf/machine/am65xx-evm-k3r5.conf new file mode 100644 index 00000000..bd17474e --- /dev/null +++ b/bsp/meta-ti/conf/machine/am65xx-evm-k3r5.conf @@ -0,0 +1,12 @@ +#@TYPE: Machine +#@NAME: AM65xx EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM65xx EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am65x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" +SYSFW_SYMLINK = "" + +UBOOT_MACHINE = "am65x_evm_r5_defconfig" diff --git a/bsp/meta-ti/conf/machine/am65xx-evm.conf b/bsp/meta-ti/conf/machine/am65xx-evm.conf index 82959ce3..2f3b92a8 100644 --- a/bsp/meta-ti/conf/machine/am65xx-evm.conf +++ b/bsp/meta-ti/conf/machine/am65xx-evm.conf @@ -4,33 +4,10 @@ require conf/machine/include/am65xx.inc -MACHINE_FEATURES += "touchscreen" - -IMAGE_FSTYPES += "tar.xz wic.xz" - -SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1" -SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" - -KERNEL_DEVICETREE = " \ - ti/k3-am654-base-board.dtb ti/k3-am654-gp.dtbo \ - ti/k3-am654-evm-hdmi.dtbo ti/k3-am654-idk.dtbo \ - ti/k3-am654-evm-csi2-ov490.dtbo ti/k3-am654-evm-csi2-ov5640.dtbo \ - ti/k3-am654-evm-oldi-lcd1evm.dtbo ti/k3-am654-evm-tc358876.dtbo \ - ti/k3-am654-pcie-usb2.dtbo ti/k3-am654-pcie-usb3.dtbo \ - ti/k3-am654-base-board-jailhouse.dtbo \ - ti/k3-am654-evm-prupwm.dtbo \ -" +BBMULTICONFIG += "k3r5-sr2" UBOOT_MACHINE = "am65x_evm_a53_defconfig" -OPTEEMACHINE = "k3" -OPTEEFLAVOR = "am65x" -OPTEEOUTPUTMACHINE = "k3" - -# Please note that booting AM65xx platform also requires -# tiboot3.bin and sysfw.itb, which are provided by meta-arago -# u-boot-k3-r5 and ti-sci-fw recipes -IMAGE_BOOT_FILES = "tispl.bin u-boot.img" -WKS_FILE ?= "sdimage-bootpart.wks" - -do_image_wic[depends] += "u-boot:do_deploy" +IMAGE_BOOT_FILES += "sysfw-am65x-evm.itb" +do_image_wic[mcdepends] += "mc::k3r5-sr2:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] += "mc::k3r5-sr2:ti-sci-fw:do_deploy" diff --git a/bsp/meta-ti/conf/machine/am65xx-hs-evm-k3r5.conf b/bsp/meta-ti/conf/machine/am65xx-hs-evm-k3r5.conf new file mode 100644 index 00000000..2b06f2cc --- /dev/null +++ b/bsp/meta-ti/conf/machine/am65xx-hs-evm-k3r5.conf @@ -0,0 +1,13 @@ +#@TYPE: Machine +#@NAME: AM65xx HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI AM65xx HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "am65x" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "am65x_hs_evm_r5_defconfig" + +TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}" diff --git a/bsp/meta-ti/conf/machine/am65xx-hs-evm.conf b/bsp/meta-ti/conf/machine/am65xx-hs-evm.conf index f9897504..e4eebb6a 100644 --- a/bsp/meta-ti/conf/machine/am65xx-hs-evm.conf +++ b/bsp/meta-ti/conf/machine/am65xx-hs-evm.conf @@ -2,7 +2,7 @@ #@NAME: AM65xx HS EVM #@DESCRIPTION: Machine configuration for the TI AM65xx HS EVM -require conf/machine/am65xx-evm.conf +require conf/machine/include/am65xx.inc UBOOT_MACHINE = "am65x_hs_evm_a53_defconfig" @@ -20,7 +20,3 @@ UBOOT_BINARY = "u-boot.img_HS" IMAGE_BOOT_FILES = "${UBOOT_BINARY}" TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}" - -OPTEEMACHINE = "k3" -OPTEEFLAVOR = "am65x" -OPTEEOUTPUTMACHINE = "k3" diff --git a/bsp/meta-ti/conf/machine/beagle-x15.conf b/bsp/meta-ti/conf/machine/beagle-x15.conf index d5e05ec7..c7503266 100644 --- a/bsp/meta-ti/conf/machine/beagle-x15.conf +++ b/bsp/meta-ti/conf/machine/beagle-x15.conf @@ -11,28 +11,3 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLES = "115200;ttyS2" UBOOT_MACHINE = "am57xx_evm_config" - -WKS_FILE ?= "sdimage-bootpart.wks" -IMAGE_BOOT_FILES = "MLO u-boot.img" -IMAGE_FSTYPES += "tar.xz wic.xz" - -# UBI information. Note that this is board and kernel specific. Changes -# in your kernel port may require changes in these variables. For more -# details about this board please see -# http://processors.wiki.ti.com/index.php/UBIFS_Support - -# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 -# From dmesg: -# UBI: smallest flash I/O unit: 2048 -# UBI: logical eraseblock size: 126976 bytes -# from ubiattach stdout: -# UBI device number 0, total 1988 LEBs -MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192" - -# do ubiattach /dev/ubi_ctrl -m 7 -O 2048 -# from dmesg: -# UBI: smallest flash I/O unit: 2048 -# UBI: physical eraseblock size: 131072 bytes (128 KiB) -# UBI: sub-page size: 512 -# UBI: VID header offset: 2048 (aligned 2048) -UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048" diff --git a/bsp/meta-ti/conf/machine/beagleboard.conf b/bsp/meta-ti/conf/machine/beagleboard.conf index 37d23aa7..ee51fd66 100644 --- a/bsp/meta-ti/conf/machine/beagleboard.conf +++ b/bsp/meta-ti/conf/machine/beagleboard.conf @@ -7,7 +7,7 @@ require conf/machine/include/omap3.inc # Only has DVI connector for external screen MACHINE_GUI_CLASS = "bigscreen" -IMAGE_FSTYPES += "tar.gz ubi" +IMAGE_FSTYPES += "tar.xz ubi" EXTRA_IMAGECMD_jffs2 = "-lnp" KERNEL_DEVICETREE = "omap3-beagle.dtb omap3-beagle-xm.dtb omap3-beagle-xm-ab.dtb" diff --git a/bsp/meta-ti/conf/machine/beaglebone.conf b/bsp/meta-ti/conf/machine/beaglebone.conf index d8fd4062..896a9d73 100644 --- a/bsp/meta-ti/conf/machine/beaglebone.conf +++ b/bsp/meta-ti/conf/machine/beaglebone.conf @@ -13,12 +13,6 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLES = "115200;ttyS0" -WKS_FILE ?= "sdimage-bootpart.wks" - -IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} ${SPL_BINARY}" - -IMAGE_FSTYPES += "tar.xz wic.xz" - IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage" # Refine the list of device targets for ti-pdk class recipes diff --git a/bsp/meta-ti/conf/machine/dra7xx-evm.conf b/bsp/meta-ti/conf/machine/dra7xx-evm.conf index ada32073..67f9a0d1 100644 --- a/bsp/meta-ti/conf/machine/dra7xx-evm.conf +++ b/bsp/meta-ti/conf/machine/dra7xx-evm.conf @@ -6,17 +6,23 @@ require conf/machine/include/dra7xx.inc MACHINE_FEATURES += "touchscreen" -IMAGE_FSTYPES += "tar.xz" - SERIAL_CONSOLES = "115200;ttyS0" KERNEL_DEVICETREE = " \ - dra7-evm.dtb dra7-evm-lcd-osd101t2045.dtb dra7-evm-lcd-osd101t2587.dtb \ - dra71-evm.dtb dra71-evm-nand.dtb dra71-evm-lcd-auo-g101evn01.0.dtb \ - dra72-evm.dtb dra72-evm-lcd-osd101t2045.dtb dra72-evm-lcd-osd101t2587.dtb \ - dra72-evm-revc.dtb dra72-evm-revc-lcd-osd101t2045.dtb dra72-evm-revc-lcd-osd101t2587.dtb \ - dra76-evm.dtb dra76-evm-tfp410.dtb dra76-evm-ov490.dtb dra76-evm-ov5640.dtb \ - dra76-evm-tfp410-ov490.dtb dra76-evm-tfp410-ov5640.dtb \ + dra7-evm.dtb \ + dra7-evm-lcd-osd101t2045.dtb \ + dra7-evm-lcd-osd101t2587.dtb \ + dra71-evm.dtb \ + dra71-evm-nand.dtb \ + dra71-evm-lcd-auo-g101evn01.0.dtb \ + dra72-evm.dtb \ + dra72-evm-lcd-osd101t2045.dtb \ + dra72-evm-lcd-osd101t2587.dtb \ + dra72-evm-revc.dtb \ + dra72-evm-revc-lcd-osd101t2045.dtb \ + dra72-evm-revc-lcd-osd101t2587.dtb \ + dra76-evm.dtb \ + dra76-evm-tfp410.dtb \ " UBOOT_MACHINE = "dra7xx_evm_config" diff --git a/bsp/meta-ti/conf/machine/include/am65xx.inc b/bsp/meta-ti/conf/machine/include/am65xx.inc index d433ed10..f60d1662 100644 --- a/bsp/meta-ti/conf/machine/include/am65xx.inc +++ b/bsp/meta-ti/conf/machine/include/am65xx.inc @@ -1,6 +1,30 @@ require conf/machine/include/k3.inc SOC_FAMILY_append = ":am65xx" +MACHINE_FEATURES += "touchscreen" + +SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" + +KERNEL_DEVICETREE = " \ + ti/k3-am654-base-board.dtb \ + ti/k3-am654-base-board-sr1.dtb \ + ti/k3-am654-gp.dtbo \ + ti/k3-am654-idk.dtbo \ + ti/k3-am654-idk-sr1.dtbo \ + ti/k3-am654-evm-hdmi.dtbo \ + ti/k3-am654-evm-oldi-lcd1evm.dtbo \ + ti/k3-am654-evm-tc358876.dtbo \ + ti/k3-am654-pcie-usb2.dtbo \ + ti/k3-am654-pcie-usb3.dtbo \ + ti/k3-am654-base-board-jailhouse.dtbo \ + ti/k3-am654-evm-prupwm.dtbo \ +" + +OPTEEMACHINE = "k3" +OPTEEFLAVOR = "am65x" +OPTEEOUTPUTMACHINE = "k3" + # Set the list of device targets for ti-pdk class recipes TI_PDK_LIMIT_SOCS = "am65xx" TI_PDK_LIMIT_BOARDS = "am65xx_evm am65xx_idk" diff --git a/bsp/meta-ti/conf/machine/include/davinci.inc b/bsp/meta-ti/conf/machine/include/davinci.inc index 6de64839..62ca6887 100644 --- a/bsp/meta-ti/conf/machine/include/davinci.inc +++ b/bsp/meta-ti/conf/machine/include/davinci.inc @@ -5,7 +5,7 @@ MACHINE_KERNEL_PR = "r54" KERNEL_IMAGETYPE = "zImage" -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" diff --git a/bsp/meta-ti/conf/machine/include/j7.inc b/bsp/meta-ti/conf/machine/include/j7.inc new file mode 100644 index 00000000..f6d91615 --- /dev/null +++ b/bsp/meta-ti/conf/machine/include/j7.inc @@ -0,0 +1,11 @@ +require conf/machine/include/k3.inc +SOC_FAMILY_append = ":j7" + +OPTEEMACHINE = "k3" +OPTEEFLAVOR = "j7" +OPTEEOUTPUTMACHINE = "k3" + +# Set the list of device targets for ti-pdk class recipes +TI_PDK_LIMIT_SOCS = "j721e j7200" +TI_PDK_LIMIT_BOARDS = "j721e_evm j7200_evm" +TI_PDK_LIMIT_CORES = "mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 c66xdsp_1 c66xdsp_2 c7x_1" diff --git a/bsp/meta-ti/conf/machine/include/k3.inc b/bsp/meta-ti/conf/machine/include/k3.inc index 8b836ea8..6b78f4ca 100644 --- a/bsp/meta-ti/conf/machine/include/k3.inc +++ b/bsp/meta-ti/conf/machine/include/k3.inc @@ -1,12 +1,16 @@ +# TI K3 Aarch64 profile for Cortex-A53/A72 cores + require conf/machine/include/ti-soc.inc SOC_FAMILY_append = ":k3" require conf/machine/include/arm/arch-arm64.inc +BBMULTICONFIG += "k3r5" + # Increase this everytime you change something in the kernel MACHINE_KERNEL_PR = "r0" -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" @@ -22,6 +26,9 @@ UBOOT_SUFFIX = "img" EXTRA_IMAGEDEPENDS += "virtual/bootloader" +TFA_PLATFORM = "k3" +TFA_BOARD = "generic" + MACHINE_GUI_CLASS = "smallscreen" # Use the expected value of the ubifs filesystem's volume name in the kernel @@ -31,3 +38,11 @@ UBI_VOLNAME = "rootfs" # List common SoC features, may need to add touchscreen for specific machines MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet pci gpu" # Not ready yet - dsp mmip + +IMAGE_FSTYPES += "tar.xz wic.xz" + +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb" +WKS_FILE ?= "sdimage-2part.wks" +do_image_wic[depends] += "virtual/bootloader:do_deploy" +do_image_wic[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy mc::k3r5:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] += "mc::k3r5:virtual/bootloader:do_deploy mc::k3r5:ti-sci-fw:do_deploy" diff --git a/bsp/meta-ti/conf/machine/include/k3r5.inc b/bsp/meta-ti/conf/machine/include/k3r5.inc new file mode 100644 index 00000000..52fcf38b --- /dev/null +++ b/bsp/meta-ti/conf/machine/include/k3r5.inc @@ -0,0 +1,23 @@ +# TI K3 Armv7 profile for Cortex-R5F cores + +require conf/machine/include/ti-soc.inc +SOC_FAMILY_append = ":k3r5" + +# The closest of existing tunes for Cortex-R5F +DEFAULTTUNE = "armv7athf" +require conf/machine/include/tune-cortexa8.inc + +# R5 runs early bootloader and loads SYSFW +# https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/am65x/README +# https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/j721e/README +PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" +PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" + +SPL_BINARY = "" +UBOOT_SUFFIX = "bin" +UBOOT_BINARY = "tiboot3.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}" + +PACKAGECONFIG_pn-u-boot-ti-staging = "" diff --git a/bsp/meta-ti/conf/machine/include/keystone.inc b/bsp/meta-ti/conf/machine/include/keystone.inc index ef33975f..e7ea9758 100644 --- a/bsp/meta-ti/conf/machine/include/keystone.inc +++ b/bsp/meta-ti/conf/machine/include/keystone.inc @@ -4,7 +4,7 @@ SOC_FAMILY_append = ":keystone" DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/tune-cortexa15.inc -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" diff --git a/bsp/meta-ti/conf/machine/include/omap-a15.inc b/bsp/meta-ti/conf/machine/include/omap-a15.inc index cc055365..e491d2b5 100644 --- a/bsp/meta-ti/conf/machine/include/omap-a15.inc +++ b/bsp/meta-ti/conf/machine/include/omap-a15.inc @@ -7,7 +7,7 @@ require conf/machine/include/tune-cortexa15.inc # Increase this everytime you change something in the kernel MACHINE_KERNEL_PR = "r7" -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" @@ -36,4 +36,9 @@ MACHINE_GUI_CLASS = "smallscreen" UBI_VOLNAME = "rootfs" # List common SoC features, may need to add touchscreen for specific machines -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu mmip dsp" +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu mmip dsp gc320" + +IMAGE_FSTYPES += "tar.xz wic.xz" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}" +do_image_wic[depends] += "u-boot:do_deploy" diff --git a/bsp/meta-ti/conf/machine/include/omap3.inc b/bsp/meta-ti/conf/machine/include/omap3.inc index 489f1f9a..5696c82d 100644 --- a/bsp/meta-ti/conf/machine/include/omap3.inc +++ b/bsp/meta-ti/conf/machine/include/omap3.inc @@ -22,7 +22,7 @@ MACHINE_KERNEL_PR = "r127" KERNEL_IMAGETYPE = "zImage" # Default providers, may need to override for specific machines -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" diff --git a/bsp/meta-ti/conf/machine/include/omap4.inc b/bsp/meta-ti/conf/machine/include/omap4.inc index d9706066..cbca267c 100644 --- a/bsp/meta-ti/conf/machine/include/omap4.inc +++ b/bsp/meta-ti/conf/machine/include/omap4.inc @@ -4,7 +4,7 @@ SOC_FAMILY_append = ":omap4" DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/tune-cortexa9.inc -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" diff --git a/bsp/meta-ti/conf/machine/include/ti33x.inc b/bsp/meta-ti/conf/machine/include/ti33x.inc index 5ff6efea..abfd7ec7 100644 --- a/bsp/meta-ti/conf/machine/include/ti33x.inc +++ b/bsp/meta-ti/conf/machine/include/ti33x.inc @@ -20,7 +20,7 @@ MACHINE_GUI_CLASS = "bigscreen" MACHINE_KERNEL_PR = "r22" # Default providers, may need to override for specific machines -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" @@ -28,11 +28,12 @@ KERNEL_IMAGETYPE = "zImage" KERNEL_DEVICETREE = " \ am335x-evm.dtb am335x-evmsk.dtb \ - am335x-icev2.dtb am335x-icev2-prueth.dtb \ + am335x-icev2.dtb \ + am335x-icev2-prueth.dtb \ am335x-pocketbeagle.dtb am335x-bone.dtb am335x-boneblue.dtb \ am335x-bonegreen.dtb am335x-bonegreen-wireless.dtb \ am335x-boneblack.dtb am335x-boneblack-wireless.dtb \ - am335x-boneblack-prusuart.dtb am335x-sancloud-bbe.dtb \ + am335x-sancloud-bbe.dtb \ " KERNEL_DEVICETREE += "${@oe.utils.conditional('ENABLE_TI_UIO_DEVICES', '1', 'am335x-icev2-pru-excl-uio.dtb', '', d)}" @@ -58,3 +59,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa etherne # Set the list of device targets for ti-pdk class recipes TI_PDK_LIMIT_SOCS = "am335x" TI_PDK_LIMIT_BOARDS = "evmAM335x icev2AM335x iceAMIC110 bbbAM335x skAM335x" + +IMAGE_FSTYPES += "tar.xz wic.xz" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}" +do_image_wic[depends] += "u-boot:do_deploy" diff --git a/bsp/meta-ti/conf/machine/include/ti43x.inc b/bsp/meta-ti/conf/machine/include/ti43x.inc index a0cc9cc7..524b0b2c 100644 --- a/bsp/meta-ti/conf/machine/include/ti43x.inc +++ b/bsp/meta-ti/conf/machine/include/ti43x.inc @@ -20,7 +20,7 @@ MACHINE_GUI_CLASS = "bigscreen" MACHINE_KERNEL_PR = "r3" # Default providers, may need to override for specific machines -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging" @@ -55,3 +55,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa etherne # Set the list of device targets for ti-pdk class recipes TI_PDK_LIMIT_SOCS = "am437x" TI_PDK_LIMIT_BOARDS = "evmAM437x idkAM437x skAM437x" + +IMAGE_FSTYPES += "tar.xz wic.xz" +WKS_FILE ?= "sdimage-2part.wks" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}" +do_image_wic[depends] += "u-boot:do_deploy" diff --git a/bsp/meta-ti/conf/machine/j7-evm-k3r5.conf b/bsp/meta-ti/conf/machine/j7-evm-k3r5.conf new file mode 100644 index 00000000..b9e8cc01 --- /dev/null +++ b/bsp/meta-ti/conf/machine/j7-evm-k3r5.conf @@ -0,0 +1,11 @@ +#@TYPE: Machine +#@NAME: J7 EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J7 EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721e" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "gp" + +UBOOT_MACHINE = "j721e_evm_r5_defconfig" diff --git a/bsp/meta-ti/conf/machine/j7-evm.conf b/bsp/meta-ti/conf/machine/j7-evm.conf index 318435d9..aedfc825 100644 --- a/bsp/meta-ti/conf/machine/j7-evm.conf +++ b/bsp/meta-ti/conf/machine/j7-evm.conf @@ -2,36 +2,17 @@ #@NAME: J7 EVM #@DESCRIPTION: Machine configuration for the TI J7 EVM -require conf/machine/include/k3.inc +require conf/machine/include/j7.inc -IMAGE_FSTYPES += "tar.xz wic.xz" - -SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1" +SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS3" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" KERNEL_DEVICETREE = " \ ti/k3-j721e-common-proc-board.dtb \ ti/k3-j721e-proc-board-tps65917.dtb \ ti/k3-j721e-common-proc-board-infotainment.dtbo \ - ti/k3-j721e-common-proc-board-infotainment-display-sharing.dtbo \ + ti/k3-j721e-pcie-backplane.dtbo \ ti/k3-j721e-common-proc-board-jailhouse.dtbo \ " UBOOT_MACHINE = "j721e_evm_a72_config" - -OPTEEMACHINE = "k3" -OPTEEFLAVOR = "j7" -OPTEEOUTPUTMACHINE = "k3" - -# Please note that booting J7 platform also requires -# tiboot3.bin and sysfw.itb, which are provided by meta-arago -# u-boot-k3-r5 and ti-sci-fw recipes -IMAGE_BOOT_FILES = "tispl.bin u-boot.img" -WKS_FILE ?= "sdimage-bootpart.wks" - -do_image_wic[depends] += "u-boot:do_deploy" - -# Set the list of device targets for ti-pdk class recipes -TI_PDK_LIMIT_SOCS = "j721e j7200" -TI_PDK_LIMIT_BOARDS = "j721e_evm j7200_evm" -TI_PDK_LIMIT_CORES = "mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 c66xdsp_1 c66xdsp_2 c7x_1" diff --git a/bsp/meta-ti/conf/machine/j7-hs-evm-k3r5.conf b/bsp/meta-ti/conf/machine/j7-hs-evm-k3r5.conf new file mode 100644 index 00000000..53a7016f --- /dev/null +++ b/bsp/meta-ti/conf/machine/j7-hs-evm-k3r5.conf @@ -0,0 +1,13 @@ +#@TYPE: Machine +#@NAME: J7 HS EVM (R5F) +#@DESCRIPTION: Machine configuration for the TI J7 HS EVM (R5F core) + +require conf/machine/include/k3r5.inc + +SYSFW_SOC = "j721e" +SYSFW_CONFIG = "evm" +SYSFW_SUFFIX = "hs" + +UBOOT_MACHINE = "j721e_hs_evm_r5_defconfig" + +TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}" diff --git a/bsp/meta-ti/conf/machine/j7-hs-evm.conf b/bsp/meta-ti/conf/machine/j7-hs-evm.conf new file mode 100644 index 00000000..70e14754 --- /dev/null +++ b/bsp/meta-ti/conf/machine/j7-hs-evm.conf @@ -0,0 +1,22 @@ +#@TYPE: Machine +#@NAME: J7 HS EVM +#@DESCRIPTION: Machine configuration for the TI J7 HS EVM + +require conf/machine/j7-evm.conf + +UBOOT_MACHINE = "j721e_hs_evm_a72_defconfig" + +UBOOT_ENTRYPOINT = "0x80080000" +UBOOT_LOADADDRESS = "0x80080000" +UBOOT_RD_LOADADDRESS = "0x84000000" +UBOOT_RD_ENTRYPOINT = "0x84000000" +UBOOT_DTB_LOADADDRESS = "0x83000000" +UBOOT_DTBO_LOADADDRESS = "0x83080000" +UBOOT_DTBO_OFFSET = "0x00010000" + +SPL_BINARY = "tispl.bin_HS" +SPL_BINARYNAME = "tispl.bin" +UBOOT_BINARY = "u-boot.img_HS" +IMAGE_BOOT_FILES = "${UBOOT_BINARY}" + +TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}" diff --git a/bsp/meta-ti/conf/machine/omap3evm.conf b/bsp/meta-ti/conf/machine/omap3evm.conf index a7457c04..01808b68 100644 --- a/bsp/meta-ti/conf/machine/omap3evm.conf +++ b/bsp/meta-ti/conf/machine/omap3evm.conf @@ -7,7 +7,7 @@ require conf/machine/include/omap3.inc MACHINE_GUI_CLASS = "smallscreen" MACHINE_FEATURES += "touchscreen ethernet" -IMAGE_FSTYPES += "jffs2 tar.gz" +IMAGE_FSTYPES += "jffs2 tar.xz" EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048" SERIAL_CONSOLES = "115200;ttyS0" diff --git a/bsp/meta-ti/conf/machine/omap5-evm.conf b/bsp/meta-ti/conf/machine/omap5-evm.conf index 28044cb9..b4cec1a2 100644 --- a/bsp/meta-ti/conf/machine/omap5-evm.conf +++ b/bsp/meta-ti/conf/machine/omap5-evm.conf @@ -4,7 +4,7 @@ require conf/machine/include/omap-a15.inc -IMAGE_FSTYPES += "ubi tar.gz" +IMAGE_FSTYPES += "ubi tar.xz" KERNEL_DEVICETREE = "omap5-uevm.dtb" diff --git a/bsp/meta-ti/conf/machine/omapl137-evm.conf b/bsp/meta-ti/conf/machine/omapl137-evm.conf index a8039f31..207b213a 100644 --- a/bsp/meta-ti/conf/machine/omapl137-evm.conf +++ b/bsp/meta-ti/conf/machine/omapl137-evm.conf @@ -6,7 +6,7 @@ require conf/machine/include/davinci.inc require conf/machine/include/omapl137.inc # HACK: The omapl137 family does not have linux kernel support. -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy" EXTRA_IMAGEDEPENDS = "" IMAGE_FSTYPES = "tar.xz" diff --git a/bsp/meta-ti/conf/machine/pandaboard.conf b/bsp/meta-ti/conf/machine/pandaboard.conf index edfc612b..4dd6fa29 100644 --- a/bsp/meta-ti/conf/machine/pandaboard.conf +++ b/bsp/meta-ti/conf/machine/pandaboard.conf @@ -6,7 +6,7 @@ require conf/machine/include/omap4.inc MACHINE_GUI_CLASS = "bigscreen" -IMAGE_FSTYPES += "tar.gz" +IMAGE_FSTYPES += "tar.xz" KERNEL_DEVICETREE = "omap4-panda.dtb omap4-panda-a4.dtb omap4-panda-es.dtb" diff --git a/bsp/meta-ti/conf/multiconfig/k3r5-sr2.conf b/bsp/meta-ti/conf/multiconfig/k3r5-sr2.conf new file mode 100644 index 00000000..17082141 --- /dev/null +++ b/bsp/meta-ti/conf/multiconfig/k3r5-sr2.conf @@ -0,0 +1,3 @@ +require k3r5.conf + +MACHINE_append = "-sr2" diff --git a/bsp/meta-ti/conf/multiconfig/k3r5.conf b/bsp/meta-ti/conf/multiconfig/k3r5.conf new file mode 100644 index 00000000..8c8f0c3f --- /dev/null +++ b/bsp/meta-ti/conf/multiconfig/k3r5.conf @@ -0,0 +1,5 @@ +MAINMACHINE := "${MACHINE}" + +DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MAINMACHINE}" + +MACHINE_append = "-k3r5" diff --git a/bsp/meta-ti/licenses/Hewlett-Packard b/bsp/meta-ti/licenses/Hewlett-Packard new file mode 100644 index 00000000..569d009c --- /dev/null +++ b/bsp/meta-ti/licenses/Hewlett-Packard @@ -0,0 +1,13 @@ +/* + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ diff --git a/bsp/meta-ti/licenses/Patrick-Powell b/bsp/meta-ti/licenses/Patrick-Powell new file mode 100644 index 00000000..9c6eac42 --- /dev/null +++ b/bsp/meta-ti/licenses/Patrick-Powell @@ -0,0 +1,4 @@ +Copyright Patrick Powell 1995 +This code is based on code written by Patrick Powell (papowell@astart.com) +It may be used for any purpose as long as this notice remains intact +on all source code distributions diff --git a/bsp/meta-ti/recipes-bsp/aif2-lld/aif2-lld_git.bb b/bsp/meta-ti/recipes-bsp/aif2-lld/aif2-lld_git.bb index 12b1d06d..4a640f1b 100644 --- a/bsp/meta-ti/recipes-bsp/aif2-lld/aif2-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/aif2-lld/aif2-lld_git.bb @@ -16,3 +16,5 @@ do_install () { oe_runmake install INSTALL_INC_BASE_DIR=${D}/${includedir} INSTALL_LIB_BASE_DIR=${D}${libdir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libaif2.a" diff --git a/bsp/meta-ti/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb b/bsp/meta-ti/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb deleted file mode 100644 index f15570cf..00000000 --- a/bsp/meta-ti/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.2.bb +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY = "ARM Trusted Firmware" -DESCRIPTION = "ARM Trusted Firmware provides a reference implementation of \ -Secure World software for ARMv8-A, including Exception Level 3 (EL3) software. \ -It provides implementations of various ARM interface standards such as the \ -Power State Coordination Interface (PSCI), Trusted Board Boot Requirements \ -(TBBR) and Secure monitor code." -HOMEPAGE = "http://infocenter.arm.com/help/topic/com.arm.doc.dui0928e/CJHIDGJF.html" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" - -inherit deploy - -DEPENDS += "dtc-native openssl-native" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -S = "${WORKDIR}/git" - -PV_append = "+git${SRCPV}" - -BRANCH = "ti-atf" -SRC_URI = "git://git.ti.com/atf/arm-trusted-firmware.git;branch=${BRANCH}" - -SRCREV ?= "e516a389ac12fbe1597f61fea80ed3f230b9c5fd" - -# Make ATF "aware" of OPTEE, no build dependency -PACKAGECONFIG[optee] = "SPD=opteed" - -COMPATIBLE_MACHINE = "k3" -ATFPLATFORM_k3 = "k3" -ATFBOARD_k3 = "generic" - -PACKAGECONFIG_k3 = "optee" - -CFLAGS[unexport] = "1" -LDFLAGS[unexport] = "1" -AS[unexport] = "1" -LD[unexport] = "1" - -do_configure[noexec] = "1" - -EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" PLAT="${ATFPLATFORM}" TARGET_BOARD="${ATFBOARD}" ${PACKAGECONFIG_CONFARGS}' - -do_compile() { - oe_runmake all -} - -do_compile_append_am65xx-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) -} - -do_install() { - install -d ${D}/boot - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31.bin ${D}/boot/ - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31/bl31.elf ${D}/boot/ -} - -do_deploy() { - install -d ${DEPLOYDIR} - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31.bin ${DEPLOYDIR}/ - install -m 0644 ${S}/build/${ATFPLATFORM}/${ATFBOARD}/release/bl31/bl31.elf ${DEPLOYDIR}/ -} -addtask deploy before do_build after do_compile - -FILES_${PN} = "/boot" -SYSROOT_DIRS += "/boot" diff --git a/bsp/meta-ti/recipes-bsp/board-rtos/board-rtos_git.bb b/bsp/meta-ti/recipes-bsp/board-rtos/board-rtos_git.bb index 99530d19..a6547d38 100644 --- a/bsp/meta-ti/recipes-bsp/board-rtos/board-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/board-rtos/board-rtos_git.bb @@ -56,9 +56,8 @@ DEPENDS_append_dra7xx = " pm-lld-rtos \ " DEPENDS_append_am65xx = " sciclient-rtos \ - pm-lld-rtos \ " -DEPENDS_append_j7-evm = " udma-lld-rtos \ +DEPENDS_append_j7 = " udma-lld-rtos \ sciclient-rtos \ mmcsd-lld-rtos \ " diff --git a/bsp/meta-ti/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb b/bsp/meta-ti/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb index 70c28671..6d857f7f 100644 --- a/bsp/meta-ti/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb +++ b/bsp/meta-ti/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb @@ -8,7 +8,7 @@ PR = "r0" CLEANBROKEN = "1" -COMPATIBLE_MACHINE = "j7-evm" +COMPATIBLE_MACHINE = "j7" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-ti/recipes-bsp/cmb-addon/cmb-addon-rtos_git.bb b/bsp/meta-ti/recipes-bsp/cmb-addon/cmb-addon-rtos_git.bb index a10c4862..38f9a43e 100644 --- a/bsp/meta-ti/recipes-bsp/cmb-addon/cmb-addon-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/cmb-addon/cmb-addon-rtos_git.bb @@ -14,11 +14,11 @@ CMB_ADDON_GIT_PROTOCOL = "git" CMB_ADDON_GIT_BRANCH = "master" CMB_ADDON_GIT_DESTSUFFIX = "git/ti/addon" -# Below commit ID corresponds to "DEV.CMB.01.01.00.03" -CMB_ADDON_SRCREV = "4b16dd77eb929708a5134714c3194fc5b5bc1808" +# Below commit ID corresponds to "DEV.CMB.01.01.00.03A" +CMB_ADDON_SRCREV = "3655aad07f17d3a167ec7dcecb52450c1d2fe8be" SRCREV = "${CMB_ADDON_SRCREV}" -PV = "01.01.00.03" +PV = "01.01.00.03A" PR = "r0" BRANCH = "${CMB_ADDON_GIT_BRANCH}" diff --git a/bsp/meta-ti/recipes-bsp/common-csl-ip/common-csl-ip.inc b/bsp/meta-ti/recipes-bsp/common-csl-ip/common-csl-ip.inc index e728dbae..79e15f2d 100644 --- a/bsp/meta-ti/recipes-bsp/common-csl-ip/common-csl-ip.inc +++ b/bsp/meta-ti/recipes-bsp/common-csl-ip/common-csl-ip.inc @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=5857833e20836213677fac33f9aded21" COMPATIBLE_MACHINE = "keystone|dra7xx|ti33x|ti43x|omapl1" -PV = "03.03.00.16B" +PV = "07.00.00.34" INC_PR = "r0" PE = "1" @@ -13,8 +13,8 @@ CSL_GIT_PROTOCOL ="git" CSL_GIT_BRANCH = "release" CSL_GIT_DESTSUFFIX = "git" -# Below commit ID corresponding to "DEV.CSL_PROCESSOR-SDK.03.03.00.16B" -CSL_SRCREV = "8a2d724e8ef850c32a7ba8e12f729ce611171469" +# Below commit ID corresponding to "REL.CORESDK.07.00.00.34" +CSL_SRCREV = "8d59814723070ce9bbc4137912b0aac80482ca8a" BRANCH="${CSL_GIT_BRANCH}" SRC_URI = "${CSL_GIT_URI};protocol=${CSL_GIT_PROTOCOL};branch=${BRANCH};destsuffix=${CSL_GIT_DESTSUFFIX}" diff --git a/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld.inc b/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld.inc index 40810f7f..77eaff25 100644 --- a/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld.inc +++ b/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld.inc @@ -16,4 +16,4 @@ DEVICELIST = "k2h k2k k2l k2e" DEVICELIST_k2hk = "k2h k2k" DEVICELIST_k2l = "k2l" DEVICELIST_k2e = "k2e" - +DEVICELIST_k2g = "k2h" diff --git a/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld_git.bb b/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld_git.bb index 6ac72cfa..3cdcd22d 100644 --- a/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/cppi-lld/cppi-lld_git.bb @@ -30,3 +30,9 @@ do_install () { done ln -sf libcppi_device.so.1 libcppi_device.so } + +INHIBIT_PACKAGE_STRIP_FILES_k2hk = "${PKGD}${libdir}/libcppi_k2h.a ${PKGD}${libdir}/libcppi_k2k.a" +INHIBIT_PACKAGE_STRIP_FILES_k2e = "${PKGD}${libdir}/libcppi_k2e.a" +INHIBIT_PACKAGE_STRIP_FILES_k2l = "${PKGD}${libdir}/libcppi_k2l.a" +INHIBIT_PACKAGE_STRIP_FILES_k2g = "${PKGD}${libdir}/libcppi_k2h.a" +INHIBIT_PACKAGE_STRIP_FILES_append = " ${PKGD}${libdir}/libcppi.a" diff --git a/bsp/meta-ti/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb b/bsp/meta-ti/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb old mode 100644 new mode 100755 index cbd71f2d..37ba52d0 --- a/bsp/meta-ti/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb +++ b/bsp/meta-ti/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb @@ -11,7 +11,7 @@ inherit update-alternatives PROTOCOL = "git" BRANCH = "master" -SRCREV = "4da71504488450f34d65459c1de949da1f984471" +SRCREV = "afe62ada2e91e2665f597ca16eb3888b752016de" SRC_URI = "git://git.ti.com/glsdk/ti-eth-fw.git;protocol=${PROTOCOL};branch=${BRANCH}" diff --git a/bsp/meta-ti/recipes-bsp/dfe-lld/dfe-lld_git.bb b/bsp/meta-ti/recipes-bsp/dfe-lld/dfe-lld_git.bb index 4456cc03..622da6fc 100644 --- a/bsp/meta-ti/recipes-bsp/dfe-lld/dfe-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/dfe-lld/dfe-lld_git.bb @@ -16,3 +16,5 @@ do_install () { oe_runmake install INSTALL_INC_BASE_DIR=${D}/${includedir} INSTALL_LIB_BASE_DIR=${D}${libdir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libdfe.a" diff --git a/bsp/meta-ti/recipes-bsp/dspdce-fw/dspdce-fw_git.bb b/bsp/meta-ti/recipes-bsp/dspdce-fw/dspdce-fw_git.bb index 2756c2d8..6ddbe683 100644 --- a/bsp/meta-ti/recipes-bsp/dspdce-fw/dspdce-fw_git.bb +++ b/bsp/meta-ti/recipes-bsp/dspdce-fw/dspdce-fw_git.bb @@ -1,9 +1,13 @@ -DESCRIPTION = "Firmware for DSP for an example application called copycodectest" +SUMMARY = "Firmware for DSP for an example application called copycodectest" LICENSE = "TI-TSPA" LIC_FILES_CHKSUM = "file://src/ti/framework/dce/dce.c;startline=1;endline=31;md5=2c6e9aba6ed75f22b1a2b7544b1c809d" COMPATIBLE_MACHINE = "dra7xx" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "dsp" + SRC_URI = "git://git.ti.com/glsdk/dspdce.git;protocol=git" SRCREV = "de6e599f067b25c46cc0c8f74a22cc3b8aafbae8" diff --git a/bsp/meta-ti/recipes-bsp/dsptop/libulm_git.bb b/bsp/meta-ti/recipes-bsp/dsptop/libulm_git.bb index 7bf7f090..47248ff1 100644 --- a/bsp/meta-ti/recipes-bsp/dsptop/libulm_git.bb +++ b/bsp/meta-ti/recipes-bsp/dsptop/libulm_git.bb @@ -1,7 +1,11 @@ -DESCRIPTION = "TI dsptop utility." +SUMMARY = "TI Usage & Load Monitor Implementation" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://../debian/copyright;md5=309825aa8f5edfcf2c44912ac094b979" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "dsp" + DEPENDS = "ti-cgt6x-native" PR = "${INC_PR}.0" diff --git a/bsp/meta-ti/recipes-bsp/edma3-lld/edma3-lld.inc b/bsp/meta-ti/recipes-bsp/edma3-lld/edma3-lld.inc index 34d3170f..ea33078d 100644 --- a/bsp/meta-ti/recipes-bsp/edma3-lld/edma3-lld.inc +++ b/bsp/meta-ti/recipes-bsp/edma3-lld/edma3-lld.inc @@ -6,8 +6,7 @@ EDMA3_LLD_GIT_URI = "git://git.ti.com/keystone-rtos/edma3_lld.git" EDMA3_LLD_GIT_PROTOCOL = "git" EDMA3_LLD_GIT_BRANCH = "master" -# Below commit ID corresponds to version 2.12.05.30E -EDMA3_LLD_SRCREV = "ce5ced2ac5eb1e0f1515288d279f5690813b5413" +EDMA3_LLD_SRCREV = "1ac9a3ff6632d5f04403d8789c3f95e0b585f7ae" BRANCH = "${EDMA3_LLD_GIT_BRANCH}" SRC_URI = "${EDMA3_LLD_GIT_URI};protocol=${EDMA3_LLD_GIT_PROTOCOL};branch=${BRANCH}" diff --git a/bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb b/bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb old mode 100755 new mode 100644 index db1f9e1c..6219f0b3 --- a/bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/fvid2/fvid2-rtos_git.bb @@ -28,9 +28,8 @@ export PDK_FVID2_ROOT_PATH = "${FVID2_PACKAGE_BASE}/package/all/pdk_/packages" BOARD_PACKAGE = "" -BOARD_PACKAGE_am65xx-evm = "am65xx_evm" -BOARD_PACKAGE_am65xx-hs-evm = "am65xx_evm" -BOARD_PACKAGE_j7-evm = "j721e_evm" +BOARD_PACKAGE_am65xx = "am65xx_evm" +BOARD_PACKAGE_j7 = "j721e_evm" # HTML doc link params PDK_COMP_LINK_TEXT = "FVID2" diff --git a/bsp/meta-ti/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb b/bsp/meta-ti/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb index 5f005e57..77bb0926 100644 --- a/bsp/meta-ti/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb +++ b/bsp/meta-ti/recipes-bsp/gc320-drivers/ti-gc320-driver_5.0.11.p7.bb @@ -3,15 +3,17 @@ HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-driver" LICENSE = "MIT | GPLv2" LIC_FILES_CHKSUM = "file://../LICENSE;md5=78d9818a51b9a8e9bb89dea418bac297" -inherit module +inherit module features_check -MACHINE_KERNEL_PR_append = "e" +REQUIRED_MACHINE_FEATURES = "gc320" + +MACHINE_KERNEL_PR_append = "h" PR = "${MACHINE_KERNEL_PR}" # Need to branch out with ${PV} var -BRANCH = "ti-${PV}-k4.19" +BRANCH = "ti-${PV}-k5.4" -SRCREV = "9b59e596b4adefabbb686ce8845edef8114558fd" +SRCREV = "2a4fbe8353fa56011a613aeeaf69e274cd07a825" SRC_URI = "git://git.ti.com/graphics/ti-gc320-driver.git;protocol=git;branch=${BRANCH}" diff --git a/bsp/meta-ti/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb b/bsp/meta-ti/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb index 08124d7c..7848df1d 100644 --- a/bsp/meta-ti/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/hyplnk-lld/hyplnk-lld_git.bb @@ -31,3 +31,6 @@ do_install () { done ln -sf libhyplnk_device.so.1 libhyplnk_device.so } + +INHIBIT_PACKAGE_STRIP_FILES_k2hk = "${PKGD}${libdir}/libhyplnk_k2h.a ${PKGD}${libdir}/libhyplnk_k2k.a" +INHIBIT_PACKAGE_STRIP_FILES_k2e = "${PKGD}${libdir}/libhyplnk_k2e.a" diff --git a/bsp/meta-ti/recipes-bsp/i2c-lld/i2c-lld-rtos_git.bb b/bsp/meta-ti/recipes-bsp/i2c-lld/i2c-lld-rtos_git.bb index 1cd1c998..5a3c1d64 100644 --- a/bsp/meta-ti/recipes-bsp/i2c-lld/i2c-lld-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/i2c-lld/i2c-lld-rtos_git.bb @@ -29,7 +29,7 @@ DEPENDS_append_am57xx-evm = " pruss-lld-rtos \ DEPENDS_append_k2g = " pruss-lld-rtos \ " -DEPENDS_append_j7-evm = " sciclient-rtos \ +DEPENDS_append_j7 = " sciclient-rtos \ " # Build with make instead of XDC diff --git a/bsp/meta-ti/recipes-bsp/icss-emac-lld/icss-emac-lld.inc b/bsp/meta-ti/recipes-bsp/icss-emac-lld/icss-emac-lld.inc index db205a99..e315c897 100644 --- a/bsp/meta-ti/recipes-bsp/icss-emac-lld/icss-emac-lld.inc +++ b/bsp/meta-ti/recipes-bsp/icss-emac-lld/icss-emac-lld.inc @@ -12,3 +12,4 @@ PE = "1" INC_PR = "r1" +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libicss_emac.a" diff --git a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-examples-rtos_git.bb b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-examples-rtos_git.bb index fa3ea89d..79e5bdb9 100644 --- a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-examples-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-examples-rtos_git.bb @@ -12,22 +12,29 @@ REMOTE_FWB_BIN_DIR = "${REMOTE_FW_DIR}/ipc_echo_testb/bin" RTOS_ALL_CORES_BIN_DIR = "${REMOTE_FW_DIR}/ex02_bios_multicore_echo_test/bin" RTOS_2_CORES_BIN_DIR = "${REMOTE_FW_DIR}/ex01_bios_2core_echo_test/bin" LINUX_2_CORES_BIN_DIR = "${REMOTE_FW_DIR}/ex03_linux_bios_2core_echo_test/bin" +LINUX_2_CORES_BAREMETAL_BIN_DIR = "${REMOTE_FW_DIR}/ex04_linux_baremetal_2core_echo_test/bin" DST_BIN_PATH = "${base_libdir}/firmware/pdk-ipc" -TI_PDK_LIMIT_BOARDS_j7-evm = "j721e_evm" +TI_PDK_LIMIT_BOARDS_j7 = "j721e_evm" do_configure[noexec] = "1" do_compile() { - cd ${S} + cd "${PDK_INSTALL_PATH}/ti/build" for board in ${TI_PDK_LIMIT_BOARDS} do for core in ${TI_PDK_LIMIT_CORES} do - oe_runmake examples BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ipc_echo_test BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ex02_bios_multicore_echo_test BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ex01_bios_2core_echo_test BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ex03_linux_bios_2core_echo_test BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ex04_linux_baremetal_2core_echo_test BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} + oe_runmake ipc_echo_testb BOARD="$board" CORE="$core" DEST_ROOT=${REMOTE_FW_DIR} done + done } @@ -55,7 +62,7 @@ do_install() { done } -do_install_append_j7-evm() { +do_install_append_j7() { #copy ipc_echo_testb binaries for J721 install -m 0644 ${REMOTE_FWB_BIN_DIR}/$board/ipc_echo_testb_mcu1_0_release.xer5f ${D}${DST_BIN_PATH} install -m 0644 ${REMOTE_FWB_BIN_DIR}/$board/ipc_echo_testb_mcu1_1_release.xer5f ${D}${DST_BIN_PATH} @@ -72,13 +79,16 @@ do_install_append_j7-evm() { install -m 0644 ${REMOTE_FWB_BIN_DIR}/$board/ipc_echo_testb_mcu3_1_release_strip.xer5f ${D}${DST_BIN_PATH} } +do_install_append_am65xx() { + cp ${CP_ARGS} ${REMOTE_FW_DIR}/ex04_linux_baremetal_2core_echo_test/bin -d ${D}/ex04_linux_baremetal_2core_echo_test +} # Set up names for the firmwares ALTERNATIVE_${PN}_am65xx = "\ am65x-mcu-r5f0_0-fw \ am65x-mcu-r5f0_1-fw \ " -ALTERNATIVE_${PN}_j7-evm = "\ +ALTERNATIVE_${PN}_j7 = "\ j7-mcu-r5f0_0-fw \ j7-mcu-r5f0_1-fw \ j7-main-r5f0_0-fw \ @@ -95,15 +105,15 @@ ALTERNATIVE_${PN}_j7-evm = "\ TARGET_MCU_R5FSS0_0_am65xx = "am65x-mcu-r5f0_0-fw" TARGET_MCU_R5FSS0_1_am65xx = "am65x-mcu-r5f0_1-fw" -TARGET_MCU_R5FSS0_0_j7-evm = "j7-mcu-r5f0_0-fw" -TARGET_MCU_R5FSS0_1_j7-evm = "j7-mcu-r5f0_1-fw" -TARGET_MAIN_R5FSS0_0_j7-evm = "j7-main-r5f0_0-fw" -TARGET_MAIN_R5FSS0_1_j7-evm = "j7-main-r5f0_1-fw" -TARGET_MAIN_R5FSS1_0_j7-evm = "j7-main-r5f1_0-fw" -TARGET_MAIN_R5FSS1_1_j7-evm = "j7-main-r5f1_1-fw" -TARGET_C66_0_j7-evm = "j7-c66_0-fw" -TARGET_C66_1_j7-evm = "j7-c66_1-fw" -TARGET_C7X_j7-evm = "j7-c71_0-fw" +TARGET_MCU_R5FSS0_0_j7 = "j7-mcu-r5f0_0-fw" +TARGET_MCU_R5FSS0_1_j7 = "j7-mcu-r5f0_1-fw" +TARGET_MAIN_R5FSS0_0_j7 = "j7-main-r5f0_0-fw" +TARGET_MAIN_R5FSS0_1_j7 = "j7-main-r5f0_1-fw" +TARGET_MAIN_R5FSS1_0_j7 = "j7-main-r5f1_0-fw" +TARGET_MAIN_R5FSS1_1_j7 = "j7-main-r5f1_1-fw" +TARGET_C66_0_j7 = "j7-c66_0-fw" +TARGET_C66_1_j7 = "j7-c66_1-fw" +TARGET_C7X_j7 = "j7-c71_0-fw" ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_0-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_0}" ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_1-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_1}" @@ -144,6 +154,7 @@ FILES_${PN} += "${base_libdir}/firmware" FILES_${PN}-rtos += "ex02_bios_multicore_echo_test" FILES_${PN}-rtos += "ex01_bios_2core_echo_test" FILES_${PN}-rtos += "ex03_linux_bios_2core_echo_test" +FILES_${PN}-rtos += "ex04_linux_baremetal_2core_echo_test" INSANE_SKIP_${PN} = "arch ldflags file-rdeps" INSANE_SKIP_${PN}-rtos = "arch ldflags file-rdeps" diff --git a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-fw_git.bb b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-fw_git.bb index df992762..1be28365 100644 --- a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-fw_git.bb +++ b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld-fw_git.bb @@ -23,7 +23,7 @@ AM65X_R5_FW_DIR = "${S}/examples/echo_test/binaries/am65xx" J721E_R5_DSP_FW_DIR = "${S}/examples/echo_test/binaries/j721e" PLATFORM_am65xx = "am65xx" -PLATFORM_j7-evm = "j7-evm" +PLATFORM_j7 = "j7-evm" # make sure that lib/firmware, and all its contents are part of the package FILES_${PN} += "${base_libdir}/firmware" @@ -40,7 +40,7 @@ do_install_append_am65xx() { install -m 0644 ${AM65X_R5_FW_DIR}/ipc_echo_test_mcu1_1_release.strip.xer5f ${D}${base_libdir}/firmware/pdk-ipc/ } -do_install_append_j7-evm() { +do_install_append_j7() { install -m 0644 ${J721E_R5_DSP_FW_DIR}/ipc_echo_test_mcu1_0_release.xer5f ${D}${base_libdir}/firmware/pdk-ipc/ install -m 0644 ${J721E_R5_DSP_FW_DIR}/ipc_echo_test_mcu1_0_release.strip.xer5f ${D}${base_libdir}/firmware/pdk-ipc/ install -m 0644 ${J721E_R5_DSP_FW_DIR}/ipc_echo_testb_mcu1_0_release.xer5f ${D}${base_libdir}/firmware/pdk-ipc/ @@ -78,7 +78,7 @@ ALTERNATIVE_${PN}_am65xx = "\ am65x-mcu-r5f0_0-fw \ am65x-mcu-r5f0_1-fw \ " -ALTERNATIVE_${PN}_j7-evm = "\ +ALTERNATIVE_${PN}_j7 = "\ j7-mcu-r5f0_0-fw \ j7-mcu-r5f0_1-fw \ j7-main-r5f0_0-fw \ @@ -95,15 +95,15 @@ ALTERNATIVE_${PN}_j7-evm = "\ TARGET_MCU_R5FSS0_0_am65xx = "am65x-mcu-r5f0_0-fw" TARGET_MCU_R5FSS0_1_am65xx = "am65x-mcu-r5f0_1-fw" -TARGET_MCU_R5FSS0_0_j7-evm = "j7-mcu-r5f0_0-fw" -TARGET_MCU_R5FSS0_1_j7-evm = "j7-mcu-r5f0_1-fw" -TARGET_MAIN_R5FSS0_0_j7-evm = "j7-main-r5f0_0-fw" -TARGET_MAIN_R5FSS0_1_j7-evm = "j7-main-r5f0_1-fw" -TARGET_MAIN_R5FSS1_0_j7-evm = "j7-main-r5f1_0-fw" -TARGET_MAIN_R5FSS1_1_j7-evm = "j7-main-r5f1_1-fw" -TARGET_C66_0_j7-evm = "j7-c66_0-fw" -TARGET_C66_1_j7-evm = "j7-c66_1-fw" -TARGET_C7X_j7-evm = "j7-c71_0-fw" +TARGET_MCU_R5FSS0_0_j7 = "j7-mcu-r5f0_0-fw" +TARGET_MCU_R5FSS0_1_j7 = "j7-mcu-r5f0_1-fw" +TARGET_MAIN_R5FSS0_0_j7 = "j7-main-r5f0_0-fw" +TARGET_MAIN_R5FSS0_1_j7 = "j7-main-r5f0_1-fw" +TARGET_MAIN_R5FSS1_0_j7 = "j7-main-r5f1_0-fw" +TARGET_MAIN_R5FSS1_1_j7 = "j7-main-r5f1_1-fw" +TARGET_C66_0_j7 = "j7-c66_0-fw" +TARGET_C66_1_j7 = "j7-c66_1-fw" +TARGET_C7X_j7 = "j7-c71_0-fw" ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_0-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_0}" ALTERNATIVE_LINK_NAME[am65x-mcu-r5f0_1-fw] = "${base_libdir}/firmware/${TARGET_MCU_R5FSS0_1}" @@ -148,7 +148,7 @@ do_deploy_am65xx() { install ${AM65X_R5_FW_DIR}/ipc_echo_test_mcu1_1_release.strip.xer5f ${DEPLOYDIR}/ } -do_deploy_j7-evm() { +do_deploy_j7() { install ${J721E_R5_DSP_FW_DIR}/ipc_echo_test_mcu1_0_release.xer5f ${DEPLOYDIR}/ install ${J721E_R5_DSP_FW_DIR}/ipc_echo_test_mcu1_0_release.strip.xer5f ${DEPLOYDIR}/ install ${J721E_R5_DSP_FW_DIR}/ipc_echo_testb_mcu1_0_release.xer5f ${DEPLOYDIR}/ diff --git a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld.inc b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld.inc index 66bbf321..2aea055f 100644 --- a/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld.inc +++ b/bsp/meta-ti/recipes-bsp/ipc-lld/ipc-lld.inc @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=7eae093f2b09fd39307f30028a068b91" COMPATIBLE_MACHINE = "k3" PACKAGE_ARCH = "${MACHINE_ARCH}" -PR = "r2" +PR = "r4" # Build with make instead of XDC TI_PDK_XDCMAKE = "0" diff --git a/bsp/meta-ti/recipes-bsp/ipumm-fw/files/0001-HACK-ipumm-Workaround-for-linker-error.patch b/bsp/meta-ti/recipes-bsp/ipumm-fw/files/0001-HACK-ipumm-Workaround-for-linker-error.patch new file mode 100644 index 00000000..0bea358f --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/ipumm-fw/files/0001-HACK-ipumm-Workaround-for-linker-error.patch @@ -0,0 +1,48 @@ +From 7226700841c62e6a42690eaa8b3e31b2c329b341 Mon Sep 17 00:00:00 2001 +From: Ramprasad N +Date: Thu, 28 May 2020 09:53:59 +0530 +Subject: [PATCH] HACK: ipumm: Workaround for linker error + +* HACK: ti_sdo_ce_utils_syscbuf_SysCBuf_Module_startup__E is no longer +* defined with latest XDC tools. To temporarily get around the issue +* until the real fix can be made, dummy defination of the missing function +* is added in ipu_main.c + +*IPUMM dependent tool chain components are upgraded to latest version +* BIOS : 6_82_01_17_eng +* XDC : 3_61_00_16_core +* This issue is seen only with xdc tools upgrade. + +Signed-off-by: Angela Stegmaier +Signed-off-by: Ramprasad N +--- + platform/ti/dce/baselib/ipumm_main.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/platform/ti/dce/baselib/ipumm_main.c b/platform/ti/dce/baselib/ipumm_main.c +index 76ccd34..f4ca6e5 100644 +--- a/platform/ti/dce/baselib/ipumm_main.c ++++ b/platform/ti/dce/baselib/ipumm_main.c +@@ -50,6 +50,19 @@ + #include + #include + ++/* ++ * HACK: ti_sdo_ce_utils_syscbuf_SysCBuf_Module_startup__E is no longer ++ * defined with latest XDC tools. To temporarily get around the issue ++ * until the real fix can be made, define the missing function ++ * here. ++ */ ++extern ti_sdo_ce_utils_syscbuf_SysCBuf_Module_startup__F(xdc_Int state); ++ ++/* Module_startup */ ++xdc_Int ti_sdo_ce_utils_syscbuf_SysCBuf_Module_startup__E( xdc_Int state ) ++{ ++ return ti_sdo_ce_utils_syscbuf_SysCBuf_Module_startup__F(state); ++} + + /* Legacy function to allow Linux side rpmsg sample tests to work: */ + extern void start_ping_tasks(); +-- +1.9.1 + diff --git a/bsp/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb b/bsp/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb index 5cb38b05..e53d0a98 100644 --- a/bsp/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb +++ b/bsp/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb @@ -1,28 +1,28 @@ -python __anonymous() { - features = d.getVar("MACHINE_FEATURES") - if not features: - return - if "mmip" not in features: - raise bb.parse.SkipPackage('ipumm-fw does not apply to systems without the "mmip" flag in MACHINE_FEATURES') -} - -DESCRIPTION = "Firmware for IPU for supporting Accelerated MM decode and encode" +SUMMARY = "Firmware for IPU to suppor Accelerated MM decode and encode" LICENSE = "TI-TSPA" LIC_FILES_CHKSUM = "file://Texas_Instruments_ipumm_Manifest.pdf;md5=5cc572579f07af266ab57fc17d762c7f" COMPATIBLE_MACHINE = "dra7xx" -RDEPENDS_${PN} = " libdce" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "mmip" + +RDEPENDS_${PN} = "libdce" SRC_URI = "git://git.ti.com/ivimm/ipumm.git;protocol=git" -SRCREV = "e4872a8966a267d537399b1babc54e5f66ae8b3b" +SRCREV = "df4c50aecc9aad7ab3eb1ca9ebacfe473fcad7c5" + +SRC_URI += " \ + file://0001-HACK-ipumm-Workaround-for-linker-error.patch \ + " S = "${WORKDIR}/git" PV = "3.00.15.00" -PR = "r4" +PR = "r6" require recipes-ti/includes/ti-paths.inc diff --git a/bsp/meta-ti/recipes-bsp/iqn2-lld/iqn2-lld_git.bb b/bsp/meta-ti/recipes-bsp/iqn2-lld/iqn2-lld_git.bb index 169ab6e4..a0c2ef87 100644 --- a/bsp/meta-ti/recipes-bsp/iqn2-lld/iqn2-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/iqn2-lld/iqn2-lld_git.bb @@ -21,3 +21,5 @@ do_install () { oe_runmake install INSTALL_INC_BASE_DIR=${D}/${includedir} INSTALL_LIB_BASE_DIR=${D}${libdir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libiqn2.a" diff --git a/bsp/meta-ti/recipes-bsp/ivshmem-uio/ivshmem-uio-tests_git.bb b/bsp/meta-ti/recipes-bsp/ivshmem-uio/ivshmem-uio-tests_git.bb new file mode 100644 index 00000000..997b8c48 --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/ivshmem-uio/ivshmem-uio-tests_git.bb @@ -0,0 +1,23 @@ +SUMMARY = "UIO tests for IVSHMEM based UIO driver" +DESCRIPTION = "Test programs which use UIO (userspace io) device for inter VM communication" +HOMEPAGE = "https://github.com/henning-schild-work/ivshmem-guest-code" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/COPYING;md5=0546a27aad86c83b75ad4ee6133e9d5e" + +inherit cmake + +PROTOCOL = "git" +BRANCH = "jailhouse" +SRCREV = "f3ad79881bebb6c6068966ee3d265d8034c20492" +SRC_URI = "git://github.com/henning-schild-work/ivshmem-guest-code.git;protocol=${PROTOCOL};branch=${BRANCH}" + +S = "${WORKDIR}/git/uio/tests/Interrupts/VM" + +COMPATIBLE_MACHINE = "(ti-soc)" +OECMAKE_TARGET_COMPILE = "uio_send uio_read" + +do_install() { + install -d ${D}/${bindir} + install -m 755 ${B}/uio_send ${D}/${bindir}/ + install -m 755 ${B}/uio_read ${D}/${bindir}/ +} diff --git a/bsp/meta-ti/recipes-bsp/osal/osal.inc b/bsp/meta-ti/recipes-bsp/osal/osal.inc index 1f0a0778..e2143e13 100644 --- a/bsp/meta-ti/recipes-bsp/osal/osal.inc +++ b/bsp/meta-ti/recipes-bsp/osal/osal.inc @@ -12,3 +12,4 @@ PE = "1" INC_PR = "r0" +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libosal.a" diff --git a/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld.inc b/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld.inc index 83c57e31..e8e07318 100644 --- a/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld.inc +++ b/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld.inc @@ -1,7 +1,7 @@ LICENSE = "BSD-3-Clause & TI-TFL" LIC_FILES_CHKSUM = "file://${WORKDIR}/git/ti/drv/pa/COPYING.txt;md5=cd04fb087063a2a82c4ce61983836871" -COMPATIBLE_MACHINE = "keystone" +COMPATIBLE_MACHINE = "k2hk|k2e|k2l" PACKAGE_ARCH = "${MACHINE_ARCH}" inherit ti-pdk-fetch diff --git a/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld_git.bb b/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld_git.bb index f636ce4a..bbe7aa31 100644 --- a/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/pa-lld/pa-lld_git.bb @@ -22,3 +22,6 @@ do_install () { ln -sf ${LIBPA}.so.1.0.0 ${D}${libdir}/libpa_device.so.1 ln -sf libpa_device.so.1 ${D}${libdir}/libpa_device.so } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libpa2.a" +INHIBIT_PACKAGE_STRIP_FILES_k2hk = "${PKGD}${libdir}/libpa.a" diff --git a/bsp/meta-ti/recipes-bsp/pm-lld/pm-lld-rtos_git.bb b/bsp/meta-ti/recipes-bsp/pm-lld/pm-lld-rtos_git.bb index 5db670e3..25fcb65e 100644 --- a/bsp/meta-ti/recipes-bsp/pm-lld/pm-lld-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/pm-lld/pm-lld-rtos_git.bb @@ -20,8 +20,8 @@ PM_LLD_GIT_BRANCH_k2g = "int_pm_am335x" PM_LLD_GIT_DESTSUFFIX = "git/ti/drv/pm" -# Below commit ID corresponds to "DEV.PM_LLD.01.08.00.23" -PM_LLD_SRCREV = "7c064b93a0ae648441991abb5c71b99d2c209eeb" +# Below commit ID corresponds to "DEV.PM_LLD.01.08.00.23A" +PM_LLD_SRCREV = "59abc6ffb890d24b82de0248d204ad10c1bfc2af" # Below commit ID corresponds to "DEV.PM_LLD.01.04.00.05C" PM_LLD_SRCREV_ti33x = "dd1f8486e7738956631b7f4829c8238be2e49dd6" @@ -32,7 +32,7 @@ BRANCH = "${PM_LLD_GIT_BRANCH}" SRC_URI = "${PM_LLD_GIT_URI};destsuffix=${PM_LLD_GIT_DESTSUFFIX};protocol=${PM_LLD_GIT_PROTOCOL};branch=${BRANCH}" SRCREV = "${PM_LLD_SRCREV}" -PV = "01.08.00.23" +PV = "01.08.00.23A" PR = "r0" S = "${WORKDIR}/${PM_LLD_GIT_DESTSUFFIX}" diff --git a/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.10.5371573.bb b/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.10.5371573.bb index 2f4b7ac5..da4ec6e6 100644 --- a/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.10.5371573.bb +++ b/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.10.5371573.bb @@ -3,26 +3,28 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver" LICENSE = "MIT | GPLv2" LIC_FILES_CHKSUM = "file://README;beginline=15;endline=20;md5=0403c7dea01a2b8232261e805325fac2" -inherit module +inherit module features_check -MACHINE_KERNEL_PR_append = "e" +REQUIRED_MACHINE_FEATURES = "gpu" + +MACHINE_KERNEL_PR_append = "f" PR = "${MACHINE_KERNEL_PR}" PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "j7-evm" +COMPATIBLE_MACHINE = "j7" DEPENDS = "virtual/kernel" PROVIDES = "virtual/gpudriver" -BRANCH = "linuxws/thud/k4.19/${PV}" +BRANCH = "linuxws/zeus/k5.4/${PV}" SRC_URI = "git://git.ti.com/graphics/ti-img-rogue-driver.git;branch=${BRANCH} \ file://0001-km-support-general-toolchain.patch \ " S = "${WORKDIR}/git" -SRCREV = "fe40a51f33987c59aca300f8a976a9a9c8112703" +SRCREV = "e0bc128ee5098e30c9fb096634ba6bec01b5fc17" PVR_SOC = "j721e_linux" PVR_BVNC = "22.104.208.318" @@ -32,5 +34,5 @@ PVR_WS = "wayland" EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" RGX_BVNC=${PVR_BVNC} BUILD=${PVR_BUILD} PVR_BUILD_DIR=${PVR_SOC} WINDOW_SYSTEM=${PVR_WS}' do_install() { - make -C ${STAGING_KERNEL_DIR} SUBDIRS=${B}/binary_${PVR_SOC}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${PVR_SOC}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install } diff --git a/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb index 5c1a50de..734e780e 100644 --- a/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb +++ b/bsp/meta-ti/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb @@ -3,11 +3,13 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux" LICENSE = "MIT | GPLv2" LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12" -inherit module +inherit module features_check -COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3" +REQUIRED_MACHINE_FEATURES = "gpu" -MACHINE_KERNEL_PR_append = "s" +COMPATIBLE_MACHINE = "pandaboard|beagleboard|ti33x|ti43x|omap-a15|k3" + +MACHINE_KERNEL_PR_append = "v" PR = "${MACHINE_KERNEL_PR}" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -16,7 +18,7 @@ DEPENDS = "virtual/kernel" PROVIDES = "virtual/gpudriver" -BRANCH = "ti-img-sgx/${PV}/k4.19" +BRANCH = "ti-img-sgx/${PV}/k5.4" SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-linux.git;protocol=git;branch=${BRANCH} \ file://0001-km-support-OpenEmbedded-hardfp-toolchain-w-o-gnueabi.patch \ @@ -24,12 +26,14 @@ SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-linux.git;protocol=git;branch S = "${WORKDIR}/git" -SRCREV = "4519ed3b83d1d72207ddc2874c7eb5e5a7f20d8d" +SRCREV = "50c1ec2308b9f64488d252ac55d65b51a0dfe287" TARGET_PRODUCT_omap-a15 = "jacinto6evm" TARGET_PRODUCT_ti33x = "ti335x" TARGET_PRODUCT_ti43x = "ti437x" TARGET_PRODUCT_k3 = "ti654x" +TARGET_PRODUCT_beagleboard = "ti343x" +TARGET_PRODUCT_pandaboard = "ti443x" EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" TARGET_PRODUCT=${TARGET_PRODUCT} WINDOW_SYSTEM=nulldrmws' @@ -38,9 +42,9 @@ do_compile_prepend() { } do_install() { - make -C ${STAGING_KERNEL_DIR} SUBDIRS=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_armhf/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_armhf/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install } do_install_k3() { - make -C ${STAGING_KERNEL_DIR} SUBDIRS=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install + make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D} PREFIX=${STAGING_DIR_HOST} modules_install } diff --git a/bsp/meta-ti/recipes-bsp/pru/pru-icss_git.bb b/bsp/meta-ti/recipes-bsp/pru/pru-icss_git.bb index 88d28f37..23097d97 100644 --- a/bsp/meta-ti/recipes-bsp/pru/pru-icss_git.bb +++ b/bsp/meta-ti/recipes-bsp/pru/pru-icss_git.bb @@ -1,17 +1,17 @@ DESCRIPTION = "Programmable Real-time Unit Software Package" HOMEPAGE = "http://processors.wiki.ti.com/index.php/PRU-ICSS" -LICENSE = "BSD-3-Clause & GPL-2.0 & PD" +LICENSE = "BSD-3-Clause & PD" -LIC_FILES_CHKSUM = "file://PRU-Package-v6.0-Manifest.html;md5=ea854230556f47609efdaedca174b44c" +LIC_FILES_CHKSUM = "file://PRU-Package-v6.1-Manifest.html;md5=1e37797ebe9254922f4278bb6047211c" inherit update-alternatives BRANCH = "master" SRC_URI = "git://git.ti.com/pru-software-support-package/pru-software-support-package.git;protocol=git;branch=${BRANCH}" -SRCREV = "ff252a5e174f1b6aa42931744939f20d25d8e070" +SRCREV = "a9bff6f43001cf66dc1ed3ef7e9dfb688b67f7bb" -PV = "5.6.0" -PR = "r1" +PV = "5.7.0" +PR = "r0" require recipes-ti/includes/ti-paths.inc @@ -42,7 +42,7 @@ PLATFORM_ti43x = "am437x" PLATFORM_omap-a15 = "am572x" PLATFORM_k2g = "k2g" PLATFORM_am65xx = "am65x" -PLATFORM_j7-evm = "j721e" +PLATFORM_j7 = "j721e" do_compile() { for dir in ${SUBDIRS} @@ -119,6 +119,8 @@ do_install_append_am65xx() { ${D}/lib/firmware/pru install -m 644 ${S}/examples/${PLATFORM}/RTU_Halt/gen/RTU${i}/RTU_Halt_${i}.out \ ${D}/lib/firmware/pru + install -m 644 ${S}/examples/${PLATFORM}/TX_PRU_Halt/gen/TX_PRU${i}/TX_PRU_Halt_${i}.out \ + ${D}/lib/firmware/pru done for i in 0 1 2 do @@ -133,7 +135,7 @@ do_install_append_am65xx() { done } -do_install_append_j7-evm() { +do_install_append_j7() { for i in 0 1 do install -m 644 ${S}/examples/${PLATFORM}/PRU_Halt/gen/PRU${i}/PRU_Halt_${i}.out \ @@ -166,7 +168,7 @@ PRU_ICSS_ALTERNATIVES_ti43x = "am437x-pru0_0-fw am437x-pru0_1-fw am437x-pru1_ PRU_ICSS_ALTERNATIVES_omap-a15 = "am57xx-pru1_0-fw am57xx-pru1_1-fw am57xx-pru2_0-fw am57xx-pru2_1-fw" PRU_ICSS_ALTERNATIVES_k2g = "k2g-pru0_0-fw k2g-pru0_1-fw k2g-pru1_0-fw k2g-pru1_1-fw" PRU_ICSS_ALTERNATIVES_am65xx = "am65x-pru0_0-fw am65x-pru0_1-fw am65x-pru1_0-fw am65x-pru1_1-fw am65x-pru2_0-fw am65x-pru2_1-fw am65x-rtu0_0-fw am65x-rtu0_1-fw am65x-rtu1_0-fw am65x-rtu1_1-fw am65x-rtu2_0-fw am65x-rtu2_1-fw" -PRU_ICSS_ALTERNATIVES_j7-evm = "j7-pru0_0-fw j7-pru0_1-fw j7-pru1_0-fw j7-pru1_1-fw j7-rtu0_0-fw j7-rtu0_1-fw j7-rtu1_0-fw j7-rtu1_1-fw" +PRU_ICSS_ALTERNATIVES_j7 = "j7-pru0_0-fw j7-pru0_1-fw j7-pru1_0-fw j7-pru1_1-fw j7-rtu0_0-fw j7-rtu0_1-fw j7-rtu1_0-fw j7-rtu1_1-fw" # Set up link names for the firmwares ALTERNATIVE_LINK_NAME[am335x-pru0-fw] = "/lib/firmware/am335x-pru0-fw" @@ -199,6 +201,12 @@ ALTERNATIVE_LINK_NAME[am65x-rtu1_0-fw] = "/lib/firmware/am65x-rtu1_0-fw" ALTERNATIVE_LINK_NAME[am65x-rtu1_1-fw] = "/lib/firmware/am65x-rtu1_1-fw" ALTERNATIVE_LINK_NAME[am65x-rtu2_0-fw] = "/lib/firmware/am65x-rtu2_0-fw" ALTERNATIVE_LINK_NAME[am65x-rtu2_1-fw] = "/lib/firmware/am65x-rtu2_1-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru0_0-fw] = "/lib/firmware/am65x-txpru0_0-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru0_1-fw] = "/lib/firmware/am65x-txpru0_1-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru1_0-fw] = "/lib/firmware/am65x-txpru1_0-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru1_1-fw] = "/lib/firmware/am65x-txpru1_1-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru2_0-fw] = "/lib/firmware/am65x-txpru2_0-fw" +ALTERNATIVE_LINK_NAME[am65x-txpru2_1-fw] = "/lib/firmware/am65x-txpru2_1-fw" ALTERNATIVE_LINK_NAME[j7-pru0_0-fw] = "/lib/firmware/j7-pru0_0-fw" ALTERNATIVE_LINK_NAME[j7-pru0_1-fw] = "/lib/firmware/j7-pru0_1-fw" @@ -217,7 +225,8 @@ ALTERNATIVE_LINK_NAME[j7-txpru1_1-fw] = "/lib/firmware/j7-txpru1_1-fw" ALTERNATIVE_pru-icss-halt = "${PRU_ICSS_ALTERNATIVES}" # Only Halt firmware images are supported for the Tx_PRU cores -ALTERNATIVE_pru-icss-halt_append_j7-evm = " j7-txpru0_0-fw j7-txpru0_1-fw j7-txpru1_0-fw j7-txpru1_1-fw" +ALTERNATIVE_pru-icss-halt_append_am65xx = " am65x-txpru0_0-fw am65x-txpru0_1-fw am65x-txpru1_0-fw am65x-txpru1_1-fw am65x-txpru2_0-fw am65x-txpru2_1-fw" +ALTERNATIVE_pru-icss-halt_append_j7 = " j7-txpru0_0-fw j7-txpru0_1-fw j7-txpru1_0-fw j7-txpru1_1-fw" ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru0-fw] = "/lib/firmware/pru/PRU_Halt.out" ALTERNATIVE_TARGET_pru-icss-halt[am335x-pru1-fw] = "/lib/firmware/pru/PRU_Halt.out" @@ -249,6 +258,12 @@ ALTERNATIVE_TARGET_pru-icss-halt[am65x-rtu1_0-fw] = "/lib/firmware/pru/RTU_Halt_ ALTERNATIVE_TARGET_pru-icss-halt[am65x-rtu1_1-fw] = "/lib/firmware/pru/RTU_Halt_1.out" ALTERNATIVE_TARGET_pru-icss-halt[am65x-rtu2_0-fw] = "/lib/firmware/pru/RTU_Halt_0.out" ALTERNATIVE_TARGET_pru-icss-halt[am65x-rtu2_1-fw] = "/lib/firmware/pru/RTU_Halt_1.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru0_0-fw] = "/lib/firmware/pru/TX_PRU_Halt_0.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru0_1-fw] = "/lib/firmware/pru/TX_PRU_Halt_1.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru1_0-fw] = "/lib/firmware/pru/TX_PRU_Halt_0.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru1_1-fw] = "/lib/firmware/pru/TX_PRU_Halt_1.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru2_0-fw] = "/lib/firmware/pru/TX_PRU_Halt_0.out" +ALTERNATIVE_TARGET_pru-icss-halt[am65x-txpru2_1-fw] = "/lib/firmware/pru/TX_PRU_Halt_1.out" ALTERNATIVE_TARGET_pru-icss-halt[j7-pru0_0-fw] = "/lib/firmware/pru/PRU_Halt_0.out" ALTERNATIVE_TARGET_pru-icss-halt[j7-pru0_1-fw] = "/lib/firmware/pru/PRU_Halt_1.out" diff --git a/bsp/meta-ti/recipes-bsp/prueth-fw/prueth-fw-am65x-sr2_git.bb b/bsp/meta-ti/recipes-bsp/prueth-fw/prueth-fw-am65x-sr2_git.bb new file mode 100644 index 00000000..6e17c4aa --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/prueth-fw/prueth-fw-am65x-sr2_git.bb @@ -0,0 +1,39 @@ +SUMMARY = "PRU Ethernet firmware for AM65xx SR2.0" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76" + +PV = "2.2.0.1+2.2.0.2-rc1" + +CLEANBROKEN = "1" + +COMPATIBLE_MACHINE = "am65xx-evm" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRCREV = "ea4bf53ba0a4a30bb7e0e8b6138fdb22fe50372a" +BRANCH ?= "ti-linux-firmware" + +SRC_URI = "git://git.ti.com/processor-firmware/ti-linux-firmware.git;protocol=git;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +TARGET = " \ + am65x-sr2-pru0-prueth-fw.elf \ + am65x-sr2-pru1-prueth-fw.elf \ + am65x-sr2-rtu0-prueth-fw.elf \ + am65x-sr2-rtu1-prueth-fw.elf \ + am65x-sr2-txpru0-prueth-fw.elf \ + am65x-sr2-txpru1-prueth-fw.elf \ +" + +do_install() { + install -d ${D}${base_libdir}/firmware/ti-pruss + for f in ${TARGET}; do + install -m 0644 ${S}/ti-pruss/$f ${D}${base_libdir}/firmware/ti-pruss/$f + done +} + +FILES_${PN} = "${base_libdir}/firmware" + +INSANE_SKIP_${PN} = "arch" diff --git a/bsp/meta-ti/recipes-bsp/pruss-lld/pruss-lld.inc b/bsp/meta-ti/recipes-bsp/pruss-lld/pruss-lld.inc index 793ba838..fe5987a4 100644 --- a/bsp/meta-ti/recipes-bsp/pruss-lld/pruss-lld.inc +++ b/bsp/meta-ti/recipes-bsp/pruss-lld/pruss-lld.inc @@ -12,3 +12,4 @@ PE = "1" INC_PR = "r0" +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libpruss.a" diff --git a/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld.inc b/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld.inc index 5c9620f9..108383d4 100644 --- a/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld.inc +++ b/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld.inc @@ -16,4 +16,4 @@ DEVICELIST = "k2h k2k k2l k2e" DEVICELIST_k2hk = "k2h k2k" DEVICELIST_k2l = "k2l" DEVICELIST_k2e = "k2e" - +DEVICELIST_k2g = "k2h" diff --git a/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld_git.bb b/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld_git.bb index a87f4905..04f82d98 100644 --- a/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/qmss-lld/qmss-lld_git.bb @@ -30,3 +30,9 @@ do_install () { done ln -sf libqmss_device.so.1 libqmss_device.so } + +INHIBIT_PACKAGE_STRIP_FILES_k2hk = "${PKGD}${libdir}/libqmss_k2h.a ${PKGD}${libdir}/libqmss_k2k.a" +INHIBIT_PACKAGE_STRIP_FILES_k2e = "${PKGD}${libdir}/libqmss_k2e.a" +INHIBIT_PACKAGE_STRIP_FILES_k2l = "${PKGD}${libdir}/libqmss_k2l.a" +INHIBIT_PACKAGE_STRIP_FILES_k2g = "${PKGD}${libdir}/libqmss_k2h.a" +INHIBIT_PACKAGE_STRIP_FILES_append = " ${PKGD}${libdir}/libqmss.a" diff --git a/bsp/meta-ti/recipes-bsp/rm-lld/rm-lld_git.bb b/bsp/meta-ti/recipes-bsp/rm-lld/rm-lld_git.bb index ae79a34c..e2701d04 100644 --- a/bsp/meta-ti/recipes-bsp/rm-lld/rm-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/rm-lld/rm-lld_git.bb @@ -29,3 +29,5 @@ do_install () { make -f makefile_armv7 install installbin installbin_test INSTALL_INC_BASE_DIR=${D}${includedir} INSTALL_LIB_BASE_DIR=${D}${libdir} INSTALL_BIN_BASE_DIR=${D}${bindir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/librm.a" diff --git a/bsp/meta-ti/recipes-bsp/rwmem/rwmem_1.2.bb b/bsp/meta-ti/recipes-bsp/rwmem/rwmem_1.2.bb deleted file mode 100644 index 0545b0cc..00000000 --- a/bsp/meta-ti/recipes-bsp/rwmem/rwmem_1.2.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "A small tool to read/write memory" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS += "python3" - -PV .= "+git${SRCPV}" - -SRCREV_rwmem = "cc296c5366a35a4c4271cfa3cc9831f6f34bfd9d" -SRCREV_inih = "4b10c654051a86556dfdb634c891b6c3224c4109" -SRCREV_pybind11 = "9a19306fbf30642ca331d0ec88e7da54a96860f9" - -SRCREV_FORMAT = "rwmem_inih_pybind11" - -SRC_URI = "git://github.com/tomba/rwmem.git;protocol=https;name=rwmem \ - git://github.com/benhoyt/inih.git;protocol=https;name=inih;nobranch=1;destsuffix=git/ext/inih \ - git://github.com/pybind/pybind11.git;protocol=https;name=pybind11;nobranch=1;destsuffix=git/ext/pybind11 \ - " - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -do_install() { - install -D -m 0755 ${B}/bin/rwmem ${D}${bindir}/rwmem - install -D -m 0644 ${B}/lib/librwmem.a ${D}${libdir}/librwmem.a -} diff --git a/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld.inc b/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld.inc index 4eaa0f80..d4993cb9 100644 --- a/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld.inc +++ b/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld.inc @@ -1,5 +1,5 @@ LICENSE = "BSD-3-Clause & TI-TFL" -COMPATIBLE_MACHINE = "keystone" +COMPATIBLE_MACHINE = "k2hk|k2e|k2l" LIC_FILES_CHKSUM = "file://${WORKDIR}/git/ti/drv/sa/COPYING.txt;md5=cd04fb087063a2a82c4ce61983836871" @@ -8,14 +8,14 @@ SA_LLD_GIT_PROTOCOL = "git" SA_LLD_GIT_BRANCH = "master" SA_LLD_GIT_DESTSUFFIX = "git/ti/drv/sa" -# Below commit ID corresponding to "DEV.SA_LLD.04.00.00.03B" -SA_LLD_SRCREV = "ac85eea98ccb73fa00006afca8ae03536e933134" +# Below commit ID corresponding to "DEV.SA_LLD.04.00.00.03D" +SA_LLD_SRCREV = "506491b586c13c90f307b527df5eaacd35af6d02" BRANCH = "${SA_LLD_GIT_BRANCH}" SRC_URI = "${SA_LLD_GIT_URI};destsuffix=${SA_LLD_GIT_DESTSUFFIX};protocol=${SA_LLD_GIT_PROTOCOL};branch=${BRANCH}" SRCREV = "${SA_LLD_SRCREV}" -PV = "04.00.00.03B" +PV = "04.00.00.03D" INC_PR = "r0" S = "${WORKDIR}/${SA_LLD_GIT_DESTSUFFIX}" diff --git a/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld_git.bb b/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld_git.bb index df41c653..a45fe1f7 100644 --- a/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld_git.bb +++ b/bsp/meta-ti/recipes-bsp/sa-lld/sa-lld_git.bb @@ -22,3 +22,5 @@ do_install () { ln -sf libsa.so.1.0.0 ${D}${libdir}/libsa_device.so.1 ln -sf libsa_device.so.1 ${D}${libdir}/libsa_device.so } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libsa.a" diff --git a/bsp/meta-ti/recipes-bsp/sciclient/sciclient-rtos_git.bb b/bsp/meta-ti/recipes-bsp/sciclient/sciclient-rtos_git.bb index d14c4a12..deaf0b12 100644 --- a/bsp/meta-ti/recipes-bsp/sciclient/sciclient-rtos_git.bb +++ b/bsp/meta-ti/recipes-bsp/sciclient/sciclient-rtos_git.bb @@ -7,12 +7,12 @@ TI_PDK_COMP = "ti.drv.sciclient" PE = "1" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://sciclient.h;beginline=1;endline=31;md5=7224b2eeca1444815f1737bfcdfa892a" +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=99d7639a81c1ba1f16fd070a928ffddb" COMPATIBLE_MACHINE = "k3" PACKAGE_ARCH = "${MACHINE_ARCH}" -PR = "r0" +PR = "r1" DEPENDS_append = " osal-rtos common-csl-ip-rtos openssl-native" @@ -25,6 +25,11 @@ SCICLIENT_ROOTPATH = "${SCICLIENT_PACKAGE_BASE}/package/all/pdk_/packages/ti/drv export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages" export PDK_SCICLIENT_ROOT_PATH = "${SCICLIENT_PACKAGE_BASE}/package/all/pdk_/packages" +BUILD_HS = "" +BUILD_HS_am65xx-hs-evm = "yes" +BUILD_HS_j7-hs-evm = "yes" +export BUILD_HS + # Sciclient for am65x supports mcu1_1 in addition to the default cores in TI_PDK_LIMIT_CORES TI_PDK_LIMIT_CORES_append_am65xx = " mcu1_1" @@ -95,6 +100,14 @@ do_compile_prepend_j7-evm() { cd - } +do_compile_prepend_j7-hs-evm() { + + cd ${SCICLIENT_ROOTPATH}/tools + # Create the .bin file for HS + ${SCICLIENT_ROOTPATH}/tools/firmwareHeaderGen.sh j721e-hs ${PDK_INSTALL_DIR}/packages + cd - +} + do_install() { cd ${SCICLIENT_ROOTPATH} install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/drv/sciclient @@ -106,6 +119,7 @@ FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages" INSANE_SKIP_${PN} = "arch ldflags file-rdeps" INSANE_SKIP_${PN}-dbg = "arch" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" INHIBIT_PACKAGE_STRIP = "1" INHIBIT_SYSROOT_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/bsp/meta-ti/recipes-bsp/starterware/starterware.inc b/bsp/meta-ti/recipes-bsp/starterware/starterware.inc index ae098211..82b012ad 100644 --- a/bsp/meta-ti/recipes-bsp/starterware/starterware.inc +++ b/bsp/meta-ti/recipes-bsp/starterware/starterware.inc @@ -8,14 +8,14 @@ STARTERWARE_GIT_URI = "git://git.ti.com/keystone-rtos/starterware.git" STARTERWARE_GIT_PROTOCOL = "git" STARTERWARE_GIT_BRANCH = "master" -# Below commit ID corresponds to "DEV.STARTERWARE.PROCSDK.02.01.01.12" -STARTERWARE_SRCREV = "7f418b7471ca11ba4c6d91b4a7eb992a1dd55d7d" +# Below commit ID corresponds to "DEV.STARTERWARE.PROCSDK.02.01.01.12A" +STARTERWARE_SRCREV = "49a4d4cd4c72bacee738d44b8e72e7f59aa948cd" BRANCH = "${STARTERWARE_GIT_BRANCH}" SRC_URI = "${STARTERWARE_GIT_URI};protocol=${STARTERWARE_GIT_PROTOCOL};branch=${BRANCH}" SRCREV = "${STARTERWARE_SRCREV}" -PV = "02.01.01.12" +PV = "02.01.01.12A" INC_PR = "r0" S = "${WORKDIR}/git" diff --git a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/ti-img-encode-decode_1.0.0.bb b/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/ti-img-encode-decode_1.0.0.bb deleted file mode 100644 index a1da9585..00000000 --- a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/ti-img-encode-decode_1.0.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Kernel drivers for the IMG VXE384 MP2 and D5520 encoder/decoder found in TI SoCs" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://driver/common/dq.c;beginline=1;endline=16;md5=e015e28ff5e88576dab9fdf641e3dbfe" - -inherit module - -MACHINE_KERNEL_PR_append = "g" -PR = "${MACHINE_KERNEL_PR}" - -COMPATIBLE_MACHINE = "j7-evm" - -SRCREV = "0eba3678300f649e49f03d92d1b624cf0e008008" - -EXTRA_OEMAKE = "KPATH=${STAGING_KERNEL_DIR} KCONF=${STAGING_KERNEL_BUILDDIR}" -TARGET_CC_ARCH += "${LDFLAGS}" - -BRANCH = "master" -SRC_URI = "git://git.ti.com/jacinto7_multimedia/ti-img-encode-decode.git;protocol=git;branch=${BRANCH}" - -S = "${WORKDIR}/git" - -do_compile() { - oe_runmake all -C ${S}/linux/decoder - oe_runmake all -C ${S}/linux/encoder -} - -do_install() { - install -d ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra - install -m 644 ${S}/linux/decoder/vxd-dec.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra - install -m 644 ${S}/linux/encoder/vxe-enc.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra -} diff --git a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb b/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb deleted file mode 100644 index 48a17537..00000000 --- a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/viddec-test-app_1.0.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Test applications for TI DEC (v4l2 decoder for IMG D5520)" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://main.c;beginline=1;endline=14;md5=f17e17d664f72942124e4fcf06c178ee" - -DEPENDS = "libdrm ffmpeg" - -inherit autotools pkgconfig - -PR = "r1" -SRCREV = "94a80c8c090dbfdc7fafd4e5bb78c2091e715af2" - -EXTRA_OEMAKE = "CC="${CC}"" -TARGET_CC_ARCH += "${LDFLAGS}" - -BRANCH = "master" -SRC_URI = "git://git.ti.com/jacinto7_multimedia/viddec-test-app.git;protocol=git;branch=${BRANCH}" - -S = "${WORKDIR}/git" diff --git a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb b/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb deleted file mode 100644 index 3bb5d745..00000000 --- a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/videnc-test-app_1.0.0.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Test applications for TI ENC (v4l2 encoder for IMG VXE384)" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://main.c;beginline=1;endline=14;md5=3545dd5bdf513840937d38c10b866605" - -DEPENDS = "libdrm" - -inherit autotools pkgconfig - -PR = "r0" -SRCREV = "a5e7d820bea1be24f25a8369d4d4521c784f869a" - -EXTRA_OEMAKE = "CC="${CC}"" -TARGET_CC_ARCH += "${LDFLAGS}" - -BRANCH = "master" -SRC_URI = "git://git.ti.com/jacinto7_multimedia/videnc-test-app.git;protocol=git;branch=${BRANCH}" - -S = "${WORKDIR}/git" diff --git a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb b/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb deleted file mode 100644 index 2812fa2c..00000000 --- a/bsp/meta-ti/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Video Decoding Firmware Packaging recipe" -LICENSE = "TI-TFL" -LIC_FILES_CHKSUM = "file://LICENSE;md5=84ca7278930db001870686ad997d6bb1" - -BRANCH = "master" -SRCREV = "0acbf1d0a7c7eaca0ef14c1a30ce313ea82147e5" - -SRC_URI = "git://git.ti.com/jacinto7_multimedia/ti-img-encode-decode.git;protocol=git;branch=${BRANCH}" - -S = "${WORKDIR}/git" - -PV = "1.0-git${SRCPV}" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -VXD_FW_DIR = "${S}/decoder/firmware/" - -# make sure that lib/firmware, and all its contents are part of the package -FILES_${PN} += "${base_libdir}/firmware" - -do_install() { - install -d ${D}${base_libdir}/firmware - install -m 0755 ${VXD_FW_DIR}/pvdec_full_bin.fw ${D}${base_libdir}/firmware -} - -# This is used to prevent the build system to strip the executables -INHIBIT_PACKAGE_STRIP = "1" -# This is used to prevent the build system to split the debug info in a separate file -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -# As it likely to be a different arch from the Yocto build, disable checking by adding "arch" to INSANE_SKIP -INSANE_SKIP_${PN} += "arch" - -# we don't want to configure and build the source code -do_compile[noexec] = "1" -do_configure[noexec] = "1" diff --git a/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw-source_2020.04a.bb b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw-source_2020.04a.bb new file mode 100644 index 00000000..becf893e --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw-source_2020.04a.bb @@ -0,0 +1,45 @@ +# ti-sci-fw builds and packages multiple config variants via multiconfig +# Let's take a page from gcc-source as a common recipe for all gcc stages, +# but also to provide a single package for MAINMACHINE of all multiconfigs + +require recipes-bsp/ti-sci-fw/ti-sci-fw_${PV}.inc + +SUMMARY += "- sources" + +COMPATIBLE_MACHINE = "k3" + +EXCLUDE_FROM_WORLD = "1" +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "" + +PACKAGES = "${PN}" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +SRCIPK_SRC_DIR = "${WORKDIR}/imggen" +SRCIPK_INSTALL_DIR = "board-support/k3-image-gen-${PV}" +FILES_${PN} = "${SRCIPK_INSTALL_DIR}" + +do_install() { + # Copy sources for packaging + mkdir -p ${D}/${SRCIPK_INSTALL_DIR} + if [ -e ${SRCIPK_SRC_DIR} ]; then + if [ "${SRCIPK_SRC_DIR}" = "${WORKDIR}" ]; then + excludes='--exclude ./temp --exclude ${D}' + fi + tar -C ${SRCIPK_SRC_DIR} -cO $excludes . | tar -C ${D}/${SRCIPK_INSTALL_DIR} -xpf - + fi + + # Fix up patches/ directory to contain actual patches instead of symlinks + if [ -e ${D}/${SRCIPK_INSTALL_DIR}/patches ] + then + mv ${D}/${SRCIPK_INSTALL_DIR}/patches ${D}/${SRCIPK_INSTALL_DIR}/patches-links + cp -rL ${D}/${SRCIPK_INSTALL_DIR}/patches-links ${D}/${SRCIPK_INSTALL_DIR}/patches + rm -rf ${D}/${SRCIPK_INSTALL_DIR}/patches-links + fi +} + +# Do not perform any QA checks on source package +INSANE_SKIP_${PN} += "${ALL_QA}" diff --git a/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.bb b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.bb new file mode 100644 index 00000000..b5588265 --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.bb @@ -0,0 +1,79 @@ +require recipes-bsp/ti-sci-fw/ti-sci-fw_${PV}.inc + +DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" + +CLEANBROKEN = "1" +PR = "r1" + +# Loaded by R5F core +COMPATIBLE_MACHINE = "k3r5" +COMPATIBLE_MACHINE_aarch64 = "null" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +TI_SECURE_DEV_PKG ?= "" +export TI_SECURE_DEV_PKG + +SYSFW_SOC ?= "unknown" +SYSFW_CONFIG ?= "unknown" + +SYSFW_PREFIX = "ti-sci-firmware" +SYSFW_SUFFIX ?= "unknown" + +SYSFW_BASE = "${SYSFW_PREFIX}-${SYSFW_SOC}-${SYSFW_SUFFIX}" + +SYSFW_TISCI = "${S}/ti-sysfw/${SYSFW_BASE}*.bin" + +SYSFW_BINARY = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" +SYSFW_VBINARY = "sysfw-${PV}-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" +SYSFW_IMAGE = "sysfw-${SYSFW_SOC}-${SYSFW_CONFIG}.itb" +SYSFW_SYMLINK ?= "sysfw.itb" + +CFLAGS[unexport] = "1" +LDFLAGS[unexport] = "1" +AS[unexport] = "1" +LD[unexport] = "1" + +do_configure[noexec] = "1" + +EXTRA_OEMAKE = "\ + CROSS_COMPILE=${TARGET_PREFIX} SYSFW_DL_URL='' SYSFW_HS_DL_URL='' SYSFW_HS_INNER_CERT_DL_URL='' \ + SYSFW_PATH="${SYSFW_TISCI}" SOC=${SYSFW_SOC} CONFIG=${SYSFW_CONFIG} \ +" +EXTRA_OEMAKE_HS = " \ + HS=1 SYSFW_HS_PATH="${S}/ti-sysfw/${SYSFW_BASE}-enc.bin" SYSFW_HS_INNER_CERT_PATH="${S}/ti-sysfw/${SYSFW_BASE}-cert.bin" \ +" +EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" + +do_compile() { + cd ${WORKDIR}/imggen/ + oe_runmake +} + +do_install() { + install -d ${D}/boot + install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY} + ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE} + if [ ! -z "${SYSFW_SYMLINK}" ]; then + ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK} + fi +} + +FILES_${PN} = "/boot" + +inherit deploy + +do_deploy () { + install -d ${DEPLOYDIR} + install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY} + rm -f ${DEPLOYDIR}/${SYSFW_IMAGE} + ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE} + if [ ! -z "${SYSFW_SYMLINK}" ]; then + rm -f ${DEPLOYDIR}/${SYSFW_SYMLINK} + ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK} + fi + + install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/ +} + +addtask deploy before do_build after do_compile diff --git a/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.inc b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.inc new file mode 100644 index 00000000..e785ce01 --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/ti-sci-fw/ti-sci-fw_2020.04a.inc @@ -0,0 +1,16 @@ +SUMMARY = "TI SCI firmware (SYSFW)" + +LICENSE = "TI-TFL" +LIC_FILES_CHKSUM = "file://LICENSE.ti;md5=b5aebf0668bdf95621259288c4a46d76" + +SRCREV = "c8decf64be551dfd1244cd1d231a97eb2255fb80" +BRANCH ?= "ti-linux-firmware" +SRCREV_imggen = "d9a550b91ec95d06a80f2ccc6dd829815ba35d88" +SRCREV_FORMAT = "imggen" + +SRC_URI = " \ + git://git.ti.com/processor-firmware/ti-linux-firmware.git;protocol=git;branch=${BRANCH} \ + git://git.ti.com/k3-image-gen/k3-image-gen.git;protocol=git;branch=master;destsuffix=imggen;name=imggen \ +" + +S = "${WORKDIR}/git" diff --git a/bsp/meta-ti/recipes-bsp/traceframework/traceframework_git.bb b/bsp/meta-ti/recipes-bsp/traceframework/traceframework_git.bb index 2b2020b8..26eb81a0 100644 --- a/bsp/meta-ti/recipes-bsp/traceframework/traceframework_git.bb +++ b/bsp/meta-ti/recipes-bsp/traceframework/traceframework_git.bb @@ -36,3 +36,5 @@ PACKAGES =+ "${PN}-test" FILES_${PN}-test = "${bindir}/tfw*.out \ ${bindir}/*.txt" + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libtraceframework.a" diff --git a/bsp/meta-ti/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/bsp/meta-ti/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend new file mode 100644 index 00000000..2dc715c8 --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -0,0 +1,23 @@ +BRANCH_k3 = "ti-atf" +SRC_URI_k3 = "git://git.ti.com/atf/arm-trusted-firmware.git;branch=${BRANCH};name=tfa" +SRCREV_tfa_k3 = "5b907a2813faf039d752cdeb6a7b94e95580c46b" +COMPATIBLE_MACHINE_k3 = "k3" +TFA_BUILD_TARGET_k3 = "all" +TFA_INSTALL_TARGET_k3 = "bl31" +TFA_SPD_k3 = "opteed" + +do_compile_append_am65xx-hs-evm() { + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ( cd ${B}/${BUILD_DIR}/release/; \ + mv bl31.bin bl31.bin.unsigned; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + ) +} + +do_compile_append_j7-hs-evm() { + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ( cd ${B}/${BUILD_DIR}/release/; \ + mv bl31.bin bl31.bin.unsigned; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + ) +} diff --git a/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2019.01.bb b/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2019.01.bb deleted file mode 100644 index 472f5698..00000000 --- a/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2019.01.bb +++ /dev/null @@ -1,7 +0,0 @@ -require u-boot-ti.inc - -PR = "r32" - -BRANCH = "ti-u-boot-2019.01" - -SRCREV = "350f3927b89bc06ce1c9ddb618280d298c418b94" diff --git a/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2020.01.bb b/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2020.01.bb new file mode 100644 index 00000000..6ea97ac9 --- /dev/null +++ b/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2020.01.bb @@ -0,0 +1,7 @@ +require u-boot-ti.inc + +PR = "r12" + +BRANCH = "ti-u-boot-2020.01" + +SRCREV = "f9b0d030d31ab79577f1dd1e48814a8f3119c481" diff --git a/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti.inc b/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti.inc index f1187e64..062a692a 100644 --- a/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti.inc +++ b/bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti.inc @@ -13,6 +13,7 @@ UBOOT_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}" UBOOT_SUFFIX ?= "img" SPL_BINARY ?= "MLO" +require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot-common.inc require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:" @@ -32,11 +33,12 @@ PV_append = "+git${SRCPV}" # u-boot needs devtree compiler to parse dts files DEPENDS += "dtc-native bc-native lzop-native flex-native bison-native" -PACKAGECONFIG[atf] = "ATF=${STAGING_DIR_HOST}/boot/bl31.bin,,arm-trusted-firmware" +PACKAGECONFIG[atf] = "ATF=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a" PACKAGECONFIG[optee] = "TEE=${STAGING_DIR_HOST}/boot/bl32.bin,,optee-os" -# optee-os is not a direct dependency, do not enable optee by default -PACKAGECONFIG_append_k3 = " atf" +PACKAGECONFIG_append_aarch64 = " atf optee" + +COMPATIBLE_MACHINE = "(ti-soc)" EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" @@ -55,6 +57,7 @@ export TI_SECURE_DEV_PKG SPL_UART_BINARY = "u-boot-spl.bin" SPL_UART_BINARY_keystone = "" SPL_UART_BINARY_k3 = "" +SPL_UART_BINARY_k3r5 = "" SPL_UART_BINARY_lego-ev3 = "" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" @@ -256,6 +259,13 @@ do_deploy_append () { ln -sf ${UBOOT_HS_2ND_IMAGE} ${UBOOT_HS_2ND_BINARY} fi fi + + rm ${DEPLOYDIR}/u-boot-initial-env || true + rm ${DEPLOYDIR}/${PN}-initial-env || true + rm ${DEPLOYDIR}/u-boot-initial-env-${MACHINE} || true + rm ${DEPLOYDIR}/${PN}-initial-env-${MACHINE} || true + rm ${DEPLOYDIR}/u-boot-initial-env-${MACHINE}-${PV}-${PR} || true + rm ${DEPLOYDIR}/${PN}-initial-env-${MACHINE}-${PV}-${PR} || true } do_install_append_keystone () { diff --git a/bsp/meta-ti/recipes-bsp/vis-fw/vis_01.50.07.15.bb b/bsp/meta-ti/recipes-bsp/vis-fw/vis_01.50.07.15.bb index 5b9834c2..6eaf8de7 100644 --- a/bsp/meta-ti/recipes-bsp/vis-fw/vis_01.50.07.15.bb +++ b/bsp/meta-ti/recipes-bsp/vis-fw/vis_01.50.07.15.bb @@ -2,12 +2,12 @@ DESCRIPTION = "Radio Application Firmware" LICENSE = "TI-TSPA" LIC_FILES_CHKSUM = "file://${S}/J6_VIS_DEMO_LINUX_BINARY_01.50.07.15-Manifest.html;md5=a59aa54b9470f555cf086b91dca0afa3" -COMPATIBLE_MACHINE = "dra7xx-evm" +COMPATIBLE_MACHINE = "dra7xx" PACKAGE_ARCH = "${MACHINE_ARCH}" PR = "r1" -SRC_URI = "http://downloads.ti.com/dsps/dsps_public_sw/glsdk/vis/01_50_07_15/exports/vis-${MACHINE}-01.50.07.15.tar.gz;protocol=http" +SRC_URI = "http://downloads.ti.com/dsps/dsps_public_sw/glsdk/vis/01_50_07_15/exports/vis-dra7xx-evm-01.50.07.15.tar.gz;protocol=http" SRC_URI[md5sum] = "fe8b00e398fb3b7ada0c15b601867acb" SRC_URI[sha256sum] = "6e2aa47ae892910616ebdc96646af778af9a59ca0657716ab4fa4b24a9afae69" diff --git a/bsp/meta-ti/recipes-bsp/x-load/signgp.bb b/bsp/meta-ti/recipes-bsp/x-load/signgp.bb index 9c3499f6..479e6f81 100644 --- a/bsp/meta-ti/recipes-bsp/x-load/signgp.bb +++ b/bsp/meta-ti/recipes-bsp/x-load/signgp.bb @@ -1,4 +1,4 @@ -LICENSE = "NewBSD" +LICENSE = "BSD-3-Clause" DESCRIPTION = "Tool to sign omap3 x-loader images" LIC_FILES_CHKSUM = "file://signGP.c;md5=960f484fea13941ca88821366f9dade0" diff --git a/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x/0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch b/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x/0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch new file mode 100644 index 00000000..1cc23b32 --- /dev/null +++ b/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x/0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch @@ -0,0 +1,28 @@ +From 0aa294e2bbd37a42266e59cb67687e57bfba4a88 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sat, 15 Feb 2020 15:59:37 -0500 +Subject: [PATCH] libbfd.h: suppress GCC9 -Wstringop-truncation + +Signed-off-by: Denys Dmytriyenko +--- + gdbc6x/bfd/libbfd.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gdbc6x/bfd/libbfd.h b/gdbc6x/bfd/libbfd.h +index 72d3c50..3465f89 100644 +--- a/gdbc6x/bfd/libbfd.h ++++ b/gdbc6x/bfd/libbfd.h +@@ -34,6 +34,10 @@ + #pragma GCC diagnostic ignored "-Wcast-function-type" + #endif + ++#if __GNUC__ >= 9 ++#pragma GCC diagnostic ignored "-Wstringop-truncation" ++#endif ++ + #include "hashtab.h" + + /* Align an address upward to a boundary, expressed as a number of bytes. +-- +2.7.4 + diff --git a/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x_git.bb b/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x_git.bb index 8ab9cf90..2d2f6c1d 100644 --- a/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x_git.bb +++ b/bsp/meta-ti/recipes-devtools/gdbc6x/gdbc6x_git.bb @@ -11,6 +11,7 @@ PR = "${INC_PR}.1" SRC_URI_append = " \ file://init \ + file://0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch;striplevel=2 \ " S = "${WORKDIR}/git/gdbc6x" diff --git a/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-CMakeLists.txt-disable-phys-addr-for-now.patch b/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-CMakeLists.txt-disable-phys-addr-for-now.patch deleted file mode 100644 index 7cf5895c..00000000 --- a/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-CMakeLists.txt-disable-phys-addr-for-now.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 85264fc72a261d20107a50ea2fad0258900a132b Mon Sep 17 00:00:00 2001 -From: Denys Dmytriyenko -Date: Sat, 20 Apr 2019 16:54:03 +0000 -Subject: [PATCH] CMakeLists.txt: disable phys-addr for now - -Signed-off-by: Denys Dmytriyenko ---- - CMakeLists.txt | 13 ------------- - 1 file changed, 13 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1d60003..eca6ba7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -54,16 +54,3 @@ target_link_libraries(ion-print-heaps - target_include_directories(ion-print-heaps PUBLIC ${LIBION_INCLUDE_DIRS}) - - install(TARGETS ion-print-heaps RUNTIME DESTINATION bin) -- --# phys-addr -- --add_executable(phys-addr -- src/phys-addr.c --) -- --target_link_libraries(phys-addr -- ${LIBION_LIBRARIES} --) --target_include_directories(phys-addr PUBLIC ${LIBION_INCLUDE_DIRS}) -- --install(TARGETS phys-addr RUNTIME DESTINATION bin) --- -2.17.1 - diff --git a/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-map_test-Replace-PAGE_SIZE-with-local-variable-name.patch b/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-map_test-Replace-PAGE_SIZE-with-local-variable-name.patch deleted file mode 100644 index 8915c642..00000000 --- a/bsp/meta-ti/recipes-devtools/ion/ion-tests/0001-map_test-Replace-PAGE_SIZE-with-local-variable-name.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f045cbf9aae0053e9e785e32b772e473aa892443 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 6 Oct 2019 16:08:36 -0700 -Subject: [PATCH] map_test: Replace PAGE_SIZE with local variable name - -PAGE_SIZE is already a define in libc implementations global namespace -e.g. in musl. Therefore its best to use a unique variable name to not -stamp on the global definition. - -Fixes -src/map_test.cpp:59:23: error: expected unqualified-id -unsigned long PAGE_SIZE = sysconf(_SC_PAGESIZE); -^ -/usr/include/limits.h:89:19: note: expanded from macro 'PAGE_SIZE' -^ -/usr/include/bits/limits.h:3:18: note: expanded from macro 'PAGESIZE' -^ - -Upstream-Status: Submitted [https://github.com/glneo/ion-tests/pull/1] - -Signed-off-by: Khem Raj ---- - src/map_test.cpp | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/map_test.cpp b/src/map_test.cpp -index a7ce2c9..7b5746d 100644 ---- a/src/map_test.cpp -+++ b/src/map_test.cpp -@@ -56,27 +56,27 @@ TEST_F(Map, MapOffset) - SCOPED_TRACE(::testing::Message() << "heap " << heapMask); - int map_fd = -1; - -- unsigned long PAGE_SIZE = sysconf(_SC_PAGESIZE); -+ unsigned long psize = sysconf(_SC_PAGESIZE); - -- ASSERT_EQ(0, ion_alloc(m_ionFd, PAGE_SIZE * 2, heapMask, 0, &map_fd)); -+ ASSERT_EQ(0, ion_alloc(m_ionFd, psize * 2, heapMask, 0, &map_fd)); - ASSERT_GE(map_fd, 0); - - unsigned char *ptr; -- ptr = (unsigned char *)mmap(NULL, PAGE_SIZE * 2, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); -+ ptr = (unsigned char *)mmap(NULL, psize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); - ASSERT_TRUE(ptr != NULL); - -- memset(ptr, 0, PAGE_SIZE); -- memset(ptr + PAGE_SIZE, 0xaa, PAGE_SIZE); -+ memset(ptr, 0, psize); -+ memset(ptr + psize, 0xaa, psize); - -- ASSERT_EQ(0, munmap(ptr, PAGE_SIZE * 2)); -+ ASSERT_EQ(0, munmap(ptr, psize * 2)); - -- ptr = (unsigned char *)mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, PAGE_SIZE); -+ ptr = (unsigned char *)mmap(NULL, psize, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, psize); - ASSERT_TRUE(ptr != NULL); - - ASSERT_EQ(ptr[0], 0xaa); -- ASSERT_EQ(ptr[PAGE_SIZE - 1], 0xaa); -+ ASSERT_EQ(ptr[psize - 1], 0xaa); - -- ASSERT_EQ(0, munmap(ptr, PAGE_SIZE)); -+ ASSERT_EQ(0, munmap(ptr, psize)); - - ASSERT_EQ(0, close(map_fd)); - } --- -2.23.0 - diff --git a/bsp/meta-ti/recipes-devtools/ion/ion-tests_git.bb b/bsp/meta-ti/recipes-devtools/ion/ion-tests_git.bb deleted file mode 100644 index 52346f1c..00000000 --- a/bsp/meta-ti/recipes-devtools/ion/ion-tests_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Test cases for ION" -HOMEPAGE = "https://github.com/glneo/ion-tests" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://src/ion_test.c;beginline=1;endline=15;md5=b225db900869a4cd31461606e55a3ec5" - -PV = "1.0" - -BRANCH = "master" -SRC_URI = "git://github.com/glneo/ion-tests.git;protocol=git;branch=${BRANCH} \ - file://0001-CMakeLists.txt-disable-phys-addr-for-now.patch \ - file://0001-map_test-Replace-PAGE_SIZE-with-local-variable-name.patch \ -" -SRCREV = "70d730cebca29e6fd37b21d9beac82ae645f3900" - -DEPENDS = "libion gtest" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig diff --git a/bsp/meta-ti/recipes-devtools/k3conf/k3conf_git.bb b/bsp/meta-ti/recipes-devtools/k3conf/k3conf_git.bb new file mode 100644 index 00000000..52c2fcf6 --- /dev/null +++ b/bsp/meta-ti/recipes-devtools/k3conf/k3conf_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "Diagnostic tool for TI K3 processors" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=37f4e460bd8501c6f02ce71f02bc7ccf" + +PV = "0.1+git${SRCPV}" + +COMPATIBLE_MACHINE = "k3" + +BRANCH ?= "master" +SRCREV = "9199c3a3b6ec5603a2c4283410b4761e79e81e82" + +SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +do_compile () { + oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all +} + +do_install () { + install -d ${D}${bindir} + install ${S}/k3conf ${D}${bindir} +} diff --git a/bsp/meta-ti/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb b/bsp/meta-ti/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb index e8c2f011..55758682 100644 --- a/bsp/meta-ti/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb +++ b/bsp/meta-ti/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb @@ -3,7 +3,11 @@ HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-libs" LICENSE = "TI-TSPA" LIC_FILES_CHKSUM = "file://Manifest.html;md5=a9121e8936ace09820d23f7626daaca5" -COMPATIBLE_MACHINE = "dra7xx" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "gc320" + +COMPATIBLE_MACHINE = "omap-a15" CLEANBROKEN = "1" @@ -12,6 +16,8 @@ BRANCH = "ti-${PV}" SRC_URI = "git://git.ti.com/graphics/ti-gc320-libs.git;protocol=git;branch=${BRANCH}" SRCREV = "c0afab259de59909cfe74c01f3f7fbaa147f94b5" +RRECOMMENDS_${PN} = "ti-gc320-driver" + # There's only hardfp version available python __anonymous() { tunes = d.getVar("TUNE_FEATURES") diff --git a/bsp/meta-ti/recipes-graphics/libgles/ti-img-rogue-umlibs_1.10.5371573.bb b/bsp/meta-ti/recipes-graphics/libgles/ti-img-rogue-umlibs_1.10.5371573.bb index 9cb863a5..edb4b753 100644 --- a/bsp/meta-ti/recipes-graphics/libgles/ti-img-rogue-umlibs_1.10.5371573.bb +++ b/bsp/meta-ti/recipes-graphics/libgles/ti-img-rogue-umlibs_1.10.5371573.bb @@ -3,15 +3,19 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs" LICENSE = "TI-TFL" LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "gpu" + PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "j7-evm" +COMPATIBLE_MACHINE = "j7" -PR = "r5" +PR = "r8" -BRANCH = "linuxws/thud/k4.19/${PV}" +BRANCH = "linuxws/zeus/k5.4/${PV}" SRC_URI = "git://git.ti.com/graphics/ti-img-rogue-umlibs.git;branch=${BRANCH}" -SRCREV = "0721cdfc1fc86f40c93745159e3f1bcad5beda17" +SRCREV = "6b4d8e538566bbaf6b9c4a24dbecd740d58c1871" PVR_SOC ?= "j721e_linux" PVR_BUILD ?= "release" @@ -26,8 +30,7 @@ PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" DEPENDS += "libdrm wayland expat" RDEPENDS_${PN} += "bash" -RDEPENDS_${PN} += "python-core" -RDEPENDS_${PN} += "ti-img-rogue-driver wayland expat" +RDEPENDS_${PN} += "wayland expat" RPROVIDES_${PN} = "libegl libgles1 libgles2 libgbm" RPROVIDES_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" @@ -41,6 +44,8 @@ RCONFLICTS_${PN} = "libegl libgles1 libgles2 libgbm" RCONFLICTS_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" RCONFLICTS_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg" +RRECOMMENDS_${PN} += "ti-img-rogue-driver" + S = "${WORKDIR}/git" do_install () { diff --git a/bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb index ecf3ffcc..6639ec5c 100644 --- a/bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb +++ b/bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb @@ -3,20 +3,26 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux" LICENSE = "TI-TSPA" LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8" +inherit features_check + +REQUIRED_MACHINE_FEATURES = "gpu" + PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3" +COMPATIBLE_MACHINE = "pandaboard|beagleboard|ti33x|ti43x|omap-a15|k3" -PR = "r34" +PR = "r35" -BRANCH = "ti-img-sgx/thud/${PV}" +BRANCH = "ti-img-sgx/zeus/${PV}" SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git;protocol=git;branch=${BRANCH}" -SRCREV = "2a2e5bb090ced870d73ed4edbc54793e952cc6d8" +SRCREV = "ce7b96b88d31da27af5b3a2a890aba180a014fc4" TARGET_PRODUCT_omap-a15 = "jacinto6evm" TARGET_PRODUCT_ti33x = "ti335x" TARGET_PRODUCT_ti43x = "ti437x" TARGET_PRODUCT_k3 = "ti654x" +TARGET_PRODUCT_beagleboard = "ti343x" +TARGET_PRODUCT_pandaboard = "ti443x" INITSCRIPT_NAME = "rc.pvr" INITSCRIPT_PARAMS = "defaults 8" @@ -43,6 +49,8 @@ RCONFLICTS_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg" # The actual SONAME is libGLESv2.so.2, so need to explicitly specify RPROVIDES for .so.1 here RPROVIDES_${PN} += "libGLESv2.so.1" +RRECOMMENDS_${PN} += "ti-sgx-ddk-km" + S = "${WORKDIR}/git" do_install () { @@ -59,14 +67,7 @@ FILES_${PN} += " ${libdir}/*" FILES_${PN} += "${includedir}/*" FILES_${PN} += "${sysconfdir}/*" -PACKAGES =+ "${PN}-plugins" -FILES_${PN}-plugins = "${libdir}/libsrv_init.so ${libdir}/libsrv_um.so ${libdir}/libglslcompiler.so ${libdir}/libPVRScopeServices.so ${libdir}/libGLESv2.so ${libdir}/libEGL.so ${libdir}/libGLESv1_CM.so ${libdir}/libGLES_CM.so ${libdir}/libGLESv1_PVR_MESA.so ${libdir}/libGLESv2_PVR_MESA.so" -RDEPENDS_${PN} += "${PN}-plugins" - -ALLOW_EMPTY_${PN}-plugins = "1" - INSANE_SKIP_${PN} += "dev-so ldflags useless-rpaths" -INSANE_SKIP_${PN}-plugins = "dev-so" -INSANE_SKIP_${PN} += "already-stripped" +INSANE_SKIP_${PN} += "already-stripped dev-deps" CLEANBROKEN = "1" diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/files/0001-omapfbplay-switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch b/bsp/meta-ti/recipes-graphics/omapfbplay/files/0001-omapfbplay-switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch deleted file mode 100644 index e01fddbf..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/files/0001-omapfbplay-switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 71670f4a067efc169018a9ec9321ccc9af3bbd59 Mon Sep 17 00:00:00 2001 -From: Roger Monk -Date: Thu, 10 May 2012 14:50:11 +0100 -Subject: [PATCH] omapfbplay: switch CODEC_TYPE_VIDEO to AVMEDIA_TYPE_VIDEO - -Signed-off-by: Roger Monk ---- - omapfbplay.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/omapfbplay.c b/omapfbplay.c -index ad35bd5..818cf2c 100644 ---- a/omapfbplay.c -+++ b/omapfbplay.c -@@ -74,7 +74,7 @@ find_stream(AVFormatContext *afc) - int i; - - for (i = 0; i < afc->nb_streams; i++) { -- if (afc->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO && !st) -+ if (afc->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO && !st) - st = afc->streams[i]; - else - afc->streams[i]->discard = AVDISCARD_ALL; --- -1.7.0.4 - diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/files/omapfbplay-errorhandling.patch b/bsp/meta-ti/recipes-graphics/omapfbplay/files/omapfbplay-errorhandling.patch deleted file mode 100644 index 7dd544f8..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/files/omapfbplay-errorhandling.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e321ae7df57ada9ecc8c155fa4e5511c96ef5db3 Mon Sep 17 00:00:00 2001 -From: Rob Clark -Date: Fri, 18 Mar 2011 12:40:51 -0500 -Subject: [PATCH] dce: differentiate between fatal and non-fatal errors - -For streams with errors, the codec will throw back an error. But not -all errors are fatal. ---- - dce.c | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/dce.c b/dce.c -index ab7ad0a..88f175e 100644 ---- a/dce.c -+++ b/dce.c -@@ -270,8 +270,14 @@ static int dce_decode(AVPacket *p) - - err = VIDDEC3_process(codec, inbufs, outbufs, in_args, out_args); - if (err) { -- fprintf(stderr, "VIDDEC3_process() error %d\n", err); -- return -1; -+ fprintf(stderr, "VIDDEC3_process() error %d %08x\n", err, -+ out_args->extendedError); -+ /* for non-fatal errors, keep going.. a non-fatal error could -+ * just indicate an error in the input stream which the codec -+ * was able to conceal -+ */ -+ if (XDM_ISFATALERROR(out_args->extendedError)) -+ return -1; - } - - for (i = 0; i < out_args->outputID[i]; i++) { --- -1.7.1 diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-cmem_git.bb b/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-cmem_git.bb deleted file mode 100644 index a0392f6c..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-cmem_git.bb +++ /dev/null @@ -1,16 +0,0 @@ -require omapfbplay.inc - -DEPENDS += "ti-linuxutils" - -require recipes-ti/includes/ti-paths.inc - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SDMA_CFLAGS = " -I${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/sdma/include/" -CMEM_CFLAGS = " -I${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/cmem/include/" -CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include ${SDMA_CFLAGS} ${CMEM_CFLAGS}" - -export SDMA_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/sdma/lib -l:sdma.a470MV" -export CMEM_LIBS = "-L${LINUXUTILS_INSTALL_DIR}/packages/ti/sdo/linuxutils/cmem/lib -l:cmem.a470MV" - -OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y CMEM=y SDMA=y" diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-dce_git.bb b/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-dce_git.bb deleted file mode 100644 index e70ac729..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-dce_git.bb +++ /dev/null @@ -1,7 +0,0 @@ -require omapfbplay.inc - -DEPENDS += "libdce" - -CFLAGS += " -I. -I${STAGING_INCDIR}/dce -I${STAGING_KERNEL_DIR}/include " - -OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y DCE=y" diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-xv_git.bb b/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-xv_git.bb deleted file mode 100644 index cadf6d8e..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay-xv_git.bb +++ /dev/null @@ -1,3 +0,0 @@ -require omapfbplay.inc - -OMAPFBPLAYOPTS = "V4L2=y NETSYNC=y XV=y" diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay.inc b/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay.inc deleted file mode 100644 index 744eb8f7..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay.inc +++ /dev/null @@ -1,37 +0,0 @@ -DESCRIPTION = "Simple libav-based player that uses the omapfb overlays" -DEPENDS = "bzip2 lame libav virtual/kernel" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://omapfbplay.c;beginline=2;endline=22;md5=05d3789ab362e6f4a9682e98100ea0fa" - -PV = "0.0+${PR}+gitr${SRCREV}" - -SRCREV = "34293052c5a2ae328eac6903512e6b4ce19b5639" -SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \ - file://omapfbplay-errorhandling.patch \ - file://0001-omapfbplay-switch-CODEC_TYPE_VIDEO-to-AVMEDIA_TYPE_V.patch \ - " - -S = "${WORKDIR}/git" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_HOST ?= "null" -COMPATIBLE_HOST_ti-soc = "(.*)" - -# We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that -STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel" -CFLAGS += " -I. -I${STAGING_KERNEL_DIR}/include " - -OMAPFBPLAYVARIANT ?= "${PN}" -OMAPFBPLAYOPTS ?= "V4L2=y NETSYNC=y" - -do_compile() { - cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S} || true - cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S} || true - cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S} || true - oe_runmake ${TARGET_ARCH}=y ${OMAPFBPLAYOPTS} -e -} - -do_install() { - install -d ${D}/${bindir} - install -m 0755 ${S}/omapfbplay ${D}/${bindir}/${OMAPFBPLAYVARIANT} -} diff --git a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay_git.bb b/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay_git.bb deleted file mode 100644 index 0d3956f1..00000000 --- a/bsp/meta-ti/recipes-graphics/omapfbplay/omapfbplay_git.bb +++ /dev/null @@ -1,3 +0,0 @@ -require omapfbplay.inc - -OMAPFBPLAYOPTS = "V4L2=y OMAPFB=y NETSYNC=y" diff --git a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap3/xorg.conf b/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap3/xorg.conf deleted file mode 100644 index 983bb082..00000000 --- a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap3/xorg.conf +++ /dev/null @@ -1,29 +0,0 @@ -Section "Module" - Load "extmod" - Load "dbe" - Load "glx" - Load "freetype" - Load "type1" - Load "record" - Load "dri" -EndSection - -Section "Monitor" - Identifier "Builtin Default Monitor" -EndSection - -Section "Device" - Identifier "Builtin Default fbdev Device 0" - Driver "omapfb" -EndSection - -Section "Screen" - Identifier "Builtin Default fbdev Screen 0" - Device "Builtin Default fbdev Device 0" - Monitor "Builtin Default Monitor" -EndSection - -Section "ServerLayout" - Identifier "Builtin Default Layout" - Screen "Builtin Default fbdev Screen 0" -EndSection diff --git a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap4/xorg.conf b/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap4/xorg.conf deleted file mode 100644 index 87ded4dd..00000000 --- a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omap4/xorg.conf +++ /dev/null @@ -1,15 +0,0 @@ -# more /usr/share/X11/xorg.conf.d/99-omap.conf -# X.Org X server configuration file - -Section "Device" - Identifier "Video Device" - Driver "omap" - Option "Debug" "false" - Option "HWcursor" "false" -EndSection - -Section "Screen" - Identifier "Screen" - Monitor "Monitor" - Device "Video Device" -EndSection diff --git a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omapl138/xorg.conf b/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omapl138/xorg.conf deleted file mode 100644 index 0d6ab435..00000000 --- a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/omapl138/xorg.conf +++ /dev/null @@ -1,29 +0,0 @@ -Section "Module" - Load "extmod" - Load "dbe" - Load "glx" - Load "freetype" - Load "type1" - Load "record" - Load "dri" -EndSection - -Section "Monitor" - Identifier "Builtin Default Monitor" -EndSection - -Section "Device" - Identifier "Builtin Default fbdev Device 0" - Driver "fbdev" -EndSection - -Section "Screen" - Identifier "Builtin Default fbdev Screen 0" - Device "Builtin Default fbdev Device 0" - Monitor "Builtin Default Monitor" -EndSection - -Section "ServerLayout" - Identifier "Builtin Default Layout" - Screen "Builtin Default fbdev Screen 0" -EndSection diff --git a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/ti33x/xorg.conf b/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/ti33x/xorg.conf deleted file mode 100644 index 0d6ab435..00000000 --- a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config/ti33x/xorg.conf +++ /dev/null @@ -1,29 +0,0 @@ -Section "Module" - Load "extmod" - Load "dbe" - Load "glx" - Load "freetype" - Load "type1" - Load "record" - Load "dri" -EndSection - -Section "Monitor" - Identifier "Builtin Default Monitor" -EndSection - -Section "Device" - Identifier "Builtin Default fbdev Device 0" - Driver "fbdev" -EndSection - -Section "Screen" - Identifier "Builtin Default fbdev Screen 0" - Device "Builtin Default fbdev Device 0" - Monitor "Builtin Default Monitor" -EndSection - -Section "ServerLayout" - Identifier "Builtin Default Layout" - Screen "Builtin Default fbdev Screen 0" -EndSection diff --git a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend deleted file mode 100644 index 72d991c7..00000000 --- a/bsp/meta-ti/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch b/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch new file mode 100644 index 00000000..f4922363 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch @@ -0,0 +1,56 @@ +From 24e58c75592a2ba09f3062c8a4722c0e29a9b558 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Wed, 1 Apr 2020 15:44:46 -0400 +Subject: [PATCH] tools: update shebang in helper scripts for python3 + +Signed-off-by: Denys Dmytriyenko +--- + tools/jailhouse-cell-linux | 2 +- + tools/jailhouse-cell-stats | 2 +- + tools/jailhouse-config-create | 2 +- + tools/jailhouse-hardware-check | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux +index 007a5c4..e106b9d 100755 +--- a/tools/jailhouse-cell-linux ++++ b/tools/jailhouse-cell-linux +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats +index 2f7e966..4c5289f 100755 +--- a/tools/jailhouse-cell-stats ++++ b/tools/jailhouse-cell-stats +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create +index 1e2df74..9382b05 100755 +--- a/tools/jailhouse-config-create ++++ b/tools/jailhouse-config-create +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check +index 375816e..658ce6f 100755 +--- a/tools/jailhouse-hardware-check ++++ b/tools/jailhouse-hardware-check +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +-- +2.7.4 + diff --git a/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse_git.bb b/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse_git.bb index 4186dc3a..46447af6 100644 --- a/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/bsp/meta-ti/recipes-kernel/jailhouse/jailhouse_git.bb @@ -10,26 +10,27 @@ LIC_FILES_CHKSUM = " \ file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ " -PV = "0.10+git${SRCPV}" -SRCREV = "b3a68ac89d7ed955546eae91954b184ec1583ce3" -BRANCH = "ti-jailhouse-0.10" +PV = "0.12+git${SRCPV}" +SRCREV = "8fd88c37ae1a4f7130ef40899c0eadd737c64832" +BRANCH = "ti-jailhouse-0.12" SRC_URI = " \ git://git.ti.com/jailhouse/ti-jailhouse.git;protocol=git;branch=${BRANCH} \ + file://0001-tools-update-shebang-in-helper-scripts-for-python3.patch \ " -DEPENDS = "virtual/kernel dtc-native python-mako-native python-mako make-native" +DEPENDS = "virtual/kernel dtc-native python3-mako-native python3-mako make-native" RDEPENDS_${PN} += "\ - python-curses\ - python-datetime\ - python-argparse\ - python-mmap\ + python3-curses\ + python3-datetime\ + python3-mmap\ " -S = "${WORKDIR}/git" - require jailhouse-arch.inc -inherit module pythonnative bash-completion deploy setuptools +inherit module python3native bash-completion deploy setuptools3 + +S = "${WORKDIR}/git" +B = "${S}" PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_MACHINE = "(ti-soc)" @@ -40,37 +41,33 @@ CELL_DIR ?= "${JH_DATADIR}/cells" CELLCONF_DIR ?= "${JH_DATADIR}/configs" INMATES_DIR ?= "${JH_DATADIR}/inmates" -JH_CONFIG ?= "${S}/ci/jailhouse-config-x86.h" -JH_CONFIG_k3 ?= "${S}/ci/jailhouse-config-k3.h" - JH_CELL_FILES ?= "*.cell" JH_CELL_FILES_k3 ?= "k3-*.cell" JH_INMATE_DTB ?= "" JH_INMATE_DTB_am65xx ?= "inmate-k3-am654-idk.dtb" -JH_INMATE_DTB_j7-evm ?= "inmate-k3-j721e-evm.dtb" +JH_INMATE_DTB_j7 ?= "inmate-k3-j721e-evm.dtb" JH_LINUX_DEMO_CELL ?= "" JH_LINUX_DEMO_CELL_am65xx ?= "k3-am654-idk-linux-demo.cell" -JH_LINUX_DEMO_CELL_j7-evm ?= "k3-j721e-evm-linux-demo.cell" +JH_LINUX_DEMO_CELL_j7 ?= "k3-j721e-evm-linux-demo.cell" JH_SYSCONFIG_CELL ?= "" JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell" -JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell" +JH_SYSCONFIG_CELL_j7 ?= "k3-j721e-evm.cell" INITRAMFS_IMAGE ?= "" JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}" JH_CMDLINE ?= "" -JH_CMDLINE_k3 ?= "console=ttyS1,115200n8" +JH_CMDLINE_am65xx ?= "console=ttyS1,115200n8" +JH_CMDLINE_j7 ?= "console=ttyS3,115200n8" do_configure() { if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; then cp ${STAGING_DIR_HOST}/${CELLCONF_DIR}/*.c ${S}/configs/ fi - - cp -av ${JH_CONFIG} ${S}/include/jailhouse/config.h } USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ @@ -88,12 +85,12 @@ do_compile() { do_install() { # Install pyjailhouse python modules needed by the tools - distutils_do_install + distutils3_do_install # We want to install the python tools, but we do not want to use pip... # At least with v0.10, we can work around this with # 'PIP=":" PYTHON_PIP_USEABLE=yes' - oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install + oe_runmake PIP=: PYTHON=python3 PYTHON_PIP_USEABLE=yes DESTDIR=${D} install install -d ${D}${CELL_DIR} install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/ @@ -141,8 +138,8 @@ FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /b FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*" -RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression" -RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell" +RDEPENDS_${PN}-tools = "pyjailhouse python3-mmap python3-math python3-datetime python3-curses python3-compression" +RDEPENDS_pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell" RRECOMMENDS_${PN} = "${PN}-tools" diff --git a/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb b/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb index 96263875..f478e56d 100644 --- a/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb +++ b/bsp/meta-ti/recipes-kernel/kselftests/kselftests_4.10.bb @@ -185,3 +185,6 @@ INSANE_SKIP_${PN}-exec = "ldflags" INSANE_SKIP_${PN}-ipc = "ldflags" INSANE_SKIP_${PN}-mount = "ldflags" INSANE_SKIP_${PN}-vm = "ldflags" + +COMPATIBLE_MACHINE_riscv64 = "(null)" +COMPATIBLE_MACHINE_riscv32 = "(null)" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig deleted file mode 100644 index d083d182..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_omap2_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig deleted file mode 100644 index dcb53bab..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/dra7xx/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_dra7x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig deleted file mode 100644 index 316b04bb..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k2g/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_k2g_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig deleted file mode 100644 index b9bc6137..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/k3/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_arm64_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig deleted file mode 100644 index 5a40b93d..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/keystone/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_keystone_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig deleted file mode 100644 index b3467853..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/omapl138/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_omapl138_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig deleted file mode 100644 index 88f80fa9..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti33x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am3x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig deleted file mode 100644 index 4b9daaf9..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-4.19/ti43x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am4x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/defconfig new file mode 100644 index 00000000..d083d182 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/dra7xx/defconfig new file mode 100644 index 00000000..dcb53bab --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k2g/defconfig new file mode 100644 index 00000000..316b04bb --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k3/defconfig new file mode 100644 index 00000000..b9bc6137 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/keystone/defconfig new file mode 100644 index 00000000..5a40b93d --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/omapl138/defconfig new file mode 100644 index 00000000..b3467853 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/omapl138/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omapl138_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti33x/defconfig new file mode 100644 index 00000000..88f80fa9 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti43x/defconfig new file mode 100644 index 00000000..4b9daaf9 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-5.4/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig deleted file mode 100644 index f0b8bab0..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_omap2_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig deleted file mode 100644 index 47e3d04a..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/dra7xx/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_dra7x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig deleted file mode 100644 index a9c24f2e..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k2g/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_k2g_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig deleted file mode 100644 index cc10bfda..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/k3/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_arm64_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig deleted file mode 100644 index fc68085f..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/keystone/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_keystone_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig deleted file mode 100644 index 0a4fbac2..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti33x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am3x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig deleted file mode 100644 index 99594c81..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-4.19/ti43x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am4x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/defconfig new file mode 100644 index 00000000..f0b8bab0 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/dra7xx/defconfig new file mode 100644 index 00000000..47e3d04a --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k2g/defconfig new file mode 100644 index 00000000..a9c24f2e --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k3/defconfig new file mode 100644 index 00000000..cc10bfda --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/keystone/defconfig new file mode 100644 index 00000000..fc68085f --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti33x/defconfig new file mode 100644 index 00000000..0a4fbac2 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti43x/defconfig new file mode 100644 index 00000000..99594c81 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt-5.4/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_rt_release diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb deleted file mode 100644 index 5c56b286..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_4.19.bb +++ /dev/null @@ -1,10 +0,0 @@ -require linux-ti-staging_4.19.bb - -# Look in the generic major.minor directory for files -# This will have priority over generic non-rt path -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" - -BRANCH = "ti-rt-linux-4.19.y" - -SRCREV = "69c51d6d57c150155bea8dd032bd8ce7835cf234" -PV = "4.19.94+git${SRCPV}" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_5.4.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_5.4.bb new file mode 100644 index 00000000..6c53ec95 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-rt_5.4.bb @@ -0,0 +1,10 @@ +require linux-ti-staging_5.4.bb + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.4:" + +BRANCH = "ti-rt-linux-5.4.y" + +SRCREV = "17e2c5c658e9bcdf7566c9e7f70b1f0a8c9f7036" +PV = "5.4.43+git${SRCPV}" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig deleted file mode 100644 index 5d051bd1..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_omap2_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig deleted file mode 100644 index 2b3635c3..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/dra7xx/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_dra7x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig deleted file mode 100644 index abfb3309..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k2g/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_k2g_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig deleted file mode 100644 index 56cf9302..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/k3/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_arm64_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig deleted file mode 100644 index e95bcf95..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/keystone/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_keystone_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig deleted file mode 100644 index 95b61168..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/omapl138/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_omapl138_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig deleted file mode 100644 index 9ab6733c..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti33x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am3x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig deleted file mode 100644 index 825c31cd..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-4.19/ti43x/defconfig +++ /dev/null @@ -1 +0,0 @@ -use-tisdk-config=ti_sdk_am4x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/defconfig new file mode 100644 index 00000000..5d051bd1 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omap2_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/dra7xx/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/dra7xx/defconfig new file mode 100644 index 00000000..2b3635c3 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/dra7xx/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_dra7x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k2g/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k2g/defconfig new file mode 100644 index 00000000..abfb3309 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k2g/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_k2g_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k3/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k3/defconfig new file mode 100644 index 00000000..56cf9302 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/k3/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_arm64_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/keystone/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/keystone/defconfig new file mode 100644 index 00000000..e95bcf95 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/keystone/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_keystone_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/omapl138/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/omapl138/defconfig new file mode 100644 index 00000000..95b61168 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/omapl138/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_omapl138_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti33x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti33x/defconfig new file mode 100644 index 00000000..9ab6733c --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti33x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am3x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti43x/defconfig b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti43x/defconfig new file mode 100644 index 00000000..825c31cd --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest-5.4/ti43x/defconfig @@ -0,0 +1 @@ +use-tisdk-config=ti_sdk_am4x_debug diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb deleted file mode 100644 index 6f02f1a7..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_4.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -require linux-ti-staging_4.19.bb - -# Look in the generic major.minor directory for files -# This will have priority over generic non-rt path -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_5.4.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_5.4.bb new file mode 100644 index 00000000..a2404574 --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging-systest_5.4.bb @@ -0,0 +1,5 @@ +require linux-ti-staging_5.4.bb + +# Look in the generic major.minor directory for files +# This will have priority over generic non-rt path +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.4:" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb deleted file mode 100644 index ab9653e1..00000000 --- a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_4.19.bb +++ /dev/null @@ -1,81 +0,0 @@ -SECTION = "kernel" -DESCRIPTION = "Linux kernel for TI devices" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -inherit kernel - -require recipes-kernel/linux/setup-defconfig.inc -require recipes-kernel/linux/cmem.inc -require recipes-kernel/linux/ti-uio.inc -require recipes-kernel/linux/bundle-devicetree.inc - -# Look in the generic major.minor directory for files -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.19:" - -# Pull in the devicetree files into the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree" - -# Add run-time dependency for PM firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti33x = " amx3-cm3" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti43x = " amx3-cm3" - -# Add run-time dependency for VPE VPDMA firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " vpdma-fw" - -# Add run-time dependency for Goodix firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " goodix-fw" - -# Install boot-monitor skern file into /boot dir of rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " boot-monitor" - -# Install ti-sci-fw into /boot dir of rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " ti-sci-fw" - -# Add run-time dependency for SerDes firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " serdes-fw" - -# Add run-time dependency for QMSS PDSP firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " qmss-pdsp-fw" - -# Add run-time dependency for NETCP PA firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2hk = " netcp-pa-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2e = " netcp-pa-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2l = " netcp-pa-fw" - -# Add run-time dependency for PRU Ethernet firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am57xx-evm = " prueth-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am57xx-hs-evm = " prueth-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti43x = " prueth-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti33x = " prueth-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " prueth-fw" -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am65xx = " prueth-fw-am65x" - -# Add run-time dependency for Cadence MHDP firmware to the rootfs -RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_j7-evm = " cadence-mhdp-fw" - -KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" - -S = "${WORKDIR}/git" - -BRANCH = "ti-linux-4.19.y" - -SRCREV = "5a23bc00e08d26bb83952953d909c95b42fab70c" -PV = "4.19.94+git${SRCPV}" - -# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild -MACHINE_KERNEL_PR_append = "a" -PR = "${MACHINE_KERNEL_PR}" - -KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" -KERNEL_GIT_PROTOCOL = "git" -SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ - file://defconfig" - -FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" - -# Special configuration for remoteproc/rpmsg IPC modules -module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" -module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" -module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" -KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" diff --git a/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_5.4.bb b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_5.4.bb new file mode 100644 index 00000000..bfcc7f5b --- /dev/null +++ b/bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_5.4.bb @@ -0,0 +1,83 @@ +SECTION = "kernel" +DESCRIPTION = "Linux kernel for TI devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +inherit kernel + +require recipes-kernel/linux/setup-defconfig.inc +require recipes-kernel/linux/cmem.inc +require recipes-kernel/linux/ti-uio.inc +require recipes-kernel/linux/bundle-devicetree.inc + +# Look in the generic major.minor directory for files +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.4:" + +# Pull in the devicetree files into the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree" + +# Add run-time dependency for PM firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti33x = " amx3-cm3" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti43x = " amx3-cm3" + +# Add run-time dependency for VPE VPDMA firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " vpdma-fw" + +# Add run-time dependency for Goodix firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_dra7xx = " goodix-fw" + +# Install boot-monitor skern file into /boot dir of rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " boot-monitor" + +# Install ti-sci-fw into /boot dir of rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " ti-sci-fw" + +# Add run-time dependency for SerDes firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " serdes-fw" + +# Add run-time dependency for QMSS PDSP firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_keystone = " qmss-pdsp-fw" + +# Add run-time dependency for NETCP PA firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2hk = " netcp-pa-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2e = " netcp-pa-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2l = " netcp-pa-fw" + +# Add run-time dependency for PRU Ethernet firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am57xx-evm = " prueth-fw prusw-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am57xx-hs-evm = " prueth-fw prusw-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti43x = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_ti33x = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_k2g = " prueth-fw" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am65xx = " prueth-fw-am65x" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_am65xx-evm = " prueth-fw-am65x-sr2" + +# Add run-time dependency for Cadence MHDP firmware to the rootfs +RDEPENDS_${KERNEL_PACKAGE_NAME}-base_append_j7 = " cadence-mhdp-fw" + +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +S = "${WORKDIR}/git" + +BRANCH = "ti-linux-5.4.y" + +SRCREV = "66cf445b7697a4963cfc796e06918fe5b147fe7d" +PV = "5.4.40+git${SRCPV}" + +# Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild +MACHINE_KERNEL_PR_append = "a" +PR = "${MACHINE_KERNEL_PR}" + +KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git" +KERNEL_GIT_PROTOCOL = "git" +SRC_URI += "${KERNEL_GIT_URI};protocol=${KERNEL_GIT_PROTOCOL};branch=${BRANCH} \ + file://defconfig" + +FILES_${KERNEL_PACKAGE_NAME}-devicetree += "/${KERNEL_IMAGEDEST}/*.itb" + +# Special configuration for remoteproc/rpmsg IPC modules +module_conf_rpmsg_client_sample = "blacklist rpmsg_client_sample" +module_conf_ti_k3_r5_remoteproc = "softdep ti_k3_r5_remoteproc pre: virtio_rpmsg_bus" +module_conf_ti_k3_dsp_remoteproc = "softdep ti_k3_dsp_remoteproc pre: virtio_rpmsg_bus" +KERNEL_MODULE_PROBECONF += "rpmsg_client_sample ti_k3_r5_remoteproc ti_k3_dsp_remoteproc" +KERNEL_MODULE_AUTOLOAD_append_j7 = " rpmsg_kdrv_switch" diff --git a/bsp/meta-ti/recipes-multimedia/libdce/libdce_3.00.14.00.bb b/bsp/meta-ti/recipes-multimedia/libdce/libdce_3.00.14.00.bb index 4d032422..a82644a2 100644 --- a/bsp/meta-ti/recipes-multimedia/libdce/libdce_3.00.14.00.bb +++ b/bsp/meta-ti/recipes-multimedia/libdce/libdce_3.00.14.00.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "Library used for remotely invoking the hw accelerated codec on IVA-HD" +SUMMARY = "Library for remotely invoking HW accelerated codecs on IVA-HD" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://libdce.h;beginline=1;endline=31;md5=0a398cf815b8b5f31f552266cd453dae" diff --git a/bsp/meta-ti/recipes-security/optee/optee-%.bbappend b/bsp/meta-ti/recipes-security/optee/optee-%.bbappend new file mode 100644 index 00000000..32307e2f --- /dev/null +++ b/bsp/meta-ti/recipes-security/optee/optee-%.bbappend @@ -0,0 +1 @@ +COMPATIBLE_MACHINE_ti-soc = "ti-soc" diff --git a/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-capes.bb b/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-capes.bb index e74033a1..569a3e5a 100644 --- a/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-capes.bb +++ b/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-capes.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Userspace setup for beaglebone capes" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" PR = "r4" diff --git a/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-getting-started.bb b/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-getting-started.bb index 6c61a4e9..adde30b4 100644 --- a/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-getting-started.bb +++ b/bsp/meta-ti/recipes-ti/beagleboard/beaglebone-getting-started.bb @@ -1,13 +1,13 @@ -DESCRIPTION = "BeagleBone Getting Started Guide" +SUMMARY = "BeagleBone Getting Started Guide" -PR = "r21" +PR = "r22" inherit allarch -LICENSE = "GPLv2+ & MIT & PD & others" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=603591dea023c3c75b48e07cb47ce639" +LICENSE = "CC-BY-SA-3.0 & GPLv3+ & MIT & PD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f6f02761e31334c48f7021fb94c89aaa" -SRCREV = "6c548a307c948b28a99d48fd17d9790b56182196" +SRCREV = "05bedba192646152b7bc80b0accaea75aef864e5" SRC_URI = "git://github.com/jadonk/beaglebone-getting-started.git" S = "${WORKDIR}/git" @@ -18,3 +18,4 @@ do_install() { } FILES_${PN} += "${datadir}/${PN}" +INSANE_SKIP_${PN} = "file-rdeps" diff --git a/bsp/meta-ti/recipes-ti/beagleboard/gadget-init.bb b/bsp/meta-ti/recipes-ti/beagleboard/gadget-init.bb index 8b899c51..b546efbb 100644 --- a/bsp/meta-ti/recipes-ti/beagleboard/gadget-init.bb +++ b/bsp/meta-ti/recipes-ti/beagleboard/gadget-init.bb @@ -3,7 +3,7 @@ DESCRIPTION = "Units to initialize usb gadgets" PR = "r19" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" COMPATIBLE_MACHINE = "(ti33x)" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.76.03.01.bb b/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.76.03.01.bb deleted file mode 100644 index 8ebe2f3e..00000000 --- a/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.76.03.01.bb +++ /dev/null @@ -1,15 +0,0 @@ -require recipes-ti/bios/ti-sysbios.inc - -PV = "6_76_03_01" -PR = "r0" - -LIC_FILES_CHKSUM = "file://manifest_bios_${PV}.html;md5=5cf40699c51b26d36fc01647c0b27fb1" - -SRC_URI[sysbiosbin.md5sum] = "647243209d66d5dd35503b0ec5a84ab9" -SRC_URI[sysbiosbin.sha256sum] = "b762b7f2343d26d367f952488e529046785128005158cc921c3baef08e97116a" - -TI_BIN_UNPK_CMDS = "" -TI_BIN_UNPK_ARGS = "--mode unattended --prefix ${WORKDIR}" - -BINFILE = "bios_${PV}.run" -SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/${PV}/exports/${BINFILE};name=sysbiosbin" diff --git a/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.82.01.19.bb b/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.82.01.19.bb new file mode 100644 index 00000000..59652095 --- /dev/null +++ b/bsp/meta-ti/recipes-ti/bios/ti-sysbios_6.82.01.19.bb @@ -0,0 +1,13 @@ +require recipes-ti/bios/ti-sysbios.inc + +PV = "6_82_01_19" + +LIC_FILES_CHKSUM = "file://manifest_bios_${PV}.html;md5=4b72066ed4cb1dd73ff2f585c428105a" + +SRC_URI[sysbiosbin.sha256sum] = "4d7c6cac993e6bc601083a41a5c52089d4852544b4c38563e4320310a54882b2" + +TI_BIN_UNPK_CMDS = "" +TI_BIN_UNPK_ARGS = "--mode unattended --prefix ${WORKDIR}" + +BINFILE = "bios_${PV}.run" +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/${PV}/exports/${BINFILE};name=sysbiosbin" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-aarch64-none-elf_9.2-2019.12.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-aarch64-none-elf_9.2-2019.12.bb new file mode 100644 index 00000000..2ec0f9cf --- /dev/null +++ b/bsp/meta-ti/recipes-ti/devtools/gcc-aarch64-none-elf_9.2-2019.12.bb @@ -0,0 +1,38 @@ +# Copyright (C) 2020 Texas Instruments Inc. +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Baremetal GCC for Aarch64 processors" +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "file://share/doc/gcc/GNU-Free-Documentation-License.html;md5=cc1e9a49a59ce7e6ae5ef37cd16eca0c" + +PROVIDES = "virtual/aarch64-none-elf-gcc" + +SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-${PV}-x86_64-aarch64-none-elf.tar.xz" + +SRC_URI[sha256sum] = "36d2cbe7c2984f2c20f562ac2f3ba524c59151adfa8ee10f1326c88de337b6d1" + +S = "${WORKDIR}/gcc-arm-${PV}-x86_64-aarch64-none-elf" + +COMPATIBLE_HOST = "x86_64.*-linux" + +do_install() { + install -d ${D}${datadir}/aarch64-none-elf/ + cp -r ${S}/. ${D}${datadir}/aarch64-none-elf/ + + install -d ${D}${bindir} + # Symlink all executables into bindir + for f in ${D}${datadir}/aarch64-none-elf/bin/aarch64-none-elf-*; do + lnr $f ${D}${bindir}/$(basename $f) + done +} + +FILES_${PN} = "${datadir} ${bindir}" + +INSANE_SKIP_${PN} = "already-stripped libdir staticdev file-rdeps" + +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi-native_4.9.2015q3.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi-native_4.9.2015q3.bb deleted file mode 100644 index 1fe5c525..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi-native_4.9.2015q3.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "Baremetal GCC for ARM" -LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" - -LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=cba77c7fde3ed13e866b04a2f3d93918" - -inherit native -require recipes-ti/includes/ti-paths.inc - -SRC_URI = "https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2;name=gcc-arm-none" - -SRC_URI[gcc-arm-none.md5sum] = "8a4a74872830f80c788c944877d3ad8c" -SRC_URI[gcc-arm-none.sha256sum] = "c50078bfbd29e6c15615900e746f4d0acde917338e55860b0f145f57387c12ab" - -S = "${WORKDIR}/gcc-arm-none-eabi-4_9-2015q3" - -do_install() { - install -d ${D}${GCC_ARM_NONE_TOOLCHAIN_RECIPE} - cp -r ${S}/. ${D}${GCC_ARM_NONE_TOOLCHAIN_RECIPE} -} - -FILES_${PN} = "${GCC_ARM_NONE_TOOLCHAIN_RECIPE}/*" - -INSANE_SKIP_${PN} = "already-stripped" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb deleted file mode 100644 index f474c87f..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_7-2018-q2-update.bb +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION = "Baremetal GCC for ARM" -LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" - -LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=f77466c63f5787f4bd669c402aabe061" - -require recipes-ti/includes/ti-paths.inc - -SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2;name=gcc-arm-none" - -SRC_URI[gcc-arm-none.md5sum] = "299ebd3f1c2c90930d28ab82e5d8d6c0" -SRC_URI[gcc-arm-none.sha256sum] = "bb17109f0ee697254a5d4ae6e5e01440e3ea8f0277f2e8169bf95d07c7d5fe69" - -S = "${WORKDIR}/gcc-arm-none-eabi-7-2018-q2-update" - -# only x86_64 is supported -COMPATIBLE_HOST = "x86_64.*-linux" -COMPATIBLE_HOST_class-target = "null" - -do_install() { - install -d ${D}${GCC_ARM_NONE_TOOLCHAIN_RECIPE} - cp -r ${S}/. ${D}${GCC_ARM_NONE_TOOLCHAIN_RECIPE} -} - -FILES_${PN} = "${GCC_ARM_NONE_TOOLCHAIN_RECIPE}/*" - -INSANE_SKIP_${PN} = "already-stripped libdir staticdev build-deps file-rdeps" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_9-2019-q4-major.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_9-2019-q4-major.bb new file mode 100644 index 00000000..84f6dbab --- /dev/null +++ b/bsp/meta-ti/recipes-ti/devtools/gcc-arm-none-eabi_9-2019-q4-major.bb @@ -0,0 +1,39 @@ +# Copyright (C) 2019 Garmin Ltd. or its subsidiaries +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "Baremetal GCC for ARM-R and ARM-M processors" +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "file://share/doc/gcc-arm-none-eabi/license.txt;md5=c18349634b740b7b95f2c2159af888f5" + +PROVIDES = "virtual/arm-none-eabi-gcc" + +SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/${BPN}-${PV}-x86_64-linux.tar.bz2" + +SRC_URI[md5sum] = "fe0029de4f4ec43cf7008944e34ff8cc" +SRC_URI[sha256sum] = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a" + +S = "${WORKDIR}/${BPN}-${PV}" + +COMPATIBLE_HOST = "x86_64.*-linux" + +do_install() { + install -d ${D}${datadir}/arm-none-eabi/ + cp -r ${S}/. ${D}${datadir}/arm-none-eabi/ + + install -d ${D}${bindir} + # Symlink all executables into bindir + for f in ${D}${datadir}/arm-none-eabi/bin/arm-none-eabi-*; do + lnr $f ${D}${bindir}/$(basename $f) + done +} + +FILES_${PN} = "${datadir} ${bindir}" + +INSANE_SKIP_${PN} = "already-stripped libdir staticdev file-rdeps" + +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-aarch64-native.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-aarch64-native.bb deleted file mode 100644 index 97344f90..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-aarch64-native.bb +++ /dev/null @@ -1,23 +0,0 @@ -include recipes-ti/devtools/gcc-linaro.inc - -PACKAGE_DIR = "gcc-linaro-${PV}-${GCC_ARM_YEAR}-x86_64_aarch64-elf" -S = "${WORKDIR}/${PACKAGE_DIR}" - -LIC_CHKSUM = "bc7fad4bba98e7a4cd5ab3042506493c" - -inherit native -require recipes-ti/includes/ti-paths.inc - -SRC_URI = "https://releases.linaro.org/components/toolchain/binaries/7.2-${GCC_ARM_YEAR}/aarch64-elf/gcc-linaro-${PV}-${GCC_ARM_YEAR}-x86_64_aarch64-elf.tar.xz;name=gcc-linaro-aarch64" - -SRC_URI[gcc-linaro-aarch64.md5sum] = "4972f8943820bdd2f577f498de78964b" -SRC_URI[gcc-linaro-aarch64.sha256sum] = "30fb7d876bcb982c502057c593d9c1f11b35d5158a26d986718e2b998388c4c8" - -do_install() { - install -d ${D}${GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN_RECIPE} - cp -r ${S}/. ${D}${GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN_RECIPE} -} - -FILES_${PN} = "${GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN_RECIPE}/*" - -INSANE_SKIP_${PN} = "already-stripped" diff --git a/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-native.bb b/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-native.bb deleted file mode 100644 index 0268ae3d..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/gcc-linaro-baremetal-native.bb +++ /dev/null @@ -1,23 +0,0 @@ -include recipes-ti/devtools/gcc-linaro.inc - -PACKAGE_DIR = "gcc-linaro-${PV}-${GCC_ARM_YEAR}-x86_64_arm-eabi" -S = "${WORKDIR}/${PACKAGE_DIR}" - -LIC_CHKSUM = "bc7fad4bba98e7a4cd5ab3042506493c" - -inherit native -require recipes-ti/includes/ti-paths.inc - -SRC_URI = "https://releases.linaro.org/components/toolchain/binaries/7.2-${GCC_ARM_YEAR}/arm-eabi/gcc-linaro-${PV}-${GCC_ARM_YEAR}-x86_64_arm-eabi.tar.xz;name=gcc-linaro" - -SRC_URI[gcc-linaro.md5sum] = "9a4a39cfc78c84375b1160aa93587aed" -SRC_URI[gcc-linaro.sha256sum] = "45fc4f90af2e2e9c3197a275f6005ef5639f7a1889fa3eb24c3125ccd70fcd3d" - -do_install() { - install -d ${D}${GCC_LINARO_BAREMETAL_TOOLCHAIN_RECIPE} - cp -r ${S}/. ${D}${GCC_LINARO_BAREMETAL_TOOLCHAIN_RECIPE} -} - -FILES_${PN} = "${GCC_LINARO_BAREMETAL_TOOLCHAIN_RECIPE}/*" - -INSANE_SKIP_${PN} = "already-stripped" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_18.12.5.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_18.12.5.bb deleted file mode 100644 index 9e651819..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_18.12.5.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "TI ARM Code Generation Tools" -HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" -LICENSE = "(TI-TSPA & Thai-Open-Source-Software-Center) & BSD-3-Clause & BSL-1.0 & Hewlett-Packard & Patrick-Powell & AFL-3.0 & MIT & BSD-2-Clause & PD & BSD-4-Clause" - -LIC_FILES_CHKSUM = "file://ti-cgt-arm_${PV}.LTS/README.txt;md5=79631eb21b2e5b7190cd3ff1dfd41108" - -require recipes-ti/includes/ti-unpack.inc -require recipes-ti/includes/ti-staging.inc -require recipes-ti/includes/ti-paths.inc - -S = "${WORKDIR}/ti-cgt-arm-${PV}" - -PR = "r0" - -SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}" - -BINFILE = "ti_cgt_tms470_${PV}.LTS_linux_installer_x86.bin" -TI_BIN_UNPK_ARGS = "--prefix ${S}" -TI_BIN_UNPK_CMDS = "" - -# only x86_64 is supported -COMPATIBLE_HOST = "x86_64.*-linux" -COMPATIBLE_HOST_class-target = "null" - -do_install() { - install -d ${D}${M4_TOOLCHAIN_INSTALL_DIR_RECIPE} - cp -r ${S}/ti-cgt-arm*/. ${D}${M4_TOOLCHAIN_INSTALL_DIR_RECIPE} -} - -SRC_URI[cgt_arm_installer.md5sum] = "e9e668332cf86c965b4da9d1d488426b" -SRC_URI[cgt_arm_installer.sha256sum] = "da976143128c619a278cb4214a4295c409d100f9e65ad2f4d0d1039db7cf98f4" - -BINFILE_NAME = "cgt_arm_installer" - -FILES_${PN} += "${M4_TOOLCHAIN_INSTALL_DIR_RECIPE}" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_SYSROOT_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -INSANE_SKIP_${PN} += "arch staticdev" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_20.2.0.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_20.2.0.bb new file mode 100644 index 00000000..05b52e64 --- /dev/null +++ b/bsp/meta-ti/recipes-ti/devtools/ti-cgt-arm_20.2.0.bb @@ -0,0 +1,42 @@ +SUMMARY = "TI ARM Code Generation Tools" +HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" +LICENSE = "(TI-TSPA & Thai-Open-Source-Software-Center) & BSD-3-Clause & BSL-1.0 & Patrick-Powell & AFL-3.0 & MIT & BSD-2-Clause & PD & BSD-4-Clause" + +LIC_FILES_CHKSUM = "file://ti-cgt-arm_${PV}.LTS/README.html;md5=9ed980fae072af522545a0e5f297bca0" + +require recipes-ti/includes/ti-unpack.inc +require recipes-ti/includes/ti-staging.inc +require recipes-ti/includes/ti-paths.inc + +S = "${WORKDIR}/ti-cgt-arm-${PV}" + +PR = "r0" + +SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}" + +BINFILE = "ti_cgt_tms470_${PV}.LTS_linux_installer_x86.bin" +TI_BIN_UNPK_ARGS = "--prefix ${S}" +TI_BIN_UNPK_CMDS = "" + +# only x86_64 is supported +COMPATIBLE_HOST = "x86_64.*-linux" +COMPATIBLE_HOST_class-target = "null" + +do_install() { + install -d ${D}${M4_TOOLCHAIN_INSTALL_DIR_RECIPE} + cp -r ${S}/ti-cgt-arm*/. ${D}${M4_TOOLCHAIN_INSTALL_DIR_RECIPE} +} + +SRC_URI[cgt_arm_installer.sha256sum] = "e27b1ebae58085b1587af3016bf201b54b6ace99e9e7165c1e4a042afe4b55eb" + +BINFILE_NAME = "cgt_arm_installer" + +FILES_${PN} += "${M4_TOOLCHAIN_INSTALL_DIR_RECIPE}" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +INSANE_SKIP_${PN} += "arch staticdev file-rdeps" + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x.inc b/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x.inc deleted file mode 100644 index 1d00a553..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x.inc +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "TI DSP Code Generation Tools" -HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" -SECTION = "devel" -LICENSE = "TI" - -require ../includes/ti-paths.inc -require ../includes/ti-staging.inc -require ../includes/ti-eula-unpack.inc - -PR = "r4" - -S = "${WORKDIR}/cgt6x_${PV}" - -SRC_URI = "http://install.source.dir.local/ti_cgt_c6000_${PVwithdots}_setup_linux_x86.bin;name=cgt6xbin" - -BINFILE="ti_cgt_c6000_${PVwithdots}_setup_linux_x86.bin" -TI_BIN_UNPK_CMDS="Y:qY:workdir: : " -TI_BIN_UNPK_WDEXT="/cgt6x_${PV}" - -do_install() { - install -d ${D}${CODEGEN_INSTALL_DIR_RECIPE} - cp -pPrf ${S}/* ${D}${CODEGEN_INSTALL_DIR_RECIPE} -} - diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_6.1.20.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_6.1.20.bb deleted file mode 100644 index 1d6609c8..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_6.1.20.bb +++ /dev/null @@ -1,11 +0,0 @@ -require ti-cgt6x.inc - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62f46f1125a152a2e213b414db7ac600" - -PE = "1" -PV = "6_1_20" -PVwithdots = "6.1.20" - -SRC_URI[cgt6xbin.md5sum] = "39485ea8211960de0a958ab27106ab9b" -SRC_URI[cgt6xbin.sha256sum] = "a020142011c8160e24f6386f7696ecfbfe02dab2a6c83af74ce6b67eb1da9900" - diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_7.2.7.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_7.2.7.bb deleted file mode 100644 index a2266004..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_7.2.7.bb +++ /dev/null @@ -1,13 +0,0 @@ -require ti-cgt6x.inc - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62f46f1125a152a2e213b414db7ac600" - -PE = "1" -PV = "7_2_7" -PVwithdots = "7.2.7" - -SRC_URI[cgt6xbin.md5sum] = "71a0768a541fdebd9c35d44301019d1d" -SRC_URI[cgt6xbin.sha256sum] = "211477f0142d603975544abe3c45cc3b77a3b38038158676c60812806378738b" - - -INSANE_SKIP_${PN} = "installed-vs-shipped" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_8.3.2.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_8.3.2.bb index deee61c7..38f5597d 100644 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_8.3.2.bb +++ b/bsp/meta-ti/recipes-ti/devtools/ti-cgt6x_8.3.2.bb @@ -100,5 +100,8 @@ FILES_${PN} += "${datadir}/ti/*" FILES_${PN}-dbg += "${datadir}/ti/cgt-c6x/bin/.debug" INSANE_SKIP_${PN} += "staticdev" +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${datadir}/ti/cgt-c6x/lib/libc.a" BBCLASSEXTEND = "native nativesdk" + +COMPATIBLE_MACHINE_class-target = "(ti-soc)" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.2.0.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.2.0.bb deleted file mode 100644 index 09178af8..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.2.0.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "TI DSP Code Generation Tools" -DESCRIPTION = "Texas Instruments (TI) Code Generation Tools are custom \ -utilities targeted for TI embedded processors. This Digital Signal \ -Processor (DSP) suite contains tools needed to create and debug \ -applications for the C7000 DSP family. This includes tools such as: \ -compiler, linker, assembler, etc. This also includes C runtime \ -libraries and standard header files needed to produce a working DSP application." -HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" -LICENSE = "(TI-TSPA & Thai-Open-Source-Software-Center) & BSD-3-Clause & BSL-1.0 & Patrick-Powell & AFL-3.0 & MIT & BSD-2-Clause & PD" - -LIC_FILES_CHKSUM = "file://ti-cgt-c7000_${PV}.STS/C7000_Code_Generation_Tools_1.x_manifest.html;md5=f1156d241d104c281bc64a6ec8eadc64" - -require recipes-ti/includes/ti-unpack.inc -require recipes-ti/includes/ti-paths.inc - -# only x86_64 is supported -COMPATIBLE_HOST = "x86_64.*-linux" -COMPATIBLE_HOST_class-target = "null" - -BINFILE = "ti_cgt_c7000_${PV}.STS_linux_installer_x86.bin" -BINFILE_NAME = "cgt7x_x86_installer" - -SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/C7000/${PV}.STS/${BINFILE};name=${BINFILE_NAME}" - -TI_BIN_UNPK_ARGS = "--prefix ${S}" -TI_BIN_UNPK_CMDS = "" - -SRC_URI[cgt7x_x86_installer.md5sum] = "813840908f333dd2a31f92edec71c1fb" -SRC_URI[cgt7x_x86_installer.sha256sum] = "21379811a8857489f72ca8ec45a46eb086ced0bdbb58e78f73a86e63984ab2f5" - -S = "${WORKDIR}/c7000_${PV}" - -do_install() { - install -d ${D}/${TI_CGT7X_INSTALL_DIR_RECIPE} - cp -rP --preserve=mode,links,timestamps --no-preserve=ownership ${WORKDIR}/c7000_${PV}/ti-cgt-c7000_${PV}.STS/. ${D}/${TI_CGT7X_INSTALL_DIR_RECIPE} -} - - -FILES_${PN} += "${TI_CGT7X_INSTALL_DIR_RECIPE}" - -INSANE_SKIP_${PN} += "arch staticdev textrel" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_SYSROOT_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.3.0.bb b/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.3.0.bb new file mode 100644 index 00000000..55ec91e8 --- /dev/null +++ b/bsp/meta-ti/recipes-ti/devtools/ti-cgt7x_1.3.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "TI DSP Code Generation Tools" +DESCRIPTION = "Texas Instruments (TI) Code Generation Tools are custom \ +utilities targeted for TI embedded processors. This Digital Signal \ +Processor (DSP) suite contains tools needed to create and debug \ +applications for the C7000 DSP family. This includes tools such as: \ +compiler, linker, assembler, etc. This also includes C runtime \ +libraries and standard header files needed to produce a working DSP application." +HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" +LICENSE = "(TI-TSPA & Thai-Open-Source-Software-Center) & BSD-3-Clause & BSL-1.0 & Patrick-Powell & AFL-3.0 & MIT & BSD-2-Clause & PD" + +LIC_FILES_CHKSUM = "file://ti-cgt-c7000_${PV}.STS/C7000_Code_Generation_Tools_1.x_manifest.html;md5=3ee1c9f774004535003f80cb8142bb0f" + +require recipes-ti/includes/ti-unpack.inc +require recipes-ti/includes/ti-paths.inc + +# only x86_64 is supported +COMPATIBLE_HOST = "x86_64.*-linux" +COMPATIBLE_HOST_class-target = "null" + +BINFILE = "ti_cgt_c7000_${PV}.STS_linux_installer_x86.bin" +BINFILE_NAME = "cgt7x_x86_installer" + +SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/C7000/${PV}.STS/${BINFILE};name=${BINFILE_NAME}" + +TI_BIN_UNPK_ARGS = "--prefix ${S}" +TI_BIN_UNPK_CMDS = "" + +SRC_URI[cgt7x_x86_installer.sha256sum] = "24071fe0369e55af80e334852cda7fa78b64ae79a411c57ac6995470a7a23694" + +S = "${WORKDIR}/c7000_${PV}" + +do_install() { + install -d ${D}/${TI_CGT7X_INSTALL_DIR_RECIPE} + cp -rP --preserve=mode,links,timestamps --no-preserve=ownership ${WORKDIR}/c7000_${PV}/ti-cgt-c7000_${PV}.STS/. ${D}/${TI_CGT7X_INSTALL_DIR_RECIPE} +} + +FILES_${PN} += "${TI_CGT7X_INSTALL_DIR_RECIPE}" + +INSANE_SKIP_${PN} += "arch staticdev textrel file-rdeps" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools-common.inc b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools-common.inc index 27f8f908..c21e4794 100644 --- a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools-common.inc +++ b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools-common.inc @@ -60,6 +60,8 @@ libjvm.so \ libhpi.so \ lib.so \ libcairo.so.2 \ +libjli.so \ +libawt_xawt.so \ " COMPATIBLE_HOST ?= "null" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff deleted file mode 100644 index 26debf8f..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- a/packages/gnu/targets/arm/linkcmd.xdt 2010-12-30 19:33:53.000000000 +0100 -+++ b/packages/gnu/targets/arm/linkcmd.xdt 2010-12-30 19:42:55.000000000 +0100 -@@ -40,12 +40,13 @@ - - %if ("BINVERS" in prog.build.target) { - % var _utils = xdc.loadCapsule("gnu/targets/linkUtils.xs"); -+% if (prog.build.target.GCCVERS < "4.3.3") { - SECTIONS { - `_utils.genSections(prog)` - } -- --% if (!prog.build.target.noStdLinkScript --% && prog.build.target.BINVERS >= "2.19") { -+% } -+% if (prog.build.target.noStdLinkScript -+% && prog.build.target.BINVERS >= "2.19") { - INSERT BEFORE .gnu.attributes - % } - diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff deleted file mode 100644 index 36142c47..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur a/packages/gnu/targets/ITarget.xs b/packages/gnu/targets/ITarget.xs ---- a/packages/gnu/targets/ITarget.xs 2011-08-06 13:24:44.000000000 +0200 -+++ b/packages/gnu/targets/ITarget.xs 2011-08-06 13:23:37.000000000 +0200 -@@ -251,7 +251,7 @@ - - function askLd(target) - { -- var ldCmd = target.rootDir + "/" + target.GCCTARG + "/bin/ld"; -+ var ldCmd = target.rootDir + "/" + target.GCCTARG + "-ld"; - /* If the ld executable cannot be found, and the prefix is not used, - * it's probably a misspelled directory path. - */ -@@ -486,7 +486,7 @@ - tool2cmd["link"] = cmd; - - /* define the ar command template */ -- cmd = prefix + target.ar.cmd -+ cmd = prefix + target.GCCTARG + "-ar" - + " $(AROPTS_P) " + target.ar.opts - + " $@ $(AROPTS_S) $(aropts) $(files)"; - tool2cmd["ar"] = cmd; diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.55.02.22.bb b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.55.02.22.bb deleted file mode 100644 index 74817835..00000000 --- a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.55.02.22.bb +++ /dev/null @@ -1,9 +0,0 @@ -require recipes-ti/devtools/ti-xdctools-core.inc - -PV = "3_55_02_22" -PR = "r0" - -LIC_FILES_CHKSUM = "file://docs/license/xdc/shelf/package.html;beginline=1;endline=140;md5=2e742b9757bc9ce0241aadba9f627ab8" - -SRC_URI[xdczip.md5sum] = "bb9154d677ce4724a5eac73817b23a0f" -SRC_URI[xdczip.sha256sum] = "bf90dfbbe298458c736d81d5631db25b335e79146923a4a50fab217e02723e7b" diff --git a/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.61.00.16.bb b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.61.00.16.bb new file mode 100644 index 00000000..9047198d --- /dev/null +++ b/bsp/meta-ti/recipes-ti/devtools/ti-xdctools_3.61.00.16.bb @@ -0,0 +1,7 @@ +require recipes-ti/devtools/ti-xdctools-core.inc + +PV = "3_61_00_16" + +LIC_FILES_CHKSUM = "file://docs/license/xdc/shelf/package.html;beginline=1;endline=140;md5=2e742b9757bc9ce0241aadba9f627ab8" + +SRC_URI[xdczip.sha256sum] = "19caf6d5ff412d48c11ba1c05b543e39f5d678203407e5f659ff306b274e7606" diff --git a/bsp/meta-ti/recipes-ti/engine-pkcs11/engine-pkcs11_git.bb b/bsp/meta-ti/recipes-ti/engine-pkcs11/engine-pkcs11_git.bb deleted file mode 100644 index 7dd6f096..00000000 --- a/bsp/meta-ti/recipes-ti/engine-pkcs11/engine-pkcs11_git.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "OpenSSL PKCS11 engine" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://src/engine_pkcs11.h;startline=1;endline=26;md5=471dacb7f0586e35729f422b8098585f" -SECTION = "libs" - -inherit autotools pkgconfig - -DEPENDS = "openssl10 libtool libp11" - -COMPATIBLE_MACHINE = "keystone" - -BRANCH = "master" - -PV = "1.3.0.1" -# Commit corresponds to DEV.ENGINE_PKCS11-01.03.00.01 -SRCREV = "56ac060e2245907a442376d586924af26ed7e478" - -SRC_URI = "git://git.ti.com/keystone-linux/engine-pkcs11.git;protocol=git;branch=${BRANCH}" -S = "${WORKDIR}/git" - -FILES_${PN} += "${libdir}/engines/*.so*" -FILES_${PN}-dbg += "${libdir}/engines/.debug" diff --git a/bsp/meta-ti/recipes-ti/includes/ti-paths.inc b/bsp/meta-ti/recipes-ti/includes/ti-paths.inc index 52a93cf5..d45b77fa 100644 --- a/bsp/meta-ti/recipes-ti/includes/ti-paths.inc +++ b/bsp/meta-ti/recipes-ti/includes/ti-paths.inc @@ -48,7 +48,7 @@ export XDC_INSTALL_DIR_RECIPE = "${installdir}/ti-xdctools-tree" export PDK_INSTALL_DIR_RECIPE = "${installdir}/ti-pdk-tree" export OSAL_INSTALL_DIR_RECIPE = "${installdir}/ti-osal-tree" export M4_TOOLCHAIN_INSTALL_DIR_RECIPE = "${installdir}/ti-cgt-arm" -export GCC_ARM_NONE_TOOLCHAIN_RECIPE = "${installdir}/gcc-arm-none-eabi" +export GCC_ARM_NONE_TOOLCHAIN_RECIPE = "${datadir}/arm-none-eabi" export TI_CGT_PRU_INSTALL_DIR_RECIPE = "${installdir}/cgt-pru" export MATHLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-mathlib-c66x-tree" export MATHLIB_C674_INSTALL_DIR_RECIPE = "${installdir}/ti-mathlib-c674x-tree" @@ -58,8 +58,8 @@ export CG_XML_INSTALL_DIR_RECIPE = "${installdir}/ti-cg-xml-tree" export OMP_INSTALL_DIR_RECIPE = "${installdir}/ti-omp-tree" export MPM_INSTALL_DIR_RECIPE = "${installdir}/ti-mpm-tree" export TI_CGT6X_7_INSTALL_DIR_RECIPE = "${installdir}/cgt6x-7" -export GCC_LINARO_BAREMETAL_TOOLCHAIN_RECIPE = "${installdir}/gcc-linaro-baremetal" -export GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN_RECIPE = "${installdir}/gcc-linaro-baremetal-aarch64" +export GCC_LINARO_BAREMETAL_TOOLCHAIN_RECIPE = "${datadir}/arm-none-eabi" +export GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN_RECIPE = "${datadir}/aarch64-none-elf" export TI_CGT7X_INSTALL_DIR_RECIPE = "${installdir}/cgt-c7x" diff --git a/bsp/meta-ti/recipes-ti/ipc/ipc-transport-qmss_git.bb b/bsp/meta-ti/recipes-ti/ipc/ipc-transport-qmss_git.bb index 4c9aaded..93136670 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ipc-transport-qmss_git.bb +++ b/bsp/meta-ti/recipes-ti/ipc/ipc-transport-qmss_git.bb @@ -15,3 +15,5 @@ do_install () { INSTALL_LIB_BASE_DIR=${D}${libdir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libTransportQmss.a" diff --git a/bsp/meta-ti/recipes-ti/ipc/ipc-transport-srio_git.bb b/bsp/meta-ti/recipes-ti/ipc/ipc-transport-srio_git.bb index ca7f7b6c..6001585a 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ipc-transport-srio_git.bb +++ b/bsp/meta-ti/recipes-ti/ipc/ipc-transport-srio_git.bb @@ -15,3 +15,5 @@ do_install () { INSTALL_LIB_BASE_DIR=${D}${libdir} chown -R root:root ${D} } + +INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libdir}/libTransportSrio.a" diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-common.inc b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-common.inc index 86a0fd0c..449903f1 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-common.inc +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-common.inc @@ -1,4 +1,4 @@ -PV = "3.50.04.08" +PV = "3.51.00.00" INC_PR = "r0" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -15,7 +15,6 @@ PLATFORM_k2g = "66AK2G" PLATFORM_omapl138 = "OMAPL138" PLATFORM_c667x-evm = "C6678" PLATFORM_c665x-evm = "C6678" -PLATFORM_am65xx = "AM65XX" ALT_PLATFORM_k2hk = "TCI6636" ALT_PLATFORM_am57xx-evm = "AM572X AM571X" diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-examples_git.bb b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-examples_git.bb index 43e45e64..c46e5c81 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-examples_git.bb +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-examples_git.bb @@ -3,8 +3,6 @@ require ti-ipc-examples.inc DEPENDS = "ti-ipc ti-xdctools-native ti-sysbios ti-ipc-rtos zip-native" -DEPENDS_append_am65xx = " sciclient-rtos" - do_compile_append() { if [ "${PLATFORM}" != "UNKNOWN" ]; then diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos.inc b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos.inc index 4d0d449c..a68ba806 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos.inc +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos.inc @@ -24,9 +24,9 @@ protocol=${TI_IPC_METADATA_GIT_PROTOCOL};\ branch=${TI_IPC_METADATA_GIT_BRANCH};\ name=${TI_IPC_METADATA_NAME}" -# Corresponds to tag: 3.50.04.08 -TI_IPC_METADATA_SRCREV = "48788ea79190c4995df4c802e8aa4e17f332943d" -# Corresponds to tag: 3.50.04.08 +# Corresponds to tag: 3.51.00.00 +TI_IPC_METADATA_SRCREV = "1bf668fd6b0ec2ef6956fa55b8484d0b21a9f9e2" +# Corresponds to tag: 3.51.00.00 TI_IPC_EXAMPLES_SRCREV = "4707fcbbe0d136e781c4a7ffdc072be407c34358" SRCREV_FORMAT = "default" @@ -39,7 +39,7 @@ S_ipc-metadata = "${WORKDIR}/git/ipc-metadata" RELEASE_TYPE = "GA" RELEASE_SUFFIX = "" -PR = "${INC_PR}.r2" +PR = "${INC_PR}.r0" DEPENDS_append_keystone = " ti-cgt6x-native \ gcc-arm-none-eabi-native \ @@ -53,9 +53,6 @@ DEPENDS_append_omapl138 = " ti-cgt6x-native \ DEPENDS_append_c66x = " ti-cgt6x-native \ " -DEPENDS_append_am65xx = " ti-cgt-arm-native \ - gcc-linaro-baremetal-aarch64-native" - IPC_TARGETS = "" IPC_TARGETS_omap-a15 = "\ @@ -79,11 +76,6 @@ IPC_TARGETS_c66x = " \ ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \ " -IPC_TARGETS_am65xx = "\ - gnu.targets.arm.A53F="${GCC_LINARO_BAREMETAL_AARCH64_TOOLCHAIN}" \ - ti.targets.arm.elf.R5F="${M4_TOOLCHAIN_INSTALL_DIR}" \ -" - PARALLEL_XDC = "${@oe.utils.parallel_make_argument(d, '--jobs=%d')}" EXTRA_OEMAKE = "\ PLATFORM=${PLATFORM} \ @@ -93,5 +85,4 @@ EXTRA_OEMAKE = "\ ${PARALLEL_XDC} \ JAVA_TOOL_OPTIONS=-Xss2560k \ " -EXTRA_OEMAKE_append_am65xx = " PDK_INSTALL_DIR=${PDK_INSTALL_DIR}" diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos_git.bb b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos_git.bb index 4c0e71e6..b292d677 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos_git.bb +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc-rtos_git.bb @@ -3,7 +3,6 @@ require ti-ipc-common.inc require ti-ipc-rtos.inc DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native" -DEPENDS_append_am65xx = " sciclient-rtos" PACKAGES =+ "${PN}-fw" FILES_${PN}-fw = "${base_libdir}/firmware/*" @@ -62,12 +61,6 @@ do_compile() { fi } -do_install_prepend_am65xx () { - # Trim directory name - mv ${S}/packages/ti/ipc/tests/bin/ti_platforms_cortexR_AM65X_false_R5F0 ${S}/packages/ti/ipc/tests/bin/ti_platforms_cortexR_AM65X_R5F0 - mv ${S}/packages/ti/ipc/tests/bin/ti_platforms_cortexR_AM65X_false_R5F1 ${S}/packages/ti/ipc/tests/bin/ti_platforms_cortexR_AM65X_R5F1 -} - do_install() { CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'` @@ -129,13 +122,3 @@ pkg_postinst_${PN}-fw_omapl138 () { pkg_postrm_${PN}-fw_omapl138 () { update-alternatives --remove rproc-dsp-fw ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674 } - -pkg_postinst_${PN}-fw_am65xx () { - update-alternatives --install /lib/firmware/am65x-mcu-r5f0_0-fw am65x-mcu-r5f0_0-fw ipc/ti_platforms_cortexR_AM65X_R5F0/messageq_single.xer5f ${ALTERNATIVE_PRIORITY} - update-alternatives --install /lib/firmware/am65x-mcu-r5f0_1-fw am65x-mcu-r5f0_1-fw ipc/ti_platforms_cortexR_AM65X_R5F1/messageq_single.xer5f ${ALTERNATIVE_PRIORITY} -} - -pkg_postrm_${PN}-fw_am65xx () { - update-alternatives --remove am65x-mcu-r5f0_0-fw ipc/ti_platforms_cortexR_AM65X_R5F0/messageq_single.xer5f - update-alternatives --remove am65x-mcu-r5f0_1-fw ipc/ti_platforms_cortexR_AM65X_R5F1/messageq_single.xer5f -} diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc.inc b/bsp/meta-ti/recipes-ti/ipc/ti-ipc.inc index d1eaad2a..3b0115eb 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc.inc +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc.inc @@ -6,10 +6,10 @@ LIC_FILES_CHKSUM = "file://${S}/ipc-linux.mak;beginline=1;endline=30;md5=7b327f9 TI_IPC_GIT_URI = "git://git.ti.com/ipc/ipcdev.git" TI_IPC_GIT_PROTOCOL = "git" -TI_IPC_GIT_BRANCH = "3.50" +TI_IPC_GIT_BRANCH = "master" -#Corresponds to 3.50.04.08 -TI_IPC_SRCREV = "1d53b856338b86d1979fe09345c0b382913a848a" +#Corresponds to 3.51.00.00A +TI_IPC_SRCREV = "7a6e343a208d2849139b7272a67abc01db806e00" BRANCH = "${TI_IPC_GIT_BRANCH}" SRC_URI = "${TI_IPC_GIT_URI};protocol=${TI_IPC_GIT_PROTOCOL};branch=${BRANCH};name=ipcdev" diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch b/bsp/meta-ti/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch index e612ddc1..71d5b2be 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch @@ -1,4 +1,4 @@ -From 7d9f57983c6d14ac14f26987eddc555ea5c75d61 Mon Sep 17 00:00:00 2001 +From c3ada6bf49e6fcf7bc49e5bf09754f384838ca6a Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Mon, 27 Jul 2015 11:51:52 -0400 Subject: [PATCH] Add kernel build dir @@ -17,18 +17,18 @@ Signed-off-by: Denys Dmytriyenko 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index f0b4b61..9b5d07c 100644 +index 4d4a559..84ac78b 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ AC_SUBST([AM_LDFLAGS]) - AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' '66AK2G' and 'DRA7XX'. If not defined all platforms will be built.) + AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' '66AK2G' 'DRA7XX' and 'AM65XX'. If not defined all platforms will be built.) AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries) AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.) +AC_ARG_VAR(KERNEL_BUILD_DIR, Path to the Linux kernel build artifacts.) AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver) AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.) -@@ -111,6 +112,7 @@ AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=]) +@@ -113,6 +114,7 @@ AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=]) AC_SUBST([PLATFORM]) AC_SUBST([CMEM_INSTALL_DIR]) AC_SUBST([KERNEL_INSTALL_DIR]) @@ -36,7 +36,7 @@ index f0b4b61..9b5d07c 100644 AC_SUBST([AF_RPMSG]) AC_SUBST([DRM_PREFIX]) -@@ -127,6 +129,7 @@ AM_CONDITIONAL([DRA7XX], [test "x$PLATFORM" = "xDRA7XX"]) +@@ -130,6 +132,7 @@ AM_CONDITIONAL([AM65XX], [test "x$PLATFORM" = "xAM65XX"]) AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"]) AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"]) AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"]) @@ -44,7 +44,7 @@ index f0b4b61..9b5d07c 100644 AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"]) AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"]) -@@ -157,6 +160,9 @@ You have configured to build for the '${PLATFORM}' platform +@@ -160,6 +163,9 @@ You have configured to build for the '${PLATFORM}' platform Your KERNEL installation directory is set to: '${KERNEL_INSTALL_DIR}' diff --git a/bsp/meta-ti/recipes-ti/ipc/ti-ipc_git.bb b/bsp/meta-ti/recipes-ti/ipc/ti-ipc_git.bb index 2ebd03fd..425ca4e1 100644 --- a/bsp/meta-ti/recipes-ti/ipc/ti-ipc_git.bb +++ b/bsp/meta-ti/recipes-ti/ipc/ti-ipc_git.bb @@ -22,7 +22,6 @@ DAEMON_k2l = "lad_tci6630" DAEMON_k2e = "lad_66ak2e" DAEMON_k2g = "lad_66ak2g" DAEMON_omapl138 = "lad_omapl138" -DAEMON_k3 = "lad_am65xx" inherit autotools-brokensep pkgconfig update-rc.d systemd diff --git a/bsp/meta-ti/recipes-ti/libp11/libp11_git.bb b/bsp/meta-ti/recipes-ti/libp11/libp11_git.bb deleted file mode 100644 index 9b1ea3e9..00000000 --- a/bsp/meta-ti/recipes-ti/libp11/libp11_git.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "PKCS11 abstraction library" -LICENSE = "LGPL2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29" -SECTION = "libs" - -inherit autotools pkgconfig - -DEPENDS = "openssl10 libtool" -RDEPENDS_${PN} = "ti-softhsmv2" - -COMPATIBLE_MACHINE = "keystone" - -SRC_URI = "git://git.ti.com/keystone-linux/libp11.git;protocol=git;branch=${BRANCH}" -BRANCH = "master" -# Following commit corresponds to DEV.LIBP11-01.03.00.00 -SRCREV = "43c4f63a8d803fde2bcd8e4f8969e5fe9edf0e33" -PV = "1.3.0.0" - -S = "${WORKDIR}/git" diff --git a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr-test_git.bb b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr-test_git.bb index f01d6513..7c3f9e1b 100644 --- a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr-test_git.bb +++ b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr-test_git.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "TI Multiproc Manager test code" +SUMMARY = "TI Multiproc Manager test code" include multiprocmgr.inc @@ -8,11 +8,6 @@ DEPENDS = "multiprocmgr cmem" RDEPENDS_${PN} = "multiprocmgr mpm-transport cmem" RDEPENDS_${PN} += "multiprocmgr-rtos-test bash" -CC += "-I${STAGING_KERNEL_DIR}/include" - -# Assuming the multiprocmgr kernel API is safe -CC[vardepsexclude] = "STAGING_KERNEL_DIR" - FILES_${PN} += "\ ${datadir}/ti/examples/mpm \ " diff --git a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr.inc b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr.inc index 40a20af9..64fb6f6f 100644 --- a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr.inc +++ b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr.inc @@ -9,10 +9,10 @@ MULTIPROCMGR_GIT_PROTOCOL = "git" MULTIPROCMGR_GIT_BRANCH = "master" # The following commits correspond to DEV.MPM-3.00.05.00 -MULTIPROCMGR_SRCREV = "f7fb3b7c21b3f6dd8b4adeef5df5be1824b9be73" +MULTIPROCMGR_SRCREV = "810d8a31c797d07abe808cb3fa89465fa934d4dd" PV = "3.0.5.0" -INC_PR = "r0" +INC_PR = "r1" BRANCH = "${MULTIPROCMGR_GIT_BRANCH}" SRC_URI = "${MULTIPROCMGR_GIT_URI};protocol=${MULTIPROCMGR_GIT_PROTOCOL};branch=${BRANCH}" diff --git a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch deleted file mode 100644 index 25deedcc..00000000 --- a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 17c307ff6e67af43f243366baa2ccc01f89cdddd Mon Sep 17 00:00:00 2001 -From: Denys Dmytriyenko -Date: Mon, 23 Apr 2018 15:35:44 -0400 -Subject: [PATCH] mpmdlif.c: don't hardcode kernel's "uapi" location - keystone_remoteproc.h - -Signed-off-by: Denys Dmytriyenko ---- - src/daemon/mpmdlif.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/daemon/mpmdlif.c b/src/daemon/mpmdlif.c -index 0c31604..d287bbc 100644 ---- a/src/daemon/mpmdlif.c -+++ b/src/daemon/mpmdlif.c -@@ -47,7 +47,7 @@ - #include - - #define _LINUX_TYPES_H --#include "uapi/linux/keystone_remoteproc.h" -+#include "linux/keystone_remoteproc.h" - #include "internal/rsc_types.h" - //#include - // #define LOADER_DEBUG --- -2.7.4 - diff --git a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr_git.bb b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr_git.bb index 6143341d..07512603 100644 --- a/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr_git.bb +++ b/bsp/meta-ti/recipes-ti/multiprocmgr/multiprocmgr_git.bb @@ -1,11 +1,10 @@ -DESCRIPTION = "TI Multiproc Manager for KeyStone II" -SUMMARY = "Provides download, debug and other utilities for other cores in the SOC like DSP" +SUMMARY = "TI Multiproc Manager for KeyStone II" +DESCRIPTION = "Provides download, debug and other utilities for other cores in the SOC like DSP" include multiprocmgr.inc SRC_URI += " \ file://mpmsrv-daemon.service \ - file://0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch \ " PR = "${INC_PR}.2" @@ -14,8 +13,6 @@ DEPENDS = "mpm-transport libdaemon virtual/kernel cmem" PACKAGE_ARCH = "${MACHINE_ARCH}" -CC += "-I${STAGING_KERNEL_DIR}/include -I${STAGING_KERNEL_DIR}/include/uapi" - INITSCRIPT_NAME = "mpmsrv-daemon.sh" INITSCRIPT_PARAMS = "defaults 10" diff --git a/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.61.01.01.bb b/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.61.01.01.bb deleted file mode 100644 index f120f2fe..00000000 --- a/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.61.01.01.bb +++ /dev/null @@ -1,16 +0,0 @@ -require ti-ndk.inc - -PV = "3_61_01_01" -PR = "r0" - -LIC_FILES_CHKSUM = "file://manifest_ndk_${PV}.html;md5=871c716abcf52bac5a7c23154eaba3b6" - -SRC_URI[ndkzip.md5sum] = "87f0494c9faee344fe93ae68e71ca189" -SRC_URI[ndkzip.sha256sum] = "3bfca50367432603ebc1d53d9185302bb4fa4558ac766696f086dc7a5a2ccd29" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_SYSROOT_STRIP = "1" - -COMPATIBLE_HOST ?= "null" -COMPATIBLE_HOST_ti-soc = "(.*)" diff --git a/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.75.01.01.bb b/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.75.01.01.bb new file mode 100644 index 00000000..812fbb31 --- /dev/null +++ b/bsp/meta-ti/recipes-ti/ndk/ti-ndk_3.75.01.01.bb @@ -0,0 +1,14 @@ +require ti-ndk.inc + +PV = "3_75_01_01" + +LIC_FILES_CHKSUM = "file://manifest_ndk_${PV}.html;md5=ef952a30d0f1640e886bb4b60618f352" + +SRC_URI[ndkzip.sha256sum] = "fd2318f0490a3eb342bc16812f30394107f098a12704c11cd9a5dc3d5a0bba64" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_SYSROOT_STRIP = "1" + +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST_ti-soc = "(.*)" diff --git a/bsp/meta-ti/recipes-ti/ns/ti-ns_2.60.01.06.bb b/bsp/meta-ti/recipes-ti/ns/ti-ns_2.60.01.06.bb deleted file mode 100644 index d86fcd5f..00000000 --- a/bsp/meta-ti/recipes-ti/ns/ti-ns_2.60.01.06.bb +++ /dev/null @@ -1,14 +0,0 @@ -require ti-ns.inc - -PV = "2_60_01_06" -PR = "r0" -SRC_URI = "http://software-dl.ti.com/targetcontent/ns/${PV}/exports/ns_${PV}.zip;name=nszip" - -LIC_FILES_CHKSUM = "file://manifest_ns_${PV}.html;md5=e15dc261b0ef14c6fbabba24abcde4f0" - -SRC_URI[nszip.md5sum] = "b78d86423e9c4d148be5fba5903cc2c7" -SRC_URI[nszip.sha256sum] = "f66b2fda6ab02585020e67d84897305209f3e141847581a214ccf123c3f15f00" - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_SYSROOT_STRIP = "1" diff --git a/bsp/meta-ti/recipes-ti/ns/ti-ns_2.75.00.17.bb b/bsp/meta-ti/recipes-ti/ns/ti-ns_2.75.00.17.bb new file mode 100644 index 00000000..0d0bb544 --- /dev/null +++ b/bsp/meta-ti/recipes-ti/ns/ti-ns_2.75.00.17.bb @@ -0,0 +1,13 @@ +require ti-ns.inc + +PV = "2_75_00_17" + +SRC_URI = "http://software-dl.ti.com/targetcontent/ns/${PV}/exports/ns_${PV}.zip;name=nszip" + +LIC_FILES_CHKSUM = "file://manifest_ns_${PV}.html;md5=d6a172fb0625f2ddf7d0cbfded273898" + +SRC_URI[nszip.sha256sum] = "612cbaf9b91c978b39cf370f7ef721596c36141575ca74da76b025beef4d9a03" + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_SYSROOT_STRIP = "1" diff --git a/bsp/meta-ti/recipes-ti/openmp-rtos/openmp-rtos_git.bb b/bsp/meta-ti/recipes-ti/openmp-rtos/openmp-rtos_git.bb index 67d9edf5..0c93f354 100644 --- a/bsp/meta-ti/recipes-ti/openmp-rtos/openmp-rtos_git.bb +++ b/bsp/meta-ti/recipes-ti/openmp-rtos/openmp-rtos_git.bb @@ -4,6 +4,11 @@ LICENSE = "BSD" require recipes-ti/includes/ti-paths.inc +inherit features_check + +REQUIRED_MACHINE_FEATURES = "dsp" +REQUIRED_DISTRO_FEATURES = "openmp" + PV = "2_06_03_00" PR = "r0" diff --git a/bsp/meta-ti/recipes-ti/ti-softhsmv2/ti-softhsmv2_git.bb b/bsp/meta-ti/recipes-ti/ti-softhsmv2/ti-softhsmv2_git.bb deleted file mode 100644 index d281a515..00000000 --- a/bsp/meta-ti/recipes-ti/ti-softhsmv2/ti-softhsmv2_git.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "TI softhsmv2 package" -LICENSE = "BSD-2-Clause | BSD-3-Clause | ISC | IBM-License | FSFULLR | Zlib" -LIC_FILES_CHKSUM = "file://LICENSE;md5=700a883962ccff663f888f3f7221ce8f" -SECTION = "libs" - -mntdir = "/mnt" - -inherit autotools pkgconfig - -DEPENDS = "openssl10 libdaemon zlib" -COMPATIBLE_MACHINE = "keystone" - -BRANCH = "ti-softhsm-rebase" -SRC_URI = "git://git.ti.com/keystone-linux/ti-softhsmv2.git;protocol=git;branch=${BRANCH}" -#Following commit corresponds to tag DEV.SOFTHSM-02.00.00.00 -SRCREV = "b0eef602c03583e59c289ba113b64eaa4f5cac13" -PV = "2.0.0.0" -PR = "r0" - -S = "${WORKDIR}/git" - -CFLAGS += "-mno-unaligned-access" -CPPFLAGS += "-mno-unaligned-access" - -EXTRA_OECONF += " \ - --with-zlib=${STAGING_EXECPREFIXDIR} \ - --with-openssl=${STAGING_EXECPREFIXDIR} \ -" - -INITSCRIPT_NAME = "softhsm-daemon.sh" -INITSCRIPT_PARAMS = "defaults 10" - -inherit update-rc.d - -FILES_${PN} += "${libdir}/softhsm/lib*.so.* ${mntdir}/*" -FILES_${PN}-dbg += "${libdir}/softhsm/.debug" -FILES_${PN}-staticdev += "${libdir}/softhsm/*.a" -FILES_${PN}-dev += "${libdir}/softhsm/*.la ${libdir}/softhsm/lib*.so" - -INSANE_SKIP_${PN}-dev = "dev-elf" - -do_install_append() { - install -d ${D}${mntdir}/securedbv0 - install -d ${D}${mntdir}/securedbv1 - - install -d ${D}${sysconfdir}/init.d/ - install -c -m 755 ${S}/src/bin/daemon/softhsm-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} -} diff --git a/bsp/meta-ti/wic/sdimage-2part.wks b/bsp/meta-ti/wic/sdimage-2part.wks new file mode 100644 index 00000000..77d6f7b5 --- /dev/null +++ b/bsp/meta-ti/wic/sdimage-2part.wks @@ -0,0 +1,6 @@ +# short-description: Create SD card image with 2 partitions +# long-description: Creates a partitioned SD card image for TI platforms. +# Boot files are located in the first vfat partition with extra reserved space. + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 1024 --extra-space 100M --use-uuid +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 1024 --use-uuid -- cgit 1.2.3-korg