From 432844a3a8eb1a4aefaaaafb073403cecd7f0d79 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Fri, 24 Mar 2017 11:06:52 +0100 Subject: [PATCH 01/45] meta-digi: configure recipes to use maintenance branches Updated recipes for linux, u-boot, trustfence-sign-tools, and kernel-module-qualcomm. Signed-off-by: Tatiana Leon --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 2 +- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 2 +- .../kernel-module-qualcomm/kernel-module-qualcomm.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index c652af018..8c99a86e0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -11,7 +11,7 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" -SRCBRANCH = "v2015.04/master" +SRCBRANCH = "v2015.04/maint" SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index 3b93c3537..f70e0e122 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -2,7 +2,7 @@ SUMMARY = "TrustFence signing and encryption scripts" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" -SRCBRANCH = "v2015.04/master" +SRCBRANCH = "v2015.04/maint" SRCREV = "${AUTOREV}" S = "${WORKDIR}" 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 8208088ed..0261f23a0 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 @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca PV = "v4.2.80.63" -SRCBRANCH = "dey-2.2/master" +SRCBRANCH = "dey-2.2/maint" SRCREV = "${AUTOREV}" QCOM_GIT_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git', d)}" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 7f2aa8fc5..6819a65b9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -5,7 +5,7 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler -SRCBRANCH = "v3.14/master" +SRCBRANCH = "v3.14/dey-2.0/maint" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index 96399f669..b2a62d6db 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -3,7 +3,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc -SRCBRANCH = "v4.1.15/master" +SRCBRANCH = "v4.1/dey-2.2/maint" SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6ul)" From 28bc61a089e69dbed27067b080164ef6eebf28a0 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Tue, 28 Mar 2017 14:57:15 +0200 Subject: [PATCH 02/45] meta-digi: update revisions for dey-2.2-r1.1 Signed-off-by: Tatiana Leon --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 03d459756..67263505d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${UBOOT_GIT_URI};nobranch=1" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 8c99a86e0..20381ea2a 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "96559b04907265dd24c4e04b6b2b7285e0242e8f" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index f70e0e122..0418576c5 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "96559b04907265dd24c4e04b6b2b7285e0242e8f" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 1f7eb809e..43d0f3201 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};branch=${SRCBRANCH} \ + ${LINUX_GIT_URI};nobranch=1 \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index 6d7e0ec69..d6215f7f9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "${AUTOREV}" +SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 6819a65b9..ce1a79abf 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "973260ccfe67e7f47c549fadba27f77adb8f7982" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index b2a62d6db..00d1521c5 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "${AUTOREV}" +SRCREV = "e3fe8f18deeb9d5035e951e1e8df4903a6cef734" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index df5c2d21f..9f7e98759 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "${AUTOREV}" +SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" 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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${CC_GIT_URI};nobranch=1" S = "${WORKDIR}/git" From c1709e4fd377438c2ec2cd79c004131e60a80345 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Tue, 28 Mar 2017 18:54:25 +0200 Subject: [PATCH 03/45] meta-digi: revert revisions to AUTOREV Signed-off-by: Tatiana Leon --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 67263505d..03d459756 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};nobranch=1" +SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 20381ea2a..8c99a86e0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "96559b04907265dd24c4e04b6b2b7285e0242e8f" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index 0418576c5..f70e0e122 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "96559b04907265dd24c4e04b6b2b7285e0242e8f" +SRCREV = "${AUTOREV}" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 43d0f3201..1f7eb809e 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};nobranch=1 \ + ${LINUX_GIT_URI};branch=${SRCBRANCH} \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index d6215f7f9..6d7e0ec69 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" +SRCREV = "${AUTOREV}" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index ce1a79abf..6819a65b9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "973260ccfe67e7f47c549fadba27f77adb8f7982" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index 00d1521c5..b2a62d6db 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "e3fe8f18deeb9d5035e951e1e8df4903a6cef734" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 9f7e98759..df5c2d21f 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" +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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};nobranch=1" +SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" S = "${WORKDIR}/git" From 98d514c1c286381a32095efa4ba53ecbaf4c3f8f Mon Sep 17 00:00:00 2001 From: David Escalona Date: Tue, 28 Mar 2017 18:55:41 +0200 Subject: [PATCH 04/45] dey-examples-hdp: update sample to python3 - Some Python modules are no longer available in DEY-2.2 since the official supported Python version is now 3. This caused the HDP application to fail importing some of the old modules. For this reason the sample application has been updated to use Python3 syntax and modules. https://jira.digi.com/browse/DEL-3996 Signed-off-by: David Escalona --- .../dey-examples/dey-examples-hdp.bb | 2 +- .../dey-examples/files/hdp_test/hdp-test.py | 126 ++++++++---------- 2 files changed, 59 insertions(+), 69 deletions(-) diff --git a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-hdp.bb b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-hdp.bb index b306b3a9f..e5642292f 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/dey-examples-hdp.bb +++ b/meta-digi-dey/recipes-digi/dey-examples/dey-examples-hdp.bb @@ -14,6 +14,6 @@ do_install() { install -m 0755 hdp-test.py ${D}${bindir} } -RDEPENDS_${PN} = "python python-argparse python-crypt python-dbus python-pygobject" +RDEPENDS_${PN} = "python3 python3-argparse python3-crypt python3-dbus python3-pygobject" COMPATIBLE_MACHINE = "(ccardimx28|ccimx6$|ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/dey-examples/files/hdp_test/hdp-test.py b/meta-digi-dey/recipes-digi/dey-examples/files/hdp_test/hdp-test.py index 38930676a..4f417cd09 100644 --- a/meta-digi-dey/recipes-digi/dey-examples/files/hdp_test/hdp-test.py +++ b/meta-digi-dey/recipes-digi/dey-examples/files/hdp_test/hdp-test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @@ -9,12 +9,13 @@ import sys import os -import glib +from gi.repository import GLib import dbus import socket import dbus.service -import gobject +from gi.repository import GObject from dbus.mainloop.glib import DBusGMainLoop +from dbus.exceptions import DBusException import argparse # from hdp_utils import * @@ -31,18 +32,8 @@ class MessageType: Release_Confirmation, Data, Unknown) = range(0, 6) class HdpMessage: - def s2b(self, msg): - if msg is None: - return None - return [ord(x) for x in msg] - - def b2s(self, msg): - if msg is None: - return None - return "".join([chr(int(x)) for x in msg]) - def getAssociationResponse(self, invokeId): - return self.b2s(( + return bytes(( 0xe3, 0x00, #APDU CHOICE Type(AareApdu) 0x00, 0x2c, #CHOICE.length = 44 0x00, 0x00, #result=accept (known config) @@ -62,7 +53,7 @@ class HdpMessage: )) def getConfigurationResp(self, invokeId): - return self.b2s(( + return bytes(( 0xe7, 0x00, #APDU CHOICE Type(PrstApdu) 0x00, 0x16, #CHOICE.length = 22 0x00, 0x14, #OCTET STRING.length = 20 @@ -78,24 +69,24 @@ class HdpMessage: )) def getReleaseRequest(self, invokeId): - return self.b2s((0xe4, 0x00, 0x00, 0x02, 0x00, 0x00)) + return bytes((0xe4, 0x00, 0x00, 0x02, 0x00, 0x00)) def getReleaseResponse(self, invokeId): - return self.b2s((0xe5, 0x00, 0x00, 0x02, 0x00, 0x00)) + return bytes((0xe5, 0x00, 0x00, 0x02, 0x00, 0x00)) def getDataResponse(self, invokeId): - return self.b2s(( - 0xe7, 0x00, #APDU CHOICE Type(PrstApdu) - 0x00, 0x12, #CHOICE.length = 18 - 0x00, 0x10, #OCTET STRING.length = 16 - invokeId[0], invokeId[1], #invoke-id (mirrored from invocation) - 0x02, 0x01, #CHOICE(Remote Operation Response | Confirmed Event Report) - 0x00, 0x0a, #CHOICE.length = 10 - 0x00, 0x00, #obj-handle = 0 (MDS object) - 0x00, 0x00, 0x00, 0x00, #currentTime = 0 - 0x0d, 0x1d, #event-type = MDC_NOTI_SCAN_REPORT_FIXED - 0x00, 0x00, #event-reply-info.length = 0 - )) + return bytes(( + 0xe7, 0x00, #APDU CHOICE Type(PrstApdu) + 0x00, 0x12, #CHOICE.length = 18 + 0x00, 0x10, #OCTET STRING.length = 16 + invokeId[0], invokeId[1], #invoke-id (mirrored from invocation) + 0x02, 0x01, #CHOICE(Remote Operation Response | Confirmed Event Report) + 0x00, 0x0a, #CHOICE.length = 10 + 0x00, 0x00, #obj-handle = 0 (MDS object) + 0x00, 0x00, 0x00, 0x00, #currentTime = 0 + 0x0d, 0x1d, #event-type = MDC_NOTI_SCAN_REPORT_FIXED + 0x00, 0x00, #event-reply-info.length = 0 + )) def parse(self, string_msg): # @@ -113,28 +104,27 @@ class HdpMessage: invokeId = (0, 0) sp02 = 0 pulse = 0 - msg = self.s2b(string_msg) if debugOn: - print "IEEE opcode received: %x, length = %d" % (int(msg[0]), len(msg)) - for i in range(len(msg)): - if ((i & 15) == 0): - print - print '%2.2X' % int(msg[i]), - print + print("IEEE opcode received: %x, length = %d" % (int(string_msg[0]), len(string_msg))) + for i in range(len(string_msg)): + if ((i & 15) == 0): + print + print('%2.2X' % int(string_msg[i]),) + print - if int(msg[0]) == 0xe2: + if int(string_msg[0]) == 0xe2: msg_type = MessageType.Association - elif int(msg[0]) == 0xe7: - invokeId = int(msg[6]), int(msg[7]) - if int(msg[18]) == 0x0d and int(msg[19]) == 0x1c: + elif int(string_msg[0]) == 0xe7: + invokeId = int(string_msg[6]), int(string_msg[7]) + if int(string_msg[18]) == 0x0d and int(string_msg[19]) == 0x1c: msg_type = MessageType.Configuration else: msg_type = MessageType.Data - sp02 = int(msg[35]) - pulse = int(msg[49]) - elif int(msg[0]) == 0xe4: + sp02 = int(string_msg[35]) + pulse = int(string_msg[49]) + elif int(string_msg[0]) == 0xe4: msg_type = MessageType.Release_Request - elif int(msg[0]) == 0xe5: + elif int(string_msg[0]) == 0xe5: msg_type = MessageType.Release_Confirmation else: msg_type = MessageType.Unknown @@ -152,7 +142,7 @@ def receive_data(sk, evt): data = None disconnecting = False hdp = HdpMessage() - if evt & glib.IO_IN: + if evt & GLib.IO_IN: try: data = sk.recv(1024) except IOError: @@ -163,44 +153,44 @@ def receive_data(sk, evt): invokeId = result[1] if msgType == MessageType.Association: if debugOn: - print "Oximeter has associated" + print("Oximeter has associated") sk.send(hdp.getAssociationResponse(invokeId)) elif msgType == MessageType.Configuration: if debugOn: - print "Received configuration data" + print("Received configuration data") sk.send(hdp.getConfigurationResponse(invokeId)) elif msgType == MessageType.Release_Request: if debugOn: - print "Received release request" + print("Received release request") sk.send(hdp.getReleaseResponse(invokeId)) disconnecting = True elif msgType == MessageType.Release_Confirmation: if debugOn: - print "Received release confirmation" + print("Received release confirmation") disconnecting = True elif msgType == MessageType.Data: sk.send(hdp.getDataResponse(invokeId)) sp02 = result[2] pulse = result[3] if debugOn: - print "Received data from oximeter" - print "SpO2 Level: %d, Beats/second: %d" % \ - (result[2], result[3]) + print("Received data from oximeter") + print("SpO2 Level: %d, Beats/second: %d" % \ + (result[2], result[3])) if debugOn: - print "Sending disconnect" + print("Sending disconnect") sk.send(hdp.getReleaseRequest(invokeId)) else: - print "Received unknown message, disconnecting" + print("Received unknown message, disconnecting") sk.send(hdp.getReleaseRequest(invokeId)) disconnecting = True - if disconnecting or evt != glib.IO_IN or not data: + if disconnecting or evt != GLib.IO_IN or not data: try: sk.shutdown(2) except IOError: pass sk.close() - print "Disconnected from oximeter" + print("Disconnected from oximeter") return False else: return True @@ -223,9 +213,9 @@ class SignalHandler(object): dbus_interface=HEALTH_DEVICE_INTERFACE) def ChannelConnected(self, channel, interface, device): - print "%s has connected" % device + print("%s has connected" % device) if debugOn: - print "Channel: %s" % channel + print("Channel: %s" % channel) # # The oximeter has connected to us. Let's get # a socket for the connection. @@ -241,14 +231,14 @@ class SignalHandler(object): # Now set up our receiver function to be called # when interesting events are detected on that # socket - watch_bitmap = glib.IO_IN | glib.IO_ERR| glib.IO_HUP | glib.IO_NVAL - glib.io_add_watch(sk, watch_bitmap, receive_data) + watch_bitmap = GLib.IO_IN | GLib.IO_ERR| GLib.IO_HUP | GLib.IO_NVAL + GLib.io_add_watch(sk, watch_bitmap, receive_data) except DBusException: - print "Error communicating with Oximeter." - print "Please make sure the Oximeter has fresh batteries." + print("Error communicating with Oximeter.") + print("Please make sure the Oximeter has fresh batteries.") def ChannelDeleted(self, channel, interface, device): - print "Device %s channel %s deleted" % (device, channel) + print("Device %s channel %s deleted" % (device, channel)) parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="supply debug output", @@ -257,7 +247,7 @@ args = parser.parse_args() debugOn = args.debug DBusGMainLoop(set_as_default=True) -loop = gobject.MainLoop() +loop = GObject.MainLoop() bus = dbus.SystemBus() signal_handler = SignalHandler() @@ -275,16 +265,16 @@ config = dbus.Dictionary({"Role": "Sink", "DataType": dbus.types.UInt16(0x1004), manager = dbus.Interface(bus.get_object(BUS_NAME, PATH), HEALTH_MANAGER_INTERFACE) app = manager.CreateApplication(config) -print "HDP application created, waiting for connection from" -print "a pulse oximeter. Press control-c to terminate." +print("HDP application created, waiting for connection from") +print("a pulse oximeter. Press control-c to terminate.") try: - loop = glib.MainLoop() + loop = GLib.MainLoop() loop.run() except KeyboardInterrupt: pass finally: manager.DestroyApplication(app) print - print "Application stopped" + print("Application stopped") print From 5a2b538bcd61f70ad129d9954834948ddb2aa014 Mon Sep 17 00:00:00 2001 From: David Escalona Date: Thu, 30 Mar 2017 09:41:43 +0200 Subject: [PATCH 05/45] bluetooth-init: force hardware-init script to be executed first - The Bluetooth daemon was always executed before setting up the hardware, generating several problems specifically in the CCIMX6SBC. This was causing the Bluetooth driver to override the Bluetooth name and alias, as well as avoiding any host function on Bluetooth profiles. Only pairing and ping was working, as well as client profile sides. - This change also fixes some issues in the CCIMX6UL platforms with the Bluetooth daemon failing to perform several bluetoothctl operations. https://jira.digi.com/browse/DEL-4000 https://jira.digi.com/browse/DEL-4015 Signed-off-by: David Escalona --- .../recipes-connectivity/bluez/bluez5_5.41.bbappend | 1 + .../recipes-core/busybox/busybox-1.24.1/ccimx6/suspend | 7 ++++++- .../recipes-core/busybox/busybox-1.24.1/ccimx6ul/suspend | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5_5.41.bbappend b/meta-digi-dey/recipes-connectivity/bluez/bluez5_5.41.bbappend index c6edca2b5..66270a361 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5_5.41.bbappend +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5_5.41.bbappend @@ -45,5 +45,6 @@ FILES_${PN}-init = "${sysconfdir}/init.d/bluetooth-init" INITSCRIPT_PACKAGES += "${PN}-init" INITSCRIPT_NAME_${PN}-init = "bluetooth-init" +INITSCRIPT_PARAMS_${PN}-init = "start 19 2 3 4 5 . stop 21 0 1 6 ." PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6/suspend b/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6/suspend index 6888311e4..ceded7b74 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6/suspend +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6/suspend @@ -21,6 +21,7 @@ lockfile="/var/lock/${scriptname}.lock" lockfd="9" BT_INIT="/etc/init.d/bluetooth-init" +BT_DAEMON="/etc/init.d/bluetooth" usage() { printf "\nSuspend system to RAM memory\n" @@ -37,6 +38,7 @@ suspend_interfaces() { # Suspend bluetooth interface hciconfig hci0 2>&1 | grep -qs UP && up_bt_on_resume="1" + ${BT_DAEMON} stop >/dev/null ${BT_INIT} stop >/dev/null } @@ -47,7 +49,10 @@ resume_interfaces() { fi # Resume bluetooth interface - [ -n "${up_bt_on_resume}" ] && ${BT_INIT} start >/dev/null + if [ -n "${up_bt_on_resume}" ]; then + ${BT_INIT} start >/dev/null + ${BT_DAEMON} start >/dev/null + fi } enter_critical_section() { diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6ul/suspend b/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6ul/suspend index e213f45fe..33086f979 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6ul/suspend +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.24.1/ccimx6ul/suspend @@ -21,6 +21,7 @@ lockfile="/var/lock/${scriptname}.lock" lockfd="9" BT_INIT="/etc/init.d/bluetooth-init" +BT_DAEMON="/etc/init.d/bluetooth" usage() { printf "\nSuspend system to RAM memory\n" @@ -40,6 +41,7 @@ suspend_interfaces() { # Suspend bluetooth interface hciconfig hci0 2>&1 | grep -qs UP && up_bt_on_resume="1" + ${BT_DAEMON} stop >/dev/null ${BT_INIT} stop >/dev/null } @@ -50,7 +52,10 @@ resume_interfaces() { fi # Resume bluetooth interface - [ -n "${up_bt_on_resume}" ] && ${BT_INIT} start >/dev/null + if [ -n "${up_bt_on_resume}" ]; then + ${BT_INIT} start >/dev/null + ${BT_DAEMON} start >/dev/null + fi } enter_critical_section() { From dba3244a3ed7dcb2cacf626e6ef3786af4787569 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 31 Mar 2017 12:23:46 +0200 Subject: [PATCH 06/45] dey-image-installer: fix missing artifacts in ZIP installer With the migration to Morty, some of the paths to the artifacts (boot and rootfs images) need to be updated. While on it, also remove the temporary README.txt file which is not needed after it has been packed in the zip installer. https://jira.digi.com/browse/DEL-4013 Signed-off-by: Javier Viguera --- .../classes/dey-image-installer.bbclass | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/meta-digi-dey/classes/dey-image-installer.bbclass b/meta-digi-dey/classes/dey-image-installer.bbclass index 9c29b4c65..e3d0f1f9e 100644 --- a/meta-digi-dey/classes/dey-image-installer.bbclass +++ b/meta-digi-dey/classes/dey-image-installer.bbclass @@ -22,8 +22,8 @@ generate_installer_zip () { # Get list of files to pack INSTALLER_FILELIST="${DEPLOY_DIR_IMAGE}/install_linux_fw_sd.scr" for ext in ${FSTYPES_WHITELIST}; do - if readlink -e "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${ext}" >/dev/null; then - INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${ext}" + if readlink -e "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}" >/dev/null; then + INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}" fi done for ubconf in ${UBOOT_CONFIG}; do @@ -33,19 +33,20 @@ generate_installer_zip () { done # Create README file - cat >README.txt <<_EOF_ + cat >${IMGDEPLOYDIR}/README.txt <<_EOF_ Digi Embedded Yocto kit installer --------------------------------- _EOF_ - md5sum ${INSTALLER_FILELIST} | sed -e "s,${DEPLOY_DIR_IMAGE}/,,g" >> README.txt + md5sum ${INSTALLER_FILELIST} | sed -e "s,${DEPLOY_DIR_IMAGE}/,,g;s,${IMGDEPLOYDIR}/,,g" >> ${IMGDEPLOYDIR}/README.txt - # Pack the files - zip -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.installer.zip ${INSTALLER_FILELIST} README.txt + # Pack the files and remove the temporary readme file + zip -j ${IMGDEPLOYDIR}/${IMAGE_NAME}.installer.zip ${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/README.txt + rm -f ${IMGDEPLOYDIR}/README.txt # Create the symlink - if [ -n "${IMAGE_LINK_NAME}" ] && [ -e "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.installer.zip" ]; then - ln -sf ${IMAGE_NAME}.installer.zip ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.installer.zip + if [ -n "${IMAGE_LINK_NAME}" ] && [ -e "${IMGDEPLOYDIR}/${IMAGE_NAME}.installer.zip" ]; then + ln -sf ${IMAGE_NAME}.installer.zip ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.installer.zip fi } From 5d2d0011d0edb4a2a838ab0699651f3cea8ea438 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Thu, 30 Mar 2017 18:37:00 +0200 Subject: [PATCH 07/45] meta-digi-arm: qualcomm: Move cfg.dat and qcom_cfg.ini to module recipe The firmware configuration and the driver configuration are part of the driver repository. Stop duplicating the content in meta-digi so they are updated with the driver itself. https://jira.digi.com/browse/DEL-4021 Signed-off-by: Alex Gonzalez --- .../recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb | 8 +------- .../kernel-module-qualcomm/kernel-module-qualcomm.bb | 5 +++++ 2 files changed, 6 insertions(+), 7 deletions(-) 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 517869ccf..6bf486f38 100644 --- a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb +++ b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb @@ -19,8 +19,6 @@ FW_QCA6564-WIFI = " \ file://otp30.bin \ file://qwlan30.bin \ file://utf30.bin \ - file://wlan/cfg.dat \ - file://wlan/qcom_cfg.ini \ " SRC_URI = " \ @@ -41,7 +39,7 @@ do_install() { ${D}${base_libdir}/firmware/qca # Wifi firmware - install -d ${D}${base_libdir}/firmware/wlan + install -d ${D}${base_libdir}/firmware install -m 0644 \ bdwlan30_US.bin \ bdwlan30_World.bin \ @@ -50,10 +48,6 @@ do_install() { qwlan30.bin \ utf30.bin \ ${D}${base_libdir}/firmware - install -m 0644 \ - wlan/cfg.dat \ - wlan/qcom_cfg.ini \ - ${D}${base_libdir}/firmware/wlan } # Do not create empty debug and development packages (PN-dbg PN-dev PN-staticdev) 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 0261f23a0..66894f694 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 @@ -42,11 +42,16 @@ do_install_append() { install -m 0755 ${WORKDIR}/qualcomm-pre-up ${D}${sysconfdir}/network/if-pre-up.d/qualcomm install -d ${D}${sysconfdir}/modprobe.d install -m 0644 ${WORKDIR}/modprobe-qualcomm.conf ${D}${sysconfdir}/modprobe.d/qualcomm.conf + install -d ${D}${base_libdir}/firmware/wlan/ + install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_cfg.dat ${D}${base_libdir}/firmware/wlan/cfg.dat + install -m 0644 ${WORKDIR}/git/firmware_bin/WCNSS_qcom_cfg.ini ${D}${base_libdir}/firmware/wlan/qcom_cfg.ini } FILES_${PN} += " \ ${sysconfdir}/network/if-pre-up.d/qualcomm \ ${sysconfdir}/modprobe.d/qualcomm.conf \ + ${base_libdir}/firmware/wlan/cfg.dat \ + ${base_libdir}/firmware/wlan/qcom_cfg.ini \ " COMPATIBLE_MACHINE = "(ccimx6ul)" From 2dcf33b28325a35a28fa081aeb62daacbf571f64 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 31 Mar 2017 13:00:43 +0200 Subject: [PATCH 08/45] hostapd: parametrize hostapd init script per interface The original init script hardcodes the configuration file to use so it cannot be re-utilized for concurrent AP/AP mode where two interfaces can be used as SoftAP. This commit uses the variable ${IFACE} to: - select a specific configuration file per interface: /etc/hostapd_${IFACE}.conf - create a specific PID file per interface: /var/run/hostapd.${IFACE}.pid With this, the /etc/network/interfaces can use the script for using SoftAP in different wireless interfaces. Signed-off-by: Hector Palacios --- .../{hostapd.conf => hostapd_wlan1.conf} | 2 +- .../{hostapd.conf => hostapd_wlan0.conf} | 2 +- .../recipes-connectivity/hostapd/hostapd/init | 59 +++++++++++++++++++ .../hostapd/hostapd_%.bbappend | 14 ++++- 4 files changed, 72 insertions(+), 5 deletions(-) rename meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/{hostapd.conf => hostapd_wlan1.conf} (93%) rename meta-digi-dey/recipes-connectivity/hostapd/hostapd/{hostapd.conf => hostapd_wlan0.conf} (93%) create mode 100644 meta-digi-dey/recipes-connectivity/hostapd/hostapd/init diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd.conf b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd_wlan1.conf similarity index 93% rename from meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd.conf rename to meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd_wlan1.conf index 43ea0206a..94e4895be 100644 --- a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd.conf +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/ccimx6ul/hostapd_wlan1.conf @@ -4,7 +4,7 @@ interface=wlan1 driver=nl80211 # WPA2-AES encryption -ssid=ap-wpa2aes_a +ssid=ap-wlan1-wpa2aes_a auth_algs=1 wpa=2 wpa_key_mgmt=WPA-PSK diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd.conf b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd_wlan0.conf similarity index 93% rename from meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd.conf rename to meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd_wlan0.conf index 552971e25..ba479d91b 100644 --- a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd.conf +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/hostapd_wlan0.conf @@ -4,7 +4,7 @@ interface=wlan0 driver=nl80211 # WPA2-AES encryption -ssid=ap-wpa2aes_a +ssid=ap-wlan0-wpa2aes_a auth_algs=1 wpa=2 wpa_key_mgmt=WPA-PSK diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init new file mode 100644 index 000000000..964d7e79c --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init @@ -0,0 +1,59 @@ +#!/bin/sh +DAEMON=/usr/sbin/hostapd +NAME=hostapd +DESC="HOSTAP Daemon" +PIDFILE="/var/run/hostapd.${IFACE}.pid" +ARGS="/etc/hostapd_${IFACE}.conf -B -P ${PIDFILE}" + +test -f $DAEMON || exit 0 + +set -e + +# source function library +. /etc/init.d/functions + +delay_stop() { + count=0 + while [ $count -lt 9 ] ; do + if pidof $DAEMON >/dev/null; then + sleep 1 + else + return 0 + fi + count=`expr $count + 1` + done + echo "Failed to stop $DESC." + return 1 +} + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K --oknodo -x $DAEMON -p ${PIDFILE} + echo "$NAME." + ;; + restart) + $0 stop + delay_stop && $0 start + ;; + reload) + echo -n "Reloading $DESC: " + killall -HUP $(basename ${DAEMON}) + echo "$NAME." + ;; + status) + status $DAEMON + exit $? + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd_%.bbappend b/meta-digi-dey/recipes-connectivity/hostapd/hostapd_%.bbappend index 08ff287bc..4134c7993 100644 --- a/meta-digi-dey/recipes-connectivity/hostapd/hostapd_%.bbappend +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd_%.bbappend @@ -2,11 +2,19 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" -SRC_URI += "file://hostapd.conf" +SRC_URI_append = " file://hostapd_wlan0.conf" +SRC_URI_append_ccimx6ul = " file://hostapd_wlan1.conf" do_install_append() { - # Overwrite the default hostapd.conf with our custom file - install -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir} + # Remove the default hostapd.conf + rm -f ${WORKDIR}/hostapd.conf + # Install custom hostapd_IFACE.conf file + install -m 0644 ${WORKDIR}/hostapd_wlan0.conf ${D}${sysconfdir} +} + +do_install_append_ccimx6ul() { + # Install custom hostapd_IFACE.conf file + install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir} } # Do not autostart hostapd daemon, it will conflict with wpa-supplicant. From 80e575677053aa9a83c89f44ddf0ba660e95736c Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 27 Mar 2017 09:42:58 +0200 Subject: [PATCH 09/45] ccimx6ulstarter/sbc: add support for CC6UL 1GB DDR3 variants Add support to build U-Boot for variants with 1GB DDR3. Add support in U-Boot install firmware script to select the U-Boot artifact to use basing on variant. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-3970 --- meta-digi-arm/conf/machine/ccimx6ulsbc.conf | 3 +- .../conf/machine/ccimx6ulstarter.conf | 3 +- .../ccimx6ulsbc/install_linux_fw_sd.txt | 30 ++++++++++++++++++- .../ccimx6ulstarter/install_linux_fw_sd.txt | 30 ++++++++++++++++++- 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf index f3448a6e5..224813415 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulsbc.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulsbc.conf @@ -7,7 +7,8 @@ include conf/machine/include/ccimx6ul.inc # U-Boot configurations # Last one is the default (the one the symlinks point at) -UBOOT_CONFIG ??= "ccimx6ulsbc" +UBOOT_CONFIG ??= "ccimx6ulsbc1GB ccimx6ulsbc" +UBOOT_CONFIG[ccimx6ulsbc1GB] = "ccimx6ulsbc1GB_defconfig" UBOOT_CONFIG[ccimx6ulsbc] = "ccimx6ulsbc_defconfig" KERNEL_DEVICETREE ?= " \ diff --git a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf index 184b980a8..317b38ee5 100644 --- a/meta-digi-arm/conf/machine/ccimx6ulstarter.conf +++ b/meta-digi-arm/conf/machine/ccimx6ulstarter.conf @@ -7,7 +7,8 @@ include conf/machine/include/ccimx6ul.inc # U-Boot configurations # Last one is the default (the one the symlinks point at) -UBOOT_CONFIG ??= "ccimx6ulstarter" +UBOOT_CONFIG ??= "ccimx6ulstarter1GB ccimx6ulstarter" +UBOOT_CONFIG[ccimx6ulstarter1GB] = "ccimx6ulstarter1GB_defconfig" UBOOT_CONFIG[ccimx6ulstarter] = "ccimx6ulstarter_defconfig" KERNEL_DEVICETREE ?= " \ diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt index 2240940a9..45907a03c 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/install_linux_fw_sd.txt @@ -19,8 +19,36 @@ 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}" = "0x02" || test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc1GB.imx; + 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 + true; +else + echo ""; + echo "[ERROR] Cannot determine U-Boot file for this module!"; + echo ""; + echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 6UL variant:"; + echo " - For a SOM with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc1GB.imx"; + echo " - For a SOM with 256MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + setenv INSTALL_MMCDEV 0 -setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulsbc.imx setenv INSTALL_LINUX_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.boot.ubifs setenv INSTALL_RECOVERY_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.recovery.ubifs setenv INSTALL_ROOTFS_FILENAME dey-image-qt-##GRAPHICAL_BACKEND##-ccimx6ulsbc.ubifs diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt index 24ba14447..9720807f2 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/install_linux_fw_sd.txt @@ -19,8 +19,36 @@ 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}" = "0x02" || test "${module_variant}" = "0x03"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx; + elif test "${module_variant}" = "0x04"; then + setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx; + 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 + true; +else + echo ""; + echo "[ERROR] Cannot determine U-Boot file for this module!"; + echo ""; + echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 6UL variant:"; + echo " - For a SOM with 1GB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter1GB.imx"; + echo " - For a SOM with 256MB DDR3, run:"; + echo " => setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx"; + echo ""; + echo "2. Run the install script again."; + echo ""; + echo "Aborted"; + echo ""; + exit; +fi; + setenv INSTALL_MMCDEV 0 -setenv INSTALL_UBOOT_FILENAME u-boot-ccimx6ulstarter.imx setenv INSTALL_LINUX_FILENAME core-image-base-ccimx6ulstarter.boot.ubifs setenv INSTALL_RECOVERY_FILENAME core-image-base-ccimx6ulstarter.recovery.ubifs setenv INSTALL_ROOTFS_FILENAME core-image-base-ccimx6ulstarter.ubifs From 505eb19aa42e47d265f53d9ac1c9d7fe0ed34b1f Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Fri, 7 Apr 2017 11:26:58 +0200 Subject: [PATCH 10/45] hostapd: let start-stop-daemon create PID and background process The current script cannot launch the hostapd twice (for dual HostAP mode) because start-stop-daemon finds an already existing PID for hostapd after running the first instance. The solution is: - Do not launch the hostapd in background (so that it does not fork the process, which assigns a different PID) - Use -b option of start-stop-daemon so that it launches the daemon in the background. - Let start-stop-daemon create the PID (since the hostapd will not fork now this PID will match the hostapd process, allowing to kill it later) This solution also hides the hostapd log messages that appeared before. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-4045 --- meta-digi-dey/recipes-connectivity/hostapd/hostapd/init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init index 964d7e79c..cfd6eee7b 100644 --- a/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd/init @@ -3,7 +3,7 @@ DAEMON=/usr/sbin/hostapd NAME=hostapd DESC="HOSTAP Daemon" PIDFILE="/var/run/hostapd.${IFACE}.pid" -ARGS="/etc/hostapd_${IFACE}.conf -B -P ${PIDFILE}" +ARGS="/etc/hostapd_${IFACE}.conf" test -f $DAEMON || exit 0 @@ -29,7 +29,7 @@ delay_stop() { case "$1" in start) echo -n "Starting $DESC: " - start-stop-daemon -S -x $DAEMON -- $ARGS + start-stop-daemon -S -x $DAEMON -m -p ${PIDFILE} -b -- $ARGS echo "$NAME." ;; stop) From ad122d2605049252df678e461f4de95a8f3d69d4 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 5 Apr 2017 13:28:18 +0200 Subject: [PATCH 11/45] libqmi: new recipe for version 1.18.0 This version of libqmi is needed for newer versions of ModemManager. Remove bbappend and patch to previous version as the patch is now included in the new version. https://jira.digi.com/browse/DEL-3841 Signed-off-by: Javier Viguera --- .../libqmi/libqmi/0001-Detect-clang.patch | 82 +++++++++++++++++++ ...bqmi-patch-to-DMS-version-miss-match.patch | 74 ----------------- .../libqmi/libqmi_%.bbappend | 8 -- .../libqmi/libqmi_1.18.0.bb | 20 +++++ 4 files changed, 102 insertions(+), 82 deletions(-) create mode 100644 meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch delete mode 100755 meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch delete mode 100644 meta-digi-dey/recipes-connectivity/libqmi/libqmi_%.bbappend create mode 100644 meta-digi-dey/recipes-connectivity/libqmi/libqmi_1.18.0.bb diff --git a/meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch b/meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch new file mode 100644 index 000000000..e13404387 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-Detect-clang.patch @@ -0,0 +1,82 @@ +From 8333cf300f6010243117aae6da4b823d9d7f30b2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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/0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch b/meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch deleted file mode 100755 index edcfdb07f..000000000 --- a/meta-digi-dey/recipes-connectivity/libqmi/libqmi/0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch +++ /dev/null @@ -1,74 +0,0 @@ -From: Mike Engel -Date: Wed, 15 Mar 2017 18:20:25 +0100 -Subject: [PATCH] meta-digi-dey: Added libqmi patch to DMS version miss match. - -Signed-off-by: Mike Engel ---- - .../src/libqmi-glib/qmi-device.c | 32 +++++++++++++++++----- - 1 file changed, 25 insertions(+), 7 deletions(-) - -diff --git a/src/libqmi-glib/qmi-device.c b/src/libqmi-glib/qmi-device.c -index 5cee156..ef636f0 100644 ---- a/src/libqmi-glib/qmi-device.c -+++ b/src/libqmi-glib/qmi-device.c -@@ -485,8 +485,10 @@ check_message_supported (QmiDevice *self, - GError **error) - { - const QmiMessageCtlGetVersionInfoOutputServiceListService *info; -- guint major = 0; -- guint minor = 0; -+ guint message_major = 0; -+ guint message_minor = 0; -+ guint device_major = 0; -+ guint device_minor = 0; - - /* If we didn't check supported services, just assume it is supported */ - if (!self->priv->supported_services) -@@ -498,7 +500,7 @@ check_message_supported (QmiDevice *self, - - /* If we cannot get in which version this message was introduced, we'll just - * assume it's supported */ -- if (!qmi_message_get_version_introduced (message, &major, &minor)) -+ if (!qmi_message_get_version_introduced (message, &message_major, &message_minor)) - return TRUE; - - /* Get version info. It MUST exist because we allowed creating a client -@@ -506,18 +508,34 @@ check_message_supported (QmiDevice *self, - info = find_service_version_info (self, qmi_message_get_service (message)); - g_assert (info != NULL); - g_assert (info->service == qmi_message_get_service (message)); -+ device_major = info->major_version; -+ device_minor = info->minor_version; -+ -+ /* Some device firmware versions (Quectel EC21) lie about their supported -+ * DMS version, so assume a reasonable DMS version if the WDS version is -+ * high enough */ -+ if (info->service == QMI_SERVICE_DMS && device_major == 1 && device_minor == 0) { -+ const QmiMessageCtlGetVersionInfoOutputServiceListService *wds; -+ -+ wds = find_service_version_info (self, QMI_SERVICE_WDS); -+ g_assert (wds != NULL); -+ if (wds->major_version >= 1 && wds->minor_version >= 9) { -+ device_major = 1; -+ device_minor = 3; -+ } -+ } - - /* If the version of the message is greater than the version of the service, - * report unsupported */ -- if (major > info->major_version || -- (major == info->major_version && -- minor > info->minor_version)) { -+ if (message_major > device_major || -+ (message_major == device_major && -+ message_minor > device_minor)) { - g_set_error (error, - QMI_CORE_ERROR, - QMI_CORE_ERROR_UNSUPPORTED, - "QMI service '%s' version '%u.%u' required, got version '%u.%u'", - qmi_service_get_string (qmi_message_get_service (message)), -- major, minor, -+ message_major, message_minor, - info->major_version, - info->minor_version); - return FALSE; diff --git a/meta-digi-dey/recipes-connectivity/libqmi/libqmi_%.bbappend b/meta-digi-dey/recipes-connectivity/libqmi/libqmi_%.bbappend deleted file mode 100644 index ba7df7d50..000000000 --- a/meta-digi-dey/recipes-connectivity/libqmi/libqmi_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2017 Digi International Inc. - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI += " \ - file://0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch \ -" - 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 new file mode 100644 index 000000000..e732dae3a --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/libqmi/libqmi_1.18.0.bb @@ -0,0 +1,20 @@ +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 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" From a774da80be924e7971fd786d3bb101af2e46aeac Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 5 Apr 2017 13:28:50 +0200 Subject: [PATCH 12/45] modemmanager: new recipe to build from git repository The XBee cellular support is at the moment only in modemmanager's git repository (master branch). Also remove one Telit patch from the bbappend because it's already included in the git repo. https://jira.digi.com/browse/DEL-3841 Signed-off-by: Javier Viguera --- ...igure.ac-add-foreign-automake-option.patch | 25 +++ ...ck-unlock-CSIM-operations-by-default.patch | 144 ------------------ .../modemmanager/modemmanager_%.bbappend | 1 - .../modemmanager/modemmanager_git.bb | 44 ++++++ 4 files changed, 69 insertions(+), 145 deletions(-) create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-configure.ac-add-foreign-automake-option.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-telit-lock-unlock-CSIM-operations-by-default.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-configure.ac-add-foreign-automake-option.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-configure.ac-add-foreign-automake-option.patch new file mode 100644 index 000000000..f9df8b367 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-configure.ac-add-foreign-automake-option.patch @@ -0,0 +1,25 @@ +From: Javier Viguera +Date: Thu, 6 Apr 2017 11:17:46 +0200 +Subject: [PATCH] configure.ac: add foreign automake option + +Needed to build the repository directly in Yocto, so the missing +autotools files are generated. + +Signed-off-by: Javier Viguera +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c8a35d1b1a3f..24ed761d8e42 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,7 +26,7 @@ dnl----------------------------------------------------------------------------- + dnl autoconf, automake, libtool initialization + dnl + AC_INIT([ModemManager],[mm_version],[modemmanager-devel@lists.freedesktop.org],[ModemManager]) +-AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability]) ++AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability]) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + + AM_MAINTAINER_MODE([enable]) diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-telit-lock-unlock-CSIM-operations-by-default.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-telit-lock-unlock-CSIM-operations-by-default.patch deleted file mode 100644 index 07a55dbe2..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0001-telit-lock-unlock-CSIM-operations-by-default.patch +++ /dev/null @@ -1,144 +0,0 @@ -From: Aleksander Morgado -Date: Wed, 15 Mar 2017 00:03:35 +0100 -Subject: [PATCH] telit: lock/unlock CSIM operations by default - -Wrap the AT+CSIM=XX commands between lock (CSIM=1) and -unlock (CSIM=0) operations. - -This seems to avoid the TTY lockup seen in several different Telit -modules. - -https://bugs.freedesktop.org/show_bug.cgi?id=100205 - -Reported-by: Penalva, Salvador -(cherry picked from commit 9384817a14c8706909f619e773a76edd65a0fdef) ---- - plugins/telit/mm-broadband-modem-telit.c | 69 +++++++++++++++++++++++++++++++- - 1 file changed, 68 insertions(+), 1 deletion(-) - -diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c -index 8baf2cf..264dd58 100644 ---- a/plugins/telit/mm-broadband-modem-telit.c -+++ b/plugins/telit/mm-broadband-modem-telit.c -@@ -278,8 +278,17 @@ modem_load_supported_bands (MMIfaceModem *self, - } - - /*****************************************************************************/ --/* Load unlock retries (Modem interface) */ -+/* Load unlock retries (Modem interface) -+ * -+ * NOTE: the logic must make sure that LOAD_UNLOCK_RETRIES_STEP_UNLOCK is always -+ * run if LOAD_UNLOCK_RETRIES_STEP_LOCK has been run. Currently, the logic just -+ * runs all intermediate steps ignoring errors (i.e. not completing the -+ * operation if something fails), so the LOAD_UNLOCK_RETRIES_STEP_UNLOCK is -+ * always run. -+ */ - -+#define CSIM_LOCK_STR "+CSIM=1" -+#define CSIM_UNLOCK_STR "+CSIM=0" - #define CSIM_QUERY_PIN_RETRIES_STR "+CSIM=10,0020000100" - #define CSIM_QUERY_PUK_RETRIES_STR "+CSIM=10,002C000100" - #define CSIM_QUERY_PIN2_RETRIES_STR "+CSIM=10,0020008100" -@@ -288,10 +297,12 @@ modem_load_supported_bands (MMIfaceModem *self, - - typedef enum { - LOAD_UNLOCK_RETRIES_STEP_FIRST, -+ LOAD_UNLOCK_RETRIES_STEP_LOCK, - LOAD_UNLOCK_RETRIES_STEP_PIN, - LOAD_UNLOCK_RETRIES_STEP_PUK, - LOAD_UNLOCK_RETRIES_STEP_PIN2, - LOAD_UNLOCK_RETRIES_STEP_PUK2, -+ LOAD_UNLOCK_RETRIES_STEP_UNLOCK, - LOAD_UNLOCK_RETRIES_STEP_LAST - } LoadUnlockRetriesStep; - -@@ -328,6 +339,25 @@ modem_load_unlock_retries_finish (MMIfaceModem *self, - } - - static void -+csim_unlock_ready (MMBaseModem *self, -+ GAsyncResult *res, -+ LoadUnlockRetriesContext *ctx) -+{ -+ const gchar *response; -+ GError *error = NULL; -+ -+ /* Ignore errors */ -+ response = mm_base_modem_at_command_finish (self, res, &error); -+ if (!response) { -+ mm_warn ("Couldn't unlock SIM card: %s", error->message); -+ g_error_free (error); -+ } -+ -+ ctx->step++; -+ load_unlock_retries_step (ctx); -+} -+ -+static void - csim_query_ready (MMBaseModem *self, - GAsyncResult *res, - LoadUnlockRetriesContext *ctx) -@@ -370,6 +400,7 @@ csim_query_ready (MMBaseModem *self, - mm_unlock_retries_set (ctx->retries, MM_MODEM_LOCK_SIM_PUK2, unlock_retries); - break; - default: -+ g_assert_not_reached (); - break; - } - -@@ -379,12 +410,40 @@ next_step: - } - - static void -+csim_lock_ready (MMBaseModem *self, -+ GAsyncResult *res, -+ LoadUnlockRetriesContext *ctx) -+{ -+ const gchar *response; -+ GError *error = NULL; -+ -+ response = mm_base_modem_at_command_finish (self, res, &error); -+ if (!response) { -+ g_prefix_error (&error, "Couldn't lock SIM card: "); -+ g_simple_async_result_take_error (ctx->result, error); -+ load_unlock_retries_context_complete_and_free (ctx); -+ return; -+ } -+ -+ ctx->step++; -+ load_unlock_retries_step (ctx); -+} -+ -+static void - load_unlock_retries_step (LoadUnlockRetriesContext *ctx) - { - switch (ctx->step) { - case LOAD_UNLOCK_RETRIES_STEP_FIRST: - /* Fall back on next step */ - ctx->step++; -+ case LOAD_UNLOCK_RETRIES_STEP_LOCK: -+ mm_base_modem_at_command (MM_BASE_MODEM (ctx->self), -+ CSIM_LOCK_STR, -+ CSIM_QUERY_TIMEOUT, -+ FALSE, -+ (GAsyncReadyCallback) csim_lock_ready, -+ ctx); -+ break; - case LOAD_UNLOCK_RETRIES_STEP_PIN: - mm_base_modem_at_command (MM_BASE_MODEM (ctx->self), - CSIM_QUERY_PIN_RETRIES_STR, -@@ -417,6 +476,14 @@ load_unlock_retries_step (LoadUnlockRetriesContext *ctx) - (GAsyncReadyCallback) csim_query_ready, - ctx); - break; -+ case LOAD_UNLOCK_RETRIES_STEP_UNLOCK: -+ mm_base_modem_at_command (MM_BASE_MODEM (ctx->self), -+ CSIM_UNLOCK_STR, -+ CSIM_QUERY_TIMEOUT, -+ FALSE, -+ (GAsyncReadyCallback) csim_unlock_ready, -+ ctx); -+ break; - case LOAD_UNLOCK_RETRIES_STEP_LAST: - if (ctx->succeded_requests == 0) { - g_simple_async_result_set_error (ctx->result, diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend index 4b9ab0d6c..c8019ea83 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend @@ -4,7 +4,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI += " \ file://cellularifupdown \ - file://0001-telit-lock-unlock-CSIM-operations-by-default.patch \ " # 'polkit' depends on 'consolekit', and this requires 'x11' distro feature. So diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb new file mode 100644 index 000000000..0ed4553a1 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -0,0 +1,44 @@ +SUMMARY = "ModemManager is a daemon controlling broadband devices/connections" +DESCRIPTION = "ModemManager is a DBus-activated daemon which controls mobile \ +broadband (2G/3G/4G) devices and connections" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ModemManager/" +LICENSE = "GPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = "dbus-glib glib-2.0 intltool-native libgudev" + +PV = "1.7.0+git${SRCPV}" + +SRC_URI = " \ + git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ + file://0001-configure.ac-add-foreign-automake-option.patch \ +" +SRCREV = "34443289d97da5c95270c6071d140f4567047624" + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "mbim qmi polkit \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ +" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,," +PACKAGECONFIG[polkit] = "--with-polkit=yes,--with-polkit=no,polkit" +PACKAGECONFIG[mbim] = "--with-mbim,--enable-mbim=no,libmbim" +PACKAGECONFIG[qmi] = "--with-qmi,--without-qmi,libqmi" + +inherit autotools bash-completion gettext gobject-introspection gtk-doc pkgconfig systemd vala + +FILES_${PN} += " \ + ${datadir}/icons \ + ${datadir}/polkit-1 \ + ${datadir}/dbus-1 \ + ${libdir}/ModemManager \ + ${systemd_unitdir}/system \ +" +FILES_${PN}-dev += "${libdir}/ModemManager/*.la" +FILES_${PN}-staticdev += "${libdir}/ModemManager/*.a" +FILES_${PN}-dbg += "${libdir}/ModemManager/.debug" + +SYSTEMD_SERVICE_${PN} = "ModemManager.service" From f67e7e949bd1f82a836a2c3179e18d0aa6d38838 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 5 Apr 2017 14:06:06 +0200 Subject: [PATCH 13/45] modemmanager: add udev rules for XBee cellular These rules are needed so the modem is detected. https://jira.digi.com/browse/DEL-3841 Signed-off-by: Javier Viguera --- .../modemmanager/78-mm-digi-xbee-cellular.rules | 12 ++++++++++++ .../modemmanager/modemmanager_%.bbappend | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/78-mm-digi-xbee-cellular.rules diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/78-mm-digi-xbee-cellular.rules b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/78-mm-digi-xbee-cellular.rules new file mode 100644 index 000000000..9fc89ca41 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/78-mm-digi-xbee-cellular.rules @@ -0,0 +1,12 @@ +ACTION!="add|change|move", GOTO="mm_digi_xbee_cellular_modem_end" + +# By default, ModemManager expects a default baudrate of 57600bps. Different +# baudrates may be used by setting the ID_MM_TTY_BAUDRATE udev tag. + +# ConnectCore 6 SBC +DEVPATH=="/devices/soc0/soc.0/2100000.aips-bus/21f4000.serial/tty/ttymxc4", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1" + +# ConnectCore 6UL SBC Pro +DEVPATH=="/devices/platform/soc/2100000.aips-bus/21e8000.serial/tty/ttymxc1", ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1" + +LABEL="mm_digi_xbee_cellular_modem_end" diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend index c8019ea83..1a67116d7 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_%.bbappend @@ -4,6 +4,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI += " \ file://cellularifupdown \ + file://78-mm-digi-xbee-cellular.rules \ " # 'polkit' depends on 'consolekit', and this requires 'x11' distro feature. So @@ -16,4 +17,8 @@ do_install_append() { install -d ${D}${sysconfdir}/network/if-pre-up.d/ ${D}${sysconfdir}/network/if-post-down.d/ install -m 0755 ${WORKDIR}/cellularifupdown ${D}${sysconfdir}/network/if-pre-up.d/ ln -sf ../if-pre-up.d/cellularifupdown ${D}${sysconfdir}/network/if-post-down.d/cellularifupdown + + # Install udev rules for XBee cellular + install -d ${D}${nonarch_base_libdir}/udev/rules.d + install -m 0644 ${WORKDIR}/78-mm-digi-xbee-cellular.rules ${D}${nonarch_base_libdir}/udev/rules.d/ } From a7c51af5b81b794b553a18ae516fb2026fecf5ba Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 6 Apr 2017 15:14:45 +0200 Subject: [PATCH 14/45] modemmanager: add flow control patch series https://jira.digi.com/browse/DEL-3841 Signed-off-by: Javier Viguera --- .../0002-helpers-new-parser-for-AT-IFC.patch | 290 ++++++++++++++++++ ...query-supported-flow-control-modes-b.patch | 113 +++++++ ...-ignore-custom-flow-control-handling.patch | 55 ++++ ...-ignore-custom-flow-control-handling.patch | 76 +++++ ...new-internal-method-to-run-tcsetattr.patch | 167 ++++++++++ ...method-to-explicitly-set-flow-contro.patch | 92 ++++++ ...ve-all-default-flow-control-settings.patch | 118 +++++++ ...-once-connected-set-flow-control-set.patch | 211 +++++++++++++ .../modemmanager/modemmanager_git.bb | 8 + 9 files changed, 1130 insertions(+) create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch new file mode 100644 index 000000000..d213da5db --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch @@ -0,0 +1,290 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 00:47:50 +0100 +Subject: [PATCH] =?UTF-8?q?helpers:=20new=20parser=20for=20AT+IFC=3D=3F?= + +Instead of having the parser return separate list of supported flow +controls for TE and TA, we simplify it by only returning those +settings that apply to both TE and TA. + +This logic isn't perfect either, though, as some settings (e.g. '3' in +TE in some modems, specifying a different XON/XOFF behavior) may not +have a corresponding setting in the other end. + +The most common cases we care about (i.e. standard XON/XOFF, RTS/CTS) +should be properly reported with this logic. +--- + src/mm-modem-helpers.c | 113 +++++++++++++++++++++++++++++++++++++++++ + src/mm-modem-helpers.h | 17 +++++++ + src/tests/test-modem-helpers.c | 100 ++++++++++++++++++++++++++++++++++++ + 3 files changed, 230 insertions(+) + +diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c +index b45561768077..679f925281a3 100644 +--- a/src/mm-modem-helpers.c ++++ b/src/mm-modem-helpers.c +@@ -525,6 +525,119 @@ mm_voice_clip_regex_get (void) + + /*************************************************************************/ + ++static MMFlowControl ++flow_control_array_to_mask (GArray *array, ++ const gchar *item) ++{ ++ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; ++ guint i; ++ ++ for (i = 0; i < array->len; i++) { ++ guint mode; ++ ++ mode = g_array_index (array, guint, i); ++ switch (mode) { ++ case 0: ++ mm_dbg ("%s supports no flow control", item); ++ mask |= MM_FLOW_CONTROL_NONE; ++ break; ++ case 1: ++ mm_dbg ("%s supports XON/XOFF flow control", item); ++ mask |= MM_FLOW_CONTROL_XON_XOFF; ++ break; ++ case 2: ++ mm_dbg ("%s supports RTS/CTS flow control", item); ++ mask |= MM_FLOW_CONTROL_RTS_CTS; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ return mask; ++} ++ ++static MMFlowControl ++flow_control_match_info_to_mask (GMatchInfo *match_info, ++ guint index, ++ const gchar *item, ++ GError **error) ++{ ++ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; ++ gchar *aux = NULL; ++ GArray *array = NULL; ++ ++ if (!(aux = mm_get_string_unquoted_from_match_info (match_info, index))) { ++ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "Error retrieving list of supported %s flow control methods", item); ++ goto out; ++ } ++ ++ if (!(array = mm_parse_uint_list (aux, error))) { ++ g_prefix_error (error, "Error parsing list of supported %s flow control methods: ", item); ++ goto out; ++ } ++ ++ if ((mask = flow_control_array_to_mask (array, item)) == MM_FLOW_CONTROL_UNKNOWN) { ++ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "No known %s flow control method given", item); ++ goto out; ++ } ++ ++out: ++ g_clear_pointer (&aux, g_free); ++ g_clear_pointer (&array, g_array_unref); ++ ++ return mask; ++} ++ ++MMFlowControl ++mm_parse_ifc_test_response (const gchar *response, ++ GError **error) ++{ ++ GRegex *r; ++ GError *inner_error = NULL; ++ GMatchInfo *match_info = NULL; ++ MMFlowControl te_mask = MM_FLOW_CONTROL_UNKNOWN; ++ MMFlowControl ta_mask = MM_FLOW_CONTROL_UNKNOWN; ++ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; ++ ++ r = g_regex_new ("(?:\\+IFC:)?\\s*\\((.*)\\),\\((.*)\\)(?:\\r\\n)?", 0, 0, NULL); ++ g_assert (r != NULL); ++ ++ g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &inner_error); ++ if (inner_error) ++ goto out; ++ ++ if (!g_match_info_matches (match_info)) { ++ inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Couldn't match response"); ++ goto out; ++ } ++ ++ /* Parse TE flow control methods */ ++ if ((te_mask = flow_control_match_info_to_mask (match_info, 1, "TE", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) ++ goto out; ++ ++ /* Parse TA flow control methods */ ++ if ((ta_mask = flow_control_match_info_to_mask (match_info, 2, "TA", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) ++ goto out; ++ ++ /* Only those methods in both TA and TE will be the ones we report */ ++ mask = te_mask & ta_mask; ++ ++out: ++ ++ g_clear_pointer (&match_info, g_match_info_free); ++ g_regex_unref (r); ++ ++ if (inner_error) ++ g_propagate_error (error, inner_error); ++ ++ return mask; ++} ++ ++/*************************************************************************/ ++ + /* +CREG: (GSM 07.07 CREG=1 unsolicited) */ + #define CREG1 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])" + +diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h +index a74924e353ad..bd10b940d1a4 100644 +--- a/src/mm-modem-helpers.h ++++ b/src/mm-modem-helpers.h +@@ -95,6 +95,23 @@ GRegex *mm_voice_cring_regex_get(void); + GRegex *mm_voice_clip_regex_get (void); + + /*****************************************************************************/ ++/* SERIAL specific helpers and utilities */ ++ ++/* AT+IFC=? response parser. ++ * For simplicity, we'll only consider flow control methods available in both ++ * TE and TA. */ ++ ++typedef enum { ++ MM_FLOW_CONTROL_UNKNOWN = 0, ++ MM_FLOW_CONTROL_NONE = 1 << 0, /* IFC=0,0 */ ++ MM_FLOW_CONTROL_XON_XOFF = 1 << 1, /* IFC=1,1 */ ++ MM_FLOW_CONTROL_RTS_CTS = 1 << 2, /* IFC=2,2 */ ++} MMFlowControl; ++ ++MMFlowControl mm_parse_ifc_test_response (const gchar *response, ++ GError **error); ++ ++/*****************************************************************************/ + /* 3GPP specific helpers and utilities */ + /*****************************************************************************/ + +diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c +index ae0eec99f969..b59c5900a832 100644 +--- a/src/tests/test-modem-helpers.c ++++ b/src/tests/test-modem-helpers.c +@@ -33,6 +33,93 @@ + g_assert_cmpfloat (fabs (val1 - val2), <, tolerance) + + /*****************************************************************************/ ++/* Test IFC=? responses */ ++ ++static void ++test_ifc_response (const gchar *str, ++ const MMFlowControl expected) ++{ ++ MMFlowControl mask; ++ GError *error = NULL; ++ ++ mask = mm_parse_ifc_test_response (str, &error); ++ g_assert_no_error (error); ++ g_assert_cmpuint (mask, ==, expected); ++} ++ ++static void ++test_ifc_response_all_simple (void) ++{ ++ test_ifc_response ("+IFC (0,1,2),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_all_groups (void) ++{ ++ test_ifc_response ("+IFC (0-2),(0-2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_none_only (void) ++{ ++ test_ifc_response ("+IFC (0),(0)", MM_FLOW_CONTROL_NONE); ++} ++ ++static void ++test_ifc_response_xon_xoff_only (void) ++{ ++ test_ifc_response ("+IFC (1),(1)", MM_FLOW_CONTROL_XON_XOFF); ++} ++ ++static void ++test_ifc_response_rts_cts_only (void) ++{ ++ test_ifc_response ("+IFC (2),(2)", MM_FLOW_CONTROL_RTS_CTS); ++} ++ ++static void ++test_ifc_response_no_xon_xoff (void) ++{ ++ test_ifc_response ("+IFC (0,2),(0,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_no_xon_xoff_in_ta (void) ++{ ++ test_ifc_response ("+IFC (0,1,2),(0,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_no_xon_xoff_in_te (void) ++{ ++ test_ifc_response ("+IFC (0,2),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_no_rts_cts_simple (void) ++{ ++ test_ifc_response ("+IFC (0,1),(0,1)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF)); ++} ++ ++static void ++test_ifc_response_no_rts_cts_groups (void) ++{ ++ test_ifc_response ("+IFC (0-1),(0-1)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF)); ++} ++ ++static void ++test_ifc_response_all_simple_and_unknown (void) ++{ ++ test_ifc_response ("+IFC (0,1,2,3),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++static void ++test_ifc_response_all_groups_and_unknown (void) ++{ ++ test_ifc_response ("+IFC (0-3),(0-2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); ++} ++ ++/*****************************************************************************/ + /* Test WS46=? responses */ + + static void +@@ -3536,6 +3623,19 @@ int main (int argc, char **argv) + suite = g_test_get_root (); + reg_data = reg_test_data_new (); + ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_simple, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_groups, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_none_only, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_xon_xoff_only, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_rts_cts_only, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff_in_ta, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff_in_te, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_rts_cts_simple, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_rts_cts_groups, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_simple_and_unknown, NULL)); ++ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_groups_and_unknown, NULL)); ++ + g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g4g, NULL)); + g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g, NULL)); + g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g_v2, NULL)); diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch new file mode 100644 index 000000000..9250ab595 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch @@ -0,0 +1,113 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 01:11:45 +0100 +Subject: [PATCH] broadband-modem: query supported flow control modes before + setting + +Instead of assuming XON/XOFF is supported, we query the supported flow +control modes, and then we set the best one based on that, preferring +hardware flow control over software flow control. +--- + src/mm-broadband-modem.c | 79 ++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 60 insertions(+), 19 deletions(-) + +diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c +index 97a268a2eb81..e5ad354882bb 100644 +--- a/src/mm-broadband-modem.c ++++ b/src/mm-broadband-modem.c +@@ -3093,12 +3093,59 @@ modem_load_supported_charsets (MMIfaceModem *self, + /* configuring flow control (Modem interface) */ + + static gboolean +-modem_setup_flow_control_finish (MMIfaceModem *self, +- GAsyncResult *res, +- GError **error) ++modem_setup_flow_control_finish (MMIfaceModem *self, ++ GAsyncResult *res, ++ GError **error) + { +- /* Completely ignore errors */ +- return TRUE; ++ return g_task_propagate_boolean (G_TASK (res), error); ++} ++ ++static void ++ifc_test_ready (MMBaseModem *self, ++ GAsyncResult *res, ++ GTask *task) ++{ ++ GError *error = NULL; ++ const gchar *response; ++ MMFlowControl mask; ++ const gchar *cmd; ++ ++ /* Completely ignore errors in AT+IFC=? */ ++ response = mm_base_modem_at_command_finish (self, res, &error); ++ if (!response) ++ goto out; ++ ++ /* Parse response */ ++ mask = mm_parse_ifc_test_response (response, &error); ++ if (mask == MM_FLOW_CONTROL_UNKNOWN) ++ goto out; ++ ++ /* We prefer the methods in this order: ++ * RTS/CTS ++ * XON/XOFF ++ * None. ++ */ ++ if (mask & MM_FLOW_CONTROL_RTS_CTS) ++ cmd = "+IFC=2,2"; ++ else if (mask & MM_FLOW_CONTROL_XON_XOFF) ++ cmd = "+IFC=1,1"; ++ else if (mask & MM_FLOW_CONTROL_NONE) ++ cmd = "+IFC=0,0"; ++ else ++ g_assert_not_reached (); ++ ++ /* Set flow control settings and ignore result */ ++ mm_base_modem_at_command (self, cmd, 3, FALSE, NULL, NULL); ++ ++out: ++ /* Ignore errors */ ++ if (error) { ++ mm_dbg ("couldn't load supported flow control methods: %s", error->message); ++ g_error_free (error); ++ } ++ ++ g_task_return_boolean (task, TRUE); ++ g_object_unref (task); + } + + static void +@@ -3106,23 +3153,17 @@ modem_setup_flow_control (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) + { +- GSimpleAsyncResult *result; ++ GTask *task; ++ ++ task = g_task_new (self, NULL, callback, user_data); + +- /* By default, try to set XOFF/XON flow control */ ++ /* Query supported flow control methods */ + mm_base_modem_at_command (MM_BASE_MODEM (self), +- "+IFC=1,1", ++ "+IFC=?", + 3, +- FALSE, +- NULL, +- NULL); +- +- result = g_simple_async_result_new (G_OBJECT (self), +- callback, +- user_data, +- modem_setup_flow_control); +- g_simple_async_result_set_op_res_gboolean (result, TRUE); +- g_simple_async_result_complete_in_idle (result); +- g_object_unref (result); ++ TRUE, ++ (GAsyncReadyCallback)ifc_test_ready, ++ task); + } + + /*****************************************************************************/ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch new file mode 100644 index 000000000..732de7716 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch @@ -0,0 +1,55 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 01:14:45 +0100 +Subject: [PATCH] wavecom: ignore custom flow control handling + +The generic modem object already supports querying for the supported +methods and setting the best one found. +--- + plugins/wavecom/mm-broadband-modem-wavecom.c | 27 --------------------------- + 1 file changed, 27 deletions(-) + +diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.c b/plugins/wavecom/mm-broadband-modem-wavecom.c +index 47c6b4f040a0..0e93e47ec701 100644 +--- a/plugins/wavecom/mm-broadband-modem-wavecom.c ++++ b/plugins/wavecom/mm-broadband-modem-wavecom.c +@@ -1242,31 +1242,6 @@ modem_after_sim_unlock (MMIfaceModem *self, + } + + /*****************************************************************************/ +-/* Flow control (Modem interface) */ +- +-static gboolean +-setup_flow_control_finish (MMIfaceModem *self, +- GAsyncResult *res, +- GError **error) +-{ +- return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error); +-} +- +-static void +-setup_flow_control (MMIfaceModem *self, +- GAsyncReadyCallback callback, +- gpointer user_data) +-{ +- /* Wavecom doesn't have XOFF/XON flow control, so we enable RTS/CTS */ +- mm_base_modem_at_command (MM_BASE_MODEM (self), +- "+IFC=2,2", +- 3, +- FALSE, +- callback, +- user_data); +-} +- +-/*****************************************************************************/ + /* Modem power up (Modem interface) */ + + static gboolean +@@ -1420,8 +1395,6 @@ iface_modem_init (MMIfaceModem *iface) + iface->load_access_technologies_finish = load_access_technologies_finish; + iface->modem_after_sim_unlock = modem_after_sim_unlock; + iface->modem_after_sim_unlock_finish = modem_after_sim_unlock_finish; +- iface->setup_flow_control = setup_flow_control; +- iface->setup_flow_control_finish = setup_flow_control_finish; + iface->modem_power_up = modem_power_up; + iface->modem_power_up_finish = modem_power_up_finish; + iface->modem_power_down = modem_power_down; diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch new file mode 100644 index 000000000..deb6ccca4 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch @@ -0,0 +1,76 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 01:16:25 +0100 +Subject: [PATCH] telit: ignore custom flow control handling + +The generic modem object already supports querying for the supported +methods and setting the best one found. +--- + plugins/telit/mm-broadband-modem-telit.c | 48 -------------------------------- + 1 file changed, 48 deletions(-) + +diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c +index 8b8731062966..cce02298352b 100644 +--- a/plugins/telit/mm-broadband-modem-telit.c ++++ b/plugins/telit/mm-broadband-modem-telit.c +@@ -885,52 +885,6 @@ load_access_technologies (MMIfaceModem *self, + } + + /*****************************************************************************/ +-/* Flow control (Modem interface) */ +- +-static gboolean +-setup_flow_control_finish (MMIfaceModem *self, +- GAsyncResult *res, +- GError **error) +-{ +- /* Completely ignore errors */ +- return TRUE; +-} +- +-static void +-setup_flow_control (MMIfaceModem *self, +- GAsyncReadyCallback callback, +- gpointer user_data) +-{ +- GSimpleAsyncResult *result; +- gchar *cmd; +- guint flow_control = 1; /* Default flow control: XON/XOFF */ +- +- switch (mm_base_modem_get_product_id (MM_BASE_MODEM (self)) & 0xFFFF) { +- case 0x0021: +- flow_control = 2; /* Telit IMC modems support only RTS/CTS mode */ +- break; +- default: +- break; +- } +- +- cmd = g_strdup_printf ("+IFC=%u,%u", flow_control, flow_control); +- mm_base_modem_at_command (MM_BASE_MODEM (self), +- cmd, +- 3, +- FALSE, +- NULL, +- NULL); +- result = g_simple_async_result_new (G_OBJECT (self), +- callback, +- user_data, +- setup_flow_control); +- g_simple_async_result_set_op_res_gboolean (result, TRUE); +- g_simple_async_result_complete_in_idle (result); +- g_object_unref (result); +- g_free (cmd); +-} +- +-/*****************************************************************************/ + /* Load current mode (Modem interface) */ + + static gboolean +@@ -1287,8 +1241,6 @@ iface_modem_init (MMIfaceModem *iface) + iface->modem_power_down_finish = modem_power_down_finish; + iface->load_access_technologies = load_access_technologies; + iface->load_access_technologies_finish = load_access_technologies_finish; +- iface->setup_flow_control = setup_flow_control; +- iface->setup_flow_control_finish = setup_flow_control_finish; + iface->load_supported_modes = load_supported_modes; + iface->load_supported_modes_finish = load_supported_modes_finish; + iface->load_current_modes = load_current_modes; diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch new file mode 100644 index 000000000..c3fa9c7ad --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch @@ -0,0 +1,167 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 18:17:41 +0100 +Subject: [PATCH] port-serial: new internal method to run tcsetattr() + +The method takes care of looping if EAGAIN errors happen, as well as +checking whether all attributes were set or not. +--- + src/mm-port-serial.c | 119 ++++++++++++++++++++++++--------------------------- + 1 file changed, 57 insertions(+), 62 deletions(-) + +diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c +index 2b6b92d3d1da..f2b97a02486d 100644 +--- a/src/mm-port-serial.c ++++ b/src/mm-port-serial.c +@@ -347,9 +347,62 @@ parse_stopbits (guint i) + } + + static gboolean ++internal_tcsetattr (MMPortSerial *self, ++ gint fd, ++ const struct termios *options, ++ GError **error) ++{ ++ guint count; ++ struct termios other; ++ ++#define MAX_TCSETATTR_RETRIES 4 ++ ++ for (count = 0; count < MAX_TCSETATTR_RETRIES; count++) { ++ /* try to set the new port attributes */ ++ errno = 0; ++ if (tcsetattr (fd, TCSANOW, options) == 0) ++ break; ++ ++ /* hard error if not EAGAIN */ ++ if (errno != EAGAIN) { ++ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "couldn't set serial port attributes: %s", g_strerror (errno)); ++ return FALSE; ++ } ++ ++ /* try a few times if EAGAIN */ ++ g_usleep (100000); ++ } ++ ++ /* too many retries? */ ++ if (count == MAX_TCSETATTR_RETRIES) { ++ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "couldn't set serial port attributes: too many retries (%u)", count); ++ return FALSE; ++ } ++ ++ /* tcsetattr() returns 0 if any of the requested attributes could be set, ++ * so we should double-check that all were set and log if not. Just with ++ * debug level, as we're ignoring this issue all together anyway. ++ */ ++ memset (&other, 0, sizeof (struct termios)); ++ errno = 0; ++ if (tcgetattr (fd, &other) != 0) ++ mm_dbg ("(%s): couldn't get serial port attributes after setting them: %s", ++ mm_port_get_device (MM_PORT (self)), g_strerror (errno)); ++ else if (memcmp (options, &other, sizeof (struct termios)) != 0) ++ mm_dbg ("(%s): port attributes not fully set", ++ mm_port_get_device (MM_PORT (self))); ++ ++#undef MAX_TCSETATTR_RETRIES ++ ++ return TRUE; ++} ++ ++static gboolean + real_config_fd (MMPortSerial *self, int fd, GError **error) + { +- struct termios stbuf, other; ++ struct termios stbuf; + guint speed; + gint bits; + gint parity; +@@ -416,32 +469,7 @@ real_config_fd (MMPortSerial *self, int fd, GError **error) + return FALSE; + } + +- if (tcsetattr (fd, TCSANOW, &stbuf) < 0) { +- g_set_error (error, +- MM_CORE_ERROR, +- MM_CORE_ERROR_FAILED, +- "%s: failed to set serial port attributes; errno %d", +- __func__, errno); +- return FALSE; +- } +- +- /* tcsetattr() returns 0 if any of the requested attributes could be set, +- * so we should double-check that all were set and log a warning if not. +- */ +- memset (&other, 0, sizeof (struct termios)); +- errno = 0; +- if (tcgetattr (fd, &other) != 0) { +- mm_warn ("(%s): tcgetattr() error: %d", +- mm_port_get_device (MM_PORT (self)), +- errno); +- } +- +- if (memcmp (&stbuf, &other, sizeof (other)) != 0) { +- mm_warn ("(%s): port attributes not fully set", +- mm_port_get_device (MM_PORT (self))); +- } +- +- return TRUE; ++ return internal_tcsetattr (self, fd, &stbuf, error); + } + + static void +@@ -1576,15 +1604,11 @@ static gboolean + set_speed (MMPortSerial *self, speed_t speed, GError **error) + { + struct termios options; +- int fd, count = 4; +- gboolean success = FALSE; + + g_assert (self->priv->fd >= 0); + +- fd = self->priv->fd; +- + memset (&options, 0, sizeof (struct termios)); +- if (tcgetattr (fd, &options) != 0) { ++ if (tcgetattr (self->priv->fd, &options) != 0) { + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, +@@ -1601,36 +1625,7 @@ set_speed (MMPortSerial *self, speed_t speed, GError **error) + if (self->priv->rts_cts) + options.c_cflag |= (CRTSCTS); + +- while (count-- > 0) { +- if (tcsetattr (fd, TCSANOW, &options) == 0) { +- success = TRUE; +- break; /* Operation successful */ +- } +- +- /* Try a few times if EAGAIN */ +- if (errno == EAGAIN) +- g_usleep (100000); +- else { +- /* If not EAGAIN, hard error */ +- g_set_error (error, +- MM_CORE_ERROR, +- MM_CORE_ERROR_FAILED, +- "%s: tcsetattr() error %d", +- __func__, errno); +- return FALSE; +- } +- } +- +- if (!success) { +- g_set_error (error, +- MM_CORE_ERROR, +- MM_CORE_ERROR_FAILED, +- "%s: tcsetattr() retry timeout", +- __func__); +- return FALSE; +- } +- +- return TRUE; ++ return internal_tcsetattr (self, self->priv->fd, &options, error); + } + + /*****************************************************************************/ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch new file mode 100644 index 000000000..b7226319c --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch @@ -0,0 +1,92 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 18:18:46 +0100 +Subject: [PATCH] port-serial: new method to explicitly set flow control + settings + +--- + src/mm-port-serial.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + src/mm-port-serial.h | 5 +++++ + 2 files changed, 55 insertions(+) + +diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c +index f2b97a02486d..e55f90625020 100644 +--- a/src/mm-port-serial.c ++++ b/src/mm-port-serial.c +@@ -1778,6 +1778,56 @@ mm_port_serial_flash (MMPortSerial *self, + + /*****************************************************************************/ + ++gboolean ++mm_port_serial_set_flow_control (MMPortSerial *self, ++ MMFlowControl flow_control, ++ GError **error) ++{ ++ struct termios options; ++ gboolean had_xon_xoff; ++ gboolean had_rts_cts; ++ ++ /* retrieve current settings */ ++ memset (&options, 0, sizeof (struct termios)); ++ if (tcgetattr (self->priv->fd, &options) != 0) { ++ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "couldn't get serial port attributes: %s", g_strerror (errno)); ++ return FALSE; ++ } ++ ++ /* clear all flow control flags */ ++ ++ had_xon_xoff = !!(options.c_iflag & (IXON | IXOFF)); ++ options.c_iflag &= ~(IXON | IXOFF | IXANY); ++ ++ had_rts_cts = !!(options.c_cflag & (CRTSCTS)); ++ options.c_cflag &= ~(CRTSCTS); ++ ++ /* setup the requested flags */ ++ switch (flow_control) { ++ case MM_FLOW_CONTROL_XON_XOFF: ++ mm_dbg ("(%s): enabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); ++ options.c_iflag |= (IXON | IXOFF | IXANY); ++ break; ++ case MM_FLOW_CONTROL_RTS_CTS: ++ mm_dbg ("(%s): enabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); ++ options.c_cflag |= (CRTSCTS); ++ break; ++ case MM_FLOW_CONTROL_NONE: ++ if (had_xon_xoff) ++ mm_dbg ("(%s): disabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); ++ if (had_rts_cts) ++ mm_dbg ("(%s): disabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); ++ break; ++ default: ++ g_assert_not_reached (); ++ } ++ ++ return internal_tcsetattr (self, self->priv->fd, &options, error); ++} ++ ++/*****************************************************************************/ ++ + MMPortSerial * + mm_port_serial_new (const char *name, MMPortType ptype) + { +diff --git a/src/mm-port-serial.h b/src/mm-port-serial.h +index 708e39123412..223b9ce1c4a4 100644 +--- a/src/mm-port-serial.h ++++ b/src/mm-port-serial.h +@@ -21,6 +21,7 @@ + #include + #include + ++#include "mm-modem-helpers.h" + #include "mm-port.h" + + #define MM_TYPE_PORT_SERIAL (mm_port_serial_get_type ()) +@@ -150,4 +151,8 @@ GByteArray *mm_port_serial_command_finish (MMPortSerial *self, + GAsyncResult *res, + GError **error); + ++gboolean mm_port_serial_set_flow_control (MMPortSerial *self, ++ MMFlowControl flow_control, ++ GError **error); ++ + #endif /* MM_PORT_SERIAL_H */ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch new file mode 100644 index 000000000..81afd5d9a --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch @@ -0,0 +1,118 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 18:27:09 +0100 +Subject: [PATCH] port-serial: remove all default flow control settings + +We won't set XON/XOFF by default and we won't allow setting RTS/CTS +via a property. The serial port by default starts with no flow control +configured. +--- + src/mm-port-serial.c | 34 ++++++---------------------------- + src/mm-port-serial.h | 1 - + 2 files changed, 6 insertions(+), 29 deletions(-) + +diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c +index e55f90625020..04ab17fe1675 100644 +--- a/src/mm-port-serial.c ++++ b/src/mm-port-serial.c +@@ -56,7 +56,6 @@ enum { + PROP_SEND_DELAY, + PROP_FD, + PROP_SPEW_CONTROL, +- PROP_RTS_CTS, + PROP_FLASH_OK, + + LAST_PROP +@@ -97,7 +96,6 @@ struct _MMPortSerialPrivate { + guint stopbits; + guint64 send_delay; + gboolean spew_control; +- gboolean rts_cts; + gboolean flash_ok; + + guint queue_id; +@@ -433,21 +431,19 @@ real_config_fd (MMPortSerial *self, int fd, GError **error) + errno); + } + +- stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY ); ++ stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | PARODD | CRTSCTS); ++ stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXOFF | IXANY ); + stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET); + stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL); + stbuf.c_cc[VMIN] = 1; + stbuf.c_cc[VTIME] = 0; + stbuf.c_cc[VEOF] = 1; + +- /* Use software handshaking and ignore parity/framing errors */ +- stbuf.c_iflag |= (IXON | IXOFF | IXANY | IGNPAR); ++ /* Ignore parity/framing errors */ ++ stbuf.c_iflag |= IGNPAR; + +- /* Set up port speed and serial attributes; also ignore modem control +- * lines since most drivers don't implement RTS/CTS anyway. +- */ +- stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | CRTSCTS); +- stbuf.c_cflag |= (bits | CREAD | 0 | parity | stopbits | CLOCAL); ++ /* Set up port speed and serial attributes and enable receiver in local mode */ ++ stbuf.c_cflag |= (bits | parity | stopbits | CLOCAL | CREAD); + + errno = 0; + if (cfsetispeed (&stbuf, speed) != 0) { +@@ -1621,10 +1617,6 @@ set_speed (MMPortSerial *self, speed_t speed, GError **error) + cfsetospeed (&options, speed); + options.c_cflag |= (CLOCAL | CREAD); + +- /* Configure flow control as well here */ +- if (self->priv->rts_cts) +- options.c_cflag |= (CRTSCTS); +- + return internal_tcsetattr (self, self->priv->fd, &options, error); + } + +@@ -1928,9 +1920,6 @@ set_property (GObject *object, + case PROP_SPEW_CONTROL: + self->priv->spew_control = g_value_get_boolean (value); + break; +- case PROP_RTS_CTS: +- self->priv->rts_cts = g_value_get_boolean (value); +- break; + case PROP_FLASH_OK: + self->priv->flash_ok = g_value_get_boolean (value); + break; +@@ -1970,9 +1959,6 @@ get_property (GObject *object, + case PROP_SPEW_CONTROL: + g_value_set_boolean (value, self->priv->spew_control); + break; +- case PROP_RTS_CTS: +- g_value_set_boolean (value, self->priv->rts_cts); +- break; + case PROP_FLASH_OK: + g_value_set_boolean (value, self->priv->flash_ok); + break; +@@ -2081,14 +2067,6 @@ mm_port_serial_class_init (MMPortSerialClass *klass) + G_PARAM_READWRITE)); + + g_object_class_install_property +- (object_class, PROP_RTS_CTS, +- g_param_spec_boolean (MM_PORT_SERIAL_RTS_CTS, +- "RTSCTS", +- "Enable RTS/CTS flow control", +- FALSE, +- G_PARAM_READWRITE)); +- +- g_object_class_install_property + (object_class, PROP_FLASH_OK, + g_param_spec_boolean (MM_PORT_SERIAL_FLASH_OK, + "FlashOk", +diff --git a/src/mm-port-serial.h b/src/mm-port-serial.h +index 223b9ce1c4a4..0514e3607101 100644 +--- a/src/mm-port-serial.h ++++ b/src/mm-port-serial.h +@@ -36,7 +36,6 @@ + #define MM_PORT_SERIAL_PARITY "parity" + #define MM_PORT_SERIAL_STOPBITS "stopbits" + #define MM_PORT_SERIAL_SEND_DELAY "send-delay" +-#define MM_PORT_SERIAL_RTS_CTS "rts-cts" + #define MM_PORT_SERIAL_FD "fd" /* Construct-only */ + #define MM_PORT_SERIAL_SPEW_CONTROL "spew-control" /* Construct-only */ + #define MM_PORT_SERIAL_FLASH_OK "flash-ok" /* Construct-only */ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch new file mode 100644 index 000000000..2beaaea4d --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch @@ -0,0 +1,211 @@ +From: Aleksander Morgado +Date: Sat, 25 Mar 2017 18:30:02 +0100 +Subject: [PATCH] broadband-bearer: once connected, set flow control settings + +During modem initialization we detected the flow control settings +supported by the modem, and selected the best one to use from them, +notifying it to the device via AT+IFC. The device was therefore +instructed to use that flow control setting for data transmission in +the TTY (i.e. not during AT control commands). + +The missing thing was to also configure ourselves our end of the +serial port with the same flow control settings when getting into data +mode. By doing it ourselves, we avoid requiring any explicit setting +in pppd for flow control; pppd can assume the flow control settings +are already the expected ones. + +Worth noting that all this setup is completely ignored for TTYs +exposed directly via USB. + +https://bugs.freedesktop.org/show_bug.cgi?id=100394 +--- + src/mm-broadband-bearer.c | 32 ++++++++++++++++++++++++++++++++ + src/mm-broadband-modem.c | 36 +++++++++++++++++++++++++----------- + src/mm-broadband-modem.h | 4 ++++ + 3 files changed, 61 insertions(+), 11 deletions(-) + +diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c +index 0565eee3afeb..facbc1457603 100644 +--- a/src/mm-broadband-bearer.c ++++ b/src/mm-broadband-bearer.c +@@ -259,6 +259,14 @@ dial_cdma_ready (MMBaseModem *modem, + * connect_succeeded(), we do it right away so that we stop our polling. */ + mm_port_set_connected (ctx->data, TRUE); + ++ /* Configure flow control to use while connected */ ++ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (ctx->data), ++ mm_broadband_modem_get_connected_flow_control (MM_BROADBAND_MODEM (modem)), ++ &error)) { ++ mm_warn ("Couldn't set flow control settings: %s", error->message); ++ g_clear_error (&error); ++ } ++ + /* Keep port open during connection */ + ctx->close_data_on_exit = FALSE; + +@@ -557,6 +565,8 @@ atd_ready (MMBaseModem *modem, + GAsyncResult *res, + Dial3gppContext *ctx) + { ++ GError *error = NULL; ++ + /* DO NOT check for cancellable here. If we got here without errors, the + * bearer is really connected and therefore we need to reflect that in + * the state machine. */ +@@ -576,6 +586,14 @@ atd_ready (MMBaseModem *modem, + return; + } + ++ /* Configure flow control to use while connected */ ++ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (ctx->dial_port), ++ mm_broadband_modem_get_connected_flow_control (MM_BROADBAND_MODEM (modem)), ++ &error)) { ++ mm_warn ("Couldn't set flow control settings: %s", error->message); ++ g_clear_error (&error); ++ } ++ + /* The ATD command has succeeded, and therefore the TTY is in data mode now. + * Instead of waiting for setting the port as connected later in + * connect_succeeded(), we do it right away so that we stop our polling. */ +@@ -1452,9 +1470,16 @@ data_flash_cdma_ready (MMPortSerial *data, + DetailedDisconnectContext *ctx) + { + GError *error = NULL; ++ GError *flow_control_error = NULL; + + mm_port_serial_flash_finish (data, res, &error); + ++ /* Cleanup flow control */ ++ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (data), MM_FLOW_CONTROL_NONE, &flow_control_error)) { ++ mm_dbg ("Couldn't reset flow control settings: %s", flow_control_error->message); ++ g_clear_error (&flow_control_error); ++ } ++ + /* We kept the serial port open during connection, now we close that open + * count */ + mm_port_serial_close (data); +@@ -1569,9 +1594,16 @@ data_flash_3gpp_ready (MMPortSerial *data, + DetailedDisconnectContext *ctx) + { + GError *error = NULL; ++ GError *flow_control_error = NULL; + + mm_port_serial_flash_finish (data, res, &error); + ++ /* Cleanup flow control */ ++ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (data), MM_FLOW_CONTROL_NONE, &flow_control_error)) { ++ mm_dbg ("Couldn't reset flow control settings: %s", flow_control_error->message); ++ g_clear_error (&flow_control_error); ++ } ++ + /* We kept the serial port open during connection, now we close that open + * count */ + mm_port_serial_close (data); +diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c +index e5ad354882bb..3aa6e5f37424 100644 +--- a/src/mm-broadband-modem.c ++++ b/src/mm-broadband-modem.c +@@ -146,6 +146,7 @@ struct _MMBroadbandModemPrivate { + guint modem_cind_max_signal_quality; + guint modem_cind_indicator_roaming; + guint modem_cind_indicator_service; ++ MMFlowControl modem_flow_control; + + /*<--- Modem 3GPP interface --->*/ + /* Properties */ +@@ -3101,17 +3102,20 @@ modem_setup_flow_control_finish (MMIfaceModem *self, + } + + static void +-ifc_test_ready (MMBaseModem *self, ++ifc_test_ready (MMBaseModem *_self, + GAsyncResult *res, + GTask *task) + { +- GError *error = NULL; +- const gchar *response; +- MMFlowControl mask; +- const gchar *cmd; ++ MMBroadbandModem *self; ++ GError *error = NULL; ++ const gchar *response; ++ MMFlowControl mask; ++ const gchar *cmd; ++ ++ self = MM_BROADBAND_MODEM (_self); + + /* Completely ignore errors in AT+IFC=? */ +- response = mm_base_modem_at_command_finish (self, res, &error); ++ response = mm_base_modem_at_command_finish (_self, res, &error); + if (!response) + goto out; + +@@ -3125,17 +3129,20 @@ ifc_test_ready (MMBaseModem *self, + * XON/XOFF + * None. + */ +- if (mask & MM_FLOW_CONTROL_RTS_CTS) ++ if (mask & MM_FLOW_CONTROL_RTS_CTS) { ++ self->priv->modem_flow_control = MM_FLOW_CONTROL_RTS_CTS; + cmd = "+IFC=2,2"; +- else if (mask & MM_FLOW_CONTROL_XON_XOFF) ++ } else if (mask & MM_FLOW_CONTROL_XON_XOFF) { ++ self->priv->modem_flow_control = MM_FLOW_CONTROL_XON_XOFF; + cmd = "+IFC=1,1"; +- else if (mask & MM_FLOW_CONTROL_NONE) ++ } else if (mask & MM_FLOW_CONTROL_NONE) { ++ self->priv->modem_flow_control = MM_FLOW_CONTROL_NONE; + cmd = "+IFC=0,0"; +- else ++ } else + g_assert_not_reached (); + + /* Set flow control settings and ignore result */ +- mm_base_modem_at_command (self, cmd, 3, FALSE, NULL, NULL); ++ mm_base_modem_at_command (_self, cmd, 3, FALSE, NULL, NULL); + + out: + /* Ignore errors */ +@@ -10332,6 +10339,12 @@ mm_broadband_modem_get_current_charset (MMBroadbandModem *self) + return self->priv->modem_current_charset; + } + ++MMFlowControl ++mm_broadband_modem_get_connected_flow_control (MMBroadbandModem *self) ++{ ++ return self->priv->modem_flow_control; ++} ++ + gchar * + mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, + const gchar *ati, +@@ -10652,6 +10665,7 @@ mm_broadband_modem_init (MMBroadbandModem *self) + self->priv->current_sms_mem1_storage = MM_SMS_STORAGE_UNKNOWN; + self->priv->current_sms_mem2_storage = MM_SMS_STORAGE_UNKNOWN; + self->priv->sim_hot_swap_supported = FALSE; ++ self->priv->modem_flow_control = MM_FLOW_CONTROL_NONE; + } + + static void +diff --git a/src/mm-broadband-modem.h b/src/mm-broadband-modem.h +index d6b55d9dd030..9ac4eabded65 100644 +--- a/src/mm-broadband-modem.h ++++ b/src/mm-broadband-modem.h +@@ -24,6 +24,7 @@ + + #include + ++#include "mm-modem-helpers.h" + #include "mm-charsets.h" + #include "mm-base-modem.h" + +@@ -109,6 +110,9 @@ gchar *mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem + + MMModemCharset mm_broadband_modem_get_current_charset (MMBroadbandModem *self); + ++/* Get the flow control setting to apply when connected, if any */ ++MMFlowControl mm_broadband_modem_get_connected_flow_control (MMBroadbandModem *self); ++ + /* Create a unique device identifier string using the ATI and ATI1 replies and some + * additional internal info */ + gchar *mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb index 0ed4553a1..53d576446 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -15,6 +15,14 @@ PV = "1.7.0+git${SRCPV}" SRC_URI = " \ git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ file://0001-configure.ac-add-foreign-automake-option.patch \ + file://0002-helpers-new-parser-for-AT-IFC.patch \ + file://0003-broadband-modem-query-supported-flow-control-modes-b.patch \ + file://0004-wavecom-ignore-custom-flow-control-handling.patch \ + file://0005-telit-ignore-custom-flow-control-handling.patch \ + file://0006-port-serial-new-internal-method-to-run-tcsetattr.patch \ + file://0007-port-serial-new-method-to-explicitly-set-flow-contro.patch \ + file://0008-port-serial-remove-all-default-flow-control-settings.patch \ + file://0009-broadband-bearer-once-connected-set-flow-control-set.patch \ " SRCREV = "34443289d97da5c95270c6071d140f4567047624" From 68a1940d7f9924a7bb1746fd702542b773204c96 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 10 Apr 2017 11:27:22 +0200 Subject: [PATCH 15/45] ccimx6ulstarter/sbc: select correct fdt_file for variant 0x04 Variant 0x04 has wireless and must select the '-wb' device tree. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-4100 --- .../recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/boot.txt | 2 +- .../u-boot/u-boot-dey-2015.04/ccimx6ulstarter/boot.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/boot.txt index ae259dac9..41fabd40f 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulsbc/boot.txt @@ -11,7 +11,7 @@ else # # Set device tree filename depending on the hardware variant # - if test "${module_variant}" = "0x02"; then + if test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04"; then setenv fdt_file zImage-imx6ul-ccimx6ulsbc-wb.dtb elif test "${module_variant}" = "0x03"; then setenv fdt_file zImage-imx6ul-ccimx6ulsbc.dtb diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/boot.txt b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/boot.txt index 728e6e4c7..875f453de 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/boot.txt +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-2015.04/ccimx6ulstarter/boot.txt @@ -11,7 +11,7 @@ else # # Set device tree filename depending on the hardware variant # - if test "${module_variant}" = "0x02"; then + if test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04"; then setenv fdt_file zImage-imx6ul-ccimx6ulstarter-wb.dtb elif test "${module_variant}" = "0x03"; then setenv fdt_file zImage-imx6ul-ccimx6ulstarter.dtb From 6377c0c13da33490fc4f0c81111ec8c2cf8cf612 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Tue, 11 Apr 2017 10:40:13 +0200 Subject: [PATCH 16/45] meta-digi-arm: firmware-qualcomm: Update board data files. These new US and world board data files contain new settings updated with the latest certification results including the 2 dB power reduction from DVT. md5sums: a5635e39aaaa220094e0d07f7a4f4567 bdwlan30_US.bin cabebad84a6afc1c2a7d795d31dda480 bdwlan30_World.bin https://jira.digi.com/browse/CC6UL-740 Signed-off-by: Alex Gonzalez --- .../firmware-qualcomm/bdwlan30_US.bin | Bin 8124 -> 8124 bytes .../firmware-qualcomm/bdwlan30_World.bin | Bin 8124 -> 8124 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/bdwlan30_US.bin b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm/bdwlan30_US.bin index de39f2ebdb436a719085a53fe1764a89572c2bb0..a0ada33f0edf3059c2747c4e8c39f7239c413020 100644 GIT binary patch delta 350 zcmdmEzsH_sk9>B?MwVIZZgMgzN)Rk2_HK;_!>WuWm<$mS1_%%nJJaRH(2>!C#@PIX w-Hoqai~!)^c=xV{Ax$NLa>ltVs5wZCdQ2h0B0w)g97G9&1q?Q8h)>}F0C8h%g#Z8m delta 350 zcmdmEzsH_sk9?@hMwVIZZVC!2N)Rk2_HIp=+p3Hum<$mS1_%%nJJZ$S){)VI#@PIX z-HoqaN Date: Mon, 10 Apr 2017 16:30:00 +0200 Subject: [PATCH 17/45] README: add known issue for Telit LE910 Signed-off-by: Salvador Penalva https://jira.digi.com/browse/DEL-3930 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9f2c2e1c3..ba68fc64a 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ boot a signed U-Boot only. * Cloud Connector * Remote file system management fails with long file names and paths (over 255 characters). +* Cellular modem Telit LE910-EUG + * Firmware version 17.01.522 not supported. Digi Embedded Yocto 2.2 has been tested + with FW version 17.00.523. ## Digi ConnectCore 6UL From 36d35d2ed4e7c7ab083cbbfbc6e4757e0aa2601b Mon Sep 17 00:00:00 2001 From: Alejandro Navarro Date: Mon, 10 Apr 2017 16:16:34 +0200 Subject: [PATCH 18/45] sysinfo: add new wireless configuration files We have introduced new default configuration files for wireless that do not show on sysinfo, so add them if they exist. https://jira.digi.com/browse/DEL-3974 Signed-off-by: Alejandro Navarro --- .../recipes-digi/sysinfo/sysinfo/sysinfo | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo index bc65b5ba2..0e3035f7a 100755 --- a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo +++ b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo @@ -196,8 +196,15 @@ make_report(){ else echo "[NOT FOUND] /etc/wpa_supplicant.conf" fi - echo "" + if [ -f "/etc/wpa_supplicant_p2p.conf" ]; then + echo "wpa_supplicant_p2p.conf:" + cat "/etc/wpa_supplicant_p2p.conf" + else + echo "[NOT FOUND] /etc/wpa_supplicant_p2p.conf" + fi + echo "" + hostapd -v 2>&1 echo "" if [ -f "/etc/hostapd.conf" ]; then @@ -206,6 +213,20 @@ make_report(){ else echo "[NOT FOUND] hostapd.conf" fi + echo "" + if [ -f "/etc/hostapd_wlan0.conf" ]; then + echo "hostapd_wlan0.conf:" + cat "/etc/hostapd_wlan0.conf" + else + echo "[NOT FOUND] /etc/hostapd_wlan0.conf" + fi + echo "" + if [ -f "/etc/hostapd_wlan1.conf" ]; then + echo "hostapd_wlan1.conf:" + cat "/etc/hostapd_wlan1.conf" + else + echo "[NOT FOUND] /etc/hostapd_wlan1.conf" + fi printf "\n\n" echo "--------------------------------------" From 07d11072d21e6751211e1d48a3fa70fc08ec7a59 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Tue, 11 Apr 2017 11:46:29 +0200 Subject: [PATCH 19/45] ccimx6ul_defconfig: sync defconfig with kernel Signed-off-by: Hector Palacios --- .../linux/linux-dey-4.1/ccimx6ul/defconfig | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey-4.1/ccimx6ul/defconfig b/meta-digi-arm/recipes-kernel/linux/linux-dey-4.1/ccimx6ul/defconfig index c0161eb88..165bec2c8 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey-4.1/ccimx6ul/defconfig +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey-4.1/ccimx6ul/defconfig @@ -42,7 +42,6 @@ CONFIG_ARM_IMX6Q_CPUFREQ=y CONFIG_CPU_IDLE=y CONFIG_VFP=y CONFIG_NEON=y -CONFIG_BINFMT_MISC=m CONFIG_PM_DEBUG=y CONFIG_NET=y CONFIG_PACKET=y @@ -141,8 +140,6 @@ CONFIG_USB_NET_CDC_MBIM=y # CONFIG_USB_NET_ZAURUS is not set CONFIG_USB_NET_QMI_WWAN=y CONFIG_USB_SIERRA_NET=y -CONFIG_ATH_CARDS=m -CONFIG_ATH_DEBUG=y CONFIG_HOSTAP=y CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -157,7 +154,7 @@ CONFIG_TOUCHSCREEN_FUSION_7_10=y CONFIG_TOUCHSCREEN_IMX6UL_TSC=y CONFIG_INPUT_MISC=y CONFIG_INPUT_MCA_CC6UL_PWRKEY=y -CONFIG_SERIO_SERPORT=m +# CONFIG_SERIO_SERPORT is not set # CONFIG_LEGACY_PTYS is not set # CONFIG_DEVKMEM is not set CONFIG_SERIAL_IMX=y @@ -167,8 +164,6 @@ CONFIG_FSL_OTP=y CONFIG_I2C_CHARDEV=y # CONFIG_I2C_HELPER_AUTO is not set CONFIG_I2C_ALGOBIT=y -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m CONFIG_I2C_IMX=y CONFIG_SPI=y CONFIG_SPI_GPIO=y @@ -249,7 +244,6 @@ CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_SERIAL=y CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_QUALCOMM=y CONFIG_USB_SERIAL_SIERRAWIRELESS=y CONFIG_USB_SERIAL_OPTION=y @@ -257,25 +251,9 @@ CONFIG_USB_EHSET_TEST_FIXTURE=y CONFIG_NOP_USB_XCEIV=y CONFIG_USB_MXS_PHY=y CONFIG_USB_GADGET=y -CONFIG_USB_CONFIGFS=m -CONFIG_USB_CONFIGFS_SERIAL=y -CONFIG_USB_CONFIGFS_ACM=y -CONFIG_USB_CONFIGFS_OBEX=y -CONFIG_USB_CONFIGFS_NCM=y -CONFIG_USB_CONFIGFS_ECM=y -CONFIG_USB_CONFIGFS_ECM_SUBSET=y -CONFIG_USB_CONFIGFS_RNDIS=y -CONFIG_USB_CONFIGFS_EEM=y -CONFIG_USB_CONFIGFS_MASS_STORAGE=y -CONFIG_USB_CONFIGFS_F_LB_SS=y -CONFIG_USB_CONFIGFS_F_FS=y -CONFIG_USB_ZERO=m CONFIG_USB_ETH=m -CONFIG_USB_G_NCM=m -CONFIG_USB_GADGETFS=m CONFIG_USB_MASS_STORAGE=m CONFIG_USB_G_SERIAL=m -CONFIG_USB_CDC_COMPOSITE=m CONFIG_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y @@ -326,7 +304,6 @@ CONFIG_NLS_DEFAULT="cp437" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y @@ -335,7 +312,6 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_FTRACE is not set CONFIG_CRYPTO_USER=y CONFIG_CRYPTO_NULL=y -CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_CTS=y @@ -361,9 +337,6 @@ CONFIG_CRYPTO_DEV_FSL_CAAM=y CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=m -CONFIG_CRC7=m -CONFIG_LIBCRC32C=m CONFIG_FONTS=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y From ff82ecdf87508c0fe2244d0bb9ad32d9fc45e4ac Mon Sep 17 00:00:00 2001 From: Alejandro Navarro Date: Tue, 11 Apr 2017 11:52:54 +0200 Subject: [PATCH 20/45] mca_tool: update checksums for build 1.5 Signed-off-by: Alejandro Navarro --- .../recipes-digi/mca/{mca-tool_1.3.bb => mca-tool_1.5.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta-digi-arm/recipes-digi/mca/{mca-tool_1.3.bb => mca-tool_1.5.bb} (67%) diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.3.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb similarity index 67% rename from meta-digi-arm/recipes-digi/mca/mca-tool_1.3.bb rename to meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb index fb130b91e..87f1c5229 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.3.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb @@ -7,8 +7,8 @@ LICENSE = "CLOSED" PKGNAME = "mca_tool" SRC_URI = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "d54692090bf0820e6116364822f6433f" -SRC_URI[sha256sum] = "e8267e66ba496a1e77b2dec70d6555bdeb8e06b267e776c86b9d4b01e9d13eb5" +SRC_URI[md5sum] = "510998d6d4bc8b15707dc73e4ea1c42d" +SRC_URI[sha256sum] = "79cf18bfec35fd9a779eff3ad119d03cc3ab96de8ada6ffcd63dac45a9c6308b" S = "${WORKDIR}/${PKGNAME}-${PV}" From 15214a198e9504cdb7443ce4e3d68eecf6f4c43a Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Fri, 7 Apr 2017 21:05:31 +0200 Subject: [PATCH 21/45] recovery init: check the update package before setting a key and/or formatting The recovery init checks if the configured update package exists and it is valid before setting a new key and/or formatting the rootfs partition. This change avoids getting non-booting devices after performing a firmware update with a non-existing or invalid update package. https://jira.digi.com/browse/DEL-3959 Signed-off-by: Tatiana Leon --- .../recovery-initramfs-init | 111 ++++++++++++------ 1 file changed, 72 insertions(+), 39 deletions(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index 12e68ea36..cdd11b546 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -254,21 +254,56 @@ format_emmc_block() { # # Get absolute path of update package searching in local media # -# @param ${1} - SWU package name +# @param ${1} - SWU package #------------------------------------------------------------------------------ swu_package_path() { - for i in ${UPDATE_MOUNT_DIR} $(echo ${USB_MOUNT_DIR}/*); do - echo $i | grep -qs "${USB_MOUNT_DIR}/\*" && continue - if [ -f "${i}/${1}" ]; then - swu_abspath="${i}/${1}" - break - fi - done + # Check whether the package is local and get the absolute path. + if echo "${1}" | grep -qs '^file://'; then + local pkg_name="$(basename ${1})" - if [ -n "${swu_abspath}" ]; then - echo "${swu_abspath}" + for i in ${UPDATE_MOUNT_DIR} $(echo ${USB_MOUNT_DIR}/*); do + echo $i | grep -qs "${USB_MOUNT_DIR}/\*" && continue + if [ -f "${i}/${pkg_name}" ]; then + swu_abspath="${i}/${pkg_name}" + break + fi + done + + if [ -n "${swu_abspath}" ]; then + echo "${swu_abspath}" + else + quit_with_error "Unable to find update package '${pkg_name}'" + fi else - quit_with_error "Unable to find update package '${1}'" + echo "${1}" + fi +} + +#------------------------------------------------------------------------------ +# Function - check_swu_package +# +# Check if the update package is a valid one and get its absolute path +# +# @param ${1} - SWU package +#------------------------------------------------------------------------------ +check_swu_package() { + log "Checking update package '$(basename ${1})'" + + if [ -z "${1}" ]; then + quit_with_error "Firmware update package not specified" + fi + + update_package="$(swu_package_path ${1})" + + # Check software update package. + if [ -f "${PUBLIC_KEY}" ]; then + swupdate -c -i "${update_package}" -k "${PUBLIC_KEY}" + else + swupdate -c -i "${update_package}" + fi + + if [ "$?" != "0" ]; then + quit_with_error "Invalid update package '$(basename ${1})'" fi } @@ -395,11 +430,17 @@ for arg in ${COMMAND}; do esac done +# Sanity checks. +if [ -n "${update_package_bool}" ]; then + check_swu_package "${update_package}" +fi + # Check if encryption key command is configured. if [ -n "${encryption_key_bool}" ]; then log "Trustfence encryption key setup requested (new key: ${encryption_key:-random})" psplash_message "Configuring new encryption key..." psplash_progress "0" + trustfence-tool "--newkey${encryption_key:+=${encryption_key}}" if [ "$?" = "0" ]; then psplash_progress "10" @@ -425,35 +466,27 @@ if [ -n "${update_package_bool}" ]; then log "Firmware update requested" psplash_message "Updating firmware..." psplash_progress "0" - if [ -z "${update_package}" ]; then - quit_with_error "Firmware update package not specified" + + # Format the UBI volume before updating. + if [ "$(is_nand)" = "yes" ]; then + psplash_message "Formatting rootfs partition..." + format_ubi_volume rootfs + psplash_progress "0" + fi + + log "Update package location: ${update_package}" + # Execute the progress binary. + progress -wp & + # Execute the software update. + if [ -f "${PUBLIC_KEY}" ]; then + swupdate -f "${SW_CONFIG}" -i "${update_package}" -k "${PUBLIC_KEY}" else - # Format the UBI volume before updating. - if [ "$(is_nand)" = "yes" ]; then - psplash_message "Formatting rootfs partition..." - format_ubi_volume rootfs - psplash_progress "0" - fi - - # Check whether the package is local and get the absolute path - if echo "${update_package}" | grep -qs '^file://'; then - update_package="$(swu_package_path $(basename ${update_package}))" - fi - - log "Update package location: ${update_package}" - # Execute the progress binary. - progress -wp & - # Execute the software update. - if [ -f "${PUBLIC_KEY}" ]; then - swupdate -f "${SW_CONFIG}" -i "${update_package}" -k "${PUBLIC_KEY}" - else - swupdate -f "${SW_CONFIG}" -i "${update_package}" - fi - if [ "$?" = "0" ]; then - log "Firmware update process succeed!" - else - quit_with_error "Error executing the firmware update" - fi + swupdate -f "${SW_CONFIG}" -i "${update_package}" + fi + if [ "$?" = "0" ]; then + log "Firmware update process succeed!" + else + quit_with_error "Error executing the firmware update" fi fi From b7facb3ff5f08546592d2a7958d4233d9c5905f4 Mon Sep 17 00:00:00 2001 From: Tatiana Leon Date: Tue, 11 Apr 2017 14:04:22 +0200 Subject: [PATCH 22/45] recovery init: log messages to the stderr instead of to stdout Signed-off-by: Tatiana Leon --- .../recovery/recovery-initramfs/recovery-initramfs-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init index cdd11b546..07bdf4439 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init +++ b/meta-digi-dey/recipes-core/recovery/recovery-initramfs/recovery-initramfs-init @@ -38,7 +38,7 @@ REBOOT_TIME=10 # @param ${1} - Text to print. #------------------------------------------------------------------------------ log() { - echo "[RECOVERY] ${1}" + echo "[RECOVERY] ${1}" 1>&2 } #------------------------------------------------------------------------------ From fae66340ddd83c0ec6edf657191d6b145f4003d3 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Wed, 12 Apr 2017 11:39:20 +0200 Subject: [PATCH 23/45] mca: Fix build error when binary is already-stripped. This commit fixes a build error issue for the MCA because the binary is stripped. Signed-off-by: Mike Engel --- meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb index 87f1c5229..d1c09c2be 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb @@ -1,4 +1,4 @@ -# Copyright (C) 2016 Digi International. +# Copyright (C) 2016, 2017 Digi International. SUMMARY = "MCA firmware management tool" SECTION = "console/tools" @@ -14,4 +14,6 @@ S = "${WORKDIR}/${PKGNAME}-${PV}" inherit bin_package +INSANE_SKIP_${PN} = "already-stripped" + COMPATIBLE_MACHINE = "(ccimx6ul)" From 4ba24391c297d29d38d9d5d75a828c8a6633ac00 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Tue, 11 Apr 2017 15:17:47 +0200 Subject: [PATCH 24/45] meta-digi: update revisions for dey-2.2-r1.2 Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 03d459756..67263505d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${UBOOT_GIT_URI};nobranch=1" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 8c99a86e0..92bf57387 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "5a72b2288be7f29e9ac2a4d72770bc34aaaec748" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index f70e0e122..71713ab5f 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "5a72b2288be7f29e9ac2a4d72770bc34aaaec748" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 1f7eb809e..43d0f3201 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};branch=${SRCBRANCH} \ + ${LINUX_GIT_URI};nobranch=1 \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index 6d7e0ec69..d6215f7f9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "${AUTOREV}" +SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 6819a65b9..1649cc804 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "18747e099eccc726c3abc44b7fbe537ffcce186f" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index b2a62d6db..1caa59cd0 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "${AUTOREV}" +SRCREV = "e6faff0accececaf58f4b5f1b00861d79d664795" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index df5c2d21f..9f7e98759 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "${AUTOREV}" +SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" 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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${CC_GIT_URI};nobranch=1" S = "${WORKDIR}/git" From 247df66459fe2d5720b25d65a0efd6565b1dd9f0 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Tue, 11 Apr 2017 15:20:27 +0200 Subject: [PATCH 25/45] meta-digi: revert revisions to AUTOREV Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 67263505d..03d459756 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};nobranch=1" +SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 92bf57387..8c99a86e0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "5a72b2288be7f29e9ac2a4d72770bc34aaaec748" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index 71713ab5f..f70e0e122 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "5a72b2288be7f29e9ac2a4d72770bc34aaaec748" +SRCREV = "${AUTOREV}" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 43d0f3201..1f7eb809e 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};nobranch=1 \ + ${LINUX_GIT_URI};branch=${SRCBRANCH} \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index d6215f7f9..6d7e0ec69 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" +SRCREV = "${AUTOREV}" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 1649cc804..6819a65b9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "18747e099eccc726c3abc44b7fbe537ffcce186f" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index 1caa59cd0..b2a62d6db 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "e6faff0accececaf58f4b5f1b00861d79d664795" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 9f7e98759..df5c2d21f 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" +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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};nobranch=1" +SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" S = "${WORKDIR}/git" From 2f47dfb48c299a4e1abe6854d6df43589e38830d Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Tue, 11 Apr 2017 17:02:06 +0200 Subject: [PATCH 26/45] meta-digi-arm:gpu: Add GPU memory reserved configuration. This commit adds support to read the GPU reserved memory from the DT. Signed-off-by: Mike Engel https://jira.digi.com/browse/DEL-3868 --- ...-gpu-Get-GPU-reserved-memory-from-DT.patch | 38 +++++++++++++++++++ .../kernel-module-imx-gpu-viv_%.bbappend | 3 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0003-gpu-Get-GPU-reserved-memory-from-DT.patch diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0003-gpu-Get-GPU-reserved-memory-from-DT.patch b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0003-gpu-Get-GPU-reserved-memory-from-DT.patch new file mode 100644 index 000000000..3655df14e --- /dev/null +++ b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0003-gpu-Get-GPU-reserved-memory-from-DT.patch @@ -0,0 +1,38 @@ +From: Mike Engel +Date: Tue, 11 Apr 2017 11:13:23 +0200 +Subject: [PATCH] gpu: Get GPU reserved memory from DT. + +This commit adds support to specify the GPU reserved memory in +the DT. + +Signed-off-by: Mike Engel + +https://jira.digi.com/browse/DEL-3868 +--- + .../linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c +index dc7c976..fd2dbd3 100644 +--- a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c ++++ b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c +@@ -444,7 +444,7 @@ gckPLATFORM_AdjustParam( + Args->registerMemSizeVG = res->end - res->start + 1; + } + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "contiguous_mem"); + if (res) + { +@@ -453,8 +453,6 @@ gckPLATFORM_AdjustParam( + if( Args->contiguousSize == ~0U ) + Args->contiguousSize = res->end - res->start + 1; + } +-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +- Args->contiguousBase = 0; + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) + prop = of_get_property(dn, "contiguousbase", NULL); + if(prop) + + diff --git a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend index 7e4262858..a6c6597d8 100644 --- a/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend +++ b/meta-digi-arm/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_%.bbappend @@ -1,8 +1,9 @@ -# Copyright (C) 2015 Digi International +# Copyright (C) 2015-2017 Digi International FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI += " \ file://0001-mxc-gpu-use-recommended-values-for-minimum-GPU-frequ.patch \ file://0002-Use-busfreq-imx6.h-up-to-3.15-kernel.patch \ + file://0003-gpu-Get-GPU-reserved-memory-from-DT.patch \ " From b75f48d1dc5abc5d3ab227375fa8c105097591eb Mon Sep 17 00:00:00 2001 From: "Diaz de Grenu, Jose" Date: Wed, 19 Apr 2017 10:55:41 +0200 Subject: [PATCH 27/45] sysinfo: escape wildcard Sysinfo was showing error messages if the working directory contains any file with .log extension. Signed-off-by: Diaz de Grenu, Jose --- meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo index 0e3035f7a..b45afa83f 100755 --- a/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo +++ b/meta-digi-dey/recipes-digi/sysinfo/sysinfo/sysinfo @@ -90,7 +90,7 @@ make_report(){ echo "- -" echo "--------------------------------------" echo "" - for f in $(find /var/log/ -name *.log); do + for f in $(find /var/log/ -name "*.log"); do echo "${f} FILE"; echo "---------------------------------------"; cat ${f}; From 3d45a10ead823fe813a495a262641d74b08690da Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Tue, 18 Apr 2017 10:51:41 +0200 Subject: [PATCH 28/45] Update README https://jira.digi.com/browse/DEL-3839 https://jira.digi.com/browse/DEL-1152 https://jira.digi.com/browse/DEL-3720 https://jira.digi.com/browse/DEL-4049 Signed-off-by: Alex Gonzalez --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba68fc64a..f4cef67b0 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,14 @@ Documentation is available online on the Digi documentation site: * Release based on [Yocto 2.2 (Morty)](https://www.yoctoproject.org/downloads/core/morty22) including: * New toolchain based on GCC-6.2.0 and GLIBC-2.24 * Updated Qt 5.7 - * Cellular support, including the new Quectel EC21 cellular modem + * Cellular support: + * Digi's XBee Cellular LTE Cat 1 (USA/Verizon), with P/N XBC-V1-UT-001 + * Telit's LE910 and HE910 + * Huawei's ME909u + * Quectel's EC21 + * Modified default networking settings: + * Defalt to dynamic IP addresses assignments + * Default station and softAP concurrent wireless mode * TrustFence enabled * Remote manager * Local and remote manager firmware update @@ -97,6 +104,13 @@ boot a signed U-Boot only. control. To work around this issue, UART1 of these SOM versions has been configured to operate at 115200 bps and without hardware flow control, reducing the maximum throughput of this interface. +* When using wireless concurrent mode as the wireless interface is shared + between several different functionalities performance is reduced. +* When using wireless concurrent mode Digi recommends to keep the different + modes on the same frequency channels. For example, when configuring access + point mode on channel 36 on band A, the recommendation would be to connect + to the same channel both in station mode and WiFi direct so that the radio + performance is optimized ## Digi ConnectCore 6 From 3de76b2eae99dcf866fe7c1decbdd425a73c20b2 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 19 Apr 2017 12:24:05 +0200 Subject: [PATCH 29/45] modemmanager: update revision to get flow control patches from repo The flow control patches have been merged to the master branch, so update the revision to remove those patches from our layer. This reverts commit a7c51af5b81b794b553a18ae516fb2026fecf5ba. Signed-off-by: Javier Viguera --- .../0002-helpers-new-parser-for-AT-IFC.patch | 290 ------------------ ...query-supported-flow-control-modes-b.patch | 113 ------- ...-ignore-custom-flow-control-handling.patch | 55 ---- ...-ignore-custom-flow-control-handling.patch | 76 ----- ...new-internal-method-to-run-tcsetattr.patch | 167 ---------- ...method-to-explicitly-set-flow-contro.patch | 92 ------ ...ve-all-default-flow-control-settings.patch | 118 ------- ...-once-connected-set-flow-control-set.patch | 211 ------------- .../modemmanager/modemmanager_git.bb | 10 +- 9 files changed, 1 insertion(+), 1131 deletions(-) delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch deleted file mode 100644 index d213da5db..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-helpers-new-parser-for-AT-IFC.patch +++ /dev/null @@ -1,290 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 00:47:50 +0100 -Subject: [PATCH] =?UTF-8?q?helpers:=20new=20parser=20for=20AT+IFC=3D=3F?= - -Instead of having the parser return separate list of supported flow -controls for TE and TA, we simplify it by only returning those -settings that apply to both TE and TA. - -This logic isn't perfect either, though, as some settings (e.g. '3' in -TE in some modems, specifying a different XON/XOFF behavior) may not -have a corresponding setting in the other end. - -The most common cases we care about (i.e. standard XON/XOFF, RTS/CTS) -should be properly reported with this logic. ---- - src/mm-modem-helpers.c | 113 +++++++++++++++++++++++++++++++++++++++++ - src/mm-modem-helpers.h | 17 +++++++ - src/tests/test-modem-helpers.c | 100 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 230 insertions(+) - -diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c -index b45561768077..679f925281a3 100644 ---- a/src/mm-modem-helpers.c -+++ b/src/mm-modem-helpers.c -@@ -525,6 +525,119 @@ mm_voice_clip_regex_get (void) - - /*************************************************************************/ - -+static MMFlowControl -+flow_control_array_to_mask (GArray *array, -+ const gchar *item) -+{ -+ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; -+ guint i; -+ -+ for (i = 0; i < array->len; i++) { -+ guint mode; -+ -+ mode = g_array_index (array, guint, i); -+ switch (mode) { -+ case 0: -+ mm_dbg ("%s supports no flow control", item); -+ mask |= MM_FLOW_CONTROL_NONE; -+ break; -+ case 1: -+ mm_dbg ("%s supports XON/XOFF flow control", item); -+ mask |= MM_FLOW_CONTROL_XON_XOFF; -+ break; -+ case 2: -+ mm_dbg ("%s supports RTS/CTS flow control", item); -+ mask |= MM_FLOW_CONTROL_RTS_CTS; -+ break; -+ default: -+ break; -+ } -+ } -+ -+ return mask; -+} -+ -+static MMFlowControl -+flow_control_match_info_to_mask (GMatchInfo *match_info, -+ guint index, -+ const gchar *item, -+ GError **error) -+{ -+ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; -+ gchar *aux = NULL; -+ GArray *array = NULL; -+ -+ if (!(aux = mm_get_string_unquoted_from_match_info (match_info, index))) { -+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -+ "Error retrieving list of supported %s flow control methods", item); -+ goto out; -+ } -+ -+ if (!(array = mm_parse_uint_list (aux, error))) { -+ g_prefix_error (error, "Error parsing list of supported %s flow control methods: ", item); -+ goto out; -+ } -+ -+ if ((mask = flow_control_array_to_mask (array, item)) == MM_FLOW_CONTROL_UNKNOWN) { -+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -+ "No known %s flow control method given", item); -+ goto out; -+ } -+ -+out: -+ g_clear_pointer (&aux, g_free); -+ g_clear_pointer (&array, g_array_unref); -+ -+ return mask; -+} -+ -+MMFlowControl -+mm_parse_ifc_test_response (const gchar *response, -+ GError **error) -+{ -+ GRegex *r; -+ GError *inner_error = NULL; -+ GMatchInfo *match_info = NULL; -+ MMFlowControl te_mask = MM_FLOW_CONTROL_UNKNOWN; -+ MMFlowControl ta_mask = MM_FLOW_CONTROL_UNKNOWN; -+ MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; -+ -+ r = g_regex_new ("(?:\\+IFC:)?\\s*\\((.*)\\),\\((.*)\\)(?:\\r\\n)?", 0, 0, NULL); -+ g_assert (r != NULL); -+ -+ g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &inner_error); -+ if (inner_error) -+ goto out; -+ -+ if (!g_match_info_matches (match_info)) { -+ inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Couldn't match response"); -+ goto out; -+ } -+ -+ /* Parse TE flow control methods */ -+ if ((te_mask = flow_control_match_info_to_mask (match_info, 1, "TE", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) -+ goto out; -+ -+ /* Parse TA flow control methods */ -+ if ((ta_mask = flow_control_match_info_to_mask (match_info, 2, "TA", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) -+ goto out; -+ -+ /* Only those methods in both TA and TE will be the ones we report */ -+ mask = te_mask & ta_mask; -+ -+out: -+ -+ g_clear_pointer (&match_info, g_match_info_free); -+ g_regex_unref (r); -+ -+ if (inner_error) -+ g_propagate_error (error, inner_error); -+ -+ return mask; -+} -+ -+/*************************************************************************/ -+ - /* +CREG: (GSM 07.07 CREG=1 unsolicited) */ - #define CREG1 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])" - -diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h -index a74924e353ad..bd10b940d1a4 100644 ---- a/src/mm-modem-helpers.h -+++ b/src/mm-modem-helpers.h -@@ -95,6 +95,23 @@ GRegex *mm_voice_cring_regex_get(void); - GRegex *mm_voice_clip_regex_get (void); - - /*****************************************************************************/ -+/* SERIAL specific helpers and utilities */ -+ -+/* AT+IFC=? response parser. -+ * For simplicity, we'll only consider flow control methods available in both -+ * TE and TA. */ -+ -+typedef enum { -+ MM_FLOW_CONTROL_UNKNOWN = 0, -+ MM_FLOW_CONTROL_NONE = 1 << 0, /* IFC=0,0 */ -+ MM_FLOW_CONTROL_XON_XOFF = 1 << 1, /* IFC=1,1 */ -+ MM_FLOW_CONTROL_RTS_CTS = 1 << 2, /* IFC=2,2 */ -+} MMFlowControl; -+ -+MMFlowControl mm_parse_ifc_test_response (const gchar *response, -+ GError **error); -+ -+/*****************************************************************************/ - /* 3GPP specific helpers and utilities */ - /*****************************************************************************/ - -diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c -index ae0eec99f969..b59c5900a832 100644 ---- a/src/tests/test-modem-helpers.c -+++ b/src/tests/test-modem-helpers.c -@@ -33,6 +33,93 @@ - g_assert_cmpfloat (fabs (val1 - val2), <, tolerance) - - /*****************************************************************************/ -+/* Test IFC=? responses */ -+ -+static void -+test_ifc_response (const gchar *str, -+ const MMFlowControl expected) -+{ -+ MMFlowControl mask; -+ GError *error = NULL; -+ -+ mask = mm_parse_ifc_test_response (str, &error); -+ g_assert_no_error (error); -+ g_assert_cmpuint (mask, ==, expected); -+} -+ -+static void -+test_ifc_response_all_simple (void) -+{ -+ test_ifc_response ("+IFC (0,1,2),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_all_groups (void) -+{ -+ test_ifc_response ("+IFC (0-2),(0-2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_none_only (void) -+{ -+ test_ifc_response ("+IFC (0),(0)", MM_FLOW_CONTROL_NONE); -+} -+ -+static void -+test_ifc_response_xon_xoff_only (void) -+{ -+ test_ifc_response ("+IFC (1),(1)", MM_FLOW_CONTROL_XON_XOFF); -+} -+ -+static void -+test_ifc_response_rts_cts_only (void) -+{ -+ test_ifc_response ("+IFC (2),(2)", MM_FLOW_CONTROL_RTS_CTS); -+} -+ -+static void -+test_ifc_response_no_xon_xoff (void) -+{ -+ test_ifc_response ("+IFC (0,2),(0,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_no_xon_xoff_in_ta (void) -+{ -+ test_ifc_response ("+IFC (0,1,2),(0,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_no_xon_xoff_in_te (void) -+{ -+ test_ifc_response ("+IFC (0,2),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_no_rts_cts_simple (void) -+{ -+ test_ifc_response ("+IFC (0,1),(0,1)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF)); -+} -+ -+static void -+test_ifc_response_no_rts_cts_groups (void) -+{ -+ test_ifc_response ("+IFC (0-1),(0-1)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF)); -+} -+ -+static void -+test_ifc_response_all_simple_and_unknown (void) -+{ -+ test_ifc_response ("+IFC (0,1,2,3),(0,1,2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+static void -+test_ifc_response_all_groups_and_unknown (void) -+{ -+ test_ifc_response ("+IFC (0-3),(0-2)", (MM_FLOW_CONTROL_NONE | MM_FLOW_CONTROL_XON_XOFF | MM_FLOW_CONTROL_RTS_CTS)); -+} -+ -+/*****************************************************************************/ - /* Test WS46=? responses */ - - static void -@@ -3536,6 +3623,19 @@ int main (int argc, char **argv) - suite = g_test_get_root (); - reg_data = reg_test_data_new (); - -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_simple, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_groups, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_none_only, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_xon_xoff_only, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_rts_cts_only, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff_in_ta, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_xon_xoff_in_te, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_rts_cts_simple, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_no_rts_cts_groups, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_simple_and_unknown, NULL)); -+ g_test_suite_add (suite, TESTCASE (test_ifc_response_all_groups_and_unknown, NULL)); -+ - g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g4g, NULL)); - g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g, NULL)); - g_test_suite_add (suite, TESTCASE (test_ws46_response_generic_2g3g_v2, NULL)); diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch deleted file mode 100644 index 9250ab595..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-broadband-modem-query-supported-flow-control-modes-b.patch +++ /dev/null @@ -1,113 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 01:11:45 +0100 -Subject: [PATCH] broadband-modem: query supported flow control modes before - setting - -Instead of assuming XON/XOFF is supported, we query the supported flow -control modes, and then we set the best one based on that, preferring -hardware flow control over software flow control. ---- - src/mm-broadband-modem.c | 79 ++++++++++++++++++++++++++++++++++++------------ - 1 file changed, 60 insertions(+), 19 deletions(-) - -diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c -index 97a268a2eb81..e5ad354882bb 100644 ---- a/src/mm-broadband-modem.c -+++ b/src/mm-broadband-modem.c -@@ -3093,12 +3093,59 @@ modem_load_supported_charsets (MMIfaceModem *self, - /* configuring flow control (Modem interface) */ - - static gboolean --modem_setup_flow_control_finish (MMIfaceModem *self, -- GAsyncResult *res, -- GError **error) -+modem_setup_flow_control_finish (MMIfaceModem *self, -+ GAsyncResult *res, -+ GError **error) - { -- /* Completely ignore errors */ -- return TRUE; -+ return g_task_propagate_boolean (G_TASK (res), error); -+} -+ -+static void -+ifc_test_ready (MMBaseModem *self, -+ GAsyncResult *res, -+ GTask *task) -+{ -+ GError *error = NULL; -+ const gchar *response; -+ MMFlowControl mask; -+ const gchar *cmd; -+ -+ /* Completely ignore errors in AT+IFC=? */ -+ response = mm_base_modem_at_command_finish (self, res, &error); -+ if (!response) -+ goto out; -+ -+ /* Parse response */ -+ mask = mm_parse_ifc_test_response (response, &error); -+ if (mask == MM_FLOW_CONTROL_UNKNOWN) -+ goto out; -+ -+ /* We prefer the methods in this order: -+ * RTS/CTS -+ * XON/XOFF -+ * None. -+ */ -+ if (mask & MM_FLOW_CONTROL_RTS_CTS) -+ cmd = "+IFC=2,2"; -+ else if (mask & MM_FLOW_CONTROL_XON_XOFF) -+ cmd = "+IFC=1,1"; -+ else if (mask & MM_FLOW_CONTROL_NONE) -+ cmd = "+IFC=0,0"; -+ else -+ g_assert_not_reached (); -+ -+ /* Set flow control settings and ignore result */ -+ mm_base_modem_at_command (self, cmd, 3, FALSE, NULL, NULL); -+ -+out: -+ /* Ignore errors */ -+ if (error) { -+ mm_dbg ("couldn't load supported flow control methods: %s", error->message); -+ g_error_free (error); -+ } -+ -+ g_task_return_boolean (task, TRUE); -+ g_object_unref (task); - } - - static void -@@ -3106,23 +3153,17 @@ modem_setup_flow_control (MMIfaceModem *self, - GAsyncReadyCallback callback, - gpointer user_data) - { -- GSimpleAsyncResult *result; -+ GTask *task; -+ -+ task = g_task_new (self, NULL, callback, user_data); - -- /* By default, try to set XOFF/XON flow control */ -+ /* Query supported flow control methods */ - mm_base_modem_at_command (MM_BASE_MODEM (self), -- "+IFC=1,1", -+ "+IFC=?", - 3, -- FALSE, -- NULL, -- NULL); -- -- result = g_simple_async_result_new (G_OBJECT (self), -- callback, -- user_data, -- modem_setup_flow_control); -- g_simple_async_result_set_op_res_gboolean (result, TRUE); -- g_simple_async_result_complete_in_idle (result); -- g_object_unref (result); -+ TRUE, -+ (GAsyncReadyCallback)ifc_test_ready, -+ task); - } - - /*****************************************************************************/ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch deleted file mode 100644 index 732de7716..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0004-wavecom-ignore-custom-flow-control-handling.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 01:14:45 +0100 -Subject: [PATCH] wavecom: ignore custom flow control handling - -The generic modem object already supports querying for the supported -methods and setting the best one found. ---- - plugins/wavecom/mm-broadband-modem-wavecom.c | 27 --------------------------- - 1 file changed, 27 deletions(-) - -diff --git a/plugins/wavecom/mm-broadband-modem-wavecom.c b/plugins/wavecom/mm-broadband-modem-wavecom.c -index 47c6b4f040a0..0e93e47ec701 100644 ---- a/plugins/wavecom/mm-broadband-modem-wavecom.c -+++ b/plugins/wavecom/mm-broadband-modem-wavecom.c -@@ -1242,31 +1242,6 @@ modem_after_sim_unlock (MMIfaceModem *self, - } - - /*****************************************************************************/ --/* Flow control (Modem interface) */ -- --static gboolean --setup_flow_control_finish (MMIfaceModem *self, -- GAsyncResult *res, -- GError **error) --{ -- return !!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error); --} -- --static void --setup_flow_control (MMIfaceModem *self, -- GAsyncReadyCallback callback, -- gpointer user_data) --{ -- /* Wavecom doesn't have XOFF/XON flow control, so we enable RTS/CTS */ -- mm_base_modem_at_command (MM_BASE_MODEM (self), -- "+IFC=2,2", -- 3, -- FALSE, -- callback, -- user_data); --} -- --/*****************************************************************************/ - /* Modem power up (Modem interface) */ - - static gboolean -@@ -1420,8 +1395,6 @@ iface_modem_init (MMIfaceModem *iface) - iface->load_access_technologies_finish = load_access_technologies_finish; - iface->modem_after_sim_unlock = modem_after_sim_unlock; - iface->modem_after_sim_unlock_finish = modem_after_sim_unlock_finish; -- iface->setup_flow_control = setup_flow_control; -- iface->setup_flow_control_finish = setup_flow_control_finish; - iface->modem_power_up = modem_power_up; - iface->modem_power_up_finish = modem_power_up_finish; - iface->modem_power_down = modem_power_down; diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch deleted file mode 100644 index deb6ccca4..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0005-telit-ignore-custom-flow-control-handling.patch +++ /dev/null @@ -1,76 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 01:16:25 +0100 -Subject: [PATCH] telit: ignore custom flow control handling - -The generic modem object already supports querying for the supported -methods and setting the best one found. ---- - plugins/telit/mm-broadband-modem-telit.c | 48 -------------------------------- - 1 file changed, 48 deletions(-) - -diff --git a/plugins/telit/mm-broadband-modem-telit.c b/plugins/telit/mm-broadband-modem-telit.c -index 8b8731062966..cce02298352b 100644 ---- a/plugins/telit/mm-broadband-modem-telit.c -+++ b/plugins/telit/mm-broadband-modem-telit.c -@@ -885,52 +885,6 @@ load_access_technologies (MMIfaceModem *self, - } - - /*****************************************************************************/ --/* Flow control (Modem interface) */ -- --static gboolean --setup_flow_control_finish (MMIfaceModem *self, -- GAsyncResult *res, -- GError **error) --{ -- /* Completely ignore errors */ -- return TRUE; --} -- --static void --setup_flow_control (MMIfaceModem *self, -- GAsyncReadyCallback callback, -- gpointer user_data) --{ -- GSimpleAsyncResult *result; -- gchar *cmd; -- guint flow_control = 1; /* Default flow control: XON/XOFF */ -- -- switch (mm_base_modem_get_product_id (MM_BASE_MODEM (self)) & 0xFFFF) { -- case 0x0021: -- flow_control = 2; /* Telit IMC modems support only RTS/CTS mode */ -- break; -- default: -- break; -- } -- -- cmd = g_strdup_printf ("+IFC=%u,%u", flow_control, flow_control); -- mm_base_modem_at_command (MM_BASE_MODEM (self), -- cmd, -- 3, -- FALSE, -- NULL, -- NULL); -- result = g_simple_async_result_new (G_OBJECT (self), -- callback, -- user_data, -- setup_flow_control); -- g_simple_async_result_set_op_res_gboolean (result, TRUE); -- g_simple_async_result_complete_in_idle (result); -- g_object_unref (result); -- g_free (cmd); --} -- --/*****************************************************************************/ - /* Load current mode (Modem interface) */ - - static gboolean -@@ -1287,8 +1241,6 @@ iface_modem_init (MMIfaceModem *iface) - iface->modem_power_down_finish = modem_power_down_finish; - iface->load_access_technologies = load_access_technologies; - iface->load_access_technologies_finish = load_access_technologies_finish; -- iface->setup_flow_control = setup_flow_control; -- iface->setup_flow_control_finish = setup_flow_control_finish; - iface->load_supported_modes = load_supported_modes; - iface->load_supported_modes_finish = load_supported_modes_finish; - iface->load_current_modes = load_current_modes; diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch deleted file mode 100644 index c3fa9c7ad..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0006-port-serial-new-internal-method-to-run-tcsetattr.patch +++ /dev/null @@ -1,167 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 18:17:41 +0100 -Subject: [PATCH] port-serial: new internal method to run tcsetattr() - -The method takes care of looping if EAGAIN errors happen, as well as -checking whether all attributes were set or not. ---- - src/mm-port-serial.c | 119 ++++++++++++++++++++++++--------------------------- - 1 file changed, 57 insertions(+), 62 deletions(-) - -diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c -index 2b6b92d3d1da..f2b97a02486d 100644 ---- a/src/mm-port-serial.c -+++ b/src/mm-port-serial.c -@@ -347,9 +347,62 @@ parse_stopbits (guint i) - } - - static gboolean -+internal_tcsetattr (MMPortSerial *self, -+ gint fd, -+ const struct termios *options, -+ GError **error) -+{ -+ guint count; -+ struct termios other; -+ -+#define MAX_TCSETATTR_RETRIES 4 -+ -+ for (count = 0; count < MAX_TCSETATTR_RETRIES; count++) { -+ /* try to set the new port attributes */ -+ errno = 0; -+ if (tcsetattr (fd, TCSANOW, options) == 0) -+ break; -+ -+ /* hard error if not EAGAIN */ -+ if (errno != EAGAIN) { -+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -+ "couldn't set serial port attributes: %s", g_strerror (errno)); -+ return FALSE; -+ } -+ -+ /* try a few times if EAGAIN */ -+ g_usleep (100000); -+ } -+ -+ /* too many retries? */ -+ if (count == MAX_TCSETATTR_RETRIES) { -+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -+ "couldn't set serial port attributes: too many retries (%u)", count); -+ return FALSE; -+ } -+ -+ /* tcsetattr() returns 0 if any of the requested attributes could be set, -+ * so we should double-check that all were set and log if not. Just with -+ * debug level, as we're ignoring this issue all together anyway. -+ */ -+ memset (&other, 0, sizeof (struct termios)); -+ errno = 0; -+ if (tcgetattr (fd, &other) != 0) -+ mm_dbg ("(%s): couldn't get serial port attributes after setting them: %s", -+ mm_port_get_device (MM_PORT (self)), g_strerror (errno)); -+ else if (memcmp (options, &other, sizeof (struct termios)) != 0) -+ mm_dbg ("(%s): port attributes not fully set", -+ mm_port_get_device (MM_PORT (self))); -+ -+#undef MAX_TCSETATTR_RETRIES -+ -+ return TRUE; -+} -+ -+static gboolean - real_config_fd (MMPortSerial *self, int fd, GError **error) - { -- struct termios stbuf, other; -+ struct termios stbuf; - guint speed; - gint bits; - gint parity; -@@ -416,32 +469,7 @@ real_config_fd (MMPortSerial *self, int fd, GError **error) - return FALSE; - } - -- if (tcsetattr (fd, TCSANOW, &stbuf) < 0) { -- g_set_error (error, -- MM_CORE_ERROR, -- MM_CORE_ERROR_FAILED, -- "%s: failed to set serial port attributes; errno %d", -- __func__, errno); -- return FALSE; -- } -- -- /* tcsetattr() returns 0 if any of the requested attributes could be set, -- * so we should double-check that all were set and log a warning if not. -- */ -- memset (&other, 0, sizeof (struct termios)); -- errno = 0; -- if (tcgetattr (fd, &other) != 0) { -- mm_warn ("(%s): tcgetattr() error: %d", -- mm_port_get_device (MM_PORT (self)), -- errno); -- } -- -- if (memcmp (&stbuf, &other, sizeof (other)) != 0) { -- mm_warn ("(%s): port attributes not fully set", -- mm_port_get_device (MM_PORT (self))); -- } -- -- return TRUE; -+ return internal_tcsetattr (self, fd, &stbuf, error); - } - - static void -@@ -1576,15 +1604,11 @@ static gboolean - set_speed (MMPortSerial *self, speed_t speed, GError **error) - { - struct termios options; -- int fd, count = 4; -- gboolean success = FALSE; - - g_assert (self->priv->fd >= 0); - -- fd = self->priv->fd; -- - memset (&options, 0, sizeof (struct termios)); -- if (tcgetattr (fd, &options) != 0) { -+ if (tcgetattr (self->priv->fd, &options) != 0) { - g_set_error (error, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, -@@ -1601,36 +1625,7 @@ set_speed (MMPortSerial *self, speed_t speed, GError **error) - if (self->priv->rts_cts) - options.c_cflag |= (CRTSCTS); - -- while (count-- > 0) { -- if (tcsetattr (fd, TCSANOW, &options) == 0) { -- success = TRUE; -- break; /* Operation successful */ -- } -- -- /* Try a few times if EAGAIN */ -- if (errno == EAGAIN) -- g_usleep (100000); -- else { -- /* If not EAGAIN, hard error */ -- g_set_error (error, -- MM_CORE_ERROR, -- MM_CORE_ERROR_FAILED, -- "%s: tcsetattr() error %d", -- __func__, errno); -- return FALSE; -- } -- } -- -- if (!success) { -- g_set_error (error, -- MM_CORE_ERROR, -- MM_CORE_ERROR_FAILED, -- "%s: tcsetattr() retry timeout", -- __func__); -- return FALSE; -- } -- -- return TRUE; -+ return internal_tcsetattr (self, self->priv->fd, &options, error); - } - - /*****************************************************************************/ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch deleted file mode 100644 index b7226319c..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0007-port-serial-new-method-to-explicitly-set-flow-contro.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 18:18:46 +0100 -Subject: [PATCH] port-serial: new method to explicitly set flow control - settings - ---- - src/mm-port-serial.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/mm-port-serial.h | 5 +++++ - 2 files changed, 55 insertions(+) - -diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c -index f2b97a02486d..e55f90625020 100644 ---- a/src/mm-port-serial.c -+++ b/src/mm-port-serial.c -@@ -1778,6 +1778,56 @@ mm_port_serial_flash (MMPortSerial *self, - - /*****************************************************************************/ - -+gboolean -+mm_port_serial_set_flow_control (MMPortSerial *self, -+ MMFlowControl flow_control, -+ GError **error) -+{ -+ struct termios options; -+ gboolean had_xon_xoff; -+ gboolean had_rts_cts; -+ -+ /* retrieve current settings */ -+ memset (&options, 0, sizeof (struct termios)); -+ if (tcgetattr (self->priv->fd, &options) != 0) { -+ g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, -+ "couldn't get serial port attributes: %s", g_strerror (errno)); -+ return FALSE; -+ } -+ -+ /* clear all flow control flags */ -+ -+ had_xon_xoff = !!(options.c_iflag & (IXON | IXOFF)); -+ options.c_iflag &= ~(IXON | IXOFF | IXANY); -+ -+ had_rts_cts = !!(options.c_cflag & (CRTSCTS)); -+ options.c_cflag &= ~(CRTSCTS); -+ -+ /* setup the requested flags */ -+ switch (flow_control) { -+ case MM_FLOW_CONTROL_XON_XOFF: -+ mm_dbg ("(%s): enabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); -+ options.c_iflag |= (IXON | IXOFF | IXANY); -+ break; -+ case MM_FLOW_CONTROL_RTS_CTS: -+ mm_dbg ("(%s): enabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); -+ options.c_cflag |= (CRTSCTS); -+ break; -+ case MM_FLOW_CONTROL_NONE: -+ if (had_xon_xoff) -+ mm_dbg ("(%s): disabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); -+ if (had_rts_cts) -+ mm_dbg ("(%s): disabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); -+ break; -+ default: -+ g_assert_not_reached (); -+ } -+ -+ return internal_tcsetattr (self, self->priv->fd, &options, error); -+} -+ -+/*****************************************************************************/ -+ - MMPortSerial * - mm_port_serial_new (const char *name, MMPortType ptype) - { -diff --git a/src/mm-port-serial.h b/src/mm-port-serial.h -index 708e39123412..223b9ce1c4a4 100644 ---- a/src/mm-port-serial.h -+++ b/src/mm-port-serial.h -@@ -21,6 +21,7 @@ - #include - #include - -+#include "mm-modem-helpers.h" - #include "mm-port.h" - - #define MM_TYPE_PORT_SERIAL (mm_port_serial_get_type ()) -@@ -150,4 +151,8 @@ GByteArray *mm_port_serial_command_finish (MMPortSerial *self, - GAsyncResult *res, - GError **error); - -+gboolean mm_port_serial_set_flow_control (MMPortSerial *self, -+ MMFlowControl flow_control, -+ GError **error); -+ - #endif /* MM_PORT_SERIAL_H */ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch deleted file mode 100644 index 81afd5d9a..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0008-port-serial-remove-all-default-flow-control-settings.patch +++ /dev/null @@ -1,118 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 18:27:09 +0100 -Subject: [PATCH] port-serial: remove all default flow control settings - -We won't set XON/XOFF by default and we won't allow setting RTS/CTS -via a property. The serial port by default starts with no flow control -configured. ---- - src/mm-port-serial.c | 34 ++++++---------------------------- - src/mm-port-serial.h | 1 - - 2 files changed, 6 insertions(+), 29 deletions(-) - -diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c -index e55f90625020..04ab17fe1675 100644 ---- a/src/mm-port-serial.c -+++ b/src/mm-port-serial.c -@@ -56,7 +56,6 @@ enum { - PROP_SEND_DELAY, - PROP_FD, - PROP_SPEW_CONTROL, -- PROP_RTS_CTS, - PROP_FLASH_OK, - - LAST_PROP -@@ -97,7 +96,6 @@ struct _MMPortSerialPrivate { - guint stopbits; - guint64 send_delay; - gboolean spew_control; -- gboolean rts_cts; - gboolean flash_ok; - - guint queue_id; -@@ -433,21 +431,19 @@ real_config_fd (MMPortSerial *self, int fd, GError **error) - errno); - } - -- stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY ); -+ stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | PARODD | CRTSCTS); -+ stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXOFF | IXANY ); - stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET); - stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL); - stbuf.c_cc[VMIN] = 1; - stbuf.c_cc[VTIME] = 0; - stbuf.c_cc[VEOF] = 1; - -- /* Use software handshaking and ignore parity/framing errors */ -- stbuf.c_iflag |= (IXON | IXOFF | IXANY | IGNPAR); -+ /* Ignore parity/framing errors */ -+ stbuf.c_iflag |= IGNPAR; - -- /* Set up port speed and serial attributes; also ignore modem control -- * lines since most drivers don't implement RTS/CTS anyway. -- */ -- stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | CRTSCTS); -- stbuf.c_cflag |= (bits | CREAD | 0 | parity | stopbits | CLOCAL); -+ /* Set up port speed and serial attributes and enable receiver in local mode */ -+ stbuf.c_cflag |= (bits | parity | stopbits | CLOCAL | CREAD); - - errno = 0; - if (cfsetispeed (&stbuf, speed) != 0) { -@@ -1621,10 +1617,6 @@ set_speed (MMPortSerial *self, speed_t speed, GError **error) - cfsetospeed (&options, speed); - options.c_cflag |= (CLOCAL | CREAD); - -- /* Configure flow control as well here */ -- if (self->priv->rts_cts) -- options.c_cflag |= (CRTSCTS); -- - return internal_tcsetattr (self, self->priv->fd, &options, error); - } - -@@ -1928,9 +1920,6 @@ set_property (GObject *object, - case PROP_SPEW_CONTROL: - self->priv->spew_control = g_value_get_boolean (value); - break; -- case PROP_RTS_CTS: -- self->priv->rts_cts = g_value_get_boolean (value); -- break; - case PROP_FLASH_OK: - self->priv->flash_ok = g_value_get_boolean (value); - break; -@@ -1970,9 +1959,6 @@ get_property (GObject *object, - case PROP_SPEW_CONTROL: - g_value_set_boolean (value, self->priv->spew_control); - break; -- case PROP_RTS_CTS: -- g_value_set_boolean (value, self->priv->rts_cts); -- break; - case PROP_FLASH_OK: - g_value_set_boolean (value, self->priv->flash_ok); - break; -@@ -2081,14 +2067,6 @@ mm_port_serial_class_init (MMPortSerialClass *klass) - G_PARAM_READWRITE)); - - g_object_class_install_property -- (object_class, PROP_RTS_CTS, -- g_param_spec_boolean (MM_PORT_SERIAL_RTS_CTS, -- "RTSCTS", -- "Enable RTS/CTS flow control", -- FALSE, -- G_PARAM_READWRITE)); -- -- g_object_class_install_property - (object_class, PROP_FLASH_OK, - g_param_spec_boolean (MM_PORT_SERIAL_FLASH_OK, - "FlashOk", -diff --git a/src/mm-port-serial.h b/src/mm-port-serial.h -index 223b9ce1c4a4..0514e3607101 100644 ---- a/src/mm-port-serial.h -+++ b/src/mm-port-serial.h -@@ -36,7 +36,6 @@ - #define MM_PORT_SERIAL_PARITY "parity" - #define MM_PORT_SERIAL_STOPBITS "stopbits" - #define MM_PORT_SERIAL_SEND_DELAY "send-delay" --#define MM_PORT_SERIAL_RTS_CTS "rts-cts" - #define MM_PORT_SERIAL_FD "fd" /* Construct-only */ - #define MM_PORT_SERIAL_SPEW_CONTROL "spew-control" /* Construct-only */ - #define MM_PORT_SERIAL_FLASH_OK "flash-ok" /* Construct-only */ diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch deleted file mode 100644 index 2beaaea4d..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0009-broadband-bearer-once-connected-set-flow-control-set.patch +++ /dev/null @@ -1,211 +0,0 @@ -From: Aleksander Morgado -Date: Sat, 25 Mar 2017 18:30:02 +0100 -Subject: [PATCH] broadband-bearer: once connected, set flow control settings - -During modem initialization we detected the flow control settings -supported by the modem, and selected the best one to use from them, -notifying it to the device via AT+IFC. The device was therefore -instructed to use that flow control setting for data transmission in -the TTY (i.e. not during AT control commands). - -The missing thing was to also configure ourselves our end of the -serial port with the same flow control settings when getting into data -mode. By doing it ourselves, we avoid requiring any explicit setting -in pppd for flow control; pppd can assume the flow control settings -are already the expected ones. - -Worth noting that all this setup is completely ignored for TTYs -exposed directly via USB. - -https://bugs.freedesktop.org/show_bug.cgi?id=100394 ---- - src/mm-broadband-bearer.c | 32 ++++++++++++++++++++++++++++++++ - src/mm-broadband-modem.c | 36 +++++++++++++++++++++++++----------- - src/mm-broadband-modem.h | 4 ++++ - 3 files changed, 61 insertions(+), 11 deletions(-) - -diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c -index 0565eee3afeb..facbc1457603 100644 ---- a/src/mm-broadband-bearer.c -+++ b/src/mm-broadband-bearer.c -@@ -259,6 +259,14 @@ dial_cdma_ready (MMBaseModem *modem, - * connect_succeeded(), we do it right away so that we stop our polling. */ - mm_port_set_connected (ctx->data, TRUE); - -+ /* Configure flow control to use while connected */ -+ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (ctx->data), -+ mm_broadband_modem_get_connected_flow_control (MM_BROADBAND_MODEM (modem)), -+ &error)) { -+ mm_warn ("Couldn't set flow control settings: %s", error->message); -+ g_clear_error (&error); -+ } -+ - /* Keep port open during connection */ - ctx->close_data_on_exit = FALSE; - -@@ -557,6 +565,8 @@ atd_ready (MMBaseModem *modem, - GAsyncResult *res, - Dial3gppContext *ctx) - { -+ GError *error = NULL; -+ - /* DO NOT check for cancellable here. If we got here without errors, the - * bearer is really connected and therefore we need to reflect that in - * the state machine. */ -@@ -576,6 +586,14 @@ atd_ready (MMBaseModem *modem, - return; - } - -+ /* Configure flow control to use while connected */ -+ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (ctx->dial_port), -+ mm_broadband_modem_get_connected_flow_control (MM_BROADBAND_MODEM (modem)), -+ &error)) { -+ mm_warn ("Couldn't set flow control settings: %s", error->message); -+ g_clear_error (&error); -+ } -+ - /* The ATD command has succeeded, and therefore the TTY is in data mode now. - * Instead of waiting for setting the port as connected later in - * connect_succeeded(), we do it right away so that we stop our polling. */ -@@ -1452,9 +1470,16 @@ data_flash_cdma_ready (MMPortSerial *data, - DetailedDisconnectContext *ctx) - { - GError *error = NULL; -+ GError *flow_control_error = NULL; - - mm_port_serial_flash_finish (data, res, &error); - -+ /* Cleanup flow control */ -+ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (data), MM_FLOW_CONTROL_NONE, &flow_control_error)) { -+ mm_dbg ("Couldn't reset flow control settings: %s", flow_control_error->message); -+ g_clear_error (&flow_control_error); -+ } -+ - /* We kept the serial port open during connection, now we close that open - * count */ - mm_port_serial_close (data); -@@ -1569,9 +1594,16 @@ data_flash_3gpp_ready (MMPortSerial *data, - DetailedDisconnectContext *ctx) - { - GError *error = NULL; -+ GError *flow_control_error = NULL; - - mm_port_serial_flash_finish (data, res, &error); - -+ /* Cleanup flow control */ -+ if (!mm_port_serial_set_flow_control (MM_PORT_SERIAL (data), MM_FLOW_CONTROL_NONE, &flow_control_error)) { -+ mm_dbg ("Couldn't reset flow control settings: %s", flow_control_error->message); -+ g_clear_error (&flow_control_error); -+ } -+ - /* We kept the serial port open during connection, now we close that open - * count */ - mm_port_serial_close (data); -diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c -index e5ad354882bb..3aa6e5f37424 100644 ---- a/src/mm-broadband-modem.c -+++ b/src/mm-broadband-modem.c -@@ -146,6 +146,7 @@ struct _MMBroadbandModemPrivate { - guint modem_cind_max_signal_quality; - guint modem_cind_indicator_roaming; - guint modem_cind_indicator_service; -+ MMFlowControl modem_flow_control; - - /*<--- Modem 3GPP interface --->*/ - /* Properties */ -@@ -3101,17 +3102,20 @@ modem_setup_flow_control_finish (MMIfaceModem *self, - } - - static void --ifc_test_ready (MMBaseModem *self, -+ifc_test_ready (MMBaseModem *_self, - GAsyncResult *res, - GTask *task) - { -- GError *error = NULL; -- const gchar *response; -- MMFlowControl mask; -- const gchar *cmd; -+ MMBroadbandModem *self; -+ GError *error = NULL; -+ const gchar *response; -+ MMFlowControl mask; -+ const gchar *cmd; -+ -+ self = MM_BROADBAND_MODEM (_self); - - /* Completely ignore errors in AT+IFC=? */ -- response = mm_base_modem_at_command_finish (self, res, &error); -+ response = mm_base_modem_at_command_finish (_self, res, &error); - if (!response) - goto out; - -@@ -3125,17 +3129,20 @@ ifc_test_ready (MMBaseModem *self, - * XON/XOFF - * None. - */ -- if (mask & MM_FLOW_CONTROL_RTS_CTS) -+ if (mask & MM_FLOW_CONTROL_RTS_CTS) { -+ self->priv->modem_flow_control = MM_FLOW_CONTROL_RTS_CTS; - cmd = "+IFC=2,2"; -- else if (mask & MM_FLOW_CONTROL_XON_XOFF) -+ } else if (mask & MM_FLOW_CONTROL_XON_XOFF) { -+ self->priv->modem_flow_control = MM_FLOW_CONTROL_XON_XOFF; - cmd = "+IFC=1,1"; -- else if (mask & MM_FLOW_CONTROL_NONE) -+ } else if (mask & MM_FLOW_CONTROL_NONE) { -+ self->priv->modem_flow_control = MM_FLOW_CONTROL_NONE; - cmd = "+IFC=0,0"; -- else -+ } else - g_assert_not_reached (); - - /* Set flow control settings and ignore result */ -- mm_base_modem_at_command (self, cmd, 3, FALSE, NULL, NULL); -+ mm_base_modem_at_command (_self, cmd, 3, FALSE, NULL, NULL); - - out: - /* Ignore errors */ -@@ -10332,6 +10339,12 @@ mm_broadband_modem_get_current_charset (MMBroadbandModem *self) - return self->priv->modem_current_charset; - } - -+MMFlowControl -+mm_broadband_modem_get_connected_flow_control (MMBroadbandModem *self) -+{ -+ return self->priv->modem_flow_control; -+} -+ - gchar * - mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, - const gchar *ati, -@@ -10652,6 +10665,7 @@ mm_broadband_modem_init (MMBroadbandModem *self) - self->priv->current_sms_mem1_storage = MM_SMS_STORAGE_UNKNOWN; - self->priv->current_sms_mem2_storage = MM_SMS_STORAGE_UNKNOWN; - self->priv->sim_hot_swap_supported = FALSE; -+ self->priv->modem_flow_control = MM_FLOW_CONTROL_NONE; - } - - static void -diff --git a/src/mm-broadband-modem.h b/src/mm-broadband-modem.h -index d6b55d9dd030..9ac4eabded65 100644 ---- a/src/mm-broadband-modem.h -+++ b/src/mm-broadband-modem.h -@@ -24,6 +24,7 @@ - - #include - -+#include "mm-modem-helpers.h" - #include "mm-charsets.h" - #include "mm-base-modem.h" - -@@ -109,6 +110,9 @@ gchar *mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem - - MMModemCharset mm_broadband_modem_get_current_charset (MMBroadbandModem *self); - -+/* Get the flow control setting to apply when connected, if any */ -+MMFlowControl mm_broadband_modem_get_connected_flow_control (MMBroadbandModem *self); -+ - /* Create a unique device identifier string using the ATI and ATI1 replies and some - * additional internal info */ - gchar *mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb index 53d576446..e6cb3a16b 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -15,16 +15,8 @@ PV = "1.7.0+git${SRCPV}" SRC_URI = " \ git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ file://0001-configure.ac-add-foreign-automake-option.patch \ - file://0002-helpers-new-parser-for-AT-IFC.patch \ - file://0003-broadband-modem-query-supported-flow-control-modes-b.patch \ - file://0004-wavecom-ignore-custom-flow-control-handling.patch \ - file://0005-telit-ignore-custom-flow-control-handling.patch \ - file://0006-port-serial-new-internal-method-to-run-tcsetattr.patch \ - file://0007-port-serial-new-method-to-explicitly-set-flow-contro.patch \ - file://0008-port-serial-remove-all-default-flow-control-settings.patch \ - file://0009-broadband-bearer-once-connected-set-flow-control-set.patch \ " -SRCREV = "34443289d97da5c95270c6071d140f4567047624" +SRCREV = "d09bc8baaa9fe93a72bb715530b1403a7a81c891" S = "${WORKDIR}/git" From 68df1229896c799f923263e7437a5ef6096bca1a Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 19 Apr 2017 14:17:03 +0200 Subject: [PATCH 30/45] modemmanager: enable log file Instead of redirecting the MM logging to '/dev/null' use a file, so we can see what's going on in case of failure. Signed-off-by: Javier Viguera --- .../modemmanager/modemmanager/cellularifupdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown index 88e2072aa..f38082719 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown @@ -8,7 +8,7 @@ POLLING_WAIT=5 background_connect() { # Ensure ModemManager is running - killall -0 ModemManager 2>/dev/null || ModemManager --log-file=/dev/null & + killall -0 ModemManager 2>/dev/null || ModemManager --log-file=/var/log/modemmanager.log & # Wait for modem detection while [ "${RETRIES}" -gt "0" ]; do From 682d77e414981e17bbebd9e4476e498c6aa8becd Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 19 Apr 2017 16:28:07 +0200 Subject: [PATCH 31/45] modemmanager: add more retries for port AT probing Launching the MM on target's boot fails to detect the XBee cellular because this needs more time to complete the initialization. So add some more retries for the AT port probing to allow the XBee cellular to be detected. Signed-off-by: Javier Viguera --- ...add-more-retries-for-port-AT-probing.patch | 29 +++++++++++++++++++ .../modemmanager/modemmanager_git.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch new file mode 100644 index 000000000..e3919915a --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch @@ -0,0 +1,29 @@ +From: Javier Viguera +Date: Wed, 19 Apr 2017 14:04:51 +0200 +Subject: [PATCH] port-probe: add more retries for port AT probing + +Launching the MM on target's boot fails to detect the XBee cellular +because this needs more time to complete the initialization. So add some +more retries for the AT port probing to allow the XBee cellular to be +detected. + +Upstream-Status: Inappropriate [embedded specific (Xbee cellular)] + +Signed-off-by: Javier Viguera +--- + src/mm-port-probe.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c +index cfe0763cfc3d..18cf53dd6b1d 100644 +--- a/src/mm-port-probe.c ++++ b/src/mm-port-probe.c +@@ -1006,6 +1006,8 @@ static const MMPortProbeAtCommand at_probing[] = { + { "AT", 3, mm_port_probe_response_processor_is_at }, + { "AT", 3, mm_port_probe_response_processor_is_at }, + { "AT", 3, mm_port_probe_response_processor_is_at }, ++ { "AT", 15, mm_port_probe_response_processor_is_at }, ++ { "AT", 20, mm_port_probe_response_processor_is_at }, + { NULL } + }; + diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb index e6cb3a16b..65450718a 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -15,6 +15,7 @@ PV = "1.7.0+git${SRCPV}" SRC_URI = " \ git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ file://0001-configure.ac-add-foreign-automake-option.patch \ + file://0002-port-probe-add-more-retries-for-port-AT-probing.patch \ " SRCREV = "d09bc8baaa9fe93a72bb715530b1403a7a81c891" From b56bdf126c6f336ee502971ec8d16e3cb8df3cf5 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 19 Apr 2017 16:32:04 +0200 Subject: [PATCH 32/45] modemmanager: add B230400 and B921600 missing baudrates So they can be used by MM to open the serial port (configured via udev tags). Signed-off-by: Javier Viguera --- ...B230400-and-B921600-missing-baudrate.patch | 33 +++++++++++++++++++ .../modemmanager/modemmanager_git.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch new file mode 100644 index 000000000..2eedc9ea2 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch @@ -0,0 +1,33 @@ +From: Javier Viguera +Date: Wed, 19 Apr 2017 14:13:56 +0200 +Subject: [PATCH] port-serial: add B230400 and B921600 missing baudrates + +So MM can use them when opening a specific serial port. + +Upstream-Status: Pending + +Signed-off-by: Javier Viguera +--- + src/mm-port-serial.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c +index 04ab17fe1675..b6359d28acd3 100644 +--- a/src/mm-port-serial.c ++++ b/src/mm-port-serial.c +@@ -260,9 +260,15 @@ parse_baudrate (guint baudrate_num, + case 115200: + speed = B115200; + break; ++ case 230400: ++ speed = B230400; ++ break; + case 460800: + speed = B460800; + break; ++ case 921600: ++ speed = B921600; ++ break; + default: + return FALSE; + } diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb index 65450718a..6e1c4a64d 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -16,6 +16,7 @@ SRC_URI = " \ git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ file://0001-configure.ac-add-foreign-automake-option.patch \ file://0002-port-probe-add-more-retries-for-port-AT-probing.patch \ + file://0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch \ " SRCREV = "d09bc8baaa9fe93a72bb715530b1403a7a81c891" From a7105c70d035379779c5dbb985f73e84eb602bdc Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 19 Apr 2017 16:33:56 +0200 Subject: [PATCH 33/45] init-ifupdown: remove wrong sed command This 'sed' command was used in the past, when DHCP or MANUAL was configured in the '/etc/network/interfaces' (for cellular). This is no longer true as we always configure the interface with a custom (manual) script. This was breaking the rest of interfaces when configured to use 'dhcp': iface eth0 inet manual umanualc_opts -S -b >/dev/null & Signed-off-by: Javier Viguera --- .../recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend index 9a37c83b8..38e5d2f17 100644 --- a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend +++ b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend @@ -82,7 +82,6 @@ do_install_append() { if [ -n "${CELLULAR_PORT}" ]; then sed -i -e 's/^\([[:blank:]]*\)port/\1port ${CELLULAR_PORT}/g' ${D}${sysconfdir}/network/interfaces - sed -i -e 's,dhcp,manual,g' ${D}${sysconfdir}/network/interfaces else sed -i -e '/^[[:blank:]]*port/d' ${D}${sysconfdir}/network/interfaces fi From 71323796fd2ddac7182f0d473b9d28fc19c0c475 Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Thu, 20 Apr 2017 20:30:18 +0200 Subject: [PATCH 34/45] mca_tool: update checksums for v1.5 Signed-off-by: Hector Palacios Signed-off-by: Javier Viguera --- meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb index d1c09c2be..0b4c41359 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb @@ -7,8 +7,8 @@ LICENSE = "CLOSED" PKGNAME = "mca_tool" SRC_URI = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "510998d6d4bc8b15707dc73e4ea1c42d" -SRC_URI[sha256sum] = "79cf18bfec35fd9a779eff3ad119d03cc3ab96de8ada6ffcd63dac45a9c6308b" +SRC_URI[md5sum] = "9ac68ec6f7566708ddd229bf2667bded" +SRC_URI[sha256sum] = "207edb368e4ebe920cd78daac641640c663877d7438691897044030d2af8895c" S = "${WORKDIR}/${PKGNAME}-${PV}" From bc8ac0507d7e8443a6c26cd401c83d6544bd9cdc Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 21 Apr 2017 16:53:32 +0200 Subject: [PATCH 35/45] init-ifupdown: disable wlan interfaces on non-wireless variants Added a post-installation script to disable the wireless interfaces on module variants without wireless support. This fixes following messages on boot: wlan: driver load failure modprobe: can't load module wlan (extra/wlan.ko): No such device ... https://jira.digi.com/browse/DEL-3781 Signed-off-by: Javier Viguera --- .../init-ifupdown/init-ifupdown_1.0.bbappend | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend index 38e5d2f17..99a1c3890 100644 --- a/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend +++ b/meta-digi-dey/recipes-core/init-ifupdown/init-ifupdown_1.0.bbappend @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Digi International. +# Copyright (C) 2013-2017 Digi International Inc. FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" @@ -138,3 +138,21 @@ do_install_append_ccimx6ul() { sed -i -e "s,##WLAN1_STATIC_GATEWAY##,${WLAN1_STATIC_GATEWAY},g" ${D}${sysconfdir}/network/interfaces sed -i -e "s,##WLAN1_STATIC_DNS##,${WLAN1_STATIC_DNS},g" ${D}${sysconfdir}/network/interfaces } + +# Disable wireless interfaces on first boot for non-wireless variants +pkg_postinst_${PN}() { + if [ -n "$D" ]; then + exit 1 + fi + + if [ ! -d "/proc/device-tree/wireless" ]; then + sed -i -e '/^auto wlan/{s,^,#,g};/^auto p2p/{s,^,#,g}' /etc/network/interfaces + fi + + # Create the symlinks in the different runlevels + if type update-rc.d >/dev/null 2>/dev/null; then + update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} + fi + + exit 0 +} From 955e39515180874c903c6147a8906745285415af Mon Sep 17 00:00:00 2001 From: Salvador Penalva Date: Tue, 25 Apr 2017 10:46:57 +0200 Subject: [PATCH 36/45] Revert "README: add known issue for Telit LE910" This reverts commit fcdada265e9db26483d5e5f015e314da2409e835. Signed-off-by: Salvador Penalva --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index f4cef67b0..2f2d49abe 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,6 @@ boot a signed U-Boot only. * Cloud Connector * Remote file system management fails with long file names and paths (over 255 characters). -* Cellular modem Telit LE910-EUG - * Firmware version 17.01.522 not supported. Digi Embedded Yocto 2.2 has been tested - with FW version 17.00.523. ## Digi ConnectCore 6UL From 8a9e3330863655d11a19b6a1ac33b5fbee22f220 Mon Sep 17 00:00:00 2001 From: Sebastian Pastor Date: Tue, 25 Apr 2017 18:37:04 +0200 Subject: [PATCH 37/45] mca_tool: update checksums for build 1.6 Signed-off-by: Sebastian Pastor --- .../recipes-digi/mca/{mca-tool_1.5.bb => mca-tool_1.6.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta-digi-arm/recipes-digi/mca/{mca-tool_1.5.bb => mca-tool_1.6.bb} (70%) diff --git a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb b/meta-digi-arm/recipes-digi/mca/mca-tool_1.6.bb similarity index 70% rename from meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb rename to meta-digi-arm/recipes-digi/mca/mca-tool_1.6.bb index 0b4c41359..86ed5c3e1 100644 --- a/meta-digi-arm/recipes-digi/mca/mca-tool_1.5.bb +++ b/meta-digi-arm/recipes-digi/mca/mca-tool_1.6.bb @@ -7,8 +7,8 @@ LICENSE = "CLOSED" PKGNAME = "mca_tool" SRC_URI = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "9ac68ec6f7566708ddd229bf2667bded" -SRC_URI[sha256sum] = "207edb368e4ebe920cd78daac641640c663877d7438691897044030d2af8895c" +SRC_URI[md5sum] = "20992b6b30904ee4d75d196c957077e0" +SRC_URI[sha256sum] = "49458475dd5df11f0c4f4593ffc930fbcdaa457120f73ab18587d711eb9036f6" S = "${WORKDIR}/${PKGNAME}-${PV}" From 448e98aca77c70b8ec4195c40a31fbcf2d4f8f6f Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Wed, 26 Apr 2017 10:32:38 +0200 Subject: [PATCH 38/45] README: update https://jira.digi.com/browse/DEL-3949 Signed-off-by: Alex Gonzalez --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2f2d49abe..b29cb626f 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ boot a signed U-Boot only. point mode on channel 36 on band A, the recommendation would be to connect to the same channel both in station mode and WiFi direct so that the radio performance is optimized +* When working as an access point, DFS capable channels in band A are not + currently supported. ## Digi ConnectCore 6 From 9fed79fd45830bfff00a1ff358e034827e25ad49 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Wed, 26 Apr 2017 13:48:57 +0200 Subject: [PATCH 39/45] meta-digi: update revisions for dey-2.2-r1.3 Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 03d459756..67263505d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${UBOOT_GIT_URI};nobranch=1" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 8c99a86e0..dcb784add 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index f70e0e122..39771860f 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 1f7eb809e..43d0f3201 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};branch=${SRCBRANCH} \ + ${LINUX_GIT_URI};nobranch=1 \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index 6d7e0ec69..d6215f7f9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "${AUTOREV}" +SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 6819a65b9..e41f04b87 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "e2da450994b1dcc4b187fea9e258d993ef25fc56" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index b2a62d6db..bbbf8377f 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "${AUTOREV}" +SRCREV = "5f6c88ca70f685448894068f45ca069830595129" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index df5c2d21f..9f7e98759 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "${AUTOREV}" +SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" 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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${CC_GIT_URI};nobranch=1" S = "${WORKDIR}/git" From d3bb5967323680f8116600304aa322447754ad37 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Wed, 26 Apr 2017 13:51:58 +0200 Subject: [PATCH 40/45] meta-digi: revert revisions to AUTOREV Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 67263505d..03d459756 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};nobranch=1" +SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index dcb784add..8c99a86e0 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" +SRCREV = "${AUTOREV}" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index 39771860f..f70e0e122 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" +SRCREV = "${AUTOREV}" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};nobranch=1 \ + ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 43d0f3201..1f7eb809e 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};nobranch=1 \ + ${LINUX_GIT_URI};branch=${SRCBRANCH} \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index d6215f7f9..6d7e0ec69 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" +SRCREV = "${AUTOREV}" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index e41f04b87..6819a65b9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "e2da450994b1dcc4b187fea9e258d993ef25fc56" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index bbbf8377f..b2a62d6db 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "5f6c88ca70f685448894068f45ca069830595129" +SRCREV = "${AUTOREV}" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index 9f7e98759..df5c2d21f 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" +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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};nobranch=1" +SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" S = "${WORKDIR}/git" From 45f84286a33a8ed1edc537a1478f80f66dce08cb Mon Sep 17 00:00:00 2001 From: Alejandro Navarro Date: Wed, 26 Apr 2017 16:15:53 +0200 Subject: [PATCH 41/45] pulseaudio: disable memfd for CC6 Pulseaudio 9.0 relies on the syscall memfd_create, which was introduced in kernel 3.17, but the version currently supported for the CC6 SBC is 3.14. There is a corner case where the configure script does not detect the actual kernel version, thus enabling memfd_create. When Pulseadio tries to call memfd_create, it shows error messages, so disable memfd explicitly. https://jira.digi.com/browse/DEL-3923 Signed-off-by: Alejandro Navarro --- .../recipes-multimedia/pulseaudio/pulseaudio_%.bbappend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend index 9ebc49186..1889c09a0 100644 --- a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -9,6 +9,8 @@ SRC_URI_append_ccimx6sbc = " \ file://dey-audio-sgtl5000.conf \ " +EXTRA_OECONF_append_ccimx6sbc = " --disable-memfd" + do_install_append_ccimx6sbc() { install -d ${D}${sysconfdir}/udev/scripts install -m 0755 ${WORKDIR}/hdmi_hotplug.sh ${D}${sysconfdir}/udev/scripts From 7554f05b5f0f7db41309999e63de8302d0dbca1f Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 27 Apr 2017 18:07:05 +0200 Subject: [PATCH 42/45] Revert "modemmanager: add more retries for port AT probing" Adding more retries to the port AT probing has an impact in modems not using serial drivers (for example using qmi, mbim). It takes longer for MM to detect those modems and then user space gives up waiting for the modems to be available. This reverts commit 682d77e414981e17bbebd9e4476e498c6aa8becd. Signed-off-by: Javier Viguera --- ...add-more-retries-for-port-AT-probing.patch | 29 ------------------- .../modemmanager/modemmanager_git.bb | 1 - 2 files changed, 30 deletions(-) delete mode 100644 meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch deleted file mode 100644 index e3919915a..000000000 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/0002-port-probe-add-more-retries-for-port-AT-probing.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Javier Viguera -Date: Wed, 19 Apr 2017 14:04:51 +0200 -Subject: [PATCH] port-probe: add more retries for port AT probing - -Launching the MM on target's boot fails to detect the XBee cellular -because this needs more time to complete the initialization. So add some -more retries for the AT port probing to allow the XBee cellular to be -detected. - -Upstream-Status: Inappropriate [embedded specific (Xbee cellular)] - -Signed-off-by: Javier Viguera ---- - src/mm-port-probe.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c -index cfe0763cfc3d..18cf53dd6b1d 100644 ---- a/src/mm-port-probe.c -+++ b/src/mm-port-probe.c -@@ -1006,6 +1006,8 @@ static const MMPortProbeAtCommand at_probing[] = { - { "AT", 3, mm_port_probe_response_processor_is_at }, - { "AT", 3, mm_port_probe_response_processor_is_at }, - { "AT", 3, mm_port_probe_response_processor_is_at }, -+ { "AT", 15, mm_port_probe_response_processor_is_at }, -+ { "AT", 20, mm_port_probe_response_processor_is_at }, - { NULL } - }; - diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb index 6e1c4a64d..620720075 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager_git.bb @@ -15,7 +15,6 @@ PV = "1.7.0+git${SRCPV}" SRC_URI = " \ git://anongit.freedesktop.org/git/ModemManager/ModemManager.git;protocol=https \ file://0001-configure.ac-add-foreign-automake-option.patch \ - file://0002-port-probe-add-more-retries-for-port-AT-probing.patch \ file://0003-port-serial-add-B230400-and-B921600-missing-baudrate.patch \ " SRCREV = "d09bc8baaa9fe93a72bb715530b1403a7a81c891" From b1f2b851972c28382dbe24c716f1d083964e2821 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 27 Apr 2017 18:21:20 +0200 Subject: [PATCH 43/45] modemmanager: delay the launch of MM for XBee Cellular The XBee Cellular needs more time to settle down before MM is able to detect it on boot. As this is connected to one of the 'ttymxc' serial ports, use that port to conditionally delay the launch of MM. Signed-off-by: Javier Viguera --- .../modemmanager/modemmanager/cellularifupdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown index f38082719..15e993c8d 100644 --- a/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown +++ b/meta-digi-dey/recipes-connectivity/modemmanager/modemmanager/cellularifupdown @@ -7,6 +7,13 @@ POLLING_WAIT=5 [ -z "${IF_APN}" ] && exit 0 background_connect() { + # The XBee Cellular needs more time to settle down before MM is able + # to detect it. As the XBee is connected to a 'ttymxc' serial port, + # we check those ports to conditionally delay the launch of MM. + if echo "${IF_PORT}" | grep -qs ttymxc; then + sleep 25 + fi + # Ensure ModemManager is running killall -0 ModemManager 2>/dev/null || ModemManager --log-file=/var/log/modemmanager.log & From dacbe6eadb66d0847e46c0800e830f112c2f1f70 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 28 Apr 2017 10:47:46 +0200 Subject: [PATCH 44/45] meta-digi: Update Readme with latest release changes. Signed-off-by: Mike Engel --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b29cb626f..6ef239754 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Documentation is available online on the Digi documentation site: * Release based on [Yocto 2.2 (Morty)](https://www.yoctoproject.org/downloads/core/morty22) including: * New toolchain based on GCC-6.2.0 and GLIBC-2.24 * Updated Qt 5.7 - * Cellular support: + * Updated ModemManager with validated support for: * Digi's XBee Cellular LTE Cat 1 (USA/Verizon), with P/N XBC-V1-UT-001 * Telit's LE910 and HE910 * Huawei's ME909u @@ -79,6 +79,7 @@ Documentation is available online on the Digi documentation site: * Remote manager * Local and remote manager firmware update * Package upgrades and security fixes + * U-boot support for 1GB DDR3 RAM on CC6UL # Known Issues and Limitations From 29e3d0de4097b0388747cee7b9d823d362c4a2fb Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 28 Apr 2017 12:39:33 +0200 Subject: [PATCH 45/45] meta-digi: update revisions for dey-2.2-r1.4 Signed-off-by: Mike Engel --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc | 4 ++-- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 4 ++-- .../recipes-digi/trustfence/trustfence-sign-tools_1.0.bb | 4 ++-- meta-digi-arm/recipes-kernel/linux/linux-dey.inc | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb | 2 +- meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb | 2 +- .../recipes-digi/cloudconnector/cloudconnector_git.bb | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc index 03d459756..67263505d 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey-rev_2013.01.inc @@ -1,11 +1,11 @@ # Copyright (C) 2013 Digi International SRCBRANCH = "v2013.01/dub-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "f5e96d720736218f8b81e4cf3ec1a2cb55f86401" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" -SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${UBOOT_GIT_URI};nobranch=1" UBOOT_NVRAM_LIBPATH = "git/board/digi/common/cmd_nvram/lib" diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index 8c99a86e0..dcb784add 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -12,13 +12,13 @@ DEPENDS += "${@base_conditional('TRUSTFENCE_SIGN', '1', 'trustfence-cst-native', PROVIDES += "u-boot" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" # Select internal or Github U-Boot repo UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ " SRC_URI_append = " \ diff --git a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb index f70e0e122..39771860f 100644 --- a/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb +++ b/meta-digi-arm/recipes-digi/trustfence/trustfence-sign-tools_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" SRCBRANCH = "v2015.04/maint" -SRCREV = "${AUTOREV}" +SRCREV = "0de0373ade11801e9ce9eed20d31ab3fd37306dd" S = "${WORKDIR}" @@ -11,7 +11,7 @@ S = "${WORKDIR}" UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}" SRC_URI = " \ - ${UBOOT_GIT_URI};branch=${SRCBRANCH} \ + ${UBOOT_GIT_URI};nobranch=1 \ file://trustfence-sign-kernel.sh;name=kernel-script \ file://sign_uimage;name=kernel-sign \ file://encrypt_uimage;name=kernel-encrypt \ diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc index 1f7eb809e..43d0f3201 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey.inc +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey.inc @@ -16,7 +16,7 @@ LOCALVERSION = "-dey" LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}" SRC_URI = " \ - ${LINUX_GIT_URI};branch=${SRCBRANCH} \ + ${LINUX_GIT_URI};nobranch=1 \ file://defconfig \ " diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb index 6d7e0ec69..d6215f7f9 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.10.bb @@ -4,7 +4,7 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v3.10/dey-1.4/maint" -SRCREV = "${AUTOREV}" +SRCREV = "8a6a9230dfe407e1764b5db8ef5b15601d85cfd2" config_dts() { for DTB in ${KERNEL_DEVICETREE}; do diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb index 6819a65b9..e41f04b87 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_3.14.bb @@ -6,6 +6,6 @@ require recipes-kernel/linux/linux-dtb.inc inherit fsl-vivante-kernel-driver-handler SRCBRANCH = "v3.14/dey-2.0/maint" -SRCREV = "${AUTOREV}" +SRCREV = "e2da450994b1dcc4b187fea9e258d993ef25fc56" COMPATIBLE_MACHINE = "(ccimx6$)" diff --git a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb index b2a62d6db..9554d7397 100644 --- a/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb +++ b/meta-digi-arm/recipes-kernel/linux/linux-dey_4.1.bb @@ -4,6 +4,6 @@ require recipes-kernel/linux/linux-dey.inc require recipes-kernel/linux/linux-dtb.inc SRCBRANCH = "v4.1/dey-2.2/maint" -SRCREV = "${AUTOREV}" +SRCREV = "f1810a3190faad9b96cc8385b394ce7c9a6c5c3e" COMPATIBLE_MACHINE = "(ccimx6ul)" diff --git a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb index df5c2d21f..9f7e98759 100644 --- a/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb +++ b/meta-digi-dey/recipes-digi/cloudconnector/cloudconnector_git.bb @@ -8,14 +8,14 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 DEPENDS = "confuse openssl recovery-utils zlib" SRCBRANCH = "master" -SRCREV = "${AUTOREV}" +SRCREV = "5c79d1ddde37c18f4f311fb0046f85c1e2f6a38a" 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_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${CC_STASH}', '${CC_GITHUB}', d)}" -SRC_URI = "${CC_GIT_URI};branch=${SRCBRANCH}" +SRC_URI = "${CC_GIT_URI};nobranch=1" S = "${WORKDIR}/git"