diff --git a/README.md b/README.md index 084a62221..6dd5b08db 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Digi Embedded Yocto (DEY) 2.6 -## Release 2.6-r1.3 +## Release 2.6-r2 This document provides information about Digi Embedded Yocto, Digi International's professional embedded Yocto development environment. diff --git a/meta-digi-arm/classes/boot-artifacts.bbclass b/meta-digi-arm/classes/boot-artifacts.bbclass new file mode 100644 index 000000000..f0195bd8c --- /dev/null +++ b/meta-digi-arm/classes/boot-artifacts.bbclass @@ -0,0 +1,50 @@ +# Class for the generation of boot artifacts + +# This function returns a list with the RAM_CONFIGS that match the RAM size +# in the list of UBOOT_CONFIG +def get_uboot_ram_combinations(d): + import re + + types = d.getVar('UBOOT_CONFIG', True) or "" + ram_configs = d.getVar('RAM_CONFIGS', True) or "" + + # Convert to arrays + types = types.split(" ") + ram_configs = ram_configs.split(" ") + + # Obtain the list of RAM_CONFIGS for whose RAM size there is a match + # in UBOOT_CONFIG + matches = [] + for type in types: + ramsize = re.search("([0-9]*[G|M]B)", type).group(1) + for ramc in ram_configs: + if ramsize in ramc: + matches.append(ramc) + + return " ".join(matches) + +UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}" + +# This function returns a list with the bootable artifacts +def get_bootable_artifacts(d): + import re + + types = d.getVar('UBOOT_CONFIG', True) or "" + ram_configs = d.getVar('RAM_CONFIGS', True) or "" + uboot_prefix = d.getVar('UBOOT_PREFIX', True) or "" + uboot_suffix = d.getVar('UBOOT_SUFFIX', True) or "" + artifacts = [] + + # For platforms without RAM_CONFIGS, build the artifacts from UBOOT_CONFIG + if ram_configs == "": + for t in types.split(" "): + artifacts.append("%s-%s.%s" % (uboot_prefix, t, uboot_suffix)) + return " ".join(artifacts) + else: + machine = d.getVar('MACHINE', True) or "" + ram_combinations = get_uboot_ram_combinations(d) + for ramc in ram_combinations.split(" "): + artifacts.append("%s-%s-%s.%s" % (uboot_prefix, machine, ramc, uboot_suffix)) + return " ".join(artifacts) + +BOOTABLE_ARTIFACTS = "${@get_bootable_artifacts(d)}" diff --git a/meta-digi-arm/classes/fsl-eula-graphics.bbclass b/meta-digi-arm/classes/fsl-eula-graphics.bbclass new file mode 100644 index 000000000..1feb7bb56 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula-graphics.bbclass @@ -0,0 +1,9 @@ +# fsl-eula-graphics.bbclass extends the naming scheme in fsl-eula.bbclass +# to allow for graphics-backend-specific archives. +IMX_PACKAGE_NAME_APPEND = "" +IMX_PACKAGE_NAME_APPEND_class-target = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', '-x11', \ + '-fb', d), d)}" +IMX_PACKAGE_NAME_append_class-target = "${IMX_PACKAGE_NAME_APPEND}" +SRC_URI_NAME_append_class-target = "${IMX_PACKAGE_NAME_APPEND}" diff --git a/meta-digi-arm/classes/fsl-eula-unpack.bbclass b/meta-digi-arm/classes/fsl-eula-unpack.bbclass new file mode 100644 index 000000000..e33ed07c9 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula-unpack.bbclass @@ -0,0 +1,68 @@ +# fsl-eula-unpack.bbclass provides the mechanism used for unpacking +# the .bin file downloaded by HTTP and handle the EULA acceptance. +# +# To use it, the 'fsl-eula' parameter needs to be added to the +# SRC_URI entry, e.g: +# +# SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true" + +LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=72c0f70181bb6e83eee6aab8de12a9f3" + +LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE" + +python fsl_bin_do_unpack() { + src_uri = (d.getVar('SRC_URI', True) or "").split() + if len(src_uri) == 0: + return + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + rootdir = localdata.getVar('WORKDIR', True) + fetcher = bb.fetch2.Fetch(src_uri, localdata) + + 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) + + # Return to the previous directory + os.chdir(save_cwd) +} + +python do_unpack() { + eula = d.getVar('ACCEPT_FSL_EULA', True) + eula_file = d.getVar('FSL_EULA_FILE', True) + pkg = d.getVar('PN', True) + 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: " + "ACCEPT_FSL_EULA = \"1\" in your local.conf." % (pkg, eula_file)) + elif eula == '0': + bb.fatal("To use '%s' you need to accept the Freescale EULA." % pkg) + else: + bb.note("Freescale EULA has been accepted for '%s'" % pkg) + + # The binary unpack needs to be done first so 'S' is valid + bb.build.exec_func('fsl_bin_do_unpack', d) + + try: + bb.build.exec_func('base_do_unpack', d) + except: + raise +} + +do_unpack[vardepsexclude] += "FSL_EULA_FILE" diff --git a/meta-digi-arm/classes/fsl-eula-unpack2.bbclass b/meta-digi-arm/classes/fsl-eula-unpack2.bbclass index a3c8e668f..b5f2f651c 100644 --- a/meta-digi-arm/classes/fsl-eula-unpack2.bbclass +++ b/meta-digi-arm/classes/fsl-eula-unpack2.bbclass @@ -1,33 +1 @@ -# fsl-eula-unpack2.bbclass provides a mechanism for a) unpacking certain -# EULA-licensed archives downloaded by HTTP and b) handling the EULA -# acceptance. - -inherit fsl-eula-unpack fsl-eula - -IMX_PACKAGE_VERSION = "${PV}" - -SRC_URI = "${FSL_MIRROR}${IMX_PACKAGE_NAME}.bin;name=${SRC_URI_NAME};fsl-eula=true" - -S = "${WORKDIR}/${IMX_PACKAGE_NAME}" - -# For native apps, insert the user-local sysroot path -# For nativesdk apps, insert the correct distro folder -D_SUBDIR = "" -D_SUBDIR_class-native = "${STAGING_DIR_NATIVE}" -D_SUBDIR_class-nativesdk = "/opt/${DISTRO}" - -# SCR is the location and name of the Software Content Register file -# relative to ${D}${D_SUBDIR}. -SCR = "SCR.txt" - -do_install () { - install -d ${D}${D_SUBDIR} - cp -r ${S}/* ${D}${D_SUBDIR} - rm ${D}${D_SUBDIR}/COPYING - if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then - bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\"" - fi - rm ${D}${D_SUBDIR}/${SCR} -} - -FILES_${PN} = "/" +inherit fsl-eula2-unpack2 fsl-eula2-package-arch diff --git a/meta-digi-arm/classes/fsl-eula.bbclass b/meta-digi-arm/classes/fsl-eula.bbclass index ec27fcde7..be31092b8 100644 --- a/meta-digi-arm/classes/fsl-eula.bbclass +++ b/meta-digi-arm/classes/fsl-eula.bbclass @@ -1,29 +1 @@ -# fsl-eula.bbclass defines a common naming scheme used by the -# packing and unpacking mechanisms defined in fsl-eula-pack.bbclass -# and fsl-eula-unpack2.bbclass. -# -# Note that it is not necessary to inherit this class directly. It is -# already inherited from fsl-eula-pack.bbclass and fsl-eula-unpack2.bbclass. -# -# The naming scheme takes into account the fact that a single software -# package can create many archives based on the combinations of a) target -# versus native/nativesdk components, and b) the target or native architecture. -# The naming scheme can be extended through regular bitbake means to allow -# configuration-specific archives, as can be seen in fsl-eula-graphics.bbclass. - -# The variable IMX_PACKAGE_NAME gives a unique name for every possible -# archive. The variable is built from a combination of the package name ${PN}, -# the version ${IMX_PACKAGE_VERSION} and the target or native architecture, -# ${TARGET_ARCH} or ${BUILD_ARCH}. -IMX_PACKAGE_NAME = "${PN}-${IMX_PACKAGE_VERSION}-${TARGET_ARCH}" -IMX_PACKAGE_NAME_class-native = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}" -IMX_PACKAGE_NAME_class-nativesdk = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}" - -# The variable SRC_URI_NAME gives a unique SRC_URI name option for use in -# unpacking recipes derived from fsl-eula-unpack2.bbclass. With this name, -# a single unpacking recipe can handle all possible archives. The name is -# built from with a combination of target or native architecture, -# ${TARGET_ARCH} or ${BUILD_ARCH}, and a native or nativesdk designation. -SRC_URI_NAME = "${TARGET_ARCH}" -SRC_URI_NAME_class-native = "${BUILD_ARCH}-native" -SRC_URI_NAME_class-nativesdk = "${BUILD_ARCH}-nativesdk" +inherit fsl-eula2 fsl-eula2-package-arch diff --git a/meta-digi-arm/classes/fsl-eula2-package-arch.bbclass b/meta-digi-arm/classes/fsl-eula2-package-arch.bbclass new file mode 100644 index 000000000..ff34c9b84 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula2-package-arch.bbclass @@ -0,0 +1,16 @@ +# fsl-eula-package_arch.bbclass extends the package naming scheme to allow +# a single software package to create multiple archives based on the +# combinations of a) target versus native/nativesdk components, and b) the +# target or native architecture. + +IMX_PACKAGE_NAME_append = "-${TARGET_ARCH}" +IMX_PACKAGE_NAME_class-native_append = "-${BUILD_ARCH}" +IMX_PACKAGE_NAME_class-nativesdk_append = "-${BUILD_ARCH}" + +SRC_URI_append = ";name=${SRC_URI_NAME}" +SRC_URI_NAME = "${TARGET_ARCH}" +SRC_URI_NAME_class-native = "${BUILD_ARCH}-native" +SRC_URI_NAME_class-nativesdk = "${BUILD_ARCH}-nativesdk" + +INSANE_SKIP_${PN}_remove = "arch" +INSANE_SKIP_${PN}-dbg_remove = "arch" diff --git a/meta-digi-arm/classes/fsl-eula2-unpack2.bbclass b/meta-digi-arm/classes/fsl-eula2-unpack2.bbclass new file mode 100644 index 000000000..29b05c4a6 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula2-unpack2.bbclass @@ -0,0 +1,36 @@ +# fsl-eula-unpack2.bbclass provides a mechanism for a) unpacking certain +# EULA-licensed archives downloaded by HTTP and b) handling the EULA +# acceptance. + +inherit fsl-eula-unpack fsl-eula2 + +IMX_PACKAGE_VERSION = "${PV}" + +SRC_URI = "${FSL_MIRROR}${IMX_PACKAGE_NAME}.bin;fsl-eula=true" + +S = "${WORKDIR}/${IMX_PACKAGE_NAME}" + +# For native apps, insert the user-local sysroot path +# For nativesdk apps, insert the correct distro folder +D_SUBDIR = "" +D_SUBDIR_class-native = "${STAGING_DIR_NATIVE}" +D_SUBDIR_class-nativesdk = "/opt/${DISTRO}" + +# SCR is the location and name of the Software Content Register file +# relative to ${D}${D_SUBDIR}. +SCR = "SCR.txt" + +do_install () { + install -d ${D}${D_SUBDIR} + cp -r ${S}/* ${D}${D_SUBDIR} + if [ -d "${D}/usr/lib" ] && [ "${D}/usr/lib" != "${D}${libdir}" ]; then + mv ${D}/usr/lib ${D}${libdir} + fi + rm ${D}${D_SUBDIR}/COPYING + if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then + bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\"" + fi + rm ${D}${D_SUBDIR}/${SCR} +} + +FILES_${PN} = "/" diff --git a/meta-digi-arm/classes/fsl-eula2.bbclass b/meta-digi-arm/classes/fsl-eula2.bbclass new file mode 100644 index 000000000..2d1afb256 --- /dev/null +++ b/meta-digi-arm/classes/fsl-eula2.bbclass @@ -0,0 +1,16 @@ +# fsl-eula2.bbclass defines a common naming scheme used by the +# packing and unpacking mechanisms defined in fsl-eula-pack.bbclass +# and fsl-eula2-unpack2.bbclass. +# +# Note that it is not necessary to inherit this class directly. It is +# already inherited from fsl-eula-pack.bbclass and fsl-eula2-unpack2.bbclass. +# +# The naming scheme can be extended through regular bitbake means to allow +# configuration-specific archives, as can be seen in fsl-eula-graphics.bbclass +# and fsl-eula2-package-arch.bbclass. +IMX_PACKAGE_NAME = "${BPN}-${IMX_PACKAGE_VERSION}" +IMX_PACKAGE_NAME_class-native = "${PN}-${IMX_PACKAGE_VERSION}" +IMX_PACKAGE_NAME_class-nativesdk = "${PN}-${IMX_PACKAGE_VERSION}" + +INSANE_SKIP_${PN} += "arch" +INSANE_SKIP_${PN}-dbg += "arch" diff --git a/meta-digi-arm/classes/image_types_digi.bbclass b/meta-digi-arm/classes/image_types_digi.bbclass index 1dbe358b3..bbfe2668d 100644 --- a/meta-digi-arm/classes/image_types_digi.bbclass +++ b/meta-digi-arm/classes/image_types_digi.bbclass @@ -3,6 +3,8 @@ inherit image_types ################################################################################ # BOOT IMAGES # ################################################################################ +BOOTLOADER_IMAGE_RECIPE ?= "u-boot" + def TRUSTFENCE_BOOTIMAGE_DEPENDS(d): tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or "" return "%s:do_image_complete" % tf_initramfs if tf_initramfs else "" @@ -11,7 +13,7 @@ do_image_boot_vfat[depends] += " \ coreutils-native:do_populate_sysroot \ dosfstools-native:do_populate_sysroot \ mtools-native:do_populate_sysroot \ - u-boot:do_deploy \ + ${BOOTLOADER_IMAGE_RECIPE}:do_deploy \ virtual/kernel:do_deploy \ ${@TRUSTFENCE_BOOTIMAGE_DEPENDS(d)} \ " @@ -74,7 +76,7 @@ do_image_boot_vfat[imgsuffix] = "." do_image_boot_ubifs[depends] += " \ mtd-utils-native:do_populate_sysroot \ - u-boot:do_deploy \ + ${BOOTLOADER_IMAGE_RECIPE}:do_deploy \ virtual/kernel:do_deploy \ ${@TRUSTFENCE_BOOTIMAGE_DEPENDS(d)} \ " @@ -144,7 +146,7 @@ IMAGE_TYPEDEP_recovery.vfat = "boot.vfat" do_image_recovery_ubifs[depends] += " \ mtd-utils-native:do_populate_sysroot \ - u-boot:do_deploy \ + ${BOOTLOADER_IMAGE_RECIPE}:do_deploy \ virtual/kernel:do_deploy \ ${RECOVERY_INITRAMFS_IMAGE}:do_image_complete \ " @@ -228,7 +230,6 @@ BOARD_BOOTIMAGE_PARTITION_SIZE ??= "65536" # SD card image name SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.sdcard" -IMAGE_BOOTLOADER ?= "u-boot" BOOTLOADER_SEEK ?= "1" SDIMG_BOOTLOADER ?= "${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}" @@ -241,7 +242,7 @@ do_image_sdcard[depends] = " \ dosfstools-native:do_populate_sysroot \ mtools-native:do_populate_sysroot \ parted-native:do_populate_sysroot \ - ${IMAGE_BOOTLOADER}:do_deploy \ + ${BOOTLOADER_IMAGE_RECIPE}:do_deploy \ virtual/kernel:do_deploy \ " diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf index e15fd9bd2..0d7f05cab 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-express.conf @@ -22,9 +22,9 @@ UBOOT_CONFIG[ccimx8x_sbc_express2GB] = "ccimx8x_sbc_express2GB_defconfig,,u-boot UBOOT_CONFIG[ccimx8x_sbc_express1GB] = "ccimx8x_sbc_express1GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" KERNEL_DEVICETREE ?= " \ - digi/ccimx8x-sbc-express-id129.dtb \ - digi/ccimx8x-sbc-express-wb.dtb \ - digi/ccimx8x-sbc-express.dtb \ + digi/ccimx8qxp-sbc-express-id129.dtb \ + digi/ccimx8qxp-sbc-express-wb.dtb \ + digi/ccimx8qxp-sbc-express.dtb \ " SERIAL_CONSOLES ?= "115200;ttyLP2" diff --git a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf index 60d23fa3f..6a5191ad3 100644 --- a/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf +++ b/meta-digi-arm/conf/machine/ccimx8x-sbc-pro.conf @@ -17,14 +17,17 @@ MACHINE_FIRMWARE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware- # U-Boot configurations # Last one is the default (the one the symlinks point at) -UBOOT_CONFIG ??= "ccimx8x_sbc_pro1GB ccimx8x_sbc_pro2GB" +UBOOT_CONFIG ??= "ccimx8x_sbc_pro512MB ccimx8x_sbc_pro1GB ccimx8x_sbc_pro2GB" UBOOT_CONFIG[ccimx8x_sbc_pro2GB] = "ccimx8x_sbc_pro2GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" UBOOT_CONFIG[ccimx8x_sbc_pro1GB] = "ccimx8x_sbc_pro1GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" +UBOOT_CONFIG[ccimx8x_sbc_pro512MB] = "ccimx8x_sbc_pro512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}" KERNEL_DEVICETREE ?= " \ - digi/ccimx8x-sbc-pro-id135.dtb \ - digi/ccimx8x-sbc-pro-wb.dtb \ - digi/ccimx8x-sbc-pro.dtb \ + digi/ccimx8dx-sbc-pro-wb.dtb \ + digi/ccimx8dx-sbc-pro.dtb \ + digi/ccimx8qxp-sbc-pro-id135.dtb \ + digi/ccimx8qxp-sbc-pro-wb.dtb \ + digi/ccimx8qxp-sbc-pro.dtb \ " SERIAL_CONSOLES ?= "115200;ttyLP2" diff --git a/meta-digi-arm/conf/machine/include/ccimx6.inc b/meta-digi-arm/conf/machine/include/ccimx6.inc index 7290c136a..0e4240e1a 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6.inc @@ -9,8 +9,8 @@ include conf/machine/include/imx-digi-base.inc include conf/machine/include/tune-cortexa9.inc # Platform u-boot settings +UBOOT_PREFIX = "u-boot" UBOOT_SUFFIX = "imx" -UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}" # Linux kernel configuration KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig" @@ -18,6 +18,9 @@ KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig" # Wireless external module WIRELESS_MODULE ?= "" +# Use our recipe of linux-imx-headers instead of the meta-freescale one +PREFERRED_VERSION_linux-imx-headers ?= "4.9" + # Firmware MACHINE_FIRMWARE ?= "firmware-imx-sdma" MACHINE_FIRMWARE_append_mx6q = " firmware-imx-vpu-imx6q" @@ -37,4 +40,4 @@ MACHINE_EXTRA_RRECOMMENDS += " \ cryptodev-module \ " -MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth" +MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth pci" diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index d94739598..fda7ce35d 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -9,8 +9,8 @@ include conf/machine/include/imx-digi-base.inc include conf/machine/include/tune-cortexa7.inc # Platform u-boot settings +UBOOT_PREFIX = "u-boot" UBOOT_SUFFIX = "imx" -UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}" # Wireless external module WIRELESS_MODULE ?= "" diff --git a/meta-digi-arm/conf/machine/include/ccimx8x.inc b/meta-digi-arm/conf/machine/include/ccimx8x.inc index 045fe8b10..0caea5a08 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8x.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8x.inc @@ -9,15 +9,22 @@ include conf/machine/include/imx-digi-base.inc include conf/machine/include/arm/arch-arm64.inc # Platform u-boot settings +UBOOT_PREFIX = "imx-boot" UBOOT_SUFFIX = "bin" -UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}" # The bootloader image that gets flashed consists of U-Boot and several fw binaries EXTRA_IMAGEDEPENDS = "imx-boot" -IMAGE_BOOTLOADER = "imx-boot" +BOOTLOADER_IMAGE_RECIPE = "imx-boot" # BOOTLOADER_SEEK is 33 for step A of the silicon and 32 for step B BOOTLOADER_SEEK = "32" -SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/imx-boot-${MACHINE}.bin" +BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin" +SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}" + +# RAM variants +# This determines the number of different DCD files, and thus the number of +# different U-Boot binaries required. +# Last one is the default (the one the symlinks point at) +RAM_CONFIGS = "1.2GHz_512MB_16bit 1.2GHz_1GB_16bit 1.2GHz_1GB_32bit 1.2GHz_2GB_32bit" # Linux kernel configuration KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8x_defconfig" @@ -44,7 +51,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \ cryptoauthlib \ " -MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip" +MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip pci" # AARCH64 doesn't support self-extracting zImage KERNEL_IMAGETYPE = "Image.gz" diff --git a/meta-digi-arm/conf/machine/include/digi-defaults.inc b/meta-digi-arm/conf/machine/include/digi-defaults.inc index 3d229dd1e..0063dbc43 100644 --- a/meta-digi-arm/conf/machine/include/digi-defaults.inc +++ b/meta-digi-arm/conf/machine/include/digi-defaults.inc @@ -50,3 +50,7 @@ USE_VT ?= "0" # Add the machine variant to the valid machine override MACHINE_VARIANT ?= "" MACHINEOVERRIDES .= "${@['', ':${MACHINE_VARIANT}']['${MACHINE_VARIANT}' != '']}" + +# U-Boot symlink +UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}" +BOOTABLE_ARTIFACTS ?= "" diff --git a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.1.bb b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.1.bb deleted file mode 100644 index 7feaf1b57..000000000 --- a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.1.bb +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Copyright (C) 2018-2019 Digi International. - -DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" -SECTION = "BSP" - -inherit pkgconfig deploy - -SRC_URI = "${DIGI_PKG_SRC}/${PN}-${PV}.tar.gz" - -SRC_URI[md5sum] = "bc8b696ea4f75747bed9fabd352f9596" -SRC_URI[sha256sum] = "e3cf8163a02d71e06bbf64ea50e3a661dbecf60a57ff890d3dc1ee9ffdcda9ee" - -S = "${WORKDIR}/${PN}-${PV}" - -SC_FIRMWARE_NAME ?= "mx8qx-${DIGI_FAMILY}-scfw-tcm.bin" -symlink_name = "scfw_tcm.bin" - -SYSROOT_DIRS += "/boot" - -do_install () { - install -d ${D}/boot - for type in ${UBOOT_CONFIG}; do - RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" - install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${D}/boot/ - done -} - -BOOT_TOOLS = "imx-boot-tools" - -do_deploy () { - install -d ${DEPLOYDIR}/${BOOT_TOOLS} - for type in ${UBOOT_CONFIG}; do - RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" - install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${DEPLOYDIR}/${BOOT_TOOLS}/ - cd ${DEPLOYDIR}/${BOOT_TOOLS}/ - rm -f ${symlink_name}-${RAM_SIZE} - ln -sf ${SC_FIRMWARE_NAME}-${RAM_SIZE} ${symlink_name}-${RAM_SIZE} - cd - - done -} - -addtask deploy after do_install - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -FILES_${PN} = "/boot" - -COMPATIBLE_MACHINE = "(ccimx8x)" diff --git a/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.2.2.2.bb b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.2.2.2.bb new file mode 100644 index 000000000..761216a0f --- /dev/null +++ b/meta-digi-arm/recipes-bsp/digi-sc-firmware/digi-sc-firmware_1.2.2.2.bb @@ -0,0 +1,52 @@ +# Copyright (C) 2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Copyright (C) 2018-2019 Digi International. + +DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb0303e4ee8b0e71c094171e2272bd44" +SECTION = "BSP" + +inherit pkgconfig deploy + +SRC_URI = "${DIGI_PKG_SRC}/${PN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "3cf34f428d9a0e98ffc7f0cd326d5dc8" +SRC_URI[sha256sum] = "5b0022857fdcbbd4c641f3753d99b8afa8f605b798be3dfd8433696657911f86" + +S = "${WORKDIR}/${PN}-${PV}" + +SC_FIRMWARE_NAME ?= "mx8x-${DIGI_FAMILY}-scfw-tcm.bin" +symlink_name = "scfw_tcm.bin" + +SYSROOT_DIRS += "/boot" + +do_install () { + install -d ${D}/boot + for ramc in ${RAM_CONFIGS}; do + install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${D}/boot/ + done +} + +BOOT_TOOLS = "imx-boot-tools" + +do_deploy () { + install -d ${DEPLOYDIR}/${BOOT_TOOLS} + for ramc in ${RAM_CONFIGS}; do + install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${DEPLOYDIR}/${BOOT_TOOLS}/ + cd ${DEPLOYDIR}/${BOOT_TOOLS}/ + rm -f ${symlink_name}-${ramc} + ln -sf ${SC_FIRMWARE_NAME}-${ramc} ${symlink_name}-${ramc} + cd - + done +} + +addtask deploy after do_install + +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} = "/boot" + +COMPATIBLE_MACHINE = "(ccimx8x)" diff --git a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.0.bb b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.3.bb similarity index 59% rename from meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.0.bb rename to meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.3.bb index 5b6f61203..599efb4df 100644 --- a/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.0.bb +++ b/meta-digi-arm/recipes-bsp/firmware-imx/firmware-imx_8.3.bb @@ -1,71 +1,28 @@ # Copyright (C) 2012-2016 Freescale Semiconductor # Copyright (C) 2018 O.S. Systems Software LTDA. -# Copyright 2017-2018 NXP +# Copyright 2017-2019 NXP SUMMARY = "Freescale IMX firmware" DESCRIPTION = "Freescale IMX firmware such as for the VPU" SECTION = "base" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" PE = "1" -SRCBRANCH ?= "master" +SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true " -#BRCM firmware v1.141.100.6 -IMX_FIRMWARE_SRC ?= "git://github.com/NXP/imx-firmware.git;protocol=https" -SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \ - ${IMX_FIRMWARE_SRC};branch=${SRCBRANCH};destsuffix=${S}/git " - -SRC_URI[md5sum] = "b8ae7cdd2a648168f1c90471ca87f6ba" -SRC_URI[sha256sum] = "63ec62f5d229cbed00918c8449173933f1c9d594c59396b8dd217e94f47138b0" - -#BRCM firmware git -SRCREV = "8ce9046f5058fdd2c5271f86ccfc61bc5a248ae3" +SRC_URI[md5sum] = "776c7fa64a6e96d9f0d9cd50bbf79ffc" +SRC_URI[sha256sum] = "48e4b9e4064930e2b6cd7f20f39177c8f4c5ef1a296f2ebc6ed422412ab56681" inherit fsl-eula-unpack allarch do_install() { install -d ${D}${base_libdir}/firmware/imx - install -d ${D}${base_libdir}/firmware/bcm - install -d ${D}${sysconfdir}/firmware cp -rfv firmware/* ${D}${base_libdir}/firmware/ - #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/ - - #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/ - - #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/ - - #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/ - - #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 - # Install SDMA Firmware: sdma-imx6q.bin & sdma-imx7d.bin into lib/firmware/imx/sdma install -d ${D}${base_libdir}/firmware/imx/sdma mv ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma @@ -87,6 +44,8 @@ do_install() { 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 + mv ${D}${base_libdir}/firmware/easrc/ ${D}${base_libdir}/firmware/imx/easrc/ + find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';' find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';' @@ -144,9 +103,9 @@ ALLOW_EMPTY_${PN} = "1" PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*" -PACKAGES =+ "${PN}-epdc ${PN}-brcm ${PN}-scfw ${PN}-sdma" +PACKAGES =+ "${PN}-epdc ${PN}-scfw ${PN}-sdma ${PN}-easrc" 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/" FILES_${PN}-sdma = " ${base_libdir}/firmware/imx/sdma" +FILES_${PN}-easrc = "${base_libdir}/firmware/imx/easrc/" diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb index 383c60370..474713043 100644 --- a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb +++ b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb @@ -18,9 +18,9 @@ FW_QUALCOMM_BT = " \ FW_QCA6564_WIFI_PROPRIETARY = " \ file://bdwlan30_US.bin \ file://LICENCE.atheros_firmware \ - file://otp30.bin \ - file://qwlan30.bin \ - file://utf30.bin \ + file://qca6564_proprietary/otp30.bin \ + file://qca6564_proprietary/qwlan30.bin \ + file://qca6564_proprietary/utf30.bin \ " # Firmware files for QCA6574 (Qualcomm proprietary driver) diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/otp30.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/otp30.bin similarity index 100% rename from meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/otp30.bin rename to meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/otp30.bin diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/qwlan30.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/qwlan30.bin new file mode 100644 index 000000000..6d7e653b1 Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/qwlan30.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/utf30.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/utf30.bin similarity index 50% rename from meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/utf30.bin rename to meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/utf30.bin index 3dedbae77..7f9f6589e 100644 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/utf30.bin and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6564_proprietary/utf30.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/nvm_tlv_3.2.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/nvm_tlv_3.2.bin old mode 100755 new mode 100644 diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/rampatch_tlv_3.2.tlv b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/rampatch_tlv_3.2.tlv old mode 100755 new mode 100644 index fbe5543e0..86dffcaa1 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/rampatch_tlv_3.2.tlv and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_bt/rampatch_tlv_3.2.tlv differ diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/qwlan30.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/qwlan30.bin index 54bb0c052..10c20eac4 100644 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/qwlan30.bin and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/qwlan30.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/utf.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/utf.bin index 0609ff55a..768150396 100644 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/utf.bin and b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qca6574_proprietary/utf.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qwlan30.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qwlan30.bin deleted file mode 100644 index 536a4ba1b..000000000 Binary files a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/qwlan30.bin and /dev/null differ diff --git a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_1.5.0.bbappend b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_1.5.0.bbappend deleted file mode 100644 index 9ab208a93..000000000 --- a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_1.5.0.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2019 Digi International. - -# Use the v4.14 ga BSP branch -SRCBRANCH = "imx_4.14.78_1.0.0_ga" -SRCREV = "d6451cc1e162eff89b03dd63e86d55b9baa8885b" diff --git a/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb new file mode 100644 index 000000000..12cd3096f --- /dev/null +++ b/meta-digi-arm/recipes-bsp/imx-atf/imx-atf_2.0.bb @@ -0,0 +1,83 @@ +# 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" + +inherit fsl-eula-unpack pkgconfig deploy + +PV = "2.0+git${SRCPV}" + +ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https" +SRCBRANCH = "imx_4.14.98_2.1.0" + +SRC_URI = "${ATF_SRC};branch=${SRCBRANCH}" +SRCREV = "727cf896a4c79d152dae4537e28400c747bf39b9" + +S = "${WORKDIR}/git" + +BOOT_TOOLS = "imx-boot-tools" + +SOC_ATF ?= "imx8qm" +SOC_ATF_mx8qm = "imx8qm" +SOC_ATF_mx8qxp = "imx8qx" +SOC_ATF_mx8mq = "imx8mq" +SOC_ATF_mx8mm = "imx8mm" +SOC_ATF_mx8mn = "imx8mn" + +SYSROOT_DIRS += "/boot" + +BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" + +do_compile () { + export CROSS_COMPILE="${TARGET_PREFIX}" + cd ${S} + # Clear LDFLAGS to avoid the option -Wl recognize issue + unset LDFLAGS + + echo "-> Build ${SOC_ATF} bl31.bin" + # Set BUIL_STRING with the revision info + BUILD_STRING="" + if [ -e ${S}/.revision ]; then + cur_rev=`cat ${S}/.revision` + echo " Current revision is ${cur_rev} ." + BUILD_STRING="BUILD_STRING=${cur_rev}" + else + echo " No .revision found! " + fi + oe_runmake clean PLAT=${SOC_ATF} + oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} bl31 + + # Build opteee version + if [ "${BUILD_OPTEE}" = "true" ]; then + oe_runmake clean PLAT=${SOC_ATF} BUILD_BASE=build-optee + oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} BUILD_BASE=build-optee SPD=opteed bl31 + fi + unset CROSS_COMPILE +} + +do_install () { + install -d ${D}/boot + install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin + # Install opteee version + if [ "${BUILD_OPTEE}" = "true" ]; then + install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin-optee + fi +} + +do_deploy () { + install -d ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin + # Deploy opteee version + if [ "${BUILD_OPTEE}" = "true" ]; then + install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin-optee + fi +} + +addtask deploy before do_install after do_compile + +FILES_${PN} = "/boot" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(mx8)" diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot/0001-iMX8QX-remove-SC_BD_FLAGS_ALT_CONFIG-flag-in-flash_r.patch b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot/0001-iMX8QX-remove-SC_BD_FLAGS_ALT_CONFIG-flag-in-flash_r.patch new file mode 100644 index 000000000..d5467c928 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot/0001-iMX8QX-remove-SC_BD_FLAGS_ALT_CONFIG-flag-in-flash_r.patch @@ -0,0 +1,31 @@ +From: Gabriel Valcazar +Date: Fri, 19 Jul 2019 10:42:35 +0200 +Subject: [PATCH] iMX8QX: remove SC_BD_FLAGS_ALT_CONFIG flag in + flash_regression_linux_m4 target + +This flag breaks the ccimx8x U-Boot due to the code that is executed in the +SCFW when it's set. Make the build command the same as the "flash_all" target +in the rel_imx_4.14.78_1.0.0_ga tag, since the M4 demos still seem to work as +expected when the flag is removed. The "-p3" parameter also needs to be removed +for the images to boot properly. + +https://jira.digi.com/browse/DEL-6677 + +Signed-off-by: Gabriel Valcazar +--- + iMX8QX/soc.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iMX8QX/soc.mak b/iMX8QX/soc.mak +index 3c8e7b1..f06ece8 100755 +--- a/iMX8QX/soc.mak ++++ b/iMX8QX/soc.mak +@@ -114,7 +114,7 @@ flash_linux_m4_xip: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf-co + ./$(QSPI_PACKER) $(QSPI_HEADER) + + flash_regression_linux_m4: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin m4_image.bin +- ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin ++ ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin + + flash_regression_linux_m4_ddr: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin m4_image.bin + ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x88000000 -out flash.bin diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bbappend b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bbappend index 5bdb21502..4efffd116 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bbappend +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-boot_0.2.bbappend @@ -1,4 +1,12 @@ # Copyright 2019 Digi International, Inc. +inherit boot-artifacts + +# Use the v4.14 ga BSP branch +SRCBRANCH = "imx_4.14.98_2.0.0_ga" +SRCREV = "dd0234001713623c79be92b60fa88bc07b07f24f" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append_ccimx8x = " file://0001-iMX8QX-remove-SC_BD_FLAGS_ALT_CONFIG-flag-in-flash_r.patch" IMX_EXTRA_FIRMWARE_ccimx8x = "digi-sc-firmware" @@ -26,53 +34,62 @@ do_populate_lic[depends] += " \ ${@' '.join('%s:do_populate_lic' % r for r in '${IMX_M4_DEMOS}'.split() )} \ firmware-imx:do_populate_lic \ " - -UBOOT_NAME = "u-boot-${MACHINE}.bin" -BOOT_CONFIG_MACHINE = "${BOOT_NAME}" +ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin" IMXBOOT_TARGETS_ccimx8x = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \ - bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \ - 'flash flash_all', d), d)}" + 'flash flash_regression_linux_m4', d)}" do_compile () { bbnote 8QX boot binary build cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/m40_tcm.bin - cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/CM4.bin + cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/m4_image.bin cp ${DEPLOY_DIR_IMAGE}/mx8qx-ahab-container.img ${BOOT_STAGING}/ cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin for type in ${UBOOT_CONFIG}; do - RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_NAME}-${type} ${BOOT_STAGING}/u-boot.bin-${type} - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${BOOT_STAGING}/scfw_tcm.bin-${RAM_SIZE} + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/ + done + for ramc in ${RAM_CONFIGS}; do + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${ramc} ${BOOT_STAGING}/ done # mkimage for i.MX8 for type in ${UBOOT_CONFIG}; do - cd ${BOOT_STAGING} - ln -sf u-boot.bin-${type} u-boot.bin - RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')" - ln -sf scfw_tcm.bin-${RAM_SIZE} scfw_tcm.bin - cd - - for target in ${IMXBOOT_TARGETS}; do - bbnote "building ${SOC_TARGET} - ${type} - ${target}" - make SOC=${SOC_TARGET} ${target} - if [ -e "${BOOT_STAGING}/flash.bin" ]; then - cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} + RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')" + for ramc in ${RAM_CONFIGS}; do + if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then + # Match U-Boot memory size and and SCFW memory configuration + cd ${BOOT_STAGING} + ln -sf u-boot-${type}.bin u-boot.bin + ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin + cd - + for target in ${IMXBOOT_TARGETS}; do + bbnote "building ${SOC_TARGET} - ${ramc} - ${target}" + make SOC=${SOC_TARGET} ${target} + if [ -e "${BOOT_STAGING}/flash.bin" ]; then + cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} + fi + SCFWBUILT="yes" + done + rm ${BOOT_STAGING}/scfw_tcm.bin + rm ${BOOT_STAGING}/u-boot.bin + # Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot + rm ${BOOT_STAGING}/u-boot-atf.bin + rm ${BOOT_STAGING}/u-boot-hash.bin fi done - rm ${BOOT_STAGING}/scfw_tcm.bin - rm ${BOOT_STAGING}/u-boot.bin - # Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot - rm ${BOOT_STAGING}/u-boot-atf.bin - rm ${BOOT_STAGING}/u-boot-hash.bin done + + # Check that SCFW was built at least once + if [ "${SCFWBUILT}" != "yes" ]; then + bbfatal "SCFW was not built!" + fi } do_install () { install -d ${D}/boot - for type in ${UBOOT_CONFIG}; do + for ramc in ${UBOOT_RAM_COMBINATIONS}; do for target in ${IMXBOOT_TARGETS}; do - install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} ${D}/boot/ + install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${D}/boot/ done done } @@ -83,14 +100,17 @@ do_deploy () { # copy the tool mkimage to deploy path and sc fw, dcd and uboot install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/m40_tcm.bin ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${BOOT_STAGING}/CM4.bin ${DEPLOYDIR}/${BOOT_TOOLS} + install -m 0644 ${BOOT_STAGING}/m4_image.bin ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} # copy makefile (soc.mak) for reference install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} + # Move all M4 demo artifacts to the imx-boot-tools folder + mv ${DEPLOY_DIR_IMAGE}/imx8qx_m4_* ${DEPLOYDIR}/${BOOT_TOOLS}/ + # copy the generated boot image to deploy path - for type in ${UBOOT_CONFIG}; do + for ramc in ${UBOOT_RAM_COMBINATIONS}; do IMAGE_IMXBOOT_TARGET="" for target in ${IMXBOOT_TARGETS}; do # Use first "target" as IMAGE_IMXBOOT_TARGET @@ -98,12 +118,14 @@ do_deploy () { IMAGE_IMXBOOT_TARGET="$target" echo "Set boot target as $IMAGE_IMXBOOT_TARGET" fi - install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} ${DEPLOYDIR} + install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${DEPLOYDIR} done - cd ${DEPLOYDIR} - ln -sf ${BOOT_CONFIG_MACHINE}-${type}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOT_CONFIG_MACHINE}-${type}.bin - ln -sf ${BOOT_CONFIG_MACHINE}-${type}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOT_CONFIG_MACHINE}-${MACHINE}.bin - cd - + cd ${DEPLOYDIR} + ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin + # Link to default bootable U-Boot filename. It gets overwritten + # on every loop so the only last RAM_CONFIG will survive. + ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME} + cd - done } diff --git a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_%.bbappend b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_%.bbappend index 719569874..0782c7f6a 100644 --- a/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_%.bbappend +++ b/meta-digi-arm/recipes-bsp/imx-mkimage/imx-mkimage_%.bbappend @@ -1,5 +1,5 @@ # Copyright (C) 2018,2019 Digi International, Inc. # Use the v4.14 ga BSP branch -SRCBRANCH = "imx_4.14.78_1.0.0_ga" -SRCREV = "2cf091c075ea1950afa22a56e224dc4e448db542" +SRCBRANCH = "imx_4.14.98_2.1.0" +SRCREV = "abd6ce551a7b81fc6953d32d92b24a4a1d4b214e" diff --git a/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_%.bbappend b/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_%.bbappend deleted file mode 100644 index 8d717ae01..000000000 --- a/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -PLATFORM_mx8 = "IMX8" - -COMPATIBLE_MACHINE = "(mx6|mx8x)" diff --git a/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.bb b/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.bb new file mode 100644 index 000000000..fa0abcf73 --- /dev/null +++ b/meta-digi-arm/recipes-bsp/imx-vpu/imx-vpu_5.4.39.bb @@ -0,0 +1,33 @@ +# Copyright (C) 2013-2018 O.S. Systems Software LTDA. +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2018 NXP + +DESCRIPTION = "Freescale VPU library" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +PROVIDES = "virtual/imxvpu" +RPROVIDES_${PN} = "virtual/imxvpu" + +PE = "1" + +SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" +SRC_URI[md5sum] = "12d42949b342b50365d24d148e67cf28" +SRC_URI[sha256sum] = "8b9fd257a2dd79dae1e208f08e56a4a47550b892a6f4e3b8fee0d6cbeb09ec12" + +inherit fsl-eula-unpack use-imx-headers + +PLATFORM = "IMX6Q" + +do_compile() { + INCLUDE_DIR="-I${STAGING_INCDIR_IMX}" + oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all +} + +do_install() { + oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install +} + +# Compatible only for i.MX with Chips&Media VPU +COMPATIBLE_MACHINE = "(^$)" +COMPATIBLE_MACHINE_imxvpucnm = "${MACHINE}" diff --git a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc index ea0514929..b3acff935 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/digi-u-boot.inc @@ -15,7 +15,7 @@ PROVIDES += "u-boot" S = "${WORKDIR}/git" # Select internal or Github U-Boot repo -UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" +UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git;protocol=https', d)}" SRC_URI = " \ ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ @@ -100,9 +100,7 @@ do_compile () { fi } -TF_BOOTSCRIPT_SEDFILTER = "" -TF_BOOTSCRIPT_SEDFILTER_ccimx6 = "${@tf_bootscript_sedfilter(d)}" -TF_BOOTSCRIPT_SEDFILTER_ccimx6ul = "${@tf_bootscript_sedfilter(d)}" +TF_BOOTSCRIPT_SEDFILTER = "${@tf_bootscript_sedfilter(d)}" def tf_bootscript_sedfilter(d): tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or "" @@ -179,4 +177,5 @@ do_deploy_append_ccimx8x() { # U-Boot images are not bootable on the i.MX8X install -d ${DEPLOYDIR}/${BOOT_TOOLS} mv ${DEPLOYDIR}/u-boot* ${DEPLOYDIR}/${BOOT_TOOLS}/ + mv ${DEPLOYDIR}/${UBOOT_SYMLINK}-* ${DEPLOYDIR}/${BOOT_TOOLS}/ } diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt index f64110f3e..43badca8d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/boot.txt @@ -2,27 +2,46 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # +# Set SOC type to "imx8qxp" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8qxp" +fi + # # Set device tree filename depending on the board ID (if defined) # if test -n "${board_id}"; then - setenv fdt_file ccimx8x-sbc-express-id${board_id}.dtb + setenv fdt_file cc${soc_type}-sbc-express-id${board_id}.dtb else # - # Set device tree filename depending on the hardware variant + # Set device tree filename depending on the hardware capabilities # - if test "${module_variant}" = "0x01"; then - setenv fdt_file ccimx8x-sbc-express-wb.dtb - elif test "${module_variant}" = "0x02"; then - setenv fdt_file ccimx8x-sbc-express-wb.dtb - elif test "${module_variant}" = "0x03"; then - setenv fdt_file ccimx8x-sbc-express.dtb - elif test "${module_variant}" = "0x04"; then - setenv fdt_file ccimx8x-sbc-express-wb.dtb - elif test "${module_variant}" = "0x05"; then - setenv fdt_file ccimx8x-sbc-express.dtb + if test -n "${module_ram}"; then + setexpr module_has_wifi ${hwid_3} \& 1 + setexpr module_has_bt ${hwid_3} \& 2 + setexpr module_has_bt ${module_has_bt} / 2 + + if test "${module_has_wifi}" = "1" && + test "${module_has_bt}" = "1"; then + setenv fdt_file cc${soc_type}-sbc-express-wb.dtb + else + setenv fdt_file cc${soc_type}-sbc-express.dtb + fi else - setenv fdt_file ccimx8x-sbc-express-wb.dtb + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x01" || + test "${module_variant}" = "0x02" || + test "${module_variant}" = "0x04"; then + setenv fdt_file cc${soc_type}-sbc-express-wb.dtb + elif test "${module_variant}" = "0x03" || + test "${module_variant}" = "0x05" || + test "${module_variant}" = "0x06"; then + setenv fdt_file cc${soc_type}-sbc-express.dtb + else + setenv fdt_file cc${soc_type}-sbc-express-wb.dtb + fi fi fi diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_sd.txt index f47c90b5f..62501234a 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-express/install_linux_fw_sd.txt @@ -19,14 +19,29 @@ if test $? -eq 1; then exit; fi -# Determine U-Boot file to program basing on module variant -if test -n "${module_variant}"; then - if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05"; then - setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin; - elif test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then - setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin; +# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width) +ram_freq="1.2GHz" +bus_width="32bit" +if test -n "${module_ram}" && test -n "${soc_type}"; then + if test "${soc_type}" = "imx8dx"; then + bus_width="16bit" + fi + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${ram_freq}_${module_ram}_${bus_width}.bin; +else + # Determine U-Boot file to program basing on SOM's variant + if test -n "${module_variant}"; then + if test "${module_variant}" = "0x01"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_32bit.bin; + elif test "${module_variant}" = "0x02" || + test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_2GB_32bit.bin; + elif test "${module_variant}" = "0x04" || + test "${module_variant}" = "0x05"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_16bit.bin; + fi fi fi + # Use 'test -n ...' because 'test -z ...' does not work well on old versions of # u-boot when the checked value is empty. if test -n "${INSTALL_UBOOT_FILENAME}"; then @@ -36,10 +51,12 @@ else echo "[ERROR] Cannot determine U-Boot file for this module!"; echo ""; echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:"; - echo " - For a QuadXPlus CPU with 1GB DDR3, run:"; - echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin"; - echo " - For a QuadXPlus CPU with 2GB DDR3, run:"; - echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin"; + echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_32bit.bin"; + echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_2GB_32bit.bin"; + echo " - For a DualX CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_16bit.bin"; echo ""; echo "2. Run the install script again."; echo ""; diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt index d849048ee..3d0ce3556 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/boot.txt @@ -2,21 +2,46 @@ # U-Boot bootscript for EMMC/SD images created by Yocto. # +# Set SOC type to "imx8qxp" if not already defined by U-Boot +if test ! -n "${soc_type}"; then + setenv soc_type "imx8qxp" +fi + # # Set device tree filename depending on the board ID (if defined) # if test -n "${board_id}"; then - setenv fdt_file ccimx8x-sbc-pro-id${board_id}.dtb + setenv fdt_file cc${soc_type}-sbc-pro-id${board_id}.dtb else # - # Set device tree filename depending on the hardware variant + # Set device tree filename depending on the hardware capabilities # - if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04"; then - setenv fdt_file ccimx8x-sbc-pro-wb.dtb - elif test "${module_variant}" = "0x03" || test "${module_variant}" = "0x05"; then - setenv fdt_file ccimx8x-sbc-pro.dtb + if test -n "${module_ram}"; then + setexpr module_has_wifi ${hwid_3} \& 1 + setexpr module_has_bt ${hwid_3} \& 2 + setexpr module_has_bt ${module_has_bt} / 2 + + if test "${module_has_wifi}" = "1" && + test "${module_has_bt}" = "1"; then + setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb + else + setenv fdt_file cc${soc_type}-sbc-pro.dtb + fi else - setenv fdt_file ccimx8x-sbc-pro-wb.dtb + # + # Set device tree filename depending on the hardware variant + # + if test "${module_variant}" = "0x01" || + test "${module_variant}" = "0x02" || + test "${module_variant}" = "0x04"; then + setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb + elif test "${module_variant}" = "0x03" || + test "${module_variant}" = "0x05" || + test "${module_variant}" = "0x06"; then + setenv fdt_file cc${soc_type}-sbc-pro.dtb + else + setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb + fi fi fi diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_sd.txt index 1bf32a2ae..cce9bf896 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey/ccimx8x-sbc-pro/install_linux_fw_sd.txt @@ -19,14 +19,31 @@ if test $? -eq 1; then exit; fi -# Determine U-Boot file to program basing on module variant -if test -n "${module_variant}"; then - if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05"; then - setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin; - elif test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then - setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin; +# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width) +ram_freq="1.2GHz" +bus_width="32bit" +if test -n "${module_ram}" && test -n "${soc_type}"; then + if test "${soc_type}" = "imx8dx"; then + bus_width="16bit" + fi + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${ram_freq}_${module_ram}_${bus_width}.bin; +else + # Determine U-Boot file to program basing on SOM's variant + if test -n "${module_variant}"; then + if test "${module_variant}" = "0x01"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_32bit.bin; + elif test "${module_variant}" = "0x02" || + test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_2GB_32bit.bin; + elif test "${module_variant}" = "0x04" || + test "${module_variant}" = "0x05"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_16bit.bin; + elif test "${module_variant}" = "0x06"; then + setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_512GB_16bit.bin; + fi fi fi + # Use 'test -n ...' because 'test -z ...' does not work well on old versions of # u-boot when the checked value is empty. if test -n "${INSTALL_UBOOT_FILENAME}"; then @@ -36,10 +53,14 @@ else echo "[ERROR] Cannot determine U-Boot file for this module!"; echo ""; echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:"; - echo " - For a QuadXPlus CPU with 1GB DDR3, run:"; - echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin"; - echo " - For a QuadXPlus CPU with 2GB DDR3, run:"; - echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin"; + echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_32bit.bin"; + echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_2GB_32bit.bin"; + echo " - For a DualX CPU with 1GB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_16bit.bin"; + echo " - For a DualX CPU with 512MB LPDDR4, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_512MB_16bit.bin"; echo ""; echo "2. Run the install script again."; echo ""; diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc new file mode 100644 index 000000000..f35d6dc74 --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos-2.inc @@ -0,0 +1,28 @@ +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "i.MX M4 core Demo images" +SECTION = "app" +LICENSE = "Proprietary" + +inherit deploy fsl-eula2-unpack2 + +SOC ?= "INVALID" +SOC_mx7ulp = "imx7ulp" +SOC_mx8mm = "imx8mm" +SOC_mx8mq = "imx8mq" +SOC_mx8qm = "imx8qm" +SOC_mx8qxp = "imx8qx" + +IMX_PACKAGE_NAME = "${SOC}-m4-demo-${PV}" +SRC_URI_append = ";name=${SOC}" + +SCR = "SCR-${SOC}-m4-demo.txt" + +do_deploy () { + # Install the demo binaries + cp ${D}/* ${DEPLOYDIR}/ +} +addtask deploy after do_install + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.1.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.1.bb deleted file mode 100644 index 82a68d2d7..000000000 --- a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.1.bb +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "i.MX M4 core Demo images" -SECTION = "app" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" - -inherit deploy fsl-eula-unpack2 - -SOC ?= "imx8qm" -SOC_mx7ulp= "imx7ulp" -SOC_mx8mm= "imx8mm" -SOC_mx8mq= "imx8mq" -SOC_mx8qm= "imx8qm" -SOC_mx8qxp= "imx8qx" - -IMX_PACKAGE_NAME = "${SOC}-m4-demo-${PV}" -SRC_URI_NAME = "${SOC}" - -SRC_URI[imx8qm.md5sum] = "d4b63215497b61fda8eff89a820aa0d4" -SRC_URI[imx8qm.sha256sum] = "79d34ba2abcbaf02a8d01f5eb8c71e125aad34319bcc702815cf14d89a3d4e1f" - -SRC_URI[imx8qx.md5sum] = "c0201a442eaac19f9b929261d69f8d9b" -SRC_URI[imx8qx.sha256sum] = "724676c9de95ca25beab1ce793fe170623b4b6d967ca07ddbf8cb4dbcbd15c8d" - -SCR = "SCR-${SOC}-m4-demo.txt" - -do_deploy () { - # Install the demo binaries - cp ${D}/* ${DEPLOYDIR}/ -} - -addtask deploy before do_build after do_install - -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)" diff --git a/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.2.bb b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.2.bb new file mode 100644 index 000000000..910b7618e --- /dev/null +++ b/meta-digi-arm/recipes-cpu/m4-demos/imx-m4-demos_2.5.2.bb @@ -0,0 +1,14 @@ +# Copyright 2017-2019 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-m4-demos-2.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=80c0478f4339af024519b3723023fe28" + +SRC_URI[imx8qm.md5sum] = "6423c4c60412b509b6d7537ce1a3fd44" +SRC_URI[imx8qm.sha256sum] = "cf430d4a111370c021435e864666d34fae4c4242907c195aad0c46c48073f78f" + +SRC_URI[imx8qx.md5sum] = "fe2e5c9513faac946d29e5904bf792d9" +SRC_URI[imx8qx.sha256sum] = "151c6a578f6ae5a09b378015116061875047e4f3b6264e4becc80276621893b1" + +COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)" diff --git a/meta-digi-arm/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb b/meta-digi-arm/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb index 788917577..1ba3edc2b 100644 --- a/meta-digi-arm/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb +++ b/meta-digi-arm/recipes-digi/cryptoauthlib/cryptoauthlib_git.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://license.txt;endline=19;md5=5bcd26c644867b127c2cce8296 SRCBRANCH = "master" SRCREV = "c6da3358a102c10d954372598c6efef8ad84c9ee" -GIT_URI ?= "git://github.com/MicrochipTech/cryptoauthlib.git;protocol=git" +GIT_URI ?= "git://github.com/MicrochipTech/cryptoauthlib.git;protocol=https" SRC_URI = " \ ${GIT_URI};nobranch=1 \ diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.16.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.17.bb similarity index 61% rename from meta-digi-arm/recipes-digi/mca/mca-tool_1.16.bb rename to meta-digi-arm/recipes-digi/mca/mca-tool_1.17.bb index 114212fe7..2e00d985e 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.16.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.17.bb @@ -8,13 +8,13 @@ PKGNAME = "mca_tool" # ARM tarball SRC_URI_arm = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}-${TUNE_ARCH}.tar.gz;name=arm" -SRC_URI[arm.md5sum] = "d6043cd754a8ea0449a4b1afc80b9775" -SRC_URI[arm.sha256sum] = "4219efae7d3b327bac7940b992a446cdbf4cd3ed25d3234e1ef63ed32b6db595" +SRC_URI[arm.md5sum] = "c1eefe3113c4915b92fadebc7f769d21" +SRC_URI[arm.sha256sum] = "9a9d962e549fdb0f22fc1037f74ca21c7356dded7033c28a1b4b325a44b579aa" # AARCH64 tarball SRC_URI_aarch64 = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}-${TUNE_ARCH}.tar.gz;name=aarch64" -SRC_URI[aarch64.md5sum] = "937f910b33aa9f6fe0d24317836fd620" -SRC_URI[aarch64.sha256sum] = "225c64e07c7158e0849cdd730d3c073cc87089a60b42d4e86a82c882761adb6c" +SRC_URI[aarch64.md5sum] = "92a3d3d3a63c749efc4761cdb5efe77e" +SRC_URI[aarch64.sha256sum] = "6b3cd2e9aa879ebd5aba628731855112db69ab01cedc5e203c10917e51f93a08" S = "${WORKDIR}/${PKGNAME}-${PV}" diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb index 1d4ca1570..9aff645ff 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_git.bb @@ -11,7 +11,7 @@ SRCREV = "${AUTOREV}" S = "${WORKDIR}" # Select internal or Github U-Boot repo -UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" +UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git;protocol=https', d)}" SRC_URI = " \ ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb index 6b7c4cf40..ce2fe5e89 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm.bb @@ -13,7 +13,7 @@ SRCBRANCH = "qca6564/dey-2.6/maint" SRCBRANCH_ccimx8x = "qca6574/dey-2.6/maint" SRCREV = "${AUTOREV}" -QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git', d)}" +QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}" SRC_URI = " \ ${QCOM_GIT_URI};branch=${SRCBRANCH} \ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh index 21a0aaac0..d2097595c 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh @@ -18,9 +18,12 @@ # 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 + printf "<$1>qca65x4: $2\n" >/dev/kmsg } +# Do nothing if the wireless node does not exist on the device tree +[ -d "/proc/device-tree/wireless" ] || exit 0 + # Do nothing if the module is already loaded grep -qws 'wlan' /proc/modules && exit 0 @@ -44,7 +47,13 @@ done # Override the MAC firmware file only if the MAC file has changed. if ! cmp -s ${TMP_MACFILE} ${MACFILE}; then - cp ${TMP_MACFILE} ${MACFILE} + if [ ! -w ${MACFILE} ]; then + mount_point="$(df $(dirname "${MACFILE}") | awk '!/^Filesystem/{ print $6 }')" + log "6" "[INFO] ${MACFILE} is not writable, remounting '${mount_point}' as rw" + mount -o remount,rw ${mount_point} + fi + + cp ${TMP_MACFILE} ${MACFILE} || log "3" "[ERROR] Could not create ${MACFILE}" fi rm -f "${TMP_MACFILE}" @@ -106,4 +115,4 @@ LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sy modprobe wlan # Verify the interface is present -[ -d "/sys/class/net/wlan0" ] || log "3" "[ERROR] Loading qca6564 module" +[ -d "/sys/class/net/wlan0" ] || log "3" "[ERROR] Loading wlan module" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc index 3a6cb17bb..3166424f9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-src.inc @@ -5,10 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" LOCALVERSION = "-dey" SRCBRANCH = "v4.14/dey-2.6/maint" +SRCBRANCH_ccimx6 = "v4.9/dey-2.6/maint" SRCREV = "${AUTOREV}" # Select internal or Github Linux repo -LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" +LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git;protocol=https', d)}" SRC_URI = "${LINUX_GIT_URI};branch=${SRCBRANCH}" S = "${WORKDIR}/git" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 4e9520d9c..0575fb967 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -10,6 +10,7 @@ DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-too inherit kernel fsl-kernel-localversion require recipes-kernel/linux/linux-dey-src.inc +require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-virtualization.inc', '', d)} # Use custom provided 'defconfig' if variable KERNEL_DEFCONFIG is cleared SRC_URI += "${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.14.bb index 9abff427e..bfa3cd0de 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.14.bb @@ -2,4 +2,4 @@ require recipes-kernel/linux/linux-dey.inc -COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul|ccimx8x)" +COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8x)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.9.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.9.bb new file mode 100644 index 000000000..3669cb577 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.9.bb @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Digi International + +require recipes-kernel/linux/linux-dey.inc + +COMPATIBLE_MACHINE = "(ccimx6)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-imx-headers.inc b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers.inc new file mode 100644 index 000000000..6e2bdfb16 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers.inc @@ -0,0 +1,52 @@ +# 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" + +require recipes-kernel/linux/linux-dey-src.inc + +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 \ + 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}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.14.bb new file mode 100644 index 000000000..5e834e8f6 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.14.bb @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Digi International + +require recipes-kernel/linux/linux-imx-headers.inc + +COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8x)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.9.bb b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.9.bb new file mode 100644 index 000000000..b2479c47f --- /dev/null +++ b/meta-digi-arm/recipes-kernel/linux/linux-imx-headers_4.9.bb @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Digi International + +require recipes-kernel/linux/linux-imx-headers.inc + +COMPATIBLE_MACHINE = "(ccimx6)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-virtualization.inc b/meta-digi-arm/recipes-kernel/linux/linux-virtualization.inc new file mode 100644 index 000000000..86deba7d4 --- /dev/null +++ b/meta-digi-arm/recipes-kernel/linux/linux-virtualization.inc @@ -0,0 +1,50 @@ +# Copyright (C) 2019 Digi International + +# Apply kernel configuration required for Docker +do_configure_prepend() { + mkdir -p ${B} + + kernel_conf_variable NAMESPACES y + kernel_conf_variable MULTIUSER y + kernel_conf_variable NET_NS y + kernel_conf_variable NET y + kernel_conf_variable PID_NS y + kernel_conf_variable IPC_NS y + kernel_conf_variable POSIX_MQUEUE y + kernel_conf_variable UTS_NS y + kernel_conf_variable CGROUPS y + kernel_conf_variable CGROUP_CPUACCT y + kernel_conf_variable CGROUP_DEVICE y + kernel_conf_variable CGROUP_FREEZER y + kernel_conf_variable CGROUP_SCHED y + kernel_conf_variable CPUSETS y + kernel_conf_variable SMP y + kernel_conf_variable MEMCG y + kernel_conf_variable KEYS y + kernel_conf_variable VETH y + kernel_conf_variable NETDEVICES y + kernel_conf_variable NET_CORE y + kernel_conf_variable BRIDGE y + kernel_conf_variable BRIDGE_NETFILTER y + kernel_conf_variable NETFILTER y + kernel_conf_variable INET y + kernel_conf_variable NETFILTER_ADVANCED y + kernel_conf_variable NF_NAT_IPV4 y + kernel_conf_variable NF_CONNTRACK_IPV4 y + kernel_conf_variable NF_CONNTRACK y + kernel_conf_variable IP_NF_FILTER y + kernel_conf_variable IP_NF_IPTABLES y + kernel_conf_variable IP_NF_TARGET_MASQUERADE y + kernel_conf_variable IP_NF_NAT y + kernel_conf_variable NETFILTER_XT_MATCH_ADDRTYPE y + kernel_conf_variable NETFILTER_XT_MATCH_CONNTRACK y + kernel_conf_variable NETFILTER_XT_MATCH_IPVS y + kernel_conf_variable IP_VS y + kernel_conf_variable IP_NF_NAT y + kernel_conf_variable POSIX_MQUEUE y + kernel_conf_variable OVERLAY_FS y + + sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' +} + +KERNEL_MODULE_AUTOLOAD += "nf_conntrack_ipv6 openvswitch" diff --git a/meta-digi-dey/classes/dey-image-installer.bbclass b/meta-digi-dey/classes/dey-image-installer.bbclass index a0e1d18ed..6a543c76f 100644 --- a/meta-digi-dey/classes/dey-image-installer.bbclass +++ b/meta-digi-dey/classes/dey-image-installer.bbclass @@ -3,6 +3,7 @@ # # Copyright 2017, Digi International Inc. # +inherit boot-artifacts DEPENDS += "zip-native" @@ -26,9 +27,9 @@ generate_installer_zip () { INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}" fi done - for ubconf in ${UBOOT_CONFIG}; do - if readlink -e "${DEPLOY_DIR_IMAGE}/${IMAGE_BOOTLOADER}-${ubconf}.${UBOOT_SUFFIX}" >/dev/null; then - INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${IMAGE_BOOTLOADER}-${ubconf}.${UBOOT_SUFFIX}" + for artifact in ${BOOTABLE_ARTIFACTS}; do + if readlink -e "${DEPLOY_DIR_IMAGE}/${artifact}" >/dev/null; then + INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${artifact}" fi done diff --git a/meta-digi-dey/classes/dey-image.bbclass b/meta-digi-dey/classes/dey-image.bbclass index c3541f975..a7679ca67 100644 --- a/meta-digi-dey/classes/dey-image.bbclass +++ b/meta-digi-dey/classes/dey-image.bbclass @@ -10,8 +10,8 @@ inherit image-buildinfo # # Set root password using 'extrausers' class if 'debug-tweaks' is NOT enabled # -# To get the encrypted password (with escaped '$' char: '\$') run following -# command in your development computer: +# To get the hash of the password (with escaped '$' char: '\$') run +# the following command in your development computer: # # echo -n 'root' | mkpasswd -5 -s | sed -e 's,\$,\\$,g' # diff --git a/meta-digi-dey/classes/trustfence.bbclass b/meta-digi-dey/classes/trustfence.bbclass index c9e391132..058de583f 100644 --- a/meta-digi-dey/classes/trustfence.bbclass +++ b/meta-digi-dey/classes/trustfence.bbclass @@ -36,10 +36,6 @@ python () { import hashlib import os - if ("ccimx8x" in d.getVar("MACHINE", True)): - bb.fatal("Trustfence is not currently supported on the ccimx8x SOM") - return - # Secure console configuration if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_CONSOLE_DISABLE=y ") diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index d4e727d4c..2b1380cb3 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -1,6 +1,6 @@ DISTRO = "dey" DISTRO_NAME = "Digi Embedded Yocto" -DISTRO_VERSION = "2.6-r1" +DISTRO_VERSION = "2.6-r2" DISTRO_CODENAME = "thud" SDK_VENDOR = "-deysdk" SDK_VERSION := "${@'${DISTRO_VERSION}'}" @@ -44,10 +44,6 @@ FEATURE_PACKAGES_dey-qt = "packagegroup-dey-qt" FEATURE_PACKAGES_dey-trustfence = "packagegroup-dey-trustfence" FEATURE_PACKAGES_dey-wireless = "packagegroup-dey-wireless" -# Use GCC compiler version 7.x to maintain compatibility with -# several packages without support yet like gstreamer-imx plugins -GCCVERSION ?= "7.%" - # Our layer only provides version 5.41, which we want to keep because # it was used for Bluetooth certification. However by default the newer # 5.50 version should be used, which is provided by the poky layer. @@ -68,8 +64,10 @@ PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils" # Use git recipe for libsoc PREFERRED_VERSION_libsoc = "git" -# Gstreamer 1.14.0 requires a specific vulkan version. -PREFERRED_VERSION_vulkan ?= "1.0.65%" +# There's a generic opencl-headers recipe in the thud branch of +# meta-openembedded, but we should use the package provided by the imx-gpu-viv +# recipe in case there are NXP-specific changes in it +PREFERRED_PROVIDER_opencl-headers ?= "imx-gpu-viv" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}" SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}" diff --git a/meta-digi-dey/recipes-aws/greengrass/greengrass_1.9.0.bb b/meta-digi-dey/recipes-aws/greengrass/greengrass_1.9.0.bb new file mode 100644 index 000000000..68bbb471a --- /dev/null +++ b/meta-digi-dey/recipes-aws/greengrass/greengrass_1.9.0.bb @@ -0,0 +1,29 @@ +# Copyright (C) 2019, Digi International Inc. + +require greengrass.inc + +# +# The Amazon Greengrass Core Product includes the following third-party software/licensing: +# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/ +# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/ +# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker +# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units +# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini +# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath +# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer +# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc +# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec +# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson +# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink +# +# And the following Licenses: +LIC_FILES_CHKSUM = " \ + file://ggc/core/THIRD-PARTY-LICENSES;md5=53b6a4caa097863bc3971d5e0ac6d1db \ +" + +SRC_URI[arm.md5sum] = "57e408134eccbbda40f08dbbf52101c2" +SRC_URI[arm.sha256sum] ="ded5d88a3ec1479d79c842b16fef11f91ee331bd4b79dbba1ca639b3e51922a3" + +# For ARCH64 we use another tarball. +SRC_URI[aarch64.md5sum] = "c8e5488e302905583829f95d55d7a912" +SRC_URI[aarch64.sha256sum] ="9cd00902090e8fc34de18bf1ff21dca5e90af12ced886e6ac46e1f6899b059e1" diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6qpsbc/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6qpsbc/bluetooth-init deleted file mode 100644 index f6fbc3047..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6qpsbc/bluetooth-init +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -#=============================================================================== -# -# Copyright (C) 2012-2017 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="244" - -# 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 -} - -error() { - echo ${1} - exit 1 -} - -bluetooth_init() { - # 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 - - # Start the Bluetooth driver and bring up the interface - HCIATTACH_LOG="/var/log/hciattach.log" - - for RETRY in $(seq 1 5) - do - killproc hciattach - powercycle_gpio "${BT_EN_QCA_GPIO_NR}" - if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then - return - fi - sleep 1 - done - BT_ERROR="FAIL (hciattach)" -} - -# 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/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6sbc/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6sbc/bluetooth-init deleted file mode 100644 index ff7e24476..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6sbc/bluetooth-init +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/sh -#=============================================================================== -# -# Copyright (C) 2012-2018 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_PWR_GPIO_NR="244" - -# 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 -} - -error() { - echo ${1} - exit 1 -} - -bluetooth_init() { - # 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 - - # Use a sub-shell here to change to firmware directory - ( - cd /lib/firmware/ar3k/1020200 - - # Update the MAC address file only if it has changed. - FW_MAC="ar3kbdaddr.pst" - [ -f "${FW_MAC}" ] && [ "$(cat ${FW_MAC})" = "${BT_MACADDR}" ] || echo ${BT_MACADDR} > ${FW_MAC} - - # Symlink the correct firmware file depending on region code - JPN_REGCODE="0x2" - REGCODE="$(cat /proc/device-tree/digi,hwid,cert 2>/dev/null | tr -d '\0')" - BT_CLASS_LINK="PS_ASIC.pst" - BT_CLASS_FILE="PS_ASIC_class_1.pst" - if [ -n "${REGCODE}" ] && [ "${JPN_REGCODE}" = "${REGCODE}" ]; then - BT_CLASS_FILE="PS_ASIC_class_2.pst" - fi - if ! cmp -s ${BT_CLASS_FILE} ${BT_CLASS_LINK}; then - ln -sf ${BT_CLASS_FILE} ${BT_CLASS_LINK} - fi - # Remove not used configuration and readme files - # -- Do not quote the subcommand to avoid leading/trailing whitespace - # -- being part of the file name. - rm -f $(echo PS_ASIC_class_?.pst | sed -e "s,${BT_CLASS_FILE},,g") readme.txt - ) - - # Start the Bluetooth driver and bring up the interface - HCIATTACH_LOG="/var/log/hciattach.log" - BT_CMD="HCIATTACH" - RETRIES="5" - while [ "${RETRIES}" -gt "0" ]; do - case "${BT_CMD}" in - HCIATTACH) - # Reset BT - killproc hciattach - powercycle_gpio "${BT_PWR_GPIO_NR}" - if hciattach ttyBt ath3k 4000000 >${HCIATTACH_LOG} 2>&1; then - BT_CMD="HCICONFIG_UP" - else - BT_ERROR="FAILED (hciattach)" - BT_CMD="BT_INIT_FAIL" - fi - ;; - HCICONFIG_UP) - if hciconfig hci0 up; then - break - else - BT_ERROR="FAILED (hciconfig up)" - BT_CMD="BT_INIT_FAIL" - fi - ;; - BT_INIT_FAIL) - RETRIES="$((RETRIES - 1))" - BT_CMD="HCIATTACH" - ;; - esac - done - [ "${RETRIES}" = "0" ] && error "${BT_ERROR}" -} - -# 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 "done." - fi - ;; - stop) - if [ -d "/sys/class/bluetooth/hci0" ]; then - echo -n "Stopping bluetooth hardware: " - hciconfig hci0 down || BT_ERROR="FAILED (hciconfig down)" - killproc hciattach - # Power down bluetooth - set_gpio_value "${BT_PWR_GPIO_NR}" 0 - echo "${BT_ERROR:-done.}" - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 - ;; -esac diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6ul/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6ul/bluetooth-init deleted file mode 100644 index e6a509279..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.41/ccimx6ul/bluetooth-init +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -#=============================================================================== -# -# Copyright (C) 2012-2018 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 -} - -error() { - echo ${1} - exit 1 -} - -bluetooth_init() { - # 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 - - # Module version older than revision 4 has swapped TX and RX lines - MOD_VERSION="$(($(cat /proc/device-tree/digi,hwid,hv 2>/dev/null | tr -d '\0' || true)))" - if [ "${MOD_VERSION}" -lt "4" ]; then - # Ignore the CTS flow control - BT_CTS_QCA_GPIO_NR="18" - set_gpio_value "${BT_CTS_QCA_GPIO_NR}" 0 - - # Reduce the rate to avoid the need for HW flow control - BT_RATE="115200" - BT_RATE_CODE="00" # 115200 bps - BT_FLOW="noflow" - - # Modify the baudrate in the firmware file - BT_FW_FILE="/lib/firmware/qca/nvm_tlv_3.2.bin" - if [ "$(hexdump -s 56 -n 1 -ve '1/1 "%.2x"' ${BT_FW_FILE})" != "${BT_RATE_CODE}" ]; then - printf "\x${BT_RATE_CODE}" | dd of="${BT_FW_FILE}" bs=1 seek=56 count=1 conv=notrunc,fsync 2>/dev/null - fi - fi - - # Start the Bluetooth driver and bring up the interface - HCIATTACH_LOG="/var/log/hciattach.log" - - for RETRY in $(seq 1 5) - do - killproc hciattach - powercycle_gpio "${BT_EN_QCA_GPIO_NR}" - if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then - # hciattach performs a reset to load the new firmware and needs some time to be ready - sleep 1 - return - fi - sleep 1 - - if [ $RETRY -ge 3 ]; then - # Retry at default firmware baudrate - BT_RATE="115200" - fi - done - BT_ERROR="FAIL (hciattach)" -} - -# 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/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0001-hcitool-do-not-show-unsupported-refresh-option.patch b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0001-hcitool-do-not-show-unsupported-refresh-option.patch deleted file mode 100644 index 0d0375dad..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0001-hcitool-do-not-show-unsupported-refresh-option.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Isaac Hermida -Date: Fri, 8 Jul 2016 12:19:33 +0200 -Subject: [PATCH] hcitool: do not show unsupported refresh option - -Signed-off-by: Isaac Hermida ---- - tools/hcitool.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/hcitool.c b/tools/hcitool.c -index 02c4ebe1b71b..229c22c49909 100644 ---- a/tools/hcitool.c -+++ b/tools/hcitool.c -@@ -568,7 +568,7 @@ static struct option scan_options[] = { - - static const char *scan_help = - "Usage:\n" -- "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui] [--refresh]\n"; -+ "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui]\n"; - - static void cmd_scan(int dev_id, int argc, char **argv) - { diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0002-hcitool-increase-the-shown-connection-limit-to-20.patch b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0002-hcitool-increase-the-shown-connection-limit-to-20.patch deleted file mode 100644 index fd81a1960..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/0002-hcitool-increase-the-shown-connection-limit-to-20.patch +++ /dev/null @@ -1,57 +0,0 @@ -From: Isaac Hermida -Date: Fri, 8 Jul 2016 10:42:57 +0200 -Subject: [PATCH] hcitool: increase the shown connection limit to 20 - -Created a variable to set the number of connections to shown and increase that -value so we can list more current LE connections. - -https://jira.digi.com/browse/DEL-2735 - -Signed-off-by: Isaac Hermida ---- - tools/hcitool.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/tools/hcitool.c b/tools/hcitool.c -index 229c22c49909..ae70c9c0d3b4 100644 ---- a/tools/hcitool.c -+++ b/tools/hcitool.c -@@ -69,6 +69,8 @@ - #define EIR_TX_POWER 0x0A /* transmit power level */ - #define EIR_DEVICE_ID 0x10 /* device ID */ - -+#define MAX_CONNECTIONS_SHOWN 20 /* Max number of "hcitool conn" items to shown */ -+ - #define for_each_opt(opt, long, short) while ((opt=getopt_long(argc, argv, short ? short:"+", long, NULL)) != -1) - - static volatile int signal_received = 0; -@@ -156,12 +158,12 @@ static int conn_list(int s, int dev_id, long arg) - if (id != -1 && dev_id != id) - return 0; - -- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) { -+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) { - perror("Can't allocate memory"); - exit(1); - } - cl->dev_id = dev_id; -- cl->conn_num = 10; -+ cl->conn_num = MAX_CONNECTIONS_SHOWN; - ci = cl->conn_info; - - if (ioctl(s, HCIGETCONNLIST, (void *) cl)) { -@@ -190,12 +192,12 @@ static int find_conn(int s, int dev_id, long arg) - struct hci_conn_info *ci; - int i; - -- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) { -+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) { - perror("Can't allocate memory"); - exit(1); - } - cl->dev_id = dev_id; -- cl->conn_num = 10; -+ cl->conn_num = MAX_CONNECTIONS_SHOWN; - ci = cl->conn_info; - - if (ioctl(s, HCIGETCONNLIST, (void *) cl)) { diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth-init.service b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth-init.service deleted file mode 100644 index 208162131..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth-init.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Initialization of the bluetooth chip -ConditionPathIsDirectory=/proc/device-tree/bluetooth -Before=bluetooth.service - -[Service] -Type=forking -ExecStart=/etc/bluetooth-init start -ExecStop=/etc/bluetooth-init stop - -[Install] -WantedBy=multi-user.target diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth.service-add-customizations.patch b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth.service-add-customizations.patch deleted file mode 100644 index 708bd788f..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/bluetooth.service-add-customizations.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Gabriel Valcazar -Date: Thu, 7 Feb 2019 13:15:43 +0100 -Subject: [PATCH] bluetooth.service: add Digi customizations - -These changes include: - -* Adding the bluetooth-init service as a soft dependency. -* Having the bluetooth stack start automatically on boot. - -Signed-off-by: Gabriel Valcazar ---- - src/bluetooth.service.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in -index f799f65..d8b150c 100644 ---- a/src/bluetooth.service.in -+++ b/src/bluetooth.service.in -@@ -2,6 +2,7 @@ - Description=Bluetooth service - Documentation=man:bluetoothd(8) - ConditionPathIsDirectory=/sys/class/bluetooth -+Wants=bluetooth-init.service - - [Service] - Type=dbus -@@ -16,5 +17,5 @@ ProtectHome=true - ProtectSystem=full - - [Install] --WantedBy=bluetooth.target -+WantedBy=multi-user.target - Alias=dbus-org.bluez.service diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6qpsbc/main.conf b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6qpsbc/main.conf deleted file mode 100644 index 332d38fad..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6qpsbc/main.conf +++ /dev/null @@ -1,12 +0,0 @@ -[General] - -# Default adapter name -# Defaults to 'BlueZ X.YZ' -Name = cc6qp - -[Policy] - -# AutoEnable defines option to enable all controllers when they are found. -# This includes adapters present on start as well as adapters that are plugged -# in later on. Defaults to 'false'. -AutoEnable=true diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6sbc/main.conf b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6sbc/main.conf deleted file mode 100644 index c0908f0b2..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6sbc/main.conf +++ /dev/null @@ -1,12 +0,0 @@ -[General] - -# Default adapter name -# Defaults to 'BlueZ X.YZ' -Name = cc6 - -#[Policy] - -# AutoEnable defines option to enable all controllers when they are found. -# This includes adapters present on start as well as adapters that are plugged -# in later on. Defaults to 'false'. -#AutoEnable=true diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6ul/main.conf b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6ul/main.conf deleted file mode 100644 index e3c0cacbc..000000000 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx6ul/main.conf +++ /dev/null @@ -1,12 +0,0 @@ -[General] - -# Default adapter name -# Defaults to 'BlueZ X.YZ' -Name = cc6ul - -[Policy] - -# AutoEnable defines option to enable all controllers when they are found. -# This includes adapters present on start as well as adapters that are plugged -# in later on. Defaults to 'false'. -AutoEnable=true diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx8x/bluetooth-init b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx8x/bluetooth-init index 0a6a70cc4..01f57c95f 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx8x/bluetooth-init +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5-5.50/ccimx8x/bluetooth-init @@ -1,7 +1,7 @@ #!/bin/sh #=============================================================================== # -# Copyright (C) 2018 by Digi International Inc. +# Copyright (C) 2018,2019 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it @@ -13,32 +13,6 @@ # #=============================================================================== -# Bluetooth power GPIO -BT_EN_QCA_GPIO_NR="394" - -# 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 -} - -error() { - echo ${1} - exit 1 -} - bluetooth_init() { # 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')" @@ -52,10 +26,11 @@ bluetooth_init() { for RETRY in $(seq 1 5) do killproc hciattach - powercycle_gpio "${BT_EN_QCA_GPIO_NR}" + modprobe btdigi if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then return fi + rmmod btdigi sleep 1 done BT_ERROR="FAIL (hciattach)" @@ -67,17 +42,18 @@ bluetooth_init() { case "$1" in start) if [ -d "/proc/device-tree/bluetooth" ]; then - echo -n "Starting bluetooth hardware: " - bluetooth_init - echo "${BT_ERROR:-done.}" + if [ "$(tr -d '\0' 2>/dev/null /dev/null /dev/null /dev/null -Date: Thu, 20 Oct 2016 04:42:26 +0000 -Subject: [PATCH] Detect clang - -Check for clang compiler since we need to disable -unused-function warning for clang, at same time -pass werror when checking for compiler options if -werror is enabled so spurious options do not get -enabled. Only the ones that are supported by given -compiler are accepted. - -Signed-off-by: Khem Raj -Upstream-Status: Pending - ---- - m4/compiler-warnings.m4 | 29 +++++++++++++++++++++++++---- - 1 file changed, 25 insertions(+), 4 deletions(-) - -diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4 -index 5ba490c884dc..92022746487f 100644 ---- a/m4/compiler-warnings.m4 -+++ b/m4/compiler-warnings.m4 -@@ -2,10 +2,30 @@ AC_DEFUN([LIBQMI_COMPILER_WARNINGS], - [AC_ARG_ENABLE(more-warnings, - AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]), - set_more_warnings="$enableval",set_more_warnings=error) -+ -+# Clang throws a lot of warnings when it does not understand a flag. Disable -+# this warning for now so other warnings are visible. -+AC_MSG_CHECKING([if compiling with clang]) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ -+#ifndef __clang__ -+ not clang -+#endif -+ ]])], -+ [CLANG=yes], -+ [CLANG=no] -+) -+AC_MSG_RESULT([$CLANG]) -+AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function]) -+CFLAGS="$CFLAGS $CLANG_FLAGS" -+LDFLAGS="$LDFLAGS $CLANG_FLAGS" -+ - AC_MSG_CHECKING(for more warnings) - if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - AC_MSG_RESULT(yes) - CFLAGS="-Wall -std=gnu89 $CFLAGS" -+ if test "x$set_more_warnings" = xerror; then -+ WERROR="-Werror" -+ fi - - for option in -Wmissing-declarations -Wmissing-prototypes \ - -Wdeclaration-after-statement -Wstrict-prototypes \ -@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - -Wmissing-include-dirs -Waggregate-return \ - -Wformat-security -Wtype-limits; do - SAVE_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS $option" -+ CFLAGS="$CFLAGS $option $WERROR" - AC_MSG_CHECKING([whether gcc understands $option]) - AC_TRY_COMPILE([], [], - has_option=yes, - has_option=no,) - if test $has_option = no; then - CFLAGS="$SAVE_CFLAGS" -+ else -+ CFLAGS="$SAVE_CFLAGS $option" - fi - AC_MSG_RESULT($has_option) - unset has_option - unset SAVE_CFLAGS - done -+ CFLAGS="$CFLAGS $WERROR" - unset option -- if test "x$set_more_warnings" = xerror; then -- CFLAGS="$CFLAGS -Werror" -- fi -+ unset WERROR - else - AC_MSG_RESULT(no) - fi diff --git a/meta-digi-dey/recipes-connectivity/libqmi/libqmi_1.18.0.bb b/meta-digi-dey/recipes-connectivity/libqmi/libqmi_1.18.0.bb deleted file mode 100644 index 8fc4905bb..000000000 --- a/meta-digi-dey/recipes-connectivity/libqmi/libqmi_1.18.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol" -DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems \ -and devices which speak the Qualcomm MSM Interface (QMI) protocol" -HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi" -LICENSE = "GPLv2 & LGPLv2.1" -LIC_FILES_CHKSUM = " \ - file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ -" - -DEPENDS = "glib-2.0 glib-2.0-native libgudev libmbim" - -inherit autotools pkgconfig bash-completion - -SRC_URI = " \ - http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \ - file://0001-Detect-clang.patch \ -" -SRC_URI[md5sum] = "25bae4e383ad77f491ad49b49e04fdcf" -SRC_URI[sha256sum] = "a0a42c55935e75a630208e2f70840bd4407f56fe1c5258f5b0f6c0aaedf88cec" diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/ccimx6/80-mm-net-device-blacklist.rules b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/ccimx6/80-mm-net-device-blacklist.rules new file mode 100644 index 000000000..c4142b4f7 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/ccimx6/80-mm-net-device-blacklist.rules @@ -0,0 +1,16 @@ +ACTION!="add|change|move|bind", GOTO="mm_net_device_blacklist_end" + +# ModemManager documentation states that the best practice is to use the DEVPATH +# this way rather than other rules such as KERNEL, so be careful when modifying + +# Remove CAN interfaces from ModemManager probing +SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2000000.aips-bus/2090000.flexcan*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2000000.aips-bus/2094000.flexcan*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Remove Ethernet interfaces from ModemManager probing +SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2100000.aips-bus/2188000.ethernet*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Remove MMC interfaces from ModemManager probing +SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2100000.aips-bus/2190000.usdhc/mmc_host*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1" + +LABEL="mm_net_device_blacklist_end" diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/ccimx6ul/80-mm-net-device-blacklist.rules b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/ccimx6ul/80-mm-net-device-blacklist.rules old mode 100755 new mode 100644 diff --git a/meta-digi-dey/recipes-connectivity/openssl/openssl_%.bbappend b/meta-digi-dey/recipes-connectivity/openssl/openssl_%.bbappend index a44826f43..f8db537bf 100644 --- a/meta-digi-dey/recipes-connectivity/openssl/openssl_%.bbappend +++ b/meta-digi-dey/recipes-connectivity/openssl/openssl_%.bbappend @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2018 Digi International. +# Copyright (C) 2016-2019 Digi International. FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" @@ -14,3 +14,6 @@ SRC_URI_remove = " \ SRC_URI += " \ ${@bb.utils.contains("MACHINE_FEATURES", "cryptochip", "${CRYPTOCHIP_COMMON_PATCHES}", "", d)} \ " + +# Add the openssl binary whenever the base package is pulled in via a dependency +RRECOMMENDS_libcrypto += "openssl-bin" diff --git a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend index 8173b2067..657b70da0 100644 --- a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend +++ b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2018 Digi International. +# Copyright (C) 2013-2019 Digi International. FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" @@ -34,6 +34,22 @@ pkg_postinst_ontarget_${PN}() { fi done fi + + # Disable file system check when rootfs is encrypted + if [ -n "${TRUSTFENCE_INITRAMFS_IMAGE}" ]; then + for arg in $(cat /proc/cmdline); do + case "${arg}" in + root=*) eval ${arg};; + esac + done + # Are we running from NAND + if echo "${root}" | grep -qs ubi; then + root="/dev/${root}" + else + root="$(findfs ${root})" + fi + echo "${root} / auto defaults 0 0" >> /etc/fstab + fi } CONFFILES_${PN} += "${sysconfdir}/sysctl.conf" diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby index 7ac3b94d5..5b4231e42 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby @@ -3,7 +3,7 @@ # # standby # -# Copyright (C) 2017,2018 by Digi International Inc. +# Copyright (C) 2017-2019 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it @@ -64,9 +64,6 @@ resume_interfaces() { done fi - # Resume NetworkManager after suspend - ${NM_DAEMON} start - # Resume bluetooth interface if [ -d "/proc/device-tree/bluetooth" ]; then if [ -n "${up_bt_on_resume}" ]; then @@ -74,6 +71,9 @@ resume_interfaces() { ${BT_DAEMON} start >/dev/null fi fi + + # Resume NetworkManager after suspend + ${NM_DAEMON} start } enter_critical_section() { diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby-actions new file mode 100644 index 000000000..a2baa3db2 --- /dev/null +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6qpsbc/standby-actions @@ -0,0 +1,64 @@ +#!/bin/sh +#=============================================================================== +# +# standby-actions +# +# 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: manage interfaces before suspending and after resuming from +# suspend +# +#=============================================================================== + +if [ "${1}" == "pre" ]; then + # Stop NetworkManager before suspend + systemctl stop NetworkManager + + # Suspend wireless interfaces + if [ -d "/proc/device-tree/wireless" ]; then + for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do + ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}" + done + + echo ${RESUME_IFACES} > /tmp/suspend_wlan_ifaces + grep -qs '^wlan' /proc/modules && rmmod wlan + fi + + # Suspend bluetooth interface + if [ -d "/proc/device-tree/bluetooth" ]; then + hciconfig hci0 2>&1 | grep -qs UP && touch /tmp/up_bt_on_resume + systemctl stop bluetooth + systemctl stop bluetooth-init + fi +elif [ "${1}" == "post" ]; then + # Resume wireless interfaces + if [ -d "/proc/device-tree/wireless" ]; then + # Trigger wireless module loading event, and wait until the interface exists + udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d050A" + timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null + + # Bring up the interfaces that were brought down on suspend + for i in $(cat /tmp/suspend_wlan_ifaces | tr ' ' '\n' | sort); do + grep -qs "^${i}" /var/run/ifstate || ifup "${i}" + done + rm -f /tmp/suspend_wlan_ifaces + fi + + # Resume NetworkManager after suspend + systemctl start NetworkManager + + # Resume bluetooth interface + if [ -d "/proc/device-tree/bluetooth" ]; then + if [ -e "/tmp/up_bt_on_resume" ]; then + systemctl start bluetooth-init + systemctl start bluetooth + rm -f /tmp/up_bt_on_resume + fi + fi +fi diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby index b3e3f22e7..58ce08bf6 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby @@ -3,7 +3,7 @@ # # standby # -# Copyright (C) 2009-2018 by Digi International Inc. +# Copyright (C) 2009-2019 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it @@ -106,7 +106,6 @@ if [ -f "${syspower}" ]; then # Suspend the device printf "mem" > ${syspower} - sleep .5 # Post-resume actions resume_interfaces diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby-actions b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby-actions new file mode 100644 index 000000000..56ce080fd --- /dev/null +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx6sbc/standby-actions @@ -0,0 +1,64 @@ +#!/bin/sh +#=============================================================================== +# +# standby-actions +# +# 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: manage interfaces before suspending and after resuming from +# suspend +# +#=============================================================================== + +if [ "${1}" == "pre" ]; then + # Stop NetworkManager before suspend + systemctl stop NetworkManager + + # Suspend wireless interfaces + if [ -d "/proc/device-tree/wireless" ]; then + for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do + ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}" + done + + echo ${RESUME_IFACES} > /tmp/suspend_wlan_ifaces + grep -qs '^ath6kl_sdio' /proc/modules && rmmod ath6kl_sdio ath6kl_core + fi + + # Suspend bluetooth interface + if [ -d "/proc/device-tree/bluetooth" ]; then + hciconfig hci0 2>&1 | grep -qs UP && touch /tmp/up_bt_on_resume + systemctl stop bluetooth + systemctl stop bluetooth-init + fi +elif [ "${1}" == "post" ]; then + # Resume wireless interfaces + if [ -d "/proc/device-tree/wireless" ]; then + # Trigger wireless module loading event, and wait until the interface exists + udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d0301" + timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null + + # Bring up the interfaces that were brought down on suspend + for i in $(cat /tmp/suspend_wlan_ifaces | tr ' ' '\n' | sort); do + grep -qs "^${i}" /var/run/ifstate || ifup "${i}" + done + rm -f /tmp/suspend_wlan_ifaces + fi + + # Resume NetworkManager after suspend + systemctl start NetworkManager + + # Resume bluetooth interface + if [ -d "/proc/device-tree/bluetooth" ]; then + if [ -e "/tmp/up_bt_on_resume" ]; then + systemctl start bluetooth-init + systemctl start bluetooth + rm -f /tmp/up_bt_on_resume + fi + fi +fi diff --git a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby index a9bb5e00c..2830b7ac8 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby +++ b/meta-digi-dey/recipes-core/busybox/busybox/ccimx8x/standby @@ -3,7 +3,7 @@ # # standby # -# Copyright (C) 2018 by Digi International Inc. +# Copyright (C) 2018,2019 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it @@ -64,9 +64,6 @@ resume_interfaces() { done fi - # Resume NetworkManager after suspend - ${NM_DAEMON} start - # Resume bluetooth interface if [ -d "/proc/device-tree/bluetooth" ]; then if [ -n "${up_bt_on_resume}" ]; then @@ -74,6 +71,9 @@ resume_interfaces() { ${BT_DAEMON} start >/dev/null fi fi + + # Resume NetworkManager after suspend + ${NM_DAEMON} start } enter_critical_section() { diff --git a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb index 284bcfa0d..bc74e9adf 100644 --- a/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb +++ b/meta-digi-dey/recipes-core/packagegroups/packagegroup-dey-core.bb @@ -43,6 +43,7 @@ RDEPENDS_${PN} = "\ netbase \ networkmanager \ os-release \ + ${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'pciutils', '',d)} \ recovery-utils \ sysinfo \ system-monitor \ diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs.bb b/meta-digi-dey/recipes-core/recovery/recovery-initramfs.bb index ec8c21c46..119339830 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs.bb +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs.bb @@ -53,8 +53,6 @@ PACKAGES = "${PN}" FILES_${PN} = "/" -RDEPENDS_${PN}_append_ccimx6sbc = " \ - cryptsetup \ -" - +RDEPENDS_${PN}_append_ccimx6sbc = " cryptsetup" RDEPENDS_${PN}_append_ccimx6qpsbc = " cryptsetup" +RDEPENDS_${PN}_append_ccimx8x = " cryptsetup" diff --git a/meta-digi-dey/recipes-core/systemd/systemd_%.bbappend b/meta-digi-dey/recipes-core/systemd/systemd_%.bbappend index 68c00a54e..8c2d079c4 100644 --- a/meta-digi-dey/recipes-core/systemd/systemd_%.bbappend +++ b/meta-digi-dey/recipes-core/systemd/systemd_%.bbappend @@ -9,6 +9,9 @@ SRC_URI += " \ EXTRA_OEMESON_remove = "-Dfirmware-path=${nonarch_base_libdir}/firmware " EXTRA_OEMESON += "-Dfirmware-path=${nonarch_base_libdir}/firmware/ " +# Remove systemd-networkd from our images, since we already use NetworkManager +PACKAGECONFIG_remove = "networkd" + do_install_append () { # Disable the assignment of the fixed network interface name install -d ${D}${sysconfdir}/systemd/network diff --git a/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs.bb b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs.bb index deab483b9..b4060ba2c 100644 --- a/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs.bb +++ b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs.bb @@ -35,5 +35,9 @@ RDEPENDS_${PN}_append_ccimx6ul = " \ mtd-utils-ubifs \ " +RDEPENDS_${PN}_append_ccimx8x = " \ + cryptsetup \ +" + PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul)" \ No newline at end of file +COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul|ccimx8x)" \ No newline at end of file diff --git a/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/ccimx8x/trustfence-initramfs-init b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/ccimx8x/trustfence-initramfs-init new file mode 100644 index 000000000..ce5e3912f --- /dev/null +++ b/meta-digi-dey/recipes-core/trustfence/trustfence-initramfs/ccimx8x/trustfence-initramfs-init @@ -0,0 +1,81 @@ +#!/bin/sh +#=============================================================================== +# +# trustfence-initramfs-init +# +# 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: Init script for Trustfence initramfs +# +#=============================================================================== + +POWEROFF_TIME="10" + +error() { + [ "${#}" != "0" ] && printf "\n[ERROR]: %s\n\n" "${1}" + echo "The system will poweroff in ${POWEROFF_TIME} seconds" + sleep "${POWEROFF_TIME}" + sync && poweroff -f +} + +# Main +#------------------------------------------------------------------------------ +# Setup the environment. +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +mkdir -p /proc /sys /dev +mount -t proc proc /proc +mount -t sysfs sysfs /sys +mount -t devtmpfs devtmpfs /dev + +# Set kernel console loglevel +LOGLEVEL="$(sysctl -n kernel.printk)" +sysctl -q -w kernel.printk=4 + +for arg in $(cat /proc/cmdline); do + case "${arg}" in + init=*|rescue=1|root=*) eval ${arg};; + esac +done + +# Translate "PARTUUID=..." to real device +root="$(findfs ${root})" + +# Jump to a rescue shell if requested +if [ -n "${rescue}" ]; then + # Expand console and respawn if exited + while true; do + setsid cttyhack sh -l + sleep 1 + done +fi + +# Open LUKS encrypted device +if trustfence-tool ${root} cryptroot; then + # Reset root variable to the decrypted mapped device + root="/dev/mapper/cryptroot" +else + error "unable to open encrypted partition." +fi + +# Mount mapped device +mkdir -p /newroot +FSTYPE="$(blkid ${root} | sed -e 's,.*TYPE="\([^"]\+\)".*,\1,g')" +mount ${FSTYPE:+-t ${FSTYPE}} ${root} /newroot + +# +# Clean-up and do the switch_root to the final rootfs +# +# - restore previous kernel console loglevel +# - umount virtual filesystems +# +[ -n "${LOGLEVEL}" ] && sysctl -q -w kernel.printk="${LOGLEVEL}" +mount --move /dev /newroot/dev +umount /sys /proc +exec switch_root /newroot ${init:-/sbin/init} diff --git a/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee.inc b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee.inc new file mode 100644 index 000000000..48022327f --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee.inc @@ -0,0 +1,12 @@ +# Copyright (C) 2019 Digi International Inc. + +SUMMARY = "Python library to interact with Digi International's XBee radio frequency modules." +HOMEPAGE = "https://github.com/digidotcom/python-xbee" + +LICENSE = "MPL2.0" + +PYPI_PACKAGE = "digi-xbee" + +RDEPENDS_${PN} = "python3-pyserial" + +inherit pypi setuptools3 diff --git a/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.1.1.1.bb b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.1.1.1.bb new file mode 100644 index 000000000..24085cb9e --- /dev/null +++ b/meta-digi-dey/recipes-devtools/python3-xbee/python3-xbee_1.1.1.1.bb @@ -0,0 +1,13 @@ +# Copyright (C) 2019 Digi International Inc. + +require python3-xbee.inc + +# This change of directory is needed because the package used in pypi was uploaded +# with a wrong number version. Following versions will not need this patch. +# The tarball name has the 1.1.1.1 version, but once you untar the folder is +# named as 1.1.1 instead of 1.1.1.1. so it fails when using pypi. +S = "${WORKDIR}/${PYPI_PACKAGE}-1.1.1" + +LIC_FILES_CHKSUM="file://PKG-INFO;md5=0c518add38e71d88298939007bb83940" + +SRC_URI[md5sum] = "a30377d8a55071c2d54d7ae1ca24a50b" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 256a53e8b..d5501cdd7 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -11,7 +11,7 @@ SRCBRANCH = "master" SRCREV = "${AUTOREV}" CC_STASH = "gitsm://git@stash.digi.com/cc/cc_dey.git;protocol=ssh" -CC_GITHUB = "gitsm://github.com/digi-embedded/cc_dey.git;protocol=git" +CC_GITHUB = "gitsm://github.com/digi-embedded/cc_dey.git;protocol=https" CC_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" diff --git a/meta-digi-dey/recipes-digi/cryptoauth-openssl-engine/cryptoauth-openssl-engine_git.bb b/meta-digi-dey/recipes-digi/cryptoauth-openssl-engine/cryptoauth-openssl-engine_git.bb index c39720847..073184dc8 100644 --- a/meta-digi-dey/recipes-digi/cryptoauth-openssl-engine/cryptoauth-openssl-engine_git.bb +++ b/meta-digi-dey/recipes-digi/cryptoauth-openssl-engine/cryptoauth-openssl-engine_git.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3fdaa96f37898a0641820700bbf5f7b8" SRCBRANCH = "master" SRCREV = "a69a4f92af6bee9cb13035c2f859912744796380" -GIT_URI ?= "git://github.com/MicrochipTech/cryptoauth-openssl-engine.git;protocol=git" +GIT_URI ?= "git://github.com/MicrochipTech/cryptoauth-openssl-engine.git;protocol=https" SRC_URI = " \ ${GIT_URI};nobranch=1 \ diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-bt-gatt-server.bb b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-bt-gatt-server.bb new file mode 100644 index 000000000..c91792622 --- /dev/null +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-bt-gatt-server.bb @@ -0,0 +1,20 @@ +# Copyright (C) 2019, Digi International Inc. + +require recipes-digi/dey-examples/dey-examples-src.inc + +SUMMARY = "DEY examples: application to create a BLE GATT server" +SECTION = "examples" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit bluetooth + +DEPENDS = "${BLUEZ}" + +SRC_URI = "${DEY_EXAMPLES_GIT_URI};branch=${SRCBRANCH}" + +S = "${WORKDIR}/git/ble-gatt-server-example" + +do_install() { + oe_runmake DESTDIR=${D} install +} diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-caamblob.bb b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-caamblob.bb new file mode 100644 index 000000000..a5d40e17b --- /dev/null +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-caamblob.bb @@ -0,0 +1,18 @@ +# Copyright (C) 2017-2019, Digi International Inc. + +require recipes-digi/dey-examples/dey-examples-src.inc + +SUMMARY = "DEY examples: CAAM blob example application" +SECTION = "examples" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "${DEY_EXAMPLES_GIT_URI};branch=${SRCBRANCH}" + +S = "${WORKDIR}/git/caam-blob-example" + +inherit pkgconfig + +do_install() { + oe_runmake DESTDIR=${D} install +} diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc index 80bf22f6d..ecd7612de 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-src.inc @@ -4,6 +4,6 @@ SRCBRANCH = "dey-2.6/maint" SRCREV = "${AUTOREV}" DEY_EXAMPLES_STASH = "${DIGI_MTK_GIT}dey/dey-examples.git;protocol=ssh" -DEY_EXAMPLES_GITHUB = "${DIGI_GITHUB_GIT}/dey-examples.git;protocol=git" +DEY_EXAMPLES_GITHUB = "${DIGI_GITHUB_GIT}/dey-examples.git;protocol=https" DEY_EXAMPLES_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DEY_EXAMPLES_STASH}', '${DEY_EXAMPLES_GITHUB}', d)}" diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-v4l2.bb b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-v4l2.bb index 92631171b..f233abfbe 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-v4l2.bb +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-v4l2.bb @@ -5,11 +5,10 @@ SECTION = "examples" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -DEPENDS = "virtual/kernel" +inherit use-imx-headers SRC_URI = "file://v4l2_test" -INCLUDE_PATH = "-I${STAGING_KERNEL_DIR}/include" -INCLUDE_PATH_ccimx6 = "-I${STAGING_KERNEL_DIR}/arch/arm/include -I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include" +INCLUDE_PATH = "-I${STAGING_INCDIR_IMX}" S = "${WORKDIR}/v4l2_test" diff --git a/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c b/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c index 6fcbd376b..eb382f5f6 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c +++ b/meta-digi-dey/recipes-digi/dey-examples/files/rtc_test/rtc_test.c @@ -24,16 +24,29 @@ #include #define PROGRAM "rtc_test" -#define VERSION "3.1" +#define VERSION "3.2" #define DEFAULT_RTC_DEVICE_FILE "/dev/rtc" +// Digi RTC IOCTLs custom implementation using MCA +#define RTC_IOCTL_DIGI 0x100 +#define RTC_MCA_UIE_ON (RTC_IOCTL_DIGI + RTC_UIE_ON) +#define RTC_MCA_UIE_OFF (RTC_IOCTL_DIGI + RTC_UIE_OFF) +#define RTC_MCA_PIE_ON (RTC_IOCTL_DIGI + RTC_PIE_ON) +#define RTC_MCA_PIE_OFF (RTC_IOCTL_DIGI + RTC_PIE_OFF) +#define RTC_MCA_IRQP_READ (RTC_IOCTL_DIGI + RTC_IRQP_READ) +#define RTC_MCA_IRQP_SET (RTC_IOCTL_DIGI + RTC_IRQP_SET) + /* test options */ -#define RTC_TEST_RD_TIME (1<<0) -#define RTC_TEST_SET_TIME (1<<1) -#define RTC_TEST_RD_ALARM (1<<2) -#define RTC_TEST_SET_ALARM (1<<3) -#define RTC_TEST_ALARM_IRQ (1<<4) +#define RTC_TEST_RD_TIME (1<<0) +#define RTC_TEST_SET_TIME (1<<1) +#define RTC_TEST_RD_ALARM (1<<2) +#define RTC_TEST_SET_ALARM (1<<3) +#define RTC_TEST_ALARM_IRQ (1<<4) +#define RTC_TEST_STD_PERIODIC_IRQ (1<<5) +#define RTC_TEST_STD_1HZ_IRQ (1<<6) +#define RTC_TEST_DIGI_PERIODIC_IRQ (1<<7) +#define RTC_TEST_DIGI_1HZ_IRQ (1<<8) #define RTC_DEFAULT_TEST_OPS 0 /* None, pass it through the command line */ @@ -48,6 +61,10 @@ " -c : Read the alarm programed value\n" \ " -d : Set the alarm to trigger in the specified seconds\n" \ " -e : Test the alarm interrupt with the specified seconds\n" \ + " -p : Test the standard periodic interrupts (uses timers, doesn't wake from low power)\n" \ + " -u : Test the standard 1 Hz interrupt (uses RTC ALARM)\n" \ + " -v : Test MCA periodic interrupts (uses RTC PERIODIC_IRQ)\n" \ + " -w : Test MCA 1 Hz interrupt (uses RTC 1HZ)\n" \ " -f : Use specified device (default is /dev/rtc)\n" \ " -h : Help\n" \ " -m : Alarm has minutes resolution. (seconds by default)." \ @@ -65,6 +82,8 @@ static int rtc_test_time_set(int fd, struct rtc_time *tm); static int rtc_test_alarm_read(int fd); static int rtc_test_alarm_set(int fd, struct rtc_time *tm); static int rtc_test_alarm_irq(int fd, struct rtc_wkalrm *wkalrm); +static int rtc_test_periodic_irq(int fd, int digi); +static int rtc_test_1hz_irq(int fd, int digi); static void rtc_test_display_test_results(unsigned int test_ops, unsigned int test_results); static int seconds = 5; @@ -119,13 +138,13 @@ int main(int argc, char *argv[]) unsigned int test_results = 0; struct rtc_time rtc_tm; struct rtc_wkalrm wkalrm; - const char rtc_device_file[10] = DEFAULT_RTC_DEVICE_FILE; + char rtc_device_file[10] = DEFAULT_RTC_DEVICE_FILE; memset(&rtc_tm, 0, sizeof(struct rtc_time)); memset(&wkalrm, 0, sizeof(struct rtc_wkalrm)); if (argc > 1) { - while ((opt = getopt(argc, argv, "abcdef:hms:")) > 0) { + while ((opt = getopt(argc, argv, "abcdepuvwf:hms:")) > 0) { switch (opt) { case 'a': test_ops |= RTC_TEST_RD_TIME; @@ -142,6 +161,18 @@ int main(int argc, char *argv[]) case 'e': test_ops |= RTC_TEST_ALARM_IRQ; break; + case 'p': + test_ops |= RTC_TEST_STD_PERIODIC_IRQ; + break; + case 'u': + test_ops |= RTC_TEST_STD_1HZ_IRQ; + break; + case 'v': + test_ops |= RTC_TEST_DIGI_PERIODIC_IRQ; + break; + case 'w': + test_ops |= RTC_TEST_DIGI_1HZ_IRQ; + break; case 'f': strncpy(rtc_device_file,optarg,10); break; @@ -209,6 +240,30 @@ int main(int argc, char *argv[]) test_results &= ~RTC_TEST_ALARM_IRQ; } + if (test_ops & (RTC_TEST_STD_PERIODIC_IRQ)) { + retval = rtc_test_periodic_irq(rtc_fd, 0); + if (retval == 1) + test_results |= RTC_TEST_STD_PERIODIC_IRQ; + } + + if (test_ops & (RTC_TEST_STD_1HZ_IRQ)) { + retval = rtc_test_1hz_irq(rtc_fd, 0); + if (retval == 1) + test_results |= RTC_TEST_STD_1HZ_IRQ; + } + + if (test_ops & (RTC_TEST_DIGI_PERIODIC_IRQ)) { + retval = rtc_test_periodic_irq(rtc_fd, 1); + if (retval == 1) + test_results |= RTC_TEST_DIGI_PERIODIC_IRQ; + } + + if (test_ops & (RTC_TEST_DIGI_1HZ_IRQ)) { + retval = rtc_test_1hz_irq(rtc_fd, 1); + if (retval == 1) + test_results |= RTC_TEST_DIGI_1HZ_IRQ; + } + rtc_test_display_test_results(test_ops, test_results); close(rtc_fd); @@ -250,6 +305,22 @@ static void rtc_test_display_test_results(unsigned int test_ops, printf("Alarm interrupt test: %s\n", test_results & RTC_TEST_ALARM_IRQ ? "OK" : "Failure or not supported"); + if (test_ops & RTC_TEST_STD_PERIODIC_IRQ) + printf("Std periodic interrupt test: %s\n", + test_results & RTC_TEST_STD_PERIODIC_IRQ ? "OK" : + "Failure or not supported"); + if (test_ops & RTC_TEST_STD_1HZ_IRQ) + printf("Std 1 Hz interrupt test: %s\n", + test_results & RTC_TEST_STD_1HZ_IRQ ? "OK" : + "Failure or not supported"); + if (test_ops & RTC_TEST_DIGI_PERIODIC_IRQ) + printf("Digi periodic interrupt test: %s\n", + test_results & RTC_TEST_DIGI_PERIODIC_IRQ ? "OK" : + "Failure or not supported"); + if (test_ops & RTC_TEST_DIGI_1HZ_IRQ) + printf("Digi 1 Hz interrupt test: %s\n", + test_results & RTC_TEST_DIGI_1HZ_IRQ ? "OK" : + "Failure or not supported"); } /* @@ -427,3 +498,161 @@ static int rtc_test_alarm_irq(int fd, struct rtc_wkalrm *wkalrm) return result; } + +/* + * Function: rtc_test_periodic_irq + * Description: check periodic irq + */ +static int rtc_test_periodic_irq(int fd, int digi) +{ + int retval, i, irqcount = 0; + unsigned long tmp, data; + struct timeval start, end, diff; + int result = 1; + + /* Read periodic IRQ rate */ + retval = ioctl(fd, digi ? RTC_MCA_IRQP_READ : RTC_IRQP_READ, &tmp); + if (retval == -1) { + /* not all RTCs support periodic IRQs */ + if (errno == EINVAL) { + fprintf(stderr, "\nNo periodic IRQ support\n"); + } + perror("IRQP_READ ioctl"); + return 0; + } + fprintf(stderr, "\nPeriodic IRQ rate is %ld Hz.\n", tmp); + + fprintf(stderr, "Counting 20 interrupts at:"); + fflush(stderr); + + /* The frequencies 128 Hz, 256 Hz, ... 8192Hz are only allowed for root. */ + for (tmp = 2; tmp <= 64; tmp *= 2) { + retval = ioctl(fd, digi ? RTC_MCA_IRQP_SET : RTC_IRQP_SET, tmp); + if (retval == -1) { + /* not all RTCs can change their periodic IRQ rate */ + if (errno == EINVAL) { + fprintf(stderr, + "\n...Periodic IRQ rate is fixed\n"); + } + perror("IRQP_SET ioctl"); + return 0; + } + + fprintf(stderr, "\n%ld Hz:\t", tmp); + fflush(stderr); + + /* Enable periodic interrupts */ + retval = ioctl(fd, digi ? RTC_MCA_PIE_ON : RTC_PIE_ON, 0); + if (retval == -1) { + perror("PIE_ON ioctl"); + return 0; + } + + for (i = 1; i < 21; i++) { + gettimeofday(&start, NULL); + /* This blocks */ + retval = read(fd, &data, sizeof(unsigned long)); + if (retval == -1) { + perror("read"); + exit(errno); + } + gettimeofday(&end, NULL); + timersub(&end, &start, &diff); + if (diff.tv_sec > 0 || + diff.tv_usec > ((1000000L / tmp) * 1.10)) { + fprintf(stderr, "\nPIE delta error: %ld.%06ld should be close to 0.%06ld\n", + diff.tv_sec, diff.tv_usec, + (1000000L / tmp)); + fflush(stdout); + result = 0; + } + + fprintf(stderr, " %d",i); + fflush(stderr); + irqcount++; + } + + /* Disable periodic interrupts */ + retval = ioctl(fd, digi ? RTC_MCA_PIE_OFF : RTC_PIE_OFF, 0); + if (retval == -1) { + perror("PIE_OFF ioctl"); + return 0; + } + } + fprintf(stderr, "\n\n"); + fflush(stderr); + + return result; +} + +/* + * Function: rtc_test_1hz_irq + * Description: check 1 Hz irq + */ +static int rtc_test_1hz_irq(int fd, int digi) +{ + int retval, i, irqcount = 0; + unsigned long tmp, data; + struct timeval start, end, diff; + + /* Turn on update interrupts (one per second) */ + retval = ioctl(fd, digi ? RTC_MCA_UIE_ON : RTC_UIE_ON, 0); + if (retval == -1) { + if (errno == EINVAL) { + fprintf(stderr, + "\n...Update IRQs not supported.\n"); + } + perror("UIE_ON ioctl"); + return 0; + } + + fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading rtc"); + fflush(stderr); + for (i = 1; i < 6; i++) { + /* This read will block */ + retval = read(fd, &data, sizeof(unsigned long)); + if (retval == -1) { + perror("read"); + exit(errno); + } + fprintf(stderr, " %d",i); + fflush(stderr); + irqcount++; + } + + fprintf(stderr, "\nCounting 5 update (1/sec) interrupts from using select(2) on /dev/rtc:"); + fflush(stderr); + for (i = 1; i < 6; i++) { + struct timeval tv = {5, 0}; /* 5 second timeout on select */ + fd_set readfds; + + FD_ZERO(&readfds); + FD_SET(fd, &readfds); + /* The select will wait until an RTC interrupt happens. */ + retval = select(fd + 1, &readfds, NULL, NULL, &tv); + if (retval == -1) { + perror("select"); + exit(errno); + } + /* This read won't block unlike the select-less case above. */ + retval = read(fd, &data, sizeof(unsigned long)); + if (retval == -1) { + perror("read"); + exit(errno); + } + fprintf(stderr, " %d",i); + fflush(stderr); + irqcount++; + } + + /* Turn off update interrupts */ + retval = ioctl(fd, digi ? RTC_MCA_UIE_OFF : RTC_UIE_OFF, 0); + if (retval == -1) { + perror("UIE_OFF ioctl"); + return 0; + } + fprintf(stderr, "\n"); + fflush(stderr); + + return 1; +} diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/99-digiapix.rules b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/99-digiapix.rules index f48d744cb..4da39ff7c 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/99-digiapix.rules +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/99-digiapix.rules @@ -1,7 +1,10 @@ # libdigiapix: configure interfaces so they can be used by group 'digiapix' SUBSYSTEM=="i2c-dev", GROUP="digiapix", MODE="0660" +SUBSYSTEM=="iio", GROUP="digiapix", MODE="0660" +SUBSYSTEM=="misc", GROUP="digiapix", MODE="0660", ENV{DEVNAME}=="/dev/watchdog" SUBSYSTEM=="spidev", GROUP="digiapix", MODE="0660" +SUBSYSTEM=="watchdog",GROUP="digiapix", MODE="0660" # # Use two different rules for GPIO's. @@ -20,3 +23,4 @@ SUBSYSTEM=="gpio", KERNEL=="gpiochip0", ACTION=="add", RUN="/etc/udev/scripts/di SUBSYSTEM=="gpio", KERNEL!="gpiochip*", ACTION=="add", RUN="/etc/udev/scripts/digiapix.sh" SUBSYSTEM=="pwm", ACTION=="add|change", RUN="/etc/udev/scripts/digiapix.sh" +SUBSYSTEM=="iio", ACTION=="add", RUN="/etc/udev/scripts/digiapix.sh" diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/digiapix.sh b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/digiapix.sh index 8a9bdd26e..edab820d0 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/digiapix.sh +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix-git/digiapix.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2017, Digi International Inc. +# Copyright (c) 2017-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 @@ -28,8 +28,7 @@ elif basename "${DEVPATH}" | grep -qs "pwmchip[0-9]\+$" && [ "${ACTION}" = "chan chown root:digiapix /sys${DEVPATH}/${EXPORT} /sys${DEVPATH}/${EXPORT}/* chmod g+w /sys${DEVPATH}/${EXPORT}/* else - # Change group and mode of the sysfs files created whenever a 'gpioX' - # is exported + # Change group and mode of the sysfs files chown -h root:digiapix /sys${DEVPATH}/* chmod g+w /sys${DEVPATH}/* fi diff --git a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb index 7cc92c8c4..23f520cb1 100644 --- a/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb +++ b/meta-digi-dey/recipes-digi/libdigiapix/libdigiapix_git.bb @@ -12,7 +12,7 @@ SRCBRANCH ?= "dey-2.6/maint" SRCREV = "${AUTOREV}" LIBDIGIAPIX_URI_STASH = "${DIGI_MTK_GIT}dey/libdigiapix.git;protocol=ssh" -LIBDIGIAPIX_URI_GITHUB = "git://github.com/digi-embedded/libdigiapix.git;protocol=git" +LIBDIGIAPIX_URI_GITHUB = "${DIGI_GITHUB_GIT}/libdigiapix.git;protocol=https" LIBDIGIAPIX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${LIBDIGIAPIX_URI_STASH}', '${LIBDIGIAPIX_URI_GITHUB}', d)}" diff --git a/meta-digi-dey/recipes-digi/packagegroups/packagegroup-dey-examples.bb b/meta-digi-dey/recipes-digi/packagegroups/packagegroup-dey-examples.bb index f1b8e408b..2e428dea3 100644 --- a/meta-digi-dey/recipes-digi/packagegroups/packagegroup-dey-examples.bb +++ b/meta-digi-dey/recipes-digi/packagegroups/packagegroup-dey-examples.bb @@ -12,9 +12,11 @@ RDEPENDS_${PN} = "\ ${@bb.utils.contains("MACHINE_FEATURES", "alsa", "dey-examples-vplay", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "dey-examples-bt", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "dey-examples-btconfig", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "dey-examples-bt-gatt-server", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "bluetooth", "dey-examples-hdp", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "cryptochip", "dey-examples-cryptochip", "", d)} \ awsiotsdk-demo \ + dey-examples-caamblob \ dey-examples-cloudconnector \ dey-examples-digiapix \ dey-examples-rtc \ diff --git a/meta-digi-dey/recipes-extended/socketcan/libsocketcan/0001-libsocketcan-Get-and-set-CAN-FD-data-bitrate.patch b/meta-digi-dey/recipes-extended/socketcan/libsocketcan/0001-libsocketcan-Get-and-set-CAN-FD-data-bitrate.patch new file mode 100644 index 000000000..def59e0db --- /dev/null +++ b/meta-digi-dey/recipes-extended/socketcan/libsocketcan/0001-libsocketcan-Get-and-set-CAN-FD-data-bitrate.patch @@ -0,0 +1,331 @@ +From: Mike Engel +Date: Wed, 5 Jun 2019 12:26:37 +0200 +Subject: [PATCH] libsocketcan: Get and set CAN FD data bitrate + +The current libsocketcan library doesn't include support to configure +the data bitrate. This patch has been applied from the following e-mail +thread + +https://www.spinics.net/lists/linux-can/msg00388.html + +Signed-off-by: Mike Engel +--- + include/libsocketcan.h | 5 ++ + src/libsocketcan.c | 235 +++++++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 235 insertions(+), 5 deletions(-) + +diff --git a/include/libsocketcan.h b/include/libsocketcan.h +index 1603a7b..f503ebc 100644 +--- a/include/libsocketcan.h ++++ b/include/libsocketcan.h +@@ -43,6 +43,9 @@ int can_set_bittiming(const char *name, struct can_bittiming *bt); + int can_set_ctrlmode(const char *name, struct can_ctrlmode *cm); + int can_set_bitrate(const char *name, __u32 bitrate); + int can_set_bitrate_samplepoint(const char *name, __u32 bitrate, __u32 sample_point); ++int can_set_data_bittiming(const char *name, struct can_bittiming *databt); ++int can_set_data_bitrate(const char *name, __u32 bitrate); ++int can_set_data_bitrate_samplepoint(const char *name, __u32 bitrate, __u32 sample_point); + + int can_get_restart_ms(const char *name, __u32 *restart_ms); + int can_get_bittiming(const char *name, struct can_bittiming *bt); +@@ -51,6 +54,8 @@ int can_get_state(const char *name, int *state); + int can_get_clock(const char *name, struct can_clock *clock); + int can_get_bittiming_const(const char *name, struct can_bittiming_const *btc); + int can_get_berr_counter(const char *name, struct can_berr_counter *bc); ++int can_get_data_bittiming(const char *name, struct can_bittiming *bt); ++int can_get_data_bittiming_const(const char *name, struct can_bittiming_const *btc); + int can_get_device_stats(const char *name, struct can_device_stats *cds); + int can_get_link_stats(const char *name, struct rtnl_link_stats64 *rls); + +diff --git a/src/libsocketcan.c b/src/libsocketcan.c +index c802849..648b9cf 100644 +--- a/src/libsocketcan.c ++++ b/src/libsocketcan.c +@@ -66,6 +66,8 @@ + #define GET_BERR_COUNTER 7 + #define GET_XSTATS 8 + #define GET_LINK_STATS 9 ++#define GET_DATA_BITTIMING 10 ++#define GET_DATA_BITTIMING_CONST 11 + + struct get_req { + struct nlmsghdr n; +@@ -84,6 +86,7 @@ struct req_info { + __u32 restart_ms; + struct can_ctrlmode *ctrlmode; + struct can_bittiming *bittiming; ++ struct can_bittiming *databittiming; + }; + + /** +@@ -528,6 +531,26 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res) + fprintf(stderr, "no berr_counter data found\n"); + + break; ++ case GET_DATA_BITTIMING: ++ if (can_attr[IFLA_CAN_DATA_BITTIMING]) { ++ memcpy(res, ++ RTA_DATA(can_attr[IFLA_CAN_DATA_BITTIMING]), ++ sizeof(struct can_bittiming)); ++ ret = 0; ++ } else ++ fprintf(stderr, "no data_bittiming data found\n"); ++ ++ break; ++ case GET_DATA_BITTIMING_CONST: ++ if (can_attr[IFLA_CAN_DATA_BITTIMING_CONST]) { ++ memcpy(res, ++ RTA_DATA(can_attr[IFLA_CAN_DATA_BITTIMING_CONST]), ++ sizeof(struct can_bittiming_const)); ++ ret = 0; ++ } else ++ fprintf(stderr, "no data_bittiming_const data found\n"); ++ ++ break; + + default: + fprintf(stderr, "unknown acquire mode\n"); +@@ -648,6 +671,12 @@ static int do_set_nl_link(int fd, __u8 if_state, const char *name, + sizeof(struct can_bittiming)); + } + ++ if (req_info->databittiming != NULL) { ++ addattr_l(&req.n, 1024, IFLA_CAN_DATA_BITTIMING, ++ req_info->databittiming, ++ sizeof(struct can_bittiming)); ++ } ++ + if (req_info->ctrlmode != NULL) { + addattr_l(&req.n, 1024, IFLA_CAN_CTRLMODE, + req_info->ctrlmode, +@@ -870,6 +899,73 @@ int can_set_ctrlmode(const char *name, struct can_ctrlmode *cm) + } + + /** ++ * @internal ++ * set_bittiming - common helper function to setup the bittiming for ++ * can_set_bittiming() and can_set_data_bittiming(). ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * ++ * @param bitTiming pointer to a can_bittiming struct, configures the arbitration ++ * bit timing ++ * ++ * @param dataBitTiming pointer to a can_bittiming struct, configures the data ++ * bit timing ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++static int set_bittiming(const char *name, struct can_bittiming *bitTiming, ++ struct can_bittiming *dataBitTiming) ++{ ++ struct can_bittiming keepBitTiming = {0}; ++ ++ struct can_ctrlmode ctrlmode_fd = { ++ .mask = CAN_CTRLMODE_FD, ++ .flags = CAN_CTRLMODE_FD ++ }; ++ ++ struct req_info req_info = { ++ .bittiming = bitTiming ++ }; ++ ++ int result = 0; ++ ++ if (bitTiming && dataBitTiming) { ++ req_info.databittiming = dataBitTiming; ++ req_info.ctrlmode = &ctrlmode_fd; ++ } else if (dataBitTiming) { ++ /* set data bitrate and keep arbitration bitrate */ ++ result = can_get_bittiming(name, &keepBitTiming); ++ keepBitTiming.bitrate = 0; ++ req_info.bittiming = &keepBitTiming; ++ req_info.databittiming = dataBitTiming; ++ req_info.ctrlmode = &ctrlmode_fd; ++ } else if (bitTiming) { ++ /* set arbitration bitrate and keep data bitrate if set */ ++ struct can_ctrlmode cm = {0}; ++ ++ result = can_get_ctrlmode(name, &cm); ++ if (result == 0 && cm.flags & CAN_CTRLMODE_FD) { ++ result = can_get_data_bittiming(name, &keepBitTiming); ++ if (result == 0 && keepBitTiming.bitrate) { ++ keepBitTiming.bitrate = 0; ++ req_info.databittiming = &keepBitTiming; ++ req_info.ctrlmode = &ctrlmode_fd; ++ } ++ } ++ } else { ++ result = -1; ++ } ++ ++ if (result == -1) ++ return result; ++ ++ return set_link(name, 0, &req_info); ++} ++ ++/** + * @ingroup extern + * can_set_bittiming - setup the bittiming. + * +@@ -909,11 +1005,7 @@ int can_set_ctrlmode(const char *name, struct can_ctrlmode *cm) + + int can_set_bittiming(const char *name, struct can_bittiming *bt) + { +- struct req_info req_info = { +- .bittiming = bt, +- }; +- +- return set_link(name, 0, &req_info); ++ return set_bittiming(name, bt, NULL); + } + + /** +@@ -976,6 +1068,81 @@ int can_set_bitrate_samplepoint(const char *name, __u32 bitrate, + + /** + * @ingroup extern ++ * can_set_data_bittiming - setup the data bittiming. ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * @param bt pointer to a can_bittiming struct ++ * ++ * This sets the data bittiming of the can device. This is for advantage usage. ++ * ++ * Please see can_set_bittiming for more information about bit timing. ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++int can_set_data_bittiming(const char *name, struct can_bittiming *databt) ++{ ++ return set_bittiming(name, NULL, databt); ++} ++ ++/** ++ * @ingroup extern ++ * can_set_data_bitrate - setup the data bitrate. ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * @param bitrate data bitrate of the can bus ++ * ++ * This is the recommended way to setup the bus bit timing. You only have to ++ * give a bitrate value here. The exact bit timing will be calculated ++ * automatically. To use this function, make sure that CONFIG_CAN_CALC_BITTIMING ++ * is set to y in your kernel configuration. ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++int can_set_data_bitrate(const char *name, __u32 bitrate) ++{ ++ struct can_bittiming bt = { ++ .bitrate = bitrate, ++ }; ++ ++ return can_set_data_bittiming(name, &bt); ++} ++ ++/** ++ * @ingroup extern ++ * can_set_data_bitrate_samplepoint - setup the data bitrate. ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * @param bitrate data bitrate of the can bus ++ * @param sample_point sample point value ++ * ++ * This one is similar to can_set_date_bitrate, only you can additionally set up the ++ * time point for sampling (sample point) customly instead of using the ++ * CIA recommended value. sample_point can be a value between 0 and 999. ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++int can_set_data_bitrate_samplepoint(const char *name, __u32 bitrate, ++ __u32 sample_point) ++{ ++ struct can_bittiming bt = { ++ bt.bitrate = bitrate, ++ bt.sample_point = sample_point, ++ }; ++ ++ return can_set_data_bittiming(name, &bt); ++} ++ ++/** ++ * @ingroup extern + * can_get_state - get the current state of the device + * + * @param name name of the can device. This is the netdev name, as ifconfig -a shows +@@ -1205,3 +1372,61 @@ int can_get_link_stats(const char *name, struct rtnl_link_stats64 *rls) + { + return get_link(name, GET_LINK_STATS, rls); + } ++ ++/** ++ * @ingroup extern ++ * can_get_data_bittiming - get the current data bit timing configuration. ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * @param bt pointer to the bittiming struct. ++ * ++ * This one stores the current data bittiming configuration. ++ * ++ * Please see can_set_bittiming for more information about bit timing. ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++int can_get_data_bittiming(const char *name, struct can_bittiming *bt) ++{ ++ return get_link(name, GET_DATA_BITTIMING, bt); ++} ++ ++/** ++ * @ingroup extern ++ * can_get_data_bittiming_const - get the current data bit timing constant. ++ * ++ * @param name name of the can device. This is the netdev name, as ifconfig -a shows ++ * in your system. usually it contains prefix "can" and the numer of the can ++ * line. e.g. "can0" ++ * @param btc pointer to the bittiming constant struct. ++ * ++ * This one stores the hardware dependent data bittiming constant. The ++ * can_bittiming_const struct consists: ++ * ++ * @code ++ * struct can_bittiming_const { ++ * char name[16]; ++ * __u32 tseg1_min; ++ * __u32 tseg1_max; ++ * __u32 tseg2_min; ++ * __u32 tseg2_max; ++ * __u32 sjw_max; ++ * __u32 brp_min; ++ * __u32 brp_max; ++ * __u32 brp_inc; ++ * }; ++ * @endcode ++ * ++ * The information in this struct is used to calculate the bus bit timing ++ * automatically. ++ * ++ * @return 0 if success ++ * @return -1 if failed ++ */ ++int can_get_data_bittiming_const(const char *name, struct can_bittiming_const *btc) ++{ ++ return get_link(name, GET_DATA_BITTIMING_CONST, btc); ++} diff --git a/meta-digi-dey/recipes-extended/socketcan/libsocketcan_%.bbappend b/meta-digi-dey/recipes-extended/socketcan/libsocketcan_%.bbappend new file mode 100644 index 000000000..03b53c77f --- /dev/null +++ b/meta-digi-dey/recipes-extended/socketcan/libsocketcan_%.bbappend @@ -0,0 +1,10 @@ +# Copyright 2019, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRCREV = "df01f01354d7c44a07370ae27a3d20b52255830b" + +SRC_URI += " \ + file://0001-libsocketcan-Get-and-set-CAN-FD-data-bitrate.patch \ +" + diff --git a/meta-digi-dey/recipes-gnome/gnome/adwaita-icon-theme_%.bbappend b/meta-digi-dey/recipes-gnome/gnome/adwaita-icon-theme_%.bbappend new file mode 100644 index 000000000..519e4cedc --- /dev/null +++ b/meta-digi-dey/recipes-gnome/gnome/adwaita-icon-theme_%.bbappend @@ -0,0 +1,9 @@ +# Copyright (C) 2019 Digi International. + +do_install_append() { + # We don't use the scalable icons anywhere and they take up over + # 1 MiB in the filesystem, so remove them. + rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic*.svg +} + +FILES_${PN}-symbolic_remove = "${prefix}/share/icons/Adwaita/scalable/*/*-symbolic*.svg" diff --git a/meta-digi-dey/recipes-graphics/drm/libdrm_2.4.91.imx.bb b/meta-digi-dey/recipes-graphics/drm/libdrm_2.4.91.imx.bb index dad9a5198..8f30704f5 100644 --- a/meta-digi-dey/recipes-graphics/drm/libdrm_2.4.91.imx.bb +++ b/meta-digi-dey/recipes-graphics/drm/libdrm_2.4.91.imx.bb @@ -17,7 +17,7 @@ SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \ file://fix_O_CLOEXEC_undeclared.patch \ file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \ " -SRCREV = "49cca25f6319f3607b121093e46e474fe528aa39" +SRCREV = "95645843f59495387a072d48374718f22e69d7a4" DEFAULT_PREFERENCE = "-1" diff --git a/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.6.0.bb b/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.7.1.bb similarity index 80% rename from meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.6.0.bb rename to meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.7.1.bb index 2f7ad1175..b71eea828 100644 --- a/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.6.0.bb +++ b/meta-digi-dey/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.7.1.bb @@ -4,7 +4,7 @@ DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" RDEPENDS_${PN} = "libgal-imx libdrm" @@ -16,8 +16,8 @@ S="${WORKDIR}/${PN}-${PV}" inherit fsl-eula-unpack -SRC_URI[md5sum] = "080de224085c37db107b5e477bd7900a" -SRC_URI[sha256sum] = "854014164be517467252a2f0a79145bdcdd2892243b317ba25a3157d85a612ba" +SRC_URI[md5sum] = "cb59630320d91c4a11306e60a682781d" +SRC_URI[sha256sum] = "cee8b44509d15b9eb0dbf736d25c080d151602849a5e621be13e9b8f7b501f04" do_install () { diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch32.bb b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch32.bb deleted file mode 100644 index 5f4be3698..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch32.bb +++ /dev/null @@ -1,4 +0,0 @@ -require imx-gpu-g2d.inc - -SRC_URI[md5sum] = "826349f67198359fddfe3e456770eb68" -SRC_URI[sha256sum] = "35a5875d795190117b7fcdd43229d18576d530fddfd32f9d79e161fc7028d29d" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch64.bb b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch64.bb deleted file mode 100644 index 9e1a88b79..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p2.3-aarch64.bb +++ /dev/null @@ -1,4 +0,0 @@ -require imx-gpu-g2d.inc - -SRC_URI[md5sum] = "3f88b8100f7784e5a754f4605e25d563" -SRC_URI[sha256sum] = "aeb21adce885bcef1c4018388b7dc2c1d3929dd29826ecf5ffcd95d48ba1865f" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d.inc b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p4.2.bb similarity index 50% rename from meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d.inc rename to meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p4.2.bb index 92d1d908b..b9688af78 100644 --- a/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d.inc +++ b/meta-digi-dey/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.4.p4.2.bb @@ -1,38 +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=6dfb32a488e5fd6bae52fbf6c7ebb086" +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" DEPENDS += "libgal-imx" PROVIDES += "virtual/libg2d" -SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" +FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" -S="${WORKDIR}/${PN}-${PV}" +SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" +SRC_URI[aarch64.md5sum] = "a2d9e2b0f373a14bb41621a1cded3112" +SRC_URI[aarch64.sha256sum] = "b5bd824386c30fbe167a529344a3e6f7c87adf9e9bdd4184680e28968d1e9853" +SRC_URI[arm.md5sum] = "83777eac2bcd959894ca964f9cb5c9a0" +SRC_URI[arm.sha256sum] = "2210c5590a822a764838dfdefed08c882c70c14dc29fba04c255cee8b4df5196" + +S="${WORKDIR}/${FSLBIN_NAME}" inherit fsl-eula-unpack -do_install () { - +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} } -RDEPENDS_${PN} = "libgal-imx" - FILES_${PN} = "${libdir}/libg2d* /opt" FILES_${PN}-dev = "${includedir}" INSANE_SKIP_${PN} = "ldflags" -# Compatible with i.MX with 2D GPU but no DPU -COMPATIBLE_MACHINE_2D = "(^$)" -COMPATIBLE_MACHINE_2D_imxgpu2d = "${MACHINE}" -COMPATIBLE_MACHINE = "${COMPATIBLE_MACHINE_2D}" -COMPATIBLE_MACHINE_imxdpu = "(^$)" +RDEPENDS_${PN} = "libgal-imx" + +COMPATIBLE_MACHINE = "(imxgpu2d)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc index b2682eda9..9b00659b6 100644 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv-v6.inc @@ -5,7 +5,6 @@ DESCRIPTION = "GPU driver and apps for imx" SECTION = "libs" LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" DEPENDS += \ "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ @@ -142,6 +141,7 @@ HAS_GBM_mx8 = "true" GLES3_HEADER_REMOVALS = "gl31.h gl32.h" GLES3_HEADER_REMOVALS_remove_mx8 = "gl31.h" GLES3_HEADER_REMOVALS_remove_mx8qm = "gl32.h" +GLES3_HEADER_REMOVALS_mx8qxp = "" do_install () { install -d ${D}${libdir} @@ -153,8 +153,8 @@ 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 - rm -rf ${D}${includedir}/vulkan/vulkan.h + # Use vulkan headers from vulkan recipe + rm -rf ${D}${includedir}/vulkan install -d ${D}${libdir}/pkgconfig if ${HAS_GBM}; then @@ -300,6 +300,7 @@ FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/ FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}" FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL" +RDEPENDS_libgal-imx += "kernel-module-imx-gpu-viv" RPROVIDES_libgal-imx += "libgal-imx" INSANE_SKIP_libgal-imx += "build-deps" @@ -309,7 +310,7 @@ FILES_libgbm-imx_mx8 = "${libdir}/libgbm${SOLIBS} ${libdir}/gbm_viv${S 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 = "${libdir}/vulkan/libvulkan_VSI${SOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/vulkan/libvulkan_VSI${SOLIBSDEV}" INSANE_SKIP_libvulkan-imx += "dev-deps dev-so" @@ -342,6 +343,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" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch32.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch32.bb deleted file mode 100644 index 9532d9fb5..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch32.bb +++ /dev/null @@ -1,6 +0,0 @@ -require imx-gpu-viv-v6.inc - -SRC_URI[md5sum] = "d5529f8b6a6db1714f996a0de0b0858a" -SRC_URI[sha256sum] = "832d75095d746083bab13cefb0ab27e2da3930eadc215b8f2994d8cd02e387ab" - -COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch64.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch64.bb deleted file mode 100644 index 31e67544b..000000000 --- a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p2.3-aarch64.bb +++ /dev/null @@ -1,6 +0,0 @@ -require imx-gpu-viv-v6.inc - -SRC_URI[md5sum] = "9a58192b56e2ed0737a29cd59e52734b" -SRC_URI[sha256sum] = "041da1d3495d8e8485f08d56a8f5db4a1a9a75a510adb10c65d83be7c3281e80" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch32.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch32.bb new file mode 100644 index 000000000..8761a980f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch32.bb @@ -0,0 +1,8 @@ +require imx-gpu-viv-v6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +SRC_URI[md5sum] = "db096170c024aee88c48dd5b627e54b9" +SRC_URI[sha256sum] = "aa53c15c34b7af3b05876a0dfe4046ed4b864464d1bc9f10dcc0978e448f12a2" + +COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" diff --git a/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch64.bb b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch64.bb new file mode 100644 index 000000000..66e2da76f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.4.p4.2-aarch64.bb @@ -0,0 +1,8 @@ +require imx-gpu-viv-v6.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +SRC_URI[md5sum] = "fd50ff48725e6dd44aab2e08aeb87717" +SRC_URI[sha256sum] = "a36cea6116f3e04ef0fbaf880965eed71b093a065e25c91b2b494df0f944792b" + +COMPATIBLE_MACHINE = "(mx8)" diff --git a/meta-digi-dey/recipes-graphics/microwindows/microwindows-0.91/0002-Arch.rules-remove-mstructure-size-boundary-8-flag.patch b/meta-digi-dey/recipes-graphics/microwindows/microwindows-0.91/0002-Arch.rules-remove-mstructure-size-boundary-8-flag.patch new file mode 100644 index 000000000..85a93778d --- /dev/null +++ b/meta-digi-dey/recipes-graphics/microwindows/microwindows-0.91/0002-Arch.rules-remove-mstructure-size-boundary-8-flag.patch @@ -0,0 +1,24 @@ +From: Jose Diaz de Grenu +Date: Fri, 2 Aug 2019 14:28:35 +0200 +Subject: [PATCH] Arch.rules: remove 'mstructure-size-boundary' flag + +This flag is not supported in ARM64 toolchains. + +Signed-off-by: Jose Diaz de Grenu +--- + Arch.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Arch.rules b/Arch.rules +index b01225d0f514..2fd57bf635b9 100644 +--- a/Arch.rules ++++ b/Arch.rules +@@ -46,7 +46,7 @@ COMPILER = gcc + CXX_COMPILER = g++ + TOOLSPREFIX = $(ARMTOOLSPREFIX) + DEFINES += -DLINUX=1 -DUNIX=1 +-CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) -mstructure-size-boundary=8 ++CFLAGS += $(GCC_WARNINGS) $(OPTFLAGS) + LDFLAGS += + endif + diff --git a/meta-digi-dey/recipes-graphics/microwindows/microwindows_0.91.bb b/meta-digi-dey/recipes-graphics/microwindows/microwindows_0.91.bb index 6f2fc5f6d..8ac4aacd4 100644 --- a/meta-digi-dey/recipes-graphics/microwindows/microwindows_0.91.bb +++ b/meta-digi-dey/recipes-graphics/microwindows/microwindows_0.91.bb @@ -11,6 +11,8 @@ SRC_URI = " \ file://0001-defconfig.patch;striplevel=2 \ " +SRC_URI_append_aarch64 = " file://0002-Arch.rules-remove-mstructure-size-boundary-8-flag.patch; " + SRC_URI[md5sum] = "901e912cf3975f6460a9bb4325557645" SRC_URI[sha256sum] = "c0a8473842fc757ff4c225f82b83d98bba5da0dca0cf843cfc7792064a393435" diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Dont-use-isystem.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Dont-use-isystem.patch index 6dd48fcdc..bf0b80a30 100644 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Dont-use-isystem.patch +++ b/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Dont-use-isystem.patch @@ -1,26 +1,30 @@ -From 2bc6bb9831d07f035fea74ea745cea43dd5f9ef9 Mon Sep 17 00:00:00 2001 +From 7144c44ec70dee73a628463b99ffeed74b1a8ef6 Mon Sep 17 00:00:00 2001 From: Khem Raj -Date: Sat, 9 Sep 2017 23:48:31 -0700 +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 --- -Upstream-Status: Pending + cmake/OpenCVPCHSupport.cmake | 2 ++ + 1 file changed, 2 insertions(+) - cmake/OpenCVPCHSupport.cmake | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -Index: git/cmake/OpenCVPCHSupport.cmake -=================================================================== ---- git.orig/cmake/OpenCVPCHSupport.cmake -+++ git/cmake/OpenCVPCHSupport.cmake -@@ -17,7 +17,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX) - IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2.0") +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/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch new file mode 100644 index 000000000..63cb7f943 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/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/meta-digi-dey/recipes-graphics/opencv/opencv/0001-dnn-allow-to-use-external-protobuf.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0001-dnn-allow-to-use-external-protobuf.patch deleted file mode 100644 index c8ae3f0cc..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/0001-dnn-allow-to-use-external-protobuf.patch +++ /dev/null @@ -1,66 +0,0 @@ -From f1604999632344f5bcbf6f611693917f6a9c2aa3 Mon Sep 17 00:00:00 2001 -From: Alexander Alekhin -Date: Mon, 9 Jul 2018 17:19:35 +0300 -Subject: [PATCH] dnn: allow to use external protobuf - -"custom layers" feature will not work properly in these builds. - -Signed-off-by: Tom Hochstein - -Upstream-Status: Backport [https://github.com/opencv/opencv/commit/e2b5d112909b9dfd764f14833b82e38e4bc2f81f] ---- - modules/dnn/CMakeLists.txt | 4 ++++ - modules/dnn/src/caffe/caffe_io.cpp | 4 ++++ - modules/dnn/test/test_layers.cpp | 4 ++++ - 3 files changed, 12 insertions(+) - -diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt -index e306dde..a2f741c 100644 ---- a/modules/dnn/CMakeLists.txt -+++ b/modules/dnn/CMakeLists.txt -@@ -48,6 +48,10 @@ if(ANDROID) - add_definitions(-DDISABLE_POSIX_MEMALIGN -DTH_DISABLE_HEAP_TRACKING) - endif() - -+if(NOT BUILD_PROTOBUF) -+ add_definitions(-DOPENCV_DNN_EXTERNAL_PROTOBUF=1) -+endif() -+ - add_definitions(-DHAVE_PROTOBUF=1) - - #suppress warnings in autogenerated caffe.pb.* files -diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp -index 730c752..9f4e31c 100644 ---- a/modules/dnn/src/caffe/caffe_io.cpp -+++ b/modules/dnn/src/caffe/caffe_io.cpp -@@ -1120,7 +1120,11 @@ bool ReadProtoFromTextFile(const char* filename, Message* proto) { - std::ifstream fs(filename, std::ifstream::in); - CHECK(fs.is_open()) << "Can't open \"" << filename << "\""; - IstreamInputStream input(&fs); -+#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF - return google::protobuf::TextFormat::Parser(true).Parse(&input, proto); -+#else -+ return google::protobuf::TextFormat::Parser().Parse(&input, proto); -+#endif - } - - bool ReadProtoFromBinaryFile(const char* filename, Message* proto) { -diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp -index 963206b..05ea61a 100644 ---- a/modules/dnn/test/test_layers.cpp -+++ b/modules/dnn/test/test_layers.cpp -@@ -1150,7 +1150,11 @@ private: - - TEST(Layer_Test_Interp_custom, Accuracy) - { -+#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF - CV_DNN_REGISTER_LAYER_CLASS(Interp, InterpLayer); -+#else -+ CV_DNN_REGISTER_LAYER_CLASS(DISABLED_Interp, InterpLayer); // requires patched protobuf (available in OpenCV source tree only) -+#endif - testLayerUsingCaffeModels("layer_interp", DNN_TARGET_CPU, false, false); - LayerFactory::unregisterLayer("Interp"); - } --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/0001-photo-avoid-resizing-a-const-Mat-in-decolor.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0001-photo-avoid-resizing-a-const-Mat-in-decolor.patch deleted file mode 100755 index 35bb96ad2..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/0001-photo-avoid-resizing-a-const-Mat-in-decolor.patch +++ /dev/null @@ -1,66 +0,0 @@ -From f49f6d52b45a09a133621c3e96b77b321746452f Mon Sep 17 00:00:00 2001 -From: berak -Date: Tue, 7 Aug 2018 15:14:22 +0200 -Subject: [PATCH] photo: avoid resizing a const Mat in decolor() - ---- - modules/photo/src/contrast_preserve.hpp | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) - -diff --git a/modules/photo/src/contrast_preserve.hpp b/modules/photo/src/contrast_preserve.hpp -index ec8274e..65ca9c1 100644 ---- a/modules/photo/src/contrast_preserve.hpp -+++ b/modules/photo/src/contrast_preserve.hpp -@@ -204,14 +204,19 @@ void Decolor::add_to_vector_poly(vector < vector > &polyGrad, const vec - idx1++; - } - --void Decolor::weak_order(const Mat &img, vector &alf) const -+void Decolor::weak_order(const Mat &im, vector &alf) const - { -- const int h = img.size().height; -- const int w = img.size().width; -+ Mat img; -+ const int h = im.size().height; -+ const int w = im.size().width; - if((h + w) > 800) - { - const double sizefactor = double(800)/(h+w); -- resize(img, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ resize(im, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ } -+ else -+ { -+ img = im; - } - - Mat curIm = Mat(img.size(),CV_32FC1); -@@ -246,16 +251,20 @@ void Decolor::weak_order(const Mat &img, vector &alf) const - alf[i] -= tmp1[i] * tmp2[i] * tmp3[i]; - } - --void Decolor::grad_system(const Mat &img, vector < vector < double > > &polyGrad, -+void Decolor::grad_system(const Mat &im, vector < vector < double > > &polyGrad, - vector < double > &Cg, vector & comb) const - { -- int h = img.size().height; -- int w = img.size().width; -- -+ Mat img; -+ int h = im.size().height; -+ int w = im.size().width; - if((h + w) > 800) - { - const double sizefactor = double(800)/(h+w); -- resize(img, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ resize(im, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ } -+ else -+ { -+ img = im; - } - - h = img.size().height; --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/0002-photo-Decolor-corrections.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0002-photo-Decolor-corrections.patch deleted file mode 100755 index e3ba3d225..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/0002-photo-Decolor-corrections.patch +++ /dev/null @@ -1,51 +0,0 @@ -From fb2b26c4197cb7569e9df8afbadedbe419b4e04e Mon Sep 17 00:00:00 2001 -From: yom -Date: Tue, 7 Aug 2018 17:52:05 +0200 -Subject: [PATCH] photo: Decolor corrections * Keep image aspect ratio in - resize called in grad_system and weak_order * Bug correction in loop - inside Decolor::gradvector - ---- - modules/photo/src/contrast_preserve.hpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules/photo/src/contrast_preserve.hpp b/modules/photo/src/contrast_preserve.hpp -index 65ca9c1..1afd4bc 100644 ---- a/modules/photo/src/contrast_preserve.hpp -+++ b/modules/photo/src/contrast_preserve.hpp -@@ -159,12 +159,12 @@ void Decolor::gradvector(const Mat &img, vector &grad) const - - for(int i=0;i(i, j); -+ grad[i*width + j] = d_trans.at(i, j); - - const int offset = width * height; - for(int i=0;i(i, j); -+ grad[offset + i * width + j] = d1_trans.at(i, j); - } - - void Decolor::colorGrad(const Mat &img, vector &Cg) const -@@ -212,7 +212,7 @@ void Decolor::weak_order(const Mat &im, vector &alf) const - if((h + w) > 800) - { - const double sizefactor = double(800)/(h+w); -- resize(im, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ resize(im, img, Size(cvRound(w*sizefactor), cvRound(h*sizefactor))); - } - else - { -@@ -260,7 +260,7 @@ void Decolor::grad_system(const Mat &im, vector < vector < double > > &polyGrad, - if((h + w) > 800) - { - const double sizefactor = double(800)/(h+w); -- resize(im, img, Size(cvRound(h*sizefactor), cvRound(w*sizefactor))); -+ resize(im, img, Size(cvRound(w*sizefactor), cvRound(h*sizefactor))); - } - else - { --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/0003-To-fix-errors-as-following.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/0003-To-fix-errors-as-following.patch index 3ab8f773a..5270b8c9f 100644 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/0003-To-fix-errors-as-following.patch +++ b/meta-digi-dey/recipes-graphics/opencv/opencv/0003-To-fix-errors-as-following.patch @@ -23,7 +23,7 @@ Index: git/modules/ts/include/opencv2/ts.hpp =================================================================== --- git.orig/modules/ts/include/opencv2/ts.hpp +++ git/modules/ts/include/opencv2/ts.hpp -@@ -611,7 +611,7 @@ protected: +@@ -608,7 +608,7 @@ protected: } }; @@ -32,16 +32,8 @@ Index: git/modules/ts/include/opencv2/ts.hpp struct DefaultRngAuto { -@@ -667,14 +667,14 @@ std::string findDataFile(const std::stri - - #ifdef HAVE_OPENCL - namespace ocl { --void dumpOpenCLDevice(); -+CV_EXPORTS void dumpOpenCLDevice(); - } - #define TEST_DUMP_OCL_INFO cvtest::ocl::dumpOpenCLDevice(); - #else - #define TEST_DUMP_OCL_INFO +@@ -671,7 +671,7 @@ private: + #endif #endif -void parseCustomOptions(int argc, char **argv); @@ -66,18 +58,12 @@ 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,10 +9,10 @@ +@@ -9,7 +9,7 @@ #define OPENCV_TS_EXT_HPP namespace cvtest { -void checkIppStatus(); --extern bool skipUnstableTests; --extern bool runBigDataTests; --extern int testThreads; +CV_EXPORTS void checkIppStatus(); -+CV_EXPORTS extern bool skipUnstableTests; -+CV_EXPORTS extern bool runBigDataTests; -+CV_EXPORTS extern int testThreads; - } - - // check for required "opencv_test" namespace + extern bool skipUnstableTests; + extern bool runBigDataTests; + extern int testThreads; diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/fix_openvx_samples.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/fix_openvx_samples.patch deleted file mode 100644 index 3db3dd15d..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/fix_openvx_samples.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/samples/openvx/CMakeLists.txt b/samples/openvx/CMakeLists.txt -index fd9165b..85fe948 100644 ---- a/samples/openvx/CMakeLists.txt -+++ b/samples/openvx/CMakeLists.txt -@@ -21,5 +21,5 @@ add_definitions(-DIVX_HIDE_INFO_WARNINGS) - file(GLOB_RECURSE cpp_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) - foreach(sample_filename ${cpp_samples}) - ocv_define_sample(tgt ${sample_filename} openvx) -- ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS}) -+ ocv_target_link_libraries(${tgt} ${OPENCV_LINKER_LIBS} ${OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS} ${OPENVX_LIBRARIES}) - endforeach() diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/fix_python_bindings.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/fix_python_bindings.patch deleted file mode 100644 index 1609b49b5..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/fix_python_bindings.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/modules/python/bindings/CMakeLists.txt b/modules/python/bindings/CMakeLists.txt -index 73c67aa..a71c297 100644 ---- a/modules/python/bindings/CMakeLists.txt -+++ b/modules/python/bindings/CMakeLists.txt -@@ -20,7 +20,8 @@ endforeach() - set(opencv_hdrs "") - set(opencv_userdef_hdrs "") - foreach(m ${OPENCV_PYTHON_MODULES}) -- ocv_list_filter(OPENCV_MODULE_${m}_HEADERS "${OPENCV_MODULE_${m}_LOCATION}/include" __hdrs) -+ string(REPLACE "+" "\\\\+" __pattern "${OPENCV_MODULE_${m}_LOCATION}/include") -+ ocv_list_filter(OPENCV_MODULE_${m}_HEADERS "${__pattern}" __hdrs) - list(APPEND opencv_hdrs ${__hdrs}) - file(GLOB userdef_hdrs ${OPENCV_MODULE_${m}_LOCATION}/misc/python/pyopencv*.hpp) - list(APPEND opencv_userdef_hdrs ${userdef_hdrs}) diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/fixpkgconfig.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/fixpkgconfig.patch deleted file mode 100644 index 76dfd04d7..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/fixpkgconfig.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake -index 425c0fa..9123dc6 100644 ---- a/cmake/OpenCVGenPkgconfig.cmake -+++ b/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() -@@ -125,10 +125,14 @@ 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/meta-digi-dey/recipes-graphics/opencv/opencv/protobuf.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/protobuf.patch deleted file mode 100644 index c63dc142e..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/protobuf.patch +++ /dev/null @@ -1,57 +0,0 @@ -Upstream-status: Inappropriate [OE specific] - -Signed-off-by: Ricardo Ribalda -diff --git a/cmake/OpenCVFindLibProtobuf.cmake b/cmake/OpenCVFindLibProtobuf.cmake -index b6ce1e7fd56b..e916ec0df2a6 100644 ---- a/cmake/OpenCVFindLibProtobuf.cmake -+++ b/cmake/OpenCVFindLibProtobuf.cmake -@@ -7,21 +7,21 @@ OCV_OPTION(BUILD_PROTOBUF "Force to build libprotobuf from sources" ON) - OCV_OPTION(PROTOBUF_UPDATE_FILES "Force to rebuild .proto files" OFF) - - if(PROTOBUF_UPDATE_FILES) -- if(NOT DEFINED Protobuf_PROTOC_EXECUTABLE) -+ if(NOT DEFINED PROTOBUF_PROTOC_EXECUTABLE) - find_package(Protobuf QUIET) - endif() -- if(DEFINED Protobuf_PROTOC_EXECUTABLE AND EXISTS ${Protobuf_PROTOC_EXECUTABLE}) -- message(STATUS "The protocol buffer compiler is found (${Protobuf_PROTOC_EXECUTABLE})") -+ if(DEFINED PROTOBUF_PROTOC_EXECUTABLE AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE}) -+ message(STATUS "The protocol buffer compiler is found (${PROTOBUF_PROTOC_EXECUTABLE})") - else() -- message(FATAL_ERROR "The protocol buffer compiler is not found (Protobuf_PROTOC_EXECUTABLE='${Protobuf_PROTOC_EXECUTABLE}')") -+ message(FATAL_ERROR "The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='${PROTOBUF_PROTOC_EXECUTABLE}')") - endif() - endif() - --if(NOT BUILD_PROTOBUF AND NOT (DEFINED Protobuf_INCLUDE_DIRS AND DEFINED Protobuf_LIBRARIES)) -+if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES)) - find_package(Protobuf QUIET) - endif() - --if(Protobuf_FOUND) -+if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES)) - # nothing - else() - set(Protobuf_LIBRARIES libprotobuf) -diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt -index 2a71568d1a44..c6329a742263 100644 ---- a/modules/dnn/CMakeLists.txt -+++ b/modules/dnn/CMakeLists.txt -@@ -7,7 +7,7 @@ if(DEFINED BUILD_opencv_dnn AND NOT BUILD_opencv_dnn) - endif() - - include(${OpenCV_SOURCE_DIR}/cmake/OpenCVFindLibProtobuf.cmake) --if(NOT Protobuf_FOUND) -+if(NOT PROTOBUF_FOUND) - ocv_module_disable(opencv_dnn) - endif() - -@@ -72,7 +72,7 @@ ocv_source_group("Src\\protobuf" FILES ${Protobuf_SRCS} ${Protobuf_HDRS}) - ocv_module_include_directories(include ${Protobuf_INCLUDE_DIRS}) - - ocv_glob_module_sources(${Protobuf_SRCS} ${Protobuf_HDRS} ${CBLAS_H_PROXY_PATH}) --ocv_create_module(${Protobuf_LIBRARIES} ${LAPACK_LIBRARIES}) -+ocv_create_module(${PROTOBUF_LIBRARIES} ${LAPACK_LIBRARIES}) - ocv_add_samples() - ocv_add_accuracy_tests() - ocv_add_perf_tests() diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv/uselocalxfeatures.patch b/meta-digi-dey/recipes-graphics/opencv/opencv/uselocalxfeatures.patch index fc273a891..8ffee51dd 100644 --- a/meta-digi-dey/recipes-graphics/opencv/opencv/uselocalxfeatures.patch +++ b/meta-digi-dey/recipes-graphics/opencv/opencv/uselocalxfeatures.patch @@ -1,8 +1,8 @@ -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 +Index: contrib/modules/xfeatures2d/CMakeLists.txt +=================================================================== +--- contrib.orig/modules/xfeatures2d/CMakeLists.txt ++++ contrib/modules/xfeatures2d/CMakeLists.txt +@@ -5,11 +5,11 @@ ocv_define_module(xfeatures2d opencv_cor 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") @@ -18,3 +18,4 @@ index e1755595..c7009c47 100644 +#endif() ocv_module_include_directories("${DOWNLOAD_DIR}") + diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bbappend b/meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bbappend deleted file mode 100644 index 107e0ed2e..000000000 --- a/meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bbappend +++ /dev/null @@ -1,61 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# Specify the opencv_extra source. The version should match the overall opencv version. -# Recording the opencv_extra version here allows us to raise a fatal error if the -# package version is updated but this section is not. -SRC_URI += "git://github.com/opencv/opencv_extra.git;branch=3.4;destsuffix=opencv_extra;name=opencv_extra" -SRCREV_opencv_extra = "cc18e9a17c5afe034341c8c70a5aaa9ac86e5601" -OPENCV_EXTRA_VERSION = "3.4.2" - -SRC_URI_remove = "file://javagen.patch" -SRC_URI += "file://fix_openvx_samples.patch" -SRC_URI += "file://fix_python_bindings.patch" -SRC_URI += "file://0001-photo-avoid-resizing-a-const-Mat-in-decolor.patch \ - file://0002-photo-Decolor-corrections.patch \ -" - -PACKAGECONFIG_remove_imx = "eigen" -PACKAGECONFIG_remove_mx8 = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'gtk', '', d)}" -PACKAGECONFIG_append_mx8 = " opencl dnn text" -PACKAGECONFIG_append_mx8dv = " openvx" -PACKAGECONFIG_append_mx8qm = " openvx" - -PACKAGECONFIG[openvx] = " \ - -DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU', \ - -DWITH_OPENVX=OFF, \ - virtual/libopenvx, \ - \ -" -PACKAGECONFIG[qt5] = " \ - -DWITH_QT=ON -DWITH_GTK=OFF \ - -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE}/qt5 \ - -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake, \ - -DWITH_QT=OFF, \ - qtbase qtbase-native, \ - \ -" -PACKAGECONFIG[test] = " \ - -DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../opencv_extra/testdata, \ - -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF, \ -" - -do_check_opencv_extra_version() { - OPENCV_VERSION=`echo ${PV} | cut -d '+' -f 1` - if [ "${OPENCV_EXTRA_VERSION}" != "${OPENCV_VERSION}" ]; then - bbfatal "The opencv_extra version ${OPENCV_EXTRA_VERSION} does not match the recipe version ${OPENCV_VERSION}." - fi -} -addtask check_opencv_extra_version before do_fetch - -do_install_append() { - if ${@bb.utils.contains("PACKAGECONFIG", "samples", "true", "false", d)}; then - install -d ${D}${datadir}/OpenCV/samples/data - cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data - - install -d ${D}${datadir}/OpenCV/samples/bin/ - cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ - fi -} - -RDEPENDS_opencv-apps += \ - "${@bb.utils.contains('PACKAGECONFIG', 'test', 'bash', '', d)}" diff --git a/meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bb b/meta-digi-dey/recipes-graphics/opencv/opencv_4.0.1.imx.bb similarity index 76% rename from meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bb rename to meta-digi-dey/recipes-graphics/opencv/opencv_4.0.1.imx.bb index 8821b514c..4fa486cf8 100644 --- a/meta-digi-dey/recipes-graphics/opencv/opencv_3.4.2.bb +++ b/meta-digi-dey/recipes-graphics/opencv/opencv_4.0.1.imx.bb @@ -10,11 +10,12 @@ ARM_INSTRUCTION_SET_armv5 = "arm" DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" -SRCREV_opencv = "9e1b1e5389237c2b9f6c7b9d7715d9836c0a5de1" -SRCREV_contrib = "d4e02869454998c9af5af1a5c3392cdc0c31dd22" -SRCREV_ipp = "a62e20676a60ee0ad6581e217fe7e4bada3b95db" +SRCREV_opencv = "c3d56b9aea993de1ff3fec28627372f2e24d7eda" +SRCREV_contrib = "25221244732dcf44c1450d0f93edc2529a61c0e1" +SRCREV_ipp = "32e315a5b106a7b89dbed51c28f8120a48b368b4" SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" +SRCREV_extra = "d29d003e00dacf4ed686577c3f2c0aa048d5a80a" SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59" SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b" @@ -22,38 +23,38 @@ def ipp_filename(d): import re arch = d.getVar('TARGET_ARCH', True) if re.match("i.86$", arch): - return "ippicv_2017u2_lnx_ia32_20170418.tgz" + return "ippicv_2019_lnx_ia32_general_20180723.tgz" else: - return "ippicv_2017u2_lnx_intel64_20170418.tgz" + return "ippicv_2019_lnx_intel64_general_20180723.tgz" def ipp_md5sum(d): import re arch = d.getVar('TARGET_ARCH', True) if re.match("i.86$", arch): - return "f2cece00d802d4dea86df52ed095257e" + return "ea72de74dae3c604eb6348395366e78e" else: - return "808b791a6eac9ed78d32a7666804320e" + 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;branch=3.4;name=opencv \ - git://github.com/opencv/opencv_contrib.git;branch=3.4;destsuffix=contrib;name=contrib \ - git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20170418;destsuffix=ipp;name=ipp \ +SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg_extra" +OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https" +SRCBRANCH = "4.0.1_imx" +SRC_URI = "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv \ + git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ + git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20180723;destsuffix=ipp;name=ipp \ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ + git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra \ https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ - file://fixpkgconfig.patch \ file://uselocalxfeatures.patch;patchdir=../contrib/ \ file://0003-To-fix-errors-as-following.patch \ + file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ file://0001-Dont-use-isystem.patch \ - file://javagen.patch \ - file://0001-dnn-allow-to-use-external-protobuf.patch \ " - -PV = "3.4.2+git${SRCPV}" +PV = "4.0.1.imx+git${SRCPV}" S = "${WORKDIR}/git" @@ -68,6 +69,7 @@ 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 \ @@ -77,10 +79,27 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ " 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)} \ +PACKAGECONFIG_GTK ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \ +" +PACKAGECONFIG_GTK_mx8 ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', '', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', \ + '', d), d)} \ +" +PACKAGECONFIG ??= "python3 jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ + ${PACKAGECONFIG_GTK} \ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}" +PACKAGECONFIG_append_mx8 = " dnn text" +PACKAGECONFIG_append_mx8dv = " openvx" +PACKAGECONFIG_append_mx8qm = " openvx" + +PACKAGECONFIG_OPENCL = "" +PACKAGECONFIG_OPENCL_mx8 = "opencl" +PACKAGECONFIG_OPENCL_mx8mm = "" +PACKAGECONFIG_append = " ${PACKAGECONFIG_OPENCL}" + 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," @@ -95,12 +114,15 @@ 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[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," 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[qt5] = "-DWITH_QT=ON -DWITH_GTK=OFF -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE}/qt5 -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native," PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,," PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb," +PACKAGECONFIG[test] = "-DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF," 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," @@ -155,13 +177,13 @@ python populate_packages_prepend () { 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} = "${datadir}/licenses" +FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/* ${datadir}/opencv4/valgrind*.supp" +FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${datadir}/OpenCV/*.cmake ${libdir}/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/" +FILES_${PN}-samples = "${datadir}/OpenCV/samples ${datadir}/opencv4/samples ${datadir}/opencv4/*cascades ${datadir}/opencv4/testdata/" INSANE_SKIP_${PN}-java = "libdir" INSANE_SKIP_${PN}-dbg = "libdir" @@ -177,8 +199,8 @@ 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 + # Fix OpenCV 2 compatibility, broken by OpenCV 4 + ln -sf opencv4/opencv2 ${D}${includedir}/opencv2 # Move Python files into correct library folder (for multilib build) if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then @@ -187,7 +209,12 @@ do_install_append() { fi if ${@bb.utils.contains("PACKAGECONFIG", "samples", "true", "false", d)}; then + install -d ${D}${datadir}/OpenCV/samples/data + cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data + install -d ${D}${datadir}/OpenCV/samples/bin/ cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ fi } + +RDEPENDS_opencv-apps += "bash" diff --git a/meta-digi-dey/recipes-graphics/vulkan/assimp_4.1.0.bb b/meta-digi-dey/recipes-graphics/vulkan/assimp_4.1.0.bb deleted file mode 100644 index 194cbe33c..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/assimp_4.1.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \ - various well-known 3D model formats in a uniform manner." -HOMEPAGE = "http://www.assimp.org/" -SECTION = "devel" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271" - -DEPENDS = "zlib" - -SRC_URI = "git://github.com/assimp/assimp.git" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P(\d+(\.\d+)+))" - -SRCREV = "80799bdbf90ce626475635815ee18537718a05b1" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}" diff --git a/meta-digi-dey/recipes-graphics/vulkan/glslang/0001-CMakeLists.txt-obey-CMAKE_INSTALL_LIBDIR.patch b/meta-digi-dey/recipes-graphics/vulkan/glslang/0001-CMakeLists.txt-obey-CMAKE_INSTALL_LIBDIR.patch deleted file mode 100644 index cef3e8e61..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/glslang/0001-CMakeLists.txt-obey-CMAKE_INSTALL_LIBDIR.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 372422ed8ce32e1085cd524156c687df65095237 Mon Sep 17 00:00:00 2001 -From: Awais Belal -Date: Tue, 25 Oct 2016 14:44:20 +0500 -Subject: [PATCH] CMakeLists.txt: obey CMAKE_INSTALL_LIBDIR - -Not using the exact path that is set through cmake -will end up in a mixed configuration setup where -files are installed on hard-coded locations. - -Signed-off-by: Awais Belal ---- - OGLCompilersDLL/CMakeLists.txt | 2 +- - SPIRV/CMakeLists.txt | 2 +- - glslang/CMakeLists.txt | 2 +- - glslang/OSDependent/Unix/CMakeLists.txt | 2 +- - glslang/OSDependent/Windows/CMakeLists.txt | 2 +- - hlsl/CMakeLists.txt | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt -index 4954db9..6b518d9 100644 ---- a/OGLCompilersDLL/CMakeLists.txt -+++ b/OGLCompilersDLL/CMakeLists.txt -@@ -8,4 +8,4 @@ if(WIN32) - endif(WIN32) - - install(TARGETS OGLCompiler -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt -index 48a6c46..c657d56 100755 ---- a/SPIRV/CMakeLists.txt -+++ b/SPIRV/CMakeLists.txt -@@ -41,4 +41,4 @@ if(WIN32) - endif(WIN32) - - install(TARGETS SPIRV SPVRemapper -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt -index ff91135..efb7f15 100644 ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -89,4 +89,4 @@ if(WIN32) - endif(WIN32) - - install(TARGETS glslang -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt -index 174cc91..d98057b 100644 ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -2,4 +2,4 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h) - set_property(TARGET OSDependent PROPERTY FOLDER glslang) - - install(TARGETS OSDependent -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt -index 399760c..744bcbb 100644 ---- a/glslang/OSDependent/Windows/CMakeLists.txt -+++ b/glslang/OSDependent/Windows/CMakeLists.txt -@@ -14,4 +14,4 @@ if(WIN32) - endif(WIN32) - - install(TARGETS OSDependent -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt -index c7537e2..5111661 100755 ---- a/hlsl/CMakeLists.txt -+++ b/hlsl/CMakeLists.txt -@@ -23,4 +23,4 @@ if(WIN32) - endif(WIN32) - - install(TARGETS HLSL -- ARCHIVE DESTINATION lib) -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) --- -1.9.1 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb b/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb index 15852cacd..1ee5b60f4 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb +++ b/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb @@ -10,13 +10,13 @@ HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler" inherit cmake LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://glslang/Include/Types.h;beginline=1;endline=36;md5=6639a5f9543e833d71e2f4e4ff52f34b" +LIC_FILES_CHKSUM = "file://glslang/Include/Types.h;beginline=1;endline=36;md5=26473d85c7f85d955e24663f67a53818" S = "${WORKDIR}/git" -SRCREV = "81cd764b5ffc475bc73f1fb35f75fd1171bb2343" +SRCREV = "1bc601c674aecc2fee0dee8ff7a118db76b4c439" SRC_URI = "git://github.com/KhronosGroup/glslang \ - file://0001-CMakeLists.txt-obey-CMAKE_INSTALL_LIBDIR.patch" +" FILES_${PN} += "${libdir}/*" @@ -30,6 +30,10 @@ do_install_append() { cp -f ${S}/SPIRV/SPVRemapper.h ${D}${includedir}/SPIRV cp -f ${S}/SPIRV/spvIR.h ${D}${includedir}/SPIRV + # Remove redundant headers from spirv-headers + rm -rf ${D}${includedir}/SPIRV/GLSL.std.450.h + rm -rf ${D}${includedir}/SPIRV/spirv.hpp + install -d ${D}${includedir}/glslang/Include cp -f ${S}/glslang/Include/*.h ${D}${includedir}/glslang/Include install -d ${D}${includedir}/glslang/Public diff --git a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb b/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb index f1682368a..8859b3400 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb +++ b/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb @@ -12,10 +12,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" S = "${WORKDIR}/git" SPIRV_HEADERS_LOCATION = "${S}/external/spirv-headers" -HEADERS_VERSION = "1.1" +HEADERS_VERSION = "unified1" -SRCREV_spirv-tools = "2c0ce872103d676bf8de5dc87a03ad2c32e215a2" -SRCREV_spirv-headers = "3a4dbdde9a9b2cf23736694ba70262dce27fbeaa" +SRCREV_spirv-tools = "9d699f6d4038f432c55310d5d0b4a6d507c1b686" +SRCREV_spirv-headers = "2434b89345a50c018c84f42a310b0fad4f3fd94f" SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools;protocol=http;name=spirv-tools \ git://github.com/KhronosGroup/SPIRV-Headers;name=spirv-headers;destsuffix=${SPIRV_HEADERS_LOCATION} \ file://0002-spirv-lesspipe.sh-allow-using-generic-shells.patch" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-scenes-Use-depth-format-supported-by-i.MX.patch b/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-scenes-Use-depth-format-supported-by-i.MX.patch new file mode 100644 index 000000000..d1c71897f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-scenes-Use-depth-format-supported-by-i.MX.patch @@ -0,0 +1,56 @@ +From 436b5b09a0f5fcd3b4f2c1711e850b52b357befb Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 13 Jun 2018 22:02:20 +0000 +Subject: [PATCH] scenes: Use depth format supported by i.MX + +Upstream-Status: Inappropriate [i.MX-specific] + +Signed-off-by: Tom Hochstein +--- + src/scenes/shading_scene.cpp | 2 +- + src/scenes/texture_scene.cpp | 2 +- + src/scenes/vertex_scene.cpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/scenes/shading_scene.cpp b/src/scenes/shading_scene.cpp +index fa496ba..3e19ee8 100644 +--- a/src/scenes/shading_scene.cpp ++++ b/src/scenes/shading_scene.cpp +@@ -64,7 +64,7 @@ void ShadingScene::setup( + vulkan = &vulkan_; + extent = vulkan_images[0].extent; + format = vulkan_images[0].format; +- depth_format = vk::Format::eD32Sfloat; ++ depth_format = vk::Format::eD24UnormS8Uint; + aspect = static_cast(extent.height) / extent.width; + + mesh = Model{"cat.3ds"}.to_mesh( +diff --git a/src/scenes/texture_scene.cpp b/src/scenes/texture_scene.cpp +index 04a8207..ccc9d2f 100644 +--- a/src/scenes/texture_scene.cpp ++++ b/src/scenes/texture_scene.cpp +@@ -65,7 +65,7 @@ void TextureScene::setup( + vulkan = &vulkan_; + extent = vulkan_images[0].extent; + format = vulkan_images[0].format; +- depth_format = vk::Format::eD32Sfloat; ++ depth_format = vk::Format::eD24UnormS8Uint; + aspect = static_cast(extent.height) / extent.width; + + mesh = Model{"cube.3ds"}.to_mesh( +diff --git a/src/scenes/vertex_scene.cpp b/src/scenes/vertex_scene.cpp +index 0fd7fe7..4f6d49a 100644 +--- a/src/scenes/vertex_scene.cpp ++++ b/src/scenes/vertex_scene.cpp +@@ -66,7 +66,7 @@ void VertexScene::setup( + vulkan = &vulkan_; + extent = vulkan_images[0].extent; + format = vulkan_images[0].format; +- depth_format = vk::Format::eD32Sfloat; ++ depth_format = vk::Format::eD24UnormS8Uint; + aspect = static_cast(extent.height) / extent.width; + + mesh = Model{"horse.3ds"}.to_mesh( +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb b/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb index f549fde41..871e9c5da 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb +++ b/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb @@ -10,12 +10,13 @@ inherit meson S = "${WORKDIR}/git" -SRCREV = "${AUTOREV}" +SRCREV = "1ebd49364f03372a710f010c01dedd0d79456413" SRC_URI = "git://github.com/vkmark/vkmark;protocol=https" +SRC_URI += "file://0001-scenes-Use-depth-format-supported-by-i.MX.patch" VKMARK_INSTALL_DIR = "${WORKDIR}/vm-install" -DEPENDS = " vulkan imx-gpu-viv assimp glm ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ +DEPENDS = " vulkan-headers vulkan-loader imx-gpu-viv assimp glm ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ bb.utils.contains('DISTRO_FEATURES', 'x11', ' libxcb','libdrm libgbm', d), d)}" do_compile() { @@ -34,5 +35,3 @@ do_install() { } FILES_${PN} += "${bindir} ${datadir}" - -COMPATIBLE_MACHINE = "(mx8)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend index 2ab9f3ecd..a11dfbd09 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend @@ -1,2 +1,3 @@ -COMPATIBLE_MACHINE = "(mx8)" +DEPENDS_remove = "vulkan" +DEPENDS_append = " vulkan-headers vulkan-loader" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend new file mode 100644 index 000000000..92e0a02a5 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend @@ -0,0 +1,3 @@ + +COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb new file mode 100644 index 000000000..172526d59 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Vulkan Header files and API registry" +DESCRIPTION = "Vulkan is a new generation graphics and compute API \ +that provides efficient access to modern GPUs." +HOMEPAGE = "https://www.khronos.org/vulkan/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-1.1.92 \ + " +SRCREV = "114c3546e195819bd53a34b39f5194b2989a5b12" +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake distro_features_check +ANY_OF_DISTRO_FEATURES = "x11 wayland" + +FILES_${PN} += "${datadir}/vulkan/registry" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader/0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader/0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch new file mode 100644 index 000000000..c6c1a192a --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader/0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch @@ -0,0 +1,38 @@ +From 4f7fd011b47cb65c58b0a1ffaa3830f0b63b5b1d Mon Sep 17 00:00:00 2001 +From: Ella +Date: Thu, 7 Mar 2019 17:18:26 +0800 +Subject: [PATCH] STDIO-844 No need to change the App's apiVersion to ICD + version + +There is no need to do so, otherwise we won't catch the App's error and +Vulkan CTS will fail to reject the invalid api version. + +Date: 7th Mar, 2019 +Signed-off-by: Ella Feng +--- + loader/loader.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/loader/loader.c b/loader/loader.c +index 281851584..f2033b6ad 100644 +--- a/loader/loader.c ++++ b/loader/loader.c +@@ -5741,6 +5741,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI + } + + // Create an instance, substituting the version to 1.0 if necessary ++#if 0 + VkApplicationInfo icd_app_info; + uint32_t icd_version_nopatch = VK_MAKE_VERSION(VK_VERSION_MAJOR(icd_version), VK_VERSION_MINOR(icd_version), 0); + uint32_t requested_version = pCreateInfo == NULL || pCreateInfo->pApplicationInfo == NULL ? VK_API_VERSION_1_0 : pCreateInfo->pApplicationInfo->apiVersion; +@@ -5753,6 +5754,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI + icd_app_info.apiVersion = icd_version; + icd_create_info.pApplicationInfo = &icd_app_info; + } ++#endif + icd_result = ptr_instance->icd_tramp_list.scanned_list[i].CreateInstance(&icd_create_info, pAllocator, &(icd_term->instance)); + if (VK_ERROR_OUT_OF_HOST_MEMORY == icd_result) { + // If out of memory, bail immediately. +-- +2.21.0 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_%.bbappend new file mode 100644 index 000000000..4bcbda8c8 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_%.bbappend @@ -0,0 +1,8 @@ + +# choose wayland +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" + +SRC_URI_append = " file://0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch" + +COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.92.0.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.92.0.bb new file mode 100644 index 000000000..61789543e --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.92.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Vulkan loader" +DESCRIPTION = "Vulkan loader is responsible for working with the various \ +layers as well as supporting multiple GPUs and their drivers.The loader is \ +critical to managing the proper dispatching of Vulkan functions to the appropriate \ +set of layers and ICDs." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57\ + file://loader/loader.c;endline=25;md5=151b392f46568aaedb4ad22b246237ec" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-1.1.92 \ + " +SRCREV = "4cd7e44fc1ca6c4d8361720b43a3588ddf9fc4b6" +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake python3native lib_package distro_features_check +ANY_OF_DISTRO_FEATURES = "x11 wayland" + +DEPENDS = "vulkan-headers" + +EXTRA_OECMAKE = "-DBUILD_TESTS=OFF" + +# must choose x11 or wayland or both +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" + +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr" +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend new file mode 100644 index 000000000..9d121953e --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend @@ -0,0 +1,10 @@ + +# choose wayland +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" + +EXTRA_OECMAKE = "-DBUILD_CUBE=OFF" + +RDEPENDS_${PN} += "libvulkan-imx" + +COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.92.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.92.bb new file mode 100644 index 000000000..abfec91e7 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.92.bb @@ -0,0 +1,25 @@ +SUMMARY = "Vulkan Tools" +DESCRIPTION = "This project provides Vulkan tools and utilities that \ + can assist development by enabling developers to verify their \ + applications correct use of the Vulkan API." +SECTION = "graphics" +HOMEPAGE = "https://github.com/LunarG/VulkanTools" + +DEPENDS = "vulkan-headers vulkan-loader" + +inherit cmake python3native + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +S = "${WORKDIR}/git" + +SRCREV = "9bbdd552f0fd62741aa1f1e02ab3eafc45cf3c1e" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-${PV} \ +" +# must choose x11 or wayland or both +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" + +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DCUBE_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DCUBE_WSI_SELECTION=WAYLAND, libxcb libx11" +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch new file mode 100644 index 000000000..9b06c3227 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch @@ -0,0 +1,38 @@ +From 23ed27a79b3c9afa3dcb2138abf89f466a308702 Mon Sep 17 00:00:00 2001 +From: Neena Busireddy +Date: Wed, 5 Dec 2018 13:33:10 -0600 +Subject: [PATCH] CMakeLists.txt: Change the installation path of JSON files + +Also modify the library path in JSON files to /usr/lib/libVK*.so + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Neena Busireddy +--- + layers/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt +index 5fd5b44..c4a7810 100644 +--- a/layers/CMakeLists.txt ++++ b/layers/CMakeLists.txt +@@ -105,7 +105,7 @@ if(WIN32) + elseif(UNIX) # UNIX includes APPLE + foreach(TARGET_NAME ${TARGET_NAMES}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${TARGET_NAME}.json +- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/vulkan/explicit_layer.d) ++ DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vulkan/explicit_layer.d) + endforeach() + endif() + +@@ -236,7 +236,7 @@ if(UNIX) + -DVK_VERSION=1.1.${vk_header_version}) + # If this json file is not a metalayer, get the needed properties from that target + if(TARGET ${TARGET_NAME}) +- set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="$") ++ set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/$") + endif() + add_custom_target(${TARGET_NAME}-staging-json ALL + COMMAND ${CMAKE_COMMAND} ${INSTALL_DEFINES} -P "${CMAKE_CURRENT_BINARY_DIR}/generator.cmake") +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan/icd_VSI.json b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/icd_VSI.json similarity index 100% rename from meta-digi-dey/recipes-graphics/vulkan/vulkan/icd_VSI.json rename to meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/icd_VSI.json diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend similarity index 69% rename from meta-digi-dey/recipes-graphics/vulkan/vulkan_%.bbappend rename to meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend index d2b0563a8..fb6d88f86 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan_%.bbappend +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend @@ -2,13 +2,12 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI += " \ file://icd_VSI.json \ - file://0001-CMakeLists.txt-Modify-the-library-path-to-point-to.patch \ + file://0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch \ " # choose wayland PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" -DEPENDS = "virtual/egl glslang spirv-tools" -RDEPENDS_${PN} += "libvulkan-imx" +DEPENDS += " virtual/egl glslang spirv-tools" EXTRA_OECMAKE_remove = "-DBUILD_LAYERS=OFF" # Enable validation layers @@ -20,13 +19,15 @@ do_install_append () { cp ${WORKDIR}/icd_VSI.json ${D}${sysconfdir}/vulkan/icd.d sed -i "s,/usr/lib,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json sed -i "s,1.0.30,${PV}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json - -# Use some vulkan headers from imx-gpu-viv - rm -rf ${D}${includedir}/vulkan/vk_* } FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/libvulkan.so ${libdir}/libVkLayer_*.so" +FILES_${PN} += "${libdir}/libVkLayer_*.so" + +# The package libvulkan-imx is required to configure the imx-gpu-viv vulkan drivers for the validation layers +RDEPENDS_${PN} += "libvulkan-imx" + INSANE_SKIP_${PN} = "dev-so" COMPATIBLE_MACHINE = "(mx8)" +COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan_1.0.65.2.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.92.0.bb similarity index 50% rename from meta-digi-dey/recipes-graphics/vulkan/vulkan_1.0.65.2.bb rename to meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.92.0.bb index 1c8a89550..e61cdd9f0 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan_1.0.65.2.bb +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.92.0.bb @@ -1,19 +1,16 @@ -SUMMARY = "3D graphics and compute API common loader" -DESCRIPTION = "Vulkan is a new generation graphics and compute API \ -that provides efficient access to modern GPUs. These packages \ -provide only the common vendor-agnostic library loader, headers and \ -the vulkaninfo utility." +SUMMARY = "Vulkan ValidationLayers" +DESCRIPTION = "This project provides Vulkan validation layers that \ +can be enabled to assist development by enabling developers to verify \ +their applications correct use of the Vulkan API." HOMEPAGE = "https://www.khronos.org/vulkan/" -BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" SECTION = "libs" LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \ - file://loader/loader.c;endline=25;md5=a87cd5442291c23d1fce4eece4cfde9d" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.65 \ - file://demos-Don-t-build-tri-or-cube.patch \ +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;nobranch=1 \ " -SRCREV = "73486a1a169d862d5210e2ad520d95319a2383fa" +SRCREV = "6e6da6ccab8931f7c30815966ef839b1155e5bec" UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" S = "${WORKDIR}/git" @@ -23,10 +20,12 @@ REQUIRED_DISTRO_FEATURES = "vulkan" inherit cmake python3native lib_package distro_features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" -EXTRA_OECMAKE = "-DBUILD_WSI_MIR_SUPPORT=OFF \ - -DBUILD_LAYERS=OFF \ - -DBUILD_TESTS=OFF" +DEPENDS = "vulkan-headers vulkan-loader" +EXTRA_OECMAKE = " \ + -DBUILD_LAYERS=OFF \ + -DGLSLANG_INSTALL_DIR=${STAGING_DIR_HOST}/usr \ +" # must choose x11 or wayland or both PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan/0001-CMakeLists.txt-Modify-the-library-path-to-point-to.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan/0001-CMakeLists.txt-Modify-the-library-path-to-point-to.patch deleted file mode 100644 index 6e18c92cb..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan/0001-CMakeLists.txt-Modify-the-library-path-to-point-to.patch +++ /dev/null @@ -1,27 +0,0 @@ -From abb274c45150373c91bf74d4511b86e039f08306 Mon Sep 17 00:00:00 2001 -From: Neena Busireddy -Date: Tue, 31 Jul 2018 18:22:49 -0500 -Subject: [PATCH] CMakeLists.txt: Modify the library path to point to - /usr/lib/libVK.so in json files - -Signed-off-by: Neena Busireddy ---- - layers/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt -index 35a1b41..9e761a5 100644 ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -92,7 +92,7 @@ if(UNIX) - add_custom_target(${config_file}-staging-json ALL - COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/staging-json - COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.json ${CMAKE_CURRENT_BINARY_DIR}/staging-json -- COMMAND sed -i -e "/\"library_path\":/s$./libVkLayer$libVkLayer$" ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${config_file}.json -+ COMMAND sed -i -e "/\"library_path\":/s$./libVkLayer$/usr/lib/libVkLayer$" ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${config_file}.json - VERBATIM - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linux/${config_file}.json - ) --- -1.9.1 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch deleted file mode 100644 index bcf84a5a3..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch +++ /dev/null @@ -1,108 +0,0 @@ -commit f63cbe944107b5cd8f150ceaaec43b26099d5688 -Author: Adam Jackson -Date: Tue Feb 16 10:05:25 2016 -0500 - - demos: Don't build tri or cube - - There are more interesting demos, all we really want here is vulkaninfo. - This helps because we don't need to pre-build glslang/llvm/lunarglass - just to get the loader and layers. - -Upstream-Status: Inappropriate [configuration] -Signed-off-by: Jussi Kukkonen - -Index: git/demos/CMakeLists.txt -=================================================================== ---- git.orig/demos/CMakeLists.txt -+++ git/demos/CMakeLists.txt -@@ -63,46 +63,6 @@ elseif(UNIX) - else() - endif() - --if(WIN32) -- # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory. -- # 32-bit target data goes in build32, and 64-bit target data goes into build. So, include/link the -- # appropriate data at build time. -- if (CMAKE_CL_64) -- set (BUILDTGT_DIR build) -- else () -- set (BUILDTGT_DIR build32) -- endif() -- -- # Use static MSVCRT libraries -- foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO -- CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO) -- if(${configuration} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}") -- endif() -- endforeach() -- -- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv -- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert -- DEPENDS cube.vert ${GLSLANG_VALIDATOR} -- ) -- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv -- COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag -- DEPENDS cube.frag ${GLSLANG_VALIDATOR} -- ) -- file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos) -- file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos) --else() -- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) -- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv -- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert -- DEPENDS cube.vert ${GLSLANG_VALIDATOR} -- ) -- add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv -- COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag -- DEPENDS cube.frag ${GLSLANG_VALIDATOR} -- ) -- endif() --endif() - - if(WIN32) - include_directories ( -@@ -116,43 +76,6 @@ endif() - add_executable(${API_LOWERCASE}info vulkaninfo.c) - target_link_libraries(${API_LOWERCASE}info ${LIBRARIES}) - --if(NOT WIN32) -- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) -- add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) -- target_link_libraries(cube ${LIBRARIES}) -- endif() --else() -- if (CMAKE_CL_64) -- set (LIB_DIR "Win64") -- else() -- set (LIB_DIR "Win32") -- endif() -- -- add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) -- target_link_libraries(cube ${LIBRARIES}) --endif() -- --if(NOT WIN32) -- if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) -- add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) -- target_link_libraries(cubepp ${LIBRARIES}) -- endif() --else() -- if (CMAKE_CL_64) -- set (LIB_DIR "Win64") -- else() -- set (LIB_DIR "Win32") -- endif() -- -- add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv) -- target_link_libraries(cubepp ${LIBRARIES}) --endif() -- --if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})) -- if ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android")) -- add_subdirectory(smoke) -- endif() --endif() - - if(UNIX) - if(INSTALL_LVL_FILES) diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bb b/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bb deleted file mode 100644 index 1ef1ee141..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bb +++ /dev/null @@ -1,20 +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" - -SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ - " -SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d" -SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38" - -inherit allarch autotools pkgconfig - -PACKAGES = "${PN}" -FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bbappend b/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bbappend deleted file mode 100644 index 3fdfa6bd6..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.13.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -WAYLAND_PROTOCOLS_SRC ?= "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https" -SRCBRANCH = "master" -SRC_URI = "${WAYLAND_PROTOCOLS_SRC};branch=${SRCBRANCH} " -SRCREV = "d5ded4ddaf68b161fec23d75204d2153232c3a47" -S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch deleted file mode 100644 index e4487bf7e..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 186ec0c80410b2120b8f31c211cb44a836c84522 Mon Sep 17 00:00:00 2001 -From: Haihua Hu -Date: Wed, 4 Jul 2018 16:05:20 +0800 -Subject: [PATCH] weston.ini: using argb8888 as gbm default on mscale 850D - -mscale 850D video playback need using pixel alpha for graphic layer - -upstream status: imx specific -Signed-off-by: Haihua Hu - ---- - weston.ini.in | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/weston.ini.in b/weston.ini.in -index 2d492ab..ae54b79 100644 ---- a/weston.ini.in -+++ b/weston.ini.in -@@ -1,6 +1,7 @@ - [core] - # i.MX: Disable idle timeout - idle-time=0 -+gbm-format=argb8888 - - [libinput] - touchscreen_calibrator=true --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini.in-Modify-paths-to-point-to-right-directo.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini.in-Modify-paths-to-point-to-right-directo.patch deleted file mode 100644 index 80e6dbf70..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston.ini.in-Modify-paths-to-point-to-right-directo.patch +++ /dev/null @@ -1,155 +0,0 @@ -From b9c05520c4ff688c6488d8ca1e1defc592449d49 Mon Sep 17 00:00:00 2001 -From: Neena Busireddy -Date: Wed, 2 May 2018 11:51:45 -0500 -Subject: [PATCH] weston.ini.in: Modify paths to point to right directories - -Signed-off-by: Neena Busireddy ---- - Makefile.am | 2 ++ - ivi-shell/weston.ini.in | 56 ++++++++++++++++++++++++------------------------- - 2 files changed, 30 insertions(+), 28 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 870e347..427cb5b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -27,6 +27,7 @@ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in - -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ - -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ - -e 's|@libexecdir[@]|$(libexecdir)|g' \ -+ -e 's|@datadir[@]|$(datadir)|g' \ - -e 's|@plugin_prefix[@]||g' \ - $< > $@ - -@@ -43,6 +44,7 @@ AM_CPPFLAGS = \ - -I$(top_builddir)/protocol \ - -DLIBWESTON_MODULEDIR='"$(libweston_moduledir)"' \ - -DLIBEXECDIR='"$(libexecdir)"' \ -+ -DDATADIR='"$(datadir)"' \ - -DBINDIR='"$(bindir)"' - - CLEANFILES = weston.ini \ -diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in -index 3f11e1c..d0efd03 100644 ---- a/ivi-shell/weston.ini.in -+++ b/ivi-shell/weston.ini.in -@@ -3,7 +3,7 @@ shell=@plugin_prefix@ivi-shell.so - modules=@plugin_prefix@hmi-controller.so - - [ivi-shell] --ivi-shell-user-interface=@abs_top_builddir@/weston-ivi-shell-user-interface -+ivi-shell-user-interface=@libexecdir@/weston-ivi-shell-user-interface - - #developermode=true - -@@ -19,20 +19,20 @@ application-layer-id=4000 - - transition-duration=300 - --background-image=@abs_top_srcdir@/data/background.png -+background-image=@datadir@/weston/background.png - background-id=1001 --panel-image=@abs_top_srcdir@/data/panel.png -+panel-image=@datadir@/weston/panel.png - panel-id=1002 - surface-id-offset=10 --tiling-image=@abs_top_srcdir@/data/tiling.png -+tiling-image=@datadir@/weston/tiling.png - tiling-id=1003 --sidebyside-image=@abs_top_srcdir@/data/sidebyside.png -+sidebyside-image=@datadir@/weston/sidebyside.png - sidebyside-id=1004 --fullscreen-image=@abs_top_srcdir@/data/fullscreen.png -+fullscreen-image=@datadir@/weston/fullscreen.png - fullscreen-id=1005 --random-image=@abs_top_srcdir@/data/random.png -+random-image=@datadir@/weston/random.png - random-id=1006 --home-image=@abs_top_srcdir@/data/home.png -+home-image=@datadir@/weston/home.png - home-id=1007 - workspace-background-color=0x99000000 - workspace-background-id=2001 -@@ -43,59 +43,59 @@ path=@libexecdir@/weston-keyboard - [ivi-launcher] - workspace-id=0 - icon-id=4001 --icon=@abs_top_srcdir@/data/icon_ivi_flower.png --path=@abs_top_builddir@/weston-flower -+icon=@datadir@/weston/icon_ivi_flower.png -+path=@bindir@/weston-flower - - [ivi-launcher] - workspace-id=0 - icon-id=4002 --icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png --path=@abs_top_builddir@/weston-clickdot -+icon=@datadir@/weston/icon_ivi_clickdot.png -+path=@bindir@/weston-clickdot - - [ivi-launcher] - workspace-id=1 - icon-id=4003 --icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png --path=@abs_top_builddir@/weston-simple-egl -+icon=@datadir@/weston/icon_ivi_simple-egl.png -+path=@bindir@/weston-simple-egl - - [ivi-launcher] - workspace-id=1 - icon-id=4004 --icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png --path=@abs_top_builddir@/weston-simple-shm -+icon=@datadir@/weston/icon_ivi_simple-shm.png -+path=@bindir@/weston-simple-shm - - [ivi-launcher] - workspace-id=2 - icon-id=4005 --icon=@abs_top_srcdir@/data/icon_ivi_smoke.png --path=@abs_top_builddir@/weston-smoke -+icon=@datadir@/weston/icon_ivi_smoke.png -+path=@bindir@/weston-smoke - - [ivi-launcher] - workspace-id=3 - icon-id=4006 --icon=@abs_top_srcdir@/data/icon_ivi_flower.png --path=@abs_top_builddir@/weston-flower -+icon=@datadir@/weston/icon_ivi_flower.png -+path=@bindir@/weston-flower - - [ivi-launcher] - workspace-id=3 - icon-id=4007 --icon=@abs_top_srcdir@/data/icon_ivi_clickdot.png --path=@abs_top_builddir@/weston-clickdot -+icon=@datadir@/weston/icon_ivi_clickdot.png -+path=@bindir@/weston-clickdot - - [ivi-launcher] - workspace-id=3 - icon-id=4008 --icon=@abs_top_srcdir@/data/icon_ivi_simple-egl.png --path=@abs_top_builddir@/weston-simple-egl -+icon=@datadir@/weston/icon_ivi_simple-egl.png -+path=@bindir@/weston-simple-egl - - [ivi-launcher] - workspace-id=3 - icon-id=4009 --icon=@abs_top_srcdir@/data/icon_ivi_simple-shm.png --path=@abs_top_builddir@/weston-simple-shm -+icon=@datadir@/weston/icon_ivi_simple-shm.png -+path=@bindir@/weston-simple-shm - - [ivi-launcher] - workspace-id=3 - icon-id=4010 --icon=@abs_top_srcdir@/data/icon_ivi_smoke.png --path=@abs_top_builddir@/weston-smoke -+icon=@datadir@/weston/icon_ivi_smoke.png -+path=@bindir@/weston-smoke --- -1.9.1 - diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch deleted file mode 100644 index 4aa325693..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3012798d7e9c9e624024fc962d749a960289ad8b Mon Sep 17 00:00:00 2001 -From: Haihua Hu -Date: Wed, 11 Jul 2018 17:47:47 +0800 -Subject: [PATCH] weston.ini: configure desktop shell size in weston configure - file - -mscale 850D need set desktop shell to 1080p - -upstream status: imx specific -Signed-off-by: Haihua Hu - ---- - weston.ini.in | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/weston.ini.in b/weston.ini.in -index bd8abe4..077155b 100644 ---- a/weston.ini.in -+++ b/weston.ini.in -@@ -8,6 +8,8 @@ gbm-format=argb8888 - #mode=1920x1080@60 - #transform=90 - -+[shell] -+size=1920x1080 - - #[output] - #name=HDMI-A-2 diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch index 9be872b89..7ea07ed64 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch @@ -1,4 +1,4 @@ -From 8955e20180954b4778b9284bade05acf323a1690 Mon Sep 17 00:00:00 2001 +From 46843c8681ddafbea6f491b7af4de6529e93f5bd Mon Sep 17 00:00:00 2001 From: Jun Zhu Date: Sun, 30 Sep 2018 15:31:26 +0800 Subject: [PATCH] weston-touch-calibrator: Advertise the touchscreen calibrator @@ -9,17 +9,18 @@ Set touchscreen_calibrator to true in the section "libinput" of the configure fi Otherwise, it will report that the new-added interface "weston-touch-calibration" cannot be found. Signed-off-by: Jun Zhu + --- weston.ini.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weston.ini.in b/weston.ini.in -index fec4291..2d492ab 100644 +index 83dd56e..6e20e11 100644 --- a/weston.ini.in +++ b/weston.ini.in -@@ -2,6 +2,9 @@ - # i.MX: Disable idle timeout +@@ -3,6 +3,9 @@ idle-time=0 + #use-g2d=1 +[libinput] +touchscreen_calibrator=true @@ -27,6 +28,3 @@ index fec4291..2d492ab 100644 #[output] #name=HDMI-A-1 #mode=1920x1080@60 --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/digi_background.png b/meta-digi-dey/recipes-graphics/wayland/weston/digi_background.png new file mode 100644 index 000000000..2963c6a1f Binary files /dev/null and b/meta-digi-dey/recipes-graphics/wayland/weston/digi_background.png differ diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/meta-digi-dey/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch deleted file mode 100644 index b3e1d06f5..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch +++ /dev/null @@ -1,55 +0,0 @@ -Multi-plane sub-sampled textures have partial width/height, e.g. -YUV420/I420 has a full-size Y plane, followed by a half-width/height U -plane, and a half-width/height V plane. - -zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each -plane, but for wl_shm this must be inferred. gl-renderer was correctly -accounting for the width and height when subsampling, but the pitch was -being taken as the pitch for the first plane. - -This does not match the requirements for GStreamer's waylandsink, in -particular, as well as other clients. Fix the SHM upload path to -correctly set the pitch for each plane, according to subsampling. - -Tested with: - $ gst-launch-1.0 videotestsrc ! waylandsink - -Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/180767/] - -Signed-off-by: Daniel Stone -Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420") -Reported-by: Fabien Lahoudere -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063 - ---- - libweston/gl-renderer.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c -index 244ce309..40bf0bb6 100644 ---- a/libweston/gl-renderer.c -+++ b/libweston/gl-renderer.c -@@ -1445,14 +1445,13 @@ gl_renderer_flush_damage(struct weston_surface *surface) - goto done; - } - -- glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch); -- - if (gs->needs_full_upload) { - glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0); - glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0); - wl_shm_buffer_begin_access(buffer->shm_buffer); - for (j = 0; j < gs->num_textures; j++) { - glBindTexture(GL_TEXTURE_2D, gs->textures[j]); -+ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]); - glTexImage2D(GL_TEXTURE_2D, 0, - gs->gl_format[j], - gs->pitch / gs->hsub[j], -@@ -1477,6 +1476,7 @@ gl_renderer_flush_damage(struct weston_surface *surface) - glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1); - for (j = 0; j < gs->num_textures; j++) { - glBindTexture(GL_TEXTURE_2D, gs->textures[j]); -+ glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]); - glTexSubImage2D(GL_TEXTURE_2D, 0, - r.x1 / gs->hsub[j], - r.y1 / gs->vsub[j], diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_%.bbappend b/meta-digi-dey/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 000000000..12d7b865b --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Digi International. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://digi_background.png \ +" + +do_install_append() { + # Add custom background image + install -d ${D}${datadir}/weston + install ${WORKDIR}/digi_background.png ${D}${datadir}/weston + + # Customize weston ini file + cat <>${D}${sysconfdir}/xdg/weston/weston.ini + +[shell] +background-image=/usr/share/weston/digi_background.png +background-type=scale-crop +EOF +} + +FILES_${PN} += "${datadir}/weston/digi_background.png" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb b/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb index 465522188..6e3426145 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb +++ b/meta-digi-dey/recipes-graphics/wayland/weston_5.0.0.imx.bb @@ -17,12 +17,7 @@ SRC_URI = "${WESTON_SRC};branch=${SRCBRANCH} \ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ file://0003-weston-touch-calibrator-Advertise-the-touchscreen-ca.patch \ " -# Use argb8888 as gbm-format for i.MX8MQ only -SRC_URI_append_mx8mq = " file://0001-weston.ini-using-argb8888-as-gbm-default-on-mscale-8.patch \ - file://0002-weston.ini-configure-desktop-shell-size-in-weston-co.patch \ -" - -SRCREV = "de814e1aa4899375b67140b5e5ae714c67bb27a0" +SRCREV = "b85441fbc9e321931fb7ca833555d740beca054d" S = "${WORKDIR}/git" UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" @@ -112,6 +107,17 @@ PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" # Weston with imxgpu hardware PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" +SOCNAME = "none" +SOCNAME_mx8mq = "8mq" +SOCNAME_mx8mm = "8mm" + +uncomment() { + if ! (grep "^#$1" $2); then + bbfatal "Commented setting '#$1' not found in file $PWD/$2" + fi + sed -i -e 's,^#'"$1"','"$1"',g' $2 +} + 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 @@ -138,6 +144,18 @@ do_install_append() { if [ -z "${@bb.utils.filter('BBFILE_COLLECTIONS', 'aglprofilegraphical', d)}" ]; then install -d ${WESTON_INI_DEST_DIR} install -m 0644 ${WESTON_INI_SRC} ${WESTON_INI_DEST_DIR} + cd ${WESTON_INI_DEST_DIR} + case ${SOCNAME} in + 8mq) + uncomment "gbm-format=argb8888" weston.ini + uncomment "\\[shell\\]" weston.ini + uncomment "size=1920x1080" weston.ini + ;; + 8mm) + uncomment "use-g2d=1" weston.ini + ;; + esac + cd - fi } diff --git a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante.inc b/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante.inc index 5c32f1f98..1db4d40ce 100644 --- a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante.inc +++ b/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante.inc @@ -65,4 +65,4 @@ FILES_${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIB 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)" +COMPATIBLE_MACHINE = "(mx6|mx8|mx7ulp)" diff --git a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante/Stop-using-Git-to-write-local-version.patch b/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante/Stop-using-Git-to-write-local-version.patch deleted file mode 100644 index f541e5c17..000000000 --- a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante/Stop-using-Git-to-write-local-version.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 69a92f4576a1e789ba2fcf957164d2c4013020c5 Mon Sep 17 00:00:00 2001 -From: Otavio Salvador -Date: Wed, 2 Dec 2015 13:36:25 +0000 -Subject: [PATCH] Stop using Git to write local version -Organization: O.S. Systems Software LTDA. - -The standard version does not use a Git repository so we should not -use Git to identify the commit of the build as it can end getting the -version from a wrong repository and can be misleading. - -Upstream-Status: Pending - -Signed-off-by: Otavio Salvador ---- - EXA/src/makefile.tc | 6 +++--- - FslExt/src/makefile.tc | 6 +++--- - util/autohdmi/makefile.tc | 6 +++--- - util/pandisplay/makefile.tc | 6 +++--- - 4 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/EXA/src/makefile.tc b/EXA/src/makefile.tc -index 0b9a9e6..ec6e68d 100644 ---- a/EXA/src/makefile.tc -+++ b/EXA/src/makefile.tc -@@ -52,8 +52,8 @@ prefix ?= /usr - sysroot ?= / - - # get git commit number --COMMITNR := `git log -n 1 --format=%H` --DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` --LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" -+#COMMITNR := `git log -n 1 --format=%H` -+#DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` -+#LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" - - -diff --git a/FslExt/src/makefile.tc b/FslExt/src/makefile.tc -index 0b9a9e6..ec6e68d 100644 ---- a/FslExt/src/makefile.tc -+++ b/FslExt/src/makefile.tc -@@ -52,8 +52,8 @@ prefix ?= /usr - sysroot ?= / - - # get git commit number --COMMITNR := `git log -n 1 --format=%H` --DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` --LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" -+#COMMITNR := `git log -n 1 --format=%H` -+#DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` -+#LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" - - -diff --git a/util/autohdmi/makefile.tc b/util/autohdmi/makefile.tc -index c9de0a6..d0a468c 100644 ---- a/util/autohdmi/makefile.tc -+++ b/util/autohdmi/makefile.tc -@@ -64,8 +64,8 @@ prefix ?= /usr - sysroot ?= / - - # get git commit number --COMMITNR := `git log -n 1 --format=%H` --DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` --LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" -+#COMMITNR := `git log -n 1 --format=%H` -+#DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` -+#LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" - - -diff --git a/util/pandisplay/makefile.tc b/util/pandisplay/makefile.tc -index 28732b9..bf54c20 100644 ---- a/util/pandisplay/makefile.tc -+++ b/util/pandisplay/makefile.tc -@@ -64,8 +64,8 @@ prefix ?= /usr - sysroot ?= / - - # get git commit number --COMMITNR := `git log -n 1 --format=%H` --DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` --LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" -+#COMMITNR := `git log -n 1 --format=%H` -+#DIRTY := `git diff-index --quiet HEAD || echo '-dirty'` -+#LOCAL_CFLAGS += -DCOMMIT="${COMMITNR}${DIRTY}" - - --- -2.1.4 - diff --git a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_%.bbappend b/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_%.bbappend deleted file mode 100644 index 9ec6bd0dc..000000000 --- a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# Patch for MX8 DRM_VIV -RDEPENDS_${PN}_append_mx8 = " kernel-module-vivante" - -DEPENDS_remove = "virtual/libgal-x11" -DEPENDS_append = " libgal-imx" - -# Use lflags defined in the EXA makefile -EXTRA_OEMAKE_remove = "LFLAGS="${LDFLAGS}"" diff --git a/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p2.3.bb b/meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb similarity index 100% rename from meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p2.3.bb rename to meta-digi-dey/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.2.4.p1.8.bb diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xf86-config/imxdrm/xorg.conf b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xf86-config/imxdrm/xorg.conf index ec12ed9bc..24ebbadc8 100644 --- a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xf86-config/imxdrm/xorg.conf +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xf86-config/imxdrm/xorg.conf @@ -2,6 +2,7 @@ Section "Device" Identifier "i.MX Accelerated DRM Device" Driver "vivante" Option "kmsdev" "/dev/dri/card0" + Option "fbdev" "/dev/fb0" EndSection Section "ServerFlags" diff --git a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch new file mode 100644 index 000000000..beed6cb4a --- /dev/null +++ b/meta-digi-dey/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/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index a20f08a5f..4d172a276 100644 --- a/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-digi-dey/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -1,7 +1,9 @@ # REPLACE meta-nxp-mx8 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -SRC_URI += "file://0001-glamor-Use-CFLAGS-for-EGL-and-GBM.patch" +SRC_URI += "file://0001-glamor-Use-CFLAGS-for-EGL-and-GBM.patch \ + file://0003-Remove-check-for-useSIGIO-option.patch \ +" SRC_URI_remove = "file://0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch" PACKAGECONFIG_remove_mx8 = "glamor" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb similarity index 91% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb index ae8e8b2ed..b7f4c54d8 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.0.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb @@ -23,7 +23,7 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz file://0002-gst-libs-Remove-library-path-switch-from-dependency_.patch \ " -SRC_URI[md5sum] = "943045b9e937ffc5c6cfa0bd5c44230d" -SRC_URI[sha256sum] = "fb134b4d3e054746ef8b922ff157b0c7903d1fdd910708a45add66954da7ef89" +SRC_URI[md5sum] = "58342db11dbb201a66a62577dcf7bab5" +SRC_URI[sha256sum] = "dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da" S = "${WORKDIR}/gst-libav-${PV}" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-Fix-build-for-opencv-3.4.2.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-Fix-build-for-opencv-3.4.2.patch deleted file mode 100644 index 2f89ef626..000000000 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-Fix-build-for-opencv-3.4.2.patch +++ /dev/null @@ -1,70 +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); - ^~~~~~ - -Upstream-Status: Backport [https://github.com/GStreamer/gst-plugins-bad/commit/c247745faaf885fd3fa094198fc0ea288e295dbf] - -Signed-off-by: Tom Hochstein ---- - 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 f85989e..175ec90 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 60fd5be..47203fd 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 f39208d..ec0b56a 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); --- -2.7.4 - diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb index df9e871c0..faf07b248 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.imx.bb @@ -24,6 +24,7 @@ PACKAGECONFIG_remove = " gles2" PACKAGECONFIG_remove_mx8mm = " vulkan" PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols" +PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan-headers" # Disable introspection to fix [GstGL-1.0.gir] Error EXTRA_OECONF_append = " --disable-introspection" @@ -40,14 +41,13 @@ SRC_URI_remove = "file://0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-outpu EXTRA_OECONF_remove = "WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}" GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https" -SRCBRANCH = "MM_04.04.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" SRC_URI = " \ ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \ - file://0001-opencv-Fix-build-for-opencv-3.4.2.patch \ " -SRCREV = "7e8a87fcbf5bd44b6982f6d15f2d28aa5f49a6be" +SRCREV = "9fc1ada651093b37675d30a2794044d06bcacdc8" # This remove "--exclude=autopoint" option from autoreconf argument to avoid # configure.ac:30: error: required file './ABOUT-NLS' not found @@ -61,7 +61,7 @@ do_compile_prepend () { export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/ion/.libs" } -PV = "1.14.0.imx" +PV = "1.14.4.imx" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch index a1cc7d3dc..d23e81875 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch @@ -1,7 +1,7 @@ -From a049bb15839557594713cb32e7d6bfe0e2127392 Mon Sep 17 00:00:00 2001 +From 80c48db2d2d1d355e204c454027a8983d1b52a62 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 +Date: Tue, 25 Dec 2018 13:56:12 +0800 +Subject: [PATCH] [PATCH] Makefile.am: don't hardcode libtool name when running introspection tools Do patch refine basing on commit: f1d9652351e7754c63003104eceb526af424c7e0 @@ -13,7 +13,6 @@ 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 +- @@ -21,10 +20,10 @@ Signed-off-by: Yuqing Zhu 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(-) + 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index 0edc0ae..d0d425d 100644 +index fa11983..caccbb1 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-@ @@ -62,19 +61,6 @@ index 2922245..7fb65f2 100644 --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 @@ -154,7 +140,7 @@ index 0247c33..c86515b 100644 --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 +index 72f23cd..b65a6c5 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 @@ -167,5 +153,5 @@ index 1b74f37..0f7c07e 100644 --pkg gstreamer-base-@GST_API_VERSION@ \ --pkg-export gstreamer-video-@GST_API_VERSION@ \ -- -2.7.4 +1.9.1 diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb index ee07aae92..2f5f47aed 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bb @@ -11,11 +11,8 @@ 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 += "virtual/kernel" DEPENDS_append_imxgpu2d = " virtual/libg2d" -do_configure[depends] += "virtual/kernel:do_shared_workdir" - # Enable pango lib PACKAGECONFIG_append = " pango " @@ -27,30 +24,26 @@ PACKAGECONFIG[gio-unix-2.0] = "" EXTRA_OECONF_append = " --disable-opengl --enable-wayland" GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https" -SRCBRANCH = "MM_04.04.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" 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 \ " -SRCREV = "318a9477159d6b162e480faf29f56153b27fb6a7" +SRCREV = "5e8cc757e4fec72ee007ac12fab2d1333fce1dc9" + +inherit use-imx-headers EXTRA_AUTORECONF = "" -# Find ion.h in kernel -EXTRA_OECONF = " \ - CPPFLAGS=" \ - -I${STAGING_KERNEL_DIR}/include/uapi \ - -I${STAGING_KERNEL_DIR}/include \ - " \ -" +EXTRA_OECONF = "CPPFLAGS="-I${STAGING_INCDIR_IMX}"" EXTRA_OEMAKE += "GIR_EXTRA_LIBS_PATH=${GIR_EXTRA_LIBS_PATH}:${B}/gst-libs/gst/allocators/.libs" FILES_${PN} += "${libdir}/gstreamer-1.0/include" -PV = "1.14.0.imx" +PV = "1.14.4.imx" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb index 9392e82d8..1b9c35857 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.imx.bb @@ -8,12 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ DEPENDS += "libdrm" GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https" -SRCBRANCH = "MM_04.04.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" SRC_URI = " \ ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ " -SRCREV = "cec0ef39784a3acfd2b442d107f054c6ab10181e" +SRCREV = "36d46a8a9a7dcf173f9a0a0145b6cfa44f879670" EXTRA_AUTORECONF = "" PACKAGECONFIG_append = " vpx" @@ -21,7 +21,7 @@ PACKAGECONFIG_append = " vpx" # Fix: unrecognised options: --disable-sunaudio [unknown-configure-option] EXTRA_OECONF_remove = " --disable-sunaudio" -PV = "1.14.0.imx" +PV = "1.14.4.imx" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.0.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb similarity index 85% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.0.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb index 4bf983a8c..16fa17705 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.0.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb @@ -11,8 +11,8 @@ SRC_URI = " \ http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ " -SRC_URI[md5sum] = "bcb1f8d9339176aee2b5da2a9cb2df88" -SRC_URI[sha256sum] = "3fb9ea5fc8a2de4b3eaec4128d71c6a2d81dd19befe1cd87cb833b98bcb542d1" +SRC_URI[md5sum] = "90768a0074db071175ce980064d9a1ac" +SRC_URI[sha256sum] = "ac02d837f166c35ff6ce0738e281680d0b90052cfb1f0255dcf6aaca5f0f6d23" S = "${WORKDIR}/gst-plugins-ugly-${PV}" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.0.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb similarity index 75% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.0.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb index cc8445e85..d40fa0bc1 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.0.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb @@ -4,8 +4,8 @@ require gstreamer1.0-rtsp-server.inc FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/files:" FILESEXTRAPATHS_prepend := "${COREBASE}/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server:" -SRC_URI[md5sum] = "8a505c88f7469c3a0d1e9f4e9a315e53" -SRC_URI[sha256sum] = "6b65a077bed815f6d3157ebea503cc9f3c32d289af2756b7ff7e3958744d9756" +SRC_URI[md5sum] = "ab0fb5c829266a500e14b46b7bdf06bf" +SRC_URI[sha256sum] = "3d0ece2afdcd601c175ece24e32a30bc19247b454f4eafd3deeec2533c6884f1" # Disable introspection to fix [GstRtsp-1.0.gir] Error EXTRA_OECONF_append = " --disable-introspection" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb index 6f436fc84..6369454f2 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.14.imx.bb @@ -8,10 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ # Use i.MX fork of GST for customizations GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" -SRCBRANCH = "MM_04.04.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" SRC_URI = " ${GST1.0_SRC};branch=${SRCBRANCH}" -SRCREV = "f4e127a5e9a1eb977e023532d6636d939c8ccbc8" +SRCREV = "d42548da09724ad8cc1aa4f1944607920be2f4c0" EXTRA_AUTORECONF = "" @@ -20,7 +20,7 @@ DEPENDS += " elfutils" # Unrecognised options, need to remove them EXTRA_OECONF_remove = " --disable-docbook --disable-trace" -PV = "1.14.0.imx" +PV = "1.14.4.imx" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Update-KERNEL_VERSION-check.patch b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Update-KERNEL_VERSION-check.patch new file mode 100644 index 000000000..f95a02120 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-imx-gst1.0-plugin-Update-KERNEL_VERSION-check.patch @@ -0,0 +1,37 @@ +From e2e72f8baaa7ee90f489e866befb6f4ce91ba533 Mon Sep 17 00:00:00 2001 +From: "i.MX Yocto Project Build" +Date: Mon, 14 Jan 2019 01:59:42 -0600 +Subject: [PATCH] imx-gst1.0-plugin: Update KERNEL_VERSION check + +It should be against v4.14 instead of v4.14.34 + +Signed-off-by: i.MX Yocto Project Build +--- + libs/gstimxcommon.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libs/gstimxcommon.c b/libs/gstimxcommon.c +index eb808b9..49eb3e2 100644 +--- a/libs/gstimxcommon.c ++++ b/libs/gstimxcommon.c +@@ -38,7 +38,7 @@ unsigned long phy_addr_from_fd(int dmafd) + if (dmafd < 0) + return NULL; + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 34) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + fd = open(dev_ion, O_RDWR); + if(fd < 0) { + return NULL; +@@ -83,7 +83,7 @@ unsigned long phy_addr_from_vaddr(void *vaddr, int size) + if (!vaddr) + return NULL; + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 34) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) + fd = open(dev_ion, O_RDWR); + if(fd < 0) { + return NULL; +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.4.bb b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.7.bb similarity index 84% rename from meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.4.bb rename to meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.7.bb index b0f89f0e5..42f4a959e 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.4.bb +++ b/meta-digi-dey/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.4.7.bb @@ -1,5 +1,5 @@ # Copyright (C) 2014,2016 Freescale Semiconductor -# Copyright 2017-2018 NXP +# Copyright 2017-2019 NXP # Copyright (C) 2012-2015 O.S. Systems Software LTDA. # Released under the MIT license (see COPYING.MIT for the terms) @@ -7,8 +7,7 @@ DESCRIPTION = "Gstreamer freescale plugins" LICENSE = "GPLv2 & LGPLv2 & LGPLv2.1" SECTION = "multimedia" -DEPENDS = "imx-codec imx-parser virtual/kernel libdrm gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -do_configure[depends] += "virtual/kernel:do_shared_workdir" +DEPENDS = "imx-codec imx-parser libdrm 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" @@ -22,14 +21,16 @@ 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.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" -SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}" -SRCREV = "79cf42955b5100cd1a3b2ea2647ceb7cfa50fffb" +SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH} \ + file://0001-imx-gst1.0-plugin-Update-KERNEL_VERSION-check.patch \ +" +SRCREV = "aeebe91727c3228723015cd3086c449ea23e1a5d" S = "${WORKDIR}/git" -inherit autotools pkgconfig +inherit autotools pkgconfig use-imx-headers PLATFORM_mx6 = "MX6" PLATFORM_mx6sl = "MX6SL" @@ -42,7 +43,7 @@ PLATFORM_mx8 = "MX8" # Todo add a mechanism to map possible build targets EXTRA_OECONF = "PLATFORM=${PLATFORM} \ - CPPFLAGS="-I${STAGING_KERNEL_BUILDDIR}/include/generated/uapi -I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include" \ + 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)}" diff --git a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.4.bbappend b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_%.bbappend similarity index 100% rename from meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.4.bbappend rename to meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_%.bbappend diff --git a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.4.bb b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.4.bb deleted file mode 100644 index 2a50c1164..000000000 --- a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.4.bb +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -require imx-codec.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" - -SRC_URI[md5sum] = "181182985c0b7443bf1aad7cd3e52127" -SRC_URI[sha256sum] = "cb31c1e05c81a3c03dffbc1d5fa552146133999d53ea8129971fa3954ade52cb" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.7.bb b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.7.bb new file mode 100644 index 000000000..546f0e0ba --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/imx-codec/imx-codec_4.4.7.bb @@ -0,0 +1,12 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +require imx-codec.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +SRC_URI[md5sum] = "d8935dbc7b10e3f09c93bc0100c5eb03" +SRC_URI[sha256sum] = "baacda3525fa402dbdfc3bf1ee8cfb6fa3ac493c89511548ca8e095267366253" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser.inc b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser.inc index e3290b92d..726d309c8 100644 --- a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser.inc +++ b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser.inc @@ -36,6 +36,5 @@ 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" diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.4.bbappend b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_%.bbappend similarity index 100% rename from meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.4.bbappend rename to meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_%.bbappend diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.4.bb b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.4.bb deleted file mode 100644 index 8c383ece1..000000000 --- a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.4.bb +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (C) 2013-2016 Freescale Semiconductor -# Copyright 2017-2018 NXP -# Released under the MIT license (see COPYING.MIT for the terms) - -include imx-parser.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086" - -SRC_URI[md5sum] = "455f9f07ecf3c87510c547068a59c1b0" -SRC_URI[sha256sum] = "bb273dfc3baae9bc8c4ba579a67bfed69e8f8289860f88e7f996ec59259a6305" - -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.7.bb b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.7.bb new file mode 100644 index 000000000..89156896d --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/imx-parser/imx-parser_4.4.7.bb @@ -0,0 +1,12 @@ +# Copyright (C) 2013-2016 Freescale Semiconductor +# Copyright 2017-2018 NXP +# Released under the MIT license (see COPYING.MIT for the terms) + +include imx-parser.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3" + +SRC_URI[md5sum] = "1a6ae5be5389c23aaf2571e8fd7731ac" +SRC_URI[sha256sum] = "2cfab5311994669ad3bf6e84f4ffe6a89f6796149d6f88e316ecb34d46e44ab0" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" diff --git a/meta-digi-dey/recipes-multimedia/packagegroups/packagegroup-dey-audio.bb b/meta-digi-dey/recipes-multimedia/packagegroups/packagegroup-dey-audio.bb index 28424bc67..cd23509ed 100644 --- a/meta-digi-dey/recipes-multimedia/packagegroups/packagegroup-dey-audio.bb +++ b/meta-digi-dey/recipes-multimedia/packagegroups/packagegroup-dey-audio.bb @@ -19,6 +19,8 @@ RDEPENDS_${PN} = "\ alsa-state \ alsa-states \ ${ALSA_UTILS_PKGS} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ + bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-misc', '', d), '', d)} \ " RDEPENDS_${PN}_append_ccimx6 = " card-detect" diff --git a/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/hellowindow.desktop b/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/hellowindow.desktop new file mode 100644 index 000000000..49132da84 --- /dev/null +++ b/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/hellowindow.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=QT5 Hello Window +Exec=/usr/share/examples/opengl/hellowindow/hellowindow +Icon=hellowindow +Terminal=false +Type=Application +X-MB-SingleInstance=true +Comment=QT5 Hello Window +StartupNotify=false diff --git a/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/qmlvideo.desktop b/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/qmlvideo.desktop index 05b568603..8d4a6eaab 100644 --- a/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/qmlvideo.desktop +++ b/meta-digi-dey/recipes-qt/demo-extrafiles/qt5-demo-extrafiles/qmlvideo.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Name=Qt5 QML player -Exec=/bin/sh -c "cd /usr/share/qt5/examples/multimedia/video/qmlvideo; ./qmlvideo" +Exec=/bin/sh -c "cd /usr/share/examples/multimedia/video/qmlvideo; ./qmlvideo" Icon=qmlvideo Terminal=false Type=Application diff --git a/meta-digi-dey/recipes-qt/qt5/gstreamer1.0-plugins-good-qt_1.14.imx.bb b/meta-digi-dey/recipes-qt/qt5/gstreamer1.0-plugins-good-qt_1.14.imx.bb index 1376a1199..1993b194a 100644 --- a/meta-digi-dey/recipes-qt/qt5/gstreamer1.0-plugins-good-qt_1.14.imx.bb +++ b/meta-digi-dey/recipes-qt/qt5/gstreamer1.0-plugins-good-qt_1.14.imx.bb @@ -6,13 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ 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.04_1811_L4.14.78_GA" +SRCBRANCH = "MM_04.04.07_1906_L4.14.98" SRC_URI = " \ ${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \ file://0001-configure.ac-Add-prefix-to-correct-the-QT_PATH.patch \ " -SRCREV = "cec0ef39784a3acfd2b442d107f054c6ab10181e" +SRCREV = "36d46a8a9a7dcf173f9a0a0145b6cfa44f879670" DEPENDS += "gstreamer1.0-plugins-base virtual/kernel \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'qtwayland', '', d)} \ @@ -56,7 +56,7 @@ do_install_append() { fi } -PV = "1.14.0.imx" +PV = "1.14.4.imx" S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend b/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend deleted file mode 100644 index f9926e905..000000000 --- a/meta-digi-dey/recipes-qt/qt5/qt5-demo-extrafiles.bbappend +++ /dev/null @@ -1,32 +0,0 @@ -# Install hellowindow demo as a default QT APP on all platforms -do_install () { - install -d ${D}/${datadir}/pixmaps - install -d ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/hellowindow.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/hellowindow.desktop ${D}/${datadir}/applications -} - -# Install other qt5 demos on SoC with GPU -# Align with former release, do not install -# hellogl_es2.desktop & qt5basket.desktop & qt5nesting.desktop & qt5solarsystem.desktop -# as they are not supported - -do_install_append_imxgpu2d () { - install -m 0644 ${WORKDIR}/cinematicexperience.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/cinematicexperience.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/qt5everywheredemo.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/qt5everywheredemo.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/qt5nmapcarousedemo.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/qt5nmapcarousedemo.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/qt5nmapper.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/qt5nmapper.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/qtledbillboard.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/qtledbillboard.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/qtledcombo.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/qtledcombo.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/quitbattery.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/quitbattery.desktop ${D}/${datadir}/applications - install -m 0644 ${WORKDIR}/quitindicators.png ${D}/${datadir}/pixmaps - install -m 0644 ${WORKDIR}/quitindicators.desktop ${D}/${datadir}/applications -} - diff --git a/meta-digi-dey/recipes-qt/qt5/qtbase/ccimx8x/qt5.sh b/meta-digi-dey/recipes-qt/qt5/qtbase/ccimx8x/qt5.sh index a1aa3af34..16c8e26d7 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtbase/ccimx8x/qt5.sh +++ b/meta-digi-dey/recipes-qt/qt5/qtbase/ccimx8x/qt5.sh @@ -1,5 +1,9 @@ #!/bin/sh export QT_QPA_PLATFORM="wayland" -# Use EGLFS platform plugin for images without XWayland -[ -f "/etc/profile.d/weston.sh" ] || export QT_QPA_PLATFORM="eglfs" +[ -f "/etc/profile.d/weston.sh" ] && return + +export QT_QPA_PLATFORM="xcb" + +# Use EGLFS platform plugin for images without XWayland and X11 +[ -f "/etc/xserver-nodm/Xserver" ] || export QT_QPA_PLATFORM="eglfs" diff --git a/meta-digi-dey/recipes-qt/qt5/qtmultimedia_%.bbappend b/meta-digi-dey/recipes-qt/qt5/qtmultimedia_%.bbappend index 13f91d6df..c136875a4 100644 --- a/meta-digi-dey/recipes-qt/qt5/qtmultimedia_%.bbappend +++ b/meta-digi-dey/recipes-qt/qt5/qtmultimedia_%.bbappend @@ -1,3 +1,12 @@ +# Copyright (C) 2015-2019 Digi International + +PACKAGECONFIG_append = " gstreamer" + +pkg_postinst_${PN}_ccimx6() { + echo '# Use FSL gstreamer plugin video source' >> $D${sysconfdir}/profile.d/qt5.sh + echo 'export QT_GSTREAMER_CAMERABIN_VIDEOSRC="imxv4l2src"' >> $D${sysconfdir}/profile.d/qt5.sh +} + do_install_append() { if ls ${D}${libdir}/pkgconfig/Qt5*.pc >/dev/null 2>&1; then sed -i 's,-L${STAGING_DIR_HOST}/usr/lib,,' ${D}${libdir}/pkgconfig/Qt5*.pc diff --git a/meta-digi-dey/recipes-support/libsoc/libsoc_git.bbappend b/meta-digi-dey/recipes-support/libsoc/libsoc_git.bbappend index a70c25dbe..6d571ff9d 100644 --- a/meta-digi-dey/recipes-support/libsoc/libsoc_git.bbappend +++ b/meta-digi-dey/recipes-support/libsoc/libsoc_git.bbappend @@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" LIBSOC_URI_STASH = "${DIGI_MTK_GIT}dey/libsoc.git;protocol=ssh" -LIBSOC_URI_GITHUB = "git://github.com/jackmitch/libsoc.git;protocol=git" +LIBSOC_URI_GITHUB = "git://github.com/jackmitch/libsoc.git;protocol=https" LIBSOC_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${LIBSOC_URI_STASH}', '${LIBSOC_URI_GITHUB}', d)}" SRCREV = "dc62bb1f04c13d0423078b1af2bb439c62023d6c" diff --git a/meta-digi-dey/recipes-support/lvm2/libdevmapper_%s.bbappend b/meta-digi-dey/recipes-support/lvm2/libdevmapper_%s.bbappend new file mode 100644 index 000000000..7bdc22e99 --- /dev/null +++ b/meta-digi-dey/recipes-support/lvm2/libdevmapper_%s.bbappend @@ -0,0 +1,5 @@ +# +# Copyright (C) 2019 Digi International. +# + +RRECOMMENDS_${PN}_remove_class-target = " lvm2-udevrules" diff --git a/meta-digi-dey/recipes-support/lvm2/lvm2_%.bbappend b/meta-digi-dey/recipes-support/lvm2/lvm2_%.bbappend deleted file mode 100644 index a467c444f..000000000 --- a/meta-digi-dey/recipes-support/lvm2/lvm2_%.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2016 Digi International. - -# Split libraries into a different package -PACKAGES =+ "lib${PN}" - -FILES_lib${PN} = "${libdir}/lib*.so.*" diff --git a/sdk/build-github.sh b/sdk/build-github.sh index eb9484621..fbb5750cb 100755 --- a/sdk/build-github.sh +++ b/sdk/build-github.sh @@ -22,7 +22,7 @@ set -e -AVAILABLE_PLATFORMS="ccimx8x-sbc-pro ccimx8x-sbc-express ccimx6ulsbc ccimx6ulstarter" +AVAILABLE_PLATFORMS="ccimx8x-sbc-pro ccimx8x-sbc-express ccimx6qpsbc ccimx6sbc ccimx6ulsbc ccimx6ulstarter" MANIFEST_URL="https://github.com/digi-embedded/dey-manifest.git" @@ -123,6 +123,8 @@ while read _pl _tgt; do done<<-_EOF_ ccimx8x-sbc-pro dey-image-qt ccimx8x-sbc-express dey-image-qt + ccimx6qpsbc dey-image-qt + ccimx6sbc dey-image-qt ccimx6ulsbc dey-image-qt ccimx6ulstarter core-image-base _EOF_ diff --git a/sdk/build.sh b/sdk/build.sh index 3d8bddd91..43177f2ce 100755 --- a/sdk/build.sh +++ b/sdk/build.sh @@ -173,6 +173,8 @@ while read _pl _var _tgt; do done<<-_EOF_ ccimx8x-sbc-pro DONTBUILDVARIANTS dey-image-qt,dey-image-aws ccimx8x-sbc-express DONTBUILDVARIANTS dey-image-qt,dey-image-aws + ccimx6qpsbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws + ccimx6sbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws ccimx6ulsbc DONTBUILDVARIANTS dey-image-qt,dey-image-aws ccimx6ulstarter DONTBUILDVARIANTS core-image-base,dey-image-aws ccimx6ulsom DONTBUILDVARIANTS dey-image-mft-module-min diff --git a/sdk/config/ccimx6qpsbc/bblayers.conf.sample b/sdk/config/ccimx6qpsbc/bblayers.conf.sample new file mode 100644 index 000000000..bc2ef9645 --- /dev/null +++ b/sdk/config/ccimx6qpsbc/bblayers.conf.sample @@ -0,0 +1,22 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-poky \ + ##OEROOT##/meta-yocto-bsp \ + ##DIGIBASE##/meta-openembedded/meta-oe \ + ##DIGIBASE##/meta-openembedded/meta-python \ + ##DIGIBASE##/meta-openembedded/meta-networking \ + ##DIGIBASE##/meta-openembedded/meta-webserver \ + ##DIGIBASE##/meta-qt5 \ + ##DIGIBASE##/meta-swupdate \ + ##DIGIBASE##/meta-freescale \ + ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-digi/meta-digi-arm \ + ##DIGIBASE##/meta-digi/meta-digi-dey \ + " diff --git a/sdk/config/ccimx6qpsbc/conf-notes.txt b/sdk/config/ccimx6qpsbc/conf-notes.txt new file mode 100644 index 000000000..ed1cd5158 --- /dev/null +++ b/sdk/config/ccimx6qpsbc/conf-notes.txt @@ -0,0 +1,18 @@ +Digi Embedded Yocto provides the following image recipes: + + * dey-image-qt: graphical QT image + + By default the image is X11-based so it provides a full SATO theme + desktop environment. + + To compile the image for the framebuffer (instead of X11) add the + following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-aws: console-only image supporting Amazon Web Services IoT + + This image includes the AWS Greengrass Core and an AWS IoT platform + example application. For more information on AWS support in Digi + Embedded Yocto see the online documentation. + diff --git a/sdk/config/ccimx6qpsbc/local.conf.sample b/sdk/config/ccimx6qpsbc/local.conf.sample new file mode 100644 index 000000000..490703ef4 --- /dev/null +++ b/sdk/config/ccimx6qpsbc/local.conf.sample @@ -0,0 +1,266 @@ +# +# 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 ??= "qemux86" + +MACHINE = "ccimx6qpsbc" + +# +# Use Digi's internal git repositories +# +#DIGI_INTERNAL_GIT ?= "1" + +# +# 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 ?= "dey" +# 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. 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 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" + +# +# Enable local PR server +# +PRSERV_HOST = "localhost:0" + +# +# Some libraries and packages are covered by NXP EULA +# +#ACCEPT_FSL_EULA = "1" diff --git a/sdk/config/ccimx6sbc/bblayers.conf.sample b/sdk/config/ccimx6sbc/bblayers.conf.sample new file mode 100644 index 000000000..bc2ef9645 --- /dev/null +++ b/sdk/config/ccimx6sbc/bblayers.conf.sample @@ -0,0 +1,22 @@ +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-poky \ + ##OEROOT##/meta-yocto-bsp \ + ##DIGIBASE##/meta-openembedded/meta-oe \ + ##DIGIBASE##/meta-openembedded/meta-python \ + ##DIGIBASE##/meta-openembedded/meta-networking \ + ##DIGIBASE##/meta-openembedded/meta-webserver \ + ##DIGIBASE##/meta-qt5 \ + ##DIGIBASE##/meta-swupdate \ + ##DIGIBASE##/meta-freescale \ + ##DIGIBASE##/meta-fsl-demos \ + ##DIGIBASE##/meta-digi/meta-digi-arm \ + ##DIGIBASE##/meta-digi/meta-digi-dey \ + " diff --git a/sdk/config/ccimx6sbc/conf-notes.txt b/sdk/config/ccimx6sbc/conf-notes.txt new file mode 100644 index 000000000..ed1cd5158 --- /dev/null +++ b/sdk/config/ccimx6sbc/conf-notes.txt @@ -0,0 +1,18 @@ +Digi Embedded Yocto provides the following image recipes: + + * dey-image-qt: graphical QT image + + By default the image is X11-based so it provides a full SATO theme + desktop environment. + + To compile the image for the framebuffer (instead of X11) add the + following line to the project's conf/local.conf: + + DISTRO_FEATURES_remove = "x11" + + * dey-image-aws: console-only image supporting Amazon Web Services IoT + + This image includes the AWS Greengrass Core and an AWS IoT platform + example application. For more information on AWS support in Digi + Embedded Yocto see the online documentation. + diff --git a/sdk/config/ccimx6sbc/local.conf.sample b/sdk/config/ccimx6sbc/local.conf.sample new file mode 100644 index 000000000..e57efbd01 --- /dev/null +++ b/sdk/config/ccimx6sbc/local.conf.sample @@ -0,0 +1,266 @@ +# +# 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 ??= "qemux86" + +MACHINE = "ccimx6sbc" + +# +# Use Digi's internal git repositories +# +#DIGI_INTERNAL_GIT ?= "1" + +# +# 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 ?= "dey" +# 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. 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 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" + +# +# Enable local PR server +# +PRSERV_HOST = "localhost:0" + +# +# Some libraries and packages are covered by NXP EULA +# +#ACCEPT_FSL_EULA = "1"